@empiricalrun/test-gen 0.69.3 → 0.69.4
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/CHANGELOG.md +6 -0
- package/dist/auth/cli-auth.d.ts.map +1 -1
- package/dist/auth/cli-auth.js +11 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-auth.d.ts","sourceRoot":"","sources":["../../src/auth/cli-auth.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli-auth.d.ts","sourceRoot":"","sources":["../../src/auth/cli-auth.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE;QACL,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,YAAY,IAAI,OAAO,CAAC,UAAU,CAAC,CAwKxD;AAED,wBAAsB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAE5C;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC;IAC7C,aAAa,EAAE,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CACtC,CAAC,CAeD"}
|
package/dist/auth/cli-auth.js
CHANGED
|
@@ -8,7 +8,6 @@ exports.logout = logout;
|
|
|
8
8
|
exports.getAuthStatus = getAuthStatus;
|
|
9
9
|
const detect_port_1 = __importDefault(require("detect-port"));
|
|
10
10
|
const http_1 = require("http");
|
|
11
|
-
const open_1 = __importDefault(require("open"));
|
|
12
11
|
const url_1 = require("url");
|
|
13
12
|
const token_store_1 = require("./token-store");
|
|
14
13
|
const CLIENT_PORT_DEFAULT = 8080;
|
|
@@ -149,10 +148,17 @@ async function authenticate() {
|
|
|
149
148
|
const authUrl = `${appUrl}/auth/cli?redirect_uri=${encodeURIComponent(redirectUri)}`;
|
|
150
149
|
console.log("🔐 Opening browser for authentication...\n");
|
|
151
150
|
console.log(`If the browser doesn't open automatically, visit: ${authUrl}`);
|
|
152
|
-
(
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
151
|
+
(async () => {
|
|
152
|
+
try {
|
|
153
|
+
// Use dynamic import since 'open' is native ESM module
|
|
154
|
+
// https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
|
|
155
|
+
const { default: open } = await import("open");
|
|
156
|
+
await open(authUrl);
|
|
157
|
+
}
|
|
158
|
+
catch (err) {
|
|
159
|
+
// Ignoring error
|
|
160
|
+
}
|
|
161
|
+
})();
|
|
156
162
|
});
|
|
157
163
|
// Timeout after 10 minutes
|
|
158
164
|
setTimeout(() => {
|