@prisma/composer 0.11.0 → 0.12.0

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 (50) hide show
  1. package/dist/{app-config-DF2_vkH7-D-BcHjYm.d.mts → app-config-CooZZhD4-EAGtxAPU.d.mts} +12 -4
  2. package/dist/{app-config-DF2_vkH7-D-BcHjYm.d.mts.map → app-config-CooZZhD4-EAGtxAPU.d.mts.map} +1 -1
  3. package/dist/config-BmK1pGlA.d.mts +1 -0
  4. package/dist/config.d.mts +2 -2
  5. package/dist/control.d.mts +5 -5
  6. package/dist/control.mjs +5 -5
  7. package/dist/control.mjs.map +1 -1
  8. package/dist/deploy-BmK1pGlA.d.mts +1 -0
  9. package/dist/deploy.d.mts +2 -2
  10. package/dist/deploy.mjs +1 -1
  11. package/dist/deploy.mjs.map +1 -1
  12. package/dist/{dist-C5rZnr4n.mjs → dist-BwC61F08.mjs} +2 -2
  13. package/dist/dist-BwC61F08.mjs.map +1 -0
  14. package/dist/{execute-deploy-destroy-DJ3BlpgU-ozOg0xCh.mjs → execute-deploy-destroy-Bsdh8hf4-ConszqTa.mjs} +4 -3
  15. package/dist/execute-deploy-destroy-Bsdh8hf4-ConszqTa.mjs.map +1 -0
  16. package/dist/{execute-dev-CQ0Lo2eN-BXIHSzKA.mjs → execute-dev-CQ0Lo2eN-BL3PmI0m.mjs} +2 -2
  17. package/dist/{execute-dev-CQ0Lo2eN-BXIHSzKA.mjs.map → execute-dev-CQ0Lo2eN-BL3PmI0m.mjs.map} +1 -1
  18. package/dist/{execute-log-CUzTOzSj-D5c_igNr.mjs → execute-log-CUzTOzSj-v-J7hbAb.mjs} +2 -2
  19. package/dist/{execute-log-CUzTOzSj-D5c_igNr.mjs.map → execute-log-CUzTOzSj-v-J7hbAb.mjs.map} +1 -1
  20. package/dist/{graph-BJgUfGB0-kvgFzT4q.mjs → graph-BfKAg2Ap-CrhKkEzd.mjs} +152 -11
  21. package/dist/graph-BfKAg2Ap-CrhKkEzd.mjs.map +1 -0
  22. package/dist/{graph-DqklX5Sf-BNS2aO1j.d.mts → graph-CPeatmoF-DfDx8ctT.d.mts} +3 -3
  23. package/dist/graph-CPeatmoF-DfDx8ctT.d.mts.map +1 -0
  24. package/dist/{graph-types-N6brq1zY-1VMNwtkJ.d.mts → graph-types-BTTaRnih-BF6PobQ3.d.mts} +44 -3
  25. package/dist/{graph-types-N6brq1zY-1VMNwtkJ.d.mts.map → graph-types-BTTaRnih-BF6PobQ3.d.mts.map} +1 -1
  26. package/dist/{index-DryPyF9U.d.mts → index-DeocL1di.d.mts} +3 -3
  27. package/dist/{index-DryPyF9U.d.mts.map → index-DeocL1di.d.mts.map} +1 -1
  28. package/dist/index.d.mts +4 -4
  29. package/dist/index.mjs +3 -3
  30. package/dist/local-target.d.mts +1 -1
  31. package/dist/{nextjs-DLyeRR7M-DZODs9tk.d.mts → nextjs-DLyeRR7M-D7UOddVQ.d.mts} +3 -3
  32. package/dist/{nextjs-DLyeRR7M-DZODs9tk.d.mts.map → nextjs-DLyeRR7M-D7UOddVQ.d.mts.map} +1 -1
  33. package/dist/nextjs-control.d.mts +4 -4
  34. package/dist/nextjs.d.mts +1 -1
  35. package/dist/node-control.d.mts +3 -3
  36. package/dist/node.d.mts +2 -2
  37. package/dist/{pipeline-Bt8QocRh-DMU4GXz9.mjs → pipeline-Bt8QocRh-Dw2LMte5.mjs} +3 -3
  38. package/dist/{pipeline-Bt8QocRh-DMU4GXz9.mjs.map → pipeline-Bt8QocRh-Dw2LMte5.mjs.map} +1 -1
  39. package/dist/report.d.mts +2 -2
  40. package/dist/service-rpc.d.mts +2 -2
  41. package/dist/service-rpc.mjs +2 -2
  42. package/dist/testing.d.mts +1 -1
  43. package/package.json +16 -15
  44. package/skills/prisma-composer/SKILL.md +786 -0
  45. package/dist/config-Cgdex2ik.d.mts +0 -1
  46. package/dist/deploy-Cgdex2ik.d.mts +0 -1
  47. package/dist/dist-C5rZnr4n.mjs.map +0 -1
  48. package/dist/execute-deploy-destroy-DJ3BlpgU-ozOg0xCh.mjs.map +0 -1
  49. package/dist/graph-BJgUfGB0-kvgFzT4q.mjs.map +0 -1
  50. package/dist/graph-DqklX5Sf-BNS2aO1j.d.mts.map +0 -1
@@ -1,11 +1,11 @@
1
- import { F as ResourceNode, M as ProvisionNeed, U as ServiceNode, d as Graph, n as Config, t as BuildAdapter, w as NodeId, x as ModuleNode } from "./graph-types-N6brq1zY-1VMNwtkJ.mjs";
2
- import "./graph-DqklX5Sf-BNS2aO1j.mjs";
1
+ import { C as ModuleNode, E as NodeId, F as ProvisionNeed, i as Config, p as Graph, q as ServiceNode, r as BuildAdapter, z as ResourceNode } from "./graph-types-BTTaRnih-BF6PobQ3.mjs";
2
+ import "./graph-CPeatmoF-DfDx8ctT.mjs";
3
3
  import * as Alchemy from "alchemy";
4
4
  import { Input, StackServices } from "alchemy";
5
5
  import * as Effect from "effect/Effect";
6
6
  import * as Layer from "effect/Layer";
7
7
  import { State } from "alchemy/State/State";
8
- //#region ../../0-framework/1-core/core/dist/app-config-DF2_vkH7.d.mts
8
+ //#region ../../0-framework/1-core/core/dist/app-config-CooZZhD4.d.mts
9
9
  //#region src/container-transport.d.ts
10
10
  /**
11
11
  * Carries resolved containers from the CLI process into the alchemy process
@@ -460,6 +460,14 @@ interface TeardownInput {
460
460
  interface ReportBeginInput<C = unknown> {
461
461
  /** The resolved application name. */
462
462
  readonly appName: string;
463
+ /**
464
+ * The loaded application graph — what this deploy declares. A reporter
465
+ * that records the declared topology reads it here. Reporter
466
+ * implementations only receive this input; a host that CONSTRUCTS it to
467
+ * drive `ReporterDescriptor.begin` itself must now supply the graph it
468
+ * loaded (a breaking addition to this published type).
469
+ */
470
+ readonly graph: Graph;
463
471
  /** The stage name (`--stage`), or `undefined` for the default stage. */
464
472
  readonly stage: string | undefined;
465
473
  /** The directory the deploy command was run from — where a reporter reads repository metadata. */
@@ -624,4 +632,4 @@ interface PrismaAppConfig {
624
632
  declare function defineConfig(config: PrismaAppConfig): PrismaAppConfig;
625
633
  //#endregion
626
634
  export { readPreflightPayload as $, PrismaAppConfig as A, TeardownInput as B, LoweredResult as C, PackageInput as D, Outputs as E, ReporterDescriptor as F, deserializeContainers as G, containerEnv as H, RunOutcome as I, lower as J, isBuildOnlyExtension as K, RunReporter as L, ProvisionerDescriptor as M, ReportAttachInput as N, PreflightInput as O, ReportBeginInput as P, preflightEnvVarName as Q, ServiceLowering as R, LowerOptions as S, NodeDescriptor as T, containerEnvVarName as U, buildConfig as V, defineConfig as W, mergedProviders as X, lowering as Y, preflightEnv as Z, LocalTargetEmulatorsInput as _, Bundle as a, LowerContext as b, ContainerInstance as c, DeployedNode as d, resolveStateLayer as et, DeploymentResult as f, LocalTargetDescriptor as g, LocalTargetAttachment as h, AssembleInput as i, ProvisionEdge as j, PreflightPayload as k, DEV_DIR as l, LocalTargetAttachInput as m, ApplicationDescriptor as n, ContainerCredentials as o, ExtensionDescriptor as p, joinDeployment as q, Artifact as r, ContainerDescriptor as s, AlchemyStateLayer as t, DeployedEntity as u, LocalTargetProvidersInput as v, Lowering as w, LowerError as x, LocateContainerInput as y, StateDescriptor as z };
627
- //# sourceMappingURL=app-config-DF2_vkH7-D-BcHjYm.d.mts.map
635
+ //# sourceMappingURL=app-config-CooZZhD4-EAGtxAPU.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-config-DF2_vkH7-D-BcHjYm.d.mts","names":[],"sources":["../../../0-framework/1-core/core/dist/app-config-DF2_vkH7.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;UAmBU;;WAEC;;WAEA;;;;;;;UAOD;WACC,OAAO;;WAEP;;EAET;;;;;;;;;;;;;;;UAeQ,qBAAqB;;WAEpB;;WAEA,SAAS;;;;;;;;;;;;UAYV,oBAAoB,UAAU,oBAAoB,mBAAmB;;EAE7E,OAAO,OAAO,sBAAsB,cAAc,qBAAqB,KAAK,QAAQ;;EAEpF,OAAO,OAAO,sBAAsB,cAAc,qBAAqB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BAAmB,QAAQ;;;UAGhC;;EAER,UAAU,OAAO,4BAA4B,MAAM;;WAE1C,WAAW;;EAEpB,WAAW,OAAO,iBAAiB;;EAEnC,WAAW,OAAO,4BAA4B;;EAE9C,OAAO,OAAO,yBAAyB,QAAQ;;EAE/C,UAAU,OAAO,gBAAgB;;UAEzB;;WAEC,WAAW;;WAEX;;UAED;;WAEC,OAAO;WACP,WAAW;;WAEX;;UAED;WACC,WAAW;WACX;;UAED;;EAER,iBAAiB;;EAEjB,aAAa;aACF;aACA;;;EAGX,KAAK,QAAQ,aAAa;aACf;MACP;aACO;aACA;;;EAGX,gBAAgB;;;cAGJ;;;;;;;;;iBASG,qBAAqB,WAAW;;;;;;KAM5C;WACM;IACP;WACO;IACP;WACO;EACT,SAAS,OAAO,gBAAgB,QAAQ;;;;;;;UAOhC;WACC,YAAY;WACZ,OAAO;;;iBAGD,aAAa,QAAQ,kBAAkB"}
@@ -0,0 +1 @@
1
+ import "./app-config-CooZZhD4-EAGtxAPU.mjs";
package/dist/config.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { $ as readPreflightPayload, A as PrismaAppConfig, B as TeardownInput, F as ReporterDescriptor, G as deserializeContainers, H as containerEnv, I as RunOutcome, K as isBuildOnlyExtension, L as RunReporter, N as ReportAttachInput, O as PreflightInput, P as ReportBeginInput, Q as preflightEnvVarName, T as NodeDescriptor, U as containerEnvVarName, W as defineConfig, Z as preflightEnv, _ as LocalTargetEmulatorsInput, c as ContainerInstance, g as LocalTargetDescriptor, h as LocalTargetAttachment, k as PreflightPayload, l as DEV_DIR, m as LocalTargetAttachInput, o as ContainerCredentials, p as ExtensionDescriptor, s as ContainerDescriptor, u as DeployedEntity, v as LocalTargetProvidersInput, y as LocateContainerInput, z as StateDescriptor } from "./app-config-DF2_vkH7-D-BcHjYm.mjs";
2
- import "./config-Cgdex2ik.mjs";
1
+ import { $ as readPreflightPayload, A as PrismaAppConfig, B as TeardownInput, F as ReporterDescriptor, G as deserializeContainers, H as containerEnv, I as RunOutcome, K as isBuildOnlyExtension, L as RunReporter, N as ReportAttachInput, O as PreflightInput, P as ReportBeginInput, Q as preflightEnvVarName, T as NodeDescriptor, U as containerEnvVarName, W as defineConfig, Z as preflightEnv, _ as LocalTargetEmulatorsInput, c as ContainerInstance, g as LocalTargetDescriptor, h as LocalTargetAttachment, k as PreflightPayload, l as DEV_DIR, m as LocalTargetAttachInput, o as ContainerCredentials, p as ExtensionDescriptor, s as ContainerDescriptor, u as DeployedEntity, v as LocalTargetProvidersInput, y as LocateContainerInput, z as StateDescriptor } from "./app-config-CooZZhD4-EAGtxAPU.mjs";
2
+ import "./config-BmK1pGlA.mjs";
3
3
  export { type ContainerCredentials, type ContainerDescriptor, type ContainerInstance, DEV_DIR, type DeployedEntity, ExtensionDescriptor, LocalTargetAttachInput, LocalTargetAttachment, LocalTargetDescriptor, LocalTargetEmulatorsInput, LocalTargetProvidersInput, type LocateContainerInput, NodeDescriptor, PreflightInput, type PreflightPayload, PrismaAppConfig, ReportAttachInput, ReportBeginInput, ReporterDescriptor, RunOutcome, RunReporter, StateDescriptor, TeardownInput, containerEnv, containerEnvVarName, defineConfig, deserializeContainers, isBuildOnlyExtension, preflightEnv, preflightEnvVarName, readPreflightPayload };
@@ -1,8 +1,8 @@
1
- import { dt as CliStructuredError } from "./graph-types-N6brq1zY-1VMNwtkJ.mjs";
2
- import { u as DeployedEntity } from "./app-config-DF2_vkH7-D-BcHjYm.mjs";
3
- import "./config-Cgdex2ik.mjs";
4
- import "./index-DryPyF9U.mjs";
5
- import "./deploy-Cgdex2ik.mjs";
1
+ import { ht as CliStructuredError } from "./graph-types-BTTaRnih-BF6PobQ3.mjs";
2
+ import { u as DeployedEntity } from "./app-config-CooZZhD4-EAGtxAPU.mjs";
3
+ import "./config-BmK1pGlA.mjs";
4
+ import "./index-DeocL1di.mjs";
5
+ import "./deploy-BmK1pGlA.mjs";
6
6
  //#region ../../0-framework/0-foundation/foundation/dist/result.d.mts
7
7
  //#region src/result.d.ts
8
8
  /**
package/dist/control.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { a as executionDiagnostics, o as executorLoadFailure, t as notOk } from "./result-D95kAAek.mjs";
2
2
  import { n as RUN_REPORT_VERSION, t as RUN_REPORT_FILE_ENV } from "./run-report-C2o98uD--AX8kpz4Q.mjs";
3
- //#region ../../0-framework/3-tooling/cli/dist/log-WOf7R2HN.mjs
3
+ //#region ../../0-framework/3-tooling/cli/dist/log-E_5UMZl8.mjs
4
4
  async function deploy(input) {
5
5
  return deployWithDeps(input, {});
6
6
  }
@@ -11,7 +11,7 @@ async function deployWithDeps(input, deps) {
11
11
  const cwd = input.cwd ?? process.cwd();
12
12
  let executor;
13
13
  try {
14
- executor = await import("./execute-deploy-destroy-DJ3BlpgU-ozOg0xCh.mjs");
14
+ executor = await import("./execute-deploy-destroy-Bsdh8hf4-ConszqTa.mjs");
15
15
  } catch (error) {
16
16
  return notOk(executorLoadFailure("deploy", error, cwd));
17
17
  }
@@ -27,7 +27,7 @@ async function destroyWithDeps(input, deps) {
27
27
  const cwd = input.cwd ?? process.cwd();
28
28
  let executor;
29
29
  try {
30
- executor = await import("./execute-deploy-destroy-DJ3BlpgU-ozOg0xCh.mjs");
30
+ executor = await import("./execute-deploy-destroy-Bsdh8hf4-ConszqTa.mjs");
31
31
  } catch (error) {
32
32
  return notOk(executorLoadFailure("destroy", error, cwd));
33
33
  }
@@ -43,7 +43,7 @@ async function devWithDeps(input, deps) {
43
43
  const cwd = input.cwd ?? process.cwd();
44
44
  let executor;
45
45
  try {
46
- executor = await import("./execute-dev-CQ0Lo2eN-BXIHSzKA.mjs");
46
+ executor = await import("./execute-dev-CQ0Lo2eN-BL3PmI0m.mjs");
47
47
  } catch (error) {
48
48
  return notOk(executorLoadFailure("dev", error, cwd));
49
49
  }
@@ -59,7 +59,7 @@ async function logWithDeps(input, deps) {
59
59
  const cwd = input.cwd ?? process.cwd();
60
60
  let executor;
61
61
  try {
62
- executor = await import("./execute-log-CUzTOzSj-D5c_igNr.mjs");
62
+ executor = await import("./execute-log-CUzTOzSj-v-J7hbAb.mjs");
63
63
  } catch (error) {
64
64
  return notOk(executorLoadFailure("log", error, cwd));
65
65
  }
@@ -1 +1 @@
1
- {"version":3,"file":"control.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/log-WOf7R2HN.mjs"],"sourcesContent":["import { n as executorLoadFailure } from \"./shared-BTnATsqm.mjs\";\nimport { notOk } from \"@internal/foundation/result\";\n//#region src/operations/deploy.ts\nasync function deploy(input) {\n\treturn deployWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's RunDeps, unit\n* tests). Deliberately NOT re-exported through `./control` — the seam mirrors\n* internal types and is not part of the published surface. */\nasync function deployWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-deploy-destroy-DJ3BlpgU.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"deploy\", error, cwd));\n\t}\n\treturn executor.executeDeploy(input, deps, cwd);\n}\n//#endregion\n//#region src/operations/destroy.ts\nasync function destroy(input) {\n\treturn destroyWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's RunDeps, unit\n* tests). Deliberately NOT re-exported through `./control` — the seam mirrors\n* internal types and is not part of the published surface. */\nasync function destroyWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-deploy-destroy-DJ3BlpgU.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"destroy\", error, cwd));\n\t}\n\treturn executor.executeDestroy(input, deps, cwd);\n}\n//#endregion\n//#region src/operations/dev.ts\nasync function dev(input) {\n\treturn devWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's RunDeps, unit\n* tests). Deliberately NOT re-exported through `./control` — the seam mirrors\n* internal types and is not part of the published surface. */\nasync function devWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-dev-CQ0Lo2eN.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"dev\", error, cwd));\n\t}\n\treturn executor.executeDev(input, deps, cwd);\n}\n//#endregion\n//#region src/operations/log.ts\nasync function log(input) {\n\treturn logWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's LogRunDeps,\n* unit tests). Deliberately NOT re-exported through `./control` — the seam\n* mirrors internal types and is not part of the published surface. */\nasync function logWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-log-CUzTOzSj.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"log\", error, cwd));\n\t}\n\treturn executor.executeLog(input, deps, cwd);\n}\n//#endregion\nexport { destroy as a, deployWithDeps as c, devWithDeps as i, logWithDeps as n, destroyWithDeps as o, dev as r, deploy as s, log as t };\n\n//# sourceMappingURL=log-WOf7R2HN.mjs.map"],"mappings":";;;AAGA,eAAe,OAAO,OAAO;CAC5B,OAAO,eAAe,OAAO,CAAC,CAAC;AAChC;;;;AAIA,eAAe,eAAe,OAAO,MAAM;CAC1C,MAAM,MAAM,MAAM,OAAO,QAAQ,IAAI;CACrC,IAAI;CACJ,IAAI;EACH,WAAW,MAAM,OAAO;CACzB,SAAS,OAAO;EACf,OAAO,MAAM,oBAAoB,UAAU,OAAO,GAAG,CAAC;CACvD;CACA,OAAO,SAAS,cAAc,OAAO,MAAM,GAAG;AAC/C;AAGA,eAAe,QAAQ,OAAO;CAC7B,OAAO,gBAAgB,OAAO,CAAC,CAAC;AACjC;;;;AAIA,eAAe,gBAAgB,OAAO,MAAM;CAC3C,MAAM,MAAM,MAAM,OAAO,QAAQ,IAAI;CACrC,IAAI;CACJ,IAAI;EACH,WAAW,MAAM,OAAO;CACzB,SAAS,OAAO;EACf,OAAO,MAAM,oBAAoB,WAAW,OAAO,GAAG,CAAC;CACxD;CACA,OAAO,SAAS,eAAe,OAAO,MAAM,GAAG;AAChD;AAGA,eAAe,IAAI,OAAO;CACzB,OAAO,YAAY,OAAO,CAAC,CAAC;AAC7B;;;;AAIA,eAAe,YAAY,OAAO,MAAM;CACvC,MAAM,MAAM,MAAM,OAAO,QAAQ,IAAI;CACrC,IAAI;CACJ,IAAI;EACH,WAAW,MAAM,OAAO;CACzB,SAAS,OAAO;EACf,OAAO,MAAM,oBAAoB,OAAO,OAAO,GAAG,CAAC;CACpD;CACA,OAAO,SAAS,WAAW,OAAO,MAAM,GAAG;AAC5C;AAGA,eAAe,IAAI,OAAO;CACzB,OAAO,YAAY,OAAO,CAAC,CAAC;AAC7B;;;;AAIA,eAAe,YAAY,OAAO,MAAM;CACvC,MAAM,MAAM,MAAM,OAAO,QAAQ,IAAI;CACrC,IAAI;CACJ,IAAI;EACH,WAAW,MAAM,OAAO;CACzB,SAAS,OAAO;EACf,OAAO,MAAM,oBAAoB,OAAO,OAAO,GAAG,CAAC;CACpD;CACA,OAAO,SAAS,WAAW,OAAO,MAAM,GAAG;AAC5C"}
1
+ {"version":3,"file":"control.mjs","names":[],"sources":["../../../0-framework/3-tooling/cli/dist/log-E_5UMZl8.mjs"],"sourcesContent":["import { n as executorLoadFailure } from \"./shared-BTnATsqm.mjs\";\nimport { notOk } from \"@internal/foundation/result\";\n//#region src/operations/deploy.ts\nasync function deploy(input) {\n\treturn deployWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's RunDeps, unit\n* tests). Deliberately NOT re-exported through `./control` — the seam mirrors\n* internal types and is not part of the published surface. */\nasync function deployWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-deploy-destroy-Bsdh8hf4.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"deploy\", error, cwd));\n\t}\n\treturn executor.executeDeploy(input, deps, cwd);\n}\n//#endregion\n//#region src/operations/destroy.ts\nasync function destroy(input) {\n\treturn destroyWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's RunDeps, unit\n* tests). Deliberately NOT re-exported through `./control` — the seam mirrors\n* internal types and is not part of the published surface. */\nasync function destroyWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-deploy-destroy-Bsdh8hf4.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"destroy\", error, cwd));\n\t}\n\treturn executor.executeDestroy(input, deps, cwd);\n}\n//#endregion\n//#region src/operations/dev.ts\nasync function dev(input) {\n\treturn devWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's RunDeps, unit\n* tests). Deliberately NOT re-exported through `./control` — the seam mirrors\n* internal types and is not part of the published surface. */\nasync function devWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-dev-CQ0Lo2eN.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"dev\", error, cwd));\n\t}\n\treturn executor.executeDev(input, deps, cwd);\n}\n//#endregion\n//#region src/operations/log.ts\nasync function log(input) {\n\treturn logWithDeps(input, {});\n}\n/** In-package variant threading the injection seam (the CLI's LogRunDeps,\n* unit tests). Deliberately NOT re-exported through `./control` — the seam\n* mirrors internal types and is not part of the published surface. */\nasync function logWithDeps(input, deps) {\n\tconst cwd = input.cwd ?? process.cwd();\n\tlet executor;\n\ttry {\n\t\texecutor = await import(\"./execute-log-CUzTOzSj.mjs\");\n\t} catch (error) {\n\t\treturn notOk(executorLoadFailure(\"log\", error, cwd));\n\t}\n\treturn executor.executeLog(input, deps, cwd);\n}\n//#endregion\nexport { destroy as a, deployWithDeps as c, devWithDeps as i, logWithDeps as n, destroyWithDeps as o, dev as r, deploy as s, log as t };\n\n//# sourceMappingURL=log-E_5UMZl8.mjs.map"],"mappings":";;;AAGA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O,MAAM,GAAG;AAC5C"}
@@ -0,0 +1 @@
1
+ import "./app-config-CooZZhD4-EAGtxAPU.mjs";
package/dist/deploy.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { C as LoweredResult, D as PackageInput, E as Outputs, J as lower, M as ProvisionerDescriptor, R as ServiceLowering, S as LowerOptions, V as buildConfig, X as mergedProviders, Y as lowering, a as Bundle, b as LowerContext, d as DeployedNode, et as resolveStateLayer, f as DeploymentResult, i as AssembleInput, j as ProvisionEdge, n as ApplicationDescriptor, q as joinDeployment, r as Artifact, t as AlchemyStateLayer, u as DeployedEntity, w as Lowering, x as LowerError } from "./app-config-DF2_vkH7-D-BcHjYm.mjs";
2
- import "./deploy-Cgdex2ik.mjs";
1
+ import { C as LoweredResult, D as PackageInput, E as Outputs, J as lower, M as ProvisionerDescriptor, R as ServiceLowering, S as LowerOptions, V as buildConfig, X as mergedProviders, Y as lowering, a as Bundle, b as LowerContext, d as DeployedNode, et as resolveStateLayer, f as DeploymentResult, i as AssembleInput, j as ProvisionEdge, n as ApplicationDescriptor, q as joinDeployment, r as Artifact, t as AlchemyStateLayer, u as DeployedEntity, w as Lowering, x as LowerError } from "./app-config-CooZZhD4-EAGtxAPU.mjs";
2
+ import "./deploy-BmK1pGlA.mjs";
3
3
  export { AlchemyStateLayer, ApplicationDescriptor, Artifact, AssembleInput, Bundle, DeployedEntity, DeployedNode, DeploymentResult, LowerContext, LowerError, LowerOptions, LoweredResult, Lowering, Outputs, PackageInput, ProvisionEdge, ProvisionerDescriptor, ServiceLowering, buildConfig, joinDeployment, lower, lowering, mergedProviders, resolveStateLayer };
package/dist/deploy.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { s as isParamSource, t as Load } from "./graph-BJgUfGB0-kvgFzT4q.mjs";
1
+ import { c as isParamSource, t as Load } from "./graph-BfKAg2Ap-CrhKkEzd.mjs";
2
2
  import { r as deserializeContainers } from "./container-transport-HcvNOGZL-twPi2TIv.mjs";
3
3
  import * as Alchemy from "alchemy";
4
4
  import * as Effect from "effect/Effect";
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.mjs","names":[],"sources":["../../../0-framework/1-core/core/dist/deploy.mjs"],"sourcesContent":["import { o as isParamSource, t as Load } from \"./graph-BJgUfGB0.mjs\";\nimport { r as deserializeContainers } from \"./container-transport-HcvNOGZL.mjs\";\nimport * as Alchemy from \"alchemy\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\n//#region src/control/deploy.ts\nvar LowerError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = \"LowerError\";\n\t}\n};\n/**\n* Resolves one SERVICE-OWN param to its config value. The full resolution\n* order across both value channels:\n*\n* 1. A param claiming BOTH a provision-time binding and a `provision` need\n* (ADR-0031) is a loud error — two sources for one value.\n* 2. A provision-time binding (a schema-validated literal, or an opaque\n* `ParamSource` the target resolves at boot per ADR-0019) beats the\n* declared `default`.\n* 3. A framework-minted `provision` need is resolved per dependency EDGE\n* against the consumer extension's registry — that path fills CONNECTION\n* params in `buildConfig`'s inputs loop, never this function. A\n* service-own param has no edge to mint against, so an unbound need here\n* falls through like any unbound param.\n* 4. The `default`, else absent (only legal when `optional`), else a loud\n* error naming the param, the service, and the fix.\n*/\nfunction resolveParam(node, serviceId, name, param, bound) {\n\tif (bound !== void 0) {\n\t\tif (param.provision !== void 0) throw new LowerError(`Param \"${name}\" of \"${serviceId}\" (service \"${node.name}\") has two sources claiming one value: a provision-time binding (${isParamSource(bound) ? \"a param source\" : \"a literal value\"}) AND a framework provision need (\"${String(param.provision.brand)}\") on its declaration — remove the binding or drop the \\`provision\\` facet.`);\n\t\tif (isParamSource(bound)) return bound;\n\t\tconst result = param.schema[\"~standard\"].validate(bound);\n\t\tif (result instanceof Promise) throw new LowerError(`Param \"${name}\" of \"${serviceId}\" (service \"${node.name}\") uses an async Standard Schema — a provision-time literal value requires a synchronous validator.`);\n\t\tif (result.issues !== void 0) {\n\t\t\tconst messages = result.issues.map((issue) => issue.message).join(\"; \");\n\t\t\tthrow new LowerError(`Param \"${name}\" of \"${serviceId}\" (service \"${node.name}\") received an invalid provision-time value: ${messages}`);\n\t\t}\n\t\treturn result.value;\n\t}\n\tif (param.default !== void 0) return param.default;\n\tif (param.optional === true) return void 0;\n\tthrow new LowerError(`Param \"${name}\" of \"${serviceId}\" (service \"${node.name}\") has no default, is not optional, and was not bound at provision — bind it with a literal value or a param source (e.g. envParam('NAME')) on its provision() call, or give it a default.`);\n}\n/**\n* Assembles a service's typed Config. Connection params come from the\n* dependency edge's lowered outputs — or, for a param carrying a `provision`\n* need (ADR-0031), from `provisioned` (keyed by edge id): the framework mints\n* it, the producer hands nothing over. The service's own params resolve via\n* `resolveParam` (provision-time binding, then default, then loud\n* unbound-required failure).\n*\n* This is also where the connection contract is enforced: a producer that fails to\n* supply a required param its consumer's connection declares fails the deploy\n* here, naming the edge, rather than reaching the consumer as `undefined`.\n*/\nfunction buildConfig(node, id, graph, lowered, provisioned) {\n\tconst inputs = {};\n\tfor (const [inputName, inputNode] of Object.entries(node.inputs)) {\n\t\tconst edge = graph.edges.find((e) => e.to === id && e.input === inputName && e.kind === \"dependency\");\n\t\tconst producedOutputs = edge !== void 0 ? lowered.get(edge.from) ?? {} : {};\n\t\tconst values = {};\n\t\tfor (const [name, param] of Object.entries(inputNode.connection.params)) {\n\t\t\tif (param.provision !== void 0) {\n\t\t\t\tvalues[name] = provisioned.get(`${id}.${inputName}`);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst value = producedOutputs[name];\n\t\t\tif (value === void 0 && param.optional !== true && edge !== void 0) throw new LowerError(`Connection input \"${id}.${inputName}\" declares param \"${name}\", but its producer \"${edge.from}\" did not supply it — the producer's outputs carry [${Object.keys(producedOutputs).join(\", \") || \"nothing\"}]. Add \"${name}\" to the outputs the producer returns from its lowering, or declare the param optional on the connection.`);\n\t\t\tvalues[name] = value;\n\t\t}\n\t\tinputs[inputName] = values;\n\t}\n\tconst boundParams = new Map(graph.params.filter((binding) => binding.serviceAddress === id).map((b) => [b.slot, b.binding]));\n\tconst service = {};\n\tfor (const [name, param] of Object.entries(node.params)) {\n\t\tconst value = resolveParam(node, id, name, param, boundParams.get(name));\n\t\tif (value !== void 0) service[name] = value;\n\t}\n\treturn {\n\t\tservice,\n\t\tinputs\n\t};\n}\n/**\n* Joins resolved report entries back to their graph nodes — the last step of a\n* deploy report, run inside the Action with apply's resolved values.\n*\n* The entries cross Alchemy's action-input boundary, so they carry addresses\n* and plain entities only; the graph is held by closure on this side. That\n* split is why this join exists at all, and it is what keeps functions and\n* Standard Schemas (which a node carries, and which the plan's input hash\n* would have to serialize) out of the input.\n*\n* Skips an address the graph no longer holds: entries are data, the graph is\n* truth.\n*/\nfunction joinDeployment(graph, entries) {\n\tconst nodes = [];\n\tfor (const entry of entries) {\n\t\tconst node = graph.nodes.find((n) => n.id === entry.address)?.node;\n\t\tif (node === void 0 || node.kind !== \"service\" && node.kind !== \"resource\") continue;\n\t\tnodes.push({\n\t\t\taddress: entry.address,\n\t\t\tnode,\n\t\t\tentities: entry.entities\n\t\t});\n\t}\n\treturn nodes;\n}\nfunction missingBundleError(id) {\n\treturn new LowerError(`No bundle provided for service \"${id}\" (opts.bundles[\"${id}\"] is required).`);\n}\nfunction duplicateExtensionError(id) {\n\treturn new LowerError(`Extension \"${id}\" is listed more than once in \\`extensions\\` — each extension id must be unique.`);\n}\n/** Registries as extension id → descriptor. Fails on a duplicate id — the CLI validates config, but lowering() is the programmatic escape hatch that doesn't. */\nfunction extensionsById(config) {\n\tconst map = /* @__PURE__ */ new Map();\n\tfor (const extension of config.extensions) {\n\t\tif (map.has(extension.id)) return Effect.fail(duplicateExtensionError(extension.id));\n\t\tmap.set(extension.id, extension);\n\t}\n\treturn Effect.succeed(map);\n}\nfunction unknownExtensionError(extension, id) {\n\treturn new LowerError(`No extension \"${extension}\" is configured (needed by node \"${id}\") — add it to prisma-composer.config.ts's \\`extensions\\` (import its /control entry and list its descriptor).`);\n}\nfunction unknownNodeTypeError(extension, type) {\n\treturn new LowerError(`Extension \"${extension.id}\" has no descriptor for node type \"${type}\" (known: ${Object.keys(extension.nodes).join(\", \")}).`);\n}\n/** A provisioned param's need brand isn't registered by the consumer's extension (ADR-0031). */\nfunction unknownProvisionerError(extension, brand, edgeId) {\n\tconst known = extension.provisions !== void 0 && extension.provisions.size > 0 ? Array.from(extension.provisions.keys(), String).join(\", \") : \"(none registered)\";\n\treturn new LowerError(`Extension \"${extension.id}\" has no provisioner for need \"${String(brand)}\" (needed by edge \"${edgeId}\") (known: ${known}).`);\n}\n/** A provisioned edge whose consumer and provider nodes belong to different extensions (ADR-0031). */\nfunction crossExtensionProvisionError(edgeId) {\n\treturn new LowerError(`Provisioned edge \"${edgeId}\" spans two extensions — cross-extension provisioned edges aren't supported yet.`);\n}\n/**\n* More than one provisioned param on one connection (ADR-0031). One edge mints\n* ONE value, keyed by edge id, so a second need on the same connection would\n* silently receive the first's value under the first's brand.\n*/\nfunction multipleProvisionedParamsError(edgeId, names) {\n\treturn new LowerError(`Connection input \"${edgeId}\" declares more than one provisioned param (${names.join(\", \")}) — only one provisioned param per connection is supported.`);\n}\nfunction wrongKindError(extension, type, expected, got) {\n\treturn new LowerError(`Extension \"${extension}\"'s descriptor for node type \"${type}\" is a \"${got}\" descriptor — this node needs a \"${expected}\" descriptor.`);\n}\n/** Looks up one node's descriptor: extension by `node.extension`, then descriptor by `node.type`, then the kind check. */\nfunction descriptorFor(extensions, node, id) {\n\tconst extension = extensions.get(node.extension);\n\tif (extension === void 0) return Effect.fail(unknownExtensionError(node.extension, id));\n\tconst descriptor = extension.nodes[node.type];\n\tif (descriptor === void 0) return Effect.fail(unknownNodeTypeError(extension, node.type));\n\tif (descriptor.kind !== node.kind) return Effect.fail(wrongKindError(node.extension, node.type, node.kind, descriptor.kind));\n\treturn Effect.succeed(descriptor);\n}\n/**\n* The state-layer precedence a deploy resolves to: an explicit opts.state\n* always wins; failing that, the config's own (required) state descriptor,\n* created with its owning extension's resolved container (`undefined` when\n* that extension declared none). A pure function so the precedence is\n* testable without booting Alchemy.\n*/\nfunction resolveStateLayer(opts, config, containers) {\n\treturn opts.state ?? config.state.create(containers.get(config.state.extension));\n}\n/**\n* All configured extensions' providers merged, config array order — an\n* extension without `providers` is skipped; no used-extensions-only\n* filtering (ADR-0017's pinned providers rule).\n*/\nfunction mergedProviders(config) {\n\tconst [first, ...rest] = config.extensions.flatMap((extension) => extension.providers !== void 0 ? [extension.providers()] : []);\n\treturn first === void 0 ? Layer.empty : Layer.mergeAll(first, ...rest);\n}\n/**\n* Composable form for mixed stacks: hand-wired Alchemy resources alongside Prisma App nodes in one stack effect.\n* Fails with LowerError or whatever an extension's lowering raises — the error type is open.\n*/\nfunction lowering(root, config, opts) {\n\treturn Effect.gen(function* () {\n\t\tconst graph = Load(root, { id: opts.name });\n\t\tconst extensions = yield* extensionsById(config);\n\t\tconst containers = deserializeContainers(config.extensions, process.env);\n\t\tconst lowered = /* @__PURE__ */ new Map();\n\t\tconst entries = [];\n\t\tconst provisioned = /* @__PURE__ */ new Map();\n\t\tconst applications = /* @__PURE__ */ new Map();\n\t\tfor (const descriptor of config.extensions) {\n\t\t\tif (descriptor.application === void 0) continue;\n\t\t\tconst appCtx = {\n\t\t\t\tid: graph.root.id,\n\t\t\t\taddress: \"\",\n\t\t\t\tnode: graph.root.node,\n\t\t\t\tgraph,\n\t\t\t\topts,\n\t\t\t\tapplication: void 0,\n\t\t\t\tcontainer: containers.get(descriptor.id),\n\t\t\t\tlowered,\n\t\t\t\tprovisioned\n\t\t\t};\n\t\t\tapplications.set(descriptor.id, yield* descriptor.application.provision(appCtx));\n\t\t}\n\t\tfor (const edge of graph.edges) {\n\t\t\tif (edge.kind !== \"dependency\") continue;\n\t\t\tconst consumer = graph.nodes.find((n) => n.id === edge.to)?.node;\n\t\t\tif (consumer === void 0 || consumer.kind !== \"service\") continue;\n\t\t\tconst slot = consumer.inputs[edge.input];\n\t\t\tif (slot === void 0) continue;\n\t\t\tconst provisionedParams = Object.entries(slot.connection.params).filter(([, param]) => param.provision !== void 0);\n\t\t\tif (provisionedParams.length === 0) continue;\n\t\t\tconst edgeId = `${edge.to}.${edge.input}`;\n\t\t\tif (provisionedParams.length > 1) return yield* Effect.fail(multipleProvisionedParamsError(edgeId, provisionedParams.map(([name]) => name)));\n\t\t\tconst need = provisionedParams[0]?.[1].provision;\n\t\t\tif (need === void 0) continue;\n\t\t\tconst provider = graph.nodes.find((n) => n.id === edge.from)?.node;\n\t\t\tif (provider === void 0 || provider.kind !== \"service\" && provider.kind !== \"resource\") continue;\n\t\t\tif (consumer.extension !== provider.extension) return yield* Effect.fail(crossExtensionProvisionError(edgeId));\n\t\t\tconst extension = extensions.get(consumer.extension);\n\t\t\tif (extension === void 0) return yield* Effect.fail(unknownExtensionError(consumer.extension, edge.to));\n\t\t\tconst provisioner = extension.provisions?.get(need.brand);\n\t\t\tif (provisioner === void 0) return yield* Effect.fail(unknownProvisionerError(extension, need.brand, edgeId));\n\t\t\tconst ref = yield* provisioner.provision({\n\t\t\t\tedgeId,\n\t\t\t\tconsumerAddress: edge.to,\n\t\t\t\tproviderAddress: edge.from,\n\t\t\t\tinput: edge.input,\n\t\t\t\tneed\n\t\t\t});\n\t\t\tprovisioned.set(edgeId, ref);\n\t\t}\n\t\tfor (const { id, node } of graph.nodes) {\n\t\t\tif (node.kind === \"module\") continue;\n\t\t\tif (node.kind === \"dependency\") continue;\n\t\t\tconst ctx = {\n\t\t\t\tid,\n\t\t\t\taddress: id,\n\t\t\t\tnode,\n\t\t\t\tgraph,\n\t\t\t\topts,\n\t\t\t\tapplication: applications.get(node.extension),\n\t\t\t\tcontainer: containers.get(node.extension),\n\t\t\t\tlowered,\n\t\t\t\tprovisioned\n\t\t\t};\n\t\t\tconst descriptor = yield* descriptorFor(extensions, node, id);\n\t\t\tif (descriptor.kind === \"resource\") {\n\t\t\t\tconst result = yield* descriptor(ctx);\n\t\t\t\tlowered.set(id, result.outputs);\n\t\t\t\tentries.push({\n\t\t\t\t\taddress: id,\n\t\t\t\t\tentities: result.entities\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (descriptor.kind !== \"service\") return yield* Effect.fail(wrongKindError(node.extension, node.type, node.kind, descriptor.kind));\n\t\t\tconst service = node;\n\t\t\tconst provisionedNode = yield* descriptor.provision(ctx);\n\t\t\tconst typedConfig = buildConfig(service, id, graph, lowered, provisioned);\n\t\t\tconst serialized = yield* descriptor.serialize(ctx, provisionedNode, typedConfig);\n\t\t\tconst bundle = opts.bundles[id];\n\t\t\tif (bundle === void 0) return yield* Effect.fail(missingBundleError(id));\n\t\t\tconst artifact = yield* descriptor.package(ctx, {\n\t\t\t\tassembled: {\n\t\t\t\t\tdir: bundle.dir,\n\t\t\t\t\tentry: bundle.entry\n\t\t\t\t},\n\t\t\t\taddress: id\n\t\t\t});\n\t\t\tconst result = yield* descriptor.deploy(ctx, provisionedNode, artifact, serialized);\n\t\t\tlowered.set(id, result.outputs);\n\t\t\tentries.push({\n\t\t\t\taddress: id,\n\t\t\t\tentities: result.entities\n\t\t\t});\n\t\t}\n\t\tif (opts.report !== void 0) {\n\t\t\tconst report = opts.report;\n\t\t\tyield* Alchemy.Action(\"composer-deployment-report\", (input) => Effect.sync(() => {\n\t\t\t\treport({\n\t\t\t\t\tapp: opts.name,\n\t\t\t\t\tnodes: joinDeployment(graph, input.entries)\n\t\t\t\t});\n\t\t\t}))({\n\t\t\t\tnonce: Date.now(),\n\t\t\t\tentries\n\t\t\t});\n\t\t}\n\t});\n}\n/**\n* The whole-stack wrapper: Load → route each node through the config's\n* extension registries → an Alchemy Stack (the default export the alchemy\n* CLI consumes).\n*/\nfunction lower(root, config, opts) {\n\tconst stackEffect = Effect.orDie(lowering(root, config, opts));\n\tconst containers = deserializeContainers(config.extensions, process.env);\n\tconst providers = opts.providers ?? mergedProviders(config);\n\treturn Alchemy.Stack(opts.name, {\n\t\tproviders,\n\t\tstate: resolveStateLayer(opts, config, containers)\n\t}, stackEffect);\n}\n//#endregion\nexport { LowerError, buildConfig, joinDeployment, lower, lowering, mergedProviders, resolveStateLayer };\n\n//# sourceMappingURL=deploy.mjs.map"],"mappings":";;;;;;AAMA,IAAI,aAAa,cAAc,MAAM;CACpC,YAAY,SAAS;EACpB,MAAM,OAAO;EACb,KAAK,OAAO;CACb;AACD;;;;;;;;;;;;;;;;;;AAkBA,SAAS,aAAa,MAAM,WAAW,MAAM,OAAO,OAAO;CAC1D,IAAI,UAAU,KAAK,GAAG;EACrB,IAAI,MAAM,cAAc,KAAK,GAAG,MAAM,IAAI,WAAW,UAAU,KAAK,QAAQ,UAAU,cAAc,KAAK,KAAK,mEAAmE,cAAc,KAAK,IAAI,mBAAmB,kBAAkB,qCAAqC,OAAO,MAAM,UAAU,KAAK,EAAE,4EAA4E;EAC5X,IAAI,cAAc,KAAK,GAAG,OAAO;EACjC,MAAM,SAAS,MAAM,OAAO,YAAY,CAAC,SAAS,KAAK;EACvD,IAAI,kBAAkB,SAAS,MAAM,IAAI,WAAW,UAAU,KAAK,QAAQ,UAAU,cAAc,KAAK,KAAK,oGAAoG;EACjN,IAAI,OAAO,WAAW,KAAK,GAAG;GAC7B,MAAM,WAAW,OAAO,OAAO,KAAK,UAAU,MAAM,OAAO,CAAC,CAAC,KAAK,IAAI;GACtE,MAAM,IAAI,WAAW,UAAU,KAAK,QAAQ,UAAU,cAAc,KAAK,KAAK,+CAA+C,UAAU;EACxI;EACA,OAAO,OAAO;CACf;CACA,IAAI,MAAM,YAAY,KAAK,GAAG,OAAO,MAAM;CAC3C,IAAI,MAAM,aAAa,MAAM,OAAO,KAAK;CACzC,MAAM,IAAI,WAAW,UAAU,KAAK,QAAQ,UAAU,cAAc,KAAK,KAAK,2LAA2L;AAC1Q;;;;;;;;;;;;;AAaA,SAAS,YAAY,MAAM,IAAI,OAAO,SAAS,aAAa;CAC3D,MAAM,SAAS,CAAC;CAChB,KAAK,MAAM,CAAC,WAAW,cAAc,OAAO,QAA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W,UAAU,GAAG;GACvD,MAAM,cAAc,YAAY,SAAS,IAAI,OAAO,SAAS,WAAW;GACxE,MAAM,aAAa,OAAO,WAAW,UAAU,KAAK,iBAAiB,WAAW;GAChF,MAAM,SAAS,KAAK,QAAQ;GAC5B,IAAI,WAAW,KAAK,GAAG,OAAO,OAAO,OAAO,KAAK,mBAAmB,EAAE,CAAC;GACvE,MAAM,WAAW,OAAO,WAAW,QAAQ,KAAK;IAC/C,WAAW;KACV,KAAK,OAAO;KACZ,OAAO,OAAO;IACf;IACA,SAAS;GACV,CAAC;GACD,MAAM,SAAS,OAAO,WAAW,OAAO,KAAK,iBAAiB,UAAU,UAAU;GAClF,QAAQ,IAAI,IAAI,OAAO,OAAO;GAC9B,QAAQ,KAAK;IACZ,SAAS;IACT,UAAU,OAAO;GAClB,CAAC;EACF;EACA,IAAI,KAAK,WAAW,KAAK,GAAG;GAC3B,MAAM,SAAS,KAAK;GACpB,OAAO,QAAQ,OAAO,+BAA+B,UAAU,OAAO,WAAW;IAChF,OAAO;KACN,KAAK,KAAK;KACV,OAAO,eAAe,OAAO,MAAM,OAAO;IAC3C,CAAC;GACF,CAAC,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,IAAI;IAChB;GACD,CAAC;EACF;CACD,CAAC;AACF;;;;;;AAMA,SAAS,MAAM,MAAM,QAAQ,MAAM;CAClC,MAAM,cAAc,OAAO,MAAM,SAAS,MAAM,QAAQ,IAAI,CAAC;CAC7D,MAAM,aAAa,sBAAsB,OAAO,YAAY,QAAQ,GAAG;CACvE,MAAM,YAAY,KAAK,aAAa,gBAAgB,MAAM;CAC1D,OAAO,QAAQ,MAAM,KAAK,MAAM;EAC/B;EACA,OAAO,kBAAkB,MAAM,QAAQ,UAAU;CAClD,GAAG,WAAW;AACf"}
1
+ {"version":3,"file":"deploy.mjs","names":[],"sources":["../../../0-framework/1-core/core/dist/deploy.mjs"],"sourcesContent":["import { o as isParamSource, t as Load } from \"./graph-BfKAg2Ap.mjs\";\nimport { r as deserializeContainers } from \"./container-transport-HcvNOGZL.mjs\";\nimport * as Alchemy from \"alchemy\";\nimport * as Effect from \"effect/Effect\";\nimport * as Layer from \"effect/Layer\";\n//#region src/control/deploy.ts\nvar LowerError = class extends Error {\n\tconstructor(message) {\n\t\tsuper(message);\n\t\tthis.name = \"LowerError\";\n\t}\n};\n/**\n* Resolves one SERVICE-OWN param to its config value. The full resolution\n* order across both value channels:\n*\n* 1. A param claiming BOTH a provision-time binding and a `provision` need\n* (ADR-0031) is a loud error — two sources for one value.\n* 2. A provision-time binding (a schema-validated literal, or an opaque\n* `ParamSource` the target resolves at boot per ADR-0019) beats the\n* declared `default`.\n* 3. A framework-minted `provision` need is resolved per dependency EDGE\n* against the consumer extension's registry — that path fills CONNECTION\n* params in `buildConfig`'s inputs loop, never this function. A\n* service-own param has no edge to mint against, so an unbound need here\n* falls through like any unbound param.\n* 4. The `default`, else absent (only legal when `optional`), else a loud\n* error naming the param, the service, and the fix.\n*/\nfunction resolveParam(node, serviceId, name, param, bound) {\n\tif (bound !== void 0) {\n\t\tif (param.provision !== void 0) throw new LowerError(`Param \"${name}\" of \"${serviceId}\" (service \"${node.name}\") has two sources claiming one value: a provision-time binding (${isParamSource(bound) ? \"a param source\" : \"a literal value\"}) AND a framework provision need (\"${String(param.provision.brand)}\") on its declaration — remove the binding or drop the \\`provision\\` facet.`);\n\t\tif (isParamSource(bound)) return bound;\n\t\tconst result = param.schema[\"~standard\"].validate(bound);\n\t\tif (result instanceof Promise) throw new LowerError(`Param \"${name}\" of \"${serviceId}\" (service \"${node.name}\") uses an async Standard Schema — a provision-time literal value requires a synchronous validator.`);\n\t\tif (result.issues !== void 0) {\n\t\t\tconst messages = result.issues.map((issue) => issue.message).join(\"; \");\n\t\t\tthrow new LowerError(`Param \"${name}\" of \"${serviceId}\" (service \"${node.name}\") received an invalid provision-time value: ${messages}`);\n\t\t}\n\t\treturn result.value;\n\t}\n\tif (param.default !== void 0) return param.default;\n\tif (param.optional === true) return void 0;\n\tthrow new LowerError(`Param \"${name}\" of \"${serviceId}\" (service \"${node.name}\") has no default, is not optional, and was not bound at provision — bind it with a literal value or a param source (e.g. envParam('NAME')) on its provision() call, or give it a default.`);\n}\n/**\n* Assembles a service's typed Config. Connection params come from the\n* dependency edge's lowered outputs — or, for a param carrying a `provision`\n* need (ADR-0031), from `provisioned` (keyed by edge id): the framework mints\n* it, the producer hands nothing over. The service's own params resolve via\n* `resolveParam` (provision-time binding, then default, then loud\n* unbound-required failure).\n*\n* This is also where the connection contract is enforced: a producer that fails to\n* supply a required param its consumer's connection declares fails the deploy\n* here, naming the edge, rather than reaching the consumer as `undefined`.\n*/\nfunction buildConfig(node, id, graph, lowered, provisioned) {\n\tconst inputs = {};\n\tfor (const [inputName, inputNode] of Object.entries(node.inputs)) {\n\t\tconst edge = graph.edges.find((e) => e.to === id && e.input === inputName && e.kind === \"dependency\");\n\t\tconst producedOutputs = edge !== void 0 ? lowered.get(edge.from) ?? {} : {};\n\t\tconst values = {};\n\t\tfor (const [name, param] of Object.entries(inputNode.connection.params)) {\n\t\t\tif (param.provision !== void 0) {\n\t\t\t\tvalues[name] = provisioned.get(`${id}.${inputName}`);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst value = producedOutputs[name];\n\t\t\tif (value === void 0 && param.optional !== true && edge !== void 0) throw new LowerError(`Connection input \"${id}.${inputName}\" declares param \"${name}\", but its producer \"${edge.from}\" did not supply it — the producer's outputs carry [${Object.keys(producedOutputs).join(\", \") || \"nothing\"}]. Add \"${name}\" to the outputs the producer returns from its lowering, or declare the param optional on the connection.`);\n\t\t\tvalues[name] = value;\n\t\t}\n\t\tinputs[inputName] = values;\n\t}\n\tconst boundParams = new Map(graph.params.filter((binding) => binding.serviceAddress === id).map((b) => [b.slot, b.binding]));\n\tconst service = {};\n\tfor (const [name, param] of Object.entries(node.params)) {\n\t\tconst value = resolveParam(node, id, name, param, boundParams.get(name));\n\t\tif (value !== void 0) service[name] = value;\n\t}\n\treturn {\n\t\tservice,\n\t\tinputs\n\t};\n}\n/**\n* Joins resolved report entries back to their graph nodes — the last step of a\n* deploy report, run inside the Action with apply's resolved values.\n*\n* The entries cross Alchemy's action-input boundary, so they carry addresses\n* and plain entities only; the graph is held by closure on this side. That\n* split is why this join exists at all, and it is what keeps functions and\n* Standard Schemas (which a node carries, and which the plan's input hash\n* would have to serialize) out of the input.\n*\n* Skips an address the graph no longer holds: entries are data, the graph is\n* truth.\n*/\nfunction joinDeployment(graph, entries) {\n\tconst nodes = [];\n\tfor (const entry of entries) {\n\t\tconst node = graph.nodes.find((n) => n.id === entry.address)?.node;\n\t\tif (node === void 0 || node.kind !== \"service\" && node.kind !== \"resource\") continue;\n\t\tnodes.push({\n\t\t\taddress: entry.address,\n\t\t\tnode,\n\t\t\tentities: entry.entities\n\t\t});\n\t}\n\treturn nodes;\n}\nfunction missingBundleError(id) {\n\treturn new LowerError(`No bundle provided for service \"${id}\" (opts.bundles[\"${id}\"] is required).`);\n}\nfunction duplicateExtensionError(id) {\n\treturn new LowerError(`Extension \"${id}\" is listed more than once in \\`extensions\\` — each extension id must be unique.`);\n}\n/** Registries as extension id → descriptor. Fails on a duplicate id — the CLI validates config, but lowering() is the programmatic escape hatch that doesn't. */\nfunction extensionsById(config) {\n\tconst map = /* @__PURE__ */ new Map();\n\tfor (const extension of config.extensions) {\n\t\tif (map.has(extension.id)) return Effect.fail(duplicateExtensionError(extension.id));\n\t\tmap.set(extension.id, extension);\n\t}\n\treturn Effect.succeed(map);\n}\nfunction unknownExtensionError(extension, id) {\n\treturn new LowerError(`No extension \"${extension}\" is configured (needed by node \"${id}\") — add it to prisma-composer.config.ts's \\`extensions\\` (import its /control entry and list its descriptor).`);\n}\nfunction unknownNodeTypeError(extension, type) {\n\treturn new LowerError(`Extension \"${extension.id}\" has no descriptor for node type \"${type}\" (known: ${Object.keys(extension.nodes).join(\", \")}).`);\n}\n/** A provisioned param's need brand isn't registered by the consumer's extension (ADR-0031). */\nfunction unknownProvisionerError(extension, brand, edgeId) {\n\tconst known = extension.provisions !== void 0 && extension.provisions.size > 0 ? Array.from(extension.provisions.keys(), String).join(\", \") : \"(none registered)\";\n\treturn new LowerError(`Extension \"${extension.id}\" has no provisioner for need \"${String(brand)}\" (needed by edge \"${edgeId}\") (known: ${known}).`);\n}\n/** A provisioned edge whose consumer and provider nodes belong to different extensions (ADR-0031). */\nfunction crossExtensionProvisionError(edgeId) {\n\treturn new LowerError(`Provisioned edge \"${edgeId}\" spans two extensions — cross-extension provisioned edges aren't supported yet.`);\n}\n/**\n* More than one provisioned param on one connection (ADR-0031). One edge mints\n* ONE value, keyed by edge id, so a second need on the same connection would\n* silently receive the first's value under the first's brand.\n*/\nfunction multipleProvisionedParamsError(edgeId, names) {\n\treturn new LowerError(`Connection input \"${edgeId}\" declares more than one provisioned param (${names.join(\", \")}) — only one provisioned param per connection is supported.`);\n}\nfunction wrongKindError(extension, type, expected, got) {\n\treturn new LowerError(`Extension \"${extension}\"'s descriptor for node type \"${type}\" is a \"${got}\" descriptor — this node needs a \"${expected}\" descriptor.`);\n}\n/** Looks up one node's descriptor: extension by `node.extension`, then descriptor by `node.type`, then the kind check. */\nfunction descriptorFor(extensions, node, id) {\n\tconst extension = extensions.get(node.extension);\n\tif (extension === void 0) return Effect.fail(unknownExtensionError(node.extension, id));\n\tconst descriptor = extension.nodes[node.type];\n\tif (descriptor === void 0) return Effect.fail(unknownNodeTypeError(extension, node.type));\n\tif (descriptor.kind !== node.kind) return Effect.fail(wrongKindError(node.extension, node.type, node.kind, descriptor.kind));\n\treturn Effect.succeed(descriptor);\n}\n/**\n* The state-layer precedence a deploy resolves to: an explicit opts.state\n* always wins; failing that, the config's own (required) state descriptor,\n* created with its owning extension's resolved container (`undefined` when\n* that extension declared none). A pure function so the precedence is\n* testable without booting Alchemy.\n*/\nfunction resolveStateLayer(opts, config, containers) {\n\treturn opts.state ?? config.state.create(containers.get(config.state.extension));\n}\n/**\n* All configured extensions' providers merged, config array order — an\n* extension without `providers` is skipped; no used-extensions-only\n* filtering (ADR-0017's pinned providers rule).\n*/\nfunction mergedProviders(config) {\n\tconst [first, ...rest] = config.extensions.flatMap((extension) => extension.providers !== void 0 ? [extension.providers()] : []);\n\treturn first === void 0 ? Layer.empty : Layer.mergeAll(first, ...rest);\n}\n/**\n* Composable form for mixed stacks: hand-wired Alchemy resources alongside Prisma App nodes in one stack effect.\n* Fails with LowerError or whatever an extension's lowering raises — the error type is open.\n*/\nfunction lowering(root, config, opts) {\n\treturn Effect.gen(function* () {\n\t\tconst graph = Load(root, { id: opts.name });\n\t\tconst extensions = yield* extensionsById(config);\n\t\tconst containers = deserializeContainers(config.extensions, process.env);\n\t\tconst lowered = /* @__PURE__ */ new Map();\n\t\tconst entries = [];\n\t\tconst provisioned = /* @__PURE__ */ new Map();\n\t\tconst applications = /* @__PURE__ */ new Map();\n\t\tfor (const descriptor of config.extensions) {\n\t\t\tif (descriptor.application === void 0) continue;\n\t\t\tconst appCtx = {\n\t\t\t\tid: graph.root.id,\n\t\t\t\taddress: \"\",\n\t\t\t\tnode: graph.root.node,\n\t\t\t\tgraph,\n\t\t\t\topts,\n\t\t\t\tapplication: void 0,\n\t\t\t\tcontainer: containers.get(descriptor.id),\n\t\t\t\tlowered,\n\t\t\t\tprovisioned\n\t\t\t};\n\t\t\tapplications.set(descriptor.id, yield* descriptor.application.provision(appCtx));\n\t\t}\n\t\tfor (const edge of graph.edges) {\n\t\t\tif (edge.kind !== \"dependency\") continue;\n\t\t\tconst consumer = graph.nodes.find((n) => n.id === edge.to)?.node;\n\t\t\tif (consumer === void 0 || consumer.kind !== \"service\") continue;\n\t\t\tconst slot = consumer.inputs[edge.input];\n\t\t\tif (slot === void 0) continue;\n\t\t\tconst provisionedParams = Object.entries(slot.connection.params).filter(([, param]) => param.provision !== void 0);\n\t\t\tif (provisionedParams.length === 0) continue;\n\t\t\tconst edgeId = `${edge.to}.${edge.input}`;\n\t\t\tif (provisionedParams.length > 1) return yield* Effect.fail(multipleProvisionedParamsError(edgeId, provisionedParams.map(([name]) => name)));\n\t\t\tconst need = provisionedParams[0]?.[1].provision;\n\t\t\tif (need === void 0) continue;\n\t\t\tconst provider = graph.nodes.find((n) => n.id === edge.from)?.node;\n\t\t\tif (provider === void 0 || provider.kind !== \"service\" && provider.kind !== \"resource\") continue;\n\t\t\tif (consumer.extension !== provider.extension) return yield* Effect.fail(crossExtensionProvisionError(edgeId));\n\t\t\tconst extension = extensions.get(consumer.extension);\n\t\t\tif (extension === void 0) return yield* Effect.fail(unknownExtensionError(consumer.extension, edge.to));\n\t\t\tconst provisioner = extension.provisions?.get(need.brand);\n\t\t\tif (provisioner === void 0) return yield* Effect.fail(unknownProvisionerError(extension, need.brand, edgeId));\n\t\t\tconst ref = yield* provisioner.provision({\n\t\t\t\tedgeId,\n\t\t\t\tconsumerAddress: edge.to,\n\t\t\t\tproviderAddress: edge.from,\n\t\t\t\tinput: edge.input,\n\t\t\t\tneed\n\t\t\t});\n\t\t\tprovisioned.set(edgeId, ref);\n\t\t}\n\t\tfor (const { id, node } of graph.nodes) {\n\t\t\tif (node.kind === \"module\") continue;\n\t\t\tif (node.kind === \"dependency\") continue;\n\t\t\tconst ctx = {\n\t\t\t\tid,\n\t\t\t\taddress: id,\n\t\t\t\tnode,\n\t\t\t\tgraph,\n\t\t\t\topts,\n\t\t\t\tapplication: applications.get(node.extension),\n\t\t\t\tcontainer: containers.get(node.extension),\n\t\t\t\tlowered,\n\t\t\t\tprovisioned\n\t\t\t};\n\t\t\tconst descriptor = yield* descriptorFor(extensions, node, id);\n\t\t\tif (descriptor.kind === \"resource\") {\n\t\t\t\tconst result = yield* descriptor(ctx);\n\t\t\t\tlowered.set(id, result.outputs);\n\t\t\t\tentries.push({\n\t\t\t\t\taddress: id,\n\t\t\t\t\tentities: result.entities\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (descriptor.kind !== \"service\") return yield* Effect.fail(wrongKindError(node.extension, node.type, node.kind, descriptor.kind));\n\t\t\tconst service = node;\n\t\t\tconst provisionedNode = yield* descriptor.provision(ctx);\n\t\t\tconst typedConfig = buildConfig(service, id, graph, lowered, provisioned);\n\t\t\tconst serialized = yield* descriptor.serialize(ctx, provisionedNode, typedConfig);\n\t\t\tconst bundle = opts.bundles[id];\n\t\t\tif (bundle === void 0) return yield* Effect.fail(missingBundleError(id));\n\t\t\tconst artifact = yield* descriptor.package(ctx, {\n\t\t\t\tassembled: {\n\t\t\t\t\tdir: bundle.dir,\n\t\t\t\t\tentry: bundle.entry\n\t\t\t\t},\n\t\t\t\taddress: id\n\t\t\t});\n\t\t\tconst result = yield* descriptor.deploy(ctx, provisionedNode, artifact, serialized);\n\t\t\tlowered.set(id, result.outputs);\n\t\t\tentries.push({\n\t\t\t\taddress: id,\n\t\t\t\tentities: result.entities\n\t\t\t});\n\t\t}\n\t\tif (opts.report !== void 0) {\n\t\t\tconst report = opts.report;\n\t\t\tyield* Alchemy.Action(\"composer-deployment-report\", (input) => Effect.sync(() => {\n\t\t\t\treport({\n\t\t\t\t\tapp: opts.name,\n\t\t\t\t\tnodes: joinDeployment(graph, input.entries)\n\t\t\t\t});\n\t\t\t}))({\n\t\t\t\tnonce: Date.now(),\n\t\t\t\tentries\n\t\t\t});\n\t\t}\n\t});\n}\n/**\n* The whole-stack wrapper: Load → route each node through the config's\n* extension registries → an Alchemy Stack (the default export the alchemy\n* CLI consumes).\n*/\nfunction lower(root, config, opts) {\n\tconst stackEffect = Effect.orDie(lowering(root, config, opts));\n\tconst containers = deserializeContainers(config.extensions, process.env);\n\tconst providers = opts.providers ?? mergedProviders(config);\n\treturn Alchemy.Stack(opts.name, {\n\t\tproviders,\n\t\tstate: resolveStateLayer(opts, config, containers)\n\t}, stackEffect);\n}\n//#endregion\nexport { LowerError, buildConfig, joinDeployment, lower, lowering, mergedProviders, resolveStateLayer };\n\n//# sourceMappingURL=deploy.mjs.map"],"mappings":";;;;;;AAMA,IAAI,aAAa,cAAc,MAAM;CACpC,YAAY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AAW,KAAK,GAAG,OAAO,OAAO,OAAO,KAAK,mBAAmB,EAAE,CAAC;GACvE,MAAM,WAAW,OAAO,WAAW,QAAQ,KAAK;IAC/C,WAAW;KACV,KAAK,OAAO;KACZ,OAAO,OAAO;IACf;IACA,SAAS;GACV,CAAC;GACD,MAAM,SAAS,OAAO,WAAW,OAAO,KAAK,iBAAiB,UAAU,UAAU;GAClF,QAAQ,IAAI,IAAI,OAAO,OAAO;GAC9B,QAAQ,KAAK;IACZ,SAAS;IACT,UAAU,OAAO;GAClB,CAAC;EACF;EACA,IAAI,KAAK,WAAW,KAAK,GAAG;GAC3B,MAAM,SAAS,KAAK;GACpB,OAAO,QAAQ,OAAO,+BAA+B,UAAU,OAAO,WAAW;IAChF,OAAO;KACN,KAAK,KAAK;KACV,OAAO,eAAe,OAAO,MAAM,OAAO;IAC3C,CAAC;GACF,CAAC,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,IAAI;IAChB;GACD,CAAC;EACF;CACD,CAAC;AACF;;;;;;AAMA,SAAS,MAAM,MAAM,QAAQ,MAAM;CAClC,MAAM,cAAc,OAAO,MAAM,SAAS,MAAM,QAAQ,IAAI,CAAC;CAC7D,MAAM,aAAa,sBAAsB,OAAO,YAAY,QAAQ,GAAG;CACvE,MAAM,YAAY,KAAK,aAAa,gBAAgB,MAAM;CAC1D,OAAO,QAAQ,MAAM,KAAK,MAAM;EAC/B;EACA,OAAO,kBAAkB,MAAM,QAAQ,UAAU;CAClD,GAAG,WAAW;AACf"}
@@ -1,4 +1,4 @@
1
- import "./graph-BJgUfGB0-kvgFzT4q.mjs";
1
+ import "./graph-BfKAg2Ap-CrhKkEzd.mjs";
2
2
  import "./secret-DoWGmN7m-DO5Brq1Y.mjs";
3
3
  //#region ../../0-framework/1-core/core/dist/index.mjs
4
4
  /**
@@ -126,4 +126,4 @@ function hydrateSync(root, config) {
126
126
  //#endregion
127
127
  export { number as a, string as c, inputManifest as i, hydrate as n, param as o, hydrateSync as r, paramManifest as s, configOf as t };
128
128
 
129
- //# sourceMappingURL=dist-C5rZnr4n.mjs.map
129
+ //# sourceMappingURL=dist-BwC61F08.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dist-BwC61F08.mjs","names":[],"sources":["../../../0-framework/1-core/core/dist/index.mjs"],"sourcesContent":["import { _ as LoadError, a as isNode, c as isSecretSource, d as paramSource, f as provisionNeed, g as service, h as secretSource, i as freezeNode, l as module, m as secret, n as ResourceNodeBase, o as isParamSource, p as resource, r as dependency, s as isProvisionNeed, t as Load, u as paramNeed, v as RESOURCE_OUT_PORT } from \"./graph-BfKAg2Ap.mjs\";\nimport { SecretBox, isSecretString } from \"@internal/foundation/secret\";\n//#region src/config.ts\n/**\n* A data-only descriptor of a param's schema for introspection — the\n* validator's vendor tag, never the schema's own `validate`. `configOf`\n* reports it where the old model reported `type: 'string' | 'number'`, so the\n* config surface stays enumerable without leaking a function. Nothing consumes\n* more than the vendor tag yet; a richer projection (e.g. a JSON-Schema export\n* when the vendor offers one) is an additive change if a consumer needs it.\n*/\nfunction projectSchema(schema) {\n\treturn { vendor: schema[\"~standard\"].vendor };\n}\n/**\n* Enumerates every config param the service declares: each input's connection\n* params, then the service's own params. Pure — reads `root.inputs`/`params`\n* directly, executes nothing but the (also pure) schema projection. Deliberately\n* does not go through `Load`: a service's connection-end inputs are legitimately\n* unwired from its own point of view (wiring is an enclosing module's concern),\n* and this introspects one service's declared shape regardless of how — or\n* whether — it composes into a larger graph.\n*/\nfunction configOf(root) {\n\tconst entries = [];\n\tfor (const [input, value] of Object.entries(root.inputs)) {\n\t\tif (typeof value !== \"object\" || value === null) continue;\n\t\tfor (const [name, param] of Object.entries(value.connection.params)) entries.push({\n\t\t\towner: { input },\n\t\t\tname,\n\t\t\tschema: projectSchema(param.schema),\n\t\t\toptional: param.optional === true,\n\t\t\tdefault: param.default\n\t\t});\n\t}\n\tfor (const [name, param] of Object.entries(root.params)) entries.push({\n\t\towner: \"service\",\n\t\tname,\n\t\tschema: projectSchema(param.schema),\n\t\toptional: param.optional === true,\n\t\tdefault: param.default\n\t});\n\treturn entries;\n}\n/**\n* The app's input manifest: every service input binding a `provision()` call\n* supplied (ADR-0042). Pure graph introspection, TARGET-AGNOSTIC — a deploy\n* target's recursive descent classifies the binding's leaves (its preflight\n* verifies each `envSecret` leaf's platform var exists before deploy; the\n* values are provisioned out-of-band).\n*/\nfunction inputManifest(graph) {\n\treturn graph.inputBindings;\n}\n/**\n* The app's param-binding manifest: every param a `provision()` call bound —\n* literal or an opaque, target-defined `ParamSource` — at the address that\n* declared it. The param sibling of `provisionManifest`, for a deploy\n* target's own preflight to consume. Pure graph introspection,\n* TARGET-AGNOSTIC; a param this manifest omits simply falls back to its own\n* `default` at `buildConfig`.\n*/\nfunction paramManifest(graph) {\n\treturn graph.params;\n}\nfunction scalarSchema(name, check) {\n\treturn { \"~standard\": {\n\t\tversion: 1,\n\t\tvendor: \"@prisma/composer\",\n\t\tvalidate: (value) => check(value) ? { value } : { issues: [{ message: `expected ${name}, got ${typeof value}` }] }\n\t} };\n}\nconst stringSchema = scalarSchema(\"string\", (v) => typeof v === \"string\");\nconst numberSchema = scalarSchema(\"number\", (v) => typeof v === \"number\" && Number.isFinite(v));\nfunction withFacets(schema, opts) {\n\treturn {\n\t\tschema,\n\t\t...opts.optional !== void 0 ? { optional: opts.optional } : {},\n\t\t...opts.default !== void 0 ? { default: opts.default } : {},\n\t\t...opts.provision !== void 0 ? { provision: opts.provision } : {}\n\t};\n}\n/** A string-valued param. */\nfunction string(opts = {}) {\n\treturn withFacets(stringSchema, opts);\n}\n/** A number-valued param. */\nfunction number(opts = {}) {\n\treturn withFacets(numberSchema, opts);\n}\n/** A param over any caller-supplied Standard Schema — a structured `jobs`, say. */\nfunction param(schema, opts = {}) {\n\treturn withFacets(schema, opts);\n}\n//#endregion\n//#region src/hydrate.ts\n/**\n* Given a service and a concrete typed Config, hydrate every input\n* (connection.hydrate with its typed value slice). A resource dep and a\n* connection dep hydrate through identical machinery — the loaded client is\n* indistinguishable. The service's own params ride alongside in\n* `config.service`; the node's `load()` merges the two.\n*/\nasync function hydrate(root, config) {\n\tconst deps = {};\n\tfor (const [name, inputNode] of Object.entries(root.inputs)) {\n\t\tconst values = config.inputs[name] ?? {};\n\t\tdeps[name] = await inputNode.connection.hydrate(values);\n\t}\n\treturn deps;\n}\n/**\n* Synchronous hydrate — what the node's `load()` uses so\n* `const { db } = service.load()` reads without `await`. Requires every\n* connection.hydrate to return synchronously; a Promise return is a loud error\n* naming the input (an async client factory must use the async `hydrate` path).\n*/\nfunction hydrateSync(root, config) {\n\tconst deps = {};\n\tfor (const [name, inputNode] of Object.entries(root.inputs)) {\n\t\tconst values = config.inputs[name] ?? {};\n\t\tconst client = inputNode.connection.hydrate(values);\n\t\tif (client instanceof Promise) throw new Error(`Connection hydrate for input \"${name}\" returned a Promise; load() requires a synchronous client factory.`);\n\t\tdeps[name] = client;\n\t}\n\treturn deps;\n}\n//#endregion\nexport { Load, LoadError, RESOURCE_OUT_PORT, ResourceNodeBase, SecretBox, configOf, dependency, freezeNode, hydrate, hydrateSync, inputManifest, isNode, isParamSource, isProvisionNeed, isSecretSource, isSecretString, module, number, param, paramManifest, paramNeed, paramSource, provisionNeed, resource, secret, secretSource, service, string };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;;;AAWA,SAAS,cAAc,QAAQ;CAC9B,OAAO,EAAE,QAAQ,OAAO,YAAY,CAAC,OAAO;AAC7C;;;;;;;;;;AAUA,SAAS,SAAS,MAAM;CACvB,MAAM,UAAU,CAAC;CACjB,KAAK,MAAM,CAAC,OAAO,UAAU,OAAO,QAAQ,KAAK,MAAM,GAAG;EACzD,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM;EACjD,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAQ,MAAM,WAAW,MAAM,GAAG,QAAQ,KAAK;GACjF,OAAO,EAAE,MAAM;GACf;GACA,QAAQ,cAAc,MAAM,MAAM;GAClC,U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;;;;;AAUA,eAAe,QAAQ,MAAM,QAAQ;CACpC,MAAM,OAAO,CAAC;CACd,KAAK,MAAM,CAAC,MAAM,cAAc,OAAO,QAAQ,KAAK,MAAM,GAAG;EAC5D,MAAM,SAAS,OAAO,OAAO,SAAS,CAAC;EACvC,KAAK,QAAQ,MAAM,UAAU,WAAW,QAAQ,MAAM;CACvD;CACA,OAAO;AACR;;;;;;;AAOA,SAAS,YAAY,MAAM,QAAQ;CAClC,MAAM,OAAO,CAAC;CACd,KAAK,MAAM,CAAC,MAAM,cAAc,OAAO,QAAQ,KAAK,MAAM,GAAG;EAC5D,MAAM,SAAS,OAAO,OAAO,SAAS,CAAC;EACvC,MAAM,SAAS,UAAU,WAAW,QAAQ,MAAM;EAClD,IAAI,kBAAkB,SAAS,MAAM,IAAI,MAAM,iCAAiC,KAAK,oEAAoE;EACzJ,KAAK,QAAQ;CACd;CACA,OAAO;AACR"}
@@ -5,7 +5,7 @@ import { n as ok, r as okVoid, s as toStructured, t as notOk } from "./result-D9
5
5
  import { a as writeRunReport, i as toRunReport, r as resolveRunReportPath, t as RUN_REPORT_FILE_ENV } from "./run-report-C2o98uD--AX8kpz4Q.mjs";
6
6
  import { n as readDeploymentSummary, t as DEPLOYMENT_RESULT_FILE_ENV } from "./deployment-summary-DswOl_9E-B9MhYYDt.mjs";
7
7
  import { n as spawnAlchemy, t as alchemyInvocation } from "./run-alchemy--ZIvgqyU-BtZTukrY.mjs";
8
- import { n as runPipeline } from "./pipeline-Bt8QocRh-DMU4GXz9.mjs";
8
+ import { n as runPipeline } from "./pipeline-Bt8QocRh-Dw2LMte5.mjs";
9
9
  import * as fs$1 from "node:fs";
10
10
  import * as path$1 from "node:path";
11
11
  import { spawnSync } from "node:child_process";
@@ -67,7 +67,7 @@ function writeStackFile(input) {
67
67
  }
68
68
  const GENERATED_STACK_RELATIVE_PATH = path$1.join(GENERATED_DIR, GENERATED_FILE);
69
69
  //#endregion
70
- //#region ../../0-framework/3-tooling/cli/dist/execute-deploy-destroy-DJ3BlpgU.mjs
70
+ //#region ../../0-framework/3-tooling/cli/dist/execute-deploy-destroy-Bsdh8hf4.mjs
71
71
  /** A stage name must be a valid git ref (deploy-cli.md) — checked via `git check-ref-format`, never silently normalized. Runs before anything platform-specific. */
72
72
  function validateStageName(stage) {
73
73
  const result = spawnSync("git", ["check-ref-format", `refs/heads/${stage}`], { stdio: "ignore" });
@@ -262,6 +262,7 @@ async function runStackPipelineInner(action, opts, reporters) {
262
262
  const { config, graph, name: resolvedName } = pipeline;
263
263
  if (action === "deploy") reporters.push(...await beginReporters(config.extensions, {
264
264
  appName: resolvedName,
265
+ graph,
265
266
  stage,
266
267
  cwd,
267
268
  reportId: opts.reportId,
@@ -417,4 +418,4 @@ async function runStackPipelineInner(action, opts, reporters) {
417
418
  //#endregion
418
419
  export { executeDeploy, executeDestroy };
419
420
 
420
- //# sourceMappingURL=execute-deploy-destroy-DJ3BlpgU-ozOg0xCh.mjs.map
421
+ //# sourceMappingURL=execute-deploy-destroy-Bsdh8hf4-ConszqTa.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execute-deploy-destroy-Bsdh8hf4-ConszqTa.mjs","names":["path","path","fs"],"sources":["../../../0-framework/3-tooling/cli/dist/generate-stack-DLu6b7YM.mjs","../../../0-framework/3-tooling/cli/dist/execute-deploy-destroy-Bsdh8hf4.mjs"],"sourcesContent":["import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\n//#region src/generate-stack.ts\n/** Pipeline step 6: writes a regenerated-every-run, independently runnable stack module at `.prisma-composer/alchemy.run.ts`. */\nconst GENERATED_DIR = \".prisma-composer\";\nconst GENERATED_FILE = \"alchemy.run.ts\";\n/** A relative import specifier from `.prisma-composer/alchemy.run.ts` to `target` (posix separators). */\nfunction relativeImportSpecifier(generatedDir, target) {\n\tconst rel = path.relative(generatedDir, target).split(path.sep).join(\"/\");\n\treturn rel.startsWith(\".\") ? rel : `./${rel}`;\n}\nfunction quote(value) {\n\treturn JSON.stringify(value);\n}\nfunction renderBundle(bundle) {\n\treturn `{ dir: ${quote(bundle.dir)}, entry: ${quote(bundle.entry)} }`;\n}\nfunction renderOptions(input) {\n\tconst lines = [];\n\tlines.push(` name: ${quote(input.name)},`);\n\tlines.push(\" bundles: {\");\n\tfor (const [id, bundle] of Object.entries(input.assembled.bundles)) lines.push(` ${quote(id)}: ${renderBundle(bundle)},`);\n\tlines.push(\" },\");\n\tlines.push(\" report: deploymentReport,\");\n\treturn lines.join(\"\\n\");\n}\n/** Renders the stack module's source (tests assert on it without touching disk) — uses `//` headers, not a block comment, since a cwd path with a star-slash could close one early. */\nfunction renderStackFile(input) {\n\tconst generatedDir = path.join(input.cwd, GENERATED_DIR);\n\tconst appImport = relativeImportSpecifier(generatedDir, input.entryPath);\n\tconst configImport = relativeImportSpecifier(generatedDir, input.configPath);\n\treturn `// Generated by \\`prisma-composer deploy\\`/\\`prisma-composer destroy\\` — overwritten on every\n// run; do not edit by hand. Runnable from ${quote(input.cwd)} WITH the env the\n// CLI passes its child (the PRISMA_COMPOSER_CONTAINER_*/_PREFLIGHT_* vars —\n// without them lower() refuses because no container is resolved):\n//\n// alchemy deploy ${GENERATED_DIR}/${GENERATED_FILE}\n//\n// bisects a CLI bug from an Alchemy bug (deploy-cli.md § Implementation decisions).\nimport { lower } from '@prisma/composer/deploy';\nimport { deploymentReport } from '@prisma/composer/report';\nimport config from ${quote(configImport)};\nimport app from ${quote(appImport)};\n\nexport default lower(app, config, {\n${renderOptions(input)}\n});\n`;\n}\n/** Writes the stack file, returning its absolute path. */\nfunction writeStackFile(input) {\n\tconst generatedDir = path.join(input.cwd, GENERATED_DIR);\n\tfs.mkdirSync(generatedDir, { recursive: true });\n\tconst filePath = path.join(generatedDir, GENERATED_FILE);\n\tfs.writeFileSync(filePath, renderStackFile(input));\n\treturn filePath;\n}\nconst GENERATED_STACK_RELATIVE_PATH = path.join(GENERATED_DIR, GENERATED_FILE);\n//#endregion\nexport { renderStackFile as n, writeStackFile as r, GENERATED_STACK_RELATIVE_PATH as t };\n\n//# sourceMappingURL=generate-stack-DLu6b7YM.mjs.map","import { r as toStructured } from \"./shared-BTnATsqm.mjs\";\nimport { i as spawnAlchemy, n as alchemyInvocation } from \"./run-alchemy--ZIvgqyU.mjs\";\nimport { r as writeStackFile, t as GENERATED_STACK_RELATIVE_PATH } from \"./generate-stack-DLu6b7YM.mjs\";\nimport { n as readDeploymentSummary, t as DEPLOYMENT_RESULT_FILE_ENV } from \"./deployment-summary-DswOl_9E.mjs\";\nimport { a as writeRunReport, i as toRunReport, r as resolveRunReportPath, t as RUN_REPORT_FILE_ENV } from \"./run-report-C2o98uD-.mjs\";\nimport { n as runPipeline } from \"./pipeline-Bt8QocRh.mjs\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport { spawnSync } from \"node:child_process\";\nimport { notOk, ok, okVoid } from \"@internal/foundation/result\";\nimport { randomUUID } from \"node:crypto\";\nimport { containerEnv, preflightEnv, preflightEnvVarName } from \"@internal/core/config\";\n//#region src/validate-stage.ts\n/** A stage name must be a valid git ref (deploy-cli.md) — checked via `git check-ref-format`, never silently normalized. Runs before anything platform-specific. */\nfunction validateStageName(stage) {\n\tconst result = spawnSync(\"git\", [\"check-ref-format\", `refs/heads/${stage}`], { stdio: \"ignore\" });\n\tif (result.error) throw new CliStructuredError(\"DEPLOY.STAGE_UNVALIDATABLE\", `git is required to validate --stage \"${stage}\" (git check-ref-format): ${result.error.message}.`, { cause: result.error });\n\tif (result.status !== 0) throw new CliStructuredError(\"DEPLOY.STAGE_INVALID\", `Invalid --stage \"${stage}\": must be a valid git ref name (git check-ref-format rejected \"refs/heads/${stage}\").`);\n}\n//#endregion\n//#region src/operations/execute-deploy-destroy.ts\n/**\n* The deploy/destroy executor — main.ts's pipeline orchestration with argv,\n* console, and exit codes removed: typed inputs in, structured results out.\n* Reached only by lazy import from deploy.ts/destroy.ts — this module's\n* static graph transitively loads alchemy's provider tree, so the control\n* entry must never import it statically.\n*/\nconst ALCHEMY_STATE_DIR = \".alchemy\";\n/** Destroy guardrail (moved from main.ts): true when `<cwd>/.alchemy` is missing or empty — likely wrong directory or nothing deployed yet. */\nfunction hasNoLocalDeployState(cwd) {\n\tconst stateDir = path.join(cwd, ALCHEMY_STATE_DIR);\n\treturn !(fs.existsSync(stateDir) && fs.readdirSync(stateDir).length > 0);\n}\nasync function executeDeploy(input, deps, cwd) {\n\tconst outcome = await runStackPipeline(\"deploy\", {\n\t\tentry: input.entry,\n\t\tname: input.name,\n\t\tstage: input.stage,\n\t\tcwd,\n\t\tonEvent: void 0,\n\t\tdeps,\n\t\treportId: input.reportId\n\t});\n\tconst reportPath = resolveRunReportPath(input.reportPath, process.env[RUN_REPORT_FILE_ENV], cwd);\n\tif (reportPath !== void 0) writeRunReport(reportPath, toRunReport({\n\t\tsummary: outcome.ok ? outcome.value : void 0,\n\t\tstage: input.stage,\n\t\tfailure: outcome.ok ? void 0 : {\n\t\t\tcode: outcome.failure.code,\n\t\t\tmessage: outcome.failure.message\n\t\t}\n\t}));\n\tif (!outcome.ok) return outcome;\n\treturn ok({ summary: outcome.value });\n}\nasync function executeDestroy(input, deps, cwd) {\n\tconst outcome = await runStackPipeline(\"destroy\", {\n\t\tentry: input.entry,\n\t\tname: input.name,\n\t\tstage: input.target.kind === \"stage\" ? input.target.stage : void 0,\n\t\tcwd,\n\t\tonEvent: input.onEvent,\n\t\tdeps,\n\t\treportId: void 0\n\t});\n\tif (!outcome.ok) return outcome;\n\treturn okVoid();\n}\n/**\n* Opens a session per extension that declares a reporter. A `begin` that\n* throws costs that extension its reporting and nothing else — the deploy\n* has not started, and refusing to run it because an observer failed would\n* invert the relationship.\n*/\nasync function beginReporters(extensions, context) {\n\treturn (await Promise.all(extensions.map(async (extension) => {\n\t\tif (extension.reporter === void 0) return void 0;\n\t\ttry {\n\t\t\tconst reporter = await extension.reporter.begin(context);\n\t\t\treturn reporter === void 0 ? void 0 : {\n\t\t\t\textensionId: extension.id,\n\t\t\t\treporter\n\t\t\t};\n\t\t} catch (error) {\n\t\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\t\tconsole.warn(`\\nCould not start deploy reporting for ${extension.id}: ${detail}`);\n\t\t\treturn;\n\t\t}\n\t}))).filter((entry) => entry !== void 0);\n}\n/** Hands each session its own extension's resolved container, so it can attach the run to what that container names. */\nasync function attachReporters(reporters, containers) {\n\tawait Promise.all(reporters.map(async ({ extensionId, reporter }) => {\n\t\ttry {\n\t\t\tawait reporter.attach({ container: containers.get(extensionId) });\n\t\t} catch (error) {\n\t\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\t\tconsole.warn(`\\nCould not attach this deploy to its project for ${extensionId}: ${detail}`);\n\t\t}\n\t}));\n}\n/** Every session's contribution to the alchemy child's environment, so reporting that happens inside the apply can find the run. */\nfunction reporterChildEnv(reporters) {\n\tconst env = {};\n\tfor (const { extensionId, reporter } of reporters) try {\n\t\tObject.assign(env, reporter.childEnv());\n\t} catch (error) {\n\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\tconsole.warn(`\\nCould not pass deploy reporting into the apply for ${extensionId}: ${detail}`);\n\t}\n\treturn env;\n}\n/** `failingStep` is capped at 500 by the platform and `errorMessage` at 5000; truncating here keeps a long message from costing the whole report. */\nfunction truncate(value, limit) {\n\treturn value.length <= limit ? value : `${value.slice(0, limit - 1)}…`;\n}\n/** An interrupted converge (the engine settled a Ctrl-C) — reported as `cancelled`, never as `failed`. */\nfunction wasInterrupted(failure) {\n\treturn typeof failure.meta?.[\"signal\"] === \"string\";\n}\n/**\n* Ends every reporting session, whatever the run did. Sessions never reject\n* by contract, but a buggy one must not turn a converged deploy into a\n* failure — so this swallows anyway, and reports each session independently\n* so one bad implementation cannot silence another.\n*/\nasync function finishReporters(reporters, outcome) {\n\tconst entities = outcome.summary?.nodes.flatMap((node) => node.entities) ?? [];\n\tawait Promise.all(reporters.map(async ({ reporter }) => {\n\t\ttry {\n\t\t\tawait reporter.finish({\n\t\t\t\tok: outcome.ok,\n\t\t\t\tcancelled: outcome.cancelled,\n\t\t\t\tfailingStep: outcome.code === void 0 ? void 0 : truncate(outcome.code, 500),\n\t\t\t\terrorMessage: outcome.message === void 0 ? void 0 : truncate(outcome.message, 5e3),\n\t\t\t\tentities\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tconst detail = error instanceof Error ? error.message : String(error);\n\t\t\tconsole.warn(`\\nCould not report this deploy's outcome: ${detail}`);\n\t\t}\n\t}));\n}\n/**\n* Owns the reporting sessions around the pipeline: the inner run opens them\n* once it knows which extensions are configured, and this closes them on\n* every exit path — a returned failure, a success, or a thrown defect.\n* Nothing here can change what the pipeline returns.\n*/\nasync function runStackPipeline(action, opts) {\n\tconst reporters = [];\n\tlet outcome;\n\ttry {\n\t\toutcome = await runStackPipelineInner(action, opts, reporters);\n\t} catch (error) {\n\t\tawait finishReporters(reporters, {\n\t\t\tok: false,\n\t\t\tcancelled: false,\n\t\t\tcode: \"DEPLOY.UNEXPECTED\",\n\t\t\tmessage: error instanceof Error ? error.message : String(error)\n\t\t});\n\t\tthrow error;\n\t}\n\tawait finishReporters(reporters, outcome.ok ? {\n\t\tok: true,\n\t\tcancelled: false,\n\t\tsummary: outcome.value\n\t} : {\n\t\tok: false,\n\t\tcancelled: wasInterrupted(outcome.failure),\n\t\tcode: outcome.failure.code,\n\t\tmessage: outcome.failure.message\n\t});\n\treturn outcome;\n}\n/** The pipeline both actions share: validate, resolve containers, preflight,\n* write the stack file, run alchemy against it, then the destroy-only\n* teardown/removal suffix. The value is only ever a summary for deploy. */\nasync function runStackPipelineInner(action, opts, reporters) {\n\tconst { entry, name, stage, cwd, onEvent, deps } = opts;\n\tif (stage !== void 0) try {\n\t\tvalidateStageName(stage);\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\tthrow error;\n\t}\n\tif (action === \"destroy\" && hasNoLocalDeployState(cwd)) onEvent?.({\n\t\tkind: \"no-local-deploy-state\",\n\t\tcwd\n\t});\n\tlet pipeline;\n\tlet containers;\n\tlet alchemyStage;\n\tconst preflightPayloads = /* @__PURE__ */ new Map();\n\tlet preflightTransportEnv = {};\n\ttry {\n\t\tpipeline = await runPipeline(entry, name, cwd, {\n\t\t\trunAssembler: deps.runAssembler,\n\t\t\tconfig: deps.config,\n\t\t\tconfigPath: deps.configPath\n\t\t}, action === \"destroy\" ? (error) => new CliStructuredError(\"DEPLOY.BUILD_REQUIRED\", error.message, {\n\t\t\twhy: \"destroy evaluates the same stack program as deploy, which packages the built artifacts — so the app must be built first.\",\n\t\t\tfix: \"Run the build, then retry the destroy.\",\n\t\t\tcause: error\n\t\t}) : void 0);\n\t\tconst { config, graph, name: resolvedName } = pipeline;\n\t\tif (action === \"deploy\") reporters.push(...await beginReporters(config.extensions, {\n\t\t\tappName: resolvedName,\n\t\t\tgraph,\n\t\t\tstage,\n\t\t\tcwd,\n\t\t\treportId: opts.reportId,\n\t\t\tcredentials: deps.credentials\n\t\t}));\n\t\tcontainers = /* @__PURE__ */ new Map();\n\t\tfor (const extension of config.extensions) {\n\t\t\tif (extension.container === void 0) continue;\n\t\t\ttry {\n\t\t\t\tif (action === \"deploy\") containers.set(extension.id, await extension.container.ensure({\n\t\t\t\t\tappName: resolvedName,\n\t\t\t\t\tstage\n\t\t\t\t}, deps.credentials));\n\t\t\t\telse {\n\t\t\t\t\tconst instance = await extension.container.locate({\n\t\t\t\t\t\tappName: resolvedName,\n\t\t\t\t\t\tstage\n\t\t\t\t\t}, deps.credentials);\n\t\t\t\t\tif (instance === void 0) throw new CliStructuredError(\"DEPLOY.TARGET_NOT_FOUND\", `Nothing deployed for ${resolvedName}${stage !== void 0 ? `/${stage}` : \"\"}.`, { fix: \"Deploy it first.\" });\n\t\t\t\t\tcontainers.set(extension.id, instance);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tthrow toStructured(\"DEPLOY.CONTAINER_FAILED\", error);\n\t\t\t}\n\t\t}\n\t\tawait attachReporters(reporters, containers);\n\t\tconst pinnedStage = containers.get(config.state.extension)?.alchemyStage ?? stage;\n\t\tif (pinnedStage === void 0) throw new CliStructuredError(\"DEPLOY.SCOPE_MISSING\", \"The configured deploy target supplied no deploy scope (its container defines no alchemyStage), so Alchemy has no stage to run under.\", { fix: action === \"deploy\" ? \"Pass --stage <name> to choose the deploy scope explicitly.\" : \"destroy --production needs a target whose container supplies the production deploy scope.\" });\n\t\talchemyStage = pinnedStage;\n\t\tif (action === \"deploy\") {\n\t\t\tfor (const extension of config.extensions) {\n\t\t\t\tif (extension.preflight === void 0) continue;\n\t\t\t\ttry {\n\t\t\t\t\tconst payload = await extension.preflight({\n\t\t\t\t\t\tgraph,\n\t\t\t\t\t\tcontainer: containers.get(extension.id),\n\t\t\t\t\t\tstage,\n\t\t\t\t\t\tcredentials: deps.credentials\n\t\t\t\t\t});\n\t\t\t\t\tif (payload !== void 0) preflightPayloads.set(extension.id, payload);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthrow toStructured(\"DEPLOY.PREFLIGHT_FAILED\", error);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tpreflightTransportEnv = preflightEnv(preflightPayloads);\n\t\t\t} catch (error) {\n\t\t\t\tthrow toStructured(\"DEPLOY.PREFLIGHT_FAILED\", error);\n\t\t\t}\n\t\t}\n\t\tfor (const extension of config.extensions) preflightTransportEnv[preflightEnvVarName(extension.id)] ??= \"\";\n\t} catch (error) {\n\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\tthrow error;\n\t}\n\tlet stackPath;\n\tconst resultFilePath = path.join(cwd, \".prisma-composer\", `deployment-result-${String(process.pid)}-${randomUUID()}.json`);\n\ttry {\n\t\ttry {\n\t\t\tstackPath = writeStackFile({\n\t\t\t\tentryPath: pipeline.entryModule.path,\n\t\t\t\tcwd,\n\t\t\t\tconfigPath: pipeline.configPath,\n\t\t\t\tname: pipeline.name,\n\t\t\t\tassembled: pipeline.assembled\n\t\t\t});\n\t\t} catch (error) {\n\t\t\treturn notOk(toStructured(\"DEPLOY.STACK_WRITE_FAILED\", error));\n\t\t}\n\t\tconst reproduceCommand = `alchemy ${action} ${GENERATED_STACK_RELATIVE_PATH} --yes --stage ${alchemyStage}`;\n\t\tlet outcome;\n\t\ttry {\n\t\t\toutcome = await (deps.alchemy ?? spawnAlchemy)(alchemyInvocation({\n\t\t\t\tcommand: action,\n\t\t\t\tstackFileRelativePath: GENERATED_STACK_RELATIVE_PATH,\n\t\t\t\tcwd,\n\t\t\t\tstage: alchemyStage,\n\t\t\t\tcontainerEnv: containerEnv(containers),\n\t\t\t\tpreflightEnv: preflightTransportEnv,\n\t\t\t\tenv: {\n\t\t\t\t\t...reporterChildEnv(reporters),\n\t\t\t\t\t[DEPLOYMENT_RESULT_FILE_ENV]: resultFilePath\n\t\t\t\t}\n\t\t\t}));\n\t\t} catch (error) {\n\t\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\t\treturn notOk(new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", error instanceof Error ? error.message : String(error), {\n\t\t\t\tcause: error,\n\t\t\t\tmeta: { diagnostics: {\n\t\t\t\t\texitCode: void 0,\n\t\t\t\t\tstackFilePath: stackPath,\n\t\t\t\t\treproduceCommand,\n\t\t\t\t\tcwd\n\t\t\t\t} }\n\t\t\t}));\n\t\t}\n\t\tif (outcome.signal !== null) return notOk(new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", `alchemy ${action} was interrupted by ${outcome.signal}.`, { meta: {\n\t\t\tsignal: outcome.signal,\n\t\t\tdiagnostics: {\n\t\t\t\texitCode: void 0,\n\t\t\t\tsignal: outcome.signal,\n\t\t\t\tstackFilePath: stackPath,\n\t\t\t\treproduceCommand,\n\t\t\t\tcwd\n\t\t\t}\n\t\t} }));\n\t\tconst status = outcome.exitCode ?? 1;\n\t\tif (status !== 0) return notOk(new CliStructuredError(\"DEPLOY.ENGINE_FAILED\", `alchemy ${action} exited with status ${status}.`, { meta: {\n\t\t\texitCode: status,\n\t\t\tdiagnostics: {\n\t\t\t\texitCode: status,\n\t\t\t\tstackFilePath: stackPath,\n\t\t\t\treproduceCommand,\n\t\t\t\tcwd\n\t\t\t}\n\t\t} }));\n\t\ttry {\n\t\t\tif (action === \"destroy\") {\n\t\t\t\tfor (const extension of pipeline.config.extensions) {\n\t\t\t\t\tif (extension.teardown === void 0) continue;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait extension.teardown({\n\t\t\t\t\t\t\tcontainer: containers.get(extension.id),\n\t\t\t\t\t\t\tstage\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tthrow toStructured(\"DEPLOY.TEARDOWN_FAILED\", error);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (const extension of pipeline.config.extensions) {\n\t\t\t\t\tif (extension.container === void 0) continue;\n\t\t\t\t\tconst instance = containers.get(extension.id);\n\t\t\t\t\tif (instance === void 0) continue;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait extension.container.remove(instance, deps.credentials);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tthrow toStructured(\"DEPLOY.CONTAINER_REMOVE_FAILED\", error);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tif (CliStructuredError.is(error)) return notOk(error);\n\t\t\tthrow error;\n\t\t}\n\t\tif (action === \"deploy\") return ok(readDeploymentSummary(resultFilePath));\n\t\treturn ok(void 0);\n\t} finally {\n\t\ttry {\n\t\t\tfs.rmSync(resultFilePath, { force: true });\n\t\t} catch {}\n\t}\n}\n//#endregion\nexport { executeDeploy, executeDestroy };\n\n//# sourceMappingURL=execute-deploy-destroy-Bsdh8hf4.mjs.map"],"mappings":";;;;;;;;;;;;;;AAIA,MAAM,gBAAgB;AACtB,MAAM,iBAAiB;;AAEvB,SAAS,wBAAwB,cAAc,QAAQ;CACtD,MAAM,MAAMA,OAAK,SAAS,cAAc,MAAM,CAAC,CA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AAG;KACnC,IAAI;MACH,MAAM,UAAU,SAAS;OACxB,WAAW,WAAW,IAAI,UAAU,EAAE;OACtC;MACD,CAAC;KACF,SAAS,OAAO;MACf,MAAM,aAAa,0BAA0B,KAAK;KACnD;IACD;IACA,KAAK,MAAM,aAAa,SAAS,OAAO,YAAY;KACnD,IAAI,UAAU,cAAc,KAAK,GAAG;KACpC,MAAM,WAAW,WAAW,IAAI,UAAU,EAAE;KAC5C,IAAI,aAAa,KAAK,GAAG;KACzB,IAAI;MACH,MAAM,UAAU,UAAU,OAAO,UAAU,KAAK,WAAW;KAC5D,SAAS,OAAO;MACf,MAAM,aAAa,kCAAkC,KAAK;KAC3D;IACD;GACD;EACD,SAAS,OAAO;GACf,IAAI,mBAAmB,GAAG,KAAK,GAAG,OAAO,MAAM,KAAK;GACpD,MAAM;EACP;EACA,IAAI,WAAW,UAAU,OAAO,GAAG,sBAAsB,cAAc,CAAC;EACxE,OAAO,GAAG,KAAK,CAAC;CACjB,UAAU;EACT,IAAI;GACH,KAAG,OAAO,gBAAgB,EAAE,OAAO,KAAK,CAAC;EAC1C,QAAQ,CAAC;CACV;AACD"}
@@ -4,7 +4,7 @@ import { t as DEV_DIR } from "./app-config-joXc-BKm-CdcXqNMD.mjs";
4
4
  import { n as ok, s as toStructured, t as notOk } from "./result-D95kAAek.mjs";
5
5
  import { n as resolveLocalTargets } from "./local-target-DnA2E8IN.mjs";
6
6
  import { n as spawnAlchemy, t as alchemyInvocation } from "./run-alchemy--ZIvgqyU-BtZTukrY.mjs";
7
- import { n as runPipeline } from "./pipeline-Bt8QocRh-DMU4GXz9.mjs";
7
+ import { n as runPipeline } from "./pipeline-Bt8QocRh-Dw2LMte5.mjs";
8
8
  import { t as withEmulatorRetry } from "./emulator-retry-DGonap4g-S8BNrXFD.mjs";
9
9
  import * as fs$1 from "node:fs";
10
10
  import * as path$1 from "node:path";
@@ -2011,4 +2011,4 @@ async function executeDev(input, deps, cwd) {
2011
2011
  //#endregion
2012
2012
  export { executeDev };
2013
2013
 
2014
- //# sourceMappingURL=execute-dev-CQ0Lo2eN-BXIHSzKA.mjs.map
2014
+ //# sourceMappingURL=execute-dev-CQ0Lo2eN-BL3PmI0m.mjs.map