trigger.dev 3.0.0-beta.36 → 3.0.0-beta.37
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
|
@@ -799,7 +799,7 @@ import invariant from "tiny-invariant";
|
|
|
799
799
|
import { z as z4 } from "zod";
|
|
800
800
|
|
|
801
801
|
// package.json
|
|
802
|
-
var version = "3.0.0-beta.
|
|
802
|
+
var version = "3.0.0-beta.37";
|
|
803
803
|
var dependencies = {
|
|
804
804
|
"@anatine/esbuild-decorators": "^0.2.19",
|
|
805
805
|
"@clack/prompts": "^0.7.0",
|
|
@@ -816,7 +816,7 @@ var dependencies = {
|
|
|
816
816
|
"@opentelemetry/sdk-trace-base": "^1.22.0",
|
|
817
817
|
"@opentelemetry/sdk-trace-node": "^1.22.0",
|
|
818
818
|
"@opentelemetry/semantic-conventions": "^1.22.0",
|
|
819
|
-
"@trigger.dev/core": "workspace:3.0.0-beta.
|
|
819
|
+
"@trigger.dev/core": "workspace:3.0.0-beta.37",
|
|
820
820
|
"@types/degit": "^2.8.3",
|
|
821
821
|
chalk: "^5.2.0",
|
|
822
822
|
chokidar: "^3.5.3",
|
|
@@ -1185,55 +1185,6 @@ import {
|
|
|
1185
1185
|
SEMRESATTRS_SERVICE_NAME,
|
|
1186
1186
|
SEMRESATTRS_SERVICE_VERSION
|
|
1187
1187
|
} from "@opentelemetry/semantic-conventions";
|
|
1188
|
-
function initializeTracing() {
|
|
1189
|
-
if (process.argv.includes("--skip-telemetry") || process.env.TRIGGER_DEV_SKIP_TELEMETRY) {
|
|
1190
|
-
return;
|
|
1191
|
-
}
|
|
1192
|
-
if (process.env.OTEL_INTERNAL_DIAG_DEBUG) {
|
|
1193
|
-
diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.DEBUG);
|
|
1194
|
-
}
|
|
1195
|
-
const resource = detectResourcesSync({
|
|
1196
|
-
detectors: [processDetectorSync]
|
|
1197
|
-
}).merge(
|
|
1198
|
-
new Resource({
|
|
1199
|
-
[SEMRESATTRS_SERVICE_NAME]: "trigger.dev cli v3",
|
|
1200
|
-
[SEMRESATTRS_SERVICE_VERSION]: version
|
|
1201
|
-
})
|
|
1202
|
-
);
|
|
1203
|
-
const traceProvider = new NodeTracerProvider({
|
|
1204
|
-
forceFlushTimeoutMillis: 500,
|
|
1205
|
-
resource,
|
|
1206
|
-
spanLimits: {
|
|
1207
|
-
attributeCountLimit: 1e3,
|
|
1208
|
-
attributeValueLengthLimit: 1e3,
|
|
1209
|
-
eventCountLimit: 100,
|
|
1210
|
-
attributePerEventCountLimit: 100,
|
|
1211
|
-
linkCountLimit: 10,
|
|
1212
|
-
attributePerLinkCountLimit: 100
|
|
1213
|
-
}
|
|
1214
|
-
});
|
|
1215
|
-
const spanExporter = new OTLPTraceExporter({
|
|
1216
|
-
url: "https://otel.baselime.io/v1",
|
|
1217
|
-
timeoutMillis: 5e3,
|
|
1218
|
-
headers: {
|
|
1219
|
-
"x-api-key": "b6e0fbbaf8dc2524773d2152ae2e9eb5c7fbaa52"
|
|
1220
|
-
}
|
|
1221
|
-
});
|
|
1222
|
-
const spanProcessor = new SimpleSpanProcessor(spanExporter);
|
|
1223
|
-
traceProvider.addSpanProcessor(spanProcessor);
|
|
1224
|
-
traceProvider.register();
|
|
1225
|
-
registerInstrumentations({
|
|
1226
|
-
instrumentations: [new FetchInstrumentation()]
|
|
1227
|
-
});
|
|
1228
|
-
return traceProvider;
|
|
1229
|
-
}
|
|
1230
|
-
var provider = initializeTracing();
|
|
1231
|
-
function getTracer() {
|
|
1232
|
-
return trace.getTracer("trigger.dev cli v3", version);
|
|
1233
|
-
}
|
|
1234
|
-
|
|
1235
|
-
// src/cli/common.ts
|
|
1236
|
-
import { fromZodError } from "zod-validation-error";
|
|
1237
1188
|
|
|
1238
1189
|
// src/utilities/logger.ts
|
|
1239
1190
|
import { format } from "node:util";
|
|
@@ -1348,7 +1299,58 @@ var Logger = class {
|
|
|
1348
1299
|
};
|
|
1349
1300
|
var logger = new Logger();
|
|
1350
1301
|
|
|
1302
|
+
// src/telemetry/tracing.ts
|
|
1303
|
+
function initializeTracing() {
|
|
1304
|
+
if (process.argv.includes("--skip-telemetry") || process.env.TRIGGER_DEV_SKIP_TELEMETRY || // only for backwards compat
|
|
1305
|
+
process.env.TRIGGER_TELEMETRY_DISABLED) {
|
|
1306
|
+
logger.debug("\u{1F4C9} Telemetry disabled");
|
|
1307
|
+
return;
|
|
1308
|
+
}
|
|
1309
|
+
if (process.env.OTEL_INTERNAL_DIAG_DEBUG) {
|
|
1310
|
+
diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.DEBUG);
|
|
1311
|
+
}
|
|
1312
|
+
const resource = detectResourcesSync({
|
|
1313
|
+
detectors: [processDetectorSync]
|
|
1314
|
+
}).merge(
|
|
1315
|
+
new Resource({
|
|
1316
|
+
[SEMRESATTRS_SERVICE_NAME]: "trigger.dev cli v3",
|
|
1317
|
+
[SEMRESATTRS_SERVICE_VERSION]: version
|
|
1318
|
+
})
|
|
1319
|
+
);
|
|
1320
|
+
const traceProvider = new NodeTracerProvider({
|
|
1321
|
+
forceFlushTimeoutMillis: 3e4,
|
|
1322
|
+
resource,
|
|
1323
|
+
spanLimits: {
|
|
1324
|
+
attributeCountLimit: 1e3,
|
|
1325
|
+
attributeValueLengthLimit: 1e3,
|
|
1326
|
+
eventCountLimit: 100,
|
|
1327
|
+
attributePerEventCountLimit: 100,
|
|
1328
|
+
linkCountLimit: 10,
|
|
1329
|
+
attributePerLinkCountLimit: 100
|
|
1330
|
+
}
|
|
1331
|
+
});
|
|
1332
|
+
const spanExporter = new OTLPTraceExporter({
|
|
1333
|
+
url: "https://otel.baselime.io/v1",
|
|
1334
|
+
timeoutMillis: 5e3,
|
|
1335
|
+
headers: {
|
|
1336
|
+
"x-api-key": "b6e0fbbaf8dc2524773d2152ae2e9eb5c7fbaa52"
|
|
1337
|
+
}
|
|
1338
|
+
});
|
|
1339
|
+
const spanProcessor = new SimpleSpanProcessor(spanExporter);
|
|
1340
|
+
traceProvider.addSpanProcessor(spanProcessor);
|
|
1341
|
+
traceProvider.register();
|
|
1342
|
+
registerInstrumentations({
|
|
1343
|
+
instrumentations: [new FetchInstrumentation()]
|
|
1344
|
+
});
|
|
1345
|
+
return traceProvider;
|
|
1346
|
+
}
|
|
1347
|
+
var provider = initializeTracing();
|
|
1348
|
+
function getTracer() {
|
|
1349
|
+
return trace.getTracer("trigger.dev cli v3", version);
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1351
1352
|
// src/cli/common.ts
|
|
1353
|
+
import { fromZodError } from "zod-validation-error";
|
|
1352
1354
|
import { outro } from "@clack/prompts";
|
|
1353
1355
|
|
|
1354
1356
|
// src/utilities/cliOutput.ts
|
|
@@ -3941,7 +3943,7 @@ function configureDeployCommand(program2) {
|
|
|
3941
3943
|
).addOption(
|
|
3942
3944
|
new CommandOption(
|
|
3943
3945
|
"--self-hosted",
|
|
3944
|
-
"Build and load the image using your local Docker. Use the --registry option to specify the registry to push the image to when using --self-hosted, or just use --push
|
|
3946
|
+
"Build and load the image using your local Docker. Use the --registry option to specify the registry to push the image to when using --self-hosted, or just use --push to push to the default registry."
|
|
3945
3947
|
).hideHelp()
|
|
3946
3948
|
).addOption(
|
|
3947
3949
|
new CommandOption(
|
|
@@ -4244,6 +4246,10 @@ ${authorization.error}`
|
|
|
4244
4246
|
logESMRequireError(parsedError, resolvedConfig);
|
|
4245
4247
|
}
|
|
4246
4248
|
await preExitTasks();
|
|
4249
|
+
if (finishedDeployment.errorData.stderr) {
|
|
4250
|
+
log5.error(`Error logs:
|
|
4251
|
+
${finishedDeployment.errorData.stderr}`);
|
|
4252
|
+
}
|
|
4247
4253
|
throw new SkipLoggingError(
|
|
4248
4254
|
`Deployment encountered an error: ${finishedDeployment.errorData.name}`
|
|
4249
4255
|
);
|
|
@@ -5497,6 +5503,7 @@ var BackgroundWorker = class {
|
|
|
5497
5503
|
_onClose = new Evt();
|
|
5498
5504
|
tasks = [];
|
|
5499
5505
|
metadata;
|
|
5506
|
+
stderr = [];
|
|
5500
5507
|
_taskRunProcesses = /* @__PURE__ */ new Map();
|
|
5501
5508
|
_taskRunProcessesBeingKilled = /* @__PURE__ */ new Set();
|
|
5502
5509
|
_closed = false;
|
|
@@ -5595,6 +5602,9 @@ var BackgroundWorker = class {
|
|
|
5595
5602
|
child.stdout?.on("data", (data) => {
|
|
5596
5603
|
logger.log(data.toString());
|
|
5597
5604
|
});
|
|
5605
|
+
child.stderr?.on("data", (data) => {
|
|
5606
|
+
this.stderr.push(data.toString());
|
|
5607
|
+
});
|
|
5598
5608
|
});
|
|
5599
5609
|
this._initialized = true;
|
|
5600
5610
|
}
|
|
@@ -6614,7 +6624,8 @@ function useDev({
|
|
|
6614
6624
|
}
|
|
6615
6625
|
const parsedError = parseNpmInstallError(e);
|
|
6616
6626
|
if (typeof parsedError === "string") {
|
|
6617
|
-
logger.log(
|
|
6627
|
+
logger.log(`
|
|
6628
|
+
${chalkError("X Error:")} ${parsedError}`);
|
|
6618
6629
|
} else {
|
|
6619
6630
|
switch (parsedError.type) {
|
|
6620
6631
|
case "package-not-found-error": {
|
|
@@ -6637,6 +6648,12 @@ ${chalkError("X Error:")} The package ${chalkPurple(
|
|
|
6637
6648
|
}
|
|
6638
6649
|
}
|
|
6639
6650
|
}
|
|
6651
|
+
const stderr = backgroundWorker.stderr.map((line) => line.trim()).filter((line) => line.length > 0).join("\n");
|
|
6652
|
+
if (stderr) {
|
|
6653
|
+
logger.log(`
|
|
6654
|
+
${chalkError("X Error logs:")}
|
|
6655
|
+
${stderr}`);
|
|
6656
|
+
}
|
|
6640
6657
|
}
|
|
6641
6658
|
});
|
|
6642
6659
|
}
|
|
@@ -6877,7 +6894,7 @@ function configureInitCommand(program2) {
|
|
|
6877
6894
|
).option(
|
|
6878
6895
|
"-t, --tag <package tag>",
|
|
6879
6896
|
"The version of the @trigger.dev/sdk package to install",
|
|
6880
|
-
|
|
6897
|
+
version
|
|
6881
6898
|
).option("--skip-package-install", "Skip installing the @trigger.dev/sdk package").option("--override-config", "Override the existing config file if it exists")
|
|
6882
6899
|
).action(async (path7, options) => {
|
|
6883
6900
|
await handleTelemetry(async () => {
|
|
@@ -6952,7 +6969,7 @@ async function _initCommand(dir, options) {
|
|
|
6952
6969
|
log6.info("Next steps:");
|
|
6953
6970
|
log6.info(
|
|
6954
6971
|
` 1. To start developing, run ${chalk5.green(
|
|
6955
|
-
`npx trigger.dev@${options.tag} dev`
|
|
6972
|
+
`npx trigger.dev@${options.tag} dev${options.apiUrl === CLOUD_API_URL ? "" : ` -a ${options.apiUrl}`}`
|
|
6956
6973
|
)} in your project directory`
|
|
6957
6974
|
);
|
|
6958
6975
|
log6.info(` 2. Visit your ${projectDashboard} to view your newly created tasks.`);
|
|
@@ -7131,7 +7148,7 @@ async function installPackages2(dir, options) {
|
|
|
7131
7148
|
switch (pkgManager) {
|
|
7132
7149
|
case "npm": {
|
|
7133
7150
|
installSpinner.start(`Running npm install @trigger.dev/sdk@${options.tag}`);
|
|
7134
|
-
await execa3("npm", ["install", `@trigger.dev/sdk@${options.tag}`], {
|
|
7151
|
+
await execa3("npm", ["install", "--save-exact", `@trigger.dev/sdk@${options.tag}`], {
|
|
7135
7152
|
cwd: projectDir,
|
|
7136
7153
|
stdio: options.logLevel === "debug" ? "inherit" : "ignore"
|
|
7137
7154
|
});
|