@secondlayer/cli 5.1.0 → 5.1.1
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 +38 -14
- package/dist/cli.js.map +3 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -32443,7 +32443,7 @@ var {
|
|
|
32443
32443
|
// package.json
|
|
32444
32444
|
var package_default = {
|
|
32445
32445
|
name: "@secondlayer/cli",
|
|
32446
|
-
version: "5.1.
|
|
32446
|
+
version: "5.1.1",
|
|
32447
32447
|
description: "CLI for subgraphs and blockchain indexing on Stacks",
|
|
32448
32448
|
type: "module",
|
|
32449
32449
|
bin: {
|
|
@@ -34631,18 +34631,42 @@ var SUBGRAPH_TEMPLATE_DESCRIPTIONS = {
|
|
|
34631
34631
|
"bns-names": "BNS-V2 name ownership and lifecycle"
|
|
34632
34632
|
};
|
|
34633
34633
|
function generateSubgraphTemplate(name, slug = "basic") {
|
|
34634
|
-
|
|
34635
|
-
|
|
34636
|
-
|
|
34637
|
-
|
|
34638
|
-
|
|
34639
|
-
|
|
34640
|
-
|
|
34641
|
-
|
|
34642
|
-
|
|
34643
|
-
|
|
34644
|
-
|
|
34645
|
-
|
|
34634
|
+
const body = (() => {
|
|
34635
|
+
switch (slug) {
|
|
34636
|
+
case "sip-010-balances":
|
|
34637
|
+
return sip010Balances(name);
|
|
34638
|
+
case "sbtc-flows":
|
|
34639
|
+
return sbtcFlows(name);
|
|
34640
|
+
case "pox-stacking":
|
|
34641
|
+
return poxStacking(name);
|
|
34642
|
+
case "bns-names":
|
|
34643
|
+
return bnsNames(name);
|
|
34644
|
+
default:
|
|
34645
|
+
return basic(name);
|
|
34646
|
+
}
|
|
34647
|
+
})();
|
|
34648
|
+
return `${nextStepsHeader(name)}
|
|
34649
|
+
${body}`;
|
|
34650
|
+
}
|
|
34651
|
+
function nextStepsHeader(name) {
|
|
34652
|
+
return `// ───────────────────────────────────────────────────────────────────
|
|
34653
|
+
// What to do next
|
|
34654
|
+
//
|
|
34655
|
+
// 1. Edit the source filter + schema below to match what you want to track.
|
|
34656
|
+
// 2. Edit the handler at the bottom — it runs once per matching event.
|
|
34657
|
+
// 3. Deploy: sl subgraphs deploy ${name}.ts
|
|
34658
|
+
// (You'll be prompted to log in if this is your first remote deploy.)
|
|
34659
|
+
// 4. Wait for sync: sl subgraphs status ${name}
|
|
34660
|
+
// Mainnet backfill from genesis can take an hour or more depending on
|
|
34661
|
+
// your filter scope. Use --start-block to skip ahead.
|
|
34662
|
+
// 5. Query: sl subgraphs query ${name} <table-name>
|
|
34663
|
+
// Or hit the auto-generated REST endpoint listed in the deploy output.
|
|
34664
|
+
//
|
|
34665
|
+
// Bind a typed Subscription to any table you write here — see
|
|
34666
|
+
// https://www.secondlayer.tools/docs/subscriptions
|
|
34667
|
+
// ───────────────────────────────────────────────────────────────────
|
|
34668
|
+
|
|
34669
|
+
`;
|
|
34646
34670
|
}
|
|
34647
34671
|
function basic(name) {
|
|
34648
34672
|
return `import { defineSubgraph } from "@secondlayer/subgraphs";
|
|
@@ -37286,5 +37310,5 @@ registerLocalCommand(program);
|
|
|
37286
37310
|
registerAccountCommand(program);
|
|
37287
37311
|
program.parse();
|
|
37288
37312
|
|
|
37289
|
-
//# debugId=
|
|
37313
|
+
//# debugId=7C4F9780AD65C38D64756E2164756E21
|
|
37290
37314
|
//# sourceMappingURL=cli.js.map
|