trigger.dev 3.0.0-beta.7 → 3.0.0-beta.8
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/Containerfile.prod
CHANGED
package/dist/index.js
CHANGED
|
@@ -801,7 +801,7 @@ import invariant from "tiny-invariant";
|
|
|
801
801
|
import { z as z4 } from "zod";
|
|
802
802
|
|
|
803
803
|
// package.json
|
|
804
|
-
var version = "3.0.0-beta.
|
|
804
|
+
var version = "3.0.0-beta.8";
|
|
805
805
|
var dependencies = {
|
|
806
806
|
"@clack/prompts": "^0.7.0",
|
|
807
807
|
"@depot/cli": "0.0.1-cli.2.55.0",
|
|
@@ -817,7 +817,7 @@ var dependencies = {
|
|
|
817
817
|
"@opentelemetry/sdk-trace-base": "^1.22.0",
|
|
818
818
|
"@opentelemetry/sdk-trace-node": "^1.22.0",
|
|
819
819
|
"@opentelemetry/semantic-conventions": "^1.22.0",
|
|
820
|
-
"@trigger.dev/core": "workspace:^3.0.0-beta.
|
|
820
|
+
"@trigger.dev/core": "workspace:^3.0.0-beta.7",
|
|
821
821
|
"@types/degit": "^2.8.3",
|
|
822
822
|
chalk: "^5.2.0",
|
|
823
823
|
chokidar: "^3.5.3",
|
|
@@ -2524,6 +2524,29 @@ async function login(options) {
|
|
|
2524
2524
|
if (!opts.embedded) {
|
|
2525
2525
|
intro2("Logging in to Trigger.dev");
|
|
2526
2526
|
}
|
|
2527
|
+
const accessTokenFromEnv = process.env.TRIGGER_ACCESS_TOKEN;
|
|
2528
|
+
if (accessTokenFromEnv) {
|
|
2529
|
+
const auth = {
|
|
2530
|
+
accessToken: accessTokenFromEnv,
|
|
2531
|
+
apiUrl: process.env.TRIGGER_API_URL ?? "https://api.trigger.dev"
|
|
2532
|
+
};
|
|
2533
|
+
const apiClient3 = new CliApiClient(auth.apiUrl, auth.accessToken);
|
|
2534
|
+
const userData = await apiClient3.whoAmI();
|
|
2535
|
+
if (!userData.success) {
|
|
2536
|
+
throw new Error(userData.error);
|
|
2537
|
+
}
|
|
2538
|
+
return {
|
|
2539
|
+
ok: true,
|
|
2540
|
+
profile: options?.profile ?? "default",
|
|
2541
|
+
userId: userData.data.userId,
|
|
2542
|
+
email: userData.data.email,
|
|
2543
|
+
dashboardUrl: userData.data.dashboardUrl,
|
|
2544
|
+
auth: {
|
|
2545
|
+
accessToken: auth.accessToken,
|
|
2546
|
+
apiUrl: auth.apiUrl
|
|
2547
|
+
}
|
|
2548
|
+
};
|
|
2549
|
+
}
|
|
2527
2550
|
const authConfig = readAuthConfigProfile(options?.profile);
|
|
2528
2551
|
if (authConfig && authConfig.accessToken) {
|
|
2529
2552
|
const whoAmIResult = await whoAmI(
|