@runa-ai/runa-cli 0.5.44 → 0.5.46
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/machine/machine.d.ts.map +1 -1
- package/dist/commands/ci/utils/app-runtime.d.ts +10 -0
- package/dist/commands/ci/utils/app-runtime.d.ts.map +1 -1
- package/dist/commands/db/utils/import-impact-analyzer.d.ts +8 -2
- package/dist/commands/db/utils/import-impact-analyzer.d.ts.map +1 -1
- package/dist/commands/db/utils/schema-sync.d.ts.map +1 -1
- package/dist/commands/dev/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev/contract.d.ts +1 -0
- package/dist/commands/dev/contract.d.ts.map +1 -1
- package/dist/commands/dev/machine.d.ts +1 -0
- package/dist/commands/dev/machine.d.ts.map +1 -1
- package/dist/commands/env/commands/env-pull.d.ts.map +1 -1
- package/dist/commands/env/constants/local-supabase.d.ts +61 -9
- package/dist/commands/env/constants/local-supabase.d.ts.map +1 -1
- package/dist/commands/template-check/config.d.ts.map +1 -1
- package/dist/index.js +272 -274
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine.d.ts","sourceRoot":"","sources":["../../../../src/commands/ci/machine/machine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,EAAU,KAAK,YAAY,EAAS,MAAM,QAAQ,CAAC;AA8C1D,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAqB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"machine.d.ts","sourceRoot":"","sources":["../../../../src/commands/ci/machine/machine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,EAAU,KAAK,YAAY,EAAS,MAAM,QAAQ,CAAC;AA8C1D,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAqB,MAAM,YAAY,CAAC;AAexE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAymCpB,CAAC;AAMH,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC;AACzC,MAAM,MAAM,UAAU,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,CAAC;AAMxD;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,UAAU,GAAG,MAAM,CAYzD;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAExD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,UAAU,GAAG,MAAM,GAAG,IAAI,CAE5D;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,UAAU,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAE3D"}
|
|
@@ -9,12 +9,22 @@ export declare function writeEnvLocal(params: {
|
|
|
9
9
|
appDir: string;
|
|
10
10
|
values: Record<string, string>;
|
|
11
11
|
}): Promise<void>;
|
|
12
|
+
/**
|
|
13
|
+
* App start mode:
|
|
14
|
+
* - 'dev': Development mode with hot reload (next dev)
|
|
15
|
+
* - 'start': Production mode (next start, requires build)
|
|
16
|
+
*/
|
|
17
|
+
export type AppMode = 'dev' | 'start';
|
|
12
18
|
export declare function startAppBackground(params: {
|
|
13
19
|
repoRoot: string;
|
|
14
20
|
appDir: string;
|
|
15
21
|
port: number;
|
|
16
22
|
env: NodeJS.ProcessEnv;
|
|
17
23
|
tmpDir: string;
|
|
24
|
+
/** App mode: 'dev' for development (hot reload), 'start' for production. Default: 'start' */
|
|
25
|
+
mode?: AppMode;
|
|
26
|
+
/** Stream output to terminal in addition to log file. Default: false */
|
|
27
|
+
stream?: boolean;
|
|
18
28
|
}): Promise<{
|
|
19
29
|
pid: number;
|
|
20
30
|
cleanupStreams: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-runtime.d.ts","sourceRoot":"","sources":["../../../../src/commands/ci/utils/app-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"app-runtime.d.ts","sourceRoot":"","sources":["../../../../src/commands/ci/utils/app-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA+GH,wBAAsB,aAAa,CAAC,MAAM,EAAE;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC,GAAG,OAAO,CAAC,IAAI,CAAC,CAMhB;AAiHD;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,KAAK,GAAG,OAAO,CAAC;AA4DtC,wBAAsB,kBAAkB,CAAC,MAAM,EAAE;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,6FAA6F;IAC7F,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,wEAAwE;IACxE,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC,CA+DvD;AAED,wBAAsB,eAAe,CAAC,MAAM,EAAE;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAAC,IAAI,CAAC,CAOhB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* AI HINT: Schema Import Impact Analyzer
|
|
2
|
+
* AI HINT: Schema Import Impact Analyzer (ts-morph based)
|
|
3
3
|
*
|
|
4
4
|
* Purpose: Analyze which files import schema tables/types and report impact
|
|
5
5
|
* Usage: Used by `runa db sync --show-import-impact` to help developers
|
|
@@ -7,9 +7,15 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Flow:
|
|
9
9
|
* 1. Scan project for TypeScript files
|
|
10
|
-
* 2.
|
|
10
|
+
* 2. Use ts-morph AST to find imports from database/schema packages
|
|
11
11
|
* 3. Map imported symbols to files
|
|
12
12
|
* 4. Report which files would be affected by changes
|
|
13
|
+
*
|
|
14
|
+
* Why ts-morph (not regex):
|
|
15
|
+
* - Correctly handles comments containing 'import' keywords
|
|
16
|
+
* - Handles multi-line imports
|
|
17
|
+
* - Handles template literals and nested quotes
|
|
18
|
+
* - Per .claude/rules/code-quality.md: "Use AST (ts-morph) for TypeScript parsing"
|
|
13
19
|
*/
|
|
14
20
|
export interface ImportReference {
|
|
15
21
|
/** File path relative to project root */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import-impact-analyzer.d.ts","sourceRoot":"","sources":["../../../../src/commands/db/utils/import-impact-analyzer.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"import-impact-analyzer.d.ts","sourceRoot":"","sources":["../../../../src/commands/db/utils/import-impact-analyzer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAUH,MAAM,WAAW,eAAe;IAC9B,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,iDAAiD;IACjD,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC,CAAC;IAC5C,oCAAoC;IACpC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gCAAgC;IAChC,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AA+JD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,kBAAkB,CA8BvE;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,kBAAkB,EAC1B,cAAc,CAAC,EAAE,MAAM,EAAE,GACxB,MAAM,EAAE,CAoCV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-sync.d.ts","sourceRoot":"","sources":["../../../../src/commands/db/utils/schema-sync.ts"],"names":[],"mappings":"AA0KA,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,QAAQ;IACvB,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC3C,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAErC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,mBAAmB,EAAE,KAAK,CAAC;QACzB,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,YAAY,EAAE,MAAM,EAAE,CAAC;QACvB,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,OAAO,EAAE,MAAM,EAAE,CAAC;KACnB,CAAC,CAAC;CACJ;AAMD;;;;;;;;;;;GAWG;AACH,wBAAsB,2BAA2B,CAC/C,aAAa,EAAE,MAAM,EACrB,WAAW,GAAE,MAAsB,GAClC,OAAO,CAAC;IACT,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;CAC5C,CAAC,
|
|
1
|
+
{"version":3,"file":"schema-sync.d.ts","sourceRoot":"","sources":["../../../../src/commands/db/utils/schema-sync.ts"],"names":[],"mappings":"AA0KA,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,QAAQ;IACvB,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC3C,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAErC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,mBAAmB,EAAE,KAAK,CAAC;QACzB,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,YAAY,EAAE,MAAM,EAAE,CAAC;QACvB,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,OAAO,EAAE,MAAM,EAAE,CAAC;KACnB,CAAC,CAAC;CACJ;AAMD;;;;;;;;;;;GAWG;AACH,wBAAsB,2BAA2B,CAC/C,aAAa,EAAE,MAAM,EACrB,WAAW,GAAE,MAAsB,GAClC,OAAO,CAAC;IACT,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;CAC5C,CAAC,CA6CD;AAED;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE;IACR,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB,CAAC,EAAE,MAAM,EAAE,CAAC;CACpC,GACA,OAAO,CAAC;IACT,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;CACtC,CAAC,CAoDD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE;IACjC,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC5B,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAC3C,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IACrC,uEAAuE;IACvE,0BAA0B,CAAC,EAAE,MAAM,EAAE,CAAC;CACvC,GAAG,QAAQ,CA0DX;AAMD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,8BAA8B,CAC5C,aAAa,EAAE,MAAM,EACrB,WAAW,GAAE,MAAsB,GAClC,MAAM,EAAE,CA0CV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../../src/commands/dev/commands/dev.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuMpC,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../../../src/commands/dev/commands/dev.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuMpC,eAAO,MAAM,UAAU,SAmBnB,CAAC"}
|
|
@@ -18,6 +18,7 @@ export declare const DevInputSchema: z.ZodObject<{
|
|
|
18
18
|
skipDb: z.ZodDefault<z.ZodBoolean>;
|
|
19
19
|
skipApp: z.ZodDefault<z.ZodBoolean>;
|
|
20
20
|
verbose: z.ZodDefault<z.ZodBoolean>;
|
|
21
|
+
stream: z.ZodDefault<z.ZodBoolean>;
|
|
21
22
|
targetDir: z.ZodOptional<z.ZodString>;
|
|
22
23
|
}, z.core.$strict>;
|
|
23
24
|
export type DevInput = z.infer<typeof DevInputSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../src/commands/dev/contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;GAEG;AACH,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../src/commands/dev/contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;kBAehB,CAAC;AAEZ,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAMtD;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;EAAgE,CAAC;AAElG,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAMlE;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;kBAajB,CAAC;AAEZ,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine.d.ts","sourceRoot":"","sources":["../../../src/commands/dev/machine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAS1D,OAAO,KAAK,EAAE,UAAU,EAAY,QAAQ,EAAa,MAAM,YAAY,CAAC;AAsF5E,UAAU,aAAa;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"machine.d.ts","sourceRoot":"","sources":["../../../src/commands/dev/machine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,QAAQ,CAAC;AAS1D,OAAO,KAAK,EAAE,UAAU,EAAY,QAAQ,EAAa,MAAM,YAAY,CAAC;AAsF5E,UAAU,aAAa;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,UAAU,cAAc;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAoCD,UAAU,aAAa;IACrB,GAAG,EAAE,MAAM,CAAC;CACb;AAoBD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAIH,QAAQ;cAAY,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;EA8K5C,CAAC;AAMH,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC;AAC3C,MAAM,MAAM,WAAW,GAAG,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;AAM1D;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM,CAa1D;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAEzD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAE7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env-pull.d.ts","sourceRoot":"","sources":["../../../../src/commands/env/commands/env-pull.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAaH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"env-pull.d.ts","sourceRoot":"","sources":["../../../../src/commands/env/commands/env-pull.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAaH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAu9BpC,eAAO,MAAM,WAAW,SA+BpB,CAAC"}
|
|
@@ -1,18 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* AI HINT: Local Supabase Constants
|
|
3
3
|
*
|
|
4
|
-
* Purpose:
|
|
4
|
+
* Purpose: Dynamic values for local Supabase development (supabase start)
|
|
5
5
|
* These are public, well-known values used by all Supabase CLI installations.
|
|
6
6
|
*
|
|
7
7
|
* Source: https://supabase.com/docs/guides/cli/local-development
|
|
8
8
|
*
|
|
9
|
+
* Port Detection (Priority Order):
|
|
10
|
+
* 1. supabase/config.toml [api].port and [db].port settings
|
|
11
|
+
* 2. Default Supabase ports (54321 for API, 54322 for DB)
|
|
12
|
+
*
|
|
9
13
|
* Note: These keys are intentionally public and NOT secrets.
|
|
10
14
|
* They are the same for all local Supabase instances.
|
|
11
15
|
*/
|
|
16
|
+
interface SupabasePorts {
|
|
17
|
+
api: number;
|
|
18
|
+
db: number;
|
|
19
|
+
}
|
|
12
20
|
/**
|
|
13
|
-
*
|
|
21
|
+
* Detect Supabase ports from config.toml or use defaults.
|
|
22
|
+
*
|
|
23
|
+
* Priority:
|
|
24
|
+
* 1. supabase/config.toml settings
|
|
25
|
+
* 2. Default ports (54321/54322)
|
|
26
|
+
*
|
|
27
|
+
* @param projectRoot - Project root directory (defaults to process.cwd())
|
|
28
|
+
* @returns Detected ports
|
|
14
29
|
*/
|
|
15
|
-
export declare
|
|
30
|
+
export declare function detectLocalSupabasePorts(projectRoot?: string): SupabasePorts;
|
|
16
31
|
/**
|
|
17
32
|
* Local Supabase anon key (fixed, public value)
|
|
18
33
|
* This is the same for all local Supabase instances.
|
|
@@ -24,20 +39,57 @@ export declare const LOCAL_SUPABASE_ANON_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpX
|
|
|
24
39
|
*/
|
|
25
40
|
export declare const LOCAL_SUPABASE_SERVICE_ROLE_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU";
|
|
26
41
|
/**
|
|
27
|
-
*
|
|
28
|
-
* User: postgres, Password: postgres (default local credentials)
|
|
42
|
+
* Build local Supabase URL from detected port.
|
|
29
43
|
*/
|
|
30
|
-
export declare
|
|
44
|
+
export declare function buildLocalSupabaseUrl(projectRoot?: string): string;
|
|
45
|
+
/**
|
|
46
|
+
* Build local database URL from detected port.
|
|
47
|
+
*/
|
|
48
|
+
export declare function buildLocalDatabaseUrl(projectRoot?: string): string;
|
|
49
|
+
/**
|
|
50
|
+
* Get map of environment variable keys to their local Supabase values.
|
|
51
|
+
*
|
|
52
|
+
* This function dynamically generates values based on detected ports.
|
|
53
|
+
*
|
|
54
|
+
* @param projectRoot - Project root directory (defaults to process.cwd())
|
|
55
|
+
* @returns Environment variable key-value map
|
|
56
|
+
*/
|
|
57
|
+
export declare function getLocalSupabaseEnvValues(projectRoot?: string): Record<string, string>;
|
|
31
58
|
/**
|
|
32
|
-
*
|
|
59
|
+
* Get human-readable descriptions for each local value (for summary display).
|
|
60
|
+
*
|
|
61
|
+
* @param projectRoot - Project root directory (defaults to process.cwd())
|
|
62
|
+
* @returns Description map
|
|
63
|
+
*/
|
|
64
|
+
export declare function getLocalValueDescriptions(projectRoot?: string): Record<string, string>;
|
|
65
|
+
/**
|
|
66
|
+
* @deprecated Use getLocalSupabaseEnvValues() instead.
|
|
67
|
+
* This constant uses default ports; prefer the function for dynamic port detection.
|
|
33
68
|
*/
|
|
34
69
|
export declare const LOCAL_SUPABASE_ENV_VALUES: Record<string, string>;
|
|
35
70
|
/**
|
|
36
|
-
*
|
|
71
|
+
* @deprecated Use Object.keys(getLocalSupabaseEnvValues()) instead.
|
|
37
72
|
*/
|
|
38
73
|
export declare const LOCAL_REPLACEMENT_KEYS: string[];
|
|
39
74
|
/**
|
|
40
|
-
*
|
|
75
|
+
* @deprecated Use getLocalValueDescriptions() instead.
|
|
41
76
|
*/
|
|
42
77
|
export declare const LOCAL_VALUE_DESCRIPTIONS: Record<string, string>;
|
|
78
|
+
/**
|
|
79
|
+
* @deprecated Use buildLocalSupabaseUrl() instead.
|
|
80
|
+
*/
|
|
81
|
+
export declare const LOCAL_SUPABASE_URL = "http://127.0.0.1:54321";
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated Use buildLocalDatabaseUrl() instead.
|
|
84
|
+
*/
|
|
85
|
+
export declare const LOCAL_DATABASE_URL = "postgresql://postgres:postgres@127.0.0.1:54322/postgres";
|
|
86
|
+
/**
|
|
87
|
+
* Validate that all URL values point to localhost.
|
|
88
|
+
* This prevents accidental production URL usage in local development.
|
|
89
|
+
*
|
|
90
|
+
* @param envValues - Environment values to validate
|
|
91
|
+
* @throws Error if any URL doesn't point to localhost
|
|
92
|
+
*/
|
|
93
|
+
export declare function validateLocalhostValues(envValues: Record<string, string>): void;
|
|
94
|
+
export {};
|
|
43
95
|
//# sourceMappingURL=local-supabase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-supabase.d.ts","sourceRoot":"","sources":["../../../../src/commands/env/constants/local-supabase.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"local-supabase.d.ts","sourceRoot":"","sources":["../../../../src/commands/env/constants/local-supabase.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAgBH,UAAU,aAAa;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;CACZ;AA6DD;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,WAAW,GAAE,MAAsB,GAAG,aAAa,CAW3F;AAMD;;;GAGG;AACH,eAAO,MAAM,uBAAuB,8JACyH,CAAC;AAE9J;;;GAGG;AACH,eAAO,MAAM,+BAA+B,yKAC4H,CAAC;AAEzK;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,GAAE,MAAsB,GAAG,MAAM,CAGjF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,GAAE,MAAsB,GAAG,MAAM,CAGjF;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,WAAW,GAAE,MAAsB,GAClC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAexB;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,WAAW,GAAE,MAAsB,GAClC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAWxB;AAMD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAA+B,CAAC;AAE7F;;GAEG;AACH,eAAO,MAAM,sBAAsB,UAAyC,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAA+B,CAAC;AAE5F;;GAEG;AACH,eAAO,MAAM,kBAAkB,2BAAyC,CAAC;AAEzE;;GAEG;AACH,eAAO,MAAM,kBAAkB,4DAAyE,CAAC;AAMzG;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAwB/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/commands/template-check/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,2CAA4C,CAAC;AAMzE;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/commands/template-check/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,2CAA4C,CAAC;AAMzE;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAuEnC,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAwDvC,CAAC;AAMX;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8EvB,CAAC;AAMX;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B,EAAE,SAAS,MAAM,EA6DjD,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -868,7 +868,7 @@ __export(types_exports, {
|
|
|
868
868
|
calculateSummary: () => calculateSummary,
|
|
869
869
|
createInitialContext: () => createInitialContext2,
|
|
870
870
|
createOutput: () => createOutput4,
|
|
871
|
-
getErrorMessage: () =>
|
|
871
|
+
getErrorMessage: () => getErrorMessage
|
|
872
872
|
});
|
|
873
873
|
function createInitialContext2(input3, repoRoot) {
|
|
874
874
|
return {
|
|
@@ -915,7 +915,7 @@ function createOutput4(context) {
|
|
|
915
915
|
durationMs
|
|
916
916
|
};
|
|
917
917
|
}
|
|
918
|
-
function
|
|
918
|
+
function getErrorMessage(error) {
|
|
919
919
|
return error instanceof Error ? error.message : String(error);
|
|
920
920
|
}
|
|
921
921
|
var init_types = __esm({
|
|
@@ -929,7 +929,7 @@ var CLI_VERSION, HAS_ADMIN_COMMAND;
|
|
|
929
929
|
var init_version = __esm({
|
|
930
930
|
"src/version.ts"() {
|
|
931
931
|
init_esm_shims();
|
|
932
|
-
CLI_VERSION = "0.5.
|
|
932
|
+
CLI_VERSION = "0.5.46";
|
|
933
933
|
HAS_ADMIN_COMMAND = false;
|
|
934
934
|
}
|
|
935
935
|
});
|
|
@@ -7432,6 +7432,8 @@ z.object({
|
|
|
7432
7432
|
skipApp: z.boolean().default(false),
|
|
7433
7433
|
/** Show detailed output */
|
|
7434
7434
|
verbose: z.boolean().default(false),
|
|
7435
|
+
/** Stream app output to terminal (in addition to log file). Default: true */
|
|
7436
|
+
stream: z.boolean().default(true),
|
|
7435
7437
|
/** Target directory (defaults to cwd) */
|
|
7436
7438
|
targetDir: z.string().optional()
|
|
7437
7439
|
}).strict();
|
|
@@ -7653,9 +7655,9 @@ async function executePrSetupBase(input3, ensureTmpDir) {
|
|
|
7653
7655
|
// src/commands/ci/utils/app-runtime.ts
|
|
7654
7656
|
init_esm_shims();
|
|
7655
7657
|
function pipeChildOutputToLog(params) {
|
|
7656
|
-
const sources = [
|
|
7657
|
-
|
|
7658
|
-
);
|
|
7658
|
+
const sources = [];
|
|
7659
|
+
if (params.stdout) sources.push({ stream: params.stdout, isStderr: false });
|
|
7660
|
+
if (params.stderr) sources.push({ stream: params.stderr, isStderr: true });
|
|
7659
7661
|
if (sources.length === 0) {
|
|
7660
7662
|
params.logStream.end();
|
|
7661
7663
|
return { cleanup: () => {
|
|
@@ -7669,10 +7671,14 @@ function pipeChildOutputToLog(params) {
|
|
|
7669
7671
|
params.logStream.end();
|
|
7670
7672
|
}
|
|
7671
7673
|
};
|
|
7672
|
-
for (const source of sources) {
|
|
7674
|
+
for (const { stream: source, isStderr } of sources) {
|
|
7673
7675
|
const onData = (chunk) => {
|
|
7674
7676
|
if (cleanedUp) return;
|
|
7675
7677
|
const canContinue = params.logStream.write(chunk);
|
|
7678
|
+
if (params.streamToTerminal) {
|
|
7679
|
+
const terminalStream = isStderr ? process.stderr : process.stdout;
|
|
7680
|
+
terminalStream.write(chunk);
|
|
7681
|
+
}
|
|
7676
7682
|
if (!canContinue) {
|
|
7677
7683
|
source.pause();
|
|
7678
7684
|
params.logStream.once("drain", () => {
|
|
@@ -7690,7 +7696,7 @@ function pipeChildOutputToLog(params) {
|
|
|
7690
7696
|
const cleanup = () => {
|
|
7691
7697
|
if (cleanedUp) return;
|
|
7692
7698
|
cleanedUp = true;
|
|
7693
|
-
for (const source of sources) {
|
|
7699
|
+
for (const { stream: source } of sources) {
|
|
7694
7700
|
source.removeAllListeners("data");
|
|
7695
7701
|
source.removeAllListeners("end");
|
|
7696
7702
|
source.removeAllListeners("close");
|
|
@@ -7787,33 +7793,37 @@ async function readPackageScripts(pkgPath) {
|
|
|
7787
7793
|
return null;
|
|
7788
7794
|
}
|
|
7789
7795
|
}
|
|
7790
|
-
function
|
|
7791
|
-
const
|
|
7792
|
-
const
|
|
7793
|
-
const
|
|
7794
|
-
const
|
|
7795
|
-
|
|
7796
|
-
|
|
7796
|
+
function determineAppCommand(mode, isMonorepo2, rootScripts, appScripts, repoRoot, appDir, port) {
|
|
7797
|
+
const ciScriptName = mode === "dev" ? "dev:ci" : "start:ci";
|
|
7798
|
+
const nextCommand = mode === "dev" ? "dev" : "start";
|
|
7799
|
+
const rootHasCiScript = Boolean(rootScripts?.[ciScriptName]);
|
|
7800
|
+
const appHasCiScript = Boolean(appScripts?.[ciScriptName]);
|
|
7801
|
+
const rootHasDefaultScript = mode === "start" && Boolean(rootScripts?.["start"]);
|
|
7802
|
+
const appHasDefaultScript = mode === "start" && Boolean(appScripts?.["start"]);
|
|
7803
|
+
if (isMonorepo2 && (rootHasCiScript || rootHasDefaultScript)) {
|
|
7804
|
+
const scriptName = rootHasCiScript ? ciScriptName : "start";
|
|
7797
7805
|
return { command: ["pnpm", scriptName], useRootScript: true };
|
|
7798
7806
|
}
|
|
7799
|
-
if (
|
|
7800
|
-
const scriptName =
|
|
7807
|
+
if (appHasCiScript || appHasDefaultScript) {
|
|
7808
|
+
const scriptName = appHasCiScript ? ciScriptName : "start";
|
|
7801
7809
|
const dirArgs2 = isMonorepo2 ? ["-C", path10__default.relative(repoRoot, appDir)] : [];
|
|
7802
7810
|
return { command: ["pnpm", ...dirArgs2, scriptName], useRootScript: false };
|
|
7803
7811
|
}
|
|
7804
7812
|
const dirArgs = isMonorepo2 ? ["-C", path10__default.relative(repoRoot, appDir)] : [];
|
|
7805
7813
|
return {
|
|
7806
|
-
command: ["pnpm", ...dirArgs, "exec", "next",
|
|
7814
|
+
command: ["pnpm", ...dirArgs, "exec", "next", nextCommand, "-p", String(port)],
|
|
7807
7815
|
useRootScript: false
|
|
7808
7816
|
};
|
|
7809
7817
|
}
|
|
7810
7818
|
async function startAppBackground(params) {
|
|
7819
|
+
const mode = params.mode ?? "start";
|
|
7811
7820
|
const isMonorepo2 = params.appDir !== params.repoRoot;
|
|
7812
7821
|
const rootPkgPath = path10__default.join(params.repoRoot, "package.json");
|
|
7813
7822
|
const appPkgPath = path10__default.join(params.appDir, "package.json");
|
|
7814
7823
|
const rootScripts = await readPackageScripts(rootPkgPath);
|
|
7815
7824
|
const appScripts = isMonorepo2 ? await readPackageScripts(appPkgPath) : rootScripts;
|
|
7816
|
-
const { command, useRootScript } =
|
|
7825
|
+
const { command, useRootScript } = determineAppCommand(
|
|
7826
|
+
mode,
|
|
7817
7827
|
isMonorepo2,
|
|
7818
7828
|
rootScripts,
|
|
7819
7829
|
appScripts,
|
|
@@ -7824,8 +7834,10 @@ async function startAppBackground(params) {
|
|
|
7824
7834
|
const appLog = path10__default.join(params.tmpDir, "app.log");
|
|
7825
7835
|
const out = createWriteStream(appLog, { flags: "a" });
|
|
7826
7836
|
const commandStr = command.join(" ");
|
|
7837
|
+
const modeLabel = mode === "dev" ? "development (hot reload)" : "production";
|
|
7827
7838
|
const logHeader = [
|
|
7828
7839
|
`[runa] Starting app at ${(/* @__PURE__ */ new Date()).toISOString()}`,
|
|
7840
|
+
`[runa] Mode: ${modeLabel}`,
|
|
7829
7841
|
`[runa] Command: ${commandStr}`,
|
|
7830
7842
|
`[runa] Working directory: ${params.repoRoot}`,
|
|
7831
7843
|
`[runa] App directory: ${path10__default.relative(params.repoRoot, params.appDir) || "."}`,
|
|
@@ -7845,7 +7857,8 @@ async function startAppBackground(params) {
|
|
|
7845
7857
|
const { cleanup: cleanupStreams } = pipeChildOutputToLog({
|
|
7846
7858
|
stdout: child.stdout,
|
|
7847
7859
|
stderr: child.stderr,
|
|
7848
|
-
logStream: out
|
|
7860
|
+
logStream: out,
|
|
7861
|
+
streamToTerminal: params.stream
|
|
7849
7862
|
});
|
|
7850
7863
|
const pid = child.pid ?? -1;
|
|
7851
7864
|
await writeFile(path10__default.join(params.tmpDir, "app.pid"), `${pid}
|
|
@@ -7992,7 +8005,7 @@ var e2eMeta2 = {
|
|
|
7992
8005
|
};
|
|
7993
8006
|
var appStartActor = fromPromise(
|
|
7994
8007
|
async ({ input: input3 }) => {
|
|
7995
|
-
const { repoRoot, appDir, port, tmpDir } = input3;
|
|
8008
|
+
const { repoRoot, appDir, port, tmpDir, stream } = input3;
|
|
7996
8009
|
const fullTmpDir = path10__default.join(repoRoot, tmpDir);
|
|
7997
8010
|
await mkdir(fullTmpDir, { recursive: true });
|
|
7998
8011
|
const result = await startAppBackground({
|
|
@@ -8000,7 +8013,9 @@ var appStartActor = fromPromise(
|
|
|
8000
8013
|
appDir,
|
|
8001
8014
|
port,
|
|
8002
8015
|
env: process.env,
|
|
8003
|
-
tmpDir: fullTmpDir
|
|
8016
|
+
tmpDir: fullTmpDir,
|
|
8017
|
+
mode: "dev",
|
|
8018
|
+
stream
|
|
8004
8019
|
});
|
|
8005
8020
|
await waitForAppReady({
|
|
8006
8021
|
port,
|
|
@@ -8039,7 +8054,7 @@ var devMachine = setup({
|
|
|
8039
8054
|
id: "dev",
|
|
8040
8055
|
initial: "idle",
|
|
8041
8056
|
context: ({ input: input3 }) => {
|
|
8042
|
-
const repoRoot = input3.repoRoot;
|
|
8057
|
+
const repoRoot = input3.repoRoot ?? process.cwd();
|
|
8043
8058
|
return {
|
|
8044
8059
|
input: input3.input,
|
|
8045
8060
|
repoRoot,
|
|
@@ -8133,7 +8148,8 @@ var devMachine = setup({
|
|
|
8133
8148
|
repoRoot: context.repoRoot,
|
|
8134
8149
|
appDir: detected?.appDir ?? context.repoRoot,
|
|
8135
8150
|
port: context.input.port,
|
|
8136
|
-
tmpDir: context.tmpDir
|
|
8151
|
+
tmpDir: context.tmpDir,
|
|
8152
|
+
stream: context.input.stream
|
|
8137
8153
|
};
|
|
8138
8154
|
},
|
|
8139
8155
|
onDone: {
|
|
@@ -8336,12 +8352,13 @@ async function runDevAction(options, cmd) {
|
|
|
8336
8352
|
);
|
|
8337
8353
|
}
|
|
8338
8354
|
}
|
|
8339
|
-
var devCommand = new Command("dev").description("Start development server (Supabase + Next.js)").option("--port <number>", "Port for Next.js dev server", (val) => Number.parseInt(val, 10), 3e3).option("--skip-db", "Skip Supabase start").option("--skip-app", "Start Supabase only (no app server)").option("--verbose", "Show detailed output").option("--target-dir <path>", "Target directory (defaults to repo root)").action(async (options, cmd) => {
|
|
8355
|
+
var devCommand = new Command("dev").description("Start development server (Supabase + Next.js)").option("--port <number>", "Port for Next.js dev server", (val) => Number.parseInt(val, 10), 3e3).option("--skip-db", "Skip Supabase start").option("--skip-app", "Start Supabase only (no app server)").option("--verbose", "Show detailed output").option("--no-stream", "Disable streaming app output to terminal (log to file only)").option("--target-dir <path>", "Target directory (defaults to repo root)").action(async (options, cmd) => {
|
|
8340
8356
|
const input3 = {
|
|
8341
8357
|
port: options.port,
|
|
8342
8358
|
skipDb: options.skipDb ?? false,
|
|
8343
8359
|
skipApp: options.skipApp ?? false,
|
|
8344
8360
|
verbose: options.verbose ?? false,
|
|
8361
|
+
stream: options.stream ?? true,
|
|
8345
8362
|
targetDir: options.targetDir
|
|
8346
8363
|
};
|
|
8347
8364
|
await runDevAction(input3, cmd);
|
|
@@ -14806,9 +14823,6 @@ function createOutput3(context) {
|
|
|
14806
14823
|
error: context.error ?? void 0
|
|
14807
14824
|
};
|
|
14808
14825
|
}
|
|
14809
|
-
function getErrorMessage(error) {
|
|
14810
|
-
return error instanceof Error ? error.message : String(error);
|
|
14811
|
-
}
|
|
14812
14826
|
function extractErrorMessage2(event, fallbackMessage) {
|
|
14813
14827
|
return event.error instanceof Error ? event.error.message : fallbackMessage;
|
|
14814
14828
|
}
|
|
@@ -15034,7 +15048,6 @@ var ciMachine = setup({
|
|
|
15034
15048
|
invoke: {
|
|
15035
15049
|
src: "upsertComment",
|
|
15036
15050
|
input: ({ context }) => {
|
|
15037
|
-
console.log("[DEBUG] initialComment: Posting initial progress comment");
|
|
15038
15051
|
const prNumber = context.prContext?.prNumber ?? 0;
|
|
15039
15052
|
const progressInput = createProgressCommentInput(
|
|
15040
15053
|
context,
|
|
@@ -15592,11 +15605,7 @@ ${generateProgressCommentBody(progressInput)}`;
|
|
|
15592
15605
|
// Core tests failed - go to coreTestsFailed
|
|
15593
15606
|
guard: ({ event }) => {
|
|
15594
15607
|
const failedLayers = event.output.failedLayers ?? [];
|
|
15595
|
-
|
|
15596
|
-
console.log(
|
|
15597
|
-
`[DEBUG] runCoreTests.onDone guard: failedLayers=${JSON.stringify(failedLayers)}, hasFailures=${hasFailures}`
|
|
15598
|
-
);
|
|
15599
|
-
return hasFailures;
|
|
15608
|
+
return failedLayers.length > 0;
|
|
15600
15609
|
},
|
|
15601
15610
|
target: "coreTestsFailed",
|
|
15602
15611
|
actions: assign({
|
|
@@ -15605,9 +15614,6 @@ ${generateProgressCommentBody(progressInput)}`;
|
|
|
15605
15614
|
const results = event.output.results ?? [];
|
|
15606
15615
|
const failedLayers = event.output.failedLayers ?? [];
|
|
15607
15616
|
if (results.length === 0 && failedLayers.length > 0) {
|
|
15608
|
-
console.log(
|
|
15609
|
-
`[DEBUG] Converting failedLayers to layerResults: ${JSON.stringify(failedLayers)}`
|
|
15610
|
-
);
|
|
15611
15617
|
const layerResults = {};
|
|
15612
15618
|
for (const layer of failedLayers) {
|
|
15613
15619
|
layerResults[layer] = { status: "failed", exitCode: 1 };
|
|
@@ -15662,7 +15668,6 @@ ${generateProgressCommentBody(progressInput)}`;
|
|
|
15662
15668
|
entry: assign({
|
|
15663
15669
|
exitCode: ({ context }) => {
|
|
15664
15670
|
if (Object.keys(context.layerResults).length === 0) {
|
|
15665
|
-
console.log("[DEBUG] coreTestsFailed: layerResults is empty, returning exitCode=1");
|
|
15666
15671
|
return 1;
|
|
15667
15672
|
}
|
|
15668
15673
|
return computeExitCodeFromLayerResults(context.layerResults);
|
|
@@ -15687,7 +15692,6 @@ ${generateProgressCommentBody(progressInput)}`;
|
|
|
15687
15692
|
assertions: [{ type: "log", contains: "E2E phase" }]
|
|
15688
15693
|
}
|
|
15689
15694
|
},
|
|
15690
|
-
entry: () => console.log("[DEBUG] Entering e2ePhase (parallel: comment + E2E tests)"),
|
|
15691
15695
|
states: {
|
|
15692
15696
|
// Sub-state 1: Post intermediate comment
|
|
15693
15697
|
intermediateComment: {
|
|
@@ -15712,7 +15716,6 @@ ${generateProgressCommentBody(progressInput)}`;
|
|
|
15712
15716
|
invoke: {
|
|
15713
15717
|
src: "upsertComment",
|
|
15714
15718
|
input: ({ context }) => {
|
|
15715
|
-
console.log("[DEBUG] e2ePhase.intermediateComment: Posting intermediate comment");
|
|
15716
15719
|
const prNumber = context.prContext?.prNumber ?? 0;
|
|
15717
15720
|
const commentInput = createCommentInput(context, {
|
|
15718
15721
|
isIntermediate: true,
|
|
@@ -15742,7 +15745,6 @@ ${generateCommentBody(commentInput)}`;
|
|
|
15742
15745
|
invoke: {
|
|
15743
15746
|
src: "runLayers",
|
|
15744
15747
|
input: ({ context }) => {
|
|
15745
|
-
console.log("[DEBUG] e2ePhase.e2eTests: Running Layer 4");
|
|
15746
15748
|
const e2eBaseUrl = `http://localhost:${context.app?.port ?? 3e3}`;
|
|
15747
15749
|
return {
|
|
15748
15750
|
repoRoot: assertRepoRoot(context),
|
|
@@ -15768,9 +15770,6 @@ ${generateCommentBody(commentInput)}`;
|
|
|
15768
15770
|
// Merge E2E results into layerResults
|
|
15769
15771
|
layerResults: ({ context, event }) => {
|
|
15770
15772
|
const e2eResults = convertLayerResults(event.output.results);
|
|
15771
|
-
console.log(
|
|
15772
|
-
`[DEBUG] e2ePhase.e2eTests: E2E results=${JSON.stringify(e2eResults)}`
|
|
15773
|
-
);
|
|
15774
15773
|
return mergeLayerResults(context.layerResults, e2eResults);
|
|
15775
15774
|
}
|
|
15776
15775
|
})
|
|
@@ -15795,7 +15794,6 @@ ${generateCommentBody(commentInput)}`;
|
|
|
15795
15794
|
onDone: {
|
|
15796
15795
|
target: "finalize",
|
|
15797
15796
|
actions: [
|
|
15798
|
-
() => console.log("[DEBUG] e2ePhase complete, transitioning to finalize"),
|
|
15799
15797
|
// Compute final exit code including E2E results
|
|
15800
15798
|
assign({
|
|
15801
15799
|
exitCode: ({ context }) => computeExitCodeFromLayerResults(context.layerResults)
|
|
@@ -15859,113 +15857,47 @@ ${generateCommentBody(commentInput)}`;
|
|
|
15859
15857
|
}
|
|
15860
15858
|
},
|
|
15861
15859
|
postComment: {
|
|
15862
|
-
entry: () => {
|
|
15863
|
-
console.log("[DEBUG] Entering postComment state");
|
|
15864
|
-
},
|
|
15865
15860
|
always: [
|
|
15866
15861
|
{
|
|
15867
15862
|
// Skip if GitHub comment should not be posted (mode, env, flag checks)
|
|
15868
|
-
guard: ({ context }) =>
|
|
15869
|
-
const shouldPost = shouldPostGitHubComment(context);
|
|
15870
|
-
const isCiPr = isCiPrMode(context);
|
|
15871
|
-
console.log(
|
|
15872
|
-
`[DEBUG] postComment guard: shouldPost=${shouldPost}, isCiPr=${isCiPr}, mode=${context.mode}, env=${context.executionEnv}, skipFlag=${context.input.skipGithubComment}`
|
|
15873
|
-
);
|
|
15874
|
-
if (!shouldPost) {
|
|
15875
|
-
console.log(
|
|
15876
|
-
`[DEBUG] Skipping final comment: shouldPostGitHubComment=false (mode=${context.mode}, env=${context.executionEnv})`
|
|
15877
|
-
);
|
|
15878
|
-
}
|
|
15879
|
-
return !shouldPost;
|
|
15880
|
-
},
|
|
15863
|
+
guard: ({ context }) => !shouldPostGitHubComment(context),
|
|
15881
15864
|
target: "complete"
|
|
15882
15865
|
},
|
|
15883
15866
|
{
|
|
15884
15867
|
// Skip if PR number is not available (can't post without it)
|
|
15885
|
-
guard: ({ context }) =>
|
|
15886
|
-
const skip = !context.prContext?.prNumber;
|
|
15887
|
-
if (skip) {
|
|
15888
|
-
console.log("[DEBUG] Skipping final comment: prNumber not available");
|
|
15889
|
-
}
|
|
15890
|
-
return skip;
|
|
15891
|
-
},
|
|
15868
|
+
guard: ({ context }) => !context.prContext?.prNumber,
|
|
15892
15869
|
target: "complete"
|
|
15893
15870
|
}
|
|
15894
15871
|
],
|
|
15895
15872
|
invoke: {
|
|
15896
15873
|
src: "upsertComment",
|
|
15897
15874
|
input: ({ context }) => {
|
|
15898
|
-
|
|
15899
|
-
|
|
15900
|
-
|
|
15901
|
-
const commentInput = createCommentInput(context);
|
|
15902
|
-
const body = `<!-- runa-ci-report -->
|
|
15875
|
+
const prNumber = assertPrNumber(context);
|
|
15876
|
+
const commentInput = createCommentInput(context);
|
|
15877
|
+
const body = `<!-- runa-ci-report -->
|
|
15903
15878
|
${generateCommentBody(commentInput)}`;
|
|
15904
|
-
|
|
15905
|
-
|
|
15906
|
-
|
|
15907
|
-
|
|
15908
|
-
|
|
15909
|
-
};
|
|
15910
|
-
} catch (error) {
|
|
15911
|
-
console.error(
|
|
15912
|
-
`[DEBUG] Failed to generate comment body: ${error instanceof Error ? error.message : String(error)}`
|
|
15913
|
-
);
|
|
15914
|
-
throw error;
|
|
15915
|
-
}
|
|
15916
|
-
},
|
|
15917
|
-
onDone: {
|
|
15918
|
-
target: "complete",
|
|
15919
|
-
actions: ({ event }) => {
|
|
15920
|
-
if (event.output.success) {
|
|
15921
|
-
console.log("[DEBUG] Final comment posted successfully");
|
|
15922
|
-
} else {
|
|
15923
|
-
console.error(
|
|
15924
|
-
`[DEBUG] Failed to post final comment: ${event.output.error ?? "Unknown error"}`
|
|
15925
|
-
);
|
|
15926
|
-
}
|
|
15927
|
-
}
|
|
15879
|
+
return {
|
|
15880
|
+
issueNumber: prNumber,
|
|
15881
|
+
marker: "<!-- runa-ci-report -->",
|
|
15882
|
+
body
|
|
15883
|
+
};
|
|
15928
15884
|
},
|
|
15929
|
-
|
|
15930
|
-
|
|
15931
|
-
actions: ({ event }) => {
|
|
15932
|
-
console.error(
|
|
15933
|
-
`[DEBUG] postComment actor error: ${event.error instanceof Error ? event.error.message : String(event.error)}`
|
|
15934
|
-
);
|
|
15935
|
-
}
|
|
15936
|
-
}
|
|
15885
|
+
onDone: { target: "complete" },
|
|
15886
|
+
onError: { target: "complete" }
|
|
15937
15887
|
}
|
|
15938
15888
|
},
|
|
15939
15889
|
complete: {
|
|
15940
|
-
entry: () => {
|
|
15941
|
-
console.log("[DEBUG] Entered finalize.complete (final sub-state)");
|
|
15942
|
-
},
|
|
15943
15890
|
type: "final"
|
|
15944
15891
|
}
|
|
15945
15892
|
},
|
|
15946
15893
|
onDone: [
|
|
15947
|
-
{
|
|
15948
|
-
|
|
15949
|
-
target: "failed",
|
|
15950
|
-
actions: () => {
|
|
15951
|
-
console.log("[DEBUG] finalize.onDone -> failed");
|
|
15952
|
-
}
|
|
15953
|
-
},
|
|
15954
|
-
{
|
|
15955
|
-
target: "done",
|
|
15956
|
-
actions: () => {
|
|
15957
|
-
console.log("[DEBUG] finalize.onDone -> done");
|
|
15958
|
-
}
|
|
15959
|
-
}
|
|
15894
|
+
{ guard: ({ context }) => context.exitCode !== 0, target: "failed" },
|
|
15895
|
+
{ target: "done" }
|
|
15960
15896
|
],
|
|
15961
15897
|
exit: [
|
|
15962
|
-
// Stop the app if it was started
|
|
15963
15898
|
({ context }) => {
|
|
15964
15899
|
if (context.appPid) {
|
|
15965
|
-
stopApp(context.appPid).catch((
|
|
15966
|
-
console.error(
|
|
15967
|
-
`[DEBUG] Warning: Failed to stop app (pid: ${context.appPid}): ${getErrorMessage(error)}`
|
|
15968
|
-
);
|
|
15900
|
+
stopApp(context.appPid).catch(() => {
|
|
15969
15901
|
});
|
|
15970
15902
|
}
|
|
15971
15903
|
}
|
|
@@ -15985,23 +15917,13 @@ ${generateCommentBody(commentInput)}`;
|
|
|
15985
15917
|
}
|
|
15986
15918
|
},
|
|
15987
15919
|
type: "final",
|
|
15988
|
-
entry:
|
|
15989
|
-
() =>
|
|
15990
|
-
|
|
15991
|
-
|
|
15992
|
-
|
|
15993
|
-
|
|
15994
|
-
|
|
15995
|
-
const computed = computeExitCodeFromLayerResults(context.layerResults);
|
|
15996
|
-
if (computed !== 0) {
|
|
15997
|
-
console.log(
|
|
15998
|
-
`[DEBUG] done state: Computing exitCode from layerResults: ${computed} (was ${context.exitCode})`
|
|
15999
|
-
);
|
|
16000
|
-
}
|
|
16001
|
-
return computed;
|
|
16002
|
-
}
|
|
16003
|
-
})
|
|
16004
|
-
]
|
|
15920
|
+
entry: assign({
|
|
15921
|
+
durationMs: () => Date.now(),
|
|
15922
|
+
exitCode: ({ context }) => {
|
|
15923
|
+
if (context.exitCode !== 0) return context.exitCode;
|
|
15924
|
+
return computeExitCodeFromLayerResults(context.layerResults);
|
|
15925
|
+
}
|
|
15926
|
+
})
|
|
16005
15927
|
},
|
|
16006
15928
|
failed: {
|
|
16007
15929
|
meta: {
|
|
@@ -16015,14 +15937,10 @@ ${generateCommentBody(commentInput)}`;
|
|
|
16015
15937
|
},
|
|
16016
15938
|
type: "final",
|
|
16017
15939
|
entry: [
|
|
16018
|
-
({ context }) => console.log(`[DEBUG] Entered final state: failed (exitCode=${context.exitCode})`),
|
|
16019
|
-
// Preserve exit code from testsFailed if already set, otherwise compute
|
|
16020
|
-
// If there's an error (actor failure), always return 1
|
|
16021
15940
|
assign({
|
|
16022
15941
|
exitCode: ({ context }) => context.exitCode !== 0 ? context.exitCode : context.error ? 1 : computeExitCodeFromLayerResults(context.layerResults),
|
|
16023
15942
|
durationMs: () => Date.now()
|
|
16024
15943
|
}),
|
|
16025
|
-
// Stop the app if it was started
|
|
16026
15944
|
({ context }) => {
|
|
16027
15945
|
if (context.appPid) {
|
|
16028
15946
|
stopApp(context.appPid).catch(() => {
|
|
@@ -19914,7 +19832,14 @@ function uniqueSorted(values) {
|
|
|
19914
19832
|
async function extractSchemaTablesAndEnums(dbPackagePath, projectRoot = process.cwd()) {
|
|
19915
19833
|
const validatedSchemaPath = validateSchemaPath(dbPackagePath, projectRoot);
|
|
19916
19834
|
const jiti = createJiti(projectRoot, { interopDefault: true });
|
|
19917
|
-
|
|
19835
|
+
let schemaModule;
|
|
19836
|
+
try {
|
|
19837
|
+
schemaModule = await jiti.import(validatedSchemaPath);
|
|
19838
|
+
} catch (error) {
|
|
19839
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
19840
|
+
const hint = errorMessage.includes("unknown is not defined") ? "\n\nHint: Add 'unknown' to drizzle-orm/pg-core imports:\n import { unknown, ... } from 'drizzle-orm/pg-core'" : "";
|
|
19841
|
+
throw new Error(`Failed to load schema from ${validatedSchemaPath}: ${errorMessage}${hint}`);
|
|
19842
|
+
}
|
|
19918
19843
|
const expectedTables = /* @__PURE__ */ new Set();
|
|
19919
19844
|
const expectedEnums = /* @__PURE__ */ new Map();
|
|
19920
19845
|
for (const value of Object.values(schemaModule)) {
|
|
@@ -24905,13 +24830,12 @@ var SKIP_DIRS = /* @__PURE__ */ new Set([
|
|
|
24905
24830
|
"__snapshots__"
|
|
24906
24831
|
]);
|
|
24907
24832
|
var MAX_FILE_SIZE = 1024 * 1024;
|
|
24908
|
-
var
|
|
24909
|
-
|
|
24910
|
-
|
|
24911
|
-
|
|
24912
|
-
/from\s+['"].*\/database\/src\/schema['"]/,
|
|
24913
|
-
/from\s+['"].*\/packages\/database\/src\/schema['"]/
|
|
24833
|
+
var SCHEMA_IMPORT_SOURCES = [
|
|
24834
|
+
"@runa-ai/runa-database/schema",
|
|
24835
|
+
"@runa/database/schema",
|
|
24836
|
+
"@runa/database"
|
|
24914
24837
|
];
|
|
24838
|
+
var SCHEMA_RELATIVE_PATTERNS = [/\/database\/src\/schema/, /\/packages\/database\/src\/schema/];
|
|
24915
24839
|
function findTsFiles(dir, files = []) {
|
|
24916
24840
|
if (!existsSync(dir)) return files;
|
|
24917
24841
|
const entries = readdirSync(dir, { withFileTypes: true });
|
|
@@ -24929,75 +24853,80 @@ function findTsFiles(dir, files = []) {
|
|
|
24929
24853
|
}
|
|
24930
24854
|
return files;
|
|
24931
24855
|
}
|
|
24932
|
-
function
|
|
24856
|
+
function isSchemaImport(moduleSpecifier) {
|
|
24857
|
+
if (SCHEMA_IMPORT_SOURCES.includes(moduleSpecifier)) {
|
|
24858
|
+
return true;
|
|
24859
|
+
}
|
|
24860
|
+
return SCHEMA_RELATIVE_PATTERNS.some((pattern) => pattern.test(moduleSpecifier));
|
|
24861
|
+
}
|
|
24862
|
+
function extractSchemaImportsFromAST(sourceFile, rootDir) {
|
|
24933
24863
|
const imports = [];
|
|
24864
|
+
const filePath = sourceFile.getFilePath();
|
|
24865
|
+
const relativeFilePath = relative(rootDir, filePath);
|
|
24866
|
+
const importDeclarations = sourceFile.getImportDeclarations();
|
|
24867
|
+
for (const importDecl of importDeclarations) {
|
|
24868
|
+
const moduleSpecifier = importDecl.getModuleSpecifierValue();
|
|
24869
|
+
if (!isSchemaImport(moduleSpecifier)) {
|
|
24870
|
+
continue;
|
|
24871
|
+
}
|
|
24872
|
+
const line = importDecl.getStartLineNumber();
|
|
24873
|
+
const namedImports = importDecl.getNamedImports();
|
|
24874
|
+
for (const namedImport of namedImports) {
|
|
24875
|
+
const name = namedImport.getName();
|
|
24876
|
+
const isTypeOnly = namedImport.isTypeOnly() || importDecl.isTypeOnly();
|
|
24877
|
+
imports.push({
|
|
24878
|
+
file: relativeFilePath,
|
|
24879
|
+
line,
|
|
24880
|
+
symbol: isTypeOnly ? `type ${name}` : name,
|
|
24881
|
+
source: moduleSpecifier
|
|
24882
|
+
});
|
|
24883
|
+
}
|
|
24884
|
+
const namespaceImport = importDecl.getNamespaceImport();
|
|
24885
|
+
if (namespaceImport) {
|
|
24886
|
+
imports.push({
|
|
24887
|
+
file: relativeFilePath,
|
|
24888
|
+
line,
|
|
24889
|
+
symbol: `* as ${namespaceImport.getText()}`,
|
|
24890
|
+
source: moduleSpecifier
|
|
24891
|
+
});
|
|
24892
|
+
}
|
|
24893
|
+
const defaultImport = importDecl.getDefaultImport();
|
|
24894
|
+
if (defaultImport) {
|
|
24895
|
+
imports.push({
|
|
24896
|
+
file: relativeFilePath,
|
|
24897
|
+
line,
|
|
24898
|
+
symbol: `default (${defaultImport.getText()})`,
|
|
24899
|
+
source: moduleSpecifier
|
|
24900
|
+
});
|
|
24901
|
+
}
|
|
24902
|
+
}
|
|
24903
|
+
return imports;
|
|
24904
|
+
}
|
|
24905
|
+
function extractSchemaImports(filePath, rootDir, project) {
|
|
24934
24906
|
try {
|
|
24935
24907
|
const stats = statSync(filePath);
|
|
24936
24908
|
if (stats.size > MAX_FILE_SIZE) {
|
|
24937
|
-
return
|
|
24938
|
-
}
|
|
24939
|
-
const content = readFileSync(filePath, "utf-8");
|
|
24940
|
-
const lines = content.split("\n");
|
|
24941
|
-
for (let i = 0; i < lines.length; i++) {
|
|
24942
|
-
const line = lines[i];
|
|
24943
|
-
const isSchemaImport = SCHEMA_IMPORT_PATTERNS.some((pattern) => pattern.test(line));
|
|
24944
|
-
if (!isSchemaImport) continue;
|
|
24945
|
-
const sourceMatch = line.match(/from\s+['"]([^'"]+)['"]/);
|
|
24946
|
-
if (!sourceMatch) continue;
|
|
24947
|
-
const source = sourceMatch[1];
|
|
24948
|
-
const namedMatch = line.match(/import\s*\{([^}]+)\}/);
|
|
24949
|
-
if (namedMatch) {
|
|
24950
|
-
const symbols = namedMatch[1].split(",").map((s) => {
|
|
24951
|
-
const parts = s.trim().split(/\s+as\s+/);
|
|
24952
|
-
return parts[0].trim();
|
|
24953
|
-
});
|
|
24954
|
-
for (const symbol of symbols) {
|
|
24955
|
-
if (symbol) {
|
|
24956
|
-
imports.push({
|
|
24957
|
-
file: relative(rootDir, filePath),
|
|
24958
|
-
line: i + 1,
|
|
24959
|
-
symbol,
|
|
24960
|
-
source
|
|
24961
|
-
});
|
|
24962
|
-
}
|
|
24963
|
-
}
|
|
24964
|
-
}
|
|
24965
|
-
const namespaceMatch = line.match(/import\s+\*\s+as\s+(\w+)/);
|
|
24966
|
-
if (namespaceMatch) {
|
|
24967
|
-
imports.push({
|
|
24968
|
-
file: relative(rootDir, filePath),
|
|
24969
|
-
line: i + 1,
|
|
24970
|
-
symbol: `* as ${namespaceMatch[1]}`,
|
|
24971
|
-
source
|
|
24972
|
-
});
|
|
24973
|
-
}
|
|
24974
|
-
const typeMatch = line.match(/import\s+type\s*\{([^}]+)\}/);
|
|
24975
|
-
if (typeMatch) {
|
|
24976
|
-
const symbols = typeMatch[1].split(",").map(
|
|
24977
|
-
(s) => s.trim().split(/\s+as\s+/)[0].trim()
|
|
24978
|
-
);
|
|
24979
|
-
for (const symbol of symbols) {
|
|
24980
|
-
if (symbol) {
|
|
24981
|
-
imports.push({
|
|
24982
|
-
file: relative(rootDir, filePath),
|
|
24983
|
-
line: i + 1,
|
|
24984
|
-
symbol: `type ${symbol}`,
|
|
24985
|
-
source
|
|
24986
|
-
});
|
|
24987
|
-
}
|
|
24988
|
-
}
|
|
24989
|
-
}
|
|
24909
|
+
return [];
|
|
24990
24910
|
}
|
|
24911
|
+
const sourceFile = project.addSourceFileAtPath(filePath);
|
|
24912
|
+
const imports = extractSchemaImportsFromAST(sourceFile, rootDir);
|
|
24913
|
+
project.removeSourceFile(sourceFile);
|
|
24914
|
+
return imports;
|
|
24991
24915
|
} catch {
|
|
24916
|
+
return [];
|
|
24992
24917
|
}
|
|
24993
|
-
return imports;
|
|
24994
24918
|
}
|
|
24995
24919
|
function analyzeImportImpact(rootDir) {
|
|
24996
24920
|
const symbolUsage = /* @__PURE__ */ new Map();
|
|
24997
24921
|
const tsFiles = findTsFiles(rootDir);
|
|
24998
24922
|
let filesWithImports = 0;
|
|
24923
|
+
const project = new Project({
|
|
24924
|
+
skipAddingFilesFromTsConfig: true,
|
|
24925
|
+
skipFileDependencyResolution: true,
|
|
24926
|
+
skipLoadingLibFiles: true
|
|
24927
|
+
});
|
|
24999
24928
|
for (const file of tsFiles) {
|
|
25000
|
-
const imports = extractSchemaImports(file, rootDir);
|
|
24929
|
+
const imports = extractSchemaImports(file, rootDir, project);
|
|
25001
24930
|
if (imports.length > 0) {
|
|
25002
24931
|
filesWithImports++;
|
|
25003
24932
|
}
|
|
@@ -26209,30 +26138,84 @@ async function getVercelRootDirectory() {
|
|
|
26209
26138
|
|
|
26210
26139
|
// src/commands/env/constants/local-supabase.ts
|
|
26211
26140
|
init_esm_shims();
|
|
26212
|
-
var
|
|
26141
|
+
var DEFAULT_API_PORT = 54321;
|
|
26142
|
+
var DEFAULT_DB_PORT = 54322;
|
|
26143
|
+
function parsePortFromToml(content, section, key) {
|
|
26144
|
+
const sectionRegex = new RegExp(`\\[${section}\\]([\\s\\S]*?)(?=\\n\\[|$)`, "g");
|
|
26145
|
+
const sectionMatch = sectionRegex.exec(content);
|
|
26146
|
+
if (!sectionMatch) return null;
|
|
26147
|
+
const sectionContent = sectionMatch[1];
|
|
26148
|
+
const keyRegex = new RegExp(`^\\s*${key}\\s*=\\s*(\\d+)`, "m");
|
|
26149
|
+
const keyMatch = keyRegex.exec(sectionContent);
|
|
26150
|
+
if (!keyMatch) return null;
|
|
26151
|
+
const port = Number.parseInt(keyMatch[1], 10);
|
|
26152
|
+
return Number.isFinite(port) && port > 0 && port < 65536 ? port : null;
|
|
26153
|
+
}
|
|
26154
|
+
function readPortsFromConfigToml(projectRoot) {
|
|
26155
|
+
const configPath = path10__default.join(projectRoot, "supabase", "config.toml");
|
|
26156
|
+
try {
|
|
26157
|
+
const content = readFileSync(configPath, "utf-8");
|
|
26158
|
+
const apiPort = parsePortFromToml(content, "api", "port");
|
|
26159
|
+
const dbPort = parsePortFromToml(content, "db", "port");
|
|
26160
|
+
if (apiPort !== null || dbPort !== null) {
|
|
26161
|
+
return {
|
|
26162
|
+
api: apiPort ?? DEFAULT_API_PORT,
|
|
26163
|
+
db: dbPort ?? DEFAULT_DB_PORT
|
|
26164
|
+
};
|
|
26165
|
+
}
|
|
26166
|
+
return null;
|
|
26167
|
+
} catch {
|
|
26168
|
+
return null;
|
|
26169
|
+
}
|
|
26170
|
+
}
|
|
26171
|
+
function detectLocalSupabasePorts(projectRoot = process.cwd()) {
|
|
26172
|
+
const configPorts = readPortsFromConfigToml(projectRoot);
|
|
26173
|
+
if (configPorts) {
|
|
26174
|
+
return configPorts;
|
|
26175
|
+
}
|
|
26176
|
+
return {
|
|
26177
|
+
api: DEFAULT_API_PORT,
|
|
26178
|
+
db: DEFAULT_DB_PORT
|
|
26179
|
+
};
|
|
26180
|
+
}
|
|
26213
26181
|
var LOCAL_SUPABASE_ANON_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0";
|
|
26214
26182
|
var LOCAL_SUPABASE_SERVICE_ROLE_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU";
|
|
26215
|
-
|
|
26216
|
-
|
|
26217
|
-
|
|
26218
|
-
|
|
26219
|
-
|
|
26220
|
-
|
|
26221
|
-
|
|
26222
|
-
|
|
26223
|
-
|
|
26224
|
-
|
|
26225
|
-
|
|
26226
|
-
|
|
26227
|
-
|
|
26228
|
-
|
|
26229
|
-
|
|
26230
|
-
|
|
26231
|
-
|
|
26232
|
-
|
|
26233
|
-
|
|
26234
|
-
|
|
26235
|
-
|
|
26183
|
+
function buildLocalSupabaseUrl(projectRoot = process.cwd()) {
|
|
26184
|
+
const ports = detectLocalSupabasePorts(projectRoot);
|
|
26185
|
+
return `http://127.0.0.1:${ports.api}`;
|
|
26186
|
+
}
|
|
26187
|
+
function buildLocalDatabaseUrl(projectRoot = process.cwd()) {
|
|
26188
|
+
const ports = detectLocalSupabasePorts(projectRoot);
|
|
26189
|
+
return `postgresql://postgres:postgres@127.0.0.1:${ports.db}/postgres`;
|
|
26190
|
+
}
|
|
26191
|
+
function getLocalSupabaseEnvValues(projectRoot = process.cwd()) {
|
|
26192
|
+
const supabaseUrl = buildLocalSupabaseUrl(projectRoot);
|
|
26193
|
+
const databaseUrl = buildLocalDatabaseUrl(projectRoot);
|
|
26194
|
+
return {
|
|
26195
|
+
// Database URLs
|
|
26196
|
+
DATABASE_URL: databaseUrl,
|
|
26197
|
+
DATABASE_URL_ADMIN: databaseUrl,
|
|
26198
|
+
DATABASE_URL_SERVICE: databaseUrl,
|
|
26199
|
+
// Supabase URLs and keys
|
|
26200
|
+
NEXT_PUBLIC_SUPABASE_URL: supabaseUrl,
|
|
26201
|
+
NEXT_PUBLIC_SUPABASE_ANON_KEY: LOCAL_SUPABASE_ANON_KEY,
|
|
26202
|
+
SUPABASE_SERVICE_ROLE_KEY: LOCAL_SUPABASE_SERVICE_ROLE_KEY
|
|
26203
|
+
};
|
|
26204
|
+
}
|
|
26205
|
+
function getLocalValueDescriptions(projectRoot = process.cwd()) {
|
|
26206
|
+
const ports = detectLocalSupabasePorts(projectRoot);
|
|
26207
|
+
return {
|
|
26208
|
+
DATABASE_URL: `localhost:${ports.db} (PostgreSQL)`,
|
|
26209
|
+
DATABASE_URL_ADMIN: `localhost:${ports.db} (PostgreSQL)`,
|
|
26210
|
+
DATABASE_URL_SERVICE: `localhost:${ports.db} (PostgreSQL)`,
|
|
26211
|
+
NEXT_PUBLIC_SUPABASE_URL: `localhost:${ports.api} (Supabase API)`,
|
|
26212
|
+
NEXT_PUBLIC_SUPABASE_ANON_KEY: "local anon key (supabase-demo)",
|
|
26213
|
+
SUPABASE_SERVICE_ROLE_KEY: "local service key (supabase-demo)"
|
|
26214
|
+
};
|
|
26215
|
+
}
|
|
26216
|
+
var LOCAL_SUPABASE_ENV_VALUES = getLocalSupabaseEnvValues();
|
|
26217
|
+
getLocalValueDescriptions();
|
|
26218
|
+
function validateLocalhostValues(envValues) {
|
|
26236
26219
|
const urlKeys = [
|
|
26237
26220
|
"DATABASE_URL",
|
|
26238
26221
|
"DATABASE_URL_ADMIN",
|
|
@@ -26241,7 +26224,7 @@ function validateLocalhostValues() {
|
|
|
26241
26224
|
];
|
|
26242
26225
|
const invalidEntries = [];
|
|
26243
26226
|
for (const key of urlKeys) {
|
|
26244
|
-
const value =
|
|
26227
|
+
const value = envValues[key];
|
|
26245
26228
|
if (value && !value.includes("127.0.0.1") && !value.includes("localhost")) {
|
|
26246
26229
|
invalidEntries.push(key);
|
|
26247
26230
|
}
|
|
@@ -26252,7 +26235,7 @@ function validateLocalhostValues() {
|
|
|
26252
26235
|
);
|
|
26253
26236
|
}
|
|
26254
26237
|
}
|
|
26255
|
-
validateLocalhostValues();
|
|
26238
|
+
validateLocalhostValues(LOCAL_SUPABASE_ENV_VALUES);
|
|
26256
26239
|
|
|
26257
26240
|
// src/commands/env/commands/env-pull.ts
|
|
26258
26241
|
var ERROR_MESSAGES3 = {
|
|
@@ -26496,10 +26479,14 @@ function replaceWithLocalValues(filePath, logger16, dryRun = false) {
|
|
|
26496
26479
|
logger16.warn(" \u26A0\uFE0F No valid env vars found in .env.development (check syntax)");
|
|
26497
26480
|
return;
|
|
26498
26481
|
}
|
|
26482
|
+
const projectRoot = process.cwd();
|
|
26483
|
+
const localEnvValues = getLocalSupabaseEnvValues(projectRoot);
|
|
26484
|
+
const localDescriptions = getLocalValueDescriptions(projectRoot);
|
|
26485
|
+
const replacementKeys = Object.keys(localEnvValues);
|
|
26499
26486
|
const replacedKeys = [];
|
|
26500
|
-
for (const key of
|
|
26501
|
-
if (key in parsed &&
|
|
26502
|
-
parsed[key] =
|
|
26487
|
+
for (const key of replacementKeys) {
|
|
26488
|
+
if (key in parsed && localEnvValues[key]) {
|
|
26489
|
+
parsed[key] = localEnvValues[key];
|
|
26503
26490
|
replacedKeys.push(key);
|
|
26504
26491
|
}
|
|
26505
26492
|
}
|
|
@@ -26518,7 +26505,7 @@ function replaceWithLocalValues(filePath, logger16, dryRun = false) {
|
|
|
26518
26505
|
if (dryRun) {
|
|
26519
26506
|
logger16.info(` \u{1F3E0} Would replace ${replacedKeys.length} variables with localhost values:`);
|
|
26520
26507
|
for (const key of replacedKeys) {
|
|
26521
|
-
const description =
|
|
26508
|
+
const description = localDescriptions[key] || "localhost";
|
|
26522
26509
|
logger16.info(` ${key} \u2192 ${description}`);
|
|
26523
26510
|
}
|
|
26524
26511
|
logger16.info(" (dry-run: no files modified)");
|
|
@@ -26528,7 +26515,7 @@ function replaceWithLocalValues(filePath, logger16, dryRun = false) {
|
|
|
26528
26515
|
`, "utf-8");
|
|
26529
26516
|
logger16.success(` \u{1F3E0} Replaced ${replacedKeys.length} variables with localhost values:`);
|
|
26530
26517
|
for (const key of replacedKeys) {
|
|
26531
|
-
const description =
|
|
26518
|
+
const description = localDescriptions[key] || "localhost";
|
|
26532
26519
|
logger16.info(` ${key} \u2192 ${description}`);
|
|
26533
26520
|
}
|
|
26534
26521
|
}
|
|
@@ -31133,7 +31120,7 @@ function buildDefinitionMap(definitions) {
|
|
|
31133
31120
|
function buildEnhancedMachines(e2eManifest, definitionMap, machineDefinitions) {
|
|
31134
31121
|
const enhanced = {};
|
|
31135
31122
|
const normalizedIdToCanonical = /* @__PURE__ */ new Map();
|
|
31136
|
-
const isMachineFile = (
|
|
31123
|
+
const isMachineFile = (path64) => path64.includes("machine.ts") || path64.includes("machines/") || path64.includes(".machine.ts") || path64.includes("/machine/");
|
|
31137
31124
|
const addMachine = (id, sourceFile, entryBuilder) => {
|
|
31138
31125
|
const normalizedId = normalizeToCanonicalId(id).toLowerCase();
|
|
31139
31126
|
const existingCanonical = normalizedIdToCanonical.get(normalizedId);
|
|
@@ -32814,7 +32801,18 @@ var RUNA_ONLY_FILES = [
|
|
|
32814
32801
|
"packages/database/scripts/check-plpgsql.ts",
|
|
32815
32802
|
"packages/database/scripts/run-splinter.ts",
|
|
32816
32803
|
"packages/database/scripts/seed-generators/index.ts",
|
|
32804
|
+
"packages/database/scripts/seed-generators/loader.ts",
|
|
32805
|
+
"packages/database/scripts/seed-generators/types.ts",
|
|
32817
32806
|
"packages/database/scripts/seed-plugins/supabase-auth.ts",
|
|
32807
|
+
"packages/database/scripts/seed-data-sources/api-source.ts",
|
|
32808
|
+
"packages/database/scripts/seed-data-sources/csv-source.ts",
|
|
32809
|
+
"packages/database/scripts/seed-data-sources/index.ts",
|
|
32810
|
+
"packages/database/scripts/seed-data-sources/json-source.ts",
|
|
32811
|
+
"packages/database/scripts/seed-data-sources/types.ts",
|
|
32812
|
+
"packages/database/scripts/seed-hooks/index.ts",
|
|
32813
|
+
"packages/database/scripts/seed-hooks/types.ts",
|
|
32814
|
+
"packages/database/scripts/seed-utils/index.ts",
|
|
32815
|
+
"packages/database/scripts/seed-utils/security.ts",
|
|
32818
32816
|
// === runa-repo Specific Tests ===
|
|
32819
32817
|
"packages/database/tests/00_system-schemas.sql",
|
|
32820
32818
|
"packages/database/tests/01_table-helpers.sql",
|
|
@@ -33729,9 +33727,9 @@ var PATH_MAPPING_RULES = [
|
|
|
33729
33727
|
category: "prompts"
|
|
33730
33728
|
}
|
|
33731
33729
|
];
|
|
33732
|
-
function getCategoryForPath(
|
|
33730
|
+
function getCategoryForPath(path64) {
|
|
33733
33731
|
for (const rule of PATH_MAPPING_RULES) {
|
|
33734
|
-
if (matchGlobPattern(
|
|
33732
|
+
if (matchGlobPattern(path64, rule.runa) || matchGlobPattern(path64, rule.template)) {
|
|
33735
33733
|
return rule.category;
|
|
33736
33734
|
}
|
|
33737
33735
|
}
|
|
@@ -33751,17 +33749,17 @@ function applyReverseRename(normalized, rule, isTemplate) {
|
|
|
33751
33749
|
}
|
|
33752
33750
|
return normalized;
|
|
33753
33751
|
}
|
|
33754
|
-
function generateComparisonKey(
|
|
33755
|
-
let normalized = isTemplate ? normalizeTemplatePath(
|
|
33752
|
+
function generateComparisonKey(path64, isTemplate) {
|
|
33753
|
+
let normalized = isTemplate ? normalizeTemplatePath(path64) : path64;
|
|
33756
33754
|
for (const rule of PATH_MAPPING_RULES) {
|
|
33757
33755
|
normalized = applyReverseRename(normalized, rule, isTemplate);
|
|
33758
33756
|
}
|
|
33759
33757
|
return normalized;
|
|
33760
33758
|
}
|
|
33761
|
-
function matchGlobPattern(
|
|
33759
|
+
function matchGlobPattern(path64, pattern) {
|
|
33762
33760
|
const regexPattern = pattern.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*\*/g, "<<DOUBLE_STAR>>").replace(/\*/g, "([^/]*)").replace(/<<DOUBLE_STAR>>/g, "(.*)");
|
|
33763
33761
|
const regex = new RegExp(`^${regexPattern}$`);
|
|
33764
|
-
const match =
|
|
33762
|
+
const match = path64.match(regex);
|
|
33765
33763
|
if (match) {
|
|
33766
33764
|
const subPath = match[1] ?? "";
|
|
33767
33765
|
return { matched: true, subPath };
|
|
@@ -34123,7 +34121,7 @@ var syncCheckMachine = setup({
|
|
|
34123
34121
|
onError: {
|
|
34124
34122
|
target: "failed",
|
|
34125
34123
|
actions: assign({
|
|
34126
|
-
error: ({ event }) => `Discovery failed: ${
|
|
34124
|
+
error: ({ event }) => `Discovery failed: ${getErrorMessage(event.error)}`
|
|
34127
34125
|
})
|
|
34128
34126
|
}
|
|
34129
34127
|
}
|
|
@@ -34150,7 +34148,7 @@ var syncCheckMachine = setup({
|
|
|
34150
34148
|
onError: {
|
|
34151
34149
|
target: "failed",
|
|
34152
34150
|
actions: assign({
|
|
34153
|
-
error: ({ event }) => `Comparison failed: ${
|
|
34151
|
+
error: ({ event }) => `Comparison failed: ${getErrorMessage(event.error)}`
|
|
34154
34152
|
})
|
|
34155
34153
|
}
|
|
34156
34154
|
}
|
|
@@ -34174,7 +34172,7 @@ var syncCheckMachine = setup({
|
|
|
34174
34172
|
onError: {
|
|
34175
34173
|
target: "failed",
|
|
34176
34174
|
actions: assign({
|
|
34177
|
-
error: ({ event }) => `Report generation failed: ${
|
|
34175
|
+
error: ({ event }) => `Report generation failed: ${getErrorMessage(event.error)}`
|
|
34178
34176
|
})
|
|
34179
34177
|
}
|
|
34180
34178
|
}
|
|
@@ -35733,7 +35731,7 @@ async function runVerification(logger16) {
|
|
|
35733
35731
|
}
|
|
35734
35732
|
async function findWorkspacesWithSdkPackages(rootDir, packageNames) {
|
|
35735
35733
|
const fs14 = await import('fs/promises');
|
|
35736
|
-
const
|
|
35734
|
+
const path64 = await import('path');
|
|
35737
35735
|
const { glob: glob8 } = await import('glob');
|
|
35738
35736
|
const result = [];
|
|
35739
35737
|
const packageJsonPaths = await glob8("**/package.json", {
|
|
@@ -35742,7 +35740,7 @@ async function findWorkspacesWithSdkPackages(rootDir, packageNames) {
|
|
|
35742
35740
|
// Exclude root
|
|
35743
35741
|
});
|
|
35744
35742
|
for (const relPath of packageJsonPaths) {
|
|
35745
|
-
const fullPath =
|
|
35743
|
+
const fullPath = path64.join(rootDir, relPath);
|
|
35746
35744
|
try {
|
|
35747
35745
|
const content = await fs14.readFile(fullPath, "utf-8");
|
|
35748
35746
|
const pkg = JSON.parse(content);
|
|
@@ -35755,7 +35753,7 @@ async function findWorkspacesWithSdkPackages(rootDir, packageNames) {
|
|
|
35755
35753
|
}
|
|
35756
35754
|
if (hasAnySdkPackage) {
|
|
35757
35755
|
result.push({
|
|
35758
|
-
dir:
|
|
35756
|
+
dir: path64.dirname(fullPath),
|
|
35759
35757
|
packages: packageNames
|
|
35760
35758
|
// All packages, not just found ones
|
|
35761
35759
|
});
|
|
@@ -36398,7 +36396,7 @@ var SchemaWatcher = class {
|
|
|
36398
36396
|
persistent: true,
|
|
36399
36397
|
ignoreInitial: true
|
|
36400
36398
|
});
|
|
36401
|
-
this.watcher.on("add", (
|
|
36399
|
+
this.watcher.on("add", (path64) => this.handleFileEvent("add", path64)).on("change", (path64) => this.handleFileEvent("change", path64)).on("unlink", (path64) => this.handleFileEvent("unlink", path64)).on("error", (error) => this.handleError(error));
|
|
36402
36400
|
this.logger.success("\u2705 Schema watcher started");
|
|
36403
36401
|
this.logger.info(chalk.dim(" Press Ctrl+C to stop\n"));
|
|
36404
36402
|
}
|
|
@@ -36419,23 +36417,23 @@ var SchemaWatcher = class {
|
|
|
36419
36417
|
/**
|
|
36420
36418
|
* Handle file system events with debouncing
|
|
36421
36419
|
*/
|
|
36422
|
-
handleFileEvent(type,
|
|
36423
|
-
const existingTimer = this.debounceTimers.get(
|
|
36420
|
+
handleFileEvent(type, path64) {
|
|
36421
|
+
const existingTimer = this.debounceTimers.get(path64);
|
|
36424
36422
|
if (existingTimer) {
|
|
36425
36423
|
clearTimeout(existingTimer);
|
|
36426
36424
|
}
|
|
36427
36425
|
const timer = setTimeout(() => {
|
|
36428
|
-
this.processFileEvent({ type, path:
|
|
36429
|
-
this.debounceTimers.delete(
|
|
36426
|
+
this.processFileEvent({ type, path: path64, timestamp: /* @__PURE__ */ new Date() });
|
|
36427
|
+
this.debounceTimers.delete(path64);
|
|
36430
36428
|
}, this.options.debounceMs);
|
|
36431
|
-
this.debounceTimers.set(
|
|
36429
|
+
this.debounceTimers.set(path64, timer);
|
|
36432
36430
|
}
|
|
36433
36431
|
/**
|
|
36434
36432
|
* Process file system event
|
|
36435
36433
|
*/
|
|
36436
36434
|
async processFileEvent(event) {
|
|
36437
|
-
const { type, path:
|
|
36438
|
-
const fileName =
|
|
36435
|
+
const { type, path: path64 } = event;
|
|
36436
|
+
const fileName = path64.split("/").pop() || path64;
|
|
36439
36437
|
switch (type) {
|
|
36440
36438
|
case "add":
|
|
36441
36439
|
this.logger.info(chalk.green(`\u2795 Added: ${fileName}`));
|
|
@@ -36448,19 +36446,19 @@ var SchemaWatcher = class {
|
|
|
36448
36446
|
return;
|
|
36449
36447
|
}
|
|
36450
36448
|
if (this.options.autoValidate) {
|
|
36451
|
-
await this.validateFile(
|
|
36449
|
+
await this.validateFile(path64);
|
|
36452
36450
|
}
|
|
36453
36451
|
}
|
|
36454
36452
|
/**
|
|
36455
36453
|
* Validate schema file
|
|
36456
36454
|
*/
|
|
36457
|
-
async validateFile(
|
|
36455
|
+
async validateFile(path64) {
|
|
36458
36456
|
try {
|
|
36459
36457
|
this.logger.info(chalk.dim(" Validating..."));
|
|
36460
|
-
const validationResult = await validateSchemaFile(
|
|
36458
|
+
const validationResult = await validateSchemaFile(path64);
|
|
36461
36459
|
if (validationResult.isValid) {
|
|
36462
36460
|
this.logger.success(chalk.green(" \u2713 Validation passed"));
|
|
36463
|
-
const risks = await detectSchemaRisks(
|
|
36461
|
+
const risks = await detectSchemaRisks(path64);
|
|
36464
36462
|
if (risks.length > 0) {
|
|
36465
36463
|
this.logger.warn(` \u26A0\uFE0F ${risks.length} risk(s) detected`);
|
|
36466
36464
|
for (const risk of risks) {
|
|
@@ -36475,7 +36473,7 @@ var SchemaWatcher = class {
|
|
|
36475
36473
|
if (this.options.notifyOnError) {
|
|
36476
36474
|
await notifyDesktop({
|
|
36477
36475
|
title: "Schema Validation Failed",
|
|
36478
|
-
message: `${validationResult.errors.length} error(s) in ${
|
|
36476
|
+
message: `${validationResult.errors.length} error(s) in ${path64.split("/").pop()}`,
|
|
36479
36477
|
type: "error"
|
|
36480
36478
|
});
|
|
36481
36479
|
}
|
|
@@ -36694,7 +36692,7 @@ var TestWatcher = class {
|
|
|
36694
36692
|
persistent: true,
|
|
36695
36693
|
ignoreInitial: true
|
|
36696
36694
|
});
|
|
36697
|
-
this.watcher.on("add", (
|
|
36695
|
+
this.watcher.on("add", (path64) => this.handleFileEvent("add", path64)).on("change", (path64) => this.handleFileEvent("change", path64)).on("unlink", (path64) => this.handleFileEvent("unlink", path64)).on("error", (error) => this.handleError(error));
|
|
36698
36696
|
this.logger.success("\u2705 Test watcher started");
|
|
36699
36697
|
this.logger.info(chalk.dim(" Press Ctrl+C to stop\n"));
|
|
36700
36698
|
}
|
|
@@ -36715,26 +36713,26 @@ var TestWatcher = class {
|
|
|
36715
36713
|
/**
|
|
36716
36714
|
* Handle file system events with debouncing
|
|
36717
36715
|
*/
|
|
36718
|
-
handleFileEvent(type,
|
|
36719
|
-
const existingTimer = this.debounceTimers.get(
|
|
36716
|
+
handleFileEvent(type, path64) {
|
|
36717
|
+
const existingTimer = this.debounceTimers.get(path64);
|
|
36720
36718
|
if (existingTimer) {
|
|
36721
36719
|
clearTimeout(existingTimer);
|
|
36722
36720
|
}
|
|
36723
36721
|
const timer = setTimeout(() => {
|
|
36724
|
-
this.processFileEvent(type,
|
|
36725
|
-
this.debounceTimers.delete(
|
|
36722
|
+
this.processFileEvent(type, path64);
|
|
36723
|
+
this.debounceTimers.delete(path64);
|
|
36726
36724
|
}, this.options.debounceMs);
|
|
36727
|
-
this.debounceTimers.set(
|
|
36725
|
+
this.debounceTimers.set(path64, timer);
|
|
36728
36726
|
}
|
|
36729
36727
|
/**
|
|
36730
36728
|
* Process file system event
|
|
36731
36729
|
*/
|
|
36732
|
-
async processFileEvent(type,
|
|
36730
|
+
async processFileEvent(type, path64) {
|
|
36733
36731
|
if (this.isRunning) {
|
|
36734
36732
|
this.logger.warn(chalk.yellow("\u23F3 Tests already running, skipping..."));
|
|
36735
36733
|
return;
|
|
36736
36734
|
}
|
|
36737
|
-
const fileName =
|
|
36735
|
+
const fileName = path64.split("/").pop() || path64;
|
|
36738
36736
|
switch (type) {
|
|
36739
36737
|
case "add":
|
|
36740
36738
|
this.logger.info(chalk.green(`\u2795 Test added: ${fileName}`));
|
|
@@ -36747,7 +36745,7 @@ var TestWatcher = class {
|
|
|
36747
36745
|
return;
|
|
36748
36746
|
}
|
|
36749
36747
|
if (this.options.autoRun) {
|
|
36750
|
-
await this.runTests(
|
|
36748
|
+
await this.runTests(path64);
|
|
36751
36749
|
}
|
|
36752
36750
|
}
|
|
36753
36751
|
/**
|