@runa-ai/runa-cli 0.10.2 → 0.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{build-P2A6345N.js → build-C65G2QQE.js} +3 -2
- package/dist/{chunk-UHDAYPHH.js → chunk-47BG6DRP.js} +1 -1
- package/dist/chunk-AYYHYZU7.js +3636 -0
- package/dist/{chunk-MAFJAA2P.js → chunk-C3SRIUWX.js} +1 -1
- package/dist/{chunk-QSEF4T3Y.js → chunk-F2AQ3EYJ.js} +10 -199
- package/dist/chunk-NOXYPVMZ.js +204 -0
- package/dist/{chunk-LCJNIHZY.js → chunk-OUMW5LKJ.js} +4745 -7689
- package/dist/{chunk-IR7SA2ME.js → chunk-WIT46HVC.js} +1 -1
- package/dist/{chunk-XFXGFUAM.js → chunk-XVGMGFKF.js} +1 -1
- package/dist/{chunk-WGRVAGSR.js → chunk-ZDETCPCE.js} +2 -2
- package/dist/{ci-6XYG7XNX.js → ci-Q4PLRFPB.js} +11 -9
- package/dist/{cli-2XL3VESS.js → cli-LS2THG3F.js} +12 -12
- package/dist/commands/db/apply/helpers/plan-check-filter.d.ts +1 -1
- 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/function-acl-manifest.d.ts +39 -0
- package/dist/{db-4AGPISOW.js → db-MB3LQIGI.js} +226 -166
- package/dist/{dev-QR55VDNZ.js → dev-N3BFJZ7F.js} +3 -2
- package/dist/{env-KYR6Q7WO.js → env-2XM45E7O.js} +4 -3
- package/dist/{env-XPPACZM4.js → env-KIMSQSPS.js} +3 -2
- package/dist/helpers-PDT3WQNF.js +15 -0
- package/dist/{hotfix-JYHDY2M6.js → hotfix-QP5J6FCD.js} +4 -3
- package/dist/index.js +3 -3
- package/dist/local-supabase-KTTC3O2L.js +8 -0
- package/dist/{risk-detector-GDDLISVE.js → risk-detector-4D5HRUMY.js} +1 -1
- package/dist/{risk-detector-core-YI3M6INI.js → risk-detector-core-CHUY6M5N.js} +1 -1
- package/dist/{vuln-check-LMDYYJUE.js → vuln-check-JSPRI5ZY.js} +1 -1
- package/dist/{vuln-checker-NHXLNZRM.js → vuln-checker-H3VJY5WX.js} +1 -1
- package/dist/{watch-4RHXVCQ3.js → watch-VQQHKDNQ.js} +1 -1
- package/package.json +1 -1
- package/dist/{risk-detector-plpgsql-4GWEQXUG.js → risk-detector-plpgsql-NNUZU3OQ.js} +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-CHUY6M5N.js').catch((error) => {
|
|
13
13
|
riskDetectorModulePromise = null;
|
|
14
14
|
throw error;
|
|
15
15
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
|
-
import { env } from './chunk-
|
|
3
|
+
import { env } from './chunk-47BG6DRP.js';
|
|
4
4
|
import { redactSecrets } from './chunk-II7VYQEM.js';
|
|
5
|
-
import { init_local_supabase, buildLocalDatabaseUrl } from './chunk-
|
|
5
|
+
import { init_local_supabase, buildLocalDatabaseUrl } from './chunk-F2AQ3EYJ.js';
|
|
6
6
|
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
7
7
|
import { CLIError } from '@runa-ai/runa';
|
|
8
8
|
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
|
-
import {
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-HWR5NUUZ.js';
|
|
6
|
-
import './chunk-UHDAYPHH.js';
|
|
3
|
+
import { runDbApply } from './chunk-AYYHYZU7.js';
|
|
4
|
+
import { normalizeDatabaseUrlForDdl, parseBoolish, enhanceConnectionError, isIdempotentRoleHazard, detectAppSchemas, formatSchemasForSql, getDbPlanArtifactPath } from './chunk-OUMW5LKJ.js';
|
|
7
5
|
import './chunk-EZ46JIEO.js';
|
|
6
|
+
import './chunk-ZDETCPCE.js';
|
|
7
|
+
import './chunk-HWR5NUUZ.js';
|
|
8
|
+
import './chunk-47BG6DRP.js';
|
|
9
|
+
import { createInitialSummary, resolveMode, appendGithubStepSummary, buildCiProdApplyStepSummaryMarkdown, setSummaryErrorFromUnknown, writeEnvLocal, startAppBackground, waitForAppReady, executePrSetupBase, createErrorOutput, requireCiAutoApprove, resolveProdApplyInputs, parseIntOr, classifyCiProdApplyError, addGithubMask } from './chunk-EXR4J2JT.js';
|
|
10
|
+
import './chunk-O3M7A73M.js';
|
|
11
|
+
import { parsePostgresUrl, buildPsqlArgs, buildPsqlEnv, psqlSyncQuery } from './chunk-A6A7JIRD.js';
|
|
8
12
|
import './chunk-IWVXI5O4.js';
|
|
9
|
-
import './chunk-
|
|
13
|
+
import './chunk-WIT46HVC.js';
|
|
10
14
|
import './chunk-B7C7CLW2.js';
|
|
11
15
|
import './chunk-QDF7QXBL.js';
|
|
12
16
|
import { getSnapshotStateName, getSnapshotStatePaths, isSnapshotComplete } from './chunk-XVNDDHAF.js';
|
|
13
|
-
import { createInitialSummary, resolveMode, appendGithubStepSummary, buildCiProdApplyStepSummaryMarkdown, setSummaryErrorFromUnknown, writeEnvLocal, startAppBackground, waitForAppReady, executePrSetupBase, createErrorOutput, requireCiAutoApprove, resolveProdApplyInputs, parseIntOr, classifyCiProdApplyError, addGithubMask } from './chunk-EXR4J2JT.js';
|
|
14
|
-
import './chunk-O3M7A73M.js';
|
|
15
|
-
import { parsePostgresUrl, buildPsqlArgs, buildPsqlEnv, psqlSyncQuery } from './chunk-A6A7JIRD.js';
|
|
16
17
|
import { ensureRunaTmpDir, runLogged } from './chunk-ELXXQIGW.js';
|
|
17
18
|
import { createMachineStateChangeLogger } from './chunk-5FT3F36G.js';
|
|
18
19
|
import { getSafeEnv, getFilteredEnv, redactSecrets } from './chunk-II7VYQEM.js';
|
|
19
|
-
import { init_constants
|
|
20
|
+
import { init_constants } from './chunk-NOXYPVMZ.js';
|
|
20
21
|
import { emitJsonSuccess } from './chunk-KE6QJBZG.js';
|
|
21
22
|
import './chunk-WJXC4MVY.js';
|
|
22
23
|
import { setOutputFormat } from './chunk-HKUWEGUX.js';
|
|
24
|
+
import { init_local_supabase, detectLocalSupabasePorts } from './chunk-F2AQ3EYJ.js';
|
|
23
25
|
import './chunk-OERS32LW.js';
|
|
24
26
|
import './chunk-GT5DMS5R.js';
|
|
25
27
|
import { init_esm_shims } from './chunk-VRXHCR5K.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-WIT46HVC.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';
|
|
@@ -165,12 +165,12 @@ async function registerProjectLifecycleCommands(program, requested, loadAllComma
|
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
167
|
if (requested === "build") {
|
|
168
|
-
const { buildCommand: buildCommand2 } = await import('./build-
|
|
168
|
+
const { buildCommand: buildCommand2 } = await import('./build-C65G2QQE.js');
|
|
169
169
|
program.addCommand(buildCommand2);
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
172
172
|
if (requested === "dev") {
|
|
173
|
-
const { devCommand: devCommand2 } = await import('./dev-
|
|
173
|
+
const { devCommand: devCommand2 } = await import('./dev-N3BFJZ7F.js');
|
|
174
174
|
program.addCommand(devCommand2);
|
|
175
175
|
return;
|
|
176
176
|
}
|
|
@@ -187,8 +187,8 @@ async function registerProjectLifecycleCommands(program, requested, loadAllComma
|
|
|
187
187
|
import('./prepare-32DOVHTE.js'),
|
|
188
188
|
import('./upgrade-X7P6WRD5.js'),
|
|
189
189
|
import('./validate-CAAW4Y44.js'),
|
|
190
|
-
import('./build-
|
|
191
|
-
import('./dev-
|
|
190
|
+
import('./build-C65G2QQE.js'),
|
|
191
|
+
import('./dev-N3BFJZ7F.js')
|
|
192
192
|
]);
|
|
193
193
|
program.addCommand(initCommand);
|
|
194
194
|
program.addCommand(prepareCommand);
|
|
@@ -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-Q4PLRFPB.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-MB3LQIGI.js');
|
|
470
470
|
program.addCommand(dbCommand);
|
|
471
471
|
}
|
|
472
472
|
async function registerServicesCommand(program) {
|
|
@@ -474,11 +474,11 @@ async function registerServicesCommand(program) {
|
|
|
474
474
|
program.addCommand(servicesCommand);
|
|
475
475
|
}
|
|
476
476
|
async function registerEnvCommand(program) {
|
|
477
|
-
const { envCommand } = await import('./env-
|
|
477
|
+
const { envCommand } = await import('./env-2XM45E7O.js');
|
|
478
478
|
program.addCommand(envCommand);
|
|
479
479
|
}
|
|
480
480
|
async function registerHotfixCommand(program) {
|
|
481
|
-
const { hotfixCommand } = await import('./hotfix-
|
|
481
|
+
const { hotfixCommand } = await import('./hotfix-QP5J6FCD.js');
|
|
482
482
|
program.addCommand(hotfixCommand);
|
|
483
483
|
}
|
|
484
484
|
async function registerSdkCommand(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-VQQHKDNQ.js');
|
|
494
494
|
program.addCommand(watchCommand);
|
|
495
495
|
}
|
|
496
496
|
async function registerWorkflowCommand(program) {
|
|
@@ -498,7 +498,7 @@ 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-JSPRI5ZY.js');
|
|
502
502
|
program.addCommand(vulnCheckCommand);
|
|
503
503
|
}
|
|
504
504
|
async function registerTemplateCheckCommand(program) {
|
|
@@ -714,7 +714,7 @@ async function executeProgram(program) {
|
|
|
714
714
|
silent: true
|
|
715
715
|
});
|
|
716
716
|
await enforceLicenseInCI();
|
|
717
|
-
await import('./env-
|
|
717
|
+
await import('./env-KIMSQSPS.js');
|
|
718
718
|
}
|
|
719
719
|
await program.parseAsync(process.argv);
|
|
720
720
|
}
|
|
@@ -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,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,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
|