@secondlayer/cli 5.1.4 → 5.1.6

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 CHANGED
@@ -32443,7 +32443,7 @@ var {
32443
32443
  // package.json
32444
32444
  var package_default = {
32445
32445
  name: "@secondlayer/cli",
32446
- version: "5.1.4",
32446
+ version: "5.1.6",
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() {
@@ -34648,7 +34646,7 @@ async function runLoginFlow() {
34648
34646
  expiresAt
34649
34647
  });
34650
34648
  success(`Logged in as ${verified.account.email}`);
34651
- await printPostLoginHints();
34649
+ info(dim("Run 'sl whoami' to see your account status."));
34652
34650
  } catch (err) {
34653
34651
  if (err instanceof CliHttpError) {
34654
34652
  error(err.message);
@@ -34658,56 +34656,6 @@ async function runLoginFlow() {
34658
34656
  process.exit(1);
34659
34657
  }
34660
34658
  }
34661
- async function printPostLoginHints() {
34662
- let activeSlug = null;
34663
- 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
- try {
34670
- const tenant = await httpPlatform("/api/tenants/me");
34671
- hasTenant = Boolean(tenant.tenant?.apiUrl);
34672
- } catch (err) {
34673
- if (err instanceof CliHttpError && err.status === 404) {
34674
- hasTenant = false;
34675
- } else {
34676
- info(dim("Run 'sl whoami' to see your account status."));
34677
- return;
34678
- }
34679
- }
34680
- console.log();
34681
- if (hasTenant && activeSlug) {
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"));
34693
- return;
34694
- }
34695
- info("First time? Here's the path to your first query:");
34696
- console.log();
34697
- console.log(dim(" 1. ") + cyan("sl project create my-app"));
34698
- console.log(dim(" ") + dim("# scopes your data and routing — pick any name"));
34699
- console.log();
34700
- console.log(dim(" 2. ") + cyan("sl instance create --plan launch"));
34701
- console.log(dim(" ") + dim("# $99/mo · 2 vCPU / 6GB · run `sl --help` for other plans"));
34702
- console.log();
34703
- console.log(dim(" 3. ") + cyan("sl subgraphs new my-watcher --template sip-010-balances"));
34704
- console.log(dim(" ") + dim("# five templates ship with the CLI"));
34705
- console.log();
34706
- console.log(dim(" 4. ") + cyan("sl subgraphs deploy subgraphs/my-watcher.ts"));
34707
- console.log(dim(" ") + dim("# six seconds, backfill auto-starts"));
34708
- console.log();
34709
- info(dim("Run `sl whoami` at any time to see where you are in the flow."));
34710
- }
34711
34659
  function registerLoginCommand(program2) {
34712
34660
  program2.command("login").description("Log in to Secondlayer (magic-link email)").action(runLoginFlow);
34713
34661
  }
@@ -37422,5 +37370,5 @@ registerAccountCommand(program);
37422
37370
  registerBillingCommand(program);
37423
37371
  program.parse();
37424
37372
 
37425
- //# debugId=96A767F30317D70164756E2164756E21
37373
+ //# debugId=BDDA1E9F0730C23C64756E2164756E21
37426
37374
  //# sourceMappingURL=cli.js.map