@secondlayer/cli 5.4.3 → 5.4.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 CHANGED
@@ -32321,7 +32321,7 @@ var {
32321
32321
  // package.json
32322
32322
  var package_default = {
32323
32323
  name: "@secondlayer/cli",
32324
- version: "5.4.3",
32324
+ version: "5.4.5",
32325
32325
  description: "CLI for subgraphs and blockchain indexing on Stacks",
32326
32326
  type: "module",
32327
32327
  bin: {
@@ -32365,7 +32365,7 @@ var package_default = {
32365
32365
  "@inquirer/prompts": "^8.2.0",
32366
32366
  "@secondlayer/bundler": "^0.3.5",
32367
32367
  "@secondlayer/sdk": "^3.6.0",
32368
- "@secondlayer/shared": "^6.4.2",
32368
+ "@secondlayer/shared": "^6.4.3",
32369
32369
  "@secondlayer/stacks": "^2.2.0",
32370
32370
  "@secondlayer/subgraphs": "^2.0.3",
32371
32371
  "@biomejs/js-api": "^0.7.0",
@@ -34659,6 +34659,7 @@ async function requireAuth() {
34659
34659
  }
34660
34660
 
34661
34661
  // src/commands/subgraphs.ts
34662
+ init_resolve_auth();
34662
34663
  init_clarity();
34663
34664
 
34664
34665
  // src/templates/subgraph.ts
@@ -35031,7 +35032,6 @@ function decodeBuffUtf8(value: unknown): string | null {
35031
35032
 
35032
35033
  // src/commands/subgraphs.ts
35033
35034
  init_api();
35034
- init_resolve_auth();
35035
35035
  async function loadSubgraphWithDepCheck(absPath) {
35036
35036
  try {
35037
35037
  return await import(absPath);
@@ -35431,6 +35431,7 @@ Stopped watching.`);
35431
35431
  });
35432
35432
  return;
35433
35433
  }
35434
+ const deployStartBlock = startBlock ?? effectiveDef.startBlock;
35434
35435
  const result = await deploySubgraphApi({
35435
35436
  name: effectiveDef.name,
35436
35437
  version: undefined,
@@ -35439,7 +35440,7 @@ Stopped watching.`);
35439
35440
  schema: effectiveDef.schema,
35440
35441
  handlerCode,
35441
35442
  sourceCode: source,
35442
- ...startBlock !== undefined ? { startBlock } : {}
35443
+ ...deployStartBlock !== undefined ? { startBlock: deployStartBlock } : {}
35443
35444
  });
35444
35445
  const printDeployFooter = async () => {
35445
35446
  try {
@@ -36974,8 +36975,13 @@ function registerProjectCommand(program2) {
36974
36975
  body: { name, slug }
36975
36976
  });
36976
36977
  success(`Created project ${res.name} (${res.slug})`);
36977
- const path2 = await writeActiveProject(res.slug, process.cwd());
36978
- info(dim(`Bound to this directory → ${path2}`));
36978
+ const config = await loadConfig();
36979
+ if (!config.defaultProject) {
36980
+ await saveConfig({ ...config, defaultProject: res.slug });
36981
+ info(dim("Set as your default project."));
36982
+ } else {
36983
+ info(dim(`To use this project, run: sl project use ${res.slug}`));
36984
+ }
36979
36985
  info(dim("Next: sl subgraphs deploy <file.ts>"));
36980
36986
  } catch (err) {
36981
36987
  handleProjectError(err);
@@ -37016,6 +37022,7 @@ function registerProjectCommand(program2) {
37016
37022
  const path2 = await writeActiveProject(slug, process.cwd());
37017
37023
  success(`Bound to project "${slug}"`);
37018
37024
  info(dim(`Written to ${path2}`));
37025
+ info(dim("Tip: add `.secondlayer/` to .gitignore — it's account-personal."));
37019
37026
  });
37020
37027
  project.command("current").description("Show the active project for this directory").action(async () => {
37021
37028
  const config = await loadConfig();
@@ -37094,5 +37101,5 @@ registerAccountCommand(program);
37094
37101
  registerBillingCommand(program);
37095
37102
  program.parse();
37096
37103
 
37097
- //# debugId=28D6666040039CE464756E2164756E21
37104
+ //# debugId=461B712EBC3F36FC64756E2164756E21
37098
37105
  //# sourceMappingURL=cli.js.map