@secondlayer/cli 5.4.1 → 5.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 +13 -9
- package/dist/cli.js.map +3 -3
- package/package.json +3 -3
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.
|
|
32324
|
+
version: "5.4.2",
|
|
32325
32325
|
description: "CLI for subgraphs and blockchain indexing on Stacks",
|
|
32326
32326
|
type: "module",
|
|
32327
32327
|
bin: {
|
|
@@ -32365,9 +32365,9 @@ 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.
|
|
32368
|
+
"@secondlayer/shared": "^6.4.2",
|
|
32369
32369
|
"@secondlayer/stacks": "^2.2.0",
|
|
32370
|
-
"@secondlayer/subgraphs": "^2.0.
|
|
32370
|
+
"@secondlayer/subgraphs": "^2.0.3",
|
|
32371
32371
|
"@biomejs/js-api": "^0.7.0",
|
|
32372
32372
|
"@biomejs/wasm-nodejs": "^1.9.0",
|
|
32373
32373
|
esbuild: "^0.19.0",
|
|
@@ -35389,7 +35389,7 @@ Stopped watching.`);
|
|
|
35389
35389
|
});
|
|
35390
35390
|
await new Promise(() => {});
|
|
35391
35391
|
});
|
|
35392
|
-
subgraphs.command("deploy <file>").description("Deploy a subgraph definition file").option("--
|
|
35392
|
+
subgraphs.command("deploy <file>").description("Deploy a subgraph definition file").option("--start-block <n>", "Override the subgraph definition startBlock for this deploy").option("--dry-run", "Validate and preview deploy without writing changes").option("--preview", "Alias for --dry-run").option("--force", "Skip confirmation prompt for reindex operations").option("--strict", "Run `tsc --noEmit` against the handler before deploy (slower; catches TS type errors)").action(async (file, options2) => {
|
|
35393
35393
|
try {
|
|
35394
35394
|
const absPath = resolve2(file);
|
|
35395
35395
|
const config = await loadConfig();
|
|
@@ -35421,7 +35421,7 @@ Stopped watching.`);
|
|
|
35421
35421
|
if (dryRun) {
|
|
35422
35422
|
printSubgraphDeployPreview(createSubgraphDeployPreview({
|
|
35423
35423
|
...validated,
|
|
35424
|
-
version:
|
|
35424
|
+
version: validated.version
|
|
35425
35425
|
}, {
|
|
35426
35426
|
bundleBytes: Buffer.byteLength(handlerCode, "utf8")
|
|
35427
35427
|
}), {
|
|
@@ -35433,7 +35433,7 @@ Stopped watching.`);
|
|
|
35433
35433
|
}
|
|
35434
35434
|
const result = await deploySubgraphApi({
|
|
35435
35435
|
name: effectiveDef.name,
|
|
35436
|
-
version:
|
|
35436
|
+
version: undefined,
|
|
35437
35437
|
description: effectiveDef.description,
|
|
35438
35438
|
sources: effectiveDef.sources,
|
|
35439
35439
|
schema: effectiveDef.schema,
|
|
@@ -35455,6 +35455,8 @@ Stopped watching.`);
|
|
|
35455
35455
|
};
|
|
35456
35456
|
if (result.action === "unchanged") {
|
|
35457
35457
|
info(`Subgraph "${effectiveDef.name}" is up to date (v${result.version} — no changes)`);
|
|
35458
|
+
} else if (result.action === "handler_updated") {
|
|
35459
|
+
success(`Subgraph "${effectiveDef.name}" handler updated (v${result.version} — schema unchanged, no reindex needed)`);
|
|
35458
35460
|
} else if (result.action === "created") {
|
|
35459
35461
|
success(`Subgraph "${effectiveDef.name}" created → v${result.version}`);
|
|
35460
35462
|
await printDeployFooter();
|
|
@@ -35497,7 +35499,7 @@ Stopped watching.`);
|
|
|
35497
35499
|
if (dryRun) {
|
|
35498
35500
|
printSubgraphDeployPreview(createSubgraphDeployPreview({
|
|
35499
35501
|
...validated,
|
|
35500
|
-
version:
|
|
35502
|
+
version: validated.version
|
|
35501
35503
|
}), {
|
|
35502
35504
|
network: config.network,
|
|
35503
35505
|
file: absPath,
|
|
@@ -35509,11 +35511,13 @@ Stopped watching.`);
|
|
|
35509
35511
|
const { getDb: getDb2, closeDb } = await import("@secondlayer/shared/db");
|
|
35510
35512
|
const db = getDb2();
|
|
35511
35513
|
const result = await deploySchema(db, effectiveDef, absPath, {
|
|
35512
|
-
version:
|
|
35514
|
+
version: undefined,
|
|
35513
35515
|
forceReindex: startBlock !== undefined
|
|
35514
35516
|
});
|
|
35515
35517
|
if (result.action === "unchanged") {
|
|
35516
35518
|
info(`Subgraph "${effectiveDef.name}" is up to date (v${result.version} — no changes)`);
|
|
35519
|
+
} else if (result.action === "handler_updated") {
|
|
35520
|
+
success(`Subgraph "${effectiveDef.name}" handler updated (v${result.version} — schema unchanged, no reindex needed)`);
|
|
35517
35521
|
} else if (result.action === "created") {
|
|
35518
35522
|
success(`Subgraph "${effectiveDef.name}" created → v${result.version}`);
|
|
35519
35523
|
} else if (result.action === "reindexed") {
|
|
@@ -37100,5 +37104,5 @@ registerAccountCommand(program);
|
|
|
37100
37104
|
registerBillingCommand(program);
|
|
37101
37105
|
program.parse();
|
|
37102
37106
|
|
|
37103
|
-
//# debugId=
|
|
37107
|
+
//# debugId=ACD7C55C0D9222F164756E2164756E21
|
|
37104
37108
|
//# sourceMappingURL=cli.js.map
|