@runa-ai/runa-cli 0.5.68 → 0.5.71

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.
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * E2E Mode:
8
8
  * - Sets NEXT_PUBLIC_E2E_TEST=true (enables xstate-test-plugin)
9
- * - Sets TURBO_FORCE=true (clears turbo cache)
9
+ * - Turbo cache separates E2E/non-E2E via globalEnv (no TURBO_FORCE needed)
10
10
  */
11
11
  export interface BuildInput {
12
12
  repoRoot: string;
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../src/commands/build/actors/build.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAQH,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,GAAG,EAAE,OAAO,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,2FAyDtB,CAAC"}
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../src/commands/build/actors/build.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAQH,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,GAAG,EAAE,OAAO,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,2FAwDtB,CAAC"}
@@ -40,6 +40,21 @@ export interface InitialDeploymentCheck {
40
40
  * @returns Detection result with details
41
41
  */
42
42
  export declare function checkIfInitialDeployment(repoRoot: string, productionDbUrl: string): InitialDeploymentCheck;
43
+ /**
44
+ * Check if there are any schema changes between origin/main and HEAD.
45
+ * Uses git diff --quiet (exit 1 = changes exist, exit 0 = no changes).
46
+ *
47
+ * Returns:
48
+ * - true: schema changes detected
49
+ * - false: no schema changes (confirmed via git diff)
50
+ * - null: unable to determine (no schema dir found, or git error)
51
+ * Callers should treat null as "unknown" and NOT skip steps.
52
+ *
53
+ * Detection order (SQL-First Architecture):
54
+ * 1. supabase/schemas/declarative/ + idempotent/ (SSOT)
55
+ * 2. Drizzle TypeScript schemas (legacy fallback)
56
+ */
57
+ export declare function hasSchemaChanges(repoRoot: string): boolean | null;
43
58
  export declare function showSchemaDiff(repoRoot: string, tmpDir: string): Promise<void>;
44
59
  /**
45
60
  * Detect risky schema changes via git diff analysis.
@@ -1 +1 @@
1
- {"version":3,"file":"ci-prod-db-operations.d.ts","sourceRoot":"","sources":["../../../../src/commands/ci/commands/ci-prod-db-operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAUH,wBAAsB,WAAW,CAC/B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,oBAAoB,EAAE,MAAM,GAC3B,OAAO,CAAC,MAAM,CAAC,CAejB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,kEAAkE;IAClE,mBAAmB,EAAE,OAAO,CAAC;IAC7B,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,mCAAmC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED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AAO,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B;AAqED,wBAAsB,qBAAqB,CACzC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,oBAAoB,EAAE,MAAM,EAC5B,eAAe,EAAE,MAAM,EACvB,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,iBAAiB,CAAC,CAoE5B;AAED,wBAAsB,WAAW,CAC/B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,oBAAoB,EAAE,MAAM,EAC5B,MAAM,EAAE;IACN,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,GACA,OAAO,CAAC,IAAI,CAAC,CA0Ef;AAED,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE;IACN,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB,GACA,OAAO,CAAC,IAAI,CAAC,CA4Bf"}
1
+ {"version":3,"file":"ci-prod-db-operations.d.ts","sourceRoot":"","sources":["../../../../src/commands/ci/commands/ci-prod-db-operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAUH,wBAAsB,WAAW,CAC/B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,oBAAoB,EAAE,MAAM,GAC3B,OAAO,CAAC,MAAM,CAAC,CAejB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,kEAAkE;IAClE,mBAAmB,EAAE,OAAO,CAAC;IAC7B,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,mCAAmC;IACnC,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"partition-prefilter.d.ts","sourceRoot":"","sources":["../../../../../src/commands/db/apply/helpers/partition-prefilter.ts"],"names":[],"mappings":"AAsCA,MAAM,WAAW,qBAAqB;IACpC,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,6EAA6E;IAC7E,WAAW,EAAE,MAAM,CAAC;IACpB,mCAAmC;IACnC,aAAa,EAAE,qBAAqB,EAAE,CAAC;IACvC,6EAA6E;IAC7E,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B;AA6BD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CA6ElF"}
1
+ {"version":3,"file":"partition-prefilter.d.ts","sourceRoot":"","sources":["../../../../../src/commands/db/apply/helpers/partition-prefilter.ts"],"names":[],"mappings":"AAsCA,MAAM,WAAW,qBAAqB;IACpC,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,6EAA6E;IAC7E,WAAW,EAAE,MAAM,CAAC;IACpB,mCAAmC;IACnC,aAAa,EAAE,qBAAqB,EAAE,CAAC;IACvC,6EAA6E;IAC7E,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B;AA6BD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAuGlF"}
@@ -1 +1 @@
1
- {"version":3,"file":"db-schema.d.ts","sourceRoot":"","sources":["../../../../src/commands/db/commands/db-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAiBH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;iBAInC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,eAAe,SA2CxB,CAAC;AAEL;;GAEG;AACH,eAAO,MAAM,YAAY,SAmErB,CAAC;AAEL;;GAEG;AACH,eAAO,MAAM,YAAY,SAgDrB,CAAC;AAEL;;GAEG;AACH,eAAO,MAAM,eAAe,SAyCxB,CAAC;AAEL;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,SAgEpB,CAAC"}
1
+ {"version":3,"file":"db-schema.d.ts","sourceRoot":"","sources":["../../../../src/commands/db/commands/db-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAiBH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;iBAInC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,eAAe,SA2CxB,CAAC;AAEL;;GAEG;AACH,eAAO,MAAM,YAAY,SA6ErB,CAAC;AAEL;;GAEG;AACH,eAAO,MAAM,YAAY,SAgDrB,CAAC;AAEL;;GAEG;AACH,eAAO,MAAM,eAAe,SAyCxB,CAAC;AAEL;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,SAgEpB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/commands/template-check/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,2CAA4C,CAAC;AAMzE;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAuEnC,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAwDvC,CAAC;AAMX;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8EvB,CAAC;AAMX;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,EAAE,SAAS,MAAM,EA6DjD,CAAC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/commands/template-check/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,2CAA4C,CAAC;AAMzE;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAyEnC,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAwDvC,CAAC;AAMX;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8EvB,CAAC;AAMX;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,EAAE,SAAS,MAAM,EA6DjD,CAAC"}
@@ -20,7 +20,7 @@
20
20
  *
21
21
  * Sync strategy: Keep this in sync with packages/runa-templates/package.json version.
22
22
  */
23
- export declare const COMPATIBLE_TEMPLATES_VERSION = "0.5.61";
23
+ export declare const COMPATIBLE_TEMPLATES_VERSION = "0.5.71";
24
24
  /**
25
25
  * Templates package name on GitHub Packages.
26
26
  * Published to npm.pkg.github.com (requires NODE_AUTH_TOKEN).
package/dist/index.js CHANGED
@@ -1161,7 +1161,7 @@ var CLI_VERSION, HAS_ADMIN_COMMAND;
1161
1161
  var init_version = __esm({
1162
1162
  "src/version.ts"() {
1163
1163
  init_esm_shims();
1164
- CLI_VERSION = "0.5.68";
1164
+ CLI_VERSION = "0.5.71";
1165
1165
  HAS_ADMIN_COMMAND = false;
1166
1166
  }
1167
1167
  });
@@ -5301,7 +5301,7 @@ init_esm_shims();
5301
5301
  var BuildPhaseSchema = z.enum(["types", "lint", "build", "db", "manifest"]);
5302
5302
  var VALID_BUILD_PHASES = ["types", "lint", "build", "db", "manifest"];
5303
5303
  var BuildInputSchema = z.object({
5304
- /** Enable E2E mode (NEXT_PUBLIC_E2E_TEST=true, TURBO_FORCE=true) */
5304
+ /** Enable E2E mode (NEXT_PUBLIC_E2E_TEST=true) */
5305
5305
  e2e: z.boolean().default(false),
5306
5306
  /** Clear build caches (.next, .turbo, .runa/manifests) */
5307
5307
  clean: z.boolean().default(false),
@@ -5683,8 +5683,7 @@ var buildActor = fromPromise(
5683
5683
  if (e2e) {
5684
5684
  buildEnv.NEXT_PUBLIC_E2E_TEST = "true";
5685
5685
  buildEnv.E2E_TEST = "true";
5686
- buildEnv.TURBO_FORCE = "true";
5687
- console.log(" E2E mode enabled: NEXT_PUBLIC_E2E_TEST=true, TURBO_FORCE=true");
5686
+ console.log(" E2E mode enabled: NEXT_PUBLIC_E2E_TEST=true");
5688
5687
  }
5689
5688
  const hasApps = existsSync(path12__default.join(repoRoot, "apps"));
5690
5689
  let args;
@@ -10360,6 +10359,49 @@ function checkIfInitialDeployment(repoRoot, productionDbUrl) {
10360
10359
  };
10361
10360
  }
10362
10361
  }
10362
+ function hasSchemaChanges(repoRoot) {
10363
+ const declarativeSqlPath = path12__default.join(repoRoot, "supabase/schemas/declarative");
10364
+ const idempotentSqlPath = path12__default.join(repoRoot, "supabase/schemas/idempotent");
10365
+ if (existsSync(declarativeSqlPath) || existsSync(idempotentSqlPath)) {
10366
+ const diffPaths = [
10367
+ ...existsSync(declarativeSqlPath) ? ["supabase/schemas/declarative/"] : [],
10368
+ ...existsSync(idempotentSqlPath) ? ["supabase/schemas/idempotent/"] : []
10369
+ ];
10370
+ const result = spawnSync(
10371
+ "git",
10372
+ ["diff", "--quiet", "origin/main", "HEAD", "--", ...diffPaths],
10373
+ {
10374
+ cwd: repoRoot,
10375
+ stdio: "ignore",
10376
+ timeout: 3e4
10377
+ }
10378
+ );
10379
+ if (result.error || result.signal === "SIGTERM") {
10380
+ return null;
10381
+ }
10382
+ return result.status !== 0;
10383
+ }
10384
+ const detected = detectDatabasePackage(repoRoot);
10385
+ if (detected) {
10386
+ const schemaPath = path12__default.join(detected, "src", "schema");
10387
+ if (existsSync(path12__default.join(repoRoot, schemaPath))) {
10388
+ const result = spawnSync(
10389
+ "git",
10390
+ ["diff", "--quiet", "origin/main", "HEAD", "--", `${schemaPath}/`],
10391
+ {
10392
+ cwd: repoRoot,
10393
+ stdio: "ignore",
10394
+ timeout: 3e4
10395
+ }
10396
+ );
10397
+ if (result.error || result.signal === "SIGTERM") {
10398
+ return null;
10399
+ }
10400
+ return result.status !== 0;
10401
+ }
10402
+ }
10403
+ return null;
10404
+ }
10363
10405
  async function showSchemaDiff(repoRoot, tmpDir) {
10364
10406
  const diffLog = path12__default.join(tmpDir, "schema-diff.log");
10365
10407
  const safeEnv = getSafeEnv();
@@ -11076,6 +11118,14 @@ var CiProdApplyWorkflow = class {
11076
11118
  description: "Show schema diff",
11077
11119
  run: async (ctx) => {
11078
11120
  await showSchemaDiff(ctx.repoRoot, ctx.tmpDir);
11121
+ ctx.hasSchemaChanges = hasSchemaChanges(ctx.repoRoot);
11122
+ if (ctx.hasSchemaChanges === false) {
11123
+ ctx.logger.info("No schema changes detected \u2014 schema apply steps will be skipped");
11124
+ } else if (ctx.hasSchemaChanges === null) {
11125
+ ctx.logger.warn(
11126
+ "Could not determine schema changes (schema dir not found or git error). Proceeding with all steps."
11127
+ );
11128
+ }
11079
11129
  }
11080
11130
  },
11081
11131
  {
@@ -11111,7 +11161,11 @@ var CiProdApplyWorkflow = class {
11111
11161
  {
11112
11162
  id: "detect-risks",
11113
11163
  description: "Detect risky schema changes",
11114
- shouldSkip: (ctx) => ctx.skipRisksReason ? { reason: ctx.skipRisksReason } : null,
11164
+ shouldSkip: (ctx) => {
11165
+ if (ctx.skipRisksReason) return { reason: ctx.skipRisksReason };
11166
+ if (ctx.hasSchemaChanges === false) return { reason: "No schema changes detected" };
11167
+ return null;
11168
+ },
11115
11169
  run: async (ctx) => {
11116
11170
  await detectRisks(ctx.repoRoot, ctx.tmpDir);
11117
11171
  }
@@ -11119,6 +11173,7 @@ var CiProdApplyWorkflow = class {
11119
11173
  {
11120
11174
  id: "snapshot",
11121
11175
  description: "Create pre-deploy snapshot",
11176
+ shouldSkip: (ctx) => ctx.hasSchemaChanges === false ? { reason: "No schema changes to snapshot" } : null,
11122
11177
  run: async (ctx) => {
11123
11178
  await snapshotCreate(
11124
11179
  ctx.repoRoot,
@@ -11131,6 +11186,7 @@ var CiProdApplyWorkflow = class {
11131
11186
  {
11132
11187
  id: "repair-timestamps",
11133
11188
  description: "Repair timestamp invariants",
11189
+ shouldSkip: (ctx) => ctx.hasSchemaChanges === false ? { reason: "No schema changes" } : null,
11134
11190
  run: async (ctx) => {
11135
11191
  await repairTimestampInvariants({
11136
11192
  repoRoot: ctx.repoRoot,
@@ -11143,6 +11199,7 @@ var CiProdApplyWorkflow = class {
11143
11199
  {
11144
11200
  id: "apply-schema",
11145
11201
  description: "Apply production schema",
11202
+ shouldSkip: (ctx) => ctx.hasSchemaChanges === false ? { reason: "No schema changes to apply" } : null,
11146
11203
  run: async (ctx) => {
11147
11204
  try {
11148
11205
  ctx.schemaApplyResult = await applyProductionSchema(
@@ -15199,8 +15256,8 @@ function generateProductionPreviewSection(prodPreview, schemaDrift, schemaStats)
15199
15256
  if (indexWarning.length > 0) return indexWarning;
15200
15257
  return ["**\u672C\u756A\u30D7\u30EC\u30D3\u30E5\u30FC**: \u2705 \u672C\u756A\u306B\u9069\u7528\u3059\u308B\u30B9\u30AD\u30FC\u30DE\u5909\u66F4\u306F\u3042\u308A\u307E\u305B\u3093", ""];
15201
15258
  }
15202
- function shouldShowDeployButton(productionPreview, schemaDrift, hasSchemaChanges) {
15203
- if (hasSchemaChanges) return true;
15259
+ function shouldShowDeployButton(productionPreview, schemaDrift, hasSchemaChanges2) {
15260
+ if (hasSchemaChanges2) return true;
15204
15261
  if (productionPreview?.error) return true;
15205
15262
  if (!productionPreview?.executed && schemaDrift?.gitDiff?.filesChanged?.length) return true;
15206
15263
  return false;
@@ -15210,16 +15267,16 @@ function generateDeploySection(exitCode, layerResults, gitBranchName, production
15210
15267
  const deployWorkflowUrl = env2.repository ? `${env2.serverUrl}/${env2.repository}/actions/workflows/deploy-db.yml` : null;
15211
15268
  const hasPgSchemaDiffChanges = productionPreview?.hasChanges === true;
15212
15269
  const hasIndexChanges = schemaStats?.local && schemaStats?.production ? hasIndexDiff(compareIndexLists(schemaStats.local, schemaStats.production)) : false;
15213
- const hasSchemaChanges = hasPgSchemaDiffChanges || hasIndexChanges;
15214
- const headerEmoji = hasSchemaChanges ? "\u{1F6A8}" : "\u{1F680}";
15215
- const headerText = hasSchemaChanges ? "\u672C\u756A\u30C7\u30D7\u30ED\u30A4 (\u30B9\u30AD\u30FC\u30DE\u5909\u66F4\u3042\u308A!)" : "\u672C\u756A\u30C7\u30D7\u30ED\u30A4";
15270
+ const hasSchemaChanges2 = hasPgSchemaDiffChanges || hasIndexChanges;
15271
+ const headerEmoji = hasSchemaChanges2 ? "\u{1F6A8}" : "\u{1F680}";
15272
+ const headerText = hasSchemaChanges2 ? "\u672C\u756A\u30C7\u30D7\u30ED\u30A4 (\u30B9\u30AD\u30FC\u30DE\u5909\u66F4\u3042\u308A!)" : "\u672C\u756A\u30C7\u30D7\u30ED\u30A4";
15216
15273
  const lines = ["---", "", `### ${headerEmoji} ${headerText}`, ""];
15217
15274
  if (exitCode !== 0)
15218
15275
  lines.push("> **\u6CE8**: Layer 4 (E2E) \u306F\u5931\u6557\u3057\u307E\u3057\u305F\u304C\u3001\u30B9\u30AD\u30FC\u30DE\u5909\u66F4\u306F\u30C7\u30D7\u30ED\u30A4\u53EF\u80FD\u3067\u3059\u3002", "");
15219
15276
  lines.push(...generateProductionPreviewSection(productionPreview, schemaDrift, schemaStats));
15220
- const showButton = shouldShowDeployButton(productionPreview, schemaDrift, hasSchemaChanges);
15277
+ const showButton = shouldShowDeployButton(productionPreview, schemaDrift, hasSchemaChanges2);
15221
15278
  if (deployWorkflowUrl && showButton) {
15222
- const buttonText = hasSchemaChanges ? "\u26A1 \u30B9\u30AD\u30FC\u30DE\u5909\u66F4\u3092\u672C\u756A\u306B\u30C7\u30D7\u30ED\u30A4" : "\u25B6\uFE0F \u672C\u756A\u306B\u30C7\u30D7\u30ED\u30A4";
15279
+ const buttonText = hasSchemaChanges2 ? "\u26A1 \u30B9\u30AD\u30FC\u30DE\u5909\u66F4\u3092\u672C\u756A\u306B\u30C7\u30D7\u30ED\u30A4" : "\u25B6\uFE0F \u672C\u756A\u306B\u30C7\u30D7\u30ED\u30A4";
15223
15280
  lines.push(
15224
15281
  `**\u30C7\u30D7\u30ED\u30A4\u30D6\u30E9\u30F3\u30C1**: \`${gitBranchName}\``,
15225
15282
  "",
@@ -21951,8 +22008,21 @@ function prefilterPartitionStubs(schemasDir) {
21951
22008
  if (!hasPartitions) {
21952
22009
  copyFileSync(srcPath, destPath);
21953
22010
  } else {
22011
+ const raw = readFileSync(srcPath, "utf-8");
22012
+ if (raw.length !== strippedContent.length) {
22013
+ copyFileSync(srcPath, destPath);
22014
+ allStubs.push(...stubs);
22015
+ continue;
22016
+ }
21954
22017
  PARTITION_BLOCK_REGEX.lastIndex = 0;
21955
- const filtered = strippedContent.replace(PARTITION_BLOCK_REGEX, "");
22018
+ const matches = [...strippedContent.matchAll(PARTITION_BLOCK_REGEX)];
22019
+ let filtered = raw;
22020
+ for (let i = matches.length - 1; i >= 0; i--) {
22021
+ const m = matches[i];
22022
+ if (m.index !== void 0) {
22023
+ filtered = filtered.slice(0, m.index) + filtered.slice(m.index + m[0].length);
22024
+ }
22025
+ }
21956
22026
  writeFileSync(destPath, filtered, "utf-8");
21957
22027
  allStubs.push(...stubs);
21958
22028
  }
@@ -27793,17 +27863,23 @@ var risksCommand = new Command("risks").description("Detect risky schema changes
27793
27863
  throw error;
27794
27864
  }
27795
27865
  const cause = error instanceof Error ? error.message : String(error);
27866
+ const hints = ["Review schema changes", "Consider safer migration strategy", ""];
27867
+ if (cause.includes("script not found") || cause.includes("SDK script")) {
27868
+ hints.push("The detect-risks.sh script may not be installed correctly.");
27869
+ hints.push("Try: pnpm install @runa-ai/runa");
27870
+ } else if (cause.includes("No common ancestor") || cause.includes("INITIAL DEPLOYMENT")) {
27871
+ hints.push("This appears to be an initial deployment (no baseline).");
27872
+ hints.push(" --skip flag: runa db risks --skip");
27873
+ hints.push(" Environment: RUNA_SKIP_SCHEMA_RISK=1");
27874
+ } else {
27875
+ hints.push("If this is an initial deployment:");
27876
+ hints.push(" --skip flag: runa db risks --skip");
27877
+ hints.push(" Environment: RUNA_SKIP_SCHEMA_RISK=1");
27878
+ }
27796
27879
  throw new CLIError(
27797
27880
  `Risk analysis failed: ${cause}`,
27798
27881
  "RISK_ANALYSIS_FAILED",
27799
- [
27800
- "Review schema changes",
27801
- "Consider safer migration strategy",
27802
- "",
27803
- "If this is an initial deployment:",
27804
- " --skip flag: runa db risks --skip",
27805
- " Environment: RUNA_SKIP_SCHEMA_RISK=1"
27806
- ],
27882
+ hints,
27807
27883
  error instanceof Error ? error : void 0
27808
27884
  );
27809
27885
  }
@@ -34027,7 +34103,7 @@ init_esm_shims();
34027
34103
 
34028
34104
  // src/constants/versions.ts
34029
34105
  init_esm_shims();
34030
- var COMPATIBLE_TEMPLATES_VERSION = "0.5.61";
34106
+ var COMPATIBLE_TEMPLATES_VERSION = "0.5.71";
34031
34107
  var TEMPLATES_PACKAGE_NAME = "@r06-dev/runa-templates";
34032
34108
  var GITHUB_PACKAGES_REGISTRY = "https://npm.pkg.github.com";
34033
34109
 
@@ -37021,6 +37097,10 @@ var RUNA_ONLY_FILES = [
37021
37097
  ".github/workflows/runa-templates.yml",
37022
37098
  // Template validation (pj-repos don't have templates)
37023
37099
  // === runa-repo Specific Scripts ===
37100
+ "packages/database/scripts/db-sync-partition.ts",
37101
+ // Partition defense (TODO: add to template)
37102
+ "packages/database/scripts/db-sync-partition.test.ts",
37103
+ // Partition defense tests
37024
37104
  "packages/database/scripts/check-plpgsql.ts",
37025
37105
  "packages/database/scripts/run-splinter.ts",
37026
37106
  "packages/database/scripts/seed-generators/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runa-ai/runa-cli",
3
- "version": "0.5.68",
3
+ "version": "0.5.71",
4
4
  "private": false,
5
5
  "description": "AI-powered DevOps CLI",
6
6
  "type": "module",
@@ -53,7 +53,7 @@
53
53
  "typescript": "5.9.3",
54
54
  "xstate": "5.28.0",
55
55
  "zod": "4.3.6",
56
- "@runa-ai/runa": "0.5.68",
56
+ "@runa-ai/runa": "0.5.71",
57
57
  "@runa-ai/runa-xstate-test-plugin": "0.5.58"
58
58
  },
59
59
  "engines": {