@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
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: Canonical schema snapshot + semantic diff
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Detect schema drift beyond simple T/F/P/I counts.
|
|
5
|
+
* Pattern: Normalize PostgreSQL catalog metadata into stable signatures.
|
|
6
|
+
*
|
|
7
|
+
* Detects semantic differences in:
|
|
8
|
+
* - Tables (columns, constraints, RLS flags)
|
|
9
|
+
* - Functions (signature, language, volatility, security, body)
|
|
10
|
+
* - Policies (command, roles, USING / WITH CHECK)
|
|
11
|
+
* - Indexes (definition, uniqueness, predicate)
|
|
12
|
+
* - Triggers (definition)
|
|
13
|
+
*/
|
|
14
|
+
export type CanonicalSchemaObjectKind = 'table' | 'function' | 'policy' | 'index' | 'trigger';
|
|
15
|
+
export interface CanonicalSchemaObject {
|
|
16
|
+
kind: CanonicalSchemaObjectKind;
|
|
17
|
+
schema: string;
|
|
18
|
+
name: string;
|
|
19
|
+
key: string;
|
|
20
|
+
label: string;
|
|
21
|
+
parentName?: string;
|
|
22
|
+
signature: string;
|
|
23
|
+
}
|
|
24
|
+
export interface CanonicalSchemaSnapshot {
|
|
25
|
+
available: boolean;
|
|
26
|
+
objects: CanonicalSchemaObject[];
|
|
27
|
+
error?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface CanonicalSchemaObjectPair {
|
|
30
|
+
reference: CanonicalSchemaObject;
|
|
31
|
+
target: CanonicalSchemaObject;
|
|
32
|
+
}
|
|
33
|
+
export interface CanonicalSchemaDiff {
|
|
34
|
+
missing: CanonicalSchemaObject[];
|
|
35
|
+
extra: CanonicalSchemaObject[];
|
|
36
|
+
changed: CanonicalSchemaObjectPair[];
|
|
37
|
+
renamed: CanonicalSchemaObjectPair[];
|
|
38
|
+
}
|
|
39
|
+
export interface SchemaSemanticSummary {
|
|
40
|
+
hasChanges: boolean;
|
|
41
|
+
changedKinds: CanonicalSchemaObjectKind[];
|
|
42
|
+
counts: {
|
|
43
|
+
missing: number;
|
|
44
|
+
extra: number;
|
|
45
|
+
changed: number;
|
|
46
|
+
renamed: number;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export type CanonicalDiffBySchema = Record<string, SchemaSemanticSummary>;
|
|
50
|
+
export declare function createUnavailableCanonicalSnapshot(error: string): CanonicalSchemaSnapshot;
|
|
51
|
+
export declare function getCanonicalSchemaSnapshot(databaseUrl: string): Promise<CanonicalSchemaSnapshot>;
|
|
52
|
+
export declare function compareCanonicalSnapshots(reference: CanonicalSchemaSnapshot, target: CanonicalSchemaSnapshot): CanonicalSchemaDiff;
|
|
53
|
+
export declare function summarizeCanonicalDiffBySchema(diff: CanonicalSchemaDiff): CanonicalDiffBySchema;
|
|
54
|
+
export declare function hasCanonicalChanges(diff: CanonicalSchemaDiff): boolean;
|
|
55
|
+
//# sourceMappingURL=schema-canonical-diff.d.ts.map
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
* - Supabase platform functions: supabase_* (not extension-owned)
|
|
33
33
|
* - PostgREST platform functions: postgrest_*, pgrst_*, _pgrst_* (not extension-owned)
|
|
34
34
|
*/
|
|
35
|
+
import type { CanonicalSchemaSnapshot } from './schema-canonical-diff.js';
|
|
35
36
|
/**
|
|
36
37
|
* Statistics for a single schema.
|
|
37
38
|
*/
|
|
@@ -59,6 +60,10 @@ export interface IndexInfo {
|
|
|
59
60
|
isPartial: boolean;
|
|
60
61
|
/** WHERE clause for partial indexes (e.g., 'check_run_id IS NOT NULL') */
|
|
61
62
|
whereClause?: string;
|
|
63
|
+
/** Access method (e.g., btree, gin) */
|
|
64
|
+
accessMethod?: string;
|
|
65
|
+
/** Normalized index definition for semantic comparison */
|
|
66
|
+
definition?: string;
|
|
62
67
|
}
|
|
63
68
|
/**
|
|
64
69
|
* Statistics for all schemas in an environment.
|
|
@@ -70,6 +75,12 @@ export interface EnvironmentSchemaStats {
|
|
|
70
75
|
total: SchemaStats;
|
|
71
76
|
/** Detailed index list for diff detection (optional for backward compatibility) */
|
|
72
77
|
indexList?: IndexInfo[];
|
|
78
|
+
/** Canonical snapshot for semantic diff detection */
|
|
79
|
+
canonicalSnapshot?: CanonicalSchemaSnapshot;
|
|
80
|
+
/** False when stats collection failed and counts should not be trusted */
|
|
81
|
+
available?: boolean;
|
|
82
|
+
/** Collection error summary for degraded display */
|
|
83
|
+
error?: string;
|
|
73
84
|
}
|
|
74
85
|
/**
|
|
75
86
|
* Snapshot of schema statistics across all environments.
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* - Captures hazards from pg-schema-diff
|
|
26
26
|
* - Reports all changes in PR comment
|
|
27
27
|
*/
|
|
28
|
-
import type { CiMode, SchemaDriftSnapshot } from '../../types.js';
|
|
28
|
+
import type { CiMode, SchemaChangeStats, SchemaDriftSnapshot } from '../../types.js';
|
|
29
29
|
export interface SyncSchemaInput {
|
|
30
30
|
repoRoot: string;
|
|
31
31
|
tmpDir: string;
|
|
@@ -38,6 +38,14 @@ export interface SyncSchemaOutput {
|
|
|
38
38
|
error?: string;
|
|
39
39
|
schemaDrift?: SchemaDriftSnapshot;
|
|
40
40
|
}
|
|
41
|
+
export declare function analyzePostCheckResult(params: {
|
|
42
|
+
exitCode: number;
|
|
43
|
+
output: string;
|
|
44
|
+
residualStats: SchemaChangeStats;
|
|
45
|
+
}): {
|
|
46
|
+
hasDrift: boolean;
|
|
47
|
+
commandFailed: boolean;
|
|
48
|
+
};
|
|
41
49
|
/**
|
|
42
50
|
* Sync database schema using runa db sync.
|
|
43
51
|
* ALWAYS applies changes - NO dry-run mode in CI.
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* Pattern: Pure function - takes schema stats, returns markdown lines
|
|
6
6
|
*
|
|
7
7
|
* Output format (includes I for Indexes, with diff highlighting):
|
|
8
|
-
* | Schema | 📄
|
|
8
|
+
* | Schema | 📄 Reference | 🔬 CI | 🏭 Prod |
|
|
9
9
|
* |--------|:--------:|:-----:|:-------:|
|
|
10
10
|
* | accounts | 5T 3F 12P 3I | 5T 3F 12P 3I | 📝 5T 3F 12P **2I** |
|
|
11
11
|
*
|
|
12
12
|
* Diff highlighting:
|
|
13
|
-
* - ⚠️ = CI differs from
|
|
14
|
-
* - 📝 = Prod differs from
|
|
13
|
+
* - ⚠️ = CI differs from Reference (count diff or semantic diff)
|
|
14
|
+
* - 📝 = Prod differs from Reference (count diff or semantic diff)
|
|
15
15
|
* - 📋 = Known drift (matches expectedDrift config)
|
|
16
16
|
* - **bold** = specific field that differs
|
|
17
17
|
*/
|
|
@@ -73,6 +73,8 @@ export interface SchemaDriftSnapshot {
|
|
|
73
73
|
beforeSql: string | null;
|
|
74
74
|
/** SQL preview (may be truncated) from check-after */
|
|
75
75
|
afterSql: string | null;
|
|
76
|
+
/** Whether a post-apply check was executed */
|
|
77
|
+
checkExecuted: boolean;
|
|
76
78
|
/** True if check-after indicates remaining changes (drift) */
|
|
77
79
|
hasDrift: boolean;
|
|
78
80
|
/** Schema change statistics (parsed from beforeSql) */
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type RunaDbEnv } from '../../utils/db-target.js';
|
|
2
|
+
export interface DbSyncCommandFailure {
|
|
3
|
+
code: string;
|
|
4
|
+
message: string;
|
|
5
|
+
suggestions: string[];
|
|
6
|
+
}
|
|
7
|
+
export declare function classifyDbSyncCommandFailure(error: unknown, environment: RunaDbEnv): DbSyncCommandFailure | null;
|
|
8
|
+
export declare function getDbSyncFallbackSuggestions(): string[];
|
|
9
|
+
//# sourceMappingURL=error-classifier.d.ts.map
|
|
@@ -7,11 +7,16 @@
|
|
|
7
7
|
* - depsInstallActor: Check/install dependencies
|
|
8
8
|
* - envCheckActor: Check environment variables
|
|
9
9
|
* - supabaseStartActor: Start Supabase local
|
|
10
|
+
* - tablesManifestActor: Refresh tables.json from local Supabase
|
|
10
11
|
* - processCheckActor: Check for existing processes and port availability
|
|
11
12
|
* - appStartActor: Start Next.js dev server
|
|
12
13
|
* - shutdownActor: Gracefully shut down dev server
|
|
13
14
|
*/
|
|
14
15
|
export { depsInstallActor, envCheckActor, supabaseStartActor, } from '../../build/actors/setup.js';
|
|
16
|
+
export { manifestActor } from '../../build/actors/manifest.js';
|
|
17
|
+
export type { ManifestInput, ManifestOutput } from '../../build/actors/manifest.js';
|
|
18
|
+
export { tablesManifestActor } from './tables-manifest.js';
|
|
19
|
+
export type { TablesManifestInput, TablesManifestOutput } from './tables-manifest.js';
|
|
15
20
|
export { processCheckActor } from './process-check.js';
|
|
16
21
|
export type { ProcessCheckInput, ProcessCheckOutput } from './process-check.js';
|
|
17
22
|
export { appStartActor, shutdownActor } from './app-lifecycle.js';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: Tables Manifest Refresh Actor
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Refresh .runa/manifests/tables.json from the local Supabase database
|
|
5
|
+
* Pattern: Lightweight introspection refresh for `runa dev`
|
|
6
|
+
*/
|
|
7
|
+
export interface TablesManifestInput {
|
|
8
|
+
repoRoot: string;
|
|
9
|
+
}
|
|
10
|
+
export interface TablesManifestOutput {
|
|
11
|
+
passed: boolean;
|
|
12
|
+
durationMs: number;
|
|
13
|
+
error?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const tablesManifestActor: import("xstate").PromiseActorLogic<TablesManifestOutput, TablesManifestInput, import("xstate").EventObject>;
|
|
16
|
+
//# sourceMappingURL=tables-manifest.d.ts.map
|
|
@@ -22,8 +22,8 @@ export declare const DevInputSchema: z.ZodObject<{
|
|
|
22
22
|
targetDir: z.ZodOptional<z.ZodString>;
|
|
23
23
|
replace: z.ZodDefault<z.ZodBoolean>;
|
|
24
24
|
bundler: z.ZodOptional<z.ZodEnum<{
|
|
25
|
-
turbopack: "turbopack";
|
|
26
25
|
webpack: "webpack";
|
|
26
|
+
turbopack: "turbopack";
|
|
27
27
|
}>>;
|
|
28
28
|
}, z.core.$strict>;
|
|
29
29
|
export type DevInput = z.infer<typeof DevInputSchema>;
|
|
@@ -18,9 +18,33 @@ export declare function shouldSkipDb({ context }: GuardParams): boolean;
|
|
|
18
18
|
* Skipped when --skip-app is specified.
|
|
19
19
|
*/
|
|
20
20
|
export declare function shouldSkipApp({ context }: GuardParams): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Check if manifest generation should be skipped.
|
|
23
|
+
* Skipped when app startup is disabled or manifest generation is not applicable.
|
|
24
|
+
*/
|
|
25
|
+
export declare function shouldSkipManifest({ context }: GuardParams): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Check if tables manifest refresh should be skipped.
|
|
28
|
+
* Skipped when app startup is disabled, DB setup is disabled, or Supabase is unavailable.
|
|
29
|
+
*/
|
|
30
|
+
export declare function shouldSkipTablesManifest({ context }: GuardParams): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Check if an actor phase reported a failed result.
|
|
33
|
+
*/
|
|
34
|
+
export declare function phaseFailed({ event, }: {
|
|
35
|
+
event: {
|
|
36
|
+
output?: {
|
|
37
|
+
passed?: boolean;
|
|
38
|
+
};
|
|
39
|
+
[key: string]: unknown;
|
|
40
|
+
};
|
|
41
|
+
}): boolean;
|
|
21
42
|
export declare const guards: {
|
|
22
43
|
shouldSkipDb: typeof shouldSkipDb;
|
|
23
44
|
shouldSkipApp: typeof shouldSkipApp;
|
|
45
|
+
shouldSkipManifest: typeof shouldSkipManifest;
|
|
46
|
+
shouldSkipTablesManifest: typeof shouldSkipTablesManifest;
|
|
47
|
+
phaseFailed: typeof phaseFailed;
|
|
24
48
|
};
|
|
25
49
|
export {};
|
|
26
50
|
//# sourceMappingURL=guards.d.ts.map
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* State Flow:
|
|
13
13
|
* idle → START → processCheck → setup{depsInstall → envCheck → supabaseStart}
|
|
14
|
-
* → appStart → running → (STOP) → shutdown → done
|
|
14
|
+
* → tablesManifest → manifest → appStart → running → (STOP) → shutdown → done
|
|
15
15
|
* Any error → failed
|
|
16
16
|
*
|
|
17
17
|
* E2E Test Mapping (CLI observable behavior):
|
|
@@ -38,8 +38,12 @@ export declare const devMachine: import("xstate").StateMachine<DevContext, {
|
|
|
38
38
|
type: "error.platform";
|
|
39
39
|
error: Error;
|
|
40
40
|
}, {
|
|
41
|
-
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("../build/actors/setup.js").DepsInstallOutput, import("../build/actors/setup.js").SetupInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("../build/actors/setup.js").EnvCheckOutput, import("../build/actors/setup.js").SetupInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("../build/actors/setup.js").SupabaseStartOutput, import("../build/actors/setup.js").SetupInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<ProcessCheckOutput, import("./actors/process-check.js").ProcessCheckInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./actors/app-lifecycle.js").AppStartOutput, import("./actors/app-lifecycle.js").AppStartInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void, import("./actors/app-lifecycle.js").ShutdownInput, import("xstate").EventObject>> | undefined;
|
|
41
|
+
[x: string]: import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./actors/index.js").ManifestOutput, import("./actors/index.js").ManifestInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("../build/actors/setup.js").DepsInstallOutput, import("../build/actors/setup.js").SetupInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("../build/actors/setup.js").EnvCheckOutput, import("../build/actors/setup.js").SetupInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("../build/actors/setup.js").SupabaseStartOutput, import("../build/actors/setup.js").SetupInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<ProcessCheckOutput, import("./actors/process-check.js").ProcessCheckInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./actors/app-lifecycle.js").AppStartOutput, import("./actors/app-lifecycle.js").AppStartInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<void, import("./actors/app-lifecycle.js").ShutdownInput, import("xstate").EventObject>> | import("xstate").ActorRefFromLogic<import("xstate").PromiseActorLogic<import("./actors/tables-manifest.js").TablesManifestOutput, import("./actors/tables-manifest.js").TablesManifestInput, import("xstate").EventObject>> | undefined;
|
|
42
42
|
}, {
|
|
43
|
+
src: "manifest";
|
|
44
|
+
logic: import("xstate").PromiseActorLogic<import("./actors/index.js").ManifestOutput, import("./actors/index.js").ManifestInput, import("xstate").EventObject>;
|
|
45
|
+
id: string | undefined;
|
|
46
|
+
} | {
|
|
43
47
|
src: "depsInstall";
|
|
44
48
|
logic: import("xstate").PromiseActorLogic<import("../build/actors/setup.js").DepsInstallOutput, import("../build/actors/setup.js").SetupInput, import("xstate").EventObject>;
|
|
45
49
|
id: string | undefined;
|
|
@@ -63,13 +67,26 @@ export declare const devMachine: import("xstate").StateMachine<DevContext, {
|
|
|
63
67
|
src: "shutdown";
|
|
64
68
|
logic: import("xstate").PromiseActorLogic<void, import("./actors/app-lifecycle.js").ShutdownInput, import("xstate").EventObject>;
|
|
65
69
|
id: string | undefined;
|
|
70
|
+
} | {
|
|
71
|
+
src: "tablesManifest";
|
|
72
|
+
logic: import("xstate").PromiseActorLogic<import("./actors/tables-manifest.js").TablesManifestOutput, import("./actors/tables-manifest.js").TablesManifestInput, import("xstate").EventObject>;
|
|
73
|
+
id: string | undefined;
|
|
66
74
|
}, never, {
|
|
67
75
|
type: "shouldSkipDb";
|
|
68
76
|
params: unknown;
|
|
77
|
+
} | {
|
|
78
|
+
type: "shouldSkipManifest";
|
|
79
|
+
params: unknown;
|
|
69
80
|
} | {
|
|
70
81
|
type: "shouldSkipApp";
|
|
71
82
|
params: unknown;
|
|
72
|
-
}
|
|
83
|
+
} | {
|
|
84
|
+
type: "shouldSkipTablesManifest";
|
|
85
|
+
params: unknown;
|
|
86
|
+
} | {
|
|
87
|
+
type: "phaseFailed";
|
|
88
|
+
params: unknown;
|
|
89
|
+
}, never, "done" | "failed" | "manifest" | "running" | "idle" | "processCheck" | "appStart" | "shutdown" | "tablesManifest" | {
|
|
73
90
|
setup: "done" | "depsInstall" | "envCheck" | "supabaseStart";
|
|
74
91
|
}, string, DevMachineInput, {
|
|
75
92
|
success: boolean;
|
|
@@ -90,6 +107,8 @@ export declare const devMachine: import("xstate").StateMachine<DevContext, {
|
|
|
90
107
|
readonly done: {};
|
|
91
108
|
};
|
|
92
109
|
};
|
|
110
|
+
readonly tablesManifest: {};
|
|
111
|
+
readonly manifest: {};
|
|
93
112
|
readonly appStart: {};
|
|
94
113
|
readonly running: {};
|
|
95
114
|
readonly shutdown: {};
|
|
@@ -20,6 +20,8 @@ export interface DevContext {
|
|
|
20
20
|
tmpDir: string;
|
|
21
21
|
/** Whether Supabase is configured */
|
|
22
22
|
hasDatabase: boolean;
|
|
23
|
+
/** Whether manifest generation is applicable */
|
|
24
|
+
hasManifestTask: boolean;
|
|
23
25
|
/** App process PID (when running) */
|
|
24
26
|
appPid: number | null;
|
|
25
27
|
/** Whether Supabase was started */
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared default file discovery patterns for manifest generation.
|
|
3
|
+
*
|
|
4
|
+
* These defaults intentionally cover both monorepo layouts and common single-app layouts.
|
|
5
|
+
* The processor still filters files later, so broader discovery is preferred over silent misses.
|
|
6
|
+
*/
|
|
7
|
+
export declare const DEFAULT_INCLUDE_PATTERNS: readonly ["app/**/*.tsx", "app/**/*.ts", "pages/**/*.tsx", "pages/**/*.ts", "src/**/*.tsx", "src/**/*.ts", "components/**/*.tsx", "components/**/*.ts", "hooks/**/*.tsx", "hooks/**/*.ts", "lib/**/*.tsx", "lib/**/*.ts", "machines/**/*.tsx", "machines/**/*.ts", "features/**/*.tsx", "features/**/*.ts", "modules/**/*.tsx", "modules/**/*.ts", "domain/**/*.tsx", "domain/**/*.ts", "screens/**/*.tsx", "screens/**/*.ts", "views/**/*.tsx", "views/**/*.ts", "routes/**/*.tsx", "routes/**/*.ts", "api/**/*.tsx", "api/**/*.ts", "server/**/*.tsx", "server/**/*.ts", "apps/**/*.tsx", "apps/**/*.ts", "packages/**/*.tsx", "packages/**/*.ts"];
|
|
8
|
+
export declare const DEFAULT_EXCLUDE_PATTERNS: readonly ["**/node_modules/**", "**/.next/**", "**/dist/**", "**/*.test.*", "**/*.spec.*", "**/*.stories.*"];
|
|
9
|
+
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CLILogger } from '@runa-ai/runa';
|
|
2
|
+
export type MachineStateLoggerArgOrder = 'logger-first' | 'context-first';
|
|
3
|
+
export type MachineStateLogger<TContext, TExtra = undefined, TOrder extends MachineStateLoggerArgOrder = 'logger-first'> = TOrder extends 'context-first' ? (context: TContext, logger: CLILogger, extra?: TExtra) => void : (logger: CLILogger, context: TContext, extra?: TExtra) => void;
|
|
4
|
+
type MachineStateChangeLoggerOptionsBase<TSnapshot, TContext, TExtra = undefined, TOrder extends MachineStateLoggerArgOrder = 'logger-first'> = {
|
|
5
|
+
getState: (snapshot: TSnapshot) => string;
|
|
6
|
+
getContext: (snapshot: TSnapshot) => TContext;
|
|
7
|
+
handlers: Record<string, MachineStateLogger<TContext, TExtra, TOrder>>;
|
|
8
|
+
useParentState?: boolean;
|
|
9
|
+
shouldSkipState?: (state: string, prevState: string, context: TContext, extra: TExtra | undefined) => boolean;
|
|
10
|
+
onUnknownState?: (state: string, logger: CLILogger, context: TContext, extra: TExtra | undefined, prevState: string) => void;
|
|
11
|
+
handlerArgumentOrder?: MachineStateLoggerArgOrder;
|
|
12
|
+
};
|
|
13
|
+
export type MachineStateChangeLoggerOptions<TSnapshot, TContext, TExtra = undefined, TOrder extends MachineStateLoggerArgOrder = 'logger-first'> = MachineStateChangeLoggerOptionsBase<TSnapshot, TContext, TExtra, TOrder> & (TOrder extends 'context-first' ? {
|
|
14
|
+
handlerArgumentOrder: 'context-first';
|
|
15
|
+
} : {
|
|
16
|
+
handlerArgumentOrder?: 'logger-first';
|
|
17
|
+
});
|
|
18
|
+
export declare function createMachineStateChangeLogger<TSnapshot, TContext, TExtra = undefined, TOrder extends MachineStateLoggerArgOrder = 'logger-first'>(options: MachineStateChangeLoggerOptions<TSnapshot, TContext, TExtra, TOrder>): (snapshot: TSnapshot, prevState: string, logger: CLILogger, extra?: TExtra) => void;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=machine-state-logging.d.ts.map
|