@secondlayer/cli 9.6.0 → 9.7.0
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 +11 -16
- package/dist/cli.js.map +3 -3
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -30458,26 +30458,24 @@ Examples:
|
|
|
30458
30458
|
const { runSubgraphTest: runSubgraphTest2 } = await Promise.resolve().then(() => (init_subgraph_test(), exports_subgraph_test));
|
|
30459
30459
|
await runSubgraphTest2(file, options3);
|
|
30460
30460
|
});
|
|
30461
|
-
subgraphs.command("reindex <name>").description("
|
|
30461
|
+
subgraphs.command("reindex <name>").description("Drop a subgraph's data and rebuild it from its start block (destructive)").option("-y, --yes", "Skip confirmation").addHelpText("after", `
|
|
30462
|
+
Reindex is always whole-subgraph: it drops every row and rebuilds from the
|
|
30463
|
+
subgraph's start block to chain tip. To process a specific block range without
|
|
30464
|
+
dropping anything, use "sl subgraphs backfill".
|
|
30465
|
+
|
|
30462
30466
|
Examples:
|
|
30463
|
-
$ sl subgraphs reindex my-graph -y
|
|
30464
|
-
$ sl subgraphs reindex my-graph --from-block 150000 --to-block 160000 -y`).action(async (name, options3) => {
|
|
30467
|
+
$ sl subgraphs reindex my-graph -y`).action(async (name, options3) => {
|
|
30465
30468
|
try {
|
|
30466
|
-
const fromRaw = options3.fromBlock;
|
|
30467
|
-
const toRaw = options3.toBlock;
|
|
30468
|
-
const fromBlock = fromRaw ? Number.parseInt(fromRaw, 10) : undefined;
|
|
30469
|
-
const toBlock = toRaw ? Number.parseInt(toRaw, 10) : undefined;
|
|
30470
30469
|
if (!options3.yes) {
|
|
30471
30470
|
if (!process.stdin.isTTY) {
|
|
30472
30471
|
error("Interactive prompt unavailable (stdin is not a TTY). Re-run with -y to skip confirmation.");
|
|
30473
30472
|
process.exit(1);
|
|
30474
30473
|
}
|
|
30475
30474
|
const { confirm: confirm4 } = await import("@inquirer/prompts");
|
|
30476
|
-
const range = fromBlock !== undefined && toBlock !== undefined ? ` for blocks [${fromBlock}, ${toBlock}]` : fromBlock !== undefined ? ` from block ${fromBlock}` : toBlock !== undefined ? ` up to block ${toBlock}` : "";
|
|
30477
30475
|
let ok = false;
|
|
30478
30476
|
try {
|
|
30479
30477
|
ok = await confirm4({
|
|
30480
|
-
message: `Reindex subgraph "${name}"
|
|
30478
|
+
message: `Reindex subgraph "${name}"? ALL of its data will be dropped and rebuilt from its start block. This cannot be undone.`,
|
|
30481
30479
|
default: false
|
|
30482
30480
|
});
|
|
30483
30481
|
} catch (promptErr) {
|
|
@@ -30494,10 +30492,7 @@ Examples:
|
|
|
30494
30492
|
}
|
|
30495
30493
|
}
|
|
30496
30494
|
info(`Reindexing subgraph "${name}"...`);
|
|
30497
|
-
const result = await reindexSubgraphApi(name
|
|
30498
|
-
fromBlock,
|
|
30499
|
-
toBlock
|
|
30500
|
-
});
|
|
30495
|
+
const result = await reindexSubgraphApi(name);
|
|
30501
30496
|
success(result.message);
|
|
30502
30497
|
info(`From block ${result.fromBlock} to ${result.toBlock}`);
|
|
30503
30498
|
} catch (err) {
|
|
@@ -34822,7 +34817,7 @@ var {
|
|
|
34822
34817
|
// package.json
|
|
34823
34818
|
var package_default = {
|
|
34824
34819
|
name: "@secondlayer/cli",
|
|
34825
|
-
version: "9.
|
|
34820
|
+
version: "9.7.0",
|
|
34826
34821
|
repository: {
|
|
34827
34822
|
type: "git",
|
|
34828
34823
|
url: "git+https://github.com/ryanwaits/secondlayer.git",
|
|
@@ -34865,7 +34860,7 @@ var package_default = {
|
|
|
34865
34860
|
"@secondlayer/sdk": "^6.51.0",
|
|
34866
34861
|
"@secondlayer/shared": "^7.4.0",
|
|
34867
34862
|
"@secondlayer/stacks": "^3.2.0",
|
|
34868
|
-
"@secondlayer/subgraphs": "^3.
|
|
34863
|
+
"@secondlayer/subgraphs": "^3.26.0",
|
|
34869
34864
|
"@biomejs/js-api": "^0.7.0",
|
|
34870
34865
|
"@biomejs/wasm-nodejs": "^1.9.0",
|
|
34871
34866
|
esbuild: "^0.27.4",
|
|
@@ -38692,5 +38687,5 @@ registerAccountCommand(program);
|
|
|
38692
38687
|
registerKeysCommand(program);
|
|
38693
38688
|
program.parse();
|
|
38694
38689
|
|
|
38695
|
-
//# debugId=
|
|
38690
|
+
//# debugId=C3BB2E9E464137CA64756E2164756E21
|
|
38696
38691
|
//# sourceMappingURL=cli.js.map
|