@runa-ai/runa-cli 0.10.1 → 0.10.3
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/{chunk-Y5ANTCKE.js → chunk-EZ46JIEO.js} +5 -2
- package/dist/{chunk-XRLIZKB2.js → chunk-S7VGVFYF.js} +4934 -4289
- package/dist/{chunk-ZPE52NEK.js → chunk-SS7RIWW3.js} +1 -1
- package/dist/{chunk-PAWNJA3N.js → chunk-XFXGFUAM.js} +1 -1
- package/dist/{ci-3HZWUQFN.js → ci-6P7VK6WB.js} +3 -3
- package/dist/{cli-RES5QRC2.js → cli-Q665YRVT.js} +8 -8
- package/dist/commands/build/contract.d.ts +2 -2
- package/dist/commands/build/machine.d.ts +6 -6
- package/dist/commands/ci/commands/ci-prod-types.d.ts +1 -1
- package/dist/commands/ci/machine/contract.d.ts +10 -10
- package/dist/commands/ci/machine/machine.d.ts +3 -3
- package/dist/commands/ci/utils/ci-summary.d.ts +3 -3
- package/dist/commands/db/apply/contract.d.ts +1 -1
- package/dist/commands/db/apply/helpers/plan-check-filter.d.ts +1 -1
- package/dist/commands/db/apply/helpers/planner-artifact.d.ts +1 -1
- package/dist/commands/db/commands/db-preview-profile.d.ts +1 -1
- package/dist/commands/db/preflight/contract.d.ts +1 -1
- package/dist/commands/db/sync/contract.d.ts +5 -5
- package/dist/commands/db/sync/machine.d.ts +2 -2
- package/dist/commands/db/sync/schema-guardrail-graph-metadata.d.ts +1 -7
- package/dist/commands/db/sync/schema-guardrail-graph.d.ts +2 -0
- package/dist/commands/db/sync/schema-guardrail-rewrite.d.ts +8 -0
- package/dist/commands/db/sync/schema-guardrail-types.d.ts +2 -2
- package/dist/commands/db/utils/duplicate-function-ownership-allowlist.d.ts +13 -0
- package/dist/commands/db/utils/function-acl-manifest.d.ts +39 -0
- package/dist/commands/upgrade.d.ts +36 -0
- package/dist/{db-PRGL7PBX.js → db-BQOVOQXU.js} +816 -732
- package/dist/index.js +3 -3
- package/dist/{risk-detector-S7XQF4I2.js → risk-detector-GDDLISVE.js} +1 -1
- package/dist/{risk-detector-core-TGFKWHRS.js → risk-detector-core-YI3M6INI.js} +1 -1
- package/dist/{risk-detector-plpgsql-O32TUR34.js → risk-detector-plpgsql-4GWEQXUG.js} +1 -1
- package/dist/{template-check-VNNQQXCX.js → template-check-D35F2GDP.js} +4 -0
- package/dist/{upgrade-LBO3Z3J7.js → upgrade-X7P6WRD5.js} +189 -19
- package/dist/{vuln-check-5JJ2YAJW.js → vuln-check-WW43E7PS.js} +1 -1
- package/dist/{vuln-checker-JF5234BL.js → vuln-checker-BC3ZAXJ3.js} +1 -1
- package/dist/{watch-RFVCEQLH.js → watch-4RHXVCQ3.js} +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ init_esm_shims();
|
|
|
9
9
|
var riskDetectorModulePromise = null;
|
|
10
10
|
async function loadRiskDetectorModule() {
|
|
11
11
|
if (!riskDetectorModulePromise) {
|
|
12
|
-
riskDetectorModulePromise = import('./risk-detector-core-
|
|
12
|
+
riskDetectorModulePromise = import('./risk-detector-core-YI3M6INI.js').catch((error) => {
|
|
13
13
|
riskDetectorModulePromise = null;
|
|
14
14
|
throw error;
|
|
15
15
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
|
-
import { normalizeDatabaseUrlForDdl, parseBoolish, enhanceConnectionError, isIdempotentRoleHazard, detectAppSchemas, formatSchemasForSql, getDbPlanArtifactPath, runDbApply } from './chunk-
|
|
3
|
+
import { normalizeDatabaseUrlForDdl, parseBoolish, enhanceConnectionError, isIdempotentRoleHazard, detectAppSchemas, formatSchemasForSql, getDbPlanArtifactPath, runDbApply } from './chunk-S7VGVFYF.js';
|
|
4
4
|
import './chunk-WGRVAGSR.js';
|
|
5
5
|
import './chunk-HWR5NUUZ.js';
|
|
6
6
|
import './chunk-UHDAYPHH.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-EZ46JIEO.js';
|
|
8
8
|
import './chunk-IWVXI5O4.js';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-SS7RIWW3.js';
|
|
10
10
|
import './chunk-B7C7CLW2.js';
|
|
11
11
|
import './chunk-QDF7QXBL.js';
|
|
12
12
|
import { getSnapshotStateName, getSnapshotStatePaths, isSnapshotComplete } from './chunk-XVNDDHAF.js';
|
|
@@ -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-SS7RIWW3.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';
|
|
@@ -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-X7P6WRD5.js');
|
|
159
159
|
program.addCommand(upgradeCommand2);
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
@@ -185,7 +185,7 @@ async function registerProjectLifecycleCommands(program, requested, loadAllComma
|
|
|
185
185
|
] = await Promise.all([
|
|
186
186
|
import('./init-4UAWYY75.js'),
|
|
187
187
|
import('./prepare-32DOVHTE.js'),
|
|
188
|
-
import('./upgrade-
|
|
188
|
+
import('./upgrade-X7P6WRD5.js'),
|
|
189
189
|
import('./validate-CAAW4Y44.js'),
|
|
190
190
|
import('./build-P2A6345N.js'),
|
|
191
191
|
import('./dev-QR55VDNZ.js')
|
|
@@ -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-6P7VK6WB.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-BQOVOQXU.js');
|
|
470
470
|
program.addCommand(dbCommand);
|
|
471
471
|
}
|
|
472
472
|
async function registerServicesCommand(program) {
|
|
@@ -490,7 +490,7 @@ 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-4RHXVCQ3.js');
|
|
494
494
|
program.addCommand(watchCommand);
|
|
495
495
|
}
|
|
496
496
|
async function registerWorkflowCommand(program) {
|
|
@@ -498,11 +498,11 @@ async function registerWorkflowCommand(program) {
|
|
|
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-WW43E7PS.js');
|
|
502
502
|
program.addCommand(vulnCheckCommand);
|
|
503
503
|
}
|
|
504
504
|
async function registerTemplateCheckCommand(program) {
|
|
505
|
-
const { templateCheckCommand } = await import('./template-check-
|
|
505
|
+
const { templateCheckCommand } = await import('./template-check-D35F2GDP.js');
|
|
506
506
|
program.addCommand(templateCheckCommand);
|
|
507
507
|
}
|
|
508
508
|
async function registerSessionCommands(program) {
|
|
@@ -21,9 +21,9 @@ import { z } from 'zod';
|
|
|
21
21
|
export declare const BuildPhaseSchema: z.ZodEnum<{
|
|
22
22
|
db: "db";
|
|
23
23
|
build: "build";
|
|
24
|
+
manifest: "manifest";
|
|
24
25
|
lint: "lint";
|
|
25
26
|
types: "types";
|
|
26
|
-
manifest: "manifest";
|
|
27
27
|
}>;
|
|
28
28
|
export type BuildPhase = z.infer<typeof BuildPhaseSchema>;
|
|
29
29
|
/** Valid build phases for --only option */
|
|
@@ -44,9 +44,9 @@ export declare const BuildInputSchema: z.ZodObject<{
|
|
|
44
44
|
only: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
45
45
|
db: "db";
|
|
46
46
|
build: "build";
|
|
47
|
+
manifest: "manifest";
|
|
47
48
|
lint: "lint";
|
|
48
49
|
types: "types";
|
|
49
|
-
manifest: "manifest";
|
|
50
50
|
}>>>;
|
|
51
51
|
}, z.core.$strict>;
|
|
52
52
|
export type BuildInput = z.infer<typeof BuildInputSchema>;
|
|
@@ -35,7 +35,7 @@ interface BuildMachineInput {
|
|
|
35
35
|
repoRoot?: string;
|
|
36
36
|
}
|
|
37
37
|
export declare const buildMachine: import("xstate").StateMachine<BuildContext, BuildEvent, {
|
|
38
|
-
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./actors/clean.js").CleanOutput, import("./actors/clean.js").CleanInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./actors/build.js").BuildOutput, import("./actors/build.js").BuildInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./actors/
|
|
38
|
+
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./actors/clean.js").CleanOutput, import("./actors/clean.js").CleanInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./actors/build.js").BuildOutput, import("./actors/build.js").BuildInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./actors/manifest.js").ManifestOutput, import("./actors/manifest.js").ManifestInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./actors/validate.js").ValidateOutput, import("./actors/validate.js").ValidateInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./actors/setup.js").DepsInstallOutput, import("./actors/setup.js").SetupInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./actors/setup.js").EnvCheckOutput, import("./actors/setup.js").SetupInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./actors/setup.js").SupabaseStartOutput, import("./actors/setup.js").SetupInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./actors/db-sync.js").DbSyncOutput, import("./actors/db-sync.js").DbSyncInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./actors/static-checks.js").StaticChecksOutput, import("./actors/static-checks.js").StaticChecksInput, import("xstate").EventObject>> | undefined;
|
|
39
39
|
}, {
|
|
40
40
|
src: "fresh";
|
|
41
41
|
logic: import("xstate").PromiseActorLogic<import("./actors/clean.js").CleanOutput, import("./actors/clean.js").CleanInput, import("xstate").EventObject>;
|
|
@@ -44,14 +44,14 @@ export declare const buildMachine: import("xstate").StateMachine<BuildContext, B
|
|
|
44
44
|
src: "build";
|
|
45
45
|
logic: import("xstate").PromiseActorLogic<import("./actors/build.js").BuildOutput, import("./actors/build.js").BuildInput, import("xstate").EventObject>;
|
|
46
46
|
id: string | undefined;
|
|
47
|
-
} | {
|
|
48
|
-
src: "validate";
|
|
49
|
-
logic: import("xstate").PromiseActorLogic<import("./actors/validate.js").ValidateOutput, import("./actors/validate.js").ValidateInput, import("xstate").EventObject>;
|
|
50
|
-
id: string | undefined;
|
|
51
47
|
} | {
|
|
52
48
|
src: "manifest";
|
|
53
49
|
logic: import("xstate").PromiseActorLogic<import("./actors/manifest.js").ManifestOutput, import("./actors/manifest.js").ManifestInput, import("xstate").EventObject>;
|
|
54
50
|
id: string | undefined;
|
|
51
|
+
} | {
|
|
52
|
+
src: "validate";
|
|
53
|
+
logic: import("xstate").PromiseActorLogic<import("./actors/validate.js").ValidateOutput, import("./actors/validate.js").ValidateInput, import("xstate").EventObject>;
|
|
54
|
+
id: string | undefined;
|
|
55
55
|
} | {
|
|
56
56
|
src: "clean";
|
|
57
57
|
logic: import("xstate").PromiseActorLogic<import("./actors/clean.js").CleanOutput, import("./actors/clean.js").CleanInput, import("xstate").EventObject>;
|
|
@@ -106,7 +106,7 @@ export declare const buildMachine: import("xstate").StateMachine<BuildContext, B
|
|
|
106
106
|
} | {
|
|
107
107
|
type: "isDryRun";
|
|
108
108
|
params: unknown;
|
|
109
|
-
}, never, "fresh" | "done" | "failed" | "build" | "
|
|
109
|
+
}, never, "fresh" | "done" | "failed" | "build" | "manifest" | "dryRun" | "validate" | "clean" | "dbSync" | "preClean" | "staticAnalysis" | "idle" | {
|
|
110
110
|
setup: "done" | "depsInstall" | "envCheck" | "supabaseStart";
|
|
111
111
|
}, string, BuildMachineInput, {
|
|
112
112
|
success: boolean;
|
|
@@ -5,8 +5,8 @@ import { z } from 'zod';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare const CiProdApplyActionOptionsSchema: z.ZodObject<{
|
|
7
7
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
8
|
-
local: "local";
|
|
9
8
|
"github-actions": "github-actions";
|
|
9
|
+
local: "local";
|
|
10
10
|
}>>;
|
|
11
11
|
output: z.ZodOptional<z.ZodEnum<{
|
|
12
12
|
json: "json";
|
|
@@ -27,15 +27,15 @@ export declare const CiModeSchema: z.ZodEnum<{
|
|
|
27
27
|
}>;
|
|
28
28
|
export type CiMode = z.infer<typeof CiModeSchema>;
|
|
29
29
|
export declare const CiExecutionEnvSchema: z.ZodEnum<{
|
|
30
|
-
local: "local";
|
|
31
30
|
"github-actions": "github-actions";
|
|
31
|
+
local: "local";
|
|
32
32
|
}>;
|
|
33
33
|
export type CiExecutionEnv = z.infer<typeof CiExecutionEnvSchema>;
|
|
34
34
|
export declare const CiPhaseSchema: z.ZodEnum<{
|
|
35
35
|
all: "all";
|
|
36
36
|
test: "test";
|
|
37
|
-
blocking: "blocking";
|
|
38
37
|
observability: "observability";
|
|
38
|
+
blocking: "blocking";
|
|
39
39
|
}>;
|
|
40
40
|
export type CiPhase = z.infer<typeof CiPhaseSchema>;
|
|
41
41
|
export declare const CiDbModeSchema: z.ZodEnum<{
|
|
@@ -100,8 +100,8 @@ export declare const CiInputSchema: z.ZodObject<{
|
|
|
100
100
|
check: z.ZodOptional<z.ZodBoolean>;
|
|
101
101
|
keepDb: z.ZodOptional<z.ZodBoolean>;
|
|
102
102
|
executionMode: z.ZodOptional<z.ZodEnum<{
|
|
103
|
-
local: "local";
|
|
104
103
|
"github-actions": "github-actions";
|
|
104
|
+
local: "local";
|
|
105
105
|
}>>;
|
|
106
106
|
output: z.ZodOptional<z.ZodEnum<{
|
|
107
107
|
json: "json";
|
|
@@ -111,8 +111,8 @@ export declare const CiInputSchema: z.ZodObject<{
|
|
|
111
111
|
phase: z.ZodOptional<z.ZodEnum<{
|
|
112
112
|
all: "all";
|
|
113
113
|
test: "test";
|
|
114
|
-
blocking: "blocking";
|
|
115
114
|
observability: "observability";
|
|
115
|
+
blocking: "blocking";
|
|
116
116
|
}>>;
|
|
117
117
|
dbMode: z.ZodOptional<z.ZodEnum<{
|
|
118
118
|
auto: "auto";
|
|
@@ -148,14 +148,14 @@ export declare const SetupResultSchema: z.ZodObject<{
|
|
|
148
148
|
"ci-pr-local": "ci-pr-local";
|
|
149
149
|
}>;
|
|
150
150
|
executionEnv: z.ZodEnum<{
|
|
151
|
-
local: "local";
|
|
152
151
|
"github-actions": "github-actions";
|
|
152
|
+
local: "local";
|
|
153
153
|
}>;
|
|
154
154
|
phase: z.ZodEnum<{
|
|
155
155
|
all: "all";
|
|
156
156
|
test: "test";
|
|
157
|
-
blocking: "blocking";
|
|
158
157
|
observability: "observability";
|
|
158
|
+
blocking: "blocking";
|
|
159
159
|
}>;
|
|
160
160
|
repoKind: z.ZodEnum<{
|
|
161
161
|
unknown: "unknown";
|
|
@@ -296,9 +296,9 @@ export declare const StepSummarySchema: z.ZodObject<{
|
|
|
296
296
|
db: "db";
|
|
297
297
|
test: "test";
|
|
298
298
|
build: "build";
|
|
299
|
-
setup: "setup";
|
|
300
|
-
github: "github";
|
|
301
299
|
observability: "observability";
|
|
300
|
+
github: "github";
|
|
301
|
+
setup: "setup";
|
|
302
302
|
finalize: "finalize";
|
|
303
303
|
}>>;
|
|
304
304
|
parentStep: z.ZodOptional<z.ZodString>;
|
|
@@ -369,9 +369,9 @@ export declare const CiOutputSchema: z.ZodObject<{
|
|
|
369
369
|
db: "db";
|
|
370
370
|
test: "test";
|
|
371
371
|
build: "build";
|
|
372
|
-
setup: "setup";
|
|
373
|
-
github: "github";
|
|
374
372
|
observability: "observability";
|
|
373
|
+
github: "github";
|
|
374
|
+
setup: "setup";
|
|
375
375
|
finalize: "finalize";
|
|
376
376
|
}>>;
|
|
377
377
|
parentStep: z.ZodOptional<z.ZodString>;
|
|
@@ -219,10 +219,10 @@ export declare const ciMachine: import("xstate").StateMachine<CiContext, CiEvent
|
|
|
219
219
|
layer?: string | undefined;
|
|
220
220
|
check?: boolean | undefined;
|
|
221
221
|
keepDb?: boolean | undefined;
|
|
222
|
-
executionMode?: "
|
|
222
|
+
executionMode?: "github-actions" | "local" | undefined;
|
|
223
223
|
output?: "json" | "human" | undefined;
|
|
224
224
|
config?: string | undefined;
|
|
225
|
-
phase?: "all" | "test" | "
|
|
225
|
+
phase?: "all" | "test" | "observability" | "blocking" | undefined;
|
|
226
226
|
dbMode?: "auto" | "local" | undefined;
|
|
227
227
|
branchName?: string | undefined;
|
|
228
228
|
skipStaticChecks?: boolean | undefined;
|
|
@@ -249,7 +249,7 @@ export declare const ciMachine: import("xstate").StateMachine<CiContext, CiEvent
|
|
|
249
249
|
error?: string | undefined;
|
|
250
250
|
reason?: string | undefined;
|
|
251
251
|
title?: string | undefined;
|
|
252
|
-
phase?: "db" | "test" | "build" | "
|
|
252
|
+
phase?: "db" | "test" | "build" | "observability" | "github" | "setup" | "finalize" | undefined;
|
|
253
253
|
parentStep?: string | undefined;
|
|
254
254
|
optional?: boolean | undefined;
|
|
255
255
|
startedAt?: string | undefined;
|
|
@@ -31,8 +31,8 @@ export type CiStepStatus = z.output<typeof CiStepStatusSchema>;
|
|
|
31
31
|
export declare const CiSummarySchema: z.ZodObject<{
|
|
32
32
|
version: z.ZodString;
|
|
33
33
|
mode: z.ZodEnum<{
|
|
34
|
-
local: "local";
|
|
35
34
|
"github-actions": "github-actions";
|
|
35
|
+
local: "local";
|
|
36
36
|
}>;
|
|
37
37
|
command: z.ZodEnum<{
|
|
38
38
|
"ci pr": "ci pr";
|
|
@@ -100,9 +100,9 @@ export declare const CiSummarySchema: z.ZodObject<{
|
|
|
100
100
|
db: "db";
|
|
101
101
|
test: "test";
|
|
102
102
|
build: "build";
|
|
103
|
-
setup: "setup";
|
|
104
|
-
github: "github";
|
|
105
103
|
observability: "observability";
|
|
104
|
+
github: "github";
|
|
105
|
+
setup: "setup";
|
|
106
106
|
finalize: "finalize";
|
|
107
107
|
}>>;
|
|
108
108
|
parentStep: z.ZodOptional<z.ZodString>;
|
|
@@ -32,9 +32,9 @@ export declare const DbApplyPlannerReuseReasonSchema: z.ZodEnum<{
|
|
|
32
32
|
export type DbApplyPlannerReuseReason = z.infer<typeof DbApplyPlannerReuseReasonSchema>;
|
|
33
33
|
export declare const DbApplyInputSchema: z.ZodObject<{
|
|
34
34
|
env: z.ZodDefault<z.ZodEnum<{
|
|
35
|
-
local: "local";
|
|
36
35
|
preview: "preview";
|
|
37
36
|
production: "production";
|
|
37
|
+
local: "local";
|
|
38
38
|
}>>;
|
|
39
39
|
databaseUrl: z.ZodOptional<z.ZodString>;
|
|
40
40
|
verbose: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DbApplyPlanSummary } from '../contract.js';
|
|
2
|
-
import type
|
|
2
|
+
import { type IdempotentProtectedObjects } from './idempotent-object-registry.js';
|
|
3
3
|
import type { PlanStatement, ValidatedPlan } from './plan-validator.js';
|
|
4
4
|
export interface CheckModeFilterResult {
|
|
5
5
|
filteredPlan: ValidatedPlan;
|
|
@@ -4,9 +4,9 @@ import { type DbApplyInput, type DbApplyOutput, type DbApplyPlanner } from '../c
|
|
|
4
4
|
export declare const DbPlanArtifactSchema: z.ZodObject<{
|
|
5
5
|
version: z.ZodLiteral<"1">;
|
|
6
6
|
environment: z.ZodEnum<{
|
|
7
|
-
local: "local";
|
|
8
7
|
preview: "preview";
|
|
9
8
|
production: "production";
|
|
9
|
+
local: "local";
|
|
10
10
|
}>;
|
|
11
11
|
mode: z.ZodLiteral<"check">;
|
|
12
12
|
previewProfile: z.ZodEnum<{
|
|
@@ -2,9 +2,9 @@ import { z } from 'zod';
|
|
|
2
2
|
import { type DbApplyOutput, type DbPreviewProfile } from '../apply/contract.js';
|
|
3
3
|
export declare const DEFAULT_DB_PREVIEW_PROFILE: DbPreviewProfile;
|
|
4
4
|
export declare const DbPreviewEnvironmentSchema: z.ZodEnum<{
|
|
5
|
-
local: "local";
|
|
6
5
|
preview: "preview";
|
|
7
6
|
production: "production";
|
|
7
|
+
local: "local";
|
|
8
8
|
}>;
|
|
9
9
|
export declare const LEGACY_DB_APPLY_CHECK_REMOVAL_TARGET = "the next major CLI release";
|
|
10
10
|
export declare function parseDbPreviewProfile(value: string): DbPreviewProfile;
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
import { z } from 'zod';
|
|
9
9
|
export declare const DbPreflightInputSchema: z.ZodObject<{
|
|
10
10
|
env: z.ZodDefault<z.ZodEnum<{
|
|
11
|
-
local: "local";
|
|
12
11
|
preview: "preview";
|
|
13
12
|
production: "production";
|
|
13
|
+
local: "local";
|
|
14
14
|
}>>;
|
|
15
15
|
databaseUrl: z.ZodOptional<z.ZodString>;
|
|
16
16
|
verbose: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -18,9 +18,9 @@ import type { BoundaryGuidanceWarning, LocalBlindSpotBlocker, RuntimeContradicti
|
|
|
18
18
|
* Environment type for db sync
|
|
19
19
|
*/
|
|
20
20
|
export declare const DbSyncEnvSchema: z.ZodEnum<{
|
|
21
|
-
local: "local";
|
|
22
21
|
preview: "preview";
|
|
23
22
|
production: "production";
|
|
23
|
+
local: "local";
|
|
24
24
|
}>;
|
|
25
25
|
export type DbSyncEnv = z.infer<typeof DbSyncEnvSchema>;
|
|
26
26
|
/**
|
|
@@ -28,9 +28,9 @@ export type DbSyncEnv = z.infer<typeof DbSyncEnvSchema>;
|
|
|
28
28
|
*/
|
|
29
29
|
export declare const DbSyncInputSchema: z.ZodObject<{
|
|
30
30
|
env: z.ZodDefault<z.ZodEnum<{
|
|
31
|
-
local: "local";
|
|
32
31
|
preview: "preview";
|
|
33
32
|
production: "production";
|
|
33
|
+
local: "local";
|
|
34
34
|
}>>;
|
|
35
35
|
check: z.ZodDefault<z.ZodBoolean>;
|
|
36
36
|
force: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -104,9 +104,9 @@ export declare const StepContextSchema: z.ZodObject<{
|
|
|
104
104
|
databaseUrl: z.ZodString;
|
|
105
105
|
dbPackagePath: z.ZodString;
|
|
106
106
|
env: z.ZodEnum<{
|
|
107
|
-
local: "local";
|
|
108
107
|
preview: "preview";
|
|
109
108
|
production: "production";
|
|
109
|
+
local: "local";
|
|
110
110
|
}>;
|
|
111
111
|
check: z.ZodBoolean;
|
|
112
112
|
force: z.ZodBoolean;
|
|
@@ -142,9 +142,9 @@ export type { RuntimeContradictionIssue, RuntimeWarningIssue, SchemaGuardrailRep
|
|
|
142
142
|
*/
|
|
143
143
|
export declare const DbSyncOutputSchema: z.ZodObject<{
|
|
144
144
|
env: z.ZodEnum<{
|
|
145
|
-
local: "local";
|
|
146
145
|
preview: "preview";
|
|
147
146
|
production: "production";
|
|
147
|
+
local: "local";
|
|
148
148
|
}>;
|
|
149
149
|
check: z.ZodBoolean;
|
|
150
150
|
reconciled: z.ZodBoolean;
|
|
@@ -235,9 +235,9 @@ export type DbSyncOutput = z.infer<typeof DbSyncOutputSchema>;
|
|
|
235
235
|
*/
|
|
236
236
|
export declare const DbSyncMachineInputSchema: z.ZodObject<{
|
|
237
237
|
env: z.ZodOptional<z.ZodEnum<{
|
|
238
|
-
local: "local";
|
|
239
238
|
preview: "preview";
|
|
240
239
|
production: "production";
|
|
240
|
+
local: "local";
|
|
241
241
|
}>>;
|
|
242
242
|
check: z.ZodOptional<z.ZodBoolean>;
|
|
243
243
|
force: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -108,7 +108,7 @@ export declare const dbSyncMachine: import("xstate").StateMachine<DbSyncContext,
|
|
|
108
108
|
logic: import("xstate").PromiseActorLogic<actors.ReportOutput, actors.ReportInput, import("xstate").EventObject>;
|
|
109
109
|
id: string | undefined;
|
|
110
110
|
}, never, never, never, "done" | "failed" | "sync" | "setup" | "idle" | "snapshot" | "reconcile" | "report" | "preflight", string, {
|
|
111
|
-
env?: "
|
|
111
|
+
env?: "preview" | "production" | "local" | undefined;
|
|
112
112
|
check?: boolean | undefined;
|
|
113
113
|
force?: boolean | undefined;
|
|
114
114
|
autoApprove?: boolean | undefined;
|
|
@@ -126,7 +126,7 @@ export declare const dbSyncMachine: import("xstate").StateMachine<DbSyncContext,
|
|
|
126
126
|
snapshotTimeoutMs?: number | undefined;
|
|
127
127
|
syncTimeoutMs?: number | undefined;
|
|
128
128
|
}, {
|
|
129
|
-
env: "
|
|
129
|
+
env: "preview" | "production" | "local";
|
|
130
130
|
check: boolean;
|
|
131
131
|
reconciled: boolean;
|
|
132
132
|
preflightPassed: boolean;
|
|
@@ -4,17 +4,11 @@
|
|
|
4
4
|
* Purpose: Function ownership hashing, allowlist checking, and
|
|
5
5
|
* defined function/boundary metadata extraction
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
7
|
+
import { isAllowlistedDuplicateFunction } from '../utils/duplicate-function-ownership-allowlist.js';
|
|
8
8
|
import { type SqlFile } from '../utils/declarative-dependency-sql-utils.js';
|
|
9
9
|
import { type DefinedFunctionMetadata, type ManagedBoundaryMetadata } from './schema-guardrail-graph-types.js';
|
|
10
|
-
import type { SchemaGuardrailConfig } from './schema-guardrail-types.js';
|
|
11
10
|
declare function normalizeFunctionStatementForHash(statement: string): string;
|
|
12
11
|
declare function buildFunctionBodyHashMap(files: SqlFile[], layer: 'declarative' | 'idempotent'): Map<string, string>;
|
|
13
|
-
declare function isAllowlistedDuplicateFunction(params: {
|
|
14
|
-
finding: DuplicateFunctionOwnershipFinding;
|
|
15
|
-
allowlist: SchemaGuardrailConfig['allowedDuplicateFunctions'];
|
|
16
|
-
bodyHashes: Map<string, string>;
|
|
17
|
-
}): boolean;
|
|
18
12
|
/**
|
|
19
13
|
* Collect qualified object references from SQL function bodies
|
|
20
14
|
*/
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
* Purpose: Main entry points for schema guardrail graph building
|
|
5
5
|
* Exports: loadSqlSources, buildStaticGraph, StaticGraphBuildResult
|
|
6
6
|
*/
|
|
7
|
+
import { type FunctionAclManifest } from '../utils/function-acl-manifest.js';
|
|
7
8
|
import type { LoadedSqlSources, SchemaGraphManifest, SchemaGuardrailConfig, SchemaGuardrailReport } from './schema-guardrail-types.js';
|
|
8
9
|
export declare function loadSqlSources(targetDir: string, config: SchemaGuardrailConfig): LoadedSqlSources;
|
|
9
10
|
export type StaticGraphBuildResult = {
|
|
10
11
|
graph: SchemaGraphManifest;
|
|
12
|
+
functionAclManifest: FunctionAclManifest;
|
|
11
13
|
duplicateTableOwners: SchemaGuardrailReport['duplicateTableOwners'];
|
|
12
14
|
duplicateFunctionOwners: SchemaGuardrailReport['duplicateFunctionOwners'];
|
|
13
15
|
policyOwnershipConflicts: SchemaGuardrailReport['policyOwnershipConflicts'];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type FunctionAclManifest } from '../utils/function-acl-manifest.js';
|
|
1
2
|
import type { SchemaGraphManifest, SchemaManagedBlockKind, SchemaGuardrailConfig, SchemaGuardrailReport, SchemaGuardrailStaticResult } from './schema-guardrail-types.js';
|
|
2
3
|
type RenderedManagedBlock = {
|
|
3
4
|
kind: SchemaManagedBlockKind;
|
|
@@ -16,14 +17,20 @@ export type HeaderRewritePlan = {
|
|
|
16
17
|
}>;
|
|
17
18
|
existingManagedCount: number;
|
|
18
19
|
};
|
|
20
|
+
export type GeneratedFileRewritePlan = {
|
|
21
|
+
filePath: string;
|
|
22
|
+
expectedSql: string;
|
|
23
|
+
};
|
|
19
24
|
export declare function loadHeaderRewritePlans(params: {
|
|
20
25
|
targetDir: string;
|
|
21
26
|
graph: SchemaGraphManifest;
|
|
27
|
+
functionAclManifest: FunctionAclManifest;
|
|
22
28
|
config: SchemaGuardrailConfig;
|
|
23
29
|
report: SchemaGuardrailReport;
|
|
24
30
|
}): {
|
|
25
31
|
staleBlocks: SchemaGuardrailReport['staleBlocks'];
|
|
26
32
|
rewritePlans: HeaderRewritePlan[];
|
|
33
|
+
generatedFileRewritePlans: GeneratedFileRewritePlan[];
|
|
27
34
|
failure?: undefined;
|
|
28
35
|
} | {
|
|
29
36
|
staleBlocks?: undefined;
|
|
@@ -40,6 +47,7 @@ export declare function finalizeCheckModeReport(params: {
|
|
|
40
47
|
export declare function rewriteManagedHeaders(params: {
|
|
41
48
|
targetDir: string;
|
|
42
49
|
rewritePlans: HeaderRewritePlan[];
|
|
50
|
+
generatedFileRewritePlans: GeneratedFileRewritePlan[];
|
|
43
51
|
report: SchemaGuardrailReport;
|
|
44
52
|
}): SchemaGuardrailStaticResult | null;
|
|
45
53
|
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { SqlFile } from '../utils/declarative-dependency-sql-utils.js';
|
|
2
|
-
export type SchemaManagedBlockKind = 'file-header' | 'table-header';
|
|
2
|
+
export type SchemaManagedBlockKind = 'file-header' | 'table-header' | 'generated-file';
|
|
3
3
|
export type SchemaGuardrailMode = 'check' | 'sync';
|
|
4
4
|
export type SchemaGraphFileLayer = 'declarative' | 'idempotent';
|
|
5
5
|
export type SchemaGraphFileAuthoringRole = 'declarative-owner' | 'operational';
|
|
6
6
|
export type BoundaryGuidanceWarningKind = 'schema' | 'function' | 'policy' | 'security_definer' | 'trigger_function' | 'trigger_dispatch_gap' | 'managed_boundary';
|
|
7
7
|
export type LocalBlindSpotBlockerKind = 'cross-schema-rls' | 'dynamic-sql' | 'dynamic-sql-infra' | 'extension-placement';
|
|
8
8
|
export type SchemaGuardrailPhaseId = 'load_sources' | 'build_static_graph' | 'validate_ownership' | 'compare_generated_headers' | 'refresh_generated_headers' | 'handoff_db_sync' | 'runtime_reconcile' | 'publish_report';
|
|
9
|
-
export type SchemaGuardrailFailureCode = 'source_load_failed' | 'duplicate_table_owner' | 'duplicate_function_owner' | 'policy_ownership_conflict' | 'raw_cross_schema_rls_blocked' | 'dynamic_sql_blocked' | 'extension_placement_blocked' | 'stale_generated_header' | 'generated_header_validation_failed' | 'generated_header_rewrite_failed' | 'static_graph_build_failed' | 'critical_runtime_graph_contradiction' | 'sync_apply_failed';
|
|
9
|
+
export type SchemaGuardrailFailureCode = 'source_load_failed' | 'duplicate_table_owner' | 'duplicate_function_owner' | 'policy_ownership_conflict' | 'raw_cross_schema_rls_blocked' | 'dynamic_sql_blocked' | 'extension_placement_blocked' | 'stale_generated_header' | 'function_acl_migration_required' | 'generated_header_validation_failed' | 'generated_header_rewrite_failed' | 'static_graph_build_failed' | 'critical_runtime_graph_contradiction' | 'sync_apply_failed';
|
|
10
10
|
export interface SchemaGraphFileNode {
|
|
11
11
|
path: string;
|
|
12
12
|
sourceLayer: SchemaGraphFileLayer;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DuplicateFunctionOwnershipFinding } from './duplicate-function-ownership.js';
|
|
2
|
+
import type { SchemaGuardrailConfig } from '../sync/schema-guardrail-types.js';
|
|
3
|
+
export declare function isAllowlistedDuplicateFunction(params: {
|
|
4
|
+
finding: DuplicateFunctionOwnershipFinding;
|
|
5
|
+
allowlist: SchemaGuardrailConfig['allowedDuplicateFunctions'];
|
|
6
|
+
bodyHashes?: Map<string, string>;
|
|
7
|
+
}): boolean;
|
|
8
|
+
export declare function filterAllowlistedDuplicateFunctions(params: {
|
|
9
|
+
findings: DuplicateFunctionOwnershipFinding[];
|
|
10
|
+
allowlist: SchemaGuardrailConfig['allowedDuplicateFunctions'];
|
|
11
|
+
bodyHashes?: Map<string, string>;
|
|
12
|
+
}): DuplicateFunctionOwnershipFinding[];
|
|
13
|
+
//# sourceMappingURL=duplicate-function-ownership-allowlist.d.ts.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { SqlFile } from './declarative-dependency-sql-utils.js';
|
|
2
|
+
import { type IdempotentTouchMetadata } from '../sync/schema-guardrail-graph-types.js';
|
|
3
|
+
export declare const FUNCTION_ACL_RECONCILIATION_RELATIVE_PATH = "supabase/schemas/idempotent/18_function_acl_reconciliation.sql";
|
|
4
|
+
declare const FUNCTION_ACL_ROLE_ORDER: readonly ["anon", "authenticated", "service_role"];
|
|
5
|
+
export type FunctionAclGrantRole = (typeof FUNCTION_ACL_ROLE_ORDER)[number];
|
|
6
|
+
export type FunctionAclAnnotationRole = FunctionAclGrantRole | 'internal';
|
|
7
|
+
export interface FunctionAclFunctionEntry {
|
|
8
|
+
qualifiedName: string;
|
|
9
|
+
qualifiedSignature: string;
|
|
10
|
+
signature: string;
|
|
11
|
+
mode: 'internal' | 'grant';
|
|
12
|
+
roles: FunctionAclGrantRole[];
|
|
13
|
+
sourceFile: string;
|
|
14
|
+
line: number;
|
|
15
|
+
}
|
|
16
|
+
export interface FunctionAclSchemaUsageEntry {
|
|
17
|
+
schema: string;
|
|
18
|
+
roles: FunctionAclGrantRole[];
|
|
19
|
+
sourceFile: string;
|
|
20
|
+
line: number;
|
|
21
|
+
}
|
|
22
|
+
export interface FunctionAclManifest {
|
|
23
|
+
reconciliationFile: string;
|
|
24
|
+
functions: FunctionAclFunctionEntry[];
|
|
25
|
+
schemaUsages: FunctionAclSchemaUsageEntry[];
|
|
26
|
+
}
|
|
27
|
+
export declare function parseFunctionAclTarget(value: string): string | null;
|
|
28
|
+
export declare function functionAclManifestHasEntries(manifest: FunctionAclManifest): boolean;
|
|
29
|
+
export declare function buildFunctionAclIdempotentTouchMetadata(manifest: FunctionAclManifest): IdempotentTouchMetadata;
|
|
30
|
+
export declare function buildFunctionAclManifestFromSqlFiles(declarativeFiles: SqlFile[]): FunctionAclManifest;
|
|
31
|
+
export declare function loadFunctionAclManifest(targetDir: string, declarativeSqlDir: string): FunctionAclManifest;
|
|
32
|
+
export declare function loadFunctionAclManifestFromDeclarativeDir(declarativeDir: string): FunctionAclManifest;
|
|
33
|
+
export declare function validateFunctionAclMigration(manifest: FunctionAclManifest, existingContent: string): string[];
|
|
34
|
+
export declare function renderFunctionAclFile(manifest: FunctionAclManifest): string;
|
|
35
|
+
export declare function isManagedFunctionAclFileContentStale(manifest: FunctionAclManifest, existingContent: string): boolean;
|
|
36
|
+
export declare function extractManagedFunctionAclTargets(manifest: FunctionAclManifest): Set<string>;
|
|
37
|
+
export declare function extractManagedSchemaUsageTargets(manifest: FunctionAclManifest): Set<string>;
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=function-acl-manifest.d.ts.map
|
|
@@ -33,6 +33,42 @@
|
|
|
33
33
|
* runa upgrade --templates-version <version> # Override templates version
|
|
34
34
|
* runa upgrade --fresh # Clear templates cache before fetching
|
|
35
35
|
*/
|
|
36
|
+
import { type ConflictResolutionRule, type ConflictResolutionStrategy } from '@runa-ai/runa';
|
|
36
37
|
import { Command } from 'commander';
|
|
38
|
+
interface UpgradeOptions {
|
|
39
|
+
preview?: boolean;
|
|
40
|
+
force?: boolean;
|
|
41
|
+
keepLocal?: boolean;
|
|
42
|
+
yes?: boolean;
|
|
43
|
+
verify?: boolean;
|
|
44
|
+
packages?: boolean;
|
|
45
|
+
/** Keep backup after successful upgrade (for manual rollback) */
|
|
46
|
+
backup?: boolean;
|
|
47
|
+
/** Rollback to a specific transaction ID */
|
|
48
|
+
rollback?: string;
|
|
49
|
+
/** Rollback to the latest backup */
|
|
50
|
+
rollbackLatest?: boolean;
|
|
51
|
+
/** List available backups */
|
|
52
|
+
listBackups?: boolean;
|
|
53
|
+
/** Only sync specific categories */
|
|
54
|
+
only?: string;
|
|
55
|
+
/** Templates version override */
|
|
56
|
+
templatesVersion?: string;
|
|
57
|
+
/** Clear templates cache */
|
|
58
|
+
fresh?: boolean;
|
|
59
|
+
}
|
|
60
|
+
interface UpgradeConflictResolutionConfig {
|
|
61
|
+
defaultStrategy: ConflictResolutionStrategy;
|
|
62
|
+
rules: ConflictResolutionRule[];
|
|
63
|
+
}
|
|
64
|
+
export declare function findFilesWithMergeMarkers(targetDir: string): string[];
|
|
65
|
+
export declare function assertNoExistingMergeMarkers(targetDir: string): void;
|
|
66
|
+
export declare function loadUpgradeConflictResolutionConfig(cwd?: string): UpgradeConflictResolutionConfig;
|
|
67
|
+
export declare function resolveTemplatesVersionForUpgrade(params: {
|
|
68
|
+
cwd: string;
|
|
69
|
+
options: UpgradeOptions;
|
|
70
|
+
shouldUpdatePackages: boolean;
|
|
71
|
+
}): Promise<string | undefined>;
|
|
37
72
|
export declare const upgradeCommand: Command;
|
|
73
|
+
export {};
|
|
38
74
|
//# sourceMappingURL=upgrade.d.ts.map
|