@runa-ai/runa-cli 0.8.0 → 0.10.0
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-HQMSVN6N.js → build-P2A6345N.js} +2 -2
- package/dist/{check-PCSQPYDM.js → check-4TZHNOZU.js} +4 -4
- package/dist/{chunk-DRSUEMAK.js → chunk-B7C7CLW2.js} +2 -5
- package/dist/{chunk-B3POLMII.js → chunk-BQ336L5T.js} +1 -1
- package/dist/{chunk-6FAU4IGR.js → chunk-ELXXQIGW.js} +4 -1
- package/dist/{chunk-RB2ZUS76.js → chunk-EXR4J2JT.js} +52 -16
- package/dist/{chunk-JMJP4A47.js → chunk-GT5DMS5R.js} +20 -2
- package/dist/{chunk-3JO6YP3T.js → chunk-IEKYTCYA.js} +1 -1
- package/dist/{chunk-WPMR7RQ4.js → chunk-IWVXI5O4.js} +2 -2
- package/dist/chunk-KUH3G522.js +72 -0
- package/dist/{chunk-VSH3IXDQ.js → chunk-MAFJAA2P.js} +1 -1
- package/dist/{chunk-CCKG5R4Y.js → chunk-MILCC3B6.js} +1 -1
- package/dist/{chunk-5NKWR4FF.js → chunk-OERS32LW.js} +1 -1
- package/dist/{chunk-GHQH6UC5.js → chunk-OXQISY3J.js} +1 -1
- package/dist/chunk-QDOR3GTD.js +9043 -0
- package/dist/{chunk-2QX7T24B.js → chunk-QKGL6Q2S.js} +1 -1
- package/dist/{chunk-OBYZDT2E.js → chunk-URWDB7YL.js} +15 -78
- package/dist/{chunk-ZYT7OQJB.js → chunk-WGRVAGSR.js} +6 -6
- package/dist/chunk-ZWDWFMOX.js +1514 -0
- package/dist/{ci-ZK3LKYFX.js → ci-FLTJ2UXB.js} +992 -849
- package/dist/{cli-ZY5VRIJA.js → cli-THEA6T7N.js} +31 -31
- package/dist/commands/ci/commands/ci-prod-db-operations.d.ts +12 -17
- package/dist/commands/ci/commands/ci-prod-utils.d.ts +7 -0
- package/dist/commands/ci/commands/layer4-discovery.d.ts +2 -0
- package/dist/commands/ci/machine/actors/db/production-preview.d.ts +4 -3
- package/dist/commands/ci/machine/actors/db/sync-schema.d.ts +5 -1
- package/dist/commands/ci/machine/actors/test/capabilities.d.ts +2 -13
- package/dist/commands/ci/machine/actors/test/index.d.ts +1 -0
- package/dist/commands/ci/machine/actors/test/layer-content.d.ts +11 -0
- package/dist/commands/ci/machine/commands/ci-pr-internal-profile.d.ts +7 -0
- package/dist/commands/ci/machine/commands/ci-step-registry.d.ts +25 -0
- package/dist/commands/ci/machine/commands/step-telemetry.d.ts +1 -2
- package/dist/commands/ci/machine/contract.d.ts +3 -0
- package/dist/commands/ci/machine/guards.d.ts +3 -10
- package/dist/commands/ci/machine/helpers.d.ts +1 -1
- package/dist/commands/ci/machine/machine-execution-helpers.d.ts +5 -2
- package/dist/commands/ci/machine/machine.d.ts +24 -30
- package/dist/commands/ci/machine/selectors.d.ts +6 -0
- package/dist/commands/ci/machine/types.d.ts +3 -1
- package/dist/commands/ci/utils/ci-logging.d.ts +16 -0
- package/dist/commands/ci/utils/rls-verification.d.ts +3 -2
- package/dist/commands/db/apply/actors/pg-schema-diff-actors.d.ts +1 -0
- package/dist/commands/db/apply/contract.d.ts +209 -0
- package/dist/commands/db/apply/helpers/fresh-db-handler.d.ts +2 -1
- package/dist/commands/db/apply/helpers/index.d.ts +3 -1
- package/dist/commands/db/apply/helpers/plan-ast-sql-helpers.d.ts +19 -0
- package/dist/commands/db/apply/helpers/plan-ast.d.ts +1 -2
- package/dist/commands/db/apply/helpers/plan-check-filter.d.ts +0 -14
- package/dist/commands/db/apply/helpers/plan-validator.d.ts +34 -0
- package/dist/commands/db/apply/helpers/planner-artifact.d.ts +65 -0
- package/dist/commands/db/apply/helpers/retry-logic.d.ts +5 -0
- package/dist/commands/db/apply/machine.d.ts +50 -15
- package/dist/commands/db/commands/db-apply-error.d.ts +6 -1
- package/dist/commands/db/commands/db-apply.d.ts +5 -0
- package/dist/commands/db/commands/db-plan.d.ts +3 -0
- package/dist/commands/db/commands/db-preview-profile.d.ts +23 -0
- package/dist/commands/db/commands/db-preview.d.ts +3 -0
- package/dist/commands/db/sync/actors.d.ts +1 -0
- package/dist/commands/db/sync/contract.d.ts +16 -0
- package/dist/commands/db/sync/guardrail-orchestrator.d.ts +15 -0
- package/dist/commands/db/sync/guardrail-reporting.d.ts +12 -0
- package/dist/commands/db/sync/index.d.ts +4 -0
- package/dist/commands/db/sync/machine.d.ts +18 -13
- package/dist/commands/db/sync/schema-guardrail-config-test-support.d.ts +15 -0
- package/dist/commands/db/sync/schema-guardrail-config.d.ts +11 -0
- package/dist/commands/db/sync/schema-guardrail-ddl-order.d.ts +36 -0
- package/dist/commands/db/sync/schema-guardrail-graph-guidance.d.ts +15 -0
- package/dist/commands/db/sync/schema-guardrail-graph-metadata.d.ts +41 -0
- package/dist/commands/db/sync/schema-guardrail-graph-nodes.d.ts +61 -0
- package/dist/commands/db/sync/schema-guardrail-graph-sql-helpers.d.ts +31 -0
- package/dist/commands/db/sync/schema-guardrail-graph-types.d.ts +56 -0
- package/dist/commands/db/sync/schema-guardrail-graph.d.ts +20 -0
- package/dist/commands/db/sync/schema-guardrail-local-blockers.d.ts +7 -0
- package/dist/commands/db/sync/schema-guardrail-phases.d.ts +26 -0
- package/dist/commands/db/sync/schema-guardrail-production-check.d.ts +23 -0
- package/dist/commands/db/sync/schema-guardrail-rewrite.d.ts +46 -0
- package/dist/commands/db/sync/schema-guardrail-runtime.d.ts +5 -0
- package/dist/commands/db/sync/schema-guardrail-semantic-warnings.d.ts +9 -0
- package/dist/commands/db/sync/schema-guardrail-types.d.ts +243 -0
- package/dist/commands/db/sync/schema-guardrail.d.ts +10 -0
- package/dist/commands/db/utils/declarative-dependency-sql-utils.d.ts +1 -1
- package/dist/commands/db/utils/duplicate-function-ownership.d.ts +27 -1
- package/dist/commands/db/utils/policy-cross-schema-refs.d.ts +12 -0
- package/dist/commands/db/utils/sql-table-extractor.d.ts +6 -0
- package/dist/commands/test/commands/layer4-prereqs.d.ts +15 -0
- package/dist/{config-loader-GT3HAQ7U.js → config-loader-N5ODNMD5.js} +2 -2
- package/dist/db-IDKQ44VX.js +12757 -0
- package/dist/{dev-GB5ERUVR.js → dev-LGSMDFJN.js} +7 -6
- package/dist/{doctor-ROSWSMLH.js → doctor-GYX73IEW.js} +4 -4
- package/dist/{env-WP74UUMO.js → env-KYR6Q7WO.js} +15 -10
- package/dist/{env-files-HRNUGZ5O.js → env-files-ONBC47I6.js} +3 -3
- package/dist/{hotfix-TOSGTVCW.js → hotfix-RJIAPLAM.js} +4 -4
- package/dist/index.js +3 -3
- package/dist/{init-35JLDFHI.js → init-2O6ODG5Z.js} +2 -2
- package/dist/{inject-test-attrs-XN4I2AOR.js → inject-test-attrs-F5A346UV.js} +3 -3
- package/dist/{manifest-EGCAZ4TK.js → manifest-CI4BRWEB.js} +2 -2
- package/dist/{observability-CJA5UFIC.js → observability-WNSCJ5FV.js} +2 -2
- package/dist/pg-schema-diff-helpers-7377FS2D.js +7 -0
- package/dist/{sdk-XK6HQU7S.js → sdk-BTIVPEE5.js} +1 -1
- package/dist/{template-check-BDFMT6ZO.js → template-check-VNNQQXCX.js} +10 -0
- package/dist/{test-V4KQL574.js → test-QCPN6Z47.js} +74 -46
- package/dist/{upgrade-7L4JIE4K.js → upgrade-QZKEI3NJ.js} +2 -2
- package/dist/utils/db-url-utils.d.ts +4 -77
- package/dist/{vuln-check-G6I4YYDC.js → vuln-check-JRPMUHLF.js} +1 -1
- package/dist/{vuln-checker-CT2AYPIS.js → vuln-checker-Q7LSHUHJ.js} +1 -1
- package/dist/{watch-AL4LCBRM.js → watch-RFVCEQLH.js} +3 -3
- package/dist/{workflow-UZIZ2JUS.js → workflow-UOG6ZZMH.js} +3 -3
- package/package.json +3 -3
- package/dist/chunk-6E2DRXIL.js +0 -452
- package/dist/db-EPI2DQYN.js +0 -18275
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { startAppBackground, waitForAppReady, detectApp } from './chunk-EXR4J2JT.js';
|
|
4
|
+
import { writeEnvLocalBridge } from './chunk-KUH3G522.js';
|
|
5
|
+
import { generateTablesManifest } from './chunk-URWDB7YL.js';
|
|
5
6
|
import './chunk-A6A7JIRD.js';
|
|
6
|
-
import { manifestActor, supabaseStartActor, envCheckActor, depsInstallActor, detectManifestTask, detectDatabase } from './chunk-
|
|
7
|
+
import { manifestActor, supabaseStartActor, envCheckActor, depsInstallActor, detectManifestTask, detectDatabase } from './chunk-MAFJAA2P.js';
|
|
7
8
|
import { findRepoRoot } from './chunk-3WDV32GA.js';
|
|
8
|
-
import './chunk-
|
|
9
|
+
import './chunk-ELXXQIGW.js';
|
|
9
10
|
import { createMachineStateChangeLogger } from './chunk-5FT3F36G.js';
|
|
10
11
|
import './chunk-II7VYQEM.js';
|
|
11
12
|
import { init_local_supabase, buildLocalDatabaseUrl, detectLocalSupabasePorts } from './chunk-QSEF4T3Y.js';
|
|
@@ -13,8 +14,8 @@ import { secureExeca } from './chunk-RZLYEO4U.js';
|
|
|
13
14
|
import { emitJsonSuccess } from './chunk-KE6QJBZG.js';
|
|
14
15
|
import './chunk-WJXC4MVY.js';
|
|
15
16
|
import './chunk-HKUWEGUX.js';
|
|
16
|
-
import './chunk-
|
|
17
|
-
import './chunk-
|
|
17
|
+
import './chunk-OERS32LW.js';
|
|
18
|
+
import './chunk-GT5DMS5R.js';
|
|
18
19
|
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
19
20
|
import { createCLILogger, CLIError } from '@runa-ai/runa';
|
|
20
21
|
import { Command } from 'commander';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
|
-
import { runCheckCommand } from './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
3
|
+
import { runCheckCommand } from './chunk-QKGL6Q2S.js';
|
|
4
|
+
import './chunk-IWVXI5O4.js';
|
|
5
|
+
import './chunk-B7C7CLW2.js';
|
|
6
6
|
import './chunk-KE6QJBZG.js';
|
|
7
7
|
import './chunk-WJXC4MVY.js';
|
|
8
8
|
import './chunk-HKUWEGUX.js';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-GT5DMS5R.js';
|
|
10
10
|
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
11
11
|
import { CLIError } from '@runa-ai/runa/cli-runtime';
|
|
12
12
|
import { Command } from 'commander';
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
|
-
import { registerCleanup } from './chunk-TYIAD6SB.js';
|
|
4
|
-
import { tryResolveDatabaseUrl } from './chunk-ZYT7OQJB.js';
|
|
5
3
|
import { isNonInteractiveEnabled } from './chunk-6Y3LAUGL.js';
|
|
4
|
+
import { registerCleanup } from './chunk-TYIAD6SB.js';
|
|
5
|
+
import { tryResolveDatabaseUrl } from './chunk-WGRVAGSR.js';
|
|
6
6
|
import './chunk-UHDAYPHH.js';
|
|
7
|
-
import { loadEnvFiles } from './chunk-
|
|
7
|
+
import { loadEnvFiles } from './chunk-IWVXI5O4.js';
|
|
8
8
|
import { getVercelRootDirectory } from './chunk-MXRWBNIY.js';
|
|
9
9
|
import { syncRunaConfigWithVercel } from './chunk-6AALH2ED.js';
|
|
10
|
-
import './chunk-
|
|
10
|
+
import './chunk-B7C7CLW2.js';
|
|
11
11
|
import './chunk-II7VYQEM.js';
|
|
12
12
|
import { init_local_supabase, getLocalSupabaseEnvValues, getLocalValueDescriptions } from './chunk-QSEF4T3Y.js';
|
|
13
13
|
import { emitJsonSuccess } from './chunk-KE6QJBZG.js';
|
|
14
14
|
import './chunk-WJXC4MVY.js';
|
|
15
15
|
import './chunk-HKUWEGUX.js';
|
|
16
|
-
import './chunk-
|
|
16
|
+
import './chunk-GT5DMS5R.js';
|
|
17
17
|
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
18
18
|
import { Command } from 'commander';
|
|
19
|
-
import { existsSync, rmSync, readFileSync, mkdtempSync, writeFileSync, chmodSync,
|
|
19
|
+
import { existsSync, rmSync, readFileSync, mkdtempSync, writeFileSync, chmodSync, unlinkSync, realpathSync } from 'fs';
|
|
20
20
|
import path, { resolve, join, basename, dirname } from 'path';
|
|
21
21
|
import { CLIError, createCLILogger, syncEnvironment, EnvSyncOutputSchema } from '@runa-ai/runa';
|
|
22
22
|
import { execa } from 'execa';
|
|
@@ -569,12 +569,17 @@ function containsPathTraversal(inputPath) {
|
|
|
569
569
|
const normalized = path.normalize(inputPath);
|
|
570
570
|
return normalized.includes("..") || inputPath.includes("\0");
|
|
571
571
|
}
|
|
572
|
+
function safeRealpath(targetPath) {
|
|
573
|
+
try {
|
|
574
|
+
return realpathSync(targetPath);
|
|
575
|
+
} catch {
|
|
576
|
+
return path.resolve(targetPath);
|
|
577
|
+
}
|
|
578
|
+
}
|
|
572
579
|
function isPathWithinBase(filePath, baseDir) {
|
|
573
580
|
try {
|
|
574
|
-
const
|
|
575
|
-
const
|
|
576
|
-
const normalizedFile = path.normalize(resolvedFile);
|
|
577
|
-
const normalizedBase = path.normalize(resolvedBase);
|
|
581
|
+
const normalizedFile = path.normalize(safeRealpath(filePath));
|
|
582
|
+
const normalizedBase = path.normalize(safeRealpath(baseDir));
|
|
578
583
|
return normalizedFile === normalizedBase || normalizedFile.startsWith(normalizedBase + path.sep);
|
|
579
584
|
} catch {
|
|
580
585
|
return false;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
|
-
export { loadEnvFiles } from './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
3
|
+
export { loadEnvFiles } from './chunk-IWVXI5O4.js';
|
|
4
|
+
import './chunk-B7C7CLW2.js';
|
|
5
|
+
import './chunk-GT5DMS5R.js';
|
|
6
6
|
import './chunk-VRXHCR5K.js';
|
|
7
7
|
|
|
8
8
|
createRequire(import.meta.url);
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
3
|
import './chunk-ZZOXM6Q4.js';
|
|
4
4
|
import { createError } from './chunk-JQXOVCOP.js';
|
|
5
|
-
import { tryResolveDatabaseUrl } from './chunk-
|
|
5
|
+
import { tryResolveDatabaseUrl } from './chunk-WGRVAGSR.js';
|
|
6
6
|
import './chunk-UHDAYPHH.js';
|
|
7
|
-
import { loadEnvFiles } from './chunk-
|
|
8
|
-
import { isPathContained } from './chunk-
|
|
7
|
+
import { loadEnvFiles } from './chunk-IWVXI5O4.js';
|
|
8
|
+
import { isPathContained } from './chunk-B7C7CLW2.js';
|
|
9
9
|
import './chunk-II7VYQEM.js';
|
|
10
10
|
import './chunk-QSEF4T3Y.js';
|
|
11
|
-
import './chunk-
|
|
11
|
+
import './chunk-GT5DMS5R.js';
|
|
12
12
|
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
13
13
|
import { Command } from 'commander';
|
|
14
14
|
import { CLIError, createCLILogger, createDbSnapshot } from '@runa-ai/runa';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
3
|
import { getRequestedCommandNameFromArgv } from './chunk-UWWSAPDR.js';
|
|
4
|
-
import { CLI_VERSION } from './chunk-
|
|
4
|
+
import { CLI_VERSION } from './chunk-OXQISY3J.js';
|
|
5
5
|
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
6
6
|
import { realpathSync } from 'fs';
|
|
7
7
|
import { fileURLToPath } from 'url';
|
|
@@ -36,7 +36,7 @@ async function getProgram(options) {
|
|
|
36
36
|
};
|
|
37
37
|
const nextKey = getProgramCacheKey(resolvedOptions);
|
|
38
38
|
if (!programInstance || programCacheKey !== nextKey) {
|
|
39
|
-
const { createProgram } = await import('./cli-
|
|
39
|
+
const { createProgram } = await import('./cli-THEA6T7N.js');
|
|
40
40
|
programInstance = await createProgram(resolvedOptions);
|
|
41
41
|
programCacheKey = nextKey;
|
|
42
42
|
}
|
|
@@ -60,7 +60,7 @@ async function runCliFromProcessArgv() {
|
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
62
|
const { setupSignalHandlers } = await import('./signal-handler-DO3OANW5.js');
|
|
63
|
-
const { executeProgram } = await import('./cli-
|
|
63
|
+
const { executeProgram } = await import('./cli-THEA6T7N.js');
|
|
64
64
|
setupSignalHandlers();
|
|
65
65
|
const options = getProgramLoadOptions(argv);
|
|
66
66
|
const program = await getProgram(options);
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
3
|
import { diagnoseInitFailure } from './chunk-AAIE4F2U.js';
|
|
4
4
|
import { getVercelRootDirectory } from './chunk-MXRWBNIY.js';
|
|
5
|
-
import { fetchTemplates } from './chunk-
|
|
5
|
+
import { fetchTemplates } from './chunk-IEKYTCYA.js';
|
|
6
6
|
import { syncRunaConfigWithVercel } from './chunk-6AALH2ED.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-B7C7CLW2.js';
|
|
8
8
|
import './chunk-RZLYEO4U.js';
|
|
9
9
|
import { emitJsonSuccess } from './chunk-KE6QJBZG.js';
|
|
10
10
|
import './chunk-WJXC4MVY.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
|
-
import { DEFAULT_INCLUDE_PATTERNS, DEFAULT_EXCLUDE_PATTERNS, injectTestAttrsAction } from './chunk-
|
|
4
|
-
export { processFiles } from './chunk-
|
|
5
|
-
import './chunk-
|
|
3
|
+
import { DEFAULT_INCLUDE_PATTERNS, DEFAULT_EXCLUDE_PATTERNS, injectTestAttrsAction } from './chunk-BQ336L5T.js';
|
|
4
|
+
export { processFiles } from './chunk-BQ336L5T.js';
|
|
5
|
+
import './chunk-B7C7CLW2.js';
|
|
6
6
|
import './chunk-KE6QJBZG.js';
|
|
7
7
|
import './chunk-WJXC4MVY.js';
|
|
8
8
|
import './chunk-HKUWEGUX.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
|
-
import { DEFAULT_INCLUDE_PATTERNS, DEFAULT_EXCLUDE_PATTERNS, injectTestAttrsAction } from './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import { DEFAULT_INCLUDE_PATTERNS, DEFAULT_EXCLUDE_PATTERNS, injectTestAttrsAction } from './chunk-BQ336L5T.js';
|
|
4
|
+
import './chunk-B7C7CLW2.js';
|
|
5
5
|
import './chunk-KE6QJBZG.js';
|
|
6
6
|
import './chunk-WJXC4MVY.js';
|
|
7
7
|
import './chunk-HKUWEGUX.js';
|
|
@@ -3,8 +3,8 @@ import { createRequire } from 'module';
|
|
|
3
3
|
import { emitJsonSuccess } from './chunk-KE6QJBZG.js';
|
|
4
4
|
import './chunk-WJXC4MVY.js';
|
|
5
5
|
import { getOutputFormatFromEnv } from './chunk-HKUWEGUX.js';
|
|
6
|
-
import { loadRunaConfig } from './chunk-
|
|
7
|
-
import './chunk-
|
|
6
|
+
import { loadRunaConfig } from './chunk-OERS32LW.js';
|
|
7
|
+
import './chunk-GT5DMS5R.js';
|
|
8
8
|
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
9
9
|
import { createObservabilityClient, ObservabilityIngestOutputSchema } from '@runa-ai/runa/observability';
|
|
10
10
|
import { createCLILogger, CLIError } from '@runa-ai/runa/cli-runtime';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
export { PG_SCHEMA_DIFF_APPLY_TIMEOUT_MS, buildIdleConnectionCleanupSql, detectDropTableStatements, detectMissingExtensionType, detectMissingQualifiedFunction, detectPartitionPrivilegeError, executePgSchemaDiffPlan, formatDeclarativeDependencyBoundaryHint, formatExtensionErrorHint, formatPartitionPrivilegeHint, freeConnectionSlotsForPgSchemaDiff, startConnectionCleanupDaemon, stopConnectionCleanupDaemon, verifyDatabaseConnection, verifyPgSchemaDiffBinary } from './chunk-ZWDWFMOX.js';
|
|
4
|
+
import './chunk-A6A7JIRD.js';
|
|
5
|
+
import './chunk-VRXHCR5K.js';
|
|
6
|
+
|
|
7
|
+
createRequire(import.meta.url);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
|
-
import { findWorkspaceRoot, detectEnvironment } from './chunk-
|
|
3
|
+
import { findWorkspaceRoot, detectEnvironment } from './chunk-GT5DMS5R.js';
|
|
4
4
|
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
5
5
|
import { Command } from 'commander';
|
|
6
6
|
import { spawnSync, execSync } from 'child_process';
|
|
@@ -124,6 +124,9 @@ var RUNA_ONLY_FILES = [
|
|
|
124
124
|
// SDK package publishing (npmjs)
|
|
125
125
|
".github/workflows/runa-templates.yml",
|
|
126
126
|
// Template validation (pj-repos don't have templates)
|
|
127
|
+
// === runa-repo Specific Config ===
|
|
128
|
+
"config/vitest/vitest.config.workflows.ts",
|
|
129
|
+
// Workflow test config (runa-repo only)
|
|
127
130
|
// === runa-repo Specific Scripts ===
|
|
128
131
|
"packages/database/scripts/db-sync-partition.ts",
|
|
129
132
|
// Partition defense (TODO: add to template)
|
|
@@ -223,6 +226,13 @@ var TEMPLATE_ONLY_FILES = [
|
|
|
223
226
|
// Server client
|
|
224
227
|
"apps/web/lib/supabase/env.ts",
|
|
225
228
|
// Environment resolution
|
|
229
|
+
"apps/web/app/(protected)/observability/actions.ts",
|
|
230
|
+
// Observability starter
|
|
231
|
+
"apps/web/app/(protected)/observability/page.tsx",
|
|
232
|
+
"apps/web/app/(protected)/observability/alerts/page.tsx",
|
|
233
|
+
"apps/web/app/(protected)/observability/issues/page.tsx",
|
|
234
|
+
"apps/web/app/(protected)/observability/issues/[id]/page.tsx",
|
|
235
|
+
"apps/web/app/(protected)/observability/monitors/page.tsx",
|
|
226
236
|
// === packages/api-client (pj-repo starter) ===
|
|
227
237
|
"packages/api-client/package.json",
|
|
228
238
|
"packages/api-client/tsconfig.json",
|
|
@@ -157,17 +157,63 @@ var testApiCommand = new Command("test:api").description("Run Layer 3: API tests
|
|
|
157
157
|
|
|
158
158
|
// src/commands/test/commands/test-e2e.ts
|
|
159
159
|
init_esm_shims();
|
|
160
|
-
|
|
160
|
+
|
|
161
|
+
// src/commands/test/commands/layer4-prereqs.ts
|
|
162
|
+
init_esm_shims();
|
|
163
|
+
function resolveLayer4RequireManifest(options) {
|
|
161
164
|
if (options.requireManifest && options.allowManifestFallback) {
|
|
162
165
|
throw new CLIError(
|
|
163
166
|
"--require-manifest and --allow-manifest-fallback are mutually exclusive",
|
|
164
|
-
|
|
167
|
+
options.exclusiveErrorCode,
|
|
165
168
|
["Use strict mode (default) OR explicitly allow fallback, but not both"]
|
|
166
169
|
);
|
|
167
170
|
}
|
|
168
|
-
if (options.allowManifestFallback)
|
|
171
|
+
if (options.allowManifestFallback) {
|
|
172
|
+
return false;
|
|
173
|
+
}
|
|
169
174
|
return options.requireManifest;
|
|
170
175
|
}
|
|
176
|
+
function injectLayer4TestAttrs(options) {
|
|
177
|
+
const { verbose, requireManifest } = options ?? {};
|
|
178
|
+
try {
|
|
179
|
+
if (verbose) {
|
|
180
|
+
console.log("[Layer 4] Auto-injecting XState test attributes...");
|
|
181
|
+
}
|
|
182
|
+
execSync("pnpm exec runa inject-test-attrs", {
|
|
183
|
+
cwd: process.cwd(),
|
|
184
|
+
stdio: verbose ? "inherit" : "pipe"
|
|
185
|
+
});
|
|
186
|
+
if (verbose) {
|
|
187
|
+
console.log("[Layer 4] Test attributes injected successfully");
|
|
188
|
+
}
|
|
189
|
+
} catch (error) {
|
|
190
|
+
if (requireManifest) {
|
|
191
|
+
throw new CLIError(
|
|
192
|
+
"XState test attribute injection failed",
|
|
193
|
+
"INJECT_TEST_ATTRS_FAILED",
|
|
194
|
+
[
|
|
195
|
+
"Run `runa inject-test-attrs` manually to see detailed errors",
|
|
196
|
+
"Ensure XState machines exist in your project",
|
|
197
|
+
"Check that machines have valid meta.e2e definitions",
|
|
198
|
+
"Or pass --allow-manifest-fallback to continue with fallback behavior"
|
|
199
|
+
],
|
|
200
|
+
error instanceof Error ? error : void 0
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
if (verbose) {
|
|
204
|
+
console.warn("[Layer 4] Test attribute injection failed, continuing with tests");
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// src/commands/test/commands/test-e2e.ts
|
|
210
|
+
function resolveEffectiveRequireManifest2(options) {
|
|
211
|
+
return resolveLayer4RequireManifest({
|
|
212
|
+
requireManifest: options.requireManifest,
|
|
213
|
+
allowManifestFallback: options.allowManifestFallback,
|
|
214
|
+
exclusiveErrorCode: "TEST_E2E_MANIFEST_FLAGS_EXCLUSIVE"
|
|
215
|
+
});
|
|
216
|
+
}
|
|
171
217
|
var testE2ECommand = new Command("test:e2e").description("Run Layer 4: E2E tests (Playwright) - Requires browser").option("--generate", "Generate tests from XState before running").option("--advanced", "Generate advanced tests (context-aware, guards, invariants, etc.)").option("--auto", "Zero-config auto-generation (implementation-driven)").option("--ci", "CI mode (fail fast, no interactive)").option("--record", "Record test results to database", true).option("--base-url <url>", "Explicit base URL for E2E (disables auto dev server start)").option(
|
|
172
218
|
"--require-manifest",
|
|
173
219
|
"Require manifest to be present and valid (strict behavior; enabled by default for Layer 4)"
|
|
@@ -180,6 +226,10 @@ var testE2ECommand = new Command("test:e2e").description("Run Layer 4: E2E tests
|
|
|
180
226
|
).option("--verbose", "Verbose output (full error details, environment info)").action(async (options) => {
|
|
181
227
|
try {
|
|
182
228
|
const effectiveRequireManifest = resolveEffectiveRequireManifest2(options);
|
|
229
|
+
injectLayer4TestAttrs({
|
|
230
|
+
verbose: options.verbose,
|
|
231
|
+
requireManifest: effectiveRequireManifest
|
|
232
|
+
});
|
|
183
233
|
const output = await runTestIntegration({
|
|
184
234
|
ci: options.ci ?? false,
|
|
185
235
|
record: options.record,
|
|
@@ -219,6 +269,10 @@ var testBrowserCommand = new Command("test:browser").description("Run Layer 4: B
|
|
|
219
269
|
).option("--report-json <path>", "Export test report as JSON").option("--verbose", "Verbose output").action(async (options) => {
|
|
220
270
|
try {
|
|
221
271
|
const effectiveRequireManifest = resolveEffectiveRequireManifest2(options);
|
|
272
|
+
injectLayer4TestAttrs({
|
|
273
|
+
verbose: options.verbose,
|
|
274
|
+
requireManifest: effectiveRequireManifest
|
|
275
|
+
});
|
|
222
276
|
const output = await runTestIntegration({
|
|
223
277
|
ci: options.ci ?? false,
|
|
224
278
|
record: options.record,
|
|
@@ -356,51 +410,32 @@ var testIntegrationCommand = new Command("test:integration").description("Run La
|
|
|
356
410
|
|
|
357
411
|
// src/commands/test/commands/test-layer.ts
|
|
358
412
|
init_esm_shims();
|
|
359
|
-
function
|
|
360
|
-
if (layer
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
}
|
|
366
|
-
execSync("pnpm exec runa inject-test-attrs", {
|
|
367
|
-
cwd: process.cwd(),
|
|
368
|
-
stdio: verbose ? "inherit" : "pipe"
|
|
413
|
+
function resolveEffectiveRequireManifest4(layer, options) {
|
|
414
|
+
if (layer === 4) {
|
|
415
|
+
const resolved = resolveLayer4RequireManifest({
|
|
416
|
+
requireManifest: options.requireManifest,
|
|
417
|
+
allowManifestFallback: options.allowManifestFallback,
|
|
418
|
+
exclusiveErrorCode: "TEST_LAYER_MANIFEST_FLAGS_EXCLUSIVE"
|
|
369
419
|
});
|
|
370
|
-
if (
|
|
371
|
-
|
|
420
|
+
if (resolved !== void 0) {
|
|
421
|
+
return resolved;
|
|
372
422
|
}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
throw new CLIError(
|
|
376
|
-
"XState test attribute injection failed",
|
|
377
|
-
"INJECT_TEST_ATTRS_FAILED",
|
|
378
|
-
[
|
|
379
|
-
"Run `runa inject-test-attrs` manually to see detailed errors",
|
|
380
|
-
"Ensure XState machines exist in your project",
|
|
381
|
-
"Check that machines have valid meta.e2e definitions",
|
|
382
|
-
"Or pass --allow-manifest-fallback to continue with fallback behavior"
|
|
383
|
-
],
|
|
384
|
-
error instanceof Error ? error : void 0
|
|
385
|
-
);
|
|
386
|
-
}
|
|
387
|
-
if (verbose) {
|
|
388
|
-
console.warn("[Layer 4] Test attribute injection failed, continuing with tests");
|
|
423
|
+
if (process.env.RUNA_LAYER4_ALLOW_MANIFEST_FALLBACK !== "true") {
|
|
424
|
+
return true;
|
|
389
425
|
}
|
|
426
|
+
return void 0;
|
|
390
427
|
}
|
|
391
|
-
}
|
|
392
|
-
function resolveEffectiveRequireManifest4(layer, options) {
|
|
393
|
-
if (options.allowManifestFallback) return false;
|
|
394
428
|
if (options.requireManifest !== void 0) return options.requireManifest;
|
|
395
|
-
if (layer === 4 && process.env.RUNA_LAYER4_ALLOW_MANIFEST_FALLBACK !== "true") return true;
|
|
396
429
|
return void 0;
|
|
397
430
|
}
|
|
398
431
|
async function runSingleLayer(params) {
|
|
399
432
|
const effectiveRequireManifest = resolveEffectiveRequireManifest4(params.layer, params.options);
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
433
|
+
if (params.layer === 4) {
|
|
434
|
+
injectLayer4TestAttrs({
|
|
435
|
+
verbose: params.options.verbose,
|
|
436
|
+
requireManifest: effectiveRequireManifest
|
|
437
|
+
});
|
|
438
|
+
}
|
|
404
439
|
try {
|
|
405
440
|
const output = await runTest({
|
|
406
441
|
layer: params.layer,
|
|
@@ -453,13 +488,6 @@ function validateGenerationFlags(layer, opts) {
|
|
|
453
488
|
["Use --auto (implementation-driven) OR --generate/--advanced (XState-driven)"]
|
|
454
489
|
);
|
|
455
490
|
}
|
|
456
|
-
if (layer === 4 && opts.requireManifest && opts.allowManifestFallback) {
|
|
457
|
-
throw new CLIError(
|
|
458
|
-
"--require-manifest and --allow-manifest-fallback are mutually exclusive",
|
|
459
|
-
"TEST_LAYER_MANIFEST_FLAGS_EXCLUSIVE",
|
|
460
|
-
["Use strict mode (default) OR explicitly allow fallback, but not both"]
|
|
461
|
-
);
|
|
462
|
-
}
|
|
463
491
|
}
|
|
464
492
|
function validateSnapshotFlags(opts) {
|
|
465
493
|
if (opts.reviewSnapshots && opts.ci) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
|
-
import { fetchTemplates } from './chunk-
|
|
3
|
+
import { fetchTemplates } from './chunk-IEKYTCYA.js';
|
|
4
4
|
import { updateRunaConfigSdkVersion } from './chunk-6AALH2ED.js';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-B7C7CLW2.js';
|
|
6
6
|
import './chunk-RZLYEO4U.js';
|
|
7
7
|
import { emitJsonSuccess } from './chunk-KE6QJBZG.js';
|
|
8
8
|
import './chunk-WJXC4MVY.js';
|
|
@@ -1,81 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* AI HINT: Database URL normalization utilities for
|
|
2
|
+
* AI HINT: Database URL normalization utilities for CLI operations
|
|
3
3
|
*
|
|
4
|
-
* Purpose:
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* Key transformations:
|
|
8
|
-
* 1. Port conversion: Transaction Pooler (6543) → Session Pooler (5432)
|
|
9
|
-
* 2. pgbouncer cleanup: Remove pgbouncer parameter for Session Pooler
|
|
10
|
-
* 3. IPv4 resolution: GitHub Actions runners can't reach IPv6-only hosts
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* Resolve hostname to IPv4 address using getent (Linux).
|
|
14
|
-
*
|
|
15
|
-
* This is critical for GitHub Actions where IPv6 may not be routable to Supabase.
|
|
16
|
-
* Matches SDK's resolveHostToIPv4 behavior.
|
|
17
|
-
*
|
|
18
|
-
* @param hostname - The hostname to resolve
|
|
19
|
-
* @returns IPv4 address if resolvable, null otherwise
|
|
20
|
-
*/
|
|
21
|
-
export declare function resolveHostToIPv4(hostname: string): string | null;
|
|
22
|
-
/**
|
|
23
|
-
* Normalize database URL for DDL reads and psql operations.
|
|
24
|
-
*
|
|
25
|
-
* Handles three critical issues:
|
|
26
|
-
* 1. Port conversion: Transaction Pooler (6543) → Session Pooler (5432)
|
|
27
|
-
* - DDL and catalog reads are more reliable via Session Pooler
|
|
28
|
-
* 2. pgbouncer cleanup: Remove pgbouncer parameter for Session Pooler
|
|
29
|
-
* - Session Pooler (5432) does NOT accept pgbouncer parameter
|
|
30
|
-
* 3. IPv4 resolution: GitHub Actions runners can't reach IPv6-only hosts
|
|
31
|
-
* - This matches SDK's normalizeDatabaseUrlForDDL behavior
|
|
32
|
-
*
|
|
33
|
-
* @param databaseUrl - The database URL to normalize
|
|
34
|
-
* @returns Normalized database URL suitable for DDL operations
|
|
35
|
-
*/
|
|
36
|
-
export declare function normalizeDatabaseUrlForDdl(databaseUrl: string): string;
|
|
37
|
-
/**
|
|
38
|
-
* Get safe database target string for logging (without password).
|
|
39
|
-
*
|
|
40
|
-
* @param databaseUrl - The database URL
|
|
41
|
-
* @returns Safe string for logging
|
|
42
|
-
*/
|
|
43
|
-
export declare function getSafeDatabaseTarget(databaseUrl: string): string;
|
|
44
|
-
/**
|
|
45
|
-
* Escape SQL literal value for safe inclusion in SQL strings.
|
|
46
|
-
*
|
|
47
|
-
* @param value - The string value to escape
|
|
48
|
-
* @returns Escaped string safe for SQL literals
|
|
49
|
-
*/
|
|
50
|
-
export declare function escapeSqlLiteral(value: string): string;
|
|
51
|
-
/**
|
|
52
|
-
* Parse PostgreSQL boolean result to JavaScript boolean.
|
|
53
|
-
*
|
|
54
|
-
* PostgreSQL returns 't', 'true', or '1' for true values.
|
|
55
|
-
* This utility normalizes these variants.
|
|
56
|
-
*
|
|
57
|
-
* @param value - The PostgreSQL boolean string
|
|
58
|
-
* @returns JavaScript boolean
|
|
59
|
-
*/
|
|
60
|
-
export declare function parseBoolish(value: string): boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Check if a hostname resolves ONLY to IPv6 (no IPv4).
|
|
63
|
-
*
|
|
64
|
-
* This indicates that Supabase IPv4 Add-on is not enabled.
|
|
65
|
-
* GitHub Actions cannot reach IPv6-only hosts.
|
|
66
|
-
*
|
|
67
|
-
* @param hostname - The hostname to check
|
|
68
|
-
* @returns true if hostname resolves ONLY to IPv6, false otherwise
|
|
69
|
-
*/
|
|
70
|
-
export declare function isIPv6Only(hostname: string): boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Enhance error message with actionable advice.
|
|
73
|
-
*
|
|
74
|
-
* Detects common error patterns and adds clear guidance for users.
|
|
75
|
-
*
|
|
76
|
-
* @param error - Original error message
|
|
77
|
-
* @param databaseUrl - The database URL that failed (optional)
|
|
78
|
-
* @returns Enhanced error message with guidance
|
|
4
|
+
* Purpose: Preserve the CLI-local import path while delegating implementation
|
|
5
|
+
* to the SDK database utilities, which are the SSOT for DDL URL handling.
|
|
79
6
|
*/
|
|
80
|
-
export
|
|
7
|
+
export { enhanceConnectionError, escapeSqlLiteral, getSafeDatabaseTarget, isIPv6Only, normalizeDatabaseUrlForDdl, parseBoolish, resolveHostToIPv4, } from '@runa-ai/runa';
|
|
81
8
|
//# sourceMappingURL=db-url-utils.d.ts.map
|
|
@@ -71,7 +71,7 @@ var vulnCheckCommand = new Command("vuln-check").description("Run comprehensive
|
|
|
71
71
|
const logger = createCLILogger("vuln-check");
|
|
72
72
|
const isJsonMode = getOutputFormatFromEnv() === "json" || options.format === "json";
|
|
73
73
|
try {
|
|
74
|
-
const { VulnChecker } = await import('./vuln-checker-
|
|
74
|
+
const { VulnChecker } = await import('./vuln-checker-Q7LSHUHJ.js');
|
|
75
75
|
const categoryMap = {
|
|
76
76
|
code: ["injection", "auth", "crypto"],
|
|
77
77
|
deps: ["dependency"],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
|
-
import { CLI_VERSION } from './chunk-
|
|
3
|
+
import { CLI_VERSION } from './chunk-OXQISY3J.js';
|
|
4
4
|
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
5
5
|
import { glob } from 'glob';
|
|
6
6
|
import { exec } from 'child_process';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
|
-
import { registerCleanup } from './chunk-TYIAD6SB.js';
|
|
4
3
|
import { isNonInteractiveEnabled, assertTtyRequired } from './chunk-6Y3LAUGL.js';
|
|
5
|
-
import {
|
|
6
|
-
import './chunk-
|
|
4
|
+
import { registerCleanup } from './chunk-TYIAD6SB.js';
|
|
5
|
+
import { getDatabasePackagePath } from './chunk-OERS32LW.js';
|
|
6
|
+
import './chunk-GT5DMS5R.js';
|
|
7
7
|
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
8
8
|
import path, { basename } from 'path';
|
|
9
9
|
import { createCLILogger, CLIError, detectDatabasePackage, DATABASE_PACKAGE_CANDIDATES } from '@runa-ai/runa';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
|
-
import { detectDatabaseStack, getStackPaths } from './chunk-
|
|
3
|
+
import { detectDatabaseStack, getStackPaths } from './chunk-MILCC3B6.js';
|
|
4
4
|
import { emitJsonSuccess } from './chunk-KE6QJBZG.js';
|
|
5
5
|
import './chunk-WJXC4MVY.js';
|
|
6
6
|
import { getOutputFormatFromEnv } from './chunk-HKUWEGUX.js';
|
|
7
|
-
import { loadRunaConfig, getAppConfig } from './chunk-
|
|
8
|
-
import { detectEnvironment } from './chunk-
|
|
7
|
+
import { loadRunaConfig, getAppConfig } from './chunk-OERS32LW.js';
|
|
8
|
+
import { detectEnvironment } from './chunk-GT5DMS5R.js';
|
|
9
9
|
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
10
10
|
import { Command } from 'commander';
|
|
11
11
|
import { CLIError, deploySchemaToProduction, createCLILogger, WorkflowNotifyOutputSchema, devopsSync, DevOpsSyncOutputSchema, workflowSync, WorkflowSyncOutputSchema, validateInfrastructure, emitWorkflowValidateFailureCapsule, emitWorkflowAnnotations, writeWorkflowValidateStepSummary, exportWorkflowReportJson, WorkflowValidateInfrastructureOutputSchema, workflowNotify } from '@runa-ai/runa';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runa-ai/runa-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "AI-powered DevOps CLI",
|
|
6
6
|
"type": "module",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"typescript": "5.9.3",
|
|
57
57
|
"xstate": "5.28.0",
|
|
58
58
|
"zod": "4.3.6",
|
|
59
|
-
"@runa-ai/runa": "0.
|
|
60
|
-
"@runa-ai/runa-xstate-test-plugin": "0.
|
|
59
|
+
"@runa-ai/runa": "0.10.0",
|
|
60
|
+
"@runa-ai/runa-xstate-test-plugin": "0.10.0"
|
|
61
61
|
},
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">=20.0.0"
|