@prisma/composer 0.6.0-dev.13 → 0.6.0-dev.15
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/{app-config-CFsSXEVj-B242oUnm.d.mts → app-config-aIrriqVU-D6lJHzh2.d.mts} +42 -17
- package/dist/app-config-aIrriqVU-D6lJHzh2.d.mts.map +1 -0
- package/dist/bin.mjs +950 -12
- package/dist/bin.mjs.map +1 -1
- package/dist/config-CL7Jbve2.d.mts +1 -0
- package/dist/config.d.mts +3 -3
- package/dist/container-transport-DKmKg5JQ-CoY4XPma.mjs +30 -0
- package/dist/container-transport-DKmKg5JQ-CoY4XPma.mjs.map +1 -0
- package/dist/control.d.mts +3 -216
- package/dist/control.mjs +1 -69
- package/dist/deploy-CL7Jbve2.d.mts +1 -0
- package/dist/deploy.d.mts +2 -2
- package/dist/deploy.mjs +1 -1
- package/dist/{deployment-summary-r47O6kFr-CcMYVOn5.mjs → deployment-summary-DswOl_9E-C03NJ98H.mjs} +2 -2
- package/dist/{deployment-summary-r47O6kFr-CcMYVOn5.mjs.map → deployment-summary-DswOl_9E-C03NJ98H.mjs.map} +1 -1
- package/dist/{dist-C5rZnr4n.mjs → dist-C0dNEgS-.mjs} +2 -2
- package/dist/{dist-C5rZnr4n.mjs.map → dist-C0dNEgS-.mjs.map} +1 -1
- package/dist/{errors-0e8IVwzi.mjs → errors-DkXcnjPx.mjs} +3 -2
- package/dist/{errors-0e8IVwzi.mjs.map → errors-DkXcnjPx.mjs.map} +1 -1
- package/dist/{execute-deploy-destroy-IT4vGkMc-oO8yjHPH.mjs → execute-deploy-destroy-DfVJUICu-AMM8CwgV.mjs} +30 -19
- package/dist/execute-deploy-destroy-DfVJUICu-AMM8CwgV.mjs.map +1 -0
- package/dist/{execute-deploy-destroy-IT4vGkMc-YM1Cv6cu.mjs → execute-deploy-destroy-DfVJUICu-quUQ08T8.mjs} +29 -19
- package/dist/execute-deploy-destroy-DfVJUICu-quUQ08T8.mjs.map +1 -0
- package/dist/{execute-dev-DLYyduEM-88uyvrbj.mjs → execute-dev-BMTFWfFc-B1whS-Rr.mjs} +25 -23
- package/dist/{execute-dev-DLYyduEM-88uyvrbj.mjs.map → execute-dev-BMTFWfFc-B1whS-Rr.mjs.map} +1 -1
- package/dist/{execute-dev-DLYyduEM-BuUGTm0g.mjs → execute-dev-BMTFWfFc-BoKbcFVF.mjs} +29 -20
- package/dist/{execute-dev-DLYyduEM-BuUGTm0g.mjs.map → execute-dev-BMTFWfFc-BoKbcFVF.mjs.map} +1 -1
- package/dist/{execute-log-VIOL4DBz-DBPH8By4.mjs → execute-log-Cay9hlKW-B0tmRtrY.mjs} +11 -7
- package/dist/execute-log-Cay9hlKW-B0tmRtrY.mjs.map +1 -0
- package/dist/{execute-log-VIOL4DBz-DKodBrxS.mjs → execute-log-Cay9hlKW-DrMeVOXq.mjs} +9 -7
- package/dist/execute-log-Cay9hlKW-DrMeVOXq.mjs.map +1 -0
- package/dist/family-DkH0si4D-Uov_MuHV.d.mts +27 -0
- package/dist/family-DkH0si4D-Uov_MuHV.d.mts.map +1 -0
- package/dist/family.d.mts +53 -0
- package/dist/family.d.mts.map +1 -0
- package/dist/family.mjs +839 -0
- package/dist/family.mjs.map +1 -0
- package/dist/{graph-BJgUfGB0-kvgFzT4q.mjs → graph-BJgUfGB0-7fmubS_y.mjs} +2 -2
- package/dist/{graph-BJgUfGB0-kvgFzT4q.mjs.map → graph-BJgUfGB0-7fmubS_y.mjs.map} +1 -1
- package/dist/{graph-types-N6brq1zY-1VMNwtkJ.d.mts → graph-DqklX5Sf-CdNH3lA7.d.mts} +17 -2
- package/dist/graph-DqklX5Sf-CdNH3lA7.d.mts.map +1 -0
- package/dist/{index-DryPyF9U.d.mts → index-DuF5iI3i.d.mts} +2 -3
- package/dist/index-DuF5iI3i.d.mts.map +1 -0
- package/dist/index.d.mts +2 -3
- package/dist/index.mjs +2 -2
- package/dist/{local-target-DnA2E8IN.mjs → local-target-D3u_wuNF.mjs} +2 -2
- package/dist/{local-target-DnA2E8IN.mjs.map → local-target-D3u_wuNF.mjs.map} +1 -1
- package/dist/{local-target-DuSyWeYc.mjs → local-target-H0IWu_FM.mjs} +2 -2
- package/dist/{local-target-DuSyWeYc.mjs.map → local-target-H0IWu_FM.mjs.map} +1 -1
- package/dist/local-target.d.mts +1 -1
- package/dist/local-target.mjs +1 -1
- package/dist/log-DRnnWupy-9jbzL64M.d.mts +324 -0
- package/dist/log-DRnnWupy-9jbzL64M.d.mts.map +1 -0
- package/dist/{result-CzGChwbZ.mjs → log-DfT2hHqi-CDp9nfI5.mjs} +85 -90
- package/dist/log-DfT2hHqi-CDp9nfI5.mjs.map +1 -0
- package/dist/{nextjs-DLyeRR7M-DZODs9tk.d.mts → nextjs-DLyeRR7M-BfUbLXwr.d.mts} +3 -3
- package/dist/{nextjs-DLyeRR7M-DZODs9tk.d.mts.map → nextjs-DLyeRR7M-BfUbLXwr.d.mts.map} +1 -1
- package/dist/nextjs-control.d.mts +4 -4
- package/dist/nextjs.d.mts +1 -1
- package/dist/node-control.d.mts +3 -3
- package/dist/node.d.mts +2 -2
- package/dist/{pipeline-D3QoVzAB-D_ufjg3N.mjs → pipeline-AoW8zq4I-C6Qe0VaZ.mjs} +161 -42
- package/dist/{pipeline-D3QoVzAB-D_ufjg3N.mjs.map → pipeline-AoW8zq4I-C6Qe0VaZ.mjs.map} +1 -1
- package/dist/{pipeline-D3QoVzAB-Ci2aJ2mE.mjs → pipeline-AoW8zq4I-DM74ygtH.mjs} +164 -43
- package/dist/pipeline-AoW8zq4I-DM74ygtH.mjs.map +1 -0
- package/dist/report.d.mts +2 -2
- package/dist/report.mjs +1 -1
- package/dist/report.mjs.map +1 -1
- package/dist/{shared-CCaR42wo-BvegvmA_.mjs → result-B4XjxVK6.mjs} +127 -8
- package/dist/result-B4XjxVK6.mjs.map +1 -0
- package/dist/{result-CFqJKiqg.mjs → result-wonf1deB.mjs} +4 -18
- package/dist/result-wonf1deB.mjs.map +1 -0
- package/dist/run-alchemy-D44OZlyB-DA7s331N.mjs +93 -0
- package/dist/run-alchemy-D44OZlyB-DA7s331N.mjs.map +1 -0
- package/dist/run-alchemy-D44OZlyB-DeDTFsB6.mjs +93 -0
- package/dist/run-alchemy-D44OZlyB-DeDTFsB6.mjs.map +1 -0
- package/dist/service-rpc.d.mts +2 -2
- package/dist/service-rpc.mjs +2 -2
- package/dist/testing.d.mts +54 -2
- package/dist/testing.d.mts.map +1 -1
- package/dist/testing.mjs +150 -1
- package/dist/testing.mjs.map +1 -1
- package/package.json +12 -11
- package/src/exports/family.ts +14 -0
- package/src/exports/testing.ts +1 -0
- package/dist/app-config-CFsSXEVj-B242oUnm.d.mts.map +0 -1
- package/dist/cli-B3sWzFlb-CxEIzKsQ.mjs +0 -401
- package/dist/cli-B3sWzFlb-CxEIzKsQ.mjs.map +0 -1
- package/dist/config-ku5b_2YD.d.mts +0 -1
- package/dist/container-transport-DKmKg5JQ-BMRhx5w-.mjs +0 -75
- package/dist/container-transport-DKmKg5JQ-BMRhx5w-.mjs.map +0 -1
- package/dist/control.d.mts.map +0 -1
- package/dist/control.mjs.map +0 -1
- package/dist/deploy-ku5b_2YD.d.mts +0 -1
- package/dist/execute-deploy-destroy-IT4vGkMc-YM1Cv6cu.mjs.map +0 -1
- package/dist/execute-deploy-destroy-IT4vGkMc-oO8yjHPH.mjs.map +0 -1
- package/dist/execute-log-VIOL4DBz-DBPH8By4.mjs.map +0 -1
- package/dist/execute-log-VIOL4DBz-DKodBrxS.mjs.map +0 -1
- package/dist/graph-DqklX5Sf-BNS2aO1j.d.mts +0 -18
- package/dist/graph-DqklX5Sf-BNS2aO1j.d.mts.map +0 -1
- package/dist/graph-types-N6brq1zY-1VMNwtkJ.d.mts.map +0 -1
- package/dist/index-DryPyF9U.d.mts.map +0 -1
- package/dist/pipeline-D3QoVzAB-Ci2aJ2mE.mjs.map +0 -1
- package/dist/render-error-DsPN5qfr-CkVGj9uP.mjs +0 -30
- package/dist/render-error-DsPN5qfr-CkVGj9uP.mjs.map +0 -1
- package/dist/result-CFqJKiqg.mjs.map +0 -1
- package/dist/result-CzGChwbZ.mjs.map +0 -1
- package/dist/run-alchemy-hghRtddF-CQHOzlrW.mjs +0 -48
- package/dist/run-alchemy-hghRtddF-CQHOzlrW.mjs.map +0 -1
- package/dist/shared-CCaR42wo-BvegvmA_.mjs.map +0 -1
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
import { W as ServiceNode, ft as CliStructuredError } from "./graph-DqklX5Sf-CdNH3lA7.mjs";
|
|
2
|
+
import { a as Bundle, k as PrismaAppConfig, o as ContainerCredentials, u as DeployedEntity } from "./app-config-aIrriqVU-D6lJHzh2.mjs";
|
|
3
|
+
import "./config-CL7Jbve2.mjs";
|
|
4
|
+
import "./index-DuF5iI3i.mjs";
|
|
5
|
+
import "./deploy-CL7Jbve2.mjs";
|
|
6
|
+
//#region ../../0-framework/3-tooling/cli/dist/load-entry-yXw6cagY.d.mts
|
|
7
|
+
/**
|
|
8
|
+
* WHAT to converge. Deliberately not a command line: which alchemy binary to
|
|
9
|
+
* run is a question about this machine's installed tree, and answering it
|
|
10
|
+
* eagerly would make an injected adapter — a test's fake child — fail in a
|
|
11
|
+
* directory that has no alchemy installed, before the fake ever ran. The
|
|
12
|
+
* adapter resolves the binary, because the adapter is what starts a child.
|
|
13
|
+
*
|
|
14
|
+
* `env` carries only the ADDITIONS to the invoking environment — the container
|
|
15
|
+
* transport vars and the result-file pointer — never a whole environment: the
|
|
16
|
+
* engine merges additions over the invocation environment and applies its own
|
|
17
|
+
* credential vars last.
|
|
18
|
+
*/
|
|
19
|
+
interface AlchemyInvocation {
|
|
20
|
+
readonly action: 'deploy' | 'destroy';
|
|
21
|
+
readonly stackFileRelativePath: string;
|
|
22
|
+
readonly cwd: string;
|
|
23
|
+
readonly stage: string;
|
|
24
|
+
readonly env: Readonly<Record<string, string | undefined>>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* How the converge child ended, verbatim. A signal-killed child carries
|
|
28
|
+
* `signal` and a null `exitCode`; callers branch on `signal` first, because a
|
|
29
|
+
* signal-killed child is an abort, not a failure. Structurally the engine's
|
|
30
|
+
* `ChildResult`, declared here so the control surface does not depend on the
|
|
31
|
+
* engine.
|
|
32
|
+
*/
|
|
33
|
+
interface AlchemyOutcome {
|
|
34
|
+
readonly exitCode: number | null;
|
|
35
|
+
readonly signal: string | null;
|
|
36
|
+
}
|
|
37
|
+
/** Starts the converge and resolves when it ends. The CLI supplies one backed
|
|
38
|
+
* by `ctx.spawn`; hosts get `spawnAlchemy`. */
|
|
39
|
+
type RunAlchemy = (invocation: AlchemyInvocation) => Promise<AlchemyOutcome>;
|
|
40
|
+
//#endregion
|
|
41
|
+
//#region ../../0-framework/0-foundation/foundation/dist/result.d.mts
|
|
42
|
+
//#region src/result.d.ts
|
|
43
|
+
/**
|
|
44
|
+
* Represents a successful result containing a value.
|
|
45
|
+
*/
|
|
46
|
+
interface Ok<T> {
|
|
47
|
+
readonly ok: true;
|
|
48
|
+
readonly value: T;
|
|
49
|
+
assertOk(): T;
|
|
50
|
+
assertNotOk(): never;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Represents an unsuccessful result containing failure details.
|
|
54
|
+
*/
|
|
55
|
+
interface NotOk<F> {
|
|
56
|
+
readonly ok: false;
|
|
57
|
+
readonly failure: F;
|
|
58
|
+
assertOk(): never;
|
|
59
|
+
assertNotOk(): F;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* A discriminated union representing either success (Ok) or failure (NotOk).
|
|
63
|
+
*
|
|
64
|
+
* @typeParam T - The success value type
|
|
65
|
+
* @typeParam F - The failure details type
|
|
66
|
+
*/
|
|
67
|
+
type Result<T, F> = Ok<T> | NotOk<F>;
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region ../../0-framework/3-tooling/assemble/dist/index.d.mts
|
|
70
|
+
/** Assembles one service node — the seam tests substitute to avoid a real build. */
|
|
71
|
+
type RunAssembler = (node: ServiceNode, address: string, cwd: string) => Promise<Bundle>;
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region ../../0-framework/3-tooling/cli/dist/log-DRnnWupy.d.mts
|
|
74
|
+
//#region src/deployment-summary.d.ts
|
|
75
|
+
/** The serializable projection of DeploymentResult — what CAN cross the process
|
|
76
|
+
* boundary. Writer (report hook) and reader (deploy operation) share this shape. */
|
|
77
|
+
interface DeployedNodeSummary {
|
|
78
|
+
readonly address: string;
|
|
79
|
+
readonly entities: readonly DeployedEntity[];
|
|
80
|
+
}
|
|
81
|
+
interface DeploymentSummary {
|
|
82
|
+
readonly app: string;
|
|
83
|
+
readonly nodes: readonly DeployedNodeSummary[];
|
|
84
|
+
}
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/operations/shared.d.ts
|
|
87
|
+
/** A running service's dotted address plus its local URL — what `dev` reports
|
|
88
|
+
* as the front door and `log` reports as the tailable services. */
|
|
89
|
+
interface ServiceEndpoint {
|
|
90
|
+
readonly address: string;
|
|
91
|
+
readonly url: string;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* The operations' in-package injection seam — lets the CLI's own tests drive
|
|
95
|
+
* them without a real wrapper build, config evaluation, or alchemy process.
|
|
96
|
+
* Threaded through the *WithDeps variants, never part of the published
|
|
97
|
+
* surface: the fields mirror internal types.
|
|
98
|
+
*/
|
|
99
|
+
interface OperationDeps {
|
|
100
|
+
readonly runAssembler?: RunAssembler | undefined;
|
|
101
|
+
/**
|
|
102
|
+
* Starts the converge child. The CLI passes one backed by the engine's
|
|
103
|
+
* `ctx.spawn`, so the terminal reaches the child natively and the engine
|
|
104
|
+
* owns signal policy; hosts get the default `spawnAlchemy`.
|
|
105
|
+
*/
|
|
106
|
+
readonly alchemy?: RunAlchemy | undefined;
|
|
107
|
+
readonly config?: PrismaAppConfig | undefined;
|
|
108
|
+
/** Names the config file explicitly instead of walking up from the entry. */
|
|
109
|
+
readonly configPath?: string | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* How the in-process leg authenticates: the caller's already-authenticated
|
|
112
|
+
* API client and the workspace it acts in. Supplied by the CLI from the
|
|
113
|
+
* engine's credential read, so no code below this point reads the
|
|
114
|
+
* environment for token material. Absent for hosts that have not adopted
|
|
115
|
+
* the seam — the container descriptors then fall back to the environment
|
|
116
|
+
* protocol, as the spawned child does.
|
|
117
|
+
*
|
|
118
|
+
* Read by `deploy` and `destroy` only, because they are the operations that
|
|
119
|
+
* reach a PLATFORM container. `dev` and `log` resolve local targets, whose
|
|
120
|
+
* container is "a stable local identity — resolved without any platform
|
|
121
|
+
* call", and both commands are credential-free by contract: there is no
|
|
122
|
+
* authenticated call on those paths for this to reach.
|
|
123
|
+
*/
|
|
124
|
+
readonly credentials?: ContainerCredentials | undefined;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Where a failed execution left its artifacts — details of the CURRENT
|
|
128
|
+
* execution mechanism (a spawned deploy-engine child driving a generated
|
|
129
|
+
* stack file), for hosts that want to print a reproduce hint. The mechanism
|
|
130
|
+
* is not part of the surface's contract, so these fields may change or
|
|
131
|
+
* disappear if the mechanism does; branch on `code`/`message`/`cause` for
|
|
132
|
+
* anything durable.
|
|
133
|
+
*/
|
|
134
|
+
interface ExecutionDiagnostics {
|
|
135
|
+
/** The child's exit status; undefined means the spawn itself threw, or the
|
|
136
|
+
* child was killed by a signal (`signal` then names it). */
|
|
137
|
+
readonly exitCode: number | undefined;
|
|
138
|
+
/** The signal that killed the child, when one did. A signal-killed converge
|
|
139
|
+
* is an abort the user asked for, not a failure of the deploy — a host
|
|
140
|
+
* should report it as an interruption and print no reproduce hint. */
|
|
141
|
+
readonly signal?: string | undefined;
|
|
142
|
+
readonly stackFilePath: string;
|
|
143
|
+
readonly reproduceCommand: string;
|
|
144
|
+
readonly cwd: string;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Reads the execution diagnostics an engine-failure error carries in
|
|
148
|
+
* `meta.diagnostics`; undefined for every other failure.
|
|
149
|
+
*/
|
|
150
|
+
declare function executionDiagnostics(f: CliStructuredError): ExecutionDiagnostics | undefined;
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region src/operations/deploy.d.ts
|
|
153
|
+
interface DeployInput {
|
|
154
|
+
/** Path to the entry module, resolved against `cwd` — same contract as `prisma-composer deploy <entry>`. */
|
|
155
|
+
readonly entry: string;
|
|
156
|
+
/** Override the root node's name (the `--name` flag's slot). */
|
|
157
|
+
readonly name?: string | undefined;
|
|
158
|
+
/** Target stage. ABSENT = production — bare deploy targets production (main.ts effectiveStage). */
|
|
159
|
+
readonly stage?: string | undefined;
|
|
160
|
+
/** Defaults to process.cwd(); the directory `.prisma-composer/` and `.alchemy` state live under. */
|
|
161
|
+
readonly cwd?: string | undefined;
|
|
162
|
+
}
|
|
163
|
+
interface DeploySuccess {
|
|
164
|
+
/** Parsed from the alchemy child's result file. Undefined when the child
|
|
165
|
+
* did not write one (injected fake alchemy, or a report-less apply). */
|
|
166
|
+
readonly summary: DeploymentSummary | undefined;
|
|
167
|
+
}
|
|
168
|
+
declare function deploy(input: DeployInput): Promise<Result<DeploySuccess, CliStructuredError>>;
|
|
169
|
+
/** In-package variant threading the injection seam (the CLI's RunDeps, unit
|
|
170
|
+
* tests). Deliberately NOT re-exported through `./control` — the seam mirrors
|
|
171
|
+
* internal types and is not part of the published surface. */
|
|
172
|
+
declare function deployWithDeps(input: DeployInput, deps: OperationDeps): Promise<Result<DeploySuccess, CliStructuredError>>;
|
|
173
|
+
//#endregion
|
|
174
|
+
//#region src/operations/destroy.d.ts
|
|
175
|
+
/** Destroy must name its target explicitly — no silent default to production. Encoded, not re-derived from flags. */
|
|
176
|
+
type DestroyTarget = {
|
|
177
|
+
readonly kind: 'production';
|
|
178
|
+
} | {
|
|
179
|
+
readonly kind: 'stage';
|
|
180
|
+
readonly stage: string;
|
|
181
|
+
};
|
|
182
|
+
type DestroyEvent =
|
|
183
|
+
/** Emitted before the pipeline when `<cwd>/.alchemy` is missing/empty. */
|
|
184
|
+
{
|
|
185
|
+
readonly kind: 'no-local-deploy-state';
|
|
186
|
+
readonly cwd: string;
|
|
187
|
+
};
|
|
188
|
+
interface DestroyInput {
|
|
189
|
+
readonly entry: string;
|
|
190
|
+
readonly name?: string | undefined;
|
|
191
|
+
readonly target: DestroyTarget;
|
|
192
|
+
readonly cwd?: string | undefined;
|
|
193
|
+
/** Mid-operation notifications, in real time. Rendering is the host's. */
|
|
194
|
+
readonly onEvent?: ((event: DestroyEvent) => void) | undefined;
|
|
195
|
+
}
|
|
196
|
+
declare function destroy(input: DestroyInput): Promise<Result<void, CliStructuredError>>;
|
|
197
|
+
/** In-package variant threading the injection seam (the CLI's RunDeps, unit
|
|
198
|
+
* tests). Deliberately NOT re-exported through `./control` — the seam mirrors
|
|
199
|
+
* internal types and is not part of the published surface. */
|
|
200
|
+
declare function destroyWithDeps(input: DestroyInput, deps: OperationDeps): Promise<Result<void, CliStructuredError>>;
|
|
201
|
+
//#endregion
|
|
202
|
+
//#region src/operations/dev.d.ts
|
|
203
|
+
type DevEvent =
|
|
204
|
+
/** Initial front door + after each successful re-converge. */
|
|
205
|
+
{
|
|
206
|
+
readonly kind: 'ready';
|
|
207
|
+
readonly endpoints: readonly ServiceEndpoint[];
|
|
208
|
+
} | {
|
|
209
|
+
readonly kind: 'unwatchable';
|
|
210
|
+
readonly address: string;
|
|
211
|
+
} | {
|
|
212
|
+
readonly kind: 'rebuild-failed';
|
|
213
|
+
readonly message: string;
|
|
214
|
+
} |
|
|
215
|
+
/** The file watcher itself errored (EMFILE, a vanished directory); the session keeps running. */
|
|
216
|
+
{
|
|
217
|
+
readonly kind: 'watch-error';
|
|
218
|
+
readonly message: string;
|
|
219
|
+
} |
|
|
220
|
+
/** The app keeps running, still watching. */
|
|
221
|
+
{
|
|
222
|
+
readonly kind: 'converge-failed';
|
|
223
|
+
readonly stackFilePath: string;
|
|
224
|
+
readonly reproduceCommand: string;
|
|
225
|
+
readonly cwd: string;
|
|
226
|
+
} | {
|
|
227
|
+
readonly kind: 'stopping';
|
|
228
|
+
} |
|
|
229
|
+
/** One service refused to stop during stop(); teardown continues and `stopped` still follows. */
|
|
230
|
+
{
|
|
231
|
+
readonly kind: 'stop-error';
|
|
232
|
+
readonly message: string;
|
|
233
|
+
} | {
|
|
234
|
+
readonly kind: 'stopped';
|
|
235
|
+
};
|
|
236
|
+
interface DevInput {
|
|
237
|
+
readonly entry: string;
|
|
238
|
+
readonly name?: string | undefined;
|
|
239
|
+
readonly fresh?: boolean | undefined;
|
|
240
|
+
readonly cwd?: string | undefined;
|
|
241
|
+
readonly onEvent?: ((event: DevEvent) => void) | undefined;
|
|
242
|
+
}
|
|
243
|
+
/** A running dev session. The operation NEVER touches process signal handlers —
|
|
244
|
+
* the host owns signals (and must evict alchemy's import-time SIGINT/SIGTERM
|
|
245
|
+
* listeners before installing its own; see run-dev.ts). */
|
|
246
|
+
interface DevSession {
|
|
247
|
+
/** The initial front door, already merged across attachments. */
|
|
248
|
+
readonly endpoints: readonly ServiceEndpoint[];
|
|
249
|
+
/** Stop the watch loop and the app's services (emulators and data stay up).
|
|
250
|
+
* Idempotent; emits 'stopping'/'stopped'; resolves `closed`. */
|
|
251
|
+
stop(): Promise<void>;
|
|
252
|
+
/** Settles when the session has fully stopped (via stop()). */
|
|
253
|
+
readonly closed: Promise<void>;
|
|
254
|
+
}
|
|
255
|
+
declare function dev(input: DevInput): Promise<Result<DevSession, CliStructuredError>>;
|
|
256
|
+
/** In-package variant threading the injection seam (the CLI's RunDeps, unit
|
|
257
|
+
* tests). Deliberately NOT re-exported through `./control` — the seam mirrors
|
|
258
|
+
* internal types and is not part of the published surface. */
|
|
259
|
+
declare function devWithDeps(input: DevInput, deps: OperationDeps): Promise<Result<DevSession, CliStructuredError>>;
|
|
260
|
+
//#endregion
|
|
261
|
+
//#region src/pipeline.d.ts
|
|
262
|
+
interface AppIdentity {
|
|
263
|
+
readonly configPath: string;
|
|
264
|
+
readonly config: PrismaAppConfig;
|
|
265
|
+
readonly name: string;
|
|
266
|
+
}
|
|
267
|
+
//#endregion
|
|
268
|
+
//#region src/operations/log.d.ts
|
|
269
|
+
interface LogLine {
|
|
270
|
+
readonly service: string;
|
|
271
|
+
readonly line: string;
|
|
272
|
+
}
|
|
273
|
+
type LogEvent =
|
|
274
|
+
/** One attachment's stream died; the others continue. */
|
|
275
|
+
{
|
|
276
|
+
readonly kind: 'stream-failed';
|
|
277
|
+
readonly message: string;
|
|
278
|
+
} |
|
|
279
|
+
/** The consumer fell behind and the bounded merge queue overflowed:
|
|
280
|
+
* `count` oldest lines were dropped since the last delivered line. */
|
|
281
|
+
{
|
|
282
|
+
readonly kind: 'lines-dropped';
|
|
283
|
+
readonly count: number;
|
|
284
|
+
};
|
|
285
|
+
/** The log operation's in-package injection seam (the CLI's LogRunDeps, unit
|
|
286
|
+
* tests) — threaded through logWithDeps, never part of the published surface. */
|
|
287
|
+
interface LogDeps {
|
|
288
|
+
/** Substituted for the c12 evaluation of the discovered config file (discovery still runs). */
|
|
289
|
+
readonly config?: PrismaAppConfig | undefined;
|
|
290
|
+
/** Overrides the identity resolution (config + name) — lets tests skip a real entry module. */
|
|
291
|
+
readonly identity?: AppIdentity | undefined;
|
|
292
|
+
/** Names the config file explicitly instead of walking up from the entry. */
|
|
293
|
+
readonly configPath?: string | undefined;
|
|
294
|
+
}
|
|
295
|
+
interface LogInput {
|
|
296
|
+
readonly entry: string;
|
|
297
|
+
readonly name?: string | undefined;
|
|
298
|
+
/** Restrict to one service's dotted address; validated against running services. */
|
|
299
|
+
readonly address?: string | undefined;
|
|
300
|
+
/** Trailing history lines before live output. Defaults to 0 (live only) —
|
|
301
|
+
* the attachment contract's default; the CLI's user-facing default of 20 stays in main.ts. */
|
|
302
|
+
readonly tail?: number | undefined;
|
|
303
|
+
readonly cwd?: string | undefined;
|
|
304
|
+
/** Ends the stream when aborted. The host owns SIGINT/SIGTERM → abort. */
|
|
305
|
+
readonly signal?: AbortSignal | undefined;
|
|
306
|
+
readonly onEvent?: ((event: LogEvent) => void) | undefined;
|
|
307
|
+
}
|
|
308
|
+
interface LogAttached {
|
|
309
|
+
/** For the adapter's empty-services notice. */
|
|
310
|
+
readonly appName: string;
|
|
311
|
+
/** Every running service. EMPTY means nothing is running — a valid, non-failure state;
|
|
312
|
+
* `lines` is then an already-finished iterable. */
|
|
313
|
+
readonly services: readonly ServiceEndpoint[];
|
|
314
|
+
/** Merged, address-filtered stream; ends on signal abort or when every source ends. */
|
|
315
|
+
readonly lines: AsyncIterable<LogLine>;
|
|
316
|
+
}
|
|
317
|
+
declare function log(input: LogInput): Promise<Result<LogAttached, CliStructuredError>>;
|
|
318
|
+
/** In-package variant threading the injection seam (the CLI's LogRunDeps,
|
|
319
|
+
* unit tests). Deliberately NOT re-exported through `./control` — the seam
|
|
320
|
+
* mirrors internal types and is not part of the published surface. */
|
|
321
|
+
declare function logWithDeps(input: LogInput, deps: LogDeps): Promise<Result<LogAttached, CliStructuredError>>;
|
|
322
|
+
//#endregion
|
|
323
|
+
export { Result as A, dev as C, logWithDeps as D, log as E, NotOk as O, destroyWithDeps as S, executionDiagnostics as T, OperationDeps as _, DestroyEvent as a, deployWithDeps as b, DevEvent as c, ExecutionDiagnostics as d, LogAttached as f, LogLine as g, LogInput as h, DeploymentSummary as i, Ok as k, DevInput as l, LogEvent as m, DeploySuccess as n, DestroyInput as o, LogDeps as p, DeployedNodeSummary as r, DestroyTarget as s, DeployInput as t, DevSession as u, ServiceEndpoint as v, devWithDeps as w, destroy as x, deploy as y };
|
|
324
|
+
//# sourceMappingURL=log-DRnnWupy-9jbzL64M.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-DRnnWupy-9jbzL64M.d.mts","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/load-entry-yXw6cagY.d.mts","../../../0-framework/0-foundation/foundation/dist/result.d.mts","../../../0-framework/3-tooling/assemble/dist/index.d.mts","../../../0-framework/3-tooling/cli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AO,WAAW,QAAQ,OAAO,YAAY;;;;iBAIjD,YAAY,OAAO,UAAU,MAAM,gBAAgB,QAAQ,OAAO,YAAY;;;UAGrF;WACC;WACA,QAAQ;WACR;;;;UAID;WACC;WACA;;KAEN;;;WAGM;WACA;;;;;WAKA;WACA;;;;UAID;;WAEC,SAAS;;WAET,WAAW;;WAEX;;UAED;WACC;WACA;;WAEA;;;WAGA;WACA;;WAEA,SAAS;WACT,YAAY,OAAO;;UAEpB;;WAEC;;;WAGA,mBAAmB;;WAEnB,OAAO,cAAc;;iBAEf,IAAI,OAAO,WAAW,QAAQ,OAAO,aAAa;;;;iBAIlD,YAAY,OAAO,UAAU,MAAM,UAAU,QAAQ,OAAO,aAAa"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as blindCast } from "./casts-DpaahrlC-C5XMnP9S.mjs";
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as
|
|
2
|
+
import { t as CliStructuredError } from "./errors-DkXcnjPx.mjs";
|
|
3
|
+
import { t as notOk } from "./result-wonf1deB.mjs";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
5
|
import * as fs from "node:fs";
|
|
6
6
|
import * as path from "node:path";
|
|
7
|
-
//#region ../../0-framework/3-tooling/cli/dist/shared-
|
|
7
|
+
//#region ../../0-framework/3-tooling/cli/dist/shared-BTnATsqm.mjs
|
|
8
8
|
/**
|
|
9
9
|
* Deploy preflight (TML-3158): verify that alchemy resolves the exact `effect`
|
|
10
10
|
* version @prisma/composer pins. Package managers cannot be made to enforce
|
|
@@ -87,17 +87,33 @@ function effectMismatchError(found, required) {
|
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
-
/**
|
|
91
|
-
|
|
90
|
+
/**
|
|
91
|
+
* Runs the preflight from the app's directory and RETURNS the
|
|
92
|
+
* DEPS.EFFECT_VERSION_CONFLICT error for a mismatched tree; undefined when the
|
|
93
|
+
* tree is healthy or alchemy is not installed.
|
|
94
|
+
*
|
|
95
|
+
* This is the form the config-load machinery uses. The check belongs on the
|
|
96
|
+
* config-load path rather than at import time because that is the first moment
|
|
97
|
+
* anything actually loads alchemy's provider tree — the break it explains —
|
|
98
|
+
* and because a check that runs at import time takes out commands that never
|
|
99
|
+
* touch alchemy at all, help among them.
|
|
100
|
+
*/
|
|
101
|
+
function effectResolutionDiagnostic(cwd) {
|
|
92
102
|
const alchemyDir = findAlchemyPackageDir(cwd);
|
|
93
|
-
if (alchemyDir === void 0) return;
|
|
103
|
+
if (alchemyDir === void 0) return void 0;
|
|
94
104
|
const parts = effectMismatchError(resolveEffectVersionFrom(alchemyDir), requiredEffectVersion(cwd));
|
|
95
|
-
if (parts
|
|
105
|
+
if (parts === void 0) return void 0;
|
|
106
|
+
return new CliStructuredError("DEPS.EFFECT_VERSION_CONFLICT", parts.summary, {
|
|
96
107
|
why: parts.why,
|
|
97
108
|
fix: parts.fix,
|
|
98
109
|
meta: parts.meta
|
|
99
110
|
});
|
|
100
111
|
}
|
|
112
|
+
/** The throwing form, used by the executor-load diagnosis — the one caller left now that the bin runs no start-up preflight of its own. */
|
|
113
|
+
function checkEffectResolution(cwd) {
|
|
114
|
+
const diagnostic = effectResolutionDiagnostic(cwd);
|
|
115
|
+
if (diagnostic !== void 0) throw diagnostic;
|
|
116
|
+
}
|
|
101
117
|
/**
|
|
102
118
|
* Reads the execution diagnostics an engine-failure error carries in
|
|
103
119
|
* `meta.diagnostics`; undefined for every other failure.
|
|
@@ -106,7 +122,7 @@ function executionDiagnostics(f) {
|
|
|
106
122
|
const diagnostics = f.meta?.["diagnostics"];
|
|
107
123
|
if (typeof diagnostics !== "object" || diagnostics === null) return void 0;
|
|
108
124
|
const candidate = blindCast(diagnostics);
|
|
109
|
-
if (candidate["exitCode"] !== void 0 && typeof candidate["exitCode"] !== "number" || typeof candidate["stackFilePath"] !== "string" || typeof candidate["reproduceCommand"] !== "string" || typeof candidate["cwd"] !== "string") return;
|
|
125
|
+
if (candidate["exitCode"] !== void 0 && typeof candidate["exitCode"] !== "number" || candidate["signal"] !== void 0 && typeof candidate["signal"] !== "string" || typeof candidate["stackFilePath"] !== "string" || typeof candidate["reproduceCommand"] !== "string" || typeof candidate["cwd"] !== "string") return;
|
|
110
126
|
return blindCast(diagnostics);
|
|
111
127
|
}
|
|
112
128
|
/**
|
|
@@ -139,93 +155,72 @@ function executorLoadFailure(operation, error, cwd) {
|
|
|
139
155
|
});
|
|
140
156
|
}
|
|
141
157
|
//#endregion
|
|
142
|
-
//#region ../../0-framework/
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
*/
|
|
157
|
-
var ResultImpl = class ResultImpl {
|
|
158
|
-
ok;
|
|
159
|
-
_value;
|
|
160
|
-
_failure;
|
|
161
|
-
constructor(ok, valueOrFailure) {
|
|
162
|
-
this.ok = ok;
|
|
163
|
-
if (ok) this._value = blindCast(valueOrFailure);
|
|
164
|
-
else this._failure = blindCast(valueOrFailure);
|
|
165
|
-
Object.freeze(this);
|
|
166
|
-
}
|
|
167
|
-
get value() {
|
|
168
|
-
if (!this.ok) throw new InternalError("Cannot access value on NotOk result");
|
|
169
|
-
return this._value;
|
|
170
|
-
}
|
|
171
|
-
get failure() {
|
|
172
|
-
if (this.ok) throw new InternalError("Cannot access failure on Ok result");
|
|
173
|
-
return this._failure;
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Creates a successful result.
|
|
177
|
-
*/
|
|
178
|
-
static ok(value) {
|
|
179
|
-
return blindCast(new ResultImpl(true, value));
|
|
180
|
-
}
|
|
181
|
-
/**
|
|
182
|
-
* Creates an unsuccessful result.
|
|
183
|
-
*/
|
|
184
|
-
static notOk(failure) {
|
|
185
|
-
return blindCast(new ResultImpl(false, failure));
|
|
158
|
+
//#region ../../0-framework/3-tooling/cli/dist/log-DfT2hHqi.mjs
|
|
159
|
+
async function deploy(input) {
|
|
160
|
+
return deployWithDeps(input, {});
|
|
161
|
+
}
|
|
162
|
+
/** In-package variant threading the injection seam (the CLI's RunDeps, unit
|
|
163
|
+
* tests). Deliberately NOT re-exported through `./control` — the seam mirrors
|
|
164
|
+
* internal types and is not part of the published surface. */
|
|
165
|
+
async function deployWithDeps(input, deps) {
|
|
166
|
+
const cwd = input.cwd ?? process.cwd();
|
|
167
|
+
let executor;
|
|
168
|
+
try {
|
|
169
|
+
executor = await import("./execute-deploy-destroy-DfVJUICu-AMM8CwgV.mjs");
|
|
170
|
+
} catch (error) {
|
|
171
|
+
return notOk(executorLoadFailure("deploy", error, cwd));
|
|
186
172
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
173
|
+
return executor.executeDeploy(input, deps, cwd);
|
|
174
|
+
}
|
|
175
|
+
async function destroy(input) {
|
|
176
|
+
return destroyWithDeps(input, {});
|
|
177
|
+
}
|
|
178
|
+
/** In-package variant threading the injection seam (the CLI's RunDeps, unit
|
|
179
|
+
* tests). Deliberately NOT re-exported through `./control` — the seam mirrors
|
|
180
|
+
* internal types and is not part of the published surface. */
|
|
181
|
+
async function destroyWithDeps(input, deps) {
|
|
182
|
+
const cwd = input.cwd ?? process.cwd();
|
|
183
|
+
let executor;
|
|
184
|
+
try {
|
|
185
|
+
executor = await import("./execute-deploy-destroy-DfVJUICu-AMM8CwgV.mjs");
|
|
186
|
+
} catch (error) {
|
|
187
|
+
return notOk(executorLoadFailure("destroy", error, cwd));
|
|
194
188
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
189
|
+
return executor.executeDestroy(input, deps, cwd);
|
|
190
|
+
}
|
|
191
|
+
async function dev(input) {
|
|
192
|
+
return devWithDeps(input, {});
|
|
193
|
+
}
|
|
194
|
+
/** In-package variant threading the injection seam (the CLI's RunDeps, unit
|
|
195
|
+
* tests). Deliberately NOT re-exported through `./control` — the seam mirrors
|
|
196
|
+
* internal types and is not part of the published surface. */
|
|
197
|
+
async function devWithDeps(input, deps) {
|
|
198
|
+
const cwd = input.cwd ?? process.cwd();
|
|
199
|
+
let executor;
|
|
200
|
+
try {
|
|
201
|
+
executor = await import("./execute-dev-BMTFWfFc-BoKbcFVF.mjs");
|
|
202
|
+
} catch (error) {
|
|
203
|
+
return notOk(executorLoadFailure("dev", error, cwd));
|
|
202
204
|
}
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Creates a successful result.
|
|
206
|
-
*/
|
|
207
|
-
function ok(value) {
|
|
208
|
-
return ResultImpl.ok(value);
|
|
205
|
+
return executor.executeDev(input, deps, cwd);
|
|
209
206
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
*/
|
|
213
|
-
function notOk(failure) {
|
|
214
|
-
return ResultImpl.notOk(failure);
|
|
207
|
+
async function log(input) {
|
|
208
|
+
return logWithDeps(input, {});
|
|
215
209
|
}
|
|
216
|
-
/**
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
|
|
220
|
-
const
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
210
|
+
/** In-package variant threading the injection seam (the CLI's LogRunDeps,
|
|
211
|
+
* unit tests). Deliberately NOT re-exported through `./control` — the seam
|
|
212
|
+
* mirrors internal types and is not part of the published surface. */
|
|
213
|
+
async function logWithDeps(input, deps) {
|
|
214
|
+
const cwd = input.cwd ?? process.cwd();
|
|
215
|
+
let executor;
|
|
216
|
+
try {
|
|
217
|
+
executor = await import("./execute-log-Cay9hlKW-B0tmRtrY.mjs");
|
|
218
|
+
} catch (error) {
|
|
219
|
+
return notOk(executorLoadFailure("log", error, cwd));
|
|
220
|
+
}
|
|
221
|
+
return executor.executeLog(input, deps, cwd);
|
|
227
222
|
}
|
|
228
223
|
//#endregion
|
|
229
|
-
export {
|
|
224
|
+
export { dev as a, logWithDeps as c, toStructured as d, destroyWithDeps as i, effectResolutionDiagnostic as l, deployWithDeps as n, devWithDeps as o, destroy as r, log as s, deploy as t, executionDiagnostics as u };
|
|
230
225
|
|
|
231
|
-
//# sourceMappingURL=
|
|
226
|
+
//# sourceMappingURL=log-DfT2hHqi-CDp9nfI5.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-DfT2hHqi-CDp9nfI5.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/shared-BTnATsqm.mjs","../../../0-framework/3-tooling/cli/dist/log-DfT2hHqi.mjs"],"sourcesContent":["import { createRequire } from \"node:module\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { blindCast } from \"@internal/foundation/casts\";\n//#region src/check-effect-resolution.ts\n/**\n* Deploy preflight (TML-3158): verify that alchemy resolves the exact `effect`\n* version @prisma/composer pins. Package managers cannot be made to enforce\n* this — alchemy's own peer range accepts newer effect betas, and npm resolves\n* transitive peer conflicts with a warning, not a failure — so a floating\n* `@effect/*` range anywhere in the consumer's tree can hoist a newer effect\n* to the root, where alchemy picks it up and crashes mid-deploy\n* (`TypeError: Schedule.either is not a function`). This check turns that\n* silent break into a start-up error naming the fix.\n*/\n/** Walks up from `startDir` looking for `node_modules/alchemy` (mirrors resolveAlchemyBin). Undefined when absent — the check skips rather than second-guessing later, clearer failures. */\nfunction findAlchemyPackageDir(startDir) {\n\tlet dir = startDir;\n\twhile (true) {\n\t\tconst candidate = path.join(dir, \"node_modules\", \"alchemy\");\n\t\tif (fs.existsSync(path.join(candidate, \"package.json\"))) return candidate;\n\t\tconst parent = path.dirname(dir);\n\t\tif (parent === dir) return void 0;\n\t\tdir = parent;\n\t}\n}\n/**\n* The `effect` version Node gives `packageDir`'s code, resolved exactly as\n* Node would: from the package's real path (so pnpm symlink layouts resolve\n* from the package's own store position, like at runtime). Undefined when\n* `effect` is not resolvable from there.\n*/\nfunction resolveEffectVersionFrom(packageDir) {\n\tlet entry;\n\ttry {\n\t\tentry = createRequire(path.join(fs.realpathSync(packageDir), \"noop.js\")).resolve(\"effect\");\n\t} catch {\n\t\treturn;\n\t}\n\tlet dir = path.dirname(entry);\n\twhile (!fs.existsSync(path.join(dir, \"package.json\"))) {\n\t\tconst parent = path.dirname(dir);\n\t\tif (parent === dir) return void 0;\n\t\tdir = parent;\n\t}\n\tconst version = JSON.parse(fs.readFileSync(path.join(dir, \"package.json\"), \"utf-8\")).version;\n\treturn typeof version === \"string\" ? version : void 0;\n}\n/**\n* The `effect` version @prisma/composer pins, read from its own installed\n* package.json — the single source of truth; never hardcoded here. Undefined\n* when @prisma/composer is not resolvable from `startDir` (e.g. the CLI is\n* driven some other way), in which case the check skips.\n*\n* Assumes the pin is an exact version — effectMismatchError compares with\n* `===`, which scripts/check-npm-effect-resolution.mjs enforces in CI;\n* relaxing the pin to a range means revisiting that comparison.\n*/\nfunction requiredEffectVersion(startDir) {\n\tlet manifestPath;\n\ttry {\n\t\tmanifestPath = createRequire(path.join(startDir, \"noop.js\")).resolve(\"@prisma/composer/package.json\");\n\t} catch {\n\t\treturn;\n\t}\n\tconst manifest = JSON.parse(fs.readFileSync(manifestPath, \"utf-8\"));\n\tif (typeof manifest !== \"object\" || manifest === null || !(\"dependencies\" in manifest)) return;\n\tconst dependencies = manifest.dependencies;\n\tif (typeof dependencies !== \"object\" || dependencies === null || !(\"effect\" in dependencies)) return;\n\tconst version = dependencies.effect;\n\treturn typeof version === \"string\" ? version : void 0;\n}\n/** Pure comparison + parts rendering, separated so tests cover the rule without a filesystem. Returns the structured error parts, or undefined when the tree is healthy or either side is unknown. */\nfunction effectMismatchError(found, required) {\n\tif (found === void 0 || required === void 0 || found === required) return void 0;\n\treturn {\n\t\tsummary: `Dependency conflict: alchemy resolves effect@${found}, but @prisma/composer requires effect@${required}.`,\n\t\twhy: \"Your package manager installed a second effect that alchemy picks up; deploying with it would crash inside alchemy.\",\n\t\tfix: `Add this to your app's package.json, then reinstall:\n\n \"overrides\": { \"effect\": \"${required}\" }\\n\\n(npm uses \"overrides\"; yarn calls it \"resolutions\", pnpm \"pnpm.overrides\".)`,\n\t\tmeta: {\n\t\t\tfound,\n\t\t\trequired\n\t\t}\n\t};\n}\n/**\n* Runs the preflight from the app's directory and RETURNS the\n* DEPS.EFFECT_VERSION_CONFLICT error for a mismatched tree; undefined when the\n* tree is healthy or alchemy is not installed.\n*\n* This is the form the config-load machinery uses. The check belongs on the\n* config-load path rather than at import time because that is the first moment\n* anything actually loads alchemy's provider tree — the break it explains —\n* and because a check that runs at import time takes out commands that never\n* touch alchemy at all, help among them.\n*/\nfunction effectResolutionDiagnostic(cwd) {\n\tconst alchemyDir = findAlchemyPackageDir(cwd);\n\tif (alchemyDir === void 0) return void 0;\n\tconst parts = effectMismatchError(resolveEffectVersionFrom(alchemyDir), requiredEffectVersion(cwd));\n\tif (parts === void 0) return void 0;\n\treturn new CliStructuredError(\"DEPS.EFFECT_VERSION_CONFLICT\", parts.summary, {\n\t\twhy: parts.why,\n\t\tfix: parts.fix,\n\t\tmeta: parts.meta\n\t});\n}\n/** The throwing form, used by the executor-load diagnosis — the one caller left now that the bin runs no start-up preflight of its own. */\nfunction checkEffectResolution(cwd) {\n\tconst diagnostic = effectResolutionDiagnostic(cwd);\n\tif (diagnostic !== void 0) throw diagnostic;\n}\n//#endregion\n//#region src/operations/shared.ts\n/**\n* Reads the execution diagnostics an engine-failure error carries in\n* `meta.diagnostics`; undefined for every other failure.\n*/\nfunction executionDiagnostics(f) {\n\tconst diagnostics = f.meta?.[\"diagnostics\"];\n\tif (typeof diagnostics !== \"object\" || diagnostics === null) return void 0;\n\tconst candidate = blindCast(diagnostics);\n\tif (candidate[\"exitCode\"] !== void 0 && typeof candidate[\"exitCode\"] !== \"number\" || candidate[\"signal\"] !== void 0 && typeof candidate[\"signal\"] !== \"string\" || typeof candidate[\"stackFilePath\"] !== \"string\" || typeof candidate[\"reproduceCommand\"] !== \"string\" || typeof candidate[\"cwd\"] !== \"string\") return;\n\treturn blindCast(diagnostics);\n}\n/**\n* Site-specific wrap for foreign extension/environment causes — passthrough\n* when already structured; never a boundary fallback (base-type rule 6(ii)).\n*/\nfunction toStructured(code, error) {\n\treturn CliStructuredError.is(error) ? error : new CliStructuredError(code, error instanceof Error ? error.message : String(error), { cause: error });\n}\n/** Diagnoses a failed executor import: when the app's tree resolves a\n* mismatched `effect` (the known way that import breaks), the failure is the\n* fix-naming DEPS.EFFECT_VERSION_CONFLICT from checkEffectResolution with the\n* import error riding as cause; otherwise DEPS.EXECUTOR_UNLOADABLE — an\n* environmental failure of the consumer's installed tree, not a bug here. */\nfunction executorLoadFailure(operation, error, cwd) {\n\ttry {\n\t\tcheckEffectResolution(cwd);\n\t} catch (diagnostic) {\n\t\tif (CliStructuredError.is(diagnostic)) return new CliStructuredError(diagnostic.code, diagnostic.message, {\n\t\t\t...diagnostic.why !== void 0 ? { why: diagnostic.why } : {},\n\t\t\t...diagnostic.fix !== void 0 ? { fix: diagnostic.fix } : {},\n\t\t\t...diagnostic.meta !== void 0 ? { meta: diagnostic.meta } : {},\n\t\t\tcause: error\n\t\t});\n\t}\n\treturn new CliStructuredError(\"DEPS.EXECUTOR_UNLOADABLE\", `Could not load the ${operation} executor: ${error instanceof Error ? error.message : String(error)}`, {\n\t\twhy: `The ${operation} operation's executor imports the deploy engine's provider tree from your app's installed dependencies, and that import failed.`,\n\t\tfix: \"Reinstall your dependencies, and check that `alchemy` is installed and loadable from your app.\",\n\t\tcause: error\n\t});\n}\n//#endregion\nexport { effectResolutionDiagnostic as i, executorLoadFailure as n, toStructured as r, executionDiagnostics as t };\n\n//# sourceMappingURL=shared-BTnATsqm.mjs.map","import { n as executorLoadFailure } from \"./shared-BTnATsqm.mjs\";\nimport { notOk } from \"@internal/foundation/result\";\n//#region src/operations/deploy.ts\nasync function deploy(input) {\n\treturn deployWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's RunDeps, unit\n* tests). Deliberately NOT re-exported through `./control` — the seam mirrors\n* internal types and is not part of the published surface. */\nasync function deployWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-deploy-destroy-DfVJUICu.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"deploy\", error, cwd));\n\t}\n\treturn executor.executeDeploy(input, deps, cwd);\n}\n//#endregion\n//#region src/operations/destroy.ts\nasync function destroy(input) {\n\treturn destroyWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's RunDeps, unit\n* tests). Deliberately NOT re-exported through `./control` — the seam mirrors\n* internal types and is not part of the published surface. */\nasync function destroyWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-deploy-destroy-DfVJUICu.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"destroy\", error, cwd));\n\t}\n\treturn executor.executeDestroy(input, deps, cwd);\n}\n//#endregion\n//#region src/operations/dev.ts\nasync function dev(input) {\n\treturn devWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's RunDeps, unit\n* tests). Deliberately NOT re-exported through `./control` — the seam mirrors\n* internal types and is not part of the published surface. */\nasync function devWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-dev-BMTFWfFc.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"dev\", error, cwd));\n\t}\n\treturn executor.executeDev(input, deps, cwd);\n}\n//#endregion\n//#region src/operations/log.ts\nasync function log(input) {\n\treturn logWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's LogRunDeps,\n* unit tests). Deliberately NOT re-exported through `./control` — the seam\n* mirrors internal types and is not part of the published surface. */\nasync function logWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-log-Cay9hlKW.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"log\", error, cwd));\n\t}\n\treturn executor.executeLog(input, deps, cwd);\n}\n//#endregion\nexport { destroy as a, deployWithDeps as c, devWithDeps as i, logWithDeps as n, destroyWithDeps as o, dev as r, deploy as s, log as t };\n\n//# sourceMappingURL=log-DfT2hHqi.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,SAAS,sBAAsB,UAAU;CACxC,IAAI,MAAM;CACV,OAAO,MAAM;EACZ,MAAM,YAAY,KAAK,KAAK,KAAK,gBAAgB,SAAS;EAC1D,IAAI,GAAG,WAAW,KAAK,KAAK,WAAW,cAAc,CAAC,GAAG,OAAO;EAChE,MAAM,SAAS,KAAK,QAAQ,GAAG;EAC/B,IAAI,WAAW,KAAK,OAAO,KAAK;EAChC,MAAM;CACP;AACD;;;;;;;AAOA,SAAS,yBAAyB,YAAY;CAC7C,IAAI;CACJ,IAAI;EACH,QAAQ,cAAc,KAAK,KAAK,GAAG,aAAa,UAAU,GAAG,SAAS,CAAC,CAAC,CAAC,QAAQ,QAAQ;CAC1F,QAAQ;EACP;CACD;CACA,IAAI,MAAM,KAAK,QAAQ,KAAK;CAC5B,OAAO,CAAC,GAAG,WAAW,KAAK,KAAK,KAAK,cAAc,CAAC,GAAG;EACtD,MAAM,SAAS,KAAK,QAAQ,GAAG;EAC/B,IAAI,WAAW,KAAK,OAAO,KAAK;EAChC,MAAM;CACP;CACA,MAAM,UAAU,KAAK,MAAM,GAAG,aAAa,KAAK,KAAK,KAAK,cAAc,GAAG,OAAO,CAAC,CAAC,CAAC;CACrF,OAAO,OAAO,YAAY,WAAW,UAAU,KAAK;AACrD;;;;;;;;;;;AAWA,SAAS,sBAAsB,UAAU;CACxC,IAAI;CACJ,IAAI;EACH,eAAe,cAAc,KAAK,KAAK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S,cAAc,OAAO,MAAM,GAAG;AAC/C;AAGA,eAAe,QAAQ,OAAO;CAC7B,OAAO,gBAAgB,OAAO,CAAC,CAAC;AACjC;;;;AAIA,eAAe,gBAAgB,OAAO,MAAM;CAC3C,MAAM,MAAM,MAAM,OAAO,QAAQ,IAAI;CACrC,IAAI;CACJ,IAAI;EACH,WAAW,MAAM,OAAO;CACzB,SAAS,OAAO;EACf,OAAO,MAAM,oBAAoB,WAAW,OAAO,GAAG,CAAC;CACxD;CACA,OAAO,SAAS,eAAe,OAAO,MAAM,GAAG;AAChD;AAGA,eAAe,IAAI,OAAO;CACzB,OAAO,YAAY,OAAO,CAAC,CAAC;AAC7B;;;;AAIA,eAAe,YAAY,OAAO,MAAM;CACvC,MAAM,MAAM,MAAM,OAAO,QAAQ,IAAI;CACrC,IAAI;CACJ,IAAI;EACH,WAAW,MAAM,OAAO;CACzB,SAAS,OAAO;EACf,OAAO,MAAM,oBAAoB,OAAO,OAAO,GAAG,CAAC;CACpD;CACA,OAAO,SAAS,WAAW,OAAO,MAAM,GAAG;AAC5C;AAGA,eAAe,IAAI,OAAO;CACzB,OAAO,YAAY,OAAO,CAAC,CAAC;AAC7B;;;;AAIA,eAAe,YAAY,OAAO,MAAM;CACvC,MAAM,MAAM,MAAM,OAAO,QAAQ,IAAI;CACrC,IAAI;CACJ,IAAI;EACH,WAAW,MAAM,OAAO;CACzB,SAAS,OAAO;EACf,OAAO,MAAM,oBAAoB,OAAO,OAAO,GAAG,CAAC;CACpD;CACA,OAAO,SAAS,WAAW,OAAO,MAAM,GAAG;AAC5C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
1
|
+
import { n as BuildAdapter } from "./graph-DqklX5Sf-CdNH3lA7.mjs";
|
|
2
|
+
import "./index-DuF5iI3i.mjs";
|
|
3
3
|
//#region ../../0-framework/2-authoring/nextjs/dist/nextjs-DLyeRR7M.d.mts
|
|
4
4
|
//#region src/nextjs.d.ts
|
|
5
5
|
/** The nextjs build adapter's descriptor — `appDir` is this kind's own extra path input (the Next app root), beyond the shared `{ extension, type, module, entry }`. `entry` is a placeholder; the assembler locates `server.js` in the standalone tree. */
|
|
@@ -13,4 +13,4 @@ declare const nextjsBuild: (opts: {
|
|
|
13
13
|
}) => NextjsBuildAdapter;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { nextjsBuild as n, NextjsBuildAdapter as t };
|
|
16
|
-
//# sourceMappingURL=nextjs-DLyeRR7M-
|
|
16
|
+
//# sourceMappingURL=nextjs-DLyeRR7M-BfUbLXwr.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nextjs-DLyeRR7M-
|
|
1
|
+
{"version":3,"file":"nextjs-DLyeRR7M-BfUbLXwr.d.mts","names":[],"sources":["../../../0-framework/2-authoring/nextjs/dist/nextjs-DLyeRR7M.d.mts"],"mappings":";;;;;UAGU,2BAA2B;WAC1B;WACA;;cAEG,cAAc;EAC1B;EACA;MACI"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as Bundle,
|
|
2
|
-
import "./config-
|
|
3
|
-
import "./deploy-
|
|
4
|
-
import { t as NextjsBuildAdapter } from "./nextjs-DLyeRR7M-
|
|
1
|
+
import { a as Bundle, i as AssembleInput, p as ExtensionDescriptor } from "./app-config-aIrriqVU-D6lJHzh2.mjs";
|
|
2
|
+
import "./config-CL7Jbve2.mjs";
|
|
3
|
+
import "./deploy-CL7Jbve2.mjs";
|
|
4
|
+
import { t as NextjsBuildAdapter } from "./nextjs-DLyeRR7M-BfUbLXwr.mjs";
|
|
5
5
|
//#region ../../0-framework/2-authoring/nextjs/dist/control.d.mts
|
|
6
6
|
//#region src/control/build.d.ts
|
|
7
7
|
/** The built standalone server.js for a nextjs build — `appDir`'s standalone root plus the app subpath Next recorded. Single-sourced so `assemble()` (deploy) and the integration-test seam can't drift. */
|
package/dist/nextjs.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as nextjsBuild, t as NextjsBuildAdapter } from "./nextjs-DLyeRR7M-
|
|
1
|
+
import { n as nextjsBuild, t as NextjsBuildAdapter } from "./nextjs-DLyeRR7M-BfUbLXwr.mjs";
|
|
2
2
|
export { type NextjsBuildAdapter, nextjsBuild as default };
|
package/dist/node-control.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as Bundle,
|
|
2
|
-
import "./config-
|
|
3
|
-
import "./deploy-
|
|
1
|
+
import { a as Bundle, i as AssembleInput, p as ExtensionDescriptor } from "./app-config-aIrriqVU-D6lJHzh2.mjs";
|
|
2
|
+
import "./config-CL7Jbve2.mjs";
|
|
3
|
+
import "./deploy-CL7Jbve2.mjs";
|
|
4
4
|
//#region ../../0-framework/2-authoring/node/dist/control.d.mts
|
|
5
5
|
//#region src/control/build.d.ts
|
|
6
6
|
declare function assemble(input: AssembleInput): Promise<Bundle>;
|
package/dist/node.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
1
|
+
import { n as BuildAdapter } from "./graph-DqklX5Sf-CdNH3lA7.mjs";
|
|
2
|
+
import "./index-DuF5iI3i.mjs";
|
|
3
3
|
//#region ../../0-framework/2-authoring/node/dist/index.d.mts
|
|
4
4
|
//#region src/node.d.ts
|
|
5
5
|
/** The node build adapter's descriptor. `dir` is the directory form's own extra path input (the built tree to copy verbatim), beyond the shared `{ extension, type, module, entry }`; absent, `entry` is the whole built runnable. */
|