@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,240 @@
1
+ import { a as structuredError } from "./structured-error-H6WU9Kjt.mjs";
2
+ import { t as InternalError } from "./internal-error-BIc-ehme-ouBQPoEL.mjs";
3
+ //#region ../../../1-framework/1-core/ts-render/dist/index.mjs
4
+ /**
5
+ * Pure JSON-to-TypeScript-source printer.
6
+ *
7
+ * This module is the second stage of the codec → TS pipeline:
8
+ *
9
+ * jsValue → codec.encodeJson → JsonValue → jsonToTsSource → TS source text
10
+ *
11
+ * Stage 1 (`codec.encodeJson`) is a codec responsibility — date serialization,
12
+ * opaque domain types (vector, bigint, uuid), JSON canonicalization. Stage 2
13
+ * (this module) is a pure JSON-to-TS printer that must never grow type-specific
14
+ * branches.
15
+ *
16
+ * To render a non-JSON JS value (Date, Vector, BigInt, Buffer, …), encode it
17
+ * through the relevant codec's `encodeJson` first. Adding special cases to
18
+ * this file is not the answer — that's what codecs are for.
19
+ */
20
+ /**
21
+ * Render a JSON-compatible value as a TypeScript source-text literal.
22
+ *
23
+ * Accepts `unknown` for ergonomics with structural types (e.g. `ColumnSpec`,
24
+ * `ForeignKeySpec`) whose fields are all JSON-compatible but whose interfaces
25
+ * lack the index signature TypeScript requires for `JsonObject` assignability.
26
+ * Non-JSON values (Date, Symbol, Function, etc.) throw at runtime.
27
+ */
28
+ function jsonToTsSource(value) {
29
+ if (value === void 0) return "undefined";
30
+ if (value === null) return "null";
31
+ if (typeof value === "string") return stringifyLiteral(value);
32
+ if (typeof value === "number" || typeof value === "boolean") return String(value);
33
+ if (Array.isArray(value)) {
34
+ if (value.length === 0) return "[]";
35
+ const items = value.map((v) => jsonToTsSource(v));
36
+ const singleLine = `[${items.join(", ")}]`;
37
+ if (singleLine.length <= 80) return singleLine;
38
+ return `[\n${items.map((i) => ` ${i}`).join(",\n")},\n]`;
39
+ }
40
+ if (typeof value === "object") {
41
+ const entries = Object.entries(value).filter(([, v]) => v !== void 0);
42
+ if (entries.length === 0) return "{}";
43
+ const items = entries.map(([k, v]) => `${renderKey(k)}: ${jsonToTsSource(v)}`);
44
+ const singleLine = `{ ${items.join(", ")} }`;
45
+ if (singleLine.length <= 80) return singleLine;
46
+ return `{\n${items.map((i) => ` ${i}`).join(",\n")},\n}`;
47
+ }
48
+ throw new InternalError(`jsonToTsSource: unsupported value type "${typeof value}"`);
49
+ }
50
+ function renderKey(key) {
51
+ if (key === "__proto__") return stringifyLiteral(key);
52
+ return /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(key) ? key : stringifyLiteral(key);
53
+ }
54
+ function stringifyLiteral(value) {
55
+ return JSON.stringify(value).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
56
+ }
57
+ function contractError(code, message, options) {
58
+ return structuredError(code, message, options);
59
+ }
60
+ /**
61
+ * Render an aggregated `import` block from a flat list of
62
+ * `ImportRequirement`s. Each target's migration renderer collects
63
+ * requirements polymorphically from its call nodes and pipes them here.
64
+ *
65
+ * The emitter invariants:
66
+ *
67
+ * - **Usually one line per module specifier.** Named imports are aggregated
68
+ * and emitted sorted; a single default symbol is combined onto the same
69
+ * line when attributes agree (`import def, { a, b } from "m";`). Aliased
70
+ * symbols render `symbol as alias`. When every symbol for a module is
71
+ * `typeOnly`, the statement collapses to `import type { … }`; a module
72
+ * mixing value and type symbols prefixes the type-only ones
73
+ * (`import { type T, v }`). Exceptions that split into multiple lines: a
74
+ * fully type-only statement with both a default and one or more named
75
+ * bindings (`import type D from "m";` then `import type { N } from "m";`,
76
+ * because TypeScript rejects `import type D, { N } from "m"` — TS1363),
77
+ * and multiple distinct default symbols (see below).
78
+ * - **Multiple distinct default symbols per module are allowed.** JS permits
79
+ * re-importing the same specifier under different default-binding names
80
+ * (`import a from 'm'; import b from 'm';`), so each distinct default
81
+ * symbol renders its own `import` line, sorted alphabetically; a repeated
82
+ * requirement for the same symbol still collapses into one binding,
83
+ * merging `typeOnly` by AND.
84
+ * - **Attribute unanimity per module.** All requirements for the same
85
+ * module specifier must carry the same (or no) `attributes` map.
86
+ * Divergent attribute maps throw — they can't collapse to one line
87
+ * and there's no user-resolvable recovery at this layer.
88
+ * - **Distinct (symbol, alias) pairs are distinct bindings.** TypeScript
89
+ * permits importing the same export under multiple local names, so
90
+ * `{ A }` + `{ A as B }` renders as `import { A, A as B } from "m"` and
91
+ * `{ A as B }` + `{ A as C }` renders as `import { A as B, A as C } from "m"`.
92
+ * Truly identical `(symbol, alias)` pairs still collapse to one binding,
93
+ * merging `typeOnly` by AND.
94
+ * - **Deterministic ordering.** Modules are emitted sorted by specifier;
95
+ * within a module, named bindings are emitted sorted by `(symbol, alias)`
96
+ * using JavaScript code-unit comparison, with the un-aliased form (no
97
+ * alias) treated as alias `""` so it sorts before any aliased form of the
98
+ * same symbol.
99
+ *
100
+ * Returns a string containing one or more import lines per module (see the
101
+ * splitting exceptions above), joined by `\n` (no trailing newline). An
102
+ * empty requirement list returns `""`.
103
+ */
104
+ function renderImports(requirements) {
105
+ return [...aggregateByModule(requirements).entries()].sort(([a], [b]) => a.localeCompare(b)).map(([moduleSpecifier, group]) => renderModuleImport(moduleSpecifier, group)).join("\n");
106
+ }
107
+ function aggregateByModule(requirements) {
108
+ const byModule = /* @__PURE__ */ new Map();
109
+ for (const req of requirements) {
110
+ let group = byModule.get(req.moduleSpecifier);
111
+ if (!group) {
112
+ group = {
113
+ named: /* @__PURE__ */ new Map(),
114
+ defaults: /* @__PURE__ */ new Map(),
115
+ attributes: null,
116
+ attributesSet: false
117
+ };
118
+ byModule.set(req.moduleSpecifier, group);
119
+ }
120
+ mergeRequirementIntoGroup(req, group);
121
+ }
122
+ return byModule;
123
+ }
124
+ function mergeRequirementIntoGroup(req, group) {
125
+ const kind = req.kind ?? "named";
126
+ const typeOnly = req.typeOnly === true;
127
+ if (kind === "default") {
128
+ const existingTypeOnly = group.defaults.get(req.symbol);
129
+ group.defaults.set(req.symbol, existingTypeOnly === void 0 ? typeOnly : existingTypeOnly && typeOnly);
130
+ } else {
131
+ const alias = req.alias && req.alias !== req.symbol ? req.alias : null;
132
+ const key = namedBindingKey(req.symbol, alias);
133
+ const existing = group.named.get(key);
134
+ if (existing) existing.typeOnly = existing.typeOnly && typeOnly;
135
+ else group.named.set(key, {
136
+ symbol: req.symbol,
137
+ alias,
138
+ typeOnly
139
+ });
140
+ }
141
+ mergeAttributes(req, group);
142
+ }
143
+ function mergeAttributes(req, group) {
144
+ const incoming = req.attributes ?? null;
145
+ if (!group.attributesSet) {
146
+ group.attributes = incoming;
147
+ group.attributesSet = true;
148
+ return;
149
+ }
150
+ if (!attributesEqual(group.attributes, incoming)) throw contractError("CONTRACT.PACK_CONTRIBUTION_INVALID", `Conflicting import attributes for module "${req.moduleSpecifier}": ${stringifyAttributes(group.attributes)} vs ${stringifyAttributes(incoming)}.`, { meta: { moduleSpecifier: req.moduleSpecifier } });
151
+ }
152
+ function attributesEqual(a, b) {
153
+ if (a === b) return true;
154
+ if (a === null || b === null) return false;
155
+ const aKeys = Object.keys(a).sort();
156
+ const bKeys = Object.keys(b).sort();
157
+ if (aKeys.length !== bKeys.length) return false;
158
+ for (let i = 0; i < aKeys.length; i++) {
159
+ const key = aKeys[i];
160
+ if (key !== bKeys[i]) return false;
161
+ if (a[key] !== b[key]) return false;
162
+ }
163
+ return true;
164
+ }
165
+ function stringifyAttributes(attrs) {
166
+ if (attrs === null) return "(none)";
167
+ return `{ ${Object.entries(attrs).sort(([a], [b]) => a.localeCompare(b)).map(([k, v]) => `${k}: ${JSON.stringify(v)}`).join(", ")} }`;
168
+ }
169
+ function renderModuleImport(moduleSpecifier, group) {
170
+ const attrs = buildAttributesClause(group.attributes);
171
+ const defaultEntries = [...group.defaults.entries()].sort(([a], [b]) => a.localeCompare(b));
172
+ const hasNamed = group.named.size > 0;
173
+ if (defaultEntries.length > 1) {
174
+ const defaultLines = defaultEntries.map(([symbol, typeOnly]) => `import ${typeOnly ? "type " : ""}${symbol} from '${moduleSpecifier}'${attrs};`);
175
+ if (!hasNamed) return defaultLines.join("\n");
176
+ return [...defaultLines, renderNamedOnlyStatement(moduleSpecifier, group, attrs)].join("\n");
177
+ }
178
+ const defaultEntry = defaultEntries[0];
179
+ const hasDefault = defaultEntry !== void 0;
180
+ const [defaultSymbol, defaultTypeOnly] = defaultEntry ?? [null, true];
181
+ const typeOnlyStatement = isStatementTypeOnly(hasDefault, defaultTypeOnly, group);
182
+ if (typeOnlyStatement && hasDefault && hasNamed) return `${`import type ${defaultSymbol} from '${moduleSpecifier}'${attrs};`}\n${`import type { ${renderNamedBindingsList(group, true)} } from '${moduleSpecifier}'${attrs};`}`;
183
+ return `${typeOnlyStatement ? "import type" : "import"} ${buildImportClause(defaultSymbol, group, typeOnlyStatement)} from '${moduleSpecifier}'${attrs};`;
184
+ }
185
+ function renderNamedOnlyStatement(moduleSpecifier, group, attrs) {
186
+ const typeOnlyStatement = [...group.named.values()].every((binding) => binding.typeOnly);
187
+ return `${typeOnlyStatement ? "import type" : "import"} { ${renderNamedBindingsList(group, typeOnlyStatement)} } from '${moduleSpecifier}'${attrs};`;
188
+ }
189
+ function isStatementTypeOnly(hasDefault, defaultTypeOnly, group) {
190
+ const hasNamed = group.named.size > 0;
191
+ if (!hasDefault && !hasNamed) return false;
192
+ if (hasDefault && !defaultTypeOnly) return false;
193
+ for (const binding of group.named.values()) if (!binding.typeOnly) return false;
194
+ return true;
195
+ }
196
+ function buildImportClause(defaultSymbol, group, statementTypeOnly) {
197
+ const hasNamed = group.named.size > 0;
198
+ const hasDefault = defaultSymbol !== null;
199
+ const namedClause = hasNamed ? renderNamedBindingsList(group, statementTypeOnly) : "";
200
+ if (hasDefault && hasNamed) return `${defaultSymbol}, { ${namedClause} }`;
201
+ if (hasDefault) return defaultSymbol;
202
+ return `{ ${namedClause} }`;
203
+ }
204
+ function renderNamedBindingsList(group, statementTypeOnly) {
205
+ return [...group.named.values()].sort(compareNamedBindings).map((binding) => renderNamedBinding(binding, statementTypeOnly)).join(", ");
206
+ }
207
+ function compareNamedBindings(a, b) {
208
+ if (a.symbol !== b.symbol) return a.symbol < b.symbol ? -1 : 1;
209
+ const aAlias = a.alias ?? "";
210
+ const bAlias = b.alias ?? "";
211
+ if (aAlias === bAlias) return 0;
212
+ return aAlias < bAlias ? -1 : 1;
213
+ }
214
+ function namedBindingKey(symbol, alias) {
215
+ return `${symbol}\x00${alias ?? ""}`;
216
+ }
217
+ function renderNamedBinding(binding, statementTypeOnly) {
218
+ const prefix = !statementTypeOnly && binding.typeOnly ? "type " : "";
219
+ const aliasClause = binding.alias !== null ? ` as ${binding.alias}` : "";
220
+ return `${prefix}${binding.symbol}${aliasClause}`;
221
+ }
222
+ function buildAttributesClause(attrs) {
223
+ if (attrs === null) return "";
224
+ const entries = Object.entries(attrs).sort(([a], [b]) => a.localeCompare(b)).map(([k, v]) => `${k}: ${JSON.stringify(v)}`);
225
+ if (entries.length === 0) return "";
226
+ return ` with { ${entries.join(", ")} }`;
227
+ }
228
+ /**
229
+ * Abstract base class for any IR node that can be emitted as a TypeScript
230
+ * expression and declare its own import requirements.
231
+ *
232
+ * A top-level renderer walks an array of these polymorphically, concatenates
233
+ * `renderTypeScript()` results, and aggregates `importRequirements()` into a
234
+ * deduplicated import block.
235
+ */
236
+ var TsExpression = class {};
237
+ //#endregion
238
+ export { TsExpression, jsonToTsSource, renderImports };
239
+
240
+ //# sourceMappingURL=ts-render.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ts-render.mjs","names":[],"sources":["../../../../1-framework/1-core/ts-render/dist/index.mjs"],"sourcesContent":["import { InternalError } from \"@internal/utils/internal-error\";\nimport { structuredError } from \"@internal/utils/structured-error\";\n//#region src/json-to-ts-source.ts\n/**\n* Pure JSON-to-TypeScript-source printer.\n*\n* This module is the second stage of the codec → TS pipeline:\n*\n* jsValue → codec.encodeJson → JsonValue → jsonToTsSource → TS source text\n*\n* Stage 1 (`codec.encodeJson`) is a codec responsibility — date serialization,\n* opaque domain types (vector, bigint, uuid), JSON canonicalization. Stage 2\n* (this module) is a pure JSON-to-TS printer that must never grow type-specific\n* branches.\n*\n* To render a non-JSON JS value (Date, Vector, BigInt, Buffer, …), encode it\n* through the relevant codec's `encodeJson` first. Adding special cases to\n* this file is not the answer — that's what codecs are for.\n*/\n/**\n* Render a JSON-compatible value as a TypeScript source-text literal.\n*\n* Accepts `unknown` for ergonomics with structural types (e.g. `ColumnSpec`,\n* `ForeignKeySpec`) whose fields are all JSON-compatible but whose interfaces\n* lack the index signature TypeScript requires for `JsonObject` assignability.\n* Non-JSON values (Date, Symbol, Function, etc.) throw at runtime.\n*/\nfunction jsonToTsSource(value) {\n\tif (value === void 0) return \"undefined\";\n\tif (value === null) return \"null\";\n\tif (typeof value === \"string\") return stringifyLiteral(value);\n\tif (typeof value === \"number\" || typeof value === \"boolean\") return String(value);\n\tif (Array.isArray(value)) {\n\t\tif (value.length === 0) return \"[]\";\n\t\tconst items = value.map((v) => jsonToTsSource(v));\n\t\tconst singleLine = `[${items.join(\", \")}]`;\n\t\tif (singleLine.length <= 80) return singleLine;\n\t\treturn `[\\n${items.map((i) => ` ${i}`).join(\",\\n\")},\\n]`;\n\t}\n\tif (typeof value === \"object\") {\n\t\tconst entries = Object.entries(value).filter(([, v]) => v !== void 0);\n\t\tif (entries.length === 0) return \"{}\";\n\t\tconst items = entries.map(([k, v]) => `${renderKey(k)}: ${jsonToTsSource(v)}`);\n\t\tconst singleLine = `{ ${items.join(\", \")} }`;\n\t\tif (singleLine.length <= 80) return singleLine;\n\t\treturn `{\\n${items.map((i) => ` ${i}`).join(\",\\n\")},\\n}`;\n\t}\n\tthrow new InternalError(`jsonToTsSource: unsupported value type \"${typeof value}\"`);\n}\nfunction renderKey(key) {\n\tif (key === \"__proto__\") return stringifyLiteral(key);\n\treturn /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(key) ? key : stringifyLiteral(key);\n}\nfunction stringifyLiteral(value) {\n\treturn JSON.stringify(value).replace(/\\u2028/g, \"\\\\u2028\").replace(/\\u2029/g, \"\\\\u2029\");\n}\n//#endregion\n//#region src/contract-errors.ts\nfunction contractError(code, message, options) {\n\treturn structuredError(code, message, options);\n}\n//#endregion\n//#region src/render-imports.ts\n/**\n* Render an aggregated `import` block from a flat list of\n* `ImportRequirement`s. Each target's migration renderer collects\n* requirements polymorphically from its call nodes and pipes them here.\n*\n* The emitter invariants:\n*\n* - **Usually one line per module specifier.** Named imports are aggregated\n* and emitted sorted; a single default symbol is combined onto the same\n* line when attributes agree (`import def, { a, b } from \"m\";`). Aliased\n* symbols render `symbol as alias`. When every symbol for a module is\n* `typeOnly`, the statement collapses to `import type { … }`; a module\n* mixing value and type symbols prefixes the type-only ones\n* (`import { type T, v }`). Exceptions that split into multiple lines: a\n* fully type-only statement with both a default and one or more named\n* bindings (`import type D from \"m\";` then `import type { N } from \"m\";`,\n* because TypeScript rejects `import type D, { N } from \"m\"` — TS1363),\n* and multiple distinct default symbols (see below).\n* - **Multiple distinct default symbols per module are allowed.** JS permits\n* re-importing the same specifier under different default-binding names\n* (`import a from 'm'; import b from 'm';`), so each distinct default\n* symbol renders its own `import` line, sorted alphabetically; a repeated\n* requirement for the same symbol still collapses into one binding,\n* merging `typeOnly` by AND.\n* - **Attribute unanimity per module.** All requirements for the same\n* module specifier must carry the same (or no) `attributes` map.\n* Divergent attribute maps throw — they can't collapse to one line\n* and there's no user-resolvable recovery at this layer.\n* - **Distinct (symbol, alias) pairs are distinct bindings.** TypeScript\n* permits importing the same export under multiple local names, so\n* `{ A }` + `{ A as B }` renders as `import { A, A as B } from \"m\"` and\n* `{ A as B }` + `{ A as C }` renders as `import { A as B, A as C } from \"m\"`.\n* Truly identical `(symbol, alias)` pairs still collapse to one binding,\n* merging `typeOnly` by AND.\n* - **Deterministic ordering.** Modules are emitted sorted by specifier;\n* within a module, named bindings are emitted sorted by `(symbol, alias)`\n* using JavaScript code-unit comparison, with the un-aliased form (no\n* alias) treated as alias `\"\"` so it sorts before any aliased form of the\n* same symbol.\n*\n* Returns a string containing one or more import lines per module (see the\n* splitting exceptions above), joined by `\\n` (no trailing newline). An\n* empty requirement list returns `\"\"`.\n*/\nfunction renderImports(requirements) {\n\treturn [...aggregateByModule(requirements).entries()].sort(([a], [b]) => a.localeCompare(b)).map(([moduleSpecifier, group]) => renderModuleImport(moduleSpecifier, group)).join(\"\\n\");\n}\nfunction aggregateByModule(requirements) {\n\tconst byModule = /* @__PURE__ */ new Map();\n\tfor (const req of requirements) {\n\t\tlet group = byModule.get(req.moduleSpecifier);\n\t\tif (!group) {\n\t\t\tgroup = {\n\t\t\t\tnamed: /* @__PURE__ */ new Map(),\n\t\t\t\tdefaults: /* @__PURE__ */ new Map(),\n\t\t\t\tattributes: null,\n\t\t\t\tattributesSet: false\n\t\t\t};\n\t\t\tbyModule.set(req.moduleSpecifier, group);\n\t\t}\n\t\tmergeRequirementIntoGroup(req, group);\n\t}\n\treturn byModule;\n}\nfunction mergeRequirementIntoGroup(req, group) {\n\tconst kind = req.kind ?? \"named\";\n\tconst typeOnly = req.typeOnly === true;\n\tif (kind === \"default\") {\n\t\tconst existingTypeOnly = group.defaults.get(req.symbol);\n\t\tgroup.defaults.set(req.symbol, existingTypeOnly === void 0 ? typeOnly : existingTypeOnly && typeOnly);\n\t} else {\n\t\tconst alias = req.alias && req.alias !== req.symbol ? req.alias : null;\n\t\tconst key = namedBindingKey(req.symbol, alias);\n\t\tconst existing = group.named.get(key);\n\t\tif (existing) existing.typeOnly = existing.typeOnly && typeOnly;\n\t\telse group.named.set(key, {\n\t\t\tsymbol: req.symbol,\n\t\t\talias,\n\t\t\ttypeOnly\n\t\t});\n\t}\n\tmergeAttributes(req, group);\n}\nfunction mergeAttributes(req, group) {\n\tconst incoming = req.attributes ?? null;\n\tif (!group.attributesSet) {\n\t\tgroup.attributes = incoming;\n\t\tgroup.attributesSet = true;\n\t\treturn;\n\t}\n\tif (!attributesEqual(group.attributes, incoming)) throw contractError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `Conflicting import attributes for module \"${req.moduleSpecifier}\": ${stringifyAttributes(group.attributes)} vs ${stringifyAttributes(incoming)}.`, { meta: { moduleSpecifier: req.moduleSpecifier } });\n}\nfunction attributesEqual(a, b) {\n\tif (a === b) return true;\n\tif (a === null || b === null) return false;\n\tconst aKeys = Object.keys(a).sort();\n\tconst bKeys = Object.keys(b).sort();\n\tif (aKeys.length !== bKeys.length) return false;\n\tfor (let i = 0; i < aKeys.length; i++) {\n\t\tconst key = aKeys[i];\n\t\tif (key !== bKeys[i]) return false;\n\t\tif (a[key] !== b[key]) return false;\n\t}\n\treturn true;\n}\nfunction stringifyAttributes(attrs) {\n\tif (attrs === null) return \"(none)\";\n\treturn `{ ${Object.entries(attrs).sort(([a], [b]) => a.localeCompare(b)).map(([k, v]) => `${k}: ${JSON.stringify(v)}`).join(\", \")} }`;\n}\nfunction renderModuleImport(moduleSpecifier, group) {\n\tconst attrs = buildAttributesClause(group.attributes);\n\tconst defaultEntries = [...group.defaults.entries()].sort(([a], [b]) => a.localeCompare(b));\n\tconst hasNamed = group.named.size > 0;\n\tif (defaultEntries.length > 1) {\n\t\tconst defaultLines = defaultEntries.map(([symbol, typeOnly]) => `import ${typeOnly ? \"type \" : \"\"}${symbol} from '${moduleSpecifier}'${attrs};`);\n\t\tif (!hasNamed) return defaultLines.join(\"\\n\");\n\t\treturn [...defaultLines, renderNamedOnlyStatement(moduleSpecifier, group, attrs)].join(\"\\n\");\n\t}\n\tconst defaultEntry = defaultEntries[0];\n\tconst hasDefault = defaultEntry !== void 0;\n\tconst [defaultSymbol, defaultTypeOnly] = defaultEntry ?? [null, true];\n\tconst typeOnlyStatement = isStatementTypeOnly(hasDefault, defaultTypeOnly, group);\n\tif (typeOnlyStatement && hasDefault && hasNamed) return `${`import type ${defaultSymbol} from '${moduleSpecifier}'${attrs};`}\\n${`import type { ${renderNamedBindingsList(group, true)} } from '${moduleSpecifier}'${attrs};`}`;\n\treturn `${typeOnlyStatement ? \"import type\" : \"import\"} ${buildImportClause(defaultSymbol, group, typeOnlyStatement)} from '${moduleSpecifier}'${attrs};`;\n}\nfunction renderNamedOnlyStatement(moduleSpecifier, group, attrs) {\n\tconst typeOnlyStatement = [...group.named.values()].every((binding) => binding.typeOnly);\n\treturn `${typeOnlyStatement ? \"import type\" : \"import\"} { ${renderNamedBindingsList(group, typeOnlyStatement)} } from '${moduleSpecifier}'${attrs};`;\n}\nfunction isStatementTypeOnly(hasDefault, defaultTypeOnly, group) {\n\tconst hasNamed = group.named.size > 0;\n\tif (!hasDefault && !hasNamed) return false;\n\tif (hasDefault && !defaultTypeOnly) return false;\n\tfor (const binding of group.named.values()) if (!binding.typeOnly) return false;\n\treturn true;\n}\nfunction buildImportClause(defaultSymbol, group, statementTypeOnly) {\n\tconst hasNamed = group.named.size > 0;\n\tconst hasDefault = defaultSymbol !== null;\n\tconst namedClause = hasNamed ? renderNamedBindingsList(group, statementTypeOnly) : \"\";\n\tif (hasDefault && hasNamed) return `${defaultSymbol}, { ${namedClause} }`;\n\tif (hasDefault) return defaultSymbol;\n\treturn `{ ${namedClause} }`;\n}\nfunction renderNamedBindingsList(group, statementTypeOnly) {\n\treturn [...group.named.values()].sort(compareNamedBindings).map((binding) => renderNamedBinding(binding, statementTypeOnly)).join(\", \");\n}\nfunction compareNamedBindings(a, b) {\n\tif (a.symbol !== b.symbol) return a.symbol < b.symbol ? -1 : 1;\n\tconst aAlias = a.alias ?? \"\";\n\tconst bAlias = b.alias ?? \"\";\n\tif (aAlias === bAlias) return 0;\n\treturn aAlias < bAlias ? -1 : 1;\n}\nfunction namedBindingKey(symbol, alias) {\n\treturn `${symbol}\\x00${alias ?? \"\"}`;\n}\nfunction renderNamedBinding(binding, statementTypeOnly) {\n\tconst prefix = !statementTypeOnly && binding.typeOnly ? \"type \" : \"\";\n\tconst aliasClause = binding.alias !== null ? ` as ${binding.alias}` : \"\";\n\treturn `${prefix}${binding.symbol}${aliasClause}`;\n}\nfunction buildAttributesClause(attrs) {\n\tif (attrs === null) return \"\";\n\tconst entries = Object.entries(attrs).sort(([a], [b]) => a.localeCompare(b)).map(([k, v]) => `${k}: ${JSON.stringify(v)}`);\n\tif (entries.length === 0) return \"\";\n\treturn ` with { ${entries.join(\", \")} }`;\n}\n//#endregion\n//#region src/ts-expression.ts\n/**\n* Abstract base class for any IR node that can be emitted as a TypeScript\n* expression and declare its own import requirements.\n*\n* A top-level renderer walks an array of these polymorphically, concatenates\n* `renderTypeScript()` results, and aggregates `importRequirements()` into a\n* deduplicated import block.\n*/\nvar TsExpression = class {};\n//#endregion\nexport { TsExpression, jsonToTsSource, renderImports };\n\n//# sourceMappingURL=index.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,SAAS,eAAe,OAAO;CAC9B,IAAI,UAAU,KAAK,GAAG,OAAO;CAC7B,IAAI,UAAU,MAAM,OAAO;CAC3B,IAAI,OAAO,UAAU,UAAU,OAAO,iBAAiB,KAAK;CAC5D,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,WAAW,OAAO,OAAO,KAAK;CAChF,IAAI,MAAM,QAAQ,KAAK,GAAG;EACzB,IAAI,MAAM,WAAW,GAAG,OAAO;EAC/B,MAAM,QAAQ,MAAM,KAAK,MAAM,eAAe,CAAC,CAAC;EAChD,MAAM,aAAa,IAAI,MAAM,KAAK,IAAI,EAAE;EACxC,IAAI,WAAW,UAAU,IAAI,OAAO;EACpC,OAAO,MAAM,MAAM,KAAK,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,KAAK,EAAE;CACrD;CACA,IAAI,OAAO,UAAU,UAAU;EAC9B,MAAM,UAAU,OAAO,QAAQ,KAAK,CAAC,CAAC,QAAQ,GAAG,OAAO,MAAM,KAAK,CAAC;EACpE,IAAI,QAAQ,WAAW,GAAG,OAAO;EACjC,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E,QAAQ,OAAO,EAAE,SAAS,EAAE,SAAS,KAAK;CAC7D,MAAM,SAAS,EAAE,SAAS;CAC1B,MAAM,SAAS,EAAE,SAAS;CAC1B,IAAI,WAAW,QAAQ,OAAO;CAC9B,OAAO,SAAS,SAAS,KAAK;AAC/B;AACA,SAAS,gBAAgB,QAAQ,OAAO;CACvC,OAAO,GAAG,OAAO,MAAM,SAAS;AACjC;AACA,SAAS,mBAAmB,SAAS,mBAAmB;CACvD,MAAM,SAAS,CAAC,qBAAqB,QAAQ,WAAW,UAAU;CAClE,MAAM,cAAc,QAAQ,UAAU,OAAO,OAAO,QAAQ,UAAU;CACtE,OAAO,GAAG,SAAS,QAAQ,SAAS;AACrC;AACA,SAAS,sBAAsB,OAAO;CACrC,IAAI,UAAU,MAAM,OAAO;CAC3B,MAAM,UAAU,OAAO,QAAQ,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,OAAO,GAAG,EAAE,IAAI,KAAK,UAAU,CAAC,GAAG;CACzH,IAAI,QAAQ,WAAW,GAAG,OAAO;CACjC,OAAO,WAAW,QAAQ,KAAK,IAAI,EAAE;AACtC;;;;;;;;;AAWA,IAAI,eAAe,MAAM,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { S as ContractValueObject, g as ContractModelBase, n as ApplicationDomain } from "./domain-envelope-D6Wn9AmZ-BqZKTT9U.mjs";
2
+ //#region ../../../1-framework/0-foundation/contract/dist/types.d.mts
3
+ //#region src/domain-namespace-access.d.ts
4
+ /**
5
+ * Models map for the contract's single domain namespace. Throws when the
6
+ * contract does not declare exactly one namespace — bare-name access is
7
+ * ambiguous across namespaces and must be qualified explicitly (TML-2550).
8
+ */
9
+ declare function domainModelsAtDefaultNamespace(domain: ApplicationDomain): Record<string, ContractModelBase>;
10
+ /**
11
+ * Value objects for the contract's single domain namespace, when present.
12
+ * Throws when the contract does not declare exactly one namespace.
13
+ */
14
+ declare function domainValueObjectsAtDefaultNamespace(domain: ApplicationDomain): Record<string, ContractValueObject> | undefined;
15
+ //#endregion
16
+ export { domainValueObjectsAtDefaultNamespace as n, domainModelsAtDefaultNamespace as t };
17
+ //# sourceMappingURL=types-ByeQhU9p.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-ByeQhU9p.d.mts","names":[],"sources":["../../../../1-framework/0-foundation/contract/dist/types.d.mts"],"mappings":";;;;;;;;iBAUiB,+BAA+B,QAAQ,oBAAoB,eAAe;;;;;iBAK1E,qCAAqC,QAAQ,oBAAoB,eAAe"}
@@ -0,0 +1,7 @@
1
+ //#region ../../../1-framework/0-foundation/utils/dist/types.d.mts
2
+ //#region src/types.d.ts
3
+ type Simplify<T> = { [K in keyof T]: T[K]; } & {};
4
+ type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
5
+ //#endregion
6
+ export { UnionToIntersection as n, Simplify as t };
7
+ //# sourceMappingURL=types-DGxlljKG.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-DGxlljKG.d.mts","names":[],"sources":["../../../../1-framework/0-foundation/utils/dist/types.d.mts"],"mappings":";;KACK,SAAS,QAAQ,WAAW,IAAI,EAAE;KAClC,oBAAoB,MAAM,qBAAqB,GAAG,8BAA8B,SAAS,cAAc"}
@@ -0,0 +1,96 @@
1
+ import { t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
2
+ import { n as contractError, r as soleDomainNamespaceId } from "./default-namespace-D4vCwkXg-BaiW8LNK.mjs";
3
+ import { t as asNamespaceId } from "./namespace-id-asbWpwMw-3yxn-tRe.mjs";
4
+ import { type } from "arktype";
5
+ //#region ../../../1-framework/0-foundation/contract/dist/types.mjs
6
+ /**
7
+ * Resolves the effective control policy for a storage-plane node.
8
+ *
9
+ * Precedence: node-level value → contract default → `'managed'`.
10
+ *
11
+ * Both parameters are optional raw values so this function stays node-type-agnostic
12
+ * and can be called by any consumer (verifier, planner, etc.) without importing IR classes.
13
+ */
14
+ function effectiveControlPolicy(nodeControl, defaultControlPolicy) {
15
+ return nodeControl ?? defaultControlPolicy ?? "managed";
16
+ }
17
+ const CrossReferenceSchema = /* @__PURE__ */ blindCast(/* @__PURE__ */ type({
18
+ "+": "reject",
19
+ namespace: "string",
20
+ model: "string",
21
+ "space?": "string"
22
+ }));
23
+ const DEFAULT_CROSS_REF_NAMESPACE = "__unbound__";
24
+ function crossRef(model, namespace = DEFAULT_CROSS_REF_NAMESPACE, space) {
25
+ return {
26
+ namespace: asNamespaceId(namespace),
27
+ model,
28
+ ...space !== void 0 ? { space } : {}
29
+ };
30
+ }
31
+ /**
32
+ * Models map for the contract's single domain namespace. Throws when the
33
+ * contract does not declare exactly one namespace — bare-name access is
34
+ * ambiguous across namespaces and must be qualified explicitly (TML-2550).
35
+ */
36
+ function domainModelsAtDefaultNamespace(domain) {
37
+ const namespaceId = soleDomainNamespaceId(domain);
38
+ const domainNamespace = domain.namespaces[namespaceId];
39
+ if (domainNamespace === void 0) throw contractError("CONTRACT.NAMESPACE_INVALID", `domain namespace "${namespaceId}" is not present on the contract`, { meta: {
40
+ reason: "domain-namespace-missing",
41
+ namespaceId
42
+ } });
43
+ return domainNamespace.models;
44
+ }
45
+ /**
46
+ * Value objects for the contract's single domain namespace, when present.
47
+ * Throws when the contract does not declare exactly one namespace.
48
+ */
49
+ function domainValueObjectsAtDefaultNamespace(domain) {
50
+ return domain.namespaces[soleDomainNamespaceId(domain)]?.valueObjects;
51
+ }
52
+ function executionHash(value) {
53
+ return value;
54
+ }
55
+ function coreHash(value) {
56
+ return value;
57
+ }
58
+ function profileHash(value) {
59
+ return value;
60
+ }
61
+ /**
62
+ * Runtime predicate for `ColumnDefaultLiteralInputValue`. Authoring layers
63
+ * resolve template values from caller-supplied args (typed `unknown` at the
64
+ * boundary) and need to validate before constructing a `ColumnDefault`.
65
+ * Accepts JSON primitives, plain arrays/objects of JSON values, and `Date`
66
+ * instances. Rejects functions, class instances (other than `Date`),
67
+ * `undefined`, `bigint`, `symbol`, and arrays/objects containing those.
68
+ */
69
+ function isColumnDefaultLiteralInputValue(value) {
70
+ if (value === null) return true;
71
+ const t = typeof value;
72
+ if (t === "string" || t === "number" || t === "boolean") return true;
73
+ if (value instanceof Date) return true;
74
+ if (Array.isArray(value)) return value.every(isColumnDefaultLiteralInputValue);
75
+ if (t === "object" && Object.getPrototypeOf(value) === Object.prototype) return Object.values(value).every(isColumnDefaultLiteralInputValue);
76
+ return false;
77
+ }
78
+ function isColumnDefault(value) {
79
+ if (typeof value !== "object" || value === null) return false;
80
+ const kind = value.kind;
81
+ if (kind === "literal") return "value" in value;
82
+ if (kind === "function") return typeof value.expression === "string";
83
+ return false;
84
+ }
85
+ function isExecutionMutationDefaultValue(value) {
86
+ if (typeof value !== "object" || value === null) return false;
87
+ const candidate = value;
88
+ if (candidate.kind !== "generator") return false;
89
+ if (typeof candidate.id !== "string") return false;
90
+ if (candidate.params !== void 0 && (typeof candidate.params !== "object" || candidate.params === null || Array.isArray(candidate.params))) return false;
91
+ return true;
92
+ }
93
+ //#endregion
94
+ export { domainValueObjectsAtDefaultNamespace as a, isColumnDefault as c, profileHash as d, domainModelsAtDefaultNamespace as i, isColumnDefaultLiteralInputValue as l, coreHash as n, effectiveControlPolicy as o, crossRef as r, executionHash as s, CrossReferenceSchema as t, isExecutionMutationDefaultValue as u };
95
+
96
+ //# sourceMappingURL=types-DgdgskBY.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-DgdgskBY.mjs","names":[],"sources":["../../../../1-framework/0-foundation/contract/dist/types.mjs"],"sourcesContent":["import { n as soleDomainNamespaceId, r as contractError, t as UNBOUND_DOMAIN_NAMESPACE_ID } from \"./default-namespace-D4vCwkXg.mjs\";\nimport { t as resolveDomainModel } from \"./resolve-domain-model-BovPAsW2.mjs\";\nimport { t as asNamespaceId } from \"./namespace-id-asbWpwMw.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { type } from \"arktype\";\n//#region src/control-policy.ts\n/**\n* Resolves the effective control policy for a storage-plane node.\n*\n* Precedence: node-level value → contract default → `'managed'`.\n*\n* Both parameters are optional raw values so this function stays node-type-agnostic\n* and can be called by any consumer (verifier, planner, etc.) without importing IR classes.\n*/\nfunction effectiveControlPolicy(nodeControl, defaultControlPolicy) {\n\treturn nodeControl ?? defaultControlPolicy ?? \"managed\";\n}\n//#endregion\n//#region src/cross-reference.ts\nconst CrossReferenceSchema = /* @__PURE__ */ blindCast(/* @__PURE__ */ type({\n\t\"+\": \"reject\",\n\tnamespace: \"string\",\n\tmodel: \"string\",\n\t\"space?\": \"string\"\n}));\nconst DEFAULT_CROSS_REF_NAMESPACE = \"__unbound__\";\nfunction crossRef(model, namespace = DEFAULT_CROSS_REF_NAMESPACE, space) {\n\treturn {\n\t\tnamespace: asNamespaceId(namespace),\n\t\tmodel,\n\t\t...space !== void 0 ? { space } : {}\n\t};\n}\n//#endregion\n//#region src/domain-namespace-access.ts\n/**\n* Models map for the contract's single domain namespace. Throws when the\n* contract does not declare exactly one namespace — bare-name access is\n* ambiguous across namespaces and must be qualified explicitly (TML-2550).\n*/\nfunction domainModelsAtDefaultNamespace(domain) {\n\tconst namespaceId = soleDomainNamespaceId(domain);\n\tconst domainNamespace = domain.namespaces[namespaceId];\n\tif (domainNamespace === void 0) throw contractError(\"CONTRACT.NAMESPACE_INVALID\", `domain namespace \"${namespaceId}\" is not present on the contract`, { meta: {\n\t\treason: \"domain-namespace-missing\",\n\t\tnamespaceId\n\t} });\n\treturn domainNamespace.models;\n}\n/**\n* Value objects for the contract's single domain namespace, when present.\n* Throws when the contract does not declare exactly one namespace.\n*/\nfunction domainValueObjectsAtDefaultNamespace(domain) {\n\treturn domain.namespaces[soleDomainNamespaceId(domain)]?.valueObjects;\n}\n//#endregion\n//#region src/types.ts\nfunction executionHash(value) {\n\treturn value;\n}\nfunction coreHash(value) {\n\treturn value;\n}\nfunction profileHash(value) {\n\treturn value;\n}\n/**\n* Runtime predicate for `ColumnDefaultLiteralInputValue`. Authoring layers\n* resolve template values from caller-supplied args (typed `unknown` at the\n* boundary) and need to validate before constructing a `ColumnDefault`.\n* Accepts JSON primitives, plain arrays/objects of JSON values, and `Date`\n* instances. Rejects functions, class instances (other than `Date`),\n* `undefined`, `bigint`, `symbol`, and arrays/objects containing those.\n*/\nfunction isColumnDefaultLiteralInputValue(value) {\n\tif (value === null) return true;\n\tconst t = typeof value;\n\tif (t === \"string\" || t === \"number\" || t === \"boolean\") return true;\n\tif (value instanceof Date) return true;\n\tif (Array.isArray(value)) return value.every(isColumnDefaultLiteralInputValue);\n\tif (t === \"object\" && Object.getPrototypeOf(value) === Object.prototype) return Object.values(value).every(isColumnDefaultLiteralInputValue);\n\treturn false;\n}\nfunction isColumnDefault(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst kind = value.kind;\n\tif (kind === \"literal\") return \"value\" in value;\n\tif (kind === \"function\") return typeof value.expression === \"string\";\n\treturn false;\n}\nfunction isExecutionMutationDefaultValue(value) {\n\tif (typeof value !== \"object\" || value === null) return false;\n\tconst candidate = value;\n\tif (candidate.kind !== \"generator\") return false;\n\tif (typeof candidate.id !== \"string\") return false;\n\tif (candidate.params !== void 0 && (typeof candidate.params !== \"object\" || candidate.params === null || Array.isArray(candidate.params))) return false;\n\treturn true;\n}\n//#endregion\nexport { CrossReferenceSchema, UNBOUND_DOMAIN_NAMESPACE_ID, asNamespaceId, coreHash, crossRef, domainModelsAtDefaultNamespace, domainValueObjectsAtDefaultNamespace, effectiveControlPolicy, executionHash, isColumnDefault, isColumnDefaultLiteralInputValue, isExecutionMutationDefaultValue, profileHash, resolveDomainModel, soleDomainNamespaceId };\n\n//# sourceMappingURL=types.mjs.map"],"mappings":";;;;;;;;;;;;;AAcA,SAAS,uBAAuB,aAAa,sBAAsB;CAClE,OAAO,eAAe,wBAAwB;AAC/C;AAGA,MAAM,uBAAuC,0BAA0B,qBAAK;CAC3E,KAAK;CACL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CAC5D,OAAO;AACR;AACA,SAAS,gCAAgC,OAAO;CAC/C,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,OAAO;CACxD,MAAM,YAAY;CAClB,IAAI,UAAU,SAAS,aAAa,OAAO;CAC3C,IAAI,OAAO,UAAU,OAAO,UAAU,OAAO;CAC7C,IAAI,UAAU,WAAW,KAAK,MAAM,OAAO,UAAU,WAAW,YAAY,UAAU,WAAW,QAAQ,MAAM,QAAQ,UAAU,MAAM,IAAI,OAAO;CAClJ,OAAO;AACR"}
@@ -0,0 +1,14 @@
1
+ //#region ../../../1-framework/1-core/framework-components/dist/types-import-spec-DRKzrJ20.d.mts
2
+ //#region src/shared/types-import-spec.d.ts
3
+ /**
4
+ * Specifies how to import TypeScript types from a package.
5
+ * Used in extension pack manifests to declare codec and operation type imports.
6
+ */
7
+ interface TypesImportSpec {
8
+ readonly package: string;
9
+ readonly named: string;
10
+ readonly alias: string;
11
+ }
12
+ //#endregion
13
+ export { TypesImportSpec as t };
14
+ //# sourceMappingURL=types-import-spec-DRKzrJ20-WYwyCtil.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-import-spec-DRKzrJ20-WYwyCtil.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/types-import-spec-DRKzrJ20.d.mts"],"mappings":";;;;;;UAKU;WACC;WACA;WACA"}
@@ -0,0 +1,20 @@
1
+ //#region ../../../1-framework/1-core/framework-components/dist/utils.mjs
2
+ function sortKeys(value) {
3
+ if (value === null || typeof value !== "object") return value;
4
+ if (Array.isArray(value)) return value.map(sortKeys);
5
+ const sorted = Object.create(null);
6
+ for (const key of Object.keys(value).sort()) sorted[key] = sortKeys(value[key]);
7
+ return sorted;
8
+ }
9
+ /**
10
+ * `JSON.stringify` with object keys sorted lexicographically at every level. Two structurally equal values produce the same string regardless of object key insertion order, so the result is a stable cache key for JSON-shaped values.
11
+ *
12
+ * Array order is preserved; primitives serialise as their JSON form. Inputs are expected to be JSON-safe (the typeParams shape on {@link CodecRef} is `JsonValue`-constrained for this reason); callers that need to canonicalise non-JSON-safe values (BigInt, Dates, typed arrays) should use `canonicalStringify` from `@internal/utils/canonical-stringify` instead.
13
+ */
14
+ function canonicalizeJson(value) {
15
+ return JSON.stringify(sortKeys(value));
16
+ }
17
+ //#endregion
18
+ export { canonicalizeJson as t };
19
+
20
+ //# sourceMappingURL=utils-DMAM0unR.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils-DMAM0unR.mjs","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/utils.mjs"],"sourcesContent":["//#region src/utils/canonicalize-json.ts\nfunction sortKeys(value) {\n\tif (value === null || typeof value !== \"object\") return value;\n\tif (Array.isArray(value)) return value.map(sortKeys);\n\tconst sorted = Object.create(null);\n\tfor (const key of Object.keys(value).sort()) sorted[key] = sortKeys(value[key]);\n\treturn sorted;\n}\n/**\n* `JSON.stringify` with object keys sorted lexicographically at every level. Two structurally equal values produce the same string regardless of object key insertion order, so the result is a stable cache key for JSON-shaped values.\n*\n* Array order is preserved; primitives serialise as their JSON form. Inputs are expected to be JSON-safe (the typeParams shape on {@link CodecRef} is `JsonValue`-constrained for this reason); callers that need to canonicalise non-JSON-safe values (BigInt, Dates, typed arrays) should use `canonicalStringify` from `@internal/utils/canonical-stringify` instead.\n*/\nfunction canonicalizeJson(value) {\n\treturn JSON.stringify(sortKeys(value));\n}\n//#endregion\nexport { canonicalizeJson };\n\n//# sourceMappingURL=utils.mjs.map"],"mappings":";AACA,SAAS,SAAS,OAAO;CACxB,IAAI,UAAU,QAAQ,OAAO,UAAU,UAAU,OAAO;CACxD,IAAI,MAAM,QAAQ,KAAK,GAAG,OAAO,MAAM,IAAI,QAAQ;CACnD,MAAM,SAAS,OAAO,OAAO,IAAI;CACjC,KAAK,MAAM,OAAO,OAAO,KAAK,KAAK,CAAC,CAAC,KAAK,GAAG,OAAO,OAAO,SAAS,MAAM,IAAI;CAC9E,OAAO;AACR;;;;;;AAMA,SAAS,iBAAiB,OAAO;CAChC,OAAO,KAAK,UAAU,SAAS,KAAK,CAAC;AACtC"}
@@ -0,0 +1,11 @@
1
+ //#region ../../../1-framework/1-core/framework-components/dist/utils.d.mts
2
+ //#region src/utils/canonicalize-json.d.ts
3
+ /**
4
+ * `JSON.stringify` with object keys sorted lexicographically at every level. Two structurally equal values produce the same string regardless of object key insertion order, so the result is a stable cache key for JSON-shaped values.
5
+ *
6
+ * Array order is preserved; primitives serialise as their JSON form. Inputs are expected to be JSON-safe (the typeParams shape on {@link CodecRef} is `JsonValue`-constrained for this reason); callers that need to canonicalise non-JSON-safe values (BigInt, Dates, typed arrays) should use `canonicalStringify` from `@internal/utils/canonical-stringify` instead.
7
+ */
8
+ declare function canonicalizeJson(value: unknown): string;
9
+ //#endregion
10
+ export { canonicalizeJson as t };
11
+ //# sourceMappingURL=utils-DeWL_zD9.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils-DeWL_zD9.d.mts","names":[],"sources":["../../../../1-framework/1-core/framework-components/dist/utils.d.mts"],"mappings":";;;;;;;iBAMiB,iBAAiB"}
@@ -0,0 +1,16 @@
1
+ import { i as JsonValue, n as JsonObject, r as JsonPrimitive, t as JsonArray } from "./json-Dkqr3say.mjs";
2
+ import { a as ok, i as notOk, n as Ok, o as okVoid, r as Result, t as NotOk } from "./result-Bpupv5vO.mjs";
3
+ import { a as docsUrlFor, i as StructuredErrorOptions, n as DOCS_ERRORS_VERSION, o as isStructuredError, r as StructuredError, s as structuredError, t as DOCS_BASE } from "./structured-error-BVmv2aPB.mjs";
4
+ import { n as UnionToIntersection, t as Simplify } from "./types-DGxlljKG.mjs";
5
+ import { t as abortable } from "./abortable-DBbAaT_4.mjs";
6
+ import { t as isArrayEqual } from "./array-equal-dUd-VPlk.mjs";
7
+ import { n as invariant, t as assertDefined } from "./assertions-BEQnOIQd.mjs";
8
+ import { t as canonicalStringify } from "./canonical-stringify-Bl6agy_g.mjs";
9
+ import { n as castAs, t as blindCast } from "./casts-D29CHGrr.mjs";
10
+ import { t as ifDefined } from "./defined-BSXuxrnl.mjs";
11
+ import { t as hashContent } from "./hash-content-DwEUh-Rx.mjs";
12
+ import { n as assertNever, r as isInternalError, t as InternalError } from "./internal-error-kK8QvlDE.mjs";
13
+ import { t as isThenable } from "./promise-DHJWZv49.mjs";
14
+ import { n as redactDatabaseUrl, t as RedactedDatabaseUrl } from "./redact-db-url-BlaloOwt.mjs";
15
+ import { t as SimplifyDeep } from "./simplify-deep-Dw9I_ZUl.mjs";
16
+ export { DOCS_BASE, DOCS_ERRORS_VERSION, InternalError, type JsonArray, type JsonObject, type JsonPrimitive, type JsonValue, type NotOk, type Ok, type RedactedDatabaseUrl, type Result, type Simplify, type SimplifyDeep, type StructuredError, type StructuredErrorOptions, type UnionToIntersection, abortable, assertDefined, assertNever, blindCast, canonicalStringify, castAs, docsUrlFor, hashContent, ifDefined, invariant, isArrayEqual, isInternalError, isStructuredError, isThenable, notOk, ok, okVoid, redactDatabaseUrl, structuredError };
package/dist/utils.mjs ADDED
@@ -0,0 +1,13 @@
1
+ import { n as castAs, t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
2
+ import { t as ifDefined } from "./defined-BQWA85QH-BRSBMULx.mjs";
3
+ import { a as structuredError, i as isStructuredError, n as DOCS_ERRORS_VERSION, r as docsUrlFor, t as DOCS_BASE } from "./structured-error-H6WU9Kjt.mjs";
4
+ import { t as isArrayEqual } from "./array-equal-28xupwIB.mjs";
5
+ import { t as abortable } from "./abortable-CQO6uG9F.mjs";
6
+ import { n as assertNever, r as isInternalError, t as InternalError } from "./internal-error-BIc-ehme-ouBQPoEL.mjs";
7
+ import { n as invariant, t as assertDefined } from "./assertions-Cz-GWH8P.mjs";
8
+ import { t as canonicalStringify } from "./canonical-stringify-DY4NaAJi.mjs";
9
+ import { t as hashContent } from "./hash-content-Bugg_nZn.mjs";
10
+ import { t as isThenable } from "./promise-D8meygPf.mjs";
11
+ import { t as redactDatabaseUrl } from "./redact-db-url-CRWJWdB1.mjs";
12
+ import { n as ok, r as okVoid, t as notOk } from "./result-CBZ8X9mU.mjs";
13
+ export { DOCS_BASE, DOCS_ERRORS_VERSION, InternalError, abortable, assertDefined, assertNever, blindCast, canonicalStringify, castAs, docsUrlFor, hashContent, ifDefined, invariant, isArrayEqual, isInternalError, isStructuredError, isThenable, notOk, ok, okVoid, redactDatabaseUrl, structuredError };
@@ -0,0 +1,2 @@
1
+ import { t as abortable } from "./abortable-DBbAaT_4.mjs";
2
+ export { abortable };
@@ -0,0 +1,2 @@
1
+ import { t as abortable } from "./abortable-CQO6uG9F.mjs";
2
+ export { abortable };
@@ -0,0 +1,2 @@
1
+ import { t as isArrayEqual } from "./array-equal-dUd-VPlk.mjs";
2
+ export { isArrayEqual };
@@ -0,0 +1,2 @@
1
+ import { t as isArrayEqual } from "./array-equal-28xupwIB.mjs";
2
+ export { isArrayEqual };
@@ -0,0 +1,2 @@
1
+ import { n as invariant, t as assertDefined } from "./assertions-BEQnOIQd.mjs";
2
+ export { assertDefined, invariant };
@@ -0,0 +1,2 @@
1
+ import { n as invariant, t as assertDefined } from "./assertions-Cz-GWH8P.mjs";
2
+ export { assertDefined, invariant };
@@ -0,0 +1,2 @@
1
+ import { t as canonicalStringify } from "./canonical-stringify-Bl6agy_g.mjs";
2
+ export { canonicalStringify };
@@ -0,0 +1,2 @@
1
+ import { t as canonicalStringify } from "./canonical-stringify-DY4NaAJi.mjs";
2
+ export { canonicalStringify };
@@ -0,0 +1,2 @@
1
+ import { n as castAs, t as blindCast } from "./casts-D29CHGrr.mjs";
2
+ export { blindCast, castAs };
@@ -0,0 +1,2 @@
1
+ import { n as castAs, t as blindCast } from "./casts-DpaahrlC-Bd5n2coI.mjs";
2
+ export { blindCast, castAs };
@@ -0,0 +1,2 @@
1
+ import { t as ifDefined } from "./defined-BSXuxrnl.mjs";
2
+ export { ifDefined };
@@ -0,0 +1,2 @@
1
+ import { t as ifDefined } from "./defined-BQWA85QH-BRSBMULx.mjs";
2
+ export { ifDefined };
@@ -0,0 +1,2 @@
1
+ import { t as hashContent } from "./hash-content-DwEUh-Rx.mjs";
2
+ export { hashContent };
@@ -0,0 +1,2 @@
1
+ import { t as hashContent } from "./hash-content-Bugg_nZn.mjs";
2
+ export { hashContent };
@@ -0,0 +1,2 @@
1
+ import { n as assertNever, r as isInternalError, t as InternalError } from "./internal-error-kK8QvlDE.mjs";
2
+ export { InternalError, assertNever, isInternalError };
@@ -0,0 +1,2 @@
1
+ import { n as assertNever, r as isInternalError, t as InternalError } from "./internal-error-BIc-ehme-ouBQPoEL.mjs";
2
+ export { InternalError, assertNever, isInternalError };
@@ -0,0 +1,2 @@
1
+ import { i as JsonValue, n as JsonObject, r as JsonPrimitive, t as JsonArray } from "./json-Dkqr3say.mjs";
2
+ export type { JsonArray, JsonObject, JsonPrimitive, JsonValue };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import { t as isThenable } from "./promise-DHJWZv49.mjs";
2
+ export { isThenable };
@@ -0,0 +1,2 @@
1
+ import { t as isThenable } from "./promise-D8meygPf.mjs";
2
+ export { isThenable };
@@ -0,0 +1,2 @@
1
+ import { n as redactDatabaseUrl, t as RedactedDatabaseUrl } from "./redact-db-url-BlaloOwt.mjs";
2
+ export { type RedactedDatabaseUrl, redactDatabaseUrl };
@@ -0,0 +1,2 @@
1
+ import { t as redactDatabaseUrl } from "./redact-db-url-CRWJWdB1.mjs";
2
+ export { redactDatabaseUrl };
@@ -0,0 +1,2 @@
1
+ import { a as ok, i as notOk, n as Ok, o as okVoid, r as Result, t as NotOk } from "./result-Bpupv5vO.mjs";
2
+ export { type NotOk, type Ok, type Result, notOk, ok, okVoid };
@@ -0,0 +1,2 @@
1
+ import { n as ok, r as okVoid, t as notOk } from "./result-CBZ8X9mU.mjs";
2
+ export { notOk, ok, okVoid };