@prisma/composer 0.39.0-dev.1 → 0.39.0-dev.11

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 (141) hide show
  1. package/dist/{app-config-UeKFBma7-CohaMmWp.d.mts → app-config-DriAu5RU-C8hYpR38.d.mts} +88 -83
  2. package/dist/app-config-DriAu5RU-C8hYpR38.d.mts.map +1 -0
  3. package/dist/{app-configuration-file-CeJvBAti-D3uDlheX.mjs → app-configuration-file-D0rB5g65-CdMrjkCc.mjs} +50 -85
  4. package/dist/app-configuration-file-D0rB5g65-CdMrjkCc.mjs.map +1 -0
  5. package/dist/app-converge-bS1l9jIf-DRGbjw2D.mjs +88 -0
  6. package/dist/app-converge-bS1l9jIf-DRGbjw2D.mjs.map +1 -0
  7. package/dist/arktype.d.mts +7 -5
  8. package/dist/arktype.d.mts.map +1 -1
  9. package/dist/arktype.mjs +7 -5
  10. package/dist/arktype.mjs.map +1 -1
  11. package/dist/config-Bpi8QVLB.d.mts +1 -0
  12. package/dist/config.d.mts +3 -3
  13. package/dist/config.mjs +2 -2
  14. package/dist/control.d.mts +19 -21
  15. package/dist/control.d.mts.map +1 -1
  16. package/dist/control.mjs +4 -4
  17. package/dist/control.mjs.map +1 -1
  18. package/dist/converge-in-process-CTomEXaD-BnDylZP8.d.mts +67 -0
  19. package/dist/converge-in-process-CTomEXaD-BnDylZP8.d.mts.map +1 -0
  20. package/dist/converge-in-process-x89zb2MF-Dvj-J8xo.mjs +258 -0
  21. package/dist/converge-in-process-x89zb2MF-Dvj-J8xo.mjs.map +1 -0
  22. package/dist/{deploy-3EXLVrtG.mjs → deploy-CSU0kr4j.mjs} +130 -38
  23. package/dist/deploy-CSU0kr4j.mjs.map +1 -0
  24. package/dist/deploy-DHgEJDpg.d.mts +32 -0
  25. package/dist/deploy-DHgEJDpg.d.mts.map +1 -0
  26. package/dist/deploy.d.mts +4 -4
  27. package/dist/deploy.mjs +3 -3
  28. package/dist/{deployment-summary-p88NV5m5-SgniM8TX.d.mts → deployment-summary-6LgQDUuu-Cu_6UNhc.d.mts} +7 -4
  29. package/dist/deployment-summary-6LgQDUuu-Cu_6UNhc.d.mts.map +1 -0
  30. package/dist/{deployment-summary-D74WrJX7-DQ3LDUuO.mjs → deployment-summary-CVJZn2v0-Dz-gX1rp.mjs} +16 -44
  31. package/dist/deployment-summary-CVJZn2v0-Dz-gX1rp.mjs.map +1 -0
  32. package/dist/{describe-kind-Cpm_euxo-CkhlGJUL.mjs → describe-kind-Cpm_euxo-DsSPENQa.mjs} +4 -4
  33. package/dist/describe-kind-Cpm_euxo-DsSPENQa.mjs.map +1 -0
  34. package/dist/dev-converge-messages-DML4rTz7-C_EAB5M_.mjs +165 -0
  35. package/dist/dev-converge-messages-DML4rTz7-C_EAB5M_.mjs.map +1 -0
  36. package/dist/dev-converge-worker.d.mts +1 -0
  37. package/dist/dev-converge-worker.mjs +142 -0
  38. package/dist/dev-converge-worker.mjs.map +1 -0
  39. package/dist/{dev-current-wD5YDLjA-CzyFYXni.mjs → dev-current-lAlj53eX-DrtBnAmA.mjs} +11 -7
  40. package/dist/dev-current-lAlj53eX-DrtBnAmA.mjs.map +1 -0
  41. package/dist/{dev-environment-name-6eEr5PW8-BwusWVKi.mjs → dev-environment-name-6eEr5PW8-7ntm9Xhs.mjs} +3 -3
  42. package/dist/{dev-environment-name-6eEr5PW8-BwusWVKi.mjs.map → dev-environment-name-6eEr5PW8-7ntm9Xhs.mjs.map} +1 -1
  43. package/dist/{dist-ynqBR6y8.mjs → dist-Cf_mZHaH.mjs} +4 -26
  44. package/dist/dist-Cf_mZHaH.mjs.map +1 -0
  45. package/dist/{emulator-retry-CV8rl69G-BgUzkxc-.mjs → emulator-retry-CV8rl69G-scQ105wk.mjs} +2 -2
  46. package/dist/{emulator-retry-CV8rl69G-BgUzkxc-.mjs.map → emulator-retry-CV8rl69G-scQ105wk.mjs.map} +1 -1
  47. package/dist/{errors-0e8IVwzi.mjs → errors-DI3TBXE-.mjs} +7 -2
  48. package/dist/{errors-0e8IVwzi.mjs.map → errors-DI3TBXE-.mjs.map} +1 -1
  49. package/dist/{execute-deploy-destroy-DOzo2Psp-DmS5miT4.mjs → execute-deploy-destroy-DN16ETAk-BaopEKsA.mjs} +376 -86
  50. package/dist/execute-deploy-destroy-DN16ETAk-BaopEKsA.mjs.map +1 -0
  51. package/dist/{execute-dev-BIyOI3Ys-BbDOLlV4.mjs → execute-dev-DnVmNpc1-kSyPML7l.mjs} +455 -221
  52. package/dist/execute-dev-DnVmNpc1-kSyPML7l.mjs.map +1 -0
  53. package/dist/{execute-dev-current-CKOzjWuO-BPecs6Lf.mjs → execute-dev-current-CZdmxVQ4-Bij2LeBY.mjs} +7 -7
  54. package/dist/{execute-dev-current-CKOzjWuO-BPecs6Lf.mjs.map → execute-dev-current-CZdmxVQ4-Bij2LeBY.mjs.map} +1 -1
  55. package/dist/{execute-log-BDdHor71-B2p8Zae2.mjs → execute-log-Bl-j6izb-BTAo6tRM.mjs} +8 -8
  56. package/dist/{execute-log-BDdHor71-B2p8Zae2.mjs.map → execute-log-Bl-j6izb-BTAo6tRM.mjs.map} +1 -1
  57. package/dist/{graph-C7mdtisq-RnKiwVsx.d.mts → graph-CUYXjK8S-BzL-mhjq.d.mts} +3 -3
  58. package/dist/graph-CUYXjK8S-BzL-mhjq.d.mts.map +1 -0
  59. package/dist/{graph-BzPLUUsB-D7EnB1F5.mjs → graph-D2WMLL43-CeiC5wdy.mjs} +150 -107
  60. package/dist/graph-D2WMLL43-CeiC5wdy.mjs.map +1 -0
  61. package/dist/{graph-types-s5V7pGj2-BxSqB1ZH.d.mts → graph-types-D4PrtP-l-B0uuchTl.d.mts} +101 -98
  62. package/dist/graph-types-D4PrtP-l-B0uuchTl.d.mts.map +1 -0
  63. package/dist/http.d.mts +2 -2
  64. package/dist/http.mjs +2 -2
  65. package/dist/{index-DyuwxTtd.d.mts → index-D8chHe55.d.mts} +3 -3
  66. package/dist/{index-DyuwxTtd.d.mts.map → index-D8chHe55.d.mts.map} +1 -1
  67. package/dist/index.d.mts +5 -5
  68. package/dist/index.mjs +4 -4
  69. package/dist/internal-app-configuration-file.d.mts +7 -10
  70. package/dist/internal-app-configuration-file.d.mts.map +1 -1
  71. package/dist/internal-app-configuration-file.mjs +2 -2
  72. package/dist/internal-converge-contract.d.mts +16 -0
  73. package/dist/internal-converge-contract.d.mts.map +1 -0
  74. package/dist/internal-converge-contract.mjs +16 -0
  75. package/dist/internal-converge-contract.mjs.map +1 -0
  76. package/dist/internal-converge.d.mts +5 -0
  77. package/dist/internal-converge.mjs +4 -0
  78. package/dist/load-entry-CEoVBdMj-CHOz7jKf.mjs +527 -0
  79. package/dist/load-entry-CEoVBdMj-CHOz7jKf.mjs.map +1 -0
  80. package/dist/local-target-7KRsLMDO.d.mts +31 -0
  81. package/dist/local-target-7KRsLMDO.d.mts.map +1 -0
  82. package/dist/{local-target-Dd8FJEb5.mjs → local-target-DhU1vaxd.mjs} +8 -8
  83. package/dist/{local-target-Dd8FJEb5.mjs.map → local-target-DhU1vaxd.mjs.map} +1 -1
  84. package/dist/local-target.d.mts +3 -31
  85. package/dist/local-target.mjs +1 -1
  86. package/dist/{nextjs-DLyeRR7M-0lw_cBIr.d.mts → nextjs-DLyeRR7M-CzUbvPaJ.d.mts} +3 -3
  87. package/dist/{nextjs-DLyeRR7M-0lw_cBIr.d.mts.map → nextjs-DLyeRR7M-CzUbvPaJ.d.mts.map} +1 -1
  88. package/dist/nextjs-control.d.mts +4 -4
  89. package/dist/nextjs.d.mts +1 -1
  90. package/dist/node-control.d.mts +3 -3
  91. package/dist/node.d.mts +2 -2
  92. package/dist/{pointer-CyQZZugO-D7k3vibs.d.mts → pointer-BX2KJ720-BxcfpaHP.d.mts} +8 -6
  93. package/dist/{pointer-CyQZZugO-D7k3vibs.d.mts.map → pointer-BX2KJ720-BxcfpaHP.d.mts.map} +1 -1
  94. package/dist/{preflight-transport-DmmtoFPH-CnDWufmu.mjs → preflight-transport-2d6iIchu-B-v7Di6I.mjs} +7 -44
  95. package/dist/preflight-transport-2d6iIchu-B-v7Di6I.mjs.map +1 -0
  96. package/dist/{redaction-DXung4ip-bBoNomi3.mjs → redaction-DY6eDC12-W-FzW7_r.mjs} +32 -15
  97. package/dist/redaction-DY6eDC12-W-FzW7_r.mjs.map +1 -0
  98. package/dist/{redaction-Bf8FvTFH-D_HvoMrf.d.mts → redaction-Dn7BRdaP-BcLSPhLV.d.mts} +65 -16
  99. package/dist/redaction-Dn7BRdaP-BcLSPhLV.d.mts.map +1 -0
  100. package/dist/report.d.mts +3 -3
  101. package/dist/report.mjs +2 -2
  102. package/dist/report.mjs.map +1 -1
  103. package/dist/service-rpc.d.mts +2 -2
  104. package/dist/service-rpc.mjs +2 -2
  105. package/dist/steps-BZXNqW6U-C_ME2VLd.mjs +112 -0
  106. package/dist/steps-BZXNqW6U-C_ME2VLd.mjs.map +1 -0
  107. package/dist/testing.d.mts +1 -1
  108. package/dist/validate-environment-DCZiNSlR-C7lv0cH1.mjs +344 -0
  109. package/dist/validate-environment-DCZiNSlR-C7lv0cH1.mjs.map +1 -0
  110. package/dist/zod.d.mts +6 -5
  111. package/dist/zod.d.mts.map +1 -1
  112. package/dist/zod.mjs +6 -5
  113. package/dist/zod.mjs.map +1 -1
  114. package/package.json +15 -13
  115. package/skills/prisma-composer-core-concepts/SKILL.md +47 -66
  116. package/src/exports/dev-converge-worker.ts +2 -0
  117. package/src/exports/internal-converge-contract.ts +1 -0
  118. package/src/exports/internal-converge.ts +1 -0
  119. package/dist/app-config-UeKFBma7-CohaMmWp.d.mts.map +0 -1
  120. package/dist/app-configuration-file-CeJvBAti-D3uDlheX.mjs.map +0 -1
  121. package/dist/config-BeZEgGCg.d.mts +0 -1
  122. package/dist/deploy-3EXLVrtG.mjs.map +0 -1
  123. package/dist/deploy-Xi4_JrtE.d.mts +0 -2
  124. package/dist/deployment-summary-D74WrJX7-DQ3LDUuO.mjs.map +0 -1
  125. package/dist/deployment-summary-p88NV5m5-SgniM8TX.d.mts.map +0 -1
  126. package/dist/describe-kind-Cpm_euxo-CkhlGJUL.mjs.map +0 -1
  127. package/dist/dev-current-wD5YDLjA-CzyFYXni.mjs.map +0 -1
  128. package/dist/dist-ynqBR6y8.mjs.map +0 -1
  129. package/dist/execute-deploy-destroy-DOzo2Psp-DmS5miT4.mjs.map +0 -1
  130. package/dist/execute-dev-BIyOI3Ys-BbDOLlV4.mjs.map +0 -1
  131. package/dist/graph-BzPLUUsB-D7EnB1F5.mjs.map +0 -1
  132. package/dist/graph-C7mdtisq-RnKiwVsx.d.mts.map +0 -1
  133. package/dist/graph-types-s5V7pGj2-BxSqB1ZH.d.mts.map +0 -1
  134. package/dist/local-target.d.mts.map +0 -1
  135. package/dist/preflight-transport-DmmtoFPH-CnDWufmu.mjs.map +0 -1
  136. package/dist/redaction-Bf8FvTFH-D_HvoMrf.d.mts.map +0 -1
  137. package/dist/redaction-DXung4ip-bBoNomi3.mjs.map +0 -1
  138. package/dist/run-alchemy-CRLAyOtt-CBUV28We.mjs +0 -236
  139. package/dist/run-alchemy-CRLAyOtt-CBUV28We.mjs.map +0 -1
  140. package/dist/validate-environment-D1BTCkTs-BQprjyNP.mjs +0 -739
  141. package/dist/validate-environment-D1BTCkTs-BQprjyNP.mjs.map +0 -1
@@ -1,14 +1,15 @@
1
1
  import { t as blindCast } from "./casts-DpaahrlC-C5XMnP9S.mjs";
2
- import { i as POINTER, o as isSecretPointer, r as isSecretString, t as describeKind } from "./describe-kind-Cpm_euxo-CkhlGJUL.mjs";
2
+ import { i as POINTER, o as isSecretPointer, r as isSecretString, t as describeKind } from "./describe-kind-Cpm_euxo-DsSPENQa.mjs";
3
3
  import { t as InternalError } from "./internal-error-Dfur7Zqt-D96dWHZK.mjs";
4
- import { t as CliStructuredError } from "./errors-0e8IVwzi.mjs";
5
- //#region ../../0-framework/1-core/core/dist/graph-BzPLUUsB.mjs
4
+ import { t as CliStructuredError } from "./errors-DI3TBXE-.mjs";
5
+ //#region ../../0-framework/1-core/core/dist/graph-D2WMLL43.mjs
6
6
  /** The reserved name of a resource's single anonymous output port. Rejected as a user-declared port name (node.ts). */
7
7
  const RESOURCE_OUT_PORT = "$out";
8
8
  /**
9
9
  * Thrown by Load when the graph is malformed. Structured at origin
10
- * (base-type rule 6): one type-level code covers every raise site until a
11
- * finer per-site taxonomy is carved out. The `name` stays
10
+ * (base-type rule 6) under one type-level code. Not every error Load throws
11
+ * is one: a Load that needs a root input field an earlier Load did not read
12
+ * throws an error whose name is the value of `ROOT_INPUT_UNREAD_ERROR`. The `name` stays
12
13
  * `CliStructuredError` — structural recognition depends on it.
13
14
  */
14
15
  var LoadError = class extends CliStructuredError {
@@ -29,6 +30,7 @@ function contractStyleOf(contract) {
29
30
  }
30
31
  const VALUE = blindCast(Symbol.for("prisma:value"));
31
32
  const VALUE_ORIGIN = blindCast(Symbol.for("prisma:value-origin"));
33
+ const VALUE_RESOURCE = blindCast(Symbol.for("prisma:value-resource"));
32
34
  /**
33
35
  * A value computed from other values. `fn` receives the dependencies' real
34
36
  * values as one tuple, in order, and returns plain data. Each dependency must
@@ -176,19 +178,20 @@ function buildModuleInput(moduleAddress) {
176
178
  */
177
179
  const NODE = Symbol.for("prisma:node");
178
180
  const SECRET_SOURCE = blindCast(Symbol.for("prisma:secret-source"));
179
- /** Builds a secret source from a target-defined payload: the SPI a deploy target's own constructor (e.g. `envSecret`) calls. The source is a value whose real value at deploy is itself, a pointer. Core forwards it and never inspects the payload. */
181
+ /** Builds a secret source from a target-defined payload: the SPI a deploy target's own constructor calls. The source is a value whose real value at deploy is itself, a pointer. Core forwards it and never inspects the payload. */
180
182
  function secretSource(payload, options) {
181
- const label = sourceLabel("secretSource", options?.label, "a secret source");
183
+ const label = sourceLabel("secretSource", options?.label);
182
184
  const secretsKey = options?.secretsKey;
183
185
  if (secretsKey !== void 0 && (typeof secretsKey !== "string" || secretsKey.length === 0)) throw new Error("secretSource() secretsKey must be a non-empty string.");
184
186
  return blindCast(buildSource(SECRET_SOURCE, payload, {
185
187
  kind: "source",
186
188
  sourceKind: "secret",
187
189
  label,
188
- secretsKey
190
+ secretsKey,
191
+ resource: void 0
189
192
  }, "secret"));
190
193
  }
191
- /** True if `value` is a secret source, such as an `envSecret()` result. */
194
+ /** True if `value` is a secret source. */
192
195
  function isSecretSource(value) {
193
196
  return typeof value === "object" && value !== null && blindCast(value)[SECRET_SOURCE] === true;
194
197
  }
@@ -206,35 +209,35 @@ function isProvisionNeed(value) {
206
209
  return typeof value === "object" && value !== null && blindCast(value)[PROVISION_NEED] === true;
207
210
  }
208
211
  const PARAM_SOURCE = blindCast(Symbol.for("prisma:param-source"));
209
- /** Builds a param source from a target-defined payload: the SPI a deploy target's own constructor (e.g. `envParam`) calls. Core forwards it and never inspects the payload. */
212
+ /** Builds a param source from a target-defined payload: the SPI a deploy target's own constructor calls. Core forwards it and never inspects the payload. */
210
213
  function paramSource(payload, options) {
211
- const label = sourceLabel("paramSource", options?.label, "a param source");
212
- const configurationKey = options?.configurationKey;
213
- if (configurationKey !== void 0 && (typeof configurationKey !== "string" || configurationKey.length === 0)) throw new Error("paramSource() configurationKey must be a non-empty string.");
214
+ const label = sourceLabel("paramSource", options?.label);
214
215
  const redacted = options?.redacted === true;
215
- if (configurationKey !== void 0 && redacted) throw new Error("paramSource() takes configurationKey, for a value known at deploy, or redacted, for a secret known only at boot, not both.");
216
216
  return blindCast(buildSource(PARAM_SOURCE, payload, {
217
217
  kind: "source",
218
218
  sourceKind: "param",
219
219
  label,
220
- configurationKey
221
- }, configurationKey !== void 0 ? void 0 : redacted ? "secret" : "plain"));
220
+ resource: void 0
221
+ }, redacted ? "secret" : "plain"));
222
222
  }
223
- function sourceLabel(factory, label, fallback) {
224
- if (label === void 0) return fallback;
223
+ function sourceLabel(factory, label) {
224
+ if (label === void 0) return "a source";
225
225
  if (typeof label !== "string" || label.length === 0) throw new Error(`${factory}() label must be a non-empty string.`);
226
226
  return label;
227
227
  }
228
- function buildSource(brand, payload, origin, kind) {
228
+ function buildSource(brand, payload, origin, kind, hidden = {}) {
229
229
  const source = {
230
230
  [VALUE]: true,
231
231
  [VALUE_ORIGIN]: origin,
232
232
  [brand]: true,
233
- ...kind === void 0 ? {} : { [POINTER]: kind },
233
+ [POINTER]: kind,
234
234
  payload
235
235
  };
236
236
  Object.defineProperty(origin, "source", { value: source });
237
- Object.defineProperties(source, coercions(origin));
237
+ Object.defineProperties(source, {
238
+ ...coercions(origin),
239
+ ...hidden
240
+ });
238
241
  Object.freeze(origin);
239
242
  return Object.freeze(source);
240
243
  }
@@ -253,7 +256,7 @@ function coercions(origin) {
253
256
  const sourceMisuses = /* @__PURE__ */ new WeakSet();
254
257
  function sourceMisuse(origin, what) {
255
258
  const { label } = origin;
256
- const error = new LoadError(origin.sourceKind === "secret" || origin.configurationKey === void 0 ? `${label} is known only at boot: the deploy holds a pointer to it, never its value, and ${what}. A module body can only pass it on, into a provision() binding; to compute with the value, do it in the service that reads it.` : `${label} is a value, not its real value, and ${what}. A module body can only pass it on: into a provision() binding or as a resolve() dependency. To compute with it, list it: resolve([${label}], ([v]) => …).`);
259
+ const error = new LoadError(`${label} is known only at boot: the deploy holds a pointer to it, never its value, and ${what}. A module body can only pass it on, into a provision() binding; to compute with the value, do it in the service that reads it.`);
257
260
  sourceMisuses.add(error);
258
261
  return error;
259
262
  }
@@ -267,7 +270,7 @@ function sourceOriginOf(source) {
267
270
  const origin = originOf(source);
268
271
  return origin.kind === "source" ? origin : void 0;
269
272
  }
270
- /** True if `value` is a param source, such as an `envParam()` result. */
273
+ /** True if `value` is a param source. */
271
274
  function isParamSource(value) {
272
275
  return typeof value === "object" && value !== null && blindCast(value)[PARAM_SOURCE] === true;
273
276
  }
@@ -395,6 +398,38 @@ var FrozenResourceNode = class extends ResourceNodeBase {
395
398
  function resource(def) {
396
399
  return new FrozenResourceNode(def);
397
400
  }
401
+ function isSourceValue(value) {
402
+ return (isSecretSource(value) || isParamSource(value)) && sourceOriginOf(value) !== void 0;
403
+ }
404
+ var FrozenValueResourceNode = class extends ResourceNodeBase {
405
+ [VALUE_RESOURCE];
406
+ constructor(def) {
407
+ super(def);
408
+ this[VALUE_RESOURCE] = def.value;
409
+ freezeNode(this);
410
+ }
411
+ };
412
+ /** Builds a frozen resource node that is a value: `value`, a source built with `secretSource()` or `paramSource()`. It provides no contract and has no dependencies. */
413
+ function valueResource(def) {
414
+ if (!isSourceValue(def.value)) throw new Error("valueResource() value must be a source, built with secretSource() or paramSource().");
415
+ return new FrozenValueResourceNode(def);
416
+ }
417
+ function valueResourceOrigin(node) {
418
+ if (!isNode(node) || node.kind !== "resource" || !(VALUE_RESOURCE in node)) return void 0;
419
+ const value = node[VALUE_RESOURCE];
420
+ return isSecretSource(value) || isParamSource(value) ? sourceOriginOf(value) : void 0;
421
+ }
422
+ /** True for a resource node that is a value: one that holds a source under the value resource key. */
423
+ function isValueResource(node) {
424
+ return valueResourceOrigin(node) !== void 0;
425
+ }
426
+ function provisionedValue(origin, address) {
427
+ const { source, ...kept } = origin;
428
+ return blindCast(buildSource(isSecretSource(source) ? SECRET_SOURCE : PARAM_SOURCE, source.payload, {
429
+ ...kept,
430
+ resource: address
431
+ }, isSecretPointer(source) ? "secret" : "plain", { id: { value: address } }));
432
+ }
398
433
  /**
399
434
  * Constructs a branded, frozen Service node — declarations only (inputs,
400
435
  * params, the input schema, build adapter, and the ports it exposes). Pure;
@@ -643,10 +678,8 @@ function loadService(root, rootId) {
643
678
  inputBindings: [],
644
679
  params: [],
645
680
  secretSources: [],
646
- appConfigurationRead: {
647
- rootInput: [],
648
- configurationKeyText: {}
649
- }
681
+ valueReads: [],
682
+ appConfigurationRead: { rootInput: [] }
650
683
  };
651
684
  }
652
685
  function joinPath(path, key) {
@@ -721,6 +754,14 @@ function jsonInexactKind(value) {
721
754
  }
722
755
  return describeNotPlain(value) ?? describeKind(value);
723
756
  }
757
+ /** The `name` of the error a Load that takes what an earlier Load read fails with when it needs a root input field that Load did not read. */
758
+ const ROOT_INPUT_UNREAD_ERROR = "RootInputUnreadError";
759
+ var RootInputUnreadError = class extends Error {
760
+ constructor(message) {
761
+ super(message);
762
+ this.name = ROOT_INPUT_UNREAD_ERROR;
763
+ }
764
+ };
724
765
  const SAME_GRAPH_ADVICE = "A module body must build the same graph every time; one that reads the process environment, a file or the clock can build a different one.";
725
766
  function isThenable(value) {
726
767
  if (isValue(value)) return false;
@@ -760,7 +801,7 @@ function checkResult(result, fnLabel) {
760
801
  const walk = (value, path) => {
761
802
  const atPath = path === "" ? "" : ` at "${path}"`;
762
803
  if (value === void 0) throw new LoadError(`${fnLabel} returned undefined${atPath}. Return a result for every environment; Composer never picks a default.`);
763
- if (isSecretSource(value) || isParamSource(value)) throw new LoadError(`${fnLabel} returned a source${atPath}, such as envSecret() or envParam() called inside the function. resolve() returns plain data; bind a source directly.`);
804
+ if (isSecretSource(value) || isParamSource(value)) throw new LoadError(`${fnLabel} returned a source${atPath}, a value known only at boot. resolve() returns plain data; bind the source directly.`);
764
805
  if (isValue(value)) throw new LoadError(`${fnLabel} returned a value${atPath}, not a real value. List that value as a dependency; fn receives its real value.`);
765
806
  const notPlain = describeNotPlain(value);
766
807
  if (notPlain !== void 0) throw new LoadError(`${fnLabel} returned ${notPlain}${atPath}. resolve() returns plain data: strings, finite numbers, booleans, null, arrays and plain objects.`);
@@ -790,7 +831,7 @@ function firstPointer(value, path = [], seen = /* @__PURE__ */ new WeakSet()) {
790
831
  function refusePointerDependency(fnLabel, dependency, real) {
791
832
  const found = firstPointer(real);
792
833
  if (found === void 0) return;
793
- const label = sourceOriginOf(found.pointer)?.label ?? "a value known only at boot";
834
+ const label = sourceOriginOf(found.pointer)?.label ?? "a source";
794
835
  const origin = originOf(dependency);
795
836
  if (origin.kind !== "input") throw new LoadError(`${fnLabel} lists ${label}, which is known only at boot. A resolve() dependency must be a deploy-time value. Bind ${label} directly into the input of the service that reads it.`);
796
837
  const listed = `${inputFieldLabel(origin)} of module "${origin.module}"`;
@@ -861,7 +902,7 @@ function refuseSecretBoxes(address, value, path) {
861
902
  address,
862
903
  kind: "moduleInput",
863
904
  path
864
- })} is bound to a SecretString. A secret's value never appears in the code; bind envSecret('NAME'), or pass on an input field typed secretString().`);
905
+ })} is bound to a SecretString. A secret's value never appears in the code; bind a secret source, or pass on an input field typed secretString().`);
865
906
  if (Array.isArray(value)) {
866
907
  for (const [index, member] of value.entries()) refuseSecretBoxes(address, member, joinPath(path, index));
867
908
  return;
@@ -869,10 +910,17 @@ function refuseSecretBoxes(address, value, path) {
869
910
  if (isPlainObject(value)) for (const [key, member] of Object.entries(value)) refuseSecretBoxes(address, member, joinPath(path, key));
870
911
  }
871
912
  /** The original source each runtime value in `value` names, by its path. */
872
- function sourcesByPath(value, path = "", found = /* @__PURE__ */ new Map()) {
873
- if (isSecretSource(value) || isParamSource(value)) found.set(path, sourceOriginOf(value)?.source ?? value);
874
- else if (Array.isArray(value)) for (const [index, member] of value.entries()) sourcesByPath(member, joinPath(path, index), found);
875
- else if (isPlainObject(value)) for (const [key, member] of Object.entries(value)) sourcesByPath(member, joinPath(path, key), found);
913
+ function sourcesByPath(value, path = "", found = /* @__PURE__ */ new Map(), ancestors = /* @__PURE__ */ new Set()) {
914
+ if (isSecretSource(value) || isParamSource(value)) {
915
+ found.set(path, sourceOriginOf(value)?.source ?? value);
916
+ return found;
917
+ }
918
+ if (!Array.isArray(value) && !isPlainObject(value)) return found;
919
+ if (ancestors.has(value)) return found;
920
+ ancestors.add(value);
921
+ const entries = Array.isArray(value) ? value.map((member, index) => [index, member]) : Object.entries(value);
922
+ for (const [key, member] of entries) sourcesByPath(member, joinPath(path, key), found, ancestors);
923
+ ancestors.delete(value);
876
924
  return found;
877
925
  }
878
926
  function validateModuleInput(entry, resolved, environment) {
@@ -905,11 +953,18 @@ function validateModuleInput(entry, resolved, environment) {
905
953
  };
906
954
  return restore(result.value, "");
907
955
  }
956
+ function refuseSourcesInParams(params) {
957
+ for (const { serviceAddress, slot, binding } of params) {
958
+ const [source] = pointersIn(binding);
959
+ if (source === void 0) continue;
960
+ throw new LoadError(`Service "${serviceAddress}" binds its param "${slot}" to ${sourceOriginOf(source)?.label ?? "a source"}, a value known only at boot. A param takes a literal or a value the deploy has. Bind the value to a field of the service's input instead.`);
961
+ }
962
+ }
908
963
  function refusePointersInProps(address, props) {
909
964
  const seen = /* @__PURE__ */ new WeakSet();
910
965
  const walk = (value, path) => {
911
966
  if (isSecretSource(value) || isParamSource(value)) {
912
- const label = sourceOriginOf(value)?.label ?? (isSecretSource(value) ? "a secret source" : "a param source");
967
+ const label = sourceOriginOf(value)?.label ?? "a source";
913
968
  throw new LoadError(`${describeSite({
914
969
  address,
915
970
  kind: "props",
@@ -931,22 +986,12 @@ function refusePointersInProps(address, props) {
931
986
  function resolveValues(input) {
932
987
  const { environment } = input;
933
988
  const rootFields = /* @__PURE__ */ new Map();
934
- const keysRead = /* @__PURE__ */ new Map();
935
- /** The text the app configuration holds for `key`, recorded; `undefined` when it holds none or `''`. */
936
- const configurationText = (key, label, site) => {
937
- let raw;
938
- if (input.appConfigurationRead !== void 0) raw = input.appConfigurationRead.configurationKeyText[key];
939
- else if (input.configuration !== void 0) raw = input.configuration[key];
940
- else throw new LoadError(`${describeSite(site)} depends on ${label}, but Load was given no app configuration to read "${key}" from. Pass { configuration } to Load; the deploy and dev commands pass the values the \`config\` adapters return.`);
941
- if (raw !== void 0 && raw !== "" && typeof raw !== "string") throw new LoadError(`${describeSite(site)} depends on ${label}, which reads "${key}" from the values the \`config\` adapters return, but they return ${describeKind(raw)} for it, not text. ${label} reads text; to pass other data, declare it in the root module's input.`);
942
- const text = raw === void 0 || raw === "" ? void 0 : raw;
943
- keysRead.set(key, {
944
- label,
945
- text
946
- });
947
- return text;
948
- };
949
989
  const secretUses = /* @__PURE__ */ new Map();
990
+ for (const [address, value] of input.valueResources) if (isSecretSource(value)) secretUses.set(value, {
991
+ source: value,
992
+ address,
993
+ nodeKind: "resource"
994
+ });
950
995
  const recordSecret = (source, site) => {
951
996
  const canonical = canonicalSecret(source);
952
997
  if (secretUses.has(canonical)) return;
@@ -956,8 +1001,8 @@ function resolveValues(input) {
956
1001
  nodeKind: nodeKindOf(site)
957
1002
  });
958
1003
  };
959
- const secretSourcesReceivedBy = (inputBindings, params) => {
960
- for (const { serviceAddress, binding } of [...inputBindings, ...params]) for (const pointer of pointersIn(binding)) {
1004
+ const secretSourcesReceivedBy = (inputBindings) => {
1005
+ for (const { serviceAddress, binding } of inputBindings) for (const pointer of pointersIn(binding)) {
961
1006
  if (!isSecretSource(pointer)) continue;
962
1007
  const canonical = canonicalSecret(pointer);
963
1008
  if (secretUses.get(canonical)?.nodeKind === "service") continue;
@@ -1007,14 +1052,11 @@ function resolveValues(input) {
1007
1052
  break;
1008
1053
  case "source":
1009
1054
  if (isSecretSource(origin.source)) recordSecret(origin.source, site);
1010
- if (origin.sourceKind === "secret" || origin.configurationKey === void 0) result = origin.source;
1011
- else result = configurationText(origin.configurationKey, origin.label, site);
1055
+ result = origin.source;
1012
1056
  break;
1013
1057
  case "computed": {
1014
1058
  const args = origin.dependencies.map((dependency) => {
1015
1059
  const real = resolveOne(dependency, site);
1016
- const source = originOf(dependency);
1017
- if (real === void 0 && source.kind === "source" && source.sourceKind === "param") throw new LoadError(`${fnLabelFor(site)} lists ${source.label}, but "${source.configurationKey}" is unset or empty, so it has no real value. Set "${source.configurationKey}", or bind ${source.label} directly into an input binding, where an absent value leaves the key out and the schema decides.`);
1018
1060
  refusePointerDependency(fnLabelFor(site), dependency, real);
1019
1061
  return real;
1020
1062
  });
@@ -1037,7 +1079,7 @@ function resolveValues(input) {
1037
1079
  }
1038
1080
  if (entry.checked !== void 0) {
1039
1081
  const field = entry.checked.find((candidate) => candidate.path.join("\0") === origin.path.join("\0"));
1040
- if (field === void 0) throw new LoadError(`${inputFieldLabel(origin)} of root module "${origin.module}" is not in the app configuration file. The first process's root body did not pass it on, so the deploy's two processes built different graphs. ${SAME_GRAPH_ADVICE}`);
1082
+ if (field === void 0) throw new RootInputUnreadError(`${inputFieldLabel(origin)} of root module "${origin.module}" was not read when this command started, so it has no value here. ${SAME_GRAPH_ADVICE}`);
1041
1083
  result = field.value;
1042
1084
  } else {
1043
1085
  result = readPath(validatedInputOf(entry), origin);
@@ -1072,41 +1114,17 @@ function resolveValues(input) {
1072
1114
  return validated;
1073
1115
  };
1074
1116
  const rootModuleAddress = () => input.moduleInputs.find((entry) => entry.isLoadRoot)?.moduleAddress ?? "";
1075
- const appConfigurationReadOf = (inputBindings, params, secretSources) => {
1076
- if (input.configuration !== void 0 || input.appConfigurationRead !== void 0) {
1077
- const kept = [...inputBindings.map(({ serviceAddress, binding }) => ({
1078
- binding,
1079
- site: {
1080
- address: serviceAddress,
1081
- kind: "serviceInput",
1082
- path: ""
1083
- }
1084
- })), ...params.map(({ serviceAddress, slot, binding }) => ({
1085
- binding,
1086
- site: {
1087
- address: serviceAddress,
1088
- kind: "param",
1089
- path: slot
1090
- }
1091
- }))];
1092
- for (const { binding, site } of kept) for (const pointer of pointersIn(binding)) {
1093
- if (!isParamSource(pointer)) continue;
1094
- const origin = sourceOriginOf(pointer);
1095
- if (origin?.sourceKind === "param" && origin.configurationKey !== void 0) configurationText(origin.configurationKey, origin.label, site);
1096
- }
1097
- }
1117
+ const appConfigurationReadOf = (secretSources) => {
1098
1118
  for (const use of secretSources) {
1099
1119
  const origin = sourceOriginOf(use.source);
1100
1120
  if (origin?.sourceKind !== "secret") continue;
1101
1121
  const key = origin.secretsKey;
1102
- const read = key === void 0 ? void 0 : keysRead.get(key);
1103
- if (key !== void 0 && read !== void 0) throw new LoadError(`${read.label} reads "${key}" from the app configuration, and ${origin.label} names "${key}" as a secret. A name is a plain value or a secret, not both: Composer hands the deploy's second process every plain value it reads, in a file, and never writes a secret to a file. Give the plain value and the secret different names.`);
1104
1122
  const field = [...rootFields.values()].find((candidate) => candidate.path[0] === key);
1105
1123
  if (key !== void 0 && field !== void 0) throw new LoadError(`${inputFieldLabel({
1106
1124
  kind: "input",
1107
1125
  module: rootModuleAddress(),
1108
1126
  path: field.path
1109
- })} of root module "${rootModuleAddress()}" reads "${key}" from the app configuration, and ${origin.label} names "${key}" as a secret. A name is a plain value or a secret, not both: Composer hands the deploy's second process every root input field the root's body passes on, in a file, and never writes a secret to a file. Read the secret with ${origin.label} only, or give the plain value a different name.`);
1127
+ })} of root module "${rootModuleAddress()}" reads "${key}" from the app configuration, and ${origin.label} names "${key}" as a secret. A name is a plain value or a secret, not both: a root input field is a plain value, which \`prisma deploy\` sends to the platform as plain configuration, \`prisma dev\` gives to the local services as plain configuration, and \`destroy\` writes to a file. Read the secret with ${origin.label} only, or give the plain value a different name.`);
1110
1128
  }
1111
1129
  for (const field of rootFields.values()) {
1112
1130
  const kind = "value" in field ? jsonInexactKind(field.value) : void 0;
@@ -1114,27 +1132,23 @@ function resolveValues(input) {
1114
1132
  kind: "input",
1115
1133
  module: rootModuleAddress(),
1116
1134
  path: field.path
1117
- })} of root module "${rootModuleAddress()}" holds ${kind}, which JSON cannot hold exactly. The deploy hands the root's input to its second process in a JSON file, so a field the root's body passes on must hold text, a finite number, a boolean, null, or arrays and plain objects of these.`);
1135
+ })} of root module "${rootModuleAddress()}" holds ${kind}, which JSON cannot hold exactly. \`destroy\` hands the root's input to its second process in a JSON file, so a field the root's body passes on must hold text, a finite number, a boolean, null, or arrays and plain objects of these.`);
1118
1136
  }
1119
- const configurationKeyText = {};
1120
- for (const [key, { text }] of keysRead) if (text !== void 0) configurationKeyText[key] = text;
1121
- return {
1122
- rootInput: [...rootFields.values()],
1123
- configurationKeyText
1124
- };
1137
+ return { rootInput: [...rootFields.values()] };
1125
1138
  };
1126
1139
  for (const entry of input.moduleInputs) validatedInputOf(entry);
1127
1140
  for (const { value, site } of found) resolveOne(value, site);
1128
1141
  const authoredProps = new Map([...input.resources].map(([address, resource]) => [address, resource.props]));
1129
1142
  if (found.length === 0) {
1130
1143
  for (const [address, props] of authoredProps) refusePointersInProps(address, props);
1131
- const secretSources = secretSourcesReceivedBy(input.inputBindings, input.params);
1144
+ refuseSourcesInParams(input.params);
1145
+ const secretSources = secretSourcesReceivedBy(input.inputBindings);
1132
1146
  return {
1133
1147
  inputBindings: input.inputBindings,
1134
1148
  params: input.params,
1135
1149
  resourceProps: authoredProps,
1136
1150
  secretSources,
1137
- appConfigurationRead: appConfigurationReadOf(input.inputBindings, input.params, secretSources)
1151
+ appConfigurationRead: appConfigurationReadOf(secretSources)
1138
1152
  };
1139
1153
  }
1140
1154
  const inProgress = /* @__PURE__ */ new WeakSet();
@@ -1160,15 +1174,28 @@ function resolveValues(input) {
1160
1174
  binding
1161
1175
  }];
1162
1176
  });
1163
- const secretSources = secretSourcesReceivedBy(inputBindings, params);
1177
+ refuseSourcesInParams(params);
1178
+ const secretSources = secretSourcesReceivedBy(inputBindings);
1164
1179
  return {
1165
1180
  resourceProps,
1166
1181
  inputBindings,
1167
1182
  params,
1168
1183
  secretSources,
1169
- appConfigurationRead: appConfigurationReadOf(inputBindings, params, secretSources)
1184
+ appConfigurationRead: appConfigurationReadOf(secretSources)
1170
1185
  };
1171
1186
  }
1187
+ function valueReadsOf(inputBindings) {
1188
+ const reads = [];
1189
+ for (const { serviceAddress, binding } of inputBindings) for (const [path, source] of sourcesByPath(binding)) {
1190
+ const resource = sourceOriginOf(source)?.resource;
1191
+ if (resource !== void 0) reads.push({
1192
+ reader: serviceAddress,
1193
+ resource,
1194
+ path
1195
+ });
1196
+ }
1197
+ return reads;
1198
+ }
1172
1199
  /**
1173
1200
  * Brands a ref-port with the AUTHORED endpoint it stands for — which port of
1174
1201
  * which node the author wired, before any forwarding chain resolves. Read
@@ -1240,6 +1267,9 @@ function producerIdOf(ref) {
1240
1267
  * identity the branding copy creates, never on reading this back.
1241
1268
  */
1242
1269
  const MODULE_INPUT_KEY = Symbol("prisma:module-input-key");
1270
+ function describeNode(node) {
1271
+ return valueResourceOrigin(node)?.label ?? `${node.kind} "${node.name}"`;
1272
+ }
1243
1273
  /** Whether `ref` carries a callable `satisfies` that accepts `required` truthily. */
1244
1274
  function satisfiesRequired(ref, required) {
1245
1275
  return typeof ref === "object" && ref !== null && "satisfies" in ref && typeof ref.satisfies === "function" && ref.satisfies(required);
@@ -1309,9 +1339,9 @@ function validateServiceParamBinding(child, id, paramWiring, enclosingModuleName
1309
1339
  * children carry it as their `parent`, and this module's own boundary ports
1310
1340
  * (and the authored edges touching them) are recorded against it.
1311
1341
  */
1312
- function flatten(moduleNode, selfId, wiring, nodes, edges, pending, inputBindings, paramBindings, moduleInputs, byId, ports, authoredEdges, loading) {
1342
+ function flatten(moduleNode, selfId, wiring, nodes, edges, pending, inputBindings, paramBindings, moduleInputs, byId, valueResources, ports, authoredEdges, loading) {
1313
1343
  ports.push(...boundaryPortsOf(selfId, moduleNode));
1314
- const localIds = /* @__PURE__ */ new Set();
1344
+ const localNodes = /* @__PURE__ */ new Map();
1315
1345
  const used = /* @__PURE__ */ new Set();
1316
1346
  const ctxInputs = {};
1317
1347
  for (const key of Object.keys(moduleNode.deps)) {
@@ -1361,13 +1391,20 @@ function flatten(moduleNode, selfId, wiring, nodes, edges, pending, inputBinding
1361
1391
  if (isValue(id)) throw new LoadError(`provision() received a value as its id (module "${moduleNode.name}"). A value can configure a node, never decide its address: the graph is the same whatever inputs Composer is given (ADR-0062).`);
1362
1392
  if (typeof id !== "string" || id.length === 0) throw new LoadError(`provision() requires a non-empty id (module "${moduleNode.name}").`);
1363
1393
  if (!isConfigKeySegment(id)) throw new LoadError(`provision() id "${id}" (module "${moduleNode.name}") must contain only ASCII letters and digits ([A-Za-z0-9]) — the id becomes an address segment, and addresses derive deterministic config keys (segments uppercased and joined with "_"). "${id}" would put "${id.toUpperCase()}" inside the derived key. ("_" collides with the key separator and "." with the address separator.)`);
1364
- if (localIds.has(id)) throw new LoadError(`Duplicate provision id "${id}" in module "${moduleNode.name}".`);
1394
+ const fullAddress = `${selfId}.${id}`;
1365
1395
  const untrusted = child;
1366
1396
  if (!isNode(untrusted) || untrusted.kind !== "service" && untrusted.kind !== "resource" && untrusted.kind !== "module") throw new LoadError(`provision("${id}") expects a branded service, resource, or module node (construct it with the service()/resource()/module() factories or a pack's own).`);
1367
1397
  if (untrusted.kind === "module" && typeof untrusted.isRoot === "function" && untrusted.isRoot()) throw new LoadError(`Module "${selfId}" provisions the app root "${untrusted.name}". An app root is the deploy's entry and cannot be provisioned. Build the module with module() instead.`);
1368
- localIds.add(id);
1369
- const fullAddress = `${selfId}.${id}`;
1398
+ const holder = localNodes.get(id);
1399
+ if (holder !== void 0) throw new LoadError(`Duplicate provision id "${id}" in module "${selfId}": "${fullAddress}" already holds ${describeNode(holder)}, and ${describeNode(child)} takes the same id. Give one of them a different id with provision(node, { id: '…' }).`);
1400
+ localNodes.set(id, child);
1370
1401
  if (child.kind === "resource") {
1402
+ const valueOrigin = valueResourceOrigin(child);
1403
+ if (valueOrigin !== void 0) {
1404
+ if (typeof moduleNode.isRoot !== "function" || !moduleNode.isRoot()) throw new LoadError(`Module "${selfId}" provisions "${id}", a resource that is a value. Only the app root, built with appRoot(), can provision one. Provision it in the root and pass its value down through this module's input.`);
1405
+ const also = child.provides !== void 0 ? "provides a contract" : Object.keys(slotsOf(child)).length > 0 ? "declares dependency slots" : void 0;
1406
+ if (also !== void 0) throw new LoadError(`Resource "${fullAddress}" is a value and also ${also}. A resource that is a value provides no contract and has no dependencies.`);
1407
+ }
1371
1408
  if (provisionWiring !== void 0) throw new LoadError(`provision("${id}") received deps for a resource — a resource's slots are wired when it is constructed, not at provision().`);
1372
1409
  if (provisionSecrets !== void 0) throw new LoadError(`provision("${id}") received secrets for a resource — a resource has no secret slots to satisfy.`);
1373
1410
  if (provisionInput !== void 0) throw new LoadError(`provision("${id}") received an input binding for a resource — a resource declares no input schema.`);
@@ -1400,6 +1437,11 @@ function flatten(moduleNode, selfId, wiring, nodes, edges, pending, inputBinding
1400
1437
  targetKind: "resource",
1401
1438
  enclosingModuleName: moduleNode.name
1402
1439
  });
1440
+ if (valueOrigin !== void 0) {
1441
+ const value = provisionedValue(valueOrigin, fullAddress);
1442
+ valueResources.set(fullAddress, value);
1443
+ return value;
1444
+ }
1403
1445
  return refForResource(fullAddress, child);
1404
1446
  }
1405
1447
  for (const [input, ref] of Object.entries(provisionWiring ?? {})) if (isValue(ref)) throw new LoadError(`The deps for "${fullAddress}.${input}" are bound to a value. A value can configure a node, never decide its edges: the graph is the same whatever inputs Composer is given (ADR-0062).`);
@@ -1407,7 +1449,7 @@ function flatten(moduleNode, selfId, wiring, nodes, edges, pending, inputBinding
1407
1449
  markUsed(Object.values(localWiring));
1408
1450
  const localParams = { ...provisionParams ?? {} };
1409
1451
  if (child.kind === "service") {
1410
- if (provisionSecrets !== void 0) throw new LoadError(`provision("${id}") received secrets for a service — a service takes its secrets as envSecret(...) leaves of its \`input\` binding (ADR-0042), not a secrets map.`);
1452
+ if (provisionSecrets !== void 0) throw new LoadError(`provision("${id}") received secrets for a service — a service takes its secrets as values bound to secretString() fields of its \`input\` binding, not a secrets map.`);
1411
1453
  if (child.inputSchema !== void 0 && provisionInput === void 0) throw new LoadError(`Input of provisioned service "${id}" is not bound (module "${moduleNode.name}") — the service declares an input schema; bind it with \`input: { … }\` on its provision() call.`);
1412
1454
  if (child.inputSchema === void 0 && provisionInput !== void 0) throw new LoadError(`provision("${id}") received an input binding, but the service declares no input schema (module "${moduleNode.name}").`);
1413
1455
  if (provisionInput !== void 0) inputBindings.push({
@@ -1459,7 +1501,7 @@ function flatten(moduleNode, selfId, wiring, nodes, edges, pending, inputBinding
1459
1501
  targetKind: "module",
1460
1502
  enclosingModuleName: moduleNode.name
1461
1503
  });
1462
- const childOutputs = flatten(child, fullAddress, localWiring, nodes, edges, pending, inputBindings, paramBindings, moduleInputs, byId, ports, authoredEdges, loading);
1504
+ const childOutputs = flatten(child, fullAddress, localWiring, nodes, edges, pending, inputBindings, paramBindings, moduleInputs, byId, valueResources, ports, authoredEdges, loading);
1463
1505
  nodes.push({
1464
1506
  id: fullAddress,
1465
1507
  parent: selfId,
@@ -1534,11 +1576,12 @@ function loadModule(root, opts) {
1534
1576
  const inputBindings = [];
1535
1577
  const paramBindings = [];
1536
1578
  const byId = /* @__PURE__ */ new Map();
1579
+ const valueResources = /* @__PURE__ */ new Map();
1537
1580
  const ports = [];
1538
1581
  const authoredEdges = [];
1539
1582
  const loading = { sealed: false };
1540
1583
  try {
1541
- flatten(root, rootId, {}, nodes, edges, pending, inputBindings, paramBindings, moduleInputs, byId, ports, authoredEdges, loading);
1584
+ flatten(root, rootId, {}, nodes, edges, pending, inputBindings, paramBindings, moduleInputs, byId, valueResources, ports, authoredEdges, loading);
1542
1585
  for (const entry of pending) validateWiring(entry, byId);
1543
1586
  assertDependencyDag(edges);
1544
1587
  } finally {
@@ -1548,12 +1591,11 @@ function loadModule(root, opts) {
1548
1591
  for (const [address, node] of byId) if (node.kind === "resource") resources.set(address, node);
1549
1592
  const resolved = resolveValues({
1550
1593
  environment: opts?.environment,
1551
- configuration: opts?.configuration,
1552
- appConfigurationRead: opts?.appConfigurationRead,
1553
1594
  inputBindings,
1554
1595
  params: paramBindings,
1555
1596
  moduleInputs,
1556
- resources
1597
+ resources,
1598
+ valueResources
1557
1599
  });
1558
1600
  const resolvedNodes = nodes.map((entry) => {
1559
1601
  const props = resolved.resourceProps.get(entry.id);
@@ -1577,6 +1619,7 @@ function loadModule(root, opts) {
1577
1619
  inputBindings: resolved.inputBindings,
1578
1620
  params: resolved.params,
1579
1621
  secretSources: resolved.secretSources,
1622
+ valueReads: valueReadsOf(resolved.inputBindings),
1580
1623
  appConfigurationRead: resolved.appConfigurationRead
1581
1624
  };
1582
1625
  }
@@ -1664,6 +1707,6 @@ function nodeAddresses(graph) {
1664
1707
  return graph.nodes.map(({ id }) => id).sort();
1665
1708
  }
1666
1709
  //#endregion
1667
- export { service as C, secretsKeys as S, paramSource as _, ResourceNodeBase as a, resource as b, dependency as c, isParamSource as d, isProvisionNeed as f, nodeAddresses as g, module as h, RESOURCE_OUT_PORT as i, freezeNode as l, isValue as m, Load as n, appRoot as o, isSecretSource as p, LoadError as r, assertAppName as s, GraphCheckError as t, isNode as u, provisionNeed as v, slotsOf as w, secretSource as x, resolve as y };
1710
+ export { resolve as C, service as D, secretsKeys as E, slotsOf as O, provisionNeed as S, secretSource as T, isValueResource as _, ROOT_INPUT_UNREAD_ERROR as a, originOf as b, assertAppName as c, isNode as d, isParamSource as f, isValue as g, isSecretSource as h, RESOURCE_OUT_PORT as i, valueResource as k, dependency as l, isProvisionNeed as m, Load as n, ResourceNodeBase as o, isPlainObject as p, LoadError as r, appRoot as s, GraphCheckError as t, freezeNode as u, module as v, resource as w, paramSource as x, nodeAddresses as y };
1668
1711
 
1669
- //# sourceMappingURL=graph-BzPLUUsB-D7EnB1F5.mjs.map
1712
+ //# sourceMappingURL=graph-D2WMLL43-CeiC5wdy.mjs.map