1
+ import { BuildTarget } from "@trigger.dev/core/v3" ;
1
2
import { join } from "node:path" ;
2
3
import { sourceDir } from "../sourceDir.js" ;
3
- import { BuildTarget } from "@trigger.dev/core/v3" ;
4
- import { logger } from "../utilities/logger.js" ;
5
4
6
5
export const devRunWorker = join ( sourceDir , "entryPoints" , "dev-run-worker.js" ) ;
7
6
export const devIndexWorker = join ( sourceDir , "entryPoints" , "dev-index-worker.js" ) ;
@@ -26,54 +25,58 @@ export const esmShimPath = join(sourceDir, "shims", "esm.js");
26
25
27
26
export const shims = [ esmShimPath ] ;
28
27
28
+ // IMPORTANT: this may look like it should not work on Windows, but it does (and changing to using path.join will break stuff)
29
29
function isDevRunWorker ( entryPoint : string ) {
30
30
return (
31
- entryPoint . includes ( join ( "dist" , " esm" , " entryPoints" , " dev-run-worker.js") ) ||
32
- entryPoint . includes ( join ( "src" , " entryPoints" , " dev-run-worker.ts") )
31
+ entryPoint . includes ( "dist/ esm/ entryPoints/ dev-run-worker.js" ) ||
32
+ entryPoint . includes ( "src/ entryPoints/ dev-run-worker.ts" )
33
33
) ;
34
34
}
35
35
36
+ // IMPORTANT: this may look like it should not work on Windows, but it does (and changing to using path.join will break stuff)
36
37
function isDevIndexWorker ( entryPoint : string ) {
37
38
return (
38
- entryPoint . includes ( join ( "dist" , " esm" , " entryPoints" , " dev-index-worker.js") ) ||
39
- entryPoint . includes ( join ( "src" , " entryPoints" , " dev-index-worker.ts") )
39
+ entryPoint . includes ( "dist/ esm/ entryPoints/ dev-index-worker.js" ) ||
40
+ entryPoint . includes ( "src/ entryPoints/ dev-index-worker.ts" )
40
41
) ;
41
42
}
42
43
44
+ // IMPORTANT: this may look like it should not work on Windows, but it does (and changing to using path.join will break stuff)
43
45
function isDeployIndexController ( entryPoint : string ) {
44
46
return (
45
- entryPoint . includes ( join ( "dist" , " esm" , " entryPoints" , " deploy-index-controller.js") ) ||
46
- entryPoint . includes ( join ( "src" , " entryPoints" , " deploy-index-controller.ts") )
47
+ entryPoint . includes ( "dist/ esm/ entryPoints/ deploy-index-controller.js" ) ||
48
+ entryPoint . includes ( "src/ entryPoints/ deploy-index-controller.ts" )
47
49
) ;
48
50
}
49
51
52
+ // IMPORTANT: this may look like it should not work on Windows, but it does (and changing to using path.join will break stuff)
50
53
function isDeployIndexWorker ( entryPoint : string ) {
51
54
return (
52
- entryPoint . includes ( join ( "dist" , " esm" , " entryPoints" , " deploy-index-worker.js") ) ||
53
- entryPoint . includes ( join ( "src" , " entryPoints" , " deploy-index-worker.ts") )
55
+ entryPoint . includes ( "dist/ esm/ entryPoints/ deploy-index-worker.js" ) ||
56
+ entryPoint . includes ( "src/ entryPoints/ deploy-index-worker.ts" )
54
57
) ;
55
58
}
56
59
57
60
function isDeployRunController ( entryPoint : string ) {
58
61
return (
59
- entryPoint . includes ( join ( "dist" , " esm" , " entryPoints" , " deploy-run-controller.js") ) ||
60
- entryPoint . includes ( join ( "src" , " entryPoints" , " deploy-run-controller.ts") )
62
+ entryPoint . includes ( "dist/ esm/ entryPoints/ deploy-run-controller.js" ) ||
63
+ entryPoint . includes ( "src/ entryPoints/ deploy-run-controller.ts" )
61
64
) ;
62
65
}
63
66
67
+ // IMPORTANT: this may look like it should not work on Windows, but it does (and changing to using path.join will break stuff)
64
68
function isDeployRunWorker ( entryPoint : string ) {
65
69
return (
66
- entryPoint . includes ( join ( "dist" , " esm" , " entryPoints" , " deploy-run-worker.js") ) ||
67
- entryPoint . includes ( join ( "src" , " entryPoints" , " deploy-run-worker.ts") )
70
+ entryPoint . includes ( "dist/ esm/ entryPoints/ deploy-run-worker.js" ) ||
71
+ entryPoint . includes ( "src/ entryPoints/ deploy-run-worker.ts" )
68
72
) ;
69
73
}
70
74
75
+ // IMPORTANT: this may look like it should not work on Windows, but it does (and changing to using path.join will break stuff)
71
76
export function isLoaderEntryPoint ( entryPoint : string ) {
72
- logger . debug ( "isLoaderEntryPoint" , entryPoint , join ( "src" , "entryPoints" , "loader.ts" ) ) ;
73
-
74
77
return (
75
- entryPoint . includes ( join ( "dist" , " esm" , " entryPoints" , " loader.js") ) ||
76
- entryPoint . includes ( join ( "src" , " entryPoints" , " loader.ts") )
78
+ entryPoint . includes ( "dist/ esm/ entryPoints/ loader.js" ) ||
79
+ entryPoint . includes ( "src/ entryPoints/ loader.ts" )
77
80
) ;
78
81
}
79
82
0 commit comments