@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
@@ -0,0 +1,31 @@
1
+ import { A as LocalTargetDescriptor, J as PrismaAppConfig, p as ContainerInstance, t as AlchemyStateLayer, z as NamedSecrets } from "./app-config-DriAu5RU-C8hYpR38.mjs";
2
+ import * as Layer from "effect/Layer";
3
+ //#region ../../0-framework/1-core/core/dist/local-target.d.mts
4
+ //#region src/control/local-target.d.ts
5
+ /**
6
+ * Resolves every non-build-only configured extension's lazy `localTarget`
7
+ * thunk, once (ADR-0041's lazy local-target reference — operator directive:
8
+ * the production control entry carries only the thunk, never the
9
+ * descriptor, so resolving it is this module's job, not something a deploy
10
+ * path ever does). A build-only extension (`isBuildOnlyExtension`) owns no
11
+ * resources or services and is skipped entirely — never even checked for a
12
+ * `localTarget` thunk. Every other configured extension must be
13
+ * local-target-capable, or the dev command cannot bring the app up at all,
14
+ * so a missing thunk throws naming the extension. `prisma dev` calls this
15
+ * once on its main thread for the session's hooks, and once in each converge
16
+ * worker thread for `localTargetProviders`.
17
+ */
18
+ declare function resolveLocalTargets(config: PrismaAppConfig): Promise<ReadonlyMap<string, LocalTargetDescriptor>>;
19
+ /**
20
+ * All configured extensions' local-target providers merged, config array
21
+ * order (ADR-0041), from the ALREADY-RESOLVED descriptor map
22
+ * (`resolveLocalTargets`'s product — this function itself never touches a
23
+ * `localTarget` thunk). `prisma dev`'s converge worker thread is this
24
+ * aggregator's one caller, passing the result as `LowerOptions.providers`.
25
+ */
26
+ declare function localTargetProviders(resolved: ReadonlyMap<string, LocalTargetDescriptor>, containers: ReadonlyMap<string, ContainerInstance>, devDir: string, plainVariableText: Readonly<Record<string, string>>, namedSecrets: NamedSecrets): Layer.Layer<never>;
27
+ /** The state store `prisma dev` converges against: Alchemy's file store in the app's working directory. */
28
+ declare function devState(): AlchemyStateLayer;
29
+ //#endregion
30
+ export { localTargetProviders as n, resolveLocalTargets as r, devState as t };
31
+ //# sourceMappingURL=local-target-7KRsLMDO.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-target-7KRsLMDO.d.mts","names":[],"sources":["../../../0-framework/1-core/core/dist/local-target.d.mts"],"mappings":";;;;;;;;;;;;;;;;;iBAgBiB,oBAAoB,QAAQ,kBAAkB,QAAQ,oBAAoB;;;;;;;;iBAQ1E,qBAAqB,UAAU,oBAAoB,wBAAwB,YAAY,oBAAoB,oBAAoB,gBAAgB,mBAAmB,SAAS,yBAAyB,cAAc,eAAe,MAAM;;iBAEvO,YAAY"}
@@ -1,4 +1,4 @@
1
- import { t as CliStructuredError } from "./errors-0e8IVwzi.mjs";
1
+ import { t as CliStructuredError } from "./errors-DI3TBXE-.mjs";
2
2
  import { a as isBuildOnlyExtension } from "./app-config-CErnR6NK-D9NgSBH4.mjs";
3
3
  import * as Layer from "effect/Layer";
4
4
  import { localState } from "alchemy/State/LocalState";
@@ -16,9 +16,9 @@ function noLocalTargetSupportError(id) {
16
16
  * resources or services and is skipped entirely — never even checked for a
17
17
  * `localTarget` thunk. Every other configured extension must be
18
18
  * local-target-capable, or the dev command cannot bring the app up at all,
19
- * so a missing thunk throws naming the extension. The generated dev stack
20
- * module calls this once and threads the resolved map through every
21
- * subsequent hook, including `localTargetProviders`.
19
+ * so a missing thunk throws naming the extension. `prisma dev` calls this
20
+ * once on its main thread for the session's hooks, and once in each converge
21
+ * worker thread for `localTargetProviders`.
22
22
  */
23
23
  async function resolveLocalTargets(config) {
24
24
  const entries = await Promise.all(config.extensions.flatMap((extension) => {
@@ -32,14 +32,14 @@ async function resolveLocalTargets(config) {
32
32
  * All configured extensions' local-target providers merged, config array
33
33
  * order (ADR-0041), from the ALREADY-RESOLVED descriptor map
34
34
  * (`resolveLocalTargets`'s product — this function itself never touches a
35
- * `localTarget` thunk). The generated dev stack module is this
35
+ * `localTarget` thunk). `prisma dev`'s converge worker thread is this
36
36
  * aggregator's one caller, passing the result as `LowerOptions.providers`.
37
37
  */
38
- function localTargetProviders(resolved, containers, devDir, configurationKeyText, namedSecrets) {
38
+ function localTargetProviders(resolved, containers, devDir, plainVariableText, namedSecrets) {
39
39
  const [first, ...rest] = [...resolved.entries()].map(([id, descriptor]) => descriptor.providers({
40
40
  container: containers.get(id),
41
41
  devDir,
42
- configurationKeyText,
42
+ plainVariableText,
43
43
  namedSecrets
44
44
  }));
45
45
  return first === void 0 ? Layer.empty : Layer.mergeAll(first, ...rest);
@@ -51,4 +51,4 @@ function devState() {
51
51
  //#endregion
52
52
  export { localTargetProviders as n, resolveLocalTargets as r, devState as t };
53
53
 
54
- //# sourceMappingURL=local-target-Dd8FJEb5.mjs.map
54
+ //# sourceMappingURL=local-target-DhU1vaxd.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"local-target-Dd8FJEb5.mjs","names":[],"sources":["../../../0-framework/1-core/core/dist/local-target.mjs"],"sourcesContent":["import { a as isBuildOnlyExtension, i as devEnvironmentDir, n as DEV_ENVIRONMENT_NAME_FILE, t as DEV_DIR } from \"./app-config-CErnR6NK.mjs\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport * as Layer from \"effect/Layer\";\nimport { localState } from \"alchemy/State/LocalState\";\n//#region src/control/local-target.ts\n/** The local-target stack's own provider aggregation (ADR-0041; naming, operator 2026-07-23 — the seam is `localTarget`, \"dev\" names the user-facing feature only) — the local-target counterpart of `deploy.ts`'s `mergedProviders`, kept in its own module so `lower()` learns nothing about it (deploy.ts's REVISED — operator review of #162). */\nfunction noLocalTargetSupportError(id) {\n\treturn new CliStructuredError(\"DEV.TARGET_UNSUPPORTED\", `extension \"${id}\" has no dev support — it declares no \\`localTarget\\` descriptor (ADR-0041).`);\n}\n/**\n* Resolves every non-build-only configured extension's lazy `localTarget`\n* thunk, once (ADR-0041's lazy local-target reference — operator directive:\n* the production control entry carries only the thunk, never the\n* descriptor, so resolving it is this module's job, not something a deploy\n* path ever does). A build-only extension (`isBuildOnlyExtension`) owns no\n* resources or services and is skipped entirely — never even checked for a\n* `localTarget` thunk. Every other configured extension must be\n* local-target-capable, or the dev command cannot bring the app up at all,\n* so a missing thunk throws naming the extension. The generated dev stack\n* module calls this once and threads the resolved map through every\n* subsequent hook, including `localTargetProviders`.\n*/\nasync function resolveLocalTargets(config) {\n\tconst entries = await Promise.all(config.extensions.flatMap((extension) => {\n\t\tif (isBuildOnlyExtension(extension)) return [];\n\t\tif (extension.localTarget === void 0) throw noLocalTargetSupportError(extension.id);\n\t\treturn [extension.localTarget().then((descriptor) => [extension.id, descriptor])];\n\t}));\n\treturn new Map(entries);\n}\n/**\n* All configured extensions' local-target providers merged, config array\n* order (ADR-0041), from the ALREADY-RESOLVED descriptor map\n* (`resolveLocalTargets`'s product — this function itself never touches a\n* `localTarget` thunk). The generated dev stack module is this\n* aggregator's one caller, passing the result as `LowerOptions.providers`.\n*/\nfunction localTargetProviders(resolved, containers, devDir, configurationKeyText, namedSecrets) {\n\tconst [first, ...rest] = [...resolved.entries()].map(([id, descriptor]) => descriptor.providers({\n\t\tcontainer: containers.get(id),\n\t\tdevDir,\n\t\tconfigurationKeyText,\n\t\tnamedSecrets\n\t}));\n\treturn first === void 0 ? Layer.empty : Layer.mergeAll(first, ...rest);\n}\n/** The state store `prisma dev` converges against: Alchemy's file store in the app's working directory. */\nfunction devState() {\n\treturn localState();\n}\n//#endregion\nexport { DEV_DIR, DEV_ENVIRONMENT_NAME_FILE, devEnvironmentDir, devState, localTargetProviders, resolveLocalTargets };\n\n//# sourceMappingURL=local-target.mjs.map"],"mappings":";;;;;;AAMA,SAAS,0BAA0B,IAAI;CACtC,OAAO,IAAI,mBAAmB,0BAA0B,cAAc,GAAG,6EAA6E;AACvJ;;;;;;;;;;;;;;AAcA,eAAe,oBAAoB,QAAQ;CAC1C,MAAM,UAAU,MAAM,QAAQ,IAAI,OAAO,WAAW,SAAS,cAAc;EAC1E,IAAI,qBAAqB,SAAS,GAAG,OAAO,CAAC;EAC7C,IAAI,UAAU,gBAAgB,KAAK,GAAG,MAAM,0BAA0B,UAAU,EAAE;EAClF,OAAO,CAAC,UAAU,YAAY,CAAC,CAAC,MAAM,eAAe,CAAC,UAAU,IAAI,UAAU,CAAC,CAAC;CACjF,CAAC,CAAC;CACF,OAAO,IAAI,IAAI,OAAO;AACvB;;;;;;;;AAQA,SAAS,qBAAqB,UAAU,YAAY,QAAQ,sBAAsB,cAAc;CAC/F,MAAM,CAAC,OAAO,GAAG,QAAQ,CAAC,GAAG,SAAS,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,gBAAgB,WAAW,UAAU;EAC/F,WAAW,WAAW,IAAI,EAAE;EAC5B;EACA;EACA;CACD,CAAC,CAAC;CACF,OAAO,UAAU,KAAK,IAAI,MAAM,QAAQ,MAAM,SAAS,OAAO,GAAG,IAAI;AACtE;;AAEA,SAAS,WAAW;CACnB,OAAO,WAAW;AACnB"}
1
+ {"version":3,"file":"local-target-DhU1vaxd.mjs","names":[],"sources":["../../../0-framework/1-core/core/dist/local-target.mjs"],"sourcesContent":["import { a as isBuildOnlyExtension, i as devEnvironmentDir, n as DEV_ENVIRONMENT_NAME_FILE, t as DEV_DIR } from \"./app-config-CErnR6NK.mjs\";\nimport { CliStructuredError } from \"@internal/foundation/errors\";\nimport * as Layer from \"effect/Layer\";\nimport { localState } from \"alchemy/State/LocalState\";\n//#region src/control/local-target.ts\n/** The local-target stack's own provider aggregation (ADR-0041; naming, operator 2026-07-23 — the seam is `localTarget`, \"dev\" names the user-facing feature only) — the local-target counterpart of `deploy.ts`'s `mergedProviders`, kept in its own module so `lower()` learns nothing about it (deploy.ts's REVISED — operator review of #162). */\nfunction noLocalTargetSupportError(id) {\n\treturn new CliStructuredError(\"DEV.TARGET_UNSUPPORTED\", `extension \"${id}\" has no dev support — it declares no \\`localTarget\\` descriptor (ADR-0041).`);\n}\n/**\n* Resolves every non-build-only configured extension's lazy `localTarget`\n* thunk, once (ADR-0041's lazy local-target reference — operator directive:\n* the production control entry carries only the thunk, never the\n* descriptor, so resolving it is this module's job, not something a deploy\n* path ever does). A build-only extension (`isBuildOnlyExtension`) owns no\n* resources or services and is skipped entirely — never even checked for a\n* `localTarget` thunk. Every other configured extension must be\n* local-target-capable, or the dev command cannot bring the app up at all,\n* so a missing thunk throws naming the extension. `prisma dev` calls this\n* once on its main thread for the session's hooks, and once in each converge\n* worker thread for `localTargetProviders`.\n*/\nasync function resolveLocalTargets(config) {\n\tconst entries = await Promise.all(config.extensions.flatMap((extension) => {\n\t\tif (isBuildOnlyExtension(extension)) return [];\n\t\tif (extension.localTarget === void 0) throw noLocalTargetSupportError(extension.id);\n\t\treturn [extension.localTarget().then((descriptor) => [extension.id, descriptor])];\n\t}));\n\treturn new Map(entries);\n}\n/**\n* All configured extensions' local-target providers merged, config array\n* order (ADR-0041), from the ALREADY-RESOLVED descriptor map\n* (`resolveLocalTargets`'s product — this function itself never touches a\n* `localTarget` thunk). `prisma dev`'s converge worker thread is this\n* aggregator's one caller, passing the result as `LowerOptions.providers`.\n*/\nfunction localTargetProviders(resolved, containers, devDir, plainVariableText, namedSecrets) {\n\tconst [first, ...rest] = [...resolved.entries()].map(([id, descriptor]) => descriptor.providers({\n\t\tcontainer: containers.get(id),\n\t\tdevDir,\n\t\tplainVariableText,\n\t\tnamedSecrets\n\t}));\n\treturn first === void 0 ? Layer.empty : Layer.mergeAll(first, ...rest);\n}\n/** The state store `prisma dev` converges against: Alchemy's file store in the app's working directory. */\nfunction devState() {\n\treturn localState();\n}\n//#endregion\nexport { DEV_DIR, DEV_ENVIRONMENT_NAME_FILE, devEnvironmentDir, devState, localTargetProviders, resolveLocalTargets };\n\n//# sourceMappingURL=local-target.mjs.map"],"mappings":";;;;;;AAMA,SAAS,0BAA0B,IAAI;CACtC,OAAO,IAAI,mBAAmB,0BAA0B,cAAc,GAAG,6EAA6E;AACvJ;;;;;;;;;;;;;;AAcA,eAAe,oBAAoB,QAAQ;CAC1C,MAAM,UAAU,MAAM,QAAQ,IAAI,OAAO,WAAW,SAAS,cAAc;EAC1E,IAAI,qBAAqB,SAAS,GAAG,OAAO,CAAC;EAC7C,IAAI,UAAU,gBAAgB,KAAK,GAAG,MAAM,0BAA0B,UAAU,EAAE;EAClF,OAAO,CAAC,UAAU,YAAY,CAAC,CAAC,MAAM,eAAe,CAAC,UAAU,IAAI,UAAU,CAAC,CAAC;CACjF,CAAC,CAAC;CACF,OAAO,IAAI,IAAI,OAAO;AACvB;;;;;;;;AAQA,SAAS,qBAAqB,UAAU,YAAY,QAAQ,mBAAmB,cAAc;CAC5F,MAAM,CAAC,OAAO,GAAG,QAAQ,CAAC,GAAG,SAAS,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,gBAAgB,WAAW,UAAU;EAC/F,WAAW,WAAW,IAAI,EAAE;EAC5B;EACA;EACA;CACD,CAAC,CAAC;CACF,OAAO,UAAU,KAAK,IAAI,MAAM,QAAQ,MAAM,SAAS,OAAO,GAAG,IAAI;AACtE;;AAEA,SAAS,WAAW;CACnB,OAAO,WAAW;AACnB"}
@@ -1,31 +1,3 @@
1
- import { A as LocalTargetProvidersInput, C as LocalNodeStopped, D as LocalTargetCurrentInput, E as LocalTargetCurrentApp, L as NamedSecrets, O as LocalTargetDescriptor, S as LocalNodeLocation, T as LocalTargetAttachment, h as DEV_ENVIRONMENT_NAME_FILE, k as LocalTargetEmulatorsInput, m as DEV_DIR, p as ContainerInstance, pt as devEnvironmentDir, q as PrismaAppConfig, t as AlchemyStateLayer, w as LocalTargetAttachInput, x as LocalNodeCondition } from "./app-config-UeKFBma7-CohaMmWp.mjs";
2
- import * as Layer from "effect/Layer";
3
- //#region ../../0-framework/1-core/core/dist/local-target.d.mts
4
- //#region src/control/local-target.d.ts
5
- /**
6
- * Resolves every non-build-only configured extension's lazy `localTarget`
7
- * thunk, once (ADR-0041's lazy local-target reference — operator directive:
8
- * the production control entry carries only the thunk, never the
9
- * descriptor, so resolving it is this module's job, not something a deploy
10
- * path ever does). A build-only extension (`isBuildOnlyExtension`) owns no
11
- * resources or services and is skipped entirely — never even checked for a
12
- * `localTarget` thunk. Every other configured extension must be
13
- * local-target-capable, or the dev command cannot bring the app up at all,
14
- * so a missing thunk throws naming the extension. The generated dev stack
15
- * module calls this once and threads the resolved map through every
16
- * subsequent hook, including `localTargetProviders`.
17
- */
18
- declare function resolveLocalTargets(config: PrismaAppConfig): Promise<ReadonlyMap<string, LocalTargetDescriptor>>;
19
- /**
20
- * All configured extensions' local-target providers merged, config array
21
- * order (ADR-0041), from the ALREADY-RESOLVED descriptor map
22
- * (`resolveLocalTargets`'s product — this function itself never touches a
23
- * `localTarget` thunk). The generated dev stack module is this
24
- * aggregator's one caller, passing the result as `LowerOptions.providers`.
25
- */
26
- declare function localTargetProviders(resolved: ReadonlyMap<string, LocalTargetDescriptor>, containers: ReadonlyMap<string, ContainerInstance>, devDir: string, configurationKeyText: Readonly<Record<string, string>>, namedSecrets: NamedSecrets): Layer.Layer<never>;
27
- /** The state store `prisma dev` converges against: Alchemy's file store in the app's working directory. */
28
- declare function devState(): AlchemyStateLayer;
29
- //#endregion
30
- export { DEV_DIR, DEV_ENVIRONMENT_NAME_FILE, type LocalNodeCondition, type LocalNodeLocation, type LocalNodeStopped, type LocalTargetAttachInput, type LocalTargetAttachment, type LocalTargetCurrentApp, type LocalTargetCurrentInput, type LocalTargetDescriptor, type LocalTargetEmulatorsInput, type LocalTargetProvidersInput, devEnvironmentDir, devState, localTargetProviders, resolveLocalTargets };
31
- //# sourceMappingURL=local-target.d.mts.map
1
+ import { A as LocalTargetDescriptor, C as LocalNodeCondition, D as LocalTargetAttachment, E as LocalTargetAttachInput, M as LocalTargetProvidersInput, O as LocalTargetCurrentApp, T as LocalNodeStopped, h as DEV_ENVIRONMENT_NAME_FILE, ht as devEnvironmentDir, j as LocalTargetEmulatorsInput, k as LocalTargetCurrentInput, m as DEV_DIR, w as LocalNodeLocation, y as DevPreflightResult } from "./app-config-DriAu5RU-C8hYpR38.mjs";
2
+ import { n as localTargetProviders, r as resolveLocalTargets, t as devState } from "./local-target-7KRsLMDO.mjs";
3
+ export { DEV_DIR, DEV_ENVIRONMENT_NAME_FILE, type DevPreflightResult, type LocalNodeCondition, type LocalNodeLocation, type LocalNodeStopped, type LocalTargetAttachInput, type LocalTargetAttachment, type LocalTargetCurrentApp, type LocalTargetCurrentInput, type LocalTargetDescriptor, type LocalTargetEmulatorsInput, type LocalTargetProvidersInput, devEnvironmentDir, devState, localTargetProviders, resolveLocalTargets };
@@ -1,3 +1,3 @@
1
1
  import { i as devEnvironmentDir, n as DEV_ENVIRONMENT_NAME_FILE, t as DEV_DIR } from "./app-config-CErnR6NK-D9NgSBH4.mjs";
2
- import { n as localTargetProviders, r as resolveLocalTargets, t as devState } from "./local-target-Dd8FJEb5.mjs";
2
+ import { n as localTargetProviders, r as resolveLocalTargets, t as devState } from "./local-target-DhU1vaxd.mjs";
3
3
  export { DEV_DIR, DEV_ENVIRONMENT_NAME_FILE, devEnvironmentDir, devState, localTargetProviders, resolveLocalTargets };
@@ -1,5 +1,5 @@
1
- import { o as BuildAdapter } from "./graph-types-s5V7pGj2-BxSqB1ZH.mjs";
2
- import "./index-DyuwxTtd.mjs";
1
+ import { o as BuildAdapter } from "./graph-types-D4PrtP-l-B0uuchTl.mjs";
2
+ import "./index-D8chHe55.mjs";
3
3
  //#region ../../0-framework/2-authoring/nextjs/dist/nextjs-DLyeRR7M.d.mts
4
4
  //#region src/nextjs.d.ts
5
5
  /** The nextjs build adapter's descriptor — `appDir` is this kind's own extra path input (the Next app root), beyond the shared `{ extension, type, module, entry }`. `entry` is a placeholder; the assembler locates `server.js` in the standalone tree. */
@@ -13,4 +13,4 @@ declare const nextjsBuild: (opts: {
13
13
  }) => NextjsBuildAdapter;
14
14
  //#endregion
15
15
  export { nextjsBuild as n, NextjsBuildAdapter as t };
16
- //# sourceMappingURL=nextjs-DLyeRR7M-0lw_cBIr.d.mts.map
16
+ //# sourceMappingURL=nextjs-DLyeRR7M-CzUbvPaJ.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"nextjs-DLyeRR7M-0lw_cBIr.d.mts","names":[],"sources":["../../../0-framework/2-authoring/nextjs/dist/nextjs-DLyeRR7M.d.mts"],"mappings":";;;;;UAGU,2BAA2B;WAC1B;WACA;;cAEG,cAAc;EAC1B;EACA;MACI"}
1
+ {"version":3,"file":"nextjs-DLyeRR7M-CzUbvPaJ.d.mts","names":[],"sources":["../../../0-framework/2-authoring/nextjs/dist/nextjs-DLyeRR7M.d.mts"],"mappings":";;;;;UAGU,2BAA2B;WAC1B;WACA;;cAEG,cAAc;EAC1B;EACA;MACI"}
@@ -1,7 +1,7 @@
1
- import { b as ExtensionDescriptor, o as AssembleInput, s as Bundle, tt as ServeInput, y as DevServer } from "./app-config-UeKFBma7-CohaMmWp.mjs";
2
- import "./config-BeZEgGCg.mjs";
3
- import "./deploy-Xi4_JrtE.mjs";
4
- import { t as NextjsBuildAdapter } from "./nextjs-DLyeRR7M-0lw_cBIr.mjs";
1
+ import { b as DevServer, o as AssembleInput, rt as ServeInput, s as Bundle, x as ExtensionDescriptor } from "./app-config-DriAu5RU-C8hYpR38.mjs";
2
+ import "./config-Bpi8QVLB.mjs";
3
+ import "./deploy-DHgEJDpg.mjs";
4
+ import { t as NextjsBuildAdapter } from "./nextjs-DLyeRR7M-CzUbvPaJ.mjs";
5
5
  //#region ../../0-framework/2-authoring/nextjs/dist/control.d.mts
6
6
  //#region src/control/build.d.ts
7
7
  /** The built standalone server.js for a nextjs build — `appDir`'s standalone root plus the app subpath Next recorded. Single-sourced so `assemble()` (deploy) and the integration-test seam can't drift. */
package/dist/nextjs.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { n as nextjsBuild, t as NextjsBuildAdapter } from "./nextjs-DLyeRR7M-0lw_cBIr.mjs";
1
+ import { n as nextjsBuild, t as NextjsBuildAdapter } from "./nextjs-DLyeRR7M-CzUbvPaJ.mjs";
2
2
  export { type NextjsBuildAdapter, nextjsBuild as default };
@@ -1,6 +1,6 @@
1
- import { b as ExtensionDescriptor, o as AssembleInput, s as Bundle, tt as ServeInput, y as DevServer } from "./app-config-UeKFBma7-CohaMmWp.mjs";
2
- import "./config-BeZEgGCg.mjs";
3
- import "./deploy-Xi4_JrtE.mjs";
1
+ import { b as DevServer, o as AssembleInput, rt as ServeInput, s as Bundle, x as ExtensionDescriptor } from "./app-config-DriAu5RU-C8hYpR38.mjs";
2
+ import "./config-Bpi8QVLB.mjs";
3
+ import "./deploy-DHgEJDpg.mjs";
4
4
  //#region ../../0-framework/2-authoring/node/dist/control.d.mts
5
5
  //#region src/control/build.d.ts
6
6
  declare function assemble(input: AssembleInput): Promise<Bundle>;
package/dist/node.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { o as BuildAdapter } from "./graph-types-s5V7pGj2-BxSqB1ZH.mjs";
2
- import "./index-DyuwxTtd.mjs";
1
+ import { o as BuildAdapter } from "./graph-types-D4PrtP-l-B0uuchTl.mjs";
2
+ import "./index-D8chHe55.mjs";
3
3
  //#region ../../0-framework/2-authoring/node/dist/index.d.mts
4
4
  //#region src/node.d.ts
5
5
  /** The node build adapter's descriptor. `dir` is the directory form's own extra path input (the built tree to copy verbatim), beyond the shared `{ extension, type, module, entry }`; absent, `entry` is the whole built runnable. */
@@ -21,7 +21,7 @@ type SecretString = SecretBox<string>;
21
21
  */
22
22
  declare function isSecretString(value: unknown): value is SecretString;
23
23
  //#endregion
24
- //#region ../../0-framework/0-foundation/foundation/dist/pointer-CyQZZugO.d.mts
24
+ //#region ../../0-framework/0-foundation/foundation/dist/pointer-BX2KJ720.d.mts
25
25
  //#region src/pointer.d.ts
26
26
  declare const POINTER: unique symbol;
27
27
  declare const POINTER_TYPE: unique symbol;
@@ -31,12 +31,14 @@ interface PointerWithKind<T, K extends PointerKind> {
31
31
  readonly [POINTER]: K;
32
32
  readonly [POINTER_TYPE]?: T;
33
33
  }
34
- /** The real value at deploy of a value known only at boot: it names the platform variable that holds the text of a `T`. Its kind is `'secret'` when `T` is a `SecretString` and `'plain'` otherwise. */
34
+ /** The real value at deploy of a value known only at boot: it names the variable on the platform that holds the text of a `T`. Its kind is `'secret'` when `T` is a `SecretString` and `'plain'` otherwise. */
35
35
  type Pointer<T> = PointerWithKind<T, unknown extends T ? PointerKind : T extends SecretString ? 'secret' : 'plain'>;
36
- /** True for a plain pointer: a value known only at boot whose variable holds plain text. */
37
- declare function isPlainPointer(value: unknown): value is Pointer<string>;
36
+ /** A plain pointer of any data type: what `isPlainPointer()` narrows to. */
37
+ type PlainPointer = PointerWithKind<unknown, 'plain'>;
38
+ /** True for a plain pointer: a value known only at boot that is not a secret. */
39
+ declare function isPlainPointer(value: unknown): value is PlainPointer;
38
40
  /** True for a secret pointer: a value known only at boot whose variable holds a secret. */
39
41
  declare function isSecretPointer(value: unknown): value is Pointer<SecretString>;
40
42
  //#endregion
41
- export { SecretString as a, SecretBox as i, isPlainPointer as n, isSecretString as o, isSecretPointer as r, Pointer as t };
42
- //# sourceMappingURL=pointer-CyQZZugO-D7k3vibs.d.mts.map
43
+ export { SecretBox as a, isSecretPointer as i, Pointer as n, SecretString as o, isPlainPointer as r, isSecretString as s, PlainPointer as t };
44
+ //# sourceMappingURL=pointer-BX2KJ720-BxcfpaHP.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pointer-CyQZZugO-D7k3vibs.d.mts","names":[],"sources":["../../../0-framework/0-foundation/foundation/dist/secret-CHOw4LBU.d.mts","../../../0-framework/0-foundation/foundation/dist/pointer-CyQZZugO.d.mts"],"mappings":";;cACc;cACA,UAAU;;YAEZ;EACV,YAAY,OAAO;;EAEnB,UAAU;EACV;EACA;EACA;GACC,OAAO;;;KAGL,eAAe;;;;;;iBAMH,eAAe,iBAAiB,SAAS;;;;cClB5C;cACA;;KAET;UACK,gBAAgB,GAAG,UAAU;YAC3B,UAAU;YACV,gBAAgB;;;KAGvB,QAAQ,KAAK,gBAAgB,mBAAmB,IAAI,cAAc,UAAU;;iBAEhE,eAAe,iBAAiB,SAAS;;iBAEzC,gBAAgB,iBAAiB,SAAS,QAAQ"}
1
+ {"version":3,"file":"pointer-BX2KJ720-BxcfpaHP.d.mts","names":[],"sources":["../../../0-framework/0-foundation/foundation/dist/secret-CHOw4LBU.d.mts","../../../0-framework/0-foundation/foundation/dist/pointer-BX2KJ720.d.mts"],"mappings":";;cACc;cACA,UAAU;;YAEZ;EACV,YAAY,OAAO;;EAEnB,UAAU;EACV;EACA;EACA;GACC,OAAO;;;KAGL,eAAe;;;;;;iBAMH,eAAe,iBAAiB,SAAS;;;;cClB5C;cACA;;KAET;UACK,gBAAgB,GAAG,UAAU;YAC3B,UAAU;YACV,gBAAgB;;;KAGvB,QAAQ,KAAK,gBAAgB,mBAAmB,IAAI,cAAc,UAAU;;KAE5E,eAAe;;iBAEH,eAAe,iBAAiB,SAAS;;iBAEzC,gBAAgB,iBAAiB,SAAS,QAAQ"}
@@ -1,4 +1,4 @@
1
- //#region ../../0-framework/1-core/core/dist/preflight-transport-DmmtoFPH.mjs
1
+ //#region ../../0-framework/1-core/core/dist/preflight-transport-2d6iIchu.mjs
2
2
  /** '@prisma/composer-prisma-cloud' → 'PRISMA_COMPOSER_PRISMA_CLOUD': uppercased, every non-alphanumeric run replaced by one underscore. */
3
3
  function envVarSafeExtensionId(extensionId) {
4
4
  return extensionId.toUpperCase().replace(/[^A-Z0-9]+/g, "_").replace(/^_+|_+$/g, "");
@@ -44,8 +44,9 @@ function deserializeContainers(extensions, env) {
44
44
  return instances;
45
45
  }
46
46
  /**
47
- * Carries an extension's preflight payload from the CLI process to the
48
- * alchemy child (which re-imports the config from scratch) — one env var per
47
+ * Carries an extension's preflight payload from the CLI process to
48
+ * `destroy`'s alchemy child (which re-imports the config from scratch); `deploy`
49
+ * and `prisma dev` pass it to `lower()` as a value — one env var per
49
50
  * extension, same channel as containers (container-transport.ts), filled by
50
51
  * whichever preflight the run executed: the deploy preflight or the local
51
52
  * target's dev preflight. The framework never reads the contents, so an
@@ -64,7 +65,6 @@ function preflightEnv(payloads) {
64
65
  for (const [extensionId, payload] of payloads) {
65
66
  if (payload.length === 0) continue;
66
67
  const varName = preflightEnvVarName(extensionId);
67
- if (varName === "PRISMA_COMPOSER_PREFLIGHT_FINDINGS") throw new Error(`Extension id "${extensionId}" uses the environment variable "${varName}", which Composer reserves. Rename the extension.`);
68
68
  const owner = ownerByVarName.get(varName);
69
69
  if (owner !== void 0) throw new Error(`Extension ids "${owner}" and "${extensionId}" both use the environment variable "${varName}". Rename one of the extensions.`);
70
70
  ownerByVarName.set(varName, extensionId);
@@ -81,47 +81,10 @@ function readPreflightPayload(extensionId, env) {
81
81
  function platformVariableReaderText(reader) {
82
82
  switch (reader.kind) {
83
83
  case "field": return `read by service "${reader.service}", field "${reader.path === "" ? "(root)" : reader.path}"`;
84
- case "param": return `read by service "${reader.service}", per-key param "${reader.param}"`;
85
- case "unread": return `named by ${reader.nodeKind} "${reader.node}", read by no service`;
84
+ case "unread": return `named by resource "${reader.node}", read by no service`;
86
85
  }
87
86
  }
88
- const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
89
- const isStringArray = (value) => Array.isArray(value) && value.every((member) => typeof member === "string");
90
- function isPlatformVariableReader(value) {
91
- if (!isRecord(value)) return false;
92
- switch (value["kind"]) {
93
- case "field": return typeof value["service"] === "string" && typeof value["path"] === "string";
94
- case "param": return typeof value["service"] === "string" && typeof value["param"] === "string";
95
- case "unread": return typeof value["node"] === "string" && (value["nodeKind"] === "module" || value["nodeKind"] === "resource");
96
- default: return false;
97
- }
98
- }
99
- function isUnsetPlatformVariable(value) {
100
- return isRecord(value) && typeof value["name"] === "string" && Array.isArray(value["readers"]) && value["readers"].every(isPlatformVariableReader) && isStringArray(value["commands"]);
101
- }
102
- function isPreflightFindings(value) {
103
- return isRecord(value) && Array.isArray(value["unset"]) && value["unset"].every(isUnsetPlatformVariable);
104
- }
105
- /** The variable that carries every extension's deploy preflight findings from the first process to the second. No extension's preflight variable may take this name. */
106
- const PREFLIGHT_FINDINGS_ENV_VAR = "PRISMA_COMPOSER_PREFLIGHT_FINDINGS";
107
- /** The env entry the CLI sets on the second process. It is always set, and empty when nothing was found, so a stale value in the shell never reads as this run's. */
108
- function preflightFindingsEnv(findings) {
109
- return { [PREFLIGHT_FINDINGS_ENV_VAR]: findings.unset.length === 0 ? "" : JSON.stringify(findings) };
110
- }
111
- /** The second process's side: the findings the CLI carried, or none. Throws on a value that does not decode: that is a framework bug. */
112
- function readPreflightFindings(env) {
113
- const text = env[PREFLIGHT_FINDINGS_ENV_VAR];
114
- if (text === void 0 || text.length === 0) return { unset: [] };
115
- let parsed;
116
- try {
117
- parsed = JSON.parse(text);
118
- } catch {
119
- parsed = void 0;
120
- }
121
- if (!isPreflightFindings(parsed)) throw new Error(`The deploy check's findings could not be read in the second process (${PREFLIGHT_FINDINGS_ENV_VAR}). This is a Composer bug; deploying again will not fix it.`);
122
- return parsed;
123
- }
124
87
  //#endregion
125
- export { platformVariableReaderText as a, preflightFindingsEnv as c, deserializeContainers as i, readPreflightFindings as l, containerEnv as n, preflightEnv as o, containerEnvVarName as r, preflightEnvVarName as s, PREFLIGHT_FINDINGS_ENV_VAR as t, readPreflightPayload as u };
88
+ export { preflightEnv as a, platformVariableReaderText as i, containerEnvVarName as n, preflightEnvVarName as o, deserializeContainers as r, readPreflightPayload as s, containerEnv as t };
126
89
 
127
- //# sourceMappingURL=preflight-transport-DmmtoFPH-CnDWufmu.mjs.map
90
+ //# sourceMappingURL=preflight-transport-2d6iIchu-B-v7Di6I.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preflight-transport-2d6iIchu-B-v7Di6I.mjs","names":[],"sources":["../../../0-framework/1-core/core/dist/preflight-transport-2d6iIchu.mjs"],"sourcesContent":["//#region src/container-transport.ts\n/** '@prisma/composer-prisma-cloud' → 'PRISMA_COMPOSER_PRISMA_CLOUD': uppercased, every non-alphanumeric run replaced by one underscore. */\nfunction envVarSafeExtensionId(extensionId) {\n\treturn extensionId.toUpperCase().replace(/[^A-Z0-9]+/g, \"_\").replace(/^_+|_+$/g, \"\");\n}\n/** '@prisma/composer-prisma-cloud' → 'PRISMA_COMPOSER_CONTAINER_PRISMA_COMPOSER_PRISMA_CLOUD' */\nfunction containerEnvVarName(extensionId) {\n\treturn `PRISMA_COMPOSER_CONTAINER_${envVarSafeExtensionId(extensionId)}`;\n}\nfunction collisionError(a, b, varName) {\n\treturn /* @__PURE__ */ new Error(`Extension ids \"${a}\" and \"${b}\" both map to the container transport variable \"${varName}\" — rename one of the extensions.`);\n}\nfunction emptySerializeError(extensionId) {\n\treturn /* @__PURE__ */ new Error(`Extension \"${extensionId}\"'s container instance serialized to an empty string — ContainerInstance.serialize() must return a non-empty string.`);\n}\n/** The env entries the CLI sets on the alchemy process: `{ [containerEnvVarName(id)]: instance.serialize() }` for every resolved instance. */\nfunction containerEnv(instances) {\n\tconst env = {};\n\tconst ownerByVarName = /* @__PURE__ */ new Map();\n\tfor (const [extensionId, instance] of instances) {\n\t\tconst varName = containerEnvVarName(extensionId);\n\t\tconst owner = ownerByVarName.get(varName);\n\t\tif (owner !== void 0) throw collisionError(owner, extensionId, varName);\n\t\townerByVarName.set(varName, extensionId);\n\t\tconst serialized = instance.serialize();\n\t\tif (serialized.length === 0) throw emptySerializeError(extensionId);\n\t\tenv[varName] = serialized;\n\t}\n\treturn env;\n}\n/**\n* The alchemy-process side: for each extension with a container descriptor\n* whose var is present in `env`, call its deserialize. Absent var → no entry.\n*/\nfunction deserializeContainers(extensions, env) {\n\tconst instances = /* @__PURE__ */ new Map();\n\tfor (const extension of extensions) {\n\t\tconst descriptor = extension.container;\n\t\tif (descriptor === void 0) continue;\n\t\tconst serialized = env[containerEnvVarName(extension.id)];\n\t\tif (serialized === void 0) continue;\n\t\tinstances.set(extension.id, descriptor.deserialize(serialized));\n\t}\n\treturn instances;\n}\n//#endregion\n//#region src/preflight-transport.ts\n/**\n* Carries an extension's preflight payload from the CLI process to\n* `destroy`'s alchemy child (which re-imports the config from scratch); `deploy`\n* and `prisma dev` pass it to `lower()` as a value — one env var per\n* extension, same channel as containers (container-transport.ts), filled by\n* whichever preflight the run executed: the deploy preflight or the local\n* target's dev preflight. The framework never reads the contents, so an\n* extension that implements both must tell its own payload kinds apart.\n* Payloads carry metadata only, never secret values: the child's environment\n* is not a secret store.\n*/\n/** '@prisma/composer-prisma-cloud' → 'PRISMA_COMPOSER_PREFLIGHT_PRISMA_COMPOSER_PRISMA_CLOUD' */\nfunction preflightEnvVarName(extensionId) {\n\treturn `PRISMA_COMPOSER_PREFLIGHT_${envVarSafeExtensionId(extensionId)}`;\n}\n/** The env entries the CLI sets on the alchemy process: `{ [preflightEnvVarName(id)]: payload }` for every extension whose preflight returned one. */\nfunction preflightEnv(payloads) {\n\tconst env = {};\n\tconst ownerByVarName = /* @__PURE__ */ new Map();\n\tfor (const [extensionId, payload] of payloads) {\n\t\tif (payload.length === 0) continue;\n\t\tconst varName = preflightEnvVarName(extensionId);\n\t\tconst owner = ownerByVarName.get(varName);\n\t\tif (owner !== void 0) throw new Error(`Extension ids \"${owner}\" and \"${extensionId}\" both use the environment variable \"${varName}\". Rename one of the extensions.`);\n\t\townerByVarName.set(varName, extensionId);\n\t\tenv[varName] = payload;\n\t}\n\treturn env;\n}\n/** The alchemy-process side: the payload this extension's own preflight wrote, or `undefined` when it wrote none (or when nothing ran a preflight at all). */\nfunction readPreflightPayload(extensionId, env) {\n\tconst payload = env[preflightEnvVarName(extensionId)];\n\treturn payload === void 0 || payload.length === 0 ? void 0 : payload;\n}\n/** One reader as the deploy prints it, for example `read by service \"shop.email\", field \"apiKey\"`. */\nfunction platformVariableReaderText(reader) {\n\tswitch (reader.kind) {\n\t\tcase \"field\": return `read by service \"${reader.service}\", field \"${reader.path === \"\" ? \"(root)\" : reader.path}\"`;\n\t\tcase \"unread\": return `named by resource \"${reader.node}\", read by no service`;\n\t}\n}\n//#endregion\nexport { containerEnv as a, readPreflightPayload as i, preflightEnv as n, containerEnvVarName as o, preflightEnvVarName as r, deserializeContainers as s, platformVariableReaderText as t };\n\n//# sourceMappingURL=preflight-transport-2d6iIchu.mjs.map"],"mappings":";;AAEA,SAAS,sBAAsB,aAAa;CAC3C,OAAO,YAAY,YAAY,CAAC,CAAC,QAAQ,eAAe,GAAG,CAAC,CAAC,QAAQ,YAAY,EAAE;AACpF;;AAEA,SAAS,oBAAoB,aAAa;CACzC,OAAO,6BAA6B,sBAAsB,WAAW;AACtE;AACA,SAAS,eAAe,GAAG,GAAG,SAAS;CACtC,uBAAuB,IAAI,MAAM,kBAAkB,EAAE,SAAS,EAAE,kDAAkD,QAAQ,kCAAkC;AAC7J;AACA,SAAS,oBAAoB,aAAa;CACzC,uBAAuB,IAAI,MAAM,cAAc,YAAY,qHAAqH;AACjL;;AAEA,SAAS,aAAa,WAAW;CAChC,MAAM,MAAM,CAAC;CACb,MAAM,iCAAiC,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QAAQ,WAAW,IAAI,KAAK,IAAI;AAC9D;;AAEA,SAAS,2BAA2B,QAAQ;CAC3C,QAAQ,OAAO,MAAf;EACC,KAAK,SAAS,OAAO,oBAAoB,OAAO,QAAQ,YAAY,OAAO,SAAS,KAAK,WAAW,OAAO,KAAK;EAChH,KAAK,UAAU,OAAO,sBAAsB,OAAO,KAAK;CACzD;AACD"}
@@ -1,5 +1,6 @@
1
- import { t as CliStructuredError } from "./errors-0e8IVwzi.mjs";
2
- //#region ../../0-framework/3-tooling/cli/dist/redaction-DXung4ip.mjs
1
+ import { t as CliStructuredError } from "./errors-DI3TBXE-.mjs";
2
+ import { inspect } from "node:util";
3
+ //#region ../../0-framework/3-tooling/cli/dist/redaction-DY6eDC12.mjs
3
4
  const REDACTED = "[redacted]";
4
5
  /** Env var names whose values are credentials: the service token, preflight payloads, and the usual secret spellings. */
5
6
  const SECRET_ENV_NAME = /TOKEN|SECRET|PASSWORD|PASSWD|PRIVATE|CREDENTIAL|AUTH|API_?KEY|ACCESS_?KEY|_KEY$|DATABASE_URL|_DSN$|^PRISMA_COMPOSER_PREFLIGHT_/i;
@@ -11,17 +12,26 @@ const SECRET_ENV_NAME = /TOKEN|SECRET|PASSWORD|PASSWD|PRIVATE|CREDENTIAL|AUTH|AP
11
12
  function credentialLookingValues(variables) {
12
13
  return Object.entries(variables).flatMap(([name, value]) => SECRET_ENV_NAME.test(name) && typeof value === "string" && value.length >= 8 ? [value] : []);
13
14
  }
15
+ /** `value` as it appears inside a string that `JSON.stringify` or `util.inspect` printed, where a newline, quote or backslash is escaped. */
16
+ function escapedForms(value) {
17
+ return [
18
+ value,
19
+ JSON.stringify(value).slice(1, -1),
20
+ inspect(value).slice(1, -1)
21
+ ];
22
+ }
14
23
  /**
15
- * Finds every secret in a text: one regular expression for all of them, built once. A match
16
- * is the span of the longest secret that starts at a position, and spans that overlap are
17
- * merged, so two overlapping secrets are hidden whole.
24
+ * Finds every secret in a text, as written or as `JSON.stringify` and `util.format` escape it:
25
+ * one regular expression for all of them, built once. A match is the span of the longest
26
+ * secret that starts at a position, and spans that overlap are merged, so two overlapping
27
+ * secrets are hidden whole.
18
28
  */
19
29
  var SecretMatcher = class {
20
30
  starts;
21
31
  prefixes = /* @__PURE__ */ new Set();
22
32
  longestPrefix;
23
33
  constructor(values) {
24
- const sorted = [...new Set(values)].filter((value) => value.length > 0).sort((a, b) => b.length - a.length);
34
+ const sorted = [...new Set([...values].flatMap(escapedForms))].filter((value) => value.length > 0).sort((a, b) => b.length - a.length);
25
35
  this.starts = sorted.length === 0 ? void 0 : new RegExp(`(?=(${sorted.map((value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|")}))`, "g");
26
36
  for (const value of sorted) for (let length = 1; length < value.length; length++) this.prefixes.add(value.slice(0, length));
27
37
  this.longestPrefix = Math.max(0, (sorted[0]?.length ?? 0) - 1);
@@ -143,15 +153,9 @@ function redactReader(reader, redaction) {
143
153
  service: redaction.redact(reader.service),
144
154
  path: redaction.redact(reader.path)
145
155
  };
146
- case "param": return {
147
- kind: "param",
148
- service: redaction.redact(reader.service),
149
- param: redaction.redact(reader.param)
150
- };
151
156
  case "unread": return {
152
157
  kind: "unread",
153
- node: redaction.redact(reader.node),
154
- nodeKind: reader.nodeKind
158
+ node: redaction.redact(reader.node)
155
159
  };
156
160
  }
157
161
  }
@@ -242,7 +246,7 @@ function redactErrorChain(error, redaction, seen) {
242
246
  return copy;
243
247
  }
244
248
  }
245
- /** `event` with every value `redaction` hides removed from the text it carries: a message, or a dev server's output line. */
249
+ /** `event` with every value `redaction` hides removed from the text it carries: a message, an Alchemy log line, a converge failure's reasons, or a dev server's output line. */
246
250
  function redactDevEvent(event, redaction) {
247
251
  switch (event.kind) {
248
252
  case "target-warning":
@@ -252,6 +256,18 @@ function redactDevEvent(event, redaction) {
252
256
  ...event,
253
257
  message: redaction.redact(event.message)
254
258
  };
259
+ case "message": return {
260
+ ...event,
261
+ text: redaction.redact(event.text)
262
+ };
263
+ case "converge-failed": return {
264
+ ...event,
265
+ message: redaction.redact(event.message),
266
+ reasons: event.reasons.map(({ tag, message }) => ({
267
+ tag,
268
+ message: redaction.redact(message)
269
+ }))
270
+ };
255
271
  case "dev-server-output": return {
256
272
  ...event,
257
273
  line: redaction.redact(event.line)
@@ -264,6 +280,7 @@ function redactSummary(summary, redaction) {
264
280
  if (summary === void 0) return void 0;
265
281
  return {
266
282
  app: summary.app,
283
+ findings: { unset: summary.findings.unset.map((variable) => redactUnsetPlatformVariable(variable, redaction)) },
267
284
  nodes: summary.nodes.map((node) => ({
268
285
  address: node.address,
269
286
  entities: node.entities.map((entity) => ({
@@ -319,4 +336,4 @@ var StreamRedactor = class {
319
336
  //#endregion
320
337
  export { redactDevEvent as a, redactThrown as c, redactCredentialLooking as i, redactUnsetPlatformVariable as l, StreamRedactor as n, redactError as o, credentialLookingValues as r, redactSummary as s, SecretRedaction as t, valuesUnderSecretsKeys as u };
321
338
 
322
- //# sourceMappingURL=redaction-DXung4ip-bBoNomi3.mjs.map
339
+ //# sourceMappingURL=redaction-DY6eDC12-W-FzW7_r.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redaction-DY6eDC12-W-FzW7_r.mjs","names":["#names"],"sources":["../../../0-framework/3-tooling/cli/dist/redaction-DY6eDC12.mjs"],"sourcesContent":["import { CliStructuredError } from \"@internal/foundation/errors\";\nimport { inspect } from \"node:util\";\n//#region src/redaction.ts\nconst REDACTED = \"[redacted]\";\n/** Env var names whose values are credentials: the service token, preflight payloads, and the usual secret spellings. */\nconst SECRET_ENV_NAME = /TOKEN|SECRET|PASSWORD|PASSWD|PRIVATE|CREDENTIAL|AUTH|API_?KEY|ACCESS_?KEY|_KEY$|DATABASE_URL|_DSN$|^PRISMA_COMPOSER_PREFLIGHT_/i;\n/**\n* The credential-looking values in `variables`: text of eight characters or more under a name\n* that looks like a credential's. The length limit keeps a one-letter placeholder from blanking\n* every matching letter.\n*/\nfunction credentialLookingValues(variables) {\n\treturn Object.entries(variables).flatMap(([name, value]) => SECRET_ENV_NAME.test(name) && typeof value === \"string\" && value.length >= 8 ? [value] : []);\n}\n/** `value` as it appears inside a string that `JSON.stringify` or `util.inspect` printed, where a newline, quote or backslash is escaped. */\nfunction escapedForms(value) {\n\treturn [\n\t\tvalue,\n\t\tJSON.stringify(value).slice(1, -1),\n\t\tinspect(value).slice(1, -1)\n\t];\n}\n/**\n* Finds every secret in a text, as written or as `JSON.stringify` and `util.format` escape it:\n* one regular expression for all of them, built once. A match is the span of the longest\n* secret that starts at a position, and spans that overlap are merged, so two overlapping\n* secrets are hidden whole.\n*/\nvar SecretMatcher = class {\n\tstarts;\n\tprefixes = /* @__PURE__ */ new Set();\n\tlongestPrefix;\n\tconstructor(values) {\n\t\tconst sorted = [...new Set([...values].flatMap(escapedForms))].filter((value) => value.length > 0).sort((a, b) => b.length - a.length);\n\t\tthis.starts = sorted.length === 0 ? void 0 : new RegExp(`(?=(${sorted.map((value) => value.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")).join(\"|\")}))`, \"g\");\n\t\tfor (const value of sorted) for (let length = 1; length < value.length; length++) this.prefixes.add(value.slice(0, length));\n\t\tthis.longestPrefix = Math.max(0, (sorted[0]?.length ?? 0) - 1);\n\t}\n\t/** The merged spans of every secret in `text`, in order, as `[start, end)`. */\n\tspans(text) {\n\t\tconst spans = [];\n\t\tif (this.starts === void 0) return spans;\n\t\tfor (const match of text.matchAll(this.starts)) {\n\t\t\tconst start = match.index;\n\t\t\tconst end = start + (match[1]?.length ?? 0);\n\t\t\tconst last = spans.at(-1);\n\t\t\tif (last !== void 0 && start < last[1]) last[1] = Math.max(last[1], end);\n\t\t\telse spans.push([start, end]);\n\t\t}\n\t\treturn spans;\n\t}\n\t/** The length of the longest end of `text` that is the start, not the whole, of a secret. */\n\tstartOfSecretAtEnd(text) {\n\t\tfor (let length = Math.min(this.longestPrefix, text.length); length > 0; length--) if (this.prefixes.has(text.slice(text.length - length))) return length;\n\t\treturn 0;\n\t}\n\t/** `text` with each span replaced by `[redacted]`. */\n\tredact(text) {\n\t\tlet out = \"\";\n\t\tlet from = 0;\n\t\tfor (const [start, end] of this.spans(text)) {\n\t\t\tout += text.slice(from, start) + REDACTED;\n\t\t\tfrom = end;\n\t\t}\n\t\treturn from === 0 ? text : out + text.slice(from);\n\t}\n};\n/** `text` with each value in `values` replaced by `[redacted]`, at any length; an empty one is skipped. Overlapping values are hidden whole. */\nfunction redactValues(text, values) {\n\treturn new SecretMatcher(values).redact(text);\n}\n/** `text` with bearer and basic tokens, JWTs, the password in a URL, and `token=…`-style pairs replaced by `[redacted]`. The `<value>` placeholder in a printed command is kept. */\nfunction redactShapes(text) {\n\treturn text.replace(/\\b(Bearer|Basic)\\s+[\\w.~+/=-]+/gi, `$1 ${REDACTED}`).replace(/\\beyJ[\\w-]+\\.[\\w-]+\\.[\\w-]*/g, REDACTED).replace(/(\\b[a-z][\\w+.-]*:\\/\\/[^\\s:/@]*:)[^\\s/@]+@/gi, `$1${REDACTED}@`).replace(/\\b((?:[\\w-]*[_-])?(?:token|secret|password|passwd|api[_-]?key|access[_-]?key|private[_-]?key)[\"']?\\s*[:=]\\s*[\"']?)(?!<value>(?:[\\s\"',;&]|$))[^\\s\"',;&]+/gi, `$1${REDACTED}`);\n}\n/**\n* `text` with the credential-looking values of `env` and the credential shapes replaced by\n* `[redacted]`. For a process that has no `SecretRedaction`; `SecretRedaction.redact` hides\n* the known secrets too.\n*/\nfunction redactCredentialLooking(text, env) {\n\treturn redactShapes(redactValues(text, credentialLookingValues(env)));\n}\n/**\n* The known secrets of one command: the values under the secrets keys the graph names, in the app\n* secrets and the app configuration (ADR-0062). The app configuration file must not hold any of them.\n*/\nvar KnownSecrets = class {\n\t#names = /* @__PURE__ */ new Map();\n\tconstructor(secrets = []) {\n\t\tthis.add(secrets);\n\t}\n\t/** Adds each secret whose value is not empty. A value already known keeps its first name. */\n\tadd(secrets) {\n\t\tfor (const { name, value } of secrets) if (value.length > 0 && !this.#names.has(value)) this.#names.set(value, name);\n\t}\n\tvalues() {\n\t\treturn new Set(this.#names.keys());\n\t}\n\t/**\n\t* The name of a known secret `text` holds, or undefined. A secret of\n\t* `MIN_SECRET_LENGTH_INSIDE_A_VALUE` characters or more is found anywhere in `text`; a shorter\n\t* one only when it is all of `text`.\n\t*/\n\tnameIn(text) {\n\t\tfor (const [value, name] of this.#names) if (value.length >= 8 ? text.includes(value) : text === value) return name;\n\t}\n};\n/**\n* What one command hides from everything it prints, returns or reports (ADR-0062): its known\n* secrets, and the credential-looking values, which only look like secrets by the name of the\n* variable they are under. It starts with the credential-looking values of the process\n* environment.\n*/\nvar SecretRedaction = class {\n\tknownSecrets = new KnownSecrets();\n\tcredentialLooking = /* @__PURE__ */ new Set();\n\tmatcher;\n\tconstructor(env) {\n\t\tthis.addCredentialLookingValues(credentialLookingValues(env));\n\t}\n\taddKnownSecrets(secrets) {\n\t\tthis.knownSecrets.add(secrets);\n\t}\n\taddCredentialLookingValues(values) {\n\t\tfor (const value of values) if (value.length > 0) this.credentialLooking.add(value);\n\t}\n\t/** The known secrets and the credential-looking values, longest first. */\n\tallValues() {\n\t\treturn [.../* @__PURE__ */ new Set([...this.knownSecrets.values(), ...this.credentialLooking])].sort((a, b) => b.length - a.length);\n\t}\n\t/** `text` with every known secret and credential-looking value replaced by `[redacted]` at any length, then bearer tokens, JWTs, URL passwords and `token=…` pairs. */\n\tredact(text) {\n\t\tconst size = this.knownSecrets.values().size + this.credentialLooking.size;\n\t\tif (this.matcher?.size !== size) this.matcher = {\n\t\t\tsize,\n\t\t\tmatcher: new SecretMatcher(this.allValues())\n\t\t};\n\t\treturn redactShapes(this.matcher.matcher.redact(text));\n\t}\n};\n/** The text under each name in `secretsKeys`, in the app configuration and in the app secrets, at any length. */\nfunction valuesUnderSecretsKeys(configuration, secrets, secretsKeys) {\n\treturn secretsKeys.flatMap((name) => [configuration[name], secrets[name]].flatMap((value) => typeof value === \"string\" ? [{\n\t\tname,\n\t\tvalue\n\t}] : []));\n}\nfunction redactReader(reader, redaction) {\n\tswitch (reader.kind) {\n\t\tcase \"field\": return {\n\t\t\tkind: \"field\",\n\t\t\tservice: redaction.redact(reader.service),\n\t\t\tpath: redaction.redact(reader.path)\n\t\t};\n\t\tcase \"unread\": return {\n\t\t\tkind: \"unread\",\n\t\t\tnode: redaction.redact(reader.node)\n\t\t};\n\t}\n}\n/** `variable` with every text in it redacted: its name, each reader's names and each command. */\nfunction redactUnsetPlatformVariable(variable, redaction) {\n\treturn {\n\t\tname: redaction.redact(variable.name),\n\t\treaders: variable.readers.map((reader) => redactReader(reader, redaction)),\n\t\tcommands: variable.commands.map((command) => redaction.redact(command))\n\t};\n}\nfunction redactData(value, redaction) {\n\tif (typeof value === \"string\") return redaction.redact(value);\n\tif (Array.isArray(value)) return value.map((member) => redactData(member, redaction));\n\tif (typeof value === \"object\" && value !== null && Object.getPrototypeOf(value) === Object.prototype) return Object.fromEntries(Object.entries(value).map(([key, member]) => [key, redactData(member, redaction)]));\n\treturn value;\n}\n/**\n* `error` with every value `redaction` hides removed from its summary, `why`, `fix` and every string in\n* its `meta`. The code, severity, `where` and docs link are kept. The cause is dropped, because\n* it holds the same text unredacted and a renderer may print it.\n*/\nfunction redactError(error, redaction) {\n\treturn new CliStructuredError(error.code, redaction.redact(error.message), {\n\t\tseverity: error.severity,\n\t\t...error.why === void 0 ? {} : { why: redaction.redact(error.why) },\n\t\t...error.fix === void 0 ? {} : { fix: redaction.redact(error.fix) },\n\t\t...error.where === void 0 ? {} : { where: error.where },\n\t\t...error.meta === void 0 ? {} : { meta: Object.fromEntries(Object.entries(error.meta).map(([key, value]) => [key, redactData(value, redaction)])) },\n\t\t...error.docsUrl === void 0 ? {} : { docsUrl: error.docsUrl }\n\t});\n}\nfunction setOwn(error, name, value) {\n\tObject.defineProperty(error, name, {\n\t\tvalue,\n\t\twritable: true,\n\t\tconfigurable: true\n\t});\n}\nconst UNPRINTABLE = \"A value was thrown that cannot be turned into text.\";\nfunction safeString(value) {\n\ttry {\n\t\treturn String(value);\n\t} catch {\n\t\ttry {\n\t\t\treturn Object.prototype.toString.call(value);\n\t\t} catch {\n\t\t\treturn UNPRINTABLE;\n\t\t}\n\t}\n}\n/**\n* The error to rethrow in place of a thrown defect, with every secret removed from its message\n* and stack, and from those of each error in its `cause` chain and in an `AggregateError`'s\n* `errors`. A cause that is text or plain data becomes a redacted copy. Each error is redacted\n* in place where it can be. One whose properties cannot change, such as a frozen error, is\n* replaced by a new error with the redacted message, stack and cause. A thrown value that is not\n* an `Error` becomes an `Error` whose message is its redacted text. Never throws: when reading\n* the error fails, the result is a new `Error` holding the redacted text of what was thrown.\n*/\nfunction redactThrown(thrown, redaction) {\n\ttry {\n\t\treturn thrown instanceof Error ? redactErrorChain(thrown, redaction, /* @__PURE__ */ new Map()) : new Error(redaction.redact(safeString(thrown)));\n\t} catch {\n\t\treturn new Error(redaction.redact(safeString(thrown)));\n\t}\n}\nfunction redactErrorChain(error, redaction, seen) {\n\tconst done = seen.get(error);\n\tif (done !== void 0) return done;\n\tseen.set(error, error);\n\tconst message = redaction.redact(typeof error.message === \"string\" ? error.message : safeString(error.message));\n\tconst stack = typeof error.stack === \"string\" ? redaction.redact(error.stack) : void 0;\n\tconst cause = error.cause instanceof Error ? redactErrorChain(error.cause, redaction, seen) : redactData(error.cause, redaction);\n\tconst members = error instanceof AggregateError ? error.errors.map((member) => member instanceof Error ? redactErrorChain(member, redaction, seen) : redactData(member, redaction)) : void 0;\n\ttry {\n\t\tsetOwn(error, \"message\", message);\n\t\tif (stack !== void 0) setOwn(error, \"stack\", stack);\n\t\tif (error.cause !== void 0) setOwn(error, \"cause\", cause);\n\t\tif (members !== void 0) setOwn(error, \"errors\", members);\n\t\treturn error;\n\t} catch {\n\t\tconst options = cause === void 0 ? void 0 : { cause };\n\t\tconst copy = members === void 0 ? new Error(message, options) : new AggregateError(members, message, options);\n\t\tcopy.name = error.name;\n\t\tsetOwn(copy, \"stack\", stack ?? `${error.name}: ${message}`);\n\t\tseen.set(error, copy);\n\t\treturn copy;\n\t}\n}\n/** `event` with every value `redaction` hides removed from the text it carries: a message, an Alchemy log line, a converge failure's reasons, or a dev server's output line. */\nfunction redactDevEvent(event, redaction) {\n\tswitch (event.kind) {\n\t\tcase \"target-warning\":\n\t\tcase \"rebuild-failed\":\n\t\tcase \"watch-error\":\n\t\tcase \"stop-error\": return {\n\t\t\t...event,\n\t\t\tmessage: redaction.redact(event.message)\n\t\t};\n\t\tcase \"message\": return {\n\t\t\t...event,\n\t\t\ttext: redaction.redact(event.text)\n\t\t};\n\t\tcase \"converge-failed\": return {\n\t\t\t...event,\n\t\t\tmessage: redaction.redact(event.message),\n\t\t\treasons: event.reasons.map(({ tag, message }) => ({\n\t\t\t\ttag,\n\t\t\t\tmessage: redaction.redact(message)\n\t\t\t}))\n\t\t};\n\t\tcase \"dev-server-output\": return {\n\t\t\t...event,\n\t\t\tline: redaction.redact(event.line)\n\t\t};\n\t\tdefault: return event;\n\t}\n}\n/** `summary` with every value `redaction` hides removed from each entity's id, url and details. */\nfunction redactSummary(summary, redaction) {\n\tif (summary === void 0) return void 0;\n\treturn {\n\t\tapp: summary.app,\n\t\tfindings: { unset: summary.findings.unset.map((variable) => redactUnsetPlatformVariable(variable, redaction)) },\n\t\tnodes: summary.nodes.map((node) => ({\n\t\t\taddress: node.address,\n\t\t\tentities: node.entities.map((entity) => ({\n\t\t\t\t...entity,\n\t\t\t\tid: redaction.redact(entity.id),\n\t\t\t\t...entity.url === void 0 ? {} : { url: redaction.redact(entity.url) },\n\t\t\t\t...entity.details === void 0 ? {} : { details: Object.fromEntries(Object.entries(entity.details).map(([key, value]) => [key, redaction.redact(value)])) }\n\t\t\t}))\n\t\t}))\n\t};\n}\nfunction isHighSurrogate(code) {\n\treturn code >= 55296 && code <= 56319;\n}\n/**\n* Redacts a stream of text chunk by chunk: every value in `values` becomes `[redacted]`, and\n* overlapping values are hidden whole. It holds back only the end of the text that could still\n* be part of a value: the longest end that could start one, or a match that a later value could\n* extend. So a value split across two chunks is still replaced, and text that cannot start one,\n* such as a prompt, is returned at once. It never splits a surrogate pair. `push` returns the\n* text that is ready; `end` returns the rest.\n*/\nvar StreamRedactor = class {\n\theld = \"\";\n\tmatcher;\n\tconstructor(values) {\n\t\tthis.matcher = new SecretMatcher(values);\n\t}\n\tpush(chunk) {\n\t\tconst text = this.held + chunk;\n\t\tconst cut = text.length - this.matcher.startOfSecretAtEnd(text);\n\t\tlet out = \"\";\n\t\tlet from = 0;\n\t\tlet ready = cut;\n\t\tfor (const [start, end] of this.matcher.spans(text)) {\n\t\t\tif (end > cut) {\n\t\t\t\tready = Math.min(cut, start);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tout += text.slice(from, start) + REDACTED;\n\t\t\tfrom = end;\n\t\t}\n\t\tif (ready > from && ready < text.length && isHighSurrogate(text.charCodeAt(ready - 1))) ready -= 1;\n\t\tthis.held = text.slice(ready);\n\t\treturn out + text.slice(from, ready);\n\t}\n\tend() {\n\t\tconst text = this.held;\n\t\tthis.held = \"\";\n\t\treturn this.matcher.redact(text);\n\t}\n};\n//#endregion\nexport { redactDevEvent as a, redactThrown as c, redactCredentialLooking as i, redactUnsetPlatformVariable as l, StreamRedactor as n, redactError as o, credentialLookingValues as r, redactSummary as s, SecretRedaction as t, valuesUnderSecretsKeys as u };\n\n//# sourceMappingURL=redaction-DY6eDC12.mjs.map"],"mappings":";;;AAGA,MAAM,WAAW;;AAEjB,MAAM,kBAAkB;;;;;;AAMxB,SAAS,wBAAwB,WAAW;CAC3C,OAAO,OAAO,QAAQ,SAAS,CAAC,CAAC,SAAS,CAAC,MAAM,WAAW,gBAAgB,KAAK,IAAI,KAAK,OAAO,UAAU,YAAY,MAAM,UAAU,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;AACxJ;;AAEA,SAAS,aAAa,OAAO;CAC5B,OAAO;EACN;EACA,KAAK,UAAU,KAAK,CAAC,CAAC,MAAM,GAAG,EAAE;EACjC,QAAQ,KA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