MCPcopy
hub / github.com/triggerdotdev/trigger.dev / bundleTriggerDevCore

Function bundleTriggerDevCore

packages/cli-v3/src/utilities/build.ts:39–72  ·  view source on GitHub ↗
(buildIdentifier: string, tsconfigPath?: string)

Source from the content-addressed store, hash-verified

37}
38
39export function bundleTriggerDevCore(buildIdentifier: string, tsconfigPath?: string): Plugin {
40 return {
41 name: "trigger-bundle-core",
42 setup(build) {
43 build.onResolve({ filter: /.*/ }, (args) => {
44 if (!args.path.startsWith("@trigger.dev/core/v3")) {
45 return undefined;
46 }
47
48 const triggerSdkPath = require.resolve("@trigger.dev/sdk/v3", { paths: [process.cwd()] });
49
50 logger.debug(`[${buildIdentifier}][trigger-bundle-core] Resolved @trigger.dev/sdk/v3`, {
51 ...args,
52 triggerSdkPath,
53 });
54
55 const resolvedPath = require.resolve(args.path, {
56 paths: [triggerSdkPath],
57 });
58
59 logger.debug(`[${buildIdentifier}][trigger-bundle-core] Externalizing ${args.path}`, {
60 ...args,
61 triggerSdkPath,
62 resolvedPath,
63 });
64
65 return {
66 path: resolvedPath,
67 external: false,
68 };
69 });
70 },
71 };
72}
73
74export function workerSetupImportConfigPlugin(configPath?: string): Plugin {
75 return {

Callers 1

runBuildFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…