@dosu/cli 0.30.0 → 0.31.0
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 +22 -8
- package/package.json +1 -1
package/bin/dosu.js
CHANGED
|
@@ -4577,7 +4577,7 @@ var init_dist4 = __esm(() => {
|
|
|
4577
4577
|
function getVersionString() {
|
|
4578
4578
|
return `v${VERSION}`;
|
|
4579
4579
|
}
|
|
4580
|
-
var VERSION = "0.
|
|
4580
|
+
var VERSION = "0.31.0", INSTALL_CHANNEL = "npm";
|
|
4581
4581
|
|
|
4582
4582
|
// src/debug/logger.ts
|
|
4583
4583
|
import {
|
|
@@ -4711,7 +4711,7 @@ var init_logger = __esm(() => {
|
|
|
4711
4711
|
});
|
|
4712
4712
|
|
|
4713
4713
|
// src/client/contract.ts
|
|
4714
|
-
var CLI_CONTRACT_HASH = "
|
|
4714
|
+
var CLI_CONTRACT_HASH = "f5c0727a7884";
|
|
4715
4715
|
|
|
4716
4716
|
// src/client/trpc.ts
|
|
4717
4717
|
var exports_trpc = {};
|
|
@@ -6961,6 +6961,10 @@ var init_installation_server = __esm(() => {
|
|
|
6961
6961
|
function dim(msg) {
|
|
6962
6962
|
return import_picocolors7.default.dim(msg);
|
|
6963
6963
|
}
|
|
6964
|
+
function browserFallbackHint(url) {
|
|
6965
|
+
return dim(`If your browser doesn't open automatically, visit:
|
|
6966
|
+
${url}`);
|
|
6967
|
+
}
|
|
6964
6968
|
function info(msg) {
|
|
6965
6969
|
return import_picocolors7.default.cyan(msg);
|
|
6966
6970
|
}
|
|
@@ -7722,6 +7726,7 @@ async function openGitHubInstallFlow(onInstalled, opts) {
|
|
|
7722
7726
|
middleURL.searchParams.set("callback", callbackURL);
|
|
7723
7727
|
log.info(`Opening your browser to GitHub.
|
|
7724
7728
|
` + "Add repositories or install the Dosu GitHub App, and we'll pick up automatically.");
|
|
7729
|
+
log.message(browserFallbackHint(middleURL.toString()));
|
|
7725
7730
|
try {
|
|
7726
7731
|
const open2 = await Promise.resolve().then(() => (init_open(), exports_open));
|
|
7727
7732
|
await open2.default(middleURL.toString());
|
|
@@ -12112,7 +12117,7 @@ var exports_flow = {};
|
|
|
12112
12117
|
__export(exports_flow, {
|
|
12113
12118
|
startOAuthFlow: () => startOAuthFlow
|
|
12114
12119
|
});
|
|
12115
|
-
async function startOAuthFlow(signal, path3 = "/cli/auth", params = {}) {
|
|
12120
|
+
async function startOAuthFlow(signal, path3 = "/cli/auth", params = {}, onAuthURL) {
|
|
12116
12121
|
const { server, tokenPromise } = await startCallbackServer();
|
|
12117
12122
|
let timeoutId;
|
|
12118
12123
|
try {
|
|
@@ -12126,6 +12131,7 @@ async function startOAuthFlow(signal, path3 = "/cli/auth", params = {}) {
|
|
|
12126
12131
|
await open2.default(authURL);
|
|
12127
12132
|
browserOpened = true;
|
|
12128
12133
|
logger.info("auth.flow", "Browser open command executed");
|
|
12134
|
+
onAuthURL?.(authURL);
|
|
12129
12135
|
} catch (openErr) {
|
|
12130
12136
|
logger.warn("auth.flow", `Could not open browser automatically: ${openErr instanceof Error ? openErr.message : String(openErr)}`);
|
|
12131
12137
|
}
|
|
@@ -12497,8 +12503,10 @@ async function openBrowserForSetup(cfg, onboardingRunID) {
|
|
|
12497
12503
|
try {
|
|
12498
12504
|
const { startOAuthFlow: startOAuthFlow2 } = await Promise.resolve().then(() => (init_flow(), exports_flow));
|
|
12499
12505
|
const s = spinner();
|
|
12500
|
-
|
|
12501
|
-
|
|
12506
|
+
const result = await startOAuthFlow2(undefined, "/cli/auth", onboardingRunID ? { onboarding_run_id: onboardingRunID } : {}, (url) => {
|
|
12507
|
+
log.message(browserFallbackHint(url));
|
|
12508
|
+
s.start("Waiting for authentication...");
|
|
12509
|
+
});
|
|
12502
12510
|
if (!result.browserOpened) {
|
|
12503
12511
|
s.stop("Could not open a browser");
|
|
12504
12512
|
log.error("Run 'dosu login --no-browser' from the terminal to authenticate over SSH.");
|
|
@@ -13203,8 +13211,10 @@ async function handleAuthenticate(cfg) {
|
|
|
13203
13211
|
try {
|
|
13204
13212
|
const { startOAuthFlow: startOAuthFlow2 } = await Promise.resolve().then(() => (init_flow(), exports_flow));
|
|
13205
13213
|
const s = spinner();
|
|
13206
|
-
|
|
13207
|
-
|
|
13214
|
+
const result = await startOAuthFlow2(undefined, "/cli/auth", {}, (url) => {
|
|
13215
|
+
log.message(browserFallbackHint(url));
|
|
13216
|
+
s.start("Waiting for authentication...");
|
|
13217
|
+
});
|
|
13208
13218
|
if (!result.browserOpened) {
|
|
13209
13219
|
s.stop("Could not open a browser");
|
|
13210
13220
|
log.error("Run 'dosu login --no-browser' from the terminal to authenticate over SSH.");
|
|
@@ -13256,6 +13266,7 @@ var init_tui = __esm(() => {
|
|
|
13256
13266
|
init_insights3();
|
|
13257
13267
|
init_config();
|
|
13258
13268
|
init_flow2();
|
|
13269
|
+
init_styles();
|
|
13259
13270
|
import_picocolors26 = __toESM(require_picocolors(), 1);
|
|
13260
13271
|
});
|
|
13261
13272
|
|
|
@@ -16534,6 +16545,7 @@ function topicsCommand() {
|
|
|
16534
16545
|
init_config();
|
|
16535
16546
|
init_logger();
|
|
16536
16547
|
init_providers();
|
|
16548
|
+
init_styles();
|
|
16537
16549
|
init_skill_update_check();
|
|
16538
16550
|
|
|
16539
16551
|
// src/version/update-check.ts
|
|
@@ -16714,7 +16726,9 @@ function createProgram() {
|
|
|
16714
16726
|
const { startOAuthFlow: startOAuthFlow2 } = await Promise.resolve().then(() => (init_flow(), exports_flow));
|
|
16715
16727
|
let result;
|
|
16716
16728
|
try {
|
|
16717
|
-
result = await startOAuthFlow2()
|
|
16729
|
+
result = await startOAuthFlow2(undefined, undefined, undefined, (url) => {
|
|
16730
|
+
console.log(browserFallbackHint(url));
|
|
16731
|
+
});
|
|
16718
16732
|
} catch (err) {
|
|
16719
16733
|
if (err instanceof OAuthCallbackError2) {
|
|
16720
16734
|
console.error(err.userMessage);
|