@runa-ai/runa-cli 0.6.0 → 0.7.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-BXUJKYHC.js → build-V66FAQXB.js} +152 -163
- package/dist/{cache-H63JKFYH.js → cache-N7WNPEYF.js} +2 -3
- package/dist/check-LOMVIRHX.js +12 -0
- package/dist/{chunk-HPYJPB5Y.js → chunk-2APB25TT.js} +44 -10
- package/dist/chunk-3WDV32GA.js +33 -0
- package/dist/chunk-5FT3F36G.js +59 -0
- package/dist/{chunk-7QV7U6NI.js → chunk-6FAU4IGR.js} +2 -1
- package/dist/{chunk-CE3DEYFT.js → chunk-7B5C6U2K.js} +2 -208
- package/dist/{chunk-GOGRLQNP.js → chunk-AIP6MR42.js} +1 -1
- package/dist/chunk-FHG3ILE4.js +2011 -0
- package/dist/{chunk-22CS6EMA.js → chunk-H2AHNI75.js} +1 -1
- package/dist/{chunk-UU55OH7P.js → chunk-KE6QJBZG.js} +2 -3
- package/dist/{check-6AB5NGWK.js → chunk-QM53IQHM.js} +14 -12
- package/dist/{chunk-RRGQCUKT.js → chunk-WJXC4MVY.js} +30 -3
- package/dist/chunk-XDCHRVE3.js +215 -0
- package/dist/{chunk-P7U52PBY.js → chunk-Z4Z5DNW4.js} +49 -2
- package/dist/{ci-V3PIG2GI.js → ci-ZWRVWNFX.js} +1108 -132
- package/dist/cli/contract-output.d.ts +1 -0
- package/dist/{cli-GFRZCJQR.js → cli-2JNBJUBB.js} +216 -173
- package/dist/commands/build/actors/validate.d.ts +2 -0
- package/dist/commands/check/commands/check.d.ts +8 -3
- package/dist/commands/ci/machine/actors/db/collect-schema-stats.d.ts +9 -6
- package/dist/commands/ci/machine/actors/db/schema-canonical-diff.d.ts +55 -0
- package/dist/commands/ci/machine/actors/db/schema-stats.d.ts +11 -0
- package/dist/commands/ci/machine/actors/db/sync-schema.d.ts +9 -1
- package/dist/commands/ci/machine/formatters/sections/schema-matrix.d.ts +3 -3
- package/dist/commands/ci/machine/types.d.ts +2 -0
- package/dist/commands/ci/utils/execa-helpers.d.ts +1 -0
- package/dist/commands/db/commands/db-sync/error-classifier.d.ts +9 -0
- package/dist/commands/dev/actors/index.d.ts +5 -0
- package/dist/commands/dev/actors/tables-manifest.d.ts +16 -0
- package/dist/commands/dev/contract.d.ts +1 -1
- package/dist/commands/dev/guards.d.ts +24 -0
- package/dist/commands/dev/machine.d.ts +22 -3
- package/dist/commands/dev/types.d.ts +2 -0
- package/dist/commands/doctor.d.ts +9 -0
- package/dist/commands/inject-test-attrs/defaults.d.ts +9 -0
- package/dist/commands/utils/machine-state-logging.d.ts +20 -0
- package/dist/commands/utils/repo-root.d.ts +2 -0
- package/dist/{db-HR7CREX2.js → db-XULCILOU.js} +440 -2216
- package/dist/{dev-A7RW6XQV.js → dev-5YXNPTCJ.js} +168 -49
- package/dist/doctor-MZLOA53G.js +44 -0
- package/dist/{env-B47Z4747.js → env-SS66PZ4B.js} +6 -7
- package/dist/{env-files-K2C7O7L5.js → env-files-2UIUYLLR.js} +2 -2
- package/dist/{error-handler-4EYSDOSE.js → error-handler-HEXBRNVV.js} +2 -2
- package/dist/{hotfix-CULKKMGS.js → hotfix-YA3DGLOM.js} +3 -3
- package/dist/index.js +4 -4
- package/dist/{init-ELK5QCWR.js → init-ZIL6LRFO.js} +5 -6
- package/dist/{inject-test-attrs-Y5UD5P7Q.js → inject-test-attrs-P44BVTQS.js} +5 -18
- package/dist/{link-C43JRZWY.js → link-VSNDVZZD.js} +2 -3
- package/dist/manifest-TMFLESHW.js +19 -0
- package/dist/{risk-detector-BXUY2WKS.js → risk-detector-4U6ZJ2G5.js} +1 -1
- package/dist/{risk-detector-core-O7I7SPR7.js → risk-detector-core-TK4OAI3N.js} +2 -2
- package/dist/{risk-detector-plpgsql-SGMVKYJP.js → risk-detector-plpgsql-HWKS4OLR.js} +37 -7
- package/dist/{status-IJ4ZWHMX.js → status-UTKS63AB.js} +2 -3
- package/dist/{telemetry-FN7V727Y.js → telemetry-P56UBLZ2.js} +2 -3
- package/dist/{template-check-PNG5NQ5H.js → template-check-3P4HZXVY.js} +40 -29
- package/dist/{test-QYXE5UVW.js → test-V4KQL574.js} +34 -10
- package/dist/{test-gen-QPWOIEHU.js → test-gen-FS4CEY3P.js} +2 -3
- package/dist/{upgrade-3SLWVNAC.js → upgrade-NUK3ZBCL.js} +18 -6
- package/dist/{validate-SM4PXPS7.js → validate-CAAW4Y44.js} +2 -3
- package/dist/{vuln-check-TYQNEFS7.js → vuln-check-2W7N5TA2.js} +3 -4
- package/dist/{vuln-checker-2QXGN5YT.js → vuln-checker-IQJ56RUV.js} +413 -140
- package/dist/{watch-UCDVOQAH.js → watch-PNTKZYFB.js} +1 -1
- package/dist/{workflow-ZB5Q2PFY.js → workflow-H75N4BXX.js} +3 -4
- package/package.json +2 -2
- package/dist/chunk-JT5SUTWE.js +0 -9
- package/dist/chunk-M47WJJVS.js +0 -71
- package/dist/manifest-2NOQ2IMK.js +0 -32
- package/dist/{chunk-MNPMZERI.js → chunk-644FVGIQ.js} +1 -1
- package/dist/{chunk-XJBQINSA.js → chunk-SGJG3BKD.js} +1 -1
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
3
|
import { detectDatabaseStack, getStackPaths } from './chunk-CCKG5R4Y.js';
|
|
4
|
+
import { emitJsonSuccess } from './chunk-KE6QJBZG.js';
|
|
5
|
+
import './chunk-WJXC4MVY.js';
|
|
6
|
+
import { getOutputFormatFromEnv } from './chunk-HKUWEGUX.js';
|
|
4
7
|
import { loadRunaConfig, getAppConfig } from './chunk-5NKWR4FF.js';
|
|
5
8
|
import { detectEnvironment } from './chunk-JMJP4A47.js';
|
|
6
|
-
import { emitJsonSuccess } from './chunk-UU55OH7P.js';
|
|
7
|
-
import './chunk-RRGQCUKT.js';
|
|
8
|
-
import './chunk-JT5SUTWE.js';
|
|
9
|
-
import { getOutputFormatFromEnv } from './chunk-HKUWEGUX.js';
|
|
10
9
|
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
11
10
|
import { Command } from 'commander';
|
|
12
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.7.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "AI-powered DevOps CLI",
|
|
6
6
|
"type": "module",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"typescript": "5.9.3",
|
|
57
57
|
"xstate": "5.28.0",
|
|
58
58
|
"zod": "4.3.6",
|
|
59
|
-
"@runa-ai/runa": "0.
|
|
59
|
+
"@runa-ai/runa": "0.7.0",
|
|
60
60
|
"@runa-ai/runa-xstate-test-plugin": "0.5.58"
|
|
61
61
|
},
|
|
62
62
|
"engines": {
|
package/dist/chunk-JT5SUTWE.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire } from 'module';
|
|
3
|
-
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
4
|
-
export { CLI_CONTRACT_VERSION, ErrorEnvelopeSchema, createSuccessEnvelopeSchema } from '@runa-ai/runa';
|
|
5
|
-
|
|
6
|
-
createRequire(import.meta.url);
|
|
7
|
-
|
|
8
|
-
// src/contracts/envelope.ts
|
|
9
|
-
init_esm_shims();
|
package/dist/chunk-M47WJJVS.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire } from 'module';
|
|
3
|
-
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
4
|
-
import { existsSync, writeFileSync, unlinkSync, readFileSync } from 'fs';
|
|
5
|
-
import path from 'path';
|
|
6
|
-
|
|
7
|
-
createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// src/utils/env-local-bridge.ts
|
|
10
|
-
init_esm_shims();
|
|
11
|
-
var DEFAULT_API_PORT = 54321;
|
|
12
|
-
var DEFAULT_DB_PORT = 54322;
|
|
13
|
-
var RUNA_ENV_LOCAL_MARKER = "# RUNA_AUTO_GENERATED \u2014 do not edit (created by `runa db start`)";
|
|
14
|
-
function envLocalPath(projectRoot) {
|
|
15
|
-
return path.join(projectRoot, ".env.local");
|
|
16
|
-
}
|
|
17
|
-
function isNonDefaultPorts(config) {
|
|
18
|
-
return config.api !== DEFAULT_API_PORT || config.db !== DEFAULT_DB_PORT;
|
|
19
|
-
}
|
|
20
|
-
function buildEnvLocalContent(config) {
|
|
21
|
-
const dbUrl = `postgresql://postgres:postgres@${config.host}:${config.db}/postgres`;
|
|
22
|
-
return [
|
|
23
|
-
RUNA_ENV_LOCAL_MARKER,
|
|
24
|
-
`# Supabase is running on non-default ports (default: api=${DEFAULT_API_PORT}, db=${DEFAULT_DB_PORT}).`,
|
|
25
|
-
"# This file overrides .env.development so that `pnpm dev` uses correct ports.",
|
|
26
|
-
"# Removed automatically by `runa db stop`. Safe to delete manually.",
|
|
27
|
-
`DATABASE_URL=${dbUrl}`,
|
|
28
|
-
`DATABASE_URL_ADMIN=${dbUrl}`,
|
|
29
|
-
`DATABASE_URL_SERVICE=${dbUrl}`,
|
|
30
|
-
`NEXT_PUBLIC_SUPABASE_URL=http://${config.host}:${config.api}`,
|
|
31
|
-
""
|
|
32
|
-
].join("\n");
|
|
33
|
-
}
|
|
34
|
-
function isRunaManagedEnvLocal(projectRoot) {
|
|
35
|
-
const filePath = envLocalPath(projectRoot);
|
|
36
|
-
try {
|
|
37
|
-
const content = readFileSync(filePath, "utf-8");
|
|
38
|
-
return content.startsWith(RUNA_ENV_LOCAL_MARKER);
|
|
39
|
-
} catch {
|
|
40
|
-
return false;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
function writeEnvLocalBridge(projectRoot, config) {
|
|
44
|
-
const filePath = envLocalPath(projectRoot);
|
|
45
|
-
const fileExists = existsSync(filePath);
|
|
46
|
-
if (isNonDefaultPorts(config)) {
|
|
47
|
-
if (fileExists && !isRunaManagedEnvLocal(projectRoot)) {
|
|
48
|
-
return { written: false, reason: "user-managed" };
|
|
49
|
-
}
|
|
50
|
-
writeFileSync(filePath, buildEnvLocalContent(config), "utf-8");
|
|
51
|
-
return { written: true, ports: { api: config.api, db: config.db } };
|
|
52
|
-
}
|
|
53
|
-
if (fileExists && isRunaManagedEnvLocal(projectRoot)) {
|
|
54
|
-
unlinkSync(filePath);
|
|
55
|
-
return { written: false, reason: "stale-removed" };
|
|
56
|
-
}
|
|
57
|
-
return { written: false, reason: "default-ports" };
|
|
58
|
-
}
|
|
59
|
-
function removeEnvLocalBridge(projectRoot) {
|
|
60
|
-
const filePath = envLocalPath(projectRoot);
|
|
61
|
-
if (!existsSync(filePath)) {
|
|
62
|
-
return { removed: false, reason: "not-found" };
|
|
63
|
-
}
|
|
64
|
-
if (!isRunaManagedEnvLocal(projectRoot)) {
|
|
65
|
-
return { removed: false, reason: "user-managed" };
|
|
66
|
-
}
|
|
67
|
-
unlinkSync(filePath);
|
|
68
|
-
return { removed: true };
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export { removeEnvLocalBridge, writeEnvLocalBridge };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire } from 'module';
|
|
3
|
-
import { injectTestAttrsAction } from './chunk-P7U52PBY.js';
|
|
4
|
-
import './chunk-DRSUEMAK.js';
|
|
5
|
-
import './chunk-UU55OH7P.js';
|
|
6
|
-
import './chunk-RRGQCUKT.js';
|
|
7
|
-
import './chunk-JT5SUTWE.js';
|
|
8
|
-
import './chunk-HKUWEGUX.js';
|
|
9
|
-
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
10
|
-
import { Command } from 'commander';
|
|
11
|
-
|
|
12
|
-
createRequire(import.meta.url);
|
|
13
|
-
|
|
14
|
-
// src/commands/manifest/index.ts
|
|
15
|
-
init_esm_shims();
|
|
16
|
-
var manifestCommand = new Command("manifest").description("Generate E2E manifest (manifest.json) - alias for inject-test-attrs").option("--check", "Check if manifest needs regeneration (CI mode)").option("--force", "Force regeneration even if up-to-date").option("--verbose", "Show detailed output").option("--include <patterns...>", "Glob patterns to include", [
|
|
17
|
-
"apps/**/*.tsx",
|
|
18
|
-
"apps/**/*.ts",
|
|
19
|
-
"packages/**/*.tsx",
|
|
20
|
-
"packages/**/*.ts"
|
|
21
|
-
]).option("--exclude <patterns...>", "Glob patterns to exclude", [
|
|
22
|
-
"**/node_modules/**",
|
|
23
|
-
"**/.next/**",
|
|
24
|
-
"**/dist/**",
|
|
25
|
-
"**/*.test.*",
|
|
26
|
-
"**/*.spec.*",
|
|
27
|
-
"**/*.stories.*"
|
|
28
|
-
]).option("--no-manifest", "Skip manifest file generation (attributes only)").option("--manifest-dir <dir>", "Output directory for manifest files", ".runa").option("--strict-detect", "Fail when fallback machine detection is used (for deterministic CI)").action(async (options) => {
|
|
29
|
-
await injectTestAttrsAction(options, manifestCommand);
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
export { manifestCommand };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
|
-
import { findWorkspaceRoot } from './chunk-JMJP4A47.js';
|
|
4
3
|
import { validateEnvSuffix, isPathContained, MAX_DIRECTORY_TRAVERSAL_DEPTH } from './chunk-DRSUEMAK.js';
|
|
4
|
+
import { findWorkspaceRoot } from './chunk-JMJP4A47.js';
|
|
5
5
|
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
6
6
|
import { existsSync, readFileSync } from 'fs';
|
|
7
7
|
import path from 'path';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
|
-
import { secureGh, securePnpm } from './chunk-RZLYEO4U.js';
|
|
4
3
|
import { isPathContained } from './chunk-DRSUEMAK.js';
|
|
4
|
+
import { secureGh, securePnpm } from './chunk-RZLYEO4U.js';
|
|
5
5
|
import { init_esm_shims } from './chunk-VRXHCR5K.js';
|
|
6
6
|
import fs from 'fs';
|
|
7
7
|
import { rm, mkdir, writeFile, cp, readdir, lstat } from 'fs/promises';
|