@secondlayer/cli 5.1.4 → 5.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 +6 -26
- package/dist/cli.js.map +3 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -32443,7 +32443,7 @@ var {
|
|
|
32443
32443
|
// package.json
|
|
32444
32444
|
var package_default = {
|
|
32445
32445
|
name: "@secondlayer/cli",
|
|
32446
|
-
version: "5.1.
|
|
32446
|
+
version: "5.1.5",
|
|
32447
32447
|
description: "CLI for subgraphs and blockchain indexing on Stacks",
|
|
32448
32448
|
type: "module",
|
|
32449
32449
|
bin: {
|
|
@@ -34603,10 +34603,8 @@ init_fs();
|
|
|
34603
34603
|
init_output();
|
|
34604
34604
|
|
|
34605
34605
|
// src/commands/login.ts
|
|
34606
|
-
init_config();
|
|
34607
34606
|
init_http();
|
|
34608
34607
|
init_output();
|
|
34609
|
-
init_project_file();
|
|
34610
34608
|
init_session();
|
|
34611
34609
|
import { input as input2 } from "@inquirer/prompts";
|
|
34612
34610
|
async function runLoginFlow() {
|
|
@@ -34659,39 +34657,21 @@ async function runLoginFlow() {
|
|
|
34659
34657
|
}
|
|
34660
34658
|
}
|
|
34661
34659
|
async function printPostLoginHints() {
|
|
34662
|
-
let activeSlug = null;
|
|
34663
34660
|
let hasTenant = false;
|
|
34664
|
-
try {
|
|
34665
|
-
const config = await loadConfig();
|
|
34666
|
-
const active = await readActiveProject(process.cwd(), config.defaultProject);
|
|
34667
|
-
activeSlug = active?.slug ?? null;
|
|
34668
|
-
} catch {}
|
|
34669
34661
|
try {
|
|
34670
34662
|
const tenant = await httpPlatform("/api/tenants/me");
|
|
34671
34663
|
hasTenant = Boolean(tenant.tenant?.apiUrl);
|
|
34672
34664
|
} catch (err) {
|
|
34673
|
-
if (err instanceof CliHttpError && err.status === 404) {
|
|
34674
|
-
hasTenant = false;
|
|
34675
|
-
} else {
|
|
34665
|
+
if (!(err instanceof CliHttpError && err.status === 404)) {
|
|
34676
34666
|
info(dim("Run 'sl whoami' to see your account status."));
|
|
34677
34667
|
return;
|
|
34678
34668
|
}
|
|
34679
34669
|
}
|
|
34680
|
-
|
|
34681
|
-
|
|
34682
|
-
info(dim(`Active project: ${activeSlug}. Try ${cyan("sl subgraphs new --template basic")}`));
|
|
34683
|
-
return;
|
|
34684
|
-
}
|
|
34685
|
-
if (hasTenant && !activeSlug) {
|
|
34686
|
-
info("Your account has an instance. Bind a project to this directory:");
|
|
34687
|
-
console.log(dim(" ") + cyan("sl project use <slug>") + dim(" # list options with `sl project list`"));
|
|
34688
|
-
return;
|
|
34689
|
-
}
|
|
34690
|
-
if (!hasTenant && activeSlug) {
|
|
34691
|
-
info(`Project "${activeSlug}" is bound. Provision an instance to start indexing:`);
|
|
34692
|
-
console.log(dim(" ") + cyan("sl instance create --plan launch") + dim(" # $99/mo, 2 vCPU / 6GB"));
|
|
34670
|
+
if (hasTenant) {
|
|
34671
|
+
info(dim("Run 'sl whoami' to see your account status."));
|
|
34693
34672
|
return;
|
|
34694
34673
|
}
|
|
34674
|
+
console.log();
|
|
34695
34675
|
info("First time? Here's the path to your first query:");
|
|
34696
34676
|
console.log();
|
|
34697
34677
|
console.log(dim(" 1. ") + cyan("sl project create my-app"));
|
|
@@ -37422,5 +37402,5 @@ registerAccountCommand(program);
|
|
|
37422
37402
|
registerBillingCommand(program);
|
|
37423
37403
|
program.parse();
|
|
37424
37404
|
|
|
37425
|
-
//# debugId=
|
|
37405
|
+
//# debugId=7BAF23F53752FABB64756E2164756E21
|
|
37426
37406
|
//# sourceMappingURL=cli.js.map
|