@prisma/composer 0.6.0-dev.13 → 0.6.0-dev.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/dist/{app-config-CFsSXEVj-B242oUnm.d.mts → app-config-aIrriqVU-D6lJHzh2.d.mts} +42 -17
  2. package/dist/app-config-aIrriqVU-D6lJHzh2.d.mts.map +1 -0
  3. package/dist/bin.mjs +950 -12
  4. package/dist/bin.mjs.map +1 -1
  5. package/dist/config-CL7Jbve2.d.mts +1 -0
  6. package/dist/config.d.mts +3 -3
  7. package/dist/container-transport-DKmKg5JQ-CoY4XPma.mjs +30 -0
  8. package/dist/container-transport-DKmKg5JQ-CoY4XPma.mjs.map +1 -0
  9. package/dist/control.d.mts +3 -216
  10. package/dist/control.mjs +1 -69
  11. package/dist/deploy-CL7Jbve2.d.mts +1 -0
  12. package/dist/deploy.d.mts +2 -2
  13. package/dist/deploy.mjs +1 -1
  14. package/dist/{deployment-summary-r47O6kFr-CcMYVOn5.mjs → deployment-summary-DswOl_9E-C03NJ98H.mjs} +2 -2
  15. package/dist/{deployment-summary-r47O6kFr-CcMYVOn5.mjs.map → deployment-summary-DswOl_9E-C03NJ98H.mjs.map} +1 -1
  16. package/dist/{dist-C5rZnr4n.mjs → dist-C0dNEgS-.mjs} +2 -2
  17. package/dist/{dist-C5rZnr4n.mjs.map → dist-C0dNEgS-.mjs.map} +1 -1
  18. package/dist/{errors-0e8IVwzi.mjs → errors-DkXcnjPx.mjs} +3 -2
  19. package/dist/{errors-0e8IVwzi.mjs.map → errors-DkXcnjPx.mjs.map} +1 -1
  20. package/dist/{execute-deploy-destroy-IT4vGkMc-oO8yjHPH.mjs → execute-deploy-destroy-DfVJUICu-AMM8CwgV.mjs} +30 -19
  21. package/dist/execute-deploy-destroy-DfVJUICu-AMM8CwgV.mjs.map +1 -0
  22. package/dist/{execute-deploy-destroy-IT4vGkMc-YM1Cv6cu.mjs → execute-deploy-destroy-DfVJUICu-quUQ08T8.mjs} +29 -19
  23. package/dist/execute-deploy-destroy-DfVJUICu-quUQ08T8.mjs.map +1 -0
  24. package/dist/{execute-dev-DLYyduEM-88uyvrbj.mjs → execute-dev-BMTFWfFc-B1whS-Rr.mjs} +25 -23
  25. package/dist/{execute-dev-DLYyduEM-88uyvrbj.mjs.map → execute-dev-BMTFWfFc-B1whS-Rr.mjs.map} +1 -1
  26. package/dist/{execute-dev-DLYyduEM-BuUGTm0g.mjs → execute-dev-BMTFWfFc-BoKbcFVF.mjs} +29 -20
  27. package/dist/{execute-dev-DLYyduEM-BuUGTm0g.mjs.map → execute-dev-BMTFWfFc-BoKbcFVF.mjs.map} +1 -1
  28. package/dist/{execute-log-VIOL4DBz-DBPH8By4.mjs → execute-log-Cay9hlKW-B0tmRtrY.mjs} +11 -7
  29. package/dist/execute-log-Cay9hlKW-B0tmRtrY.mjs.map +1 -0
  30. package/dist/{execute-log-VIOL4DBz-DKodBrxS.mjs → execute-log-Cay9hlKW-DrMeVOXq.mjs} +9 -7
  31. package/dist/execute-log-Cay9hlKW-DrMeVOXq.mjs.map +1 -0
  32. package/dist/family-DkH0si4D-Uov_MuHV.d.mts +27 -0
  33. package/dist/family-DkH0si4D-Uov_MuHV.d.mts.map +1 -0
  34. package/dist/family.d.mts +53 -0
  35. package/dist/family.d.mts.map +1 -0
  36. package/dist/family.mjs +839 -0
  37. package/dist/family.mjs.map +1 -0
  38. package/dist/{graph-BJgUfGB0-kvgFzT4q.mjs → graph-BJgUfGB0-7fmubS_y.mjs} +2 -2
  39. package/dist/{graph-BJgUfGB0-kvgFzT4q.mjs.map → graph-BJgUfGB0-7fmubS_y.mjs.map} +1 -1
  40. package/dist/{graph-types-N6brq1zY-1VMNwtkJ.d.mts → graph-DqklX5Sf-CdNH3lA7.d.mts} +17 -2
  41. package/dist/graph-DqklX5Sf-CdNH3lA7.d.mts.map +1 -0
  42. package/dist/{index-DryPyF9U.d.mts → index-DuF5iI3i.d.mts} +2 -3
  43. package/dist/index-DuF5iI3i.d.mts.map +1 -0
  44. package/dist/index.d.mts +2 -3
  45. package/dist/index.mjs +2 -2
  46. package/dist/{local-target-DnA2E8IN.mjs → local-target-D3u_wuNF.mjs} +2 -2
  47. package/dist/{local-target-DnA2E8IN.mjs.map → local-target-D3u_wuNF.mjs.map} +1 -1
  48. package/dist/{local-target-DuSyWeYc.mjs → local-target-H0IWu_FM.mjs} +2 -2
  49. package/dist/{local-target-DuSyWeYc.mjs.map → local-target-H0IWu_FM.mjs.map} +1 -1
  50. package/dist/local-target.d.mts +1 -1
  51. package/dist/local-target.mjs +1 -1
  52. package/dist/log-DRnnWupy-9jbzL64M.d.mts +324 -0
  53. package/dist/log-DRnnWupy-9jbzL64M.d.mts.map +1 -0
  54. package/dist/{result-CzGChwbZ.mjs → log-DfT2hHqi-CDp9nfI5.mjs} +85 -90
  55. package/dist/log-DfT2hHqi-CDp9nfI5.mjs.map +1 -0
  56. package/dist/{nextjs-DLyeRR7M-DZODs9tk.d.mts → nextjs-DLyeRR7M-BfUbLXwr.d.mts} +3 -3
  57. package/dist/{nextjs-DLyeRR7M-DZODs9tk.d.mts.map → nextjs-DLyeRR7M-BfUbLXwr.d.mts.map} +1 -1
  58. package/dist/nextjs-control.d.mts +4 -4
  59. package/dist/nextjs.d.mts +1 -1
  60. package/dist/node-control.d.mts +3 -3
  61. package/dist/node.d.mts +2 -2
  62. package/dist/{pipeline-D3QoVzAB-D_ufjg3N.mjs → pipeline-AoW8zq4I-C6Qe0VaZ.mjs} +161 -42
  63. package/dist/{pipeline-D3QoVzAB-D_ufjg3N.mjs.map → pipeline-AoW8zq4I-C6Qe0VaZ.mjs.map} +1 -1
  64. package/dist/{pipeline-D3QoVzAB-Ci2aJ2mE.mjs → pipeline-AoW8zq4I-DM74ygtH.mjs} +164 -43
  65. package/dist/pipeline-AoW8zq4I-DM74ygtH.mjs.map +1 -0
  66. package/dist/report.d.mts +2 -2
  67. package/dist/report.mjs +1 -1
  68. package/dist/report.mjs.map +1 -1
  69. package/dist/{shared-CCaR42wo-BvegvmA_.mjs → result-B4XjxVK6.mjs} +127 -8
  70. package/dist/result-B4XjxVK6.mjs.map +1 -0
  71. package/dist/{result-CFqJKiqg.mjs → result-wonf1deB.mjs} +4 -18
  72. package/dist/result-wonf1deB.mjs.map +1 -0
  73. package/dist/run-alchemy-D44OZlyB-DA7s331N.mjs +93 -0
  74. package/dist/run-alchemy-D44OZlyB-DA7s331N.mjs.map +1 -0
  75. package/dist/run-alchemy-D44OZlyB-DeDTFsB6.mjs +93 -0
  76. package/dist/run-alchemy-D44OZlyB-DeDTFsB6.mjs.map +1 -0
  77. package/dist/service-rpc.d.mts +2 -2
  78. package/dist/service-rpc.mjs +2 -2
  79. package/dist/testing.d.mts +54 -2
  80. package/dist/testing.d.mts.map +1 -1
  81. package/dist/testing.mjs +150 -1
  82. package/dist/testing.mjs.map +1 -1
  83. package/package.json +12 -11
  84. package/src/exports/family.ts +14 -0
  85. package/src/exports/testing.ts +1 -0
  86. package/dist/app-config-CFsSXEVj-B242oUnm.d.mts.map +0 -1
  87. package/dist/cli-B3sWzFlb-CxEIzKsQ.mjs +0 -401
  88. package/dist/cli-B3sWzFlb-CxEIzKsQ.mjs.map +0 -1
  89. package/dist/config-ku5b_2YD.d.mts +0 -1
  90. package/dist/container-transport-DKmKg5JQ-BMRhx5w-.mjs +0 -75
  91. package/dist/container-transport-DKmKg5JQ-BMRhx5w-.mjs.map +0 -1
  92. package/dist/control.d.mts.map +0 -1
  93. package/dist/control.mjs.map +0 -1
  94. package/dist/deploy-ku5b_2YD.d.mts +0 -1
  95. package/dist/execute-deploy-destroy-IT4vGkMc-YM1Cv6cu.mjs.map +0 -1
  96. package/dist/execute-deploy-destroy-IT4vGkMc-oO8yjHPH.mjs.map +0 -1
  97. package/dist/execute-log-VIOL4DBz-DBPH8By4.mjs.map +0 -1
  98. package/dist/execute-log-VIOL4DBz-DKodBrxS.mjs.map +0 -1
  99. package/dist/graph-DqklX5Sf-BNS2aO1j.d.mts +0 -18
  100. package/dist/graph-DqklX5Sf-BNS2aO1j.d.mts.map +0 -1
  101. package/dist/graph-types-N6brq1zY-1VMNwtkJ.d.mts.map +0 -1
  102. package/dist/index-DryPyF9U.d.mts.map +0 -1
  103. package/dist/pipeline-D3QoVzAB-Ci2aJ2mE.mjs.map +0 -1
  104. package/dist/render-error-DsPN5qfr-CkVGj9uP.mjs +0 -30
  105. package/dist/render-error-DsPN5qfr-CkVGj9uP.mjs.map +0 -1
  106. package/dist/result-CFqJKiqg.mjs.map +0 -1
  107. package/dist/result-CzGChwbZ.mjs.map +0 -1
  108. package/dist/run-alchemy-hghRtddF-CQHOzlrW.mjs +0 -48
  109. package/dist/run-alchemy-hghRtddF-CQHOzlrW.mjs.map +0 -1
  110. package/dist/shared-CCaR42wo-BvegvmA_.mjs.map +0 -1
@@ -1,19 +1,5 @@
1
- import { o as blindCast } from "./shared-CCaR42wo-BvegvmA_.mjs";
2
- //#region ../../0-framework/0-foundation/foundation/dist/internal-error-BIc-ehme.mjs
3
- /**
4
- * A bug in Prisma Next, not a user error. Never catch this except at the
5
- * outermost boundary for crash reporting — an InternalError means an invariant
6
- * broke and the process cannot reliably continue. User-facing failures use
7
- * `structuredError` with a dotted code instead.
8
- */
9
- var InternalError = class extends Error {
10
- isPrismaInternalError = true;
11
- constructor(message, options) {
12
- super(message, options?.cause !== void 0 ? { cause: options.cause } : void 0);
13
- this.name = "InternalError";
14
- }
15
- };
16
- //#endregion
1
+ import { t as blindCast } from "./casts-DpaahrlC-C5XMnP9S.mjs";
2
+ import { t as InternalError } from "./internal-error-BIc-ehme-Ck_lgxD_.mjs";
17
3
  //#region ../../0-framework/0-foundation/foundation/dist/result.mjs
18
4
  /**
19
5
  * Generic Result type for representing success or failure outcomes.
@@ -101,6 +87,6 @@ function okVoid() {
101
87
  return OK_VOID;
102
88
  }
103
89
  //#endregion
104
- export { InternalError as i, ok as n, okVoid as r, notOk as t };
90
+ export { ok as n, okVoid as r, notOk as t };
105
91
 
106
- //# sourceMappingURL=result-CFqJKiqg.mjs.map
92
+ //# sourceMappingURL=result-wonf1deB.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"result-wonf1deB.mjs","names":[],"sources":["../../../0-framework/0-foundation/foundation/dist/result.mjs"],"sourcesContent":["import { t as blindCast } from \"./casts-DpaahrlC.mjs\";\nimport { t as InternalError } from \"./internal-error-BIc-ehme.mjs\";\n//#region src/result.ts\n/**\n* Generic Result type for representing success or failure outcomes.\n*\n* This is the standard way to return \"expected failures\" as values rather than\n* throwing exceptions. See docs/Error Handling.md for the full taxonomy.\n*\n* Naming rationale:\n* - `Ok<T>` / `NotOk<F>` mirror the `ok: true/false` discriminator\n* - `NotOk` avoids collision with domain types like \"Failure\" or \"Error\"\n* - `failure` property distinguishes from JS Error semantics\n*/\n/**\n* Result class that implements both Ok and NotOk variants.\n*/\nvar ResultImpl = class ResultImpl {\n\tok;\n\t_value;\n\t_failure;\n\tconstructor(ok, valueOrFailure) {\n\t\tthis.ok = ok;\n\t\tif (ok) this._value = blindCast(valueOrFailure);\n\t\telse this._failure = blindCast(valueOrFailure);\n\t\tObject.freeze(this);\n\t}\n\tget value() {\n\t\tif (!this.ok) throw new InternalError(\"Cannot access value on NotOk result\");\n\t\treturn this._value;\n\t}\n\tget failure() {\n\t\tif (this.ok) throw new InternalError(\"Cannot access failure on Ok result\");\n\t\treturn this._failure;\n\t}\n\t/**\n\t* Creates a successful result.\n\t*/\n\tstatic ok(value) {\n\t\treturn blindCast(new ResultImpl(true, value));\n\t}\n\t/**\n\t* Creates an unsuccessful result.\n\t*/\n\tstatic notOk(failure) {\n\t\treturn blindCast(new ResultImpl(false, failure));\n\t}\n\t/**\n\t* Asserts that this result is Ok and returns the value.\n\t* Throws if the result is NotOk.\n\t*/\n\tassertOk() {\n\t\tif (!this.ok) throw new InternalError(\"Expected Ok result but got NotOk\");\n\t\treturn this.value;\n\t}\n\t/**\n\t* Asserts that this result is NotOk and returns the failure.\n\t* Throws if the result is Ok.\n\t*/\n\tassertNotOk() {\n\t\tif (this.ok) throw new InternalError(\"Expected NotOk result but got Ok\");\n\t\treturn this.failure;\n\t}\n};\n/**\n* Creates a successful result.\n*/\nfunction ok(value) {\n\treturn ResultImpl.ok(value);\n}\n/**\n* Creates an unsuccessful result.\n*/\nfunction notOk(failure) {\n\treturn ResultImpl.notOk(failure);\n}\n/**\n* Singleton for void success results.\n* Use this for validation checks that don't produce a value.\n*/\nconst OK_VOID = ResultImpl.ok(void 0);\n/**\n* Returns a successful void result.\n* Use this for validation checks that don't produce a value.\n*/\nfunction okVoid() {\n\treturn OK_VOID;\n}\n//#endregion\nexport { notOk, ok, okVoid };\n\n//# sourceMappingURL=result.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,IAAI,aAAa,MAAM,WAAW;CACjC;CACA;CACA;CACA,YAAY,IAAI,gBAAgB;EAC/B,KAAK,KAAK;EACV,IAAI,IAAI,KAAK,SAAS,UAAU,cAAc;OACzC,KAAK,WAAW,UAAU,cAAc;EAC7C,OAAO,OAAO,IAAI;CACnB;CACA,IAAI,QAAQ;EACX,IAAI,CAAC,KAAK,IAAI,MAAM,IAAI,cAAc,qCAAqC;EAC3E,OAAO,KAAK;CACb;CACA,IAAI,UAAU;EACb,IAAI,KAAK,IAAI,MAAM,IAAI,cAAc,oCAAoC;EACzE,OAAO,KAAK;CACb;;;;CAIA,OAAO,GAAG,OAAO;EAChB,OAAO,UAAU,IAAI,WAAW,MAAM,KAAK,CAAC;CAC7C;;;;CAIA,OAAO,MAAM,SAAS;EACrB,OAAO,UAAU,IAAI,WAAW,OAAO,OAAO,CAAC;CAChD;;;;;CAKA,WAAW;EACV,IAAI,CAAC,KAAK,IAAI,MAAM,IAAI,cAAc,kCAAkC;EACxE,OAAO,KAAK;CACb;;;;;CAKA,cAAc;EACb,IAAI,KAAK,IAAI,MAAM,IAAI,cAAc,kCAAkC;EACvE,OAAO,KAAK;CACb;AACD;;;;AAIA,SAAS,GAAG,OAAO;CAClB,OAAO,WAAW,GAAG,KAAK;AAC3B;;;;AAIA,SAAS,MAAM,SAAS;CACvB,OAAO,WAAW,MAAM,OAAO;AAChC;;;;;AAKA,MAAM,UAAU,WAAW,GAAG,KAAK,CAAC;;;;;AAKpC,SAAS,SAAS;CACjB,OAAO;AACR"}
@@ -0,0 +1,93 @@
1
+ import { c as CliStructuredError } from "./result-B4XjxVK6.mjs";
2
+ import * as fs from "node:fs";
3
+ import * as path from "node:path";
4
+ import { spawn } from "node:child_process";
5
+ //#region ../../0-framework/3-tooling/cli/dist/run-alchemy-D44OZlyB.mjs
6
+ /**
7
+ * Pipeline step 7 (deploy-cli.md § The pipeline; design-notes.md's "Driving
8
+ * Alchemy" call): hand the terminal to the generated stack file. Resolves the
9
+ * workspace's own installed `alchemy` bin (walking up `node_modules/.bin`
10
+ * from the generated file's package dir) rather than going through
11
+ * `bunx`/`npx`, so this works the same under node and bun — the resolved
12
+ * bin's own launcher (`alchemy/bin/cli.js`) does its own node/bun dispatch
13
+ * from there, driven by the env it inherits.
14
+ *
15
+ * This module composes the invocation; it does not decide how the child is
16
+ * started. Under the CLI the engine starts it (`ctx.spawn`), which is what
17
+ * makes Ctrl-C reach the child natively and keeps signal policy in one place.
18
+ * `spawnAlchemy` is the default for programmatic hosts driving
19
+ * `@prisma/composer/control`, which have no engine to borrow.
20
+ */
21
+ /** Walks up from `startDir` looking for `node_modules/.bin/alchemy`. */
22
+ function resolveAlchemyBin(startDir) {
23
+ let dir = startDir;
24
+ while (true) {
25
+ const candidate = path.join(dir, "node_modules", ".bin", "alchemy");
26
+ if (fs.existsSync(candidate)) return candidate;
27
+ const parent = path.dirname(dir);
28
+ if (parent === dir) throw new CliStructuredError("DEPLOY.ALCHEMY_BIN_MISSING", `Could not find an installed \`alchemy\` bin above "${startDir}".`, { fix: "Add \"alchemy\" as a dependency of your app." });
29
+ dir = parent;
30
+ }
31
+ }
32
+ /**
33
+ * Resolves the invocation against this machine — the step every adapter takes
34
+ * and no caller should. Raises DEPLOY.ALCHEMY_BIN_MISSING when the app has no
35
+ * alchemy installed.
36
+ */
37
+ function alchemyCommandLine(invocation) {
38
+ return {
39
+ command: resolveAlchemyBin(invocation.cwd),
40
+ args: [
41
+ invocation.action,
42
+ invocation.stackFileRelativePath,
43
+ "--yes",
44
+ "--stage",
45
+ invocation.stage
46
+ ],
47
+ cwd: invocation.cwd,
48
+ env: invocation.env
49
+ };
50
+ }
51
+ /** What becomes `alchemy deploy|destroy <stack file> --yes --stage <stage>`. */
52
+ function alchemyInvocation(input) {
53
+ return {
54
+ action: input.command,
55
+ stackFileRelativePath: input.stackFileRelativePath,
56
+ cwd: input.cwd,
57
+ stage: input.stage,
58
+ env: {
59
+ ...input.containerEnv,
60
+ ...input.env
61
+ }
62
+ };
63
+ }
64
+ /**
65
+ * The default runner for hosts with no engine: inherited stdio, the caller's
66
+ * own process group, and the child's status returned verbatim. It does not
67
+ * collapse a signal into an exit code — that collapse is what made a
68
+ * Ctrl-C'd deploy report itself as a failure.
69
+ */
70
+ const spawnAlchemy = async (invocation) => {
71
+ const line = alchemyCommandLine(invocation);
72
+ return new Promise((resolve, reject) => {
73
+ const child = spawn(line.command, [...line.args], {
74
+ cwd: line.cwd,
75
+ stdio: "inherit",
76
+ env: {
77
+ ...process.env,
78
+ ...line.env
79
+ }
80
+ });
81
+ child.on("error", reject);
82
+ child.on("close", (exitCode, signal) => {
83
+ resolve({
84
+ exitCode,
85
+ signal
86
+ });
87
+ });
88
+ });
89
+ };
90
+ //#endregion
91
+ export { alchemyInvocation as n, spawnAlchemy as r, alchemyCommandLine as t };
92
+
93
+ //# sourceMappingURL=run-alchemy-D44OZlyB-DA7s331N.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-alchemy-D44OZlyB-DA7s331N.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/run-alchemy-D44OZlyB.mjs"],"sourcesContent":["import { CliStructuredError } from \"@internal/foundation/errors\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { spawn } from \"node:child_process\";\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. Resolves the\n* workspace's own installed `alchemy` bin (walking up `node_modules/.bin`\n* from the generated file's package dir) rather than going through\n* `bunx`/`npx`, so this works the same under node and bun — the resolved\n* bin's own launcher (`alchemy/bin/cli.js`) does its own node/bun dispatch\n* from there, driven by the env it inherits.\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*/\n/** Walks up from `startDir` looking for `node_modules/.bin/alchemy`. */\nfunction resolveAlchemyBin(startDir) {\n\tlet dir = startDir;\n\twhile (true) {\n\t\tconst candidate = path.join(dir, \"node_modules\", \".bin\", \"alchemy\");\n\t\tif (fs.existsSync(candidate)) return candidate;\n\t\tconst parent = path.dirname(dir);\n\t\tif (parent === dir) throw new CliStructuredError(\"DEPLOY.ALCHEMY_BIN_MISSING\", `Could not find an installed \\`alchemy\\` bin above \"${startDir}\".`, { fix: \"Add \\\"alchemy\\\" as a dependency of your app.\" });\n\t\tdir = parent;\n\t}\n}\n/**\n* Resolves the invocation against this machine — the step every adapter takes\n* and no caller should. Raises DEPLOY.ALCHEMY_BIN_MISSING when the app has no\n* alchemy installed.\n*/\nfunction alchemyCommandLine(invocation) {\n\treturn {\n\t\tcommand: resolveAlchemyBin(invocation.cwd),\n\t\targs: [\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.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 line = alchemyCommandLine(invocation);\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, resolveAlchemyBin as r, alchemyCommandLine as t };\n\n//# sourceMappingURL=run-alchemy-D44OZlyB.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,SAAS,kBAAkB,UAAU;CACpC,IAAI,MAAM;CACV,OAAO,MAAM;EACZ,MAAM,YAAY,KAAK,KAAK,KAAK,gBAAgB,QAAQ,SAAS;EAClE,IAAI,GAAG,WAAW,SAAS,GAAG,OAAO;EACrC,MAAM,SAAS,KAAK,QAAQ,GAAG;EAC/B,IAAI,WAAW,KAAK,MAAM,IAAI,mBAAmB,8BAA8B,sDAAsD,SAAS,KAAK,EAAE,KAAK,+CAA+C,CAAC;EAC1M,MAAM;CACP;AACD;;;;;;AAMA,SAAS,mBAAmB,YAAY;CACvC,OAAO;EACN,SAAS,kBAAkB,WAAW,GAAG;EACzC,MAAM;GACL,WAAW;GACX,WAAW;GACX;GACA;GACA,WAAW;EACZ;EACA,KAAK,WAAW;EAChB,KAAK,WAAW;CACjB;AACD;;AAEA,SAAS,kBAAkB,OAAO;CACjC,OAAO;EACN,QAAQ,MAAM;EACd,uBAAuB,MAAM;EAC7B,KAAK,MAAM;EACX,OAAO,MAAM;EACb,KAAK;GACJ,GAAG,MAAM;GACT,GAAG,MAAM;EACV;CACD;AACD;;;;;;;AAOA,MAAM,eAAe,OAAO,eAAe;CAC1C,MAAM,OAAO,mBAAmB,UAAU;CAC1C,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"}
@@ -0,0 +1,93 @@
1
+ import { t as CliStructuredError } from "./errors-DkXcnjPx.mjs";
2
+ import * as fs from "node:fs";
3
+ import * as path from "node:path";
4
+ import { spawn } from "node:child_process";
5
+ //#region ../../0-framework/3-tooling/cli/dist/run-alchemy-D44OZlyB.mjs
6
+ /**
7
+ * Pipeline step 7 (deploy-cli.md § The pipeline; design-notes.md's "Driving
8
+ * Alchemy" call): hand the terminal to the generated stack file. Resolves the
9
+ * workspace's own installed `alchemy` bin (walking up `node_modules/.bin`
10
+ * from the generated file's package dir) rather than going through
11
+ * `bunx`/`npx`, so this works the same under node and bun — the resolved
12
+ * bin's own launcher (`alchemy/bin/cli.js`) does its own node/bun dispatch
13
+ * from there, driven by the env it inherits.
14
+ *
15
+ * This module composes the invocation; it does not decide how the child is
16
+ * started. Under the CLI the engine starts it (`ctx.spawn`), which is what
17
+ * makes Ctrl-C reach the child natively and keeps signal policy in one place.
18
+ * `spawnAlchemy` is the default for programmatic hosts driving
19
+ * `@prisma/composer/control`, which have no engine to borrow.
20
+ */
21
+ /** Walks up from `startDir` looking for `node_modules/.bin/alchemy`. */
22
+ function resolveAlchemyBin(startDir) {
23
+ let dir = startDir;
24
+ while (true) {
25
+ const candidate = path.join(dir, "node_modules", ".bin", "alchemy");
26
+ if (fs.existsSync(candidate)) return candidate;
27
+ const parent = path.dirname(dir);
28
+ if (parent === dir) throw new CliStructuredError("DEPLOY.ALCHEMY_BIN_MISSING", `Could not find an installed \`alchemy\` bin above "${startDir}".`, { fix: "Add \"alchemy\" as a dependency of your app." });
29
+ dir = parent;
30
+ }
31
+ }
32
+ /**
33
+ * Resolves the invocation against this machine — the step every adapter takes
34
+ * and no caller should. Raises DEPLOY.ALCHEMY_BIN_MISSING when the app has no
35
+ * alchemy installed.
36
+ */
37
+ function alchemyCommandLine(invocation) {
38
+ return {
39
+ command: resolveAlchemyBin(invocation.cwd),
40
+ args: [
41
+ invocation.action,
42
+ invocation.stackFileRelativePath,
43
+ "--yes",
44
+ "--stage",
45
+ invocation.stage
46
+ ],
47
+ cwd: invocation.cwd,
48
+ env: invocation.env
49
+ };
50
+ }
51
+ /** What becomes `alchemy deploy|destroy <stack file> --yes --stage <stage>`. */
52
+ function alchemyInvocation(input) {
53
+ return {
54
+ action: input.command,
55
+ stackFileRelativePath: input.stackFileRelativePath,
56
+ cwd: input.cwd,
57
+ stage: input.stage,
58
+ env: {
59
+ ...input.containerEnv,
60
+ ...input.env
61
+ }
62
+ };
63
+ }
64
+ /**
65
+ * The default runner for hosts with no engine: inherited stdio, the caller's
66
+ * own process group, and the child's status returned verbatim. It does not
67
+ * collapse a signal into an exit code — that collapse is what made a
68
+ * Ctrl-C'd deploy report itself as a failure.
69
+ */
70
+ const spawnAlchemy = async (invocation) => {
71
+ const line = alchemyCommandLine(invocation);
72
+ return new Promise((resolve, reject) => {
73
+ const child = spawn(line.command, [...line.args], {
74
+ cwd: line.cwd,
75
+ stdio: "inherit",
76
+ env: {
77
+ ...process.env,
78
+ ...line.env
79
+ }
80
+ });
81
+ child.on("error", reject);
82
+ child.on("close", (exitCode, signal) => {
83
+ resolve({
84
+ exitCode,
85
+ signal
86
+ });
87
+ });
88
+ });
89
+ };
90
+ //#endregion
91
+ export { alchemyInvocation as n, spawnAlchemy as r, alchemyCommandLine as t };
92
+
93
+ //# sourceMappingURL=run-alchemy-D44OZlyB-DeDTFsB6.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-alchemy-D44OZlyB-DeDTFsB6.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/run-alchemy-D44OZlyB.mjs"],"sourcesContent":["import { CliStructuredError } from \"@internal/foundation/errors\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { spawn } from \"node:child_process\";\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. Resolves the\n* workspace's own installed `alchemy` bin (walking up `node_modules/.bin`\n* from the generated file's package dir) rather than going through\n* `bunx`/`npx`, so this works the same under node and bun — the resolved\n* bin's own launcher (`alchemy/bin/cli.js`) does its own node/bun dispatch\n* from there, driven by the env it inherits.\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*/\n/** Walks up from `startDir` looking for `node_modules/.bin/alchemy`. */\nfunction resolveAlchemyBin(startDir) {\n\tlet dir = startDir;\n\twhile (true) {\n\t\tconst candidate = path.join(dir, \"node_modules\", \".bin\", \"alchemy\");\n\t\tif (fs.existsSync(candidate)) return candidate;\n\t\tconst parent = path.dirname(dir);\n\t\tif (parent === dir) throw new CliStructuredError(\"DEPLOY.ALCHEMY_BIN_MISSING\", `Could not find an installed \\`alchemy\\` bin above \"${startDir}\".`, { fix: \"Add \\\"alchemy\\\" as a dependency of your app.\" });\n\t\tdir = parent;\n\t}\n}\n/**\n* Resolves the invocation against this machine — the step every adapter takes\n* and no caller should. Raises DEPLOY.ALCHEMY_BIN_MISSING when the app has no\n* alchemy installed.\n*/\nfunction alchemyCommandLine(invocation) {\n\treturn {\n\t\tcommand: resolveAlchemyBin(invocation.cwd),\n\t\targs: [\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.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 line = alchemyCommandLine(invocation);\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, resolveAlchemyBin as r, alchemyCommandLine as t };\n\n//# sourceMappingURL=run-alchemy-D44OZlyB.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,SAAS,kBAAkB,UAAU;CACpC,IAAI,MAAM;CACV,OAAO,MAAM;EACZ,MAAM,YAAY,KAAK,KAAK,KAAK,gBAAgB,QAAQ,SAAS;EAClE,IAAI,GAAG,WAAW,SAAS,GAAG,OAAO;EACrC,MAAM,SAAS,KAAK,QAAQ,GAAG;EAC/B,IAAI,WAAW,KAAK,MAAM,IAAI,mBAAmB,8BAA8B,sDAAsD,SAAS,KAAK,EAAE,KAAK,+CAA+C,CAAC;EAC1M,MAAM;CACP;AACD;;;;;;AAMA,SAAS,mBAAmB,YAAY;CACvC,OAAO;EACN,SAAS,kBAAkB,WAAW,GAAG;EACzC,MAAM;GACL,WAAW;GACX,WAAW;GACX;GACA;GACA,WAAW;EACZ;EACA,KAAK,WAAW;EAChB,KAAK,WAAW;CACjB;AACD;;AAEA,SAAS,kBAAkB,OAAO;CACjC,OAAO;EACN,QAAQ,MAAM;EACd,uBAAuB,MAAM;EAC7B,KAAK,MAAM;EACX,OAAO,MAAM;EACb,KAAK;GACJ,GAAG,MAAM;GACT,GAAG,MAAM;EACV;CACD;AACD;;;;;;;AAOA,MAAM,eAAe,OAAO,eAAe;CAC1C,MAAM,OAAO,mBAAmB,UAAU;CAC1C,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,5 +1,5 @@
1
- import { L as RunnableServiceNode, M as ProvisionNeed, o as Contract, s as DependencyEnd } from "./graph-types-N6brq1zY-1VMNwtkJ.mjs";
2
- import "./index-DryPyF9U.mjs";
1
+ import { N as ProvisionNeed, R as RunnableServiceNode, c as DependencyEnd, s as Contract } from "./graph-DqklX5Sf-CdNH3lA7.mjs";
2
+ import "./index-DuF5iI3i.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
@@ -1,6 +1,6 @@
1
1
  import { t as blindCast } from "./casts-DpaahrlC-C5XMnP9S.mjs";
2
- import { i as dependency, p as provisionNeed } from "./graph-BJgUfGB0-kvgFzT4q.mjs";
3
- import { c as string } from "./dist-C5rZnr4n.mjs";
2
+ import { i as dependency, p as provisionNeed } from "./graph-BJgUfGB0-7fmubS_y.mjs";
3
+ import { c as string } from "./dist-C0dNEgS-.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 = {
@@ -1,5 +1,57 @@
1
- import { L as RunnableServiceNode, c as Deps, j as Params, m as HydratedDeps, u as Expose } from "./graph-types-N6brq1zY-1VMNwtkJ.mjs";
1
+ import { M as Params, R as RunnableServiceNode, d as Expose, ft as CliStructuredError, h as HydratedDeps, l as Deps } from "./graph-DqklX5Sf-CdNH3lA7.mjs";
2
+ import { A as Result, _ as OperationDeps, a as DestroyEvent, f as LogAttached, g as LogLine, h as LogInput, l as DevInput, n as DeploySuccess, o as DestroyInput, p as LogDeps, t as DeployInput, u as DevSession, v as ServiceEndpoint } from "./log-DRnnWupy-9jbzL64M.mjs";
3
+ import { t as ComposerOperations } from "./family-DkH0si4D-Uov_MuHV.mjs";
2
4
  import { StandardSchemaV1 } from "@standard-schema/spec";
5
+ //#region ../../0-framework/3-tooling/cli/dist/testing.d.mts
6
+ //#region src/testing/control-double.d.ts
7
+ interface ControlDoubleFixtures {
8
+ /** Returned as-is; pass notOk(error) for a failing deploy. Default: ok with no summary. */
9
+ readonly deploy?: Result<DeploySuccess, CliStructuredError> | undefined;
10
+ /** Returned as-is. Default: ok. */
11
+ readonly destroy?: Result<void, CliStructuredError> | undefined;
12
+ /** Delivered to the caller's onEvent, in order, before destroy resolves. */
13
+ readonly destroyEvents?: readonly DestroyEvent[] | undefined;
14
+ /**
15
+ * A failing dev: returned as-is, no session starts. When absent, dev
16
+ * succeeds with a working DevSession double over `devEndpoints`.
17
+ */
18
+ readonly dev?: Result<DevSession, CliStructuredError> | undefined;
19
+ /** The session's front door; emitted as the initial 'ready' event, like the real operation's. */
20
+ readonly devEndpoints?: readonly ServiceEndpoint[] | undefined;
21
+ /** A failing log: returned as-is. When absent, log attaches over the fixtures below. */
22
+ readonly log?: Result<LogAttached, CliStructuredError> | undefined;
23
+ readonly logAppName?: string | undefined;
24
+ readonly logServices?: readonly ServiceEndpoint[] | undefined;
25
+ /** Replayed through the attachment's stream, then the stream ends (or ends early on signal abort). */
26
+ readonly logLines?: readonly LogLine[] | undefined;
27
+ }
28
+ /**
29
+ * The deps each call carried, in the same order as the inputs beside them.
30
+ * These are the operation's SECOND argument — the seam the config path, the
31
+ * converge spawn adapter and the credentials ride in on — so a host that
32
+ * drops one of those is caught here rather than by its absence downstream.
33
+ */
34
+ interface ControlDoubleDeps {
35
+ readonly deploy: readonly OperationDeps[];
36
+ readonly destroy: readonly OperationDeps[];
37
+ readonly dev: readonly OperationDeps[];
38
+ readonly log: readonly LogDeps[];
39
+ }
40
+ /** Every input each operation received, in call order — the assertion surface. */
41
+ interface ControlDoubleCalls {
42
+ readonly deploy: readonly DeployInput[];
43
+ readonly destroy: readonly DestroyInput[];
44
+ readonly dev: readonly DevInput[];
45
+ readonly log: readonly LogInput[];
46
+ readonly deps: ControlDoubleDeps;
47
+ }
48
+ interface ControlDouble {
49
+ /** Drop-in for the real operations: hand to createComposerFamily({ operations }). */
50
+ readonly operations: ComposerOperations;
51
+ readonly calls: ControlDoubleCalls;
52
+ }
53
+ declare function createControlDouble(fixtures?: ControlDoubleFixtures): ControlDouble;
54
+ //#endregion
3
55
  //#region ../../0-framework/1-core/core/dist/testing.d.mts
4
56
  //#region src/testing.d.ts
5
57
  /**
@@ -25,5 +77,5 @@ type LoadOverrides<D extends Deps, I extends StandardSchemaV1 | undefined> = Hyd
25
77
  */
26
78
  declare function mockService<D extends Deps, P extends Params, E extends Expose, I extends StandardSchemaV1 | undefined>(service: RunnableServiceNode<D, P, E, I>, overrides: LoadOverrides<D, I>): RunnableServiceNode<D, P, E, I>;
27
79
  //#endregion
28
- export { LoadOverrides, mockService };
80
+ export { type ControlDouble, type ControlDoubleCalls, type ControlDoubleFixtures, LoadOverrides, createControlDouble, mockService };
29
81
  //# sourceMappingURL=testing.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"testing.d.mts","names":[],"sources":["../../../0-framework/1-core/core/dist/testing.d.mts"],"mappings":";;;;;;;;;;;;KAWK,cAAc,UAAU,MAAM,UAAU,gCAAgC,aAAa,MAAM,UAAU;EACxG,OAAO,iBAAiB,YAAY;;EAEpC;;;;;;;;;;iBAUe,YAAY,UAAU,MAAM,UAAU,QAAQ,UAAU,QAAQ,UAAU,8BAA8B,SAAS,oBAAoB,GAAG,GAAG,GAAG,IAAI,WAAW,cAAc,GAAG,KAAK,oBAAoB,GAAG,GAAG,GAAG"}
1
+ {"version":3,"file":"testing.d.mts","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/testing.d.mts","../../../0-framework/1-core/core/dist/testing.d.mts"],"mappings":";;;;;;UAKU;;WAEC,SAAS,OAAO,eAAe;;WAE/B,UAAU,aAAa;;WAEvB,yBAAyB;;;;;WAKzB,MAAM,OAAO,YAAY;;WAEzB,wBAAwB;;WAExB,MAAM,OAAO,aAAa;WAC1B;WACA,uBAAuB;;WAEvB,oBAAoB;;;;;;;;UAQrB;WACC,iBAAiB;WACjB,kBAAkB;WAClB,cAAc;WACd,cAAc;;;UAGf;WACC,iBAAiB;WACjB,kBAAkB;WAClB,cAAc;WACd,cAAc;WACd,MAAM;;UAEP;;WAEC,YAAY;WACZ,OAAO;;iBAED,oBAAoB,WAAW,wBAAwB;;;;;;;;;;;;KCxCnE,cAAc,UAAU,MAAM,UAAU,gCAAgC,aAAa,MAAM,UAAU;EACxG,OAAO,iBAAiB,YAAY;;EAEpC;;;;;;;;;;iBAUe,YAAY,UAAU,MAAM,UAAU,QAAQ,UAAU,QAAQ,UAAU,8BAA8B,SAAS,oBAAoB,GAAG,GAAG,GAAG,IAAI,WAAW,cAAc,GAAG,KAAK,oBAAoB,GAAG,GAAG,GAAG"}
package/dist/testing.mjs CHANGED
@@ -1,4 +1,153 @@
1
1
  import { t as blindCast } from "./casts-DpaahrlC-C5XMnP9S.mjs";
2
+ import { t as CliStructuredError } from "./errors-DkXcnjPx.mjs";
3
+ import { n as ok, r as okVoid, t as notOk } from "./result-wonf1deB.mjs";
4
+ //#region ../../0-framework/3-tooling/cli/dist/testing.mjs
5
+ /**
6
+ * The published control-API double (`@prisma/composer/testing`): the four
7
+ * control operations with their real signatures and Result shapes, backed by
8
+ * fixtures instead of alchemy, containers, or a network.
9
+ *
10
+ * Hosts that mount composer's command family — prisma-cli above all — test
11
+ * against this instead of the real operations, so their suites never spawn a
12
+ * converge and their typecheck never needs the alchemy/effect constellation.
13
+ * The conformance guarantee is carried by the types: `ComposerOperations` is
14
+ * defined as `typeof deployWithDeps` (etc.) of the REAL operations, and the
15
+ * double is declared against it, so a drift in any real signature fails
16
+ * `tsc --noEmit` right here. Every import of implementation modules is
17
+ * type-only and erases
18
+ * at build — the built `testing` chunk must contain no path to the real
19
+ * control implementation, which scripts/check-family-static-graph.mjs proves
20
+ * against the packed tarball.
21
+ */
22
+ function devSessionDouble(input, endpoints) {
23
+ let resolveClosed;
24
+ const closed = new Promise((resolve) => {
25
+ resolveClosed = resolve;
26
+ });
27
+ let stopped = false;
28
+ input.onEvent?.({
29
+ kind: "ready",
30
+ endpoints
31
+ });
32
+ return {
33
+ endpoints,
34
+ closed,
35
+ stop: async () => {
36
+ if (stopped) return;
37
+ stopped = true;
38
+ input.onEvent?.({ kind: "stopping" });
39
+ input.onEvent?.({ kind: "stopped" });
40
+ resolveClosed();
41
+ }
42
+ };
43
+ }
44
+ async function* replayLines(lines, address, signal) {
45
+ for (const line of lines) {
46
+ if (signal?.aborted === true) return;
47
+ if (address !== void 0 && line.service !== address) continue;
48
+ yield line;
49
+ }
50
+ }
51
+ /**
52
+ * Runs the caller's converge adapter, when it supplied one, against a
53
+ * synthetic invocation — no alchemy bin is resolved and no real child is
54
+ * started; the adapter decides what the child does.
55
+ *
56
+ * This is what makes a host's tests cover the settlement rules rather than
57
+ * just the grammar: a scripted fake child that exits non-zero, or is killed
58
+ * by a signal, produces the same failure shape the real executor produces, so
59
+ * the handler's settlement — and the engine's own child-status settlement
60
+ * behind it — is genuinely exercised. Returns undefined when no adapter was
61
+ * injected, leaving the fixture result untouched.
62
+ */
63
+ async function runConverge(action, deps, cwd) {
64
+ if (deps.alchemy === void 0) return void 0;
65
+ const stackFilePath = ".prisma-composer/alchemy.run.ts";
66
+ const reproduceCommand = `alchemy ${action} ${stackFilePath} --yes --stage test`;
67
+ const workingDirectory = cwd ?? ".";
68
+ const outcome = await deps.alchemy({
69
+ action,
70
+ stackFileRelativePath: stackFilePath,
71
+ cwd: workingDirectory,
72
+ stage: "test",
73
+ env: {}
74
+ });
75
+ if (outcome.signal !== null) return notOk(new CliStructuredError("DEPLOY.ENGINE_FAILED", `alchemy ${action} was interrupted by ${outcome.signal}.`, { meta: {
76
+ signal: outcome.signal,
77
+ diagnostics: {
78
+ exitCode: void 0,
79
+ signal: outcome.signal,
80
+ stackFilePath,
81
+ reproduceCommand,
82
+ cwd: workingDirectory
83
+ }
84
+ } }));
85
+ const status = outcome.exitCode ?? 1;
86
+ if (status === 0) return void 0;
87
+ return notOk(new CliStructuredError("DEPLOY.ENGINE_FAILED", `alchemy ${action} exited with status ${status}.`, { meta: {
88
+ exitCode: status,
89
+ diagnostics: {
90
+ exitCode: status,
91
+ stackFilePath,
92
+ reproduceCommand,
93
+ cwd: workingDirectory
94
+ }
95
+ } }));
96
+ }
97
+ function createControlDouble(fixtures = {}) {
98
+ const deployCalls = [];
99
+ const destroyCalls = [];
100
+ const devCalls = [];
101
+ const logCalls = [];
102
+ const deps = {
103
+ deploy: [],
104
+ destroy: [],
105
+ dev: [],
106
+ log: []
107
+ };
108
+ const calls = {
109
+ deploy: deployCalls,
110
+ destroy: destroyCalls,
111
+ dev: devCalls,
112
+ log: logCalls,
113
+ deps
114
+ };
115
+ return {
116
+ operations: {
117
+ deploy: async (input, operationDeps) => {
118
+ calls.deploy.push(input);
119
+ deps.deploy.push(operationDeps);
120
+ const converge = await runConverge("deploy", operationDeps, input.cwd);
121
+ if (converge !== void 0) return converge;
122
+ return fixtures.deploy ?? ok({ summary: void 0 });
123
+ },
124
+ destroy: async (input, operationDeps) => {
125
+ calls.destroy.push(input);
126
+ deps.destroy.push(operationDeps);
127
+ for (const event of fixtures.destroyEvents ?? []) input.onEvent?.(event);
128
+ const converge = await runConverge("destroy", operationDeps, input.cwd);
129
+ if (converge !== void 0) return converge;
130
+ return fixtures.destroy ?? okVoid();
131
+ },
132
+ dev: async (input, operationDeps) => {
133
+ calls.dev.push(input);
134
+ deps.dev.push(operationDeps);
135
+ return fixtures.dev ?? ok(devSessionDouble(input, fixtures.devEndpoints ?? []));
136
+ },
137
+ log: async (input, logDeps) => {
138
+ calls.log.push(input);
139
+ deps.log.push(logDeps);
140
+ return fixtures.log ?? ok({
141
+ appName: fixtures.logAppName ?? "app",
142
+ services: fixtures.logServices ?? [],
143
+ lines: replayLines(fixtures.logLines ?? [], input.address, input.signal)
144
+ });
145
+ }
146
+ },
147
+ calls
148
+ };
149
+ }
150
+ //#endregion
2
151
  //#region ../../0-framework/1-core/core/dist/testing.mjs
3
152
  /**
4
153
  * The unit-test seam (testing.md § Unit): `mockService` replaces a service
@@ -32,6 +181,6 @@ function mockService(service, overrides) {
32
181
  });
33
182
  }
34
183
  //#endregion
35
- export { mockService };
184
+ export { createControlDouble, mockService };
36
185
 
37
186
  //# sourceMappingURL=testing.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"testing.mjs","names":[],"sources":["../../../0-framework/1-core/core/dist/testing.mjs"],"sourcesContent":["import { blindCast } from \"@internal/foundation/casts\";\n//#region src/testing.ts\n/**\n* The unit-test seam (testing.md § Unit): `mockService` replaces a service\n* node's `load()` and `input()` output so any code that pulls dependencies or\n* input through them — a page, a server action, a helper — runs against typed\n* doubles with no server and no environment. Target-agnostic: every service\n* node has `load()`/`input()`. It does no module mocking; wiring the\n* substitution into a test runner (`vi.mock`, `mock.module`) stays in the test.\n* The integration seam (`bootstrapService`) is target-specific and lives in the\n* target's own testing entry (e.g. `@prisma/composer-prisma-cloud/testing`).\n*/\n/**\n* Returns a service node whose `load()` yields the dependency doubles and\n* `input()` the given input object — everything else about the node (its\n* deps, input schema, build, expose) is unchanged. The input double is NOT\n* validated: the test supplies the typed, already-validated shape directly.\n* `run()` is not meaningful on a mock (there is no boot, no environment) and\n* throws if called.\n*/\nfunction mockService(service, overrides) {\n\tconst entries = Object.entries(overrides);\n\tconst deps = blindCast(Object.fromEntries(entries.filter(([name]) => name in service.inputs)));\n\tconst input = blindCast(entries.find(([name]) => name === \"input\")?.[1]);\n\treturn Object.freeze({\n\t\t...service,\n\t\trun() {\n\t\t\tthrow new Error(`mockService(): \"${service.name}\" is a load()/input()-only mock — it has no run() (no boot, no environment).`);\n\t\t},\n\t\tload: () => deps,\n\t\tinput: () => input\n\t});\n}\n//#endregion\nexport { mockService };\n\n//# sourceMappingURL=testing.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;AAoBA,SAAS,YAAY,SAAS,WAAW;CACxC,MAAM,UAAU,OAAO,QAAQ,SAAS;CACxC,MAAM,OAAO,UAAU,OAAO,YAAY,QAAQ,QAAQ,CAAC,UAAU,QAAQ,QAAQ,MAAM,CAAC,CAAC;CAC7F,MAAM,QAAQ,UAAU,QAAQ,MAAM,CAAC,UAAU,SAAS,OAAO,CAAC,GAAG,EAAE;CACvE,OAAO,OAAO,OAAO;EACpB,GAAG;EACH,MAAM;GACL,MAAM,IAAI,MAAM,mBAAmB,QAAQ,KAAK,6EAA6E;EAC9H;EACA,YAAY;EACZ,aAAa;CACd,CAAC;AACF"}
1
+ {"version":3,"file":"testing.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/testing.mjs","../../../0-framework/1-core/core/dist/testing.mjs"],"sourcesContent":["import { CliStructuredError } from \"@internal/foundation/errors\";\nimport { notOk, ok, okVoid } from \"@internal/foundation/result\";\n//#region src/testing/control-double.ts\n/**\n* The published control-API double (`@prisma/composer/testing`): the four\n* control operations with their real signatures and Result shapes, backed by\n* fixtures instead of alchemy, containers, or a network.\n*\n* Hosts that mount composer's command family — prisma-cli above all — test\n* against this instead of the real operations, so their suites never spawn a\n* converge and their typecheck never needs the alchemy/effect constellation.\n* The conformance guarantee is carried by the types: `ComposerOperations` is\n* defined as `typeof deployWithDeps` (etc.) of the REAL operations, and the\n* double is declared against it, so a drift in any real signature fails\n* `tsc --noEmit` right here. Every import of implementation modules is\n* type-only and erases\n* at build — the built `testing` chunk must contain no path to the real\n* control implementation, which scripts/check-family-static-graph.mjs proves\n* against the packed tarball.\n*/\nfunction devSessionDouble(input, endpoints) {\n\tlet resolveClosed;\n\tconst closed = new Promise((resolve) => {\n\t\tresolveClosed = resolve;\n\t});\n\tlet stopped = false;\n\tinput.onEvent?.({\n\t\tkind: \"ready\",\n\t\tendpoints\n\t});\n\treturn {\n\t\tendpoints,\n\t\tclosed,\n\t\tstop: async () => {\n\t\t\tif (stopped) return;\n\t\t\tstopped = true;\n\t\t\tinput.onEvent?.({ kind: \"stopping\" });\n\t\t\tinput.onEvent?.({ kind: \"stopped\" });\n\t\t\tresolveClosed();\n\t\t}\n\t};\n}\nasync function* replayLines(lines, address, signal) {\n\tfor (const line of lines) {\n\t\tif (signal?.aborted === true) return;\n\t\tif (address !== void 0 && line.service !== address) continue;\n\t\tyield line;\n\t}\n}\n/**\n* Runs the caller's converge adapter, when it supplied one, against a\n* synthetic invocation — no alchemy bin is resolved and no real child is\n* started; the adapter decides what the child does.\n*\n* This is what makes a host's tests cover the settlement rules rather than\n* just the grammar: a scripted fake child that exits non-zero, or is killed\n* by a signal, produces the same failure shape the real executor produces, so\n* the handler's settlement — and the engine's own child-status settlement\n* behind it — is genuinely exercised. Returns undefined when no adapter was\n* injected, leaving the fixture result untouched.\n*/\nasync function runConverge(action, deps, cwd) {\n\tif (deps.alchemy === void 0) return void 0;\n\tconst stackFilePath = \".prisma-composer/alchemy.run.ts\";\n\tconst reproduceCommand = `alchemy ${action} ${stackFilePath} --yes --stage test`;\n\tconst workingDirectory = cwd ?? \".\";\n\tconst outcome = await deps.alchemy({\n\t\taction,\n\t\tstackFileRelativePath: stackFilePath,\n\t\tcwd: workingDirectory,\n\t\tstage: \"test\",\n\t\tenv: {}\n\t});\n\tif (outcome.signal !== null) return notOk(new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", `alchemy ${action} was interrupted by ${outcome.signal}.`, { meta: {\n\t\tsignal: outcome.signal,\n\t\tdiagnostics: {\n\t\t\texitCode: void 0,\n\t\t\tsignal: outcome.signal,\n\t\t\tstackFilePath,\n\t\t\treproduceCommand,\n\t\t\tcwd: workingDirectory\n\t\t}\n\t} }));\n\tconst status = outcome.exitCode ?? 1;\n\tif (status === 0) return void 0;\n\treturn notOk(new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", `alchemy ${action} exited with status ${status}.`, { meta: {\n\t\texitCode: status,\n\t\tdiagnostics: {\n\t\t\texitCode: status,\n\t\t\tstackFilePath,\n\t\t\treproduceCommand,\n\t\t\tcwd: workingDirectory\n\t\t}\n\t} }));\n}\nfunction createControlDouble(fixtures = {}) {\n\tconst deployCalls = [];\n\tconst destroyCalls = [];\n\tconst devCalls = [];\n\tconst logCalls = [];\n\tconst deps = {\n\t\tdeploy: [],\n\t\tdestroy: [],\n\t\tdev: [],\n\t\tlog: []\n\t};\n\tconst calls = {\n\t\tdeploy: deployCalls,\n\t\tdestroy: destroyCalls,\n\t\tdev: devCalls,\n\t\tlog: logCalls,\n\t\tdeps\n\t};\n\treturn {\n\t\toperations: {\n\t\t\tdeploy: async (input, operationDeps) => {\n\t\t\t\tcalls.deploy.push(input);\n\t\t\t\tdeps.deploy.push(operationDeps);\n\t\t\t\tconst converge = await runConverge(\"deploy\", operationDeps, input.cwd);\n\t\t\t\tif (converge !== void 0) return converge;\n\t\t\t\treturn fixtures.deploy ?? ok({ summary: void 0 });\n\t\t\t},\n\t\t\tdestroy: async (input, operationDeps) => {\n\t\t\t\tcalls.destroy.push(input);\n\t\t\t\tdeps.destroy.push(operationDeps);\n\t\t\t\tfor (const event of fixtures.destroyEvents ?? []) input.onEvent?.(event);\n\t\t\t\tconst converge = await runConverge(\"destroy\", operationDeps, input.cwd);\n\t\t\t\tif (converge !== void 0) return converge;\n\t\t\t\treturn fixtures.destroy ?? okVoid();\n\t\t\t},\n\t\t\tdev: async (input, operationDeps) => {\n\t\t\t\tcalls.dev.push(input);\n\t\t\t\tdeps.dev.push(operationDeps);\n\t\t\t\treturn fixtures.dev ?? ok(devSessionDouble(input, fixtures.devEndpoints ?? []));\n\t\t\t},\n\t\t\tlog: async (input, logDeps) => {\n\t\t\t\tcalls.log.push(input);\n\t\t\t\tdeps.log.push(logDeps);\n\t\t\t\treturn fixtures.log ?? ok({\n\t\t\t\t\tappName: fixtures.logAppName ?? \"app\",\n\t\t\t\t\tservices: fixtures.logServices ?? [],\n\t\t\t\t\tlines: replayLines(fixtures.logLines ?? [], input.address, input.signal)\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tcalls\n\t};\n}\n//#endregion\nexport { createControlDouble };\n\n//# sourceMappingURL=testing.mjs.map","import { blindCast } from \"@internal/foundation/casts\";\n//#region src/testing.ts\n/**\n* The unit-test seam (testing.md § Unit): `mockService` replaces a service\n* node's `load()` and `input()` output so any code that pulls dependencies or\n* input through them — a page, a server action, a helper — runs against typed\n* doubles with no server and no environment. Target-agnostic: every service\n* node has `load()`/`input()`. It does no module mocking; wiring the\n* substitution into a test runner (`vi.mock`, `mock.module`) stays in the test.\n* The integration seam (`bootstrapService`) is target-specific and lives in the\n* target's own testing entry (e.g. `@prisma/composer-prisma-cloud/testing`).\n*/\n/**\n* Returns a service node whose `load()` yields the dependency doubles and\n* `input()` the given input object — everything else about the node (its\n* deps, input schema, build, expose) is unchanged. The input double is NOT\n* validated: the test supplies the typed, already-validated shape directly.\n* `run()` is not meaningful on a mock (there is no boot, no environment) and\n* throws if called.\n*/\nfunction mockService(service, overrides) {\n\tconst entries = Object.entries(overrides);\n\tconst deps = blindCast(Object.fromEntries(entries.filter(([name]) => name in service.inputs)));\n\tconst input = blindCast(entries.find(([name]) => name === \"input\")?.[1]);\n\treturn Object.freeze({\n\t\t...service,\n\t\trun() {\n\t\t\tthrow new Error(`mockService(): \"${service.name}\" is a load()/input()-only mock — it has no run() (no boot, no environment).`);\n\t\t},\n\t\tload: () => deps,\n\t\tinput: () => input\n\t});\n}\n//#endregion\nexport { mockService };\n\n//# sourceMappingURL=testing.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAoBA,SAAS,iBAAiB,OAAO,WAAW;CAC3C,IAAI;CACJ,MAAM,SAAS,IAAI,SAAS,YAAY;EACvC,gBAAgB;CACjB,CAAC;CACD,IAAI,UAAU;CACd,MAAM,UAAU;EACf,MAAM;EACN;CACD,CAAC;CACD,OAAO;EACN;EACA;EACA,MAAM,YAAY;GACjB,IAAI,SAAS;GACb,UAAU;GACV,MAAM,UAAU,EAAE,MAAM,WAAW,CAAC;GACpC,MAAM,UAAU,EAAE,MAAM,UAAU,CAAC;GACnC,cAAc;EACf;CACD;AACD;AACA,gBAAgB,YAAY,OAAO,SAAS,QAAQ;CACnD,KAAK,MAAM,QAAQ,OAAO;EACzB,IAAI,QAAQ,YAAY,MAAM;EAC9B,IAAI,YAAY,KAAK,KAAK,KAAK,YAAY,SAAS;EACpD,MAAM;CACP;AACD;;;;;;;;;;;;;A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Y;EACZ,aAAa;CACd,CAAC;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/composer",
3
- "version": "0.6.0-dev.13",
3
+ "version": "0.6.0-dev.15",
4
4
  "type": "module",
5
5
  "description": "Prisma Composer — build a Prisma App by composing Modules. Core authoring, deploy pipeline, the prisma-composer CLI, and the service-rpc/node/nextjs authoring surfaces.",
6
6
  "bin": {
@@ -10,6 +10,7 @@
10
10
  ".": "./dist/index.mjs",
11
11
  "./config": "./dist/config.mjs",
12
12
  "./control": "./dist/control.mjs",
13
+ "./family": "./dist/family.mjs",
13
14
  "./deploy": "./dist/deploy.mjs",
14
15
  "./local-target": "./dist/local-target.mjs",
15
16
  "./report": "./dist/report.mjs",
@@ -30,25 +31,25 @@
30
31
  ],
31
32
  "dependencies": {
32
33
  "@effect/vitest": "4.0.0-beta.103",
34
+ "@prisma/cli-engine": "0.0.7",
33
35
  "@standard-schema/spec": "^1.1.0",
34
36
  "alchemy": "2.0.0-beta.67",
35
37
  "arktype": "^2.2.3",
36
38
  "c12": "^3.3.4",
37
- "clipanion": "^3.2.1",
38
39
  "effect": "4.0.0-beta.103",
39
40
  "esbuild": "^0.28.1",
40
41
  "@prisma/management-api-sdk": "^1.57.0"
41
42
  },
42
43
  "devDependencies": {
43
- "@internal/assemble": "0.6.0-dev.13",
44
- "@internal/cli": "0.6.0-dev.13",
45
- "@internal/core": "0.6.0-dev.13",
46
- "@internal/foundation": "0.6.0-dev.13",
47
- "@internal/lowering": "0.6.0-dev.13",
48
- "@internal/nextjs": "0.6.0-dev.13",
49
- "@internal/node": "0.6.0-dev.13",
50
- "@internal/service-rpc": "0.6.0-dev.13",
51
- "@internal/tsdown-config": "0.6.0-dev.13",
44
+ "@internal/assemble": "0.6.0-dev.15",
45
+ "@internal/cli": "0.6.0-dev.15",
46
+ "@internal/core": "0.6.0-dev.15",
47
+ "@internal/foundation": "0.6.0-dev.15",
48
+ "@internal/lowering": "0.6.0-dev.15",
49
+ "@internal/nextjs": "0.6.0-dev.15",
50
+ "@internal/node": "0.6.0-dev.15",
51
+ "@internal/service-rpc": "0.6.0-dev.15",
52
+ "@internal/tsdown-config": "0.6.0-dev.15",
52
53
  "@types/node": "^26.0.1",
53
54
  "tsdown": "^0.22.7",
54
55
  "typescript": "^6.0.3"
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Public surface (the `./family` subpath): composer's engine `CommandFamily`,
3
+ * for hosts that mount composer's commands into their own CLI — the `prisma`
4
+ * bin does exactly this.
5
+ *
6
+ * Kept apart from `./control` on purpose. `./control` is the programmatic
7
+ * deploy pipeline; this is the command surface: grammar, help and arg
8
+ * validation belong to the engine, and the handlers behind them are the same
9
+ * operations `./control` exposes.
10
+ *
11
+ * Its static graph is alchemy-free and effect-free, so importing it costs a
12
+ * host nothing until a composer command actually runs.
13
+ */
14
+ export * from '@internal/cli/family';
@@ -1 +1,2 @@
1
+ export * from '@internal/cli/testing';
1
2
  export * from '@internal/core/testing';
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-config-CFsSXEVj-B242oUnm.d.mts","names":[],"sources":["../../../0-framework/1-core/core/dist/app-config-CFsSXEVj.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;UAmBU;;WAEC;;WAEA;;;;;;;UAOD;WACC,OAAO;;WAEP;;EAET;;;;;;;;;;;;UAYQ,oBAAoB,UAAU,oBAAoB;;EAE1D,OAAO,OAAO,uBAAuB,QAAQ;;EAE7C,OAAO,OAAO,uBAAuB,QAAQ;;EAE7C,OAAO,UAAU,IAAI;;EAErB,YAAY,qBAAqB;;;iBAGlB,oBAAoB;;iBAEpB,aAAa,WAAW,oBAAoB,qBAAqB;;UAExE;WACC;WACA,YAAY;;;;;;iBAMN,sBAAsB,qBAAqB,+BAA+B,KAAK,SAAS,sCAAsC,oBAAoB;;;;KAI9J,oBAAoB,MAAM,MAAM,cAAc;;;;;;UAMzC;EACR,UAAU,KAAK,eAAe,OAAO;;;;;;;;UAQ7B;WAC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