@runa-ai/runa-cli 0.7.0 → 0.7.2
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-V66FAQXB.js → build-HQMSVN6N.js} +3 -3
- package/dist/{check-LOMVIRHX.js → check-PCSQPYDM.js} +2 -2
- package/dist/{chunk-QM53IQHM.js → chunk-2QX7T24B.js} +1 -1
- package/dist/{chunk-XDCHRVE3.js → chunk-4XHZQRRK.js} +2 -2
- package/dist/{chunk-7B5C6U2K.js → chunk-A6A7JIRD.js} +35 -2
- package/dist/{chunk-Z4Z5DNW4.js → chunk-B3POLMII.js} +12 -0
- package/dist/chunk-CKRLVEIO.js +119 -0
- package/dist/{chunk-HD74F6W2.js → chunk-FWMGC5FP.js} +1 -0
- package/dist/{chunk-H2AHNI75.js → chunk-LCK2LGVR.js} +1 -1
- package/dist/{chunk-FHG3ILE4.js → chunk-OBYZDT2E.js} +38 -8
- package/dist/{chunk-AIP6MR42.js → chunk-PMXE5XOJ.js} +1 -1
- package/dist/{chunk-VM3IWOT5.js → chunk-QSEF4T3Y.js} +13 -5
- package/dist/{chunk-NPSRD26F.js → chunk-UHDAYPHH.js} +1 -1
- package/dist/{chunk-2APB25TT.js → chunk-VSH3IXDQ.js} +7 -3
- package/dist/{chunk-644FVGIQ.js → chunk-WPMR7RQ4.js} +9 -2
- package/dist/chunk-XVNDDHAF.js +65 -0
- package/dist/{risk-detector-plpgsql-HWKS4OLR.js → chunk-Y5ANTCKE.js} +3 -412
- package/dist/{chunk-SGJG3BKD.js → chunk-Z7A4BEWF.js} +1 -1
- package/dist/{ci-ZWRVWNFX.js → ci-Z4525QW6.js} +3095 -709
- package/dist/{cli-2JNBJUBB.js → cli-Q2XIQDRS.js} +72 -54
- package/dist/commands/ci/commands/ci-prod-db-operations.d.ts +6 -4
- package/dist/commands/ci/commands/ci-prod-types.d.ts +3 -0
- package/dist/commands/ci/commands/ci-prod-workflow.d.ts +1 -1
- package/dist/commands/ci/commands/ci-resolvers.d.ts +1 -1
- package/dist/commands/ci/commands/ci-supabase-local.d.ts +4 -0
- package/dist/commands/ci/machine/actors/build/build-and-playwright.d.ts +1 -1
- package/dist/commands/ci/machine/actors/db/collect-schema-stats.d.ts +15 -2
- package/dist/commands/ci/machine/actors/db/production-preview.d.ts +32 -4
- package/dist/commands/ci/machine/actors/db/schema-canonical-diff.d.ts +30 -1
- package/dist/commands/ci/machine/actors/db/sync-schema.d.ts +1 -0
- package/dist/commands/ci/machine/actors/finalize/index.d.ts +0 -1
- package/dist/commands/ci/machine/actors/index.d.ts +1 -1
- package/dist/commands/ci/machine/actors/setup/local.d.ts +2 -0
- package/dist/commands/ci/machine/actors/setup/pr-common.d.ts +3 -0
- package/dist/commands/ci/machine/actors/setup/pr-local.d.ts +2 -0
- package/dist/commands/ci/machine/commands/machine-runner.d.ts +6 -0
- package/dist/commands/ci/machine/commands/step-telemetry.d.ts +16 -0
- package/dist/commands/ci/machine/contract.d.ts +40 -0
- package/dist/commands/ci/machine/formatters/github-comment-types.d.ts +7 -2
- package/dist/commands/ci/machine/formatters/github-comment.d.ts +2 -1
- package/dist/commands/ci/machine/formatters/sections/final-comment.d.ts +2 -1
- package/dist/commands/ci/machine/formatters/sections/index.d.ts +1 -1
- package/dist/commands/ci/machine/formatters/sections/production-schema-status.d.ts +30 -0
- package/dist/commands/ci/machine/formatters/summary.d.ts +4 -4
- package/dist/commands/ci/machine/guards.d.ts +4 -0
- package/dist/commands/ci/machine/helpers.d.ts +33 -0
- package/dist/commands/ci/machine/machine-state-helpers.d.ts +1 -1
- package/dist/commands/ci/machine/machine.d.ts +71 -11
- package/dist/commands/ci/machine/types.d.ts +9 -0
- package/dist/commands/ci/utils/ci-diagnostics.d.ts +67 -0
- package/dist/commands/ci/utils/ci-summary.d.ts +118 -0
- package/dist/commands/ci/utils/db-url-utils.d.ts +4 -77
- package/dist/commands/ci/utils/github-api.d.ts +14 -0
- package/dist/commands/db/apply/contract.d.ts +73 -0
- package/dist/commands/db/apply/helpers/alter-statement-parsers.d.ts +95 -0
- package/dist/commands/db/apply/helpers/data-compatibility-checker.d.ts +0 -61
- package/dist/commands/db/apply/helpers/function-plan-false-positive-filter.d.ts +36 -0
- package/dist/commands/db/apply/helpers/hazard-handler.d.ts +4 -4
- package/dist/commands/db/apply/helpers/index.d.ts +14 -5
- package/dist/commands/db/apply/helpers/partition-acl-cleaner.d.ts +3 -1
- package/dist/commands/db/apply/helpers/pg-schema-diff-helpers.d.ts +69 -6
- package/dist/commands/db/apply/helpers/plan-ast.d.ts +56 -0
- package/dist/commands/db/apply/helpers/plan-check-filter.d.ts +26 -0
- package/dist/commands/db/apply/helpers/plan-drop-protection.d.ts +43 -0
- package/dist/commands/db/apply/helpers/plan-ordering.d.ts +6 -0
- package/dist/commands/db/apply/helpers/plan-statement-parser.d.ts +39 -0
- package/dist/commands/db/apply/helpers/plan-validator.d.ts +8 -40
- package/dist/commands/db/apply/helpers/retry-logic.d.ts +1 -10
- package/dist/commands/db/apply/helpers/temp-db-bootstrap.d.ts +18 -0
- package/dist/commands/db/apply/helpers/temp-db-dsn.d.ts +14 -0
- package/dist/commands/db/apply/machine.d.ts +56 -32
- package/dist/commands/db/commands/db-apply-error.d.ts +5 -0
- package/dist/commands/db/commands/db-apply.d.ts +2 -0
- package/dist/commands/db/commands/db-sync/directory-placement-check.d.ts +4 -0
- package/dist/commands/db/commands/db-sync/error-classifier.d.ts +1 -1
- package/dist/commands/db/commands/db-sync/plan-boundary-reconciliation.d.ts +3 -0
- package/dist/commands/db/commands/db-sync/precheck-helpers.d.ts +18 -0
- package/dist/commands/db/commands/db-sync/production-precheck.d.ts +15 -0
- package/dist/commands/db/commands/db-sync/risk-scan-collectors.d.ts +11 -0
- package/dist/commands/db/commands/db-sync.d.ts +11 -5
- package/dist/commands/db/sync/contract.d.ts +80 -0
- package/dist/commands/db/sync/machine.d.ts +60 -1
- package/dist/commands/db/types.d.ts +5 -0
- package/dist/commands/db/utils/boundary-policy/rule-compiler.d.ts +2 -1
- package/dist/commands/db/utils/boundary-policy/types.d.ts +21 -0
- package/dist/commands/db/utils/boundary-policy-runtime.d.ts +12 -3
- package/dist/commands/db/utils/boundary-policy.d.ts +1 -1
- package/dist/commands/db/utils/db-target.d.ts +5 -3
- package/dist/commands/db/utils/declarative-dependency-collectors.d.ts +6 -0
- package/dist/commands/db/utils/declarative-dependency-contract.d.ts +78 -0
- package/dist/commands/db/utils/declarative-dependency-sql-utils.d.ts +49 -0
- package/dist/commands/db/utils/declarative-dependency-warning-governance.d.ts +24 -0
- package/dist/commands/db/utils/preflight-check.d.ts +1 -1
- package/dist/commands/db/utils/preflight-checks/declarative-dependency-checks.d.ts +4 -0
- package/dist/commands/db/utils/preflight-checks/idempotent-risk-checks.d.ts +4 -0
- package/dist/commands/db/utils/preflight-checks/schema-boundary-checks.d.ts +4 -0
- package/dist/commands/db/utils/preflight-checks/schema-risk-policy.d.ts +4 -0
- package/dist/commands/db/utils/preflight-checks/supabase-checks.d.ts +12 -0
- package/dist/commands/db/utils/psql.d.ts +23 -0
- package/dist/commands/db/utils/sql-table-extractor.d.ts +42 -1
- package/dist/commands/env/commands/setup/types.d.ts +1 -0
- package/dist/commands/env/constants/local-supabase.d.ts +4 -1
- package/dist/commands/observability.d.ts +72 -0
- package/dist/commands/observability.helpers.d.ts +25 -0
- package/dist/commands/template-check/commands/template-check.d.ts +1 -0
- package/dist/commands/template-check/contract.d.ts +4 -3
- package/dist/commands/template-check/machine.d.ts +1 -1
- package/dist/commands/workflow/commands/deploy-production.d.ts +0 -1
- package/dist/constants/versions.d.ts +1 -1
- package/dist/{db-XULCILOU.js → db-BPQ2TEQM.js} +14618 -11273
- package/dist/{dev-5YXNPTCJ.js → dev-MLRKIP7F.js} +5 -5
- package/dist/{doctor-MZLOA53G.js → doctor-ROSWSMLH.js} +2 -2
- package/dist/{env-SS66PZ4B.js → env-WNHJVLOT.js} +37 -20
- package/dist/{env-HMMRSYCI.js → env-XPPACZM4.js} +2 -2
- package/dist/{env-files-2UIUYLLR.js → env-files-HRNUGZ5O.js} +1 -1
- package/dist/{error-handler-HEXBRNVV.js → error-handler-YRQWRDEF.js} +17 -0
- package/dist/{hotfix-YA3DGLOM.js → hotfix-Z5EGVSMH.js} +4 -4
- package/dist/index.js +4 -4
- package/dist/{init-ZIL6LRFO.js → init-S2ATHLJ6.js} +1 -1
- package/dist/{inject-test-attrs-P44BVTQS.js → inject-test-attrs-XN4I2AOR.js} +2 -2
- package/dist/internal/machines/index.d.ts +1 -1
- package/dist/internal/machines/snapshot-helpers.d.ts +6 -0
- package/dist/{manifest-TMFLESHW.js → manifest-EGCAZ4TK.js} +1 -1
- package/dist/observability-CJA5UFIC.js +721 -0
- package/dist/{risk-detector-4U6ZJ2G5.js → risk-detector-VO5HJR4R.js} +1 -1
- package/dist/{risk-detector-core-TK4OAI3N.js → risk-detector-core-7WZJZ5ZI.js} +61 -3
- package/dist/risk-detector-plpgsql-ULV7NLDB.js +638 -0
- package/dist/{template-check-3P4HZXVY.js → template-check-BDFMT6ZO.js} +23 -6
- package/dist/{upgrade-NUK3ZBCL.js → upgrade-BDUWBRT5.js} +1 -1
- package/dist/utils/db-url-utils.d.ts +81 -0
- package/dist/validators/risk-detector-plpgsql.d.ts +3 -1
- package/dist/{vuln-check-2W7N5TA2.js → vuln-check-66RXX3TO.js} +1 -1
- package/dist/{vuln-checker-IQJ56RUV.js → vuln-checker-FFOGOJPT.js} +1 -1
- package/dist/{watch-PNTKZYFB.js → watch-ITYW57SL.js} +1 -1
- package/dist/{workflow-H75N4BXX.js → workflow-UZIZ2JUS.js} +2 -3
- package/package.json +3 -3
- package/dist/chunk-IBVVGH6X.js +0 -33
- package/dist/chunk-KWX3JHCY.js +0 -85
- package/dist/commands/ci/machine/actors/finalize/summary.d.ts +0 -32
|
@@ -37,10 +37,13 @@ export declare const DbSyncInputSchema: z.ZodObject<{
|
|
|
37
37
|
verbose: z.ZodDefault<z.ZodBoolean>;
|
|
38
38
|
skipCodegen: z.ZodDefault<z.ZodBoolean>;
|
|
39
39
|
strictIntrospect: z.ZodDefault<z.ZodBoolean>;
|
|
40
|
+
strict: z.ZodDefault<z.ZodBoolean>;
|
|
40
41
|
targetDir: z.ZodOptional<z.ZodString>;
|
|
41
42
|
fromProduction: z.ZodDefault<z.ZodBoolean>;
|
|
42
43
|
autoSnapshot: z.ZodDefault<z.ZodBoolean>;
|
|
43
44
|
reportJson: z.ZodOptional<z.ZodString>;
|
|
45
|
+
snapshotTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
syncTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
44
47
|
}, z.core.$strict>;
|
|
45
48
|
export type DbSyncInput = z.infer<typeof DbSyncInputSchema>;
|
|
46
49
|
/**
|
|
@@ -109,11 +112,14 @@ export declare const StepContextSchema: z.ZodObject<{
|
|
|
109
112
|
verbose: z.ZodBoolean;
|
|
110
113
|
skipCodegen: z.ZodBoolean;
|
|
111
114
|
strictIntrospect: z.ZodBoolean;
|
|
115
|
+
strict: z.ZodBoolean;
|
|
112
116
|
fromProduction: z.ZodBoolean;
|
|
113
117
|
autoSnapshot: z.ZodBoolean;
|
|
114
118
|
noSeed: z.ZodBoolean;
|
|
115
119
|
reportJson: z.ZodOptional<z.ZodString>;
|
|
116
120
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
121
|
+
snapshotTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
122
|
+
syncTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
117
123
|
configTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
118
124
|
}, z.core.$strip>;
|
|
119
125
|
export type StepContext = z.infer<typeof StepContextSchema>;
|
|
@@ -135,6 +141,77 @@ export declare const DbSyncOutputSchema: z.ZodObject<{
|
|
|
135
141
|
reportJsonPath: z.ZodOptional<z.ZodString>;
|
|
136
142
|
exitCode: z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>;
|
|
137
143
|
error: z.ZodOptional<z.ZodString>;
|
|
144
|
+
outcome: z.ZodObject<{
|
|
145
|
+
command: z.ZodString;
|
|
146
|
+
exitMode: z.ZodEnum<{
|
|
147
|
+
success: "success";
|
|
148
|
+
success_with_warnings: "success_with_warnings";
|
|
149
|
+
failed: "failed";
|
|
150
|
+
timeout: "timeout";
|
|
151
|
+
cancelled: "cancelled";
|
|
152
|
+
}>;
|
|
153
|
+
startedAt: z.ZodString;
|
|
154
|
+
endedAt: z.ZodString;
|
|
155
|
+
durationMs: z.ZodNumber;
|
|
156
|
+
phases: z.ZodArray<z.ZodObject<{
|
|
157
|
+
id: z.ZodString;
|
|
158
|
+
label: z.ZodString;
|
|
159
|
+
status: z.ZodEnum<{
|
|
160
|
+
failed: "failed";
|
|
161
|
+
timeout: "timeout";
|
|
162
|
+
cancelled: "cancelled";
|
|
163
|
+
pending: "pending";
|
|
164
|
+
running: "running";
|
|
165
|
+
passed: "passed";
|
|
166
|
+
warning: "warning";
|
|
167
|
+
skipped: "skipped";
|
|
168
|
+
}>;
|
|
169
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
170
|
+
endedAt: z.ZodOptional<z.ZodString>;
|
|
171
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
172
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
173
|
+
warningCount: z.ZodOptional<z.ZodNumber>;
|
|
174
|
+
error: z.ZodOptional<z.ZodObject<{
|
|
175
|
+
code: z.ZodString;
|
|
176
|
+
message: z.ZodString;
|
|
177
|
+
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
178
|
+
retryable: z.ZodBoolean;
|
|
179
|
+
retryAfterMs: z.ZodOptional<z.ZodNumber>;
|
|
180
|
+
phase: z.ZodOptional<z.ZodString>;
|
|
181
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
182
|
+
}, z.core.$strict>>;
|
|
183
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
184
|
+
code: z.ZodString;
|
|
185
|
+
message: z.ZodString;
|
|
186
|
+
phase: z.ZodString;
|
|
187
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
188
|
+
}, z.core.$strict>>>;
|
|
189
|
+
metrics: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
190
|
+
}, z.core.$strict>>;
|
|
191
|
+
warnings: z.ZodArray<z.ZodObject<{
|
|
192
|
+
code: z.ZodString;
|
|
193
|
+
message: z.ZodString;
|
|
194
|
+
phase: z.ZodString;
|
|
195
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
196
|
+
}, z.core.$strict>>;
|
|
197
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
198
|
+
code: z.ZodString;
|
|
199
|
+
message: z.ZodString;
|
|
200
|
+
statusCode: z.ZodOptional<z.ZodNumber>;
|
|
201
|
+
retryable: z.ZodBoolean;
|
|
202
|
+
retryAfterMs: z.ZodOptional<z.ZodNumber>;
|
|
203
|
+
phase: z.ZodOptional<z.ZodString>;
|
|
204
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
205
|
+
}, z.core.$strict>>;
|
|
206
|
+
summary: z.ZodObject<{
|
|
207
|
+
passed: z.ZodNumber;
|
|
208
|
+
warnings: z.ZodNumber;
|
|
209
|
+
failed: z.ZodNumber;
|
|
210
|
+
skipped: z.ZodNumber;
|
|
211
|
+
timedOut: z.ZodNumber;
|
|
212
|
+
}, z.core.$strict>;
|
|
213
|
+
nextActions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
214
|
+
}, z.core.$strict>;
|
|
138
215
|
}, z.core.$strict>;
|
|
139
216
|
export type DbSyncOutput = z.infer<typeof DbSyncOutputSchema>;
|
|
140
217
|
/**
|
|
@@ -152,6 +229,7 @@ export declare const DbSyncMachineInputSchema: z.ZodObject<{
|
|
|
152
229
|
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
153
230
|
skipCodegen: z.ZodOptional<z.ZodBoolean>;
|
|
154
231
|
strictIntrospect: z.ZodOptional<z.ZodBoolean>;
|
|
232
|
+
strict: z.ZodOptional<z.ZodBoolean>;
|
|
155
233
|
targetDir: z.ZodOptional<z.ZodString>;
|
|
156
234
|
fromProduction: z.ZodOptional<z.ZodBoolean>;
|
|
157
235
|
autoSnapshot: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -159,6 +237,8 @@ export declare const DbSyncMachineInputSchema: z.ZodObject<{
|
|
|
159
237
|
reportJson: z.ZodOptional<z.ZodString>;
|
|
160
238
|
reconcile: z.ZodOptional<z.ZodBoolean>;
|
|
161
239
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
240
|
+
snapshotTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
241
|
+
syncTimeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
162
242
|
}, z.core.$strict>;
|
|
163
243
|
export type DbSyncMachineInput = z.infer<typeof DbSyncMachineInputSchema>;
|
|
164
244
|
//# sourceMappingURL=contract.d.ts.map
|
|
@@ -104,7 +104,7 @@ export declare const dbSyncMachine: import("xstate").StateMachine<DbSyncContext,
|
|
|
104
104
|
src: "writeReport";
|
|
105
105
|
logic: import("xstate").PromiseActorLogic<actors.ReportOutput, actors.ReportInput, import("xstate").EventObject>;
|
|
106
106
|
id: string | undefined;
|
|
107
|
-
}, never, never, never, "done" | "failed" | "sync" | "setup" | "idle" | "snapshot" | "
|
|
107
|
+
}, never, never, never, "done" | "failed" | "sync" | "setup" | "idle" | "snapshot" | "report" | "preflight" | "reconcile", string, {
|
|
108
108
|
env?: "local" | "preview" | "production" | undefined;
|
|
109
109
|
check?: boolean | undefined;
|
|
110
110
|
force?: boolean | undefined;
|
|
@@ -112,6 +112,7 @@ export declare const dbSyncMachine: import("xstate").StateMachine<DbSyncContext,
|
|
|
112
112
|
verbose?: boolean | undefined;
|
|
113
113
|
skipCodegen?: boolean | undefined;
|
|
114
114
|
strictIntrospect?: boolean | undefined;
|
|
115
|
+
strict?: boolean | undefined;
|
|
115
116
|
targetDir?: string | undefined;
|
|
116
117
|
fromProduction?: boolean | undefined;
|
|
117
118
|
autoSnapshot?: boolean | undefined;
|
|
@@ -119,6 +120,8 @@ export declare const dbSyncMachine: import("xstate").StateMachine<DbSyncContext,
|
|
|
119
120
|
reportJson?: string | undefined;
|
|
120
121
|
reconcile?: boolean | undefined;
|
|
121
122
|
timeoutMs?: number | undefined;
|
|
123
|
+
snapshotTimeoutMs?: number | undefined;
|
|
124
|
+
syncTimeoutMs?: number | undefined;
|
|
122
125
|
}, {
|
|
123
126
|
env: "local" | "preview" | "production";
|
|
124
127
|
check: boolean;
|
|
@@ -128,6 +131,62 @@ export declare const dbSyncMachine: import("xstate").StateMachine<DbSyncContext,
|
|
|
128
131
|
applied: boolean;
|
|
129
132
|
stepsCompleted: string[];
|
|
130
133
|
exitCode: 0 | 1;
|
|
134
|
+
outcome: {
|
|
135
|
+
command: string;
|
|
136
|
+
exitMode: "success" | "timeout" | "failed" | "cancelled" | "success_with_warnings";
|
|
137
|
+
startedAt: string;
|
|
138
|
+
endedAt: string;
|
|
139
|
+
durationMs: number;
|
|
140
|
+
phases: {
|
|
141
|
+
id: string;
|
|
142
|
+
label: string;
|
|
143
|
+
status: "timeout" | "warning" | "skipped" | "failed" | "pending" | "running" | "passed" | "cancelled";
|
|
144
|
+
startedAt?: string | undefined;
|
|
145
|
+
endedAt?: string | undefined;
|
|
146
|
+
durationMs?: number | undefined;
|
|
147
|
+
timeoutMs?: number | undefined;
|
|
148
|
+
warningCount?: number | undefined;
|
|
149
|
+
error?: {
|
|
150
|
+
code: string;
|
|
151
|
+
message: string;
|
|
152
|
+
retryable: boolean;
|
|
153
|
+
statusCode?: number | undefined;
|
|
154
|
+
retryAfterMs?: number | undefined;
|
|
155
|
+
phase?: string | undefined;
|
|
156
|
+
details?: Record<string, unknown> | undefined;
|
|
157
|
+
} | undefined;
|
|
158
|
+
warnings?: {
|
|
159
|
+
code: string;
|
|
160
|
+
message: string;
|
|
161
|
+
phase: string;
|
|
162
|
+
details?: Record<string, unknown> | undefined;
|
|
163
|
+
}[] | undefined;
|
|
164
|
+
metrics?: Record<string, number> | undefined;
|
|
165
|
+
}[];
|
|
166
|
+
warnings: {
|
|
167
|
+
code: string;
|
|
168
|
+
message: string;
|
|
169
|
+
phase: string;
|
|
170
|
+
details?: Record<string, unknown> | undefined;
|
|
171
|
+
}[];
|
|
172
|
+
errors: {
|
|
173
|
+
code: string;
|
|
174
|
+
message: string;
|
|
175
|
+
retryable: boolean;
|
|
176
|
+
statusCode?: number | undefined;
|
|
177
|
+
retryAfterMs?: number | undefined;
|
|
178
|
+
phase?: string | undefined;
|
|
179
|
+
details?: Record<string, unknown> | undefined;
|
|
180
|
+
}[];
|
|
181
|
+
summary: {
|
|
182
|
+
passed: number;
|
|
183
|
+
warnings: number;
|
|
184
|
+
failed: number;
|
|
185
|
+
skipped: number;
|
|
186
|
+
timedOut: number;
|
|
187
|
+
};
|
|
188
|
+
nextActions?: string[] | undefined;
|
|
189
|
+
};
|
|
131
190
|
reportJsonPath?: string | undefined;
|
|
132
191
|
error?: string | undefined;
|
|
133
192
|
}, import("xstate").EventObject, import("xstate").MetaObject, {
|
|
@@ -79,6 +79,7 @@ export interface DbCommandOptions {
|
|
|
79
79
|
skipCodegen?: boolean;
|
|
80
80
|
/** Fail when generated schema still contains unresolved unknown(...) columns */
|
|
81
81
|
strictIntrospect?: boolean;
|
|
82
|
+
strict?: boolean;
|
|
82
83
|
json?: boolean;
|
|
83
84
|
sql?: boolean;
|
|
84
85
|
format?: string;
|
|
@@ -99,6 +100,10 @@ export interface DbCommandOptions {
|
|
|
99
100
|
skip?: boolean;
|
|
100
101
|
/** Subprocess timeout in milliseconds for db sync */
|
|
101
102
|
timeout?: number;
|
|
103
|
+
/** Snapshot phase timeout in milliseconds */
|
|
104
|
+
snapshotTimeoutMs?: number;
|
|
105
|
+
/** Sync phase timeout in milliseconds */
|
|
106
|
+
syncTimeoutMs?: number;
|
|
102
107
|
}
|
|
103
108
|
/**
|
|
104
109
|
* Seed validation result
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
* Purpose: Convert raw policy JSON arrays into typed allowlist rules
|
|
5
5
|
* and normalize a full policy object with fallback defaults.
|
|
6
6
|
*/
|
|
7
|
-
import type { BoundaryPolicy, BoundaryPolicyMeta, DeclarativeRiskAllowlistRule, DirectoryPlacementAllowlistRule, PolicyIssueFormatter } from './types.js';
|
|
7
|
+
import type { BoundaryPolicy, BoundaryPolicyMeta, DeclarativeClosureWarningAllowlistRule, DeclarativeRiskAllowlistRule, DirectoryPlacementAllowlistRule, PolicyIssueFormatter } from './types.js';
|
|
8
8
|
export declare function toDeclarativeRiskRules(rawList: unknown, issueFormatter: PolicyIssueFormatter): DeclarativeRiskAllowlistRule[];
|
|
9
9
|
export declare function toDirectoryPlacementRules(rawList: unknown, issueFormatter: PolicyIssueFormatter): DirectoryPlacementAllowlistRule[];
|
|
10
|
+
export declare function toDeclarativeClosureWarningRules(rawList: unknown, issueFormatter: PolicyIssueFormatter): DeclarativeClosureWarningAllowlistRule[];
|
|
10
11
|
export declare function normalizePolicySource(raw: unknown, source: BoundaryPolicyMeta['source'], sourcePath: string, issueFormatter: PolicyIssueFormatter): BoundaryPolicy;
|
|
11
12
|
//# sourceMappingURL=rule-compiler.d.ts.map
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* Purpose: Shared types for boundary-policy validation, compilation, and loading.
|
|
5
5
|
*/
|
|
6
6
|
export type BoundaryPolicyRiskLevel = 'high' | 'medium' | 'low';
|
|
7
|
+
export type DeclarativeClosureWarningCode = 'UNQUALIFIED_CUSTOM_FUNCTION_CALL' | 'DYNAMIC_SQL_EXECUTE';
|
|
8
|
+
export type DeclarativeClosureWarningLevel = 'high' | 'medium';
|
|
7
9
|
export type AllowlistMetadata = {
|
|
8
10
|
owner?: string;
|
|
9
11
|
ticket?: string;
|
|
@@ -34,6 +36,20 @@ export type DirectoryPlacementAllowlistRule = {
|
|
|
34
36
|
expiresAt?: string;
|
|
35
37
|
active: boolean;
|
|
36
38
|
};
|
|
39
|
+
export type DeclarativeClosureWarningAllowlistRule = {
|
|
40
|
+
id: string;
|
|
41
|
+
code: DeclarativeClosureWarningCode;
|
|
42
|
+
filePattern: RegExp;
|
|
43
|
+
anchorPattern?: RegExp;
|
|
44
|
+
lineStart: number;
|
|
45
|
+
lineEnd: number;
|
|
46
|
+
level?: DeclarativeClosureWarningLevel;
|
|
47
|
+
reason: string;
|
|
48
|
+
owner?: string;
|
|
49
|
+
ticket?: string;
|
|
50
|
+
expiresAt?: string;
|
|
51
|
+
active: boolean;
|
|
52
|
+
};
|
|
37
53
|
export type BoundaryPolicyRaw = {
|
|
38
54
|
version?: unknown;
|
|
39
55
|
description?: unknown;
|
|
@@ -42,10 +58,13 @@ export type BoundaryPolicyRaw = {
|
|
|
42
58
|
idempotentPreferredObjects?: unknown;
|
|
43
59
|
declarativeRiskAllowlist?: unknown;
|
|
44
60
|
directoryPlacementAllowlist?: unknown;
|
|
61
|
+
declarativeClosureWarningAllowlist?: unknown;
|
|
45
62
|
};
|
|
46
63
|
export type RawRule = {
|
|
47
64
|
id?: unknown;
|
|
65
|
+
code?: unknown;
|
|
48
66
|
filePattern?: unknown;
|
|
67
|
+
anchorPattern?: unknown;
|
|
49
68
|
descriptionPattern?: unknown;
|
|
50
69
|
messagePattern?: unknown;
|
|
51
70
|
level?: unknown;
|
|
@@ -74,6 +93,7 @@ export type BoundaryPolicy = {
|
|
|
74
93
|
idempotentPreferredObjects: Set<string>;
|
|
75
94
|
declarativeRiskAllowlist: DeclarativeRiskAllowlistRule[];
|
|
76
95
|
directoryPlacementAllowlist: DirectoryPlacementAllowlistRule[];
|
|
96
|
+
declarativeClosureWarningAllowlist: DeclarativeClosureWarningAllowlistRule[];
|
|
77
97
|
__meta: BoundaryPolicyMeta;
|
|
78
98
|
};
|
|
79
99
|
export type PolicyValidationSeverity = 'warning' | 'error';
|
|
@@ -93,6 +113,7 @@ export declare const FALLBACK_DECLARATIVE_OBJECTS: Set<string>;
|
|
|
93
113
|
export declare const FALLBACK_IDEMPOTENT_OBJECTS: Set<string>;
|
|
94
114
|
export declare const FALLBACK_DECLARATIVE_RISK_ALLOWLIST: DeclarativeRiskAllowlistRule[];
|
|
95
115
|
export declare const FALLBACK_DIRECTORY_PLACEMENT_ALLOWLIST: DirectoryPlacementAllowlistRule[];
|
|
116
|
+
export declare const FALLBACK_DECLARATIVE_CLOSURE_WARNING_ALLOWLIST: DeclarativeClosureWarningAllowlistRule[];
|
|
96
117
|
export declare function isObject(value: unknown): value is Record<string, unknown>;
|
|
97
118
|
export declare function isStringArray(value: unknown): value is string[];
|
|
98
119
|
export declare function isPastDate(value: string, today: string): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { loadBoundaryPolicy, type DeclarativeRiskAllowlistRule, type DirectoryPlacementAllowlistRule } from './boundary-policy.js';
|
|
1
|
+
import { loadBoundaryPolicy, type DeclarativeClosureWarningAllowlistRule, type DeclarativeRiskAllowlistRule, type DirectoryPlacementAllowlistRule } from './boundary-policy.js';
|
|
2
2
|
type Logger = {
|
|
3
3
|
warn: (message: string) => void;
|
|
4
4
|
info: (message: string) => void;
|
|
@@ -15,14 +15,23 @@ type DirectoryRiskLike = {
|
|
|
15
15
|
message: string;
|
|
16
16
|
line?: number;
|
|
17
17
|
};
|
|
18
|
+
type DeclarativeClosureWarningLike = {
|
|
19
|
+
code: DeclarativeClosureWarningAllowlistRule['code'];
|
|
20
|
+
level: 'high' | 'medium';
|
|
21
|
+
file: string;
|
|
22
|
+
line: number;
|
|
23
|
+
};
|
|
18
24
|
export declare function getBoundaryPolicy(cwd?: string): BoundaryPolicy;
|
|
19
25
|
export declare function reportBoundaryPolicyState(logger: Logger, policy: BoundaryPolicy): void;
|
|
20
26
|
export declare function assertBoundaryPolicyUsable(logger: Logger, policy: BoundaryPolicy): void;
|
|
21
27
|
export declare function assertBoundaryPolicyQualityGate(logger: Logger, policy: BoundaryPolicy, strict: boolean): void;
|
|
22
28
|
export declare function findDeclarativeRiskAllowlistMatch(risk: DeclarativeRiskLike, policy: BoundaryPolicy): DeclarativeRiskAllowlistRule | undefined;
|
|
23
|
-
export declare function hasExplicitLineScope(rule: DirectoryPlacementAllowlistRule): boolean;
|
|
24
|
-
export declare function entryLineScopeMatches(issueLine: number | undefined, rule: DirectoryPlacementAllowlistRule): boolean;
|
|
29
|
+
export declare function hasExplicitLineScope(rule: DirectoryPlacementAllowlistRule | Pick<DeclarativeClosureWarningAllowlistRule, 'lineStart' | 'lineEnd'>): boolean;
|
|
30
|
+
export declare function entryLineScopeMatches(issueLine: number | undefined, rule: DirectoryPlacementAllowlistRule | Pick<DeclarativeClosureWarningAllowlistRule, 'lineStart' | 'lineEnd'>): boolean;
|
|
25
31
|
export declare function findDirectoryPlacementAllowlistMatch(issue: DirectoryRiskLike, policy: BoundaryPolicy): DirectoryPlacementAllowlistRule | undefined;
|
|
32
|
+
export declare function findDeclarativeClosureWarningAllowlistMatch(warning: DeclarativeClosureWarningLike, policy: BoundaryPolicy, options?: {
|
|
33
|
+
cwd?: string;
|
|
34
|
+
}): DeclarativeClosureWarningAllowlistRule | undefined;
|
|
26
35
|
export declare function resolveProductionApplyStrictMode(policy: BoundaryPolicy, strictOption: boolean | undefined): boolean;
|
|
27
36
|
export {};
|
|
28
37
|
//# sourceMappingURL=boundary-policy-runtime.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BoundaryPolicy } from './boundary-policy/types.js';
|
|
2
|
-
export type { BoundaryPolicy, BoundaryPolicyMeta, BoundaryPolicyRiskLevel, DeclarativeRiskAllowlistRule, DirectoryPlacementAllowlistRule, } from './boundary-policy/types.js';
|
|
2
|
+
export type { BoundaryPolicy, BoundaryPolicyMeta, BoundaryPolicyRiskLevel, DeclarativeClosureWarningAllowlistRule, DeclarativeClosureWarningCode, DeclarativeRiskAllowlistRule, DirectoryPlacementAllowlistRule, } from './boundary-policy/types.js';
|
|
3
3
|
export { formatAllowlistMetadata } from './boundary-policy/types.js';
|
|
4
4
|
export declare function loadBoundaryPolicy(projectRoot: string, policyPath?: string): BoundaryPolicy;
|
|
5
5
|
//# sourceMappingURL=boundary-policy.d.ts.map
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
* PRD Naming Convention:
|
|
11
11
|
* - DATABASE_URL: drizzle_app (App runtime, DML only)
|
|
12
12
|
* - DATABASE_URL_ADMIN: postgres (Migrations, Drizzle Kit)
|
|
13
|
-
* - GH_DATABASE_URL: drizzle_app (CI: Production app)
|
|
14
13
|
* - GH_DATABASE_URL_ADMIN: postgres (CI: Production migrations)
|
|
15
14
|
*/
|
|
16
15
|
export type RunaDbEnv = 'local' | 'preview' | 'main' | 'production';
|
|
16
|
+
export type ResolvedDatabaseUrlSource = 'DATABASE_URL_ADMIN' | 'DATABASE_URL' | 'GH_DATABASE_URL_ADMIN' | 'LOCAL_SUPABASE';
|
|
17
17
|
/**
|
|
18
18
|
* Resolve database URL for a given environment (DDL operations).
|
|
19
19
|
*
|
|
@@ -35,13 +35,15 @@ export type RunaDbEnv = 'local' | 'preview' | 'main' | 'production';
|
|
|
35
35
|
* ### Production/Main environment:
|
|
36
36
|
* 1. GH_DATABASE_URL_ADMIN (CI: postgres role, DDL capable)
|
|
37
37
|
* 2. DATABASE_URL_ADMIN (non-CI: postgres role, DDL capable)
|
|
38
|
-
* 3. GH_DATABASE_URL (CI fallback)
|
|
39
|
-
* 4. DATABASE_URL (last resort fallback)
|
|
40
38
|
*
|
|
41
39
|
* @param environment - Target environment
|
|
42
40
|
* @returns Database URL string
|
|
43
41
|
* @throws CLIError if no URL found for preview/production
|
|
44
42
|
*/
|
|
43
|
+
export declare function resolveDatabaseTarget(environment: RunaDbEnv): {
|
|
44
|
+
url: string;
|
|
45
|
+
source: ResolvedDatabaseUrlSource;
|
|
46
|
+
};
|
|
45
47
|
export declare function resolveDatabaseUrl(environment: RunaDbEnv): string;
|
|
46
48
|
/**
|
|
47
49
|
* Try to resolve database URL without throwing.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DeclarativeDependencyWarning } from './declarative-dependency-contract.js';
|
|
2
|
+
import { type FunctionDefinition, type FunctionReference } from './declarative-dependency-sql-utils.js';
|
|
3
|
+
export declare function collectReferencesForStatement(statement: string, file: string, line: number): FunctionReference[];
|
|
4
|
+
export declare function collectCustomFunctionNames(definitions: FunctionDefinition[]): Set<string>;
|
|
5
|
+
export declare function collectWarningsForStatement(statement: string, file: string, line: number, knownFunctionNames: Set<string>): DeclarativeDependencyWarning[];
|
|
6
|
+
//# sourceMappingURL=declarative-dependency-collectors.d.ts.map
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: Declarative dependency contract analysis
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Analyze declarative SQL for function dependency closure violations
|
|
5
|
+
* and warnings. Ensures declarative desired-state SQL only references functions
|
|
6
|
+
* defined within declarative scope.
|
|
7
|
+
*
|
|
8
|
+
* Submodules:
|
|
9
|
+
* declarative-dependency-sql-utils.ts — SQL text processing + function extraction
|
|
10
|
+
* declarative-dependency-collectors.ts — Reference and warning collection
|
|
11
|
+
*/
|
|
12
|
+
import type { DeclarativeClosureWarningCode, DeclarativeClosureWarningLevel } from './boundary-policy/types.js';
|
|
13
|
+
import { type FunctionDefinition, type FunctionReference, type ReferenceSource, type SqlFile, type SqlLayer } from './declarative-dependency-sql-utils.js';
|
|
14
|
+
export type { FunctionDefinition, FunctionReference, SqlLayer, ReferenceSource, } from './declarative-dependency-sql-utils.js';
|
|
15
|
+
export interface DeclarativeDependencyViolation {
|
|
16
|
+
code: 'DECLARATIVE_IDEMPOTENT_ONLY_FUNCTION' | 'DECLARATIVE_UNKNOWN_MANAGED_FUNCTION' | 'DECLARATIVE_PUBLIC_UNKNOWN_FUNCTION';
|
|
17
|
+
file: string;
|
|
18
|
+
line: number;
|
|
19
|
+
qualifiedName: string;
|
|
20
|
+
source: ReferenceSource;
|
|
21
|
+
message: string;
|
|
22
|
+
suggestion: string;
|
|
23
|
+
definedIn?: {
|
|
24
|
+
file: string;
|
|
25
|
+
line: number;
|
|
26
|
+
layer: SqlLayer;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export interface DeclarativeDependencyWarning {
|
|
30
|
+
code: DeclarativeClosureWarningCode;
|
|
31
|
+
level: DeclarativeClosureWarningLevel;
|
|
32
|
+
file: string;
|
|
33
|
+
line: number;
|
|
34
|
+
source: ReferenceSource;
|
|
35
|
+
message: string;
|
|
36
|
+
suggestion: string;
|
|
37
|
+
}
|
|
38
|
+
export interface DeclarativeDependencyAnalysisResult {
|
|
39
|
+
contractNote: string;
|
|
40
|
+
managedSchemas: string[];
|
|
41
|
+
violations: DeclarativeDependencyViolation[];
|
|
42
|
+
warnings: DeclarativeDependencyWarning[];
|
|
43
|
+
references: FunctionReference[];
|
|
44
|
+
definitions: {
|
|
45
|
+
declarative: FunctionDefinition[];
|
|
46
|
+
idempotent: FunctionDefinition[];
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export interface FormattedDeclarativeDependencyViolation {
|
|
50
|
+
summary: string;
|
|
51
|
+
callee: string;
|
|
52
|
+
definedIn?: string;
|
|
53
|
+
suggestion: string;
|
|
54
|
+
}
|
|
55
|
+
export interface FormattedDeclarativeDependencyWarning {
|
|
56
|
+
summary: string;
|
|
57
|
+
suggestion: string;
|
|
58
|
+
}
|
|
59
|
+
export interface DeclarativeDependencyWarningSummary {
|
|
60
|
+
code: DeclarativeDependencyWarning['code'];
|
|
61
|
+
count: number;
|
|
62
|
+
label: string;
|
|
63
|
+
}
|
|
64
|
+
export declare const DECLARATIVE_CONTRACT_NOTE = "Declarative desired-state build ignores idempotent-only helpers from supabase/schemas/idempotent/*.sql.";
|
|
65
|
+
export declare const DB_APPLY_CHECK_MODE_CONTRACT_NOTE = "Check mode ignores idempotent-only helpers when building declarative desired state.";
|
|
66
|
+
export declare const MAX_DETAILED_DECLARATIVE_WARNINGS = 10;
|
|
67
|
+
declare function collectDefinitions(files: SqlFile[], layer: SqlLayer): FunctionDefinition[];
|
|
68
|
+
declare function collectDeclarativeReferences(files: SqlFile[]): FunctionReference[];
|
|
69
|
+
export declare function analyzeDeclarativeDependencyContract(targetDir?: string): DeclarativeDependencyAnalysisResult;
|
|
70
|
+
export declare function formatDeclarativeDependencyViolation(violation: DeclarativeDependencyViolation): FormattedDeclarativeDependencyViolation;
|
|
71
|
+
export declare function formatDeclarativeDependencyWarning(warning: DeclarativeDependencyWarning): FormattedDeclarativeDependencyWarning;
|
|
72
|
+
export declare function summarizeDeclarativeDependencyWarnings(warnings: DeclarativeDependencyWarning[]): DeclarativeDependencyWarningSummary[];
|
|
73
|
+
export { extractFirstDollarBody as _extractFirstDollarBody } from './declarative-dependency-sql-utils.js';
|
|
74
|
+
export { collectReferencesForStatement as _collectReferencesForStatement } from './declarative-dependency-collectors.js';
|
|
75
|
+
export { collectWarningsForStatement as _collectWarningsForStatement } from './declarative-dependency-collectors.js';
|
|
76
|
+
export declare const _collectDefinitions: typeof collectDefinitions;
|
|
77
|
+
export declare const _collectDeclarativeReferences: typeof collectDeclarativeReferences;
|
|
78
|
+
//# sourceMappingURL=declarative-dependency-contract.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export type SqlLayer = 'declarative' | 'idempotent';
|
|
2
|
+
export type ReferenceSource = 'statement' | 'function-body' | 'do-body';
|
|
3
|
+
export interface FunctionDefinition {
|
|
4
|
+
qualifiedName: string;
|
|
5
|
+
schema: string;
|
|
6
|
+
name: string;
|
|
7
|
+
file: string;
|
|
8
|
+
line: number;
|
|
9
|
+
layer: SqlLayer;
|
|
10
|
+
}
|
|
11
|
+
export interface FunctionReference {
|
|
12
|
+
qualifiedName: string;
|
|
13
|
+
schema: string;
|
|
14
|
+
name: string;
|
|
15
|
+
file: string;
|
|
16
|
+
line: number;
|
|
17
|
+
source: ReferenceSource;
|
|
18
|
+
}
|
|
19
|
+
export type SqlFile = {
|
|
20
|
+
absolutePath: string;
|
|
21
|
+
relativePath: string;
|
|
22
|
+
content: string;
|
|
23
|
+
};
|
|
24
|
+
export type ExtractedBody = {
|
|
25
|
+
body: string;
|
|
26
|
+
startLine: number;
|
|
27
|
+
};
|
|
28
|
+
export declare const FUNCTION_DEFINITION_RE: RegExp;
|
|
29
|
+
export declare const QUALIFIED_FUNCTION_CALL_RE: RegExp;
|
|
30
|
+
export declare const EXECUTE_FUNCTION_RE: RegExp;
|
|
31
|
+
export declare const UNQUALIFIED_FUNCTION_CALL_RE: RegExp;
|
|
32
|
+
export declare const DEFAULT_UNQUALIFIED_CALL_RE: RegExp;
|
|
33
|
+
export declare const CHECK_UNQUALIFIED_CALL_RE: RegExp;
|
|
34
|
+
export declare const DYNAMIC_SQL_EXECUTE_RE: RegExp;
|
|
35
|
+
export declare const STATIC_EXECUTE_LITERAL_RE: RegExp;
|
|
36
|
+
export declare const DOLLAR_TAG_RE: RegExp;
|
|
37
|
+
export declare const PUBLIC_SCHEMA = "public";
|
|
38
|
+
export declare function countNewlines(text: string): number;
|
|
39
|
+
export declare function collectSqlFiles(targetDir: string, layer: SqlLayer): SqlFile[];
|
|
40
|
+
export declare function blankQuotedStrings(content: string): string;
|
|
41
|
+
export declare function sanitizeTopLevelSql(statement: string): string;
|
|
42
|
+
export declare function sanitizeExecutableCode(content: string): string;
|
|
43
|
+
export declare function sanitizeExecutableCodePreserveStrings(content: string): string;
|
|
44
|
+
export declare function extractManagedSchemas(files: SqlFile[]): Set<string>;
|
|
45
|
+
export declare function extractDefinitionFromStatement(statement: string, file: string, line: number, layer: SqlLayer): FunctionDefinition | null;
|
|
46
|
+
export declare function extractFirstDollarBody(statement: string, baseLine: number): ExtractedBody | null;
|
|
47
|
+
export declare function shouldIgnoreQualifiedFunctionCall(prefix: string): boolean;
|
|
48
|
+
export declare function decodeSqlStringLiteral(literal: string): string | null;
|
|
49
|
+
//# sourceMappingURL=declarative-dependency-sql-utils.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { createCLILogger } from '@runa-ai/runa';
|
|
2
|
+
import { type DeclarativeClosureWarningAllowlistRule } from './boundary-policy.js';
|
|
3
|
+
import { type DeclarativeDependencyWarning } from './declarative-dependency-contract.js';
|
|
4
|
+
type Logger = Pick<ReturnType<typeof createCLILogger>, 'info' | 'warn'>;
|
|
5
|
+
export interface ReviewedDeclarativeDependencyWarning {
|
|
6
|
+
warning: DeclarativeDependencyWarning;
|
|
7
|
+
rule: DeclarativeClosureWarningAllowlistRule;
|
|
8
|
+
}
|
|
9
|
+
export interface DeclarativeDependencyWarningReview {
|
|
10
|
+
strict: boolean;
|
|
11
|
+
allowlistReportEnabled: boolean;
|
|
12
|
+
allowlistedWarnings: ReviewedDeclarativeDependencyWarning[];
|
|
13
|
+
unreviewedWarnings: DeclarativeDependencyWarning[];
|
|
14
|
+
}
|
|
15
|
+
export declare function reviewDeclarativeDependencyWarnings(params: {
|
|
16
|
+
cwd?: string;
|
|
17
|
+
logger: Logger;
|
|
18
|
+
warnings: DeclarativeDependencyWarning[];
|
|
19
|
+
strictOption?: boolean;
|
|
20
|
+
}): DeclarativeDependencyWarningReview;
|
|
21
|
+
export declare function logDeclarativeDependencyWarnings(logger: Logger, review: DeclarativeDependencyWarningReview): void;
|
|
22
|
+
export declare function buildDeclarativeDependencyWarningFailureLines(review: DeclarativeDependencyWarningReview): string[];
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=declarative-dependency-warning-governance.d.ts.map
|
|
@@ -30,5 +30,5 @@ export declare class StepCounter {
|
|
|
30
30
|
/**
|
|
31
31
|
* Run all preflight checks
|
|
32
32
|
*/
|
|
33
|
-
export declare function runPreflightChecks(env: string): Promise<PreflightCheckResult>;
|
|
33
|
+
export declare function runPreflightChecks(env: string, strict?: boolean): Promise<PreflightCheckResult>;
|
|
34
34
|
//# sourceMappingURL=preflight-check.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { createCLILogger } from '@runa-ai/runa';
|
|
2
|
+
import type { PreflightCheckResult, StepCounter } from '../preflight-check.js';
|
|
3
|
+
export declare function runDeclarativeDependencyCheck(result: PreflightCheckResult, logger: ReturnType<typeof createCLILogger>, step: StepCounter, strictOption?: boolean): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=declarative-dependency-checks.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { createCLILogger } from '@runa-ai/runa';
|
|
2
|
+
import type { PreflightCheckResult, StepCounter } from '../preflight-check.js';
|
|
3
|
+
export declare function runIdempotentSchemaRiskCheck(result: PreflightCheckResult, logger: ReturnType<typeof createCLILogger>, step: StepCounter, strictOption?: boolean): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=idempotent-risk-checks.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { createCLILogger } from '@runa-ai/runa';
|
|
2
|
+
import type { PreflightCheckResult, StepCounter } from '../preflight-check.js';
|
|
3
|
+
export declare function runSchemaBoundaryPlacementCheck(result: PreflightCheckResult, logger: ReturnType<typeof createCLILogger>, step: StepCounter, strictOption?: boolean): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=schema-boundary-checks.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { RiskLevel, SchemaRisk } from '../../../../validators/risk-detector.js';
|
|
2
|
+
export declare function correctSyncPreflightRiskLevel(originalLevel: RiskLevel, reasonCode: string | undefined): RiskLevel;
|
|
3
|
+
export declare function applySyncPreflightRiskPolicy<T extends SchemaRisk>(risks: T[]): T[];
|
|
4
|
+
//# sourceMappingURL=schema-risk-policy.d.ts.map
|
|
@@ -17,6 +17,18 @@ export declare function isSupabaseStatusRunning(output: {
|
|
|
17
17
|
stdout: string;
|
|
18
18
|
stderr: string;
|
|
19
19
|
}): boolean;
|
|
20
|
+
export declare function classifySupabaseHealth(input: {
|
|
21
|
+
statusRunning: boolean;
|
|
22
|
+
dbConnected: boolean;
|
|
23
|
+
}): {
|
|
24
|
+
kind: 'ok';
|
|
25
|
+
} | {
|
|
26
|
+
kind: 'status-inconclusive-db-ready';
|
|
27
|
+
} | {
|
|
28
|
+
kind: 'db-unreachable';
|
|
29
|
+
} | {
|
|
30
|
+
kind: 'not-running';
|
|
31
|
+
};
|
|
20
32
|
/**
|
|
21
33
|
* Check if Supabase is running (local only)
|
|
22
34
|
*/
|
|
@@ -57,6 +57,8 @@ export declare function psqlSyncFile(params: {
|
|
|
57
57
|
databaseUrl: string;
|
|
58
58
|
filePath: string;
|
|
59
59
|
onErrorStop?: boolean;
|
|
60
|
+
/** Timeout in milliseconds (default: 5 minutes). */
|
|
61
|
+
timeout?: number;
|
|
60
62
|
}): {
|
|
61
63
|
status: number | null;
|
|
62
64
|
stdout: string;
|
|
@@ -71,4 +73,25 @@ export declare function psqlExec(params: {
|
|
|
71
73
|
databaseUrl: string;
|
|
72
74
|
sql: string;
|
|
73
75
|
}): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Execute multiple SQL statements in a single psql process via a temp file.
|
|
78
|
+
*
|
|
79
|
+
* Reduces connection count from N (one per statement) to 1.
|
|
80
|
+
* Uses ON_ERROR_STOP=off by default so individual statement failures
|
|
81
|
+
* don't block subsequent statements (matches non-fatal usage patterns).
|
|
82
|
+
*
|
|
83
|
+
* @param params - Batch execution parameters
|
|
84
|
+
* @returns Result with status, stdout, stderr
|
|
85
|
+
*/
|
|
86
|
+
export declare function psqlSyncBatch(params: {
|
|
87
|
+
databaseUrl: string;
|
|
88
|
+
statements: string[];
|
|
89
|
+
onErrorStop?: boolean;
|
|
90
|
+
/** Timeout in milliseconds (default: 60 seconds). */
|
|
91
|
+
timeout?: number;
|
|
92
|
+
}): {
|
|
93
|
+
status: number | null;
|
|
94
|
+
stdout: string;
|
|
95
|
+
stderr: string;
|
|
96
|
+
};
|
|
74
97
|
//# sourceMappingURL=psql.d.ts.map
|