@prisma/composer 0.34.0 → 0.35.0-dev.2
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-BBPLNnZX-DzU21TVb.d.mts → app-config-DR7ku-WW-Dun53zka.d.mts} +75 -20
- package/dist/app-config-DR7ku-WW-Dun53zka.d.mts.map +1 -0
- package/dist/config-5sq9lPhi.d.mts +1 -0
- package/dist/config.d.mts +2 -2
- package/dist/control.d.mts +55 -34
- package/dist/control.d.mts.map +1 -1
- package/dist/control.mjs +20 -4
- package/dist/control.mjs.map +1 -1
- package/dist/deploy-5sq9lPhi.d.mts +1 -0
- package/dist/deploy.d.mts +3 -3
- package/dist/deploy.mjs +28 -1
- package/dist/deploy.mjs.map +1 -1
- package/dist/{deployment-summary-0-0eGWjc-ClB8FXcN.mjs → deployment-summary-CDHdLtnO-DrE7GsHq.mjs} +2 -2
- package/dist/{deployment-summary-0-0eGWjc-ClB8FXcN.mjs.map → deployment-summary-CDHdLtnO-DrE7GsHq.mjs.map} +1 -1
- package/dist/{deployment-summary-p88NV5m5-Ci2FsDKX.d.mts → deployment-summary-p88NV5m5-Btf0R5T3.d.mts} +3 -3
- package/dist/{deployment-summary-p88NV5m5-Ci2FsDKX.d.mts.map → deployment-summary-p88NV5m5-Btf0R5T3.d.mts.map} +1 -1
- package/dist/{dev-current-vAfxVcnD-DNeLJavU.mjs → dev-current-8HfFCN7C-C8Ste3qf.mjs} +5 -5
- package/dist/dev-current-8HfFCN7C-C8Ste3qf.mjs.map +1 -0
- package/dist/{dist-D5tj8ZhD.mjs → dist-Xd2Pp_-u.mjs} +2 -2
- package/dist/dist-Xd2Pp_-u.mjs.map +1 -0
- package/dist/{execute-deploy-destroy-CdjqjHzw-DNOFEr5H.mjs → execute-deploy-destroy-DerNHILD-BStnE2yG.mjs} +58 -33
- package/dist/execute-deploy-destroy-DerNHILD-BStnE2yG.mjs.map +1 -0
- package/dist/{execute-dev-C75Y_wIa-CBsKvWvl.mjs → execute-dev-D_JvTKjS-BjlfRv3L.mjs} +167 -38
- package/dist/execute-dev-D_JvTKjS-BjlfRv3L.mjs.map +1 -0
- package/dist/{execute-dev-current-C0y1X-EE-D6I5h2_B.mjs → execute-dev-current-BRJkR4Y1-KETGQ-7f.mjs} +8 -6
- package/dist/execute-dev-current-BRJkR4Y1-KETGQ-7f.mjs.map +1 -0
- package/dist/{execute-log-Cwa9F3BR-fhYWYzQk.mjs → execute-log-kq4gyrh9-DjAlYz6O.mjs} +5 -5
- package/dist/{execute-log-Cwa9F3BR-fhYWYzQk.mjs.map → execute-log-kq4gyrh9-DjAlYz6O.mjs.map} +1 -1
- package/dist/{graph-C4If3c5e-CVij_XGB.d.mts → graph-BmTgCiFm-qR5hnhOZ.d.mts} +8 -3
- package/dist/graph-BmTgCiFm-qR5hnhOZ.d.mts.map +1 -0
- package/dist/{graph-BPLLRt2I-m78iETnF.mjs → graph-D0ICjejE-CeQtHY5B.mjs} +23 -13
- package/dist/graph-D0ICjejE-CeQtHY5B.mjs.map +1 -0
- package/dist/http.d.mts +1 -1
- package/dist/http.mjs +2 -2
- package/dist/{index-vUfxWpWf.d.mts → index-B-9Dc0J7.d.mts} +2 -2
- package/dist/{index-vUfxWpWf.d.mts.map → index-B-9Dc0J7.d.mts.map} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/local-target.d.mts +1 -1
- package/dist/{nextjs-DLyeRR7M-Btfuot-v.d.mts → nextjs-DLyeRR7M-kVartQq-.d.mts} +2 -2
- package/dist/{nextjs-DLyeRR7M-Btfuot-v.d.mts.map → nextjs-DLyeRR7M-kVartQq-.d.mts.map} +1 -1
- package/dist/nextjs-control.d.mts +11 -5
- package/dist/nextjs-control.d.mts.map +1 -1
- package/dist/nextjs-control.mjs +50 -2
- package/dist/nextjs-control.mjs.map +1 -1
- package/dist/nextjs.d.mts +1 -1
- package/dist/node-control.d.mts +10 -4
- package/dist/node-control.d.mts.map +1 -1
- package/dist/node-control.mjs +20 -3
- package/dist/node-control.mjs.map +1 -1
- package/dist/node.d.mts +10 -1
- package/dist/node.d.mts.map +1 -1
- package/dist/node.mjs +12 -8
- package/dist/node.mjs.map +1 -1
- package/dist/{pipeline-Dpesfd2j-CD3W79W6.mjs → pipeline-BmWt-Nhb-D9Eg14Sx.mjs} +100 -21
- package/dist/pipeline-BmWt-Nhb-D9Eg14Sx.mjs.map +1 -0
- package/dist/report.d.mts +3 -3
- package/dist/report.mjs +3 -2
- package/dist/report.mjs.map +1 -1
- package/dist/{run-alchemy-BqHpStQn-sYiodM6y.mjs → run-alchemy-Dl_MWw4g-BZaLckHp.mjs} +2 -2
- package/dist/{run-alchemy-BqHpStQn-sYiodM6y.mjs.map → run-alchemy-Dl_MWw4g-BZaLckHp.mjs.map} +1 -1
- package/dist/{run-report-C2o98uD--AX8kpz4Q.mjs → run-report-CmBz2-xc-S50d4g5V.mjs} +5 -5
- package/dist/run-report-CmBz2-xc-S50d4g5V.mjs.map +1 -0
- package/dist/service-rpc.d.mts +1 -1
- package/dist/service-rpc.mjs +2 -2
- package/package.json +11 -11
- package/skills/prisma-composer-core-concepts/SKILL.md +126 -47
- package/dist/app-config-BBPLNnZX-DzU21TVb.d.mts.map +0 -1
- package/dist/config-CRHoX2Pq.d.mts +0 -1
- package/dist/deploy-CRHoX2Pq.d.mts +0 -1
- package/dist/dev-current-vAfxVcnD-DNeLJavU.mjs.map +0 -1
- package/dist/dist-D5tj8ZhD.mjs.map +0 -1
- package/dist/execute-deploy-destroy-CdjqjHzw-DNOFEr5H.mjs.map +0 -1
- package/dist/execute-dev-C75Y_wIa-CBsKvWvl.mjs.map +0 -1
- package/dist/execute-dev-current-C0y1X-EE-D6I5h2_B.mjs.map +0 -1
- package/dist/graph-BPLLRt2I-m78iETnF.mjs.map +0 -1
- package/dist/graph-C4If3c5e-CVij_XGB.d.mts.map +0 -1
- package/dist/pipeline-Dpesfd2j-CD3W79W6.mjs.map +0 -1
- package/dist/run-report-C2o98uD--AX8kpz4Q.mjs.map +0 -1
package/dist/node.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as BuildAdapter } from "./graph-types-Cegbwb_X-BU-H2pnt.mjs";
|
|
2
|
-
import "./index-
|
|
2
|
+
import "./index-B-9Dc0J7.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. */
|
|
@@ -8,6 +8,8 @@ interface NodeBuildAdapter extends BuildAdapter {
|
|
|
8
8
|
readonly dir?: string;
|
|
9
9
|
/** Whether the build inlined its packages (`'bundled'`, the default) or left them for deploy to stage from `node_modules` (`'external'`). */
|
|
10
10
|
readonly dependencies?: NodeDependencies;
|
|
11
|
+
/** The command that runs this service in development, in the authoring module's directory. Absent: the service runs its assembled artifact (ADR-0056). */
|
|
12
|
+
readonly dev?: readonly string[];
|
|
11
13
|
}
|
|
12
14
|
/**
|
|
13
15
|
* How the build treats installed packages, in bundler terms (esbuild's and
|
|
@@ -29,6 +31,13 @@ type NodeBuildOptions = ({
|
|
|
29
31
|
}) & {
|
|
30
32
|
/** `'bundled'` (default) ships exactly what was built. `'external'` also stages the installed packages `entry` imports. */
|
|
31
33
|
dependencies?: NodeDependencies;
|
|
34
|
+
/**
|
|
35
|
+
* The command `prisma dev` runs for this service instead of its built
|
|
36
|
+
* artifact, e.g. `['bun', '--watch', 'server.ts']`, in the authoring
|
|
37
|
+
* module's directory. It gets the service's environment plus `PORT` and
|
|
38
|
+
* `HOST`, and must listen on `PORT`. Absent: `prisma dev` runs the build.
|
|
39
|
+
*/
|
|
40
|
+
dev?: readonly string[];
|
|
32
41
|
};
|
|
33
42
|
declare const nodeBuild: (opts: NodeBuildOptions) => NodeBuildAdapter;
|
|
34
43
|
//#endregion
|
package/dist/node.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.mts","names":[],"sources":["../../../0-framework/2-authoring/node/dist/index.d.mts"],"mappings":";;;;;UAGU,yBAAyB;WACxB;WACA;;WAEA,eAAe;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"node.d.mts","names":[],"sources":["../../../0-framework/2-authoring/node/dist/index.d.mts"],"mappings":";;;;;UAGU,yBAAyB;WACxB;WACA;;WAEA,eAAe;;WAEf;;;;;;;;;KASN;;KAEA;EACH;EACA;EACA;;EAEA;EACA;EACA;;;EAGA,eAAe;;;;;;;EAOf;;cAEY,YAAY,MAAM,qBAAqB"}
|
package/dist/node.mjs
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
//#region ../../0-framework/2-authoring/node/dist/index.mjs
|
|
2
|
-
const nodeBuild = (opts) =>
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
2
|
+
const nodeBuild = (opts) => {
|
|
3
|
+
if (opts.dev !== void 0 && opts.dev.length === 0) throw new Error("node(): `dev` must name a command");
|
|
4
|
+
return {
|
|
5
|
+
extension: "@prisma/composer/node",
|
|
6
|
+
type: "node",
|
|
7
|
+
module: opts.module,
|
|
8
|
+
entry: opts.entry,
|
|
9
|
+
...opts.dir === void 0 ? {} : { dir: opts.dir },
|
|
10
|
+
...opts.dependencies === void 0 ? {} : { dependencies: opts.dependencies },
|
|
11
|
+
...opts.dev === void 0 ? {} : { dev: [...opts.dev] }
|
|
12
|
+
};
|
|
13
|
+
};
|
|
10
14
|
//#endregion
|
|
11
15
|
export { nodeBuild as default };
|
|
12
16
|
|
package/dist/node.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.mjs","names":[],"sources":["../../../0-framework/2-authoring/node/dist/index.mjs"],"sourcesContent":["//#region src/node.ts\nconst nodeBuild = (opts) => ({\n\textension: \"@prisma/composer/node\",\n\ttype: \"node\",\n\tmodule: opts.module,\n\tentry: opts.entry,\n\t...opts.dir === void 0 ? {} : { dir: opts.dir },\n\t...opts.dependencies === void 0 ? {} : { dependencies: opts.dependencies }\n}
|
|
1
|
+
{"version":3,"file":"node.mjs","names":[],"sources":["../../../0-framework/2-authoring/node/dist/index.mjs"],"sourcesContent":["//#region src/node.ts\nconst nodeBuild = (opts) => {\n\tif (opts.dev !== void 0 && opts.dev.length === 0) throw new Error(\"node(): `dev` must name a command\");\n\treturn {\n\t\textension: \"@prisma/composer/node\",\n\t\ttype: \"node\",\n\t\tmodule: opts.module,\n\t\tentry: opts.entry,\n\t\t...opts.dir === void 0 ? {} : { dir: opts.dir },\n\t\t...opts.dependencies === void 0 ? {} : { dependencies: opts.dependencies },\n\t\t...opts.dev === void 0 ? {} : { dev: [...opts.dev] }\n\t};\n};\n//#endregion\nexport { nodeBuild as default };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";AACA,MAAM,aAAa,SAAS;CAC3B,IAAI,KAAK,QAAQ,KAAK,KAAK,KAAK,IAAI,WAAW,GAAG,MAAM,IAAI,MAAM,mCAAmC;CACrG,OAAO;EACN,WAAW;EACX,MAAM;EACN,QAAQ,KAAK;EACb,OAAO,KAAK;EACZ,GAAG,KAAK,QAAQ,KAAK,IAAI,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI;EAC9C,GAAG,KAAK,iBAAiB,KAAK,IAAI,CAAC,IAAI,EAAE,cAAc,KAAK,aAAa;EACzE,GAAG,KAAK,QAAQ,KAAK,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE;CACpD;AACD"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { t as blindCast } from "./casts-DpaahrlC-C5XMnP9S.mjs";
|
|
2
2
|
import { t as CliStructuredError } from "./errors-0e8IVwzi.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import "./dist-
|
|
3
|
+
import { a as assertAppName, c as isNode, t as Load } from "./graph-D0ICjejE-CeQtHY5B.mjs";
|
|
4
|
+
import "./dist-Xd2Pp_-u.mjs";
|
|
5
5
|
import * as mod from "node:module";
|
|
6
6
|
import * as fs$1 from "node:fs";
|
|
7
7
|
import { existsSync } from "node:fs";
|
|
8
8
|
import * as path$1 from "node:path";
|
|
9
9
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
10
|
-
//#region ../../0-framework/3-tooling/cli/dist/composer-config-
|
|
10
|
+
//#region ../../0-framework/3-tooling/cli/dist/composer-config-ehUUVHtU.mjs
|
|
11
11
|
/**
|
|
12
12
|
* What makes a `composer` section valid, shared by the CLI's section validator and the programmatic operations.
|
|
13
13
|
* It imports nothing from the CLI engine, because `@prisma/composer` must not depend on it.
|
|
14
14
|
*/
|
|
15
|
-
const SECTION_FIX = "Write `composer: composer({ extensions: [...], state: ... })` in prisma.config.ts, with `import { defineConfig as composer } from '@prisma/composer/config'`.";
|
|
15
|
+
const SECTION_FIX = "Write `composer: composer({ entry: './module.ts', extensions: [...], state: ... })` in prisma.config.ts, with `import { defineConfig as composer } from '@prisma/composer/config'`.";
|
|
16
16
|
const MOVE_TO_SECTION_FIX = `${SECTION_FIX} If the project has a prisma-composer.config.ts, move its extensions and state into that section and delete the file.`;
|
|
17
17
|
const SECTION_IS_THE_ONLY_SOURCE = "Composer reads its configuration only from the `composer` section of prisma.config.ts.";
|
|
18
18
|
const DESCRIPTOR_FIX = "Use the descriptor the extension factory returns, unchanged, instead of building one by hand.";
|
|
@@ -70,11 +70,30 @@ const stateInvalid = {
|
|
|
70
70
|
fix: "Set `state` to the state descriptor an extension provides, e.g. `state: prismaState()`.",
|
|
71
71
|
field: "state"
|
|
72
72
|
};
|
|
73
|
+
const SECTION_FIELDS = /* @__PURE__ */ new Set([
|
|
74
|
+
"entry",
|
|
75
|
+
"extensions",
|
|
76
|
+
"state"
|
|
77
|
+
]);
|
|
78
|
+
const entryInvalid = {
|
|
79
|
+
code: "CONFIG.FIELD_INVALID",
|
|
80
|
+
summary: "`composer.entry` must be a non-empty string: the path to the module whose default export is the app.",
|
|
81
|
+
fix: "Set `entry` to that module's path, relative to prisma.config.ts, e.g. `entry: './module.ts'`.",
|
|
82
|
+
field: "entry"
|
|
83
|
+
};
|
|
84
|
+
/** Neither the section's `entry` nor an override names the module whose default export is the app. */
|
|
85
|
+
const entryMissing = {
|
|
86
|
+
code: "CONFIG.ENTRY_MISSING",
|
|
87
|
+
summary: "No entry module is set, so there is no app to load.",
|
|
88
|
+
why: "The entry is the module whose default export is the app root, built with module(...).",
|
|
89
|
+
fix: "Set `entry: './module.ts'` in the `composer` section of prisma.config.ts, or pass `--entry <path>` (the `entry` input when calling @prisma/composer/control).",
|
|
90
|
+
field: "entry"
|
|
91
|
+
};
|
|
73
92
|
function unknownField(key) {
|
|
74
93
|
return {
|
|
75
94
|
code: "CONFIG.FIELD_UNKNOWN",
|
|
76
95
|
summary: `The \`composer\` section has no field \`${key}\`.`,
|
|
77
|
-
fix: key === "composer" ? "Pass the `composer` property of the prisma.config.ts export, not the whole export. The section takes only `extensions` and `state`." : `Remove \`${key}\`. The section takes only \`extensions\` and \`state\`.`,
|
|
96
|
+
fix: key === "composer" ? "Pass the `composer` property of the prisma.config.ts export, not the whole export. The section takes only `entry`, `extensions` and `state`." : `Remove \`${key}\`. The section takes only \`entry\`, \`extensions\` and \`state\`.`,
|
|
78
97
|
field: key
|
|
79
98
|
};
|
|
80
99
|
}
|
|
@@ -144,17 +163,21 @@ function checkFields(section) {
|
|
|
144
163
|
ok: false,
|
|
145
164
|
findings: [unknownField("composer")]
|
|
146
165
|
};
|
|
147
|
-
const findings = Object.keys(section).filter((key) => key
|
|
166
|
+
const findings = Object.keys(section).filter((key) => !SECTION_FIELDS.has(key)).map(unknownField);
|
|
148
167
|
const checked = checkExtensions(section["extensions"]);
|
|
149
168
|
findings.push(...checked.findings);
|
|
150
169
|
const state = section["state"];
|
|
151
170
|
if (!isStateDescriptor(state)) findings.push(stateInvalid);
|
|
171
|
+
const entry = section["entry"];
|
|
172
|
+
const entryValid = entry === void 0 || typeof entry === "string" && entry.length > 0;
|
|
173
|
+
if (!entryValid) findings.push(entryInvalid);
|
|
152
174
|
const [first, ...rest] = findings;
|
|
153
|
-
if (first === void 0 && isStateDescriptor(state)) return {
|
|
175
|
+
if (first === void 0 && isStateDescriptor(state) && entryValid) return {
|
|
154
176
|
ok: true,
|
|
155
177
|
value: {
|
|
156
178
|
extensions: checked.extensions,
|
|
157
|
-
state
|
|
179
|
+
state,
|
|
180
|
+
...entry === void 0 ? {} : { entry }
|
|
158
181
|
}
|
|
159
182
|
};
|
|
160
183
|
return {
|
|
@@ -234,12 +257,42 @@ function buildDescriptorAssemble(config, node, address, cwd, report) {
|
|
|
234
257
|
report
|
|
235
258
|
});
|
|
236
259
|
}
|
|
237
|
-
|
|
260
|
+
/**
|
|
261
|
+
* The dev server a service's build descriptor declares, or `undefined` when it
|
|
262
|
+
* declares none — including when the registry route misses, which the
|
|
263
|
+
* assemble that follows reports with its own pinned error.
|
|
264
|
+
*/
|
|
265
|
+
async function buildDescriptorServe(config, node, address) {
|
|
266
|
+
const { extension, type } = node.build;
|
|
267
|
+
const nodeDescriptor = config.extensions.find((candidate) => candidate.id === extension)?.nodes[type];
|
|
268
|
+
if (nodeDescriptor?.kind !== "build" || nodeDescriptor.serve === void 0) return void 0;
|
|
269
|
+
try {
|
|
270
|
+
return await nodeDescriptor.serve({
|
|
271
|
+
build: node.build,
|
|
272
|
+
address
|
|
273
|
+
});
|
|
274
|
+
} catch (error) {
|
|
275
|
+
if (CliStructuredError.is(error)) throw error;
|
|
276
|
+
throw new CliStructuredError("DEV.DEV_SERVER_UNAVAILABLE", `service "${address}" cannot run its dev server: ${error instanceof Error ? error.message : String(error)}`, {
|
|
277
|
+
meta: { address },
|
|
278
|
+
cause: error
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
async function assembleServices(graph, config, cwd, run, onEvent, options = {}) {
|
|
238
283
|
const runAssembler = run ?? ((node, address, nodeCwd, report) => buildDescriptorAssemble(config, node, address, nodeCwd, report));
|
|
239
284
|
const serviceNodes = graph.nodes.filter((n) => n.node.kind === "service");
|
|
240
285
|
if (serviceNodes.length === 0) throw new AssembleError("ASSEMBLE.SERVICE_MISSING", "The loaded graph has no service to assemble.");
|
|
241
286
|
const bundles = {};
|
|
287
|
+
const devServers = {};
|
|
242
288
|
for (const { id, node } of serviceNodes) {
|
|
289
|
+
if (options.devServers === true) {
|
|
290
|
+
const server = await buildDescriptorServe(config, node, id);
|
|
291
|
+
if (server !== void 0) {
|
|
292
|
+
devServers[id] = server;
|
|
293
|
+
continue;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
243
296
|
onEvent?.({
|
|
244
297
|
kind: "service-started",
|
|
245
298
|
address: id
|
|
@@ -262,10 +315,13 @@ async function assembleServices(graph, config, cwd, run, onEvent) {
|
|
|
262
315
|
data
|
|
263
316
|
});
|
|
264
317
|
}
|
|
265
|
-
return {
|
|
318
|
+
return {
|
|
319
|
+
bundles,
|
|
320
|
+
devServers
|
|
321
|
+
};
|
|
266
322
|
}
|
|
267
323
|
//#endregion
|
|
268
|
-
//#region ../../0-framework/3-tooling/cli/dist/pipeline-
|
|
324
|
+
//#region ../../0-framework/3-tooling/cli/dist/pipeline-BmWt-Nhb.mjs
|
|
269
325
|
/**
|
|
270
326
|
* Synchronous Node resolve hook so that entry modules may import relative
|
|
271
327
|
* files using the specifier forms TypeScript accepts by default —
|
|
@@ -380,7 +436,8 @@ function explainJsxLoadError(error, entryPath) {
|
|
|
380
436
|
* service or module, branded by core's factories. Whatever this module exports
|
|
381
437
|
* IS the application; nothing else marks a root (ADR-0003).
|
|
382
438
|
*/
|
|
383
|
-
|
|
439
|
+
/** `unloadableFix`, when given, says where the path came from, so a wrong path names its source. */
|
|
440
|
+
async function loadEntry(entryArg, cwd, unloadableFix) {
|
|
384
441
|
registerEntryResolution();
|
|
385
442
|
const resolvedPath = path$1.resolve(cwd, entryArg);
|
|
386
443
|
let mod;
|
|
@@ -395,6 +452,7 @@ async function loadEntry(entryArg, cwd) {
|
|
|
395
452
|
cause: error
|
|
396
453
|
});
|
|
397
454
|
throw new CliStructuredError("COMPOSE.ENTRY_UNLOADABLE", `Failed to import entry module "${resolvedPath}": ${error instanceof Error ? error.message : String(error)}`, {
|
|
455
|
+
...unloadableFix === void 0 ? {} : { fix: unloadableFix },
|
|
398
456
|
where: { path: resolvedPath },
|
|
399
457
|
cause: error
|
|
400
458
|
});
|
|
@@ -482,6 +540,23 @@ function checkConfigSource(source, cwd) {
|
|
|
482
540
|
};
|
|
483
541
|
}
|
|
484
542
|
/**
|
|
543
|
+
* Resolves the entry module. An override (`--entry`, or an operation's `entry` input) resolves
|
|
544
|
+
* against `cwd`; the section's `entry` resolves against the directory of the file that declares it,
|
|
545
|
+
* as the CLI engine resolves path fields in prisma.config.ts.
|
|
546
|
+
*/
|
|
547
|
+
function resolveEntryPath(override, source, cwd) {
|
|
548
|
+
if (override !== void 0) return {
|
|
549
|
+
path: path$1.resolve(cwd, override),
|
|
550
|
+
fix: `Check the \`--entry\` path (the \`entry\` input when calling @prisma/composer/control) "${override}". It is relative to the current directory, ${cwd}.`
|
|
551
|
+
};
|
|
552
|
+
const configured = source.value.entry;
|
|
553
|
+
if (configured === void 0) throw configError([entryMissing], source.file);
|
|
554
|
+
return {
|
|
555
|
+
path: path$1.resolve(path$1.dirname(source.file), configured),
|
|
556
|
+
fix: `Check \`entry: "${configured}"\` in ${source.file}. It is relative to that file's directory.`
|
|
557
|
+
};
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
485
560
|
* The pipeline's front — entry load and name resolution —
|
|
486
561
|
* WITHOUT Load, coverage, or assemble. `log` needs only who the app is (its
|
|
487
562
|
* config and resolved name) to reach the already-running local instance; it
|
|
@@ -489,17 +564,20 @@ function checkConfigSource(source, cwd) {
|
|
|
489
564
|
* output the way the full pipeline does.
|
|
490
565
|
*/
|
|
491
566
|
async function resolveAppIdentity(entry, overrideName, cwd, config) {
|
|
492
|
-
const
|
|
493
|
-
const
|
|
567
|
+
const checked = checkConfigSource(config, cwd);
|
|
568
|
+
const { value } = checked;
|
|
569
|
+
const resolved = resolveEntryPath(entry, checked, cwd);
|
|
570
|
+
const entryModule = await loadEntry(resolved.path, cwd, resolved.fix);
|
|
494
571
|
const name = overrideName ?? entryModule.root.name;
|
|
495
572
|
if (name.length === 0) throw new CliStructuredError("COMPOSE.NAME_MISSING", "The root node has no name.", { fix: "Name it at authoring, or pass --name." });
|
|
573
|
+
assertAppName(name);
|
|
496
574
|
return {
|
|
497
575
|
config: value,
|
|
498
576
|
name
|
|
499
577
|
};
|
|
500
578
|
}
|
|
501
579
|
/**
|
|
502
|
-
* Runs entry load, Load, registry coverage,
|
|
580
|
+
* Runs entry load, name resolution, Load, registry coverage, and assemble — steps 1–5 of `run()`. `onAssembleError`, when
|
|
503
581
|
* given, lets a caller decorate an assemble failure with command-specific
|
|
504
582
|
* guidance (destroy's "build first" hint) without this shared step knowing
|
|
505
583
|
* about any one command.
|
|
@@ -507,16 +585,17 @@ async function resolveAppIdentity(entry, overrideName, cwd, config) {
|
|
|
507
585
|
async function runPipeline(entry, overrideName, cwd, source, deps = {}, onAssembleError) {
|
|
508
586
|
const configSource = checkConfigSource(source, cwd);
|
|
509
587
|
const config = configSource.value;
|
|
510
|
-
const
|
|
511
|
-
const
|
|
512
|
-
if (graph.root.node.kind !== "module") throw new CliStructuredError("COMPOSE.ROOT_NOT_MODULE", "The deploy root must be a module.", { fix: "Wrap your service, e.g. export default module('name', ({ provision }) => { provision(service); })." });
|
|
513
|
-
validateRegistryCoverage(graph, config);
|
|
588
|
+
const resolved = resolveEntryPath(entry, configSource, cwd);
|
|
589
|
+
const entryModule = await loadEntry(resolved.path, cwd, resolved.fix);
|
|
514
590
|
const name = overrideName ?? entryModule.root.name;
|
|
515
591
|
if (name.length === 0) throw new CliStructuredError("COMPOSE.NAME_MISSING", "The root node has no name.", { fix: "Name it at authoring, or pass --name." });
|
|
592
|
+
const graph = Load(entryModule.root, { id: name });
|
|
593
|
+
if (graph.root.node.kind !== "module") throw new CliStructuredError("COMPOSE.ROOT_NOT_MODULE", "The deploy root must be a module.", { fix: "Wrap your service, e.g. export default module('name', ({ provision }) => { provision(service); })." });
|
|
594
|
+
validateRegistryCoverage(graph, config);
|
|
516
595
|
deps.onEvent?.({ kind: "loaded" });
|
|
517
596
|
let assembled;
|
|
518
597
|
try {
|
|
519
|
-
assembled = await assembleServices(graph, config, cwd, deps.runAssembler, deps.onEvent);
|
|
598
|
+
assembled = await assembleServices(graph, config, cwd, deps.runAssembler, deps.onEvent, { devServers: deps.devServers === true });
|
|
520
599
|
} catch (error) {
|
|
521
600
|
if (onAssembleError !== void 0 && error instanceof Error) throw onAssembleError(error);
|
|
522
601
|
throw error;
|
|
@@ -532,4 +611,4 @@ async function runPipeline(entry, overrideName, cwd, source, deps = {}, onAssemb
|
|
|
532
611
|
//#endregion
|
|
533
612
|
export { noComposerExportMessage as i, resolveAppIdentity as n, runPipeline as r, checkConfigSource as t };
|
|
534
613
|
|
|
535
|
-
//# sourceMappingURL=pipeline-
|
|
614
|
+
//# sourceMappingURL=pipeline-BmWt-Nhb-D9Eg14Sx.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline-BmWt-Nhb-D9Eg14Sx.mjs","names":["fs","path","path","fs"],"sources":["../../../0-framework/3-tooling/cli/dist/composer-config-ehUUVHtU.mjs","../../../0-framework/3-tooling/assemble/dist/index.mjs","../../../0-framework/3-tooling/cli/dist/pipeline-BmWt-Nhb.mjs"],"sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\n//#region src/composer-config.ts\n/**\n* What makes a `composer` section valid, shared by the CLI's section validator and the programmatic operations.\n* It imports nothing from the CLI engine, because `@prisma/composer` must not depend on it.\n*/\nconst SECTION_FIX = \"Write `composer: composer({ entry: './module.ts', extensions: [...], state: ... })` in prisma.config.ts, with `import { defineConfig as composer } from '@prisma/composer/config'`.\";\nconst MOVE_TO_SECTION_FIX = `${SECTION_FIX} If the project has a prisma-composer.config.ts, move its extensions and state into that section and delete the file.`;\nconst SECTION_IS_THE_ONLY_SOURCE = \"Composer reads its configuration only from the `composer` section of prisma.config.ts.\";\nconst DESCRIPTOR_FIX = \"Use the descriptor the extension factory returns, unchanged, instead of building one by hand.\";\nconst RETIRED_FILE_NAMES = [\n\t\"ts\",\n\t\"mts\",\n\t\"mjs\",\n\t\"js\"\n].map((extension) => `prisma-composer.config.${extension}`);\nconst sectionMissing = {\n\tcode: \"CONFIG.SECTION_MISSING\",\n\tsummary: \"No loaded prisma.config.ts declares a `composer` section.\",\n\twhy: `${SECTION_IS_THE_ONLY_SOURCE} A prisma-composer.config.ts file is no longer read.`,\n\tfix: MOVE_TO_SECTION_FIX\n};\n/** What the generated stack file throws when the file it imports has no `composer` export. */\nfunction noComposerExportMessage(configFile) {\n\treturn `${configFile} declares no \\`composer\\` section. Pass the prisma.config.ts that declares it.`;\n}\nfunction configFileMissing(file) {\n\treturn {\n\t\tcode: \"CONFIG.FILE_MISSING\",\n\t\tsummary: `${file} does not exist.`,\n\t\tfix: \"Pass the path of the prisma.config.ts that declares the `composer` section.\",\n\t\twhere: file\n\t};\n}\n/** A prisma-composer.config.* beside the declaring file would otherwise be silently ignored. */\n/** The path with symlinks resolved; the path itself when it cannot be resolved, so the check never throws. */\nfunction realPath(file) {\n\ttry {\n\t\treturn fs.realpathSync(file);\n\t} catch {\n\t\treturn file;\n\t}\n}\nfunction retiredFileFinding(configFile) {\n\tconst directory = path.dirname(realPath(configFile));\n\tconst found = RETIRED_FILE_NAMES.map((name) => path.join(directory, name)).find((file) => fs.existsSync(file));\n\tif (found === void 0) return void 0;\n\treturn {\n\t\tcode: \"CONFIG.FILE_RETIRED\",\n\t\tsummary: `${found} is no longer read.`,\n\t\twhy: SECTION_IS_THE_ONLY_SOURCE,\n\t\tfix: MOVE_TO_SECTION_FIX,\n\t\twhere: found\n\t};\n}\nfunction isObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction isExtensionDescriptor(value) {\n\treturn isObject(value) && typeof value[\"id\"] === \"string\" && value[\"id\"].length > 0 && isObject(value[\"nodes\"]);\n}\nfunction isStateDescriptor(value) {\n\treturn isObject(value) && typeof value[\"extension\"] === \"string\" && typeof value[\"create\"] === \"function\";\n}\nconst stateInvalid = {\n\tcode: \"CONFIG.FIELD_INVALID\",\n\tsummary: \"`composer.state` must be a state descriptor with a string `extension` and a `create` function.\",\n\tfix: \"Set `state` to the state descriptor an extension provides, e.g. `state: prismaState()`.\",\n\tfield: \"state\"\n};\nconst SECTION_FIELDS = /* @__PURE__ */ new Set([\n\t\"entry\",\n\t\"extensions\",\n\t\"state\"\n]);\nconst entryInvalid = {\n\tcode: \"CONFIG.FIELD_INVALID\",\n\tsummary: \"`composer.entry` must be a non-empty string: the path to the module whose default export is the app.\",\n\tfix: \"Set `entry` to that module's path, relative to prisma.config.ts, e.g. `entry: './module.ts'`.\",\n\tfield: \"entry\"\n};\n/** Neither the section's `entry` nor an override names the module whose default export is the app. */\nconst entryMissing = {\n\tcode: \"CONFIG.ENTRY_MISSING\",\n\tsummary: \"No entry module is set, so there is no app to load.\",\n\twhy: \"The entry is the module whose default export is the app root, built with module(...).\",\n\tfix: \"Set `entry: './module.ts'` in the `composer` section of prisma.config.ts, or pass `--entry <path>` (the `entry` input when calling @prisma/composer/control).\",\n\tfield: \"entry\"\n};\nfunction unknownField(key) {\n\treturn {\n\t\tcode: \"CONFIG.FIELD_UNKNOWN\",\n\t\tsummary: `The \\`composer\\` section has no field \\`${key}\\`.`,\n\t\tfix: key === \"composer\" ? \"Pass the `composer` property of the prisma.config.ts export, not the whole export. The section takes only `entry`, `extensions` and `state`.\" : `Remove \\`${key}\\`. The section takes only \\`entry\\`, \\`extensions\\` and \\`state\\`.`,\n\t\tfield: key\n\t};\n}\nfunction checkExtensions(value) {\n\tif (!Array.isArray(value)) return {\n\t\textensions: [],\n\t\tfindings: [{\n\t\t\tcode: \"CONFIG.FIELD_INVALID\",\n\t\t\tsummary: \"`composer.extensions` must be an array of extension descriptors.\",\n\t\t\tfix: \"Set `extensions` to the descriptors your extensions provide, e.g. `extensions: [nodeBuild()]`.\",\n\t\t\tfield: \"extensions\"\n\t\t}]\n\t};\n\tconst findings = [];\n\tconst extensions = [];\n\tconst seen = /* @__PURE__ */ new Set();\n\tfor (const [index, entry] of value.entries()) {\n\t\tconst field = `extensions[${index}]`;\n\t\tif (!isObject(entry)) {\n\t\t\tfindings.push({\n\t\t\t\tcode: \"CONFIG.FIELD_INVALID\",\n\t\t\t\tsummary: `\\`composer.${field}\\` must be an extension descriptor object.`,\n\t\t\t\tfix: \"Put the descriptor an extension factory returns here, e.g. `nodeBuild()`, not the factory itself.\",\n\t\t\t\tfield\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst id = entry[\"id\"];\n\t\tif (typeof id !== \"string\" || id.length === 0) findings.push({\n\t\t\tcode: \"CONFIG.FIELD_INVALID\",\n\t\t\tsummary: `\\`composer.${field}.id\\` must be a non-empty string (the extension package name).`,\n\t\t\tfix: DESCRIPTOR_FIX,\n\t\t\tfield: `${field}.id`\n\t\t});\n\t\telse if (seen.has(id)) findings.push({\n\t\t\tcode: \"CONFIG.EXTENSION_DUPLICATE\",\n\t\t\tsummary: `Extension \"${id}\" is listed more than once in \\`composer.extensions\\`.`,\n\t\t\tfix: `Remove the repeated \"${id}\" entry from \\`extensions\\`.`,\n\t\t\tfield: `${field}.id`\n\t\t});\n\t\telse seen.add(id);\n\t\tif (!isObject(entry[\"nodes\"])) findings.push({\n\t\t\tcode: \"CONFIG.FIELD_INVALID\",\n\t\t\tsummary: `\\`composer.${field}.nodes\\` must be an object (the node-ID → control registry).`,\n\t\t\tfix: DESCRIPTOR_FIX,\n\t\t\tfield: `${field}.nodes`\n\t\t});\n\t\tif (isExtensionDescriptor(entry)) extensions.push(entry);\n\t}\n\treturn {\n\t\tfindings,\n\t\textensions\n\t};\n}\nfunction checkFields(section) {\n\tif (Object.hasOwn(section, \"configPath\")) return {\n\t\tok: false,\n\t\tfindings: [{\n\t\t\tcode: \"CONFIG.FIELD_RETIRED\",\n\t\t\tsummary: \"`composer.configPath` is no longer supported: prisma-composer.config.ts is no longer read.\",\n\t\t\twhy: SECTION_IS_THE_ONLY_SOURCE,\n\t\t\tfix: `Replace \\`configPath\\` with the section itself. ${MOVE_TO_SECTION_FIX}`,\n\t\t\tfield: \"configPath\"\n\t\t}]\n\t};\n\tif (Object.hasOwn(section, \"composer\")) return {\n\t\tok: false,\n\t\tfindings: [unknownField(\"composer\")]\n\t};\n\tconst findings = Object.keys(section).filter((key) => !SECTION_FIELDS.has(key)).map(unknownField);\n\tconst checked = checkExtensions(section[\"extensions\"]);\n\tfindings.push(...checked.findings);\n\tconst state = section[\"state\"];\n\tif (!isStateDescriptor(state)) findings.push(stateInvalid);\n\tconst entry = section[\"entry\"];\n\tconst entryValid = entry === void 0 || typeof entry === \"string\" && entry.length > 0;\n\tif (!entryValid) findings.push(entryInvalid);\n\tconst [first, ...rest] = findings;\n\tif (first === void 0 && isStateDescriptor(state) && entryValid) return {\n\t\tok: true,\n\t\tvalue: {\n\t\t\textensions: checked.extensions,\n\t\t\tstate,\n\t\t\t...entry === void 0 ? {} : { entry }\n\t\t}\n\t};\n\treturn {\n\t\tok: false,\n\t\tfindings: [first ?? stateInvalid, ...rest]\n\t};\n}\n/**\n* Checks the fields that identify each descriptor and returns the descriptors as the config file's own objects.\n* Never throws: a section's values are user code, and a throwing getter or Proxy trap becomes a finding.\n*/\nfunction checkComposerSection(raw) {\n\tif (!isObject(raw)) return {\n\t\tok: false,\n\t\tfindings: [{\n\t\t\tcode: \"CONFIG.FIELD_INVALID\",\n\t\t\tsummary: \"The `composer` section of prisma.config.ts must be an object.\",\n\t\t\tfix: SECTION_FIX\n\t\t}]\n\t};\n\ttry {\n\t\treturn checkFields({ ...raw });\n\t} catch (cause) {\n\t\treturn {\n\t\t\tok: false,\n\t\t\tfindings: [{\n\t\t\t\tcode: \"CONFIG.FIELD_INVALID\",\n\t\t\t\tsummary: \"The `composer` section of prisma.config.ts could not be read.\",\n\t\t\t\twhy: `Reading it threw: ${cause instanceof Error ? cause.message : String(cause)}`,\n\t\t\t\tfix: SECTION_FIX\n\t\t\t}]\n\t\t};\n\t}\n}\n/**\n* The whole check, shared by the section validator and the programmatic operations so both report the same findings in the same order: the retired file beside the declaring `configFile` (resolved through symlinks), then every field finding.\n*/\nfunction checkComposerConfig(raw, configFile) {\n\tconst retired = retiredFileFinding(configFile);\n\tconst checked = checkComposerSection(raw);\n\tif (retired === void 0) return checked;\n\treturn {\n\t\tok: false,\n\t\tfindings: checked.ok ? [retired] : [retired, ...checked.findings]\n\t};\n}\n//#endregion\nexport { sectionMissing as a, noComposerExportMessage as i, configFileMissing as n, entryMissing as r, checkComposerConfig as t };\n\n//# sourceMappingURL=composer-config-ehUUVHtU.mjs.map","import { CliStructuredError } from \"@internal/foundation/errors\";\n//#region src/assemble-error.ts\n/**\n* A user-facing assembly failure, structured at origin (base-type rule 6):\n* a `CliStructuredError` whose code names which way assembly went wrong.\n* This package's second consumer is the programmatic deploy API, not just\n* the CLI — hosts branch on `error.code`, the CLI renders the envelope.\n*/\nvar AssembleError = class extends CliStructuredError {\n\tconstructor(code, summary, options) {\n\t\tsuper(code, summary, options);\n\t}\n};\n//#endregion\n//#region src/assemble-services.ts\n/**\n* The registry route for one service's build: extension by\n* `build.extension`, node descriptor by `build.type`, kind must be \"build\".\n* The CLI's coverage validation reports the same misses earlier with the\n* config fix; these errors are the backstop for programmatic callers.\n*/\nfunction buildDescriptorAssemble(config, node, address, cwd, report) {\n\tconst { extension, type } = node.build;\n\tconst extensionDescriptor = config.extensions.find((candidate) => candidate.id === extension);\n\tif (extensionDescriptor === void 0) throw new AssembleError(\"ASSEMBLE.EXTENSION_MISSING\", `No extension \"${extension}\" is configured (needed by service \"${node.name}\"'s build).`, { fix: \"Add it to `extensions` in the `composer` section of prisma.config.ts.\" });\n\tconst nodeDescriptor = extensionDescriptor.nodes[type];\n\tif (nodeDescriptor === void 0) throw new AssembleError(\"ASSEMBLE.DESCRIPTOR_MISSING\", `Extension \"${extension}\" has no descriptor for build type \"${type}\".`, { why: `Known types: ${Object.keys(extensionDescriptor.nodes).join(\", \")}.` });\n\tif (nodeDescriptor.kind !== \"build\") throw new AssembleError(\"ASSEMBLE.DESCRIPTOR_KIND_MISMATCH\", `Extension \"${extension}\"'s descriptor for type \"${type}\" is a \"${nodeDescriptor.kind}\" descriptor.`, { why: \"Assembling a service build needs a \\\"build\\\" descriptor.\" });\n\treturn nodeDescriptor.assemble({\n\t\tbuild: node.build,\n\t\taddress,\n\t\tcwd,\n\t\treport\n\t});\n}\n/**\n* The dev server a service's build descriptor declares, or `undefined` when it\n* declares none — including when the registry route misses, which the\n* assemble that follows reports with its own pinned error.\n*/\nasync function buildDescriptorServe(config, node, address) {\n\tconst { extension, type } = node.build;\n\tconst nodeDescriptor = config.extensions.find((candidate) => candidate.id === extension)?.nodes[type];\n\tif (nodeDescriptor?.kind !== \"build\" || nodeDescriptor.serve === void 0) return void 0;\n\ttry {\n\t\treturn await nodeDescriptor.serve({\n\t\t\tbuild: node.build,\n\t\t\taddress\n\t\t});\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) throw error;\n\t\tthrow new CliStructuredError(\"DEV.DEV_SERVER_UNAVAILABLE\", `service \"${address}\" cannot run its dev server: ${error instanceof Error ? error.message : String(error)}`, {\n\t\t\tmeta: { address },\n\t\t\tcause: error\n\t\t});\n\t}\n}\nasync function assembleServices(graph, config, cwd, run, onEvent, options = {}) {\n\tconst runAssembler = run ?? ((node, address, nodeCwd, report) => buildDescriptorAssemble(config, node, address, nodeCwd, report));\n\tconst serviceNodes = graph.nodes.filter((n) => n.node.kind === \"service\");\n\tif (serviceNodes.length === 0) throw new AssembleError(\"ASSEMBLE.SERVICE_MISSING\", \"The loaded graph has no service to assemble.\");\n\tconst bundles = {};\n\tconst devServers = {};\n\tfor (const { id, node } of serviceNodes) {\n\t\tif (options.devServers === true) {\n\t\t\tconst server = await buildDescriptorServe(config, node, id);\n\t\t\tif (server !== void 0) {\n\t\t\t\tdevServers[id] = server;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tonEvent?.({\n\t\t\tkind: \"service-started\",\n\t\t\taddress: id\n\t\t});\n\t\tconst data = {};\n\t\tlet artifact;\n\t\ttry {\n\t\t\tartifact = await runAssembler(node, id, cwd, (reported) => Object.assign(data, reported));\n\t\t} catch (error) {\n\t\t\tif (CliStructuredError.is(error)) throw error;\n\t\t\tthrow new AssembleError(\"ASSEMBLE.BUILD_FAILED\", error instanceof Error ? error.message : String(error), {\n\t\t\t\tmeta: { address: id },\n\t\t\t\tcause: error\n\t\t\t});\n\t\t}\n\t\tbundles[id] = artifact;\n\t\tonEvent?.({\n\t\t\tkind: \"service-assembled\",\n\t\t\taddress: id,\n\t\t\tdata\n\t\t});\n\t}\n\treturn {\n\t\tbundles,\n\t\tdevServers\n\t};\n}\n//#endregion\nexport { AssembleError, assembleServices };\n\n//# sourceMappingURL=index.mjs.map","import { n as configFileMissing, r as entryMissing, t as checkComposerConfig } from \"./composer-config-ehUUVHtU.mjs\";\nimport * as mod from \"node:module\";\nimport * as fs from \"node:fs\";\nimport { existsSync } from \"node:fs\";\nimport * as path from \"node:path\";\nimport { assembleServices } from \"@internal/assemble\";\nimport { Load, assertAppName, isNode } from \"@internal/core\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport { fileURLToPath, pathToFileURL } from \"node:url\";\nimport { blindCast } from \"@internal/foundation/casts\";\n//#region src/entry-resolution.ts\n/**\n* Synchronous Node resolve hook so that entry modules may import relative\n* files using the specifier forms TypeScript accepts by default —\n* extensionless `./service` and `./service.js` for a `.ts` source file —\n* without requiring `allowImportingTsExtensions` in every consumer's tsconfig.\n*\n* Resolution only; uses TypeScript's own documented mapping: for a specifier\n* Node could not resolve, strip any JS-family extension and probe the\n* corresponding TypeScript source; first candidate that exists on disk wins.\n* Format-specific rules: `.mjs` → `.mts`; `.cjs` → `.cts`; `.js` and\n* extensionless → `.ts`, `.mts`, `.tsx`, then `./index.ts`. Bare and package\n* specifiers are never touched. Existing `./x.ts` imports keep working —\n* Node resolves them before the hook fires (ADR-0005: no transform, no\n* guessing, deterministic TypeScript rule).\n*\n* Bun resolves `./x.js` and `./x` to `x.ts` natively, so the hook is a\n* no-op under Bun. Nothing is registered there.\n*/\nlet registered = false;\n/**\n* Registers the resolve hook once (idempotent). Call at the start of\n* `loadEntry` so every module in the entry graph benefits, including those\n* imported lazily after the entry itself loads.\n*/\nfunction registerEntryResolution() {\n\tif (registered || typeof process.versions.bun === \"string\") return;\n\tif (typeof mod.registerHooks !== \"function\") return;\n\tregistered = true;\n\tmod.registerHooks({ resolve(specifier, context, nextResolve) {\n\t\ttry {\n\t\t\treturn nextResolve(specifier, context);\n\t\t} catch (error) {\n\t\t\tif (!isRelativeSpecifier(specifier) || context.parentURL === void 0 || !isModuleNotFoundError(error)) throw error;\n\t\t\tfor (const candidate of sourceCandidates(new URL(specifier, context.parentURL))) if (existsSync(fileURLToPath(candidate))) return nextResolve(candidate.href, context);\n\t\t\tthrow error;\n\t\t}\n\t} });\n}\n/**\n* TypeScript's extension mapping: for a JS-family or extensionless URL,\n* produce the source candidates to probe. Format-specific: `.mjs` maps only\n* to `.mts`; `.cjs` maps only to `.cts`; `.js` and extensionless probe\n* `.ts`, `.mts`, `.tsx` (keeping `.tsx` so the JSX diagnostic fires), then\n* `./index.ts`.\n*/\nfunction sourceCandidates(resolved) {\n\tconst href = resolved.href;\n\tif (href.endsWith(\".mjs\")) {\n\t\tconst base = href.slice(0, -4);\n\t\treturn [new URL(`${base}.mts`)];\n\t}\n\tif (href.endsWith(\".cjs\")) {\n\t\tconst base = href.slice(0, -4);\n\t\treturn [new URL(`${base}.cts`)];\n\t}\n\tconst base = href.endsWith(\".js\") ? href.slice(0, -3) : href;\n\treturn [\n\t\tnew URL(`${base}.ts`),\n\t\tnew URL(`${base}.mts`),\n\t\tnew URL(`${base}.tsx`),\n\t\tnew URL(`${base}/index.ts`)\n\t];\n}\nfunction isRelativeSpecifier(specifier) {\n\treturn specifier.startsWith(\"./\") || specifier.startsWith(\"../\");\n}\nfunction isModuleNotFoundError(error) {\n\tif (!(error instanceof Error)) return false;\n\tif (!(\"code\" in error)) return false;\n\treturn error.code === \"ERR_MODULE_NOT_FOUND\";\n}\n//#endregion\n//#region src/jsx-load-error.ts\n/**\n* `loadEntry` imports a user's topology with the host runtime's own module\n* loader — under node (the CLI's shebang runtime), that loader strips\n* TypeScript types but has no JSX transform (ADR-0005: the framework\n* doesn't bundle or transform the app's code; deploy loading is no\n* exception). A `.tsx`/`.jsx` file anywhere in the topology's import graph\n* dies with node's raw `ERR_UNKNOWN_FILE_EXTENSION`, which names the file\n* but not the cause or the fix. This turns that one case into structured\n* error parts (summary/why/fix) that do — every other load failure (syntax\n* errors, missing files, non-JSX unknown extensions) is untouched.\n*/\nconst UNKNOWN_EXTENSION_CODE = \"ERR_UNKNOWN_FILE_EXTENSION\";\nconst JSX_EXTENSIONS = [\".tsx\", \".jsx\"];\nfunction errorCode(error) {\n\treturn \"code\" in error && typeof error.code === \"string\" ? error.code : void 0;\n}\nfunction unknownExtensionPath(error) {\n\tif (!(error instanceof Error)) return void 0;\n\tif (errorCode(error) !== UNKNOWN_EXTENSION_CODE) return void 0;\n\treturn /Unknown file extension \"\\.\\w+\" for (.+)$/.exec(error.message)?.[1];\n}\n/**\n* Returns structured error parts when `error` is node's\n* `ERR_UNKNOWN_FILE_EXTENSION` for a `.tsx`/`.jsx` file — `undefined` for\n* every other error (including unknown-extension failures for some other\n* extension), so the caller can fall through to its normal rethrow.\n*/\nfunction explainJsxLoadError(error, entryPath) {\n\tconst offendingPath = unknownExtensionPath(error);\n\tif (offendingPath === void 0) return void 0;\n\tif (!JSX_EXTENSIONS.some((ext) => offendingPath.endsWith(ext))) return void 0;\n\treturn {\n\t\tsummary: `\"${offendingPath}\" can't be loaded.`,\n\t\twhy: `deploy loads \"${entryPath}\"'s topology with node's own module loader, which strips TypeScript types but has no JSX transform — so a .tsx/.jsx file can't sit anywhere in that import graph.`,\n\t\tfix: \"Precompile that file in your own build (transform the JSX away, keep the real npm packages external) and import the compiled output instead of the raw .tsx/.jsx — see examples/email/scripts/build.ts in the prisma/composer repo for a worked example.\"\n\t};\n}\n//#endregion\n//#region src/load-entry.ts\n/**\n* Pipeline step 1 (deploy-cli.md § The pipeline): import the entry module\n* (resolved against cwd) and require its default export to be a node — a\n* service or module, branded by core's factories. Whatever this module exports\n* IS the application; nothing else marks a root (ADR-0003).\n*/\n/** `unloadableFix`, when given, says where the path came from, so a wrong path names its source. */\nasync function loadEntry(entryArg, cwd, unloadableFix) {\n\tregisterEntryResolution();\n\tconst resolvedPath = path.resolve(cwd, entryArg);\n\tlet mod;\n\ttry {\n\t\tmod = await import(pathToFileURL(resolvedPath).href);\n\t} catch (error) {\n\t\tconst explained = explainJsxLoadError(error, resolvedPath);\n\t\tif (explained !== void 0) throw new CliStructuredError(\"COMPOSE.ENTRY_UNLOADABLE\", explained.summary, {\n\t\t\twhy: explained.why,\n\t\t\tfix: explained.fix,\n\t\t\twhere: { path: resolvedPath },\n\t\t\tcause: error\n\t\t});\n\t\tthrow new CliStructuredError(\"COMPOSE.ENTRY_UNLOADABLE\", `Failed to import entry module \"${resolvedPath}\": ${error instanceof Error ? error.message : String(error)}`, {\n\t\t\t...unloadableFix === void 0 ? {} : { fix: unloadableFix },\n\t\t\twhere: { path: resolvedPath },\n\t\t\tcause: error\n\t\t});\n\t}\n\tconst root = blindCast(mod).default;\n\tif (!isNode(root) || root.kind === \"dependency\" || root.kind === \"resource\") throw new CliStructuredError(\"COMPOSE.ENTRY_EXPORT_INVALID\", `Entry module \"${resolvedPath}\" must default-export a node (a service or a module).`, {\n\t\tfix: \"Construct it with service() or module() from @prisma/composer.\",\n\t\twhere: { path: resolvedPath }\n\t});\n\treturn {\n\t\tpath: resolvedPath,\n\t\troot: blindCast(root)\n\t};\n}\n//#endregion\n//#region src/validate-coverage.ts\nfunction lookup(extensions, extension, type, expectedKind, what) {\n\tconst ext = extensions.get(extension);\n\tif (ext === void 0) throw new CliStructuredError(\"CONFIG.EXTENSION_MISSING\", `No extension \"${extension}\" is configured (needed by ${what}).`, {\n\t\tfix: \"Add it to `extensions` in the `composer` section of prisma.config.ts (import its /control entry and list its descriptor).\",\n\t\tmeta: {\n\t\t\textension,\n\t\t\ttype\n\t\t}\n\t});\n\tconst descriptor = ext.nodes[type];\n\tif (descriptor === void 0) throw new CliStructuredError(\"CONFIG.DESCRIPTOR_MISSING\", `Extension \"${extension}\" has no descriptor for node type \"${type}\" (needed by ${what}).`, {\n\t\twhy: `Known types: ${Object.keys(ext.nodes).join(\", \")}.`,\n\t\tmeta: {\n\t\t\textension,\n\t\t\ttype\n\t\t}\n\t});\n\tif (descriptor.kind !== expectedKind) throw new CliStructuredError(\"CONFIG.DESCRIPTOR_KIND_MISMATCH\", `Extension \"${extension}\"'s descriptor for node type \"${type}\" is a \"${descriptor.kind}\" descriptor — ${what} needs a \"${expectedKind}\" descriptor.`, { meta: {\n\t\textension,\n\t\ttype,\n\t\tkind: descriptor.kind\n\t} });\n}\n/** Throws a structured CONFIG.* error on the first uncovered `(extension, type)`; silent when the config covers the whole graph. */\nfunction validateRegistryCoverage(graph, config) {\n\tconst extensions = new Map(config.extensions.map((descriptor) => [descriptor.id, descriptor]));\n\tfor (const { id, node } of graph.nodes) {\n\t\tif (node.kind === \"resource\") {\n\t\t\tlookup(extensions, node.extension, node.type, \"resource\", `resource node \"${id}\"`);\n\t\t\tcontinue;\n\t\t}\n\t\tif (node.kind !== \"service\") continue;\n\t\tlookup(extensions, node.extension, node.type, \"service\", `service node \"${id}\"`);\n\t\tlookup(extensions, node.build.extension, node.build.type, \"build\", `service node \"${id}\"'s build descriptor`);\n\t}\n}\n//#endregion\n//#region src/pipeline.ts\n/**\n* The shared prefix of `deploy`/`destroy`/`dev` (deploy-cli.md § The\n* pipeline; local-dev spec § 6): entry load, Load,\n* registry coverage validation, name resolution, assemble. Deploy and dev\n* diverge after this — deploy resolves containers/preflight/stack file\n* against the hosted providers, dev against the local ones — so everything\n* up to and including assemble lives here once, consumed verbatim by both\n* `run()` (main.ts) and `runDev()` (dev/run-dev.ts), so the two pipelines\n* cannot drift.\n*/\nfunction configError(findings, file) {\n\tconst [first] = findings;\n\treturn new CliStructuredError(first.code, first.summary, {\n\t\t...first.why === void 0 ? {} : { why: first.why },\n\t\tfix: first.fix,\n\t\twhere: { path: first.where ?? file },\n\t\tmeta: {\n\t\t\t...first.field === void 0 ? {} : { field: first.field },\n\t\t\tfindings\n\t\t}\n\t});\n}\n/**\n* Refuses a caller's config with the same findings, in the same order, as the CLI's section validator.\n* The error is the first finding and carries all of them in `meta.findings`. Returns the config with `file` resolved against `cwd`.\n*/\nfunction checkConfigSource(source, cwd) {\n\tconst file = path.resolve(cwd, source.file);\n\tif (!fs.existsSync(file)) throw configError([configFileMissing(file)], file);\n\tconst checked = checkComposerConfig(source.value, file);\n\tif (!checked.ok) throw configError(checked.findings, file);\n\treturn {\n\t\tvalue: checked.value,\n\t\tfile\n\t};\n}\n/**\n* Resolves the entry module. An override (`--entry`, or an operation's `entry` input) resolves\n* against `cwd`; the section's `entry` resolves against the directory of the file that declares it,\n* as the CLI engine resolves path fields in prisma.config.ts.\n*/\nfunction resolveEntryPath(override, source, cwd) {\n\tif (override !== void 0) return {\n\t\tpath: path.resolve(cwd, override),\n\t\tfix: `Check the \\`--entry\\` path (the \\`entry\\` input when calling @prisma/composer/control) \"${override}\". It is relative to the current directory, ${cwd}.`\n\t};\n\tconst configured = source.value.entry;\n\tif (configured === void 0) throw configError([entryMissing], source.file);\n\treturn {\n\t\tpath: path.resolve(path.dirname(source.file), configured),\n\t\tfix: `Check \\`entry: \"${configured}\"\\` in ${source.file}. It is relative to that file's directory.`\n\t};\n}\n/**\n* The pipeline's front — entry load and name resolution —\n* WITHOUT Load, coverage, or assemble. `log` needs only who the app is (its\n* config and resolved name) to reach the already-running local instance; it\n* neither builds nor provisions, so it must not require the user's built\n* output the way the full pipeline does.\n*/\nasync function resolveAppIdentity(entry, overrideName, cwd, config) {\n\tconst checked = checkConfigSource(config, cwd);\n\tconst { value } = checked;\n\tconst resolved = resolveEntryPath(entry, checked, cwd);\n\tconst entryModule = await loadEntry(resolved.path, cwd, resolved.fix);\n\tconst name = overrideName ?? entryModule.root.name;\n\tif (name.length === 0) throw new CliStructuredError(\"COMPOSE.NAME_MISSING\", \"The root node has no name.\", { fix: \"Name it at authoring, or pass --name.\" });\n\tassertAppName(name);\n\treturn {\n\t\tconfig: value,\n\t\tname\n\t};\n}\n/**\n* Runs entry load, name resolution, Load, registry coverage, and assemble — steps 1–5 of `run()`. `onAssembleError`, when\n* given, lets a caller decorate an assemble failure with command-specific\n* guidance (destroy's \"build first\" hint) without this shared step knowing\n* about any one command.\n*/\nasync function runPipeline(entry, overrideName, cwd, source, deps = {}, onAssembleError) {\n\tconst configSource = checkConfigSource(source, cwd);\n\tconst config = configSource.value;\n\tconst resolved = resolveEntryPath(entry, configSource, cwd);\n\tconst entryModule = await loadEntry(resolved.path, cwd, resolved.fix);\n\tconst name = overrideName ?? entryModule.root.name;\n\tif (name.length === 0) throw new CliStructuredError(\"COMPOSE.NAME_MISSING\", \"The root node has no name.\", { fix: \"Name it at authoring, or pass --name.\" });\n\tconst graph = Load(entryModule.root, { id: name });\n\tif (graph.root.node.kind !== \"module\") throw new CliStructuredError(\"COMPOSE.ROOT_NOT_MODULE\", \"The deploy root must be a module.\", { fix: \"Wrap your service, e.g. export default module('name', ({ provision }) => { provision(service); }).\" });\n\tvalidateRegistryCoverage(graph, config);\n\tdeps.onEvent?.({ kind: \"loaded\" });\n\tlet assembled;\n\ttry {\n\t\tassembled = await assembleServices(graph, config, cwd, deps.runAssembler, deps.onEvent, { devServers: deps.devServers === true });\n\t} catch (error) {\n\t\tif (onAssembleError !== void 0 && error instanceof Error) throw onAssembleError(error);\n\t\tthrow error;\n\t}\n\treturn {\n\t\tconfigSource,\n\t\tentryModule,\n\t\tgraph,\n\t\tname,\n\t\tassembled\n\t};\n}\n//#endregion\nexport { resolveAppIdentity as n, runPipeline as r, checkConfigSource as t };\n\n//# sourceMappingURL=pipeline-BmWt-Nhb.mjs.map"],"mappings":";;;;;;;;;;;;;;AAOA,MAAM,cAAc;AACpB,MAAM,sBAAsB,GAAG,YAAY;AAC3C,MAAM,6BAA6B;AACnC,MAAM,iBAAiB;AACvB,MAAM,qBAAqB;CAC1B;CACA;CACA;CACA;AACD,CAAC,CAAC,KAAK,cAAc,0BAA0B,WAAW;;AAQ1D,SAAS,wBAAwB,YAAY;CAC5C,OAAO,GAAG,WAAW;AACtB;AACA,SAAS,kBAAkB,MAAM;CAChC,OAAO;EACN,MAAM;EACN,SAAS,GAAG,KAAK;EACjB,KAAK;EACL,OAAO;CACR;AACD;;;AAGA,SAAS,SAAS,MAAM;CACvB,IAAI;EACH,OAAOA,KAAG,aAAa,IAAI;CAC5B,QAAQ;EACP,OAAO;CACR;AACD;AACA,SAAS,mBAAmB,YAAY;CACvC,MAAM,YAAYC,OAAK,QAAQ,SAAS,UAAU,CAAC;CACnD,MAAM,QAAQ,mBAAmB,KAAK,SAASA,OAAK,KAAK,WAAW,IAAI,CAAC,CAAC,CAAC,MAAM,SAASD,KAAG,WAAW,IAAI,CAAC;CAC7G,IAAI,UAAU,KAAK,GAAG,OAAO,KAAK;CAClC,OAAO;EACN,MAAM;EACN,SAAS,GAAG,MAAM;EAClB,KAAK;EACL,KAAK;EACL,OAAO;CACR;AACD;AACA,SAAS,SAAS,OAAO;CACxB,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC3E;AACA,SAAS,sBAAsB,OAAO;CACrC,OAAO,SAAS,KAAK,KAAK,OAAO,MAAM,UA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J,cAAc,IAAI;CAClB,OAAO;EACN,QAAQ;EACR;CACD;AACD;;;;;;;AAOA,eAAe,YAAY,OAAO,cAAc,KAAK,QAAQ,OAAO,CAAC,GAAG,iBAAiB;CACxF,MAAM,eAAe,kBAAkB,QAAQ,GAAG;CAClD,MAAM,SAAS,aAAa;CAC5B,MAAM,WAAW,iBAAiB,OAAO,cAAc,GAAG;CAC1D,MAAM,cAAc,MAAM,UAAU,SAAS,MAAM,KAAK,SAAS,GAAG;CACpE,MAAM,OAAO,gBAAgB,YAAY,KAAK;CAC9C,IAAI,KAAK,WAAW,GAAG,MAAM,IAAI,mBAAmB,wBAAwB,8BAA8B,EAAE,KAAK,wCAAwC,CAAC;CAC1J,MAAM,QAAQ,KAAK,YAAY,MAAM,EAAE,IAAI,KAAK,CAAC;CACjD,IAAI,MAAM,KAAK,KAAK,SAAS,UAAU,MAAM,IAAI,mBAAmB,2BAA2B,qCAAqC,EAAE,KAAK,qGAAqG,CAAC;CACjP,yBAAyB,OAAO,MAAM;CACtC,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;CACjC,IAAI;CACJ,IAAI;EACH,YAAY,MAAM,iBAAiB,OAAO,QAAQ,KAAK,KAAK,cAAc,KAAK,SAAS,EAAE,YAAY,KAAK,eAAe,KAAK,CAAC;CACjI,SAAS,OAAO;EACf,IAAI,oBAAoB,KAAK,KAAK,iBAAiB,OAAO,MAAM,gBAAgB,KAAK;EACrF,MAAM;CACP;CACA,OAAO;EACN;EACA;EACA;EACA;EACA;CACD;AACD"}
|
package/dist/report.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as DeploymentResult } from "./app-config-
|
|
2
|
-
import "./deploy-
|
|
3
|
-
import { r as captureEngineFailure } from "./deployment-summary-p88NV5m5-
|
|
1
|
+
import { f as DeploymentResult } from "./app-config-DR7ku-WW-Dun53zka.mjs";
|
|
2
|
+
import "./deploy-5sq9lPhi.mjs";
|
|
3
|
+
import { r as captureEngineFailure } from "./deployment-summary-p88NV5m5-Btf0R5T3.mjs";
|
|
4
4
|
//#region ../../0-framework/3-tooling/cli/dist/report.d.mts
|
|
5
5
|
//#region src/render-deployment.d.ts
|
|
6
6
|
/**
|
package/dist/report.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as captureEngineFailure, o as writeDeploymentSummaryFile } from "./deployment-summary-
|
|
1
|
+
import { n as captureEngineFailure, o as writeDeploymentSummaryFile } from "./deployment-summary-CDHdLtnO-DrE7GsHq.mjs";
|
|
2
2
|
//#region ../../0-framework/3-tooling/cli/dist/report.mjs
|
|
3
3
|
/** Gap between the deepest tree label and the entity column. */
|
|
4
4
|
const LABEL_GAP = 3;
|
|
@@ -46,7 +46,8 @@ const pad = (prefix, width) => prefix.padEnd(width, " ");
|
|
|
46
46
|
*/
|
|
47
47
|
function renderDeployment(result) {
|
|
48
48
|
const rows = [];
|
|
49
|
-
|
|
49
|
+
const tree = buildTree(result.nodes);
|
|
50
|
+
toRows(tree.children.get(result.app) ?? tree, "", rows);
|
|
50
51
|
const column = Math.max(0, ...rows.map((row) => row.label.length)) + LABEL_GAP;
|
|
51
52
|
const lines = [result.app];
|
|
52
53
|
for (const row of rows) {
|
package/dist/report.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/report.mjs"],"sourcesContent":["import { n as captureEngineFailure, o as writeDeploymentSummaryFile } from \"./deployment-summary-
|
|
1
|
+
{"version":3,"file":"report.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/report.mjs"],"sourcesContent":["import { n as captureEngineFailure, o as writeDeploymentSummaryFile } from \"./deployment-summary-CDHdLtnO.mjs\";\n//#region src/render-deployment.ts\n/** Gap between the deepest tree label and the entity column. */\nconst LABEL_GAP = 3;\nconst emptyNode = (segment) => ({\n\tsegment,\n\tchildren: /* @__PURE__ */ new Map()\n});\n/** Builds the address tree, splitting each dot-address into its segments. */\nfunction buildTree(nodes) {\n\tconst root = emptyNode(\"\");\n\tfor (const deployed of nodes) {\n\t\tlet node = root;\n\t\tfor (const segment of deployed.address.split(\".\")) {\n\t\t\tlet child = node.children.get(segment);\n\t\t\tif (child === void 0) {\n\t\t\t\tchild = emptyNode(segment);\n\t\t\t\tnode.children.set(segment, child);\n\t\t\t}\n\t\t\tnode = child;\n\t\t}\n\t\tnode.deployed = deployed;\n\t}\n\treturn root;\n}\n/** Flattens the tree to rows in address order, drawing the box guides. */\nfunction toRows(node, guides, rows) {\n\tconst children = Array.from(node.children.values());\n\tchildren.forEach((child, index) => {\n\t\tconst isLast = index === children.length - 1;\n\t\trows.push({\n\t\t\tlabel: `${guides}${isLast ? \"└─ \" : \"├─ \"}${child.segment}`,\n\t\t\tcontinuation: `${guides}${isLast ? \" \" : \"│ \"}`,\n\t\t\tdeployed: child.deployed\n\t\t});\n\t\ttoRows(child, `${guides}${isLast ? \" \" : \"│ \"}`, rows);\n\t});\n}\n/** `kind id` — the one line an entity gets. */\nconst entityLine = (entity) => `${entity.kind} ${entity.id}`;\n/** Pads `prefix` out to `width`, so every entity starts in the same column. */\nconst pad = (prefix, width) => prefix.padEnd(width, \" \");\n/**\n* Renders a deploy's result as the app's own topology. Pure — returns the\n* string; the caller prints.\n*/\nfunction renderDeployment(result) {\n\tconst rows = [];\n\tconst tree = buildTree(result.nodes);\n\ttoRows(tree.children.get(result.app) ?? tree, \"\", rows);\n\tconst column = Math.max(0, ...rows.map((row) => row.label.length)) + LABEL_GAP;\n\tconst lines = [result.app];\n\tfor (const row of rows) {\n\t\tif (row.deployed === void 0) {\n\t\t\tlines.push(row.label);\n\t\t\tcontinue;\n\t\t}\n\t\tif (row.deployed.entities.length === 0) {\n\t\t\tlines.push(`${pad(row.label, column)}(no entities reported)`);\n\t\t\tcontinue;\n\t\t}\n\t\trow.deployed.entities.forEach((entity, index) => {\n\t\t\tconst prefix = index === 0 ? row.label : row.continuation;\n\t\t\tlines.push(`${pad(prefix, column)}${entityLine(entity)}`);\n\t\t\tif (entity.url !== void 0) lines.push(`${pad(row.continuation, column)}${entity.url}`);\n\t\t\tfor (const [key, value] of Object.entries(entity.details ?? {})) {\n\t\t\t\tif (value === \"\") continue;\n\t\t\t\tfor (const line of value.split(\"\\n\")) lines.push(`${pad(row.continuation, column)}${key} ${line}`);\n\t\t\t}\n\t\t});\n\t}\n\treturn lines.join(\"\\n\");\n}\n/**\n* The report hook the generated stack file wires into `LowerOptions`. Prints a\n* leading blank line so the summary separates from alchemy's own apply output,\n* then hands the result to the cross-process writer (deployment-summary.ts).\n*/\nfunction deploymentReport(result) {\n\tconsole.log(\"\");\n\tconsole.log(renderDeployment(result));\n\twriteDeploymentSummaryFile(result);\n}\n//#endregion\nexport { captureEngineFailure, deploymentReport, renderDeployment };\n\n//# sourceMappingURL=report.mjs.map"],"mappings":";;;AAGA,MAAM,YAAY;AAClB,MAAM,aAAa,aAAa;CAC/B;CACA,0BAA0B,IAAI,IAAI;AACnC;;AAEA,SAAS,UAAU,OAAO;CACzB,MAAM,OAAO,UAAU,EAAE;CACzB,KAAK,MAAM,YAAY,OAAO;EAC7B,IAAI,OAAO;EACX,KAAK,MAAM,WAAW,SAAS,QAAQ,MAAM,GAAG,GAAG;GAClD,IAAI,QAAQ,KAAK,SAAS,IAAI,OAAO;GACrC,IAAI,UAAU,KAAK,GAAG;IACrB,QAAQ,UAAU,OAAO;IACzB,KAAK,SAAS,IAAI,SAAS,KAAK;GACjC;GACA,OAAO;EACR;EACA,KAAK,WAAW;CACjB;CACA,OAAO;AACR;;AAEA,SAAS,OAAO,MAAM,QAAQ,MAAM;CACnC,MAAM,WAAW,MAAM,KAAK,KAAK,SAAS,OAAO,CAAC;CAClD,SAAS,SAAS,OAAO,UAAU;EAClC,MAAM,SAAS,UAAU,SAAS,SAAS;EAC3C,KAAK,KAAK;GACT,OAAO,GAAG,SAAS,SAAS,QAAQ,QAAQ,MAAM;GAClD,cAAc,GAAG,SAAS,SAAS,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ACA,OAAO,MAAM,KAAK,IAAI;AACvB;;;;;;AAMA,SAAS,iBAAiB,QAAQ;CACjC,QAAQ,IAAI,EAAE;CACd,QAAQ,IAAI,iBAAiB,MAAM,CAAC;CACpC,2BAA2B,MAAM;AAClC"}
|
|
@@ -3,7 +3,7 @@ import { createRequire } from "node:module";
|
|
|
3
3
|
import * as fs$1 from "node:fs";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
5
5
|
import spawn from "cross-spawn";
|
|
6
|
-
//#region ../../0-framework/3-tooling/cli/dist/run-alchemy-
|
|
6
|
+
//#region ../../0-framework/3-tooling/cli/dist/run-alchemy-Dl_MWw4g.mjs
|
|
7
7
|
/**
|
|
8
8
|
* Which Alchemy CLI runs a generated stack file: the `alchemy` that
|
|
9
9
|
* `@prisma/composer` depends on, found from the app the way the stack file's
|
|
@@ -215,4 +215,4 @@ function spawnCommandLine(line) {
|
|
|
215
215
|
//#endregion
|
|
216
216
|
export { reproduceCommand as n, spawnAlchemy as r, alchemyInvocation as t };
|
|
217
217
|
|
|
218
|
-
//# sourceMappingURL=run-alchemy-
|
|
218
|
+
//# sourceMappingURL=run-alchemy-Dl_MWw4g-BZaLckHp.mjs.map
|
package/dist/{run-alchemy-BqHpStQn-sYiodM6y.mjs.map → run-alchemy-Dl_MWw4g-BZaLckHp.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-alchemy-BqHpStQn-sYiodM6y.mjs","names":["path","fs"],"sources":["../../../0-framework/3-tooling/cli/dist/run-alchemy-BqHpStQn.mjs"],"sourcesContent":["import { createRequire } from \"node:module\";\nimport * as fs from \"node:fs\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport * as path from \"node:path\";\nimport spawn from \"cross-spawn\";\n//#region src/alchemy-bin.ts\n/**\n* Which Alchemy CLI runs a generated stack file: the `alchemy` that\n* `@prisma/composer` depends on, found from the app the way the stack file's\n* own `@prisma/composer/...` imports are. The CLI and the stack code then\n* come from one install, so the child loads one copy of `alchemy`.\n*\n* Node's resolver finds `@prisma/composer` from the app. It cannot find\n* `alchemy` from there: alchemy exports neither its `package.json` nor its\n* bin, and has no `require` condition. Bun has no `module.findPackageJSON`.\n* So the last step is Node's own lookup written out: each `node_modules`\n* above `@prisma/composer`'s real location, nearest first.\n*/\nconst FIX = \"Check that the app depends on @prisma/composer and that `alchemy`, which @prisma/composer depends on, is installed in a node_modules directory. Layouts without one, such as Yarn Plug'n'Play, are not supported.\";\nfunction binMissing(message) {\n\treturn new CliStructuredError(\"DEPLOY.ALCHEMY_BIN_MISSING\", message, { fix: FIX });\n}\nfunction composerPackageDir(appDir) {\n\ttry {\n\t\tconst manifest = createRequire(path.join(appDir, \"package.json\")).resolve(\"@prisma/composer/package.json\");\n\t\treturn path.dirname(fs.realpathSync(manifest));\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction alchemyPackageDirAbove(dir) {\n\tfor (let current = dir;; current = path.dirname(current)) {\n\t\tconst candidate = path.join(current, \"node_modules\", \"alchemy\");\n\t\tif (fs.existsSync(path.join(candidate, \"package.json\"))) return candidate;\n\t\tif (path.dirname(current) === current) return void 0;\n\t}\n}\nfunction readPackageJson(packageDir) {\n\ttry {\n\t\treturn JSON.parse(fs.readFileSync(path.join(packageDir, \"package.json\"), \"utf8\"));\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction binOf(packageDir) {\n\tconst manifest = readPackageJson(packageDir);\n\tif (typeof manifest !== \"object\" || manifest === null || !(\"bin\" in manifest)) return void 0;\n\tconst bin = manifest.bin;\n\tconst relative = typeof bin === \"string\" ? bin : typeof bin === \"object\" && bin !== null && \"alchemy\" in bin ? bin.alchemy : void 0;\n\tif (typeof relative !== \"string\") return void 0;\n\tconst entry = path.join(packageDir, relative);\n\treturn fs.existsSync(entry) ? entry : void 0;\n}\n/**\n* The JavaScript file `alchemy`'s `bin` names, for the app in `appDir`.\n* Raises DEPLOY.ALCHEMY_BIN_MISSING when the app does not resolve\n* `@prisma/composer` or no usable `alchemy` is installed beside it.\n*/\nfunction resolveAlchemyBin(appDir) {\n\tconst composerDir = composerPackageDir(appDir);\n\tif (composerDir === void 0) throw binMissing(`Could not resolve @prisma/composer from \"${appDir}\".`);\n\tconst alchemyDir = alchemyPackageDirAbove(composerDir);\n\tconst entry = alchemyDir === void 0 ? void 0 : binOf(alchemyDir);\n\tif (entry === void 0) throw binMissing(`Could not resolve the bin of the \\`alchemy\\` package @prisma/composer depends on, from \"${composerDir}\".`);\n\treturn entry;\n}\n//#endregion\n//#region src/run-alchemy.ts\n/**\n* Pipeline step 7 (deploy-cli.md § The pipeline; design-notes.md's \"Driving\n* Alchemy\" call): hand the terminal to the generated stack file.\n*\n* Runs the bin of the `alchemy` the app's `@prisma/composer` depends on\n* (`resolveAlchemyBin`), started with Node (`nodeExecutable`). Never a\n* `node_modules/.bin` link, which pnpm creates only for an app's direct\n* dependencies.\n*\n* This module composes the invocation; it does not decide how the child is\n* started. Under the CLI the engine starts it (`ctx.spawn`), which is what\n* makes Ctrl-C reach the child natively and keeps signal policy in one place.\n* `spawnAlchemy` is the default for programmatic hosts driving\n* `@prisma/composer/control`, which have no engine to borrow.\n*/\nfunction currentRuntime() {\n\treturn {\n\t\tbun: process.versions.bun !== void 0,\n\t\texecPath: process.execPath,\n\t\tenv: process.env,\n\t\tplatform: process.platform,\n\t\texists: fs.existsSync\n\t};\n}\nfunction envValue(env, name) {\n\treturn Object.entries(env).find(([key]) => key.toLowerCase() === name.toLowerCase())?.[1];\n}\n/** The file names `node` may have in a PATH directory: PATHEXT's extensions on Windows. */\nfunction nodeFileNames(runtime) {\n\tif (runtime.platform !== \"win32\") return [\"node\"];\n\treturn (envValue(runtime.env, \"PATHEXT\") ?? \".COM;.EXE;.BAT;.CMD\").split(\";\").filter((extension) => extension.length > 0).map((extension) => `node${extension}`);\n}\n/**\n* The Node that starts Alchemy's launcher: this process's own runtime under\n* Node, and the first `node` on PATH under Bun. Alchemy's launcher may still\n* move itself to Bun when the package-manager environment says Bun invoked\n* it (`bunx`, `bun run`), so the runtime Alchemy ends up on follows how\n* `prisma` was invoked.\n*/\nfunction nodeExecutable(runtime = currentRuntime()) {\n\tif (!runtime.bun) return runtime.execPath;\n\tconst paths = runtime.platform === \"win32\" ? path.win32 : path.posix;\n\tconst names = nodeFileNames(runtime);\n\tfor (const rawDir of (envValue(runtime.env, \"PATH\") ?? \"\").split(paths.delimiter)) {\n\t\tconst dir = rawDir.replace(/^\"(.*)\"$/, \"$1\");\n\t\tif (dir.length === 0) continue;\n\t\tfor (const name of names) {\n\t\t\tconst candidate = paths.join(dir, name);\n\t\t\tif (runtime.exists(candidate)) return candidate;\n\t\t}\n\t}\n\tthrow new CliStructuredError(\"DEPLOY.NODE_MISSING\", \"Composer starts Alchemy with Node, and no `node` was found on PATH.\", { fix: \"Install Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer, and put it on PATH, or run `prisma` under Node.\" });\n}\n/**\n* Resolves the invocation against this machine — the step every adapter takes\n* and no caller should. Runs alchemy's JavaScript entry with Node, so no shell\n* shim is involved on any platform. Raises DEPLOY.ALCHEMY_BIN_MISSING when\n* Composer's alchemy cannot be resolved, and DEPLOY.NODE_MISSING when no Node\n* can run it.\n*/\nfunction alchemyCommandLine(invocation, alchemyBin = resolveAlchemyBin(invocation.cwd), node = nodeExecutable()) {\n\treturn {\n\t\tcommand: node,\n\t\targs: [\n\t\t\talchemyBin,\n\t\t\tinvocation.action,\n\t\t\tinvocation.stackFileRelativePath,\n\t\t\t\"--yes\",\n\t\t\t\"--stage\",\n\t\t\tinvocation.stage\n\t\t],\n\t\tcwd: invocation.cwd,\n\t\tenv: invocation.env\n\t};\n}\n/** What becomes `alchemy deploy|destroy <stack file> --yes --stage <stage>`. */\nfunction alchemyInvocation(input) {\n\treturn {\n\t\taction: input.command,\n\t\tstackFileRelativePath: input.stackFileRelativePath,\n\t\tcwd: input.cwd,\n\t\tstage: input.stage,\n\t\tenv: {\n\t\t\t...input.containerEnv,\n\t\t\t...input.preflightEnv,\n\t\t\t...input.env\n\t\t}\n\t};\n}\n/**\n* The default runner for hosts with no engine: inherited stdio, the caller's\n* own process group, and the child's status returned verbatim. It does not\n* collapse a signal into an exit code — that collapse is what made a\n* Ctrl-C'd deploy report itself as a failure.\n*/\nconst spawnAlchemy = async (invocation) => {\n\tconst commandLine = alchemyCommandLine(invocation);\n\treturn {\n\t\t...await spawnCommandLine(commandLine),\n\t\tcommandLine\n\t};\n};\n/**\n* One argument as the platform's shell reads it literally: single quotes for\n* POSIX shells, double quotes for cmd.exe. cmd.exe expands `%VAR%` inside\n* double quotes, and strips or expands `!` when delayed expansion is on; no\n* quoting prevents either, so an argument containing them is not fully\n* literal there.\n*/\nfunction shellArg(arg, platform) {\n\tif (platform === \"win32\") return /^[\\w@+=:,./\\\\~-]+$/.test(arg) ? arg : `\"${arg.replaceAll(\"\\\"\", \"\\\"\\\"\")}\"`;\n\treturn /^[\\w@%+=:,./-]+$/.test(arg) ? arg : `'${arg.replaceAll(\"'\", \"'\\\\''\")}'`;\n}\n/**\n* The command a user runs from the invocation's directory to repeat a\n* converge: the command line the adapter started, or, from an adapter that\n* does not report one, `alchemy` with the same arguments.\n*/\nfunction reproduceCommand(invocation, outcome, platform = process.platform) {\n\treturn (outcome?.commandLine === void 0 ? [\n\t\t\"alchemy\",\n\t\tinvocation.action,\n\t\tinvocation.stackFileRelativePath,\n\t\t\"--yes\",\n\t\t\"--stage\",\n\t\tinvocation.stage\n\t] : [outcome.commandLine.command, ...outcome.commandLine.args]).map((arg) => shellArg(arg, platform)).join(\" \");\n}\n/** Starts a resolved command line with inherited stdio and returns how it ended. */\nfunction spawnCommandLine(line) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst child = spawn(line.command, [...line.args], {\n\t\t\tcwd: line.cwd,\n\t\t\tstdio: \"inherit\",\n\t\t\tenv: {\n\t\t\t\t...process.env,\n\t\t\t\t...line.env\n\t\t\t}\n\t\t});\n\t\tchild.on(\"error\", reject);\n\t\tchild.on(\"close\", (exitCode, signal) => {\n\t\t\tresolve({\n\t\t\t\texitCode,\n\t\t\t\tsignal\n\t\t\t});\n\t\t});\n\t});\n}\n//#endregion\nexport { spawnAlchemy as i, alchemyInvocation as n, reproduceCommand as r, alchemyCommandLine as t };\n\n//# sourceMappingURL=run-alchemy-BqHpStQn.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAM,MAAM;AACZ,SAAS,WAAW,SAAS;CAC5B,OAAO,IAAI,mBAAmB,8BAA8B,SAAS,EAAE,KAAK,IAAI,CAAC;AAClF;AACA,SAAS,mBAAmB,QAAQ;CACnC,IAAI;EACH,MAAM,WAAW,cAAcA,OAAK,KAAK,QAAQ,cAAc,CAAC,CAAC,CAAC,QAAQ,+BAA+B;EACzG,OAAOA,OAAK,QAAQC,KAAG,aAAa,QAAQ,CAAC;CAC9C,QAAQ;EACP;CACD;AACD;AACA,SAAS,uBAAuB,KAAK;CACpC,KAAK,IAAI,UAAU,MAAM,UAAUD,OAAK,QAAQ,OAAO,GAAG;EACzD,MAAM,YAAYA,OAAK,KAAK,SAAS,gBAAgB,SAAS;EAC9D,IAAIC,KAAG,WAAWD,OAAK,KAAK,WAAW,cAAc,CAAC,GAAG,OAAO;EAChE,IAAIA,OAAK,QAAQ,OAAO,MAAM,SAAS,OAAO,KAAK;CACpD;AACD;AACA,SAAS,gBAAgB,YAAY;CACpC,IAAI;EACH,OAAO,KAAK,MAAMC,KAAG,aAAaD,OAAK,KAAK,YAAY,cAAc,GAAG,MAAM,CAAC;CACjF,QAAQ;EACP;CACD;AACD;AACA,SAAS,MAAM,YAAY;CAC1B,MAAM,WAAW,gBAAgB,UAAU;CAC3C,IAAI,OAAO,aAAa,YAAY,aAAa,QAAQ,EAAE,SAAS,WAAW,OAAO,KAAK;CAC3F,MAAM,MAAM,SAAS;CACrB,MAAM,WAAW,OAAO,QAAQ,WAAW,MAAM,OAAO,QAAQ,YAAY,QAAQ,QAAQ,aAAa,MAAM,IAAI,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EACA;EACA,WAAW;CACZ,IAAI,CAAC,QAAQ,YAAY,SAAS,GAAG,QAAQ,YAAY,IAAI,EAAA,CAAG,KAAK,QAAQ,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,GAAG;AAC/G;;AAEA,SAAS,iBAAiB,MAAM;CAC/B,OAAO,IAAI,SAAS,SAAS,WAAW;EACvC,MAAM,QAAQ,MAAM,KAAK,SAAS,CAAC,GAAG,KAAK,IAAI,GAAG;GACjD,KAAK,KAAK;GACV,OAAO;GACP,KAAK;IACJ,GAAG,QAAQ;IACX,GAAG,KAAK;GACT;EACD,CAAC;EACD,MAAM,GAAG,SAAS,MAAM;EACxB,MAAM,GAAG,UAAU,UAAU,WAAW;GACvC,QAAQ;IACP;IACA;GACD,CAAC;EACF,CAAC;CACF,CAAC;AACF"}
|
|
1
|
+
{"version":3,"file":"run-alchemy-Dl_MWw4g-BZaLckHp.mjs","names":["path","fs"],"sources":["../../../0-framework/3-tooling/cli/dist/run-alchemy-Dl_MWw4g.mjs"],"sourcesContent":["import { createRequire } from \"node:module\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport spawn from \"cross-spawn\";\n//#region src/alchemy-bin.ts\n/**\n* Which Alchemy CLI runs a generated stack file: the `alchemy` that\n* `@prisma/composer` depends on, found from the app the way the stack file's\n* own `@prisma/composer/...` imports are. The CLI and the stack code then\n* come from one install, so the child loads one copy of `alchemy`.\n*\n* Node's resolver finds `@prisma/composer` from the app. It cannot find\n* `alchemy` from there: alchemy exports neither its `package.json` nor its\n* bin, and has no `require` condition. Bun has no `module.findPackageJSON`.\n* So the last step is Node's own lookup written out: each `node_modules`\n* above `@prisma/composer`'s real location, nearest first.\n*/\nconst FIX = \"Check that the app depends on @prisma/composer and that `alchemy`, which @prisma/composer depends on, is installed in a node_modules directory. Layouts without one, such as Yarn Plug'n'Play, are not supported.\";\nfunction binMissing(message) {\n\treturn new CliStructuredError(\"DEPLOY.ALCHEMY_BIN_MISSING\", message, { fix: FIX });\n}\nfunction composerPackageDir(appDir) {\n\ttry {\n\t\tconst manifest = createRequire(path.join(appDir, \"package.json\")).resolve(\"@prisma/composer/package.json\");\n\t\treturn path.dirname(fs.realpathSync(manifest));\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction alchemyPackageDirAbove(dir) {\n\tfor (let current = dir;; current = path.dirname(current)) {\n\t\tconst candidate = path.join(current, \"node_modules\", \"alchemy\");\n\t\tif (fs.existsSync(path.join(candidate, \"package.json\"))) return candidate;\n\t\tif (path.dirname(current) === current) return void 0;\n\t}\n}\nfunction readPackageJson(packageDir) {\n\ttry {\n\t\treturn JSON.parse(fs.readFileSync(path.join(packageDir, \"package.json\"), \"utf8\"));\n\t} catch {\n\t\treturn;\n\t}\n}\nfunction binOf(packageDir) {\n\tconst manifest = readPackageJson(packageDir);\n\tif (typeof manifest !== \"object\" || manifest === null || !(\"bin\" in manifest)) return void 0;\n\tconst bin = manifest.bin;\n\tconst relative = typeof bin === \"string\" ? bin : typeof bin === \"object\" && bin !== null && \"alchemy\" in bin ? bin.alchemy : void 0;\n\tif (typeof relative !== \"string\") return void 0;\n\tconst entry = path.join(packageDir, relative);\n\treturn fs.existsSync(entry) ? entry : void 0;\n}\n/**\n* The JavaScript file `alchemy`'s `bin` names, for the app in `appDir`.\n* Raises DEPLOY.ALCHEMY_BIN_MISSING when the app does not resolve\n* `@prisma/composer` or no usable `alchemy` is installed beside it.\n*/\nfunction resolveAlchemyBin(appDir) {\n\tconst composerDir = composerPackageDir(appDir);\n\tif (composerDir === void 0) throw binMissing(`Could not resolve @prisma/composer from \"${appDir}\".`);\n\tconst alchemyDir = alchemyPackageDirAbove(composerDir);\n\tconst entry = alchemyDir === void 0 ? void 0 : binOf(alchemyDir);\n\tif (entry === void 0) throw binMissing(`Could not resolve the bin of the \\`alchemy\\` package @prisma/composer depends on, from \"${composerDir}\".`);\n\treturn entry;\n}\n//#endregion\n//#region src/run-alchemy.ts\n/**\n* Pipeline step 7 (deploy-cli.md § The pipeline; design-notes.md's \"Driving\n* Alchemy\" call): hand the terminal to the generated stack file.\n*\n* Runs the bin of the `alchemy` the app's `@prisma/composer` depends on\n* (`resolveAlchemyBin`), started with Node (`nodeExecutable`). Never a\n* `node_modules/.bin` link, which pnpm creates only for an app's direct\n* dependencies.\n*\n* This module composes the invocation; it does not decide how the child is\n* started. Under the CLI the engine starts it (`ctx.spawn`), which is what\n* makes Ctrl-C reach the child natively and keeps signal policy in one place.\n* `spawnAlchemy` is the default for programmatic hosts driving\n* `@prisma/composer/control`, which have no engine to borrow.\n*/\nfunction currentRuntime() {\n\treturn {\n\t\tbun: process.versions.bun !== void 0,\n\t\texecPath: process.execPath,\n\t\tenv: process.env,\n\t\tplatform: process.platform,\n\t\texists: fs.existsSync\n\t};\n}\nfunction envValue(env, name) {\n\treturn Object.entries(env).find(([key]) => key.toLowerCase() === name.toLowerCase())?.[1];\n}\n/** The file names `node` may have in a PATH directory: PATHEXT's extensions on Windows. */\nfunction nodeFileNames(runtime) {\n\tif (runtime.platform !== \"win32\") return [\"node\"];\n\treturn (envValue(runtime.env, \"PATHEXT\") ?? \".COM;.EXE;.BAT;.CMD\").split(\";\").filter((extension) => extension.length > 0).map((extension) => `node${extension}`);\n}\n/**\n* The Node that starts Alchemy's launcher: this process's own runtime under\n* Node, and the first `node` on PATH under Bun. Alchemy's launcher may still\n* move itself to Bun when the package-manager environment says Bun invoked\n* it (`bunx`, `bun run`), so the runtime Alchemy ends up on follows how\n* `prisma` was invoked.\n*/\nfunction nodeExecutable(runtime = currentRuntime()) {\n\tif (!runtime.bun) return runtime.execPath;\n\tconst paths = runtime.platform === \"win32\" ? path.win32 : path.posix;\n\tconst names = nodeFileNames(runtime);\n\tfor (const rawDir of (envValue(runtime.env, \"PATH\") ?? \"\").split(paths.delimiter)) {\n\t\tconst dir = rawDir.replace(/^\"(.*)\"$/, \"$1\");\n\t\tif (dir.length === 0) continue;\n\t\tfor (const name of names) {\n\t\t\tconst candidate = paths.join(dir, name);\n\t\t\tif (runtime.exists(candidate)) return candidate;\n\t\t}\n\t}\n\tthrow new CliStructuredError(\"DEPLOY.NODE_MISSING\", \"Composer starts Alchemy with Node, and no `node` was found on PATH.\", { fix: \"Install Node.js 22.18 or newer on the 22 line, 24.11 or newer on the 24 line, or 26 or newer, and put it on PATH, or run `prisma` under Node.\" });\n}\n/**\n* Resolves the invocation against this machine — the step every adapter takes\n* and no caller should. Runs alchemy's JavaScript entry with Node, so no shell\n* shim is involved on any platform. Raises DEPLOY.ALCHEMY_BIN_MISSING when\n* Composer's alchemy cannot be resolved, and DEPLOY.NODE_MISSING when no Node\n* can run it.\n*/\nfunction alchemyCommandLine(invocation, alchemyBin = resolveAlchemyBin(invocation.cwd), node = nodeExecutable()) {\n\treturn {\n\t\tcommand: node,\n\t\targs: [\n\t\t\talchemyBin,\n\t\t\tinvocation.action,\n\t\t\tinvocation.stackFileRelativePath,\n\t\t\t\"--yes\",\n\t\t\t\"--stage\",\n\t\t\tinvocation.stage\n\t\t],\n\t\tcwd: invocation.cwd,\n\t\tenv: invocation.env\n\t};\n}\n/** What becomes `alchemy deploy|destroy <stack file> --yes --stage <stage>`. */\nfunction alchemyInvocation(input) {\n\treturn {\n\t\taction: input.command,\n\t\tstackFileRelativePath: input.stackFileRelativePath,\n\t\tcwd: input.cwd,\n\t\tstage: input.stage,\n\t\tenv: {\n\t\t\t...input.containerEnv,\n\t\t\t...input.preflightEnv,\n\t\t\t...input.env\n\t\t}\n\t};\n}\n/**\n* The default runner for hosts with no engine: inherited stdio, the caller's\n* own process group, and the child's status returned verbatim. It does not\n* collapse a signal into an exit code — that collapse is what made a\n* Ctrl-C'd deploy report itself as a failure.\n*/\nconst spawnAlchemy = async (invocation) => {\n\tconst commandLine = alchemyCommandLine(invocation);\n\treturn {\n\t\t...await spawnCommandLine(commandLine),\n\t\tcommandLine\n\t};\n};\n/**\n* One argument as the platform's shell reads it literally: single quotes for\n* POSIX shells, double quotes for cmd.exe. cmd.exe expands `%VAR%` inside\n* double quotes, and strips or expands `!` when delayed expansion is on; no\n* quoting prevents either, so an argument containing them is not fully\n* literal there.\n*/\nfunction shellArg(arg, platform) {\n\tif (platform === \"win32\") return /^[\\w@+=:,./\\\\~-]+$/.test(arg) ? arg : `\"${arg.replaceAll(\"\\\"\", \"\\\"\\\"\")}\"`;\n\treturn /^[\\w@%+=:,./-]+$/.test(arg) ? arg : `'${arg.replaceAll(\"'\", \"'\\\\''\")}'`;\n}\n/**\n* The command a user runs from the invocation's directory to repeat a\n* converge: the command line the adapter started, or, from an adapter that\n* does not report one, `alchemy` with the same arguments.\n*/\nfunction reproduceCommand(invocation, outcome, platform = process.platform) {\n\treturn (outcome?.commandLine === void 0 ? [\n\t\t\"alchemy\",\n\t\tinvocation.action,\n\t\tinvocation.stackFileRelativePath,\n\t\t\"--yes\",\n\t\t\"--stage\",\n\t\tinvocation.stage\n\t] : [outcome.commandLine.command, ...outcome.commandLine.args]).map((arg) => shellArg(arg, platform)).join(\" \");\n}\n/** Starts a resolved command line with inherited stdio and returns how it ended. */\nfunction spawnCommandLine(line) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst child = spawn(line.command, [...line.args], {\n\t\t\tcwd: line.cwd,\n\t\t\tstdio: \"inherit\",\n\t\t\tenv: {\n\t\t\t\t...process.env,\n\t\t\t\t...line.env\n\t\t\t}\n\t\t});\n\t\tchild.on(\"error\", reject);\n\t\tchild.on(\"close\", (exitCode, signal) => {\n\t\t\tresolve({\n\t\t\t\texitCode,\n\t\t\t\tsignal\n\t\t\t});\n\t\t});\n\t});\n}\n//#endregion\nexport { spawnAlchemy as i, alchemyInvocation as n, reproduceCommand as r, alchemyCommandLine as t };\n\n//# sourceMappingURL=run-alchemy-Dl_MWw4g.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAM,MAAM;AACZ,SAAS,WAAW,SAAS;CAC5B,OAAO,IAAI,mBAAmB,8BAA8B,SAAS,EA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K;IACJ,GAAG,QAAQ;IACX,GAAG,KAAK;GACT;EACD,CAAC;EACD,MAAM,GAAG,SAAS,MAAM;EACxB,MAAM,GAAG,UAAU,UAAU,WAAW;GACvC,QAAQ;IACP;IACA;GACD,CAAC;EACF,CAAC;CACF,CAAC;AACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as fs$1 from "node:fs";
|
|
2
2
|
import * as path$1 from "node:path";
|
|
3
|
-
//#region ../../0-framework/3-tooling/cli/dist/run-report-
|
|
3
|
+
//#region ../../0-framework/3-tooling/cli/dist/run-report-CmBz2-xc.mjs
|
|
4
4
|
/**
|
|
5
5
|
* The run report: one deploy's outcome as JSON, for tools that consume a
|
|
6
6
|
* deploy rather than watch one — the Prisma GitHub Action reads it to build a
|
|
@@ -14,15 +14,15 @@ import * as path$1 from "node:path";
|
|
|
14
14
|
* version so a consumer can depend on its shape.
|
|
15
15
|
*/
|
|
16
16
|
/** Bump when a change would break a consumer that reads the current shape. */
|
|
17
|
-
const RUN_REPORT_VERSION =
|
|
17
|
+
const RUN_REPORT_VERSION = 2;
|
|
18
18
|
/** Names the file to write the run report to, when `--report` is not passed. */
|
|
19
19
|
const RUN_REPORT_FILE_ENV = "PRISMA_COMPOSER_REPORT_FILE";
|
|
20
20
|
function toRunReport(input) {
|
|
21
21
|
return {
|
|
22
|
-
version:
|
|
22
|
+
version: 2,
|
|
23
23
|
outcome: input.failure === void 0 ? "succeeded" : "failed",
|
|
24
24
|
app: input.summary?.app ?? null,
|
|
25
|
-
|
|
25
|
+
environment: input.environment,
|
|
26
26
|
nodes: input.summary?.nodes ?? [],
|
|
27
27
|
failure: input.failure ?? null
|
|
28
28
|
};
|
|
@@ -57,4 +57,4 @@ function writeRunReport(filePath, report) {
|
|
|
57
57
|
//#endregion
|
|
58
58
|
export { writeRunReport as a, toRunReport as i, RUN_REPORT_VERSION as n, resolveRunReportPath as r, RUN_REPORT_FILE_ENV as t };
|
|
59
59
|
|
|
60
|
-
//# sourceMappingURL=run-report-
|
|
60
|
+
//# sourceMappingURL=run-report-CmBz2-xc-S50d4g5V.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-report-CmBz2-xc-S50d4g5V.mjs","names":["path"],"sources":["../../../0-framework/3-tooling/cli/dist/run-report-CmBz2-xc.mjs"],"sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\n//#region src/run-report.ts\n/**\n* The run report: one deploy's outcome as JSON, for tools that consume a\n* deploy rather than watch one — the Prisma GitHub Action reads it to build a\n* pull-request comment carrying preview links.\n*\n* Deliberately separate from `deployment-summary.ts`. That file is a private\n* carrier between the alchemy child and this process, written to a\n* per-run path the parent deletes in a `finally` so resource ids and URLs do\n* not accumulate on disk. This one is written where the operator asked for\n* it, survives the run, is written on the failure path too, and carries a\n* version so a consumer can depend on its shape.\n*/\n/** Bump when a change would break a consumer that reads the current shape. */\nconst RUN_REPORT_VERSION = 2;\n/** Names the file to write the run report to, when `--report` is not passed. */\nconst RUN_REPORT_FILE_ENV = \"PRISMA_COMPOSER_REPORT_FILE\";\nfunction toRunReport(input) {\n\treturn {\n\t\tversion: 2,\n\t\toutcome: input.failure === void 0 ? \"succeeded\" : \"failed\",\n\t\tapp: input.summary?.app ?? null,\n\t\tenvironment: input.environment,\n\t\tnodes: input.summary?.nodes ?? [],\n\t\tfailure: input.failure ?? null\n\t};\n}\n/**\n* The path to write to: the `--report` flag first, then the env var. Relative\n* paths resolve against the deploy's cwd. `undefined` means no report was\n* asked for, which is the common case and writes nothing.\n*/\nfunction resolveRunReportPath(flag, env, cwd) {\n\tconst requested = flag !== void 0 && flag.length > 0 ? flag : env;\n\tif (requested === void 0 || requested.length === 0) return void 0;\n\treturn path.resolve(cwd, requested);\n}\n/**\n* Writes the report, creating the parent directory if needed. A write failure\n* warns and returns false rather than failing a deploy that already\n* converged — but it is never silent, because the operator asked for this\n* file and a consumer is waiting on it.\n*/\nfunction writeRunReport(filePath, report) {\n\ttry {\n\t\tfs.mkdirSync(path.dirname(filePath), { recursive: true });\n\t\tfs.writeFileSync(filePath, `${JSON.stringify(report, null, 2)}\\n`);\n\t\treturn true;\n\t} catch (error) {\n\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\tconsole.warn(`\\nCould not write the run report to ${filePath}: ${detail}`);\n\t\treturn false;\n\t}\n}\n//#endregion\nexport { writeRunReport as a, toRunReport as i, RUN_REPORT_VERSION as n, resolveRunReportPath as r, RUN_REPORT_FILE_ENV as t };\n\n//# sourceMappingURL=run-report-CmBz2-xc.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAgBA,MAAM,qBAAqB;;AAE3B,MAAM,sBAAsB;AAC5B,SAAS,YAAY,OAAO;CAC3B,OAAO;EACN,SAAS;EACT,SAAS,MAAM,YAAY,KAAK,IAAI,cAAc;EAClD,KAAK,MAAM,SAAS,OAAO;EAC3B,aAAa,MAAM;EACnB,OAAO,MAAM,SAAS,SAAS,CAAC;EAChC,SAAS,MAAM,WAAW;CAC3B;AACD;;;;;;AAMA,SAAS,qBAAqB,MAAM,KAAK,KAAK;CAC7C,MAAM,YAAY,SAAS,KAAK,KAAK,KAAK,SAAS,IAAI,OAAO;CAC9D,IAAI,cAAc,KAAK,KAAK,UAAU,WAAW,GAAG,OAAO,KAAK;CAChE,OAAOA,OAAK,QAAQ,KAAK,SAAS;AACnC;;;;;;;AAOA,SAAS,eAAe,UAAU,QAAQ;CACzC,IAAI;EACH,KAAG,UAAUA,OAAK,QAAQ,QAAQ,GAAG,EAAE,WAAW,KAAK,CAAC;EACxD,KAAG,cAAc,UAAU,GAAG,KAAK,UAAU,QAAQ,MAAM,CAAC,EAAE,GAAG;EACjE,OAAO;CACR,SAAS,OAAO;EACf,MAAM,SAAS,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;EACpE,QAAQ,KAAK,uCAAuC,SAAS,IAAI,QAAQ;EACzE,OAAO;CACR;AACD"}
|
package/dist/service-rpc.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { H as RunnableServiceNode, I as ProvisionNeed, c as Contract, u as DependencyEnd } from "./graph-types-Cegbwb_X-BU-H2pnt.mjs";
|
|
2
|
-
import "./index-
|
|
2
|
+
import "./index-B-9Dc0J7.mjs";
|
|
3
3
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
4
4
|
//#region ../../0-framework/2-authoring/service-rpc/dist/index.d.mts
|
|
5
5
|
//#region src/rpc.d.ts
|
package/dist/service-rpc.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as blindCast } from "./casts-DpaahrlC-C5XMnP9S.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { c as string } from "./dist-
|
|
2
|
+
import { h as provisionNeed, o as dependency } from "./graph-D0ICjejE-CeQtHY5B.mjs";
|
|
3
|
+
import { c as string } from "./dist-Xd2Pp_-u.mjs";
|
|
4
4
|
//#region ../../0-framework/2-authoring/service-rpc/dist/index.mjs
|
|
5
5
|
/** Bounded jittered backoff for retrying a dropped call. `maxRetries` is retries after the first attempt. */
|
|
6
6
|
const RETRY = {
|