@useorgx/wizard 0.1.4 → 0.1.5
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/cli.js +14 -9
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3077,6 +3077,10 @@ var ICON = {
|
|
|
3077
3077
|
warn: pc3.yellow("!"),
|
|
3078
3078
|
skip: pc3.dim("\xB7")
|
|
3079
3079
|
};
|
|
3080
|
+
function getCmd() {
|
|
3081
|
+
const argv1 = process.argv[1] ?? "";
|
|
3082
|
+
return argv1.includes("_npx") || argv1.includes("/.npm/") || argv1.includes("/npm/_npx") ? "npx @useorgx/wizard" : "orgx-wizard";
|
|
3083
|
+
}
|
|
3080
3084
|
function formatAuthSource(source) {
|
|
3081
3085
|
switch (source) {
|
|
3082
3086
|
case "environment":
|
|
@@ -3224,7 +3228,7 @@ function parseTimeoutSeconds(value) {
|
|
|
3224
3228
|
}
|
|
3225
3229
|
function printAuthStatus(status) {
|
|
3226
3230
|
if (!status.configured) {
|
|
3227
|
-
console.log(` ${ICON.warn} ${pc3.yellow("no account")} run ${pc3.cyan(
|
|
3231
|
+
console.log(` ${ICON.warn} ${pc3.yellow("no account")} run ${pc3.cyan(`${getCmd()} auth login`)} to connect`);
|
|
3228
3232
|
return;
|
|
3229
3233
|
}
|
|
3230
3234
|
const icon = status.ok ? ICON.ok : ICON.err;
|
|
@@ -3279,7 +3283,7 @@ function printDoctorReport(report, assessment) {
|
|
|
3279
3283
|
console.log(` ${ICON.ok} ${pc3.green("All systems ready.")}`);
|
|
3280
3284
|
if (!report.auth.configured) {
|
|
3281
3285
|
console.log(`
|
|
3282
|
-
${pc3.dim("\u2192")} ${pc3.cyan(
|
|
3286
|
+
${pc3.dim("\u2192")} ${pc3.cyan(`${getCmd()} auth login`)} ${pc3.dim("to connect your account")}`);
|
|
3283
3287
|
} else {
|
|
3284
3288
|
console.log(` ${pc3.dim("\u2192")} ${pc3.dim(`OrgX is active across ${configuredCount} editor${configuredCount !== 1 ? "s" : ""}`)}`);
|
|
3285
3289
|
}
|
|
@@ -3352,7 +3356,7 @@ async function main() {
|
|
|
3352
3356
|
message: "Connect your OrgX account to enable workspace and AI tool access",
|
|
3353
3357
|
options: [
|
|
3354
3358
|
{ value: "login", label: "Open browser to connect", hint: "recommended" },
|
|
3355
|
-
{ value: "skip", label: "Skip for now", hint:
|
|
3359
|
+
{ value: "skip", label: "Skip for now", hint: `run \`${getCmd()} auth login\` later` }
|
|
3356
3360
|
]
|
|
3357
3361
|
});
|
|
3358
3362
|
if (clack.isCancel(choice)) {
|
|
@@ -3363,19 +3367,19 @@ async function main() {
|
|
|
3363
3367
|
const loginOk = await runBrowserLogin();
|
|
3364
3368
|
if (!loginOk) {
|
|
3365
3369
|
console.log(`
|
|
3366
|
-
${pc3.dim("\u2192")} ${pc3.cyan(
|
|
3367
|
-
console.log(` ${pc3.dim("\u2192")} ${pc3.cyan(
|
|
3370
|
+
${pc3.dim("\u2192")} ${pc3.cyan(`${getCmd()} auth login`)} ${pc3.dim("to try again")}`);
|
|
3371
|
+
console.log(` ${pc3.dim("\u2192")} ${pc3.cyan(`${getCmd()} auth login --api-key`)} ${pc3.dim("to paste a key directly")}`);
|
|
3368
3372
|
return;
|
|
3369
3373
|
}
|
|
3370
3374
|
resolvedAuth = await resolveOrgxAuth();
|
|
3371
3375
|
} else {
|
|
3372
3376
|
console.log(`
|
|
3373
|
-
${pc3.dim("\u2192")} ${pc3.cyan(
|
|
3377
|
+
${pc3.dim("\u2192")} ${pc3.cyan(`${getCmd()} auth login`)} ${pc3.dim("to connect when ready")}`);
|
|
3374
3378
|
return;
|
|
3375
3379
|
}
|
|
3376
3380
|
} else {
|
|
3377
3381
|
console.log(
|
|
3378
|
-
` ${ICON.warn} ${pc3.yellow("No account connected.")} Run ${pc3.cyan(
|
|
3382
|
+
` ${ICON.warn} ${pc3.yellow("No account connected.")} Run ${pc3.cyan(`${getCmd()} auth login`)} to connect.`
|
|
3379
3383
|
);
|
|
3380
3384
|
return;
|
|
3381
3385
|
}
|
|
@@ -3455,8 +3459,9 @@ async function main() {
|
|
|
3455
3459
|
...opts.baseUrl !== void 0 ? { baseUrl: opts.baseUrl } : {}
|
|
3456
3460
|
});
|
|
3457
3461
|
if (!("stored" in result)) {
|
|
3458
|
-
spinner.fail("
|
|
3459
|
-
|
|
3462
|
+
spinner.fail("Pairing completed but key was rejected");
|
|
3463
|
+
console.log(` ${pc3.red(result.verification.error ?? `HTTP ${result.verification.status ?? "error"}`)}`);
|
|
3464
|
+
console.log(` ${pc3.dim("The browser flow finished, but OrgX rejected the key. Try again or check your account at useorgx.com.")}`);
|
|
3460
3465
|
return false;
|
|
3461
3466
|
}
|
|
3462
3467
|
await acknowledgeBrowserPairing({
|