@prisma/orm-framework 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (332) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +27 -0
  3. package/dist/abortable-CQO6uG9F.mjs +39 -0
  4. package/dist/abortable-CQO6uG9F.mjs.map +1 -0
  5. package/dist/abortable-DBbAaT_4.d.mts +29 -0
  6. package/dist/abortable-DBbAaT_4.d.mts.map +1 -0
  7. package/dist/apply-specifier-default-control-policy-CAxiXxKg.d.mts +7 -0
  8. package/dist/apply-specifier-default-control-policy-CAxiXxKg.d.mts.map +1 -0
  9. package/dist/apply-specifier-default-control-policy-CsYHsfTF.mjs +12 -0
  10. package/dist/apply-specifier-default-control-policy-CsYHsfTF.mjs.map +1 -0
  11. package/dist/array-equal-28xupwIB.mjs +26 -0
  12. package/dist/array-equal-28xupwIB.mjs.map +1 -0
  13. package/dist/array-equal-dUd-VPlk.d.mts +22 -0
  14. package/dist/array-equal-dUd-VPlk.d.mts.map +1 -0
  15. package/dist/assertions-BEQnOIQd.d.mts +31 -0
  16. package/dist/assertions-BEQnOIQd.d.mts.map +1 -0
  17. package/dist/assertions-Cz-GWH8P.mjs +36 -0
  18. package/dist/assertions-Cz-GWH8P.mjs.map +1 -0
  19. package/dist/authoring-Dd7p6pTS.d.mts +1 -0
  20. package/dist/canonical-stringify-Bl6agy_g.d.mts +51 -0
  21. package/dist/canonical-stringify-Bl6agy_g.d.mts.map +1 -0
  22. package/dist/canonical-stringify-DY4NaAJi.mjs +104 -0
  23. package/dist/canonical-stringify-DY4NaAJi.mjs.map +1 -0
  24. package/dist/canonicalization-DFpB09nP-4OdB2nsy.d.mts +69 -0
  25. package/dist/canonicalization-DFpB09nP-4OdB2nsy.d.mts.map +1 -0
  26. package/dist/canonicalization-path-match-CNgHuwM_-CCPBeUuk.mjs +25 -0
  27. package/dist/canonicalization-path-match-CNgHuwM_-CCPBeUuk.mjs.map +1 -0
  28. package/dist/capabilities-CPj7MfXO-GRkp0Q_D.mjs +64 -0
  29. package/dist/capabilities-CPj7MfXO-GRkp0Q_D.mjs.map +1 -0
  30. package/dist/capabilities-Cupq4-1--C71ORI3N.d.mts +34 -0
  31. package/dist/capabilities-Cupq4-1--C71ORI3N.d.mts.map +1 -0
  32. package/dist/casts-D29CHGrr.d.mts +78 -0
  33. package/dist/casts-D29CHGrr.d.mts.map +1 -0
  34. package/dist/casts-DpaahrlC-Bd5n2coI.mjs +82 -0
  35. package/dist/casts-DpaahrlC-Bd5n2coI.mjs.map +1 -0
  36. package/dist/codec-Cly9VPoA.mjs +78 -0
  37. package/dist/codec-Cly9VPoA.mjs.map +1 -0
  38. package/dist/codec-D3GVAkR_.d.mts +116 -0
  39. package/dist/codec-D3GVAkR_.d.mts.map +1 -0
  40. package/dist/codec-types-XJO6eC9U-B_K2q0zm.d.mts +221 -0
  41. package/dist/codec-types-XJO6eC9U-B_K2q0zm.d.mts.map +1 -0
  42. package/dist/components-CawuxTia.d.mts +1 -0
  43. package/dist/components.d.mts +20 -0
  44. package/dist/components.mjs +15 -0
  45. package/dist/components__authoring.d.mts +3 -0
  46. package/dist/components__authoring.mjs +2 -0
  47. package/dist/components__codec.d.mts +3 -0
  48. package/dist/components__codec.mjs +3 -0
  49. package/dist/components__components.d.mts +4 -0
  50. package/dist/components__components.mjs +3 -0
  51. package/dist/components__control.d.mts +4 -0
  52. package/dist/components__control.mjs +2 -0
  53. package/dist/components__emission.d.mts +4 -0
  54. package/dist/components__emission.mjs +2 -0
  55. package/dist/components__execution.d.mts +2 -0
  56. package/dist/components__execution.mjs +2 -0
  57. package/dist/components__ir.d.mts +3 -0
  58. package/dist/components__ir.mjs +3 -0
  59. package/dist/components__psl-ast.d.mts +4 -0
  60. package/dist/components__psl-ast.mjs +2 -0
  61. package/dist/components__runtime.d.mts +2 -0
  62. package/dist/components__runtime.mjs +3 -0
  63. package/dist/components__utils.d.mts +2 -0
  64. package/dist/components__utils.mjs +2 -0
  65. package/dist/config-errors-CBdiX587-DwIyJIX9.mjs +9 -0
  66. package/dist/config-errors-CBdiX587-DwIyJIX9.mjs.map +1 -0
  67. package/dist/config-types-Cf9lVsHR.mjs +62 -0
  68. package/dist/config-types-Cf9lVsHR.mjs.map +1 -0
  69. package/dist/config-types-W-87vhZ4-BgYaH8YO.d.mts +162 -0
  70. package/dist/config-types-W-87vhZ4-BgYaH8YO.d.mts.map +1 -0
  71. package/dist/config-types-zrHI32Om.d.mts +1 -0
  72. package/dist/config-validation-ByGTw6zQ.mjs +99 -0
  73. package/dist/config-validation-ByGTw6zQ.mjs.map +1 -0
  74. package/dist/config-validation-DXggMTZf.d.mts +14 -0
  75. package/dist/config-validation-DXggMTZf.d.mts.map +1 -0
  76. package/dist/config.d.mts +4 -0
  77. package/dist/config.mjs +3 -0
  78. package/dist/config__config-types.d.mts +3 -0
  79. package/dist/config__config-types.mjs +2 -0
  80. package/dist/config__config-validation.d.mts +2 -0
  81. package/dist/config__config-validation.mjs +2 -0
  82. package/dist/contract-authoring.d.mts +213 -0
  83. package/dist/contract-authoring.d.mts.map +1 -0
  84. package/dist/contract-authoring.mjs +133 -0
  85. package/dist/contract-authoring.mjs.map +1 -0
  86. package/dist/contract-types-CkdMH7F7-9EHXSwbH.d.mts +77 -0
  87. package/dist/contract-types-CkdMH7F7-9EHXSwbH.d.mts.map +1 -0
  88. package/dist/contract-validation-error-DEiWp_EI-CRwtUgRw.mjs +14 -0
  89. package/dist/contract-validation-error-DEiWp_EI-CRwtUgRw.mjs.map +1 -0
  90. package/dist/contract-validation-error-R7cMoK04.d.mts +11 -0
  91. package/dist/contract-validation-error-R7cMoK04.d.mts.map +1 -0
  92. package/dist/contract.d.mts +14 -0
  93. package/dist/contract.mjs +13 -0
  94. package/dist/contract__apply-specifier-default-control-policy.d.mts +2 -0
  95. package/dist/contract__apply-specifier-default-control-policy.mjs +2 -0
  96. package/dist/contract__contract-validation-error.d.mts +2 -0
  97. package/dist/contract__contract-validation-error.mjs +2 -0
  98. package/dist/contract__default-namespace.d.mts +2 -0
  99. package/dist/contract__default-namespace.mjs +2 -0
  100. package/dist/contract__enum-accessor.d.mts +2 -0
  101. package/dist/contract__enum-accessor.mjs +2 -0
  102. package/dist/contract__hashing-utils.d.mts +2 -0
  103. package/dist/contract__hashing-utils.mjs +3 -0
  104. package/dist/contract__hashing.d.mts +3 -0
  105. package/dist/contract__hashing.mjs +2 -0
  106. package/dist/contract__is-plain-record.d.mts +2 -0
  107. package/dist/contract__is-plain-record.mjs +2 -0
  108. package/dist/contract__resolve-domain-model.d.mts +2 -0
  109. package/dist/contract__resolve-domain-model.mjs +2 -0
  110. package/dist/contract__types.d.mts +6 -0
  111. package/dist/contract__types.mjs +5 -0
  112. package/dist/contract__validate-domain.d.mts +2 -0
  113. package/dist/contract__validate-domain.mjs +2 -0
  114. package/dist/control-B87KWI_K-C_R8WfEr.d.mts +213 -0
  115. package/dist/control-B87KWI_K-C_R8WfEr.d.mts.map +1 -0
  116. package/dist/control-CBvTj7Ia.d.mts +1383 -0
  117. package/dist/control-CBvTj7Ia.d.mts.map +1 -0
  118. package/dist/control-DTouE89s.mjs +621 -0
  119. package/dist/control-DTouE89s.mjs.map +1 -0
  120. package/dist/control-Ftiau058-CCeJcAVQ.mjs +284 -0
  121. package/dist/control-Ftiau058-CCeJcAVQ.mjs.map +1 -0
  122. package/dist/declarations-DR6To8_k-BFwkCGeP.mjs +1046 -0
  123. package/dist/declarations-DR6To8_k-BFwkCGeP.mjs.map +1 -0
  124. package/dist/default-namespace-D4vCwkXg-BaiW8LNK.mjs +39 -0
  125. package/dist/default-namespace-D4vCwkXg-BaiW8LNK.mjs.map +1 -0
  126. package/dist/default-namespace-D5X_k6hJ-GH8P1ror.d.mts +26 -0
  127. package/dist/default-namespace-D5X_k6hJ-GH8P1ror.d.mts.map +1 -0
  128. package/dist/defined-BQWA85QH-BRSBMULx.mjs +31 -0
  129. package/dist/defined-BQWA85QH-BRSBMULx.mjs.map +1 -0
  130. package/dist/defined-BSXuxrnl.d.mts +28 -0
  131. package/dist/defined-BSXuxrnl.d.mts.map +1 -0
  132. package/dist/domain-envelope-D6Wn9AmZ-BqZKTT9U.d.mts +359 -0
  133. package/dist/domain-envelope-D6Wn9AmZ-BqZKTT9U.d.mts.map +1 -0
  134. package/dist/emission-CeoAV9mj.mjs +26 -0
  135. package/dist/emission-CeoAV9mj.mjs.map +1 -0
  136. package/dist/emission-DeoQufVd.d.mts +1 -0
  137. package/dist/emission-types-hfRVB_Yw-DpQ3hISB.d.mts +75 -0
  138. package/dist/emission-types-hfRVB_Yw-DpQ3hISB.d.mts.map +1 -0
  139. package/dist/enum-accessor-Db5DaTNX.mjs +35 -0
  140. package/dist/enum-accessor-Db5DaTNX.mjs.map +1 -0
  141. package/dist/enum-accessor-PH5vjghI.d.mts +85 -0
  142. package/dist/enum-accessor-PH5vjghI.d.mts.map +1 -0
  143. package/dist/errors.d.mts +4 -0
  144. package/dist/errors.mjs +4 -0
  145. package/dist/errors__control.d.mts +2 -0
  146. package/dist/errors__control.mjs +2 -0
  147. package/dist/errors__execution.d.mts +2 -0
  148. package/dist/errors__execution.mjs +2 -0
  149. package/dist/errors__migration.d.mts +2 -0
  150. package/dist/errors__migration.mjs +2 -0
  151. package/dist/execution-BNwBzmRd.mjs +40 -0
  152. package/dist/execution-BNwBzmRd.mjs.map +1 -0
  153. package/dist/execution-BbOD4GyR.mjs +164 -0
  154. package/dist/execution-BbOD4GyR.mjs.map +1 -0
  155. package/dist/execution-Bo5Bu2Ys.d.mts +79 -0
  156. package/dist/execution-Bo5Bu2Ys.d.mts.map +1 -0
  157. package/dist/execution-MOde1lmD.d.mts +98 -0
  158. package/dist/execution-MOde1lmD.d.mts.map +1 -0
  159. package/dist/framework-authoring-7YMP9TwM-C9P-N6_a.d.mts +777 -0
  160. package/dist/framework-authoring-7YMP9TwM-C9P-N6_a.d.mts.map +1 -0
  161. package/dist/framework-authoring-CDEvlouU-mlMWSksD.mjs +698 -0
  162. package/dist/framework-authoring-CDEvlouU-mlMWSksD.mjs.map +1 -0
  163. package/dist/framework-components-D6j4Y5K7-RW9H184y.mjs +27 -0
  164. package/dist/framework-components-D6j4Y5K7-RW9H184y.mjs.map +1 -0
  165. package/dist/framework-components-MFoo0sYx-G_6k9jt4.d.mts +388 -0
  166. package/dist/framework-components-MFoo0sYx-G_6k9jt4.d.mts.map +1 -0
  167. package/dist/hash-content-Bugg_nZn.mjs +63 -0
  168. package/dist/hash-content-Bugg_nZn.mjs.map +1 -0
  169. package/dist/hash-content-DwEUh-Rx.d.mts +59 -0
  170. package/dist/hash-content-DwEUh-Rx.d.mts.map +1 -0
  171. package/dist/hashing-BtIZVNYX.mjs +199 -0
  172. package/dist/hashing-BtIZVNYX.mjs.map +1 -0
  173. package/dist/hashing-CccSPELN.d.mts +25 -0
  174. package/dist/hashing-CccSPELN.d.mts.map +1 -0
  175. package/dist/hashing-utils-DQgS3nOe.mjs +48 -0
  176. package/dist/hashing-utils-DQgS3nOe.mjs.map +1 -0
  177. package/dist/hashing-utils-qKu59RSC.d.mts +19 -0
  178. package/dist/hashing-utils-qKu59RSC.d.mts.map +1 -0
  179. package/dist/ids.d.mts +44 -0
  180. package/dist/ids.d.mts.map +1 -0
  181. package/dist/ids.mjs +96 -0
  182. package/dist/ids.mjs.map +1 -0
  183. package/dist/ids__runtime.d.mts +7 -0
  184. package/dist/ids__runtime.d.mts.map +1 -0
  185. package/dist/ids__runtime.mjs +31 -0
  186. package/dist/ids__runtime.mjs.map +1 -0
  187. package/dist/index-GY2oGH9L.d.mts +120 -0
  188. package/dist/index-GY2oGH9L.d.mts.map +1 -0
  189. package/dist/internal-error-BIc-ehme-ouBQPoEL.mjs +24 -0
  190. package/dist/internal-error-BIc-ehme-ouBQPoEL.mjs.map +1 -0
  191. package/dist/internal-error-kK8QvlDE.d.mts +19 -0
  192. package/dist/internal-error-kK8QvlDE.d.mts.map +1 -0
  193. package/dist/ir-BvE7L9FK.d.mts +359 -0
  194. package/dist/ir-BvE7L9FK.d.mts.map +1 -0
  195. package/dist/ir-ChmSSAhX.mjs +200 -0
  196. package/dist/ir-ChmSSAhX.mjs.map +1 -0
  197. package/dist/is-plain-record-C9BWiqcw.d.mts +12 -0
  198. package/dist/is-plain-record-C9BWiqcw.d.mts.map +1 -0
  199. package/dist/is-plain-record-CUofyVQ7-DWEzdhIx.mjs +16 -0
  200. package/dist/is-plain-record-CUofyVQ7-DWEzdhIx.mjs.map +1 -0
  201. package/dist/json-Dkqr3say.d.mts +26 -0
  202. package/dist/json-Dkqr3say.d.mts.map +1 -0
  203. package/dist/migration-4VOHVEzx.mjs +118 -0
  204. package/dist/migration-4VOHVEzx.mjs.map +1 -0
  205. package/dist/migration-DKbDzBwy.d.mts +74 -0
  206. package/dist/migration-DKbDzBwy.d.mts.map +1 -0
  207. package/dist/namespace-id-asbWpwMw-3yxn-tRe.mjs +9 -0
  208. package/dist/namespace-id-asbWpwMw-3yxn-tRe.mjs.map +1 -0
  209. package/dist/operations.d.mts +46 -0
  210. package/dist/operations.d.mts.map +1 -0
  211. package/dist/operations.mjs +28 -0
  212. package/dist/operations.mjs.map +1 -0
  213. package/dist/parse-0ZJjj_2N-WZZ1nlrv.d.mts +427 -0
  214. package/dist/parse-0ZJjj_2N-WZZ1nlrv.d.mts.map +1 -0
  215. package/dist/parse-GbZGfMUj-BFSrD2AN.mjs +621 -0
  216. package/dist/parse-GbZGfMUj-BFSrD2AN.mjs.map +1 -0
  217. package/dist/promise-D8meygPf.mjs +13 -0
  218. package/dist/promise-D8meygPf.mjs.map +1 -0
  219. package/dist/promise-DHJWZv49.d.mts +11 -0
  220. package/dist/promise-DHJWZv49.d.mts.map +1 -0
  221. package/dist/psl-ast-BEwO80EH.d.mts +37 -0
  222. package/dist/psl-ast-BEwO80EH.d.mts.map +1 -0
  223. package/dist/psl-ast-Chgi8e4o-rSlBk1UV.d.mts +259 -0
  224. package/dist/psl-ast-Chgi8e4o-rSlBk1UV.d.mts.map +1 -0
  225. package/dist/psl-ast-DUCvVXbB.mjs +239 -0
  226. package/dist/psl-ast-DUCvVXbB.mjs.map +1 -0
  227. package/dist/psl-parser.d.mts +158 -0
  228. package/dist/psl-parser.d.mts.map +1 -0
  229. package/dist/psl-parser.mjs +804 -0
  230. package/dist/psl-parser.mjs.map +1 -0
  231. package/dist/psl-parser__format.d.mts +12 -0
  232. package/dist/psl-parser__format.d.mts.map +1 -0
  233. package/dist/psl-parser__format.mjs +464 -0
  234. package/dist/psl-parser__format.mjs.map +1 -0
  235. package/dist/psl-parser__interpret.d.mts +40 -0
  236. package/dist/psl-parser__interpret.d.mts.map +1 -0
  237. package/dist/psl-parser__interpret.mjs +25 -0
  238. package/dist/psl-parser__interpret.mjs.map +1 -0
  239. package/dist/psl-parser__syntax.d.mts +31 -0
  240. package/dist/psl-parser__syntax.d.mts.map +1 -0
  241. package/dist/psl-parser__syntax.mjs +43 -0
  242. package/dist/psl-parser__syntax.mjs.map +1 -0
  243. package/dist/psl-parser__tokenizer.d.mts +2 -0
  244. package/dist/psl-parser__tokenizer.mjs +2 -0
  245. package/dist/psl-printer.d.mts +37 -0
  246. package/dist/psl-printer.d.mts.map +1 -0
  247. package/dist/psl-printer.mjs +393 -0
  248. package/dist/psl-printer.mjs.map +1 -0
  249. package/dist/redact-db-url-BlaloOwt.d.mts +22 -0
  250. package/dist/redact-db-url-BlaloOwt.d.mts.map +1 -0
  251. package/dist/redact-db-url-CRWJWdB1.mjs +26 -0
  252. package/dist/redact-db-url-CRWJWdB1.mjs.map +1 -0
  253. package/dist/resolve-codec-BZF8TZh_-D-xORT9Q.mjs +59 -0
  254. package/dist/resolve-codec-BZF8TZh_-D-xORT9Q.mjs.map +1 -0
  255. package/dist/resolve-domain-model-BVSb5wS5-C6Yq0dsD.d.mts +17 -0
  256. package/dist/resolve-domain-model-BVSb5wS5-C6Yq0dsD.d.mts.map +1 -0
  257. package/dist/resolve-domain-model-BovPAsW2-8rwyzjxp.mjs +20 -0
  258. package/dist/resolve-domain-model-BovPAsW2-8rwyzjxp.mjs.map +1 -0
  259. package/dist/result-Bpupv5vO.d.mts +54 -0
  260. package/dist/result-Bpupv5vO.d.mts.map +1 -0
  261. package/dist/result-CBZ8X9mU.mjs +92 -0
  262. package/dist/result-CBZ8X9mU.mjs.map +1 -0
  263. package/dist/runtime--RZXG1zP.d.mts +901 -0
  264. package/dist/runtime--RZXG1zP.d.mts.map +1 -0
  265. package/dist/runtime-DYTFHGwh.mjs +516 -0
  266. package/dist/runtime-DYTFHGwh.mjs.map +1 -0
  267. package/dist/runtime-error-BA9d7XjZ-BlT8t6LB.mjs +40 -0
  268. package/dist/runtime-error-BA9d7XjZ-BlT8t6LB.mjs.map +1 -0
  269. package/dist/simplify-deep-Dw9I_ZUl.d.mts +6 -0
  270. package/dist/simplify-deep-Dw9I_ZUl.d.mts.map +1 -0
  271. package/dist/structured-error-BVmv2aPB.d.mts +34 -0
  272. package/dist/structured-error-BVmv2aPB.d.mts.map +1 -0
  273. package/dist/structured-error-H6WU9Kjt.mjs +31 -0
  274. package/dist/structured-error-H6WU9Kjt.mjs.map +1 -0
  275. package/dist/symbol-table-CZ7EVCTL-oYQtrmzq.d.mts +125 -0
  276. package/dist/symbol-table-CZ7EVCTL-oYQtrmzq.d.mts.map +1 -0
  277. package/dist/tokenizer-1hAHZzmp-QGPORvmA.mjs +228 -0
  278. package/dist/tokenizer-1hAHZzmp-QGPORvmA.mjs.map +1 -0
  279. package/dist/tokenizer-DcYI0Xrq-C-nNE9mE.d.mts +16 -0
  280. package/dist/tokenizer-DcYI0Xrq-C-nNE9mE.d.mts.map +1 -0
  281. package/dist/ts-render.d.mts +2 -0
  282. package/dist/ts-render.mjs +240 -0
  283. package/dist/ts-render.mjs.map +1 -0
  284. package/dist/types-ByeQhU9p.d.mts +17 -0
  285. package/dist/types-ByeQhU9p.d.mts.map +1 -0
  286. package/dist/types-DGxlljKG.d.mts +7 -0
  287. package/dist/types-DGxlljKG.d.mts.map +1 -0
  288. package/dist/types-DgdgskBY.mjs +96 -0
  289. package/dist/types-DgdgskBY.mjs.map +1 -0
  290. package/dist/types-import-spec-DRKzrJ20-WYwyCtil.d.mts +14 -0
  291. package/dist/types-import-spec-DRKzrJ20-WYwyCtil.d.mts.map +1 -0
  292. package/dist/utils-DMAM0unR.mjs +20 -0
  293. package/dist/utils-DMAM0unR.mjs.map +1 -0
  294. package/dist/utils-DeWL_zD9.d.mts +11 -0
  295. package/dist/utils-DeWL_zD9.d.mts.map +1 -0
  296. package/dist/utils.d.mts +16 -0
  297. package/dist/utils.mjs +13 -0
  298. package/dist/utils__abortable.d.mts +2 -0
  299. package/dist/utils__abortable.mjs +2 -0
  300. package/dist/utils__array-equal.d.mts +2 -0
  301. package/dist/utils__array-equal.mjs +2 -0
  302. package/dist/utils__assertions.d.mts +2 -0
  303. package/dist/utils__assertions.mjs +2 -0
  304. package/dist/utils__canonical-stringify.d.mts +2 -0
  305. package/dist/utils__canonical-stringify.mjs +2 -0
  306. package/dist/utils__casts.d.mts +2 -0
  307. package/dist/utils__casts.mjs +2 -0
  308. package/dist/utils__defined.d.mts +2 -0
  309. package/dist/utils__defined.mjs +2 -0
  310. package/dist/utils__hash-content.d.mts +2 -0
  311. package/dist/utils__hash-content.mjs +2 -0
  312. package/dist/utils__internal-error.d.mts +2 -0
  313. package/dist/utils__internal-error.mjs +2 -0
  314. package/dist/utils__json.d.mts +2 -0
  315. package/dist/utils__json.mjs +1 -0
  316. package/dist/utils__promise.d.mts +2 -0
  317. package/dist/utils__promise.mjs +2 -0
  318. package/dist/utils__redact-db-url.d.mts +2 -0
  319. package/dist/utils__redact-db-url.mjs +2 -0
  320. package/dist/utils__result.d.mts +2 -0
  321. package/dist/utils__result.mjs +2 -0
  322. package/dist/utils__simplify-deep.d.mts +2 -0
  323. package/dist/utils__simplify-deep.mjs +1 -0
  324. package/dist/utils__structured-error.d.mts +2 -0
  325. package/dist/utils__structured-error.mjs +2 -0
  326. package/dist/utils__types.d.mts +2 -0
  327. package/dist/utils__types.mjs +1 -0
  328. package/dist/validate-domain-BNBs-TVv.d.mts +22 -0
  329. package/dist/validate-domain-BNBs-TVv.d.mts.map +1 -0
  330. package/dist/validate-domain-BkvFlY3B.mjs +143 -0
  331. package/dist/validate-domain-BkvFlY3B.mjs.map +1 -0
  332. package/package.json +109 -0
@@ -0,0 +1,162 @@
1
+ import { t as Contract } from "./contract-types-CkdMH7F7-9EHXSwbH.mjs";
2
+ import { c as CodecLookup } from "./codec-types-XJO6eC9U-B_K2q0zm.mjs";
3
+ import "./codec-D3GVAkR_.mjs";
4
+ import { t as CapabilityMatrix } from "./capabilities-Cupq4-1--C71ORI3N.mjs";
5
+ import { u as ControlMutationDefaults } from "./framework-components-MFoo0sYx-G_6k9jt4.mjs";
6
+ import "./components-CawuxTia.mjs";
7
+ import { r as Result } from "./result-Bpupv5vO.mjs";
8
+ import { d as ControlExtensionDescriptor, g as ControlTargetDescriptor, l as ControlDriverDescriptor, n as AssembledAuthoringContributions, p as ControlFamilyDescriptor, s as ControlAdapterDescriptor, u as ControlDriverInstance } from "./control-CBvTj7Ia.mjs";
9
+ //#region ../../../1-framework/1-core/config/dist/config-types-W-87vhZ4.d.mts
10
+ //#region src/contract-source-types.d.ts
11
+ interface ContractSourceDiagnosticPosition {
12
+ readonly offset: number;
13
+ readonly line: number;
14
+ readonly column: number;
15
+ }
16
+ interface ContractSourceDiagnosticSpan {
17
+ readonly start: ContractSourceDiagnosticPosition;
18
+ readonly end: ContractSourceDiagnosticPosition;
19
+ }
20
+ interface ContractSourceDiagnostic {
21
+ readonly code: string;
22
+ readonly message: string;
23
+ readonly sourceId?: string;
24
+ readonly span?: ContractSourceDiagnosticSpan;
25
+ /**
26
+ * Optional structured payload for machine-readable consumers (agents,
27
+ * IDE extensions, CLI auto-fix). Human-readable prose lives in `message`;
28
+ * `data` carries the extracted facts (e.g. `{ namespace: 'pgvector' }`).
29
+ */
30
+ readonly data?: Readonly<Record<string, unknown>>;
31
+ }
32
+ interface ContractSourceDiagnostics {
33
+ readonly summary: string;
34
+ readonly diagnostics: readonly ContractSourceDiagnostic[];
35
+ readonly meta?: Record<string, unknown>;
36
+ }
37
+ interface ContractSourceContext {
38
+ readonly composedExtensions: readonly string[];
39
+ /** Extension contracts keyed by space ID, required for cross-space FK resolution. */
40
+ readonly composedExtensionContracts: ReadonlyMap<string, Contract>;
41
+ readonly authoringContributions: AssembledAuthoringContributions;
42
+ readonly codecLookup: CodecLookup;
43
+ readonly controlMutationDefaults: ControlMutationDefaults;
44
+ readonly resolvedInputs: readonly string[];
45
+ readonly capabilities: CapabilityMatrix;
46
+ }
47
+ /** Lets format-aware tooling avoid file-extension sniffing and opaque loader introspection. */
48
+ type ContractSourceFormat = 'psl' | 'typescript';
49
+ interface ContractSourceProviderBase {
50
+ readonly inputs?: readonly string[];
51
+ readonly load: (context: ContractSourceContext) => Promise<Result<Contract, ContractSourceDiagnostics>>;
52
+ }
53
+ interface PslContractSourceProvider extends ContractSourceProviderBase {
54
+ readonly format: 'psl';
55
+ }
56
+ interface TypeScriptContractSourceProvider extends ContractSourceProviderBase {
57
+ readonly format: 'typescript';
58
+ }
59
+ /**
60
+ * Third-party or unspecified source formats. Absent (or unrecognized)
61
+ * `format` means format-aware tooling must leave the source untouched.
62
+ * Narrowing to a known format flows only through capability guards owned by
63
+ * the authoring layer.
64
+ */
65
+ interface OpaqueContractSourceProvider extends ContractSourceProviderBase {
66
+ readonly format?: string;
67
+ }
68
+ type ContractSourceProvider = PslContractSourceProvider | TypeScriptContractSourceProvider | OpaqueContractSourceProvider;
69
+ //#endregion
70
+ //#region src/config-types.d.ts
71
+ /**
72
+ * Contract configuration specifying source and artifact locations.
73
+ */
74
+ interface ContractConfig {
75
+ /**
76
+ * Contract source provider. The provider is always async and must return
77
+ * a Result containing either a Contract or structured diagnostics.
78
+ */
79
+ readonly source: ContractSourceProvider;
80
+ /**
81
+ * Path to contract.json artifact. Providers that know an input path (PSL,
82
+ * `typescriptContractFromPath`) derive an output colocated with that input
83
+ * so this rarely needs to be set explicitly. The `.d.ts` types file is
84
+ * always emitted next to the JSON (e.g., `contract.json` → `contract.d.ts`).
85
+ */
86
+ readonly output?: string;
87
+ }
88
+ interface FormatterConfig {
89
+ readonly indent?: number | 'tab';
90
+ readonly newline?: 'LF' | 'CRLF';
91
+ }
92
+ /**
93
+ * Default *source* directory for the contract file the user authors at `init`
94
+ * time. Output artefacts colocate with source per the same rule path-bearing
95
+ * providers apply.
96
+ */
97
+ declare const DEFAULT_CONTRACT_SOURCE_DIR = "src/prisma";
98
+ declare function normalizeContractConfig(contract: ContractConfig): ContractConfig & {
99
+ readonly output: string;
100
+ };
101
+ /**
102
+ * Configuration for Prisma Next CLI.
103
+ * Uses Control*Descriptor types for type-safe wiring with compile-time compatibility checks.
104
+ *
105
+ * @template TFamilyId - The family ID (e.g., 'sql', 'document')
106
+ * @template TTargetId - The target ID (e.g., 'postgres', 'mysql')
107
+ * @template TConnection - The driver connection input type (defaults to `unknown` for config flexibility)
108
+ */
109
+ interface PrismaNextConfig<TFamilyId extends string = string, TTargetId extends string = string, TConnection = unknown> {
110
+ readonly family: ControlFamilyDescriptor<TFamilyId>;
111
+ readonly target: ControlTargetDescriptor<TFamilyId, TTargetId>;
112
+ readonly adapter: ControlAdapterDescriptor<TFamilyId, TTargetId>;
113
+ readonly extensions?: readonly ControlExtensionDescriptor<TFamilyId, TTargetId>[];
114
+ /**
115
+ * Driver descriptor for DB-connected CLI commands.
116
+ * Required for DB-connected commands (e.g., db verify).
117
+ * Optional for commands that don't need database access (e.g., emit).
118
+ * The driver's connection type matches the TConnection config parameter.
119
+ */
120
+ readonly driver?: ControlDriverDescriptor<TFamilyId, TTargetId, ControlDriverInstance<TFamilyId, TTargetId>, TConnection>;
121
+ /**
122
+ * Database connection configuration.
123
+ * The connection type is driver-specific (e.g., URL string for Postgres).
124
+ */
125
+ readonly db?: {
126
+ /**
127
+ * Driver-specific connection input.
128
+ * For Postgres: a connection string (URL).
129
+ * For other drivers: may be a structured object.
130
+ */
131
+ readonly connection?: TConnection;
132
+ };
133
+ /**
134
+ * Contract configuration. Specifies source and artifact locations.
135
+ * Required for emit command; optional for other commands that only read artifacts.
136
+ */
137
+ readonly contract?: ContractConfig;
138
+ /**
139
+ * Migration configuration. Controls where on-disk migration packages are stored.
140
+ */
141
+ readonly migrations?: {
142
+ /** Directory for migration packages, relative to config file. Defaults to 'migrations'. */
143
+ readonly dir?: string;
144
+ };
145
+ readonly formatter?: FormatterConfig;
146
+ }
147
+ /**
148
+ * Helper function to define a Prisma Next config.
149
+ * Validates and normalizes the config using Arktype, then returns the normalized IR.
150
+ *
151
+ * Normalization:
152
+ * - contract.output defaults to a path colocated with DEFAULT_CONTRACT_SOURCE_DIR
153
+ * when missing (in-memory-only providers)
154
+ *
155
+ * @param config - Raw config input from user
156
+ * @returns Normalized config IR with defaults applied
157
+ * @throws Error if config structure is invalid
158
+ */
159
+ declare function defineConfig<TFamilyId extends string = string, TTargetId extends string = string>(config: PrismaNextConfig<TFamilyId, TTargetId>): PrismaNextConfig<TFamilyId, TTargetId>;
160
+ //#endregion
161
+ export { normalizeContractConfig as _, ContractSourceDiagnosticSpan as a, ContractSourceProvider as c, FormatterConfig as d, OpaqueContractSourceProvider as f, defineConfig as g, TypeScriptContractSourceProvider as h, ContractSourceDiagnosticPosition as i, ContractSourceProviderBase as l, PslContractSourceProvider as m, ContractSourceContext as n, ContractSourceDiagnostics as o, PrismaNextConfig as p, ContractSourceDiagnostic as r, ContractSourceFormat as s, ContractConfig as t, DEFAULT_CONTRACT_SOURCE_DIR as u };
162
+ //# sourceMappingURL=config-types-W-87vhZ4-BgYaH8YO.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-types-W-87vhZ4-BgYaH8YO.d.mts","names":[],"sources":["../../../../1-framework/1-core/config/dist/config-types-W-87vhZ4.d.mts"],"mappings":";;;;;;;;;;UAMU;WACC;WACA;WACA;;UAED;WACC,OAAO;WACP,KAAK;;UAEN;WACC;WACA;WACA;WACA,OAAO;;;;;;WAMP,OAAO,SAAS;;UAEjB;WACC;WACA,sBAAsB;WACtB,OAAO;;UAER;WACC;;WAEA,4BAA4B,oBAAoB;WAChD,wBAAwB;WACxB,aAAa;WACb,yBAAyB;WACzB;WACA,cAAc;;;KAGpB;UACK;WACC;WACA,OAAO,SAAS,0BAA0B,QAAQ,OAAO,UAAU;;UAEpE,kCAAkC;WACjC;;UAED,yCAAyC;WACxC;;;;;;;;UAQD,qCAAqC;WACpC;;KAEN,yBAAyB,4BAA4B,mCAAmC;;;;;;UAMnF;;;;;WAKC,QAAQ;;;;;;;WAOR;;UAED;WACC;WACA;;;;;;;cAOG;iBACG,wBAAwB,UAAU,iBAAiB;WACzD;;;;;;;;;;UAUD,iBAAiB,mCAAmC,mCAAmC;WACtF,QAAQ,wBAAwB;WAChC,QAAQ,wBAAwB,WAAW;WAC3C,SAAS,yBAAyB,WAAW;WAC7C,sBAAsB,2BAA2B,WAAW;;;;;;;WAO5D,SAAS,wBAAwB,WAAW,WAAW,sBAAsB,WAAW,YAAY;;;;;WAKpG;;;;;;aAME,aAAa;;;;;;WAMf,WAAW;;;;WAIX;;aAEE;;WAEF,YAAY;;;;;;;;;;;;;;iBAcN,aAAa,mCAAmC,mCAAmC,QAAQ,iBAAiB,WAAW,aAAa,iBAAiB,WAAW"}
@@ -0,0 +1 @@
1
+ import "./config-types-W-87vhZ4-BgYaH8YO.mjs";
@@ -0,0 +1,99 @@
1
+ import { t as configError } from "./config-errors-CBdiX587-DwIyJIX9.mjs";
2
+ //#region ../../../1-framework/1-core/config/dist/config-validation.mjs
3
+ function throwValidation(field, why) {
4
+ const message = why ?? `Config must have a "${field}" field`;
5
+ throw configError("CONFIG.VALIDATION_FAILED", message, {
6
+ why: message,
7
+ meta: { field }
8
+ });
9
+ }
10
+ function validateContractConfig(contract) {
11
+ if (!Object.hasOwn(contract, "source")) throwValidation("contract.source", "Config.contract.source is required when contract is provided");
12
+ const source = contract["source"];
13
+ if (!source || typeof source !== "object") throwValidation("contract.source", "Config.contract.source must be a provider object");
14
+ const sourceConfig = source;
15
+ const inputs = Object.hasOwn(sourceConfig, "inputs") ? sourceConfig["inputs"] : void 0;
16
+ if (inputs !== void 0) {
17
+ if (!Array.isArray(inputs)) throwValidation("contract.source.inputs", "Config.contract.source.inputs must be an array of strings when provided");
18
+ for (const input of inputs) if (typeof input !== "string") throwValidation("contract.source.inputs[]", "Config.contract.source.inputs must contain only strings");
19
+ }
20
+ if (!Object.hasOwn(sourceConfig, "load") || typeof sourceConfig["load"] !== "function") throwValidation("contract.source.load", "Config.contract.source.load must be a function");
21
+ const output = Object.hasOwn(contract, "output") ? contract["output"] : void 0;
22
+ if (output !== void 0 && typeof output !== "string") throwValidation("contract.output", "Config.contract.output must be a string when provided");
23
+ }
24
+ /**
25
+ * Validates that the config has the required structure.
26
+ * This is pure validation logic with no file I/O or CLI awareness.
27
+ *
28
+ * @param config - Config object to validate
29
+ * @throws a `CONFIG.VALIDATION_FAILED` structured error if config structure is invalid
30
+ */
31
+ function validateConfig(config) {
32
+ if (!config || typeof config !== "object") throwValidation("object", "Config must be an object");
33
+ const configObj = config;
34
+ if (!configObj["family"]) throwValidation("family");
35
+ if (!configObj["target"]) throwValidation("target");
36
+ if (!configObj["adapter"]) throwValidation("adapter");
37
+ const family = configObj["family"];
38
+ if (family["kind"] !== "family") throwValidation("family.kind", "Config.family must have kind: \"family\"");
39
+ if (typeof family["id"] !== "string") throwValidation("family.id", "Config.family must have id: string");
40
+ if (typeof family["familyId"] !== "string") throwValidation("family.familyId", "Config.family must have familyId: string");
41
+ if (typeof family["version"] !== "string") throwValidation("family.version", "Config.family must have version: string");
42
+ if (!family["emission"] || typeof family["emission"] !== "object") throwValidation("family.emission", "Config.family must have emission: EmissionSpi");
43
+ if (typeof family["create"] !== "function") throwValidation("family.create", "Config.family must have create: function");
44
+ const familyId = family["familyId"];
45
+ const target = configObj["target"];
46
+ if (target["kind"] !== "target") throwValidation("target.kind", "Config.target must have kind: \"target\"");
47
+ if (typeof target["id"] !== "string") throwValidation("target.id", "Config.target must have id: string");
48
+ if (typeof target["familyId"] !== "string") throwValidation("target.familyId", "Config.target must have familyId: string");
49
+ if (typeof target["version"] !== "string") throwValidation("target.version", "Config.target must have version: string");
50
+ if (target["familyId"] !== familyId) throwValidation("target.familyId", `Config.target.familyId must match Config.family.familyId (expected: ${familyId}, got: ${target["familyId"]})`);
51
+ if (typeof target["targetId"] !== "string") throwValidation("target.targetId", "Config.target must have targetId: string");
52
+ if (typeof target["create"] !== "function") throwValidation("target.create", "Config.target must have create: function");
53
+ const expectedTargetId = target["targetId"];
54
+ const adapter = configObj["adapter"];
55
+ if (adapter["kind"] !== "adapter") throwValidation("adapter.kind", "Config.adapter must have kind: \"adapter\"");
56
+ if (typeof adapter["id"] !== "string") throwValidation("adapter.id", "Config.adapter must have id: string");
57
+ if (typeof adapter["familyId"] !== "string") throwValidation("adapter.familyId", "Config.adapter must have familyId: string");
58
+ if (typeof adapter["version"] !== "string") throwValidation("adapter.version", "Config.adapter must have version: string");
59
+ if (adapter["familyId"] !== familyId) throwValidation("adapter.familyId", `Config.adapter.familyId must match Config.family.familyId (expected: ${familyId}, got: ${adapter["familyId"]})`);
60
+ if (typeof adapter["targetId"] !== "string") throwValidation("adapter.targetId", "Config.adapter must have targetId: string");
61
+ if (adapter["targetId"] !== expectedTargetId) throwValidation("adapter.targetId", `Config.adapter.targetId must match Config.target.targetId (expected: ${expectedTargetId}, got: ${adapter["targetId"]})`);
62
+ if (typeof adapter["create"] !== "function") throwValidation("adapter.create", "Config.adapter must have create: function");
63
+ if (configObj["extensionPacks"] !== void 0) throwValidation("extensionPacks", "Config.extensionPacks is no longer supported; rename it to Config.extensions");
64
+ if (configObj["extensions"] !== void 0) {
65
+ if (!Array.isArray(configObj["extensions"])) throwValidation("extensions", "Config.extensions must be an array");
66
+ for (const ext of configObj["extensions"]) {
67
+ if (!ext || typeof ext !== "object") throwValidation("extensions[]", "Config.extensions must contain ControlExtensionDescriptor objects");
68
+ const extObj = ext;
69
+ if (extObj["kind"] !== "extension") throwValidation("extensions[].kind", "Config.extensions items must have kind: \"extension\"");
70
+ if (typeof extObj["id"] !== "string") throwValidation("extensions[].id", "Config.extensions items must have id: string");
71
+ if (typeof extObj["familyId"] !== "string") throwValidation("extensions[].familyId", "Config.extensions items must have familyId: string");
72
+ if (typeof extObj["version"] !== "string") throwValidation("extensions[].version", "Config.extensions items must have version: string");
73
+ if (extObj["familyId"] !== familyId) throwValidation("extensions[].familyId", `Config.extensions[].familyId must match Config.family.familyId (expected: ${familyId}, got: ${extObj["familyId"]})`);
74
+ if (typeof extObj["targetId"] !== "string") throwValidation("extensions[].targetId", "Config.extensions items must have targetId: string");
75
+ if (extObj["targetId"] !== expectedTargetId) throwValidation("extensions[].targetId", `Config.extensions[].targetId must match Config.target.targetId (expected: ${expectedTargetId}, got: ${extObj["targetId"]})`);
76
+ if (typeof extObj["create"] !== "function") throwValidation("extensions[].create", "Config.extensions items must have create: function");
77
+ }
78
+ }
79
+ if (configObj["driver"] !== void 0) {
80
+ const driver = configObj["driver"];
81
+ if (driver["kind"] !== "driver") throwValidation("driver.kind", "Config.driver must have kind: \"driver\"");
82
+ if (typeof driver["id"] !== "string") throwValidation("driver.id", "Config.driver must have id: string");
83
+ if (typeof driver["version"] !== "string") throwValidation("driver.version", "Config.driver must have version: string");
84
+ if (typeof driver["familyId"] !== "string") throwValidation("driver.familyId", "Config.driver must have familyId: string");
85
+ if (driver["familyId"] !== familyId) throwValidation("driver.familyId", `Config.driver.familyId must match Config.family.familyId (expected: ${familyId}, got: ${driver["familyId"]})`);
86
+ if (typeof driver["targetId"] !== "string") throwValidation("driver.targetId", "Config.driver must have targetId: string");
87
+ if (driver["targetId"] !== expectedTargetId) throwValidation("driver.targetId", `Config.driver.targetId must match Config.target.targetId (expected: ${expectedTargetId}, got: ${driver["targetId"]})`);
88
+ if (typeof driver["create"] !== "function") throwValidation("driver.create", "Config.driver must have create: function");
89
+ }
90
+ if (configObj["contract"] !== void 0) {
91
+ const contract = configObj["contract"];
92
+ if (!contract || typeof contract !== "object") throwValidation("contract", "Config.contract must be an object");
93
+ validateContractConfig(contract);
94
+ }
95
+ }
96
+ //#endregion
97
+ export { validateConfig as t };
98
+
99
+ //# sourceMappingURL=config-validation-ByGTw6zQ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-validation-ByGTw6zQ.mjs","names":[],"sources":["../../../../1-framework/1-core/config/dist/config-validation.mjs"],"sourcesContent":["import { t as configError } from \"./config-errors-CBdiX587.mjs\";\n//#region src/config-validation.ts\nfunction throwValidation(field, why) {\n\tconst message = why ?? `Config must have a \"${field}\" field`;\n\tthrow configError(\"CONFIG.VALIDATION_FAILED\", message, {\n\t\twhy: message,\n\t\tmeta: { field }\n\t});\n}\nfunction validateContractConfig(contract) {\n\tif (!Object.hasOwn(contract, \"source\")) throwValidation(\"contract.source\", \"Config.contract.source is required when contract is provided\");\n\tconst source = contract[\"source\"];\n\tif (!source || typeof source !== \"object\") throwValidation(\"contract.source\", \"Config.contract.source must be a provider object\");\n\tconst sourceConfig = source;\n\tconst inputs = Object.hasOwn(sourceConfig, \"inputs\") ? sourceConfig[\"inputs\"] : void 0;\n\tif (inputs !== void 0) {\n\t\tif (!Array.isArray(inputs)) throwValidation(\"contract.source.inputs\", \"Config.contract.source.inputs must be an array of strings when provided\");\n\t\tfor (const input of inputs) if (typeof input !== \"string\") throwValidation(\"contract.source.inputs[]\", \"Config.contract.source.inputs must contain only strings\");\n\t}\n\tif (!Object.hasOwn(sourceConfig, \"load\") || typeof sourceConfig[\"load\"] !== \"function\") throwValidation(\"contract.source.load\", \"Config.contract.source.load must be a function\");\n\tconst output = Object.hasOwn(contract, \"output\") ? contract[\"output\"] : void 0;\n\tif (output !== void 0 && typeof output !== \"string\") throwValidation(\"contract.output\", \"Config.contract.output must be a string when provided\");\n}\n/**\n* Validates that the config has the required structure.\n* This is pure validation logic with no file I/O or CLI awareness.\n*\n* @param config - Config object to validate\n* @throws a `CONFIG.VALIDATION_FAILED` structured error if config structure is invalid\n*/\nfunction validateConfig(config) {\n\tif (!config || typeof config !== \"object\") throwValidation(\"object\", \"Config must be an object\");\n\tconst configObj = config;\n\tif (!configObj[\"family\"]) throwValidation(\"family\");\n\tif (!configObj[\"target\"]) throwValidation(\"target\");\n\tif (!configObj[\"adapter\"]) throwValidation(\"adapter\");\n\tconst family = configObj[\"family\"];\n\tif (family[\"kind\"] !== \"family\") throwValidation(\"family.kind\", \"Config.family must have kind: \\\"family\\\"\");\n\tif (typeof family[\"id\"] !== \"string\") throwValidation(\"family.id\", \"Config.family must have id: string\");\n\tif (typeof family[\"familyId\"] !== \"string\") throwValidation(\"family.familyId\", \"Config.family must have familyId: string\");\n\tif (typeof family[\"version\"] !== \"string\") throwValidation(\"family.version\", \"Config.family must have version: string\");\n\tif (!family[\"emission\"] || typeof family[\"emission\"] !== \"object\") throwValidation(\"family.emission\", \"Config.family must have emission: EmissionSpi\");\n\tif (typeof family[\"create\"] !== \"function\") throwValidation(\"family.create\", \"Config.family must have create: function\");\n\tconst familyId = family[\"familyId\"];\n\tconst target = configObj[\"target\"];\n\tif (target[\"kind\"] !== \"target\") throwValidation(\"target.kind\", \"Config.target must have kind: \\\"target\\\"\");\n\tif (typeof target[\"id\"] !== \"string\") throwValidation(\"target.id\", \"Config.target must have id: string\");\n\tif (typeof target[\"familyId\"] !== \"string\") throwValidation(\"target.familyId\", \"Config.target must have familyId: string\");\n\tif (typeof target[\"version\"] !== \"string\") throwValidation(\"target.version\", \"Config.target must have version: string\");\n\tif (target[\"familyId\"] !== familyId) throwValidation(\"target.familyId\", `Config.target.familyId must match Config.family.familyId (expected: ${familyId}, got: ${target[\"familyId\"]})`);\n\tif (typeof target[\"targetId\"] !== \"string\") throwValidation(\"target.targetId\", \"Config.target must have targetId: string\");\n\tif (typeof target[\"create\"] !== \"function\") throwValidation(\"target.create\", \"Config.target must have create: function\");\n\tconst expectedTargetId = target[\"targetId\"];\n\tconst adapter = configObj[\"adapter\"];\n\tif (adapter[\"kind\"] !== \"adapter\") throwValidation(\"adapter.kind\", \"Config.adapter must have kind: \\\"adapter\\\"\");\n\tif (typeof adapter[\"id\"] !== \"string\") throwValidation(\"adapter.id\", \"Config.adapter must have id: string\");\n\tif (typeof adapter[\"familyId\"] !== \"string\") throwValidation(\"adapter.familyId\", \"Config.adapter must have familyId: string\");\n\tif (typeof adapter[\"version\"] !== \"string\") throwValidation(\"adapter.version\", \"Config.adapter must have version: string\");\n\tif (adapter[\"familyId\"] !== familyId) throwValidation(\"adapter.familyId\", `Config.adapter.familyId must match Config.family.familyId (expected: ${familyId}, got: ${adapter[\"familyId\"]})`);\n\tif (typeof adapter[\"targetId\"] !== \"string\") throwValidation(\"adapter.targetId\", \"Config.adapter must have targetId: string\");\n\tif (adapter[\"targetId\"] !== expectedTargetId) throwValidation(\"adapter.targetId\", `Config.adapter.targetId must match Config.target.targetId (expected: ${expectedTargetId}, got: ${adapter[\"targetId\"]})`);\n\tif (typeof adapter[\"create\"] !== \"function\") throwValidation(\"adapter.create\", \"Config.adapter must have create: function\");\n\tif (configObj[\"extensionPacks\"] !== void 0) throwValidation(\"extensionPacks\", \"Config.extensionPacks is no longer supported; rename it to Config.extensions\");\n\tif (configObj[\"extensions\"] !== void 0) {\n\t\tif (!Array.isArray(configObj[\"extensions\"])) throwValidation(\"extensions\", \"Config.extensions must be an array\");\n\t\tfor (const ext of configObj[\"extensions\"]) {\n\t\t\tif (!ext || typeof ext !== \"object\") throwValidation(\"extensions[]\", \"Config.extensions must contain ControlExtensionDescriptor objects\");\n\t\t\tconst extObj = ext;\n\t\t\tif (extObj[\"kind\"] !== \"extension\") throwValidation(\"extensions[].kind\", \"Config.extensions items must have kind: \\\"extension\\\"\");\n\t\t\tif (typeof extObj[\"id\"] !== \"string\") throwValidation(\"extensions[].id\", \"Config.extensions items must have id: string\");\n\t\t\tif (typeof extObj[\"familyId\"] !== \"string\") throwValidation(\"extensions[].familyId\", \"Config.extensions items must have familyId: string\");\n\t\t\tif (typeof extObj[\"version\"] !== \"string\") throwValidation(\"extensions[].version\", \"Config.extensions items must have version: string\");\n\t\t\tif (extObj[\"familyId\"] !== familyId) throwValidation(\"extensions[].familyId\", `Config.extensions[].familyId must match Config.family.familyId (expected: ${familyId}, got: ${extObj[\"familyId\"]})`);\n\t\t\tif (typeof extObj[\"targetId\"] !== \"string\") throwValidation(\"extensions[].targetId\", \"Config.extensions items must have targetId: string\");\n\t\t\tif (extObj[\"targetId\"] !== expectedTargetId) throwValidation(\"extensions[].targetId\", `Config.extensions[].targetId must match Config.target.targetId (expected: ${expectedTargetId}, got: ${extObj[\"targetId\"]})`);\n\t\t\tif (typeof extObj[\"create\"] !== \"function\") throwValidation(\"extensions[].create\", \"Config.extensions items must have create: function\");\n\t\t}\n\t}\n\tif (configObj[\"driver\"] !== void 0) {\n\t\tconst driver = configObj[\"driver\"];\n\t\tif (driver[\"kind\"] !== \"driver\") throwValidation(\"driver.kind\", \"Config.driver must have kind: \\\"driver\\\"\");\n\t\tif (typeof driver[\"id\"] !== \"string\") throwValidation(\"driver.id\", \"Config.driver must have id: string\");\n\t\tif (typeof driver[\"version\"] !== \"string\") throwValidation(\"driver.version\", \"Config.driver must have version: string\");\n\t\tif (typeof driver[\"familyId\"] !== \"string\") throwValidation(\"driver.familyId\", \"Config.driver must have familyId: string\");\n\t\tif (driver[\"familyId\"] !== familyId) throwValidation(\"driver.familyId\", `Config.driver.familyId must match Config.family.familyId (expected: ${familyId}, got: ${driver[\"familyId\"]})`);\n\t\tif (typeof driver[\"targetId\"] !== \"string\") throwValidation(\"driver.targetId\", \"Config.driver must have targetId: string\");\n\t\tif (driver[\"targetId\"] !== expectedTargetId) throwValidation(\"driver.targetId\", `Config.driver.targetId must match Config.target.targetId (expected: ${expectedTargetId}, got: ${driver[\"targetId\"]})`);\n\t\tif (typeof driver[\"create\"] !== \"function\") throwValidation(\"driver.create\", \"Config.driver must have create: function\");\n\t}\n\tif (configObj[\"contract\"] !== void 0) {\n\t\tconst contract = configObj[\"contract\"];\n\t\tif (!contract || typeof contract !== \"object\") throwValidation(\"contract\", \"Config.contract must be an object\");\n\t\tvalidateContractConfig(contract);\n\t}\n}\n//#endregion\nexport { validateConfig };\n\n//# sourceMappingURL=config-validation.mjs.map"],"mappings":"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"}
@@ -0,0 +1,14 @@
1
+ import { p as PrismaNextConfig } from "./config-types-W-87vhZ4-BgYaH8YO.mjs";
2
+ //#region ../../../1-framework/1-core/config/dist/config-validation.d.mts
3
+ //#region src/config-validation.d.ts
4
+ /**
5
+ * Validates that the config has the required structure.
6
+ * This is pure validation logic with no file I/O or CLI awareness.
7
+ *
8
+ * @param config - Config object to validate
9
+ * @throws a `CONFIG.VALIDATION_FAILED` structured error if config structure is invalid
10
+ */
11
+ declare function validateConfig(config: unknown): asserts config is PrismaNextConfig;
12
+ //#endregion
13
+ export { validateConfig as t };
14
+ //# sourceMappingURL=config-validation-DXggMTZf.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-validation-DXggMTZf.d.mts","names":[],"sources":["../../../../1-framework/1-core/config/dist/config-validation.d.mts"],"mappings":";;;;;;;;;;iBASiB,eAAe,0BAA0B,UAAU"}
@@ -0,0 +1,4 @@
1
+ import { _ as normalizeContractConfig, a as ContractSourceDiagnosticSpan, c as ContractSourceProvider, d as FormatterConfig, f as OpaqueContractSourceProvider, g as defineConfig, h as TypeScriptContractSourceProvider, i as ContractSourceDiagnosticPosition, l as ContractSourceProviderBase, m as PslContractSourceProvider, n as ContractSourceContext, o as ContractSourceDiagnostics, p as PrismaNextConfig, r as ContractSourceDiagnostic, s as ContractSourceFormat, t as ContractConfig, u as DEFAULT_CONTRACT_SOURCE_DIR } from "./config-types-W-87vhZ4-BgYaH8YO.mjs";
2
+ import "./config-types-zrHI32Om.mjs";
3
+ import { t as validateConfig } from "./config-validation-DXggMTZf.mjs";
4
+ export { type ContractConfig, type ContractSourceContext, type ContractSourceDiagnostic, type ContractSourceDiagnosticPosition, type ContractSourceDiagnosticSpan, type ContractSourceDiagnostics, type ContractSourceFormat, type ContractSourceProvider, type ContractSourceProviderBase, DEFAULT_CONTRACT_SOURCE_DIR, type FormatterConfig, type OpaqueContractSourceProvider, type PrismaNextConfig, type PslContractSourceProvider, type TypeScriptContractSourceProvider, defineConfig, normalizeContractConfig, validateConfig };
@@ -0,0 +1,3 @@
1
+ import { n as defineConfig, r as normalizeContractConfig, t as DEFAULT_CONTRACT_SOURCE_DIR } from "./config-types-Cf9lVsHR.mjs";
2
+ import { t as validateConfig } from "./config-validation-ByGTw6zQ.mjs";
3
+ export { DEFAULT_CONTRACT_SOURCE_DIR, defineConfig, normalizeContractConfig, validateConfig };
@@ -0,0 +1,3 @@
1
+ import { _ as normalizeContractConfig, a as ContractSourceDiagnosticSpan, c as ContractSourceProvider, d as FormatterConfig, f as OpaqueContractSourceProvider, g as defineConfig, h as TypeScriptContractSourceProvider, i as ContractSourceDiagnosticPosition, l as ContractSourceProviderBase, m as PslContractSourceProvider, n as ContractSourceContext, o as ContractSourceDiagnostics, p as PrismaNextConfig, r as ContractSourceDiagnostic, s as ContractSourceFormat, t as ContractConfig, u as DEFAULT_CONTRACT_SOURCE_DIR } from "./config-types-W-87vhZ4-BgYaH8YO.mjs";
2
+ import "./config-types-zrHI32Om.mjs";
3
+ export { type ContractConfig, type ContractSourceContext, type ContractSourceDiagnostic, type ContractSourceDiagnosticPosition, type ContractSourceDiagnosticSpan, type ContractSourceDiagnostics, type ContractSourceFormat, type ContractSourceProvider, type ContractSourceProviderBase, DEFAULT_CONTRACT_SOURCE_DIR, type FormatterConfig, type OpaqueContractSourceProvider, type PrismaNextConfig, type PslContractSourceProvider, type TypeScriptContractSourceProvider, defineConfig, normalizeContractConfig };
@@ -0,0 +1,2 @@
1
+ import { n as defineConfig, r as normalizeContractConfig, t as DEFAULT_CONTRACT_SOURCE_DIR } from "./config-types-Cf9lVsHR.mjs";
2
+ export { DEFAULT_CONTRACT_SOURCE_DIR, defineConfig, normalizeContractConfig };
@@ -0,0 +1,2 @@
1
+ import { t as validateConfig } from "./config-validation-DXggMTZf.mjs";
2
+ export { validateConfig };
@@ -0,0 +1,2 @@
1
+ import { t as validateConfig } from "./config-validation-ByGTw6zQ.mjs";
2
+ export { validateConfig };
@@ -0,0 +1,213 @@
1
+ import { l as AuthoringEntityTypeNamespace, o as AuthoringEntityContext, s as AuthoringEntityTypeDescriptor } from "./framework-authoring-7YMP9TwM-C9P-N6_a.mjs";
2
+ import "./authoring-Dd7p6pTS.mjs";
3
+ import { a as ColumnTypeDescriptor } from "./codec-D3GVAkR_.mjs";
4
+ //#region ../../../1-framework/2-authoring/contract/dist/index.d.mts
5
+ //#region src/capability-registry.d.ts
6
+ type CapabilityMatrix = Readonly<Record<string, Readonly<Record<string, boolean>>>>;
7
+ /**
8
+ * Deep-merges any number of capability matrices into a single matrix.
9
+ *
10
+ * Merge is purely structural — namespaces and capability flags from later
11
+ * sources overlay earlier ones. Undefined entries are skipped so callers
12
+ * can pass optional sources without pre-filtering.
13
+ *
14
+ * The helper is target-agnostic: it contains no SQL or family-specific
15
+ * knowledge. Higher layers contribute their own capability matrices (for
16
+ * example, a target pack, an extension pack, or the contract author's
17
+ * own `capabilities` block) and call this helper to fold them together.
18
+ */
19
+ declare function mergeCapabilityMatrices(...sources: ReadonlyArray<CapabilityMatrix | undefined>): Record<string, Record<string, boolean>>;
20
+ //#endregion
21
+ //#region src/composed-helpers-scaffolding.d.ts
22
+ /**
23
+ * Family-agnostic merge / instantiation scaffolding for pack-bag-driven
24
+ * authoring contributions. The per-namespace shape (`field`, `type`,
25
+ * `entityTypes`) is parameterized by the discriminator key so each
26
+ * namespace can reuse the same extractor + cross-pack merger without
27
+ * re-deriving the template per family. Call sites flatten merged
28
+ * `entityTypes` onto the user-facing top-level helpers surface
29
+ * alongside the built-in `model` / `rel` (e.g. `helpers.enum(...)`).
30
+ * The contribution data structure stays as
31
+ * `authoring.entityTypes.<name>` — pack authors keep contributing
32
+ * through the namespace; the composed-helpers template performs the
33
+ * rename in the type system.
34
+ *
35
+ * SQL-specific composition (the `field` / `model` / `rel` / `type` core
36
+ * helpers, the SQL index-types merge) lives in the SQL contract-ts
37
+ * package and imports from here.
38
+ */
39
+ type UnionToIntersection<U> = (U extends unknown ? (value: U) => void : never) extends ((value: infer I) => void) ? I : never;
40
+ type AuthoringNamespaceKey = 'field' | 'type' | 'entityTypes';
41
+ type ExtractAuthoringNamespaceFromPack<Pack, Key extends AuthoringNamespaceKey, EmptyNamespace> = Pack extends {
42
+ readonly authoring?: { readonly [P in Key]?: infer Namespace; };
43
+ } ? Namespace extends Record<string, unknown> ? Namespace : EmptyNamespace : EmptyNamespace;
44
+ type MergeExtensionAuthoringNamespaces<Extensions, Key extends AuthoringNamespaceKey, EmptyNamespace = Record<never, never>> = Extensions extends Record<string, unknown> ? keyof Extensions extends never ? EmptyNamespace : UnionToIntersection<{ [K in keyof Extensions]: ExtractAuthoringNamespaceFromPack<Extensions[K], Key, EmptyNamespace>; }[keyof Extensions]> : EmptyNamespace;
45
+ /**
46
+ * Entity-helper shape derivation. Mirrors `FieldHelpersFromNamespace` /
47
+ * `TypeHelpersFromNamespace` in the SQL package: leaf descriptors become
48
+ * callable helpers; nested namespaces recurse.
49
+ */
50
+ type ExtractFactoryInputAndOutput<Descriptor extends AuthoringEntityTypeDescriptor> = Descriptor['output'] extends {
51
+ readonly factory: (input: infer Input, ctx: AuthoringEntityContext) => infer Output;
52
+ } ? {
53
+ input: Input;
54
+ output: Output;
55
+ } : {
56
+ input: unknown;
57
+ output: unknown;
58
+ };
59
+ type EntityHelperFunction<Descriptor extends AuthoringEntityTypeDescriptor> = ExtractFactoryInputAndOutput<Descriptor> extends {
60
+ input: infer Input;
61
+ output: infer Output;
62
+ } ? (input: Input) => Output : never;
63
+ type EntityHelpersFromNamespace<Namespace> = { readonly [K in keyof Namespace]: Namespace[K] extends AuthoringEntityTypeDescriptor ? EntityHelperFunction<Namespace[K]> : Namespace[K] extends Record<string, unknown> ? EntityHelpersFromNamespace<Namespace[K]> : never; };
64
+ interface EntityHelperFactoryOptions {
65
+ readonly ctx: AuthoringEntityContext;
66
+ }
67
+ /**
68
+ * Walks an entity-type namespace (after cross-pack merge) and produces the
69
+ * runtime callable surface mirroring its tree shape. Each leaf
70
+ * descriptor becomes a function `(input) => factory(input, ctx)`;
71
+ * nested namespace objects recurse.
72
+ */
73
+ declare function createEntityHelpersFromNamespace(namespace: AuthoringEntityTypeNamespace, options: EntityHelperFactoryOptions, path?: readonly string[]): Record<string, unknown>;
74
+ //#endregion
75
+ //#region src/descriptors.d.ts
76
+ interface IndexDef {
77
+ readonly columns: readonly string[];
78
+ readonly name?: string;
79
+ readonly type?: string;
80
+ readonly options?: Record<string, unknown>;
81
+ }
82
+ interface ForeignKeyDefaultsState {
83
+ readonly constraint: boolean;
84
+ readonly index: boolean;
85
+ }
86
+ //#endregion
87
+ //#region src/enum-type.d.ts
88
+ /**
89
+ * A single enum member produced by `member()`. The `Name` and `Value` generics
90
+ * are preserved as literal types so `enumType()` can carry the ordered value
91
+ * tuple in its return type. `Value` is whatever the codec dictates — its type
92
+ * is constrained at `enumType` against the codec's input type, not here.
93
+ */
94
+ interface EnumMember<Name extends string, Value> {
95
+ readonly name: Name;
96
+ readonly value: Value;
97
+ }
98
+ /**
99
+ * Declare an enum member. The `value` defaults to `name` when omitted. The
100
+ * value is an unconstrained literal here; `enumType` constrains it against the
101
+ * codec's input type. Both generics are preserved as literals so downstream
102
+ * `enumType` carries the value union in its type; the value is serialized to its
103
+ * codec string form only at lowering.
104
+ */
105
+ declare function member<const Name extends string>(name: Name): EnumMember<Name, Name>;
106
+ declare function member<const Name extends string, const Value>(name: Name, value: Value): EnumMember<Name, Value>;
107
+ type MembersToValues<Members extends readonly EnumMember<string, unknown>[]> = { readonly [K in keyof Members]: Members[K] extends EnumMember<string, infer V> ? V : never; };
108
+ type MembersToNames<Members extends readonly EnumMember<string, unknown>[]> = { readonly [K in keyof Members]: Members[K] extends EnumMember<infer N, unknown> ? N : never; };
109
+ type MembersAccessorMap<Members extends readonly EnumMember<string, unknown>[]> = { readonly [M in Members[number] as M['name']]: M['value']; };
110
+ declare const ENUM_TYPE_HANDLE_BRAND = "__prismaNextEnumTypeHandle__";
111
+ /** Authoring handle returned by `enumType()`. Generic over the ordered value tuple so `const Role = enumType(...)` retains literal types. */
112
+ interface EnumTypeHandle<Name extends string = string, Values extends readonly unknown[] = readonly unknown[], Names extends readonly string[] = readonly string[], MembersMap extends Record<string, unknown> = Record<string, unknown>> {
113
+ /** Internal brand for lowering-pipeline detection. */
114
+ readonly [ENUM_TYPE_HANDLE_BRAND]: true;
115
+ /** The enum's declared name (used as the key in domain `enum` / storage `valueSet`). */
116
+ readonly enumName: Name;
117
+ /** codecId from the codec passed to `enumType`. */
118
+ readonly codecId: string;
119
+ /** nativeType from the codec passed to `enumType`. */
120
+ readonly nativeType: string;
121
+ /** Ordered member list for lowering (name + value pairs). */
122
+ readonly enumMembers: readonly {
123
+ readonly name: string;
124
+ readonly value: Values[number];
125
+ }[];
126
+ /** Ordered literal value tuple. Declaration order is preserved. */
127
+ readonly values: Values;
128
+ /** Ordered literal name tuple. Declaration order is preserved. */
129
+ readonly names: Names;
130
+ /**
131
+ * Namespaced accessor map: `Role.members.User === 'user'`.
132
+ * Namespaced under `.members` to avoid collisions with `.values` / `.has`.
133
+ */
134
+ readonly members: MembersMap;
135
+ /** Returns `true` if `v` is a declared member value. */
136
+ has(v: Values[number]): boolean;
137
+ /** Returns the member name for a value, or `undefined` if not found. */
138
+ nameOf(v: Values[number]): string | undefined;
139
+ /** Returns the zero-based declaration index of a value, or `-1` if not found. */
140
+ ordinalOf(v: Values[number]): number;
141
+ }
142
+ /**
143
+ * A codec typemap: codecId → `{ input, output }`, the same shape the query
144
+ * lanes consume. The bound `enumType` wrappers supply the target pack's
145
+ * typemap; the core defaults to an empty map (no codec is known), so member
146
+ * values stay unconstrained.
147
+ */
148
+ type CodecTypeMap = Record<string, {
149
+ readonly input?: unknown;
150
+ }>;
151
+ /**
152
+ * The application input type the codec dictates for an enum's member values:
153
+ * looks `Codec['codecId']` up in the supplied codec typemap. When the codecId
154
+ * isn't in the map the input is unconstrained, so any member-value literal is
155
+ * accepted and inferred verbatim.
156
+ */
157
+ type CodecInput<CodecTypes extends CodecTypeMap, Codec extends {
158
+ readonly codecId: string;
159
+ }> = Codec['codecId'] extends keyof CodecTypes ? CodecTypes[Codec['codecId']] extends {
160
+ readonly input: infer In;
161
+ } ? In : unknown : unknown;
162
+ /**
163
+ * Declare a domain enum for use in TS-authoring contracts.
164
+ *
165
+ * - The codec is an explicit required argument — the `codecId` and
166
+ * `nativeType` are taken from the passed `ColumnTypeDescriptor` (e.g.
167
+ * `{ codecId: 'pg/text@1', nativeType: 'text' }` from a field preset
168
+ * output or a direct inline object).
169
+ * - `const` generics on the members spread preserve the ordered literal
170
+ * value tuple so `Role.values` is `readonly ['user','admin']`, not
171
+ * `string[]`.
172
+ * - Well-formedness assertions at construction: non-empty member list;
173
+ * unique names; unique values.
174
+ *
175
+ * The returned handle wires into `field.namedType(handle)` to set
176
+ * `valueSet` refs on both the domain field and the storage column.
177
+ *
178
+ * @example
179
+ * ```ts
180
+ * const Role = enumType('Role', { codecId: 'pg/text@1', nativeType: 'text' },
181
+ * member('User', 'user'),
182
+ * member('Admin', 'admin'),
183
+ * );
184
+ * // Role.values → readonly ['user', 'admin']
185
+ * // Role.members.User → 'user'
186
+ * ```
187
+ */
188
+ declare function enumType<CodecTypes extends CodecTypeMap = Record<string, never>, const Name extends string = string, const Codec extends Pick<ColumnTypeDescriptor, 'codecId' | 'nativeType'> = Pick<ColumnTypeDescriptor, 'codecId' | 'nativeType'>, const Members extends readonly [EnumMember<string, CodecInput<CodecTypes, Codec>>, ...EnumMember<string, CodecInput<CodecTypes, Codec>>[]] = readonly [EnumMember<string, CodecInput<CodecTypes, Codec>>]>(name: Name, codec: Codec, ...members: Members): EnumTypeHandle<Name, MembersToValues<[...Members]>, MembersToNames<[...Members]>, MembersAccessorMap<[...Members]>>;
189
+ declare function enumType(name: string, codec: Pick<ColumnTypeDescriptor, 'codecId' | 'nativeType'>, ...members: EnumMember<string, unknown>[]): EnumTypeHandle;
190
+ /**
191
+ * The signature of an `enumType` whose codec typemap is already bound — the
192
+ * shape a target-bound wrapper (e.g. `@internal/postgres/contract-builder`)
193
+ * exposes. The member values are constrained to the codec's input type drawn
194
+ * from `CodecTypes`, while `Name`, `Codec`, and the member tuple still infer
195
+ * from the call.
196
+ */
197
+ type BoundEnumType<CodecTypes extends CodecTypeMap> = <const Name extends string, const Codec extends Pick<ColumnTypeDescriptor, 'codecId' | 'nativeType'>, const Members extends readonly [EnumMember<string, CodecInput<CodecTypes, Codec>>, ...EnumMember<string, CodecInput<CodecTypes, Codec>>[]]>(name: Name, codec: Codec, ...members: Members) => EnumTypeHandle<Name, MembersToValues<[...Members]>, MembersToNames<[...Members]>, MembersAccessorMap<[...Members]>>;
198
+ /**
199
+ * Bind `enumType` to a target's codec typemap. The returned function is the
200
+ * same runtime `enumType`, retyped so member values are constrained to the
201
+ * codec's input type. Target packages call this with their pack's
202
+ * `ExtractCodecTypesFromPack<Pack>` to expose a codec-aware `enumType`.
203
+ */
204
+ declare function bindEnumType<CodecTypes extends CodecTypeMap>(): BoundEnumType<CodecTypes>;
205
+ /**
206
+ * Returns true when the value is an `EnumTypeHandle` produced by
207
+ * `enumType()`. Used in the lowering pipeline to detect enum handles
208
+ * in field state without importing the brand key at every call site.
209
+ */
210
+ declare function isEnumTypeHandle(value: unknown): value is EnumTypeHandle;
211
+ //#endregion
212
+ export { type AuthoringNamespaceKey, type BoundEnumType, type CapabilityMatrix, type CodecInput, type CodecTypeMap, ENUM_TYPE_HANDLE_BRAND, type EntityHelperFactoryOptions, type EntityHelperFunction, type EntityHelpersFromNamespace, type EnumMember, type EnumTypeHandle, type ExtractAuthoringNamespaceFromPack, type ForeignKeyDefaultsState, type IndexDef, type MergeExtensionAuthoringNamespaces, type UnionToIntersection, bindEnumType, createEntityHelpersFromNamespace, enumType, isEnumTypeHandle, member, mergeCapabilityMatrices };
213
+ //# sourceMappingURL=contract-authoring.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract-authoring.d.mts","names":[],"sources":["../../../../1-framework/2-authoring/contract/dist/index.d.mts"],"mappings":";;;;;KAGK,mBAAmB,SAAS,eAAe,SAAS;;;;;;;;;;;;;iBAaxC,2BAA2B,SAAS,cAAc,gCAAgC,eAAe;;;;;;;;;;;;;;;;;;;;KAoB7G,oBAAoB,MAAM,qBAAqB,OAAO,8BAA8B,aAAa,cAAc;KAC/G;KACA,kCAAkC,MAAM,YAAY,uBAAuB,kBAAkB;WACvF,wBAAwB,KAAK,aAAa;IACjD,kBAAkB,0BAA0B,YAAY,iBAAiB;KACxE,kCAAkC,YAAY,YAAY,uBAAuB,iBAAiB,wBAAwB,mBAAmB,gCAAgC,2BAA2B,iBAAiB,uBAAuB,WAAW,aAAa,kCAAkC,WAAW,IAAI,KAAK,yBAAyB,eAAe;;;;;;KAMtW,6BAA6B,mBAAmB,iCAAiC;WAC3E,UAAU,aAAa,OAAO,KAAK,iCAAiC;;EAE7E,OAAO;EACP,QAAQ;;EAER;EACA;;KAEG,qBAAqB,mBAAmB,iCAAiC,6BAA6B;EACzG,aAAa;EACb,cAAc;KACX,OAAO,UAAU;KACjB,2BAA2B,yBAAyB,WAAW,YAAY,UAAU,WAAW,gCAAgC,qBAAqB,UAAU,MAAM,UAAU,WAAW,0BAA0B,2BAA2B,UAAU;UACpP;WACC,KAAK;;;;;;;;iBAQC,iCAAiC,WAAW,8BAA8B,SAAS,4BAA4B,2BAA2B;;;UAGjJ;WACC;WACA;WACA;WACA,UAAU;;UAEX;WACC;WACA;;;;;;;;;;UAUD,WAAW,qBAAqB;WAC/B,MAAM;WACN,OAAO;;;;;;;;;iBASD,aAAa,qBAAqB,MAAM,OAAO,WAAW,MAAM;iBAChE,aAAa,2BAA2B,OAAO,MAAM,MAAM,OAAO,QAAQ,WAAW,MAAM;KACvG,gBAAgB,yBAAyB,6CAA6C,WAAW,UAAU,QAAQ,WAAW,yBAAyB,KAAK;KAC5J,eAAe,yBAAyB,6CAA6C,WAAW,UAAU,QAAQ,WAAW,iBAAiB,cAAc;KAC5J,mBAAmB,yBAAyB,6CAA6C,KAAK,mBAAmB,YAAY;cACpH;;UAEJ,eAAe,8BAA8B,wDAAwD,qDAAqD,mBAAmB,0BAA0B;;YAErM;;WAED,UAAU;;WAEV;;WAEA;;WAEA;aACE;aACA,OAAO;;;WAGT,QAAQ;;WAER,OAAO;;;;;WAKP,SAAS;;EAElB,IAAI,GAAG;;EAEP,OAAO,GAAG;;EAEV,UAAU,GAAG;;;;;;;;KAQV,eAAe;WACT;;;;;;;;KAQN,WAAW,mBAAmB,cAAc;WACtC;KACN,+BAA+B,aAAa,WAAW;WACjD,aAAa;IACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA2Ba,SAAS,mBAAmB,eAAe,6BAA6B,oCAAoC,cAAc,KAAK,kDAAkD,KAAK,uDAAuD,0BAA0B,mBAAmB,WAAW,YAAY,YAAY,mBAAmB,WAAW,YAAY,uBAAuB,mBAAmB,WAAW,YAAY,UAAU,MAAM,MAAM,OAAO,UAAU,SAAS,UAAU,eAAe,MAAM,oBAAoB,WAAW,mBAAmB,WAAW,uBAAuB;iBAC3kB,SAAS,cAAc,OAAO,KAAK,oDAAoD,SAAS,gCAAgC;;;;;;;;KAQ5I,cAAc,mBAAmB,uBAAuB,2BAA2B,cAAc,KAAK,uDAAuD,0BAA0B,mBAAmB,WAAW,YAAY,YAAY,mBAAmB,WAAW,YAAY,YAAY,MAAM,MAAM,OAAO,UAAU,SAAS,YAAY,eAAe,MAAM,oBAAoB,WAAW,mBAAmB,WAAW,uBAAuB;;;;;;;iBAOlb,aAAa,mBAAmB,iBAAiB,cAAc;;;;;;iBAM/D,iBAAiB,iBAAiB,SAAS"}