@prisma/orm-framework 8.0.0-rc.1-dev.46 → 8.0.0-rc.10-dev.1

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 (205) hide show
  1. package/README.md +1 -5
  2. package/dist/{apply-specifier-default-control-policy-CAxiXxKg.d.mts → apply-specifier-default-control-policy-C2Njpc_G.d.mts} +2 -2
  3. package/dist/apply-specifier-default-control-policy-C2Njpc_G.d.mts.map +1 -0
  4. package/dist/{assertions-Cz-GWH8P.mjs → assertions-Dw1lZz_Q.mjs} +2 -2
  5. package/dist/{assertions-Cz-GWH8P.mjs.map → assertions-Dw1lZz_Q.mjs.map} +1 -1
  6. package/dist/authoring-D2ngo2MB.d.mts +1 -0
  7. package/dist/{canonicalization-DFpB09nP-4OdB2nsy.d.mts → canonicalization-BAvRuZ2i-IwsqxGme.d.mts} +3 -3
  8. package/dist/{canonicalization-DFpB09nP-4OdB2nsy.d.mts.map → canonicalization-BAvRuZ2i-IwsqxGme.d.mts.map} +1 -1
  9. package/dist/{capabilities-BCEONw9w-C-lo3rF8.mjs → capabilities-BzwH_XMZ-CkgWaxF9.mjs} +3 -3
  10. package/dist/{capabilities-BCEONw9w-C-lo3rF8.mjs.map → capabilities-BzwH_XMZ-CkgWaxF9.mjs.map} +1 -1
  11. package/dist/{codec-Cd0QcxAx.mjs → codec-DWYH-Ra4.mjs} +3 -3
  12. package/dist/{codec-Cd0QcxAx.mjs.map → codec-DWYH-Ra4.mjs.map} +1 -1
  13. package/dist/{codec-Ce07W3Mz.d.mts → codec-DxAIshoO.d.mts} +6 -9
  14. package/dist/{codec-Ce07W3Mz.d.mts.map → codec-DxAIshoO.d.mts.map} +1 -1
  15. package/dist/{codec-types-D6VRj2RE-BLElXc-O.d.mts → codec-types-nVMtogur-CYBdUQUH.d.mts} +4 -4
  16. package/dist/{codec-types-D6VRj2RE-BLElXc-O.d.mts.map → codec-types-nVMtogur-CYBdUQUH.d.mts.map} +1 -1
  17. package/dist/{codec-types-DcNvNeY1-BO6kUiH0.mjs → codec-types-smcGzGq6-BohNffPc.mjs} +3 -3
  18. package/dist/{codec-types-DcNvNeY1-BO6kUiH0.mjs.map → codec-types-smcGzGq6-BohNffPc.mjs.map} +1 -1
  19. package/dist/{components-CGA_WwEG.d.mts → components-CQrZAxZu.d.mts} +4 -4
  20. package/dist/{components-CGA_WwEG.d.mts.map → components-CQrZAxZu.d.mts.map} +1 -1
  21. package/dist/{components-dZRz3T5y.mjs → components-CnV-6irM.mjs} +2 -2
  22. package/dist/{components-dZRz3T5y.mjs.map → components-CnV-6irM.mjs.map} +1 -1
  23. package/dist/components.d.mts +16 -16
  24. package/dist/components.mjs +10 -10
  25. package/dist/components__authoring.d.mts +3 -3
  26. package/dist/components__authoring.mjs +1 -1
  27. package/dist/components__codec.d.mts +2 -2
  28. package/dist/components__codec.mjs +3 -3
  29. package/dist/components__components.d.mts +3 -3
  30. package/dist/components__components.mjs +2 -2
  31. package/dist/components__control.d.mts +2 -2
  32. package/dist/components__control.mjs +1 -1
  33. package/dist/components__emission.d.mts +3 -3
  34. package/dist/components__execution.d.mts +1 -1
  35. package/dist/components__ir.d.mts +1 -1
  36. package/dist/components__ir.mjs +1 -1
  37. package/dist/components__psl-ast.d.mts +4 -4
  38. package/dist/components__runtime.d.mts +2 -2
  39. package/dist/components__runtime.mjs +2 -2
  40. package/dist/{config-types-CW4PDwMC.d.mts → config-types-CeduUYkY.d.mts} +12 -25
  41. package/dist/{config-types-CW4PDwMC.d.mts.map → config-types-CeduUYkY.d.mts.map} +1 -1
  42. package/dist/config-types-D_UCRNbm.mjs +38 -0
  43. package/dist/config-types-D_UCRNbm.mjs.map +1 -0
  44. package/dist/config.d.mts +2 -2
  45. package/dist/config.mjs +2 -2
  46. package/dist/config__config-types.d.mts +2 -2
  47. package/dist/config__config-types.mjs +2 -2
  48. package/dist/contract-authoring.d.mts +39 -4
  49. package/dist/contract-authoring.d.mts.map +1 -1
  50. package/dist/contract-authoring.mjs +66 -3
  51. package/dist/contract-authoring.mjs.map +1 -1
  52. package/dist/{contract-types-CkdMH7F7-9EHXSwbH.d.mts → contract-types-Bje5yT4f-0D1Z41Lq.d.mts} +7 -7
  53. package/dist/{contract-types-CkdMH7F7-9EHXSwbH.d.mts.map → contract-types-Bje5yT4f-0D1Z41Lq.d.mts.map} +1 -1
  54. package/dist/contract.d.mts +11 -11
  55. package/dist/contract.mjs +3 -3
  56. package/dist/contract__apply-specifier-default-control-policy.d.mts +1 -1
  57. package/dist/contract__default-namespace.mjs +1 -1
  58. package/dist/contract__enum-accessor.d.mts +1 -1
  59. package/dist/contract__hashing-utils.d.mts +1 -1
  60. package/dist/contract__hashing.d.mts +2 -2
  61. package/dist/contract__resolve-domain-model.d.mts +1 -1
  62. package/dist/contract__types.d.mts +5 -5
  63. package/dist/contract__types.mjs +2 -2
  64. package/dist/contract__validate-domain.d.mts +1 -1
  65. package/dist/contract__validate-domain.mjs +1 -1
  66. package/dist/{control-DLEm6u5m.mjs → control-DR0zF1b7.mjs} +12 -5
  67. package/dist/control-DR0zF1b7.mjs.map +1 -0
  68. package/dist/{control-BD96JZi8-NUhO5Kkw.mjs → control-ZdvxNTVU-cVV8u7aQ.mjs} +7 -7
  69. package/dist/control-ZdvxNTVU-cVV8u7aQ.mjs.map +1 -0
  70. package/dist/{control-BF8qzdnM.d.mts → control-eH2MIHqA.d.mts} +12 -11
  71. package/dist/{control-BF8qzdnM.d.mts.map → control-eH2MIHqA.d.mts.map} +1 -1
  72. package/dist/{control-ql9N9u4f-r3Vv41kZ.d.mts → control-ql9N9u4f-D5sGnPR-.d.mts} +2 -2
  73. package/dist/{control-ql9N9u4f-r3Vv41kZ.d.mts.map → control-ql9N9u4f-D5sGnPR-.d.mts.map} +1 -1
  74. package/dist/{default-namespace-D4vCwkXg-lzVN7gSc.mjs → default-namespace-D4vCwkXg-BEZbN38y.mjs} +2 -2
  75. package/dist/{default-namespace-D4vCwkXg-lzVN7gSc.mjs.map → default-namespace-D4vCwkXg-BEZbN38y.mjs.map} +1 -1
  76. package/dist/{dist-Dqbo77p7.mjs → dist-DUlexZHp.mjs} +3 -3
  77. package/dist/{dist-Dqbo77p7.mjs.map → dist-DUlexZHp.mjs.map} +1 -1
  78. package/dist/{domain-envelope-D6Wn9AmZ-BqZKTT9U.d.mts → domain-envelope-CENjHN4U-BIIt9bl4.d.mts} +17 -5
  79. package/dist/{domain-envelope-D6Wn9AmZ-BqZKTT9U.d.mts.map → domain-envelope-CENjHN4U-BIIt9bl4.d.mts.map} +1 -1
  80. package/dist/emission-BWD6Z6w9.d.mts +2 -0
  81. package/dist/{emission-types-DLXP34Ki-CFms3VrX.d.mts → emission-types-BoSJNKfQ-B_19ILPP.d.mts} +10 -6
  82. package/dist/emission-types-BoSJNKfQ-B_19ILPP.d.mts.map +1 -0
  83. package/dist/{enum-accessor-PH5vjghI.d.mts → enum-accessor-PSFq-BB1.d.mts} +3 -3
  84. package/dist/{enum-accessor-PH5vjghI.d.mts.map → enum-accessor-PSFq-BB1.d.mts.map} +1 -1
  85. package/dist/errors.d.mts +3 -3
  86. package/dist/errors.mjs +3 -3
  87. package/dist/errors__control.d.mts +1 -1
  88. package/dist/errors__control.mjs +1 -1
  89. package/dist/errors__execution.d.mts +1 -1
  90. package/dist/errors__execution.mjs +1 -1
  91. package/dist/errors__migration.d.mts +1 -1
  92. package/dist/errors__migration.mjs +1 -1
  93. package/dist/{execution-CSnQT8EX.d.mts → execution-BDzJVN0t.d.mts} +2 -2
  94. package/dist/{execution-CSnQT8EX.d.mts.map → execution-BDzJVN0t.d.mts.map} +1 -1
  95. package/dist/{execution-Crk6IfTs.mjs → execution-BEVehm0I.mjs} +8 -8
  96. package/dist/execution-BEVehm0I.mjs.map +1 -0
  97. package/dist/{execution-Cyl2dXxX.d.mts → execution-BpT2YjbZ.d.mts} +4 -4
  98. package/dist/{execution-Cyl2dXxX.d.mts.map → execution-BpT2YjbZ.d.mts.map} +1 -1
  99. package/dist/{framework-authoring-BhctBwih-DQ_6noDM.d.mts → framework-authoring-BYgPL2X6-DMKO0Z_k.d.mts} +17 -12
  100. package/dist/framework-authoring-BYgPL2X6-DMKO0Z_k.d.mts.map +1 -0
  101. package/dist/{framework-authoring-CDEvlouU-DKklu-fL.mjs → framework-authoring-BvxZnsPY-DlD1nwU5.mjs} +34 -19
  102. package/dist/framework-authoring-BvxZnsPY-DlD1nwU5.mjs.map +1 -0
  103. package/dist/{framework-components-hZ2tO-KH-CdRXBOYd.d.mts → framework-components-CDppKaT_-DcMHokB8.d.mts} +9 -6
  104. package/dist/{framework-components-hZ2tO-KH-CdRXBOYd.d.mts.map → framework-components-CDppKaT_-DcMHokB8.d.mts.map} +1 -1
  105. package/dist/{hashing-CccSPELN.d.mts → hashing-BTx0s6Zw.d.mts} +3 -3
  106. package/dist/{hashing-CccSPELN.d.mts.map → hashing-BTx0s6Zw.d.mts.map} +1 -1
  107. package/dist/{hashing-utils-qKu59RSC.d.mts → hashing-utils-Bh9PVd4J.d.mts} +2 -2
  108. package/dist/{hashing-utils-qKu59RSC.d.mts.map → hashing-utils-Bh9PVd4J.d.mts.map} +1 -1
  109. package/dist/ids.d.mts +2 -2
  110. package/dist/ids.mjs +1 -1
  111. package/dist/ids__runtime.d.mts +1 -1
  112. package/dist/ids__runtime.mjs +1 -1
  113. package/dist/{internal-error-kK8QvlDE.d.mts → internal-error-2fJ9fcZX.d.mts} +2 -2
  114. package/dist/{internal-error-kK8QvlDE.d.mts.map → internal-error-2fJ9fcZX.d.mts.map} +1 -1
  115. package/dist/{internal-error-BIc-ehme-ouBQPoEL.mjs → internal-error-ChGYPVpq-DhUD05u0.mjs} +3 -3
  116. package/dist/internal-error-ChGYPVpq-DhUD05u0.mjs.map +1 -0
  117. package/dist/{ir-BvE7L9FK.d.mts → ir-BGaPKem0.d.mts} +2 -2
  118. package/dist/{ir-BvE7L9FK.d.mts.map → ir-BGaPKem0.d.mts.map} +1 -1
  119. package/dist/{ir-ChmSSAhX.mjs → ir-CV5d1FJ0.mjs} +2 -2
  120. package/dist/{ir-ChmSSAhX.mjs.map → ir-CV5d1FJ0.mjs.map} +1 -1
  121. package/dist/{migration-BvrgDZXw.d.mts → migration-Bdp-ucGZ.d.mts} +2 -2
  122. package/dist/{migration-BvrgDZXw.d.mts.map → migration-Bdp-ucGZ.d.mts.map} +1 -1
  123. package/dist/{migration-C57VKLUY.mjs → migration-S40Rgr7K.mjs} +3 -3
  124. package/dist/migration-S40Rgr7K.mjs.map +1 -0
  125. package/dist/operations.mjs +1 -1
  126. package/dist/{parse-0ZJjj_2N-DhQpSVmQ.d.mts → parse-B5xYL_oV-aGFgfM8N.d.mts} +5 -5
  127. package/dist/{parse-0ZJjj_2N-DhQpSVmQ.d.mts.map → parse-B5xYL_oV-aGFgfM8N.d.mts.map} +1 -1
  128. package/dist/{parse-GbZGfMUj-BFSrD2AN.mjs → parse-GbZGfMUj-C9tHGn-6.mjs} +2 -2
  129. package/dist/{parse-GbZGfMUj-BFSrD2AN.mjs.map → parse-GbZGfMUj-C9tHGn-6.mjs.map} +1 -1
  130. package/dist/{psl-ast-BXZoFQBk.d.mts → psl-ast-BkfQwHjE.d.mts} +4 -4
  131. package/dist/{psl-ast-BXZoFQBk.d.mts.map → psl-ast-BkfQwHjE.d.mts.map} +1 -1
  132. package/dist/{psl-ast-CWJQF8LA-Vr5JNPdn.d.mts → psl-ast-dnXw52MT-1jSUKlC9.d.mts} +4 -4
  133. package/dist/{psl-ast-CWJQF8LA-Vr5JNPdn.d.mts.map → psl-ast-dnXw52MT-1jSUKlC9.d.mts.map} +1 -1
  134. package/dist/psl-parser.d.mts +195 -74
  135. package/dist/psl-parser.d.mts.map +1 -1
  136. package/dist/psl-parser.mjs +213 -46
  137. package/dist/psl-parser.mjs.map +1 -1
  138. package/dist/psl-parser__format.mjs +2 -2
  139. package/dist/psl-parser__interpret.d.mts +32 -5
  140. package/dist/psl-parser__interpret.d.mts.map +1 -1
  141. package/dist/psl-parser__interpret.mjs +25 -2
  142. package/dist/psl-parser__interpret.mjs.map +1 -1
  143. package/dist/psl-parser__syntax.d.mts +1 -1
  144. package/dist/psl-parser__syntax.mjs +1 -1
  145. package/dist/psl-printer.d.mts +6 -6
  146. package/dist/psl-printer.mjs +20 -13
  147. package/dist/psl-printer.mjs.map +1 -1
  148. package/dist/{resolve-codec-BZF8TZh_-D-xORT9Q.mjs → resolve-codec-BLRGmP1f-CydhIhLP.mjs} +6 -9
  149. package/dist/{resolve-codec-BZF8TZh_-D-xORT9Q.mjs.map → resolve-codec-BLRGmP1f-CydhIhLP.mjs.map} +1 -1
  150. package/dist/{resolve-domain-model-BVSb5wS5-C6Yq0dsD.d.mts → resolve-domain-model-DXP2hfI2-D4fWewZQ.d.mts} +3 -3
  151. package/dist/resolve-domain-model-DXP2hfI2-D4fWewZQ.d.mts.map +1 -0
  152. package/dist/{result-CBZ8X9mU.mjs → result-C0NUq1Ok.mjs} +2 -2
  153. package/dist/{result-CBZ8X9mU.mjs.map → result-C0NUq1Ok.mjs.map} +1 -1
  154. package/dist/{runtime-Cuxw8obj.d.mts → runtime-DOHhUPFx.d.mts} +66 -4
  155. package/dist/{runtime-Cuxw8obj.d.mts.map → runtime-DOHhUPFx.d.mts.map} +1 -1
  156. package/dist/{runtime-BqzioOmU.mjs → runtime-DXmHIbAr.mjs} +7 -2
  157. package/dist/{runtime-BqzioOmU.mjs.map → runtime-DXmHIbAr.mjs.map} +1 -1
  158. package/dist/{structured-error-CgiSMpdU.mjs → structured-error-BXbihKQ-.mjs} +3 -3
  159. package/dist/{structured-error-CgiSMpdU.mjs.map → structured-error-BXbihKQ-.mjs.map} +1 -1
  160. package/dist/{structured-error-BsNT4Hun.d.mts → structured-error-Z4iE-fTI.d.mts} +4 -4
  161. package/dist/{structured-error-BsNT4Hun.d.mts.map → structured-error-Z4iE-fTI.d.mts.map} +1 -1
  162. package/dist/suppress-idle-connection-errors-CKrTbp5P.d.mts +18 -0
  163. package/dist/suppress-idle-connection-errors-CKrTbp5P.d.mts.map +1 -0
  164. package/dist/suppress-idle-connection-errors-DzApeUb3.mjs +22 -0
  165. package/dist/suppress-idle-connection-errors-DzApeUb3.mjs.map +1 -0
  166. package/dist/{symbol-table-CZ7EVCTL-CR-ncCpD.d.mts → symbol-table-BeOQBu3C-DduAXEh6.d.mts} +6 -6
  167. package/dist/{symbol-table-CZ7EVCTL-CR-ncCpD.d.mts.map → symbol-table-BeOQBu3C-DduAXEh6.d.mts.map} +1 -1
  168. package/dist/ts-render.mjs +1 -1
  169. package/dist/{types-ByeQhU9p.d.mts → types-BKJi4we0.d.mts} +2 -2
  170. package/dist/{types-ByeQhU9p.d.mts.map → types-BKJi4we0.d.mts.map} +1 -1
  171. package/dist/{types-BnH4zYvN.mjs → types-DG4qHrT8.mjs} +2 -2
  172. package/dist/{types-BnH4zYvN.mjs.map → types-DG4qHrT8.mjs.map} +1 -1
  173. package/dist/{types-import-spec-3mjbVBhI-DQI6BvKU.d.mts → types-import-spec-BijT0b-s-253rIcmj.d.mts} +4 -4
  174. package/dist/{types-import-spec-3mjbVBhI-DQI6BvKU.d.mts.map → types-import-spec-BijT0b-s-253rIcmj.d.mts.map} +1 -1
  175. package/dist/utils.d.mts +4 -3
  176. package/dist/utils.mjs +6 -5
  177. package/dist/utils__assertions.mjs +1 -1
  178. package/dist/utils__internal-error.d.mts +1 -1
  179. package/dist/utils__internal-error.mjs +1 -1
  180. package/dist/utils__result.mjs +1 -1
  181. package/dist/utils__structured-error.d.mts +1 -1
  182. package/dist/utils__structured-error.mjs +1 -1
  183. package/dist/utils__suppress-idle-connection-errors.d.mts +2 -0
  184. package/dist/utils__suppress-idle-connection-errors.mjs +2 -0
  185. package/dist/{validate-domain-BkvFlY3B.mjs → validate-domain-CaT6wlDH.mjs} +15 -1
  186. package/dist/validate-domain-CaT6wlDH.mjs.map +1 -0
  187. package/dist/{validate-domain-BNBs-TVv.d.mts → validate-domain-DJXNOlkP.d.mts} +9 -5
  188. package/dist/validate-domain-DJXNOlkP.d.mts.map +1 -0
  189. package/package.json +19 -18
  190. package/dist/apply-specifier-default-control-policy-CAxiXxKg.d.mts.map +0 -1
  191. package/dist/authoring-B2H-9qCv.d.mts +0 -1
  192. package/dist/config-types-BqhNxw0z.mjs +0 -67
  193. package/dist/config-types-BqhNxw0z.mjs.map +0 -1
  194. package/dist/control-BD96JZi8-NUhO5Kkw.mjs.map +0 -1
  195. package/dist/control-DLEm6u5m.mjs.map +0 -1
  196. package/dist/emission-CmUO03gQ.d.mts +0 -2
  197. package/dist/emission-types-DLXP34Ki-CFms3VrX.d.mts.map +0 -1
  198. package/dist/execution-Crk6IfTs.mjs.map +0 -1
  199. package/dist/framework-authoring-BhctBwih-DQ_6noDM.d.mts.map +0 -1
  200. package/dist/framework-authoring-CDEvlouU-DKklu-fL.mjs.map +0 -1
  201. package/dist/internal-error-BIc-ehme-ouBQPoEL.mjs.map +0 -1
  202. package/dist/migration-C57VKLUY.mjs.map +0 -1
  203. package/dist/resolve-domain-model-BVSb5wS5-C6Yq0dsD.d.mts.map +0 -1
  204. package/dist/validate-domain-BNBs-TVv.d.mts.map +0 -1
  205. package/dist/validate-domain-BkvFlY3B.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"structured-error-CgiSMpdU.mjs","names":[],"sources":["../../../../1-framework/0-foundation/utils/dist/structured-error.mjs"],"sourcesContent":["import { t as ifDefined } from \"./defined-BQWA85QH.mjs\";\n//#region src/structured-error.ts\nconst STRUCTURED_CODE_RE = /^[A-Z][A-Z0-9]*\\.[A-Z][A-Z0-9_]*$/;\n/** Whether a bare string is a published `NAMESPACE.SUBCODE` code. */\nfunction isStructuredErrorCode(code) {\n\treturn STRUCTURED_CODE_RE.test(code);\n}\nfunction isStructuredError(e) {\n\treturn typeof e === \"object\" && e !== null && \"code\" in e && typeof e.code === \"string\" && isStructuredErrorCode(e.code) && \"message\" in e && typeof e.message === \"string\";\n}\nfunction structuredError(code, message, options) {\n\tconst error = options?.cause !== void 0 ? new Error(message, { cause: options.cause }) : new Error(message);\n\tObject.defineProperty(error, \"name\", {\n\t\tvalue: \"StructuredError\",\n\t\tconfigurable: true\n\t});\n\treturn Object.assign(error, {\n\t\tcode,\n\t\t...ifDefined(\"why\", options?.why),\n\t\t...ifDefined(\"fix\", options?.fix),\n\t\t...ifDefined(\"nextActions\", options?.nextActions),\n\t\t...ifDefined(\"where\", options?.where),\n\t\t...ifDefined(\"severity\", options?.severity),\n\t\t...ifDefined(\"meta\", options?.meta),\n\t\t...ifDefined(\"docsUrl\", options?.docsUrl)\n\t});\n}\nconst DOCS_ERRORS_VERSION = \"next\";\nconst DOCS_BASE = `https://docs.prisma.io/docs/orm/${DOCS_ERRORS_VERSION}/reference/error-reference`;\nfunction docsUrlFor(code) {\n\treturn `${DOCS_BASE}#${code}`;\n}\n//#endregion\nexport { DOCS_BASE, DOCS_ERRORS_VERSION, docsUrlFor, isStructuredError, isStructuredErrorCode, structuredError };\n\n//# sourceMappingURL=structured-error.mjs.map"],"mappings":";;AAEA,MAAM,qBAAqB;;AAE3B,SAAS,sBAAsB,MAAM;CACpC,OAAO,mBAAmB,KAAK,IAAI;AACpC;AACA,SAAS,kBAAkB,GAAG;CAC7B,OAAO,OAAO,MAAM,YAAY,MAAM,QAAQ,UAAU,KAAK,OAAO,EAAE,SAAS,YAAY,sBAAsB,EAAE,IAAI,KAAK,aAAa,KAAK,OAAO,EAAE,YAAY;AACpK;AACA,SAAS,gBAAgB,MAAM,SAAS,SAAS;CAChD,MAAM,QAAQ,SAAS,UAAU,KAAK,IAAI,IAAI,MAAM,SAAS,EAAE,OAAO,QAAQ,MAAM,CAAC,IAAI,IAAI,MAAM,OAAO;CAC1G,OAAO,eAAe,OAAO,QAAQ;EACpC,OAAO;EACP,cAAc;CACf,CAAC;CACD,OAAO,OAAO,OAAO,OAAO;EAC3B;EACA,GAAG,UAAU,OAAO,SAAS,GAAG;EAChC,GAAG,UAAU,OAAO,SAAS,GAAG;EAChC,GAAG,UAAU,eAAe,SAAS,WAAW;EAChD,GAAG,UAAU,SAAS,SAAS,KAAK;EACpC,GAAG,UAAU,YAAY,SAAS,QAAQ;EAC1C,GAAG,UAAU,QAAQ,SAAS,IAAI;EAClC,GAAG,UAAU,WAAW,SAAS,OAAO;CACzC,CAAC;AACF;AACA,MAAM,sBAAsB;AAC5B,MAAM,YAAY,mCAAmC,oBAAoB;AACzE,SAAS,WAAW,MAAM;CACzB,OAAO,GAAG,UAAU,GAAG;AACxB"}
1
+ {"version":3,"file":"structured-error-BXbihKQ-.mjs","names":[],"sources":["../../../../1-framework/0-foundation/utils/dist/structured-error.mjs"],"sourcesContent":["import { t as ifDefined } from \"./defined-BQWA85QH.mjs\";\n//#region src/structured-error.ts\nconst STRUCTURED_CODE_RE = /^[A-Z][A-Z0-9]*\\.[A-Z][A-Z0-9_]*$/;\n/** Whether a bare string is a published `NAMESPACE.SUBCODE` code. */\nfunction isStructuredErrorCode(code) {\n\treturn STRUCTURED_CODE_RE.test(code);\n}\nfunction isStructuredError(e) {\n\treturn typeof e === \"object\" && e !== null && \"code\" in e && typeof e.code === \"string\" && isStructuredErrorCode(e.code) && \"message\" in e && typeof e.message === \"string\";\n}\nfunction structuredError(code, message, options) {\n\tconst error = options?.cause !== void 0 ? new Error(message, { cause: options.cause }) : new Error(message);\n\tObject.defineProperty(error, \"name\", {\n\t\tvalue: \"StructuredError\",\n\t\tconfigurable: true\n\t});\n\treturn Object.assign(error, {\n\t\tcode,\n\t\t...ifDefined(\"why\", options?.why),\n\t\t...ifDefined(\"fix\", options?.fix),\n\t\t...ifDefined(\"nextActions\", options?.nextActions),\n\t\t...ifDefined(\"where\", options?.where),\n\t\t...ifDefined(\"severity\", options?.severity),\n\t\t...ifDefined(\"meta\", options?.meta),\n\t\t...ifDefined(\"docsUrl\", options?.docsUrl)\n\t});\n}\nconst DOCS_ERRORS_VERSION = \"v8\";\nconst DOCS_BASE = `https://docs.prisma.io/docs/orm/v8/reference/error-reference`;\nfunction docsUrlFor(code) {\n\treturn `${DOCS_BASE}#${code}`;\n}\n//#endregion\nexport { DOCS_BASE, DOCS_ERRORS_VERSION, docsUrlFor, isStructuredError, isStructuredErrorCode, structuredError };\n\n//# sourceMappingURL=structured-error.mjs.map"],"mappings":";;AAEA,MAAM,qBAAqB;;AAE3B,SAAS,sBAAsB,MAAM;CACpC,OAAO,mBAAmB,KAAK,IAAI;AACpC;AACA,SAAS,kBAAkB,GAAG;CAC7B,OAAO,OAAO,MAAM,YAAY,MAAM,QAAQ,UAAU,KAAK,OAAO,EAAE,SAAS,YAAY,sBAAsB,EAAE,IAAI,KAAK,aAAa,KAAK,OAAO,EAAE,YAAY;AACpK;AACA,SAAS,gBAAgB,MAAM,SAAS,SAAS;CAChD,MAAM,QAAQ,SAAS,UAAU,KAAK,IAAI,IAAI,MAAM,SAAS,EAAE,OAAO,QAAQ,MAAM,CAAC,IAAI,IAAI,MAAM,OAAO;CAC1G,OAAO,eAAe,OAAO,QAAQ;EACpC,OAAO;EACP,cAAc;CACf,CAAC;CACD,OAAO,OAAO,OAAO,OAAO;EAC3B;EACA,GAAG,UAAU,OAAO,SAAS,GAAG;EAChC,GAAG,UAAU,OAAO,SAAS,GAAG;EAChC,GAAG,UAAU,eAAe,SAAS,WAAW;EAChD,GAAG,UAAU,SAAS,SAAS,KAAK;EACpC,GAAG,UAAU,YAAY,SAAS,QAAQ;EAC1C,GAAG,UAAU,QAAQ,SAAS,IAAI;EAClC,GAAG,UAAU,WAAW,SAAS,OAAO;CACzC,CAAC;AACF;AACA,MAAM,sBAAsB;AAC5B,MAAM,YAAY;AAClB,SAAS,WAAW,MAAM;CACzB,OAAO,GAAG,UAAU,GAAG;AACxB"}
@@ -10,7 +10,7 @@
10
10
  * human edit), `done` (nothing further is required).
11
11
  *
12
12
  * A `command` never hardcodes a binary name. Write `{bin}` where the binary
13
- * goes — `{bin} ref set <name> <hash>` — and the surface that renders the
13
+ * goes — `{bin} migration ref set <name> <hash>` — and the surface that renders the
14
14
  * action substitutes the name of the binary the user actually ran. Angle
15
15
  * brackets mark a value only the user can supply; everything outside them is
16
16
  * literal and runnable.
@@ -53,9 +53,9 @@ interface StructuredErrorOptions {
53
53
  declare function isStructuredErrorCode(code: string): code is StructuredError['code'];
54
54
  declare function isStructuredError(e: unknown): e is StructuredError;
55
55
  declare function structuredError(code: StructuredError['code'], message: string, options?: StructuredErrorOptions): StructuredError;
56
- declare const DOCS_ERRORS_VERSION = "next";
57
- declare const DOCS_BASE = "https://docs.prisma.io/docs/orm/next/reference/error-reference";
56
+ declare const DOCS_ERRORS_VERSION = "v8";
57
+ declare const DOCS_BASE = "https://docs.prisma.io/docs/orm/v8/reference/error-reference";
58
58
  declare function docsUrlFor(code: string): string;
59
59
  //#endregion
60
60
  export { StructuredErrorOptions as a, isStructuredErrorCode as c, StructuredError as i, structuredError as l, DOCS_ERRORS_VERSION as n, docsUrlFor as o, NextAction as r, isStructuredError as s, DOCS_BASE as t };
61
- //# sourceMappingURL=structured-error-BsNT4Hun.d.mts.map
61
+ //# sourceMappingURL=structured-error-Z4iE-fTI.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"structured-error-BsNT4Hun.d.mts","names":[],"sources":["../../../../1-framework/0-foundation/utils/dist/structured-error.d.mts"],"mappings":";;;;;;;;;;;;;;;;;UAgBU;WACC;WACA;WACA;WACA;WACA;WACA;;UAED,wBAAwB;WACvB;WACA;WACA;WACA,uBAAuB;WACvB;aACE;aACA;;WAEF;WACA,OAAO;WACP;;UAED;WACC;WACA;WACA,uBAAuB;WACvB;aACE;aACA;;WAEF;WACA,OAAO;WACP;WACA;;;iBAGM,sBAAsB,eAAe,QAAQ;iBAC7C,kBAAkB,aAAa,KAAK;iBACpC,gBAAgB,MAAM,yBAAyB,iBAAiB,UAAU,yBAAyB;cACtG;cACA;iBACG,WAAW"}
1
+ {"version":3,"file":"structured-error-Z4iE-fTI.d.mts","names":[],"sources":["../../../../1-framework/0-foundation/utils/dist/structured-error.d.mts"],"mappings":";;;;;;;;;;;;;;;;;UAgBU;WACC;WACA;WACA;WACA;WACA;WACA;;UAED,wBAAwB;WACvB;WACA;WACA;WACA,uBAAuB;WACvB;aACE;aACA;;WAEF;WACA,OAAO;WACP;;UAED;WACC;WACA;WACA,uBAAuB;WACvB;aACE;aACA;;WAEF;WACA,OAAO;WACP;WACA;;;iBAGM,sBAAsB,eAAe,QAAQ;iBAC7C,kBAAkB,aAAa,KAAK;iBACpC,gBAAgB,MAAM,yBAAyB,iBAAiB,UAAU,yBAAyB;cACtG;cACA;iBACG,WAAW"}
@@ -0,0 +1,18 @@
1
+ //#region ../../../1-framework/0-foundation/utils/dist/suppress-idle-connection-errors.d.mts
2
+ //#region src/suppress-idle-connection-errors.d.ts
3
+ interface ErrorEventSource {
4
+ on(event: 'error', listener: (err: Error) => void): unknown;
5
+ }
6
+ /**
7
+ * Connection libraries emit 'error' on a pool or client when an idle
8
+ * connection drops (database restart, pooler timeout, network blip). With no
9
+ * listener Node treats that as an uncaught exception and kills the process.
10
+ * Connect and query failures still reject their own promises, so nothing real
11
+ * is masked. A pool discards the dead connection and hands the next query a
12
+ * fresh one; a single client stays unusable and its later operations reject.
13
+ * Idempotent per emitter: repeated calls attach one listener.
14
+ */
15
+ declare function suppressIdleConnectionErrors<T extends ErrorEventSource>(target: T): T;
16
+ //#endregion
17
+ export { suppressIdleConnectionErrors as t };
18
+ //# sourceMappingURL=suppress-idle-connection-errors-CKrTbp5P.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suppress-idle-connection-errors-CKrTbp5P.d.mts","names":[],"sources":["../../../../1-framework/0-foundation/utils/dist/suppress-idle-connection-errors.d.mts"],"mappings":";;UACU;EACR,GAAG,gBAAgB,WAAW,KAAK;;;;;;;;;;;iBAWpB,6BAA6B,UAAU,kBAAkB,QAAQ,IAAI"}
@@ -0,0 +1,22 @@
1
+ //#region ../../../1-framework/0-foundation/utils/dist/suppress-idle-connection-errors.mjs
2
+ const suppressed = /* @__PURE__ */ new WeakSet();
3
+ /**
4
+ * Connection libraries emit 'error' on a pool or client when an idle
5
+ * connection drops (database restart, pooler timeout, network blip). With no
6
+ * listener Node treats that as an uncaught exception and kills the process.
7
+ * Connect and query failures still reject their own promises, so nothing real
8
+ * is masked. A pool discards the dead connection and hands the next query a
9
+ * fresh one; a single client stays unusable and its later operations reject.
10
+ * Idempotent per emitter: repeated calls attach one listener.
11
+ */
12
+ function suppressIdleConnectionErrors(target) {
13
+ if (!suppressed.has(target)) {
14
+ suppressed.add(target);
15
+ target.on("error", () => {});
16
+ }
17
+ return target;
18
+ }
19
+ //#endregion
20
+ export { suppressIdleConnectionErrors as t };
21
+
22
+ //# sourceMappingURL=suppress-idle-connection-errors-DzApeUb3.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"suppress-idle-connection-errors-DzApeUb3.mjs","names":[],"sources":["../../../../1-framework/0-foundation/utils/dist/suppress-idle-connection-errors.mjs"],"sourcesContent":["//#region src/suppress-idle-connection-errors.ts\nconst suppressed = /* @__PURE__ */ new WeakSet();\n/**\n* Connection libraries emit 'error' on a pool or client when an idle\n* connection drops (database restart, pooler timeout, network blip). With no\n* listener Node treats that as an uncaught exception and kills the process.\n* Connect and query failures still reject their own promises, so nothing real\n* is masked. A pool discards the dead connection and hands the next query a\n* fresh one; a single client stays unusable and its later operations reject.\n* Idempotent per emitter: repeated calls attach one listener.\n*/\nfunction suppressIdleConnectionErrors(target) {\n\tif (!suppressed.has(target)) {\n\t\tsuppressed.add(target);\n\t\ttarget.on(\"error\", () => {});\n\t}\n\treturn target;\n}\n//#endregion\nexport { suppressIdleConnectionErrors };\n\n//# sourceMappingURL=suppress-idle-connection-errors.mjs.map"],"mappings":";AACA,MAAM,6BAA6B,IAAI,QAAQ;;;;;;;;;;AAU/C,SAAS,6BAA6B,QAAQ;CAC7C,IAAI,CAAC,WAAW,IAAI,MAAM,GAAG;EAC5B,WAAW,IAAI,MAAM;EACrB,OAAO,GAAG,eAAe,CAAC,CAAC;CAC5B;CACA,OAAO;AACR"}
@@ -1,8 +1,8 @@
1
- import { I as PslExtensionBlock, K as PslSpan, b as AuthoringPslBlockDescriptorNamespace } from "./framework-authoring-BhctBwih-DQ_6noDM.mjs";
2
- import "./authoring-B2H-9qCv.mjs";
3
- import "./psl-ast-BXZoFQBk.mjs";
4
- import { B as SyntaxNode, C as ModelAttributeAst, E as NamespaceDeclarationAst, F as Range, I as SourceFile, T as NamedTypeDeclarationAst, U as TypeAnnotationAst, d as DocumentAst, f as ExpressionAst, g as GenericBlockDeclarationAst, j as ParseDiagnostic, l as CompositeTypeDeclarationAst, m as FieldDeclarationAst, p as FieldAttributeAst, w as ModelDeclarationAst } from "./parse-0ZJjj_2N-DhQpSVmQ.mjs";
5
- //#region ../../../1-framework/2-authoring/psl-parser/dist/symbol-table-CZ7EVCTL.d.mts
1
+ import { J as PslSpan, L as PslExtensionBlock, x as AuthoringPslBlockDescriptorNamespace } from "./framework-authoring-BYgPL2X6-DMKO0Z_k.mjs";
2
+ import "./authoring-D2ngo2MB.mjs";
3
+ import "./psl-ast-BkfQwHjE.mjs";
4
+ import { B as SyntaxNode, C as ModelAttributeAst, E as NamespaceDeclarationAst, F as Range, I as SourceFile, T as NamedTypeDeclarationAst, U as TypeAnnotationAst, d as DocumentAst, f as ExpressionAst, g as GenericBlockDeclarationAst, j as ParseDiagnostic, l as CompositeTypeDeclarationAst, m as FieldDeclarationAst, p as FieldAttributeAst, w as ModelDeclarationAst } from "./parse-B5xYL_oV-aGFgfM8N.mjs";
5
+ //#region ../../../1-framework/2-authoring/psl-parser/dist/symbol-table-BeOQBu3C.d.mts
6
6
  //#region src/resolve.d.ts
7
7
  interface ResolvedAttributeArg {
8
8
  readonly kind: 'positional' | 'named';
@@ -122,4 +122,4 @@ interface SymbolTableResult {
122
122
  declare function buildSymbolTable(options: BuildSymbolTableOptions): SymbolTableResult;
123
123
  //#endregion
124
124
  export { nodePslSpan as _, ModelSymbol as a, readResolvedAttributes as b, ResolvedAttribute as c, ResolvedTypeConstructorCall as d, SymbolTable as f, keywordPslSpan as g, buildSymbolTable as h, FieldSymbol as i, ResolvedAttributeArg as l, TopLevelScope as m, BuildSymbolTableOptions as n, NamedTypeSymbol as o, SymbolTableResult as p, CompositeTypeSymbol as r, NamespaceSymbol as s, BlockSymbol as t, ResolvedNamedTypeBinding as u, rangeToPslSpan as v, readResolvedConstructorCall as x, readResolvedAttribute as y };
125
- //# sourceMappingURL=symbol-table-CZ7EVCTL-CR-ncCpD.d.mts.map
125
+ //# sourceMappingURL=symbol-table-BeOQBu3C-DduAXEh6.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"symbol-table-CZ7EVCTL-CR-ncCpD.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/symbol-table-CZ7EVCTL.d.mts"],"mappings":";;;;;;UAIU;WACC;WACA;WACA;WACA,aAAa;WACb,MAAM;;UAEP;WACC;WACA,eAAe;WACf,MAAM;;UAEP;WACC;WACA,eAAe;WACf,MAAM;;iBAEA,sBAAsB,WAAW,oBAAoB,mBAAmB,YAAY,aAAa;iBACjG,uBAAuB,YAAY,SAAS,oBAAoB,oBAAoB,YAAY,sBAAsB;iBACtH,4BAA4B,YAAY,+BAA+B,YAAY,aAAa;iBAChG,YAAY,MAAM,YAAY,YAAY,aAAa;;iBAEvD,eAAe,MAAM,YAAY,iBAAiB,YAAY,aAAa;iBAC3E,eAAe,OAAO,OAAO,YAAY,aAAa;;;UAG7D;WACC,UAAU;;UAEX;WACC,YAAY,eAAe;WAC3B,YAAY,eAAe;WAC3B,QAAQ,eAAe;WACvB,QAAQ,eAAe;WACvB,gBAAgB,eAAe;;UAEhC;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN,QAAQ,eAAe;WACvB,gBAAgB,eAAe;WAC/B,QAAQ,eAAe;;UAExB;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN,QAAQ,eAAe;WACvB,qBAAqB;;UAEtB;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN,QAAQ,eAAe;WACvB,qBAAqB;;UAEtB;WACC;WACA;WACA;WACA,MAAM;WACN,MAAM;;WAEN,OAAO;;UAER;WACC;WACA,kBAAkB;WAClB;WACA,qBAAqB;;;;;;;UAOtB,wBAAwB;WACvB;WACA;WACA,MAAM;WACN,MAAM;;UAEP;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN;WACA;WACA;WACA;WACA;WACA,kBAAkB;WAClB,qBAAqB;;WAErB;;UAED;WACC,UAAU;WACV,YAAY;WACZ,qBAAqB;;UAEtB;WACC,OAAO;WACP,sBAAsB;;;;;;iBAMhB,iBAAiB,SAAS,0BAA0B"}
1
+ {"version":3,"file":"symbol-table-BeOQBu3C-DduAXEh6.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/psl-parser/dist/symbol-table-BeOQBu3C.d.mts"],"mappings":";;;;;;UAIU;WACC;WACA;WACA;WACA,aAAa;WACb,MAAM;;UAEP;WACC;WACA,eAAe;WACf,MAAM;;UAEP;WACC;WACA,eAAe;WACf,MAAM;;iBAEA,sBAAsB,WAAW,oBAAoB,mBAAmB,YAAY,aAAa;iBACjG,uBAAuB,YAAY,SAAS,oBAAoB,oBAAoB,YAAY,sBAAsB;iBACtH,4BAA4B,YAAY,+BAA+B,YAAY,aAAa;iBAChG,YAAY,MAAM,YAAY,YAAY,aAAa;;iBAEvD,eAAe,MAAM,YAAY,iBAAiB,YAAY,aAAa;iBAC3E,eAAe,OAAO,OAAO,YAAY,aAAa;;;UAG7D;WACC,UAAU;;UAEX;WACC,YAAY,eAAe;WAC3B,YAAY,eAAe;WAC3B,QAAQ,eAAe;WACvB,QAAQ,eAAe;WACvB,gBAAgB,eAAe;;UAEhC;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN,QAAQ,eAAe;WACvB,gBAAgB,eAAe;WAC/B,QAAQ,eAAe;;UAExB;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN,QAAQ,eAAe;WACvB,qBAAqB;;UAEtB;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN,QAAQ,eAAe;WACvB,qBAAqB;;UAEtB;WACC;WACA;WACA;WACA,MAAM;WACN,MAAM;;WAEN,OAAO;;UAER;WACC;WACA,kBAAkB;WAClB;WACA,qBAAqB;;;;;;;UAOtB,wBAAwB;WACvB;WACA;WACA,MAAM;WACN,MAAM;;UAEP;WACC;WACA;WACA,MAAM;WACN,MAAM;WACN;WACA;WACA;WACA;WACA;WACA,kBAAkB;WAClB,qBAAqB;;WAErB;;UAED;WACC,UAAU;WACV,YAAY;WACZ,qBAAqB;;UAEtB;WACC,OAAO;WACP,sBAAsB;;;;;;iBAMhB,iBAAiB,SAAS,0BAA0B"}
@@ -1,2 +1,2 @@
1
- import { i as tsStringLiteral, n as jsonToTsSource, r as renderImports, t as TsExpression } from "./dist-Dqbo77p7.mjs";
1
+ import { i as tsStringLiteral, n as jsonToTsSource, r as renderImports, t as TsExpression } from "./dist-DUlexZHp.mjs";
2
2
  export { TsExpression, jsonToTsSource, renderImports, tsStringLiteral };
@@ -1,4 +1,4 @@
1
- import { S as ContractValueObject, g as ContractModelBase, n as ApplicationDomain } from "./domain-envelope-D6Wn9AmZ-BqZKTT9U.mjs";
1
+ import { g as ContractModelBase, n as ApplicationDomain, w as ContractValueObject } from "./domain-envelope-CENjHN4U-BIIt9bl4.mjs";
2
2
  //#region ../../../1-framework/0-foundation/contract/dist/types.d.mts
3
3
  //#region src/domain-namespace-access.d.ts
4
4
  /**
@@ -14,4 +14,4 @@ declare function domainModelsAtDefaultNamespace(domain: ApplicationDomain): Reco
14
14
  declare function domainValueObjectsAtDefaultNamespace(domain: ApplicationDomain): Record<string, ContractValueObject> | undefined;
15
15
  //#endregion
16
16
  export { domainValueObjectsAtDefaultNamespace as n, domainModelsAtDefaultNamespace as t };
17
- //# sourceMappingURL=types-ByeQhU9p.d.mts.map
17
+ //# sourceMappingURL=types-BKJi4we0.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-ByeQhU9p.d.mts","names":[],"sources":["../../../../1-framework/0-foundation/contract/dist/types.d.mts"],"mappings":";;;;;;;;iBAUiB,+BAA+B,QAAQ,oBAAoB,eAAe;;;;;iBAK1E,qCAAqC,QAAQ,oBAAoB,eAAe"}
1
+ {"version":3,"file":"types-BKJi4we0.d.mts","names":[],"sources":["../../../../1-framework/0-foundation/contract/dist/types.d.mts"],"mappings":";;;;;;;;iBAUiB,+BAA+B,QAAQ,oBAAoB,eAAe;;;;;iBAK1E,qCAAqC,QAAQ,oBAAoB,eAAe"}
@@ -1,5 +1,5 @@
1
1
  import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
2
- import { n as contractError, r as soleDomainNamespaceId } from "./default-namespace-D4vCwkXg-lzVN7gSc.mjs";
2
+ import { n as contractError, r as soleDomainNamespaceId } from "./default-namespace-D4vCwkXg-BEZbN38y.mjs";
3
3
  import { t as asNamespaceId } from "./namespace-id-asbWpwMw-3yxn-tRe.mjs";
4
4
  import { type } from "arktype";
5
5
  //#region ../../../1-framework/0-foundation/contract/dist/types.mjs
@@ -93,4 +93,4 @@ function isExecutionMutationDefaultValue(value) {
93
93
  //#endregion
94
94
  export { domainValueObjectsAtDefaultNamespace as a, isColumnDefault as c, profileHash as d, domainModelsAtDefaultNamespace as i, isColumnDefaultLiteralInputValue as l, coreHash as n, effectiveControlPolicy as o, crossRef as r, executionHash as s, CrossReferenceSchema as t, isExecutionMutationDefaultValue as u };
95
95
 
96
- //# sourceMappingURL=types-BnH4zYvN.mjs.map
96
+ //# sourceMappingURL=types-DG4qHrT8.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-BnH4zYvN.mjs","names":[],"sources":["../../../../1-framework/0-foundation/contract/dist/types.mjs"],"sourcesContent":["import { n as soleDomainNamespaceId, r as contractError, t as UNBOUND_DOMAIN_NAMESPACE_ID } from \"./default-namespace-D4vCwkXg.mjs\";\nimport { t as resolveDomainModel } from \"./resolve-domain-model-BovPAsW2.mjs\";\nimport { t as asNamespaceId } from \"./namespace-id-asbWpwMw.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { type } from \"arktype\";\n//#region src/control-policy.ts\n/**\n* Resolves the effective control policy for a storage-plane node.\n*\n* Precedence: node-level value → contract default → `'managed'`.\n*\n* Both parameters are optional raw values so this function stays node-type-agnostic\n* and can be called by any consumer (verifier, planner, etc.) without importing IR classes.\n*/\nfunction effectiveControlPolicy(nodeControl, defaultControlPolicy) {\n\treturn nodeControl ?? defaultControlPolicy ?? \"managed\";\n}\n//#endregion\n//#region src/cross-reference.ts\nconst CrossReferenceSchema = /* @__PURE__ */ blindCast(/* @__PURE__ */ type({\n\t\"+\": \"reject\",\n\tnamespace: \"string\",\n\tmodel: \"string\",\n\t\"space?\": \"string\"\n}));\nconst DEFAULT_CROSS_REF_NAMESPACE = \"__unbound__\";\nfunction crossRef(model, namespace = DEFAULT_CROSS_REF_NAMESPACE, space) {\n\treturn {\n\t\tnamespace: asNamespaceId(namespace),\n\t\tmodel,\n\t\t...space !== void 0 ? { space } : {}\n\t};\n}\n//#endregion\n//#region src/domain-namespace-access.ts\n/**\n* Models map for the contract's single domain namespace. Throws when the\n* contract does not declare exactly one namespace — bare-name access is\n* ambiguous across namespaces and must be qualified explicitly (TML-2550).\n*/\nfunction domainModelsAtDefaultNamespace(domain) {\n\tconst namespaceId = soleDomainNamespaceId(domain);\n\tconst domainNamespace = domain.namespaces[namespaceId];\n\tif (domainNamespace === void 0) throw contractError(\"CONTRACT.NAMESPACE_INVALID\", `domain namespace \"${namespaceId}\" is not present on the contract`, { meta: {\n\t\treason: \"domain-namespace-missing\",\n\t\tnamespaceId\n\t} });\n\treturn domainNamespace.models;\n}\n/**\n* Value objects for the contract's single domain namespace, when present.\n* Throws when the contract does not declare exactly one namespace.\n*/\nfunction domainValueObjectsAtDefaultNamespace(domain) {\n\treturn domain.namespaces[soleDomainNamespaceId(domain)]?.valueObjects;\n}\n//#endregion\n//#region src/types.ts\nfunction executionHash(value) {\n\treturn value;\n}\nfunction coreHash(value) {\n\treturn value;\n}\nfunction profileHash(value) {\n\treturn value;\n}\n/**\n* Runtime predicate for `ColumnDefaultLiteralInputValue`. Authoring layers\n* resolve template values from caller-supplied args (typed `unknown` at the\n* boundary) and need to validate before constructing a `ColumnDefault`.\n* Accepts JSON primitives, plain arrays/objects of JSON values, and `Date`\n* instances. Rejects functions, class instances (other than `Date`),\n* `undefined`, `bigint`, `symbol`, and arrays/objects containing those.\n*/\nfunction isColumnDefaultLiteralInputValue(value) {\n\tif (value === null) return true;\n\tconst t = typeof value;\n\tif (t === \"string\" || t === \"number\" || t === \"boolean\") return true;\n\tif (value instanceof Date) return true;\n\tif (Array.isArray(value)) return value.every(isColumnDefaultLiteralInputValue);\n\tif (t === \"object\" && Object.getPrototypeOf(value) === Object.prototype) return Object.values(value).every(isColumnDefaultLiteralInputValue);\n\treturn false;\n}\nfunction isColumnDefault(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst kind = value.kind;\n\tif (kind === \"literal\") return \"value\" in value;\n\tif (kind === \"function\") return typeof value.expression === \"string\";\n\treturn false;\n}\nfunction isExecutionMutationDefaultValue(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst candidate = value;\n\tif (candidate.kind !== \"generator\") return false;\n\tif (typeof candidate.id !== \"string\") return false;\n\tif (candidate.params !== void 0 && (typeof candidate.params !== \"object\" || candidate.params === null || Array.isArray(candidate.params))) return false;\n\treturn true;\n}\n//#endregion\nexport { CrossReferenceSchema, UNBOUND_DOMAIN_NAMESPACE_ID, asNamespaceId, coreHash, crossRef, domainModelsAtDefaultNamespace, domainValueObjectsAtDefaultNamespace, effectiveControlPolicy, executionHash, isColumnDefault, isColumnDefaultLiteralInputValue, isExecutionMutationDefaultValue, profileHash, resolveDomainModel, soleDomainNamespaceId };\n\n//# sourceMappingURL=types.mjs.map"],"mappings":";;;;;;;;;;;;;AAcA,SAAS,uBAAuB,aAAa,sBAAsB;CAClE,OAAO,eAAe,wBAAwB;AAC/C;AAGA,MAAM,uBAAuC,0BAA0B,qBAAK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OAAO,MAAM,eAAe;CAC5D,OAAO;AACR;AACA,SAAS,gCAAgC,OAAO;CAC/C,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;CACxD,MAAM,YAAY;CAClB,IAAI,UAAU,SAAS,aAAa,OAAO;CAC3C,IAAI,OAAO,UAAU,OAAO,UAAU,OAAO;CAC7C,IAAI,UAAU,WAAW,KAAK,MAAM,OAAO,UAAU,WAAW,YAAY,UAAU,WAAW,QAAQ,MAAM,QAAQ,UAAU,MAAM,IAAI,OAAO;CAClJ,OAAO;AACR"}
1
+ {"version":3,"file":"types-DG4qHrT8.mjs","names":[],"sources":["../../../../1-framework/0-foundation/contract/dist/types.mjs"],"sourcesContent":["import { n as soleDomainNamespaceId, r as contractError, t as UNBOUND_DOMAIN_NAMESPACE_ID } from \"./default-namespace-D4vCwkXg.mjs\";\nimport { t as resolveDomainModel } from \"./resolve-domain-model-BovPAsW2.mjs\";\nimport { t as asNamespaceId } from \"./namespace-id-asbWpwMw.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { type } from \"arktype\";\n//#region src/control-policy.ts\n/**\n* Resolves the effective control policy for a storage-plane node.\n*\n* Precedence: node-level value → contract default → `'managed'`.\n*\n* Both parameters are optional raw values so this function stays node-type-agnostic\n* and can be called by any consumer (verifier, planner, etc.) without importing IR classes.\n*/\nfunction effectiveControlPolicy(nodeControl, defaultControlPolicy) {\n\treturn nodeControl ?? defaultControlPolicy ?? \"managed\";\n}\n//#endregion\n//#region src/cross-reference.ts\nconst CrossReferenceSchema = /* @__PURE__ */ blindCast(/* @__PURE__ */ type({\n\t\"+\": \"reject\",\n\tnamespace: \"string\",\n\tmodel: \"string\",\n\t\"space?\": \"string\"\n}));\nconst DEFAULT_CROSS_REF_NAMESPACE = \"__unbound__\";\nfunction crossRef(model, namespace = DEFAULT_CROSS_REF_NAMESPACE, space) {\n\treturn {\n\t\tnamespace: asNamespaceId(namespace),\n\t\tmodel,\n\t\t...space !== void 0 ? { space } : {}\n\t};\n}\n//#endregion\n//#region src/domain-namespace-access.ts\n/**\n* Models map for the contract's single domain namespace. Throws when the\n* contract does not declare exactly one namespace — bare-name access is\n* ambiguous across namespaces and must be qualified explicitly (TML-2550).\n*/\nfunction domainModelsAtDefaultNamespace(domain) {\n\tconst namespaceId = soleDomainNamespaceId(domain);\n\tconst domainNamespace = domain.namespaces[namespaceId];\n\tif (domainNamespace === void 0) throw contractError(\"CONTRACT.NAMESPACE_INVALID\", `domain namespace \"${namespaceId}\" is not present on the contract`, { meta: {\n\t\treason: \"domain-namespace-missing\",\n\t\tnamespaceId\n\t} });\n\treturn domainNamespace.models;\n}\n/**\n* Value objects for the contract's single domain namespace, when present.\n* Throws when the contract does not declare exactly one namespace.\n*/\nfunction domainValueObjectsAtDefaultNamespace(domain) {\n\treturn domain.namespaces[soleDomainNamespaceId(domain)]?.valueObjects;\n}\n//#endregion\n//#region src/types.ts\nfunction executionHash(value) {\n\treturn value;\n}\nfunction coreHash(value) {\n\treturn value;\n}\nfunction profileHash(value) {\n\treturn value;\n}\n/**\n* Runtime predicate for `ColumnDefaultLiteralInputValue`. Authoring layers\n* resolve template values from caller-supplied args (typed `unknown` at the\n* boundary) and need to validate before constructing a `ColumnDefault`.\n* Accepts JSON primitives, plain arrays/objects of JSON values, and `Date`\n* instances. Rejects functions, class instances (other than `Date`),\n* `undefined`, `bigint`, `symbol`, and arrays/objects containing those.\n*/\nfunction isColumnDefaultLiteralInputValue(value) {\n\tif (value === null) return true;\n\tconst t = typeof value;\n\tif (t === \"string\" || t === \"number\" || t === \"boolean\") return true;\n\tif (value instanceof Date) return true;\n\tif (Array.isArray(value)) return value.every(isColumnDefaultLiteralInputValue);\n\tif (t === \"object\" && Object.getPrototypeOf(value) === Object.prototype) return Object.values(value).every(isColumnDefaultLiteralInputValue);\n\treturn false;\n}\nfunction isColumnDefault(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst kind = value.kind;\n\tif (kind === \"literal\") return \"value\" in value;\n\tif (kind === \"function\") return typeof value.expression === \"string\";\n\treturn false;\n}\nfunction isExecutionMutationDefaultValue(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst candidate = value;\n\tif (candidate.kind !== \"generator\") return false;\n\tif (typeof candidate.id !== \"string\") return false;\n\tif (candidate.params !== void 0 && (typeof candidate.params !== \"object\" || candidate.params === null || Array.isArray(candidate.params))) return false;\n\treturn true;\n}\n//#endregion\nexport { CrossReferenceSchema, UNBOUND_DOMAIN_NAMESPACE_ID, asNamespaceId, coreHash, crossRef, domainModelsAtDefaultNamespace, domainValueObjectsAtDefaultNamespace, effectiveControlPolicy, executionHash, isColumnDefault, isColumnDefaultLiteralInputValue, isExecutionMutationDefaultValue, profileHash, resolveDomainModel, soleDomainNamespaceId };\n\n//# sourceMappingURL=types.mjs.map"],"mappings":";;;;;;;;;;;;;AAcA,SAAS,uBAAuB,aAAa,sBAAsB;CAClE,OAAO,eAAe,wBAAwB;AAC/C;AAGA,MAAM,uBAAuC,0BAA0B,qBAAK;CAC3E,KAAK;CACL,WAAW;CACX,OAAO;CACP,UAAU;AACX,CAAC,CAAC;AACF,MAAM,8BAA8B;AACpC,SAAS,SAAS,OAAO,YAAY,6BAA6B,OAAO;CACxE,OAAO;EACN,WAAW,cAAc,SAAS;EAClC;EACA,GAAG,UAAU,KAAK,IAAI,EAAE,MAAM,IAAI,CAAC;CACpC;AACD;;;;;;AAQA,SAAS,+BAA+B,QAAQ;CAC/C,MAAM,cAAc,sBAAsB,MAAM;CAChD,MAAM,kBAAkB,OAAO,WAAW;CAC1C,IAAI,oBAAoB,KAAK,GAAG,MAAM,cAAc,8BAA8B,qBAAqB,YAAY,mCAAmC,EAAE,MAAM;EAC7J,QAAQ;EACR;CACD,EAAE,CAAC;CACH,OAAO,gBAAgB;AACxB;;;;;AAKA,SAAS,qCAAqC,QAAQ;CACrD,OAAO,OAAO,WAAW,sBAAsB,MAAM,EAAE,EAAE;AAC1D;AAGA,SAAS,cAAc,OAAO;CAC7B,OAAO;AACR;AACA,SAAS,SAAS,OAAO;CACxB,OAAO;AACR;AACA,SAAS,YAAY,OAAO;CAC3B,OAAO;AACR;;;;;;;;;AASA,SAAS,iCAAiC,OAAO;CAChD,IAAI,UAAU,MAAM,OAAO;CAC3B,MAAM,IAAI,OAAO;CACjB,IAAI,MAAM,YAAY,MAAM,YAAY,MAAM,WAAW,OAAO;CAChE,IAAI,iBAAiB,MAAM,OAAO;CAClC,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,MAAM,MAAM,gCAAgC;CAC7E,IAAI,MAAM,YAAY,OAAO,eAAe,KAAK,MAAM,OAAO,WAAW,OAAO,OAAO,OAAO,KAAK,CAAC,CAAC,MAAM,gCAAgC;CAC3I,OAAO;AACR;AACA,SAAS,gBAAgB,OAAO;CAC/B,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;CACxD,MAAM,OAAO,MAAM;CACnB,IAAI,SAAS,WAAW,OAAO,WAAW;CAC1C,IAAI,SAAS,YAAY,OAAO,OAAO,MAAM,eAAe;CAC5D,OAAO;AACR;AACA,SAAS,gCAAgC,OAAO;CAC/C,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;CACxD,MAAM,YAAY;CAClB,IAAI,UAAU,SAAS,aAAa,OAAO;CAC3C,IAAI,OAAO,UAAU,OAAO,UAAU,OAAO;CAC7C,IAAI,UAAU,WAAW,KAAK,MAAM,OAAO,UAAU,WAAW,YAAY,UAAU,WAAW,QAAQ,MAAM,QAAQ,UAAU,MAAM,IAAI,OAAO;CAClJ,OAAO;AACR"}
@@ -1,6 +1,6 @@
1
- import { z as JsonValue } from "./domain-envelope-D6Wn9AmZ-BqZKTT9U.mjs";
2
- import { d as CodecTrait, l as CodecRef } from "./codec-types-D6VRj2RE-BLElXc-O.mjs";
3
- //#region ../../../1-framework/1-core/framework-components/dist/types-import-spec-3mjbVBhI.d.mts
1
+ import { V as JsonValue } from "./domain-envelope-CENjHN4U-BIIt9bl4.mjs";
2
+ import { d as CodecTrait, l as CodecRef } from "./codec-types-nVMtogur-CYBdUQUH.mjs";
3
+ //#region ../../../1-framework/1-core/framework-components/dist/types-import-spec-BijT0b-s.d.mts
4
4
  //#region src/shared/aggregate-descriptor.d.ts
5
5
  /**
6
6
  * How a descriptor matches the value an aggregate consumes.
@@ -110,4 +110,4 @@ interface TypesImportSpec {
110
110
  }
111
111
  //#endregion
112
112
  export { AnyInputAggregateDescriptor as a, SelfAggregateOutput as c, aggregateDescriptorKey as d, isAggregateDescriptor as f, AggregateResultNullability as i, TypesImportSpec as l, isNoInputAggregateDescriptor as m, AggregateInputMatch as n, NamedAggregateOutput as o, isAnyInputAggregateDescriptor as p, AggregateOutputCodec as r, NoInputAggregateDescriptor as s, AggregateDescriptor as t, ValueInputAggregateDescriptor as u };
113
- //# sourceMappingURL=types-import-spec-3mjbVBhI-DQI6BvKU.d.mts.map
113
+ //# sourceMappingURL=types-import-spec-BijT0b-s-253rIcmj.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-import-spec-3mjbVBhI-DQI6BvKU.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/types-import-spec-3mjbVBhI.d.mts"],"mappings":";;;;;;;;;;;;;;KAaK;WACM;;WAEA;WACA;;WAEA;WACA,OAAO;;WAEP;;;;;;;UAOD;WACC;WACA;WACA,cAAc,OAAO,yBAAyB;;;UAG/C;WACC;;;KAGN,uBAAuB,sBAAsB;;;;;;KAM7C;WACM;;WAEA;WACA,iBAAiB;;KAEvB,0BAA0B;;WAEpB;;;KAGN,6BAA6B;WACvB;aACE;;WAEF,QAAQ;;;KAGd,8BAA8B;WACxB;aACE;;WAEF,QAAQ;;;KAGd,gCAAgC;WAC1B;aACE;aACA;;aAEA;aACA,OAAO;;WAET,QAAQ;;;;;;;KAOd,sBAAsB,6BAA6B,8BAA8B;;;;iBAIrE,uBAAuB,YAAY;;iBAEnC,6BAA6B,YAAY,sBAAsB,cAAc;;iBAE7E,8BAA8B,YAAY,sBAAsB,cAAc;;;;iBAI9E,sBAAsB,iBAAiB,SAAS;;;;;;;UAOvD;WACC;WACA;WACA"}
1
+ {"version":3,"file":"types-import-spec-BijT0b-s-253rIcmj.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/types-import-spec-BijT0b-s.d.mts"],"mappings":";;;;;;;;;;;;;;KAaK;WACM;;WAEA;WACA;;WAEA;WACA,OAAO;;WAEP;;;;;;;UAOD;WACC;WACA;WACA,cAAc,OAAO,yBAAyB;;;UAG/C;WACC;;;KAGN,uBAAuB,sBAAsB;;;;;;KAM7C;WACM;;WAEA;WACA,iBAAiB;;KAEvB,0BAA0B;;WAEpB;;;KAGN,6BAA6B;WACvB;aACE;;WAEF,QAAQ;;;KAGd,8BAA8B;WACxB;aACE;;WAEF,QAAQ;;;KAGd,gCAAgC;WAC1B;aACE;aACA;;aAEA;aACA,OAAO;;WAET,QAAQ;;;;;;;KAOd,sBAAsB,6BAA6B,8BAA8B;;;;iBAIrE,uBAAuB,YAAY;;iBAEnC,6BAA6B,YAAY,sBAAsB,cAAc;;iBAE7E,8BAA8B,YAAY,sBAAsB,cAAc;;;;iBAI9E,sBAAsB,iBAAiB,SAAS;;;;;;;UAOvD;WACC;WACA;WACA"}
package/dist/utils.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { i as JsonValue, n as JsonObject, r as JsonPrimitive, t as JsonArray } from "./json-Dkqr3say.mjs";
2
2
  import { a as ok, i as notOk, n as Ok, o as okVoid, r as Result, t as NotOk } from "./result-Bpupv5vO.mjs";
3
- import { a as StructuredErrorOptions, c as isStructuredErrorCode, i as StructuredError, l as structuredError, n as DOCS_ERRORS_VERSION, o as docsUrlFor, r as NextAction, s as isStructuredError, t as DOCS_BASE } from "./structured-error-BsNT4Hun.mjs";
3
+ import { a as StructuredErrorOptions, c as isStructuredErrorCode, i as StructuredError, l as structuredError, n as DOCS_ERRORS_VERSION, o as docsUrlFor, r as NextAction, s as isStructuredError, t as DOCS_BASE } from "./structured-error-Z4iE-fTI.mjs";
4
4
  import { n as UnionToIntersection, t as Simplify } from "./types-DGxlljKG.mjs";
5
5
  import { t as abortable } from "./abortable-DBbAaT_4.mjs";
6
6
  import { t as isArrayEqual } from "./array-equal-dUd-VPlk.mjs";
@@ -9,8 +9,9 @@ import { t as canonicalStringify } from "./canonical-stringify-Bl6agy_g.mjs";
9
9
  import { n as castAs, t as blindCast } from "./casts-D29CHGrr.mjs";
10
10
  import { t as ifDefined } from "./defined-BSXuxrnl.mjs";
11
11
  import { t as hashContent } from "./hash-content-DwEUh-Rx.mjs";
12
- import { n as assertNever, r as isInternalError, t as InternalError } from "./internal-error-kK8QvlDE.mjs";
12
+ import { n as assertNever, r as isInternalError, t as InternalError } from "./internal-error-2fJ9fcZX.mjs";
13
13
  import { t as isThenable } from "./promise-DHJWZv49.mjs";
14
14
  import { n as redactDatabaseUrl, t as RedactedDatabaseUrl } from "./redact-db-url-BlaloOwt.mjs";
15
15
  import { t as SimplifyDeep } from "./simplify-deep-Dw9I_ZUl.mjs";
16
- export { DOCS_BASE, DOCS_ERRORS_VERSION, InternalError, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type NextAction, type NotOk, type Ok, type RedactedDatabaseUrl, type Result, type Simplify, type SimplifyDeep, type StructuredError, type StructuredErrorOptions, type UnionToIntersection, abortable, assertDefined, assertNever, blindCast, canonicalStringify, castAs, docsUrlFor, hashContent, ifDefined, invariant, isArrayEqual, isInternalError, isStructuredError, isStructuredErrorCode, isThenable, notOk, ok, okVoid, redactDatabaseUrl, structuredError };
16
+ import { t as suppressIdleConnectionErrors } from "./suppress-idle-connection-errors-CKrTbp5P.mjs";
17
+ export { DOCS_BASE, DOCS_ERRORS_VERSION, InternalError, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type NextAction, type NotOk, type Ok, type RedactedDatabaseUrl, type Result, type Simplify, type SimplifyDeep, type StructuredError, type StructuredErrorOptions, type UnionToIntersection, abortable, assertDefined, assertNever, blindCast, canonicalStringify, castAs, docsUrlFor, hashContent, ifDefined, invariant, isArrayEqual, isInternalError, isStructuredError, isStructuredErrorCode, isThenable, notOk, ok, okVoid, redactDatabaseUrl, structuredError, suppressIdleConnectionErrors };
package/dist/utils.mjs CHANGED
@@ -1,13 +1,14 @@
1
1
  import { n as castAs, t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
2
2
  import { t as ifDefined } from "./defined-BQWA85QH-BRSBMULx.mjs";
3
- import { a as isStructuredErrorCode, i as isStructuredError, n as DOCS_ERRORS_VERSION, o as structuredError, r as docsUrlFor, t as DOCS_BASE } from "./structured-error-CgiSMpdU.mjs";
3
+ import { a as isStructuredErrorCode, i as isStructuredError, n as DOCS_ERRORS_VERSION, o as structuredError, r as docsUrlFor, t as DOCS_BASE } from "./structured-error-BXbihKQ-.mjs";
4
4
  import { t as isArrayEqual } from "./array-equal-28xupwIB.mjs";
5
5
  import { t as abortable } from "./abortable-CQO6uG9F.mjs";
6
- import { n as assertNever, r as isInternalError, t as InternalError } from "./internal-error-BIc-ehme-ouBQPoEL.mjs";
7
- import { n as invariant, t as assertDefined } from "./assertions-Cz-GWH8P.mjs";
6
+ import { n as assertNever, r as isInternalError, t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
7
+ import { n as invariant, t as assertDefined } from "./assertions-Dw1lZz_Q.mjs";
8
8
  import { t as canonicalStringify } from "./canonical-stringify-DY4NaAJi.mjs";
9
9
  import { t as hashContent } from "./hash-content-Bugg_nZn.mjs";
10
10
  import { t as isThenable } from "./promise-D8meygPf.mjs";
11
11
  import { t as redactDatabaseUrl } from "./redact-db-url-CRWJWdB1.mjs";
12
- import { n as ok, r as okVoid, t as notOk } from "./result-CBZ8X9mU.mjs";
13
- export { DOCS_BASE, DOCS_ERRORS_VERSION, InternalError, abortable, assertDefined, assertNever, blindCast, canonicalStringify, castAs, docsUrlFor, hashContent, ifDefined, invariant, isArrayEqual, isInternalError, isStructuredError, isStructuredErrorCode, isThenable, notOk, ok, okVoid, redactDatabaseUrl, structuredError };
12
+ import { n as ok, r as okVoid, t as notOk } from "./result-C0NUq1Ok.mjs";
13
+ import { t as suppressIdleConnectionErrors } from "./suppress-idle-connection-errors-DzApeUb3.mjs";
14
+ export { DOCS_BASE, DOCS_ERRORS_VERSION, InternalError, abortable, assertDefined, assertNever, blindCast, canonicalStringify, castAs, docsUrlFor, hashContent, ifDefined, invariant, isArrayEqual, isInternalError, isStructuredError, isStructuredErrorCode, isThenable, notOk, ok, okVoid, redactDatabaseUrl, structuredError, suppressIdleConnectionErrors };
@@ -1,2 +1,2 @@
1
- import { n as invariant, t as assertDefined } from "./assertions-Cz-GWH8P.mjs";
1
+ import { n as invariant, t as assertDefined } from "./assertions-Dw1lZz_Q.mjs";
2
2
  export { assertDefined, invariant };
@@ -1,2 +1,2 @@
1
- import { n as assertNever, r as isInternalError, t as InternalError } from "./internal-error-kK8QvlDE.mjs";
1
+ import { n as assertNever, r as isInternalError, t as InternalError } from "./internal-error-2fJ9fcZX.mjs";
2
2
  export { InternalError, assertNever, isInternalError };
@@ -1,2 +1,2 @@
1
- import { n as assertNever, r as isInternalError, t as InternalError } from "./internal-error-BIc-ehme-ouBQPoEL.mjs";
1
+ import { n as assertNever, r as isInternalError, t as InternalError } from "./internal-error-ChGYPVpq-DhUD05u0.mjs";
2
2
  export { InternalError, assertNever, isInternalError };
@@ -1,2 +1,2 @@
1
- import { n as ok, r as okVoid, t as notOk } from "./result-CBZ8X9mU.mjs";
1
+ import { n as ok, r as okVoid, t as notOk } from "./result-C0NUq1Ok.mjs";
2
2
  export { notOk, ok, okVoid };
@@ -1,2 +1,2 @@
1
- import { a as StructuredErrorOptions, c as isStructuredErrorCode, i as StructuredError, l as structuredError, n as DOCS_ERRORS_VERSION, o as docsUrlFor, r as NextAction, s as isStructuredError, t as DOCS_BASE } from "./structured-error-BsNT4Hun.mjs";
1
+ import { a as StructuredErrorOptions, c as isStructuredErrorCode, i as StructuredError, l as structuredError, n as DOCS_ERRORS_VERSION, o as docsUrlFor, r as NextAction, s as isStructuredError, t as DOCS_BASE } from "./structured-error-Z4iE-fTI.mjs";
2
2
  export { DOCS_BASE, DOCS_ERRORS_VERSION, type NextAction, type StructuredError, type StructuredErrorOptions, docsUrlFor, isStructuredError, isStructuredErrorCode, structuredError };
@@ -1,2 +1,2 @@
1
- import { a as isStructuredErrorCode, i as isStructuredError, n as DOCS_ERRORS_VERSION, o as structuredError, r as docsUrlFor, t as DOCS_BASE } from "./structured-error-CgiSMpdU.mjs";
1
+ import { a as isStructuredErrorCode, i as isStructuredError, n as DOCS_ERRORS_VERSION, o as structuredError, r as docsUrlFor, t as DOCS_BASE } from "./structured-error-BXbihKQ-.mjs";
2
2
  export { DOCS_BASE, DOCS_ERRORS_VERSION, docsUrlFor, isStructuredError, isStructuredErrorCode, structuredError };
@@ -0,0 +1,2 @@
1
+ import { t as suppressIdleConnectionErrors } from "./suppress-idle-connection-errors-CKrTbp5P.mjs";
2
+ export { suppressIdleConnectionErrors };
@@ -0,0 +1,2 @@
1
+ import { t as suppressIdleConnectionErrors } from "./suppress-idle-connection-errors-DzApeUb3.mjs";
2
+ export { suppressIdleConnectionErrors };
@@ -30,6 +30,7 @@ function validateContractDomain(contract) {
30
30
  validateRoots(contract, modelIndex, errors);
31
31
  validateVariantsAndBases(modelIndex, errors);
32
32
  validateRelationTargets(modelIndex, errors);
33
+ validateRelationNullability(modelIndex, errors);
33
34
  validateDiscriminators(modelIndex, errors);
34
35
  validateOwnership(contract, modelIndex, errors);
35
36
  validateValueObjectReferences(contract, errors);
@@ -79,6 +80,19 @@ function validateRelationTargets(modelIndex, errors) {
79
80
  if (!lookupModel(modelIndex, relation.to)) errors.push(`Relation "${relName}" on model "${namespaceId}:${modelName}" targets "${relation.to.namespace}:${relation.to.model}" which does not exist in domain.namespaces`);
80
81
  }
81
82
  }
83
+ function relationKindLabel(relation) {
84
+ return relation.on === void 0 ? "embed relation" : `${relation.cardinality} relation`;
85
+ }
86
+ function validateRelationNullability(modelIndex, errors) {
87
+ for (const { namespaceId, name: modelName, model } of iterateIndexedModels(modelIndex)) for (const [relName, relation] of Object.entries(model.relations ?? {})) {
88
+ const location = `Relation "${relName}" on model "${namespaceId}:${modelName}"`;
89
+ if (relation.on !== void 0 && (relation.cardinality === "1:1" || relation.cardinality === "N:1")) {
90
+ if (relation.nullable !== void 0 && typeof relation.nullable !== "boolean") errors.push(`${location} is a ${relation.cardinality} relation and its "nullable" must be a boolean`);
91
+ continue;
92
+ }
93
+ if (relation.nullable !== void 0) errors.push(`${location} is a ${relationKindLabel(relation)} and must not carry "nullable"`);
94
+ }
95
+ }
82
96
  function validateDiscriminators(modelIndex, errors) {
83
97
  for (const { namespaceId, name: modelName, model } of iterateIndexedModels(modelIndex)) {
84
98
  if (model.discriminator) {
@@ -140,4 +154,4 @@ function validateFieldModifiers(modelIndex, contract, errors) {
140
154
  //#endregion
141
155
  export { validateContractDomain as t };
142
156
 
143
- //# sourceMappingURL=validate-domain-BkvFlY3B.mjs.map
157
+ //# sourceMappingURL=validate-domain-CaT6wlDH.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-domain-CaT6wlDH.mjs","names":[],"sources":["../../../../1-framework/0-foundation/contract/dist/validate-domain.mjs"],"sourcesContent":["import { t as asNamespaceId } from \"./namespace-id-asbWpwMw.mjs\";\nimport { t as ContractValidationError } from \"./contract-validation-error-DEiWp_EI.mjs\";\n//#region src/validate-domain.ts\nfunction indexDomainModels(contract) {\n\tconst index = /* @__PURE__ */ new Map();\n\tfor (const [namespaceKey, namespace] of Object.entries(contract.domain.namespaces)) {\n\t\tconst namespaceId = asNamespaceId(namespaceKey);\n\t\tlet modelsInNamespace = index.get(namespaceId);\n\t\tif (modelsInNamespace === void 0) {\n\t\t\tmodelsInNamespace = /* @__PURE__ */ new Map();\n\t\t\tindex.set(namespaceId, modelsInNamespace);\n\t\t}\n\t\tfor (const [name, model] of Object.entries(namespace.models)) modelsInNamespace.set(name, {\n\t\t\tnamespaceId,\n\t\t\tname,\n\t\t\tmodel\n\t\t});\n\t}\n\treturn index;\n}\nfunction lookupModel(index, ref) {\n\treturn index.get(ref.namespace)?.get(ref.model);\n}\nfunction* iterateIndexedModels(index) {\n\tfor (const modelsInNamespace of index.values()) for (const entry of modelsInNamespace.values()) yield entry;\n}\nfunction validateContractDomain(contract) {\n\tconst errors = [];\n\tconst modelIndex = indexDomainModels(contract);\n\tvalidateRoots(contract, modelIndex, errors);\n\tvalidateVariantsAndBases(modelIndex, errors);\n\tvalidateRelationTargets(modelIndex, errors);\n\tvalidateRelationNullability(modelIndex, errors);\n\tvalidateDiscriminators(modelIndex, errors);\n\tvalidateOwnership(contract, modelIndex, errors);\n\tvalidateValueObjectReferences(contract, errors);\n\tvalidateFieldModifiers(modelIndex, contract, errors);\n\tif (errors.length > 0) throw new ContractValidationError(`Contract domain validation failed:\\n- ${errors.join(\"\\n- \")}`, \"domain\");\n}\nfunction validateRoots(contract, modelIndex, errors) {\n\tconst seenRootTargets = /* @__PURE__ */ new Map();\n\tfor (const [rootKey, crossRef] of Object.entries(contract.roots)) {\n\t\tlet modelsInNamespace = seenRootTargets.get(crossRef.namespace);\n\t\tif (modelsInNamespace === void 0) {\n\t\t\tmodelsInNamespace = /* @__PURE__ */ new Set();\n\t\t\tseenRootTargets.set(crossRef.namespace, modelsInNamespace);\n\t\t}\n\t\tif (modelsInNamespace.has(crossRef.model)) errors.push(`Duplicate root value: \"${crossRef.namespace}:${crossRef.model}\" is mapped by multiple root keys`);\n\t\tmodelsInNamespace.add(crossRef.model);\n\t\tif (!lookupModel(modelIndex, crossRef)) errors.push(`Root \"${rootKey}\" references model \"${crossRef.namespace}:${crossRef.model}\" which does not exist in domain.namespaces`);\n\t}\n}\nfunction validateVariantsAndBases(modelIndex, errors) {\n\tfor (const { namespaceId, name: modelName, model } of iterateIndexedModels(modelIndex)) {\n\t\tif (model.variants) for (const variantName of Object.keys(model.variants)) {\n\t\t\tconst variantEntry = lookupModel(modelIndex, {\n\t\t\t\tnamespace: namespaceId,\n\t\t\t\tmodel: variantName\n\t\t\t});\n\t\t\tif (!variantEntry) {\n\t\t\t\terrors.push(`Model \"${namespaceId}:${modelName}\" lists variant \"${variantName}\" which does not exist at that namespace coordinate`);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst variantBase = variantEntry.model.base;\n\t\t\tif (variantBase?.namespace !== namespaceId || variantBase?.model !== modelName) errors.push(`Variant \"${namespaceId}:${variantName}\" has base \"${variantBase?.namespace ?? \"?\"}:${variantBase?.model ?? \"(none)\"}\" but expected \"${namespaceId}:${modelName}\"`);\n\t\t}\n\t\tif (model.base) {\n\t\t\tconst baseEntry = lookupModel(modelIndex, model.base);\n\t\t\tif (!baseEntry) {\n\t\t\t\terrors.push(`Model \"${namespaceId}:${modelName}\" has base \"${model.base.namespace}:${model.base.model}\" which does not exist in domain.namespaces`);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!baseEntry.model.variants || !Object.hasOwn(baseEntry.model.variants, modelName)) errors.push(`Model \"${namespaceId}:${modelName}\" has base \"${model.base.namespace}:${model.base.model}\" which does not list it as a variant`);\n\t\t}\n\t}\n}\nfunction validateRelationTargets(modelIndex, errors) {\n\tfor (const { namespaceId, name: modelName, model } of iterateIndexedModels(modelIndex)) for (const [relName, relation] of Object.entries(model.relations ?? {})) {\n\t\tif (relation.to.space !== void 0) continue;\n\t\tif (!lookupModel(modelIndex, relation.to)) errors.push(`Relation \"${relName}\" on model \"${namespaceId}:${modelName}\" targets \"${relation.to.namespace}:${relation.to.model}\" which does not exist in domain.namespaces`);\n\t}\n}\nfunction relationKindLabel(relation) {\n\treturn relation.on === void 0 ? \"embed relation\" : `${relation.cardinality} relation`;\n}\nfunction validateRelationNullability(modelIndex, errors) {\n\tfor (const { namespaceId, name: modelName, model } of iterateIndexedModels(modelIndex)) for (const [relName, relation] of Object.entries(model.relations ?? {})) {\n\t\tconst location = `Relation \"${relName}\" on model \"${namespaceId}:${modelName}\"`;\n\t\tif (relation.on !== void 0 && (relation.cardinality === \"1:1\" || relation.cardinality === \"N:1\")) {\n\t\t\tif (relation.nullable !== void 0 && typeof relation.nullable !== \"boolean\") errors.push(`${location} is a ${relation.cardinality} relation and its \"nullable\" must be a boolean`);\n\t\t\tcontinue;\n\t\t}\n\t\tif (relation.nullable !== void 0) errors.push(`${location} is a ${relationKindLabel(relation)} and must not carry \"nullable\"`);\n\t}\n}\nfunction validateDiscriminators(modelIndex, errors) {\n\tfor (const { namespaceId, name: modelName, model } of iterateIndexedModels(modelIndex)) {\n\t\tif (model.discriminator) {\n\t\t\tif (!model.variants || Object.keys(model.variants).length === 0) errors.push(`Model \"${namespaceId}:${modelName}\" has discriminator but no variants`);\n\t\t\tif (!Object.hasOwn(model.fields, model.discriminator.field)) errors.push(`Discriminator field \"${model.discriminator.field}\" is not a field on model \"${namespaceId}:${modelName}\"`);\n\t\t}\n\t\tif (model.variants && Object.keys(model.variants).length > 0 && !model.discriminator) errors.push(`Model \"${namespaceId}:${modelName}\" has variants but no discriminator`);\n\t\tif (model.base) {\n\t\t\tif (model.discriminator) errors.push(`Model \"${namespaceId}:${modelName}\" has base and must not have discriminator`);\n\t\t\tif (model.variants && Object.keys(model.variants).length > 0) errors.push(`Model \"${namespaceId}:${modelName}\" has base and must not have variants`);\n\t\t}\n\t}\n}\nfunction validateOwnership(contract, modelIndex, errors) {\n\tfor (const { namespaceId, name: modelName, model } of iterateIndexedModels(modelIndex)) {\n\t\tif (!model.owner) continue;\n\t\tif (model.owner === modelName) errors.push(`Model \"${namespaceId}:${modelName}\" cannot own itself`);\n\t\tif (!lookupModel(modelIndex, {\n\t\t\tnamespace: namespaceId,\n\t\t\tmodel: model.owner\n\t\t})) errors.push(`Model \"${namespaceId}:${modelName}\" has owner \"${namespaceId}:${model.owner}\" which does not exist in domain.namespaces`);\n\t\tfor (const [rootKey, rootRef] of Object.entries(contract.roots)) if (rootRef.namespace === namespaceId && rootRef.model === modelName) errors.push(`Owned model \"${namespaceId}:${modelName}\" must not appear in roots (found as root \"${rootKey}\")`);\n\t}\n}\nfunction validateValueObjectReferences(contract, errors) {\n\tconst voNamesByNamespace = /* @__PURE__ */ new Map();\n\tfor (const [namespaceKey, namespace] of Object.entries(contract.domain.namespaces)) {\n\t\tconst namespaceId = asNamespaceId(namespaceKey);\n\t\tvoNamesByNamespace.set(namespaceId, new Set(Object.keys(namespace.valueObjects ?? {})));\n\t}\n\tfunction checkType(type, location, namespaceId) {\n\t\tif (!type) return;\n\t\tconst voNames = voNamesByNamespace.get(namespaceId) ?? /* @__PURE__ */ new Set();\n\t\tif (type.kind === \"valueObject\" && type.name && !voNames.has(type.name)) {\n\t\t\terrors.push(`${location} references value object \"${namespaceId}:${type.name}\" which does not exist in that namespace's valueObjects`);\n\t\t\treturn;\n\t\t}\n\t\tif (type.kind === \"union\") for (const member of type.members ?? []) checkType(member, location, namespaceId);\n\t}\n\tfor (const [namespaceKey, namespace] of Object.entries(contract.domain.namespaces)) {\n\t\tconst namespaceId = asNamespaceId(namespaceKey);\n\t\tfor (const [modelName, model] of Object.entries(namespace.models)) for (const [fieldName, field] of Object.entries(model.fields)) checkType(field?.type, `Model \"${namespaceId}:${modelName}\" field \"${fieldName}\"`, namespaceId);\n\t\tfor (const [voName, vo] of Object.entries(namespace.valueObjects ?? {})) for (const [fieldName, field] of Object.entries(vo.fields)) checkType(field?.type, `Value object \"${namespaceId}:${voName}\" field \"${fieldName}\"`, namespaceId);\n\t}\n}\nfunction validateFieldModifiers(modelIndex, contract, errors) {\n\tfor (const { namespaceId, name: modelName, model } of iterateIndexedModels(modelIndex)) for (const [fieldName, field] of Object.entries(model.fields)) {\n\t\tconst f = field;\n\t\tif (f?.many && f?.dict) errors.push(`Model \"${namespaceId}:${modelName}\" field \"${fieldName}\" cannot have both \"many\" and \"dict\" modifiers`);\n\t}\n\tfor (const [namespaceKey, namespace] of Object.entries(contract.domain.namespaces)) {\n\t\tconst namespaceId = asNamespaceId(namespaceKey);\n\t\tfor (const [voName, vo] of Object.entries(namespace.valueObjects ?? {})) for (const [fieldName, field] of Object.entries(vo.fields)) {\n\t\t\tconst f = field;\n\t\t\tif (f?.many && f?.dict) errors.push(`Value object \"${namespaceId}:${voName}\" field \"${fieldName}\" cannot have both \"many\" and \"dict\" modifiers`);\n\t\t}\n\t}\n}\n//#endregion\nexport { validateContractDomain };\n\n//# sourceMappingURL=validate-domain.mjs.map"],"mappings":";;;AAGA,SAAS,kBAAkB,UAAU;CACpC,MAAM,wBAAwB,IAAI,IAAI;CACtC,KAAK,MAAM,CAAC,cAAc,cAAc,OAAO,QAAQ,SAAS,OAAO,UAAU,GAAG;EACnF,MAAM,cAAc,cAAc,YAAY;EAC9C,IAAI,oBAAoB,MAAM,IAAI,WAAW;EAC7C,IAAI,sBAAsB,KAAK,GAAG;GACjC,oCAAoC,IAAI,IAAI;GAC5C,MAAM,IAAI,aAAa,iBAAiB;EACzC;EACA,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAQ,UAAU,MAAM,GAAG,kBAAkB,IAAI,MAAM;GACzF;GACA;GACA;EACD,CAAC;CACF;CACA,OAAO;AACR;AACA,SAAS,YAAY,OAAO,KAAK;CAChC,OAAO,MAAM,IAAI,IAAI,SAAS,CAAC,EAAE,IAAI,IAAI,KAAK;AAC/C;AACA,UAAU,qBAAqB,OAAO;CACrC,KAAK,MAAM,qBAAqB,MAAM,OAAO,GAAG,KAAK,MAAM,SAAS,kBAAkB,OAAO,GAAG,MAAM;AACvG;AACA,SAAS,uBAAuB,UAAU;CACzC,MAAM,SAAS,CAAC;CAChB,MAAM,aAAa,kBAAkB,QAAQ;CAC7C,cAAc,UAAU,YAAY,MAAM;CAC1C,yBAAyB,YAAY,MAAM;CAC3C,wBAAwB,YAAY,MAAM;CAC1C,4BAA4B,YAAY,MAAM;CAC9C,uBAAuB,YAAY,MAAM;CACzC,kBAAkB,UAAU,YAAY,MAAM;CAC9C,8BAA8B,UAAU,MAAM;CAC9C,uBAAuB,YAAY,UA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C,CAAC,GAAG,KAAK,MAAM,CAAC,WAAW,UAAU,OAAO,QAAQ,GAAG,MAAM,GAAG,UAAU,OAAO,MAAM,iBAAiB,YAAY,GAAG,OAAO,WAAW,UAAU,IAAI,WAAW;CACxO;AACD;AACA,SAAS,uBAAuB,YAAY,UAAU,QAAQ;CAC7D,KAAK,MAAM,EAAE,aAAa,MAAM,WAAW,WAAW,qBAAqB,UAAU,GAAG,KAAK,MAAM,CAAC,WAAW,UAAU,OAAO,QAAQ,MAAM,MAAM,GAAG;EACtJ,MAAM,IAAI;EACV,IAAI,GAAG,QAAQ,GAAG,MAAM,OAAO,KAAK,UAAU,YAAY,GAAG,UAAU,WAAW,UAAU,+CAA+C;CAC5I;CACA,KAAK,MAAM,CAAC,cAAc,cAAc,OAAO,QAAQ,SAAS,OAAO,UAAU,GAAG;EACnF,MAAM,cAAc,cAAc,YAAY;EAC9C,KAAK,MAAM,CAAC,QAAQ,OAAO,OAAO,QAAQ,UAAU,gBAAgB,CAAC,CAAC,GAAG,KAAK,MAAM,CAAC,WAAW,UAAU,OAAO,QAAQ,GAAG,MAAM,GAAG;GACpI,MAAM,IAAI;GACV,IAAI,GAAG,QAAQ,GAAG,MAAM,OAAO,KAAK,iBAAiB,YAAY,GAAG,OAAO,WAAW,UAAU,+CAA+C;EAChJ;CACD;AACD"}
@@ -1,11 +1,15 @@
1
- import { T as CrossReference, w as ContractWithDomain } from "./domain-envelope-D6Wn9AmZ-BqZKTT9U.mjs";
1
+ import { D as CrossReference, E as ContractWithDomain } from "./domain-envelope-CENjHN4U-BIIt9bl4.mjs";
2
2
  //#region ../../../1-framework/0-foundation/contract/dist/validate-domain.d.mts
3
3
  //#region src/validate-domain.d.ts
4
+ interface DomainRelationShape {
5
+ readonly to: CrossReference;
6
+ readonly cardinality?: string;
7
+ readonly on?: unknown;
8
+ readonly nullable?: unknown;
9
+ }
4
10
  interface DomainModelShape {
5
11
  readonly fields: Record<string, unknown>;
6
- readonly relations?: Record<string, {
7
- readonly to: CrossReference;
8
- }>;
12
+ readonly relations?: Record<string, DomainRelationShape>;
9
13
  readonly discriminator?: {
10
14
  readonly field: string;
11
15
  };
@@ -19,4 +23,4 @@ interface DomainContractShape extends ContractWithDomain {
19
23
  declare function validateContractDomain(contract: DomainContractShape): void;
20
24
  //#endregion
21
25
  export { DomainModelShape as n, validateContractDomain as r, DomainContractShape as t };
22
- //# sourceMappingURL=validate-domain-BNBs-TVv.d.mts.map
26
+ //# sourceMappingURL=validate-domain-DJXNOlkP.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-domain-DJXNOlkP.d.mts","names":[],"sources":["../../../../1-framework/0-foundation/contract/dist/validate-domain.d.mts"],"mappings":";;;UAEU;WACC,IAAI;WACJ;WACA;WACA;;UAED;WACC,QAAQ;WACR,YAAY,eAAe;WAC3B;aACE;;WAEF,WAAW;WACX,OAAO;WACP;;UAED,4BAA4B;WAC3B,OAAO,eAAe;;iBAEhB,uBAAuB,UAAU"}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@prisma/orm-framework",
3
- "version": "8.0.0-rc.1-dev.46",
3
+ "version": "8.0.0-rc.10-dev.1",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
- "description": "Prisma Next target-agnostic runtime: contract, components, authoring surface",
7
+ "description": "Prisma 8 target-agnostic runtime: contract, components, authoring surface",
8
8
  "files": [
9
9
  "dist"
10
10
  ],
@@ -15,23 +15,23 @@
15
15
  "uniku": "^0.5.0"
16
16
  },
17
17
  "devDependencies": {
18
- "@internal/config": "8.0.0-rc.1-dev.46",
19
- "@internal/contract": "8.0.0-rc.1-dev.46",
20
- "@internal/contract-authoring": "8.0.0-rc.1-dev.46",
21
- "@internal/errors": "8.0.0-rc.1-dev.46",
22
- "@internal/framework-components": "8.0.0-rc.1-dev.46",
23
- "@internal/ids": "8.0.0-rc.1-dev.46",
24
- "@internal/operations": "8.0.0-rc.1-dev.46",
25
- "@internal/psl-parser": "8.0.0-rc.1-dev.46",
26
- "@internal/psl-printer": "8.0.0-rc.1-dev.46",
27
- "@internal/ts-render": "8.0.0-rc.1-dev.46",
28
- "@repo/tsconfig": "8.0.0-rc.1-dev.46",
29
- "@internal/publish-surface": "8.0.0-rc.1-dev.46",
30
- "@repo/tsdown": "8.0.0-rc.1-dev.46",
31
- "@internal/utils": "8.0.0-rc.1-dev.46",
18
+ "@internal/config": "8.0.0-rc.10-dev.1",
19
+ "@internal/contract": "8.0.0-rc.10-dev.1",
20
+ "@internal/contract-authoring": "8.0.0-rc.10-dev.1",
21
+ "@internal/errors": "8.0.0-rc.10-dev.1",
22
+ "@internal/framework-components": "8.0.0-rc.10-dev.1",
23
+ "@internal/ids": "8.0.0-rc.10-dev.1",
24
+ "@internal/operations": "8.0.0-rc.10-dev.1",
25
+ "@internal/psl-parser": "8.0.0-rc.10-dev.1",
26
+ "@internal/psl-printer": "8.0.0-rc.10-dev.1",
27
+ "@internal/ts-render": "8.0.0-rc.10-dev.1",
28
+ "@repo/tsconfig": "8.0.0-rc.10-dev.1",
29
+ "@internal/publish-surface": "8.0.0-rc.10-dev.1",
30
+ "@repo/tsdown": "8.0.0-rc.10-dev.1",
31
+ "@internal/utils": "8.0.0-rc.10-dev.1",
32
32
  "tsdown": "0.22.14",
33
33
  "typescript": "5.9.3",
34
- "vitest": "4.1.10"
34
+ "vitest": "5.0.0-rc.2"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "typescript": ">=5.9"
@@ -97,12 +97,13 @@
97
97
  "./utils/result": "./dist/utils__result.mjs",
98
98
  "./utils/simplify-deep": "./dist/utils__simplify-deep.mjs",
99
99
  "./utils/structured-error": "./dist/utils__structured-error.mjs",
100
+ "./utils/suppress-idle-connection-errors": "./dist/utils__suppress-idle-connection-errors.mjs",
100
101
  "./utils/types": "./dist/utils__types.mjs",
101
102
  "./package.json": "./package.json"
102
103
  },
103
104
  "repository": {
104
105
  "type": "git",
105
- "url": "https://github.com/prisma/prisma.git",
106
+ "url": "https://github.com/prisma/orm.git",
106
107
  "directory": "packages/9-public/@prisma/orm-framework"
107
108
  },
108
109
  "scripts": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"apply-specifier-default-control-policy-CAxiXxKg.d.mts","names":[],"sources":["../../../../1-framework/0-foundation/contract/dist/apply-specifier-default-control-policy.d.mts"],"mappings":";;;iBAEiB,mCAAmC,UAAU,UAAU,kBAAkB,4BAA4B"}
@@ -1 +0,0 @@
1
- import "./framework-authoring-BhctBwih-DQ_6noDM.mjs";
@@ -1,67 +0,0 @@
1
- //#region ../../../1-framework/1-core/config/dist/config-types.mjs
2
- /**
3
- * Default *source* directory for the contract file the user authors at `init`
4
- * time. Output artefacts colocate with source per the same rule path-bearing
5
- * providers apply.
6
- */
7
- const DEFAULT_CONTRACT_SOURCE_DIR = "src/prisma";
8
- function normalizeContractConfig(contract) {
9
- const inMemoryFallbackOutput = `${DEFAULT_CONTRACT_SOURCE_DIR}/contract.json`;
10
- return {
11
- source: contract.source,
12
- output: contract.output ?? inMemoryFallbackOutput
13
- };
14
- }
15
- /**
16
- * Version of the config format produced by this `defineConfig`. Bumped when
17
- * the config shape changes incompatibly.
18
- */
19
- const CONFIG_FORMAT_VERSION = 1;
20
- const CONFIG_FORMAT_VERSION_KEY = Symbol.for("prisma-next.config-format-version");
21
- function stampConfigFormatVersion(config) {
22
- Object.defineProperty(config, CONFIG_FORMAT_VERSION_KEY, {
23
- value: 1,
24
- enumerable: false,
25
- configurable: false,
26
- writable: false
27
- });
28
- return config;
29
- }
30
- /**
31
- * Reads the config-format version stamped by `defineConfig`, or `undefined`
32
- * when the value was not produced by `defineConfig`. The marker is
33
- * non-enumerable and does not survive spreads: configs must export the
34
- * `defineConfig` result directly.
35
- */
36
- function readConfigFormatVersion(value) {
37
- if (typeof value !== "object" || value === null) return;
38
- const version = Reflect.get(value, CONFIG_FORMAT_VERSION_KEY);
39
- return typeof version === "number" ? version : void 0;
40
- }
41
- function hasCurrentConfigFormatVersion(value) {
42
- return readConfigFormatVersion(value) === 1;
43
- }
44
- /**
45
- * Helper function to define a Prisma Next config.
46
- * Normalizes the config and stamps it with the config-format version marker.
47
- * Structural validation happens in the config loader, which reports
48
- * per-section diagnostics instead of failing the whole load.
49
- *
50
- * Normalization:
51
- * - contract.output defaults to a path colocated with DEFAULT_CONTRACT_SOURCE_DIR
52
- * when missing (in-memory-only providers)
53
- *
54
- * @param config - Raw config input from user
55
- * @returns Normalized config IR with defaults applied
56
- */
57
- function defineConfig(config) {
58
- if (config.contract) return stampConfigFormatVersion({
59
- ...config,
60
- contract: normalizeContractConfig(config.contract)
61
- });
62
- return stampConfigFormatVersion(config);
63
- }
64
- //#endregion
65
- export { normalizeContractConfig as a, hasCurrentConfigFormatVersion as i, DEFAULT_CONTRACT_SOURCE_DIR as n, readConfigFormatVersion as o, defineConfig as r, CONFIG_FORMAT_VERSION as t };
66
-
67
- //# sourceMappingURL=config-types-BqhNxw0z.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config-types-BqhNxw0z.mjs","names":[],"sources":["../../../../1-framework/1-core/config/dist/config-types.mjs"],"sourcesContent":["//#region src/config-types.ts\n/**\n* Default *source* directory for the contract file the user authors at `init`\n* time. Output artefacts colocate with source per the same rule path-bearing\n* providers apply.\n*/\nconst DEFAULT_CONTRACT_SOURCE_DIR = \"src/prisma\";\nfunction normalizeContractConfig(contract) {\n\tconst inMemoryFallbackOutput = `${DEFAULT_CONTRACT_SOURCE_DIR}/contract.json`;\n\treturn {\n\t\tsource: contract.source,\n\t\toutput: contract.output ?? inMemoryFallbackOutput\n\t};\n}\n/**\n* Version of the config format produced by this `defineConfig`. Bumped when\n* the config shape changes incompatibly.\n*/\nconst CONFIG_FORMAT_VERSION = 1;\nconst CONFIG_FORMAT_VERSION_KEY = Symbol.for(\"prisma-next.config-format-version\");\nfunction stampConfigFormatVersion(config) {\n\tObject.defineProperty(config, CONFIG_FORMAT_VERSION_KEY, {\n\t\tvalue: 1,\n\t\tenumerable: false,\n\t\tconfigurable: false,\n\t\twritable: false\n\t});\n\treturn config;\n}\n/**\n* Reads the config-format version stamped by `defineConfig`, or `undefined`\n* when the value was not produced by `defineConfig`. The marker is\n* non-enumerable and does not survive spreads: configs must export the\n* `defineConfig` result directly.\n*/\nfunction readConfigFormatVersion(value) {\n\tif (typeof value !== \"object\" || value === null) return;\n\tconst version = Reflect.get(value, CONFIG_FORMAT_VERSION_KEY);\n\treturn typeof version === \"number\" ? version : void 0;\n}\nfunction hasCurrentConfigFormatVersion(value) {\n\treturn readConfigFormatVersion(value) === 1;\n}\n/**\n* Helper function to define a Prisma Next config.\n* Normalizes the config and stamps it with the config-format version marker.\n* Structural validation happens in the config loader, which reports\n* per-section diagnostics instead of failing the whole load.\n*\n* Normalization:\n* - contract.output defaults to a path colocated with DEFAULT_CONTRACT_SOURCE_DIR\n* when missing (in-memory-only providers)\n*\n* @param config - Raw config input from user\n* @returns Normalized config IR with defaults applied\n*/\nfunction defineConfig(config) {\n\tif (config.contract) return stampConfigFormatVersion({\n\t\t...config,\n\t\tcontract: normalizeContractConfig(config.contract)\n\t});\n\treturn stampConfigFormatVersion(config);\n}\n//#endregion\nexport { CONFIG_FORMAT_VERSION, DEFAULT_CONTRACT_SOURCE_DIR, defineConfig, hasCurrentConfigFormatVersion, normalizeContractConfig, readConfigFormatVersion };\n\n//# sourceMappingURL=config-types.mjs.map"],"mappings":";;;;;;AAMA,MAAM,8BAA8B;AACpC,SAAS,wBAAwB,UAAU;CAC1C,MAAM,yBAAyB,GAAG,4BAA4B;CAC9D,OAAO;EACN,QAAQ,SAAS;EACjB,QAAQ,SAAS,UAAU;CAC5B;AACD;;;;;AAKA,MAAM,wBAAwB;AAC9B,MAAM,4BAA4B,OAAO,IAAI,mCAAmC;AAChF,SAAS,yBAAyB,QAAQ;CACzC,OAAO,eAAe,QAAQ,2BAA2B;EACxD,OAAO;EACP,YAAY;EACZ,cAAc;EACd,UAAU;CACX,CAAC;CACD,OAAO;AACR;;;;;;;AAOA,SAAS,wBAAwB,OAAO;CACvC,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM;CACjD,MAAM,UAAU,QAAQ,IAAI,OAAO,yBAAyB;CAC5D,OAAO,OAAO,YAAY,WAAW,UAAU,KAAK;AACrD;AACA,SAAS,8BAA8B,OAAO;CAC7C,OAAO,wBAAwB,KAAK,MAAM;AAC3C;;;;;;;;;;;;;;AAcA,SAAS,aAAa,QAAQ;CAC7B,IAAI,OAAO,UAAU,OAAO,yBAAyB;EACpD,GAAG;EACH,UAAU,wBAAwB,OAAO,QAAQ;CAClD,CAAC;CACD,OAAO,yBAAyB,MAAM;AACvC"}