@prisma/composer 0.6.0-dev.2 → 0.6.0-dev.21

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 (75) hide show
  1. package/dist/{app-config-Cbv_lA38-BHJsd1DF.d.mts → app-config-aIrriqVU-Dpj1RqnY.d.mts} +43 -17
  2. package/dist/app-config-aIrriqVU-Dpj1RqnY.d.mts.map +1 -0
  3. package/dist/config-BeBRB-6m.d.mts +1 -0
  4. package/dist/config.d.mts +3 -3
  5. package/dist/control.d.mts +219 -0
  6. package/dist/control.d.mts.map +1 -0
  7. package/dist/control.mjs +70 -0
  8. package/dist/control.mjs.map +1 -0
  9. package/dist/deploy-BeBRB-6m.d.mts +1 -0
  10. package/dist/deploy.d.mts +2 -2
  11. package/dist/deploy.mjs +312 -1
  12. package/dist/deploy.mjs.map +1 -0
  13. package/dist/deployment-summary-DswOl_9E-C03NJ98H.mjs +70 -0
  14. package/dist/deployment-summary-DswOl_9E-C03NJ98H.mjs.map +1 -0
  15. package/dist/{dist-BdvFDCLV.mjs → dist-C5rZnr4n.mjs} +2 -2
  16. package/dist/{dist-BdvFDCLV.mjs.map → dist-C5rZnr4n.mjs.map} +1 -1
  17. package/dist/emulator-retry-DGonap4g-S8BNrXFD.mjs +24 -0
  18. package/dist/emulator-retry-DGonap4g-S8BNrXFD.mjs.map +1 -0
  19. package/dist/errors-0e8IVwzi.mjs +88 -0
  20. package/dist/errors-0e8IVwzi.mjs.map +1 -0
  21. package/dist/execute-deploy-destroy-DfVJUICu-Dbgn1GR_.mjs +275 -0
  22. package/dist/execute-deploy-destroy-DfVJUICu-Dbgn1GR_.mjs.map +1 -0
  23. package/dist/execute-dev-BMTFWfFc-CGDFqR4w.mjs +2014 -0
  24. package/dist/execute-dev-BMTFWfFc-CGDFqR4w.mjs.map +1 -0
  25. package/dist/execute-log-Cay9hlKW-ChlIv192.mjs +160 -0
  26. package/dist/execute-log-Cay9hlKW-ChlIv192.mjs.map +1 -0
  27. package/dist/{graph-DgbALPDo-BEHF94BN.mjs → graph-BJgUfGB0-kvgFzT4q.mjs} +13 -7
  28. package/dist/graph-BJgUfGB0-kvgFzT4q.mjs.map +1 -0
  29. package/dist/{graph-DDpXh7S8-b-93BcHn.d.mts → graph-DqklX5Sf-BNS2aO1j.d.mts} +3 -3
  30. package/dist/graph-DqklX5Sf-BNS2aO1j.d.mts.map +1 -0
  31. package/dist/{graph-types-C3FOaaXm-C6_rGzfn.d.mts → graph-types-N6brq1zY-1VMNwtkJ.d.mts} +88 -5
  32. package/dist/graph-types-N6brq1zY-1VMNwtkJ.d.mts.map +1 -0
  33. package/dist/{index-BQVrMGfe.d.mts → index-DryPyF9U.d.mts} +3 -3
  34. package/dist/{index-BQVrMGfe.d.mts.map → index-DryPyF9U.d.mts.map} +1 -1
  35. package/dist/index.d.mts +3 -3
  36. package/dist/index.mjs +2 -2
  37. package/dist/internal-error-BIc-ehme-Ck_lgxD_.mjs +18 -0
  38. package/dist/internal-error-BIc-ehme-Ck_lgxD_.mjs.map +1 -0
  39. package/dist/local-target-DnA2E8IN.mjs +47 -0
  40. package/dist/local-target-DnA2E8IN.mjs.map +1 -0
  41. package/dist/local-target.d.mts +1 -1
  42. package/dist/local-target.mjs +2 -46
  43. package/dist/{nextjs-DLyeRR7M-D47aMmfr.d.mts → nextjs-DLyeRR7M-DZODs9tk.d.mts} +3 -3
  44. package/dist/{nextjs-DLyeRR7M-D47aMmfr.d.mts.map → nextjs-DLyeRR7M-DZODs9tk.d.mts.map} +1 -1
  45. package/dist/nextjs-control.d.mts +4 -4
  46. package/dist/nextjs.d.mts +1 -1
  47. package/dist/node-control.d.mts +3 -3
  48. package/dist/node.d.mts +2 -2
  49. package/dist/pipeline-AoW8zq4I-CUon5KZH.mjs +452 -0
  50. package/dist/pipeline-AoW8zq4I-CUon5KZH.mjs.map +1 -0
  51. package/dist/report.d.mts +4 -3
  52. package/dist/report.d.mts.map +1 -1
  53. package/dist/report.mjs +4 -1
  54. package/dist/report.mjs.map +1 -1
  55. package/dist/result-CY_TB7bn.mjs +247 -0
  56. package/dist/result-CY_TB7bn.mjs.map +1 -0
  57. package/dist/run-alchemy-D44OZlyB-gVq_0gf4.mjs +93 -0
  58. package/dist/run-alchemy-D44OZlyB-gVq_0gf4.mjs.map +1 -0
  59. package/dist/service-rpc.d.mts +2 -2
  60. package/dist/service-rpc.mjs +2 -2
  61. package/dist/testing.d.mts +1 -1
  62. package/package.json +17 -21
  63. package/src/exports/control.ts +1 -0
  64. package/src/exports/testing.ts +5 -0
  65. package/dist/app-config-Cbv_lA38-BHJsd1DF.d.mts.map +0 -1
  66. package/dist/bin.mjs +0 -3283
  67. package/dist/bin.mjs.map +0 -1
  68. package/dist/config-whuqZ5xT.d.mts +0 -1
  69. package/dist/deploy-C4DxNkJ9-D73lmBqy.mjs +0 -313
  70. package/dist/deploy-C4DxNkJ9-D73lmBqy.mjs.map +0 -1
  71. package/dist/deploy-whuqZ5xT.d.mts +0 -1
  72. package/dist/graph-DDpXh7S8-b-93BcHn.d.mts.map +0 -1
  73. package/dist/graph-DgbALPDo-BEHF94BN.mjs.map +0 -1
  74. package/dist/graph-types-C3FOaaXm-C6_rGzfn.d.mts.map +0 -1
  75. package/dist/local-target.mjs.map +0 -1
@@ -0,0 +1,247 @@
1
+ import { t as blindCast } from "./casts-DpaahrlC-C5XMnP9S.mjs";
2
+ import { t as InternalError } from "./internal-error-BIc-ehme-Ck_lgxD_.mjs";
3
+ import { t as CliStructuredError } from "./errors-0e8IVwzi.mjs";
4
+ import { createRequire } from "node:module";
5
+ import * as fs from "node:fs";
6
+ import * as path from "node:path";
7
+ //#region ../../0-framework/3-tooling/cli/dist/shared-BTnATsqm.mjs
8
+ /**
9
+ * Deploy preflight (TML-3158): verify that alchemy resolves the exact `effect`
10
+ * version @prisma/composer pins. Package managers cannot be made to enforce
11
+ * this — alchemy's own peer range accepts newer effect betas, and npm resolves
12
+ * transitive peer conflicts with a warning, not a failure — so a floating
13
+ * `@effect/*` range anywhere in the consumer's tree can hoist a newer effect
14
+ * to the root, where alchemy picks it up and crashes mid-deploy
15
+ * (`TypeError: Schedule.either is not a function`). This check turns that
16
+ * silent break into a start-up error naming the fix.
17
+ */
18
+ /** Walks up from `startDir` looking for `node_modules/alchemy` (mirrors resolveAlchemyBin). Undefined when absent — the check skips rather than second-guessing later, clearer failures. */
19
+ function findAlchemyPackageDir(startDir) {
20
+ let dir = startDir;
21
+ while (true) {
22
+ const candidate = path.join(dir, "node_modules", "alchemy");
23
+ if (fs.existsSync(path.join(candidate, "package.json"))) return candidate;
24
+ const parent = path.dirname(dir);
25
+ if (parent === dir) return void 0;
26
+ dir = parent;
27
+ }
28
+ }
29
+ /**
30
+ * The `effect` version Node gives `packageDir`'s code, resolved exactly as
31
+ * Node would: from the package's real path (so pnpm symlink layouts resolve
32
+ * from the package's own store position, like at runtime). Undefined when
33
+ * `effect` is not resolvable from there.
34
+ */
35
+ function resolveEffectVersionFrom(packageDir) {
36
+ let entry;
37
+ try {
38
+ entry = createRequire(path.join(fs.realpathSync(packageDir), "noop.js")).resolve("effect");
39
+ } catch {
40
+ return;
41
+ }
42
+ let dir = path.dirname(entry);
43
+ while (!fs.existsSync(path.join(dir, "package.json"))) {
44
+ const parent = path.dirname(dir);
45
+ if (parent === dir) return void 0;
46
+ dir = parent;
47
+ }
48
+ const version = JSON.parse(fs.readFileSync(path.join(dir, "package.json"), "utf-8")).version;
49
+ return typeof version === "string" ? version : void 0;
50
+ }
51
+ /**
52
+ * The `effect` version @prisma/composer pins, read from its own installed
53
+ * package.json — the single source of truth; never hardcoded here. Undefined
54
+ * when @prisma/composer is not resolvable from `startDir` (e.g. the CLI is
55
+ * driven some other way), in which case the check skips.
56
+ *
57
+ * Assumes the pin is an exact version — effectMismatchError compares with
58
+ * `===`, which scripts/check-npm-effect-resolution.mjs enforces in CI;
59
+ * relaxing the pin to a range means revisiting that comparison.
60
+ */
61
+ function requiredEffectVersion(startDir) {
62
+ let manifestPath;
63
+ try {
64
+ manifestPath = createRequire(path.join(startDir, "noop.js")).resolve("@prisma/composer/package.json");
65
+ } catch {
66
+ return;
67
+ }
68
+ const manifest = JSON.parse(fs.readFileSync(manifestPath, "utf-8"));
69
+ if (typeof manifest !== "object" || manifest === null || !("dependencies" in manifest)) return;
70
+ const dependencies = manifest.dependencies;
71
+ if (typeof dependencies !== "object" || dependencies === null || !("effect" in dependencies)) return;
72
+ const version = dependencies.effect;
73
+ return typeof version === "string" ? version : void 0;
74
+ }
75
+ /** Pure comparison + parts rendering, separated so tests cover the rule without a filesystem. Returns the structured error parts, or undefined when the tree is healthy or either side is unknown. */
76
+ function effectMismatchError(found, required) {
77
+ if (found === void 0 || required === void 0 || found === required) return void 0;
78
+ return {
79
+ summary: `Dependency conflict: alchemy resolves effect@${found}, but @prisma/composer requires effect@${required}.`,
80
+ why: "Your package manager installed a second effect that alchemy picks up; deploying with it would crash inside alchemy.",
81
+ fix: `Add this to your app's package.json, then reinstall:
82
+
83
+ "overrides": { "effect": "${required}" }\n\n(npm uses "overrides"; yarn calls it "resolutions", pnpm "pnpm.overrides".)`,
84
+ meta: {
85
+ found,
86
+ required
87
+ }
88
+ };
89
+ }
90
+ /**
91
+ * Runs the preflight from the app's directory and RETURNS the
92
+ * DEPS.EFFECT_VERSION_CONFLICT error for a mismatched tree; undefined when the
93
+ * tree is healthy or alchemy is not installed.
94
+ *
95
+ * This is the form the config-load machinery uses. The check belongs on the
96
+ * config-load path rather than at import time because that is the first moment
97
+ * anything actually loads alchemy's provider tree — the break it explains —
98
+ * and because a check that runs at import time takes out commands that never
99
+ * touch alchemy at all, help among them.
100
+ */
101
+ function effectResolutionDiagnostic(cwd) {
102
+ const alchemyDir = findAlchemyPackageDir(cwd);
103
+ if (alchemyDir === void 0) return void 0;
104
+ const parts = effectMismatchError(resolveEffectVersionFrom(alchemyDir), requiredEffectVersion(cwd));
105
+ if (parts === void 0) return void 0;
106
+ return new CliStructuredError("DEPS.EFFECT_VERSION_CONFLICT", parts.summary, {
107
+ why: parts.why,
108
+ fix: parts.fix,
109
+ meta: parts.meta
110
+ });
111
+ }
112
+ /** The throwing form, used by the executor-load diagnosis — the one caller left now that the bin runs no start-up preflight of its own. */
113
+ function checkEffectResolution(cwd) {
114
+ const diagnostic = effectResolutionDiagnostic(cwd);
115
+ if (diagnostic !== void 0) throw diagnostic;
116
+ }
117
+ /**
118
+ * Reads the execution diagnostics an engine-failure error carries in
119
+ * `meta.diagnostics`; undefined for every other failure.
120
+ */
121
+ function executionDiagnostics(f) {
122
+ const diagnostics = f.meta?.["diagnostics"];
123
+ if (typeof diagnostics !== "object" || diagnostics === null) return void 0;
124
+ const candidate = blindCast(diagnostics);
125
+ if (candidate["exitCode"] !== void 0 && typeof candidate["exitCode"] !== "number" || candidate["signal"] !== void 0 && typeof candidate["signal"] !== "string" || typeof candidate["stackFilePath"] !== "string" || typeof candidate["reproduceCommand"] !== "string" || typeof candidate["cwd"] !== "string") return;
126
+ return blindCast(diagnostics);
127
+ }
128
+ /**
129
+ * Site-specific wrap for foreign extension/environment causes — passthrough
130
+ * when already structured; never a boundary fallback (base-type rule 6(ii)).
131
+ */
132
+ function toStructured(code, error) {
133
+ return CliStructuredError.is(error) ? error : new CliStructuredError(code, error instanceof Error ? error.message : String(error), { cause: error });
134
+ }
135
+ /** Diagnoses a failed executor import: when the app's tree resolves a
136
+ * mismatched `effect` (the known way that import breaks), the failure is the
137
+ * fix-naming DEPS.EFFECT_VERSION_CONFLICT from checkEffectResolution with the
138
+ * import error riding as cause; otherwise DEPS.EXECUTOR_UNLOADABLE — an
139
+ * environmental failure of the consumer's installed tree, not a bug here. */
140
+ function executorLoadFailure(operation, error, cwd) {
141
+ try {
142
+ checkEffectResolution(cwd);
143
+ } catch (diagnostic) {
144
+ if (CliStructuredError.is(diagnostic)) return new CliStructuredError(diagnostic.code, diagnostic.message, {
145
+ ...diagnostic.why !== void 0 ? { why: diagnostic.why } : {},
146
+ ...diagnostic.fix !== void 0 ? { fix: diagnostic.fix } : {},
147
+ ...diagnostic.meta !== void 0 ? { meta: diagnostic.meta } : {},
148
+ cause: error
149
+ });
150
+ }
151
+ return new CliStructuredError("DEPS.EXECUTOR_UNLOADABLE", `Could not load the ${operation} executor: ${error instanceof Error ? error.message : String(error)}`, {
152
+ why: `The ${operation} operation's executor imports the deploy engine's provider tree from your app's installed dependencies, and that import failed.`,
153
+ fix: "Reinstall your dependencies, and check that `alchemy` is installed and loadable from your app.",
154
+ cause: error
155
+ });
156
+ }
157
+ //#endregion
158
+ //#region ../../0-framework/0-foundation/foundation/dist/result.mjs
159
+ /**
160
+ * Generic Result type for representing success or failure outcomes.
161
+ *
162
+ * This is the standard way to return "expected failures" as values rather than
163
+ * throwing exceptions. See docs/Error Handling.md for the full taxonomy.
164
+ *
165
+ * Naming rationale:
166
+ * - `Ok<T>` / `NotOk<F>` mirror the `ok: true/false` discriminator
167
+ * - `NotOk` avoids collision with domain types like "Failure" or "Error"
168
+ * - `failure` property distinguishes from JS Error semantics
169
+ */
170
+ /**
171
+ * Result class that implements both Ok and NotOk variants.
172
+ */
173
+ var ResultImpl = class ResultImpl {
174
+ ok;
175
+ _value;
176
+ _failure;
177
+ constructor(ok, valueOrFailure) {
178
+ this.ok = ok;
179
+ if (ok) this._value = blindCast(valueOrFailure);
180
+ else this._failure = blindCast(valueOrFailure);
181
+ Object.freeze(this);
182
+ }
183
+ get value() {
184
+ if (!this.ok) throw new InternalError("Cannot access value on NotOk result");
185
+ return this._value;
186
+ }
187
+ get failure() {
188
+ if (this.ok) throw new InternalError("Cannot access failure on Ok result");
189
+ return this._failure;
190
+ }
191
+ /**
192
+ * Creates a successful result.
193
+ */
194
+ static ok(value) {
195
+ return blindCast(new ResultImpl(true, value));
196
+ }
197
+ /**
198
+ * Creates an unsuccessful result.
199
+ */
200
+ static notOk(failure) {
201
+ return blindCast(new ResultImpl(false, failure));
202
+ }
203
+ /**
204
+ * Asserts that this result is Ok and returns the value.
205
+ * Throws if the result is NotOk.
206
+ */
207
+ assertOk() {
208
+ if (!this.ok) throw new InternalError("Expected Ok result but got NotOk");
209
+ return this.value;
210
+ }
211
+ /**
212
+ * Asserts that this result is NotOk and returns the failure.
213
+ * Throws if the result is Ok.
214
+ */
215
+ assertNotOk() {
216
+ if (this.ok) throw new InternalError("Expected NotOk result but got Ok");
217
+ return this.failure;
218
+ }
219
+ };
220
+ /**
221
+ * Creates a successful result.
222
+ */
223
+ function ok(value) {
224
+ return ResultImpl.ok(value);
225
+ }
226
+ /**
227
+ * Creates an unsuccessful result.
228
+ */
229
+ function notOk(failure) {
230
+ return ResultImpl.notOk(failure);
231
+ }
232
+ /**
233
+ * Singleton for void success results.
234
+ * Use this for validation checks that don't produce a value.
235
+ */
236
+ const OK_VOID = ResultImpl.ok(void 0);
237
+ /**
238
+ * Returns a successful void result.
239
+ * Use this for validation checks that don't produce a value.
240
+ */
241
+ function okVoid() {
242
+ return OK_VOID;
243
+ }
244
+ //#endregion
245
+ export { executionDiagnostics as a, effectResolutionDiagnostic as i, ok as n, executorLoadFailure as o, okVoid as r, toStructured as s, notOk as t };
246
+
247
+ //# sourceMappingURL=result-CY_TB7bn.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"result-CY_TB7bn.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/shared-BTnATsqm.mjs","../../../0-framework/0-foundation/foundation/dist/result.mjs"],"sourcesContent":["import { createRequire } from \"node:module\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { blindCast } from \"@internal/foundation/casts\";\n//#region src/check-effect-resolution.ts\n/**\n* Deploy preflight (TML-3158): verify that alchemy resolves the exact `effect`\n* version @prisma/composer pins. Package managers cannot be made to enforce\n* this — alchemy's own peer range accepts newer effect betas, and npm resolves\n* transitive peer conflicts with a warning, not a failure — so a floating\n* `@effect/*` range anywhere in the consumer's tree can hoist a newer effect\n* to the root, where alchemy picks it up and crashes mid-deploy\n* (`TypeError: Schedule.either is not a function`). This check turns that\n* silent break into a start-up error naming the fix.\n*/\n/** Walks up from `startDir` looking for `node_modules/alchemy` (mirrors resolveAlchemyBin). Undefined when absent — the check skips rather than second-guessing later, clearer failures. */\nfunction findAlchemyPackageDir(startDir) {\n\tlet dir = startDir;\n\twhile (true) {\n\t\tconst candidate = path.join(dir, \"node_modules\", \"alchemy\");\n\t\tif (fs.existsSync(path.join(candidate, \"package.json\"))) return candidate;\n\t\tconst parent = path.dirname(dir);\n\t\tif (parent === dir) return void 0;\n\t\tdir = parent;\n\t}\n}\n/**\n* The `effect` version Node gives `packageDir`'s code, resolved exactly as\n* Node would: from the package's real path (so pnpm symlink layouts resolve\n* from the package's own store position, like at runtime). Undefined when\n* `effect` is not resolvable from there.\n*/\nfunction resolveEffectVersionFrom(packageDir) {\n\tlet entry;\n\ttry {\n\t\tentry = createRequire(path.join(fs.realpathSync(packageDir), \"noop.js\")).resolve(\"effect\");\n\t} catch {\n\t\treturn;\n\t}\n\tlet dir = path.dirname(entry);\n\twhile (!fs.existsSync(path.join(dir, \"package.json\"))) {\n\t\tconst parent = path.dirname(dir);\n\t\tif (parent === dir) return void 0;\n\t\tdir = parent;\n\t}\n\tconst version = JSON.parse(fs.readFileSync(path.join(dir, \"package.json\"), \"utf-8\")).version;\n\treturn typeof version === \"string\" ? version : void 0;\n}\n/**\n* The `effect` version @prisma/composer pins, read from its own installed\n* package.json — the single source of truth; never hardcoded here. Undefined\n* when @prisma/composer is not resolvable from `startDir` (e.g. the CLI is\n* driven some other way), in which case the check skips.\n*\n* Assumes the pin is an exact version — effectMismatchError compares with\n* `===`, which scripts/check-npm-effect-resolution.mjs enforces in CI;\n* relaxing the pin to a range means revisiting that comparison.\n*/\nfunction requiredEffectVersion(startDir) {\n\tlet manifestPath;\n\ttry {\n\t\tmanifestPath = createRequire(path.join(startDir, \"noop.js\")).resolve(\"@prisma/composer/package.json\");\n\t} catch {\n\t\treturn;\n\t}\n\tconst manifest = JSON.parse(fs.readFileSync(manifestPath, \"utf-8\"));\n\tif (typeof manifest !== \"object\" || manifest === null || !(\"dependencies\" in manifest)) return;\n\tconst dependencies = manifest.dependencies;\n\tif (typeof dependencies !== \"object\" || dependencies === null || !(\"effect\" in dependencies)) return;\n\tconst version = dependencies.effect;\n\treturn typeof version === \"string\" ? version : void 0;\n}\n/** Pure comparison + parts rendering, separated so tests cover the rule without a filesystem. Returns the structured error parts, or undefined when the tree is healthy or either side is unknown. */\nfunction effectMismatchError(found, required) {\n\tif (found === void 0 || required === void 0 || found === required) return void 0;\n\treturn {\n\t\tsummary: `Dependency conflict: alchemy resolves effect@${found}, but @prisma/composer requires effect@${required}.`,\n\t\twhy: \"Your package manager installed a second effect that alchemy picks up; deploying with it would crash inside alchemy.\",\n\t\tfix: `Add this to your app's package.json, then reinstall:\n\n \"overrides\": { \"effect\": \"${required}\" }\\n\\n(npm uses \"overrides\"; yarn calls it \"resolutions\", pnpm \"pnpm.overrides\".)`,\n\t\tmeta: {\n\t\t\tfound,\n\t\t\trequired\n\t\t}\n\t};\n}\n/**\n* Runs the preflight from the app's directory and RETURNS the\n* DEPS.EFFECT_VERSION_CONFLICT error for a mismatched tree; undefined when the\n* tree is healthy or alchemy is not installed.\n*\n* This is the form the config-load machinery uses. The check belongs on the\n* config-load path rather than at import time because that is the first moment\n* anything actually loads alchemy's provider tree — the break it explains —\n* and because a check that runs at import time takes out commands that never\n* touch alchemy at all, help among them.\n*/\nfunction effectResolutionDiagnostic(cwd) {\n\tconst alchemyDir = findAlchemyPackageDir(cwd);\n\tif (alchemyDir === void 0) return void 0;\n\tconst parts = effectMismatchError(resolveEffectVersionFrom(alchemyDir), requiredEffectVersion(cwd));\n\tif (parts === void 0) return void 0;\n\treturn new CliStructuredError(\"DEPS.EFFECT_VERSION_CONFLICT\", parts.summary, {\n\t\twhy: parts.why,\n\t\tfix: parts.fix,\n\t\tmeta: parts.meta\n\t});\n}\n/** The throwing form, used by the executor-load diagnosis — the one caller left now that the bin runs no start-up preflight of its own. */\nfunction checkEffectResolution(cwd) {\n\tconst diagnostic = effectResolutionDiagnostic(cwd);\n\tif (diagnostic !== void 0) throw diagnostic;\n}\n//#endregion\n//#region src/operations/shared.ts\n/**\n* Reads the execution diagnostics an engine-failure error carries in\n* `meta.diagnostics`; undefined for every other failure.\n*/\nfunction executionDiagnostics(f) {\n\tconst diagnostics = f.meta?.[\"diagnostics\"];\n\tif (typeof diagnostics !== \"object\" || diagnostics === null) return void 0;\n\tconst candidate = blindCast(diagnostics);\n\tif (candidate[\"exitCode\"] !== void 0 && typeof candidate[\"exitCode\"] !== \"number\" || candidate[\"signal\"] !== void 0 && typeof candidate[\"signal\"] !== \"string\" || typeof candidate[\"stackFilePath\"] !== \"string\" || typeof candidate[\"reproduceCommand\"] !== \"string\" || typeof candidate[\"cwd\"] !== \"string\") return;\n\treturn blindCast(diagnostics);\n}\n/**\n* Site-specific wrap for foreign extension/environment causes — passthrough\n* when already structured; never a boundary fallback (base-type rule 6(ii)).\n*/\nfunction toStructured(code, error) {\n\treturn CliStructuredError.is(error) ? error : new CliStructuredError(code, error instanceof Error ? error.message : String(error), { cause: error });\n}\n/** Diagnoses a failed executor import: when the app's tree resolves a\n* mismatched `effect` (the known way that import breaks), the failure is the\n* fix-naming DEPS.EFFECT_VERSION_CONFLICT from checkEffectResolution with the\n* import error riding as cause; otherwise DEPS.EXECUTOR_UNLOADABLE — an\n* environmental failure of the consumer's installed tree, not a bug here. */\nfunction executorLoadFailure(operation, error, cwd) {\n\ttry {\n\t\tcheckEffectResolution(cwd);\n\t} catch (diagnostic) {\n\t\tif (CliStructuredError.is(diagnostic)) return new CliStructuredError(diagnostic.code, diagnostic.message, {\n\t\t\t...diagnostic.why !== void 0 ? { why: diagnostic.why } : {},\n\t\t\t...diagnostic.fix !== void 0 ? { fix: diagnostic.fix } : {},\n\t\t\t...diagnostic.meta !== void 0 ? { meta: diagnostic.meta } : {},\n\t\t\tcause: error\n\t\t});\n\t}\n\treturn new CliStructuredError(\"DEPS.EXECUTOR_UNLOADABLE\", `Could not load the ${operation} executor: ${error instanceof Error ? error.message : String(error)}`, {\n\t\twhy: `The ${operation} operation's executor imports the deploy engine's provider tree from your app's installed dependencies, and that import failed.`,\n\t\tfix: \"Reinstall your dependencies, and check that `alchemy` is installed and loadable from your app.\",\n\t\tcause: error\n\t});\n}\n//#endregion\nexport { effectResolutionDiagnostic as i, executorLoadFailure as n, toStructured as r, executionDiagnostics as t };\n\n//# sourceMappingURL=shared-BTnATsqm.mjs.map","import { 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,SAAS,sBAAsB,UAAU;CACxC,IAAI,MAAM;CACV,OAAO,MAAM;EACZ,MAAM,YAAY,KAAK,KAAK,KAAK,gBAAgB,SAAS;EAC1D,IAAI,GAAG,WAAW,KAAK,KAAK,WAAW,cAAc,CAAC,GAAG,OAAO;EAChE,MAAM,SAAS,KAAK,QAAQ,GAAG;EAC/B,IAAI,WAAW,KAAK,OAAO,KAAK;EAChC,MAAM;CACP;AACD;;;;;;;AAOA,SAAS,yBAAyB,YAAY;CAC7C,IAAI;CACJ,IAAI;EACH,QAAQ,cAAc,KAAK,KAAK,GAAG,aAAa,UAAU,GAAG,SAAS,CAAC,CAAC,CAAC,QAAQ,QAAQ;CAC1F,QAAQ;EACP;CACD;CACA,IAAI,MAAM,KAAK,QAAQ,KAAK;CAC5B,OAAO,CAAC,GAAG,WAAW,KAAK,KAAK,KAAK,cAAc,CAAC,GAAG;EACtD,MAAM,SAAS,KAAK,QAAQ,GAAG;EAC/B,IAAI,WAAW,KAAK,OAA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,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 { t as CliStructuredError } from "./errors-0e8IVwzi.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 { spawnAlchemy as n, alchemyInvocation as t };
92
+
93
+ //# sourceMappingURL=run-alchemy-D44OZlyB-gVq_0gf4.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-alchemy-D44OZlyB-gVq_0gf4.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-C3FOaaXm-C6_rGzfn.mjs";
2
- import "./index-BQVrMGfe.mjs";
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";
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-DgbALPDo-BEHF94BN.mjs";
3
- import { c as string } from "./dist-BdvFDCLV.mjs";
2
+ import { i as dependency, p as provisionNeed } from "./graph-BJgUfGB0-kvgFzT4q.mjs";
3
+ import { c as string } from "./dist-C5rZnr4n.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,4 +1,4 @@
1
- import { L as RunnableServiceNode, c as Deps, j as Params, m as HydratedDeps, u as Expose } from "./graph-types-C3FOaaXm-C6_rGzfn.mjs";
1
+ import { L as RunnableServiceNode, c as Deps, j as Params, m as HydratedDeps, u as Expose } from "./graph-types-N6brq1zY-1VMNwtkJ.mjs";
2
2
  import { StandardSchemaV1 } from "@standard-schema/spec";
3
3
  //#region ../../0-framework/1-core/core/dist/testing.d.mts
4
4
  //#region src/testing.d.ts
package/package.json CHANGED
@@ -1,14 +1,12 @@
1
1
  {
2
2
  "name": "@prisma/composer",
3
- "version": "0.6.0-dev.2",
3
+ "version": "0.6.0-dev.21",
4
4
  "type": "module",
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
- "bin": {
7
- "prisma-composer": "./dist/bin.mjs"
8
- },
5
+ "description": "Prisma Composer — build a Prisma App by composing Modules. Core authoring, deploy pipeline, and the service-rpc/node/nextjs authoring surfaces. The `prisma-composer` CLI lives in @prisma/composer-cli.",
9
6
  "exports": {
10
7
  ".": "./dist/index.mjs",
11
8
  "./config": "./dist/config.mjs",
9
+ "./control": "./dist/control.mjs",
12
10
  "./deploy": "./dist/deploy.mjs",
13
11
  "./local-target": "./dist/local-target.mjs",
14
12
  "./report": "./dist/report.mjs",
@@ -28,27 +26,25 @@
28
26
  "src"
29
27
  ],
30
28
  "dependencies": {
31
- "@effect/vitest": "4.0.0-beta.93",
32
29
  "@standard-schema/spec": "^1.1.0",
33
- "alchemy": "2.0.0-beta.59",
30
+ "alchemy": "2.0.0-beta.67",
34
31
  "arktype": "^2.2.3",
35
32
  "c12": "^3.3.4",
36
- "clipanion": "^3.2.1",
37
- "effect": "4.0.0-beta.93",
33
+ "effect": "4.0.0-beta.103",
38
34
  "esbuild": "^0.28.1",
39
- "postgres": "^3.4.9",
40
- "@prisma/management-api-sdk": "^1.50.0"
35
+ "@prisma/management-api-sdk": "^1.57.0"
41
36
  },
42
37
  "devDependencies": {
43
- "@internal/assemble": "0.6.0-dev.2",
44
- "@internal/cli": "0.6.0-dev.2",
45
- "@internal/core": "0.6.0-dev.2",
46
- "@internal/foundation": "0.6.0-dev.2",
47
- "@internal/lowering": "0.6.0-dev.2",
48
- "@internal/nextjs": "0.6.0-dev.2",
49
- "@internal/node": "0.6.0-dev.2",
50
- "@internal/service-rpc": "0.6.0-dev.2",
51
- "@internal/tsdown-config": "0.6.0-dev.2",
38
+ "@effect/vitest": "4.0.0-beta.103",
39
+ "@internal/assemble": "0.6.0-dev.21",
40
+ "@internal/cli": "0.6.0-dev.21",
41
+ "@internal/core": "0.6.0-dev.21",
42
+ "@internal/foundation": "0.6.0-dev.21",
43
+ "@internal/lowering": "0.6.0-dev.21",
44
+ "@internal/nextjs": "0.6.0-dev.21",
45
+ "@internal/node": "0.6.0-dev.21",
46
+ "@internal/service-rpc": "0.6.0-dev.21",
47
+ "@internal/tsdown-config": "0.6.0-dev.21",
52
48
  "@types/node": "^26.0.1",
53
49
  "tsdown": "^0.22.7",
54
50
  "typescript": "^6.0.3"
@@ -60,7 +56,7 @@
60
56
  "directory": "packages/9-public/composer"
61
57
  },
62
58
  "engines": {
63
- "node": ">=24"
59
+ "node": ">=22.18.0"
64
60
  },
65
61
  "publishConfig": {
66
62
  "access": "public"
@@ -0,0 +1 @@
1
+ export * from '@internal/cli/control';
@@ -1 +1,6 @@
1
+ /**
2
+ * Public surface (the `./testing` subpath): `mockService`, the application
3
+ * unit-test seam for composed services. The command family's control double
4
+ * lives in `@prisma/composer-cli/testing`.
5
+ */
1
6
  export * from '@internal/core/testing';
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-config-Cbv_lA38-BHJsd1DF.d.mts","names":[],"sources":["../../../0-framework/1-core/core/dist/app-config-Cbv_lA38.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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