trigger.dev 0.0.0-v3-canary-20240321134710 → 0.0.0-v3-canary-20240321162743
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -800,7 +800,7 @@ import invariant from "tiny-invariant";
|
|
|
800
800
|
import { z as z4 } from "zod";
|
|
801
801
|
|
|
802
802
|
// package.json
|
|
803
|
-
var version = "0.0.0-v3-canary-
|
|
803
|
+
var version = "0.0.0-v3-canary-20240321162743";
|
|
804
804
|
var dependencies = {
|
|
805
805
|
"@baselime/node-opentelemetry": "^0.4.6",
|
|
806
806
|
"@clack/prompts": "^0.7.0",
|
|
@@ -821,7 +821,7 @@ var dependencies = {
|
|
|
821
821
|
"@opentelemetry/sdk-trace-node": "^1.21.0",
|
|
822
822
|
"@opentelemetry/semantic-conventions": "^1.21.0",
|
|
823
823
|
"@traceloop/instrumentation-openai": "^0.3.9",
|
|
824
|
-
"@trigger.dev/core": "workspace:0.0.0-v3-canary-
|
|
824
|
+
"@trigger.dev/core": "workspace:0.0.0-v3-canary-20240321162743",
|
|
825
825
|
"@types/degit": "^2.8.3",
|
|
826
826
|
chalk: "^5.2.0",
|
|
827
827
|
chokidar: "^3.5.3",
|
|
@@ -2625,6 +2625,31 @@ ${authorizationCodeResult.error}`
|
|
|
2625
2625
|
});
|
|
2626
2626
|
}
|
|
2627
2627
|
|
|
2628
|
+
// src/utilities/build.ts
|
|
2629
|
+
function bundleDependenciesPlugin(config) {
|
|
2630
|
+
return {
|
|
2631
|
+
name: "bundle-dependencies",
|
|
2632
|
+
setup(build3) {
|
|
2633
|
+
build3.onResolve({ filter: /.*/ }, (args) => {
|
|
2634
|
+
if (args.kind !== "import-statement") {
|
|
2635
|
+
return void 0;
|
|
2636
|
+
}
|
|
2637
|
+
for (let pattern of config.dependenciesToBundle ?? []) {
|
|
2638
|
+
if (typeof pattern === "string" ? args.path === pattern : pattern.test(args.path)) {
|
|
2639
|
+
const resolvedPath = __require.resolve(args.path);
|
|
2640
|
+
logger.debug(`Bundling ${args.path} as ${resolvedPath}`);
|
|
2641
|
+
return {
|
|
2642
|
+
path: resolvedPath,
|
|
2643
|
+
external: false
|
|
2644
|
+
};
|
|
2645
|
+
}
|
|
2646
|
+
}
|
|
2647
|
+
return void 0;
|
|
2648
|
+
});
|
|
2649
|
+
}
|
|
2650
|
+
};
|
|
2651
|
+
}
|
|
2652
|
+
|
|
2628
2653
|
// src/commands/deploy.ts
|
|
2629
2654
|
var DeployCommandOptions = CommonCommandOptions.extend({
|
|
2630
2655
|
skipTypecheck: z4.boolean().default(false),
|
|
@@ -3189,7 +3214,8 @@ async function compileProject(config, options, configPath) {
|
|
|
3189
3214
|
define: {
|
|
3190
3215
|
TRIGGER_API_URL: `"${config.triggerUrl}"`,
|
|
3191
3216
|
__PROJECT_CONFIG__: JSON.stringify(config)
|
|
3192
|
-
}
|
|
3217
|
+
},
|
|
3218
|
+
plugins: [bundleDependenciesPlugin(config)]
|
|
3193
3219
|
});
|
|
3194
3220
|
if (result.errors.length > 0) {
|
|
3195
3221
|
compileSpinner.stop("Build failed, aborting deployment");
|
|
@@ -4325,6 +4351,7 @@ function useDev({
|
|
|
4325
4351
|
__PROJECT_CONFIG__: JSON.stringify(config)
|
|
4326
4352
|
},
|
|
4327
4353
|
plugins: [
|
|
4354
|
+
bundleDependenciesPlugin(config),
|
|
4328
4355
|
{
|
|
4329
4356
|
name: "trigger.dev v3",
|
|
4330
4357
|
setup(build3) {
|