@prisma/orm-framework 0.16.0-dev.36

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 +114 -0
@@ -0,0 +1,777 @@
1
+ import { M as ExecutionMutationDefaultPhases, a as ColumnDefault } from "./domain-envelope-D6Wn9AmZ-BqZKTT9U.mjs";
2
+ import { c as CodecLookup } from "./codec-types-XJO6eC9U-B_K2q0zm.mjs";
3
+ import { Type } from "arktype";
4
+ //#region ../../../1-framework/1-core/framework-components/dist/framework-authoring-7YMP9TwM.d.mts
5
+ //#region src/shared/option-descriptor.d.ts
6
+ /**
7
+ * An enumerated-value parameter: the author supplies one of `values`, spelled
8
+ * as a bare token in PSL and a string literal in TypeScript. Shared by the
9
+ * extension-block parameter vocabulary (`PslBlockParamOption`) and the helper
10
+ * argument vocabulary (`AuthoringArgumentDescriptor`) so the option concept is
11
+ * declared once. See ADR 239.
12
+ */
13
+ interface AuthoringOption {
14
+ readonly kind: 'option';
15
+ readonly values: readonly string[];
16
+ }
17
+ //#endregion
18
+ //#region src/shared/psl-extension-block.d.ts
19
+ interface PslPosition {
20
+ readonly offset: number;
21
+ readonly line: number;
22
+ readonly column: number;
23
+ }
24
+ interface PslSpan {
25
+ readonly start: PslPosition;
26
+ readonly end: PslPosition;
27
+ }
28
+ type PslDiagnosticCode = 'PSL_UNTERMINATED_BLOCK' | 'PSL_UNSUPPORTED_TOP_LEVEL_BLOCK' | 'PSL_INVALID_NAMESPACE_BLOCK' | 'PSL_INVALID_ATTRIBUTE_SYNTAX' | 'PSL_INVALID_MODEL_MEMBER' | 'PSL_UNSUPPORTED_MODEL_ATTRIBUTE' | 'PSL_UNSUPPORTED_FIELD_ATTRIBUTE' | 'PSL_INVALID_RELATION_ATTRIBUTE' | 'PSL_INVALID_REFERENTIAL_ACTION' | 'PSL_INVALID_DEFAULT_VALUE' | 'PSL_INVALID_ENUM_MEMBER' | 'PSL_INVALID_TYPES_MEMBER' | 'PSL_INVALID_QUALIFIED_TYPE' |
29
+ /**
30
+ * A qualified name (e.g. a dotted type or attribute reference) is structurally
31
+ * invalid, such as an over-qualified or trailing-separator name.
32
+ */
33
+ 'PSL_INVALID_QUALIFIED_NAME' |
34
+ /**
35
+ * A reserved declaration keyword (`model`/`enum`/`namespace`/`type`) that
36
+ * committed the declaration kind on the keyword alone but is missing its name
37
+ * and/or opening brace. The recursive-descent parser produces a best-effort
38
+ * typed node for the malformed header and reports this code rather than
39
+ * `PSL_UNSUPPORTED_TOP_LEVEL_BLOCK`, which is reserved for a genuinely unknown
40
+ * top-level keyword.
41
+ */
42
+ 'PSL_INVALID_DECLARATION' |
43
+ /**
44
+ * A malformed line inside an extension-contributed top-level block body, or
45
+ * a structurally invalid element inside a `list` parameter value.
46
+ *
47
+ * Replaces the overloaded `PSL_UNSUPPORTED_TOP_LEVEL_BLOCK` code that the
48
+ * generic framework parser previously used for these two parse-error sites
49
+ * inside extension blocks — keeping `PSL_UNSUPPORTED_TOP_LEVEL_BLOCK` for
50
+ * its original meaning (an unknown keyword at the top level) and giving
51
+ * extension-block parse errors their own code.
52
+ */
53
+ 'PSL_INVALID_EXTENSION_BLOCK_MEMBER' |
54
+ /**
55
+ * A malformed JS-like object literal `{ key: value, … }` in value/argument
56
+ * position — a field missing its `:`, a field missing its value, or an
57
+ * unterminated `{`. The recursive-descent parser still produces a best-effort
58
+ * `ObjectLiteralExpr` node (preserving the lossless round-trip) and reports
59
+ * this code anchored on the offending token.
60
+ */
61
+ 'PSL_INVALID_OBJECT_LITERAL' |
62
+ /**
63
+ * A string literal with no closing quote — the tokenizer stops the literal at
64
+ * a newline or at EOF when no terminating `"` is found, and the
65
+ * recursive-descent parser still consumes the token (preserving the lossless
66
+ * round-trip) but reports this code anchored on the string token's span.
67
+ */
68
+ 'PSL_UNTERMINATED_STRING' |
69
+ /**
70
+ * An unknown parameter key in an extension-contributed block — a key present
71
+ * in the source block but absent from the descriptor's `parameters` map.
72
+ */
73
+ 'PSL_EXTENSION_UNKNOWN_PARAMETER' |
74
+ /**
75
+ * A required parameter declared in the descriptor is absent from the parsed block.
76
+ */
77
+ 'PSL_EXTENSION_MISSING_REQUIRED_PARAMETER' |
78
+ /**
79
+ * An `option`-kind parameter value is not one of the allowed tokens listed
80
+ * in the descriptor's `values` array.
81
+ */
82
+ 'PSL_EXTENSION_OPTION_OUT_OF_SET' |
83
+ /**
84
+ * A `value`-kind parameter's raw text is not a valid JSON literal, or the
85
+ * parsed JSON value was rejected by the codec's `decodeJson` method, or the
86
+ * codec id is not registered in the lookup.
87
+ */
88
+ 'PSL_EXTENSION_INVALID_VALUE' |
89
+ /**
90
+ * A `ref`-kind parameter identifier does not resolve to a declared entity of
91
+ * the required `refKind` within the declared scope.
92
+ */
93
+ 'PSL_EXTENSION_UNRESOLVED_REF' |
94
+ /**
95
+ * A parameter key appears more than once in an extension block body.
96
+ * The first occurrence is kept; subsequent occurrences emit this diagnostic.
97
+ */
98
+ 'PSL_EXTENSION_DUPLICATE_PARAMETER' |
99
+ /**
100
+ * A `@@`-prefixed block-attribute line inside an extension block has invalid syntax.
101
+ */
102
+ 'PSL_INVALID_EXTENSION_BLOCK_ATTRIBUTE' |
103
+ /**
104
+ * Duplicate scopes are top level, namespace body, or block fields; diagnostics
105
+ * are first-wins and anchored on later name spans.
106
+ */
107
+ 'PSL_DUPLICATE_DECLARATION';
108
+ /**
109
+ * A PSL diagnostic code contributed by a family or target package (e.g. an
110
+ * attribute-spec refine in a family's authoring layer). The framework union
111
+ * above stays the parser's own vocabulary; contributed codes share the
112
+ * `PSL_` pattern but their names are owned by the contributing package —
113
+ * no family or target vocabulary enters this module. Contributed codes
114
+ * must not reuse a framework code name; pick a domain-scoped prefix
115
+ * segment (e.g. `PSL_INDEX_`, `PSL_POLICY_`) to keep the namespaces
116
+ * collision-free.
117
+ */
118
+ type ContributedPslDiagnosticCode = `PSL_${string}`;
119
+ /**
120
+ * Descriptor vocabulary for a single parameter on a declared block.
121
+ *
122
+ * Four kinds:
123
+ * - `ref` — the parameter value is an identifier that must resolve to a
124
+ * declared entity of `refKind` within the declared `scope`.
125
+ * - `value` — the parameter value is a PSL literal parsed and printed
126
+ * through the codec identified by `codecId`.
127
+ * - `option` — the parameter value is one of the literal tokens in `values`.
128
+ * Not a codec; not persisted data. A closed authoring-time constraint only.
129
+ * - `list` — a bracketed list whose elements each match the `of` descriptor.
130
+ */
131
+ type PslBlockParam = PslBlockParamRef | PslBlockParamValue | PslBlockParamOption | PslBlockParamList;
132
+ interface PslBlockParamRef {
133
+ readonly kind: 'ref';
134
+ readonly refKind: string;
135
+ readonly scope: 'same-namespace' | 'same-space' | 'cross-space';
136
+ readonly required?: boolean;
137
+ }
138
+ interface PslBlockParamValue {
139
+ readonly kind: 'value';
140
+ readonly codecId: string;
141
+ readonly required?: boolean;
142
+ }
143
+ interface PslBlockParamOption extends AuthoringOption {
144
+ readonly required?: boolean;
145
+ }
146
+ interface PslBlockParamList {
147
+ readonly kind: 'list';
148
+ readonly of: PslBlockParam;
149
+ readonly required?: boolean;
150
+ }
151
+ /**
152
+ * The parsed representation of a single parameter value on a uniform
153
+ * extension-block AST node. Mirrors the `PslBlockParam` descriptor
154
+ * vocabulary, plus `bare` for keyonly entries:
155
+ *
156
+ * - `ref` → `PslExtensionBlockParamRef` — a raw identifier string
157
+ * (resolution runs in the validator, not the parser).
158
+ * - `value` → `PslExtensionBlockParamScalarValue` — a raw PSL literal string
159
+ * (codec validation runs in the validator).
160
+ * - `option` → `PslExtensionBlockParamOption` — the chosen token.
161
+ * - `list` → `PslExtensionBlockParamList` — ordered list of the above.
162
+ * - `bare` → `PslExtensionBlockParamBare` — a bare identifier line with no
163
+ * `= value` (e.g. `Low` in an enum block). The name is the key in
164
+ * `parameters`; the interpreting consumer decides the default value.
165
+ *
166
+ * These shapes are intentionally minimal. The validator and lowering refine
167
+ * and consume them; the generic framework parser produces them.
168
+ */
169
+ type PslExtensionBlockParamValue = PslExtensionBlockParamRef | PslExtensionBlockParamScalarValue | PslExtensionBlockParamOption | PslExtensionBlockParamList | PslExtensionBlockParamBare;
170
+ interface PslExtensionBlockParamRef {
171
+ readonly kind: 'ref';
172
+ readonly identifier: string;
173
+ readonly span: PslSpan;
174
+ }
175
+ interface PslExtensionBlockParamScalarValue {
176
+ readonly kind: 'value';
177
+ readonly raw: string;
178
+ readonly span: PslSpan;
179
+ }
180
+ interface PslExtensionBlockParamOption {
181
+ readonly kind: 'option';
182
+ readonly token: string;
183
+ readonly span: PslSpan;
184
+ }
185
+ interface PslExtensionBlockParamList {
186
+ readonly kind: 'list';
187
+ readonly items: readonly PslExtensionBlockParamValue[];
188
+ readonly span: PslSpan;
189
+ }
190
+ /**
191
+ * A bare identifier line inside an extension block — a key with no `= value`.
192
+ * Emitted when a line matches `/^[A-Za-z_]\w*$/` with no assignment. The
193
+ * consumer decides what default value (if any) to apply.
194
+ */
195
+ interface PslExtensionBlockParamBare {
196
+ readonly kind: 'bare';
197
+ readonly span: PslSpan;
198
+ }
199
+ /**
200
+ * A positional argument on a block attribute, e.g. the `"pg/text@1"` in
201
+ * `@@type("pg/text@1")`.
202
+ */
203
+ interface PslExtensionBlockAttributeArg {
204
+ readonly kind: 'positional';
205
+ readonly value: string;
206
+ readonly span: PslSpan;
207
+ }
208
+ /**
209
+ * A `@@`-prefixed block-level attribute parsed inside an extension block,
210
+ * e.g. `@@type("pg/text@1")`. Block attributes are captured generically
211
+ * — the parser does not validate attribute names or argument shapes; that
212
+ * is a concern of the block's interpreter.
213
+ */
214
+ interface PslExtensionBlockAttribute {
215
+ readonly name: string;
216
+ readonly args: readonly PslExtensionBlockAttributeArg[];
217
+ readonly span: PslSpan;
218
+ }
219
+ /**
220
+ * Base shape for a uniform extension-contributed top-level PSL block
221
+ * node, as produced by the generic framework parser and consumed by the
222
+ * validator, printer, and lowering factory.
223
+ *
224
+ * - `kind` is the routing discriminant, equal to the descriptor's
225
+ * `discriminator`. The framework parser sets this to
226
+ * `descriptor.discriminator` for every block it parses. Several keywords
227
+ * may share one discriminator (e.g. `policy_select`/`policy_insert` both
228
+ * route to `kind: 'policy'`) — `kind` identifies the entity/storage kind,
229
+ * not the source syntax.
230
+ * - `keyword` is the source PSL keyword the block was declared with
231
+ * (`policy_select`, `policy_insert`, …) — the parse-dispatch identity.
232
+ * Distinct from `kind` precisely when a discriminator is shared by more
233
+ * than one keyword; a lowering factory that contributes several keywords
234
+ * under one discriminator reads `keyword` to tell its blocks apart, and
235
+ * the printer re-emits each block under its own `keyword` regardless of
236
+ * how many other keywords share its `kind`.
237
+ * - `name` is the block's declared name (the identifier after the keyword).
238
+ * - `parameters` is the descriptor-driven parameter map. Keys are
239
+ * parameter names from the descriptor; values are the parsed parameter
240
+ * representations. Only parameters present in the source are included
241
+ * — absence of a required parameter is a validator concern, not a
242
+ * parser concern. Insertion order is preserved; the first occurrence of a
243
+ * duplicate key is retained and subsequent occurrences emit
244
+ * `PSL_EXTENSION_DUPLICATE_PARAMETER`.
245
+ * - `blockAttributes` are `@@`-prefixed attribute lines inside the block, in
246
+ * declaration order. Captured generically — names and args are not validated
247
+ * by the parser.
248
+ * - `span` covers the full block from keyword to closing brace.
249
+ */
250
+ interface PslExtensionBlock {
251
+ readonly kind: string;
252
+ /**
253
+ * The block's parse identity — the source PSL keyword it was declared
254
+ * with. `kind`/`discriminator` is its storage identity; several keywords
255
+ * can share one. E.g. the five `policy_*` keywords all lower to the
256
+ * `policy` entity kind.
257
+ */
258
+ readonly keyword: string;
259
+ readonly name: string;
260
+ readonly parameters: Record<string, PslExtensionBlockParamValue>;
261
+ readonly blockAttributes: readonly PslExtensionBlockAttribute[];
262
+ readonly span: PslSpan;
263
+ }
264
+ //#endregion
265
+ //#region src/shared/framework-authoring.d.ts
266
+ type AuthoringArgRef = {
267
+ readonly kind: 'arg';
268
+ readonly index: number;
269
+ readonly path?: readonly string[];
270
+ readonly default?: AuthoringTemplateValue;
271
+ };
272
+ /**
273
+ * Selects among `cases` by the value of the referenced argument: the resolved
274
+ * value must be one of the case keys, and the node resolves to that case's
275
+ * recursively resolved template. An absent argument resolves to `undefined`,
276
+ * which the enclosing object template omits entirely.
277
+ *
278
+ * Case coverage is validated against the referenced option argument's
279
+ * `values` at pack-registration time, so the runtime miss-throw is an
280
+ * assertion for type-bypassing callers, not a user-facing diagnostic.
281
+ *
282
+ * Must not be used in the `codecId`/`nullable`/`id`/`unique` positions of a
283
+ * preset output: the type-level `ResolveTemplateValue` does not implement
284
+ * select, and those fields feed TS builder-state inference. See ADR 239.
285
+ */
286
+ interface AuthoringSelectRef {
287
+ readonly kind: 'select';
288
+ readonly index: number;
289
+ readonly path?: readonly string[];
290
+ readonly cases: Readonly<Record<string, AuthoringTemplateValue>>;
291
+ }
292
+ type AuthoringTemplateValue = string | number | boolean | null | AuthoringArgRef | AuthoringSelectRef | readonly AuthoringTemplateValue[] | {
293
+ readonly [key: string]: AuthoringTemplateValue;
294
+ };
295
+ interface AuthoringArgumentDescriptorCommon {
296
+ readonly name?: string;
297
+ readonly optional?: boolean;
298
+ }
299
+ type AuthoringArgumentDescriptor = AuthoringArgumentDescriptorCommon & ({
300
+ readonly kind: 'string';
301
+ } | {
302
+ readonly kind: 'boolean';
303
+ } | {
304
+ readonly kind: 'number';
305
+ readonly integer?: boolean;
306
+ readonly minimum?: number;
307
+ readonly maximum?: number;
308
+ } | {
309
+ readonly kind: 'stringArray';
310
+ } | {
311
+ readonly kind: 'object';
312
+ readonly properties: Record<string, AuthoringArgumentDescriptor>;
313
+ } | AuthoringOption);
314
+ interface AuthoringStorageTypeTemplate {
315
+ readonly codecId: string;
316
+ /**
317
+ * The storage type's base name — a plain string, never a template:
318
+ * parameters live in `typeParams` and the DDL renderer composes them.
319
+ * Optional so a type constructor whose {@link AuthoringTypeConstructorDescriptor.entityRefArg}
320
+ * names another entity can omit it entirely — its output for that case is
321
+ * derived by the codec at `codecId`. Every other consumer of this shape
322
+ * (field presets, plain type constructors) always supplies it.
323
+ */
324
+ readonly nativeType?: string;
325
+ readonly typeParams?: Record<string, AuthoringTemplateValue>;
326
+ }
327
+ /**
328
+ * Declares that one positional argument of a
329
+ * {@link AuthoringTypeConstructorDescriptor} call names another entity
330
+ * parsed from the same document, rather than carrying a literal value (e.g.
331
+ * `pg.enum(AalLevel)` naming a `native_enum` entity). `index` is the
332
+ * argument's position in the call; `entityKind` is the entries-slot
333
+ * discriminator the interpreter looks the named entity up under (the same
334
+ * shape {@link AuthoringEntityTypeFactoryOutput.factory} output is collected
335
+ * into, keyed by discriminator then block name).
336
+ *
337
+ * The interpreter resolves the named argument to the entity instance
338
+ * generically, driven only by this declaration — it has no target-specific
339
+ * knowledge of which type constructors carry one. Converting the resolved
340
+ * entity into the constructor's params is a separate, codec-owned concern:
341
+ * the codec descriptor registered for `output.codecId` supplies that
342
+ * conversion, not this framework type.
343
+ */
344
+ interface AuthoringTypeConstructorEntityRef {
345
+ readonly index: number;
346
+ readonly entityKind: string;
347
+ }
348
+ interface AuthoringTypeConstructorDescriptor {
349
+ readonly kind: 'typeConstructor';
350
+ readonly args?: readonly AuthoringArgumentDescriptor[];
351
+ readonly output: AuthoringStorageTypeTemplate;
352
+ /** Present when one of this constructor's positional arguments names another document-local entity instead of carrying a literal value. Absent for ordinary literal-argument constructors. */
353
+ readonly entityRefArg?: AuthoringTypeConstructorEntityRef;
354
+ }
355
+ interface AuthoringColumnDefaultTemplateLiteral {
356
+ readonly kind: 'literal';
357
+ readonly value: AuthoringTemplateValue;
358
+ }
359
+ interface AuthoringColumnDefaultTemplateFunction {
360
+ readonly kind: 'function';
361
+ readonly expression: AuthoringTemplateValue;
362
+ }
363
+ type AuthoringColumnDefaultTemplate = AuthoringColumnDefaultTemplateLiteral | AuthoringColumnDefaultTemplateFunction;
364
+ interface AuthoringExecutionDefaultsTemplate {
365
+ readonly onCreate?: AuthoringTemplateValue;
366
+ readonly onUpdate?: AuthoringTemplateValue;
367
+ }
368
+ interface AuthoringFieldPresetOutput extends AuthoringStorageTypeTemplate {
369
+ readonly nullable?: boolean;
370
+ readonly default?: AuthoringColumnDefaultTemplate;
371
+ readonly executionDefaults?: AuthoringExecutionDefaultsTemplate;
372
+ readonly id?: boolean;
373
+ readonly unique?: boolean;
374
+ }
375
+ interface AuthoringFieldPresetDescriptor {
376
+ readonly kind: 'fieldPreset';
377
+ readonly args?: readonly AuthoringArgumentDescriptor[];
378
+ readonly output: AuthoringFieldPresetOutput;
379
+ }
380
+ type AuthoringTypeNamespace = {
381
+ readonly [name: string]: AuthoringTypeConstructorDescriptor | AuthoringTypeNamespace;
382
+ };
383
+ type AuthoringFieldNamespace = {
384
+ readonly [name: string]: AuthoringFieldPresetDescriptor | AuthoringFieldNamespace;
385
+ };
386
+ /**
387
+ * Context surfaced to entity-type factories at call time. Currently a
388
+ * placeholder — sharpened as concrete consumers (enum, namespace, …)
389
+ * discover what the factory actually needs to read (codec lookup,
390
+ * namespace registry, …).
391
+ */
392
+ /**
393
+ * A write-only sink that a factory may push authoring-time diagnostics into.
394
+ * The concrete type pushed must be structurally compatible with whatever the
395
+ * consumer accumulates (typically `ContractSourceDiagnostic[]`); the framework
396
+ * layer deliberately does not depend on that concrete type.
397
+ */
398
+ interface AuthoringDiagnosticSink {
399
+ push(d: {
400
+ readonly code: string;
401
+ readonly message: string;
402
+ readonly sourceId: string;
403
+ readonly span?: unknown;
404
+ }): void;
405
+ }
406
+ /**
407
+ * A non-fatal advisory minted at authoring time. Fully formed at the push
408
+ * site — the transport and the flush never learn family or target
409
+ * vocabulary. Warnings batch together iff `code` AND `summary` match: the
410
+ * batched rendering asserts the summary of every member, so the grouping
411
+ * key must cover everything the summary claims.
412
+ */
413
+ interface AuthoringWarning {
414
+ /** Stable machine code — what the user greps and what `process.emitWarning` stamps. */
415
+ readonly code: string;
416
+ /** Full text emitted when the warning is itemized (group at or below the batch threshold). */
417
+ readonly message: string;
418
+ /** Short subject label listed under a batched group summary (e.g. `object "…"`). */
419
+ readonly item: string;
420
+ /**
421
+ * Group summary text — what a batched group asserts about EVERY member.
422
+ * An over-threshold group renders as `"<count> <summary>"` above the item
423
+ * lines, so this starts with the plural noun phrase (e.g.
424
+ * `objects use <feature>. <remediation>`).
425
+ */
426
+ readonly summary: string;
427
+ }
428
+ /**
429
+ * A write-only sink for non-fatal authoring-time warnings a factory may
430
+ * emit. Entries travel verbatim to a single per-build flush — no
431
+ * narrowing, no per-kind fields; a plain `AuthoringWarning[]` satisfies
432
+ * this structurally.
433
+ */
434
+ interface AuthoringWarningSink {
435
+ push(w: AuthoringWarning): void;
436
+ }
437
+ /**
438
+ * Emits collected authoring warnings once per build, grouped by `code`:
439
+ * a group at or below the threshold itemizes every `message`; above it,
440
+ * one summary — `"<count> <summary>"` followed by the `item` lines — so
441
+ * a build with many hits of one kind does not wall-of-text, and warnings
442
+ * of different codes never batch into each other's summary.
443
+ */
444
+ declare function flushAuthoringWarnings(warnings: readonly AuthoringWarning[]): void;
445
+ interface AuthoringEntityContext {
446
+ readonly family: string;
447
+ readonly target: string;
448
+ /** Codec registry available to factories that need to validate or decode values. */
449
+ readonly codecLookup?: CodecLookup;
450
+ /** Source file identifier threaded into diagnostics emitted by the factory. */
451
+ readonly sourceId?: string;
452
+ /** Push channel for authoring-time diagnostics emitted by the factory. */
453
+ readonly diagnostics?: AuthoringDiagnosticSink;
454
+ /** Push channel for non-fatal authoring-time warnings emitted by the factory. */
455
+ readonly warnings?: AuthoringWarningSink;
456
+ /**
457
+ * The target's default codec ids for an `enum` block that omits `@@type`.
458
+ * `text` is used when every member is a bare name or a string value;
459
+ * `int` is used when every member is an integer value. Every target pack
460
+ * populates this so `@@type` omission can be inferred consistently.
461
+ */
462
+ readonly enumInferenceCodecs?: {
463
+ readonly text: string;
464
+ readonly int: string;
465
+ };
466
+ }
467
+ /**
468
+ * Classifies an `enum` block's members (before codec decoding, which needs
469
+ * the codec chosen first) into which default codec an omitted `@@type`
470
+ * should resolve to:
471
+ *
472
+ * - every member is `bare`, or a `value` whose raw JSON is a string → `'text'`
473
+ * - every member is a `value` whose raw JSON is an integer → `'int'`
474
+ * - anything else (float, bigint, boolean, mixed, or a `ref`/`option`/`list`
475
+ * parameter) → `null`, meaning the caller must require an explicit `@@type`.
476
+ */
477
+ declare function classifyEnumMemberType(block: PslExtensionBlock): 'text' | 'int' | null;
478
+ /**
479
+ * Resolves the codec id for an `enum` block. When `@@type` is absent, the codec
480
+ * is inferred from the members via {@link classifyEnumMemberType}; otherwise the
481
+ * explicit `@@type("codec")` argument is parsed. Pushes the appropriate
482
+ * diagnostic and returns `undefined` when neither yields a codec. `codecSpan` is
483
+ * the span downstream codec-validation diagnostics should anchor to. Shared by
484
+ * every family's enum factory so inference and the explicit path stay identical.
485
+ */
486
+ declare function resolveEnumCodecId(block: PslExtensionBlock, ctx: AuthoringEntityContext): {
487
+ readonly codecId: string;
488
+ readonly codecSpan: PslSpan;
489
+ } | undefined;
490
+ interface AuthoringEntityTypeTemplateOutput {
491
+ readonly template: AuthoringTemplateValue;
492
+ }
493
+ /**
494
+ * Default `Input = never` is load-bearing for pack-bag-driven type
495
+ * narrowing. Factory parameter positions are contravariant, so a pack
496
+ * literal declaring `factory: (input: DemoEntityInput) => DemoEntity`
497
+ * is only assignable to the base descriptor's factory shape if the
498
+ * base's input is `never` (the bottom of the contravariant position).
499
+ * The concrete input/output types are recovered at the helper-derivation
500
+ * site via `EntityHelperFunction<Descriptor>`'s conditional inference,
501
+ * which reads them from the pack's `as const` literal factory signature
502
+ * — the base widening does not erase the literal because `satisfies`
503
+ * does not widen the declared type.
504
+ */
505
+ interface AuthoringEntityTypeFactoryOutput<Input = never, Output = unknown> {
506
+ readonly factory: (input: Input, ctx: AuthoringEntityContext) => Output;
507
+ }
508
+ interface AuthoringEntityTypeDescriptor<Input = never, Output = unknown> {
509
+ readonly kind: 'entity';
510
+ readonly discriminator: string;
511
+ readonly args?: readonly AuthoringArgumentDescriptor[];
512
+ readonly output: AuthoringEntityTypeTemplateOutput | AuthoringEntityTypeFactoryOutput<Input, Output>;
513
+ /**
514
+ * arktype schema fragment for one entry whose envelope `kind` matches
515
+ * this descriptor's {@link discriminator}. The family validator composes
516
+ * contributed fragments into the per-namespace entry schema at
517
+ * validator construction time so the structural check covers
518
+ * pack-introduced kinds without the family core hard-coding the schema.
519
+ *
520
+ * Hydration uses {@link AuthoringEntityTypeFactoryOutput.factory}
521
+ * directly — the wire shape conforms structurally to the factory's
522
+ * `Input` after `validatorSchema` validates it.
523
+ */
524
+ readonly validatorSchema?: Type<unknown>;
525
+ }
526
+ type AuthoringEntityTypeNamespace = {
527
+ readonly [name: string]: AuthoringEntityTypeDescriptor | AuthoringEntityTypeNamespace;
528
+ };
529
+ /**
530
+ * Declarative descriptor for an extension-contributed top-level PSL block.
531
+ *
532
+ * An extension registers one of these per keyword it contributes. The
533
+ * framework owns the generic parser, validator, and printer — no
534
+ * parsing or printing code runs from the extension.
535
+ *
536
+ * - `keyword` is the PSL top-level identifier this descriptor claims
537
+ * (`policy_select`, `role`, …).
538
+ * - `discriminator` is the routing key used by the printer dispatch and
539
+ * the `entityTypes` lowering factory lookup. Convention:
540
+ * `<target-or-family>-<kind>` (`postgres-policy-select`).
541
+ * - `name.required` declares whether the block must have a name token
542
+ * after the keyword. Currently always `true` — anonymous blocks are
543
+ * not part of the closed-grammar premise — but the field is explicit
544
+ * so the type can evolve without a breaking change.
545
+ * - `parameters` maps parameter names to their value-kind descriptors
546
+ * (`ref` / `value` / `option` / `list`). The generic parser and
547
+ * validator interpret these; the extension supplies no parser or
548
+ * printer function.
549
+ */
550
+ interface AuthoringPslBlockDescriptor {
551
+ readonly kind: 'pslBlock';
552
+ readonly keyword: string;
553
+ readonly discriminator: string;
554
+ readonly name: {
555
+ readonly required: boolean;
556
+ };
557
+ readonly parameters: Record<string, PslBlockParam>;
558
+ /**
559
+ * When `true`, the block body accepts a variadic tail of parameters beyond
560
+ * the declared set. The block body may contain: fields (model-style),
561
+ * `key = value` parameters, and `@@` attributes. With `variadicParameters`,
562
+ * bare identifiers (keys without a `= value`) and undeclared `key = value`
563
+ * pairs flow into the variadic tail — their semantics belong to the
564
+ * lowering, not the parser.
565
+ *
566
+ * A key that IS declared in `parameters` must still be supplied as
567
+ * `key = value`; a bare occurrence of a declared key is a diagnostic.
568
+ *
569
+ * When `false` (default), the validator emits `PSL_EXTENSION_UNKNOWN_PARAMETER`
570
+ * for keys absent from `parameters`.
571
+ */
572
+ readonly variadicParameters?: boolean;
573
+ /**
574
+ * Declares that the model named by the block's ref parameter `parameter`
575
+ * must carry the bare `@@` model attribute `attribute`. The family
576
+ * interpreter enforces this generically over the whole parsed document —
577
+ * declaration order of the block and the model does not matter — and
578
+ * emits `PSL_EXTENSION_TARGET_MODEL_MISSING_ATTRIBUTE` naming the block
579
+ * and the model when the attribute is absent. A parameter that is
580
+ * missing or does not resolve to a model is not this rule's concern
581
+ * (missing-parameter and unresolved-ref diagnostics own those cases).
582
+ */
583
+ readonly requiresModelAttribute?: {
584
+ readonly parameter: string;
585
+ readonly attribute: string;
586
+ };
587
+ }
588
+ type AuthoringPslBlockDescriptorNamespace = {
589
+ readonly [name: string]: AuthoringPslBlockDescriptor | AuthoringPslBlockDescriptorNamespace;
590
+ };
591
+ /**
592
+ * Context surfaced to a model-attribute lowering at call time: the entity
593
+ * context shared with entity-type factories, plus the declaring model's
594
+ * name, its mapped storage name (the name of the storage object the model
595
+ * maps to; which kind of object that is belongs to the family, not the
596
+ * framework), and the namespace id the lowered entity should be filed
597
+ * under.
598
+ */
599
+ interface AuthoringModelAttributeContext extends AuthoringEntityContext {
600
+ readonly modelName: string;
601
+ readonly storageName: string;
602
+ readonly namespaceId: string;
603
+ }
604
+ /**
605
+ * What a model-attribute lowering returns when it produces an entity: `key`
606
+ * is the identity the entity is stored under within its `entries` slot
607
+ * (`entries[attribute][key]`); `entity` is the value stored there. A
608
+ * lowering that instead pushed a diagnostic through
609
+ * {@link AuthoringModelAttributeContext.diagnostics} returns `undefined` —
610
+ * the same convention {@link AuthoringEntityTypeFactoryOutput} uses.
611
+ */
612
+ interface AuthoringModelAttributeLoweringOutput {
613
+ readonly key: string;
614
+ readonly entity: unknown;
615
+ }
616
+ /**
617
+ * Declarative descriptor for an extension-contributed `@@` model attribute.
618
+ *
619
+ * An extension registers one of these per bare attribute name it
620
+ * contributes. The framework owns the generic consult in the interpreter's
621
+ * model-attribute loop; the contribution supplies only `spec` and `lower`.
622
+ *
623
+ * - `attribute` is the bare `@@` attribute name this descriptor claims and,
624
+ * by the one-string rule, the `entries` slot its lowered entities are
625
+ * grouped under (`entries[attribute][key]`).
626
+ * - `spec` is opaque to the framework core: an ADR-231 attribute-spec kit
627
+ * `AttributeSpec<Out>` value (`modelAttribute(name, {...})` from
628
+ * `@internal/psl-parser`). Framework core does not depend on
629
+ * psl-parser and never inspects this field; the family interpreter,
630
+ * which does depend on psl-parser, parses the attribute's arguments
631
+ * against it.
632
+ * - `lower` receives the parsed arguments and the declaring model's
633
+ * context, and returns the entity to file into `entries`, or `undefined`
634
+ * after pushing a diagnostic via `ctx.diagnostics`.
635
+ *
636
+ * `Out` defaults to `never` — not `unknown` — for the same contravariance
637
+ * reason documented on {@link AuthoringEntityTypeFactoryOutput}: a concrete
638
+ * pack literal's narrower `lower(parsed: ConcreteOut, ctx)` is only
639
+ * assignable to this base shape when the base parameter is the bottom type.
640
+ */
641
+ interface AuthoringModelAttributeDescriptor<Out = never> {
642
+ readonly kind: 'modelAttribute';
643
+ readonly attribute: string;
644
+ readonly spec: unknown;
645
+ readonly lower: (parsed: Out, ctx: AuthoringModelAttributeContext) => AuthoringModelAttributeLoweringOutput | undefined;
646
+ }
647
+ type AuthoringModelAttributeDescriptorNamespace = {
648
+ readonly [name: string]: AuthoringModelAttributeDescriptor | AuthoringModelAttributeDescriptorNamespace;
649
+ };
650
+ interface AuthoringContributions {
651
+ readonly type?: AuthoringTypeNamespace;
652
+ readonly field?: AuthoringFieldNamespace;
653
+ readonly entityTypes?: AuthoringEntityTypeNamespace;
654
+ /**
655
+ * Registry of declarative block descriptors this contribution registers,
656
+ * keyed by arbitrary path segments. Each leaf is an
657
+ * {@link AuthoringPslBlockDescriptor} that claims a PSL top-level keyword.
658
+ * The framework owns the generic parser, validator, and printer; the
659
+ * contribution supplies only these declarative descriptors.
660
+ *
661
+ * Contrast with the parsed block nodes themselves, which live in a
662
+ * namespace's `entries` under their discriminator key; this field holds the
663
+ * registry of descriptors that teach the parser how to read those blocks.
664
+ */
665
+ readonly pslBlockDescriptors?: AuthoringPslBlockDescriptorNamespace;
666
+ /**
667
+ * Registry of declarative `@@` model attribute descriptors this
668
+ * contribution registers, keyed by arbitrary path segments. Each leaf is
669
+ * an {@link AuthoringModelAttributeDescriptor} that claims a bare model
670
+ * attribute name. The framework owns the generic consult in the family
671
+ * interpreter's model-attribute loop; the contribution supplies only the
672
+ * declarative spec and the lowering.
673
+ */
674
+ readonly modelAttributes?: AuthoringModelAttributeDescriptorNamespace;
675
+ /**
676
+ * Names the top-level type constructor that stores embedded value-object
677
+ * fields (fields typed as a value-object `type` block). A single named
678
+ * slot per component makes within-component ambiguity impossible by
679
+ * shape. Assembly rejects two components both declaring it, validates
680
+ * that the assembled namespace carries the named constructor as a
681
+ * top-level bare-eligible entry (see
682
+ * {@link collectScalarTypeConstructors}), and exposes the single value to
683
+ * family interpreters — so family layers never hardcode a target's type
684
+ * names.
685
+ */
686
+ readonly valueObjectStorageType?: string;
687
+ }
688
+ declare function isAuthoringArgRef(value: unknown): value is AuthoringArgRef;
689
+ declare function isAuthoringTypeConstructorDescriptor(value: AuthoringTypeConstructorDescriptor | AuthoringTypeNamespace): value is AuthoringTypeConstructorDescriptor;
690
+ declare function isAuthoringFieldPresetDescriptor(value: AuthoringFieldPresetDescriptor | AuthoringFieldNamespace): value is AuthoringFieldPresetDescriptor;
691
+ declare function isAuthoringEntityTypeDescriptor(value: AuthoringEntityTypeDescriptor | AuthoringEntityTypeNamespace): value is AuthoringEntityTypeDescriptor;
692
+ declare function isAuthoringPslBlockDescriptor(value: AuthoringPslBlockDescriptor | AuthoringPslBlockDescriptorNamespace): value is AuthoringPslBlockDescriptor;
693
+ declare function isAuthoringModelAttributeDescriptor(value: AuthoringModelAttributeDescriptor | AuthoringModelAttributeDescriptorNamespace): value is AuthoringModelAttributeDescriptor;
694
+ /**
695
+ * Returns true when `namespace` is a non-leaf key in `contributions.field`.
696
+ *
697
+ * `AuthoringFieldNamespace` permits a leaf descriptor at any depth — including
698
+ * the root — so a top-level `field: { Foo: { kind: 'fieldPreset', ... } }`
699
+ * registration must NOT be treated as a "namespace" with sub-paths. Callers
700
+ * use this predicate to gate dot-namespaced lookups (e.g. PSL `@Foo.bar`).
701
+ */
702
+ declare function hasRegisteredFieldNamespace(contributions: AuthoringContributions | undefined, namespace: string): boolean;
703
+ /**
704
+ * Merges `source` into `target` recursively at the descriptor-namespace
705
+ * level. `descriptorKind` is the `kind` value ('typeConstructor',
706
+ * 'fieldPreset', 'entity', or 'pslBlock') that identifies a descriptor
707
+ * (terminal merge point; same-path registrations across components are
708
+ * reported as duplicates) as opposed to a sub-namespace (recursion target).
709
+ *
710
+ * Path segments are validated against prototype-pollution names
711
+ * (`__proto__`, `constructor`, `prototype`). A value that is neither a
712
+ * recognized leaf nor a plain object — e.g. a malformed descriptor
713
+ * where the canonical leaf guard rejected it for missing `output` —
714
+ * is reported as an invalid contribution rather than recursed into,
715
+ * which would either silently mangle state or infinite-loop on
716
+ * primitive properties.
717
+ *
718
+ * Within-registry duplicate detection is this walker's job;
719
+ * cross-registry detection runs separately via
720
+ * `assertNoCrossRegistryCollisions` after merging completes.
721
+ */
722
+ declare function mergeAuthoringNamespaces(target: Record<string, unknown>, source: Record<string, unknown>, path: readonly string[], descriptorKind: string, label: string): void;
723
+ interface ScalarTypeConstructorOutput {
724
+ readonly codecId: string;
725
+ readonly nativeType: string;
726
+ readonly typeParams?: Record<string, unknown>;
727
+ }
728
+ /**
729
+ * Derives the scalar view of an assembled authoring type namespace: every
730
+ * **top-level** type constructor that is instantiable with an empty argument
731
+ * list — all declared args optional and no entity-ref argument. A bare type
732
+ * name `T` in a schema is semantically the zero-arg instantiation `T()`, so
733
+ * each entry is exactly what that call produces (defaulted template values
734
+ * applied, absent optional-arg typeParams keys omitted). Constructors
735
+ * registered under a namespace segment, constructors with required args, and
736
+ * entity-ref constructors are not scalars and are excluded.
737
+ *
738
+ * Eligibility needs no template inspection: templates that cannot resolve
739
+ * for their legal call shapes are rejected at the composition boundary by
740
+ * {@link assertResolvableTypeConstructorTemplates}, so the zero-arg
741
+ * instantiation below cannot fail for an eligible constructor.
742
+ */
743
+ declare function collectScalarTypeConstructors(namespace: AuthoringTypeNamespace): ReadonlyMap<string, ScalarTypeConstructorOutput>;
744
+ /**
745
+ * Boundary validation for a contributed authoring type namespace, called
746
+ * per contributing component at assembly (which supplies `contributedBy`
747
+ * for attribution). Rejects what the types cannot express — entity-ref
748
+ * constructors are skipped (their output derives from the referenced
749
+ * entity): a plain constructor must declare its output storage type name,
750
+ * and every `typeParams` arg-ref (including refs inside arg-ref defaults)
751
+ * must point at a declared argument index.
752
+ */
753
+ declare function assertResolvableTypeConstructorTemplates(namespace: AuthoringTypeNamespace, contributedBy: string, path?: readonly string[]): void;
754
+ declare function assertNoCrossRegistryCollisions(typeNamespace: AuthoringTypeNamespace, fieldNamespace: AuthoringFieldNamespace, entityTypeNamespace?: AuthoringEntityTypeNamespace, pslBlockNamespace?: AuthoringPslBlockDescriptorNamespace, modelAttributeNamespace?: AuthoringModelAttributeDescriptorNamespace): void;
755
+ declare function resolveAuthoringTemplateValue(template: AuthoringTemplateValue | undefined, args: readonly unknown[]): unknown;
756
+ declare function validateAuthoringHelperArguments(helperPath: string, descriptors: readonly AuthoringArgumentDescriptor[] | undefined, args: readonly unknown[]): void;
757
+ declare function instantiateAuthoringTypeConstructor(descriptor: AuthoringTypeConstructorDescriptor, args: readonly unknown[]): {
758
+ readonly codecId: string;
759
+ readonly nativeType: string;
760
+ readonly typeParams?: Record<string, unknown>;
761
+ };
762
+ declare function instantiateAuthoringEntityType<TOutput = unknown>(helperPath: string, descriptor: AuthoringEntityTypeDescriptor, args: readonly unknown[], ctx: AuthoringEntityContext): TOutput;
763
+ declare function instantiateAuthoringFieldPreset(descriptor: AuthoringFieldPresetDescriptor, args: readonly unknown[]): {
764
+ readonly descriptor: {
765
+ readonly codecId: string;
766
+ readonly nativeType: string;
767
+ readonly typeParams?: Record<string, unknown>;
768
+ };
769
+ readonly nullable: boolean;
770
+ readonly default?: ColumnDefault;
771
+ readonly executionDefaults?: ExecutionMutationDefaultPhases;
772
+ readonly id: boolean;
773
+ readonly unique: boolean;
774
+ };
775
+ //#endregion
776
+ export { hasRegisteredFieldNamespace as $, PslBlockParam as A, PslExtensionBlockParamList as B, AuthoringTemplateValue as C, AuthoringWarning as D, AuthoringTypeNamespace as E, PslDiagnosticCode as F, PslPosition as G, PslExtensionBlockParamRef as H, PslExtensionBlock as I, assertNoCrossRegistryCollisions as J, PslSpan as K, PslExtensionBlockAttribute as L, PslBlockParamOption as M, PslBlockParamRef as N, AuthoringWarningSink as O, PslBlockParamValue as P, flushAuthoringWarnings as Q, PslExtensionBlockAttributeArg as R, AuthoringStorageTypeTemplate as S, AuthoringTypeConstructorEntityRef as T, PslExtensionBlockParamScalarValue as U, PslExtensionBlockParamOption as V, PslExtensionBlockParamValue as W, classifyEnumMemberType as X, assertResolvableTypeConstructorTemplates as Y, collectScalarTypeConstructors as Z, AuthoringModelAttributeLoweringOutput as _, AuthoringDiagnosticSink as a, isAuthoringFieldPresetDescriptor as at, AuthoringPslBlockDescriptorNamespace as b, AuthoringEntityTypeFactoryOutput as c, isAuthoringTypeConstructorDescriptor as ct, AuthoringFieldNamespace as d, resolveEnumCodecId as dt, instantiateAuthoringEntityType as et, AuthoringFieldPresetDescriptor as f, validateAuthoringHelperArguments as ft, AuthoringModelAttributeDescriptorNamespace as g, AuthoringModelAttributeDescriptor as h, AuthoringContributions as i, isAuthoringEntityTypeDescriptor as it, PslBlockParamList as j, ContributedPslDiagnosticCode as k, AuthoringEntityTypeNamespace as l, mergeAuthoringNamespaces as lt, AuthoringModelAttributeContext as m, AuthoringArgumentDescriptor as n, instantiateAuthoringTypeConstructor as nt, AuthoringEntityContext as o, isAuthoringModelAttributeDescriptor as ot, AuthoringFieldPresetOutput as p, ScalarTypeConstructorOutput as q, AuthoringColumnDefaultTemplate as r, isAuthoringArgRef as rt, AuthoringEntityTypeDescriptor as s, isAuthoringPslBlockDescriptor as st, AuthoringArgRef as t, instantiateAuthoringFieldPreset as tt, AuthoringEntityTypeTemplateOutput as u, resolveAuthoringTemplateValue as ut, AuthoringOption as v, AuthoringTypeConstructorDescriptor as w, AuthoringSelectRef as x, AuthoringPslBlockDescriptor as y, PslExtensionBlockParamBare as z };
777
+ //# sourceMappingURL=framework-authoring-7YMP9TwM-C9P-N6_a.d.mts.map