@secondlayer/cli 9.0.4 → 9.0.5

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
@@ -32062,7 +32062,7 @@ var {
32062
32062
  // package.json
32063
32063
  var package_default = {
32064
32064
  name: "@secondlayer/cli",
32065
- version: "9.0.4",
32065
+ version: "9.0.5",
32066
32066
  repository: {
32067
32067
  type: "git",
32068
32068
  url: "git+https://github.com/ryanwaits/secondlayer.git",
@@ -32111,11 +32111,11 @@ var package_default = {
32111
32111
  dependencies: {
32112
32112
  "@inquirer/prompts": "^8.2.0",
32113
32113
  "@secondlayer/bundler": "^0.4.0",
32114
- "@secondlayer/scaffold": "^1.4.0",
32115
- "@secondlayer/sdk": "^6.29.1",
32114
+ "@secondlayer/scaffold": "^1.4.1",
32115
+ "@secondlayer/sdk": "^6.36.0",
32116
32116
  "@secondlayer/shared": "^7.0.3",
32117
32117
  "@secondlayer/stacks": "^2.14.1",
32118
- "@secondlayer/subgraphs": "^3.19.9",
32118
+ "@secondlayer/subgraphs": "^3.20.0",
32119
32119
  "@biomejs/js-api": "^0.7.0",
32120
32120
  "@biomejs/wasm-nodejs": "^1.9.0",
32121
32121
  esbuild: "^0.27.4",
@@ -35844,6 +35844,32 @@ Stopped watching.`);
35844
35844
  return;
35845
35845
  }
35846
35846
  const deployStartBlock = startBlock ?? effectiveDef.startBlock;
35847
+ if (!options2.yes) {
35848
+ const existingDetail = await getSubgraphApi(effectiveDef.name).catch(() => null);
35849
+ const existingSchema = existingDetail?.definition?.schema;
35850
+ if (existingDetail && existingSchema) {
35851
+ const { diffSchema, hasBreakingChanges } = await import("@secondlayer/subgraphs");
35852
+ const verdict = hasBreakingChanges(diffSchema(existingSchema, effectiveDef.schema));
35853
+ const existingStart = existingDetail.definition?.startBlock;
35854
+ const startBlockForcesReindex = deployStartBlock !== undefined && deployStartBlock !== existingStart;
35855
+ if (verdict.breaking || startBlockForcesReindex) {
35856
+ if (verdict.breaking) {
35857
+ warn("Breaking changes detected:");
35858
+ for (const r of verdict.reasons)
35859
+ warn(` ✗ ${r}`);
35860
+ } else {
35861
+ warn(`startBlock change (${existingStart ?? "unset"} → ${deployStartBlock}) forces a reindex.`);
35862
+ }
35863
+ const confirmed = await confirm3({
35864
+ message: "⚠ This will drop all data and reindex from scratch. Continue?"
35865
+ });
35866
+ if (!confirmed) {
35867
+ info("Aborted — nothing was deployed.");
35868
+ process.exit(0);
35869
+ }
35870
+ }
35871
+ }
35872
+ }
35847
35873
  if (options2.databaseUrl) {
35848
35874
  info("BYO data plane: schema + rows will live in your database. The server verifies the connection before deploying.");
35849
35875
  }
@@ -35909,13 +35935,6 @@ Stopped watching.`);
35909
35935
  info(` + columns: ${t}.${cols.join(", ")}`);
35910
35936
  }
35911
35937
  }
35912
- const confirmed = options2.yes || await confirm3({
35913
- message: "⚠ This will drop all data and reindex from scratch. Continue?"
35914
- });
35915
- if (!confirmed) {
35916
- info("Aborted.");
35917
- process.exit(0);
35918
- }
35919
35938
  success(`Subgraph "${effectiveDef.name}" updated → v${result.version} (reindexing)`);
35920
35939
  await printDeployFooter();
35921
35940
  } else {
@@ -38387,5 +38406,5 @@ registerAccountCommand(program);
38387
38406
  registerKeysCommand(program);
38388
38407
  program.parse();
38389
38408
 
38390
- //# debugId=9B28507D5038425664756E2164756E21
38409
+ //# debugId=099A28BD17DC66FD64756E2164756E21
38391
38410
  //# sourceMappingURL=cli.js.map