@runa-ai/runa-cli 0.10.2 → 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-LCJNIHZY.js → chunk-S7VGVFYF.js} +4933 -4288
- package/dist/{chunk-IR7SA2ME.js → chunk-SS7RIWW3.js} +1 -1
- package/dist/{ci-6XYG7XNX.js → ci-6P7VK6WB.js} +2 -2
- package/dist/{cli-2XL3VESS.js → cli-Q665YRVT.js} +4 -4
- 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-BQOVOQXU.js} +178 -137
- package/dist/index.js +3 -3
- package/dist/{vuln-check-LMDYYJUE.js → vuln-check-WW43E7PS.js} +1 -1
- package/dist/{vuln-checker-NHXLNZRM.js → vuln-checker-BC3ZAXJ3.js} +1 -1
- package/package.json +3 -3
|
@@ -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
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';
|
|
@@ -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) {
|
|
@@ -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-WW43E7PS.js');
|
|
502
502
|
program.addCommand(vulnCheckCommand);
|
|
503
503
|
}
|
|
504
504
|
async function registerTemplateCheckCommand(program) {
|
|
@@ -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
|