@runa-ai/runa-cli 0.5.58 → 0.5.61
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/commands/ci/commands/ci-supabase-local.d.ts +5 -0
- package/dist/commands/ci/commands/ci-supabase-local.d.ts.map +1 -1
- package/dist/commands/ci/machine/actors/db/sync-schema.d.ts.map +1 -1
- package/dist/commands/db/apply/actors.d.ts +4 -0
- package/dist/commands/db/apply/actors.d.ts.map +1 -1
- package/dist/commands/db/apply/contract.d.ts +1 -0
- package/dist/commands/db/apply/contract.d.ts.map +1 -1
- package/dist/commands/db/apply/helpers/index.d.ts +4 -2
- package/dist/commands/db/apply/helpers/index.d.ts.map +1 -1
- package/dist/commands/db/apply/helpers/plan-validator.d.ts +61 -0
- package/dist/commands/db/apply/helpers/plan-validator.d.ts.map +1 -0
- package/dist/commands/db/apply/helpers/retry-logic.d.ts +25 -0
- package/dist/commands/db/apply/helpers/retry-logic.d.ts.map +1 -1
- package/dist/commands/db/apply/machine.d.ts +5 -0
- package/dist/commands/db/apply/machine.d.ts.map +1 -1
- package/dist/commands/db/commands/db-lifecycle.d.ts.map +1 -1
- package/dist/commands/db/utils/db-target.d.ts +5 -3
- package/dist/commands/db/utils/db-target.d.ts.map +1 -1
- package/dist/commands/dev/commands/dev.d.ts.map +1 -1
- package/dist/constants/versions.d.ts +1 -1
- package/dist/index.js +799 -450
- package/dist/utils/env-local-bridge.d.ts +58 -0
- package/dist/utils/env-local-bridge.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: .env.local Port Bridge
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Auto-generate .env.local when Supabase runs on non-default ports,
|
|
5
|
+
* so that `pnpm dev` / `pnpm build` use the correct ports without manual
|
|
6
|
+
* configuration. Removed automatically by `runa db stop`.
|
|
7
|
+
*
|
|
8
|
+
* Design:
|
|
9
|
+
* - Only writes when ports differ from defaults (54321/54322)
|
|
10
|
+
* - Only deletes files it created (marker-based ownership)
|
|
11
|
+
* - Never touches user-managed .env.local files
|
|
12
|
+
* - Self-contained: no SDK/CLI imports (avoids test mock issues)
|
|
13
|
+
* - Callers pass SupabaseConfig from detectLocalSupabasePorts()
|
|
14
|
+
*/
|
|
15
|
+
export interface SupabasePortConfig {
|
|
16
|
+
host: string;
|
|
17
|
+
api: number;
|
|
18
|
+
db: number;
|
|
19
|
+
}
|
|
20
|
+
export type WriteResult = {
|
|
21
|
+
written: true;
|
|
22
|
+
ports: {
|
|
23
|
+
api: number;
|
|
24
|
+
db: number;
|
|
25
|
+
};
|
|
26
|
+
} | {
|
|
27
|
+
written: false;
|
|
28
|
+
reason: 'default-ports' | 'user-managed' | 'stale-removed';
|
|
29
|
+
};
|
|
30
|
+
export type RemoveResult = {
|
|
31
|
+
removed: true;
|
|
32
|
+
} | {
|
|
33
|
+
removed: false;
|
|
34
|
+
reason: 'not-found' | 'user-managed';
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Check if .env.local is managed by runa (first line is marker).
|
|
38
|
+
*/
|
|
39
|
+
export declare function isRunaManagedEnvLocal(projectRoot: string): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Write .env.local when Supabase ports differ from defaults.
|
|
42
|
+
*
|
|
43
|
+
* - Non-default ports → writes .env.local with port overrides
|
|
44
|
+
* - Default ports + stale runa-managed file → removes it
|
|
45
|
+
* - Default ports + no file → no-op
|
|
46
|
+
* - User-managed .env.local exists → returns { written: false, reason: 'user-managed' }
|
|
47
|
+
*
|
|
48
|
+
* @param projectRoot - Project root directory
|
|
49
|
+
* @param config - Supabase port config (from detectLocalSupabasePorts)
|
|
50
|
+
*/
|
|
51
|
+
export declare function writeEnvLocalBridge(projectRoot: string, config: SupabasePortConfig): WriteResult;
|
|
52
|
+
/**
|
|
53
|
+
* Remove runa-managed .env.local. Never touches user-managed files.
|
|
54
|
+
*
|
|
55
|
+
* @param projectRoot - Project root directory
|
|
56
|
+
*/
|
|
57
|
+
export declare function removeEnvLocalBridge(projectRoot: string): RemoveResult;
|
|
58
|
+
//# sourceMappingURL=env-local-bridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-local-bridge.d.ts","sourceRoot":"","sources":["../../src/utils/env-local-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAkBH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,MAAM,WAAW,GACnB;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GACrD;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,eAAe,GAAG,cAAc,GAAG,eAAe,CAAA;CAAE,CAAC;AAEnF,MAAM,MAAM,YAAY,GACpB;IAAE,OAAO,EAAE,IAAI,CAAA;CAAE,GACjB;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,WAAW,GAAG,cAAc,CAAA;CAAE,CAAC;AAiC7D;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAQlE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,kBAAkB,GAAG,WAAW,CAoBhG;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,YAAY,CAatE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runa-ai/runa-cli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.61",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "AI-powered DevOps CLI",
|
|
6
6
|
"type": "module",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"typescript": "5.9.3",
|
|
54
54
|
"xstate": "5.28.0",
|
|
55
55
|
"zod": "4.3.6",
|
|
56
|
-
"@runa-ai/runa": "0.5.
|
|
56
|
+
"@runa-ai/runa": "0.5.61",
|
|
57
57
|
"@runa-ai/runa-xstate-test-plugin": "0.5.58"
|
|
58
58
|
},
|
|
59
59
|
"engines": {
|