@runa-ai/runa-cli 0.10.1 → 0.10.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/{chunk-Y5ANTCKE.js → chunk-EZ46JIEO.js} +5 -2
- package/dist/{chunk-ZPE52NEK.js → chunk-IR7SA2ME.js} +1 -1
- package/dist/{chunk-XRLIZKB2.js → chunk-LCJNIHZY.js} +3 -3
- package/dist/{chunk-PAWNJA3N.js → chunk-XFXGFUAM.js} +1 -1
- package/dist/{ci-3HZWUQFN.js → ci-6XYG7XNX.js} +3 -3
- package/dist/{cli-RES5QRC2.js → cli-2XL3VESS.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/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/utils/duplicate-function-ownership-allowlist.d.ts +13 -0
- package/dist/commands/upgrade.d.ts +36 -0
- package/dist/{db-PRGL7PBX.js → db-4AGPISOW.js} +326 -283
- 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-LMDYYJUE.js} +1 -1
- package/dist/{vuln-checker-JF5234BL.js → vuln-checker-NHXLNZRM.js} +1 -1
- package/dist/{watch-RFVCEQLH.js → watch-4RHXVCQ3.js} +1 -1
- package/package.json +3 -3
|
@@ -512,10 +512,13 @@ function buildExecuteExpressionInfo(body, statementStartOffset, state) {
|
|
|
512
512
|
}
|
|
513
513
|
function parseExecuteExpressionAt(body, statementStartOffset) {
|
|
514
514
|
const indexCursor = skipWhitespace(body, statementStartOffset + 7);
|
|
515
|
-
|
|
515
|
+
const ignoredKeyword = ["ON", "FUNCTION", "PROCEDURE"].find(
|
|
516
|
+
(keyword) => isQuoteBoundary(body, indexCursor, keyword)
|
|
517
|
+
);
|
|
518
|
+
if (ignoredKeyword) {
|
|
516
519
|
return {
|
|
517
520
|
info: null,
|
|
518
|
-
nextCursor: Math.max(indexCursor +
|
|
521
|
+
nextCursor: Math.max(indexCursor + ignoredKeyword.length, statementStartOffset + 1)
|
|
519
522
|
};
|
|
520
523
|
}
|
|
521
524
|
const state = {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
3
|
import { resolveDatabaseUrl, resolveDatabaseTarget } from './chunk-WGRVAGSR.js';
|
|
4
4
|
import { verifyPgSchemaDiffBinary, verifyDatabaseConnection, freeConnectionSlotsForPgSchemaDiff, executePgSchemaDiffPlan, detectDropTableStatements, analyzeDeclarativeDependencyContract, DB_APPLY_CHECK_MODE_CONTRACT_NOTE, formatDeclarativeDependencyViolation, summarizeDeclarativeDependencyWarnings, MAX_DETAILED_DECLARATIVE_WARNINGS, formatDeclarativeDependencyWarning, detectPgSchemaDiffVersion, STATEMENT_IDX_REGEX, hasUnparsedHazardHints, collectSqlFiles, splitSqlStatements, PG_SCHEMA_DIFF_APPLY_TIMEOUT_MS, HAZARD_REGEX, PUBLIC_SCHEMA, FUNCTION_DEFINITION_RE } from './chunk-HWR5NUUZ.js';
|
|
5
|
-
import { splitPlpgsqlStatementsWithOffsets, extractExecuteExpressions, extractStaticSqlFromExpression } from './chunk-
|
|
5
|
+
import { splitPlpgsqlStatementsWithOffsets, extractExecuteExpressions, extractStaticSqlFromExpression } from './chunk-EZ46JIEO.js';
|
|
6
6
|
import { loadEnvFiles } from './chunk-IWVXI5O4.js';
|
|
7
|
-
import { CLI_VERSION } from './chunk-
|
|
7
|
+
import { CLI_VERSION } from './chunk-IR7SA2ME.js';
|
|
8
8
|
import { generateTablesManifest } from './chunk-O3M7A73M.js';
|
|
9
9
|
import { parsePostgresUrl, buildPsqlEnv, buildPsqlArgs, stripSqlComments, psqlSyncQuery, blankDollarQuotedBodies, psqlSyncBatch, psqlSyncFile } from './chunk-A6A7JIRD.js';
|
|
10
10
|
import { init_local_supabase, buildLocalDatabaseUrl } from './chunk-QSEF4T3Y.js';
|
|
@@ -5199,7 +5199,7 @@ function logIdempotentRiskSummary(summary) {
|
|
|
5199
5199
|
async function detectIdempotentRiskSummary(schemasDir, files, verbose) {
|
|
5200
5200
|
const summary = emptyRiskSummary();
|
|
5201
5201
|
try {
|
|
5202
|
-
const { detectSchemaRisks } = await import('./risk-detector-
|
|
5202
|
+
const { detectSchemaRisks } = await import('./risk-detector-GDDLISVE.js');
|
|
5203
5203
|
for (const file of files) {
|
|
5204
5204
|
const filePath = join(schemasDir, file);
|
|
5205
5205
|
const risks = await detectSchemaRisks(filePath);
|
|
@@ -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-LCJNIHZY.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-IR7SA2ME.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-IR7SA2ME.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-6XYG7XNX.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-4AGPISOW.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-LMDYYJUE.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>;
|
|
@@ -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
|
*/
|
|
@@ -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
|
|
@@ -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
|