@runa-ai/runa-cli 0.8.0 → 0.9.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/{build-HQMSVN6N.js → build-P2A6345N.js} +2 -2
- package/dist/{check-PCSQPYDM.js → check-4TZHNOZU.js} +4 -4
- package/dist/{chunk-DRSUEMAK.js → chunk-B7C7CLW2.js} +2 -5
- package/dist/{chunk-B3POLMII.js → chunk-BQ336L5T.js} +1 -1
- package/dist/{chunk-6FAU4IGR.js → chunk-ELXXQIGW.js} +4 -1
- package/dist/{chunk-RB2ZUS76.js → chunk-EXR4J2JT.js} +52 -16
- package/dist/{chunk-GHQH6UC5.js → chunk-GKBE7EIE.js} +1 -1
- package/dist/{chunk-JMJP4A47.js → chunk-GT5DMS5R.js} +20 -2
- package/dist/{chunk-3JO6YP3T.js → chunk-IEKYTCYA.js} +1 -1
- package/dist/{chunk-WPMR7RQ4.js → chunk-IWVXI5O4.js} +2 -2
- package/dist/chunk-KUH3G522.js +72 -0
- package/dist/{chunk-VSH3IXDQ.js → chunk-MAFJAA2P.js} +1 -1
- package/dist/{chunk-CCKG5R4Y.js → chunk-MILCC3B6.js} +1 -1
- package/dist/{chunk-5NKWR4FF.js → chunk-OERS32LW.js} +1 -1
- package/dist/{chunk-2QX7T24B.js → chunk-QKGL6Q2S.js} +1 -1
- package/dist/{chunk-OBYZDT2E.js → chunk-URWDB7YL.js} +15 -78
- package/dist/{chunk-ZYT7OQJB.js → chunk-WGRVAGSR.js} +6 -6
- package/dist/chunk-YRNQEJQW.js +9043 -0
- package/dist/chunk-ZWDWFMOX.js +1514 -0
- package/dist/{ci-ZK3LKYFX.js → ci-S5KSBECX.js} +992 -849
- package/dist/{cli-ZY5VRIJA.js → cli-TJZCAMB2.js} +30 -30
- package/dist/commands/ci/commands/ci-prod-db-operations.d.ts +12 -17
- package/dist/commands/ci/commands/ci-prod-utils.d.ts +7 -0
- package/dist/commands/ci/commands/layer4-discovery.d.ts +2 -0
- package/dist/commands/ci/machine/actors/db/production-preview.d.ts +4 -3
- package/dist/commands/ci/machine/actors/db/sync-schema.d.ts +5 -1
- package/dist/commands/ci/machine/actors/test/capabilities.d.ts +2 -13
- package/dist/commands/ci/machine/actors/test/index.d.ts +1 -0
- package/dist/commands/ci/machine/actors/test/layer-content.d.ts +11 -0
- package/dist/commands/ci/machine/commands/ci-pr-internal-profile.d.ts +7 -0
- package/dist/commands/ci/machine/commands/ci-step-registry.d.ts +25 -0
- package/dist/commands/ci/machine/commands/step-telemetry.d.ts +1 -2
- package/dist/commands/ci/machine/contract.d.ts +3 -0
- package/dist/commands/ci/machine/guards.d.ts +3 -10
- package/dist/commands/ci/machine/helpers.d.ts +1 -1
- package/dist/commands/ci/machine/machine-execution-helpers.d.ts +5 -2
- package/dist/commands/ci/machine/machine.d.ts +24 -30
- package/dist/commands/ci/machine/selectors.d.ts +6 -0
- package/dist/commands/ci/machine/types.d.ts +3 -1
- package/dist/commands/ci/utils/ci-logging.d.ts +16 -0
- package/dist/commands/ci/utils/rls-verification.d.ts +3 -2
- package/dist/commands/db/apply/actors/pg-schema-diff-actors.d.ts +1 -0
- package/dist/commands/db/apply/contract.d.ts +209 -0
- package/dist/commands/db/apply/helpers/fresh-db-handler.d.ts +2 -1
- package/dist/commands/db/apply/helpers/index.d.ts +3 -1
- package/dist/commands/db/apply/helpers/plan-ast-sql-helpers.d.ts +19 -0
- package/dist/commands/db/apply/helpers/plan-ast.d.ts +1 -2
- package/dist/commands/db/apply/helpers/plan-check-filter.d.ts +0 -14
- package/dist/commands/db/apply/helpers/plan-validator.d.ts +34 -0
- package/dist/commands/db/apply/helpers/planner-artifact.d.ts +65 -0
- package/dist/commands/db/apply/helpers/retry-logic.d.ts +5 -0
- package/dist/commands/db/apply/machine.d.ts +50 -15
- package/dist/commands/db/commands/db-apply-error.d.ts +6 -1
- package/dist/commands/db/commands/db-apply.d.ts +5 -0
- package/dist/commands/db/commands/db-plan.d.ts +3 -0
- package/dist/commands/db/commands/db-preview-profile.d.ts +23 -0
- package/dist/commands/db/commands/db-preview.d.ts +3 -0
- package/dist/commands/db/sync/actors.d.ts +1 -0
- package/dist/commands/db/sync/contract.d.ts +16 -0
- package/dist/commands/db/sync/guardrail-orchestrator.d.ts +15 -0
- package/dist/commands/db/sync/guardrail-reporting.d.ts +12 -0
- package/dist/commands/db/sync/index.d.ts +4 -0
- package/dist/commands/db/sync/machine.d.ts +18 -13
- package/dist/commands/db/sync/schema-guardrail-config-test-support.d.ts +15 -0
- package/dist/commands/db/sync/schema-guardrail-config.d.ts +11 -0
- package/dist/commands/db/sync/schema-guardrail-ddl-order.d.ts +36 -0
- package/dist/commands/db/sync/schema-guardrail-graph-guidance.d.ts +15 -0
- package/dist/commands/db/sync/schema-guardrail-graph-metadata.d.ts +41 -0
- package/dist/commands/db/sync/schema-guardrail-graph-nodes.d.ts +61 -0
- package/dist/commands/db/sync/schema-guardrail-graph-sql-helpers.d.ts +31 -0
- package/dist/commands/db/sync/schema-guardrail-graph-types.d.ts +56 -0
- package/dist/commands/db/sync/schema-guardrail-graph.d.ts +20 -0
- package/dist/commands/db/sync/schema-guardrail-local-blockers.d.ts +7 -0
- package/dist/commands/db/sync/schema-guardrail-phases.d.ts +26 -0
- package/dist/commands/db/sync/schema-guardrail-production-check.d.ts +23 -0
- package/dist/commands/db/sync/schema-guardrail-rewrite.d.ts +46 -0
- package/dist/commands/db/sync/schema-guardrail-runtime.d.ts +5 -0
- package/dist/commands/db/sync/schema-guardrail-semantic-warnings.d.ts +9 -0
- package/dist/commands/db/sync/schema-guardrail-types.d.ts +243 -0
- package/dist/commands/db/sync/schema-guardrail.d.ts +10 -0
- package/dist/commands/db/utils/declarative-dependency-sql-utils.d.ts +1 -1
- package/dist/commands/db/utils/duplicate-function-ownership.d.ts +27 -1
- package/dist/commands/db/utils/policy-cross-schema-refs.d.ts +12 -0
- package/dist/commands/db/utils/sql-table-extractor.d.ts +6 -0
- package/dist/commands/test/commands/layer4-prereqs.d.ts +15 -0
- package/dist/{config-loader-GT3HAQ7U.js → config-loader-N5ODNMD5.js} +2 -2
- package/dist/db-D2OLJDYW.js +12757 -0
- package/dist/{dev-GB5ERUVR.js → dev-LGSMDFJN.js} +7 -6
- package/dist/{doctor-ROSWSMLH.js → doctor-GYX73IEW.js} +4 -4
- package/dist/{env-WP74UUMO.js → env-KYR6Q7WO.js} +15 -10
- package/dist/{env-files-HRNUGZ5O.js → env-files-ONBC47I6.js} +3 -3
- package/dist/{hotfix-TOSGTVCW.js → hotfix-RJIAPLAM.js} +4 -4
- package/dist/index.js +3 -3
- package/dist/{init-35JLDFHI.js → init-2O6ODG5Z.js} +2 -2
- package/dist/{inject-test-attrs-XN4I2AOR.js → inject-test-attrs-F5A346UV.js} +3 -3
- package/dist/{manifest-EGCAZ4TK.js → manifest-CI4BRWEB.js} +2 -2
- package/dist/{observability-CJA5UFIC.js → observability-WNSCJ5FV.js} +2 -2
- package/dist/pg-schema-diff-helpers-7377FS2D.js +7 -0
- package/dist/{sdk-XK6HQU7S.js → sdk-BTIVPEE5.js} +1 -1
- package/dist/{test-V4KQL574.js → test-QCPN6Z47.js} +74 -46
- package/dist/{upgrade-7L4JIE4K.js → upgrade-QZKEI3NJ.js} +2 -2
- package/dist/utils/db-url-utils.d.ts +4 -77
- package/dist/{vuln-check-G6I4YYDC.js → vuln-check-5NUTETPW.js} +1 -1
- package/dist/{vuln-checker-CT2AYPIS.js → vuln-checker-UV342N66.js} +1 -1
- package/dist/{watch-AL4LCBRM.js → watch-RFVCEQLH.js} +3 -3
- package/dist/{workflow-UZIZ2JUS.js → workflow-UOG6ZZMH.js} +3 -3
- package/package.json +3 -3
- package/dist/chunk-6E2DRXIL.js +0 -452
- package/dist/db-EPI2DQYN.js +0 -18275
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
3
|
import { enableNonInteractiveMode } from './chunk-6Y3LAUGL.js';
|
|
4
4
|
import { getRequestedCommandNameFromArgv } from './chunk-UWWSAPDR.js';
|
|
5
|
-
import { CLI_VERSION, HAS_ADMIN_COMMAND } from './chunk-
|
|
5
|
+
import { CLI_VERSION, HAS_ADMIN_COMMAND } from './chunk-GKBE7EIE.js';
|
|
6
6
|
import { emitDefaultSuccessIfNeeded } from './chunk-WJXC4MVY.js';
|
|
7
7
|
import { parseOutputFormat, setOutputFormat, getOutputFormatFromEnv } from './chunk-HKUWEGUX.js';
|
|
8
8
|
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
@@ -145,7 +145,7 @@ function isTestCommand(requested) {
|
|
|
145
145
|
async function registerProjectLifecycleCommands(program, requested, loadAllCommands) {
|
|
146
146
|
if (!loadAllCommands && requested) {
|
|
147
147
|
if (requested === "init") {
|
|
148
|
-
const { initCommand: initCommand2 } = await import('./init-
|
|
148
|
+
const { initCommand: initCommand2 } = await import('./init-2O6ODG5Z.js');
|
|
149
149
|
program.addCommand(initCommand2);
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
@@ -155,7 +155,7 @@ async function registerProjectLifecycleCommands(program, requested, loadAllComma
|
|
|
155
155
|
return;
|
|
156
156
|
}
|
|
157
157
|
if (requested === "upgrade") {
|
|
158
|
-
const { upgradeCommand: upgradeCommand2 } = await import('./upgrade-
|
|
158
|
+
const { upgradeCommand: upgradeCommand2 } = await import('./upgrade-QZKEI3NJ.js');
|
|
159
159
|
program.addCommand(upgradeCommand2);
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
@@ -165,12 +165,12 @@ async function registerProjectLifecycleCommands(program, requested, loadAllComma
|
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
167
|
if (requested === "build") {
|
|
168
|
-
const { buildCommand: buildCommand2 } = await import('./build-
|
|
168
|
+
const { buildCommand: buildCommand2 } = await import('./build-P2A6345N.js');
|
|
169
169
|
program.addCommand(buildCommand2);
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
172
172
|
if (requested === "dev") {
|
|
173
|
-
const { devCommand: devCommand2 } = await import('./dev-
|
|
173
|
+
const { devCommand: devCommand2 } = await import('./dev-LGSMDFJN.js');
|
|
174
174
|
program.addCommand(devCommand2);
|
|
175
175
|
return;
|
|
176
176
|
}
|
|
@@ -183,12 +183,12 @@ async function registerProjectLifecycleCommands(program, requested, loadAllComma
|
|
|
183
183
|
{ buildCommand },
|
|
184
184
|
{ devCommand }
|
|
185
185
|
] = await Promise.all([
|
|
186
|
-
import('./init-
|
|
186
|
+
import('./init-2O6ODG5Z.js'),
|
|
187
187
|
import('./prepare-32DOVHTE.js'),
|
|
188
|
-
import('./upgrade-
|
|
188
|
+
import('./upgrade-QZKEI3NJ.js'),
|
|
189
189
|
import('./validate-CAAW4Y44.js'),
|
|
190
|
-
import('./build-
|
|
191
|
-
import('./dev-
|
|
190
|
+
import('./build-P2A6345N.js'),
|
|
191
|
+
import('./dev-LGSMDFJN.js')
|
|
192
192
|
]);
|
|
193
193
|
program.addCommand(initCommand);
|
|
194
194
|
program.addCommand(prepareCommand);
|
|
@@ -208,12 +208,12 @@ var TEST_GENERATION_COMMANDS = /* @__PURE__ */ new Set([
|
|
|
208
208
|
]);
|
|
209
209
|
async function addSingleTestCommand(program, requested) {
|
|
210
210
|
if (requested === "manifest") {
|
|
211
|
-
const { manifestCommand } = await import('./manifest-
|
|
211
|
+
const { manifestCommand } = await import('./manifest-CI4BRWEB.js');
|
|
212
212
|
program.addCommand(manifestCommand);
|
|
213
213
|
return true;
|
|
214
214
|
}
|
|
215
215
|
if (requested === "inject-test-attrs") {
|
|
216
|
-
const { injectTestAttrsCommand } = await import('./inject-test-attrs-
|
|
216
|
+
const { injectTestAttrsCommand } = await import('./inject-test-attrs-F5A346UV.js');
|
|
217
217
|
program.addCommand(injectTestAttrsCommand);
|
|
218
218
|
return true;
|
|
219
219
|
}
|
|
@@ -234,7 +234,7 @@ async function addSingleTestCommand(program, requested) {
|
|
|
234
234
|
return true;
|
|
235
235
|
}
|
|
236
236
|
async function registerFocusedTestCommand(program, requested) {
|
|
237
|
-
const testModule = await import('./test-
|
|
237
|
+
const testModule = await import('./test-QCPN6Z47.js');
|
|
238
238
|
const {
|
|
239
239
|
testCommand,
|
|
240
240
|
testDbCommand,
|
|
@@ -291,10 +291,10 @@ async function registerFocusedTestCommand(program, requested) {
|
|
|
291
291
|
}
|
|
292
292
|
async function registerAllTestCommands(program) {
|
|
293
293
|
const [testModule, testGenModule, injectModule, manifestModule] = await Promise.all([
|
|
294
|
-
import('./test-
|
|
294
|
+
import('./test-QCPN6Z47.js'),
|
|
295
295
|
import('./test-gen-FS4CEY3P.js'),
|
|
296
|
-
import('./inject-test-attrs-
|
|
297
|
-
import('./manifest-
|
|
296
|
+
import('./inject-test-attrs-F5A346UV.js'),
|
|
297
|
+
import('./manifest-CI4BRWEB.js')
|
|
298
298
|
]);
|
|
299
299
|
const { injectTestAttrsCommand } = injectModule;
|
|
300
300
|
const { manifestCommand } = manifestModule;
|
|
@@ -403,11 +403,11 @@ async function registerStatusCheckAndUtilityCommands(program, requested, loadAll
|
|
|
403
403
|
{ linkCommand, unlinkCommand }
|
|
404
404
|
] = await Promise.all([
|
|
405
405
|
import('./status-UTKS63AB.js'),
|
|
406
|
-
import('./check-
|
|
407
|
-
import('./doctor-
|
|
406
|
+
import('./check-4TZHNOZU.js'),
|
|
407
|
+
import('./doctor-GYX73IEW.js'),
|
|
408
408
|
import('./cache-N7WNPEYF.js'),
|
|
409
409
|
import('./telemetry-P56UBLZ2.js'),
|
|
410
|
-
import('./observability-
|
|
410
|
+
import('./observability-WNSCJ5FV.js'),
|
|
411
411
|
import('./link-VSNDVZZD.js')
|
|
412
412
|
]);
|
|
413
413
|
program.addCommand(statusCommand);
|
|
@@ -429,12 +429,12 @@ async function registerFocusedStatusUtilityCommand(program, requested) {
|
|
|
429
429
|
return true;
|
|
430
430
|
}
|
|
431
431
|
if (requested === "check") {
|
|
432
|
-
const { checkCommand } = await import('./check-
|
|
432
|
+
const { checkCommand } = await import('./check-4TZHNOZU.js');
|
|
433
433
|
program.addCommand(checkCommand.name("check"));
|
|
434
434
|
return true;
|
|
435
435
|
}
|
|
436
436
|
if (requested === "doctor") {
|
|
437
|
-
const { doctorCommand } = await import('./doctor-
|
|
437
|
+
const { doctorCommand } = await import('./doctor-GYX73IEW.js');
|
|
438
438
|
program.addCommand(doctorCommand);
|
|
439
439
|
return true;
|
|
440
440
|
}
|
|
@@ -449,7 +449,7 @@ async function registerFocusedStatusUtilityCommand(program, requested) {
|
|
|
449
449
|
return true;
|
|
450
450
|
}
|
|
451
451
|
if (requested === "observability") {
|
|
452
|
-
const { observabilityCommand } = await import('./observability-
|
|
452
|
+
const { observabilityCommand } = await import('./observability-WNSCJ5FV.js');
|
|
453
453
|
program.addCommand(observabilityCommand);
|
|
454
454
|
return true;
|
|
455
455
|
}
|
|
@@ -462,11 +462,11 @@ async function registerFocusedStatusUtilityCommand(program, requested) {
|
|
|
462
462
|
return false;
|
|
463
463
|
}
|
|
464
464
|
async function registerCiCommand(program) {
|
|
465
|
-
const { ciCommand } = await import('./ci-
|
|
465
|
+
const { ciCommand } = await import('./ci-S5KSBECX.js');
|
|
466
466
|
program.addCommand(ciCommand);
|
|
467
467
|
}
|
|
468
468
|
async function registerDbCommand(program) {
|
|
469
|
-
const { dbCommand } = await import('./db-
|
|
469
|
+
const { dbCommand } = await import('./db-D2OLJDYW.js');
|
|
470
470
|
program.addCommand(dbCommand);
|
|
471
471
|
}
|
|
472
472
|
async function registerServicesCommand(program) {
|
|
@@ -474,15 +474,15 @@ async function registerServicesCommand(program) {
|
|
|
474
474
|
program.addCommand(servicesCommand);
|
|
475
475
|
}
|
|
476
476
|
async function registerEnvCommand(program) {
|
|
477
|
-
const { envCommand } = await import('./env-
|
|
477
|
+
const { envCommand } = await import('./env-KYR6Q7WO.js');
|
|
478
478
|
program.addCommand(envCommand);
|
|
479
479
|
}
|
|
480
480
|
async function registerHotfixCommand(program) {
|
|
481
|
-
const { hotfixCommand } = await import('./hotfix-
|
|
481
|
+
const { hotfixCommand } = await import('./hotfix-RJIAPLAM.js');
|
|
482
482
|
program.addCommand(hotfixCommand);
|
|
483
483
|
}
|
|
484
484
|
async function registerSdkCommand(program) {
|
|
485
|
-
const { sdkCommand } = await import('./sdk-
|
|
485
|
+
const { sdkCommand } = await import('./sdk-BTIVPEE5.js');
|
|
486
486
|
program.addCommand(sdkCommand);
|
|
487
487
|
}
|
|
488
488
|
async function registerUiCommand(program) {
|
|
@@ -490,15 +490,15 @@ async function registerUiCommand(program) {
|
|
|
490
490
|
program.addCommand(uiCommand);
|
|
491
491
|
}
|
|
492
492
|
async function registerWatchCommand(program) {
|
|
493
|
-
const { watchCommand } = await import('./watch-
|
|
493
|
+
const { watchCommand } = await import('./watch-RFVCEQLH.js');
|
|
494
494
|
program.addCommand(watchCommand);
|
|
495
495
|
}
|
|
496
496
|
async function registerWorkflowCommand(program) {
|
|
497
|
-
const { workflowCommand } = await import('./workflow-
|
|
497
|
+
const { workflowCommand } = await import('./workflow-UOG6ZZMH.js');
|
|
498
498
|
program.addCommand(workflowCommand);
|
|
499
499
|
}
|
|
500
500
|
async function registerVulnCheckCommand(program) {
|
|
501
|
-
const { vulnCheckCommand } = await import('./vuln-check-
|
|
501
|
+
const { vulnCheckCommand } = await import('./vuln-check-5NUTETPW.js');
|
|
502
502
|
program.addCommand(vulnCheckCommand);
|
|
503
503
|
}
|
|
504
504
|
async function registerTemplateCheckCommand(program) {
|
|
@@ -707,7 +707,7 @@ async function executeProgram(program) {
|
|
|
707
707
|
const isHelpOrVersion = argv.includes("--help") || argv.includes("-h") || argv.includes("--version") || argv.includes("-V");
|
|
708
708
|
if (!isHelpOrVersion && shouldRunRuntimeBootstrap(argv)) {
|
|
709
709
|
const [{ loadEnvFiles }, { enforceLicenseInCI }] = await Promise.all([
|
|
710
|
-
import('./env-files-
|
|
710
|
+
import('./env-files-ONBC47I6.js'),
|
|
711
711
|
import('./license-OB7GVJQ2.js')
|
|
712
712
|
]);
|
|
713
713
|
loadEnvFiles({
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* - Uses getFilteredEnv() instead of ...process.env to prevent secret leakage
|
|
9
9
|
* - Database URLs passed as required secrets only to commands that need them
|
|
10
10
|
*/
|
|
11
|
+
import type { DbApplyPlanner } from '../../db/apply/contract.js';
|
|
11
12
|
export declare function detectStack(repoRoot: string, tmpDir: string, productionDbUrlAdmin: string): Promise<string>;
|
|
12
13
|
/**
|
|
13
14
|
* Initial deployment detection result
|
|
@@ -24,6 +25,13 @@ export interface InitialDeploymentCheck {
|
|
|
24
25
|
/** Whether the check was successful (DB accessible) */
|
|
25
26
|
checkSuccessful: boolean;
|
|
26
27
|
}
|
|
28
|
+
export interface SchemaChangeSummary {
|
|
29
|
+
/** null = unable to determine, false = no diff, true = diff exists */
|
|
30
|
+
hasChanges: boolean | null;
|
|
31
|
+
diffLogPath: string | null;
|
|
32
|
+
targetLabel: string | null;
|
|
33
|
+
diffPaths: string[];
|
|
34
|
+
}
|
|
27
35
|
/**
|
|
28
36
|
* Check if this is an initial deployment by verifying app tables exist in production DB.
|
|
29
37
|
*
|
|
@@ -40,22 +48,7 @@ export interface InitialDeploymentCheck {
|
|
|
40
48
|
* @returns Detection result with details
|
|
41
49
|
*/
|
|
42
50
|
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;
|
|
58
|
-
export declare function showSchemaDiff(repoRoot: string, tmpDir: string): Promise<void>;
|
|
51
|
+
export declare function collectSchemaChangeSummary(repoRoot: string, tmpDir: string): Promise<SchemaChangeSummary>;
|
|
59
52
|
/**
|
|
60
53
|
* Detect risky schema changes via git diff analysis.
|
|
61
54
|
*
|
|
@@ -97,10 +90,12 @@ export interface SchemaApplyResult {
|
|
|
97
90
|
hazards: string[];
|
|
98
91
|
/** Summary of changes (e.g., "2 policies updated, 1 index created") */
|
|
99
92
|
changeSummary: string;
|
|
100
|
-
/** Path to the
|
|
93
|
+
/** Path to the structured apply result artifact */
|
|
101
94
|
logPath: string;
|
|
102
95
|
/** Execution metrics (optional) */
|
|
103
96
|
metrics?: SchemaApplyMetrics;
|
|
97
|
+
/** Planner artifact / reuse telemetry (optional) */
|
|
98
|
+
planner?: DbApplyPlanner;
|
|
104
99
|
}
|
|
105
100
|
export declare function applyProductionSchema(repoRoot: string, tmpDir: string, productionDbUrlAdmin: string, productionDbUrl: string, options?: SchemaApplyOptions & {
|
|
106
101
|
timeoutMs?: number;
|
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
* Used by: ci-prod-apply.ts
|
|
6
6
|
*/
|
|
7
7
|
import type { CiSummary } from '../utils/ci-summary.js';
|
|
8
|
+
interface CiProdApplyFailureMetadata {
|
|
9
|
+
code: string;
|
|
10
|
+
message: string;
|
|
11
|
+
retryable: boolean;
|
|
12
|
+
}
|
|
8
13
|
export declare function requireEnv(name: string): string;
|
|
9
14
|
export declare function resolveRepoKind(): 'monorepo' | 'pj-repo' | 'unknown';
|
|
10
15
|
export declare function createInitialSummary(params: {
|
|
@@ -25,9 +30,11 @@ export interface ProdApplyInputs {
|
|
|
25
30
|
githubRepository: string;
|
|
26
31
|
}
|
|
27
32
|
export declare function resolveProdApplyInputs(): ProdApplyInputs;
|
|
33
|
+
export declare function classifyCiProdApplyError(error: unknown): CiProdApplyFailureMetadata;
|
|
28
34
|
export declare function setSummaryErrorFromUnknown(summary: CiSummary, error: unknown): void;
|
|
29
35
|
export declare function buildCiProdApplyStepSummaryMarkdown(params: {
|
|
30
36
|
summary: CiSummary;
|
|
31
37
|
summaryPath: string;
|
|
32
38
|
}): string;
|
|
39
|
+
export {};
|
|
33
40
|
//# sourceMappingURL=ci-prod-utils.d.ts.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Purpose: Run dry-run against production to preview schema changes
|
|
5
5
|
* Pattern: Fine-grained actor for single step
|
|
6
6
|
*
|
|
7
|
-
* Runs `runa db
|
|
7
|
+
* Runs `runa db preview production --profile compare-only` to preview what SQL would be
|
|
8
8
|
* applied to production. Results are shown in PR comment.
|
|
9
9
|
*
|
|
10
10
|
* Prerequisites:
|
|
@@ -32,6 +32,7 @@ interface StructuredPreviewResult {
|
|
|
32
32
|
hazards: string[];
|
|
33
33
|
hasChanges: boolean;
|
|
34
34
|
checkOnly: boolean;
|
|
35
|
+
previewProfile: 'compare-only' | 'full' | null;
|
|
35
36
|
metrics?: {
|
|
36
37
|
totalMs?: number;
|
|
37
38
|
idempotentMs?: number;
|
|
@@ -40,7 +41,7 @@ interface StructuredPreviewResult {
|
|
|
40
41
|
}
|
|
41
42
|
export declare function tryParseStructuredOutput(stdout: string): StructuredPreviewResult | null;
|
|
42
43
|
/**
|
|
43
|
-
* Detect whether db
|
|
44
|
+
* Detect whether db preview output indicates schema changes.
|
|
44
45
|
*
|
|
45
46
|
* Important:
|
|
46
47
|
* - "No changes were applied (check mode)" is always true in check mode and MUST NOT
|
|
@@ -51,7 +52,7 @@ export declare function detectSchemaChangeState(fullOutput: string): SchemaChang
|
|
|
51
52
|
/**
|
|
52
53
|
* Run production schema preview (dry-run).
|
|
53
54
|
*
|
|
54
|
-
* Uses `runa db
|
|
55
|
+
* Uses `runa db preview production --profile compare-only` to show what SQL would be applied
|
|
55
56
|
* to production without actually applying changes.
|
|
56
57
|
*
|
|
57
58
|
* @param input - Preview parameters
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* - Captures hazards from pg-schema-diff
|
|
26
26
|
* - Reports all changes in PR comment
|
|
27
27
|
*/
|
|
28
|
-
import type { CiMode, SchemaChangeStats, SchemaDriftSnapshot } from '../../types.js';
|
|
28
|
+
import type { CiMode, SchemaChangeStats, SchemaDriftSnapshot, SchemaGitDiff } from '../../types.js';
|
|
29
29
|
export interface SyncSchemaInput {
|
|
30
30
|
repoRoot: string;
|
|
31
31
|
tmpDir: string;
|
|
@@ -39,6 +39,10 @@ export interface SyncSchemaOutput {
|
|
|
39
39
|
error?: string;
|
|
40
40
|
schemaDrift?: SchemaDriftSnapshot;
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Build a schema git diff snapshot from a unified patch diff.
|
|
44
|
+
*/
|
|
45
|
+
export declare function extractSchemaGitDiffSnapshot(diffOutput: string): SchemaGitDiff | null;
|
|
42
46
|
export declare function analyzePostCheckResult(params: {
|
|
43
47
|
exitCode: number;
|
|
44
48
|
output: string;
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Only used in ci-pr-local mode (not ci-local):
|
|
8
8
|
* - Detect DB, E2E, preview capabilities
|
|
9
|
-
* - Detect layer content (machines, tables, API routes, pages)
|
|
10
9
|
*
|
|
11
10
|
* Capabilities detected:
|
|
12
11
|
* - db.postgres, db.schemaApplied, db.rlsEnabled
|
|
@@ -15,33 +14,23 @@
|
|
|
15
14
|
* - e2e.generatedLayer4Present, e2e.generatedLayer4HasUnknown
|
|
16
15
|
* - e2e.previewReachable
|
|
17
16
|
*
|
|
18
|
-
* Layer content detection:
|
|
19
|
-
* - L1: XState machines
|
|
20
|
-
* - L2: Domain tables (SQL)
|
|
21
|
-
* - L3: API routes (Hono)
|
|
22
|
-
* - L4: User-facing pages
|
|
23
17
|
*/
|
|
24
18
|
import { type CiCapabilities, type CiCapability } from '../../../commands/ci-pr-capabilities.js';
|
|
25
|
-
import { type LayerContentResult } from '../../../commands/ci-layer-content.js';
|
|
26
19
|
export interface CapabilitiesInput {
|
|
27
20
|
repoRoot: string;
|
|
28
21
|
tmpDir: string;
|
|
29
22
|
databaseUrlApp: string;
|
|
30
23
|
baseUrl: string | null;
|
|
31
|
-
/** Selected layers for content detection */
|
|
32
|
-
selectedLayers: number[];
|
|
33
24
|
}
|
|
34
25
|
export interface CapabilitiesOutput {
|
|
35
26
|
detected: CiCapabilities;
|
|
36
|
-
/** Layer content detection result */
|
|
37
|
-
layerContent: LayerContentResult;
|
|
38
27
|
error?: string;
|
|
39
28
|
}
|
|
40
29
|
/**
|
|
41
|
-
* Detect CI capabilities
|
|
30
|
+
* Detect CI capabilities.
|
|
42
31
|
*
|
|
43
32
|
* @param input - Detection parameters
|
|
44
|
-
* @returns Detected capabilities
|
|
33
|
+
* @returns Detected capabilities
|
|
45
34
|
*/
|
|
46
35
|
export declare const capabilitiesActor: import("xstate").PromiseActorLogic<CapabilitiesOutput, CapabilitiesInput, import("xstate").EventObject>;
|
|
47
36
|
export interface AssertCapabilitiesInput {
|
|
@@ -5,5 +5,6 @@
|
|
|
5
5
|
* Pattern: Barrel export for clean imports
|
|
6
6
|
*/
|
|
7
7
|
export { type AssertCapabilitiesInput, type AssertCapabilitiesOutput, assertCapabilitiesActor, type CapabilitiesInput, type CapabilitiesOutput, capabilitiesActor, } from './capabilities.js';
|
|
8
|
+
export { type LayerContentInput, type LayerContentOutput, layerContentActor, } from './layer-content.js';
|
|
8
9
|
export { type LayerRunResult, type RunLayersInput, type RunLayersOutput, runLayersActor, } from './run-layers.js';
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type LayerContentResult } from '../../../commands/ci-layer-content.js';
|
|
2
|
+
export interface LayerContentInput {
|
|
3
|
+
repoRoot: string;
|
|
4
|
+
selectedLayers: number[];
|
|
5
|
+
}
|
|
6
|
+
export interface LayerContentOutput {
|
|
7
|
+
layerContent: LayerContentResult;
|
|
8
|
+
error?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const layerContentActor: import("xstate").PromiseActorLogic<LayerContentOutput, LayerContentInput, import("xstate").EventObject>;
|
|
11
|
+
//# sourceMappingURL=layer-content.d.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type InternalCiProfile = 'schema-only';
|
|
2
|
+
export interface InternalCiOverrides {
|
|
3
|
+
profile?: InternalCiProfile;
|
|
4
|
+
layers?: number[];
|
|
5
|
+
}
|
|
6
|
+
export declare function resolveInternalCiOverrides(env?: NodeJS.ProcessEnv): InternalCiOverrides;
|
|
7
|
+
//# sourceMappingURL=ci-pr-internal-profile.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { CiStep } from '../formatters/github-comment.js';
|
|
2
|
+
import type { StepSummary } from '../contract.js';
|
|
3
|
+
export type StepPhase = 'setup' | 'github' | 'db' | 'observability' | 'build' | 'test' | 'finalize';
|
|
4
|
+
export interface StepMetadata {
|
|
5
|
+
order: number;
|
|
6
|
+
title: string;
|
|
7
|
+
phase: StepPhase;
|
|
8
|
+
optional?: boolean;
|
|
9
|
+
parentStep?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const PROGRESS_STATE_TO_STEP: Record<string, CiStep>;
|
|
12
|
+
export declare const PROGRESS_STEP_ORDER: CiStep[];
|
|
13
|
+
export declare const OBSERVABILITY_STEP_IDS: readonly ["postSeedPr.observability.productionPreview", "postSeedPr.observability.collectSchemaStats"];
|
|
14
|
+
export declare const EXECUTION_STEP_IDS: readonly ["postSeedPr.execution.setupRoles", "postSeedPr.execution.staticChecks", "postSeedPr.execution.layerContent", "postSeedPr.execution.buildAndPlaywright", "postSeedPr.execution.appStart", "postSeedPr.execution.capabilities", "postSeedPr.execution.runCoreTests", "postSeedPr.execution.e2ePhase"];
|
|
15
|
+
export declare const BUILD_PREPARATION_SUBSTEP_IDS: {
|
|
16
|
+
readonly build: "postSeedPr.execution.buildAndPlaywright.build";
|
|
17
|
+
readonly manifestGenerate: "postSeedPr.execution.buildAndPlaywright.manifestGenerate";
|
|
18
|
+
readonly playwrightInstall: "postSeedPr.execution.buildAndPlaywright.playwrightInstall";
|
|
19
|
+
};
|
|
20
|
+
export declare const STEP_METADATA: Record<string, StepMetadata>;
|
|
21
|
+
export declare function getStepMetadata(stepId: string): StepMetadata | undefined;
|
|
22
|
+
export declare function getCanonicalStepId(statePath: string): string | null;
|
|
23
|
+
export declare function getStepOrderFromStatePath(statePath: string): number;
|
|
24
|
+
export type InternalStepStatus = StepSummary['status'] | 'running';
|
|
25
|
+
//# sourceMappingURL=ci-step-registry.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { StepSummary } from '../contract.js';
|
|
2
2
|
import type { CiContext } from '../types.js';
|
|
3
|
-
export
|
|
4
|
-
export declare function getStepOrderFromStatePath(statePath: string): number;
|
|
3
|
+
export { getCanonicalStepId, getStepOrderFromStatePath } from './ci-step-registry.js';
|
|
5
4
|
export declare function pickPrimaryStatePath(statePaths: string[], previousStatePath?: string): string | undefined;
|
|
6
5
|
export interface StepTelemetryTracker {
|
|
7
6
|
transition: (statePaths: string[], nowMs?: number) => void;
|
|
@@ -131,6 +131,9 @@ export declare const CiInputSchema: z.ZodObject<{
|
|
|
131
131
|
playwrightWorkers: z.ZodOptional<z.ZodString>;
|
|
132
132
|
skipGithubComment: z.ZodOptional<z.ZodBoolean>;
|
|
133
133
|
layers: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
134
|
+
internalProfile: z.ZodOptional<z.ZodEnum<{
|
|
135
|
+
"schema-only": "schema-only";
|
|
136
|
+
}>>;
|
|
134
137
|
}, z.core.$loose>;
|
|
135
138
|
export type CiInput = z.infer<typeof CiInputSchema>;
|
|
136
139
|
/**
|
|
@@ -22,13 +22,11 @@ import type { CiContext, CiInput, CiMode } from './types.js';
|
|
|
22
22
|
*/
|
|
23
23
|
export declare function isCiLocalMode(context: CiContext): boolean;
|
|
24
24
|
/**
|
|
25
|
-
* Check if running ci-pr-local
|
|
26
|
-
*/
|
|
27
|
-
export declare function isCiPrLocalMode(context: CiContext): boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Check if running ci-pr mode.
|
|
25
|
+
* Check if running ci-pr mode (ci-pr-local).
|
|
30
26
|
*/
|
|
31
27
|
export declare function isCiPrMode(context: CiContext): boolean;
|
|
28
|
+
/** @deprecated Use isCiPrMode instead (identical logic). */
|
|
29
|
+
export declare const isCiPrLocalMode: typeof isCiPrMode;
|
|
32
30
|
/**
|
|
33
31
|
* Resolve the effective CI mode from input and environment.
|
|
34
32
|
*
|
|
@@ -38,11 +36,6 @@ export declare function isCiPrMode(context: CiContext): boolean;
|
|
|
38
36
|
*/
|
|
39
37
|
export declare function resolveMode(params: {
|
|
40
38
|
command: 'local' | 'pr';
|
|
41
|
-
dbMode: 'auto' | 'local';
|
|
42
|
-
hasBranchInputs: boolean;
|
|
43
|
-
allowLocalFallback: boolean;
|
|
44
|
-
isGitHubActions: boolean;
|
|
45
|
-
hasPrContext: boolean;
|
|
46
39
|
}): CiMode;
|
|
47
40
|
/**
|
|
48
41
|
* Check if static checks should be skipped.
|
|
@@ -49,7 +49,7 @@ export declare function hasSchemaGitChanges(context: CiContext): boolean;
|
|
|
49
49
|
* Skip the expensive post-apply check in GitHub Actions PR preview runs.
|
|
50
50
|
*
|
|
51
51
|
* Preview CI always starts from a fresh local Supabase instance on an ephemeral
|
|
52
|
-
* runner, so re-running `db
|
|
52
|
+
* runner, so re-running `db preview` immediately after a successful apply
|
|
53
53
|
* does not add meaningful signal on the critical path.
|
|
54
54
|
*/
|
|
55
55
|
export declare function shouldSkipSchemaPostCheck(context: CiContext): boolean;
|
|
@@ -14,6 +14,10 @@ export declare function createStaticChecksInput(context: CiContext): {
|
|
|
14
14
|
repoRoot: string;
|
|
15
15
|
tmpDir: string;
|
|
16
16
|
};
|
|
17
|
+
export declare function createLayerContentInput(context: CiContext): {
|
|
18
|
+
repoRoot: string;
|
|
19
|
+
selectedLayers: number[];
|
|
20
|
+
};
|
|
17
21
|
export declare function createBuildAndPlaywrightInput(context: CiContext): {
|
|
18
22
|
repoRoot: string;
|
|
19
23
|
tmpDir: string;
|
|
@@ -32,8 +36,7 @@ export declare function createCapabilitiesInput(context: CiContext): {
|
|
|
32
36
|
repoRoot: string;
|
|
33
37
|
tmpDir: string;
|
|
34
38
|
databaseUrlApp: string;
|
|
35
|
-
baseUrl: string;
|
|
36
|
-
selectedLayers: number[];
|
|
39
|
+
baseUrl: string | null;
|
|
37
40
|
};
|
|
38
41
|
export declare function createRunCoreTestsInput(context: CiContext): RunLayersInput;
|
|
39
42
|
export declare function deriveCoreLayerResults(output: RunLayersOutput): Record<number, LayerResult>;
|