@dosu/cli 0.20.0 → 0.20.1
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/bin/dosu.js +17 -3
- package/package.json +1 -1
package/bin/dosu.js
CHANGED
|
@@ -4548,7 +4548,7 @@ var init_dist4 = __esm(() => {
|
|
|
4548
4548
|
function getVersionString() {
|
|
4549
4549
|
return `v${VERSION}`;
|
|
4550
4550
|
}
|
|
4551
|
-
var VERSION = "0.20.
|
|
4551
|
+
var VERSION = "0.20.1";
|
|
4552
4552
|
|
|
4553
4553
|
// src/debug/logger.ts
|
|
4554
4554
|
import {
|
|
@@ -10992,8 +10992,22 @@ async function startOAuthFlow(signal, path2 = "/cli/auth", params = {}) {
|
|
|
10992
10992
|
const authURL = buildAuthURL(callbackURL, path2, params);
|
|
10993
10993
|
logger.info("auth.flow", `Auth URL: ${authURL}`);
|
|
10994
10994
|
const open2 = await Promise.resolve().then(() => (init_open(), exports_open));
|
|
10995
|
-
|
|
10996
|
-
|
|
10995
|
+
let browserOpened = false;
|
|
10996
|
+
try {
|
|
10997
|
+
await open2.default(authURL);
|
|
10998
|
+
browserOpened = true;
|
|
10999
|
+
logger.info("auth.flow", "Browser open command executed");
|
|
11000
|
+
} catch (openErr) {
|
|
11001
|
+
logger.warn("auth.flow", `Could not open browser automatically: ${openErr instanceof Error ? openErr.message : String(openErr)}`);
|
|
11002
|
+
}
|
|
11003
|
+
if (!browserOpened) {
|
|
11004
|
+
console.log(`
|
|
11005
|
+
Could not open a browser automatically.`);
|
|
11006
|
+
console.log(`Please open this URL in your browser to log in:
|
|
11007
|
+
`);
|
|
11008
|
+
console.log(` ${authURL}
|
|
11009
|
+
`);
|
|
11010
|
+
}
|
|
10997
11011
|
const timeout = new Promise((_3, reject) => {
|
|
10998
11012
|
timeoutId = setTimeout(() => {
|
|
10999
11013
|
logger.warn("auth.flow", "Authentication timed out (8min)");
|