@secondlayer/cli 19.4.0 → 19.4.2
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 +12 -12
- package/dist/cli.js.map +7 -7
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -2374,7 +2374,7 @@ function ignoredEnvKeyNote(ignored) {
|
|
|
2374
2374
|
async function httpArchiveOps(path, opts = {}) {
|
|
2375
2375
|
const { bearer, ignoredEnvKey } = await resolveArchiveOpsBearer();
|
|
2376
2376
|
if (!bearer) {
|
|
2377
|
-
throw new CliHttpError(401, "SESSION_EXPIRED", { error: "Not logged in" }, `Archive credits need
|
|
2377
|
+
throw new CliHttpError(401, "SESSION_EXPIRED", { error: "Not logged in" }, `Archive credits need an account key. ${ARCHIVE_AUTH_HINT}${ignoredEnvKeyNote(ignoredEnvKey)}`);
|
|
2378
2378
|
}
|
|
2379
2379
|
try {
|
|
2380
2380
|
return await request(`${resolveArchiveOpsUrl()}${path}`, {
|
|
@@ -2383,12 +2383,12 @@ async function httpArchiveOps(path, opts = {}) {
|
|
|
2383
2383
|
});
|
|
2384
2384
|
} catch (err) {
|
|
2385
2385
|
if (err instanceof CliHttpError && err.status === 401) {
|
|
2386
|
-
throw new CliHttpError(401, err.code, err.body, `Archive credits rejected the
|
|
2386
|
+
throw new CliHttpError(401, err.code, err.body, `Archive credits rejected the credential (${err.message}). ${ARCHIVE_AUTH_HINT}${ignoredEnvKeyNote(ignoredEnvKey)}`);
|
|
2387
2387
|
}
|
|
2388
2388
|
throw err;
|
|
2389
2389
|
}
|
|
2390
2390
|
}
|
|
2391
|
-
var CliHttpError, REQUEST_TIMEOUT_MS = 30000,
|
|
2391
|
+
var CliHttpError, REQUEST_TIMEOUT_MS = 30000, ARCHIVE_AUTH_HINT = "Set SECONDLAYER_API_KEY to your account key (sk-sl_…, from /account/keys), or run `secondlayer login --credits`.", ARCHIVE_CREDENTIAL_RE;
|
|
2392
2392
|
var init_http = __esm(() => {
|
|
2393
2393
|
init_api_url();
|
|
2394
2394
|
init_resolve_auth();
|
|
@@ -29443,7 +29443,7 @@ var init_git_status = () => {};
|
|
|
29443
29443
|
|
|
29444
29444
|
// ../../node_modules/typescript/lib/typescript.js
|
|
29445
29445
|
var require_typescript = __commonJS(function(exports, module) {
|
|
29446
|
-
var __dirname = "/Users/ryan/projects/secondlayer
|
|
29446
|
+
var __dirname = "/Users/ryan/projects/secondlayer/node_modules/typescript/lib", __filename = "/Users/ryan/projects/secondlayer/node_modules/typescript/lib/typescript.js";
|
|
29447
29447
|
/*! *****************************************************************************
|
|
29448
29448
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
29449
29449
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
@@ -202598,7 +202598,7 @@ var {
|
|
|
202598
202598
|
// package.json
|
|
202599
202599
|
var package_default = {
|
|
202600
202600
|
name: "@secondlayer/cli",
|
|
202601
|
-
version: "19.4.
|
|
202601
|
+
version: "19.4.2",
|
|
202602
202602
|
description: "Run a Stacks index on your own hardware — set it up, restore verified history, and keep it current.",
|
|
202603
202603
|
repository: {
|
|
202604
202604
|
type: "git",
|
|
@@ -202637,8 +202637,8 @@ var package_default = {
|
|
|
202637
202637
|
"@inquirer/prompts": "^8.2.0",
|
|
202638
202638
|
"@secondlayer/bundler": "^0.7.0",
|
|
202639
202639
|
"@secondlayer/scaffold": "^1.6.1",
|
|
202640
|
-
"@secondlayer/sdk": "^14.5.
|
|
202641
|
-
"@secondlayer/shared": "^11.
|
|
202640
|
+
"@secondlayer/sdk": "^14.5.1",
|
|
202641
|
+
"@secondlayer/shared": "^11.24.1",
|
|
202642
202642
|
"@secondlayer/stacks": "^6.2.0",
|
|
202643
202643
|
"@secondlayer/subgraphs": "^6.5.0",
|
|
202644
202644
|
"@secondlayer/verify": "^0.3.0",
|
|
@@ -204917,7 +204917,7 @@ async function runBuy(opts) {
|
|
|
204917
204917
|
human: () => {
|
|
204918
204918
|
success(`Checkout for $${amount} → ${email}`);
|
|
204919
204919
|
console.log(res.url);
|
|
204920
|
-
console.log(dim(
|
|
204920
|
+
console.log(dim("After payment: set SECONDLAYER_API_KEY (or run `secondlayer login --credits`), then run `secondlayer credits balance`"));
|
|
204921
204921
|
}
|
|
204922
204922
|
});
|
|
204923
204923
|
}
|
|
@@ -207994,7 +207994,7 @@ function registerWhoamiCommand(program) {
|
|
|
207994
207994
|
}
|
|
207995
207995
|
console.log(formatKeyValue(rows));
|
|
207996
207996
|
if (result.merchant.status === "missing") {
|
|
207997
|
-
note(`merchant identity missing
|
|
207997
|
+
note(`merchant identity missing. ${ARCHIVE_AUTH_HINT}`);
|
|
207998
207998
|
}
|
|
207999
207999
|
}
|
|
208000
208000
|
});
|
|
@@ -208113,7 +208113,7 @@ async function runLoginFlow(options = {}) {
|
|
|
208113
208113
|
}
|
|
208114
208114
|
}
|
|
208115
208115
|
function registerLoginCommand(program) {
|
|
208116
|
-
program.command("login"
|
|
208116
|
+
program.command("login").description("Log in to Secondlayer (magic-link email)").option("--force", "Skip the already-logged-in check and re-run the flow").option("--with-token", "Read an API key from stdin (non-interactive)").option("--credits", "Log in to the archive credits account used by bootstrap, repair, and credits").addHelpText("after", `
|
|
208117
208117
|
Examples:
|
|
208118
208118
|
$ secondlayer login --credits
|
|
208119
208119
|
$ echo "$SECONDLAYER_API_KEY" | secondlayer login --with-token`).action((opts) => opts.withToken ? runTokenLogin({ credits: opts.credits }) : runLoginFlow({ force: opts.force, credits: opts.credits }));
|
|
@@ -208143,7 +208143,7 @@ async function runLogout(opts = {}) {
|
|
|
208143
208143
|
success(`Logged out (${target}).`);
|
|
208144
208144
|
}
|
|
208145
208145
|
function registerLogoutCommand(program) {
|
|
208146
|
-
program.command("logout"
|
|
208146
|
+
program.command("logout").description("Log out and revoke the local session").option("--credits", "Log out of the archive credits account used by bootstrap, repair, and credits").action((opts) => runLogout({ credits: opts.credits }));
|
|
208147
208147
|
}
|
|
208148
208148
|
// src/commands/uninstall.ts
|
|
208149
208149
|
import { spawnSync as spawnSync4 } from "node:child_process";
|
|
@@ -209840,5 +209840,5 @@ registerCreditsCommand(program);
|
|
|
209840
209840
|
registerArchiveCommand(program);
|
|
209841
209841
|
program.parse();
|
|
209842
209842
|
|
|
209843
|
-
//# debugId=
|
|
209843
|
+
//# debugId=BC7D717F23E4321C64756E2164756E21
|
|
209844
209844
|
//# sourceMappingURL=cli.js.map
|