@runa-ai/runa-cli 0.5.69 → 0.5.72
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/commands/build/actors/build.d.ts +1 -1
- package/dist/commands/build/actors/build.d.ts.map +1 -1
- package/dist/commands/db/apply/actors.d.ts.map +1 -1
- package/dist/commands/db/apply/helpers/index.d.ts +1 -1
- package/dist/commands/db/apply/helpers/index.d.ts.map +1 -1
- package/dist/commands/db/apply/helpers/partition-prefilter.d.ts.map +1 -1
- package/dist/commands/db/apply/helpers/plan-validator.d.ts +26 -0
- package/dist/commands/db/apply/helpers/plan-validator.d.ts.map +1 -1
- package/dist/commands/db/apply/helpers/retry-logic.d.ts.map +1 -1
- package/dist/constants/versions.d.ts +1 -1
- package/dist/index.js +155 -60
- package/package.json +2 -2
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* E2E Mode:
|
|
8
8
|
* - Sets NEXT_PUBLIC_E2E_TEST=true (enables xstate-test-plugin)
|
|
9
|
-
* -
|
|
9
|
+
* - Turbo cache separates E2E/non-E2E via globalEnv (no TURBO_FORCE needed)
|
|
10
10
|
*/
|
|
11
11
|
export interface BuildInput {
|
|
12
12
|
repoRoot: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../src/commands/build/actors/build.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAQH,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,GAAG,EAAE,OAAO,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../../../src/commands/build/actors/build.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAQH,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,CAAC;IAClB,GAAG,EAAE,OAAO,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,2FAwDtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actors.d.ts","sourceRoot":"","sources":["../../../../src/commands/db/apply/actors.ts"],"names":[],"mappings":"AAwCA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AA8FlD,MAAM,WAAW,WAAW;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,kDAAkD;IAClD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wFAAwF;IACxF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;
|
|
1
|
+
{"version":3,"file":"actors.d.ts","sourceRoot":"","sources":["../../../../src/commands/db/apply/actors.ts"],"names":[],"mappings":"AAwCA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AA8FlD,MAAM,WAAW,WAAW;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,kDAAkD;IAClD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wFAAwF;IACxF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAkgCD;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB;WAExB,YAAY;eAAa,MAAM;UAAQ,KAAK,GAAG,MAAM;gCA+C9D,CAAC;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB;WAEnB,YAAY;eAAa,MAAM;gCA0RxC,CAAC;AAkCH;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;cACjB,MAAM,EAAE;;WACX,YAAY;eAAa,MAAM;gCAwBxC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,UAAU;aACV,OAAO;;WACT,YAAY;eAAa,MAAM;gCAmExC,CAAC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export { acquireAdvisoryLock, MIGRATION_LOCK_ID, releaseAdvisoryLock, } from './advisory-lock.js';
|
|
7
7
|
export type { FilterResult, PlanHazard, PlanStatement, ValidatedPlan } from './plan-validator.js';
|
|
8
|
-
export { filterIdempotentProtectedStatements, isDropStatementForProtectedObject, parsePlanOutput, validatePlanForExecution, } from './plan-validator.js';
|
|
8
|
+
export { ALLOWED_DDL_PREFIXES, BLOCKED_SQL_PATTERNS, filterIdempotentProtectedStatements, isDropStatementForProtectedObject, parsePlanOutput, validatePlanForExecution, validateStatementTypes, } from './plan-validator.js';
|
|
9
9
|
export type { IdempotentProtectedObjects, ParsedHazard, PartitionPrivilegeDetection, PgSchemaDiffPlanOptions, } from './pg-schema-diff-helpers.js';
|
|
10
10
|
export type { ShadowDbConfig, ShadowDbResult } from './shadow-db-manager.js';
|
|
11
11
|
export { buildAllowedHazards, detectDropTableStatements, detectPartitionPrivilegeError, displayCheckModeResults, displayHazardsWithContext, executePgSchemaDiffPlan, filterFalsePositiveHazards, formatPartitionPrivilegeHint, getIdempotentProtectedObjects, getIdempotentProtectedTables, getIdempotentRoles, handleHazardsWithContext, handleProductionAuthzProtection, handleProductionDataProtection, isIdempotentRoleHazard, parseHazardsWithContext, PG_SCHEMA_DIFF_APPLY_TIMEOUT_MS, resetIdempotentRolesCache, verifyDatabaseConnection, verifyPgSchemaDiffBinary, } from './pg-schema-diff-helpers.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/commands/db/apply/helpers/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAClG,OAAO,EACL,mCAAmC,EACnC,iCAAiC,EACjC,eAAe,EACf,wBAAwB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/commands/db/apply/helpers/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAClG,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,mCAAmC,EACnC,iCAAiC,EACjC,eAAe,EACf,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAE7B,YAAY,EACV,0BAA0B,EAC1B,YAAY,EACZ,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7E,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,6BAA6B,EAC7B,uBAAuB,EACvB,yBAAyB,EACzB,uBAAuB,EACvB,0BAA0B,EAC1B,4BAA4B,EAC5B,6BAA6B,EAC7B,4BAA4B,EAC5B,kBAAkB,EAClB,wBAAwB,EACxB,+BAA+B,EAC/B,8BAA8B,EAC9B,sBAAsB,EACtB,uBAAuB,EACvB,+BAA+B,EAC/B,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EAAE,kBAAkB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAErF,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,kBAAkB,EAClB,WAAW,EACX,KAAK,GACN,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,aAAa,GACd,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EACV,uBAAuB,EACvB,aAAa,EACb,iBAAiB,GAClB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,sBAAsB,EACtB,+BAA+B,EAC/B,aAAa,EACb,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,eAAe,GAChB,MAAM,iCAAiC,CAAC;AAEzC,YAAY,EAAE,wBAAwB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACzF,OAAO,EAAE,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAE/E,YAAY,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACvF,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,EACL,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,0BAA0B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partition-prefilter.d.ts","sourceRoot":"","sources":["../../../../../src/commands/db/apply/helpers/partition-prefilter.ts"],"names":[],"mappings":"AAsCA,MAAM,WAAW,qBAAqB;IACpC,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,6EAA6E;IAC7E,WAAW,EAAE,MAAM,CAAC;IACpB,mCAAmC;IACnC,aAAa,EAAE,qBAAqB,EAAE,CAAC;IACvC,6EAA6E;IAC7E,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B;AA6BD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"partition-prefilter.d.ts","sourceRoot":"","sources":["../../../../../src/commands/db/apply/helpers/partition-prefilter.ts"],"names":[],"mappings":"AAsCA,MAAM,WAAW,qBAAqB;IACpC,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,6EAA6E;IAC7E,WAAW,EAAE,MAAM,CAAC;IACpB,mCAAmC;IACnC,aAAa,EAAE,qBAAqB,EAAE,CAAC;IACvC,6EAA6E;IAC7E,mBAAmB,EAAE,MAAM,EAAE,CAAC;CAC/B;AA6BD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAuGlF"}
|
|
@@ -95,6 +95,32 @@ export declare function filterIdempotentProtectedStatements(plan: ValidatedPlan,
|
|
|
95
95
|
export { isDropStatementForProtected as _isDropStatementForProtected };
|
|
96
96
|
export { extractProtectedSchemas as _extractProtectedSchemas };
|
|
97
97
|
export { isDropSchemaForProtected as _isDropSchemaForProtected };
|
|
98
|
+
/**
|
|
99
|
+
* Allowed DDL statement prefixes. Only these statement types are permitted
|
|
100
|
+
* in pg-schema-diff plan output. Checked against the normalized first keyword(s)
|
|
101
|
+
* of each statement's SQL.
|
|
102
|
+
*/
|
|
103
|
+
export declare const ALLOWED_DDL_PREFIXES: readonly ["CREATE TABLE", "ALTER TABLE", "DROP TABLE", "CREATE INDEX", "CREATE UNIQUE INDEX", "DROP INDEX", "CREATE SCHEMA", "ALTER SCHEMA", "DROP SCHEMA", "CREATE FUNCTION", "CREATE OR REPLACE FUNCTION", "ALTER FUNCTION", "DROP FUNCTION", "CREATE TRIGGER", "ALTER TRIGGER", "DROP TRIGGER", "CREATE VIEW", "CREATE OR REPLACE VIEW", "CREATE MATERIALIZED VIEW", "ALTER VIEW", "DROP VIEW", "DROP MATERIALIZED VIEW", "CREATE TYPE", "ALTER TYPE", "DROP TYPE", "CREATE SEQUENCE", "ALTER SEQUENCE", "DROP SEQUENCE", "CREATE POLICY", "ALTER POLICY", "DROP POLICY", "CREATE ROLE", "ALTER ROLE", "DROP ROLE", "CREATE EXTENSION", "ALTER EXTENSION", "DROP EXTENSION", "GRANT", "REVOKE", "SET", "COMMENT ON"];
|
|
104
|
+
/**
|
|
105
|
+
* Explicitly blocked SQL patterns. These are DML or dangerous statements
|
|
106
|
+
* that should never appear as the leading keyword of a plan statement.
|
|
107
|
+
*
|
|
108
|
+
* Note: SELECT/INSERT inside CREATE FUNCTION bodies are safe because
|
|
109
|
+
* the leading keyword is CREATE FUNCTION, not SELECT/INSERT.
|
|
110
|
+
*/
|
|
111
|
+
export declare const BLOCKED_SQL_PATTERNS: ReadonlyArray<{
|
|
112
|
+
pattern: RegExp;
|
|
113
|
+
label: string;
|
|
114
|
+
}>;
|
|
115
|
+
/**
|
|
116
|
+
* Validate that all statements in the plan use allowed DDL types.
|
|
117
|
+
*
|
|
118
|
+
* Defense-in-depth: blocks DML (INSERT/UPDATE/DELETE) and dangerous SQL
|
|
119
|
+
* (DO $$, COPY, EXECUTE) that should never appear in a schema migration plan.
|
|
120
|
+
*
|
|
121
|
+
* @throws Error if any statement uses a blocked or unrecognized SQL type
|
|
122
|
+
*/
|
|
123
|
+
export declare function validateStatementTypes(plan: ValidatedPlan): void;
|
|
98
124
|
/**
|
|
99
125
|
* Validate that all hazards in the plan are in the allowed list.
|
|
100
126
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-validator.d.ts","sourceRoot":"","sources":["../../../../../src/commands/db/apply/helpers/plan-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAM9E,eAAO,MAAM,gBAAgB;;;
|
|
1
|
+
{"version":3,"file":"plan-validator.d.ts","sourceRoot":"","sources":["../../../../../src/commands/db/apply/helpers/plan-validator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAM9E,eAAO,MAAM,gBAAgB;;;iBAO3B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;iBAI9B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;iBAI9B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAiFhE;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,aAAa,CAgBjE;AAMD,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,aAAa,CAAC;IAC5B,iBAAiB,EAAE,aAAa,EAAE,CAAC;CACpC;AAED;;;;;;;;;GASG;AACH,iBAAS,2BAA2B,CAAC,GAAG,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,GAAG,OAAO,CAgEpF;AAwBD;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAC/C,GAAG,EAAE,MAAM,EACX,gBAAgB,EAAE,0BAA0B,GAC3C,OAAO,CA2CT;AAED;;;GAGG;AACH,iBAAS,uBAAuB,CAAC,eAAe,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CASpE;AAED;;;GAGG;AACH,iBAAS,wBAAwB,CAAC,GAAG,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAYvF;AAED;;;;;;;GAOG;AACH,wBAAgB,mCAAmC,CACjD,IAAI,EAAE,aAAa,EACnB,eAAe,EAAE,MAAM,EAAE,EACzB,gBAAgB,CAAC,EAAE,0BAA0B,GAC5C,YAAY,CAoEd;AAGD,OAAO,EAAE,2BAA2B,IAAI,4BAA4B,EAAE,CAAC;AACvE,OAAO,EAAE,uBAAuB,IAAI,wBAAwB,EAAE,CAAC;AAC/D,OAAO,EAAE,wBAAwB,IAAI,yBAAyB,EAAE,CAAC;AAMjE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,yrBA0CvB,CAAC;AAEX;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,aAAa,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAUlF,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,CA2ChE;AAMD;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,EAAE,GAAG,IAAI,CAehG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry-logic.d.ts","sourceRoot":"","sources":["../../../../../src/commands/db/apply/helpers/retry-logic.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"retry-logic.d.ts","sourceRoot":"","sources":["../../../../../src/commands/db/apply/helpers/retry-logic.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAU9E,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,aAAa,OAAO,CAAC;AAClC,eAAO,MAAM,oBAAoB,QAAQ,CAAC;AAE1C;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,iEAAiE;IACjE,QAAQ,EAAE,MAAM,CAAC;IACjB,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/C;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,SAAuB,GAAG,MAAM,CAIhG;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAO/D;AAMD;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAKnD;AAMD;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IAC/B;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,0BAA0B,CAAC;CAC/C;AAED;;;;;;;GAOG;AACH,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,MAAM,EACb,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,OAAO,EAChB,MAAM,CAAC,EAAE,kBAAkB,GAC1B,OAAO,CAAC,WAAW,CAAC,CAsHtB"}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*
|
|
21
21
|
* Sync strategy: Keep this in sync with packages/runa-templates/package.json version.
|
|
22
22
|
*/
|
|
23
|
-
export declare const COMPATIBLE_TEMPLATES_VERSION = "0.5.
|
|
23
|
+
export declare const COMPATIBLE_TEMPLATES_VERSION = "0.5.71";
|
|
24
24
|
/**
|
|
25
25
|
* Templates package name on GitHub Packages.
|
|
26
26
|
* Published to npm.pkg.github.com (requires NODE_AUTH_TOKEN).
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import path12__default, { join, dirname, resolve, basename, isAbsolute, relative
|
|
|
5
5
|
import { fileURLToPath } from 'url';
|
|
6
6
|
import * as fs5 from 'fs';
|
|
7
7
|
import fs5__default, { existsSync, readFileSync, unlinkSync, rmSync, readdirSync, mkdtempSync, writeFileSync, mkdirSync, copyFileSync, createWriteStream, statSync, lstatSync, realpathSync, promises, accessSync, constants, chmodSync } from 'fs';
|
|
8
|
-
import { execSync, spawnSync,
|
|
8
|
+
import { execSync, spawnSync, spawn, execFileSync, exec } from 'child_process';
|
|
9
9
|
import { createCLILogger, cacheClear, CacheClearOutputSchema, CLIError, cachePrune, CachePruneOutputSchema, cacheStats, CacheStatsOutputSchema, cacheList, CacheListOutputSchema, cacheInvalidate, CacheInvalidateOutputSchema, syncFromProduction, SUPABASE_SYSTEM_SCHEMAS, dbGenerateDiagram, DbDiagramGenerateOutputSchema, createDbSnapshot, syncDatabase, emitDbPushFailureCapsule, emitDbAnnotations, writeDbPushStepSummary, exportDbReportJson, DbSyncOutputSchema, databasePaths, detectRequiredServices, formatDetectionResults, dbStart, DbLifecycleStartOutputSchema, dbStop, DbLifecycleStopOutputSchema, dbReset, DbLifecycleResetOutputSchema, dbValidateSchemas, DbSchemaValidateOutputSchema, DbSchemaRisksOutputSchema, dbDetectSchemaRisks, dbApplySchemas, DbSchemaApplyOutputSchema, dbGenerateTypes, DbSchemaGenerateOutputSchema, extractSchemaFilter, dbSeedInit, DbSeedInitOutputSchema, dbSeedValidate, DbSeedValidateOutputSchema, dbSeedGenerate, DbSeedGenerateOutputSchema, dbVerifySeeds, DbSeedVerifyOutputSchema, DbSnapshotCreateOutputSchema, restoreDbSnapshot, DbSnapshotRestoreOutputSchema, listDbSnapshots, DbSnapshotListOutputSchema, dbGeneratePgTapTests, DbTestGenOutputSchema, dbUpdateGoldenRecord, DbTestUpdateGoldenOutputSchema, repairRunaConfig, detectExistingInitConfig, initProject, validateInitResult, linkCliGlobally, LinkCliOutputSchema, unlinkCliGlobally, UnlinkCliOutputSchema, checkRepoStatus, CheckRepoStatusOutputSchema, enableTelemetry, disableTelemetry, getTelemetryStatus, uploadTelemetry, TelemetryUploadOutputSchema, runTest, TestRunOutputSchema, runTestService, TestServiceOutputSchema, runTestIntegration, TestIntegrationOutputSchema, runTestStatic, TestStaticOutputSchema, generateOwaspTop10Tests, TestOwaspGenerateOutputSchema, updateGoldenRecord, generateE2ETests, generateSecurityTests, generateUnitTests, generateApiTests, generateComponentTests, generateE2EScaffold, validateConfig, ValidateConfigOutputSchema, deploySchemaToProduction, WorkflowNotifyOutputSchema, devopsSync, workflowSync, validateInfrastructure, emitWorkflowValidateFailureCapsule, emitWorkflowAnnotations, writeWorkflowValidateStepSummary, exportWorkflowReportJson, WorkflowValidateInfrastructureOutputSchema, createSuccessEnvelopeSchema, CLI_CONTRACT_VERSION, BASE_PORTS, runChecks, RunCheckOutputSchema, formatDuration as formatDuration$1, GITHUB_API, loadRunaConfig, getClassificationForProfile, loadRunaConfigOrThrow, recordSchemaAudit, RecordSchemaAuditOutputSchema, createBackup, CreateBackupOutputSchema, listBackups, ListBackupsOutputSchema, getBackupMetadata, restoreBackup, RestoreBackupOutputSchema, deleteBackup, DeleteBackupOutputSchema, detectSchemaNames, resolveAvailablePorts, calculatePortOffset, dbSeedApply, writeDbSeedStepSummary, DbSeedApplyOutputSchema, emitDbSeedFailureCapsule, syncEnvironment, EnvSyncOutputSchema, detectDatabasePackage, findProjectRoot as findProjectRoot$1, TelemetryEnableOutputSchema, TelemetryDisableOutputSchema, TelemetryStatusOutputSchema, workflowNotify, DevOpsSyncOutputSchema, WorkflowSyncOutputSchema, formatCLIError, getStatusIcon as getStatusIcon$1, findWorkspaceRoot as findWorkspaceRoot$1, checkExtensionConfig, getPortsWithOffset, UpgradeTransaction, readRunaVersion, syncTemplates, SyncOutputSchema, DATABASE_PACKAGE_CANDIDATES, ErrorEnvelopeSchema, preCheckSync, findConflictFiles, TestUnitGenOutputSchema, TestE2EGenerateOutputSchema, TestSecurityGenOutputSchema, TestApiGenOutputSchema, TestComponentGenOutputSchema } from '@runa-ai/runa';
|
|
10
10
|
import { z } from 'zod';
|
|
11
11
|
import fs9, { mkdir, writeFile, appendFile, readFile, rm, stat, realpath, cp, readdir, lstat } from 'fs/promises';
|
|
@@ -1161,7 +1161,7 @@ var CLI_VERSION, HAS_ADMIN_COMMAND;
|
|
|
1161
1161
|
var init_version = __esm({
|
|
1162
1162
|
"src/version.ts"() {
|
|
1163
1163
|
init_esm_shims();
|
|
1164
|
-
CLI_VERSION = "0.5.
|
|
1164
|
+
CLI_VERSION = "0.5.72";
|
|
1165
1165
|
HAS_ADMIN_COMMAND = false;
|
|
1166
1166
|
}
|
|
1167
1167
|
});
|
|
@@ -5301,7 +5301,7 @@ init_esm_shims();
|
|
|
5301
5301
|
var BuildPhaseSchema = z.enum(["types", "lint", "build", "db", "manifest"]);
|
|
5302
5302
|
var VALID_BUILD_PHASES = ["types", "lint", "build", "db", "manifest"];
|
|
5303
5303
|
var BuildInputSchema = z.object({
|
|
5304
|
-
/** Enable E2E mode (NEXT_PUBLIC_E2E_TEST=true
|
|
5304
|
+
/** Enable E2E mode (NEXT_PUBLIC_E2E_TEST=true) */
|
|
5305
5305
|
e2e: z.boolean().default(false),
|
|
5306
5306
|
/** Clear build caches (.next, .turbo, .runa/manifests) */
|
|
5307
5307
|
clean: z.boolean().default(false),
|
|
@@ -5683,8 +5683,7 @@ var buildActor = fromPromise(
|
|
|
5683
5683
|
if (e2e) {
|
|
5684
5684
|
buildEnv.NEXT_PUBLIC_E2E_TEST = "true";
|
|
5685
5685
|
buildEnv.E2E_TEST = "true";
|
|
5686
|
-
|
|
5687
|
-
console.log(" E2E mode enabled: NEXT_PUBLIC_E2E_TEST=true, TURBO_FORCE=true");
|
|
5686
|
+
console.log(" E2E mode enabled: NEXT_PUBLIC_E2E_TEST=true");
|
|
5688
5687
|
}
|
|
5689
5688
|
const hasApps = existsSync(path12__default.join(repoRoot, "apps"));
|
|
5690
5689
|
let args;
|
|
@@ -20455,8 +20454,8 @@ function releaseAdvisoryLock(_dbUrl, verbose) {
|
|
|
20455
20454
|
// src/commands/db/apply/helpers/plan-validator.ts
|
|
20456
20455
|
init_esm_shims();
|
|
20457
20456
|
var PlanHazardSchema = z.object({
|
|
20458
|
-
type: z.string().min(1),
|
|
20459
|
-
message: z.string()
|
|
20457
|
+
type: z.string().min(1).max(100).regex(/^[\w-]+$/),
|
|
20458
|
+
message: z.string().max(1e3)
|
|
20460
20459
|
});
|
|
20461
20460
|
var PlanStatementSchema = z.object({
|
|
20462
20461
|
index: z.number().int().nonnegative(),
|
|
@@ -20678,6 +20677,93 @@ function filterIdempotentProtectedStatements(plan, protectedTables, protectedObj
|
|
|
20678
20677
|
removedStatements: removed
|
|
20679
20678
|
};
|
|
20680
20679
|
}
|
|
20680
|
+
var ALLOWED_DDL_PREFIXES = [
|
|
20681
|
+
"CREATE TABLE",
|
|
20682
|
+
"ALTER TABLE",
|
|
20683
|
+
"DROP TABLE",
|
|
20684
|
+
"CREATE INDEX",
|
|
20685
|
+
"CREATE UNIQUE INDEX",
|
|
20686
|
+
"DROP INDEX",
|
|
20687
|
+
"CREATE SCHEMA",
|
|
20688
|
+
"ALTER SCHEMA",
|
|
20689
|
+
"DROP SCHEMA",
|
|
20690
|
+
"CREATE FUNCTION",
|
|
20691
|
+
"CREATE OR REPLACE FUNCTION",
|
|
20692
|
+
"ALTER FUNCTION",
|
|
20693
|
+
"DROP FUNCTION",
|
|
20694
|
+
"CREATE TRIGGER",
|
|
20695
|
+
"ALTER TRIGGER",
|
|
20696
|
+
"DROP TRIGGER",
|
|
20697
|
+
"CREATE VIEW",
|
|
20698
|
+
"CREATE OR REPLACE VIEW",
|
|
20699
|
+
"CREATE MATERIALIZED VIEW",
|
|
20700
|
+
"ALTER VIEW",
|
|
20701
|
+
"DROP VIEW",
|
|
20702
|
+
"DROP MATERIALIZED VIEW",
|
|
20703
|
+
"CREATE TYPE",
|
|
20704
|
+
"ALTER TYPE",
|
|
20705
|
+
"DROP TYPE",
|
|
20706
|
+
"CREATE SEQUENCE",
|
|
20707
|
+
"ALTER SEQUENCE",
|
|
20708
|
+
"DROP SEQUENCE",
|
|
20709
|
+
"CREATE POLICY",
|
|
20710
|
+
"ALTER POLICY",
|
|
20711
|
+
"DROP POLICY",
|
|
20712
|
+
"CREATE ROLE",
|
|
20713
|
+
"ALTER ROLE",
|
|
20714
|
+
"DROP ROLE",
|
|
20715
|
+
"CREATE EXTENSION",
|
|
20716
|
+
"ALTER EXTENSION",
|
|
20717
|
+
"DROP EXTENSION",
|
|
20718
|
+
"GRANT",
|
|
20719
|
+
"REVOKE",
|
|
20720
|
+
"SET",
|
|
20721
|
+
"COMMENT ON"
|
|
20722
|
+
];
|
|
20723
|
+
var BLOCKED_SQL_PATTERNS = [
|
|
20724
|
+
{ pattern: /^\s*INSERT\s+INTO\b/i, label: "INSERT" },
|
|
20725
|
+
{ pattern: /^\s*UPDATE\s+\S/i, label: "UPDATE" },
|
|
20726
|
+
{ pattern: /^\s*DELETE\s+FROM\b/i, label: "DELETE" },
|
|
20727
|
+
{ pattern: /^\s*TRUNCATE\b/i, label: "TRUNCATE" },
|
|
20728
|
+
{ pattern: /^\s*COPY\b/i, label: "COPY" },
|
|
20729
|
+
{ pattern: /^\s*DO\s+\$/i, label: "DO (anonymous block)" },
|
|
20730
|
+
{ pattern: /^\s*EXECUTE\b/i, label: "EXECUTE" },
|
|
20731
|
+
{ pattern: /^\s*SELECT\b/i, label: "SELECT" },
|
|
20732
|
+
{ pattern: /^\s*CALL\b/i, label: "CALL" }
|
|
20733
|
+
];
|
|
20734
|
+
function validateStatementTypes(plan) {
|
|
20735
|
+
if (plan.totalStatements === 0) return;
|
|
20736
|
+
const violations = [];
|
|
20737
|
+
for (const stmt of plan.statements) {
|
|
20738
|
+
const normalized = stmt.sql.replace(/\s+/g, " ").trim();
|
|
20739
|
+
const upper = normalized.toUpperCase();
|
|
20740
|
+
for (const blocked of BLOCKED_SQL_PATTERNS) {
|
|
20741
|
+
if (blocked.pattern.test(stmt.sql)) {
|
|
20742
|
+
violations.push(
|
|
20743
|
+
`Statement ${stmt.index}: Blocked SQL type "${blocked.label}" \u2014 ${normalized.slice(0, 80)}`
|
|
20744
|
+
);
|
|
20745
|
+
break;
|
|
20746
|
+
}
|
|
20747
|
+
}
|
|
20748
|
+
if (violations.length > 0 && violations[violations.length - 1].startsWith(`Statement ${stmt.index}:`)) {
|
|
20749
|
+
continue;
|
|
20750
|
+
}
|
|
20751
|
+
const isAllowed = ALLOWED_DDL_PREFIXES.some((prefix) => upper.startsWith(prefix));
|
|
20752
|
+
if (!isAllowed) {
|
|
20753
|
+
violations.push(
|
|
20754
|
+
`Statement ${stmt.index}: Unrecognized SQL type \u2014 ${normalized.slice(0, 80)}`
|
|
20755
|
+
);
|
|
20756
|
+
}
|
|
20757
|
+
}
|
|
20758
|
+
if (violations.length > 0) {
|
|
20759
|
+
throw new Error(
|
|
20760
|
+
`Plan contains non-DDL or dangerous SQL statements:
|
|
20761
|
+
${violations.map((v) => ` - ${v}`).join("\n")}
|
|
20762
|
+
|
|
20763
|
+
Only DDL statements (CREATE, ALTER, DROP, GRANT, REVOKE, SET, COMMENT ON) are allowed in schema migration plans.`
|
|
20764
|
+
);
|
|
20765
|
+
}
|
|
20766
|
+
}
|
|
20681
20767
|
function validatePlanForExecution(plan, allowedHazardTypes) {
|
|
20682
20768
|
if (plan.totalStatements === 0) return;
|
|
20683
20769
|
const allHazards = plan.statements.flatMap((s) => s.hazards);
|
|
@@ -21504,6 +21590,7 @@ async function executePlanSqlWithRetry(dbUrl, initialPlanSql, verbose, config) {
|
|
|
21504
21590
|
if (config?.allowedHazardTypes) {
|
|
21505
21591
|
validatePlanForExecution(plan, config.allowedHazardTypes);
|
|
21506
21592
|
}
|
|
21593
|
+
validateStatementTypes(plan);
|
|
21507
21594
|
if (verbose) {
|
|
21508
21595
|
logger5.debug(`Plan validated: ${plan.totalStatements} statement(s)`);
|
|
21509
21596
|
}
|
|
@@ -22009,8 +22096,21 @@ function prefilterPartitionStubs(schemasDir) {
|
|
|
22009
22096
|
if (!hasPartitions) {
|
|
22010
22097
|
copyFileSync(srcPath, destPath);
|
|
22011
22098
|
} else {
|
|
22099
|
+
const raw = readFileSync(srcPath, "utf-8");
|
|
22100
|
+
if (raw.length !== strippedContent.length) {
|
|
22101
|
+
copyFileSync(srcPath, destPath);
|
|
22102
|
+
allStubs.push(...stubs);
|
|
22103
|
+
continue;
|
|
22104
|
+
}
|
|
22012
22105
|
PARTITION_BLOCK_REGEX.lastIndex = 0;
|
|
22013
|
-
const
|
|
22106
|
+
const matches = [...strippedContent.matchAll(PARTITION_BLOCK_REGEX)];
|
|
22107
|
+
let filtered = raw;
|
|
22108
|
+
for (let i = matches.length - 1; i >= 0; i--) {
|
|
22109
|
+
const m = matches[i];
|
|
22110
|
+
if (m.index !== void 0) {
|
|
22111
|
+
filtered = filtered.slice(0, m.index) + filtered.slice(m.index + m[0].length);
|
|
22112
|
+
}
|
|
22113
|
+
}
|
|
22014
22114
|
writeFileSync(destPath, filtered, "utf-8");
|
|
22015
22115
|
allStubs.push(...stubs);
|
|
22016
22116
|
}
|
|
@@ -22456,60 +22556,42 @@ function verifyDataIntegrity(dbUrl, schemasDir, preApplyCounts, verbose, allowDa
|
|
|
22456
22556
|
logger8.debug(`Data integrity check passed (${preApplyCounts.size} table(s) verified)`);
|
|
22457
22557
|
}
|
|
22458
22558
|
}
|
|
22459
|
-
async function
|
|
22559
|
+
async function applyWithRetry(dbUrl, schemasDir, includeSchemas, input3, planOutput, hazards, protectedTables, protectedObjects, tempDbDsn, pgSchemaDiffDir) {
|
|
22460
22560
|
logger8.step("Applying schema changes (plan+psql)...");
|
|
22461
|
-
const
|
|
22462
|
-
|
|
22463
|
-
|
|
22464
|
-
|
|
22465
|
-
|
|
22466
|
-
|
|
22467
|
-
|
|
22468
|
-
|
|
22469
|
-
|
|
22470
|
-
|
|
22471
|
-
|
|
22472
|
-
|
|
22473
|
-
|
|
22474
|
-
rePlanFn: () => {
|
|
22475
|
-
const { planOutput: freshPlan } = executePgSchemaDiffPlan(
|
|
22476
|
-
dbUrl,
|
|
22477
|
-
pgSchemaDiffDir ?? schemasDir,
|
|
22478
|
-
includeSchemas,
|
|
22479
|
-
input3.verbose,
|
|
22480
|
-
{ tempDbDsn }
|
|
22481
|
-
);
|
|
22482
|
-
if (!freshPlan.trim() || freshPlan.includes("No changes")) {
|
|
22483
|
-
return null;
|
|
22484
|
-
}
|
|
22485
|
-
return freshPlan;
|
|
22486
|
-
}
|
|
22487
|
-
});
|
|
22488
|
-
if (!result.success) {
|
|
22489
|
-
throw result.error || new Error("Migration failed");
|
|
22490
|
-
}
|
|
22491
|
-
if (input3.verbose && result.attempts > 0) {
|
|
22492
|
-
logger8.debug(
|
|
22493
|
-
`Retry metrics: ${result.attempts} attempts, ${result.totalWaitMs}ms total wait`
|
|
22494
|
-
);
|
|
22495
|
-
}
|
|
22496
|
-
logger8.success("Schema changes applied");
|
|
22497
|
-
return {
|
|
22498
|
-
sql: planOutput,
|
|
22499
|
-
hazards,
|
|
22500
|
-
applied: true,
|
|
22501
|
-
retryAttempts: result.attempts,
|
|
22502
|
-
retryWaitMs: result.totalWaitMs
|
|
22503
|
-
};
|
|
22504
|
-
} finally {
|
|
22505
|
-
try {
|
|
22506
|
-
releaseAdvisoryLock(dbUrl, input3.verbose);
|
|
22507
|
-
} catch (lockError) {
|
|
22508
|
-
logger8.warn(
|
|
22509
|
-
`Failed to release advisory lock: ${lockError instanceof Error ? lockError.message : "Unknown error"}`
|
|
22561
|
+
const allowedHazardTypes = buildAllowedHazards(input3);
|
|
22562
|
+
const result = await executePlanSqlWithRetry(dbUrl, planOutput, input3.verbose, {
|
|
22563
|
+
maxDelayMs: input3.maxLockWaitMs,
|
|
22564
|
+
allowedHazardTypes,
|
|
22565
|
+
protectedTables,
|
|
22566
|
+
protectedObjects,
|
|
22567
|
+
rePlanFn: () => {
|
|
22568
|
+
const { planOutput: freshPlan } = executePgSchemaDiffPlan(
|
|
22569
|
+
dbUrl,
|
|
22570
|
+
pgSchemaDiffDir ?? schemasDir,
|
|
22571
|
+
includeSchemas,
|
|
22572
|
+
input3.verbose,
|
|
22573
|
+
{ tempDbDsn }
|
|
22510
22574
|
);
|
|
22575
|
+
if (!freshPlan.trim() || freshPlan.includes("No changes")) {
|
|
22576
|
+
return null;
|
|
22577
|
+
}
|
|
22578
|
+
return freshPlan;
|
|
22511
22579
|
}
|
|
22580
|
+
});
|
|
22581
|
+
if (!result.success) {
|
|
22582
|
+
throw result.error || new Error("Migration failed");
|
|
22583
|
+
}
|
|
22584
|
+
if (input3.verbose && result.attempts > 0) {
|
|
22585
|
+
logger8.debug(`Retry metrics: ${result.attempts} attempts, ${result.totalWaitMs}ms total wait`);
|
|
22512
22586
|
}
|
|
22587
|
+
logger8.success("Schema changes applied");
|
|
22588
|
+
return {
|
|
22589
|
+
sql: planOutput,
|
|
22590
|
+
hazards,
|
|
22591
|
+
applied: true,
|
|
22592
|
+
retryAttempts: result.attempts,
|
|
22593
|
+
retryWaitMs: result.totalWaitMs
|
|
22594
|
+
};
|
|
22513
22595
|
}
|
|
22514
22596
|
var ROLE_PASSWORD_CONFIGS = [
|
|
22515
22597
|
{
|
|
@@ -22748,6 +22830,12 @@ ${content}`;
|
|
|
22748
22830
|
}
|
|
22749
22831
|
}
|
|
22750
22832
|
const includeSchemas = detectAppSchemas(schemasDir, input3.verbose);
|
|
22833
|
+
const lockAcquired = await acquireAdvisoryLock(dbUrl, input3.verbose);
|
|
22834
|
+
if (!lockAcquired) {
|
|
22835
|
+
throw new Error(
|
|
22836
|
+
"Could not acquire migration lock. Another migration may be running. Wait for it to complete or manually release the lock."
|
|
22837
|
+
);
|
|
22838
|
+
}
|
|
22751
22839
|
cleanPartitionAclsForPgSchemaDiff(dbUrl, includeSchemas, input3.verbose);
|
|
22752
22840
|
const { planOutput } = executePgSchemaDiffPlan(
|
|
22753
22841
|
dbUrl,
|
|
@@ -22835,7 +22923,7 @@ ${content}`;
|
|
|
22835
22923
|
}
|
|
22836
22924
|
}
|
|
22837
22925
|
const preApplyCounts = getTableRowEstimates(dbUrl, schemasDir, input3.verbose);
|
|
22838
|
-
const applyResult = await
|
|
22926
|
+
const applyResult = await applyWithRetry(
|
|
22839
22927
|
dbUrl,
|
|
22840
22928
|
schemasDir,
|
|
22841
22929
|
includeSchemas,
|
|
@@ -22855,6 +22943,13 @@ ${content}`;
|
|
|
22855
22943
|
dataViolations: dataViolationCount > 0 ? dataViolationCount : void 0
|
|
22856
22944
|
};
|
|
22857
22945
|
} finally {
|
|
22946
|
+
try {
|
|
22947
|
+
releaseAdvisoryLock(dbUrl, input3.verbose);
|
|
22948
|
+
} catch (lockError) {
|
|
22949
|
+
logger8.warn(
|
|
22950
|
+
`Failed to release advisory lock: ${lockError instanceof Error ? lockError.message : "Unknown error"}`
|
|
22951
|
+
);
|
|
22952
|
+
}
|
|
22858
22953
|
if (shadowDb) {
|
|
22859
22954
|
try {
|
|
22860
22955
|
await shadowDb.cleanup();
|
|
@@ -34091,7 +34186,7 @@ init_esm_shims();
|
|
|
34091
34186
|
|
|
34092
34187
|
// src/constants/versions.ts
|
|
34093
34188
|
init_esm_shims();
|
|
34094
|
-
var COMPATIBLE_TEMPLATES_VERSION = "0.5.
|
|
34189
|
+
var COMPATIBLE_TEMPLATES_VERSION = "0.5.71";
|
|
34095
34190
|
var TEMPLATES_PACKAGE_NAME = "@r06-dev/runa-templates";
|
|
34096
34191
|
var GITHUB_PACKAGES_REGISTRY = "https://npm.pkg.github.com";
|
|
34097
34192
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runa-ai/runa-cli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.72",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "AI-powered DevOps CLI",
|
|
6
6
|
"type": "module",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"typescript": "5.9.3",
|
|
54
54
|
"xstate": "5.28.0",
|
|
55
55
|
"zod": "4.3.6",
|
|
56
|
-
"@runa-ai/runa": "0.5.
|
|
56
|
+
"@runa-ai/runa": "0.5.71",
|
|
57
57
|
"@runa-ai/runa-xstate-test-plugin": "0.5.58"
|
|
58
58
|
},
|
|
59
59
|
"engines": {
|