@runa-ai/runa-cli 0.7.3 → 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-FWMGC5FP.js → chunk-EXR4J2JT.js} +289 -16
- package/dist/{chunk-AO554K3G.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-CKRLVEIO.js → chunk-WGRVAGSR.js} +16 -11
- package/dist/chunk-YRNQEJQW.js +9043 -0
- package/dist/chunk-ZWDWFMOX.js +1514 -0
- package/dist/{ci-Z4525QW6.js → ci-S5KSBECX.js} +1226 -1207
- package/dist/{cli-SVXOSMW6.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/ci-resolvers.d.ts +1 -2
- 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/setup/pr-common.d.ts +1 -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 +9 -1
- package/dist/commands/ci/machine/guards.d.ts +19 -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 +34 -32
- 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/actors/seed-actors.d.ts +1 -0
- package/dist/commands/db/apply/contract.d.ts +232 -0
- package/dist/commands/db/apply/helpers/fresh-db-handler.d.ts +3 -1
- package/dist/commands/db/apply/helpers/hazard-handler.d.ts +19 -8
- package/dist/commands/db/apply/helpers/index.d.ts +5 -2
- package/dist/commands/db/apply/helpers/no-change-plan.d.ts +2 -0
- 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 +11 -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 +100 -14
- 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 +61 -0
- package/dist/commands/db/utils/plan-size-guard.d.ts +16 -0
- package/dist/commands/db/utils/policy-cross-schema-refs.d.ts +12 -0
- package/dist/commands/db/utils/preflight-checks/duplicate-function-ownership-checks.d.ts +4 -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-MLRKIP7F.js → dev-LGSMDFJN.js} +7 -6
- package/dist/{doctor-ROSWSMLH.js → doctor-GYX73IEW.js} +4 -4
- package/dist/{env-WNHJVLOT.js → env-KYR6Q7WO.js} +15 -10
- package/dist/{env-files-HRNUGZ5O.js → env-files-ONBC47I6.js} +3 -3
- package/dist/{hotfix-Z5EGVSMH.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-D575VXIQ.js → vuln-check-5NUTETPW.js} +1 -1
- package/dist/{vuln-checker-QV6XODTJ.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-4XHZQRRK.js +0 -215
- package/dist/db-S4V4ETDR.js +0 -17556
|
@@ -9,16 +9,16 @@
|
|
|
9
9
|
* 2. [ci-local] setup → dbReset → pullProduction? → syncSchema → applySeeds
|
|
10
10
|
* → productionPreview → collectSchemaStats → installPgTap → runCoreTests → done
|
|
11
11
|
* 3. [ci-pr] setup → initialComment → syncSchema → applySeeds → postSeedPr
|
|
12
|
-
* execution: setupRoles → staticChecks →
|
|
13
|
-
* → capabilities → runCoreTests → e2ePhase → finalize → done
|
|
12
|
+
* execution: setupRoles → staticChecks → layerContent → buildAndPlaywright
|
|
13
|
+
* → appStart → capabilities → runCoreTests → e2ePhase → finalize → done
|
|
14
14
|
* observability: productionPreview ∥ collectSchemaStats
|
|
15
15
|
*
|
|
16
16
|
* State Flow (detailed):
|
|
17
17
|
* idle → setup → initialComment? → dbReset? → pullProduction? → syncSchema → applySeeds
|
|
18
18
|
* → productionPreview → collectSchemaStats → decidePath
|
|
19
19
|
* → [ci-local] → installPgTap → runCoreTests → done
|
|
20
|
-
* → [ci-pr] → setupRoles → staticChecks →
|
|
21
|
-
* → capabilities → runCoreTests → coreTestsComplete
|
|
20
|
+
* → [ci-pr] → setupRoles → staticChecks → layerContent → buildAndPlaywright
|
|
21
|
+
* → appStart → capabilities → runCoreTests → coreTestsComplete
|
|
22
22
|
* → e2ePhase (parallel: intermediateComment || e2eTests)
|
|
23
23
|
* → finalize → done
|
|
24
24
|
*
|
|
@@ -45,21 +45,31 @@
|
|
|
45
45
|
* - failed → expect(exitCode).toBe(1)
|
|
46
46
|
*/
|
|
47
47
|
import { type SnapshotFrom } from 'xstate';
|
|
48
|
+
import { type SetupRolesOutput } from './actors/db/index.js';
|
|
49
|
+
import { type CapabilitiesOutput, type LayerContentOutput, type RunLayersOutput } from './actors/test/index.js';
|
|
48
50
|
import type { CiContext, CiEvent } from './types.js';
|
|
49
51
|
export declare const ciMachine: import("xstate").StateMachine<CiContext, CiEvent, {
|
|
50
|
-
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").StaticChecksOutput, import("./index.js").StaticChecksInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<
|
|
52
|
+
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").StaticChecksOutput, import("./index.js").StaticChecksInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<CapabilitiesOutput, import("./index.js").CapabilitiesInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").AppStartOutput, import("./index.js").AppStartInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").ApplySeedsOutput, import("./index.js").ApplySeedsInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<LayerContentOutput, import("./index.js").LayerContentInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").PlaywrightInstallOutput, import("./index.js").PlaywrightInstallInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").SyncSchemaOutput, import("./index.js").SyncSchemaInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").ProductionPreviewOutput, import("./index.js").ProductionPreviewInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./actors/setup/local.js").LocalSetupOutput, import("./actors/setup/local.js").LocalSetupInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./actors/setup/pr-local.js").PrLocalSetupOutput, import("./actors/setup/pr-local.js").PrLocalSetupInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").ResetDbOutput, import("./index.js").ResetDbInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").PullProductionOutput, import("./index.js").PullProductionInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").CollectSchemaStatsOutput, import("./index.js").CollectSchemaStatsInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<SetupRolesOutput, import("./index.js").SetupRolesInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").InstallPgTapOutput, import("./index.js").InstallPgTapInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").AppBuildOutput, import("./index.js").AppBuildInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").BuildAndPlaywrightOutput, import("./index.js").BuildAndPlaywrightInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<RunLayersOutput, import("./index.js").RunLayersInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./index.js").UpsertCommentOutput, import("./index.js").UpsertCommentInput, import("xstate").EventObject>> | undefined;
|
|
51
53
|
}, {
|
|
52
54
|
src: "staticChecks";
|
|
53
55
|
logic: import("xstate").PromiseActorLogic<import("./index.js").StaticChecksOutput, import("./index.js").StaticChecksInput, import("xstate").EventObject>;
|
|
54
56
|
id: string | undefined;
|
|
55
57
|
} | {
|
|
56
58
|
src: "capabilities";
|
|
57
|
-
logic: import("xstate").PromiseActorLogic<
|
|
59
|
+
logic: import("xstate").PromiseActorLogic<CapabilitiesOutput, import("./index.js").CapabilitiesInput, import("xstate").EventObject>;
|
|
58
60
|
id: string | undefined;
|
|
59
61
|
} | {
|
|
60
62
|
src: "appStart";
|
|
61
63
|
logic: import("xstate").PromiseActorLogic<import("./index.js").AppStartOutput, import("./index.js").AppStartInput, import("xstate").EventObject>;
|
|
62
64
|
id: string | undefined;
|
|
65
|
+
} | {
|
|
66
|
+
src: "applySeeds";
|
|
67
|
+
logic: import("xstate").PromiseActorLogic<import("./index.js").ApplySeedsOutput, import("./index.js").ApplySeedsInput, import("xstate").EventObject>;
|
|
68
|
+
id: string | undefined;
|
|
69
|
+
} | {
|
|
70
|
+
src: "layerContent";
|
|
71
|
+
logic: import("xstate").PromiseActorLogic<LayerContentOutput, import("./index.js").LayerContentInput, import("xstate").EventObject>;
|
|
72
|
+
id: string | undefined;
|
|
63
73
|
} | {
|
|
64
74
|
src: "playwrightInstall";
|
|
65
75
|
logic: import("xstate").PromiseActorLogic<import("./index.js").PlaywrightInstallOutput, import("./index.js").PlaywrightInstallInput, import("xstate").EventObject>;
|
|
@@ -68,10 +78,6 @@ export declare const ciMachine: import("xstate").StateMachine<CiContext, CiEvent
|
|
|
68
78
|
src: "syncSchema";
|
|
69
79
|
logic: import("xstate").PromiseActorLogic<import("./index.js").SyncSchemaOutput, import("./index.js").SyncSchemaInput, import("xstate").EventObject>;
|
|
70
80
|
id: string | undefined;
|
|
71
|
-
} | {
|
|
72
|
-
src: "applySeeds";
|
|
73
|
-
logic: import("xstate").PromiseActorLogic<import("./index.js").ApplySeedsOutput, import("./index.js").ApplySeedsInput, import("xstate").EventObject>;
|
|
74
|
-
id: string | undefined;
|
|
75
81
|
} | {
|
|
76
82
|
src: "productionPreview";
|
|
77
83
|
logic: import("xstate").PromiseActorLogic<import("./index.js").ProductionPreviewOutput, import("./index.js").ProductionPreviewInput, import("xstate").EventObject>;
|
|
@@ -98,7 +104,7 @@ export declare const ciMachine: import("xstate").StateMachine<CiContext, CiEvent
|
|
|
98
104
|
id: string | undefined;
|
|
99
105
|
} | {
|
|
100
106
|
src: "setupRoles";
|
|
101
|
-
logic: import("xstate").PromiseActorLogic<
|
|
107
|
+
logic: import("xstate").PromiseActorLogic<SetupRolesOutput, import("./index.js").SetupRolesInput, import("xstate").EventObject>;
|
|
102
108
|
id: string | undefined;
|
|
103
109
|
} | {
|
|
104
110
|
src: "installPgTap";
|
|
@@ -114,7 +120,7 @@ export declare const ciMachine: import("xstate").StateMachine<CiContext, CiEvent
|
|
|
114
120
|
id: string | undefined;
|
|
115
121
|
} | {
|
|
116
122
|
src: "runLayers";
|
|
117
|
-
logic: import("xstate").PromiseActorLogic<
|
|
123
|
+
logic: import("xstate").PromiseActorLogic<RunLayersOutput, import("./index.js").RunLayersInput, import("xstate").EventObject>;
|
|
118
124
|
id: string | undefined;
|
|
119
125
|
} | {
|
|
120
126
|
src: "upsertComment";
|
|
@@ -159,20 +165,26 @@ export declare const ciMachine: import("xstate").StateMachine<CiContext, CiEvent
|
|
|
159
165
|
} | {
|
|
160
166
|
type: "shouldPostGitHubComment";
|
|
161
167
|
params: unknown;
|
|
168
|
+
} | {
|
|
169
|
+
type: "shouldRunPrExecutionPhase";
|
|
170
|
+
params: unknown;
|
|
171
|
+
} | {
|
|
172
|
+
type: "shouldRunPrObservabilityPhase";
|
|
173
|
+
params: unknown;
|
|
162
174
|
} | {
|
|
163
175
|
type: "hasError";
|
|
164
176
|
params: unknown;
|
|
165
177
|
} | {
|
|
166
178
|
type: "allTestsPassed";
|
|
167
179
|
params: unknown;
|
|
168
|
-
}, never, "done" | "failed" | "staticChecks" | "idle" | "capabilities" | "appStart" | "
|
|
180
|
+
}, never, "done" | "failed" | "staticChecks" | "idle" | "capabilities" | "appStart" | "applySeeds" | "layerContent" | "syncSchema" | "productionPreview" | "pullProduction" | "collectSchemaStats" | "setupRoles" | "installPgTap" | "buildAndPlaywright" | "initialComment" | "dbReset" | "runCoreTests" | "coreTestsFailed" | "coreTestsComplete" | "decidePath" | {
|
|
169
181
|
setup: "local" | "resolving" | "prLocal" | "complete";
|
|
170
182
|
} | {
|
|
171
183
|
finalize: "complete" | "writeSummary" | "postComment";
|
|
172
184
|
} | {
|
|
173
185
|
postSeedPr: {
|
|
174
|
-
observability: "done" | "productionPreview" | "collectSchemaStats";
|
|
175
|
-
execution: "done" | "failed" | "staticChecks" | "capabilities" | "appStart" | "setupRoles" | "buildAndPlaywright" | "runCoreTests" | "coreTestsFailed" | "coreTestsComplete" | {
|
|
186
|
+
observability: "done" | "productionPreview" | "collectSchemaStats" | "gate";
|
|
187
|
+
execution: "done" | "failed" | "staticChecks" | "capabilities" | "appStart" | "layerContent" | "setupRoles" | "buildAndPlaywright" | "gate" | "runCoreTests" | "coreTestsFailed" | "coreTestsComplete" | {
|
|
176
188
|
e2ePhase: {
|
|
177
189
|
intermediateComment: "done" | "checking" | "posting";
|
|
178
190
|
e2eTests: "done" | "running";
|
|
@@ -210,7 +222,7 @@ export declare const ciMachine: import("xstate").StateMachine<CiContext, CiEvent
|
|
|
210
222
|
executionMode?: "local" | "github-actions" | undefined;
|
|
211
223
|
output?: "json" | "human" | undefined;
|
|
212
224
|
config?: string | undefined;
|
|
213
|
-
phase?: "all" | "test" | undefined;
|
|
225
|
+
phase?: "all" | "test" | "blocking" | "observability" | undefined;
|
|
214
226
|
dbMode?: "auto" | "local" | undefined;
|
|
215
227
|
branchName?: string | undefined;
|
|
216
228
|
skipStaticChecks?: boolean | undefined;
|
|
@@ -225,6 +237,7 @@ export declare const ciMachine: import("xstate").StateMachine<CiContext, CiEvent
|
|
|
225
237
|
playwrightWorkers?: string | undefined;
|
|
226
238
|
skipGithubComment?: boolean | undefined;
|
|
227
239
|
layers?: number[] | undefined;
|
|
240
|
+
internalProfile?: "schema-only" | undefined;
|
|
228
241
|
}, {
|
|
229
242
|
mode: "ci-local" | "ci-pr-local";
|
|
230
243
|
status: "success" | "timeout" | "failure" | "cancelled";
|
|
@@ -279,8 +292,10 @@ export declare const ciMachine: import("xstate").StateMachine<CiContext, CiEvent
|
|
|
279
292
|
states: {
|
|
280
293
|
readonly execution: {
|
|
281
294
|
states: {
|
|
295
|
+
readonly gate: {};
|
|
282
296
|
readonly setupRoles: {};
|
|
283
297
|
readonly staticChecks: {};
|
|
298
|
+
readonly layerContent: {};
|
|
284
299
|
readonly buildAndPlaywright: {};
|
|
285
300
|
readonly appStart: {};
|
|
286
301
|
readonly capabilities: {};
|
|
@@ -310,6 +325,7 @@ export declare const ciMachine: import("xstate").StateMachine<CiContext, CiEvent
|
|
|
310
325
|
};
|
|
311
326
|
readonly observability: {
|
|
312
327
|
states: {
|
|
328
|
+
readonly gate: {};
|
|
313
329
|
readonly productionPreview: {};
|
|
314
330
|
readonly collectSchemaStats: {};
|
|
315
331
|
readonly done: {};
|
|
@@ -323,6 +339,7 @@ export declare const ciMachine: import("xstate").StateMachine<CiContext, CiEvent
|
|
|
323
339
|
readonly installPgTap: {};
|
|
324
340
|
readonly setupRoles: {};
|
|
325
341
|
readonly staticChecks: {};
|
|
342
|
+
readonly layerContent: {};
|
|
326
343
|
readonly buildAndPlaywright: {};
|
|
327
344
|
readonly appStart: {};
|
|
328
345
|
readonly capabilities: {};
|
|
@@ -359,20 +376,5 @@ export declare const ciMachine: import("xstate").StateMachine<CiContext, CiEvent
|
|
|
359
376
|
}>;
|
|
360
377
|
export type CiMachine = typeof ciMachine;
|
|
361
378
|
export type CiSnapshot = SnapshotFrom<typeof ciMachine>;
|
|
362
|
-
|
|
363
|
-
* Get current state name from snapshot.
|
|
364
|
-
*/
|
|
365
|
-
export declare function getStateName(snapshot: CiSnapshot): string;
|
|
366
|
-
/**
|
|
367
|
-
* Check if machine is in a final state.
|
|
368
|
-
*/
|
|
369
|
-
export declare function isComplete(snapshot: CiSnapshot): boolean;
|
|
370
|
-
/**
|
|
371
|
-
* Get error message from snapshot.
|
|
372
|
-
*/
|
|
373
|
-
export declare function getError(snapshot: CiSnapshot): string | null;
|
|
374
|
-
/**
|
|
375
|
-
* Get exit code from snapshot.
|
|
376
|
-
*/
|
|
377
|
-
export declare function getExitCode(snapshot: CiSnapshot): 0 | 1 | 2;
|
|
379
|
+
export { getError, getExitCode, getStateName, isComplete } from './selectors.js';
|
|
378
380
|
//# sourceMappingURL=machine.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CiSnapshot } from './machine.js';
|
|
2
|
+
export declare function getStateName(snapshot: CiSnapshot): string;
|
|
3
|
+
export declare function isComplete(snapshot: CiSnapshot): boolean;
|
|
4
|
+
export declare function getError(snapshot: CiSnapshot): string | null;
|
|
5
|
+
export declare function getExitCode(snapshot: CiSnapshot): 0 | 1 | 2;
|
|
6
|
+
//# sourceMappingURL=selectors.d.ts.map
|
|
@@ -107,13 +107,15 @@ export interface HazardDetail {
|
|
|
107
107
|
severity: 'critical' | 'warning' | 'info';
|
|
108
108
|
}
|
|
109
109
|
/**
|
|
110
|
-
* Production schema preview (dry-run result from `runa db
|
|
110
|
+
* Production schema preview (dry-run result from `runa db preview production`).
|
|
111
111
|
*
|
|
112
112
|
* Used for PR comments to show what SQL will be applied to production.
|
|
113
113
|
*/
|
|
114
114
|
export interface ProductionPreview {
|
|
115
115
|
/** Whether the dry-run was executed */
|
|
116
116
|
executed: boolean;
|
|
117
|
+
/** Preview profile used to generate this result */
|
|
118
|
+
profile?: 'compare-only' | 'full' | null;
|
|
117
119
|
/** SQL that would be applied to production */
|
|
118
120
|
planSql: string | null;
|
|
119
121
|
/** Hazards detected by pg-schema-diff (simple string format) */
|
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* AI HINT: CI logging helpers (human + AI readable)
|
|
3
3
|
*
|
|
4
|
+
* Purpose: Structured logging for CI operations
|
|
5
|
+
* Pattern: All output goes to stderr (stdout reserved for JSON contract mode)
|
|
6
|
+
*
|
|
4
7
|
* Keep sections consistent to make logs scannable.
|
|
5
8
|
*/
|
|
9
|
+
export interface CILogger {
|
|
10
|
+
debug(message: string): void;
|
|
11
|
+
info(message: string): void;
|
|
12
|
+
warn(message: string): void;
|
|
13
|
+
error(message: string): void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Create a CI-specific logger that writes to stderr.
|
|
17
|
+
* Prefixes all messages with [prefix] for easy filtering.
|
|
18
|
+
*
|
|
19
|
+
* Debug messages are only emitted when RUNA_DEBUG=true.
|
|
20
|
+
*/
|
|
21
|
+
export declare function createCILogger(prefix: string): CILogger;
|
|
6
22
|
export declare function logSection(title: string): void;
|
|
7
23
|
export declare function logKeyValueTable(params: {
|
|
8
24
|
title: string;
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* Security (Issue #458):
|
|
13
13
|
* - Uses getSafeEnv() to avoid passing secrets to child processes
|
|
14
14
|
*/
|
|
15
|
+
import { type CILogger } from './ci-logging.js';
|
|
15
16
|
export interface QueryScalarParams {
|
|
16
17
|
repoRoot: string;
|
|
17
18
|
tmpDir: string;
|
|
@@ -41,7 +42,7 @@ export interface VerifyRlsAlignmentParams {
|
|
|
41
42
|
*
|
|
42
43
|
* @param params - Verification parameters
|
|
43
44
|
*/
|
|
44
|
-
export declare function verifyDbRlsRoleAlignment(params: VerifyRlsAlignmentParams): Promise<void>;
|
|
45
|
+
export declare function verifyDbRlsRoleAlignment(params: VerifyRlsAlignmentParams, logger?: CILogger): Promise<void>;
|
|
45
46
|
export interface VerifyServiceTestParams {
|
|
46
47
|
repoRoot: string;
|
|
47
48
|
tmpDir: string;
|
|
@@ -59,7 +60,7 @@ export interface VerifyServiceTestParams {
|
|
|
59
60
|
*
|
|
60
61
|
* @param params - Verification parameters
|
|
61
62
|
*/
|
|
62
|
-
export declare function verifyServiceTestPrerequisites(params: VerifyServiceTestParams): Promise<void>;
|
|
63
|
+
export declare function verifyServiceTestPrerequisites(params: VerifyServiceTestParams, logger?: CILogger): Promise<void>;
|
|
63
64
|
export interface VerifyPgTapAccessParams {
|
|
64
65
|
repoRoot: string;
|
|
65
66
|
tmpDir: string;
|
|
@@ -15,6 +15,7 @@ export type { PgSchemaDiffResult } from '../helpers/fresh-db-handler.js';
|
|
|
15
15
|
export declare const applyPgSchemaDiff: import("xstate").PromiseActorLogic<PgSchemaDiffResult, {
|
|
16
16
|
input: DbApplyInput;
|
|
17
17
|
targetDir: string;
|
|
18
|
+
preIdempotentTargetFingerprint?: string | null;
|
|
18
19
|
}, import("xstate").EventObject>;
|
|
19
20
|
/**
|
|
20
21
|
* Validate that expected partitions (from idempotent/*.sql) exist in the database.
|
|
@@ -10,6 +10,26 @@
|
|
|
10
10
|
* - Same logic for all environments (local, Branch DB, production)
|
|
11
11
|
*/
|
|
12
12
|
import { z } from 'zod';
|
|
13
|
+
export declare const DbPreviewProfileSchema: z.ZodEnum<{
|
|
14
|
+
full: "full";
|
|
15
|
+
"compare-only": "compare-only";
|
|
16
|
+
}>;
|
|
17
|
+
export type DbPreviewProfile = z.infer<typeof DbPreviewProfileSchema>;
|
|
18
|
+
export declare const DbApplyPlanSourceSchema: z.ZodEnum<{
|
|
19
|
+
inline: "inline";
|
|
20
|
+
artifact: "artifact";
|
|
21
|
+
}>;
|
|
22
|
+
export type DbApplyPlanSource = z.infer<typeof DbApplyPlanSourceSchema>;
|
|
23
|
+
export declare const DbApplyPlannerReuseReasonSchema: z.ZodEnum<{
|
|
24
|
+
artifact_missing: "artifact_missing";
|
|
25
|
+
artifact_invalid: "artifact_invalid";
|
|
26
|
+
profile_ineligible: "profile_ineligible";
|
|
27
|
+
source_fingerprint_mismatch: "source_fingerprint_mismatch";
|
|
28
|
+
target_fingerprint_unavailable: "target_fingerprint_unavailable";
|
|
29
|
+
target_fingerprint_mismatch: "target_fingerprint_mismatch";
|
|
30
|
+
tool_version_mismatch: "tool_version_mismatch";
|
|
31
|
+
}>;
|
|
32
|
+
export type DbApplyPlannerReuseReason = z.infer<typeof DbApplyPlannerReuseReasonSchema>;
|
|
13
33
|
export declare const DbApplyInputSchema: z.ZodObject<{
|
|
14
34
|
env: z.ZodDefault<z.ZodEnum<{
|
|
15
35
|
local: "local";
|
|
@@ -28,6 +48,8 @@ export declare const DbApplyInputSchema: z.ZodObject<{
|
|
|
28
48
|
compareOnly: z.ZodDefault<z.ZodBoolean>;
|
|
29
49
|
maxLockWaitMs: z.ZodDefault<z.ZodNumber>;
|
|
30
50
|
freshDbCheckSql: z.ZodOptional<z.ZodString>;
|
|
51
|
+
plannerArtifactPath: z.ZodOptional<z.ZodString>;
|
|
52
|
+
plannerArtifactRequired: z.ZodDefault<z.ZodBoolean>;
|
|
31
53
|
}, z.core.$strict>;
|
|
32
54
|
export type DbApplyInput = z.infer<typeof DbApplyInputSchema>;
|
|
33
55
|
/**
|
|
@@ -39,8 +61,44 @@ export declare const DbApplyMetricsSchema: z.ZodObject<{
|
|
|
39
61
|
applyMs: z.ZodOptional<z.ZodNumber>;
|
|
40
62
|
seedMs: z.ZodOptional<z.ZodNumber>;
|
|
41
63
|
retryAttempts: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
retryWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
42
65
|
}, z.core.$strip>;
|
|
43
66
|
export type DbApplyMetrics = z.infer<typeof DbApplyMetricsSchema>;
|
|
67
|
+
export declare const DbApplyPlanSummarySchema: z.ZodObject<{
|
|
68
|
+
rawStatements: z.ZodNumber;
|
|
69
|
+
effectiveStatements: z.ZodNumber;
|
|
70
|
+
noiseStatements: z.ZodNumber;
|
|
71
|
+
categories: z.ZodObject<{
|
|
72
|
+
idempotentDrop: z.ZodNumber;
|
|
73
|
+
idempotentAuthz: z.ZodNumber;
|
|
74
|
+
idempotentRls: z.ZodNumber;
|
|
75
|
+
suppressedFunction: z.ZodNumber;
|
|
76
|
+
}, z.core.$strict>;
|
|
77
|
+
}, z.core.$strict>;
|
|
78
|
+
export type DbApplyPlanSummary = z.infer<typeof DbApplyPlanSummarySchema>;
|
|
79
|
+
export declare const DbApplyPlannerSchema: z.ZodObject<{
|
|
80
|
+
source: z.ZodEnum<{
|
|
81
|
+
inline: "inline";
|
|
82
|
+
artifact: "artifact";
|
|
83
|
+
}>;
|
|
84
|
+
path: z.ZodOptional<z.ZodString>;
|
|
85
|
+
reuseAttempted: z.ZodOptional<z.ZodBoolean>;
|
|
86
|
+
reuseReason: z.ZodOptional<z.ZodEnum<{
|
|
87
|
+
artifact_missing: "artifact_missing";
|
|
88
|
+
artifact_invalid: "artifact_invalid";
|
|
89
|
+
profile_ineligible: "profile_ineligible";
|
|
90
|
+
source_fingerprint_mismatch: "source_fingerprint_mismatch";
|
|
91
|
+
target_fingerprint_unavailable: "target_fingerprint_unavailable";
|
|
92
|
+
target_fingerprint_mismatch: "target_fingerprint_mismatch";
|
|
93
|
+
tool_version_mismatch: "tool_version_mismatch";
|
|
94
|
+
}>>;
|
|
95
|
+
reuseMessage: z.ZodOptional<z.ZodString>;
|
|
96
|
+
sourceFingerprint: z.ZodOptional<z.ZodString>;
|
|
97
|
+
targetFingerprint: z.ZodOptional<z.ZodString>;
|
|
98
|
+
targetFingerprintMatched: z.ZodOptional<z.ZodBoolean>;
|
|
99
|
+
hasChanges: z.ZodOptional<z.ZodBoolean>;
|
|
100
|
+
}, z.core.$strict>;
|
|
101
|
+
export type DbApplyPlanner = z.infer<typeof DbApplyPlannerSchema>;
|
|
44
102
|
export declare const DbApplyOutputSchema: z.ZodObject<{
|
|
45
103
|
success: z.ZodBoolean;
|
|
46
104
|
idempotentSchemasApplied: z.ZodNumber;
|
|
@@ -52,7 +110,22 @@ export declare const DbApplyOutputSchema: z.ZodObject<{
|
|
|
52
110
|
error: z.ZodOptional<z.ZodString>;
|
|
53
111
|
planSql: z.ZodOptional<z.ZodString>;
|
|
54
112
|
filteredPlanSql: z.ZodOptional<z.ZodString>;
|
|
113
|
+
planSummary: z.ZodOptional<z.ZodObject<{
|
|
114
|
+
rawStatements: z.ZodNumber;
|
|
115
|
+
effectiveStatements: z.ZodNumber;
|
|
116
|
+
noiseStatements: z.ZodNumber;
|
|
117
|
+
categories: z.ZodObject<{
|
|
118
|
+
idempotentDrop: z.ZodNumber;
|
|
119
|
+
idempotentAuthz: z.ZodNumber;
|
|
120
|
+
idempotentRls: z.ZodNumber;
|
|
121
|
+
suppressedFunction: z.ZodNumber;
|
|
122
|
+
}, z.core.$strict>;
|
|
123
|
+
}, z.core.$strict>>;
|
|
55
124
|
checkOnly: z.ZodOptional<z.ZodBoolean>;
|
|
125
|
+
previewProfile: z.ZodOptional<z.ZodEnum<{
|
|
126
|
+
full: "full";
|
|
127
|
+
"compare-only": "compare-only";
|
|
128
|
+
}>>;
|
|
56
129
|
dataViolations: z.ZodOptional<z.ZodNumber>;
|
|
57
130
|
ssotWarning: z.ZodOptional<z.ZodString>;
|
|
58
131
|
partitionWarnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -68,7 +141,30 @@ export declare const DbApplyOutputSchema: z.ZodObject<{
|
|
|
68
141
|
applyMs: z.ZodOptional<z.ZodNumber>;
|
|
69
142
|
seedMs: z.ZodOptional<z.ZodNumber>;
|
|
70
143
|
retryAttempts: z.ZodOptional<z.ZodNumber>;
|
|
144
|
+
retryWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
71
145
|
}, z.core.$strip>>;
|
|
146
|
+
planner: z.ZodOptional<z.ZodObject<{
|
|
147
|
+
source: z.ZodEnum<{
|
|
148
|
+
inline: "inline";
|
|
149
|
+
artifact: "artifact";
|
|
150
|
+
}>;
|
|
151
|
+
path: z.ZodOptional<z.ZodString>;
|
|
152
|
+
reuseAttempted: z.ZodOptional<z.ZodBoolean>;
|
|
153
|
+
reuseReason: z.ZodOptional<z.ZodEnum<{
|
|
154
|
+
artifact_missing: "artifact_missing";
|
|
155
|
+
artifact_invalid: "artifact_invalid";
|
|
156
|
+
profile_ineligible: "profile_ineligible";
|
|
157
|
+
source_fingerprint_mismatch: "source_fingerprint_mismatch";
|
|
158
|
+
target_fingerprint_unavailable: "target_fingerprint_unavailable";
|
|
159
|
+
target_fingerprint_mismatch: "target_fingerprint_mismatch";
|
|
160
|
+
tool_version_mismatch: "tool_version_mismatch";
|
|
161
|
+
}>>;
|
|
162
|
+
reuseMessage: z.ZodOptional<z.ZodString>;
|
|
163
|
+
sourceFingerprint: z.ZodOptional<z.ZodString>;
|
|
164
|
+
targetFingerprint: z.ZodOptional<z.ZodString>;
|
|
165
|
+
targetFingerprintMatched: z.ZodOptional<z.ZodBoolean>;
|
|
166
|
+
hasChanges: z.ZodOptional<z.ZodBoolean>;
|
|
167
|
+
}, z.core.$strict>>;
|
|
72
168
|
outcome: z.ZodObject<{
|
|
73
169
|
command: z.ZodString;
|
|
74
170
|
exitMode: z.ZodEnum<{
|
|
@@ -142,4 +238,140 @@ export declare const DbApplyOutputSchema: z.ZodObject<{
|
|
|
142
238
|
}, z.core.$strict>;
|
|
143
239
|
}, z.core.$strict>;
|
|
144
240
|
export type DbApplyOutput = z.infer<typeof DbApplyOutputSchema>;
|
|
241
|
+
export declare const DbPlanOutputSchema: z.ZodObject<{
|
|
242
|
+
success: z.ZodBoolean;
|
|
243
|
+
idempotentSchemasApplied: z.ZodNumber;
|
|
244
|
+
idempotentSchemasSkipped: z.ZodOptional<z.ZodNumber>;
|
|
245
|
+
rolePasswordsSet: z.ZodOptional<z.ZodNumber>;
|
|
246
|
+
schemaChangesApplied: z.ZodBoolean;
|
|
247
|
+
hazards: z.ZodArray<z.ZodString>;
|
|
248
|
+
seedsApplied: z.ZodBoolean;
|
|
249
|
+
error: z.ZodOptional<z.ZodString>;
|
|
250
|
+
planSql: z.ZodOptional<z.ZodString>;
|
|
251
|
+
filteredPlanSql: z.ZodOptional<z.ZodString>;
|
|
252
|
+
planSummary: z.ZodOptional<z.ZodObject<{
|
|
253
|
+
rawStatements: z.ZodNumber;
|
|
254
|
+
effectiveStatements: z.ZodNumber;
|
|
255
|
+
noiseStatements: z.ZodNumber;
|
|
256
|
+
categories: z.ZodObject<{
|
|
257
|
+
idempotentDrop: z.ZodNumber;
|
|
258
|
+
idempotentAuthz: z.ZodNumber;
|
|
259
|
+
idempotentRls: z.ZodNumber;
|
|
260
|
+
suppressedFunction: z.ZodNumber;
|
|
261
|
+
}, z.core.$strict>;
|
|
262
|
+
}, z.core.$strict>>;
|
|
263
|
+
dataViolations: z.ZodOptional<z.ZodNumber>;
|
|
264
|
+
ssotWarning: z.ZodOptional<z.ZodString>;
|
|
265
|
+
partitionWarnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
266
|
+
idempotentFiles: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
267
|
+
idempotentRisks: z.ZodOptional<z.ZodObject<{
|
|
268
|
+
high: z.ZodNumber;
|
|
269
|
+
medium: z.ZodNumber;
|
|
270
|
+
low: z.ZodNumber;
|
|
271
|
+
}, z.core.$strip>>;
|
|
272
|
+
metrics: z.ZodOptional<z.ZodObject<{
|
|
273
|
+
totalMs: z.ZodNumber;
|
|
274
|
+
idempotentMs: z.ZodOptional<z.ZodNumber>;
|
|
275
|
+
applyMs: z.ZodOptional<z.ZodNumber>;
|
|
276
|
+
seedMs: z.ZodOptional<z.ZodNumber>;
|
|
277
|
+
retryAttempts: z.ZodOptional<z.ZodNumber>;
|
|
278
|
+
retryWaitMs: z.ZodOptional<z.ZodNumber>;
|
|
279
|
+
}, z.core.$strip>>;
|
|
280
|
+
outcome: z.ZodObject<{
|
|
281
|
+
command: z.ZodString;
|
|
282
|
+
exitMode: z.ZodEnum<{
|
|
283
|
+
success: "success";
|
|
284
|
+
success_with_warnings: "success_with_warnings";
|
|
285
|
+
failed: "failed";
|
|
286
|
+
timeout: "timeout";
|
|
287
|
+
cancelled: "cancelled";
|
|
288
|
+
}>;
|
|
289
|
+
startedAt: z.ZodString;
|
|
290
|
+
endedAt: z.ZodString;
|
|
291
|
+
durationMs: z.ZodNumber;
|
|
292
|
+
phases: z.ZodArray<z.ZodObject<{
|
|
293
|
+
id: z.ZodString;
|
|
294
|
+
label: z.ZodString;
|
|
295
|
+
status: z.ZodEnum<{
|
|
296
|
+
failed: "failed";
|
|
297
|
+
timeout: "timeout";
|
|
298
|
+
cancelled: "cancelled";
|
|
299
|
+
pending: "pending";
|
|
300
|
+
running: "running";
|
|
301
|
+
passed: "passed";
|
|
302
|
+
warning: "warning";
|
|
303
|
+
skipped: "skipped";
|
|
304
|
+
}>;
|
|
305
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
306
|
+
endedAt: z.ZodOptional<z.ZodString>;
|
|
307
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
308
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
309
|
+
warningCount: z.ZodOptional<z.ZodNumber>;
|
|
310
|
+
error: z.ZodOptional<z.ZodObject<{
|
|
311
|
+
code: z.ZodString;
|
|
312
|
+
message: z.ZodString;
|
|
313
|
+
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
314
|
+
retryable: z.ZodBoolean;
|
|
315
|
+
retryAfterMs: z.ZodOptional<z.ZodNumber>;
|
|
316
|
+
phase: z.ZodOptional<z.ZodString>;
|
|
317
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
318
|
+
}, z.core.$strict>>;
|
|
319
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
320
|
+
code: z.ZodString;
|
|
321
|
+
message: z.ZodString;
|
|
322
|
+
phase: z.ZodString;
|
|
323
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
324
|
+
}, z.core.$strict>>>;
|
|
325
|
+
metrics: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
326
|
+
}, z.core.$strict>>;
|
|
327
|
+
warnings: z.ZodArray<z.ZodObject<{
|
|
328
|
+
code: z.ZodString;
|
|
329
|
+
message: z.ZodString;
|
|
330
|
+
phase: z.ZodString;
|
|
331
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
332
|
+
}, z.core.$strict>>;
|
|
333
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
334
|
+
code: z.ZodString;
|
|
335
|
+
message: z.ZodString;
|
|
336
|
+
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
337
|
+
retryable: z.ZodBoolean;
|
|
338
|
+
retryAfterMs: z.ZodOptional<z.ZodNumber>;
|
|
339
|
+
phase: z.ZodOptional<z.ZodString>;
|
|
340
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
341
|
+
}, z.core.$strict>>;
|
|
342
|
+
summary: z.ZodObject<{
|
|
343
|
+
passed: z.ZodNumber;
|
|
344
|
+
warnings: z.ZodNumber;
|
|
345
|
+
failed: z.ZodNumber;
|
|
346
|
+
skipped: z.ZodNumber;
|
|
347
|
+
timedOut: z.ZodNumber;
|
|
348
|
+
}, z.core.$strict>;
|
|
349
|
+
nextActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
350
|
+
}, z.core.$strict>;
|
|
351
|
+
checkOnly: z.ZodLiteral<true>;
|
|
352
|
+
previewProfile: z.ZodLiteral<"full">;
|
|
353
|
+
planner: z.ZodObject<{
|
|
354
|
+
source: z.ZodEnum<{
|
|
355
|
+
inline: "inline";
|
|
356
|
+
artifact: "artifact";
|
|
357
|
+
}>;
|
|
358
|
+
reuseAttempted: z.ZodOptional<z.ZodBoolean>;
|
|
359
|
+
reuseReason: z.ZodOptional<z.ZodEnum<{
|
|
360
|
+
artifact_missing: "artifact_missing";
|
|
361
|
+
artifact_invalid: "artifact_invalid";
|
|
362
|
+
profile_ineligible: "profile_ineligible";
|
|
363
|
+
source_fingerprint_mismatch: "source_fingerprint_mismatch";
|
|
364
|
+
target_fingerprint_unavailable: "target_fingerprint_unavailable";
|
|
365
|
+
target_fingerprint_mismatch: "target_fingerprint_mismatch";
|
|
366
|
+
tool_version_mismatch: "tool_version_mismatch";
|
|
367
|
+
}>>;
|
|
368
|
+
reuseMessage: z.ZodOptional<z.ZodString>;
|
|
369
|
+
targetFingerprintMatched: z.ZodOptional<z.ZodBoolean>;
|
|
370
|
+
hasChanges: z.ZodOptional<z.ZodBoolean>;
|
|
371
|
+
path: z.ZodString;
|
|
372
|
+
sourceFingerprint: z.ZodString;
|
|
373
|
+
targetFingerprint: z.ZodString;
|
|
374
|
+
}, z.core.$strict>;
|
|
375
|
+
}, z.core.$strict>;
|
|
376
|
+
export type DbPlanOutput = z.infer<typeof DbPlanOutputSchema>;
|
|
145
377
|
//# sourceMappingURL=contract.d.ts.map
|
|
@@ -10,12 +10,14 @@
|
|
|
10
10
|
*
|
|
11
11
|
* Safety: Fail-safe — if all detection fails, assumes existing DB (uses pg-schema-diff).
|
|
12
12
|
*/
|
|
13
|
-
import type { DbApplyInput } from '../contract.js';
|
|
13
|
+
import type { DbApplyInput, DbApplyPlanSummary, DbApplyPlanner } from '../contract.js';
|
|
14
14
|
export interface PgSchemaDiffResult {
|
|
15
15
|
sql: string;
|
|
16
16
|
hazards: string[];
|
|
17
17
|
applied: boolean;
|
|
18
18
|
filteredPlanSql?: string;
|
|
19
|
+
planSummary?: DbApplyPlanSummary;
|
|
20
|
+
planner?: DbApplyPlanner;
|
|
19
21
|
retryAttempts?: number;
|
|
20
22
|
retryWaitMs?: number;
|
|
21
23
|
dataViolations?: number;
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* - INDEX_BUILD / INDEX_DROPPED: Index operations
|
|
13
13
|
*/
|
|
14
14
|
import type { DbApplyInput } from '../contract.js';
|
|
15
|
+
import type { DbApplyPlanSummary } from '../contract.js';
|
|
15
16
|
import { type ParsedHazard } from './idempotent-object-registry.js';
|
|
16
17
|
/**
|
|
17
18
|
* Parse hazards from pg-schema-diff output with context.
|
|
@@ -48,13 +49,23 @@ export declare function handleHazardsWithContext(planOutput: string, input: DbAp
|
|
|
48
49
|
hasDeletesData: boolean;
|
|
49
50
|
hasAuthzUpdate: boolean;
|
|
50
51
|
};
|
|
51
|
-
export declare function displayCheckModeResults(planOutput: string,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
export declare function displayCheckModeResults(planOutput: string, options?: {
|
|
53
|
+
verbose?: boolean;
|
|
54
|
+
filterInfo?: {
|
|
55
|
+
filteredPlanSql: string;
|
|
56
|
+
removedDropStatements: {
|
|
57
|
+
sql: string;
|
|
58
|
+
}[];
|
|
59
|
+
removedAuthzStatements: {
|
|
60
|
+
sql: string;
|
|
61
|
+
}[];
|
|
62
|
+
removedRlsStatements: {
|
|
63
|
+
sql: string;
|
|
64
|
+
}[];
|
|
65
|
+
suppressedFunctionStatements?: {
|
|
66
|
+
sql: string;
|
|
67
|
+
}[];
|
|
68
|
+
planSummary?: DbApplyPlanSummary;
|
|
69
|
+
};
|
|
59
70
|
}): void;
|
|
60
71
|
//# sourceMappingURL=hazard-handler.d.ts.map
|
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export { acquireAdvisoryLock, MIGRATION_LOCK_ID, releaseAdvisoryLock, } from './advisory-lock.js';
|
|
7
7
|
export type { PlanHazard, PlanStatement, ValidatedPlan } from './plan-validator.js';
|
|
8
|
-
export { ALLOWED_DDL_PREFIXES, BLOCKED_SQL_PATTERNS, parsePlanOutput, validatePlanForExecution, validateStatementTypes, } from './plan-validator.js';
|
|
8
|
+
export { ALLOWED_DDL_PREFIXES, BLOCKED_SQL_PATTERNS, parsePlanOutput, reorderRawSqlDependencies, validateDependencyOrder, validateDependencyOrderFromRawSql, validatePlanForExecution, validateStatementTypes, } from './plan-validator.js';
|
|
9
|
+
export { isNoChangePlanOutput } from './no-change-plan.js';
|
|
9
10
|
export type { FilterResult } from './plan-drop-protection.js';
|
|
10
11
|
export { filterIdempotentProtectedStatements, isDropStatementForProtectedObject, } from './plan-drop-protection.js';
|
|
11
12
|
export type { CheckModeFilterResult } from './plan-check-filter.js';
|
|
12
|
-
export { filterCheckModePlanStatements, isIdempotentManagedAuthzStatement, resetManagedAuthzCache, stripLeadingSessionStatements, } from './plan-check-filter.js';
|
|
13
|
+
export { buildCheckModePlanSummary, filterCheckModePlanStatements, isIdempotentManagedAuthzStatement, isIdempotentManagedRlsStatement, resetManagedAuthzCache, stripLeadingSessionStatements, } from './plan-check-filter.js';
|
|
13
14
|
export type { IdempotentProtectedObjects, ParsedHazard } from './idempotent-object-registry.js';
|
|
14
15
|
export { filterFalsePositiveHazards, getIdempotentProtectedObjects, getIdempotentProtectedTables, getIdempotentRoles, isIdempotentRoleHazard, resetIdempotentRolesCache, } from './idempotent-object-registry.js';
|
|
15
16
|
export { buildAllowedHazards, displayCheckModeResults, displayHazardsWithContext, handleHazardsWithContext, handleProductionAuthzProtection, handleProductionDataProtection, parseHazardsWithContext, } from './hazard-handler.js';
|
|
@@ -34,5 +35,7 @@ export type { PgSchemaDiffResult } from './fresh-db-handler.js';
|
|
|
34
35
|
export { handleFreshDbCase, hasAppTables } from './fresh-db-handler.js';
|
|
35
36
|
export { checkPasswordSecurity, parseDbCredentials, setRolePasswords, } from './rbac-password-manager.js';
|
|
36
37
|
export { backupIdempotentTables, getTableRowEstimates, verifyDataIntegrity, } from './data-integrity-verifier.js';
|
|
38
|
+
export type { DbPlanArtifact } from './planner-artifact.js';
|
|
39
|
+
export { buildTargetFingerprint, DbPlanArtifactSchema, detectPlannerSchemas, getDbPlanArtifactPath, persistDbPlanArtifact, tryReuseDbPlanArtifact, } from './planner-artifact.js';
|
|
37
40
|
export { getTransactionStrategy, hasTransactionIncompatibleContent, hasTransactionIncompatibleStatements, wrapInTransaction, } from './idempotent-transaction.js';
|
|
38
41
|
//# sourceMappingURL=index.d.ts.map
|