@secondlayer/cli 19.0.2 → 19.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 CHANGED
@@ -28930,7 +28930,7 @@ function withErrorHandling(fn, options) {
28930
28930
  };
28931
28931
  }
28932
28932
  async function getPlatformClient() {
28933
- const { apiUrl, ephemeralKey } = await resolveAuth();
28933
+ const { apiUrl, ephemeralKey } = await resolveHostedAuth();
28934
28934
  return new SecondLayer2({ baseUrl: apiUrl, apiKey: ephemeralKey });
28935
28935
  }
28936
28936
  async function listSubgraphsApi() {
@@ -198796,6 +198796,11 @@ import {
198796
198796
  generateTraitSubgraph as generateTraitSubgraph2
198797
198797
  } from "@secondlayer/scaffold";
198798
198798
  import { TRAIT_STANDARDS } from "@secondlayer/stacks/clarity";
198799
+ function webhookHint(apiUrl, name, firstTable) {
198800
+ if (!firstTable || isMerchantUrl(apiUrl))
198801
+ return null;
198802
+ return `secondlayer webhooks create ${name}-hook --subgraph ${name} --table ${firstTable} --url <your-endpoint>`;
198803
+ }
198799
198804
  async function loadSubgraphWithDepCheck(absPath) {
198800
198805
  try {
198801
198806
  return await import(absPath);
@@ -199226,7 +199231,7 @@ function formatSubgraphSync(sync) {
199226
199231
  }
199227
199232
  function registerSubgraphsCommand(program) {
199228
199233
  const subgraphs = program.command("subgraphs").description("Manage materialized subgraphs");
199229
- subgraphs.hook("preAction", () => assertInstanceUrl());
199234
+ subgraphs.hook("preAction", () => assertInstanceOrAccountKey());
199230
199235
  subgraphs.command("create <name>").description("Start here: create a new subgraph definition file (see also: subgraphs scaffold)").option("--from-contract <contractId>", "Generate sources/schema/handlers from the contract's observed print events (requires network)").option("--trait <std>", "Trait-scoped source (sip-009|sip-010|sip-013) — no contract id").option("--blank", "Write a minimal stx_transfer starter (native STX, not every FT)").option("--table-per-topic", "With --from-contract: one table per print topic instead of a single wide table").addHelpText("after", `
199231
199236
  create requires one of --from-contract, --trait, or --blank. Prefer
199232
199237
  --from-contract: it infers sources/schema/handlers from print events already
@@ -199536,9 +199541,9 @@ otherwise the deployed definition's only copy is the row in the database. Pass
199536
199541
  info(` Reindex: ${denom} started in the background — check status in ~30s for an ETA`);
199537
199542
  }
199538
199543
  info(` Watch: secondlayer subgraphs status ${effectiveDef.name}`);
199539
- if (firstTable) {
199540
- info(` Webhook: secondlayer webhooks create ${effectiveDef.name}-hook --subgraph ${effectiveDef.name} --table ${firstTable} --url <your-endpoint>`);
199541
- }
199544
+ const hint = webhookHint(apiUrl, effectiveDef.name, firstTable);
199545
+ if (hint)
199546
+ info(` Webhook: ${hint}`);
199542
199547
  } catch {}
199543
199548
  };
199544
199549
  if (result.action === "unchanged") {
@@ -202502,7 +202507,7 @@ var {
202502
202507
  // package.json
202503
202508
  var package_default = {
202504
202509
  name: "@secondlayer/cli",
202505
- version: "19.0.2",
202510
+ version: "19.1.1",
202506
202511
  description: "Run a Stacks index on your own hardware — set it up, restore verified history, and keep it current.",
202507
202512
  repository: {
202508
202513
  type: "git",
@@ -202542,9 +202547,9 @@ var package_default = {
202542
202547
  "@secondlayer/bundler": "^0.6.1",
202543
202548
  "@secondlayer/scaffold": "^1.6.1",
202544
202549
  "@secondlayer/sdk": "^14.0.0",
202545
- "@secondlayer/shared": "^11.19.1",
202550
+ "@secondlayer/shared": "^11.19.2",
202546
202551
  "@secondlayer/stacks": "^6.1.1",
202547
- "@secondlayer/subgraphs": "^6.3.2",
202552
+ "@secondlayer/subgraphs": "^6.3.4",
202548
202553
  esbuild: "^0.28.2",
202549
202554
  "smol-toml": "^1.8.0",
202550
202555
  zod: "^4.3.6"
@@ -209282,5 +209287,5 @@ registerCreditsCommand(program);
209282
209287
  registerArchiveCommand(program);
209283
209288
  program.parse();
209284
209289
 
209285
- //# debugId=5ADFA0DD3928ADD764756E2164756E21
209290
+ //# debugId=F9E4373E66C7156964756E2164756E21
209286
209291
  //# sourceMappingURL=cli.js.map