trigger.dev 3.0.0-beta.51 → 3.0.0-beta.53
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
|
@@ -798,7 +798,7 @@ import invariant from "tiny-invariant";
|
|
|
798
798
|
import { z as z4 } from "zod";
|
|
799
799
|
|
|
800
800
|
// package.json
|
|
801
|
-
var version = "3.0.0-beta.
|
|
801
|
+
var version = "3.0.0-beta.53";
|
|
802
802
|
var dependencies = {
|
|
803
803
|
"@anatine/esbuild-decorators": "^0.2.19",
|
|
804
804
|
"@clack/prompts": "^0.7.0",
|
|
@@ -815,7 +815,7 @@ var dependencies = {
|
|
|
815
815
|
"@opentelemetry/sdk-trace-base": "^1.22.0",
|
|
816
816
|
"@opentelemetry/sdk-trace-node": "^1.22.0",
|
|
817
817
|
"@opentelemetry/semantic-conventions": "^1.22.0",
|
|
818
|
-
"@trigger.dev/core": "workspace:3.0.0-beta.
|
|
818
|
+
"@trigger.dev/core": "workspace:3.0.0-beta.53",
|
|
819
819
|
"@types/degit": "^2.8.3",
|
|
820
820
|
chalk: "^5.2.0",
|
|
821
821
|
chokidar: "^3.5.3",
|
|
@@ -2658,6 +2658,30 @@ URL: ${chalkLink(authentication.auth.apiUrl)}
|
|
|
2658
2658
|
return userData;
|
|
2659
2659
|
}
|
|
2660
2660
|
|
|
2661
|
+
// src/utilities/linux.ts
|
|
2662
|
+
import { spawn } from "child_process";
|
|
2663
|
+
var isLinuxServer = async () => {
|
|
2664
|
+
if (process.platform !== "linux") {
|
|
2665
|
+
return false;
|
|
2666
|
+
}
|
|
2667
|
+
const xdgAvailable = await new Promise((res) => {
|
|
2668
|
+
const xdg = spawn("xdg-open");
|
|
2669
|
+
xdg.on("error", (error) => {
|
|
2670
|
+
logger.debug("Error while checking for xdg-open", error);
|
|
2671
|
+
res(false);
|
|
2672
|
+
});
|
|
2673
|
+
xdg.on("spawn", () => {
|
|
2674
|
+
res(true);
|
|
2675
|
+
});
|
|
2676
|
+
xdg.on("exit", (code) => {
|
|
2677
|
+
res(code === 0);
|
|
2678
|
+
});
|
|
2679
|
+
xdg.unref();
|
|
2680
|
+
});
|
|
2681
|
+
logger.debug("xdg-open available:", xdgAvailable);
|
|
2682
|
+
return !xdgAvailable;
|
|
2683
|
+
};
|
|
2684
|
+
|
|
2661
2685
|
// src/commands/login.ts
|
|
2662
2686
|
var LoginCommandOptions = CommonCommandOptions.extend({
|
|
2663
2687
|
apiUrl: z3.string()
|
|
@@ -2800,9 +2824,10 @@ async function login(options) {
|
|
|
2800
2824
|
`Please visit the following URL to login:
|
|
2801
2825
|
${chalkLink(authorizationCodeResult.url)}`
|
|
2802
2826
|
);
|
|
2803
|
-
|
|
2827
|
+
if (await isLinuxServer()) {
|
|
2828
|
+
log3.message("Please install `xdg-utils` to automatically open the login URL.");
|
|
2829
|
+
} else {
|
|
2804
2830
|
await open_default(authorizationCodeResult.url);
|
|
2805
|
-
} catch (e) {
|
|
2806
2831
|
}
|
|
2807
2832
|
const getPersonalAccessTokenSpinner = spinner();
|
|
2808
2833
|
getPersonalAccessTokenSpinner.start("Waiting for you to login");
|