@secondlayer/cli 1.8.0 → 1.10.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 +22 -9
- package/dist/cli.js.map +5 -5
- package/dist/index.d.ts +20 -83
- package/dist/index.js +13 -2374
- package/dist/index.js.map +5 -22
- package/package.json +4 -4
package/dist/cli.js
CHANGED
|
@@ -4551,6 +4551,7 @@ var exports_api_client = {};
|
|
|
4551
4551
|
__export(exports_api_client, {
|
|
4552
4552
|
updateStreamByName: () => updateStreamByName,
|
|
4553
4553
|
updateStream: () => updateStream,
|
|
4554
|
+
stopSubgraphApi: () => stopSubgraphApi,
|
|
4554
4555
|
rotateSecret: () => rotateSecret,
|
|
4555
4556
|
resumeAllStreams: () => resumeAllStreams,
|
|
4556
4557
|
resolveStreamId: () => resolveStreamId,
|
|
@@ -4659,6 +4660,9 @@ async function reindexSubgraphApi(name, options) {
|
|
|
4659
4660
|
async function backfillSubgraphApi(name, options) {
|
|
4660
4661
|
return (await getClient()).subgraphs.backfill(name, options);
|
|
4661
4662
|
}
|
|
4663
|
+
async function stopSubgraphApi(name) {
|
|
4664
|
+
return (await getClient()).subgraphs.stop(name);
|
|
4665
|
+
}
|
|
4662
4666
|
async function deleteSubgraphApi(name) {
|
|
4663
4667
|
return (await getClient()).subgraphs.delete(name);
|
|
4664
4668
|
}
|
|
@@ -32616,7 +32620,7 @@ var {
|
|
|
32616
32620
|
// package.json
|
|
32617
32621
|
var package_default = {
|
|
32618
32622
|
name: "@secondlayer/cli",
|
|
32619
|
-
version: "1.
|
|
32623
|
+
version: "1.10.0",
|
|
32620
32624
|
description: "CLI for streams, subgraphs, and real-time blockchain indexing on Stacks",
|
|
32621
32625
|
type: "module",
|
|
32622
32626
|
bin: {
|
|
@@ -32657,10 +32661,10 @@ var package_default = {
|
|
|
32657
32661
|
license: "MIT",
|
|
32658
32662
|
dependencies: {
|
|
32659
32663
|
"@inquirer/prompts": "^8.2.0",
|
|
32660
|
-
"@secondlayer/sdk": "^0.
|
|
32661
|
-
"@secondlayer/shared": "^0.
|
|
32664
|
+
"@secondlayer/sdk": "^0.9.0",
|
|
32665
|
+
"@secondlayer/shared": "^0.10.0",
|
|
32662
32666
|
"@secondlayer/stacks": "^0.2.2",
|
|
32663
|
-
"@secondlayer/subgraphs": "^0.
|
|
32667
|
+
"@secondlayer/subgraphs": "^0.8.0",
|
|
32664
32668
|
"@biomejs/js-api": "^0.7.0",
|
|
32665
32669
|
"@biomejs/wasm-nodejs": "^1.9.0",
|
|
32666
32670
|
esbuild: "^0.19.0",
|
|
@@ -35666,6 +35670,15 @@ Table endpoints:`));
|
|
|
35666
35670
|
handleApiError(err, "backfill subgraph");
|
|
35667
35671
|
}
|
|
35668
35672
|
});
|
|
35673
|
+
subgraphs.command("stop <name>").description("Stop a running reindex or backfill operation").action(async (name) => {
|
|
35674
|
+
try {
|
|
35675
|
+
info(`Stopping operation for subgraph "${name}"...`);
|
|
35676
|
+
const result = await stopSubgraphApi(name);
|
|
35677
|
+
success(result.message);
|
|
35678
|
+
} catch (err) {
|
|
35679
|
+
handleApiError(err, "stop subgraph operation");
|
|
35680
|
+
}
|
|
35681
|
+
});
|
|
35669
35682
|
subgraphs.command("gaps <name>").description("Show block gaps for a subgraph").option("--resolved", "Include resolved gaps").option("--limit <n>", "Max gaps to return", "50").option("--json", "Output as JSON").action(async (name, options2) => {
|
|
35670
35683
|
try {
|
|
35671
35684
|
const result = await getSubgraphGaps(name, {
|
|
@@ -36413,14 +36426,14 @@ function registerAuthCommand(program2) {
|
|
|
36413
36426
|
});
|
|
36414
36427
|
await assertOk(mlRes);
|
|
36415
36428
|
console.log(dim("Check your email for a 6-digit login code."));
|
|
36416
|
-
const
|
|
36429
|
+
const code = await input2({
|
|
36417
36430
|
message: "Code:",
|
|
36418
|
-
validate: (v) => v.trim()
|
|
36431
|
+
validate: (v) => /^\d{6}$/.test(v.trim()) || "Enter the 6-digit code from your email"
|
|
36419
36432
|
});
|
|
36420
36433
|
const verifyRes = await fetch(`${apiUrl}/api/auth/verify`, {
|
|
36421
36434
|
method: "POST",
|
|
36422
36435
|
headers: { "Content-Type": "application/json" },
|
|
36423
|
-
body: JSON.stringify({
|
|
36436
|
+
body: JSON.stringify({ code: code.trim(), email })
|
|
36424
36437
|
});
|
|
36425
36438
|
await assertOk(verifyRes);
|
|
36426
36439
|
const result = await verifyRes.json();
|
|
@@ -36500,7 +36513,7 @@ function registerAuthCommand(program2) {
|
|
|
36500
36513
|
["API", apiUrl || "(not configured)"],
|
|
36501
36514
|
[
|
|
36502
36515
|
"API Key",
|
|
36503
|
-
config.apiKey ? config.apiKey.slice(0, 14)
|
|
36516
|
+
config.apiKey ? `${config.apiKey.slice(0, 14)}...` : "(none)"
|
|
36504
36517
|
]
|
|
36505
36518
|
];
|
|
36506
36519
|
if (config.apiKey && apiUrl) {
|
|
@@ -37012,5 +37025,5 @@ registerWhoamiCommand(program);
|
|
|
37012
37025
|
registerReceiverCommand(program);
|
|
37013
37026
|
program.parse();
|
|
37014
37027
|
|
|
37015
|
-
//# debugId=
|
|
37028
|
+
//# debugId=2406566DC849ADA464756E2164756E21
|
|
37016
37029
|
//# sourceMappingURL=cli.js.map
|