@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 @@
1
+ {"version":3,"file":"canonical-stringify-DY4NaAJi.mjs","names":[],"sources":["../../../../1-framework/0-foundation/utils/dist/canonical-stringify.mjs"],"sourcesContent":["//#region src/canonical-stringify.ts\n/**\n* Produces a deterministic, JSON-like string representation of a value.\n*\n* Designed for use as a stable identity / cache key. Two values that are\n* structurally equivalent — regardless of object key insertion order —\n* produce the same string. Two values that differ in any meaningful way\n* (including types that JSON would conflate, like `BigInt(1)` vs `1`)\n* produce different strings.\n*\n* Supported inputs:\n* - `null`, `undefined` (distinguishable: `null` → `\"null\"`, `undefined` → `\"undefined\"`)\n* - `boolean`, `string`, `number` (including `NaN`, `Infinity`, `-Infinity`)\n* - `bigint` (suffixed with `n` to disambiguate from `number`)\n* - `Date` (tagged + ISO string)\n* - `Buffer` / `Uint8Array` (tagged + hex-encoded as `Bytes(<hex>)`)\n* - Other `ArrayBuffer` views — `Int8Array`, `Uint16Array`, `Float64Array`,\n* `DataView`, etc. (tagged with the constructor name + hex-encoded over\n* the underlying bytes, e.g. `Uint16Array(<hex>)`). Note that the bytes\n* are read in host byte order, so callers that need cross-platform\n* stability for multi-byte typed arrays should normalize endianness\n* before passing the value in.\n* - Arrays (order-preserving)\n* - Plain objects (key-sorted) — only objects whose prototype is\n* `Object.prototype` or `null`. Non-plain objects (`Map`, `Set`,\n* `RegExp`, class instances, etc.) are rejected so they cannot silently\n* collapse to `{}` and collide with each other.\n*\n* Throws on `function`, `symbol`, circular references, non-plain objects,\n* and objects with symbol-keyed properties (which `Object.keys` would\n* silently drop). Callers that need to canonicalize any of these must\n* convert them to a supported representation first.\n*\n* The output format is intentionally not JSON: the type tags and BigInt\n* suffix mean it cannot be round-tripped via `JSON.parse`. The goal is\n* keying, not serialization.\n*\n* @example\n* ```typescript\n* canonicalStringify({ a: 1, b: 2 }) === canonicalStringify({ b: 2, a: 1 })\n* // → true\n*\n* canonicalStringify(1n) !== canonicalStringify(1)\n* // → true\n* ```\n*/\nfunction canonicalStringify(value) {\n\treturn write(value, /* @__PURE__ */ new Set());\n}\nfunction write(value, seen) {\n\tif (value === null) return \"null\";\n\tif (value === void 0) return \"undefined\";\n\tswitch (typeof value) {\n\t\tcase \"boolean\": return value ? \"true\" : \"false\";\n\t\tcase \"number\": return writeNumber(value);\n\t\tcase \"bigint\": return `${value.toString()}n`;\n\t\tcase \"string\": return JSON.stringify(value);\n\t\tcase \"function\": throw new TypeError(\"canonicalStringify: functions are not supported\");\n\t\tcase \"symbol\": throw new TypeError(\"canonicalStringify: symbols are not supported\");\n\t}\n\tconst obj = value;\n\tif (value instanceof Date) return `Date(${value.toISOString()})`;\n\tif (value instanceof Uint8Array) return `Bytes(${bytesToHex(value)})`;\n\tif (ArrayBuffer.isView(value)) return `${value.constructor.name}(${bytesToHex(new Uint8Array(value.buffer, value.byteOffset, value.byteLength))})`;\n\tif (seen.has(obj)) throw new TypeError(\"canonicalStringify: circular reference detected\");\n\tseen.add(obj);\n\ttry {\n\t\tif (Array.isArray(value)) return `[${value.map((item) => write(item, seen)).join(\",\")}]`;\n\t\treturn writePlainObject(obj, seen);\n\t} finally {\n\t\tseen.delete(obj);\n\t}\n}\nfunction writeNumber(value) {\n\tif (Number.isNaN(value)) return \"NaN\";\n\tif (value === Number.POSITIVE_INFINITY) return \"Infinity\";\n\tif (value === Number.NEGATIVE_INFINITY) return \"-Infinity\";\n\tif (value === 0 && 1 / value === Number.NEGATIVE_INFINITY) return \"-0\";\n\treturn String(value);\n}\nfunction writePlainObject(obj, seen) {\n\tconst proto = Object.getPrototypeOf(obj);\n\tif (proto !== Object.prototype && proto !== null) {\n\t\tconst tag = proto?.constructor?.name ?? \"unknown\";\n\t\tthrow new TypeError(`canonicalStringify: non-plain objects are not supported (got ${tag})`);\n\t}\n\tif (Object.getOwnPropertySymbols(obj).length > 0) throw new TypeError(\"canonicalStringify: objects with symbol-keyed properties are not supported\");\n\tconst keys = Object.keys(obj).sort();\n\tconst parts = [];\n\tfor (const key of keys) parts.push(`${JSON.stringify(key)}:${write(obj[key], seen)}`);\n\treturn `{${parts.join(\",\")}}`;\n}\nfunction bytesToHex(bytes) {\n\tlet out = \"\";\n\tfor (let i = 0; i < bytes.length; i++) {\n\t\tconst byte = bytes[i];\n\t\tout += byte.toString(16).padStart(2, \"0\");\n\t}\n\treturn out;\n}\n//#endregion\nexport { canonicalStringify };\n\n//# sourceMappingURL=canonical-stringify.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,SAAS,mBAAmB,OAAO;CAClC,OAAO,MAAM,uBAAuB,IAAI,IAAI,CAAC;AAC9C;AACA,SAAS,MAAM,OAAO,MAAM;CAC3B,IAAI,UAAU,MAAM,OAAO;CAC3B,IAAI,UAAU,KAAK,GAAG,OAAO;CAC7B,QAAQ,OAAO,OAAf;EACC,KAAK,WAAW,OAAO,QAAQ,SAAS;EACxC,KAAK,UAAU,OAAO,YAAY,KAAK;EACvC,KAAK,UAAU,OAAO,GAAG,MAAM,SAAS,EAAE;EAC1C,KAAK,UAAU,OAAO,KAAK,UAAU,KAAK;EAC1C,KAAK,YAAY,MAAM,IAAI,UAAU,iDAAiD;EACtF,KAAK,UAAU,MAAM,IAAI,UAAU,+CAA+C;CACnF;CACA,MAAM,MAAM;CACZ,IAAI,iBAAiB,MAAM,OAAO,QAAQ,MAAM,YAAY,EAAE;CAC9D,IAAI,iBAAiB,YAAY,OAAO,SAAS,WAAW,KAAK,EAAE;CACnE,IAAI,YAAY,OAAO,KAAK,GAAG,OAAO,GAAG,MAAM,YAAY,KAAK,GAAG,WAAW,IAAI,WAAW,MAAM,QAAQ,MAAM,YAAY,MAAM,UAAU,CAAC,EAAE;CAChJ,IAAI,KAAK,IAAI,GAAG,GAAG,MAAM,IAAI,UAAU,iDAAiD;CACxF,KAAK,IAAI,GAAG;CACZ,IAAI;EACH,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,IAAI,MAAM,KAAK,SAAS,MAAM,MAAM,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;EACtF,OAAO,iBAAiB,KAAK,IAAI;CAClC,UAAU;EACT,KAAK,OAAO,GAAG;CAChB;AACD;AACA,SAAS,YAAY,OAAO;CAC3B,IAAI,OAAO,MAAM,KAAK,GAAG,OAAO;CAChC,IAAI,UAAU,OAAO,mBAAmB,OAAO;CAC/C,IAAI,UAAU,OAAO,mBAAmB,OAAO;CAC/C,IAAI,UAAU,KAAK,IAAI,UAAU,OAAO,mBAAmB,OAAO;CAClE,OAAO,OAAO,KAAK;AACpB;AACA,SAAS,iBAAiB,KAAK,MAAM;CACpC,MAAM,QAAQ,OAAO,eAAe,GAAG;CACvC,IAAI,UAAU,OAAO,aAAa,UAAU,MAAM;EACjD,MAAM,MAAM,OAAO,aAAa,QAAQ;EACxC,MAAM,IAAI,UAAU,gEAAgE,IAAI,EAAE;CAC3F;CACA,IAAI,OAAO,sBAAsB,GAAG,CAAC,CAAC,SAAS,GAAG,MAAM,IAAI,UAAU,4EAA4E;CAClJ,MAAM,OAAO,OAAO,KAAK,GAAG,CAAC,CAAC,KAAK;CACnC,MAAM,QAAQ,CAAC;CACf,KAAK,MAAM,OAAO,MAAM,MAAM,KAAK,GAAG,KAAK,UAAU,GAAG,EAAE,GAAG,MAAM,IAAI,MAAM,IAAI,GAAG;CACpF,OAAO,IAAI,MAAM,KAAK,GAAG,EAAE;AAC5B;AACA,SAAS,WAAW,OAAO;CAC1B,IAAI,MAAM;CACV,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;EACtC,MAAM,OAAO,MAAM;EACnB,OAAO,KAAK,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG;CACzC;CACA,OAAO;AACR"}
@@ -0,0 +1,69 @@
1
+ import { t as Contract } from "./contract-types-CkdMH7F7-9EHXSwbH.mjs";
2
+ import { n as JsonObject } from "./json-Dkqr3say.mjs";
3
+ //#region ../../../1-framework/0-foundation/contract/dist/canonicalization-DFpB09nP.d.mts
4
+ //#region src/canonicalization.d.ts
5
+ /**
6
+ * Per-target contract serializer hook. The framework canonicalizer uses
7
+ * this to convert an in-memory contract (which may carry class-instance
8
+ * IR nodes whose runtime-only fields must not appear in the on-disk
9
+ * envelope) into a plain JsonObject before applying the family-agnostic
10
+ * canonical-key ordering / default-omission / sort steps. Targets whose
11
+ * contract is JSON-clean by construction return the contract unchanged.
12
+ */
13
+ type SerializeContract = (contract: Contract) => JsonObject;
14
+ /**
15
+ * Family-contributed predicate for the default-omission walk. Called when
16
+ * a value at `path` is a default (empty object/array or `false`); if this
17
+ * returns `true` the value is kept rather than stripped.
18
+ *
19
+ * The framework only calls the predicate inside the `isDefaultValue` branch,
20
+ * so there is no need to guard against non-default values.
21
+ */
22
+ type PreserveEmptyPredicate = (path: readonly string[]) => boolean;
23
+ /**
24
+ * Family-contributed storage sort. Applied to the serialized `storage`
25
+ * subtree after the default-omission walk; the result replaces the
26
+ * `storage` field before the final key sort. Use to establish a
27
+ * deterministic order for storage arrays (indexes, uniques) that the
28
+ * family-agnostic `sortObjectKeys` pass cannot handle.
29
+ */
30
+ type StorageSort = (storage: unknown) => unknown;
31
+ interface CanonicalizeContractOptions {
32
+ readonly schemaVersion?: string;
33
+ /**
34
+ * Per-target hook that converts the in-memory contract (which may
35
+ * carry class-instance IR nodes) into a plain JsonObject before the
36
+ * family-agnostic canonicalization steps run.
37
+ *
38
+ * Routing through the hook is what lets each target decide which
39
+ * fields appear in the on-disk envelope; runtime-only class API
40
+ * fields stay invisible to the canonicalization walk by virtue of
41
+ * the per-target serializer not putting them in the JSON shape.
42
+ */
43
+ readonly serializeContract: SerializeContract;
44
+ /**
45
+ * Family-contributed preserve-empty predicate. When the walk encounters a
46
+ * default value (empty object/array or `false`) at `path`, calling this
47
+ * with the full path allows the family to veto the omission. If absent,
48
+ * only the framework's family-agnostic required-slot rules apply.
49
+ */
50
+ readonly shouldPreserveEmpty?: PreserveEmptyPredicate;
51
+ /**
52
+ * Family-contributed storage sort. Applied to the serialized `storage`
53
+ * subtree after the default-omission walk, before the final key sort.
54
+ * SQL family uses this to impose a deterministic order on `indexes` and
55
+ * `uniques` arrays within each namespace table. Families that require no
56
+ * special storage ordering omit this hook.
57
+ */
58
+ readonly sortStorage?: StorageSort;
59
+ }
60
+ /**
61
+ * Object-form variant of {@link canonicalizeContract}. Exported because the
62
+ * emitter writes the canonical contract through a separate JSON-stringify
63
+ * pass and consumes the structured object directly.
64
+ */
65
+ declare function canonicalizeContractToObject(contract: Contract, options: CanonicalizeContractOptions): Record<string, unknown>;
66
+ declare function canonicalizeContract(contract: Contract, options: CanonicalizeContractOptions): string;
67
+ //#endregion
68
+ export { canonicalizeContract as a, StorageSort as i, PreserveEmptyPredicate as n, canonicalizeContractToObject as o, SerializeContract as r, CanonicalizeContractOptions as t };
69
+ //# sourceMappingURL=canonicalization-DFpB09nP-4OdB2nsy.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canonicalization-DFpB09nP-4OdB2nsy.d.mts","names":[],"sources":["../../../../1-framework/0-foundation/contract/dist/canonicalization-DFpB09nP.d.mts"],"mappings":";;;;;;;;;;;;KAWK,qBAAqB,UAAU,aAAa;;;;;;;;;KAS5C,0BAA0B;;;;;;;;KAQ1B,eAAe;UACV;WACC;;;;;;;;;;;WAWA,mBAAmB;;;;;;;WAOnB,sBAAsB;;;;;;;;WAQtB,cAAc;;;;;;;iBAOR,6BAA6B,UAAU,UAAU,SAAS,8BAA8B;iBACxF,qBAAqB,UAAU,UAAU,SAAS"}
@@ -0,0 +1,25 @@
1
+ //#region ../../../1-framework/0-foundation/contract/dist/canonicalization-path-match-CNgHuwM_.mjs
2
+ function matchesPathPattern(path, pattern) {
3
+ if (path.length !== pattern.length) return false;
4
+ for (let i = 0; i < pattern.length; i++) {
5
+ const segment = pattern[i];
6
+ const value = path[i];
7
+ if (segment === void 0 || value === void 0) return false;
8
+ if (segment === "*") continue;
9
+ if (typeof segment === "string") {
10
+ if (value !== segment) return false;
11
+ continue;
12
+ }
13
+ if (Array.isArray(segment)) {
14
+ if (!segment.includes(value)) return false;
15
+ }
16
+ }
17
+ return true;
18
+ }
19
+ function createPreserveEmptyPredicate(patterns) {
20
+ return (path) => patterns.some((pattern) => matchesPathPattern(path, pattern));
21
+ }
22
+ //#endregion
23
+ export { matchesPathPattern as n, createPreserveEmptyPredicate as t };
24
+
25
+ //# sourceMappingURL=canonicalization-path-match-CNgHuwM_-CCPBeUuk.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canonicalization-path-match-CNgHuwM_-CCPBeUuk.mjs","names":[],"sources":["../../../../1-framework/0-foundation/contract/dist/canonicalization-path-match-CNgHuwM_.mjs"],"sourcesContent":["//#region src/canonicalization-path-match.ts\nfunction matchesPathPattern(path, pattern) {\n\tif (path.length !== pattern.length) return false;\n\tfor (let i = 0; i < pattern.length; i++) {\n\t\tconst segment = pattern[i];\n\t\tconst value = path[i];\n\t\tif (segment === void 0 || value === void 0) return false;\n\t\tif (segment === \"*\") continue;\n\t\tif (typeof segment === \"string\") {\n\t\t\tif (value !== segment) return false;\n\t\t\tcontinue;\n\t\t}\n\t\tif (Array.isArray(segment)) {\n\t\t\tif (!segment.includes(value)) return false;\n\t\t}\n\t}\n\treturn true;\n}\nfunction createPreserveEmptyPredicate(patterns) {\n\treturn (path) => patterns.some((pattern) => matchesPathPattern(path, pattern));\n}\n//#endregion\nexport { matchesPathPattern as n, createPreserveEmptyPredicate as t };\n\n//# sourceMappingURL=canonicalization-path-match-CNgHuwM_.mjs.map"],"mappings":";AACA,SAAS,mBAAmB,MAAM,SAAS;CAC1C,IAAI,KAAK,WAAW,QAAQ,QAAQ,OAAO;CAC3C,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;EACxC,MAAM,UAAU,QAAQ;EACxB,MAAM,QAAQ,KAAK;EACnB,IAAI,YAAY,KAAK,KAAK,UAAU,KAAK,GAAG,OAAO;EACnD,IAAI,YAAY,KAAK;EACrB,IAAI,OAAO,YAAY,UAAU;GAChC,IAAI,UAAU,SAAS,OAAO;GAC9B;EACD;EACA,IAAI,MAAM,QAAQ,OAAO,GACpB;OAAA,CAAC,QAAQ,SAAS,KAAK,GAAG,OAAO;EAAA;CAEvC;CACA,OAAO;AACR;AACA,SAAS,6BAA6B,UAAU;CAC/C,QAAQ,SAAS,SAAS,MAAM,YAAY,mBAAmB,MAAM,OAAO,CAAC;AAC9E"}
@@ -0,0 +1,64 @@
1
+ import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
2
+ //#region ../../../1-framework/1-core/framework-components/dist/capabilities-CPj7MfXO.mjs
3
+ /**
4
+ * Capability matrix merge primitive shared by emit-time and runtime stack composition.
5
+ *
6
+ * The CLI's `enrichContract` and the SQL runtime's `createExecutionContext` both need
7
+ * to fold a stack of component descriptors' `capabilities` declarations into a single
8
+ * matrix keyed by namespace. Keeping the primitive here lets both call sites stay
9
+ * byte-for-byte consistent without one depending on the other.
10
+ */
11
+ function isPlainObject(value) {
12
+ return typeof value === "object" && value !== null && !Array.isArray(value);
13
+ }
14
+ function sortDeep(value) {
15
+ if (Array.isArray(value)) return value.map(sortDeep);
16
+ if (!isPlainObject(value)) return value;
17
+ const entries = Object.entries(value).sort(([a], [b]) => a.localeCompare(b));
18
+ const next = {};
19
+ for (const [key, child] of entries) next[key] = sortDeep(child);
20
+ return next;
21
+ }
22
+ function extractCapabilityMatrix(value) {
23
+ if (!isPlainObject(value)) return {};
24
+ const out = {};
25
+ for (const [namespace, maybeCaps] of Object.entries(value)) {
26
+ if (!isPlainObject(maybeCaps)) continue;
27
+ const caps = {};
28
+ for (const [key, flag] of Object.entries(maybeCaps)) if (typeof flag === "boolean") caps[key] = flag;
29
+ if (Object.keys(caps).length > 0) out[namespace] = caps;
30
+ }
31
+ return out;
32
+ }
33
+ /**
34
+ * Merge an ordered list of contributor capability declarations into a base matrix.
35
+ *
36
+ * Behaviour:
37
+ * - `base` and each contributor's `capabilities` are filtered through the same
38
+ * structural extraction: non-plain-object namespace blocks are dropped,
39
+ * non-boolean leaves inside a namespace block are dropped, and a namespace
40
+ * block that ends up with zero boolean leaves is omitted entirely (so a
41
+ * later contributor with a malformed namespace cannot erase a namespace
42
+ * already present in `base`).
43
+ * - Non-plain-object `capabilities` on a contributor (including `undefined`,
44
+ * `null`, arrays, primitives) are skipped silently — the contributor
45
+ * contributes nothing.
46
+ * - Later contributors win on `(namespace, key)` collisions.
47
+ * - The returned object is fresh — neither `base` nor any contributor is mutated.
48
+ * - Output keys are sorted lexicographically at every plain-object level.
49
+ */
50
+ function mergeCapabilityMatrices(base, contributors) {
51
+ const merged = extractCapabilityMatrix(base);
52
+ for (const contributor of contributors) {
53
+ const extracted = extractCapabilityMatrix(contributor.capabilities);
54
+ for (const [namespace, capabilities] of Object.entries(extracted)) merged[namespace] = {
55
+ ...merged[namespace] ?? {},
56
+ ...capabilities
57
+ };
58
+ }
59
+ return blindCast(sortDeep(merged));
60
+ }
61
+ //#endregion
62
+ export { mergeCapabilityMatrices as t };
63
+
64
+ //# sourceMappingURL=capabilities-CPj7MfXO-GRkp0Q_D.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities-CPj7MfXO-GRkp0Q_D.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/capabilities-CPj7MfXO.mjs"],"sourcesContent":["import { blindCast } from \"@internal/utils/casts\";\n//#region src/shared/capabilities.ts\n/**\n* Capability matrix merge primitive shared by emit-time and runtime stack composition.\n*\n* The CLI's `enrichContract` and the SQL runtime's `createExecutionContext` both need\n* to fold a stack of component descriptors' `capabilities` declarations into a single\n* matrix keyed by namespace. Keeping the primitive here lets both call sites stay\n* byte-for-byte consistent without one depending on the other.\n*/\nfunction isPlainObject(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction sortDeep(value) {\n\tif (Array.isArray(value)) return value.map(sortDeep);\n\tif (!isPlainObject(value)) return value;\n\tconst entries = Object.entries(value).sort(([a], [b]) => a.localeCompare(b));\n\tconst next = {};\n\tfor (const [key, child] of entries) next[key] = sortDeep(child);\n\treturn next;\n}\nfunction extractCapabilityMatrix(value) {\n\tif (!isPlainObject(value)) return {};\n\tconst out = {};\n\tfor (const [namespace, maybeCaps] of Object.entries(value)) {\n\t\tif (!isPlainObject(maybeCaps)) continue;\n\t\tconst caps = {};\n\t\tfor (const [key, flag] of Object.entries(maybeCaps)) if (typeof flag === \"boolean\") caps[key] = flag;\n\t\tif (Object.keys(caps).length > 0) out[namespace] = caps;\n\t}\n\treturn out;\n}\n/**\n* Merge an ordered list of contributor capability declarations into a base matrix.\n*\n* Behaviour:\n* - `base` and each contributor's `capabilities` are filtered through the same\n* structural extraction: non-plain-object namespace blocks are dropped,\n* non-boolean leaves inside a namespace block are dropped, and a namespace\n* block that ends up with zero boolean leaves is omitted entirely (so a\n* later contributor with a malformed namespace cannot erase a namespace\n* already present in `base`).\n* - Non-plain-object `capabilities` on a contributor (including `undefined`,\n* `null`, arrays, primitives) are skipped silently — the contributor\n* contributes nothing.\n* - Later contributors win on `(namespace, key)` collisions.\n* - The returned object is fresh — neither `base` nor any contributor is mutated.\n* - Output keys are sorted lexicographically at every plain-object level.\n*/\nfunction mergeCapabilityMatrices(base, contributors) {\n\tconst merged = extractCapabilityMatrix(base);\n\tfor (const contributor of contributors) {\n\t\tconst extracted = extractCapabilityMatrix(contributor.capabilities);\n\t\tfor (const [namespace, capabilities] of Object.entries(extracted)) merged[namespace] = {\n\t\t\t...merged[namespace] ?? {},\n\t\t\t...capabilities\n\t\t};\n\t}\n\treturn blindCast(sortDeep(merged));\n}\n//#endregion\nexport { mergeCapabilityMatrices as t };\n\n//# sourceMappingURL=capabilities-CPj7MfXO.mjs.map"],"mappings":";;;;;;;;;;AAUA,SAAS,cAAc,OAAO;CAC7B,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC3E;AACA,SAAS,SAAS,OAAO;CACxB,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,MAAM,IAAI,QAAQ;CACnD,IAAI,CAAC,cAAc,KAAK,GAAG,OAAO;CAClC,MAAM,UAAU,OAAO,QAAQ,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;CAC3E,MAAM,OAAO,CAAC;CACd,KAAK,MAAM,CAAC,KAAK,UAAU,SAAS,KAAK,OAAO,SAAS,KAAK;CAC9D,OAAO;AACR;AACA,SAAS,wBAAwB,OAAO;CACvC,IAAI,CAAC,cAAc,KAAK,GAAG,OAAO,CAAC;CACnC,MAAM,MAAM,CAAC;CACb,KAAK,MAAM,CAAC,WAAW,cAAc,OAAO,QAAQ,KAAK,GAAG;EAC3D,IAAI,CAAC,cAAc,SAAS,GAAG;EAC/B,MAAM,OAAO,CAAC;EACd,KAAK,MAAM,CAAC,KAAK,SAAS,OAAO,QAAQ,SAAS,GAAG,IAAI,OAAO,SAAS,WAAW,KAAK,OAAO;EAChG,IAAI,OAAO,KAAK,IAAI,CAAC,CAAC,SAAS,GAAG,IAAI,aAAa;CACpD;CACA,OAAO;AACR;;;;;;;;;;;;;;;;;;AAkBA,SAAS,wBAAwB,MAAM,cAAc;CACpD,MAAM,SAAS,wBAAwB,IAAI;CAC3C,KAAK,MAAM,eAAe,cAAc;EACvC,MAAM,YAAY,wBAAwB,YAAY,YAAY;EAClE,KAAK,MAAM,CAAC,WAAW,iBAAiB,OAAO,QAAQ,SAAS,GAAG,OAAO,aAAa;GACtF,GAAG,OAAO,cAAc,CAAC;GACzB,GAAG;EACJ;CACD;CACA,OAAO,UAAU,SAAS,MAAM,CAAC;AAClC"}
@@ -0,0 +1,34 @@
1
+ //#region ../../../1-framework/1-core/framework-components/dist/capabilities-Cupq4-1-.d.mts
2
+ //#region src/shared/capabilities.d.ts
3
+ /**
4
+ * Capability matrix merge primitive shared by emit-time and runtime stack composition.
5
+ *
6
+ * The CLI's `enrichContract` and the SQL runtime's `createExecutionContext` both need
7
+ * to fold a stack of component descriptors' `capabilities` declarations into a single
8
+ * matrix keyed by namespace. Keeping the primitive here lets both call sites stay
9
+ * byte-for-byte consistent without one depending on the other.
10
+ */
11
+ type CapabilityMatrix = Record<string, Record<string, boolean>>;
12
+ /**
13
+ * Merge an ordered list of contributor capability declarations into a base matrix.
14
+ *
15
+ * Behaviour:
16
+ * - `base` and each contributor's `capabilities` are filtered through the same
17
+ * structural extraction: non-plain-object namespace blocks are dropped,
18
+ * non-boolean leaves inside a namespace block are dropped, and a namespace
19
+ * block that ends up with zero boolean leaves is omitted entirely (so a
20
+ * later contributor with a malformed namespace cannot erase a namespace
21
+ * already present in `base`).
22
+ * - Non-plain-object `capabilities` on a contributor (including `undefined`,
23
+ * `null`, arrays, primitives) are skipped silently — the contributor
24
+ * contributes nothing.
25
+ * - Later contributors win on `(namespace, key)` collisions.
26
+ * - The returned object is fresh — neither `base` nor any contributor is mutated.
27
+ * - Output keys are sorted lexicographically at every plain-object level.
28
+ */
29
+ declare function mergeCapabilityMatrices(base: Record<string, Record<string, boolean>>, contributors: ReadonlyArray<{
30
+ readonly capabilities?: unknown;
31
+ }>): Record<string, Record<string, boolean>>;
32
+ //#endregion
33
+ export { mergeCapabilityMatrices as n, CapabilityMatrix as t };
34
+ //# sourceMappingURL=capabilities-Cupq4-1--C71ORI3N.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities-Cupq4-1--C71ORI3N.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/capabilities-Cupq4-1-.d.mts"],"mappings":";;;;;;;;;;KASK,mBAAmB,eAAe;;;;;;;;;;;;;;;;;;iBAkBtB,wBAAwB,MAAM,eAAe,0BAA0B,cAAc;WAC3F;KACN,eAAe"}
@@ -0,0 +1,78 @@
1
+ //#region ../../../1-framework/0-foundation/utils/dist/casts.d.mts
2
+ //#region src/casts.d.ts
3
+ /**
4
+ * **Last-resort escape hatch for unsafe type assertions. Not a sanctioned tool to reach for.**
5
+ *
6
+ * Before reaching for `blindCast`, **rewrite the surrounding code so the cast becomes
7
+ * unnecessary**: tighten an input type, add a runtime check that narrows via a type
8
+ * predicate, restructure a generic so the compiler can see the relationship you're
9
+ * asserting, or use {@link castAs} when the value already satisfies the target type.
10
+ * Only when no rewrite is feasible does `blindCast` become the right answer — and at
11
+ * that point, the `Reason` literal you supply must articulate the compromise in
12
+ * language a reviewer can evaluate.
13
+ *
14
+ * The reviewer **will** validate the `Reason`. If it doesn't hold up under scrutiny,
15
+ * that is not a signal to soften the reason; it is a signal to go back and solve the
16
+ * underlying type-system problem properly. An unconvincing justification is rework,
17
+ * not a free pass.
18
+ *
19
+ * `blindCast` is the auditable form of `as Foo` / `as unknown as Foo`: it bypasses
20
+ * the compiler's checks (the input type is `unknown`, the output type is whatever the
21
+ * caller asks for), but it forces the unsafety to be named at the call site instead of
22
+ * smuggled in via a bare `as`. The `Reason` type parameter exists only at compile
23
+ * time — it is not present in the emitted JavaScript — but it is grep-able and
24
+ * visible to future readers.
25
+ *
26
+ * @example
27
+ * ```typescript
28
+ * const stringValue = blindCast<
29
+ * string,
30
+ * "JSON.parse returns `unknown`; this field is documented to be a string in the API contract"
31
+ * >(parsed[key]);
32
+ * ```
33
+ *
34
+ * @typeParam TargetType - The type the caller is asserting the input has.
35
+ * @typeParam _Reason - A string literal describing why bypassing the type system is necessary here.
36
+ * Only meaningful at compile time. The reviewer evaluates whether it justifies the unsafety.
37
+ */
38
+ declare function blindCast<TargetType, _Reason extends string>(input: unknown): TargetType;
39
+ /**
40
+ * Type-checked, runtime pass-through alternative to a bare `as Type` cast.
41
+ *
42
+ * Use `castAs` when the value already satisfies the target type but you want to make
43
+ * the type assertion explicit at the call site — for example, when an inferred type is
44
+ * wider than the type you want to publish, or when a literal object should be tagged
45
+ * with its nominal interface. Unlike {@link blindCast}, the compiler still checks that
46
+ * the value is assignable to the target type, so this helper cannot smuggle in an
47
+ * unsafe assertion.
48
+ *
49
+ * `castAs` exists alongside `blindCast` so authors pick the right name at the call
50
+ * site: a `castAs` is type-checked and benign; a `blindCast` is the unsafe escape
51
+ * hatch. The split makes review faster — readers know which casts to scrutinize and
52
+ * which are pure annotations.
53
+ *
54
+ * @example
55
+ * ```typescript
56
+ * interface FancyObject {
57
+ * key: string;
58
+ * keyTwo: {
59
+ * subKey: string;
60
+ * subKeyTwo: number;
61
+ * };
62
+ * }
63
+ *
64
+ * const typedObject = castAs<FancyObject>({
65
+ * key: 'Chookede',
66
+ * keyTwo: {
67
+ * subKey: 'Choookeeeee',
68
+ * subKeyTwo: 2,
69
+ * },
70
+ * });
71
+ * ```
72
+ *
73
+ * @typeParam Type - The type to constrain and tag the value with. The value must be assignable to `Type`.
74
+ */
75
+ declare function castAs<Type>(value: Type): Type;
76
+ //#endregion
77
+ export { castAs as n, blindCast as t };
78
+ //# sourceMappingURL=casts-D29CHGrr.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"casts-D29CHGrr.d.mts","names":[],"sources":["../../../../1-framework/0-foundation/utils/dist/casts.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoCiB,UAAU,YAAY,wBAAwB,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqC/D,OAAO,MAAM,OAAO,OAAO"}
@@ -0,0 +1,82 @@
1
+ //#region ../../../1-framework/0-foundation/utils/dist/casts-DpaahrlC.mjs
2
+ /**
3
+ * **Last-resort escape hatch for unsafe type assertions. Not a sanctioned tool to reach for.**
4
+ *
5
+ * Before reaching for `blindCast`, **rewrite the surrounding code so the cast becomes
6
+ * unnecessary**: tighten an input type, add a runtime check that narrows via a type
7
+ * predicate, restructure a generic so the compiler can see the relationship you're
8
+ * asserting, or use {@link castAs} when the value already satisfies the target type.
9
+ * Only when no rewrite is feasible does `blindCast` become the right answer — and at
10
+ * that point, the `Reason` literal you supply must articulate the compromise in
11
+ * language a reviewer can evaluate.
12
+ *
13
+ * The reviewer **will** validate the `Reason`. If it doesn't hold up under scrutiny,
14
+ * that is not a signal to soften the reason; it is a signal to go back and solve the
15
+ * underlying type-system problem properly. An unconvincing justification is rework,
16
+ * not a free pass.
17
+ *
18
+ * `blindCast` is the auditable form of `as Foo` / `as unknown as Foo`: it bypasses
19
+ * the compiler's checks (the input type is `unknown`, the output type is whatever the
20
+ * caller asks for), but it forces the unsafety to be named at the call site instead of
21
+ * smuggled in via a bare `as`. The `Reason` type parameter exists only at compile
22
+ * time — it is not present in the emitted JavaScript — but it is grep-able and
23
+ * visible to future readers.
24
+ *
25
+ * @example
26
+ * ```typescript
27
+ * const stringValue = blindCast<
28
+ * string,
29
+ * "JSON.parse returns `unknown`; this field is documented to be a string in the API contract"
30
+ * >(parsed[key]);
31
+ * ```
32
+ *
33
+ * @typeParam TargetType - The type the caller is asserting the input has.
34
+ * @typeParam _Reason - A string literal describing why bypassing the type system is necessary here.
35
+ * Only meaningful at compile time. The reviewer evaluates whether it justifies the unsafety.
36
+ */
37
+ function blindCast(input) {
38
+ return input;
39
+ }
40
+ /**
41
+ * Type-checked, runtime pass-through alternative to a bare `as Type` cast.
42
+ *
43
+ * Use `castAs` when the value already satisfies the target type but you want to make
44
+ * the type assertion explicit at the call site — for example, when an inferred type is
45
+ * wider than the type you want to publish, or when a literal object should be tagged
46
+ * with its nominal interface. Unlike {@link blindCast}, the compiler still checks that
47
+ * the value is assignable to the target type, so this helper cannot smuggle in an
48
+ * unsafe assertion.
49
+ *
50
+ * `castAs` exists alongside `blindCast` so authors pick the right name at the call
51
+ * site: a `castAs` is type-checked and benign; a `blindCast` is the unsafe escape
52
+ * hatch. The split makes review faster — readers know which casts to scrutinize and
53
+ * which are pure annotations.
54
+ *
55
+ * @example
56
+ * ```typescript
57
+ * interface FancyObject {
58
+ * key: string;
59
+ * keyTwo: {
60
+ * subKey: string;
61
+ * subKeyTwo: number;
62
+ * };
63
+ * }
64
+ *
65
+ * const typedObject = castAs<FancyObject>({
66
+ * key: 'Chookede',
67
+ * keyTwo: {
68
+ * subKey: 'Choookeeeee',
69
+ * subKeyTwo: 2,
70
+ * },
71
+ * });
72
+ * ```
73
+ *
74
+ * @typeParam Type - The type to constrain and tag the value with. The value must be assignable to `Type`.
75
+ */
76
+ function castAs(value) {
77
+ return value;
78
+ }
79
+ //#endregion
80
+ export { castAs as n, blindCast as t };
81
+
82
+ //# sourceMappingURL=casts-DpaahrlC-Bd5n2coI.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"casts-DpaahrlC-Bd5n2coI.mjs","names":[],"sources":["../../../../1-framework/0-foundation/utils/dist/casts-DpaahrlC.mjs"],"sourcesContent":["//#region src/casts.ts\n/**\n* **Last-resort escape hatch for unsafe type assertions. Not a sanctioned tool to reach for.**\n*\n* Before reaching for `blindCast`, **rewrite the surrounding code so the cast becomes\n* unnecessary**: tighten an input type, add a runtime check that narrows via a type\n* predicate, restructure a generic so the compiler can see the relationship you're\n* asserting, or use {@link castAs} when the value already satisfies the target type.\n* Only when no rewrite is feasible does `blindCast` become the right answer — and at\n* that point, the `Reason` literal you supply must articulate the compromise in\n* language a reviewer can evaluate.\n*\n* The reviewer **will** validate the `Reason`. If it doesn't hold up under scrutiny,\n* that is not a signal to soften the reason; it is a signal to go back and solve the\n* underlying type-system problem properly. An unconvincing justification is rework,\n* not a free pass.\n*\n* `blindCast` is the auditable form of `as Foo` / `as unknown as Foo`: it bypasses\n* the compiler's checks (the input type is `unknown`, the output type is whatever the\n* caller asks for), but it forces the unsafety to be named at the call site instead of\n* smuggled in via a bare `as`. The `Reason` type parameter exists only at compile\n* time — it is not present in the emitted JavaScript — but it is grep-able and\n* visible to future readers.\n*\n* @example\n* ```typescript\n* const stringValue = blindCast<\n* string,\n* \"JSON.parse returns `unknown`; this field is documented to be a string in the API contract\"\n* >(parsed[key]);\n* ```\n*\n* @typeParam TargetType - The type the caller is asserting the input has.\n* @typeParam _Reason - A string literal describing why bypassing the type system is necessary here.\n* Only meaningful at compile time. The reviewer evaluates whether it justifies the unsafety.\n*/\nfunction blindCast(input) {\n\treturn input;\n}\n/**\n* Type-checked, runtime pass-through alternative to a bare `as Type` cast.\n*\n* Use `castAs` when the value already satisfies the target type but you want to make\n* the type assertion explicit at the call site — for example, when an inferred type is\n* wider than the type you want to publish, or when a literal object should be tagged\n* with its nominal interface. Unlike {@link blindCast}, the compiler still checks that\n* the value is assignable to the target type, so this helper cannot smuggle in an\n* unsafe assertion.\n*\n* `castAs` exists alongside `blindCast` so authors pick the right name at the call\n* site: a `castAs` is type-checked and benign; a `blindCast` is the unsafe escape\n* hatch. The split makes review faster — readers know which casts to scrutinize and\n* which are pure annotations.\n*\n* @example\n* ```typescript\n* interface FancyObject {\n* key: string;\n* keyTwo: {\n* subKey: string;\n* subKeyTwo: number;\n* };\n* }\n*\n* const typedObject = castAs<FancyObject>({\n* key: 'Chookede',\n* keyTwo: {\n* subKey: 'Choookeeeee',\n* subKeyTwo: 2,\n* },\n* });\n* ```\n*\n* @typeParam Type - The type to constrain and tag the value with. The value must be assignable to `Type`.\n*/\nfunction castAs(value) {\n\treturn value;\n}\n//#endregion\nexport { castAs as n, blindCast as t };\n\n//# sourceMappingURL=casts-DpaahrlC.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,SAAS,UAAU,OAAO;CACzB,OAAO;AACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,SAAS,OAAO,OAAO;CACtB,OAAO;AACR"}
@@ -0,0 +1,78 @@
1
+ //#region ../../../1-framework/1-core/framework-components/dist/codec.mjs
2
+ /**
3
+ * Abstract base class for concrete codec implementations.
4
+ *
5
+ * Codec authors extend this class with their typed `Id`, `TTraits`, `TWire`, `TInput` and override all four abstract conversion methods: `encode`, `decode`, `encodeJson`, and `decodeJson`. The runtime instance carries only its `id` (proxied through the descriptor so alias subclasses inherit the descriptor's id automatically) and the conversion methods — static metadata lives on the {@link CodecDescriptor}.
6
+ */
7
+ var CodecImpl = class {
8
+ descriptor;
9
+ /**
10
+ * Variance-erased descriptor reference. Concrete codec subclasses receive the typed descriptor in their own constructors and forward it via `super(descriptor)`; the variance erasure lives at this base because the abstract surface can't carry the concrete `TParams`.
11
+ */
12
+ constructor(descriptor) {
13
+ this.descriptor = descriptor;
14
+ }
15
+ get id() {
16
+ return this.descriptor.codecId;
17
+ }
18
+ };
19
+ const emptyCodecLookup = {
20
+ get: () => void 0,
21
+ targetTypesFor: () => void 0,
22
+ renderOutputTypeFor: () => void 0
23
+ };
24
+ /**
25
+ * Standard Schema validator for `void` params. Accepts only `undefined` (or absent input); rejects any other value so a contract that tries to thread `typeParams` through a non-parameterized codec id fails fast at the JSON boundary instead of silently coercing the value away. Used by the framework-supplied non-parameterized descriptor synthesizer.
26
+ */
27
+ const voidParamsSchema = { "~standard": {
28
+ version: 1,
29
+ vendor: "prisma-next",
30
+ validate: (input) => input === void 0 ? { value: void 0 } : { issues: [{ message: "unexpected typeParams for non-parameterized codec (void params expected)" }] }
31
+ } };
32
+ /**
33
+ * Abstract base class for concrete codec descriptors.
34
+ *
35
+ * Codec authors extend this class with their typed `TParams` and declare `codecId`, `traits`, `targetTypes`, `paramsSchema`, the curried `factory(params)`, and (optionally) `renderOutputType`.
36
+ *
37
+ * Implements the {@link CodecDescriptor} interface so a concrete subclass instance is directly usable wherever the framework expects a `CodecDescriptor<P>`.
38
+ */
39
+ var CodecDescriptorImpl = class {
40
+ /** Boolean derived from `paramsSchema`: `true` whenever the schema is not the singleton `voidParamsSchema`. */
41
+ get isParameterized() {
42
+ return this.paramsSchema !== voidParamsSchema;
43
+ }
44
+ };
45
+ /**
46
+ * Trivial column packager. Per-codec helpers call this directly with the result of `descriptor.factory(params)` — direct method invocation binds the descriptor's method-level generic at the call site and the literal flows through `R`.
47
+ *
48
+ * `nativeType` is the column's database-native type spelling — the value the postgres adapter's migration planner, the SQL renderer's cast policy, and the emitted contract's column `nativeType` slot read. Per-codec helpers pass the literal native-type string for their codec (e.g. `'text'`, `'int4'`, `'character varying'`); for codecs whose native-type spelling depends on parameters (none today; reserved for future shapes), the helper computes the rendered string before calling `column`. The framework does not derive the value from `codecId` — that mapping is target-specific and lives at the helper.
49
+ */
50
+ function column(codecFactory, codecId, typeParams, nativeType) {
51
+ return {
52
+ codecFactory,
53
+ codecId,
54
+ typeParams,
55
+ nativeType
56
+ };
57
+ }
58
+ /**
59
+ * Renders a codec-encoded value as a TypeScript literal (e.g. `'low'`, `1`, `true`), or `undefined`
60
+ * when the value isn't literal-expressible (objects, arrays, null).
61
+ *
62
+ * Valid **only for identity codecs** whose `encodeJson` output equals their decoded output type
63
+ * (text, int, float, bool). A non-identity codec (e.g. one that encodes to an int but decodes to a
64
+ * string literal) must NOT use this: it has to `decodeJson` first, then render, in its own
65
+ * `renderValueLiteral`.
66
+ *
67
+ * String values are fully escaped for a single-quoted `.d.ts` literal: backslash, single quote, and
68
+ * every character a raw single-quoted TS literal cannot contain — newline, carriage return, and the
69
+ * U+2028/U+2029 line/paragraph separators (which JS also treats as line terminators).
70
+ */
71
+ function renderTsLiteral(value) {
72
+ if (typeof value === "string") return `'${value.replace(/\\/g, "\\\\").replace(/'/g, "\\'").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029")}'`;
73
+ if (typeof value === "number" || typeof value === "boolean") return String(value);
74
+ }
75
+ //#endregion
76
+ export { renderTsLiteral as a, emptyCodecLookup as i, CodecImpl as n, voidParamsSchema as o, column as r, CodecDescriptorImpl as t };
77
+
78
+ //# sourceMappingURL=codec-Cly9VPoA.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codec-Cly9VPoA.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/codec.mjs"],"sourcesContent":["import { i as validateCodecTypeParams, n as materializeCodec, r as resolveCodecDescriptorOrThrow, t as CONTRACT_CODEC_DESCRIPTOR_MISSING } from \"./resolve-codec-BZF8TZh_.mjs\";\n//#region src/shared/codec.ts\n/**\n* Abstract base class for concrete codec implementations.\n*\n* Codec authors extend this class with their typed `Id`, `TTraits`, `TWire`, `TInput` and override all four abstract conversion methods: `encode`, `decode`, `encodeJson`, and `decodeJson`. The runtime instance carries only its `id` (proxied through the descriptor so alias subclasses inherit the descriptor's id automatically) and the conversion methods — static metadata lives on the {@link CodecDescriptor}.\n*/\nvar CodecImpl = class {\n\tdescriptor;\n\t/**\n\t* Variance-erased descriptor reference. Concrete codec subclasses receive the typed descriptor in their own constructors and forward it via `super(descriptor)`; the variance erasure lives at this base because the abstract surface can't carry the concrete `TParams`.\n\t*/\n\tconstructor(descriptor) {\n\t\tthis.descriptor = descriptor;\n\t}\n\tget id() {\n\t\treturn this.descriptor.codecId;\n\t}\n};\n//#endregion\n//#region src/shared/codec-types.ts\nconst emptyCodecLookup = {\n\tget: () => void 0,\n\ttargetTypesFor: () => void 0,\n\trenderOutputTypeFor: () => void 0\n};\n/**\n* Standard Schema validator for `void` params. Accepts only `undefined` (or absent input); rejects any other value so a contract that tries to thread `typeParams` through a non-parameterized codec id fails fast at the JSON boundary instead of silently coercing the value away. Used by the framework-supplied non-parameterized descriptor synthesizer.\n*/\nconst voidParamsSchema = { \"~standard\": {\n\tversion: 1,\n\tvendor: \"prisma-next\",\n\tvalidate: (input) => input === void 0 ? { value: void 0 } : { issues: [{ message: \"unexpected typeParams for non-parameterized codec (void params expected)\" }] }\n} };\n//#endregion\n//#region src/shared/codec-descriptor.ts\n/**\n* Abstract base class for concrete codec descriptors.\n*\n* Codec authors extend this class with their typed `TParams` and declare `codecId`, `traits`, `targetTypes`, `paramsSchema`, the curried `factory(params)`, and (optionally) `renderOutputType`.\n*\n* Implements the {@link CodecDescriptor} interface so a concrete subclass instance is directly usable wherever the framework expects a `CodecDescriptor<P>`.\n*/\nvar CodecDescriptorImpl = class {\n\t/** Boolean derived from `paramsSchema`: `true` whenever the schema is not the singleton `voidParamsSchema`. */\n\tget isParameterized() {\n\t\treturn this.paramsSchema !== voidParamsSchema;\n\t}\n};\n//#endregion\n//#region src/shared/column-spec.ts\n/**\n* Trivial column packager. Per-codec helpers call this directly with the result of `descriptor.factory(params)` — direct method invocation binds the descriptor's method-level generic at the call site and the literal flows through `R`.\n*\n* `nativeType` is the column's database-native type spelling — the value the postgres adapter's migration planner, the SQL renderer's cast policy, and the emitted contract's column `nativeType` slot read. Per-codec helpers pass the literal native-type string for their codec (e.g. `'text'`, `'int4'`, `'character varying'`); for codecs whose native-type spelling depends on parameters (none today; reserved for future shapes), the helper computes the rendered string before calling `column`. The framework does not derive the value from `codecId` — that mapping is target-specific and lives at the helper.\n*/\nfunction column(codecFactory, codecId, typeParams, nativeType) {\n\treturn {\n\t\tcodecFactory,\n\t\tcodecId,\n\t\ttypeParams,\n\t\tnativeType\n\t};\n}\n//#endregion\n//#region src/shared/render-ts-literal.ts\n/**\n* Renders a codec-encoded value as a TypeScript literal (e.g. `'low'`, `1`, `true`), or `undefined`\n* when the value isn't literal-expressible (objects, arrays, null).\n*\n* Valid **only for identity codecs** whose `encodeJson` output equals their decoded output type\n* (text, int, float, bool). A non-identity codec (e.g. one that encodes to an int but decodes to a\n* string literal) must NOT use this: it has to `decodeJson` first, then render, in its own\n* `renderValueLiteral`.\n*\n* String values are fully escaped for a single-quoted `.d.ts` literal: backslash, single quote, and\n* every character a raw single-quoted TS literal cannot contain — newline, carriage return, and the\n* U+2028/U+2029 line/paragraph separators (which JS also treats as line terminators).\n*/\nfunction renderTsLiteral(value) {\n\tif (typeof value === \"string\") return `'${value.replace(/\\\\/g, \"\\\\\\\\\").replace(/'/g, \"\\\\'\").replace(/\\n/g, \"\\\\n\").replace(/\\r/g, \"\\\\r\").replace(/\\u2028/g, \"\\\\u2028\").replace(/\\u2029/g, \"\\\\u2029\")}'`;\n\tif (typeof value === \"number\" || typeof value === \"boolean\") return String(value);\n}\n//#endregion\nexport { CONTRACT_CODEC_DESCRIPTOR_MISSING, CodecDescriptorImpl, CodecImpl, column, emptyCodecLookup, materializeCodec, renderTsLiteral, resolveCodecDescriptorOrThrow, validateCodecTypeParams, voidParamsSchema };\n\n//# sourceMappingURL=codec.mjs.map"],"mappings":";;;;;;AAOA,IAAI,YAAY,MAAM;CACrB;;;;CAIA,YAAY,YAAY;EACvB,KAAK,aAAa;CACnB;CACA,IAAI,KAAK;EACR,OAAO,KAAK,WAAW;CACxB;AACD;AAGA,MAAM,mBAAmB;CACxB,WAAW,KAAK;CAChB,sBAAsB,KAAK;CAC3B,2BAA2B,KAAK;AACjC;;;;AAIA,MAAM,mBAAmB,EAAE,aAAa;CACvC,SAAS;CACT,QAAQ;CACR,WAAW,UAAU,UAAU,KAAK,IAAI,EAAE,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,EAAE,SAAS,2EAA2E,CAAC,EAAE;AACjK,EAAE;;;;;;;;AAUF,IAAI,sBAAsB,MAAM;;CAE/B,IAAI,kBAAkB;EACrB,OAAO,KAAK,iBAAiB;CAC9B;AACD;;;;;;AAQA,SAAS,OAAO,cAAc,SAAS,YAAY,YAAY;CAC9D,OAAO;EACN;EACA;EACA;EACA;CACD;AACD;;;;;;;;;;;;;;AAgBA,SAAS,gBAAgB,OAAO;CAC/B,IAAI,OAAO,UAAU,UAAU,OAAO,IAAI,MAAM,QAAQ,OAAO,MAAM,CAAC,CAAC,QAAQ,MAAM,KAAK,CAAC,CAAC,QAAQ,OAAO,KAAK,CAAC,CAAC,QAAQ,OAAO,KAAK,CAAC,CAAC,QAAQ,WAAW,SAAS,CAAC,CAAC,QAAQ,WAAW,SAAS,EAAE;CACpM,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,WAAW,OAAO,OAAO,KAAK;AACjF"}
@@ -0,0 +1,116 @@
1
+ import { et as ValueSetRef, z as JsonValue } from "./domain-envelope-D6Wn9AmZ-BqZKTT9U.mjs";
2
+ import { i as CodecDescriptor, l as CodecRef, n as Codec, s as CodecInstanceContext, t as AnyCodecDescriptor } from "./codec-types-XJO6eC9U-B_K2q0zm.mjs";
3
+ //#region ../../../1-framework/1-core/framework-components/dist/codec.d.mts
4
+ //#region src/shared/column-spec.d.ts
5
+ /**
6
+ * Authored column-type descriptor — the data shape an authoring site (PSL or TypeScript builders) attaches to a column to identify its codec and its native database type.
7
+ *
8
+ * Lives at the framework-components layer alongside the codec types so codec-author packages (e.g. column-spec / `column()` packagers) can extend it directly without crossing layer boundaries.
9
+ *
10
+ * @template TCodecId Narrowed codec id literal for sites that thread a specific codec id through the type system.
11
+ */
12
+ type ColumnTypeDescriptor<TCodecId extends string = string> = {
13
+ readonly codecId: TCodecId;
14
+ readonly nativeType: string;
15
+ readonly typeParams?: Record<string, unknown> | undefined;
16
+ readonly typeRef?: string;
17
+ /**
18
+ * Storage-plane value-set ref, set by an authoring path that resolves a
19
+ * field's type against a value-set-deriving entity (e.g. a PSL entity-ref
20
+ * type constructor like `pg.enum(Ref)`, or a TS `enumType` handle).
21
+ * Threaded straight onto the storage node this descriptor builds, where it
22
+ * drives value-set → codec typing. Every codec's own descriptor leaves this
23
+ * unset.
24
+ */
25
+ readonly valueSet?: ValueSetRef;
26
+ readonly entityRef?: EntityRef;
27
+ };
28
+ /**
29
+ * Late-resolved pack-entity reference — a field on the type descriptor it is
30
+ * declared on: `entityKind`/`entityName` identify a pack entity whose final
31
+ * placement depends on data not yet known when the descriptor carrying this
32
+ * reference is built — e.g. an owning namespace resolved only once the
33
+ * surrounding structure is assembled.
34
+ */
35
+ type EntityRef = {
36
+ readonly entityKind: string;
37
+ readonly entityName: string;
38
+ readonly entity: unknown;
39
+ };
40
+ /**
41
+ * Column spec carrying the codec factory closure alongside the {@link ColumnTypeDescriptor} fields. Codec authors return a `ColumnSpec` from per-codec column helpers; the runtime materializes the codec instance by calling `codecFactory(ctx)` once it knows the column's `CodecInstanceContext`.
42
+ *
43
+ * Extends {@link ColumnTypeDescriptor} so `ColumnSpec` instances flow directly into contract-authoring sites that consume the descriptor shape — no structural mirroring required.
44
+ */
45
+ interface ColumnSpec<R, P extends Record<string, unknown> | undefined> extends ColumnTypeDescriptor {
46
+ readonly codecFactory: (ctx: CodecInstanceContext) => R;
47
+ readonly typeParams: P;
48
+ }
49
+ /**
50
+ * Trivial column packager. Per-codec helpers call this directly with the result of `descriptor.factory(params)` — direct method invocation binds the descriptor's method-level generic at the call site and the literal flows through `R`.
51
+ *
52
+ * `nativeType` is the column's database-native type spelling — the value the postgres adapter's migration planner, the SQL renderer's cast policy, and the emitted contract's column `nativeType` slot read. Per-codec helpers pass the literal native-type string for their codec (e.g. `'text'`, `'int4'`, `'character varying'`); for codecs whose native-type spelling depends on parameters (none today; reserved for future shapes), the helper computes the rendered string before calling `column`. The framework does not derive the value from `codecId` — that mapping is target-specific and lives at the helper.
53
+ */
54
+ declare function column<R, P extends Record<string, unknown> | undefined>(codecFactory: (ctx: CodecInstanceContext) => R, codecId: string, typeParams: P, nativeType: string): ColumnSpec<R, P>;
55
+ /**
56
+ * Coarse `satisfies` shape — checks the helper's typeParams record matches the descriptor's factory params. Catches "wrong typeParams shape" wiring mistakes; does NOT catch "wrong descriptor's factory" mistakes (the codec slot is left as `unknown`).
57
+ *
58
+ * Use when the codec's `ReturnType<factory>` is unstable (e.g. heavily overloaded factories where extraction widens too much).
59
+ */
60
+ type ColumnHelperFor<D extends CodecDescriptor<any>> = (...args: any[]) => ColumnSpec<unknown, ColumnHelperParams<D>>;
61
+ /**
62
+ * Strict `satisfies` shape — also checks the helper's codec is at least the *base* codec instance type the descriptor's factory returns. `ReturnType<ReturnType<D['factory']>>` widens method generics to their constraint, so this only sanity-checks the wiring at the base type level. Literal preservation comes from the direct `descriptor.factory(...)` call inside the helper, not from `satisfies`.
63
+ */
64
+ type ColumnHelperForStrict<D extends CodecDescriptor<any>> = (...args: any[]) => ColumnSpec<ReturnType<ReturnType<D['factory']>>, ColumnHelperParams<D>>;
65
+ /**
66
+ * Coerce a descriptor's `factory` first parameter into the typeParams shape `ColumnSpec` accepts. Non-parameterized descriptors (factory with no params, or `params: void`) collapse to `undefined`; parameterized descriptors keep the params record shape.
67
+ */
68
+ type ColumnHelperParams<D extends CodecDescriptor<any>> = Parameters<D['factory']>[0] extends Record<string, unknown> ? Parameters<D['factory']>[0] : undefined;
69
+ //#endregion
70
+ //#region src/shared/render-ts-literal.d.ts
71
+ /**
72
+ * Renders a codec-encoded value as a TypeScript literal (e.g. `'low'`, `1`, `true`), or `undefined`
73
+ * when the value isn't literal-expressible (objects, arrays, null).
74
+ *
75
+ * Valid **only for identity codecs** whose `encodeJson` output equals their decoded output type
76
+ * (text, int, float, bool). A non-identity codec (e.g. one that encodes to an int but decodes to a
77
+ * string literal) must NOT use this: it has to `decodeJson` first, then render, in its own
78
+ * `renderValueLiteral`.
79
+ *
80
+ * String values are fully escaped for a single-quoted `.d.ts` literal: backslash, single quote, and
81
+ * every character a raw single-quoted TS literal cannot contain — newline, carriage return, and the
82
+ * U+2028/U+2029 line/paragraph separators (which JS also treats as line terminators).
83
+ */
84
+ declare function renderTsLiteral(value: JsonValue): string | undefined;
85
+ //#endregion
86
+ //#region src/shared/resolve-codec.d.ts
87
+ declare const CONTRACT_CODEC_DESCRIPTOR_MISSING: "CONTRACT.CODEC_DESCRIPTOR_MISSING";
88
+ /**
89
+ * Look up a descriptor for `ref.codecId` using `descriptorFor`; throw
90
+ * `code` if none is found. Each plane names its own error path: the control
91
+ * plane resolves contract-stack descriptors (`CONTRACT.*`), the execution
92
+ * plane resolves at query time (`RUNTIME.*`).
93
+ */
94
+ declare function resolveCodecDescriptorOrThrow(descriptorFor: (codecId: string) => AnyCodecDescriptor | undefined, ref: CodecRef, code: 'CONTRACT.CODEC_DESCRIPTOR_MISSING' | 'RUNTIME.CODEC_DESCRIPTOR_MISSING'): AnyCodecDescriptor;
95
+ /**
96
+ * Validates `ref.typeParams` against `descriptor.paramsSchema`.
97
+ *
98
+ * Parameterized codecs that omit `typeParams` have it normalized to `{}` before
99
+ * validation (mirrors `ast-codec-resolver.ts` semantics). Throws
100
+ * `RUNTIME.TYPE_PARAMS_INVALID` when the validator returns a `Promise` or
101
+ * reports issues.
102
+ */
103
+ declare function validateCodecTypeParams(descriptor: AnyCodecDescriptor, ref: CodecRef): unknown;
104
+ /**
105
+ * Resolves a `Codec` instance: validates `ref.typeParams` via
106
+ * {@link validateCodecTypeParams} then calls `descriptor.factory(validated)(ctx)`.
107
+ *
108
+ * The descriptor's `factory` is typed against its own `P`; the registry erases
109
+ * `P` to `any`, so the factory is narrowed to `(params: unknown) => (ctx) => Codec`
110
+ * at the call boundary. The `paramsSchema` validates the input above before we
111
+ * forward it, so the narrowing is safe by construction.
112
+ */
113
+ declare function materializeCodec(descriptor: AnyCodecDescriptor, ref: CodecRef, ctx: CodecInstanceContext): Codec;
114
+ //#endregion
115
+ export { ColumnTypeDescriptor as a, renderTsLiteral as c, ColumnSpec as i, resolveCodecDescriptorOrThrow as l, ColumnHelperFor as n, column as o, ColumnHelperForStrict as r, materializeCodec as s, CONTRACT_CODEC_DESCRIPTOR_MISSING as t, validateCodecTypeParams as u };
116
+ //# sourceMappingURL=codec-D3GVAkR_.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codec-D3GVAkR_.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/codec.d.mts"],"mappings":";;;;;;;;;;;KAUK,qBAAqB;WACf,SAAS;WACT;WACA,aAAa;WACb;;;;;;;;;WASA,WAAW;WACX,YAAY;;;;;;;;;KASlB;WACM;WACA;WACA;;;;;;;UAOD,WAAW,GAAG,UAAU,6CAA6C;WACpE,eAAe,KAAK,yBAAyB;WAC7C,YAAY;;;;;;;iBAON,OAAO,GAAG,UAAU,qCAAqC,eAAe,KAAK,yBAAyB,GAAG,iBAAiB,YAAY,GAAG,qBAAqB,WAAW,GAAG;;;;;;KAMxL,gBAAgB,UAAU,4BAA4B,gBAAgB,oBAAoB,mBAAmB;;;;KAI7G,sBAAsB,UAAU,4BAA4B,gBAAgB,WAAW,WAAW,WAAW,gBAAgB,mBAAmB;;;;KAIhJ,mBAAmB,UAAU,wBAAwB,WAAW,yBAAyB,0BAA0B,WAAW;;;;;;;;;;;;;;;;iBAgBlH,gBAAgB,OAAO;;;cAG1B;;;;;;;iBAOG,8BAA8B,gBAAgB,oBAAoB,gCAAgC,KAAK,UAAU,iFAAiF;;;;;;;;;iBASlM,wBAAwB,YAAY,oBAAoB,KAAK;;;;;;;;;;iBAU7D,iBAAiB,YAAY,oBAAoB,KAAK,UAAU,KAAK,uBAAuB"}