@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":"framework-authoring-CDEvlouU-mlMWSksD.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/framework-authoring-CDEvlouU.mjs"],"sourcesContent":["import { n as runtimeError } from \"./runtime-error-BA9d7XjZ.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { isColumnDefaultLiteralInputValue, isExecutionMutationDefaultValue } from \"@internal/contract/types\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError } from \"@internal/utils/internal-error\";\n//#region src/shared/framework-authoring.ts\nconst AUTHORING_WARNING_BATCH_THRESHOLD = 5;\n/**\n* Emits collected authoring warnings once per build, grouped by `code`:\n* a group at or below the threshold itemizes every `message`; above it,\n* one summary — `\"<count> <summary>\"` followed by the `item` lines — so\n* a build with many hits of one kind does not wall-of-text, and warnings\n* of different codes never batch into each other's summary.\n*/\nfunction flushAuthoringWarnings(warnings) {\n\tconst groups = /* @__PURE__ */ new Map();\n\tfor (const warning of warnings) {\n\t\tconst key = `${warning.code}\\u0000${warning.summary}`;\n\t\tconst group = groups.get(key) ?? [];\n\t\tgroup.push(warning);\n\t\tgroups.set(key, group);\n\t}\n\tfor (const group of groups.values()) {\n\t\tconst first = group[0];\n\t\tif (first === void 0) continue;\n\t\tif (group.length <= AUTHORING_WARNING_BATCH_THRESHOLD) {\n\t\t\tfor (const warning of group) process.emitWarning(warning.message, { code: warning.code });\n\t\t\tcontinue;\n\t\t}\n\t\tprocess.emitWarning(`${group.length} ${first.summary}\\n${group.map((w) => ` - ${w.item}`).join(\"\\n\")}`, { code: first.code });\n\t}\n}\n/**\n* Classifies an `enum` block's members (before codec decoding, which needs\n* the codec chosen first) into which default codec an omitted `@@type`\n* should resolve to:\n*\n* - every member is `bare`, or a `value` whose raw JSON is a string → `'text'`\n* - every member is a `value` whose raw JSON is an integer → `'int'`\n* - anything else (float, bigint, boolean, mixed, or a `ref`/`option`/`list`\n* parameter) → `null`, meaning the caller must require an explicit `@@type`.\n*/\nfunction classifyEnumMemberType(block) {\n\tlet sawText = false;\n\tlet sawInt = false;\n\tfor (const paramValue of Object.values(block.parameters)) {\n\t\tif (paramValue.kind === \"bare\") {\n\t\t\tsawText = true;\n\t\t\tcontinue;\n\t\t}\n\t\tif (paramValue.kind !== \"value\") return null;\n\t\tlet jsonValue;\n\t\ttry {\n\t\t\tjsonValue = JSON.parse(paramValue.raw);\n\t\t} catch {\n\t\t\treturn null;\n\t\t}\n\t\tif (typeof jsonValue === \"string\") sawText = true;\n\t\telse if (typeof jsonValue === \"number\" && Number.isInteger(jsonValue)) sawInt = true;\n\t\telse return null;\n\t}\n\tif (sawText && sawInt) return null;\n\tif (sawText) return \"text\";\n\tif (sawInt) return \"int\";\n\treturn null;\n}\n/**\n* Resolves the codec id for an `enum` block. When `@@type` is absent, the codec\n* is inferred from the members via {@link classifyEnumMemberType}; otherwise the\n* explicit `@@type(\"codec\")` argument is parsed. Pushes the appropriate\n* diagnostic and returns `undefined` when neither yields a codec. `codecSpan` is\n* the span downstream codec-validation diagnostics should anchor to. Shared by\n* every family's enum factory so inference and the explicit path stay identical.\n*/\nfunction resolveEnumCodecId(block, ctx) {\n\tconst sourceId = ctx.sourceId ?? \"unknown\";\n\tconst typeAttr = block.blockAttributes.find((a) => a.name === \"type\");\n\tif (typeAttr === void 0) {\n\t\tconst inferredKind = classifyEnumMemberType(block);\n\t\tif (inferredKind === null || ctx.enumInferenceCodecs === void 0) {\n\t\t\tctx.diagnostics?.push({\n\t\t\t\tcode: \"PSL_ENUM_CANNOT_INFER_TYPE\",\n\t\t\t\tmessage: `cannot infer @@type for enum \"${block.name}\"; add an explicit @@type(...)`,\n\t\t\t\tsourceId,\n\t\t\t\tspan: block.span\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\treturn {\n\t\t\tcodecId: ctx.enumInferenceCodecs[inferredKind],\n\t\t\tcodecSpan: block.span\n\t\t};\n\t}\n\tconst rawCodecArg = typeAttr.args[0]?.value;\n\tconst codecId = rawCodecArg?.startsWith(\"\\\"\") && rawCodecArg.endsWith(\"\\\"\") && rawCodecArg.length >= 2 ? rawCodecArg.slice(1, -1) : void 0;\n\tif (codecId === void 0) {\n\t\tctx.diagnostics?.push({\n\t\t\tcode: \"PSL_ENUM_MISSING_TYPE\",\n\t\t\tmessage: `enum \"${block.name}\" @@type attribute must have a quoted codec id argument`,\n\t\t\tsourceId,\n\t\t\tspan: typeAttr.span\n\t\t});\n\t\treturn;\n\t}\n\treturn {\n\t\tcodecId,\n\t\tcodecSpan: typeAttr.args[0]?.span ?? typeAttr.span\n\t};\n}\nfunction isAuthoringArgRef(value) {\n\tif (typeof value !== \"object\" || value === null || value.kind !== \"arg\") return false;\n\tconst { index, path } = value;\n\tif (typeof index !== \"number\" || !Number.isInteger(index) || index < 0) return false;\n\tif (path !== void 0 && (!Array.isArray(path) || path.some((s) => typeof s !== \"string\"))) return false;\n\treturn true;\n}\nfunction isAuthoringSelectRef(value) {\n\tif (!isAuthoringTemplateRecord(value) || value[\"kind\"] !== \"select\") return false;\n\tconst index = value[\"index\"];\n\tconst path = value[\"path\"];\n\tconst cases = value[\"cases\"];\n\tif (typeof index !== \"number\" || !Number.isInteger(index) || index < 0) return false;\n\tif (path !== void 0 && (!Array.isArray(path) || path.some((s) => typeof s !== \"string\"))) return false;\n\treturn typeof cases === \"object\" && cases !== null && !Array.isArray(cases);\n}\nfunction isAuthoringTemplateRecord(value) {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\nfunction readTemplateArgumentValue(args, index, path) {\n\tlet value = args[index];\n\tfor (const segment of path ?? []) {\n\t\tif (!isAuthoringTemplateRecord(value) || !Object.hasOwn(value, segment)) return;\n\t\tvalue = value[segment];\n\t}\n\treturn value;\n}\nfunction isAuthoringTypeConstructorDescriptor(value) {\n\treturn \"kind\" in value && value.kind === \"typeConstructor\";\n}\nfunction isAuthoringFieldPresetDescriptor(value) {\n\treturn \"kind\" in value && value.kind === \"fieldPreset\";\n}\nfunction isAuthoringEntityTypeDescriptor(value) {\n\treturn \"kind\" in value && value.kind === \"entity\";\n}\nfunction isAuthoringPslBlockDescriptor(value) {\n\treturn \"kind\" in value && value.kind === \"pslBlock\";\n}\nfunction isAuthoringModelAttributeDescriptor(value) {\n\treturn \"kind\" in value && value.kind === \"modelAttribute\";\n}\n/**\n* Returns true when `namespace` is a non-leaf key in `contributions.field`.\n*\n* `AuthoringFieldNamespace` permits a leaf descriptor at any depth — including\n* the root — so a top-level `field: { Foo: { kind: 'fieldPreset', ... } }`\n* registration must NOT be treated as a \"namespace\" with sub-paths. Callers\n* use this predicate to gate dot-namespaced lookups (e.g. PSL `@Foo.bar`).\n*/\nfunction hasRegisteredFieldNamespace(contributions, namespace) {\n\tif (contributions?.field === void 0 || !Object.hasOwn(contributions.field, namespace)) return false;\n\tconst value = contributions.field[namespace];\n\treturn value !== void 0 && !isAuthoringFieldPresetDescriptor(value);\n}\nfunction isCopyableNamespaceObject(value) {\n\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) return false;\n\tconst proto = Object.getPrototypeOf(value);\n\treturn proto === Object.prototype || proto === null;\n}\n/**\n* Deep structural check run only at the composition boundary (the merge and\n* collect walkers) to classify a raw namespace-tree node as a leaf descriptor.\n* A node counts as a leaf iff its `kind` matches `descriptorKind` AND it\n* carries that kind's required fields.\n*\n* This is boundary validation over `unknown`, NOT a type-predicate: the four\n* exported `isAuthoring*Descriptor` predicates deliberately narrow on `kind`\n* alone and trust the static types. The walkers, by contrast, also receive\n* type-bypassing packs (`as unknown as never` in tests, untyped JS at runtime)\n* whose descriptor-shaped-but-incomplete nodes must be rejected rather than\n* silently treated as sub-namespaces — so the well-formedness check lives here.\n*/\nfunction isWellFormedDescriptor(value, descriptorKind) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tif (!(\"kind\" in value) || value.kind !== descriptorKind) return false;\n\tswitch (descriptorKind) {\n\t\tcase \"typeConstructor\":\n\t\tcase \"fieldPreset\": {\n\t\t\tif (!(\"output\" in value)) return false;\n\t\t\tconst output = value.output;\n\t\t\treturn typeof output === \"object\" && output !== null;\n\t\t}\n\t\tcase \"entity\": {\n\t\t\tif (!(\"discriminator\" in value) || typeof value.discriminator !== \"string\") return false;\n\t\t\tif (value.discriminator.length === 0) return false;\n\t\t\tif (!(\"output\" in value)) return false;\n\t\t\tconst output = value.output;\n\t\t\tif (typeof output !== \"object\" || output === null) return false;\n\t\t\tconst factory = \"factory\" in output ? output.factory : void 0;\n\t\t\tconst template = \"template\" in output ? output.template : void 0;\n\t\t\treturn typeof factory === \"function\" || template !== void 0;\n\t\t}\n\t\tcase \"pslBlock\": {\n\t\t\tif (!(\"keyword\" in value) || typeof value.keyword !== \"string\" || value.keyword.length === 0) return false;\n\t\t\tif (!(\"discriminator\" in value) || typeof value.discriminator !== \"string\" || value.discriminator.length === 0) return false;\n\t\t\tif (!(\"name\" in value)) return false;\n\t\t\tconst name = value.name;\n\t\t\tif (typeof name !== \"object\" || name === null) return false;\n\t\t\tif (!(\"required\" in name) || typeof name.required !== \"boolean\") return false;\n\t\t\tif (!(\"parameters\" in value)) return false;\n\t\t\tconst parameters = value.parameters;\n\t\t\treturn typeof parameters === \"object\" && parameters !== null && !Array.isArray(parameters);\n\t\t}\n\t\tcase \"modelAttribute\":\n\t\t\tif (!(\"attribute\" in value) || typeof value.attribute !== \"string\" || value.attribute.length === 0) return false;\n\t\t\tif (!(\"spec\" in value)) return false;\n\t\t\treturn \"lower\" in value && typeof value.lower === \"function\";\n\t\tdefault: return false;\n\t}\n}\nfunction deepCopyNamespace(source, descriptorKind) {\n\tconst copy = {};\n\tfor (const [key, value] of Object.entries(source)) copy[key] = isCopyableNamespaceObject(value) && !isWellFormedDescriptor(value, descriptorKind) ? deepCopyNamespace(value, descriptorKind) : value;\n\treturn copy;\n}\n/**\n* Merges `source` into `target` recursively at the descriptor-namespace\n* level. `descriptorKind` is the `kind` value ('typeConstructor',\n* 'fieldPreset', 'entity', or 'pslBlock') that identifies a descriptor\n* (terminal merge point; same-path registrations across components are\n* reported as duplicates) as opposed to a sub-namespace (recursion target).\n*\n* Path segments are validated against prototype-pollution names\n* (`__proto__`, `constructor`, `prototype`). A value that is neither a\n* recognized leaf nor a plain object — e.g. a malformed descriptor\n* where the canonical leaf guard rejected it for missing `output` —\n* is reported as an invalid contribution rather than recursed into,\n* which would either silently mangle state or infinite-loop on\n* primitive properties.\n*\n* Within-registry duplicate detection is this walker's job;\n* cross-registry detection runs separately via\n* `assertNoCrossRegistryCollisions` after merging completes.\n*/\nfunction mergeAuthoringNamespaces(target, source, path, descriptorKind, label) {\n\tconst assertSafePath = (currentPath) => {\n\t\tconst blockedSegment = currentPath.find((segment) => segment === \"__proto__\" || segment === \"constructor\" || segment === \"prototype\");\n\t\tif (blockedSegment) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Invalid authoring ${label} helper \"${currentPath.join(\".\")}\". Helper path segments must not use \"${blockedSegment}\".`);\n\t};\n\tfor (const [key, sourceValue] of Object.entries(source)) {\n\t\tconst currentPath = [...path, key];\n\t\tassertSafePath(currentPath);\n\t\tconst hasExistingValue = Object.hasOwn(target, key);\n\t\tconst existingValue = hasExistingValue ? target[key] : void 0;\n\t\tif (!hasExistingValue) {\n\t\t\ttarget[key] = isCopyableNamespaceObject(sourceValue) && !isWellFormedDescriptor(sourceValue, descriptorKind) ? deepCopyNamespace(sourceValue, descriptorKind) : sourceValue;\n\t\t\tcontinue;\n\t\t}\n\t\tconst existingIsLeaf = isWellFormedDescriptor(existingValue, descriptorKind);\n\t\tconst sourceIsLeaf = isWellFormedDescriptor(sourceValue, descriptorKind);\n\t\tif (existingIsLeaf || sourceIsLeaf) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Duplicate authoring ${label} helper \"${currentPath.join(\".\")}\". Helper names must be unique across composed packs.`);\n\t\tif (!isCopyableNamespaceObject(existingValue) || !isCopyableNamespaceObject(sourceValue)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Invalid authoring ${label} helper \"${currentPath.join(\".\")}\". Expected a sub-namespace object or a recognized descriptor; received a malformed value.`);\n\t\tmergeAuthoringNamespaces(existingValue, sourceValue, currentPath, descriptorKind, label);\n\t}\n}\n/**\n* Collects the full dotted paths of every well-formed descriptor of\n* `descriptorKind` in a raw contribution tree, using the same boundary\n* classification as {@link mergeAuthoringNamespaces}. Lets assembly-level\n* callers attribute each contributed path to its contributing component\n* before merging, so a same-path collision can be reported naming both\n* contributors.\n*/\nfunction collectContributedDescriptorPaths(namespace, descriptorKind, path = []) {\n\tconst paths = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isWellFormedDescriptor(value, descriptorKind)) {\n\t\t\tpaths.push(currentPath.join(\".\"));\n\t\t\tcontinue;\n\t\t}\n\t\tif (isCopyableNamespaceObject(value)) paths.push(...collectContributedDescriptorPaths(value, descriptorKind, currentPath));\n\t}\n\treturn paths;\n}\n/**\n* Derives the scalar view of an assembled authoring type namespace: every\n* **top-level** type constructor that is instantiable with an empty argument\n* list — all declared args optional and no entity-ref argument. A bare type\n* name `T` in a schema is semantically the zero-arg instantiation `T()`, so\n* each entry is exactly what that call produces (defaulted template values\n* applied, absent optional-arg typeParams keys omitted). Constructors\n* registered under a namespace segment, constructors with required args, and\n* entity-ref constructors are not scalars and are excluded.\n*\n* Eligibility needs no template inspection: templates that cannot resolve\n* for their legal call shapes are rejected at the composition boundary by\n* {@link assertResolvableTypeConstructorTemplates}, so the zero-arg\n* instantiation below cannot fail for an eligible constructor.\n*/\nfunction collectScalarTypeConstructors(namespace) {\n\tconst result = /* @__PURE__ */ new Map();\n\tfor (const [name, value] of Object.entries(namespace)) {\n\t\tif (!isAuthoringTypeConstructorDescriptor(value)) continue;\n\t\tif (value.entityRefArg !== void 0) continue;\n\t\tif (value.args?.some((arg) => arg.optional !== true)) continue;\n\t\tresult.set(name, instantiateAuthoringTypeConstructor(value, []));\n\t}\n\treturn result;\n}\nfunction visitTemplateArgRefs(template, visit) {\n\tif (template === void 0) return;\n\tif (isAuthoringArgRef(template)) {\n\t\tvisit(template);\n\t\tvisitTemplateArgRefs(template.default, visit);\n\t\treturn;\n\t}\n\tif (Array.isArray(template)) {\n\t\tfor (const value of template) visitTemplateArgRefs(value, visit);\n\t\treturn;\n\t}\n\tif (typeof template === \"object\" && template !== null) for (const value of Object.values(template)) visitTemplateArgRefs(value, visit);\n}\n/**\n* Boundary validation for a contributed authoring type namespace, called\n* per contributing component at assembly (which supplies `contributedBy`\n* for attribution). Rejects what the types cannot express — entity-ref\n* constructors are skipped (their output derives from the referenced\n* entity): a plain constructor must declare its output storage type name,\n* and every `typeParams` arg-ref (including refs inside arg-ref defaults)\n* must point at a declared argument index.\n*/\nfunction assertResolvableTypeConstructorTemplates(namespace, contributedBy, path = []) {\n\tfor (const [name, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, name];\n\t\tif (!isAuthoringTypeConstructorDescriptor(value)) {\n\t\t\tassertResolvableTypeConstructorTemplates(value, contributedBy, currentPath);\n\t\t\tcontinue;\n\t\t}\n\t\tif (value.entityRefArg !== void 0) continue;\n\t\tconst args = value.args ?? [];\n\t\tconst invalid = (detail) => /* @__PURE__ */ new Error(`Invalid authoring type constructor \"${currentPath.join(\".\")}\" contributed by descriptor \"${contributedBy}\". ${detail}`);\n\t\tif (value.output.nativeType === void 0) throw invalid(\"The output declares no storage type template and no entityRefArg; a plain constructor must declare one.\");\n\t\tfor (const [key, template] of Object.entries(value.output.typeParams ?? {})) visitTemplateArgRefs(template, (ref) => {\n\t\t\tif (args[ref.index] === void 0) throw invalid(`output.typeParams.${key} references argument ${ref.index}, but the constructor declares ${args.length} argument(s). Declare the argument or correct the reference index.`);\n\t\t});\n\t}\n}\nfunction collectDescriptorPaths(namespace, isLeaf, path = []) {\n\tconst paths = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isLeaf(value)) {\n\t\t\tpaths.push(currentPath.join(\".\"));\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof value === \"object\" && value !== null && !Array.isArray(value)) paths.push(...collectDescriptorPaths(value, isLeaf, currentPath));\n\t}\n\treturn paths;\n}\nfunction collectDescriptorEntries(namespace, isLeaf, descriptorKind, label, path = []) {\n\tconst entries = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isLeaf(value)) {\n\t\t\tif (!isWellFormedDescriptor(value, descriptorKind)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring ${label} contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/keyword/discriminator) but does not satisfy the ${label} descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\tif (value.discriminator.length > 0) entries.push({\n\t\t\t\tpath: currentPath.join(\".\"),\n\t\t\t\tdiscriminator: value.discriminator\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof value === \"object\" && value !== null && !Array.isArray(value)) {\n\t\t\tconst record = blindCast(value);\n\t\t\tif ((record[\"kind\"] !== void 0 || record[\"keyword\"] !== void 0 || record[\"discriminator\"] !== void 0) && !isLeaf(value)) {\n\t\t\t\tconst hasKind = record[\"kind\"] === \"pslBlock\";\n\t\t\t\tconst hasKeyword = typeof record[\"keyword\"] === \"string\";\n\t\t\t\tconst hasDiscriminator = typeof record[\"discriminator\"] === \"string\";\n\t\t\t\tif (hasKind || hasKeyword && hasDiscriminator) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring ${label} contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/keyword/discriminator) but does not satisfy the ${label} descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\t}\n\t\t\tentries.push(...collectDescriptorEntries(value, isLeaf, descriptorKind, label, currentPath));\n\t\t}\n\t}\n\treturn entries;\n}\n/**\n* Throws when two or more entries in the same namespace share a key. A\n* duplicate key makes dispatch ambiguous — the caller's lookup dispatches by\n* this key, so one entry would silently shadow the other. Catch duplicates\n* before building any dispatch map.\n*\n* `label` (e.g. `'pslBlock'`, `'entityType'`) names which namespace the\n* duplicate was found in and is carried in the structured error metadata;\n* the key itself is always called `key` in both the message and the\n* metadata, since what it semantically represents (a discriminator for\n* `entityType`, the parser's dispatch keyword for `pslBlock`) is the\n* caller's concern, not this function's.\n*/\nfunction assertUniqueDiscriminators(entries, label) {\n\tconst seen = /* @__PURE__ */ new Map();\n\tfor (const { path, discriminator: key } of entries) {\n\t\tconst existing = seen.get(key);\n\t\tif (existing !== void 0) throw runtimeError(\"RUNTIME.DUPLICATE_AUTHORING_DISCRIMINATOR\", `Duplicate ${label} key \"${key}\" registered at both \"${existing}\" and \"${path}\". Each ${label} contribution must use a unique key.`, {\n\t\t\tlabel,\n\t\t\tkey,\n\t\t\texistingPath: existing,\n\t\t\tpath\n\t\t});\n\t\tseen.set(key, path);\n\t}\n}\nfunction collectPslBlockDescriptorEntries(namespace, path = []) {\n\tconst entries = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isAuthoringPslBlockDescriptor(value)) {\n\t\t\tif (!isWellFormedDescriptor(value, \"pslBlock\")) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring pslBlock contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/keyword/discriminator) but does not satisfy the pslBlock descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\tentries.push({\n\t\t\t\tpath: currentPath.join(\".\"),\n\t\t\t\tdiscriminator: value.discriminator,\n\t\t\t\tkeyword: value.keyword\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof value === \"object\" && value !== null && !Array.isArray(value)) {\n\t\t\tconst record = blindCast(value);\n\t\t\tconst hasKind = record[\"kind\"] === \"pslBlock\";\n\t\t\tconst hasKeyword = typeof record[\"keyword\"] === \"string\";\n\t\t\tconst hasDiscriminator = typeof record[\"discriminator\"] === \"string\";\n\t\t\tif (hasKind || hasKeyword && hasDiscriminator) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring pslBlock contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/keyword/discriminator) but does not satisfy the pslBlock descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\tentries.push(...collectPslBlockDescriptorEntries(value, currentPath));\n\t\t}\n\t}\n\treturn entries;\n}\n/**\n* Every `pslBlockDescriptors` entry requires a matching `entityTypes` factory\n* with the same discriminator. An `entityTypes` factory may stand alone (e.g.\n* `enum`, reachable from the TypeScript builder without any PSL block).\n*\n* Uniqueness for pslBlock entries is keyed on **keyword**, not discriminator:\n* several keywords (e.g. `policy_select`/`policy_insert`) may legitimately\n* share one discriminator, routing to the same `entityTypes` factory and the\n* same `entries[discriminator]` slot — that N:1 shape is exactly what lets\n* one entity kind be authored through several PSL keywords. What must stay\n* unique is the keyword itself, since that's what the parser dispatches on.\n*/\nfunction assertPslBlocksHaveFactories(entityTypeNamespace, pslBlockNamespace) {\n\tconst blockEntries = collectPslBlockDescriptorEntries(pslBlockNamespace);\n\tconst entityEntries = collectDescriptorEntries(entityTypeNamespace, isAuthoringEntityTypeDescriptor, \"entity\", \"entityType\");\n\tassertUniqueDiscriminators(blockEntries.map((entry) => ({\n\t\tpath: entry.path,\n\t\tdiscriminator: entry.keyword\n\t})), \"pslBlock\");\n\tassertUniqueDiscriminators(entityEntries, \"entityType\");\n\tconst entityDiscriminators = new Set(entityEntries.map((entry) => entry.discriminator));\n\tfor (const block of blockEntries) if (!entityDiscriminators.has(block.discriminator)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Incomplete extension contribution: pslBlock helper \"${block.path}\" registers discriminator \"${block.discriminator}\" but no entityType contribution shares that discriminator. An extension-contributed PSL block requires a matching entityType factory so the parsed AST node can lower to an IR class instance; add an entityType helper with discriminator \"${block.discriminator}\".`);\n}\nfunction collectModelAttributeEntries(namespace, path = []) {\n\tconst entries = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isAuthoringModelAttributeDescriptor(value)) {\n\t\t\tif (!isWellFormedDescriptor(value, \"modelAttribute\")) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring modelAttribute contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/attribute) but does not satisfy the modelAttribute descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\tentries.push({\n\t\t\t\tpath: currentPath.join(\".\"),\n\t\t\t\tdiscriminator: value.attribute\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof value === \"object\" && value !== null && !Array.isArray(value)) {\n\t\t\tconst record = blindCast(value);\n\t\t\tif (typeof record[\"attribute\"] === \"string\" && \"spec\" in record) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Malformed authoring modelAttribute contribution at \"${currentPath.join(\".\")}\". The value carries descriptor keys (kind/attribute) but does not satisfy the modelAttribute descriptor shape. Fix the contribution so it is a complete descriptor, or remove the stray keys if it was meant to be a sub-namespace.`);\n\t\t\tentries.push(...collectModelAttributeEntries(value, currentPath));\n\t\t}\n\t}\n\treturn entries;\n}\n/**\n* Throws when two modelAttribute contributions — at any paths, even\n* different ones — claim the same bare `@@` attribute name. The family\n* interpreter dispatches by attribute name, not by registration path, so\n* two descriptors claiming the same name would have one silently shadow\n* the other.\n*/\nfunction assertUniqueModelAttributeNames(entries) {\n\tconst seen = /* @__PURE__ */ new Map();\n\tfor (const { path, discriminator: attribute } of entries) {\n\t\tconst existing = seen.get(attribute);\n\t\tif (existing !== void 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Duplicate modelAttribute \"${attribute}\" registered at both \"${existing}\" and \"${path}\". Each modelAttribute contribution must claim a unique attribute name.`);\n\t\tseen.set(attribute, path);\n\t}\n}\nfunction assertNoCrossRegistryCollisions(typeNamespace, fieldNamespace, entityTypeNamespace = {}, pslBlockNamespace = {}, modelAttributeNamespace = {}) {\n\tconst typePaths = new Set(collectDescriptorPaths(typeNamespace, isAuthoringTypeConstructorDescriptor));\n\tconst fieldPaths = new Set(collectDescriptorPaths(fieldNamespace, isAuthoringFieldPresetDescriptor));\n\tconst entityPaths = new Set(collectDescriptorPaths(entityTypeNamespace, isAuthoringEntityTypeDescriptor));\n\tconst ambiguityHint = \"Register each path in only one of authoringContributions.field / authoringContributions.type / authoringContributions.entityTypes.\";\n\tfor (const fieldPath of fieldPaths) if (typePaths.has(fieldPath)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Ambiguous authoring registry path \"${fieldPath}\". The same path is registered as both a type constructor and a field preset; PSL resolution would be ambiguous. ${ambiguityHint}`);\n\tfor (const entityPath of entityPaths) if (typePaths.has(entityPath) || fieldPaths.has(entityPath)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Ambiguous authoring registry path \"${entityPath}\". The same path is registered as an entity contribution AND as a type constructor or field preset; PSL resolution would be ambiguous. ${ambiguityHint}`);\n\tassertPslBlocksHaveFactories(entityTypeNamespace, pslBlockNamespace);\n\tassertUniqueModelAttributeNames(collectModelAttributeEntries(modelAttributeNamespace));\n\tassertSelectTemplatesMatchOptionArgs(typeNamespace, fieldNamespace, entityTypeNamespace);\n}\nfunction collectDescriptorNodes(namespace, isLeaf, path = []) {\n\tconst nodes = [];\n\tfor (const [key, value] of Object.entries(namespace)) {\n\t\tconst currentPath = [...path, key];\n\t\tif (isLeaf(value)) {\n\t\t\tnodes.push([currentPath.join(\".\"), value]);\n\t\t\tcontinue;\n\t\t}\n\t\tif (typeof value === \"object\" && value !== null && !Array.isArray(value)) nodes.push(...collectDescriptorNodes(value, isLeaf, currentPath));\n\t}\n\treturn nodes;\n}\nfunction collectSelectRefs(value, found) {\n\tif (typeof value !== \"object\" || value === null) return;\n\tif (isAuthoringSelectRef(value)) {\n\t\tfound.push(value);\n\t\tfor (const caseTemplate of Object.values(value.cases)) collectSelectRefs(caseTemplate, found);\n\t\treturn;\n\t}\n\tif (isAuthoringArgRef(value)) {\n\t\tcollectSelectRefs(value.default, found);\n\t\treturn;\n\t}\n\tif (Array.isArray(value)) {\n\t\tfor (const entry of value) collectSelectRefs(entry, found);\n\t\treturn;\n\t}\n\tfor (const entry of Object.values(value)) collectSelectRefs(entry, found);\n}\nfunction validateSelectRefsAgainstArgs(label, helperPath, args, templateRoot) {\n\tconst selects = [];\n\tcollectSelectRefs(templateRoot, selects);\n\tfor (const select of selects) {\n\t\tconst position = `#${select.index + 1}`;\n\t\tlet descriptor = args?.[select.index];\n\t\tif (descriptor === void 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring ${label} helper \"${helperPath}\" select template references argument ${position}, but the helper declares no argument at that position.`);\n\t\tfor (const segment of select.path ?? []) {\n\t\t\tdescriptor = descriptor.kind === \"object\" ? descriptor.properties[segment] : void 0;\n\t\t\tif (descriptor === void 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring ${label} helper \"${helperPath}\" select template references argument ${position} at path \"${(select.path ?? []).join(\".\")}\", which does not resolve to a declared argument property.`);\n\t\t}\n\t\tif (descriptor.kind !== \"option\") throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring ${label} helper \"${helperPath}\" select template references argument ${position}, which is kind \"${descriptor.kind}\"; select requires an option argument.`);\n\t\tconst argumentLabel = descriptor.name !== void 0 ? `\"${descriptor.name}\"` : position;\n\t\tconst missing = descriptor.values.filter((value) => !Object.hasOwn(select.cases, value));\n\t\tif (missing.length > 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring ${label} helper \"${helperPath}\" option argument ${argumentLabel} allows [${descriptor.values.join(\", \")}] but the select template has no case for: ${missing.join(\", \")}.`);\n\t\tconst values = descriptor.values;\n\t\tconst unreachable = Object.keys(select.cases).filter((key) => !values.includes(key));\n\t\tif (unreachable.length > 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring ${label} helper \"${helperPath}\" select template has case(s) not allowed by option argument ${argumentLabel}: ${unreachable.join(\", \")}. Allowed values: [${values.join(\", \")}].`);\n\t}\n}\n/**\n* Every `select` template node must target an option argument whose `values`\n* exactly cover the node's `cases` — a legal token with no case and a case no\n* token can reach are both declaration bugs, caught here at pack-registration\n* time rather than at first resolution.\n*/\nfunction assertSelectTemplatesMatchOptionArgs(typeNamespace, fieldNamespace, entityTypeNamespace) {\n\tfor (const [helperPath, descriptor] of collectDescriptorNodes(fieldNamespace, isAuthoringFieldPresetDescriptor)) validateSelectRefsAgainstArgs(\"field\", helperPath, descriptor.args, descriptor.output);\n\tfor (const [helperPath, descriptor] of collectDescriptorNodes(typeNamespace, isAuthoringTypeConstructorDescriptor)) validateSelectRefsAgainstArgs(\"type\", helperPath, descriptor.args, descriptor.output);\n\tfor (const [helperPath, descriptor] of collectDescriptorNodes(entityTypeNamespace, isAuthoringEntityTypeDescriptor)) if (\"template\" in descriptor.output) validateSelectRefsAgainstArgs(\"entityType\", helperPath, descriptor.args, descriptor.output.template);\n}\nfunction resolveAuthoringTemplateValue(template, args) {\n\tif (template === void 0) return;\n\tif (isAuthoringArgRef(template)) {\n\t\tconst value = readTemplateArgumentValue(args, template.index, template.path);\n\t\tif (value === void 0 && template.default !== void 0) return resolveAuthoringTemplateValue(template.default, args);\n\t\treturn value;\n\t}\n\tif (isAuthoringSelectRef(template)) {\n\t\tconst value = readTemplateArgumentValue(args, template.index, template.path);\n\t\tif (value === void 0) return;\n\t\tif (typeof value !== \"string\" || !Object.hasOwn(template.cases, value)) throw new InternalError(`Authoring template select has no case for value \"${String(value)}\"`);\n\t\treturn resolveAuthoringTemplateValue(template.cases[value], args);\n\t}\n\tif (Array.isArray(template)) return template.map((value) => resolveAuthoringTemplateValue(value, args));\n\tif (typeof template === \"object\" && template !== null) {\n\t\tconst resolved = {};\n\t\tfor (const [key, value] of Object.entries(template)) {\n\t\t\tconst resolvedValue = resolveAuthoringTemplateValue(value, args);\n\t\t\tif (resolvedValue !== void 0) resolved[key] = resolvedValue;\n\t\t}\n\t\treturn resolved;\n\t}\n\treturn template;\n}\nfunction validateAuthoringArgument(descriptor, value, path) {\n\tif (value === void 0) {\n\t\tif (descriptor.optional) return;\n\t\tthrow runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Missing required authoring helper argument at ${path}`);\n\t}\n\tif (descriptor.kind === \"string\") {\n\t\tif (typeof value !== \"string\") throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be a string`);\n\t\treturn;\n\t}\n\tif (descriptor.kind === \"boolean\") {\n\t\tif (typeof value !== \"boolean\") throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be a boolean`);\n\t\treturn;\n\t}\n\tif (descriptor.kind === \"stringArray\") {\n\t\tif (!Array.isArray(value)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be an array of strings`);\n\t\tfor (const entry of value) if (typeof entry !== \"string\") throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be an array of strings`);\n\t\treturn;\n\t}\n\tif (descriptor.kind === \"object\") {\n\t\tif (typeof value !== \"object\" || value === null || Array.isArray(value)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be an object`);\n\t\tconst input = value;\n\t\tconst expectedKeys = new Set(Object.keys(descriptor.properties));\n\t\tfor (const key of Object.keys(input)) if (!expectedKeys.has(key)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} contains unknown property \"${key}\"`);\n\t\tfor (const [key, propertyDescriptor] of Object.entries(descriptor.properties)) validateAuthoringArgument(propertyDescriptor, input[key], `${path}.${key}`);\n\t\treturn;\n\t}\n\tif (descriptor.kind === \"option\") {\n\t\tif (typeof value !== \"string\" || !descriptor.values.includes(value)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be one of: ${descriptor.values.join(\", \")}`);\n\t\treturn;\n\t}\n\tif (typeof value !== \"number\" || Number.isNaN(value)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be a number`);\n\tif (descriptor.integer && !Number.isInteger(value)) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be an integer`);\n\tif (descriptor.minimum !== void 0 && value < descriptor.minimum) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be >= ${descriptor.minimum}, received ${value}`);\n\tif (descriptor.maximum !== void 0 && value > descriptor.maximum) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `Authoring helper argument at ${path} must be <= ${descriptor.maximum}, received ${value}`);\n}\nfunction validateAuthoringHelperArguments(helperPath, descriptors, args) {\n\tconst expected = descriptors ?? [];\n\tconst minimumArgs = expected.reduce((count, descriptor, index) => descriptor.optional ? count : index + 1, 0);\n\tif (args.length < minimumArgs || args.length > expected.length) throw runtimeError(\"CONTRACT.ARGUMENT_INVALID\", `${helperPath} expects ${minimumArgs === expected.length ? expected.length : `${minimumArgs}-${expected.length}`} argument(s), received ${args.length}`);\n\texpected.forEach((descriptor, index) => {\n\t\tvalidateAuthoringArgument(descriptor, args[index], `${helperPath}[${index}]`);\n\t});\n}\nfunction resolveAuthoringStorageTypeTemplate(template, args) {\n\tconst nativeType = template.nativeType;\n\tif (nativeType === void 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring output template for codec \"${template.codecId}\" declares no nativeType; only entity-ref constructors may omit it`);\n\tconst typeParams = template.typeParams === void 0 ? void 0 : resolveAuthoringTemplateValue(template.typeParams, args);\n\tif (typeParams !== void 0 && !isAuthoringTemplateRecord(typeParams)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Resolved authoring typeParams must be an object for codec \"${template.codecId}\", received ${String(typeParams)}`);\n\tconst normalizedTypeParams = typeParams !== void 0 && Object.keys(typeParams).length === 0 ? void 0 : typeParams;\n\treturn {\n\t\tcodecId: template.codecId,\n\t\tnativeType,\n\t\t...ifDefined(\"typeParams\", normalizedTypeParams)\n\t};\n}\nfunction resolveAuthoringColumnDefaultTemplate(template, args) {\n\tif (template.kind === \"literal\") {\n\t\tconst value = resolveAuthoringTemplateValue(template.value, args);\n\t\tif (value === void 0) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", \"Resolved authoring literal default must not be undefined\");\n\t\tif (!isColumnDefaultLiteralInputValue(value)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Resolved authoring literal default must be a JSON-serializable value or Date, received ${String(value)}`);\n\t\treturn {\n\t\t\tkind: \"literal\",\n\t\t\tvalue\n\t\t};\n\t}\n\tconst expression = resolveAuthoringTemplateValue(template.expression, args);\n\tif (expression === void 0 || typeof expression === \"object\" && expression !== null) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Resolved authoring function default expression must resolve to a primitive, received ${String(expression)}`);\n\treturn {\n\t\tkind: \"function\",\n\t\texpression: String(expression)\n\t};\n}\nfunction resolveExecutionMutationDefaultPhase(phase, template, args) {\n\tconst value = resolveAuthoringTemplateValue(template, args);\n\tif (value === void 0) return;\n\tif (!isExecutionMutationDefaultValue(value)) throw runtimeError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Authoring preset executionDefaults.${phase} did not resolve to a valid generator descriptor (kind: 'generator', id: string).`);\n\treturn value;\n}\nfunction resolveAuthoringExecutionDefaultsTemplate(template, args) {\n\tconst phases = {\n\t\t...ifDefined(\"onCreate\", template.onCreate !== void 0 ? resolveExecutionMutationDefaultPhase(\"onCreate\", template.onCreate, args) : void 0),\n\t\t...ifDefined(\"onUpdate\", template.onUpdate !== void 0 ? resolveExecutionMutationDefaultPhase(\"onUpdate\", template.onUpdate, args) : void 0)\n\t};\n\treturn Object.keys(phases).length === 0 ? void 0 : phases;\n}\nfunction instantiateAuthoringTypeConstructor(descriptor, args) {\n\treturn resolveAuthoringStorageTypeTemplate(descriptor.output, args);\n}\nfunction instantiateAuthoringEntityType(helperPath, descriptor, args, ctx) {\n\tif (\"factory\" in descriptor.output) {\n\t\tconst input = args[0];\n\t\treturn blindCast(descriptor.output.factory)(input, ctx);\n\t}\n\tvalidateAuthoringHelperArguments(helperPath, descriptor.args, args);\n\treturn blindCast(resolveAuthoringTemplateValue(descriptor.output.template, args));\n}\nfunction instantiateAuthoringFieldPreset(descriptor, args) {\n\treturn {\n\t\tdescriptor: resolveAuthoringStorageTypeTemplate(descriptor.output, args),\n\t\tnullable: descriptor.output.nullable ?? false,\n\t\t...ifDefined(\"default\", descriptor.output.default !== void 0 ? resolveAuthoringColumnDefaultTemplate(descriptor.output.default, args) : void 0),\n\t\t...ifDefined(\"executionDefaults\", descriptor.output.executionDefaults !== void 0 ? resolveAuthoringExecutionDefaultsTemplate(descriptor.output.executionDefaults, args) : void 0),\n\t\tid: descriptor.output.id ?? false,\n\t\tunique: descriptor.output.unique ?? false\n\t};\n}\n//#endregion\nexport { mergeAuthoringNamespaces as _, collectScalarTypeConstructors as a, validateAuthoringHelperArguments as b, instantiateAuthoringEntityType as c, isAuthoringArgRef as d, isAuthoringEntityTypeDescriptor as f, isAuthoringTypeConstructorDescriptor as g, isAuthoringPslBlockDescriptor as h, collectContributedDescriptorPaths as i, instantiateAuthoringFieldPreset as l, isAuthoringModelAttributeDescriptor as m, assertResolvableTypeConstructorTemplates as n, flushAuthoringWarnings as o, isAuthoringFieldPresetDescriptor as p, classifyEnumMemberType as r, hasRegisteredFieldNamespace as s, assertNoCrossRegistryCollisions as t, instantiateAuthoringTypeConstructor as u, resolveAuthoringTemplateValue as v, resolveEnumCodecId as y };\n\n//# sourceMappingURL=framework-authoring-CDEvlouU.mjs.map"],"mappings":";;;;;;AAMA,MAAM,oCAAoC;;;;;;;;AAQ1C,SAAS,uBAAuB,UAAU;CACzC,MAAM,yBAAyB,IAAI,IAAI;CACvC,KAAK,MAAM,WAAW,UAAU;EAC/B,MAAM,MAAM,GAAG,QAAQ,KAAK,QAAQ,QAAQ;EAC5C,MAAM,QAAQ,OAAO,IAAI,GAAG,KAAK,CAAC;EAClC,MAAM,KAAK,OAAO;EAClB,OAAO,IAAI,KAAK,KAAK;CACtB;CACA,KAAK,MAAM,SAAS,OAAO,OAAO,GAAG;EACpC,MAAM,QAAQ,MAAM;EACpB,IAAI,UAAU,KAAK,GAAG;EACtB,IAAI,MAAM,UAAU,mCAAmC;GACtD,KAAK,MAAM,WAAW,OAAO,QAAQ,YAAY,QAAQ,SAAS,EAAE,MAAM,QAAQ,KAAK,CAAC;GACxF;EACD;EACA,QAAQ,YAAY,GAAG,MAAM,OAAO,GAAG,MAAM,QAAQ,IAAI,MAAM,KAAK,MAAM,OAAO,EAAE,MAAM,CAAC,CAAC,KAAK,IAAI,KAAK,EAAE,MAAM,MAAM,KAAK,CAAC;CAC9H;AACD;;;;;;;;;;;AAWA,SAAS,uBAAuB,OAAO;CACtC,IAAI,UAAU;CACd,IAAI,SAAS;CACb,KAAK,MAAM,cAAc,OAAO,OAAO,MAAM,UAAU,GAAG;EACzD,IAAI,WAAW,SAAS,QAAQ;GAC/B,UAAU;GACV;EACD;EACA,IAAI,WAAW,SAAS,SAAS,OAAO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A8B,WAAW,OAAO,UAAU,IAAI,CAAC;AACjF;AACA,SAAS,gCAAgC,YAAY,MAAM;CAC1D,OAAO;EACN,YAAY,oCAAoC,WAAW,QAAQ,IAAI;EACvE,UAAU,WAAW,OAAO,YAAY;EACxC,GAAG,UAAU,WAAW,WAAW,OAAO,YAAY,KAAK,IAAI,sCAAsC,WAAW,OAAO,SAAS,IAAI,IAAI,KAAK,CAAC;EAC9I,GAAG,UAAU,qBAAqB,WAAW,OAAO,sBAAsB,KAAK,IAAI,0CAA0C,WAAW,OAAO,mBAAmB,IAAI,IAAI,KAAK,CAAC;EAChL,IAAI,WAAW,OAAO,MAAM;EAC5B,QAAQ,WAAW,OAAO,UAAU;CACrC;AACD"}
@@ -0,0 +1,27 @@
1
+ //#region ../../../1-framework/1-core/framework-components/dist/framework-components-D6j4Y5K7.mjs
2
+ function checkContractComponentRequirements(input) {
3
+ const providedIds = /* @__PURE__ */ new Set();
4
+ for (const id of input.providedComponentIds) providedIds.add(id);
5
+ const missingExtensionPackIds = (input.contract.extensions ? Object.keys(input.contract.extensions) : []).filter((id) => !providedIds.has(id));
6
+ const expectedTargetFamily = input.expectedTargetFamily;
7
+ const contractTargetFamily = input.contract.targetFamily;
8
+ const familyMismatch = expectedTargetFamily !== void 0 && contractTargetFamily !== void 0 && contractTargetFamily !== expectedTargetFamily ? {
9
+ expected: expectedTargetFamily,
10
+ actual: contractTargetFamily
11
+ } : void 0;
12
+ const expectedTargetId = input.expectedTargetId;
13
+ const contractTargetId = input.contract.target;
14
+ const targetMismatch = expectedTargetId !== void 0 && contractTargetId !== expectedTargetId ? {
15
+ expected: expectedTargetId,
16
+ actual: contractTargetId
17
+ } : void 0;
18
+ return {
19
+ ...familyMismatch ? { familyMismatch } : {},
20
+ ...targetMismatch ? { targetMismatch } : {},
21
+ missingExtensionPackIds
22
+ };
23
+ }
24
+ //#endregion
25
+ export { checkContractComponentRequirements as t };
26
+
27
+ //# sourceMappingURL=framework-components-D6j4Y5K7-RW9H184y.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"framework-components-D6j4Y5K7-RW9H184y.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/framework-components-D6j4Y5K7.mjs"],"sourcesContent":["//#region src/shared/framework-components.ts\nfunction checkContractComponentRequirements(input) {\n\tconst providedIds = /* @__PURE__ */ new Set();\n\tfor (const id of input.providedComponentIds) providedIds.add(id);\n\tconst missingExtensionPackIds = (input.contract.extensions ? Object.keys(input.contract.extensions) : []).filter((id) => !providedIds.has(id));\n\tconst expectedTargetFamily = input.expectedTargetFamily;\n\tconst contractTargetFamily = input.contract.targetFamily;\n\tconst familyMismatch = expectedTargetFamily !== void 0 && contractTargetFamily !== void 0 && contractTargetFamily !== expectedTargetFamily ? {\n\t\texpected: expectedTargetFamily,\n\t\tactual: contractTargetFamily\n\t} : void 0;\n\tconst expectedTargetId = input.expectedTargetId;\n\tconst contractTargetId = input.contract.target;\n\tconst targetMismatch = expectedTargetId !== void 0 && contractTargetId !== expectedTargetId ? {\n\t\texpected: expectedTargetId,\n\t\tactual: contractTargetId\n\t} : void 0;\n\treturn {\n\t\t...familyMismatch ? { familyMismatch } : {},\n\t\t...targetMismatch ? { targetMismatch } : {},\n\t\tmissingExtensionPackIds\n\t};\n}\n//#endregion\nexport { checkContractComponentRequirements as t };\n\n//# sourceMappingURL=framework-components-D6j4Y5K7.mjs.map"],"mappings":";AACA,SAAS,mCAAmC,OAAO;CAClD,MAAM,8BAA8B,IAAI,IAAI;CAC5C,KAAK,MAAM,MAAM,MAAM,sBAAsB,YAAY,IAAI,EAAE;CAC/D,MAAM,2BAA2B,MAAM,SAAS,aAAa,OAAO,KAAK,MAAM,SAAS,UAAU,IAAI,CAAC,EAAA,CAAG,QAAQ,OAAO,CAAC,YAAY,IAAI,EAAE,CAAC;CAC7I,MAAM,uBAAuB,MAAM;CACnC,MAAM,uBAAuB,MAAM,SAAS;CAC5C,MAAM,iBAAiB,yBAAyB,KAAK,KAAK,yBAAyB,KAAK,KAAK,yBAAyB,uBAAuB;EAC5I,UAAU;EACV,QAAQ;CACT,IAAI,KAAK;CACT,MAAM,mBAAmB,MAAM;CAC/B,MAAM,mBAAmB,MAAM,SAAS;CACxC,MAAM,iBAAiB,qBAAqB,KAAK,KAAK,qBAAqB,mBAAmB;EAC7F,UAAU;EACV,QAAQ;CACT,IAAI,KAAK;CACT,OAAO;EACN,GAAG,iBAAiB,EAAE,eAAe,IAAI,CAAC;EAC1C,GAAG,iBAAiB,EAAE,eAAe,IAAI,CAAC;EAC1C;CACD;AACD"}
@@ -0,0 +1,388 @@
1
+ import { M as ExecutionMutationDefaultPhases, N as ExecutionMutationDefaultValue, a as ColumnDefault } from "./domain-envelope-D6Wn9AmZ-BqZKTT9U.mjs";
2
+ import { t as AnyCodecDescriptor } from "./codec-types-XJO6eC9U-B_K2q0zm.mjs";
3
+ import { i as AuthoringContributions } from "./framework-authoring-7YMP9TwM-C9P-N6_a.mjs";
4
+ import { t as TypesImportSpec } from "./types-import-spec-DRKzrJ20-WYwyCtil.mjs";
5
+ //#region ../../../1-framework/1-core/framework-components/dist/framework-components-MFoo0sYx.d.mts
6
+ //#region src/shared/mutation-default-types.d.ts
7
+ interface SourcePosition {
8
+ readonly offset: number;
9
+ readonly line: number;
10
+ readonly column: number;
11
+ }
12
+ interface SourceSpan {
13
+ readonly start: SourcePosition;
14
+ readonly end: SourcePosition;
15
+ }
16
+ interface SourceDiagnostic {
17
+ readonly code: string;
18
+ readonly message: string;
19
+ readonly sourceId?: string;
20
+ readonly span?: SourceSpan;
21
+ readonly data?: Readonly<Record<string, unknown>>;
22
+ }
23
+ interface DefaultFunctionLoweringContext {
24
+ readonly sourceId: string;
25
+ readonly modelName: string;
26
+ readonly fieldName: string;
27
+ readonly columnCodecId?: string;
28
+ }
29
+ type LoweredDefaultValue = {
30
+ readonly kind: 'storage';
31
+ readonly defaultValue: ColumnDefault;
32
+ } | {
33
+ readonly kind: 'execution';
34
+ readonly generated: ExecutionMutationDefaultValue;
35
+ };
36
+ type LoweredDefaultResult = {
37
+ readonly ok: true;
38
+ readonly value: LoweredDefaultValue;
39
+ } | {
40
+ readonly ok: false;
41
+ readonly diagnostic: SourceDiagnostic;
42
+ };
43
+ interface MutationDefaultGeneratorDescriptor {
44
+ readonly id: string;
45
+ /**
46
+ * Codec ids the generator is compatible with when the codec choice
47
+ * and the generator choice are made independently by the contract
48
+ * author. Set when the registry-coherence check is meaningful
49
+ * (the codec and the generator can be paired arbitrarily by the
50
+ * caller); omitted when the generator is only reachable through a
51
+ * descriptor that co-registers a fixed codec, so coherence is
52
+ * structural and the list would be tautological.
53
+ */
54
+ readonly applicableCodecIds?: readonly string[];
55
+ /**
56
+ * Construct the `onCreate`/`onUpdate` phases value owned by this
57
+ * generator. Authoring layers (PSL `temporal.updatedAt()`, TS field presets) call
58
+ * this instead of building the literal inline so PSL/TS-authored
59
+ * contracts stay byte-equivalent for any future params-bearing generator.
60
+ */
61
+ readonly buildPhases?: (args?: Record<string, unknown>) => ExecutionMutationDefaultPhases;
62
+ }
63
+ interface TypedDefaultFunctionCall {
64
+ readonly fn: string;
65
+ readonly span: SourceSpan;
66
+ readonly args: Readonly<Record<string, unknown>>;
67
+ }
68
+ interface ControlMutationDefaultEntry {
69
+ readonly signature?: unknown;
70
+ readonly lower: (input: {
71
+ readonly call: TypedDefaultFunctionCall;
72
+ readonly context: DefaultFunctionLoweringContext;
73
+ }) => LoweredDefaultResult;
74
+ readonly usageSignatures?: readonly string[];
75
+ }
76
+ type ControlMutationDefaultRegistry = ReadonlyMap<string, ControlMutationDefaultEntry>;
77
+ interface ControlMutationDefaults {
78
+ readonly defaultFunctionRegistry: ControlMutationDefaultRegistry;
79
+ readonly generatorDescriptors: readonly MutationDefaultGeneratorDescriptor[];
80
+ }
81
+ //#endregion
82
+ //#region src/shared/framework-components.d.ts
83
+ /**
84
+ * Declarative fields that describe component metadata.
85
+ */
86
+ interface ComponentMetadata {
87
+ /** Component version (semver) */
88
+ readonly version: string;
89
+ /**
90
+ * Capabilities this component provides.
91
+ *
92
+ * For adapters, capabilities must be declared on the adapter descriptor (so they are emitted into the contract) and also exposed in runtime adapter code (e.g. `adapter.profile.capabilities`); keep these declarations in sync. Targets are identifiers/descriptors and typically do not declare capabilities.
93
+ */
94
+ readonly capabilities?: Record<string, unknown>;
95
+ /** Type imports for contract.d.ts generation */
96
+ readonly types?: {
97
+ readonly codecTypes?: {
98
+ /**
99
+ * Base codec types import spec. Optional: adapters typically provide this, extensions usually don't.
100
+ */
101
+ readonly import?: TypesImportSpec;
102
+ /**
103
+ * Additional type-only imports for parameterized codec branded types.
104
+ *
105
+ * These imports are included in generated `contract.d.ts` but are NOT treated as codec type maps (i.e., they should not be intersected into `export type CodecTypes = ...`).
106
+ *
107
+ * Example: `Vector<N>` for pgvector codecs that emit `Vector<1536>`
108
+ */
109
+ readonly typeImports?: ReadonlyArray<TypesImportSpec>;
110
+ /**
111
+ * Optional control-plane hooks keyed by codecId. Used by family-specific planners/verifiers to handle storage types.
112
+ */
113
+ readonly controlPlaneHooks?: Record<string, unknown>;
114
+ /**
115
+ * Codec descriptors contributed by this component. Source of truth for codec-id-keyed metadata (`traits`, `targetTypes`, `renderOutputType`) consumed by `extractCodecLookup`, and used to materialize representative `Codec` instances for codec-dispatched type rendering during emission.
116
+ */
117
+ readonly codecDescriptors?: ReadonlyArray<AnyCodecDescriptor>;
118
+ };
119
+ readonly queryOperationTypes?: {
120
+ readonly import: TypesImportSpec;
121
+ };
122
+ readonly storage?: ReadonlyArray<{
123
+ readonly typeId: string;
124
+ readonly familyId: string;
125
+ readonly targetId: string;
126
+ readonly nativeType?: string;
127
+ }>;
128
+ };
129
+ /**
130
+ * Optional pure-data authoring contributions exposed by this component.
131
+ *
132
+ * These contributions are safe to include on pack refs and descriptors because they contain only declarative metadata. Higher-level authoring packages may project them into concrete helper functions for TS-first workflows.
133
+ */
134
+ readonly authoring?: AuthoringContributions;
135
+ /**
136
+ * Mutation default function handlers and generator descriptors contributed by this component. Assembled by `createControlStack` with duplicate detection.
137
+ */
138
+ readonly controlMutationDefaults?: ControlMutationDefaults;
139
+ }
140
+ /**
141
+ * Base descriptor for any framework component.
142
+ *
143
+ * All component descriptors share these fundamental properties that identify the component and provide its metadata. This interface is extended by specific descriptor types (FamilyDescriptor, TargetDescriptor, etc.).
144
+ *
145
+ * @template Kind - Discriminator literal identifying the component type. Built-in kinds are 'family', 'target', 'adapter', 'driver', 'extension', but the type accepts any string to allow ecosystem extensions.
146
+ *
147
+ * @example
148
+ * ```ts
149
+ * // All descriptors have these properties
150
+ * descriptor.kind // The Kind type parameter (e.g., 'family', 'target', or custom kinds)
151
+ * descriptor.id // Unique string identifier (e.g., 'sql', 'postgres')
152
+ * descriptor.version // Component version (semver)
153
+ * ```
154
+ */
155
+ interface ComponentDescriptor<Kind extends string> extends ComponentMetadata {
156
+ /** Discriminator identifying the component type */
157
+ readonly kind: Kind;
158
+ /** Unique identifier for this component (e.g., 'sql', 'postgres', 'pgvector') */
159
+ readonly id: string;
160
+ }
161
+ interface ContractComponentRequirementsCheckInput {
162
+ readonly contract: {
163
+ readonly target: string;
164
+ readonly targetFamily?: string | undefined;
165
+ readonly extensions?: Record<string, unknown> | undefined;
166
+ };
167
+ readonly expectedTargetFamily?: string | undefined;
168
+ readonly expectedTargetId?: string | undefined;
169
+ readonly providedComponentIds: Iterable<string>;
170
+ }
171
+ interface ContractComponentRequirementsCheckResult {
172
+ readonly familyMismatch?: {
173
+ readonly expected: string;
174
+ readonly actual: string;
175
+ } | undefined;
176
+ readonly targetMismatch?: {
177
+ readonly expected: string;
178
+ readonly actual: string;
179
+ } | undefined;
180
+ readonly missingExtensionPackIds: readonly string[];
181
+ }
182
+ declare function checkContractComponentRequirements(input: ContractComponentRequirementsCheckInput): ContractComponentRequirementsCheckResult;
183
+ /**
184
+ * Descriptor for a family component.
185
+ *
186
+ * A "family" represents a category of data sources with shared semantics (e.g., SQL databases, document stores). Families define:
187
+ * - Query semantics and operations (SELECT, INSERT, find, aggregate, etc.)
188
+ * - Contract structure (tables vs collections, columns vs fields)
189
+ * - Type system and codecs
190
+ *
191
+ * Families are the top-level grouping. Each family contains multiple targets (e.g., SQL family contains Postgres, MySQL, SQLite targets).
192
+ *
193
+ * Extended by plane-specific descriptors:
194
+ * - `ControlFamilyDescriptor` - adds `emission` for CLI/tooling operations
195
+ * - `RuntimeFamilyDescriptor` - adds runtime-specific factory methods
196
+ *
197
+ * @template TFamilyId - Literal type for the family identifier (e.g., 'sql', 'document')
198
+ *
199
+ * @example
200
+ * ```ts
201
+ * import sql from '@internal/family-sql/control';
202
+ *
203
+ * sql.kind // 'family'
204
+ * sql.familyId // 'sql'
205
+ * sql.id // 'sql'
206
+ * ```
207
+ */
208
+ interface FamilyDescriptor<TFamilyId extends string> extends ComponentDescriptor<'family'> {
209
+ /** The family identifier (e.g., 'sql', 'document') */
210
+ readonly familyId: TFamilyId;
211
+ }
212
+ /**
213
+ * Descriptor for a target component.
214
+ *
215
+ * A "target" represents a specific database or data store within a family (e.g., Postgres, MySQL, MongoDB). Targets define:
216
+ * - Native type mappings (e.g., Postgres int4 → TypeScript number)
217
+ * - Target-specific capabilities (e.g., RETURNING, LATERAL joins)
218
+ *
219
+ * Targets are bound to a family and provide the target-specific implementation details that adapters and drivers use.
220
+ *
221
+ * Extended by plane-specific descriptors:
222
+ * - `ControlTargetDescriptor` - adds optional `migrations` capability
223
+ * - `RuntimeTargetDescriptor` - adds runtime factory method
224
+ *
225
+ * @template TFamilyId - Literal type for the family identifier
226
+ * @template TTargetId - Literal type for the target identifier (e.g., 'postgres', 'mysql')
227
+ *
228
+ * @example
229
+ * ```ts
230
+ * import postgres from '@internal/target-postgres/control';
231
+ *
232
+ * postgres.kind // 'target'
233
+ * postgres.familyId // 'sql'
234
+ * postgres.targetId // 'postgres'
235
+ * ```
236
+ */
237
+ interface TargetDescriptor<TFamilyId extends string, TTargetId extends string> extends ComponentDescriptor<'target'> {
238
+ /** The family this target belongs to */
239
+ readonly familyId: TFamilyId;
240
+ /** The target identifier (e.g., 'postgres', 'mysql', 'mongodb') */
241
+ readonly targetId: TTargetId;
242
+ }
243
+ /**
244
+ * Base shape for any pack reference. Pack refs are pure JSON-friendly objects safe to import in authoring flows.
245
+ */
246
+ interface PackRefBase<Kind extends string, TFamilyId extends string> extends ComponentMetadata {
247
+ readonly kind: Kind;
248
+ readonly id: string;
249
+ readonly familyId: TFamilyId;
250
+ readonly targetId?: string;
251
+ readonly authoring?: AuthoringContributions;
252
+ }
253
+ type FamilyPackRef<TFamilyId extends string = string> = PackRefBase<'family', TFamilyId>;
254
+ type TargetPackRef<TFamilyId extends string = string, TTargetId extends string = string> = PackRefBase<'target', TFamilyId> & {
255
+ readonly targetId: TTargetId;
256
+ /** The namespace a bare (un-namespaced) entity name resolves to for this target (e.g. Postgres `'public'`). */
257
+ readonly defaultNamespaceId: string;
258
+ };
259
+ type AdapterPackRef<TFamilyId extends string = string, TTargetId extends string = string> = PackRefBase<'adapter', TFamilyId> & {
260
+ readonly targetId: TTargetId;
261
+ };
262
+ type ExtensionPackRef<TFamilyId extends string = string, TTargetId extends string = string> = PackRefBase<'extension', TFamilyId> & {
263
+ readonly targetId: TTargetId;
264
+ };
265
+ type DriverPackRef<TFamilyId extends string = string, TTargetId extends string = string> = PackRefBase<'driver', TFamilyId> & {
266
+ readonly targetId: TTargetId;
267
+ };
268
+ /**
269
+ * Descriptor for an adapter component.
270
+ *
271
+ * An "adapter" provides the protocol and dialect implementation for a target. Adapters handle:
272
+ * - SQL/query generation (lowering AST to target-specific syntax)
273
+ * - Codec registration (encoding/decoding between JS and wire types)
274
+ * - Type mappings and coercions
275
+ *
276
+ * Adapters are bound to a specific family+target combination and work with any compatible driver for that target.
277
+ *
278
+ * Extended by plane-specific descriptors:
279
+ * - `ControlAdapterDescriptor` - control-plane factory
280
+ * - `RuntimeAdapterDescriptor` - runtime factory
281
+ *
282
+ * @template TFamilyId - Literal type for the family identifier
283
+ * @template TTargetId - Literal type for the target identifier
284
+ *
285
+ * @example
286
+ * ```ts
287
+ * import postgresAdapter from '@internal/adapter-postgres/control';
288
+ *
289
+ * postgresAdapter.kind // 'adapter'
290
+ * postgresAdapter.familyId // 'sql'
291
+ * postgresAdapter.targetId // 'postgres'
292
+ * ```
293
+ */
294
+ interface AdapterDescriptor<TFamilyId extends string, TTargetId extends string> extends ComponentDescriptor<'adapter'> {
295
+ /** The family this adapter belongs to */
296
+ readonly familyId: TFamilyId;
297
+ /** The target this adapter is designed for */
298
+ readonly targetId: TTargetId;
299
+ }
300
+ /**
301
+ * Descriptor for a driver component.
302
+ *
303
+ * A "driver" provides the connection and execution layer for a target. Drivers handle:
304
+ * - Connection management (pooling, timeouts, retries)
305
+ * - Query execution (sending SQL/commands, receiving results)
306
+ * - Transaction management
307
+ * - Wire protocol communication
308
+ *
309
+ * Drivers are bound to a specific family+target and work with any compatible adapter. Multiple drivers can exist for the same target (e.g., node-postgres vs postgres.js for Postgres).
310
+ *
311
+ * Extended by plane-specific descriptors:
312
+ * - `ControlDriverDescriptor` - creates driver from connection URL
313
+ * - `RuntimeDriverDescriptor` - creates driver with runtime options
314
+ *
315
+ * @template TFamilyId - Literal type for the family identifier
316
+ * @template TTargetId - Literal type for the target identifier
317
+ *
318
+ * @example
319
+ * ```ts
320
+ * import postgresDriver from '@internal/driver-postgres/control';
321
+ *
322
+ * postgresDriver.kind // 'driver'
323
+ * postgresDriver.familyId // 'sql'
324
+ * postgresDriver.targetId // 'postgres'
325
+ * ```
326
+ */
327
+ interface DriverDescriptor<TFamilyId extends string, TTargetId extends string> extends ComponentDescriptor<'driver'> {
328
+ /** The family this driver belongs to */
329
+ readonly familyId: TFamilyId;
330
+ /** The target this driver connects to */
331
+ readonly targetId: TTargetId;
332
+ }
333
+ /**
334
+ * Descriptor for an extension component.
335
+ *
336
+ * An "extension" adds optional capabilities to a target. Extensions can provide:
337
+ * - Additional operations (e.g., vector similarity search with pgvector)
338
+ * - Custom types and codecs (e.g., vector type)
339
+ * - Extended query capabilities
340
+ *
341
+ * Extensions are bound to a specific family+target and are registered in the config alongside the core components. Multiple extensions can be used together.
342
+ *
343
+ * Extended by plane-specific descriptors:
344
+ * - `ControlExtensionDescriptor` - control-plane extension factory
345
+ * - `RuntimeExtensionDescriptor` - runtime extension factory
346
+ *
347
+ * @template TFamilyId - Literal type for the family identifier
348
+ * @template TTargetId - Literal type for the target identifier
349
+ *
350
+ * @example
351
+ * ```ts
352
+ * import pgvector from '@internal/extension-pgvector/control';
353
+ *
354
+ * pgvector.kind // 'extension'
355
+ * pgvector.familyId // 'sql'
356
+ * pgvector.targetId // 'postgres'
357
+ * ```
358
+ */
359
+ interface ExtensionDescriptor<TFamilyId extends string, TTargetId extends string> extends ComponentDescriptor<'extension'> {
360
+ /** The family this extension belongs to */
361
+ readonly familyId: TFamilyId;
362
+ /** The target this extension is designed for */
363
+ readonly targetId: TTargetId;
364
+ }
365
+ /** Components bound to a specific family+target combination. */
366
+ type TargetBoundComponentDescriptor<TFamilyId extends string, TTargetId extends string> = TargetDescriptor<TFamilyId, TTargetId> | AdapterDescriptor<TFamilyId, TTargetId> | DriverDescriptor<TFamilyId, TTargetId> | ExtensionDescriptor<TFamilyId, TTargetId>;
367
+ interface FamilyInstance<TFamilyId extends string> {
368
+ readonly familyId: TFamilyId;
369
+ }
370
+ interface TargetInstance<TFamilyId extends string, TTargetId extends string> {
371
+ readonly familyId: TFamilyId;
372
+ readonly targetId: TTargetId;
373
+ }
374
+ interface AdapterInstance<TFamilyId extends string, TTargetId extends string> {
375
+ readonly familyId: TFamilyId;
376
+ readonly targetId: TTargetId;
377
+ }
378
+ interface DriverInstance<TFamilyId extends string, TTargetId extends string> {
379
+ readonly familyId: TFamilyId;
380
+ readonly targetId: TTargetId;
381
+ }
382
+ interface ExtensionInstance<TFamilyId extends string, TTargetId extends string> {
383
+ readonly familyId: TFamilyId;
384
+ readonly targetId: TTargetId;
385
+ }
386
+ //#endregion
387
+ export { TargetPackRef as A, MutationDefaultGeneratorDescriptor as C, TargetBoundComponentDescriptor as D, SourceSpan as E, checkContractComponentRequirements as M, TargetDescriptor as O, LoweredDefaultValue as S, SourceDiagnostic as T, ExtensionPackRef as _, ComponentMetadata as a, FamilyPackRef as b, ControlMutationDefaultEntry as c, DefaultFunctionLoweringContext as d, DriverDescriptor as f, ExtensionInstance as g, ExtensionDescriptor as h, ComponentDescriptor as i, TypedDefaultFunctionCall as j, TargetInstance as k, ControlMutationDefaultRegistry as l, DriverPackRef as m, AdapterInstance as n, ContractComponentRequirementsCheckInput as o, DriverInstance as p, AdapterPackRef as r, ContractComponentRequirementsCheckResult as s, AdapterDescriptor as t, ControlMutationDefaults as u, FamilyDescriptor as v, PackRefBase as w, LoweredDefaultResult as x, FamilyInstance as y };
388
+ //# sourceMappingURL=framework-components-MFoo0sYx-G_6k9jt4.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"framework-components-MFoo0sYx-G_6k9jt4.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/framework-components-MFoo0sYx.d.mts"],"mappings":";;;;;;UAKU;WACC;WACA;WACA;;UAED;WACC,OAAO;WACP,KAAK;;UAEN;WACC;WACA;WACA;WACA,OAAO;WACP,OAAO,SAAS;;UAEjB;WACC;WACA;WACA;WACA;;KAEN;WACM;WACA,cAAc;;WAEd;WACA,WAAW;;KAEjB;WACM;WACA,OAAO;;WAEP;WACA,YAAY;;UAEb;WACC;;;;;;;;;;WAUA;;;;;;;WAOA,eAAe,OAAO,4BAA4B;;UAEnD;WACC;WACA,MAAM;WACN,MAAM,SAAS;;UAEhB;WACC;WACA,QAAQ;aACN,MAAM;aACN,SAAS;QACd;WACG;;KAEN,iCAAiC,oBAAoB;UAChD;WACC,yBAAyB;WACzB,+BAA+B;;;;;;;UAOhC;;WAEC;;;;;;WAMA,eAAe;;WAEf;aACE;;;;eAIE,SAAS;;;;;;;;eAQT,cAAc,cAAc;;;;eAI5B,oBAAoB;;;;eAIpB,mBAAmB,cAAc;;aAEnC;e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gBAAgB,0BAA0B;WACzC,UAAU;WACV,UAAU;;UAEX,eAAe,0BAA0B;WACxC,UAAU;WACV,UAAU;;UAEX,kBAAkB,0BAA0B;WAC3C,UAAU;WACV,UAAU"}
@@ -0,0 +1,63 @@
1
+ //#region ../../../1-framework/0-foundation/utils/dist/hash-content.mjs
2
+ /**
3
+ * Hashes a canonical-string representation of an execution into a bounded,
4
+ * opaque cache-key digest.
5
+ *
6
+ * Designed for use as the final step of `RuntimeMiddlewareContext.contentHash`
7
+ * implementations: family runtimes compose a canonical string from
8
+ * `meta.storageHash`, the rendered statement (or wire command), and
9
+ * canonicalized parameters via `canonicalStringify`, then pipe the result
10
+ * through this helper.
11
+ *
12
+ * Why hash the canonical string instead of using it directly as a `Map` key:
13
+ *
14
+ * 1. **Bounded memory.** A raw canonical key includes concrete parameter
15
+ * values, so a query bound to a 10 MB JSON column or binary blob produces
16
+ * a 10 MB cache key. With `maxEntries = 1000`, that scales to gigabytes
17
+ * of cache keys alone. SHA-512 pins per-key cost at a fixed digest
18
+ * length regardless of input size.
19
+ *
20
+ * 2. **Sensitive-data isolation.** The canonical string contains parameter
21
+ * values verbatim. Cache keys flow into debug logs, Redis `KEYS`/`MONITOR`
22
+ * output, persistence dumps, monitoring tools, and any user-supplied
23
+ * `CacheStore` implementation. Hashing prevents PII / credentials /
24
+ * tokens that appear in query parameters from showing up in any of those
25
+ * surfaces.
26
+ *
27
+ * Algorithm choice — SHA-512 (`SHA-512` via the WebCrypto API):
28
+ *
29
+ * - **Portability.** WebCrypto (`globalThis.crypto.subtle`) is available in
30
+ * every modern JavaScript runtime — Node, Deno, Bun, browsers, edge
31
+ * workers — without importing a Node-specific module. This keeps the
32
+ * helper usable in non-Node hosts where `node:crypto` is not available.
33
+ * - **Collision space.** 512 bits of output makes accidental collisions
34
+ * astronomically improbable — far beyond what a cache needs, but the
35
+ * incremental cost over 256-bit output is negligible and the headroom
36
+ * is free.
37
+ * - **No additional dependency.** SHA-512 is part of the WebCrypto standard
38
+ * set of digest algorithms; no third-party package needed.
39
+ *
40
+ * The function is `async` because the WebCrypto digest API is async by
41
+ * design. Callers must await the result.
42
+ *
43
+ * Output format: `sha512:HEXDIGEST` (128-char hex with the algorithm tag
44
+ * prefix). Self-describing so a future migration to a different hash
45
+ * produces visibly distinct keys. This in-memory cache key deliberately
46
+ * keeps its tag — unlike persisted contract hashes, which are bare hex.
47
+ *
48
+ * @example
49
+ * ```typescript
50
+ * const canonical = `${exec.meta.storageHash}|${exec.sql}|${canonicalStringify(exec.params)}`;
51
+ * return await hashContent(canonical);
52
+ * // → 'sha512:8f3...e1c' (always 135 chars: 'sha512:' + 128 hex chars)
53
+ * ```
54
+ */
55
+ async function hashContent(value) {
56
+ const bytes = new TextEncoder().encode(value);
57
+ const digest = await crypto.subtle.digest("SHA-512", bytes);
58
+ return `sha512:${Array.from(new Uint8Array(digest), (b) => b.toString(16).padStart(2, "0")).join("")}`;
59
+ }
60
+ //#endregion
61
+ export { hashContent as t };
62
+
63
+ //# sourceMappingURL=hash-content-Bugg_nZn.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash-content-Bugg_nZn.mjs","names":[],"sources":["../../../../1-framework/0-foundation/utils/dist/hash-content.mjs"],"sourcesContent":["//#region src/hash-content.ts\n/**\n* Hashes a canonical-string representation of an execution into a bounded,\n* opaque cache-key digest.\n*\n* Designed for use as the final step of `RuntimeMiddlewareContext.contentHash`\n* implementations: family runtimes compose a canonical string from\n* `meta.storageHash`, the rendered statement (or wire command), and\n* canonicalized parameters via `canonicalStringify`, then pipe the result\n* through this helper.\n*\n* Why hash the canonical string instead of using it directly as a `Map` key:\n*\n* 1. **Bounded memory.** A raw canonical key includes concrete parameter\n* values, so a query bound to a 10 MB JSON column or binary blob produces\n* a 10 MB cache key. With `maxEntries = 1000`, that scales to gigabytes\n* of cache keys alone. SHA-512 pins per-key cost at a fixed digest\n* length regardless of input size.\n*\n* 2. **Sensitive-data isolation.** The canonical string contains parameter\n* values verbatim. Cache keys flow into debug logs, Redis `KEYS`/`MONITOR`\n* output, persistence dumps, monitoring tools, and any user-supplied\n* `CacheStore` implementation. Hashing prevents PII / credentials /\n* tokens that appear in query parameters from showing up in any of those\n* surfaces.\n*\n* Algorithm choice — SHA-512 (`SHA-512` via the WebCrypto API):\n*\n* - **Portability.** WebCrypto (`globalThis.crypto.subtle`) is available in\n* every modern JavaScript runtime — Node, Deno, Bun, browsers, edge\n* workers — without importing a Node-specific module. This keeps the\n* helper usable in non-Node hosts where `node:crypto` is not available.\n* - **Collision space.** 512 bits of output makes accidental collisions\n* astronomically improbable — far beyond what a cache needs, but the\n* incremental cost over 256-bit output is negligible and the headroom\n* is free.\n* - **No additional dependency.** SHA-512 is part of the WebCrypto standard\n* set of digest algorithms; no third-party package needed.\n*\n* The function is `async` because the WebCrypto digest API is async by\n* design. Callers must await the result.\n*\n* Output format: `sha512:HEXDIGEST` (128-char hex with the algorithm tag\n* prefix). Self-describing so a future migration to a different hash\n* produces visibly distinct keys. This in-memory cache key deliberately\n* keeps its tag — unlike persisted contract hashes, which are bare hex.\n*\n* @example\n* ```typescript\n* const canonical = `${exec.meta.storageHash}|${exec.sql}|${canonicalStringify(exec.params)}`;\n* return await hashContent(canonical);\n* // → 'sha512:8f3...e1c' (always 135 chars: 'sha512:' + 128 hex chars)\n* ```\n*/\nasync function hashContent(value) {\n\tconst bytes = new TextEncoder().encode(value);\n\tconst digest = await crypto.subtle.digest(\"SHA-512\", bytes);\n\treturn `sha512:${Array.from(new Uint8Array(digest), (b) => b.toString(16).padStart(2, \"0\")).join(\"\")}`;\n}\n//#endregion\nexport { hashContent };\n\n//# sourceMappingURL=hash-content.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsDA,eAAe,YAAY,OAAO;CACjC,MAAM,QAAQ,IAAI,YAAY,CAAC,CAAC,OAAO,KAAK;CAC5C,MAAM,SAAS,MAAM,OAAO,OAAO,OAAO,WAAW,KAAK;CAC1D,OAAO,UAAU,MAAM,KAAK,IAAI,WAAW,MAAM,IAAI,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE;AACpG"}