@runa-ai/runa-cli 0.7.1 → 0.7.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/{build-HUDIP6KU.js → build-HQMSVN6N.js} +3 -3
- package/dist/{check-LOMVIRHX.js → check-PCSQPYDM.js} +2 -2
- package/dist/{chunk-QM53IQHM.js → chunk-2QX7T24B.js} +1 -1
- package/dist/{chunk-XDCHRVE3.js → chunk-4XHZQRRK.js} +2 -2
- package/dist/{chunk-7B5C6U2K.js → chunk-A6A7JIRD.js} +35 -2
- package/dist/{chunk-Z4Z5DNW4.js → chunk-B3POLMII.js} +12 -0
- package/dist/chunk-CKRLVEIO.js +119 -0
- package/dist/{chunk-HD74F6W2.js → chunk-FWMGC5FP.js} +1 -0
- package/dist/{chunk-H2AHNI75.js → chunk-LCK2LGVR.js} +1 -1
- package/dist/{chunk-FHG3ILE4.js → chunk-OBYZDT2E.js} +38 -8
- package/dist/{chunk-AFY3TX4I.js → chunk-PMXE5XOJ.js} +1 -1
- package/dist/{chunk-VM3IWOT5.js → chunk-QSEF4T3Y.js} +13 -5
- package/dist/{chunk-NPSRD26F.js → chunk-UHDAYPHH.js} +1 -1
- package/dist/{chunk-2APB25TT.js → chunk-VSH3IXDQ.js} +7 -3
- package/dist/{chunk-644FVGIQ.js → chunk-WPMR7RQ4.js} +9 -2
- package/dist/{chunk-EMB6IZFT.js → chunk-XVNDDHAF.js} +20 -1
- package/dist/{risk-detector-plpgsql-HWKS4OLR.js → chunk-Y5ANTCKE.js} +3 -412
- package/dist/{chunk-CCW3PLQY.js → chunk-Z7A4BEWF.js} +1 -1
- package/dist/{ci-XY6IKEDC.js → ci-Z4525QW6.js} +2150 -488
- package/dist/{cli-UZA4RBNQ.js → cli-Q2XIQDRS.js} +72 -54
- package/dist/commands/ci/commands/ci-prod-db-operations.d.ts +6 -4
- package/dist/commands/ci/commands/ci-prod-types.d.ts +3 -0
- package/dist/commands/ci/commands/ci-prod-workflow.d.ts +1 -1
- package/dist/commands/ci/commands/ci-resolvers.d.ts +1 -1
- package/dist/commands/ci/commands/ci-supabase-local.d.ts +4 -0
- package/dist/commands/ci/machine/actors/build/build-and-playwright.d.ts +1 -1
- package/dist/commands/ci/machine/actors/db/collect-schema-stats.d.ts +11 -1
- package/dist/commands/ci/machine/actors/db/production-preview.d.ts +22 -4
- package/dist/commands/ci/machine/actors/db/schema-canonical-diff.d.ts +8 -1
- package/dist/commands/ci/machine/actors/db/sync-schema.d.ts +1 -0
- package/dist/commands/ci/machine/actors/finalize/index.d.ts +0 -1
- package/dist/commands/ci/machine/actors/index.d.ts +1 -1
- package/dist/commands/ci/machine/actors/setup/local.d.ts +2 -0
- package/dist/commands/ci/machine/actors/setup/pr-common.d.ts +3 -0
- package/dist/commands/ci/machine/actors/setup/pr-local.d.ts +2 -0
- package/dist/commands/ci/machine/commands/machine-runner.d.ts +5 -1
- package/dist/commands/ci/machine/commands/step-telemetry.d.ts +16 -0
- package/dist/commands/ci/machine/contract.d.ts +40 -0
- package/dist/commands/ci/machine/formatters/github-comment-types.d.ts +7 -2
- package/dist/commands/ci/machine/formatters/github-comment.d.ts +2 -1
- package/dist/commands/ci/machine/formatters/sections/final-comment.d.ts +2 -1
- package/dist/commands/ci/machine/formatters/sections/index.d.ts +1 -1
- package/dist/commands/ci/machine/formatters/summary.d.ts +4 -4
- package/dist/commands/ci/machine/guards.d.ts +4 -0
- package/dist/commands/ci/machine/helpers.d.ts +25 -0
- package/dist/commands/ci/machine/machine-state-helpers.d.ts +1 -1
- package/dist/commands/ci/machine/machine.d.ts +15 -8
- package/dist/commands/ci/machine/types.d.ts +9 -0
- package/dist/commands/ci/utils/ci-diagnostics.d.ts +67 -0
- package/dist/commands/ci/utils/ci-summary.d.ts +118 -0
- package/dist/commands/ci/utils/db-url-utils.d.ts +4 -77
- package/dist/commands/ci/utils/github-api.d.ts +14 -0
- package/dist/commands/db/apply/contract.d.ts +73 -0
- package/dist/commands/db/apply/helpers/alter-statement-parsers.d.ts +95 -0
- package/dist/commands/db/apply/helpers/data-compatibility-checker.d.ts +0 -61
- package/dist/commands/db/apply/helpers/function-plan-false-positive-filter.d.ts +36 -0
- package/dist/commands/db/apply/helpers/hazard-handler.d.ts +4 -4
- package/dist/commands/db/apply/helpers/index.d.ts +14 -5
- package/dist/commands/db/apply/helpers/partition-acl-cleaner.d.ts +3 -1
- package/dist/commands/db/apply/helpers/pg-schema-diff-helpers.d.ts +69 -6
- package/dist/commands/db/apply/helpers/plan-ast.d.ts +56 -0
- package/dist/commands/db/apply/helpers/plan-check-filter.d.ts +26 -0
- package/dist/commands/db/apply/helpers/plan-drop-protection.d.ts +43 -0
- package/dist/commands/db/apply/helpers/plan-ordering.d.ts +6 -0
- package/dist/commands/db/apply/helpers/plan-statement-parser.d.ts +39 -0
- package/dist/commands/db/apply/helpers/plan-validator.d.ts +8 -40
- package/dist/commands/db/apply/helpers/retry-logic.d.ts +1 -10
- package/dist/commands/db/apply/helpers/temp-db-bootstrap.d.ts +18 -0
- package/dist/commands/db/apply/helpers/temp-db-dsn.d.ts +14 -0
- package/dist/commands/db/apply/machine.d.ts +56 -32
- package/dist/commands/db/commands/db-apply-error.d.ts +5 -0
- package/dist/commands/db/commands/db-apply.d.ts +2 -0
- package/dist/commands/db/commands/db-sync/directory-placement-check.d.ts +4 -0
- package/dist/commands/db/commands/db-sync/error-classifier.d.ts +1 -1
- package/dist/commands/db/commands/db-sync/plan-boundary-reconciliation.d.ts +3 -0
- package/dist/commands/db/commands/db-sync/precheck-helpers.d.ts +18 -0
- package/dist/commands/db/commands/db-sync/production-precheck.d.ts +15 -0
- package/dist/commands/db/commands/db-sync/risk-scan-collectors.d.ts +11 -0
- package/dist/commands/db/commands/db-sync.d.ts +11 -5
- package/dist/commands/db/sync/contract.d.ts +80 -0
- package/dist/commands/db/sync/machine.d.ts +60 -1
- package/dist/commands/db/types.d.ts +5 -0
- package/dist/commands/db/utils/boundary-policy/rule-compiler.d.ts +2 -1
- package/dist/commands/db/utils/boundary-policy/types.d.ts +21 -0
- package/dist/commands/db/utils/boundary-policy-runtime.d.ts +12 -3
- package/dist/commands/db/utils/boundary-policy.d.ts +1 -1
- package/dist/commands/db/utils/db-target.d.ts +5 -3
- package/dist/commands/db/utils/declarative-dependency-collectors.d.ts +6 -0
- package/dist/commands/db/utils/declarative-dependency-contract.d.ts +78 -0
- package/dist/commands/db/utils/declarative-dependency-sql-utils.d.ts +49 -0
- package/dist/commands/db/utils/declarative-dependency-warning-governance.d.ts +24 -0
- package/dist/commands/db/utils/preflight-check.d.ts +1 -1
- package/dist/commands/db/utils/preflight-checks/declarative-dependency-checks.d.ts +4 -0
- package/dist/commands/db/utils/preflight-checks/idempotent-risk-checks.d.ts +4 -0
- package/dist/commands/db/utils/preflight-checks/schema-boundary-checks.d.ts +4 -0
- package/dist/commands/db/utils/preflight-checks/schema-risk-policy.d.ts +4 -0
- package/dist/commands/db/utils/preflight-checks/supabase-checks.d.ts +12 -0
- package/dist/commands/db/utils/psql.d.ts +23 -0
- package/dist/commands/db/utils/sql-table-extractor.d.ts +42 -1
- package/dist/commands/env/commands/setup/types.d.ts +1 -0
- package/dist/commands/env/constants/local-supabase.d.ts +4 -1
- package/dist/commands/observability.d.ts +72 -0
- package/dist/commands/observability.helpers.d.ts +25 -0
- package/dist/commands/template-check/contract.d.ts +3 -3
- package/dist/commands/template-check/machine.d.ts +1 -1
- package/dist/commands/workflow/commands/deploy-production.d.ts +0 -1
- package/dist/constants/versions.d.ts +1 -1
- package/dist/{db-Q3GF7JWP.js → db-BPQ2TEQM.js} +14361 -11076
- package/dist/{dev-5YXNPTCJ.js → dev-MLRKIP7F.js} +5 -5
- package/dist/{doctor-MZLOA53G.js → doctor-ROSWSMLH.js} +2 -2
- package/dist/{env-GMB3THRG.js → env-WNHJVLOT.js} +37 -20
- package/dist/{env-HMMRSYCI.js → env-XPPACZM4.js} +2 -2
- package/dist/{env-files-2UIUYLLR.js → env-files-HRNUGZ5O.js} +1 -1
- package/dist/{error-handler-HEXBRNVV.js → error-handler-YRQWRDEF.js} +17 -0
- package/dist/{hotfix-NDTPY2T4.js → hotfix-Z5EGVSMH.js} +4 -4
- package/dist/index.js +4 -4
- package/dist/{init-U4VCRHTD.js → init-S2ATHLJ6.js} +1 -1
- package/dist/{inject-test-attrs-P44BVTQS.js → inject-test-attrs-XN4I2AOR.js} +2 -2
- package/dist/internal/machines/index.d.ts +1 -1
- package/dist/internal/machines/snapshot-helpers.d.ts +6 -0
- package/dist/{manifest-TMFLESHW.js → manifest-EGCAZ4TK.js} +1 -1
- package/dist/observability-CJA5UFIC.js +721 -0
- package/dist/{risk-detector-4U6ZJ2G5.js → risk-detector-VO5HJR4R.js} +1 -1
- package/dist/{risk-detector-core-TK4OAI3N.js → risk-detector-core-7WZJZ5ZI.js} +61 -3
- package/dist/risk-detector-plpgsql-ULV7NLDB.js +638 -0
- package/dist/{template-check-FFJVDLBF.js → template-check-BDFMT6ZO.js} +1 -1
- package/dist/{upgrade-7TWORWBV.js → upgrade-BDUWBRT5.js} +1 -1
- package/dist/utils/db-url-utils.d.ts +81 -0
- package/dist/validators/risk-detector-plpgsql.d.ts +3 -1
- package/dist/{vuln-check-6CMNPSBR.js → vuln-check-66RXX3TO.js} +1 -1
- package/dist/{vuln-checker-EJJTNDNE.js → vuln-checker-FFOGOJPT.js} +1 -1
- package/dist/{watch-PNTKZYFB.js → watch-ITYW57SL.js} +1 -1
- package/dist/{workflow-H75N4BXX.js → workflow-UZIZ2JUS.js} +2 -3
- package/package.json +3 -3
- package/dist/chunk-AKZAN4BC.js +0 -90
- package/dist/commands/ci/machine/actors/finalize/summary.d.ts +0 -32
|
@@ -79,6 +79,7 @@ export interface DbCommandOptions {
|
|
|
79
79
|
skipCodegen?: boolean;
|
|
80
80
|
/** Fail when generated schema still contains unresolved unknown(...) columns */
|
|
81
81
|
strictIntrospect?: boolean;
|
|
82
|
+
strict?: boolean;
|
|
82
83
|
json?: boolean;
|
|
83
84
|
sql?: boolean;
|
|
84
85
|
format?: string;
|
|
@@ -99,6 +100,10 @@ export interface DbCommandOptions {
|
|
|
99
100
|
skip?: boolean;
|
|
100
101
|
/** Subprocess timeout in milliseconds for db sync */
|
|
101
102
|
timeout?: number;
|
|
103
|
+
/** Snapshot phase timeout in milliseconds */
|
|
104
|
+
snapshotTimeoutMs?: number;
|
|
105
|
+
/** Sync phase timeout in milliseconds */
|
|
106
|
+
syncTimeoutMs?: number;
|
|
102
107
|
}
|
|
103
108
|
/**
|
|
104
109
|
* Seed validation result
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
* Purpose: Convert raw policy JSON arrays into typed allowlist rules
|
|
5
5
|
* and normalize a full policy object with fallback defaults.
|
|
6
6
|
*/
|
|
7
|
-
import type { BoundaryPolicy, BoundaryPolicyMeta, DeclarativeRiskAllowlistRule, DirectoryPlacementAllowlistRule, PolicyIssueFormatter } from './types.js';
|
|
7
|
+
import type { BoundaryPolicy, BoundaryPolicyMeta, DeclarativeClosureWarningAllowlistRule, DeclarativeRiskAllowlistRule, DirectoryPlacementAllowlistRule, PolicyIssueFormatter } from './types.js';
|
|
8
8
|
export declare function toDeclarativeRiskRules(rawList: unknown, issueFormatter: PolicyIssueFormatter): DeclarativeRiskAllowlistRule[];
|
|
9
9
|
export declare function toDirectoryPlacementRules(rawList: unknown, issueFormatter: PolicyIssueFormatter): DirectoryPlacementAllowlistRule[];
|
|
10
|
+
export declare function toDeclarativeClosureWarningRules(rawList: unknown, issueFormatter: PolicyIssueFormatter): DeclarativeClosureWarningAllowlistRule[];
|
|
10
11
|
export declare function normalizePolicySource(raw: unknown, source: BoundaryPolicyMeta['source'], sourcePath: string, issueFormatter: PolicyIssueFormatter): BoundaryPolicy;
|
|
11
12
|
//# sourceMappingURL=rule-compiler.d.ts.map
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* Purpose: Shared types for boundary-policy validation, compilation, and loading.
|
|
5
5
|
*/
|
|
6
6
|
export type BoundaryPolicyRiskLevel = 'high' | 'medium' | 'low';
|
|
7
|
+
export type DeclarativeClosureWarningCode = 'UNQUALIFIED_CUSTOM_FUNCTION_CALL' | 'DYNAMIC_SQL_EXECUTE';
|
|
8
|
+
export type DeclarativeClosureWarningLevel = 'high' | 'medium';
|
|
7
9
|
export type AllowlistMetadata = {
|
|
8
10
|
owner?: string;
|
|
9
11
|
ticket?: string;
|
|
@@ -34,6 +36,20 @@ export type DirectoryPlacementAllowlistRule = {
|
|
|
34
36
|
expiresAt?: string;
|
|
35
37
|
active: boolean;
|
|
36
38
|
};
|
|
39
|
+
export type DeclarativeClosureWarningAllowlistRule = {
|
|
40
|
+
id: string;
|
|
41
|
+
code: DeclarativeClosureWarningCode;
|
|
42
|
+
filePattern: RegExp;
|
|
43
|
+
anchorPattern?: RegExp;
|
|
44
|
+
lineStart: number;
|
|
45
|
+
lineEnd: number;
|
|
46
|
+
level?: DeclarativeClosureWarningLevel;
|
|
47
|
+
reason: string;
|
|
48
|
+
owner?: string;
|
|
49
|
+
ticket?: string;
|
|
50
|
+
expiresAt?: string;
|
|
51
|
+
active: boolean;
|
|
52
|
+
};
|
|
37
53
|
export type BoundaryPolicyRaw = {
|
|
38
54
|
version?: unknown;
|
|
39
55
|
description?: unknown;
|
|
@@ -42,10 +58,13 @@ export type BoundaryPolicyRaw = {
|
|
|
42
58
|
idempotentPreferredObjects?: unknown;
|
|
43
59
|
declarativeRiskAllowlist?: unknown;
|
|
44
60
|
directoryPlacementAllowlist?: unknown;
|
|
61
|
+
declarativeClosureWarningAllowlist?: unknown;
|
|
45
62
|
};
|
|
46
63
|
export type RawRule = {
|
|
47
64
|
id?: unknown;
|
|
65
|
+
code?: unknown;
|
|
48
66
|
filePattern?: unknown;
|
|
67
|
+
anchorPattern?: unknown;
|
|
49
68
|
descriptionPattern?: unknown;
|
|
50
69
|
messagePattern?: unknown;
|
|
51
70
|
level?: unknown;
|
|
@@ -74,6 +93,7 @@ export type BoundaryPolicy = {
|
|
|
74
93
|
idempotentPreferredObjects: Set<string>;
|
|
75
94
|
declarativeRiskAllowlist: DeclarativeRiskAllowlistRule[];
|
|
76
95
|
directoryPlacementAllowlist: DirectoryPlacementAllowlistRule[];
|
|
96
|
+
declarativeClosureWarningAllowlist: DeclarativeClosureWarningAllowlistRule[];
|
|
77
97
|
__meta: BoundaryPolicyMeta;
|
|
78
98
|
};
|
|
79
99
|
export type PolicyValidationSeverity = 'warning' | 'error';
|
|
@@ -93,6 +113,7 @@ export declare const FALLBACK_DECLARATIVE_OBJECTS: Set<string>;
|
|
|
93
113
|
export declare const FALLBACK_IDEMPOTENT_OBJECTS: Set<string>;
|
|
94
114
|
export declare const FALLBACK_DECLARATIVE_RISK_ALLOWLIST: DeclarativeRiskAllowlistRule[];
|
|
95
115
|
export declare const FALLBACK_DIRECTORY_PLACEMENT_ALLOWLIST: DirectoryPlacementAllowlistRule[];
|
|
116
|
+
export declare const FALLBACK_DECLARATIVE_CLOSURE_WARNING_ALLOWLIST: DeclarativeClosureWarningAllowlistRule[];
|
|
96
117
|
export declare function isObject(value: unknown): value is Record<string, unknown>;
|
|
97
118
|
export declare function isStringArray(value: unknown): value is string[];
|
|
98
119
|
export declare function isPastDate(value: string, today: string): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { loadBoundaryPolicy, type DeclarativeRiskAllowlistRule, type DirectoryPlacementAllowlistRule } from './boundary-policy.js';
|
|
1
|
+
import { loadBoundaryPolicy, type DeclarativeClosureWarningAllowlistRule, type DeclarativeRiskAllowlistRule, type DirectoryPlacementAllowlistRule } from './boundary-policy.js';
|
|
2
2
|
type Logger = {
|
|
3
3
|
warn: (message: string) => void;
|
|
4
4
|
info: (message: string) => void;
|
|
@@ -15,14 +15,23 @@ type DirectoryRiskLike = {
|
|
|
15
15
|
message: string;
|
|
16
16
|
line?: number;
|
|
17
17
|
};
|
|
18
|
+
type DeclarativeClosureWarningLike = {
|
|
19
|
+
code: DeclarativeClosureWarningAllowlistRule['code'];
|
|
20
|
+
level: 'high' | 'medium';
|
|
21
|
+
file: string;
|
|
22
|
+
line: number;
|
|
23
|
+
};
|
|
18
24
|
export declare function getBoundaryPolicy(cwd?: string): BoundaryPolicy;
|
|
19
25
|
export declare function reportBoundaryPolicyState(logger: Logger, policy: BoundaryPolicy): void;
|
|
20
26
|
export declare function assertBoundaryPolicyUsable(logger: Logger, policy: BoundaryPolicy): void;
|
|
21
27
|
export declare function assertBoundaryPolicyQualityGate(logger: Logger, policy: BoundaryPolicy, strict: boolean): void;
|
|
22
28
|
export declare function findDeclarativeRiskAllowlistMatch(risk: DeclarativeRiskLike, policy: BoundaryPolicy): DeclarativeRiskAllowlistRule | undefined;
|
|
23
|
-
export declare function hasExplicitLineScope(rule: DirectoryPlacementAllowlistRule): boolean;
|
|
24
|
-
export declare function entryLineScopeMatches(issueLine: number | undefined, rule: DirectoryPlacementAllowlistRule): boolean;
|
|
29
|
+
export declare function hasExplicitLineScope(rule: DirectoryPlacementAllowlistRule | Pick<DeclarativeClosureWarningAllowlistRule, 'lineStart' | 'lineEnd'>): boolean;
|
|
30
|
+
export declare function entryLineScopeMatches(issueLine: number | undefined, rule: DirectoryPlacementAllowlistRule | Pick<DeclarativeClosureWarningAllowlistRule, 'lineStart' | 'lineEnd'>): boolean;
|
|
25
31
|
export declare function findDirectoryPlacementAllowlistMatch(issue: DirectoryRiskLike, policy: BoundaryPolicy): DirectoryPlacementAllowlistRule | undefined;
|
|
32
|
+
export declare function findDeclarativeClosureWarningAllowlistMatch(warning: DeclarativeClosureWarningLike, policy: BoundaryPolicy, options?: {
|
|
33
|
+
cwd?: string;
|
|
34
|
+
}): DeclarativeClosureWarningAllowlistRule | undefined;
|
|
26
35
|
export declare function resolveProductionApplyStrictMode(policy: BoundaryPolicy, strictOption: boolean | undefined): boolean;
|
|
27
36
|
export {};
|
|
28
37
|
//# sourceMappingURL=boundary-policy-runtime.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BoundaryPolicy } from './boundary-policy/types.js';
|
|
2
|
-
export type { BoundaryPolicy, BoundaryPolicyMeta, BoundaryPolicyRiskLevel, DeclarativeRiskAllowlistRule, DirectoryPlacementAllowlistRule, } from './boundary-policy/types.js';
|
|
2
|
+
export type { BoundaryPolicy, BoundaryPolicyMeta, BoundaryPolicyRiskLevel, DeclarativeClosureWarningAllowlistRule, DeclarativeClosureWarningCode, DeclarativeRiskAllowlistRule, DirectoryPlacementAllowlistRule, } from './boundary-policy/types.js';
|
|
3
3
|
export { formatAllowlistMetadata } from './boundary-policy/types.js';
|
|
4
4
|
export declare function loadBoundaryPolicy(projectRoot: string, policyPath?: string): BoundaryPolicy;
|
|
5
5
|
//# sourceMappingURL=boundary-policy.d.ts.map
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
* PRD Naming Convention:
|
|
11
11
|
* - DATABASE_URL: drizzle_app (App runtime, DML only)
|
|
12
12
|
* - DATABASE_URL_ADMIN: postgres (Migrations, Drizzle Kit)
|
|
13
|
-
* - GH_DATABASE_URL: drizzle_app (CI: Production app)
|
|
14
13
|
* - GH_DATABASE_URL_ADMIN: postgres (CI: Production migrations)
|
|
15
14
|
*/
|
|
16
15
|
export type RunaDbEnv = 'local' | 'preview' | 'main' | 'production';
|
|
16
|
+
export type ResolvedDatabaseUrlSource = 'DATABASE_URL_ADMIN' | 'DATABASE_URL' | 'GH_DATABASE_URL_ADMIN' | 'LOCAL_SUPABASE';
|
|
17
17
|
/**
|
|
18
18
|
* Resolve database URL for a given environment (DDL operations).
|
|
19
19
|
*
|
|
@@ -35,13 +35,15 @@ export type RunaDbEnv = 'local' | 'preview' | 'main' | 'production';
|
|
|
35
35
|
* ### Production/Main environment:
|
|
36
36
|
* 1. GH_DATABASE_URL_ADMIN (CI: postgres role, DDL capable)
|
|
37
37
|
* 2. DATABASE_URL_ADMIN (non-CI: postgres role, DDL capable)
|
|
38
|
-
* 3. GH_DATABASE_URL (CI fallback)
|
|
39
|
-
* 4. DATABASE_URL (last resort fallback)
|
|
40
38
|
*
|
|
41
39
|
* @param environment - Target environment
|
|
42
40
|
* @returns Database URL string
|
|
43
41
|
* @throws CLIError if no URL found for preview/production
|
|
44
42
|
*/
|
|
43
|
+
export declare function resolveDatabaseTarget(environment: RunaDbEnv): {
|
|
44
|
+
url: string;
|
|
45
|
+
source: ResolvedDatabaseUrlSource;
|
|
46
|
+
};
|
|
45
47
|
export declare function resolveDatabaseUrl(environment: RunaDbEnv): string;
|
|
46
48
|
/**
|
|
47
49
|
* Try to resolve database URL without throwing.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DeclarativeDependencyWarning } from './declarative-dependency-contract.js';
|
|
2
|
+
import { type FunctionDefinition, type FunctionReference } from './declarative-dependency-sql-utils.js';
|
|
3
|
+
export declare function collectReferencesForStatement(statement: string, file: string, line: number): FunctionReference[];
|
|
4
|
+
export declare function collectCustomFunctionNames(definitions: FunctionDefinition[]): Set<string>;
|
|
5
|
+
export declare function collectWarningsForStatement(statement: string, file: string, line: number, knownFunctionNames: Set<string>): DeclarativeDependencyWarning[];
|
|
6
|
+
//# sourceMappingURL=declarative-dependency-collectors.d.ts.map
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: Declarative dependency contract analysis
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Analyze declarative SQL for function dependency closure violations
|
|
5
|
+
* and warnings. Ensures declarative desired-state SQL only references functions
|
|
6
|
+
* defined within declarative scope.
|
|
7
|
+
*
|
|
8
|
+
* Submodules:
|
|
9
|
+
* declarative-dependency-sql-utils.ts — SQL text processing + function extraction
|
|
10
|
+
* declarative-dependency-collectors.ts — Reference and warning collection
|
|
11
|
+
*/
|
|
12
|
+
import type { DeclarativeClosureWarningCode, DeclarativeClosureWarningLevel } from './boundary-policy/types.js';
|
|
13
|
+
import { type FunctionDefinition, type FunctionReference, type ReferenceSource, type SqlFile, type SqlLayer } from './declarative-dependency-sql-utils.js';
|
|
14
|
+
export type { FunctionDefinition, FunctionReference, SqlLayer, ReferenceSource, } from './declarative-dependency-sql-utils.js';
|
|
15
|
+
export interface DeclarativeDependencyViolation {
|
|
16
|
+
code: 'DECLARATIVE_IDEMPOTENT_ONLY_FUNCTION' | 'DECLARATIVE_UNKNOWN_MANAGED_FUNCTION' | 'DECLARATIVE_PUBLIC_UNKNOWN_FUNCTION';
|
|
17
|
+
file: string;
|
|
18
|
+
line: number;
|
|
19
|
+
qualifiedName: string;
|
|
20
|
+
source: ReferenceSource;
|
|
21
|
+
message: string;
|
|
22
|
+
suggestion: string;
|
|
23
|
+
definedIn?: {
|
|
24
|
+
file: string;
|
|
25
|
+
line: number;
|
|
26
|
+
layer: SqlLayer;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export interface DeclarativeDependencyWarning {
|
|
30
|
+
code: DeclarativeClosureWarningCode;
|
|
31
|
+
level: DeclarativeClosureWarningLevel;
|
|
32
|
+
file: string;
|
|
33
|
+
line: number;
|
|
34
|
+
source: ReferenceSource;
|
|
35
|
+
message: string;
|
|
36
|
+
suggestion: string;
|
|
37
|
+
}
|
|
38
|
+
export interface DeclarativeDependencyAnalysisResult {
|
|
39
|
+
contractNote: string;
|
|
40
|
+
managedSchemas: string[];
|
|
41
|
+
violations: DeclarativeDependencyViolation[];
|
|
42
|
+
warnings: DeclarativeDependencyWarning[];
|
|
43
|
+
references: FunctionReference[];
|
|
44
|
+
definitions: {
|
|
45
|
+
declarative: FunctionDefinition[];
|
|
46
|
+
idempotent: FunctionDefinition[];
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export interface FormattedDeclarativeDependencyViolation {
|
|
50
|
+
summary: string;
|
|
51
|
+
callee: string;
|
|
52
|
+
definedIn?: string;
|
|
53
|
+
suggestion: string;
|
|
54
|
+
}
|
|
55
|
+
export interface FormattedDeclarativeDependencyWarning {
|
|
56
|
+
summary: string;
|
|
57
|
+
suggestion: string;
|
|
58
|
+
}
|
|
59
|
+
export interface DeclarativeDependencyWarningSummary {
|
|
60
|
+
code: DeclarativeDependencyWarning['code'];
|
|
61
|
+
count: number;
|
|
62
|
+
label: string;
|
|
63
|
+
}
|
|
64
|
+
export declare const DECLARATIVE_CONTRACT_NOTE = "Declarative desired-state build ignores idempotent-only helpers from supabase/schemas/idempotent/*.sql.";
|
|
65
|
+
export declare const DB_APPLY_CHECK_MODE_CONTRACT_NOTE = "Check mode ignores idempotent-only helpers when building declarative desired state.";
|
|
66
|
+
export declare const MAX_DETAILED_DECLARATIVE_WARNINGS = 10;
|
|
67
|
+
declare function collectDefinitions(files: SqlFile[], layer: SqlLayer): FunctionDefinition[];
|
|
68
|
+
declare function collectDeclarativeReferences(files: SqlFile[]): FunctionReference[];
|
|
69
|
+
export declare function analyzeDeclarativeDependencyContract(targetDir?: string): DeclarativeDependencyAnalysisResult;
|
|
70
|
+
export declare function formatDeclarativeDependencyViolation(violation: DeclarativeDependencyViolation): FormattedDeclarativeDependencyViolation;
|
|
71
|
+
export declare function formatDeclarativeDependencyWarning(warning: DeclarativeDependencyWarning): FormattedDeclarativeDependencyWarning;
|
|
72
|
+
export declare function summarizeDeclarativeDependencyWarnings(warnings: DeclarativeDependencyWarning[]): DeclarativeDependencyWarningSummary[];
|
|
73
|
+
export { extractFirstDollarBody as _extractFirstDollarBody } from './declarative-dependency-sql-utils.js';
|
|
74
|
+
export { collectReferencesForStatement as _collectReferencesForStatement } from './declarative-dependency-collectors.js';
|
|
75
|
+
export { collectWarningsForStatement as _collectWarningsForStatement } from './declarative-dependency-collectors.js';
|
|
76
|
+
export declare const _collectDefinitions: typeof collectDefinitions;
|
|
77
|
+
export declare const _collectDeclarativeReferences: typeof collectDeclarativeReferences;
|
|
78
|
+
//# sourceMappingURL=declarative-dependency-contract.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export type SqlLayer = 'declarative' | 'idempotent';
|
|
2
|
+
export type ReferenceSource = 'statement' | 'function-body' | 'do-body';
|
|
3
|
+
export interface FunctionDefinition {
|
|
4
|
+
qualifiedName: string;
|
|
5
|
+
schema: string;
|
|
6
|
+
name: string;
|
|
7
|
+
file: string;
|
|
8
|
+
line: number;
|
|
9
|
+
layer: SqlLayer;
|
|
10
|
+
}
|
|
11
|
+
export interface FunctionReference {
|
|
12
|
+
qualifiedName: string;
|
|
13
|
+
schema: string;
|
|
14
|
+
name: string;
|
|
15
|
+
file: string;
|
|
16
|
+
line: number;
|
|
17
|
+
source: ReferenceSource;
|
|
18
|
+
}
|
|
19
|
+
export type SqlFile = {
|
|
20
|
+
absolutePath: string;
|
|
21
|
+
relativePath: string;
|
|
22
|
+
content: string;
|
|
23
|
+
};
|
|
24
|
+
export type ExtractedBody = {
|
|
25
|
+
body: string;
|
|
26
|
+
startLine: number;
|
|
27
|
+
};
|
|
28
|
+
export declare const FUNCTION_DEFINITION_RE: RegExp;
|
|
29
|
+
export declare const QUALIFIED_FUNCTION_CALL_RE: RegExp;
|
|
30
|
+
export declare const EXECUTE_FUNCTION_RE: RegExp;
|
|
31
|
+
export declare const UNQUALIFIED_FUNCTION_CALL_RE: RegExp;
|
|
32
|
+
export declare const DEFAULT_UNQUALIFIED_CALL_RE: RegExp;
|
|
33
|
+
export declare const CHECK_UNQUALIFIED_CALL_RE: RegExp;
|
|
34
|
+
export declare const DYNAMIC_SQL_EXECUTE_RE: RegExp;
|
|
35
|
+
export declare const STATIC_EXECUTE_LITERAL_RE: RegExp;
|
|
36
|
+
export declare const DOLLAR_TAG_RE: RegExp;
|
|
37
|
+
export declare const PUBLIC_SCHEMA = "public";
|
|
38
|
+
export declare function countNewlines(text: string): number;
|
|
39
|
+
export declare function collectSqlFiles(targetDir: string, layer: SqlLayer): SqlFile[];
|
|
40
|
+
export declare function blankQuotedStrings(content: string): string;
|
|
41
|
+
export declare function sanitizeTopLevelSql(statement: string): string;
|
|
42
|
+
export declare function sanitizeExecutableCode(content: string): string;
|
|
43
|
+
export declare function sanitizeExecutableCodePreserveStrings(content: string): string;
|
|
44
|
+
export declare function extractManagedSchemas(files: SqlFile[]): Set<string>;
|
|
45
|
+
export declare function extractDefinitionFromStatement(statement: string, file: string, line: number, layer: SqlLayer): FunctionDefinition | null;
|
|
46
|
+
export declare function extractFirstDollarBody(statement: string, baseLine: number): ExtractedBody | null;
|
|
47
|
+
export declare function shouldIgnoreQualifiedFunctionCall(prefix: string): boolean;
|
|
48
|
+
export declare function decodeSqlStringLiteral(literal: string): string | null;
|
|
49
|
+
//# sourceMappingURL=declarative-dependency-sql-utils.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { createCLILogger } from '@runa-ai/runa';
|
|
2
|
+
import { type DeclarativeClosureWarningAllowlistRule } from './boundary-policy.js';
|
|
3
|
+
import { type DeclarativeDependencyWarning } from './declarative-dependency-contract.js';
|
|
4
|
+
type Logger = Pick<ReturnType<typeof createCLILogger>, 'info' | 'warn'>;
|
|
5
|
+
export interface ReviewedDeclarativeDependencyWarning {
|
|
6
|
+
warning: DeclarativeDependencyWarning;
|
|
7
|
+
rule: DeclarativeClosureWarningAllowlistRule;
|
|
8
|
+
}
|
|
9
|
+
export interface DeclarativeDependencyWarningReview {
|
|
10
|
+
strict: boolean;
|
|
11
|
+
allowlistReportEnabled: boolean;
|
|
12
|
+
allowlistedWarnings: ReviewedDeclarativeDependencyWarning[];
|
|
13
|
+
unreviewedWarnings: DeclarativeDependencyWarning[];
|
|
14
|
+
}
|
|
15
|
+
export declare function reviewDeclarativeDependencyWarnings(params: {
|
|
16
|
+
cwd?: string;
|
|
17
|
+
logger: Logger;
|
|
18
|
+
warnings: DeclarativeDependencyWarning[];
|
|
19
|
+
strictOption?: boolean;
|
|
20
|
+
}): DeclarativeDependencyWarningReview;
|
|
21
|
+
export declare function logDeclarativeDependencyWarnings(logger: Logger, review: DeclarativeDependencyWarningReview): void;
|
|
22
|
+
export declare function buildDeclarativeDependencyWarningFailureLines(review: DeclarativeDependencyWarningReview): string[];
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=declarative-dependency-warning-governance.d.ts.map
|
|
@@ -30,5 +30,5 @@ export declare class StepCounter {
|
|
|
30
30
|
/**
|
|
31
31
|
* Run all preflight checks
|
|
32
32
|
*/
|
|
33
|
-
export declare function runPreflightChecks(env: string): Promise<PreflightCheckResult>;
|
|
33
|
+
export declare function runPreflightChecks(env: string, strict?: boolean): Promise<PreflightCheckResult>;
|
|
34
34
|
//# sourceMappingURL=preflight-check.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { createCLILogger } from '@runa-ai/runa';
|
|
2
|
+
import type { PreflightCheckResult, StepCounter } from '../preflight-check.js';
|
|
3
|
+
export declare function runDeclarativeDependencyCheck(result: PreflightCheckResult, logger: ReturnType<typeof createCLILogger>, step: StepCounter, strictOption?: boolean): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=declarative-dependency-checks.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { createCLILogger } from '@runa-ai/runa';
|
|
2
|
+
import type { PreflightCheckResult, StepCounter } from '../preflight-check.js';
|
|
3
|
+
export declare function runIdempotentSchemaRiskCheck(result: PreflightCheckResult, logger: ReturnType<typeof createCLILogger>, step: StepCounter, strictOption?: boolean): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=idempotent-risk-checks.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { createCLILogger } from '@runa-ai/runa';
|
|
2
|
+
import type { PreflightCheckResult, StepCounter } from '../preflight-check.js';
|
|
3
|
+
export declare function runSchemaBoundaryPlacementCheck(result: PreflightCheckResult, logger: ReturnType<typeof createCLILogger>, step: StepCounter, strictOption?: boolean): Promise<void>;
|
|
4
|
+
//# sourceMappingURL=schema-boundary-checks.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { RiskLevel, SchemaRisk } from '../../../../validators/risk-detector.js';
|
|
2
|
+
export declare function correctSyncPreflightRiskLevel(originalLevel: RiskLevel, reasonCode: string | undefined): RiskLevel;
|
|
3
|
+
export declare function applySyncPreflightRiskPolicy<T extends SchemaRisk>(risks: T[]): T[];
|
|
4
|
+
//# sourceMappingURL=schema-risk-policy.d.ts.map
|
|
@@ -17,6 +17,18 @@ export declare function isSupabaseStatusRunning(output: {
|
|
|
17
17
|
stdout: string;
|
|
18
18
|
stderr: string;
|
|
19
19
|
}): boolean;
|
|
20
|
+
export declare function classifySupabaseHealth(input: {
|
|
21
|
+
statusRunning: boolean;
|
|
22
|
+
dbConnected: boolean;
|
|
23
|
+
}): {
|
|
24
|
+
kind: 'ok';
|
|
25
|
+
} | {
|
|
26
|
+
kind: 'status-inconclusive-db-ready';
|
|
27
|
+
} | {
|
|
28
|
+
kind: 'db-unreachable';
|
|
29
|
+
} | {
|
|
30
|
+
kind: 'not-running';
|
|
31
|
+
};
|
|
20
32
|
/**
|
|
21
33
|
* Check if Supabase is running (local only)
|
|
22
34
|
*/
|
|
@@ -57,6 +57,8 @@ export declare function psqlSyncFile(params: {
|
|
|
57
57
|
databaseUrl: string;
|
|
58
58
|
filePath: string;
|
|
59
59
|
onErrorStop?: boolean;
|
|
60
|
+
/** Timeout in milliseconds (default: 5 minutes). */
|
|
61
|
+
timeout?: number;
|
|
60
62
|
}): {
|
|
61
63
|
status: number | null;
|
|
62
64
|
stdout: string;
|
|
@@ -71,4 +73,25 @@ export declare function psqlExec(params: {
|
|
|
71
73
|
databaseUrl: string;
|
|
72
74
|
sql: string;
|
|
73
75
|
}): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Execute multiple SQL statements in a single psql process via a temp file.
|
|
78
|
+
*
|
|
79
|
+
* Reduces connection count from N (one per statement) to 1.
|
|
80
|
+
* Uses ON_ERROR_STOP=off by default so individual statement failures
|
|
81
|
+
* don't block subsequent statements (matches non-fatal usage patterns).
|
|
82
|
+
*
|
|
83
|
+
* @param params - Batch execution parameters
|
|
84
|
+
* @returns Result with status, stdout, stderr
|
|
85
|
+
*/
|
|
86
|
+
export declare function psqlSyncBatch(params: {
|
|
87
|
+
databaseUrl: string;
|
|
88
|
+
statements: string[];
|
|
89
|
+
onErrorStop?: boolean;
|
|
90
|
+
/** Timeout in milliseconds (default: 60 seconds). */
|
|
91
|
+
timeout?: number;
|
|
92
|
+
}): {
|
|
93
|
+
status: number | null;
|
|
94
|
+
stdout: string;
|
|
95
|
+
stderr: string;
|
|
96
|
+
};
|
|
74
97
|
//# sourceMappingURL=psql.d.ts.map
|
|
@@ -22,7 +22,48 @@
|
|
|
22
22
|
* For full SQL parsing, use pg_catalog queries (see introspectColumns).
|
|
23
23
|
*/
|
|
24
24
|
import type { ForeignKeyDefinition, TableEntry } from '@runa-ai/runa/manifests';
|
|
25
|
-
|
|
25
|
+
interface SqlParserUtils {
|
|
26
|
+
isSqlParserAvailable(): Promise<boolean>;
|
|
27
|
+
parseSchemaDocument(sqlContent: string): Promise<{
|
|
28
|
+
tables: Array<{
|
|
29
|
+
schema: string;
|
|
30
|
+
name: string;
|
|
31
|
+
qualifiedName: string;
|
|
32
|
+
lineNumber?: number;
|
|
33
|
+
columns: Array<{
|
|
34
|
+
name: string;
|
|
35
|
+
type: string;
|
|
36
|
+
notNull: boolean;
|
|
37
|
+
hasDefault: boolean;
|
|
38
|
+
isPrimaryKey: boolean;
|
|
39
|
+
}>;
|
|
40
|
+
primaryKey?: string[];
|
|
41
|
+
foreignKeys: Array<{
|
|
42
|
+
column: string;
|
|
43
|
+
referencesTable: string;
|
|
44
|
+
referencesColumn: string;
|
|
45
|
+
onDelete?: 'CASCADE' | 'SET NULL' | 'SET DEFAULT' | 'RESTRICT' | 'NO ACTION';
|
|
46
|
+
onUpdate?: 'CASCADE' | 'SET NULL' | 'SET DEFAULT' | 'RESTRICT' | 'NO ACTION';
|
|
47
|
+
}>;
|
|
48
|
+
indexes: Array<{
|
|
49
|
+
name: string;
|
|
50
|
+
columns: string[];
|
|
51
|
+
isUnique: boolean;
|
|
52
|
+
}>;
|
|
53
|
+
}>;
|
|
54
|
+
policies: Array<{
|
|
55
|
+
schema: string;
|
|
56
|
+
table: string;
|
|
57
|
+
name: string;
|
|
58
|
+
for: 'select' | 'insert' | 'update' | 'delete' | 'all';
|
|
59
|
+
using?: string;
|
|
60
|
+
withCheck?: string;
|
|
61
|
+
}>;
|
|
62
|
+
}>;
|
|
63
|
+
parseCreateTables(sqlContent: string): Promise<unknown>;
|
|
64
|
+
parseIndexesForTables(sqlContent: string, tables: unknown[]): Promise<void>;
|
|
65
|
+
parseCreatePolicies(sqlContent: string): Promise<unknown>;
|
|
66
|
+
}
|
|
26
67
|
/**
|
|
27
68
|
* Get SQL parser utilities (requires AST to be available)
|
|
28
69
|
*/
|
|
@@ -17,6 +17,9 @@ export interface SupabaseConfig {
|
|
|
17
17
|
db: number;
|
|
18
18
|
studio: number;
|
|
19
19
|
}
|
|
20
|
+
export interface DetectLocalSupabasePortsOptions {
|
|
21
|
+
skipStatusDetection?: boolean;
|
|
22
|
+
}
|
|
20
23
|
/** @internal Exported for testing */
|
|
21
24
|
export declare function parseTomlPort(content: string, section: string, key: string): number | null;
|
|
22
25
|
/**
|
|
@@ -28,7 +31,7 @@ export declare function parseTomlPort(content: string, section: string, key: str
|
|
|
28
31
|
* 3. `supabase/config.toml` [api].port and [db].port
|
|
29
32
|
* 4. defaults
|
|
30
33
|
*/
|
|
31
|
-
export declare function detectLocalSupabasePorts(projectRoot?: string): SupabaseConfig;
|
|
34
|
+
export declare function detectLocalSupabasePorts(projectRoot?: string, options?: DetectLocalSupabasePortsOptions): SupabaseConfig;
|
|
32
35
|
/** @internal Exported for tests */
|
|
33
36
|
export declare function clearLocalSupabaseDetectionCache(): void;
|
|
34
37
|
/**
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Command } from 'commander';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const ObservabilityStatusInputSchema: z.ZodObject<{
|
|
4
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, z.core.$strict>;
|
|
6
|
+
export declare const ObservabilityStatusOutputSchema: z.ZodObject<{
|
|
7
|
+
ready: z.ZodBoolean;
|
|
8
|
+
targetDir: z.ZodString;
|
|
9
|
+
checks: z.ZodArray<z.ZodObject<{
|
|
10
|
+
name: z.ZodString;
|
|
11
|
+
status: z.ZodEnum<{
|
|
12
|
+
ok: "ok";
|
|
13
|
+
error: "error";
|
|
14
|
+
warning: "warning";
|
|
15
|
+
}>;
|
|
16
|
+
message: z.ZodString;
|
|
17
|
+
}, z.core.$strip>>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export declare const ObservabilityEnableInputSchema: z.ZodObject<{
|
|
20
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
21
|
+
check: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
+
skipFunctionDeploy: z.ZodOptional<z.ZodBoolean>;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
export declare const ObservabilityEnableOutputSchema: z.ZodObject<{
|
|
25
|
+
targetDir: z.ZodString;
|
|
26
|
+
checks: z.ZodArray<z.ZodObject<{
|
|
27
|
+
name: z.ZodString;
|
|
28
|
+
status: z.ZodEnum<{
|
|
29
|
+
ok: "ok";
|
|
30
|
+
error: "error";
|
|
31
|
+
warning: "warning";
|
|
32
|
+
}>;
|
|
33
|
+
message: z.ZodString;
|
|
34
|
+
}, z.core.$strip>>;
|
|
35
|
+
dbSyncApplied: z.ZodBoolean;
|
|
36
|
+
functionSecretSynced: z.ZodBoolean;
|
|
37
|
+
functionsDeployed: z.ZodArray<z.ZodString>;
|
|
38
|
+
skippedFunctions: z.ZodArray<z.ZodString>;
|
|
39
|
+
linkedProjectDetected: z.ZodBoolean;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
export declare const ObservabilityEmitTestEventInputSchema: z.ZodObject<{
|
|
42
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
|
43
|
+
accessToken: z.ZodOptional<z.ZodString>;
|
|
44
|
+
functionSecret: z.ZodOptional<z.ZodString>;
|
|
45
|
+
scopeKey: z.ZodOptional<z.ZodString>;
|
|
46
|
+
serviceName: z.ZodOptional<z.ZodString>;
|
|
47
|
+
environment: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, z.core.$strict>;
|
|
49
|
+
export declare const ObservabilityEmitTestEventOutputSchema: z.ZodObject<{
|
|
50
|
+
eventId: z.ZodString;
|
|
51
|
+
issueId: z.ZodNullable<z.ZodString>;
|
|
52
|
+
resolvedScopeKey: z.ZodString;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
export declare const ObservabilityDispatchInputSchema: z.ZodObject<{
|
|
55
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
|
56
|
+
accessToken: z.ZodOptional<z.ZodString>;
|
|
57
|
+
functionSecret: z.ZodOptional<z.ZodString>;
|
|
58
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
59
|
+
}, z.core.$strict>;
|
|
60
|
+
export declare const ObservabilityDispatchOutputSchema: z.ZodObject<{
|
|
61
|
+
processed: z.ZodNumber;
|
|
62
|
+
delivered: z.ZodNumber;
|
|
63
|
+
failed: z.ZodNumber;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
export declare const observabilityStatusCommand: Command;
|
|
66
|
+
export declare const observabilityCheckCommand: Command;
|
|
67
|
+
export declare const observabilityDoctorCommand: Command;
|
|
68
|
+
export declare const observabilityEnableCommand: Command;
|
|
69
|
+
export declare const observabilityEmitTestEventCommand: Command;
|
|
70
|
+
export declare const observabilityDispatchCommand: Command;
|
|
71
|
+
export declare const observabilityCommand: Command;
|
|
72
|
+
//# sourceMappingURL=observability.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface ObservabilityStatusItem {
|
|
2
|
+
name: string;
|
|
3
|
+
status: 'ok' | 'warning' | 'error';
|
|
4
|
+
message: string;
|
|
5
|
+
}
|
|
6
|
+
interface ObservabilityFunctionSecretSyncMarker {
|
|
7
|
+
version: 1;
|
|
8
|
+
projectRef: string;
|
|
9
|
+
secretHash: string;
|
|
10
|
+
syncedAt: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function detectSupabaseProjectLink(targetDir: string): boolean;
|
|
13
|
+
export declare function resolveSupabaseProjectRef(targetDir: string): string | null;
|
|
14
|
+
export declare function hashObservabilityFunctionSecret(secret: string): string;
|
|
15
|
+
export declare function readObservabilityFunctionSecretSyncMarker(targetDir: string): ObservabilityFunctionSecretSyncMarker | null;
|
|
16
|
+
export declare function writeObservabilityFunctionSecretSyncMarker(targetDir: string, input: {
|
|
17
|
+
projectRef: string;
|
|
18
|
+
secret: string;
|
|
19
|
+
}): void;
|
|
20
|
+
export declare function buildObservabilityChecks(targetDir: string): ObservabilityStatusItem[];
|
|
21
|
+
export declare function isBlockingObservabilityCheck(check: ObservabilityStatusItem): boolean;
|
|
22
|
+
export declare function getObservabilityEnableBlockingChecks(targetDir: string, checks: ObservabilityStatusItem[]): ObservabilityStatusItem[];
|
|
23
|
+
export declare function isObservabilityReady(checks: ObservabilityStatusItem[]): boolean;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=observability.helpers.d.ts.map
|
|
@@ -55,12 +55,12 @@ export declare const FileCategorySchema: z.ZodEnum<{
|
|
|
55
55
|
rules: "rules";
|
|
56
56
|
workflows: "workflows";
|
|
57
57
|
config: "config";
|
|
58
|
+
other: "other";
|
|
58
59
|
agents: "agents";
|
|
59
60
|
skills: "skills";
|
|
60
61
|
commands: "commands";
|
|
61
62
|
prompts: "prompts";
|
|
62
63
|
"root-docs": "root-docs";
|
|
63
|
-
other: "other";
|
|
64
64
|
}>;
|
|
65
65
|
export type FileCategory = z.infer<typeof FileCategorySchema>;
|
|
66
66
|
/**
|
|
@@ -74,12 +74,12 @@ export declare const ComparisonResultSchema: z.ZodObject<{
|
|
|
74
74
|
rules: "rules";
|
|
75
75
|
workflows: "workflows";
|
|
76
76
|
config: "config";
|
|
77
|
+
other: "other";
|
|
77
78
|
agents: "agents";
|
|
78
79
|
skills: "skills";
|
|
79
80
|
commands: "commands";
|
|
80
81
|
prompts: "prompts";
|
|
81
82
|
"root-docs": "root-docs";
|
|
82
|
-
other: "other";
|
|
83
83
|
}>;
|
|
84
84
|
status: z.ZodEnum<{
|
|
85
85
|
diff: "diff";
|
|
@@ -128,12 +128,12 @@ export declare const SyncCheckOutputSchema: z.ZodObject<{
|
|
|
128
128
|
rules: "rules";
|
|
129
129
|
workflows: "workflows";
|
|
130
130
|
config: "config";
|
|
131
|
+
other: "other";
|
|
131
132
|
agents: "agents";
|
|
132
133
|
skills: "skills";
|
|
133
134
|
commands: "commands";
|
|
134
135
|
prompts: "prompts";
|
|
135
136
|
"root-docs": "root-docs";
|
|
136
|
-
other: "other";
|
|
137
137
|
}>;
|
|
138
138
|
status: z.ZodEnum<{
|
|
139
139
|
diff: "diff";
|
|
@@ -46,7 +46,7 @@ export declare const syncCheckMachine: import("xstate").StateMachine<SyncCheckCo
|
|
|
46
46
|
results: {
|
|
47
47
|
runaPath: string | null;
|
|
48
48
|
templatePath: string | null;
|
|
49
|
-
category: "database" | "rules" | "workflows" | "config" | "agents" | "skills" | "commands" | "prompts" | "root-docs"
|
|
49
|
+
category: "database" | "rules" | "workflows" | "config" | "other" | "agents" | "skills" | "commands" | "prompts" | "root-docs";
|
|
50
50
|
status: "diff" | "identical" | "renamed" | "runa-only" | "template-only" | "expected-runa-only" | "expected-template-only" | "intentionally-different";
|
|
51
51
|
ahead?: "runa" | "template" | "diverged" | "equal" | undefined;
|
|
52
52
|
lineDiff?: string | undefined;
|
|
@@ -4,7 +4,6 @@ import { Command } from 'commander';
|
|
|
4
4
|
*
|
|
5
5
|
* PRD Naming Convention:
|
|
6
6
|
* - GH_DATABASE_URL_ADMIN = postgres role (DDL capable, for schema deployment)
|
|
7
|
-
* - GH_DATABASE_URL = drizzle_app role (app runtime)
|
|
8
7
|
*/
|
|
9
8
|
export declare const deployProductionCommand: Command;
|
|
10
9
|
//# sourceMappingURL=deploy-production.d.ts.map
|