@prisma/composer 0.6.0-dev.22 → 0.6.0-dev.23

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.
Files changed (33) hide show
  1. package/dist/control.mjs +6 -6
  2. package/dist/{deployment-summary-DswOl_9E-C03NJ98H.mjs → deployment-summary-DswOl_9E-B9MhYYDt.mjs} +4 -4
  3. package/dist/deployment-summary-DswOl_9E-B9MhYYDt.mjs.map +1 -0
  4. package/dist/dist-CVk7Pk4B.mjs +42 -0
  5. package/dist/dist-CVk7Pk4B.mjs.map +1 -0
  6. package/dist/{execute-deploy-destroy-DRl6Tfg9-ktj5sQsO.mjs → execute-deploy-destroy-DRl6Tfg9-B8LE2Lh5.mjs} +19 -19
  7. package/dist/execute-deploy-destroy-DRl6Tfg9-B8LE2Lh5.mjs.map +1 -0
  8. package/dist/{execute-dev-BMTFWfFc-CGDFqR4w.mjs → execute-dev-BMTFWfFc-7MifQgpp.mjs} +34 -34
  9. package/dist/execute-dev-BMTFWfFc-7MifQgpp.mjs.map +1 -0
  10. package/dist/{execute-log-Cay9hlKW-ChlIv192.mjs → execute-log-Cay9hlKW-BcvKPOW1.mjs} +5 -5
  11. package/dist/execute-log-Cay9hlKW-BcvKPOW1.mjs.map +1 -0
  12. package/dist/nextjs-control.mjs +138 -34
  13. package/dist/nextjs-control.mjs.map +1 -1
  14. package/dist/node-control.mjs +21814 -55
  15. package/dist/node-control.mjs.map +1 -1
  16. package/dist/{pipeline-AoW8zq4I-CUon5KZH.mjs → pipeline-AoW8zq4I-Dg8xQ7nC.mjs} +18 -18
  17. package/dist/pipeline-AoW8zq4I-Dg8xQ7nC.mjs.map +1 -0
  18. package/dist/report.mjs +1 -1
  19. package/dist/{result-CY_TB7bn.mjs → result-D95kAAek.mjs} +13 -13
  20. package/dist/result-D95kAAek.mjs.map +1 -0
  21. package/dist/{run-alchemy-D44OZlyB-gVq_0gf4.mjs → run-alchemy-D44OZlyB-Cw5CVbUQ.mjs} +6 -6
  22. package/dist/run-alchemy-D44OZlyB-Cw5CVbUQ.mjs.map +1 -0
  23. package/dist/{run-report-C2o98uD--CAfePImA.mjs → run-report-C2o98uD--AX8kpz4Q.mjs} +6 -6
  24. package/dist/run-report-C2o98uD--AX8kpz4Q.mjs.map +1 -0
  25. package/package.json +10 -10
  26. package/dist/deployment-summary-DswOl_9E-C03NJ98H.mjs.map +0 -1
  27. package/dist/execute-deploy-destroy-DRl6Tfg9-ktj5sQsO.mjs.map +0 -1
  28. package/dist/execute-dev-BMTFWfFc-CGDFqR4w.mjs.map +0 -1
  29. package/dist/execute-log-Cay9hlKW-ChlIv192.mjs.map +0 -1
  30. package/dist/pipeline-AoW8zq4I-CUon5KZH.mjs.map +0 -1
  31. package/dist/result-CY_TB7bn.mjs.map +0 -1
  32. package/dist/run-alchemy-D44OZlyB-gVq_0gf4.mjs.map +0 -1
  33. package/dist/run-report-C2o98uD--CAfePImA.mjs.map +0 -1
package/dist/control.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { a as executionDiagnostics, o as executorLoadFailure, t as notOk } from "./result-CY_TB7bn.mjs";
2
- import { n as RUN_REPORT_VERSION, t as RUN_REPORT_FILE_ENV } from "./run-report-C2o98uD--CAfePImA.mjs";
1
+ import { a as executionDiagnostics, o as executorLoadFailure, t as notOk } from "./result-D95kAAek.mjs";
2
+ import { n as RUN_REPORT_VERSION, t as RUN_REPORT_FILE_ENV } from "./run-report-C2o98uD--AX8kpz4Q.mjs";
3
3
  //#region ../../0-framework/3-tooling/cli/dist/log-B1EJJGSl.mjs
4
4
  async function deploy(input) {
5
5
  return deployWithDeps(input, {});
@@ -11,7 +11,7 @@ async function deployWithDeps(input, deps) {
11
11
  const cwd = input.cwd ?? process.cwd();
12
12
  let executor;
13
13
  try {
14
- executor = await import("./execute-deploy-destroy-DRl6Tfg9-ktj5sQsO.mjs");
14
+ executor = await import("./execute-deploy-destroy-DRl6Tfg9-B8LE2Lh5.mjs");
15
15
  } catch (error) {
16
16
  return notOk(executorLoadFailure("deploy", error, cwd));
17
17
  }
@@ -27,7 +27,7 @@ async function destroyWithDeps(input, deps) {
27
27
  const cwd = input.cwd ?? process.cwd();
28
28
  let executor;
29
29
  try {
30
- executor = await import("./execute-deploy-destroy-DRl6Tfg9-ktj5sQsO.mjs");
30
+ executor = await import("./execute-deploy-destroy-DRl6Tfg9-B8LE2Lh5.mjs");
31
31
  } catch (error) {
32
32
  return notOk(executorLoadFailure("destroy", error, cwd));
33
33
  }
@@ -43,7 +43,7 @@ async function devWithDeps(input, deps) {
43
43
  const cwd = input.cwd ?? process.cwd();
44
44
  let executor;
45
45
  try {
46
- executor = await import("./execute-dev-BMTFWfFc-CGDFqR4w.mjs");
46
+ executor = await import("./execute-dev-BMTFWfFc-7MifQgpp.mjs");
47
47
  } catch (error) {
48
48
  return notOk(executorLoadFailure("dev", error, cwd));
49
49
  }
@@ -59,7 +59,7 @@ async function logWithDeps(input, deps) {
59
59
  const cwd = input.cwd ?? process.cwd();
60
60
  let executor;
61
61
  try {
62
- executor = await import("./execute-log-Cay9hlKW-ChlIv192.mjs");
62
+ executor = await import("./execute-log-Cay9hlKW-BcvKPOW1.mjs");
63
63
  } catch (error) {
64
64
  return notOk(executorLoadFailure("log", error, cwd));
65
65
  }
@@ -1,5 +1,5 @@
1
1
  import { t as blindCast } from "./casts-DpaahrlC-C5XMnP9S.mjs";
2
- import * as fs from "node:fs";
2
+ import * as fs$1 from "node:fs";
3
3
  //#region ../../0-framework/3-tooling/cli/dist/deployment-summary-DswOl_9E.mjs
4
4
  /**
5
5
  * The deploy result's cross-process protocol, whole in one place: the
@@ -34,7 +34,7 @@ function writeDeploymentSummaryFile(result) {
34
34
  const file = process.env[DEPLOYMENT_RESULT_FILE_ENV];
35
35
  if (file === void 0 || file.length === 0) return;
36
36
  try {
37
- fs.writeFileSync(file, JSON.stringify(toDeploymentSummary(result)));
37
+ fs$1.writeFileSync(file, JSON.stringify(toDeploymentSummary(result)));
38
38
  } catch {}
39
39
  }
40
40
  function isRecord(value) {
@@ -47,7 +47,7 @@ function isRecord(value) {
47
47
  function readDeploymentSummary(resultFilePath) {
48
48
  let raw;
49
49
  try {
50
- raw = fs.readFileSync(resultFilePath, "utf8");
50
+ raw = fs$1.readFileSync(resultFilePath, "utf8");
51
51
  } catch {
52
52
  return;
53
53
  }
@@ -67,4 +67,4 @@ function readDeploymentSummary(resultFilePath) {
67
67
  //#endregion
68
68
  export { readDeploymentSummary as n, writeDeploymentSummaryFile as r, DEPLOYMENT_RESULT_FILE_ENV as t };
69
69
 
70
- //# sourceMappingURL=deployment-summary-DswOl_9E-C03NJ98H.mjs.map
70
+ //# sourceMappingURL=deployment-summary-DswOl_9E-B9MhYYDt.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deployment-summary-DswOl_9E-B9MhYYDt.mjs","names":["fs"],"sources":["../../../0-framework/3-tooling/cli/dist/deployment-summary-DswOl_9E.mjs"],"sourcesContent":["import * as fs from \"node:fs\";\nimport { blindCast } from \"@internal/foundation/casts\";\n//#region src/deployment-summary.ts\n/**\n* The deploy result's cross-process protocol, whole in one place: the\n* serializable shape, the env var that names the carrier file, the writer the\n* report hook calls from inside the alchemy child, and the reader the deploy\n* operation runs after the child exits. `DeploymentResult` itself cannot\n* cross the boundary — its `DeployedNode` entries hold live graph-node\n* references (ADR-0033) — so the writer projects it down to what CAN.\n*\n* The summary is best-effort by contract: the writer never fails the child\n* over it, and the reader maps absent or malformed to `undefined`.\n*/\n/** Env var the deploy operation sets on the alchemy child: when present,\n* the report hook also writes the JSON DeploymentSummary there. */\nconst DEPLOYMENT_RESULT_FILE_ENV = \"PRISMA_COMPOSER_DEPLOYMENT_RESULT_FILE\";\n/** Pure projection: keeps app + each node's address/entities, drops the in-process `node`. */\nfunction toDeploymentSummary(result) {\n\treturn {\n\t\tapp: result.app,\n\t\tnodes: result.nodes.map((node) => ({\n\t\t\taddress: node.address,\n\t\t\tentities: node.entities\n\t\t}))\n\t};\n}\n/**\n* Writer half, called by the report hook inside the alchemy child: when the\n* env var names a file, write the summary there. Best-effort — a write\n* failure must not fail a deploy that already converged, so it is swallowed.\n*/\nfunction writeDeploymentSummaryFile(result) {\n\tconst file = process.env[DEPLOYMENT_RESULT_FILE_ENV];\n\tif (file === void 0 || file.length === 0) return;\n\ttry {\n\t\tfs.writeFileSync(file, JSON.stringify(toDeploymentSummary(result)));\n\t} catch {}\n}\nfunction isRecord(value) {\n\treturn typeof value === \"object\" && value !== null;\n}\n/**\n* Reader half, run by the deploy operation after the child exits. Absent or\n* malformed → undefined — the summary is best-effort, never a deploy failure.\n*/\nfunction readDeploymentSummary(resultFilePath) {\n\tlet raw;\n\ttry {\n\t\traw = fs.readFileSync(resultFilePath, \"utf8\");\n\t} catch {\n\t\treturn;\n\t}\n\tlet parsed;\n\ttry {\n\t\tparsed = JSON.parse(raw);\n\t} catch {\n\t\treturn;\n\t}\n\tif (!isRecord(parsed) || typeof parsed[\"app\"] !== \"string\" || !Array.isArray(parsed[\"nodes\"])) return;\n\tfor (const node of parsed[\"nodes\"]) {\n\t\tif (!isRecord(node) || typeof node[\"address\"] !== \"string\" || !Array.isArray(node[\"entities\"])) return;\n\t\tfor (const entity of node[\"entities\"]) if (!isRecord(entity) || typeof entity[\"kind\"] !== \"string\" || typeof entity[\"id\"] !== \"string\") return;\n\t}\n\treturn blindCast(parsed);\n}\n//#endregion\nexport { readDeploymentSummary as n, writeDeploymentSummaryFile as r, DEPLOYMENT_RESULT_FILE_ENV as t };\n\n//# sourceMappingURL=deployment-summary-DswOl_9E.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAgBA,MAAM,6BAA6B;;AAEnC,SAAS,oBAAoB,QAAQ;CACpC,OAAO;EACN,KAAK,OAAO;EACZ,OAAO,OAAO,MAAM,KAAK,UAAU;GAClC,SAAS,KAAK;GACd,UAAU,KAAK;EAChB,EAAE;CACH;AACD;;;;;;AAMA,SAAS,2BAA2B,QAAQ;CAC3C,MAAM,OAAO,QAAQ,IAAI;CACzB,IAAI,SAAS,KAAK,KAAK,KAAK,WAAW,GAAG;CAC1C,IAAI;EACH,KAAG,cAAc,MAAM,KAAK,UAAU,oBAAoB,MAAM,CAAC,CAAC;CACnE,QAAQ,CAAC;AACV;AACA,SAAS,SAAS,OAAO;CACxB,OAAO,OAAO,UAAU,YAAY,UAAU;AAC/C;;;;;AAKA,SAAS,sBAAsB,gBAAgB;CAC9C,IAAI;CACJ,IAAI;EACH,MAAMA,KAAG,aAAa,gBAAgB,MAAM;CAC7C,QAAQ;EACP;CACD;CACA,IAAI;CACJ,IAAI;EACH,SAAS,KAAK,MAAM,GAAG;CACxB,QAAQ;EACP;CACD;CACA,IAAI,CAAC,SAAS,MAAM,KAAK,OAAO,OAAO,WAAW,YAAY,CAAC,MAAM,QAAQ,OAAO,QAAQ,GAAG;CAC/F,KAAK,MAAM,QAAQ,OAAO,UAAU;EACnC,IAAI,CAAC,SAAS,IAAI,KAAK,OAAO,KAAK,eAAe,YAAY,CAAC,MAAM,QAAQ,KAAK,WAAW,GAAG;EAChG,KAAK,MAAM,UAAU,KAAK,aAAa,IAAI,CAAC,SAAS,MAAM,KAAK,OAAO,OAAO,YAAY,YAAY,OAAO,OAAO,UAAU,UAAU;CACzI;CACA,OAAO,UAAU,MAAM;AACxB"}
@@ -0,0 +1,42 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ //#region ../../0-framework/2-authoring/bundle-paths/dist/index.mjs
4
+ /**
5
+ * The path-containment predicate and bundle-link validation shared by every
6
+ * assembly and packaging seam (node/nextjs adapters, the compute artifact
7
+ * writer, the local extractor). This predicate is the enforcement point of
8
+ * ADR-0047's boundary — a symlink may be preserved only while its target
9
+ * stays inside the assembled bundle — so it exists exactly once.
10
+ */
11
+ /** Lexical containment: `candidate` is `root` itself or below it. Both paths
12
+ * must already be absolute or share a resolution base; no filesystem access. */
13
+ function isWithin(root, candidate) {
14
+ const relative = path.relative(root, candidate);
15
+ return relative === "" || !relative.startsWith(`..${path.sep}`) && relative !== ".." && !path.isAbsolute(relative);
16
+ }
17
+ /** Walks the assembled bundle and rejects a dangling symlink or one whose
18
+ * resolved target escapes the bundle root. Symlinked directories are not
19
+ * descended: their targets are validated, and their contents belong to the
20
+ * target's own location. */
21
+ async function assertBundleSymlinksStayInside(bundleDir) {
22
+ const realRoot = await fs.promises.realpath(bundleDir);
23
+ const walk = async (directory) => {
24
+ for (const entry of await fs.promises.readdir(directory, { withFileTypes: true })) {
25
+ const full = path.join(directory, entry.name);
26
+ if (entry.isSymbolicLink()) {
27
+ let realTarget;
28
+ try {
29
+ realTarget = await fs.promises.realpath(full);
30
+ } catch {
31
+ throw new Error(`the assembled bundle contains a dangling symlink: ${full}`);
32
+ }
33
+ if (!isWithin(realRoot, realTarget)) throw new Error(`the assembled bundle contains a symlink whose target escapes the bundle: ${full} -> ${await fs.promises.readlink(full)}`);
34
+ } else if (entry.isDirectory()) await walk(full);
35
+ }
36
+ };
37
+ await walk(bundleDir);
38
+ }
39
+ //#endregion
40
+ export { isWithin as n, assertBundleSymlinksStayInside as t };
41
+
42
+ //# sourceMappingURL=dist-CVk7Pk4B.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dist-CVk7Pk4B.mjs","names":[],"sources":["../../../0-framework/2-authoring/bundle-paths/dist/index.mjs"],"sourcesContent":["import fs from \"node:fs\";\nimport path from \"node:path\";\n//#region src/bundle-paths.ts\n/**\n* The path-containment predicate and bundle-link validation shared by every\n* assembly and packaging seam (node/nextjs adapters, the compute artifact\n* writer, the local extractor). This predicate is the enforcement point of\n* ADR-0047's boundary — a symlink may be preserved only while its target\n* stays inside the assembled bundle — so it exists exactly once.\n*/\n/** Lexical containment: `candidate` is `root` itself or below it. Both paths\n* must already be absolute or share a resolution base; no filesystem access. */\nfunction isWithin(root, candidate) {\n\tconst relative = path.relative(root, candidate);\n\treturn relative === \"\" || !relative.startsWith(`..${path.sep}`) && relative !== \"..\" && !path.isAbsolute(relative);\n}\n/** Walks the assembled bundle and rejects a dangling symlink or one whose\n* resolved target escapes the bundle root. Symlinked directories are not\n* descended: their targets are validated, and their contents belong to the\n* target's own location. */\nasync function assertBundleSymlinksStayInside(bundleDir) {\n\tconst realRoot = await fs.promises.realpath(bundleDir);\n\tconst walk = async (directory) => {\n\t\tfor (const entry of await fs.promises.readdir(directory, { withFileTypes: true })) {\n\t\t\tconst full = path.join(directory, entry.name);\n\t\t\tif (entry.isSymbolicLink()) {\n\t\t\t\tlet realTarget;\n\t\t\t\ttry {\n\t\t\t\t\trealTarget = await fs.promises.realpath(full);\n\t\t\t\t} catch {\n\t\t\t\t\tthrow new Error(`the assembled bundle contains a dangling symlink: ${full}`);\n\t\t\t\t}\n\t\t\t\tif (!isWithin(realRoot, realTarget)) throw new Error(`the assembled bundle contains a symlink whose target escapes the bundle: ${full} -> ${await fs.promises.readlink(full)}`);\n\t\t\t} else if (entry.isDirectory()) await walk(full);\n\t\t}\n\t};\n\tawait walk(bundleDir);\n}\n//#endregion\nexport { assertBundleSymlinksStayInside, isWithin };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,SAAS,SAAS,MAAM,WAAW;CAClC,MAAM,WAAW,KAAK,SAAS,MAAM,SAAS;CAC9C,OAAO,aAAa,MAAM,CAAC,SAAS,WAAW,KAAK,KAAK,KAAK,KAAK,aAAa,QAAQ,CAAC,KAAK,WAAW,QAAQ;AAClH;;;;;AAKA,eAAe,+BAA+B,WAAW;CACxD,MAAM,WAAW,MAAM,GAAG,SAAS,SAAS,SAAS;CACrD,MAAM,OAAO,OAAO,cAAc;EACjC,KAAK,MAAM,SAAS,MAAM,GAAG,SAAS,QAAQ,WAAW,EAAE,eAAe,KAAK,CAAC,GAAG;GAClF,MAAM,OAAO,KAAK,KAAK,WAAW,MAAM,IAAI;GAC5C,IAAI,MAAM,eAAe,GAAG;IAC3B,IAAI;IACJ,IAAI;KACH,aAAa,MAAM,GAAG,SAAS,SAAS,IAAI;IAC7C,QAAQ;KACP,MAAM,IAAI,MAAM,qDAAqD,MAAM;IAC5E;IACA,IAAI,CAAC,SAAS,UAAU,UAAU,GAAG,MAAM,IAAI,MAAM,4EAA4E,KAAK,MAAM,MAAM,GAAG,SAAS,SAAS,IAAI,GAAG;GAC/K,OAAO,IAAI,MAAM,YAAY,GAAG,MAAM,KAAK,IAAI;EAChD;CACD;CACA,MAAM,KAAK,SAAS;AACrB"}
@@ -1,12 +1,12 @@
1
1
  import { t as CliStructuredError } from "./errors-0e8IVwzi.mjs";
2
2
  import { t as containerEnv } from "./container-transport-DKmKg5JQ-DKWs0ubK.mjs";
3
- import { n as ok, r as okVoid, s as toStructured, t as notOk } from "./result-CY_TB7bn.mjs";
4
- import { a as writeRunReport, i as toRunReport, r as resolveRunReportPath, t as RUN_REPORT_FILE_ENV } from "./run-report-C2o98uD--CAfePImA.mjs";
5
- import { n as readDeploymentSummary, t as DEPLOYMENT_RESULT_FILE_ENV } from "./deployment-summary-DswOl_9E-C03NJ98H.mjs";
6
- import { n as spawnAlchemy, t as alchemyInvocation } from "./run-alchemy-D44OZlyB-gVq_0gf4.mjs";
7
- import { n as runPipeline } from "./pipeline-AoW8zq4I-CUon5KZH.mjs";
8
- import * as fs from "node:fs";
9
- import * as path from "node:path";
3
+ import { n as ok, r as okVoid, s as toStructured, t as notOk } from "./result-D95kAAek.mjs";
4
+ import { a as writeRunReport, i as toRunReport, r as resolveRunReportPath, t as RUN_REPORT_FILE_ENV } from "./run-report-C2o98uD--AX8kpz4Q.mjs";
5
+ import { n as readDeploymentSummary, t as DEPLOYMENT_RESULT_FILE_ENV } from "./deployment-summary-DswOl_9E-B9MhYYDt.mjs";
6
+ import { n as spawnAlchemy, t as alchemyInvocation } from "./run-alchemy-D44OZlyB-Cw5CVbUQ.mjs";
7
+ import { n as runPipeline } from "./pipeline-AoW8zq4I-Dg8xQ7nC.mjs";
8
+ import * as fs$1 from "node:fs";
9
+ import * as path$1 from "node:path";
10
10
  import { spawnSync } from "node:child_process";
11
11
  import { randomUUID } from "node:crypto";
12
12
  //#region ../../0-framework/3-tooling/cli/dist/generate-stack-BL6htaQb.mjs
@@ -15,7 +15,7 @@ const GENERATED_DIR = ".prisma-composer";
15
15
  const GENERATED_FILE = "alchemy.run.ts";
16
16
  /** A relative import specifier from `.prisma-composer/alchemy.run.ts` to `target` (posix separators). */
17
17
  function relativeImportSpecifier(generatedDir, target) {
18
- const rel = path.relative(generatedDir, target).split(path.sep).join("/");
18
+ const rel = path$1.relative(generatedDir, target).split(path$1.sep).join("/");
19
19
  return rel.startsWith(".") ? rel : `./${rel}`;
20
20
  }
21
21
  function quote(value) {
@@ -35,7 +35,7 @@ function renderOptions(input) {
35
35
  }
36
36
  /** Renders the stack module's source (tests assert on it without touching disk) — uses `//` headers, not a block comment, since a cwd path with a star-slash could close one early. */
37
37
  function renderStackFile(input) {
38
- const generatedDir = path.join(input.cwd, GENERATED_DIR);
38
+ const generatedDir = path$1.join(input.cwd, GENERATED_DIR);
39
39
  const appImport = relativeImportSpecifier(generatedDir, input.entryPath);
40
40
  const configImport = relativeImportSpecifier(generatedDir, input.configPath);
41
41
  return `// Generated by \`prisma-composer deploy\`/\`prisma-composer destroy\` — overwritten on every
@@ -56,13 +56,13 @@ ${renderOptions(input)}
56
56
  }
57
57
  /** Writes the stack file, returning its absolute path. */
58
58
  function writeStackFile(input) {
59
- const generatedDir = path.join(input.cwd, GENERATED_DIR);
60
- fs.mkdirSync(generatedDir, { recursive: true });
61
- const filePath = path.join(generatedDir, GENERATED_FILE);
62
- fs.writeFileSync(filePath, renderStackFile(input));
59
+ const generatedDir = path$1.join(input.cwd, GENERATED_DIR);
60
+ fs$1.mkdirSync(generatedDir, { recursive: true });
61
+ const filePath = path$1.join(generatedDir, GENERATED_FILE);
62
+ fs$1.writeFileSync(filePath, renderStackFile(input));
63
63
  return filePath;
64
64
  }
65
- const GENERATED_STACK_RELATIVE_PATH = path.join(GENERATED_DIR, GENERATED_FILE);
65
+ const GENERATED_STACK_RELATIVE_PATH = path$1.join(GENERATED_DIR, GENERATED_FILE);
66
66
  //#endregion
67
67
  //#region ../../0-framework/3-tooling/cli/dist/execute-deploy-destroy-DRl6Tfg9.mjs
68
68
  /** A stage name must be a valid git ref (deploy-cli.md) — checked via `git check-ref-format`, never silently normalized. Runs before anything platform-specific. */
@@ -81,8 +81,8 @@ function validateStageName(stage) {
81
81
  const ALCHEMY_STATE_DIR = ".alchemy";
82
82
  /** Destroy guardrail (moved from main.ts): true when `<cwd>/.alchemy` is missing or empty — likely wrong directory or nothing deployed yet. */
83
83
  function hasNoLocalDeployState(cwd) {
84
- const stateDir = path.join(cwd, ALCHEMY_STATE_DIR);
85
- return !(fs.existsSync(stateDir) && fs.readdirSync(stateDir).length > 0);
84
+ const stateDir = path$1.join(cwd, ALCHEMY_STATE_DIR);
85
+ return !(fs$1.existsSync(stateDir) && fs$1.readdirSync(stateDir).length > 0);
86
86
  }
87
87
  async function executeDeploy(input, deps, cwd) {
88
88
  const outcome = await runStackPipeline("deploy", {
@@ -304,7 +304,7 @@ async function runStackPipelineInner(action, opts, reporters) {
304
304
  throw error;
305
305
  }
306
306
  let stackPath;
307
- const resultFilePath = path.join(cwd, ".prisma-composer", `deployment-result-${String(process.pid)}-${randomUUID()}.json`);
307
+ const resultFilePath = path$1.join(cwd, ".prisma-composer", `deployment-result-${String(process.pid)}-${randomUUID()}.json`);
308
308
  try {
309
309
  try {
310
310
  stackPath = writeStackFile({
@@ -395,11 +395,11 @@ async function runStackPipelineInner(action, opts, reporters) {
395
395
  return ok(void 0);
396
396
  } finally {
397
397
  try {
398
- fs.rmSync(resultFilePath, { force: true });
398
+ fs$1.rmSync(resultFilePath, { force: true });
399
399
  } catch {}
400
400
  }
401
401
  }
402
402
  //#endregion
403
403
  export { executeDeploy, executeDestroy };
404
404
 
405
- //# sourceMappingURL=execute-deploy-destroy-DRl6Tfg9-ktj5sQsO.mjs.map
405
+ //# sourceMappingURL=execute-deploy-destroy-DRl6Tfg9-B8LE2Lh5.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execute-deploy-destroy-DRl6Tfg9-B8LE2Lh5.mjs","names":["path","path","fs"],"sources":["../../../0-framework/3-tooling/cli/dist/generate-stack-BL6htaQb.mjs","../../../0-framework/3-tooling/cli/dist/execute-deploy-destroy-DRl6Tfg9.mjs"],"sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\n//#region src/generate-stack.ts\n/** Pipeline step 6: writes a regenerated-every-run, independently runnable stack module at `.prisma-composer/alchemy.run.ts`. */\nconst GENERATED_DIR = \".prisma-composer\";\nconst GENERATED_FILE = \"alchemy.run.ts\";\n/** A relative import specifier from `.prisma-composer/alchemy.run.ts` to `target` (posix separators). */\nfunction relativeImportSpecifier(generatedDir, target) {\n\tconst rel = path.relative(generatedDir, target).split(path.sep).join(\"/\");\n\treturn rel.startsWith(\".\") ? rel : `./${rel}`;\n}\nfunction quote(value) {\n\treturn JSON.stringify(value);\n}\nfunction renderBundle(bundle) {\n\treturn `{ dir: ${quote(bundle.dir)}, entry: ${quote(bundle.entry)} }`;\n}\nfunction renderOptions(input) {\n\tconst lines = [];\n\tlines.push(` name: ${quote(input.name)},`);\n\tlines.push(\" bundles: {\");\n\tfor (const [id, bundle] of Object.entries(input.assembled.bundles)) lines.push(` ${quote(id)}: ${renderBundle(bundle)},`);\n\tlines.push(\" },\");\n\tlines.push(\" report: deploymentReport,\");\n\treturn lines.join(\"\\n\");\n}\n/** Renders the stack module's source (tests assert on it without touching disk) — uses `//` headers, not a block comment, since a cwd path with a star-slash could close one early. */\nfunction renderStackFile(input) {\n\tconst generatedDir = path.join(input.cwd, GENERATED_DIR);\n\tconst appImport = relativeImportSpecifier(generatedDir, input.entryPath);\n\tconst configImport = relativeImportSpecifier(generatedDir, input.configPath);\n\treturn `// Generated by \\`prisma-composer deploy\\`/\\`prisma-composer destroy\\` — overwritten on every\n// run; do not edit by hand. Independently runnable from ${quote(input.cwd)}:\n//\n// alchemy deploy ${GENERATED_DIR}/${GENERATED_FILE}\n//\n// bisects a CLI bug from an Alchemy bug (deploy-cli.md § Implementation decisions).\nimport { lower } from '@prisma/composer/deploy';\nimport { deploymentReport } from '@prisma/composer/report';\nimport config from ${quote(configImport)};\nimport app from ${quote(appImport)};\n\nexport default lower(app, config, {\n${renderOptions(input)}\n});\n`;\n}\n/** Writes the stack file, returning its absolute path. */\nfunction writeStackFile(input) {\n\tconst generatedDir = path.join(input.cwd, GENERATED_DIR);\n\tfs.mkdirSync(generatedDir, { recursive: true });\n\tconst filePath = path.join(generatedDir, GENERATED_FILE);\n\tfs.writeFileSync(filePath, renderStackFile(input));\n\treturn filePath;\n}\nconst GENERATED_STACK_RELATIVE_PATH = path.join(GENERATED_DIR, GENERATED_FILE);\n//#endregion\nexport { renderStackFile as n, writeStackFile as r, GENERATED_STACK_RELATIVE_PATH as t };\n\n//# sourceMappingURL=generate-stack-BL6htaQb.mjs.map","import { r as toStructured } from \"./shared-BTnATsqm.mjs\";\nimport { i as spawnAlchemy, n as alchemyInvocation } from \"./run-alchemy-D44OZlyB.mjs\";\nimport { r as writeStackFile, t as GENERATED_STACK_RELATIVE_PATH } from \"./generate-stack-BL6htaQb.mjs\";\nimport { n as readDeploymentSummary, t as DEPLOYMENT_RESULT_FILE_ENV } from \"./deployment-summary-DswOl_9E.mjs\";\nimport { a as writeRunReport, i as toRunReport, r as resolveRunReportPath, t as RUN_REPORT_FILE_ENV } from \"./run-report-C2o98uD-.mjs\";\nimport { n as runPipeline } from \"./pipeline-AoW8zq4I.mjs\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { notOk, ok, okVoid } from \"@internal/foundation/result\";\nimport { spawnSync } from \"node:child_process\";\nimport { randomUUID } from \"node:crypto\";\nimport { containerEnv } from \"@internal/core/config\";\n//#region src/validate-stage.ts\n/** A stage name must be a valid git ref (deploy-cli.md) — checked via `git check-ref-format`, never silently normalized. Runs before anything platform-specific. */\nfunction validateStageName(stage) {\n\tconst result = spawnSync(\"git\", [\"check-ref-format\", `refs/heads/${stage}`], { stdio: \"ignore\" });\n\tif (result.error) throw new CliStructuredError(\"DEPLOY.STAGE_UNVALIDATABLE\", `git is required to validate --stage \"${stage}\" (git check-ref-format): ${result.error.message}.`, { cause: result.error });\n\tif (result.status !== 0) throw new CliStructuredError(\"DEPLOY.STAGE_INVALID\", `Invalid --stage \"${stage}\": must be a valid git ref name (git check-ref-format rejected \"refs/heads/${stage}\").`);\n}\n//#endregion\n//#region src/operations/execute-deploy-destroy.ts\n/**\n* The deploy/destroy executor — main.ts's pipeline orchestration with argv,\n* console, and exit codes removed: typed inputs in, structured results out.\n* Reached only by lazy import from deploy.ts/destroy.ts — this module's\n* static graph transitively loads alchemy's provider tree, so the control\n* entry must never import it statically.\n*/\nconst ALCHEMY_STATE_DIR = \".alchemy\";\n/** Destroy guardrail (moved from main.ts): true when `<cwd>/.alchemy` is missing or empty — likely wrong directory or nothing deployed yet. */\nfunction hasNoLocalDeployState(cwd) {\n\tconst stateDir = path.join(cwd, ALCHEMY_STATE_DIR);\n\treturn !(fs.existsSync(stateDir) && fs.readdirSync(stateDir).length > 0);\n}\nasync function executeDeploy(input, deps, cwd) {\n\tconst outcome = await runStackPipeline(\"deploy\", {\n\t\tentry: input.entry,\n\t\tname: input.name,\n\t\tstage: input.stage,\n\t\tcwd,\n\t\tonEvent: void 0,\n\t\tdeps,\n\t\treportId: input.reportId\n\t});\n\tconst reportPath = resolveRunReportPath(input.reportPath, process.env[RUN_REPORT_FILE_ENV], cwd);\n\tif (reportPath !== void 0) writeRunReport(reportPath, toRunReport({\n\t\tsummary: outcome.ok ? outcome.value : void 0,\n\t\tstage: input.stage,\n\t\tfailure: outcome.ok ? void 0 : {\n\t\t\tcode: outcome.failure.code,\n\t\t\tmessage: outcome.failure.message\n\t\t}\n\t}));\n\tif (!outcome.ok) return outcome;\n\treturn ok({ summary: outcome.value });\n}\nasync function executeDestroy(input, deps, cwd) {\n\tconst outcome = await runStackPipeline(\"destroy\", {\n\t\tentry: input.entry,\n\t\tname: input.name,\n\t\tstage: input.target.kind === \"stage\" ? input.target.stage : void 0,\n\t\tcwd,\n\t\tonEvent: input.onEvent,\n\t\tdeps,\n\t\treportId: void 0\n\t});\n\tif (!outcome.ok) return outcome;\n\treturn okVoid();\n}\n/**\n* Opens a session per extension that declares a reporter. A `begin` that\n* throws costs that extension its reporting and nothing else — the deploy\n* has not started, and refusing to run it because an observer failed would\n* invert the relationship.\n*/\nasync function beginReporters(extensions, context) {\n\treturn (await Promise.all(extensions.map(async (extension) => {\n\t\tif (extension.reporter === void 0) return void 0;\n\t\ttry {\n\t\t\tconst reporter = await extension.reporter.begin(context);\n\t\t\treturn reporter === void 0 ? void 0 : {\n\t\t\t\textensionId: extension.id,\n\t\t\t\treporter\n\t\t\t};\n\t\t} catch (error) {\n\t\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\t\tconsole.warn(`\\nCould not start deploy reporting for ${extension.id}: ${detail}`);\n\t\t\treturn;\n\t\t}\n\t}))).filter((entry) => entry !== void 0);\n}\n/** Hands each session its own extension's resolved container, so it can attach the run to what that container names. */\nasync function attachReporters(reporters, containers) {\n\tawait Promise.all(reporters.map(async ({ extensionId, reporter }) => {\n\t\ttry {\n\t\t\tawait reporter.attach({ container: containers.get(extensionId) });\n\t\t} catch (error) {\n\t\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\t\tconsole.warn(`\\nCould not attach this deploy to its project for ${extensionId}: ${detail}`);\n\t\t}\n\t}));\n}\n/** Every session's contribution to the alchemy child's environment, so reporting that happens inside the apply can find the run. */\nfunction reporterChildEnv(reporters) {\n\tconst env = {};\n\tfor (const { extensionId, reporter } of reporters) try {\n\t\tObject.assign(env, reporter.childEnv());\n\t} catch (error) {\n\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\tconsole.warn(`\\nCould not pass deploy reporting into the apply for ${extensionId}: ${detail}`);\n\t}\n\treturn env;\n}\n/** `failingStep` is capped at 500 by the platform and `errorMessage` at 5000; truncating here keeps a long message from costing the whole report. */\nfunction truncate(value, limit) {\n\treturn value.length <= limit ? value : `${value.slice(0, limit - 1)}…`;\n}\n/** An interrupted converge (the engine settled a Ctrl-C) — reported as `cancelled`, never as `failed`. */\nfunction wasInterrupted(failure) {\n\treturn typeof failure.meta?.[\"signal\"] === \"string\";\n}\n/**\n* Ends every reporting session, whatever the run did. Sessions never reject\n* by contract, but a buggy one must not turn a converged deploy into a\n* failure — so this swallows anyway, and reports each session independently\n* so one bad implementation cannot silence another.\n*/\nasync function finishReporters(reporters, outcome) {\n\tconst entities = outcome.summary?.nodes.flatMap((node) => node.entities) ?? [];\n\tawait Promise.all(reporters.map(async ({ reporter }) => {\n\t\ttry {\n\t\t\tawait reporter.finish({\n\t\t\t\tok: outcome.ok,\n\t\t\t\tcancelled: outcome.cancelled,\n\t\t\t\tfailingStep: outcome.code === void 0 ? void 0 : truncate(outcome.code, 500),\n\t\t\t\terrorMessage: outcome.message === void 0 ? void 0 : truncate(outcome.message, 5e3),\n\t\t\t\tentities\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\t\tconsole.warn(`\\nCould not report this deploy's outcome: ${detail}`);\n\t\t}\n\t}));\n}\n/**\n* Owns the reporting sessions around the pipeline: the inner run opens them\n* once it knows which extensions are configured, and this closes them on\n* every exit path — a returned failure, a success, or a thrown defect.\n* Nothing here can change what the pipeline returns.\n*/\nasync function runStackPipeline(action, opts) {\n\tconst reporters = [];\n\tlet outcome;\n\ttry {\n\t\toutcome = await runStackPipelineInner(action, opts, reporters);\n\t} catch (error) {\n\t\tawait finishReporters(reporters, {\n\t\t\tok: false,\n\t\t\tcancelled: false,\n\t\t\tcode: \"DEPLOY.UNEXPECTED\",\n\t\t\tmessage: error instanceof Error ? error.message : String(error)\n\t\t});\n\t\tthrow error;\n\t}\n\tawait finishReporters(reporters, outcome.ok ? {\n\t\tok: true,\n\t\tcancelled: false,\n\t\tsummary: outcome.value\n\t} : {\n\t\tok: false,\n\t\tcancelled: wasInterrupted(outcome.failure),\n\t\tcode: outcome.failure.code,\n\t\tmessage: outcome.failure.message\n\t});\n\treturn outcome;\n}\n/** The pipeline both actions share: validate, resolve containers, preflight,\n* write the stack file, run alchemy against it, then the destroy-only\n* teardown/removal suffix. The value is only ever a summary for deploy. */\nasync function runStackPipelineInner(action, opts, reporters) {\n\tconst { entry, name, stage, cwd, onEvent, deps } = opts;\n\tif (stage !== void 0) try {\n\t\tvalidateStageName(stage);\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\tthrow error;\n\t}\n\tif (action === \"destroy\" && hasNoLocalDeployState(cwd)) onEvent?.({\n\t\tkind: \"no-local-deploy-state\",\n\t\tcwd\n\t});\n\tlet pipeline;\n\tlet containers;\n\tlet alchemyStage;\n\ttry {\n\t\tpipeline = await runPipeline(entry, name, cwd, {\n\t\t\trunAssembler: deps.runAssembler,\n\t\t\tconfig: deps.config,\n\t\t\tconfigPath: deps.configPath\n\t\t}, action === \"destroy\" ? (error) => new CliStructuredError(\"DEPLOY.BUILD_REQUIRED\", error.message, {\n\t\t\twhy: \"destroy evaluates the same stack program as deploy, which packages the built artifacts — so the app must be built first.\",\n\t\t\tfix: \"Run the build, then retry the destroy.\",\n\t\t\tcause: error\n\t\t}) : void 0);\n\t\tconst { config, graph, name: resolvedName } = pipeline;\n\t\tif (action === \"deploy\") reporters.push(...await beginReporters(config.extensions, {\n\t\t\tappName: resolvedName,\n\t\t\tstage,\n\t\t\tcwd,\n\t\t\treportId: opts.reportId,\n\t\t\tcredentials: deps.credentials\n\t\t}));\n\t\tcontainers = /* @__PURE__ */ new Map();\n\t\tfor (const extension of config.extensions) {\n\t\t\tif (extension.container === void 0) continue;\n\t\t\ttry {\n\t\t\t\tif (action === \"deploy\") containers.set(extension.id, await extension.container.ensure({\n\t\t\t\t\tappName: resolvedName,\n\t\t\t\t\tstage\n\t\t\t\t}, deps.credentials));\n\t\t\t\telse {\n\t\t\t\t\tconst instance = await extension.container.locate({\n\t\t\t\t\t\tappName: resolvedName,\n\t\t\t\t\t\tstage\n\t\t\t\t\t}, deps.credentials);\n\t\t\t\t\tif (instance === void 0) throw new CliStructuredError(\"DEPLOY.TARGET_NOT_FOUND\", `Nothing deployed for ${resolvedName}${stage !== void 0 ? `/${stage}` : \"\"}.`, { fix: \"Deploy it first.\" });\n\t\t\t\t\tcontainers.set(extension.id, instance);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tthrow toStructured(\"DEPLOY.CONTAINER_FAILED\", error);\n\t\t\t}\n\t\t}\n\t\tawait attachReporters(reporters, containers);\n\t\tconst pinnedStage = containers.get(config.state.extension)?.alchemyStage ?? stage;\n\t\tif (pinnedStage === void 0) throw new CliStructuredError(\"DEPLOY.SCOPE_MISSING\", \"The configured deploy target supplied no deploy scope (its container defines no alchemyStage), so Alchemy has no stage to run under.\", { fix: action === \"deploy\" ? \"Pass --stage <name> to choose the deploy scope explicitly.\" : \"destroy --production needs a target whose container supplies the production deploy scope.\" });\n\t\talchemyStage = pinnedStage;\n\t\tif (action === \"deploy\") for (const extension of config.extensions) {\n\t\t\tif (extension.preflight === void 0) continue;\n\t\t\ttry {\n\t\t\t\tawait extension.preflight({\n\t\t\t\t\tgraph,\n\t\t\t\t\tcontainer: containers.get(extension.id),\n\t\t\t\t\tstage,\n\t\t\t\t\tcredentials: deps.credentials\n\t\t\t\t});\n\t\t\t} catch (error) {\n\t\t\t\tthrow toStructured(\"DEPLOY.PREFLIGHT_FAILED\", error);\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\tthrow error;\n\t}\n\tlet stackPath;\n\tconst resultFilePath = path.join(cwd, \".prisma-composer\", `deployment-result-${String(process.pid)}-${randomUUID()}.json`);\n\ttry {\n\t\ttry {\n\t\t\tstackPath = writeStackFile({\n\t\t\t\tentryPath: pipeline.entryModule.path,\n\t\t\t\tcwd,\n\t\t\t\tconfigPath: pipeline.configPath,\n\t\t\t\tname: pipeline.name,\n\t\t\t\tassembled: pipeline.assembled\n\t\t\t});\n\t\t} catch (error) {\n\t\t\treturn notOk(toStructured(\"DEPLOY.STACK_WRITE_FAILED\", error));\n\t\t}\n\t\tconst reproduceCommand = `alchemy ${action} ${GENERATED_STACK_RELATIVE_PATH} --yes --stage ${alchemyStage}`;\n\t\tlet outcome;\n\t\ttry {\n\t\t\toutcome = await (deps.alchemy ?? spawnAlchemy)(alchemyInvocation({\n\t\t\t\tcommand: action,\n\t\t\t\tstackFileRelativePath: GENERATED_STACK_RELATIVE_PATH,\n\t\t\t\tcwd,\n\t\t\t\tstage: alchemyStage,\n\t\t\t\tcontainerEnv: containerEnv(containers),\n\t\t\t\tenv: {\n\t\t\t\t\t...reporterChildEnv(reporters),\n\t\t\t\t\t[DEPLOYMENT_RESULT_FILE_ENV]: resultFilePath\n\t\t\t\t}\n\t\t\t}));\n\t\t} catch (error) {\n\t\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\t\treturn notOk(new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", error instanceof Error ? error.message : String(error), {\n\t\t\t\tcause: error,\n\t\t\t\tmeta: { diagnostics: {\n\t\t\t\t\texitCode: void 0,\n\t\t\t\t\tstackFilePath: stackPath,\n\t\t\t\t\treproduceCommand,\n\t\t\t\t\tcwd\n\t\t\t\t} }\n\t\t\t}));\n\t\t}\n\t\tif (outcome.signal !== null) return notOk(new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", `alchemy ${action} was interrupted by ${outcome.signal}.`, { meta: {\n\t\t\tsignal: outcome.signal,\n\t\t\tdiagnostics: {\n\t\t\t\texitCode: void 0,\n\t\t\t\tsignal: outcome.signal,\n\t\t\t\tstackFilePath: stackPath,\n\t\t\t\treproduceCommand,\n\t\t\t\tcwd\n\t\t\t}\n\t\t} }));\n\t\tconst status = outcome.exitCode ?? 1;\n\t\tif (status !== 0) return notOk(new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", `alchemy ${action} exited with status ${status}.`, { meta: {\n\t\t\texitCode: status,\n\t\t\tdiagnostics: {\n\t\t\t\texitCode: status,\n\t\t\t\tstackFilePath: stackPath,\n\t\t\t\treproduceCommand,\n\t\t\t\tcwd\n\t\t\t}\n\t\t} }));\n\t\ttry {\n\t\t\tif (action === \"destroy\") {\n\t\t\t\tfor (const extension of pipeline.config.extensions) {\n\t\t\t\t\tif (extension.teardown === void 0) continue;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait extension.teardown({\n\t\t\t\t\t\t\tcontainer: containers.get(extension.id),\n\t\t\t\t\t\t\tstage\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tthrow toStructured(\"DEPLOY.TEARDOWN_FAILED\", error);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (const extension of pipeline.config.extensions) {\n\t\t\t\t\tif (extension.container === void 0) continue;\n\t\t\t\t\tconst instance = containers.get(extension.id);\n\t\t\t\t\tif (instance === void 0) continue;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait extension.container.remove(instance, deps.credentials);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tthrow toStructured(\"DEPLOY.CONTAINER_REMOVE_FAILED\", error);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\t\tthrow error;\n\t\t}\n\t\tif (action === \"deploy\") return ok(readDeploymentSummary(resultFilePath));\n\t\treturn ok(void 0);\n\t} finally {\n\t\ttry {\n\t\t\tfs.rmSync(resultFilePath, { force: true });\n\t\t} catch {}\n\t}\n}\n//#endregion\nexport { executeDeploy, executeDestroy };\n\n//# sourceMappingURL=execute-deploy-destroy-DRl6Tfg9.mjs.map"],"mappings":";;;;;;;;;;;;;AAIA,MAAM,gBAAgB;AACtB,MAAM,iBAAiB;;AAEvB,SAAS,wBAAwB,cAAc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;KAC5C,IAAI,aAAa,KAAK,GAAG;KACzB,IAAI;MACH,MAAM,UAAU,UAAU,OAAO,UAAU,KAAK,WAAW;KAC5D,SAAS,OAAO;MACf,MAAM,aAAa,kCAAkC,KAAK;KAC3D;IACD;GACD;EACD,SAAS,OAAO;GACf,IAAI,mBAAmB,GAAG,KAAK,GAAG,OAAO,MAAM,KAAK;GACpD,MAAM;EACP;EACA,IAAI,WAAW,UAAU,OAAO,GAAG,sBAAsB,cAAc,CAAC;EACxE,OAAO,GAAG,KAAK,CAAC;CACjB,UAAU;EACT,IAAI;GACH,KAAG,OAAO,gBAAgB,EAAE,OAAO,KAAK,CAAC;EAC1C,QAAQ,CAAC;CACV;AACD"}
@@ -1,21 +1,21 @@
1
1
  import { t as CliStructuredError } from "./errors-0e8IVwzi.mjs";
2
2
  import { t as containerEnv } from "./container-transport-DKmKg5JQ-DKWs0ubK.mjs";
3
3
  import { t as DEV_DIR } from "./app-config-joXc-BKm-CdcXqNMD.mjs";
4
- import { n as ok, s as toStructured, t as notOk } from "./result-CY_TB7bn.mjs";
4
+ import { n as ok, s as toStructured, t as notOk } from "./result-D95kAAek.mjs";
5
5
  import { n as resolveLocalTargets } from "./local-target-DnA2E8IN.mjs";
6
- import { n as spawnAlchemy, t as alchemyInvocation } from "./run-alchemy-D44OZlyB-gVq_0gf4.mjs";
7
- import { n as runPipeline } from "./pipeline-AoW8zq4I-CUon5KZH.mjs";
6
+ import { n as spawnAlchemy, t as alchemyInvocation } from "./run-alchemy-D44OZlyB-Cw5CVbUQ.mjs";
7
+ import { n as runPipeline } from "./pipeline-AoW8zq4I-Dg8xQ7nC.mjs";
8
8
  import { t as withEmulatorRetry } from "./emulator-retry-DGonap4g-S8BNrXFD.mjs";
9
- import * as fs from "node:fs";
10
- import * as path from "node:path";
9
+ import * as fs$1 from "node:fs";
10
+ import * as path$1 from "node:path";
11
11
  import { join, relative, resolve, sep } from "node:path";
12
- import { stat, unwatchFile, watch, watchFile } from "fs";
13
- import { lstat, open, readdir, realpath, stat as stat$1 } from "fs/promises";
14
- import { EventEmitter } from "events";
15
12
  import * as sysPath from "path";
16
- import { lstat as lstat$1, readdir as readdir$1, realpath as realpath$1, stat as stat$2 } from "node:fs/promises";
13
+ import { stat, unwatchFile, watch, watchFile } from "fs";
17
14
  import { Readable } from "node:stream";
15
+ import { lstat, readdir, realpath, stat as stat$1 } from "node:fs/promises";
18
16
  import { type } from "os";
17
+ import { EventEmitter } from "events";
18
+ import { lstat as lstat$1, open, readdir as readdir$1, realpath as realpath$1, stat as stat$2 } from "fs/promises";
19
19
  //#region ../../0-framework/3-tooling/cli/node_modules/readdirp/esm/index.js
20
20
  const EntryTypes = {
21
21
  FILE_TYPE: "files",
@@ -89,7 +89,7 @@ var ReaddirpStream = class extends Readable {
89
89
  const { root, type } = opts;
90
90
  this._fileFilter = normalizeFilter(opts.fileFilter);
91
91
  this._directoryFilter = normalizeFilter(opts.directoryFilter);
92
- const statMethod = opts.lstat ? lstat$1 : stat$2;
92
+ const statMethod = opts.lstat ? lstat : stat$1;
93
93
  if (wantBigintFsStats) this._stat = (path) => statMethod(path, { bigint: true });
94
94
  else this._stat = statMethod;
95
95
  this._maxDepth = opts.depth ?? defaultOptions.depth;
@@ -154,7 +154,7 @@ var ReaddirpStream = class extends Readable {
154
154
  async _exploreDir(path, depth) {
155
155
  let files;
156
156
  try {
157
- files = await readdir$1(path, this._rdOptions);
157
+ files = await readdir(path, this._rdOptions);
158
158
  } catch (error) {
159
159
  this._onError(error);
160
160
  }
@@ -193,8 +193,8 @@ var ReaddirpStream = class extends Readable {
193
193
  if (stats && stats.isSymbolicLink()) {
194
194
  const full = entry.fullPath;
195
195
  try {
196
- const entryRealPath = await realpath$1(full);
197
- const entryRealPathStats = await lstat$1(entryRealPath);
196
+ const entryRealPath = await realpath(full);
197
+ const entryRealPathStats = await lstat(entryRealPath);
198
198
  if (entryRealPathStats.isFile()) return "file";
199
199
  if (entryRealPathStats.isDirectory()) {
200
200
  const len = entryRealPath.length;
@@ -257,8 +257,8 @@ const EVENTS = {
257
257
  const EV = EVENTS;
258
258
  const THROTTLE_MODE_WATCH = "watch";
259
259
  const statMethods = {
260
- lstat,
261
- stat: stat$1
260
+ lstat: lstat$1,
261
+ stat: stat$2
262
262
  };
263
263
  const KEY_LISTENERS = "listeners";
264
264
  const KEY_ERR = "errHandlers";
@@ -740,7 +740,7 @@ var NodeFsHandler = class {
740
740
  const listener = async (path, newStats) => {
741
741
  if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5)) return;
742
742
  if (!newStats || newStats.mtimeMs === 0) try {
743
- const newStats = await stat$1(file);
743
+ const newStats = await stat$2(file);
744
744
  if (this.fsw.closed) return;
745
745
  const at = newStats.atimeMs;
746
746
  const mt = newStats.mtimeMs;
@@ -784,7 +784,7 @@ var NodeFsHandler = class {
784
784
  this.fsw._incrReadyCount();
785
785
  let linkPath;
786
786
  try {
787
- linkPath = await realpath(path);
787
+ linkPath = await realpath$1(path);
788
788
  } catch (e) {
789
789
  this.fsw._emitReady();
790
790
  return true;
@@ -918,13 +918,13 @@ var NodeFsHandler = class {
918
918
  let closer;
919
919
  if (stats.isDirectory()) {
920
920
  const absPath = sysPath.resolve(path);
921
- const targetPath = follow ? await realpath(path) : path;
921
+ const targetPath = follow ? await realpath$1(path) : path;
922
922
  if (this.fsw.closed) return;
923
923
  closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
924
924
  if (this.fsw.closed) return;
925
925
  if (absPath !== targetPath && targetPath !== void 0) this.fsw._symlinkPaths.set(absPath, targetPath);
926
926
  } else if (stats.isSymbolicLink()) {
927
- const targetPath = follow ? await realpath(path) : path;
927
+ const targetPath = follow ? await realpath$1(path) : path;
928
928
  if (this.fsw.closed) return;
929
929
  const parent = sysPath.dirname(wh.watchPath);
930
930
  this.fsw._getWatchedDir(parent).add(wh.watchPath);
@@ -1046,7 +1046,7 @@ var DirEntry = class {
1046
1046
  if (items.size > 0) return;
1047
1047
  const dir = this.path;
1048
1048
  try {
1049
- await readdir(dir);
1049
+ await readdir$1(dir);
1050
1050
  } catch (err) {
1051
1051
  if (this._removeWatcher) this._removeWatcher(sysPath.dirname(dir), sysPath.basename(dir));
1052
1052
  }
@@ -1332,7 +1332,7 @@ var FSWatcher = class extends EventEmitter {
1332
1332
  const fullPath = opts.cwd ? sysPath.join(opts.cwd, path) : path;
1333
1333
  let stats;
1334
1334
  try {
1335
- stats = await stat$1(fullPath);
1335
+ stats = await stat$2(fullPath);
1336
1336
  } catch (err) {}
1337
1337
  if (!stats || this.closed) return;
1338
1338
  args.push(stats);
@@ -1581,7 +1581,7 @@ const DEV_GENERATED_DIR = ".prisma-composer/dev";
1581
1581
  const DEV_GENERATED_FILE = "alchemy.run.ts";
1582
1582
  /** A relative import specifier from `.prisma-composer/dev/alchemy.run.ts` to `target` (posix separators). */
1583
1583
  function relativeImportSpecifier(generatedDir, target) {
1584
- const rel = path.relative(generatedDir, target).split(path.sep).join("/");
1584
+ const rel = path$1.relative(generatedDir, target).split(path$1.sep).join("/");
1585
1585
  return rel.startsWith(".") ? rel : `./${rel}`;
1586
1586
  }
1587
1587
  function quote(value) {
@@ -1602,7 +1602,7 @@ function renderOptions(input) {
1602
1602
  }
1603
1603
  /** Renders the dev stack module's source (tests assert on it without touching disk). */
1604
1604
  function renderDevStackFile(input) {
1605
- const generatedDir = path.join(input.cwd, DEV_GENERATED_DIR);
1605
+ const generatedDir = path$1.join(input.cwd, DEV_GENERATED_DIR);
1606
1606
  const appImport = relativeImportSpecifier(generatedDir, input.entryPath);
1607
1607
  const configImport = relativeImportSpecifier(generatedDir, input.configPath);
1608
1608
  return `// Generated by \`prisma-composer dev\` — overwritten on every run; do not
@@ -1630,13 +1630,13 @@ ${renderOptions(input)}
1630
1630
  }
1631
1631
  /** Writes the dev stack file, returning its absolute path. */
1632
1632
  function writeDevStackFile(input) {
1633
- const generatedDir = path.join(input.cwd, DEV_GENERATED_DIR);
1634
- fs.mkdirSync(generatedDir, { recursive: true });
1635
- const filePath = path.join(generatedDir, DEV_GENERATED_FILE);
1636
- fs.writeFileSync(filePath, renderDevStackFile(input));
1633
+ const generatedDir = path$1.join(input.cwd, DEV_GENERATED_DIR);
1634
+ fs$1.mkdirSync(generatedDir, { recursive: true });
1635
+ const filePath = path$1.join(generatedDir, DEV_GENERATED_FILE);
1636
+ fs$1.writeFileSync(filePath, renderDevStackFile(input));
1637
1637
  return filePath;
1638
1638
  }
1639
- const DEV_STACK_RELATIVE_PATH = path.join(DEV_GENERATED_DIR, DEV_GENERATED_FILE);
1639
+ const DEV_STACK_RELATIVE_PATH = path$1.join(DEV_GENERATED_DIR, DEV_GENERATED_FILE);
1640
1640
  /**
1641
1641
  * Local-dev spec § 6 `watch.ts`: watches each assembled bundle's declared
1642
1642
  * `watch` paths (a directory watched recursively, a file watched through
@@ -1703,15 +1703,15 @@ function startWatch(targets, onChange, onError) {
1703
1703
  const directoryRoots = /* @__PURE__ */ new Set();
1704
1704
  const parentRoots = /* @__PURE__ */ new Set();
1705
1705
  for (const target of targets) for (const p of target.paths) {
1706
- const abs = path.resolve(p);
1706
+ const abs = path$1.resolve(p);
1707
1707
  let isDirectory = false;
1708
1708
  try {
1709
- isDirectory = fs.statSync(abs).isDirectory();
1709
+ isDirectory = fs$1.statSync(abs).isDirectory();
1710
1710
  } catch {}
1711
1711
  if (isDirectory) directoryRoots.add(abs);
1712
1712
  else {
1713
1713
  fileTargets.add(abs);
1714
- parentRoots.add(path.dirname(abs));
1714
+ parentRoots.add(path$1.dirname(abs));
1715
1715
  }
1716
1716
  }
1717
1717
  const reportError = (error) => {
@@ -1730,7 +1730,7 @@ function startWatch(targets, onChange, onError) {
1730
1730
  depth: 0
1731
1731
  });
1732
1732
  parentWatcher.on("all", (_event, eventPath) => {
1733
- if (fileTargets.has(path.resolve(eventPath))) trigger();
1733
+ if (fileTargets.has(path$1.resolve(eventPath))) trigger();
1734
1734
  });
1735
1735
  parentWatcher.on("error", reportError);
1736
1736
  watchers.push(parentWatcher);
@@ -1764,7 +1764,7 @@ async function mergedEndpoints(attachments) {
1764
1764
  async function executeDev(input, deps, cwd) {
1765
1765
  if (process.platform === "win32") return notOk(new CliStructuredError("DEV.PLATFORM_UNSUPPORTED", "local dev is not supported on Windows yet."));
1766
1766
  const { onEvent } = input;
1767
- const devDir = path.join(cwd, DEV_DIR);
1767
+ const devDir = path$1.join(cwd, DEV_DIR);
1768
1768
  let pipeline;
1769
1769
  let resolved;
1770
1770
  const containers = /* @__PURE__ */ new Map();
@@ -2011,4 +2011,4 @@ async function executeDev(input, deps, cwd) {
2011
2011
  //#endregion
2012
2012
  export { executeDev };
2013
2013
 
2014
- //# sourceMappingURL=execute-dev-BMTFWfFc-CGDFqR4w.mjs.map
2014
+ //# sourceMappingURL=execute-dev-BMTFWfFc-7MifQgpp.mjs.map