@secondlayer/cli 9.5.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 +14 -18
- package/dist/cli.js.map +4 -4
- package/package.json +3 -3
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) {
|
|
@@ -31029,10 +31024,11 @@ function registerIndexCommand(program2) {
|
|
|
31029
31024
|
fail("list stacking actions", err);
|
|
31030
31025
|
}
|
|
31031
31026
|
});
|
|
31032
|
-
const mempool = index.command("mempool").description("List pending mempool transactions (run `mempool get <txId>` for one)").option("--contract-id <id>", "Filter to pending calls to a contract").option("--sender <principal>", "Filter by sender").option("--type <type>", "Filter by transaction type").option("--cursor <cursor>", "Resume token from a previous next_cursor").option("--limit <n>", "Rows per page").option("--json", "Print the full envelope as JSON").action(async (o3) => {
|
|
31027
|
+
const mempool = index.command("mempool").description("List pending mempool transactions (run `mempool get <txId>` for one)").option("--contract-id <id>", "Filter to pending calls to a contract").option("--function-name <name>", "Filter to pending calls to a function").option("--sender <principal>", "Filter by sender").option("--type <type>", "Filter by transaction type").option("--cursor <cursor>", "Resume token from a previous next_cursor").option("--limit <n>", "Rows per page").option("--json", "Print the full envelope as JSON").action(async (o3) => {
|
|
31033
31028
|
try {
|
|
31034
31029
|
emit(await client().mempool.list({
|
|
31035
31030
|
contractId: o3.contractId,
|
|
31031
|
+
functionName: o3.functionName,
|
|
31036
31032
|
sender: o3.sender,
|
|
31037
31033
|
type: o3.type,
|
|
31038
31034
|
cursor: o3.cursor,
|
|
@@ -34821,7 +34817,7 @@ var {
|
|
|
34821
34817
|
// package.json
|
|
34822
34818
|
var package_default = {
|
|
34823
34819
|
name: "@secondlayer/cli",
|
|
34824
|
-
version: "9.
|
|
34820
|
+
version: "9.7.0",
|
|
34825
34821
|
repository: {
|
|
34826
34822
|
type: "git",
|
|
34827
34823
|
url: "git+https://github.com/ryanwaits/secondlayer.git",
|
|
@@ -34861,10 +34857,10 @@ var package_default = {
|
|
|
34861
34857
|
"@inquirer/prompts": "^8.2.0",
|
|
34862
34858
|
"@secondlayer/bundler": "^0.4.1",
|
|
34863
34859
|
"@secondlayer/scaffold": "^1.5.1",
|
|
34864
|
-
"@secondlayer/sdk": "^6.
|
|
34860
|
+
"@secondlayer/sdk": "^6.51.0",
|
|
34865
34861
|
"@secondlayer/shared": "^7.4.0",
|
|
34866
34862
|
"@secondlayer/stacks": "^3.2.0",
|
|
34867
|
-
"@secondlayer/subgraphs": "^3.
|
|
34863
|
+
"@secondlayer/subgraphs": "^3.26.0",
|
|
34868
34864
|
"@biomejs/js-api": "^0.7.0",
|
|
34869
34865
|
"@biomejs/wasm-nodejs": "^1.9.0",
|
|
34870
34866
|
esbuild: "^0.27.4",
|
|
@@ -38691,5 +38687,5 @@ registerAccountCommand(program);
|
|
|
38691
38687
|
registerKeysCommand(program);
|
|
38692
38688
|
program.parse();
|
|
38693
38689
|
|
|
38694
|
-
//# debugId=
|
|
38690
|
+
//# debugId=C3BB2E9E464137CA64756E2164756E21
|
|
38695
38691
|
//# sourceMappingURL=cli.js.map
|