@noy-db/hub 0.6.0-pre.10 → 0.6.0-pre.12

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 (219) hide show
  1. package/dist/{api-RXUMEKT3.js → api-XDMGLURJ.js} +6 -6
  2. package/dist/attestation/index.js +12 -12
  3. package/dist/{backup-AVAGHAJE.js → backup-AWHG6ODK.js} +6 -6
  4. package/dist/blobs/index.js +5 -5
  5. package/dist/broker/index.js +6 -6
  6. package/dist/{bundle-handle-GFNHT52M.js → bundle-handle-G4R37BQV.js} +2 -2
  7. package/dist/cargo/index.js +18 -18
  8. package/dist/{chunk-W77KZHCW.js → chunk-25FGCLYS.js} +4 -4
  9. package/dist/{chunk-7H73RIE3.js → chunk-2APC6HS6.js} +2 -2
  10. package/dist/{chunk-FFDNKRCY.js → chunk-44JENXEG.js} +2 -2
  11. package/dist/{chunk-3URQC7EH.js → chunk-4X5Z5SRV.js} +3 -3
  12. package/dist/{chunk-WFUIE565.js → chunk-5GMMIDJX.js} +3 -3
  13. package/dist/{chunk-U5O6GIWZ.js → chunk-5XFTL73S.js} +2 -2
  14. package/dist/{chunk-SUFG5E73.js → chunk-6OC6YASM.js} +2 -2
  15. package/dist/{chunk-JRKZTEZZ.js → chunk-7BEHYALK.js} +3 -3
  16. package/dist/{chunk-6BU3L4UE.js → chunk-7HF4J7Z5.js} +2 -2
  17. package/dist/{chunk-YJ6IONGA.js → chunk-7MT56F4U.js} +2 -2
  18. package/dist/{chunk-7MNBICB5.js → chunk-7VPWXVKU.js} +3 -3
  19. package/dist/{chunk-6SAFL5YE.js → chunk-AZQVFXJF.js} +2 -2
  20. package/dist/{chunk-PPMBY7YS.js → chunk-B2P7M2D2.js} +6 -6
  21. package/dist/{chunk-3737A6EA.js → chunk-BGQ63MCT.js} +74 -17
  22. package/dist/chunk-BGQ63MCT.js.map +1 -0
  23. package/dist/{chunk-XWX7GL56.js → chunk-CCZ5DEJ7.js} +2 -2
  24. package/dist/{chunk-3IXIU6FP.js → chunk-DEFCPAXD.js} +2 -2
  25. package/dist/{chunk-WASHZV34.js → chunk-DIICZPWS.js} +2 -2
  26. package/dist/{chunk-G6S5VVHP.js → chunk-E2TN45ZD.js} +2 -2
  27. package/dist/{chunk-O2ERS4UJ.js → chunk-EBEKSNKS.js} +5 -5
  28. package/dist/{chunk-5JY5TSVY.js → chunk-G4VQSGXL.js} +3 -3
  29. package/dist/{chunk-5ZKS6ZE2.js → chunk-GV2EFYNV.js} +2 -2
  30. package/dist/{chunk-E6427JU2.js → chunk-H4YQSDOI.js} +17 -1
  31. package/dist/chunk-H4YQSDOI.js.map +1 -0
  32. package/dist/{chunk-X56RTUK3.js → chunk-K525AZ5C.js} +2 -2
  33. package/dist/{chunk-2Z3NCLNX.js → chunk-K6TQEDVJ.js} +5 -5
  34. package/dist/{chunk-JJNOLSG5.js → chunk-L2UHRVB4.js} +3 -3
  35. package/dist/{chunk-4GZ6XOVW.js → chunk-LRNODVQX.js} +7 -7
  36. package/dist/{chunk-YPYHVOXP.js → chunk-NSRITINN.js} +1 -1
  37. package/dist/chunk-NSRITINN.js.map +1 -0
  38. package/dist/{chunk-BEFVYAR5.js → chunk-NT432TE6.js} +3 -3
  39. package/dist/{chunk-GAG7QOVO.js → chunk-OI7ZJUYT.js} +3 -3
  40. package/dist/{chunk-FZ6NYJ7L.js → chunk-OUST5WDV.js} +3 -3
  41. package/dist/{chunk-3JVXVJ7L.js → chunk-OXCU7G5I.js} +8 -8
  42. package/dist/{chunk-XEJA6K76.js → chunk-P2PLXMHO.js} +9 -9
  43. package/dist/{chunk-CDB2HVQW.js → chunk-P2Y2F6EB.js} +3 -3
  44. package/dist/{chunk-PDLLCOGD.js → chunk-PGWXE5CR.js} +3 -3
  45. package/dist/{chunk-6FJWSWFT.js → chunk-PK3URBVU.js} +2 -2
  46. package/dist/{chunk-52JPHN5N.js → chunk-QS2PUZC7.js} +4 -4
  47. package/dist/{chunk-2DHSSLOD.js → chunk-RSHNUOSJ.js} +6 -6
  48. package/dist/{chunk-4VUPLMZ6.js → chunk-SPA5WX3T.js} +3 -3
  49. package/dist/{chunk-PNKHAKQ7.js → chunk-SV4BNALS.js} +3 -3
  50. package/dist/{chunk-VZ3XFUQ7.js → chunk-SYFEJFIO.js} +2 -2
  51. package/dist/{chunk-5O5HRRTV.js → chunk-T227WEHE.js} +4 -4
  52. package/dist/{chunk-QULVCV3M.js → chunk-TJCRCCPT.js} +2 -2
  53. package/dist/{chunk-PL2GHSCM.js → chunk-UAHHWR4P.js} +3 -3
  54. package/dist/{chunk-BRVW2GS5.js → chunk-UANGJ2YB.js} +38 -7
  55. package/dist/chunk-UANGJ2YB.js.map +1 -0
  56. package/dist/{chunk-FMQJZH4R.js → chunk-UFM3WVIF.js} +2 -2
  57. package/dist/{chunk-Q6TEJXBX.js → chunk-VA3PPYTQ.js} +4 -4
  58. package/dist/{chunk-6NVPFKN3.js → chunk-VBCDVWRU.js} +4 -4
  59. package/dist/{chunk-WLZ47GSL.js → chunk-XJIGOFN6.js} +3 -3
  60. package/dist/{chunk-ADW22QSB.js → chunk-XXVIHJZY.js} +3 -3
  61. package/dist/{chunk-4I72F5DF.js → chunk-Y3H4WOP3.js} +4 -4
  62. package/dist/{chunk-NPP5R7FF.js → chunk-YY3PEDBR.js} +5 -5
  63. package/dist/{chunk-2BMRJ6LQ.js → chunk-Z7SMBVNM.js} +2 -2
  64. package/dist/{chunk-N3BI6P3J.js → chunk-ZSKB5BDK.js} +59 -57
  65. package/dist/{chunk-N3BI6P3J.js.map → chunk-ZSKB5BDK.js.map} +1 -1
  66. package/dist/classified/index.js +3 -3
  67. package/dist/{classified-marker-2KJAXRRO.js → classified-marker-EHRSGBM7.js} +3 -3
  68. package/dist/{collection-facade-QEJIM6BC.js → collection-facade-5UJW6QRB.js} +8 -8
  69. package/dist/consent/index.js +4 -4
  70. package/dist/cover/index.js +2 -2
  71. package/dist/custody/index.js +6 -6
  72. package/dist/{dead-filter-DCB62VWW.js → dead-filter-ANPRM2LD.js} +2 -2
  73. package/dist/{delegation-MO7YZYJS.js → delegation-6NUQCURX.js} +4 -4
  74. package/dist/derivations/index.js +3 -3
  75. package/dist/{derive-IUA6JFLB.js → derive-5PFJNNNU.js} +4 -4
  76. package/dist/directory/index.js +5 -5
  77. package/dist/{dispatch-MJ6SHB3Y.js → dispatch-EO2QHEXK.js} +9 -9
  78. package/dist/{dispatch-FZEAWKVM.js → dispatch-UGU775MV.js} +5 -5
  79. package/dist/{enclave-JU4YIEPB.js → enclave-3Z7VTJAW.js} +4 -4
  80. package/dist/{executor-YIQB2S6N.js → executor-AB4BCJO4.js} +9 -9
  81. package/dist/{export-accessible-4S36PQNR.js → export-accessible-JXCJGHCF.js} +7 -7
  82. package/dist/{extract-partition-IO7FDZ2P.js → extract-partition-2WDL4FJ5.js} +10 -10
  83. package/dist/{fanout-sidecar-NNAJQXMX.js → fanout-sidecar-3Q6BWNSS.js} +4 -4
  84. package/dist/forget/index.js +4 -4
  85. package/dist/history/index.js +6 -6
  86. package/dist/i18n/index.js +6 -6
  87. package/dist/index.js +49 -49
  88. package/dist/introspection/index.js +5 -5
  89. package/dist/{issue-RIVHSY2S.js → issue-EABYJWX5.js} +6 -6
  90. package/dist/kernel/query/builder.d.ts +15 -2
  91. package/dist/kernel/query/join.d.ts +27 -0
  92. package/dist/kernel/types.d.ts +29 -0
  93. package/dist/{ledger-AETNF4OM.js → ledger-ZO5OKKGR.js} +6 -6
  94. package/dist/liberate-S3JR4TQT.js +24 -0
  95. package/dist/{link-set-E5HNY67I.js → link-set-ZZYDZPL4.js} +5 -5
  96. package/dist/{managed-secret-CWQ6PND5.js → managed-secret-6FITSKDO.js} +3 -3
  97. package/dist/materialized-views/index.js +9 -9
  98. package/dist/{noydb-SNZONAYA.js → noydb-SPEVD5JA.js} +27 -27
  99. package/dist/periods/index.js +6 -6
  100. package/dist/pod/index.js +30 -30
  101. package/dist/policy/index.js +3 -3
  102. package/dist/port/to/index.d.ts +2 -2
  103. package/dist/port/to/locator.d.ts +54 -8
  104. package/dist/portability/index.js +6 -6
  105. package/dist/{post-register-2XSSMGEQ.js → post-register-577X4FAU.js} +4 -4
  106. package/dist/query/index.js +2 -2
  107. package/dist/{register-4EFJCVYD.js → register-OXUXXIWT.js} +10 -10
  108. package/dist/{registry-4SDHHOJ7.js → registry-L3CO5ZAY.js} +4 -4
  109. package/dist/{registry-OYTFGWVK.js → registry-QFIVGS2W.js} +4 -4
  110. package/dist/{request-withdrawal-KGXGDPVQ.js → request-withdrawal-UV42CNR5.js} +9 -9
  111. package/dist/{reveal-BW36KCOQ.js → reveal-PCQYK4NO.js} +3 -3
  112. package/dist/{revoke-JFN773KF.js → revoke-26DFO36Z.js} +6 -6
  113. package/dist/sealed-record/index.js +6 -6
  114. package/dist/search/index.js +1 -1
  115. package/dist/{seed-GDV5PT4R.js → seed-BVO6SSKH.js} +6 -6
  116. package/dist/sequence/index.js +4 -4
  117. package/dist/session/index.js +3 -3
  118. package/dist/{signer-TA55QB6R.js → signer-DDO7QEID.js} +5 -5
  119. package/dist/snapshots/index.js +5 -5
  120. package/dist/{stale-ARHFVL5U.js → stale-3FW6U4OU.js} +5 -5
  121. package/dist/{storage-V7MTFAQJ.js → storage-M7L2EK3F.js} +5 -5
  122. package/dist/{store-coordination-provider-GFCUOBR6.js → store-coordination-provider-3QGSXG3P.js} +3 -3
  123. package/dist/sync/index.js +4 -4
  124. package/dist/team/index.js +8 -8
  125. package/dist/tiers/index.js +4 -4
  126. package/dist/to/index.js +16 -6
  127. package/dist/to/index.js.map +1 -1
  128. package/dist/{walk-3ZECBFDA.js → walk-OFXQN5US.js} +6 -6
  129. package/dist/with-sync/engine.d.ts +21 -0
  130. package/dist/{withdraw-accessible-7PG4DYQK.js → withdraw-accessible-7XKYVTMP.js} +8 -8
  131. package/package.json +3 -3
  132. package/dist/chunk-3737A6EA.js.map +0 -1
  133. package/dist/chunk-BRVW2GS5.js.map +0 -1
  134. package/dist/chunk-E6427JU2.js.map +0 -1
  135. package/dist/chunk-YPYHVOXP.js.map +0 -1
  136. package/dist/liberate-GFN4C7RR.js +0 -24
  137. /package/dist/{api-RXUMEKT3.js.map → api-XDMGLURJ.js.map} +0 -0
  138. /package/dist/{backup-AVAGHAJE.js.map → backup-AWHG6ODK.js.map} +0 -0
  139. /package/dist/{bundle-handle-GFNHT52M.js.map → bundle-handle-G4R37BQV.js.map} +0 -0
  140. /package/dist/{chunk-W77KZHCW.js.map → chunk-25FGCLYS.js.map} +0 -0
  141. /package/dist/{chunk-7H73RIE3.js.map → chunk-2APC6HS6.js.map} +0 -0
  142. /package/dist/{chunk-FFDNKRCY.js.map → chunk-44JENXEG.js.map} +0 -0
  143. /package/dist/{chunk-3URQC7EH.js.map → chunk-4X5Z5SRV.js.map} +0 -0
  144. /package/dist/{chunk-WFUIE565.js.map → chunk-5GMMIDJX.js.map} +0 -0
  145. /package/dist/{chunk-U5O6GIWZ.js.map → chunk-5XFTL73S.js.map} +0 -0
  146. /package/dist/{chunk-SUFG5E73.js.map → chunk-6OC6YASM.js.map} +0 -0
  147. /package/dist/{chunk-JRKZTEZZ.js.map → chunk-7BEHYALK.js.map} +0 -0
  148. /package/dist/{chunk-6BU3L4UE.js.map → chunk-7HF4J7Z5.js.map} +0 -0
  149. /package/dist/{chunk-YJ6IONGA.js.map → chunk-7MT56F4U.js.map} +0 -0
  150. /package/dist/{chunk-7MNBICB5.js.map → chunk-7VPWXVKU.js.map} +0 -0
  151. /package/dist/{chunk-6SAFL5YE.js.map → chunk-AZQVFXJF.js.map} +0 -0
  152. /package/dist/{chunk-PPMBY7YS.js.map → chunk-B2P7M2D2.js.map} +0 -0
  153. /package/dist/{chunk-XWX7GL56.js.map → chunk-CCZ5DEJ7.js.map} +0 -0
  154. /package/dist/{chunk-3IXIU6FP.js.map → chunk-DEFCPAXD.js.map} +0 -0
  155. /package/dist/{chunk-WASHZV34.js.map → chunk-DIICZPWS.js.map} +0 -0
  156. /package/dist/{chunk-G6S5VVHP.js.map → chunk-E2TN45ZD.js.map} +0 -0
  157. /package/dist/{chunk-O2ERS4UJ.js.map → chunk-EBEKSNKS.js.map} +0 -0
  158. /package/dist/{chunk-5JY5TSVY.js.map → chunk-G4VQSGXL.js.map} +0 -0
  159. /package/dist/{chunk-5ZKS6ZE2.js.map → chunk-GV2EFYNV.js.map} +0 -0
  160. /package/dist/{chunk-X56RTUK3.js.map → chunk-K525AZ5C.js.map} +0 -0
  161. /package/dist/{chunk-2Z3NCLNX.js.map → chunk-K6TQEDVJ.js.map} +0 -0
  162. /package/dist/{chunk-JJNOLSG5.js.map → chunk-L2UHRVB4.js.map} +0 -0
  163. /package/dist/{chunk-4GZ6XOVW.js.map → chunk-LRNODVQX.js.map} +0 -0
  164. /package/dist/{chunk-BEFVYAR5.js.map → chunk-NT432TE6.js.map} +0 -0
  165. /package/dist/{chunk-GAG7QOVO.js.map → chunk-OI7ZJUYT.js.map} +0 -0
  166. /package/dist/{chunk-FZ6NYJ7L.js.map → chunk-OUST5WDV.js.map} +0 -0
  167. /package/dist/{chunk-3JVXVJ7L.js.map → chunk-OXCU7G5I.js.map} +0 -0
  168. /package/dist/{chunk-XEJA6K76.js.map → chunk-P2PLXMHO.js.map} +0 -0
  169. /package/dist/{chunk-CDB2HVQW.js.map → chunk-P2Y2F6EB.js.map} +0 -0
  170. /package/dist/{chunk-PDLLCOGD.js.map → chunk-PGWXE5CR.js.map} +0 -0
  171. /package/dist/{chunk-6FJWSWFT.js.map → chunk-PK3URBVU.js.map} +0 -0
  172. /package/dist/{chunk-52JPHN5N.js.map → chunk-QS2PUZC7.js.map} +0 -0
  173. /package/dist/{chunk-2DHSSLOD.js.map → chunk-RSHNUOSJ.js.map} +0 -0
  174. /package/dist/{chunk-4VUPLMZ6.js.map → chunk-SPA5WX3T.js.map} +0 -0
  175. /package/dist/{chunk-PNKHAKQ7.js.map → chunk-SV4BNALS.js.map} +0 -0
  176. /package/dist/{chunk-VZ3XFUQ7.js.map → chunk-SYFEJFIO.js.map} +0 -0
  177. /package/dist/{chunk-5O5HRRTV.js.map → chunk-T227WEHE.js.map} +0 -0
  178. /package/dist/{chunk-QULVCV3M.js.map → chunk-TJCRCCPT.js.map} +0 -0
  179. /package/dist/{chunk-PL2GHSCM.js.map → chunk-UAHHWR4P.js.map} +0 -0
  180. /package/dist/{chunk-FMQJZH4R.js.map → chunk-UFM3WVIF.js.map} +0 -0
  181. /package/dist/{chunk-Q6TEJXBX.js.map → chunk-VA3PPYTQ.js.map} +0 -0
  182. /package/dist/{chunk-6NVPFKN3.js.map → chunk-VBCDVWRU.js.map} +0 -0
  183. /package/dist/{chunk-WLZ47GSL.js.map → chunk-XJIGOFN6.js.map} +0 -0
  184. /package/dist/{chunk-ADW22QSB.js.map → chunk-XXVIHJZY.js.map} +0 -0
  185. /package/dist/{chunk-4I72F5DF.js.map → chunk-Y3H4WOP3.js.map} +0 -0
  186. /package/dist/{chunk-NPP5R7FF.js.map → chunk-YY3PEDBR.js.map} +0 -0
  187. /package/dist/{chunk-2BMRJ6LQ.js.map → chunk-Z7SMBVNM.js.map} +0 -0
  188. /package/dist/{classified-marker-2KJAXRRO.js.map → classified-marker-EHRSGBM7.js.map} +0 -0
  189. /package/dist/{collection-facade-QEJIM6BC.js.map → collection-facade-5UJW6QRB.js.map} +0 -0
  190. /package/dist/{dead-filter-DCB62VWW.js.map → dead-filter-ANPRM2LD.js.map} +0 -0
  191. /package/dist/{delegation-MO7YZYJS.js.map → delegation-6NUQCURX.js.map} +0 -0
  192. /package/dist/{derive-IUA6JFLB.js.map → derive-5PFJNNNU.js.map} +0 -0
  193. /package/dist/{dispatch-MJ6SHB3Y.js.map → dispatch-EO2QHEXK.js.map} +0 -0
  194. /package/dist/{dispatch-FZEAWKVM.js.map → dispatch-UGU775MV.js.map} +0 -0
  195. /package/dist/{enclave-JU4YIEPB.js.map → enclave-3Z7VTJAW.js.map} +0 -0
  196. /package/dist/{executor-YIQB2S6N.js.map → executor-AB4BCJO4.js.map} +0 -0
  197. /package/dist/{export-accessible-4S36PQNR.js.map → export-accessible-JXCJGHCF.js.map} +0 -0
  198. /package/dist/{extract-partition-IO7FDZ2P.js.map → extract-partition-2WDL4FJ5.js.map} +0 -0
  199. /package/dist/{fanout-sidecar-NNAJQXMX.js.map → fanout-sidecar-3Q6BWNSS.js.map} +0 -0
  200. /package/dist/{issue-RIVHSY2S.js.map → issue-EABYJWX5.js.map} +0 -0
  201. /package/dist/{ledger-AETNF4OM.js.map → ledger-ZO5OKKGR.js.map} +0 -0
  202. /package/dist/{liberate-GFN4C7RR.js.map → liberate-S3JR4TQT.js.map} +0 -0
  203. /package/dist/{link-set-E5HNY67I.js.map → link-set-ZZYDZPL4.js.map} +0 -0
  204. /package/dist/{managed-secret-CWQ6PND5.js.map → managed-secret-6FITSKDO.js.map} +0 -0
  205. /package/dist/{noydb-SNZONAYA.js.map → noydb-SPEVD5JA.js.map} +0 -0
  206. /package/dist/{post-register-2XSSMGEQ.js.map → post-register-577X4FAU.js.map} +0 -0
  207. /package/dist/{register-4EFJCVYD.js.map → register-OXUXXIWT.js.map} +0 -0
  208. /package/dist/{registry-4SDHHOJ7.js.map → registry-L3CO5ZAY.js.map} +0 -0
  209. /package/dist/{registry-OYTFGWVK.js.map → registry-QFIVGS2W.js.map} +0 -0
  210. /package/dist/{request-withdrawal-KGXGDPVQ.js.map → request-withdrawal-UV42CNR5.js.map} +0 -0
  211. /package/dist/{reveal-BW36KCOQ.js.map → reveal-PCQYK4NO.js.map} +0 -0
  212. /package/dist/{revoke-JFN773KF.js.map → revoke-26DFO36Z.js.map} +0 -0
  213. /package/dist/{seed-GDV5PT4R.js.map → seed-BVO6SSKH.js.map} +0 -0
  214. /package/dist/{signer-TA55QB6R.js.map → signer-DDO7QEID.js.map} +0 -0
  215. /package/dist/{stale-ARHFVL5U.js.map → stale-3FW6U4OU.js.map} +0 -0
  216. /package/dist/{storage-V7MTFAQJ.js.map → storage-M7L2EK3F.js.map} +0 -0
  217. /package/dist/{store-coordination-provider-GFCUOBR6.js.map → store-coordination-provider-3QGSXG3P.js.map} +0 -0
  218. /package/dist/{walk-3ZECBFDA.js.map → walk-OFXQN5US.js.map} +0 -0
  219. /package/dist/{withdraw-accessible-7PG4DYQK.js.map → withdraw-accessible-7XKYVTMP.js.map} +0 -0
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  openEnvelopeJson
3
- } from "./chunk-3URQC7EH.js";
3
+ } from "./chunk-4X5Z5SRV.js";
4
4
  import {
5
5
  encrypt
6
6
  } from "./chunk-VCETL77O.js";
7
7
  import {
8
8
  NOYDB_FORMAT_VERSION
9
- } from "./chunk-YPYHVOXP.js";
9
+ } from "./chunk-NSRITINN.js";
10
10
  import {
11
11
  ConflictError,
12
12
  USER_ENVELOPE_COLLECTION,
@@ -148,4 +148,4 @@ export {
148
148
  deleteUserEnvelope,
149
149
  listUserEnvelopeIds
150
150
  };
151
- //# sourceMappingURL=chunk-5JY5TSVY.js.map
151
+ //# sourceMappingURL=chunk-G4VQSGXL.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  dictCollectionName
3
- } from "./chunk-WFUIE565.js";
3
+ } from "./chunk-5GMMIDJX.js";
4
4
  import {
5
5
  getAtPath,
6
6
  presentI18nForJoin
@@ -487,4 +487,4 @@ export {
487
487
  forgetDerivedFanout,
488
488
  selfWriteFieldEqual
489
489
  };
490
- //# sourceMappingURL=chunk-5ZKS6ZE2.js.map
490
+ //# sourceMappingURL=chunk-GV2EFYNV.js.map
@@ -9,6 +9,21 @@ import {
9
9
  // src/kernel/query/join.ts
10
10
  var DEFAULT_JOIN_MAX_ROWS = 5e4;
11
11
  var JOIN_WARN_FRACTION = 0.8;
12
+ function referencesJoinAlias(clause, aliases) {
13
+ if (clause.type !== "field") return false;
14
+ return aliases.has(clause.field.split(".")[0]);
15
+ }
16
+ function splitAroundJoins(clauses, joins) {
17
+ if (joins.length === 0 || clauses.length === 0) return { preJoin: clauses, postJoin: [] };
18
+ const aliases = new Set(joins.map((leg) => leg.as));
19
+ const preJoin = [];
20
+ const postJoin = [];
21
+ for (const clause of clauses) {
22
+ ;
23
+ (referencesJoinAlias(clause, aliases) ? postJoin : preJoin).push(clause);
24
+ }
25
+ return { preJoin, postJoin };
26
+ }
12
27
  function coerceRefKey(value) {
13
28
  if (value === null || value === void 0) return null;
14
29
  if (typeof value === "string") return value;
@@ -167,7 +182,8 @@ function resetJoinWarnings() {
167
182
 
168
183
  export {
169
184
  DEFAULT_JOIN_MAX_ROWS,
185
+ splitAroundJoins,
170
186
  applyJoins,
171
187
  resetJoinWarnings
172
188
  };
173
- //# sourceMappingURL=chunk-E6427JU2.js.map
189
+ //# sourceMappingURL=chunk-H4YQSDOI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/kernel/query/join.ts"],"sourcesContent":["/**\n * Query DSL `.join()` — eager, single-FK, intra-vault joins.\n *\n * resolves a ref()-declared foreign key into an attached\n * right-side record under an alias, using one of two planner paths\n * selected automatically:\n *\n * - **nested-loop** — right-side source exposes `lookupById`, so\n * each left row costs O(1). This is the common path for joins\n * against a Collection, which backs `lookupById` with a Map\n * lookup.\n * - **hash** — right-side has only `snapshot()`. Build a\n * `Map<id, record>` once, probe per left row. Same asymptotic\n * cost for our collections, but the path exists as a fallback\n * for custom QuerySource implementations and as an explicit\n * test-only override via `{ strategy: 'hash' }`.\n *\n * Scope:\n *\n * - Equi-joins on declared `ref()` fields only. Joins on\n * undeclared fields throw at plan time with an actionable error\n * naming the field and collection.\n * - Same-vault only. Cross-vault correlation goes\n * through `queryAcross`; this is an architectural\n * invariant, not a limitation we plan to lift.\n * - Hard row ceiling via `JoinTooLargeError` — default 50k per\n * side, override via `{ maxRows }`. Warns at 80% of the ceiling\n * on the existing warn channel.\n * - Three ref-mode behaviors on dangling refs:\n * strict → `DanglingReferenceError`,\n * warn → attach `null` with a one-shot warning,\n * cascade → attach `null` silently (cascade is a delete-time\n * mode; any dangling refs still present at read time are\n * mid-flight cascades or orphans from earlier, not a DSL error).\n *\n * Partition-awareness seam:\n *\n * Every `JoinLeg` carries a `partitionScope` field that is always\n * `'all'` in. The executor never reads this field.\n * partition-aware joins will start populating it from `where()`\n * predicates on the partition key without changing the planner's\n * external shape — this is the whole reason it exists now.\n *\n * Joins stay OUT of the ledger: reads don't touch `_ledger/`,\n * including joined reads.\n */\n\nimport type { RefDescriptor, RefMode } from '../refs.js'\nimport type { Clause } from './predicate.js'\nimport { readPath } from './predicate.js'\nimport { JoinTooLargeError, DanglingReferenceError } from '../errors.js'\n\n/** Planner strategy for a single join leg. Auto-selected unless overridden. */\nexport type JoinStrategy = 'hash' | 'nested'\n\n/** Default per-side row ceiling before `.join()` throws `JoinTooLargeError`. */\nexport const DEFAULT_JOIN_MAX_ROWS = 50_000\n\n/**\n * Fraction of the row ceiling at which a one-shot warning is emitted.\n * At 80% we warn; at 100% we throw. The warn gives consumers a\n * heads-up before the hard error so they can raise the ceiling or\n * filter further without first hitting a broken query.\n */\nconst JOIN_WARN_FRACTION = 0.8\n\n/**\n * Internal representation of a single join leg in the query plan.\n *\n * This is the primary place where constraint #1 is honored:\n * every leg carries a `partitionScope` field that is always `'all'`\n * in and is never read by the executor. partition-aware\n * joins will start populating it from `where()` predicates on the\n * partition key without changing the planner's external shape.\n */\nexport interface JoinLeg {\n /** Field on the left-side record holding the foreign key value. */\n readonly field: string\n /** Alias key under which the joined right-side record attaches. */\n readonly as: string\n /** Target collection name, resolved from the `ref()` declaration. */\n readonly target: string\n /** Ref mode controlling behavior on dangling refs at read time. */\n readonly mode: RefMode\n /** Manual planner strategy override. `undefined` → auto-select. */\n readonly strategy: JoinStrategy | undefined\n /** Per-side row ceiling override. `undefined` → DEFAULT_JOIN_MAX_ROWS. */\n readonly maxRows: number | undefined\n /**\n * Partition scope for future partition-aware joins. Always `'all'`\n * today — the executor never reads this field. Future versions will\n * populate it from `where()` predicates without breaking the\n * planner's external shape. Do not remove even though it looks\n * unused today — that's the whole point of having it.\n */\n readonly partitionScope: 'all' | readonly string[]\n /**\n * When `true`, this is a dictionary join. The executor\n * resolves the left-field value against the dict snapshot and\n * attaches `{ ...labels, key }` rather than a right-side record.\n * `target` holds the dictionary name (not a collection name).\n */\n readonly isDictJoin?: true\n}\n\n/**\n * Minimal shape of a joinable right-side record source.\n *\n * Collections implement this structurally via their `QuerySource`;\n * sources without `lookupById` force the hash-join fallback. Kept as\n * a thin interface so tests can wire up plain-object sources without\n * pulling in the full Collection class.\n *\n * The optional `subscribe` is used by `Query.live()` to merge\n * right-side change streams into the live re-run trigger. Sources\n * that omit `subscribe` still work for live joins — they just\n * don't drive re-fires when their right side mutates. Collection\n * implements `subscribe` by hooking into the existing per-\n * vault event emitter.\n */\nexport interface JoinableSource {\n snapshot(): readonly unknown[]\n lookupById?(id: string): unknown\n /**\n * Default locale a label-resolving query falls back to when the query\n * itself is locale-less. Set by a `staticDict()`-backed source from its\n * `displayLocale` so `{ by: 'label' }` resolves under a locale-less read.\n * Plain `_dict_*`-backed sources omit it.\n */\n readonly displayLocale?: string\n /**\n * Sync present-for-join dressing (#626 retirement, #650 Task 6) — when\n * present and the query carries a locale, each joined right-side record\n * is passed through this hook (built by the right-side `Collection` from\n * its own i18n-text + lookup-label bindings) BEFORE it is attached under\n * the leg's alias — so a joined `i18nText` field resolves to a string\n * (not a raw `{ locale }` map) and a joined lookup field gains its\n * `<field>Label`. Locale-less queries leave joined fields raw\n * (consistent with a locale-less read). Replaces the old `i18nFields`\n * data field — the join executor no longer resolves i18n locale itself,\n * it just calls this hook.\n */\n readonly presentForJoin?: (record: unknown, locale: string) => unknown\n /**\n * Subscribe to mutations on this source. The callback fires\n * AFTER the underlying record set has been updated. Returns an\n * unsubscribe function. Optional — sources without this method\n * cannot trigger live-join re-fires from their side.\n */\n subscribe?(cb: () => void): () => void\n}\n\n/**\n * Join resolution context attached to a `Query` when it's constructed\n * from a `Collection`. Holds everything the `.join()` method needs to\n * translate a field name into a target collection + ref mode, and\n * everything the executor needs to read the right side.\n *\n * Kept as a structural interface so `Vault` can implement it\n * without `Query` needing to import `Vault` (circular-import\n * avoid). The Collection wires this up in its `query()` method using\n * the `joinResolver` back-reference the Vault passes in.\n */\nexport interface JoinContext {\n /** Name of the left-side (owning) collection. */\n readonly leftCollection: string\n /**\n * The owning collection's default locale. Used to resolve joined\n * i18n fields at the `join` layer when a terminal call doesn't pass an\n * explicit locale — so `openVault({ locale })` flows to joins like it does\n * to `get`/`list`. A per-call `toArray({ locale })` overrides it.\n */\n readonly defaultLocale?: string\n /** Look up a `RefDescriptor` by field name on the left collection. */\n resolveRef(field: string): RefDescriptor | null\n /** Resolve a right-side source by target collection name. */\n resolveSource(collectionName: string): JoinableSource | null\n /**\n * Resolve a dictKey join source. Returns a `JoinableSource`\n * whose snapshot exposes `{ key, ...labels }` records, keyed by the\n * stable dictionary key. `null` when the field is not a dictKey.\n *\n * The source is built from the compartment's in-memory dictionary\n * snapshot — same data as `DictionaryHandle.list()`, O(1) per lookup.\n */\n resolveDictSource?(field: string): JoinableSource | null\n}\n\n/**\n * Does this clause address a field that only exists once join legs are\n * attached — i.e. is its path rooted at a join alias?\n *\n * Only `FieldClause` is inspectable. A `FilterClause` carries an opaque\n * function and a `WherePredicateClause` a named one, so neither can be\n * classified; both stay on the pre-join side, which is where they have\n * always run. See `splitAroundJoins`.\n */\nfunction referencesJoinAlias(clause: Clause, aliases: ReadonlySet<string>): boolean {\n if (clause.type !== 'field') return false\n // `where('client.name', …)` addresses the alias; so does the anti-join\n // form `where('client', '==', null)`, where the path IS the alias.\n return aliases.has(clause.field.split('.')[0]!)\n}\n\n/**\n * Split a plan's clauses into those evaluable before the join legs run and\n * those that need the joined shape (#1030).\n *\n * Join legs attach after `where` so the left set can be narrowed (and\n * index-driven) first. That is the right default, but it silently broke any\n * predicate addressing a joined alias: the field did not exist yet, so\n * `readPath` returned `undefined`, nothing matched, and the query returned an\n * empty result with no error.\n *\n * The split is deliberately narrow. When no clause addresses an alias — every\n * query written against the previous behaviour — `postJoin` is empty and the\n * caller takes its original path unchanged. The reordered pipeline therefore\n * only ever runs for queries that match nothing today.\n *\n * KNOWN RESIDUAL: `.filter(r => r.client?.name === 'Ann')` cannot be\n * classified (the predicate is a closure), so it still runs pre-join and still\n * sees no alias. Prefer `.where()` for anything addressing a joined field.\n *\n * Shared by the eager `Query` and the streaming `ScanBuilder` so the two\n * cannot drift on which side a clause belongs to.\n */\nexport function splitAroundJoins(\n clauses: readonly Clause[],\n joins: readonly JoinLeg[],\n): { readonly preJoin: readonly Clause[]; readonly postJoin: readonly Clause[] } {\n if (joins.length === 0 || clauses.length === 0) return { preJoin: clauses, postJoin: [] }\n const aliases = new Set(joins.map(leg => leg.as))\n const preJoin: Clause[] = []\n const postJoin: Clause[] = []\n for (const clause of clauses) {\n ;(referencesJoinAlias(clause, aliases) ? postJoin : preJoin).push(clause)\n }\n return { preJoin, postJoin }\n}\n\n/**\n * Coerce an unknown FK value into a lookup key string.\n *\n * Legitimate ref values are strings or numbers — the same narrowing\n * the write-time `enforceRefsOnPut` path applies. Anything else\n * (objects, arrays, booleans, null, undefined) is treated as \"no\n * ref\" and returns `null`, so the join attaches `null` instead of\n * running `String({})` and producing `'[object Object]'` as a\n * bucket key. This matches the lint rule guidance and keeps\n * bizarre FK values from producing silently-wrong lookups.\n */\nfunction coerceRefKey(value: unknown): string | null {\n if (value === null || value === undefined) return null\n if (typeof value === 'string') return value\n if (typeof value === 'number' || typeof value === 'bigint') return String(value)\n return null\n}\n\n/**\n * Warn-channel deduplication for dangling-ref `'warn'` mode. Keyed\n * by `field → target:refId` so the same dangling ref only produces\n * one warning even across many rows or repeated queries.\n */\nconst warnedDanglingKeys = new Set<string>()\nfunction warnOnceDangling(field: string, target: string, refId: string): void {\n const key = `${field}→${target}:${refId}`\n if (warnedDanglingKeys.has(key)) return\n warnedDanglingKeys.add(key)\n console.warn(\n `[noy-db] .join() encountered dangling ref in 'warn' mode: ` +\n `field \"${field}\" → \"${target}:${refId}\" not found. Attaching null.`,\n )\n}\n\n/**\n * Track row-ceiling warnings to fire only once per (target, side).\n * Prevents per-query spam when a consumer is running the same query\n * repeatedly (e.g. in a reactive loop).\n */\nconst warnedCeilingKeys = new Set<string>()\nfunction warnCeilingApproaching(\n target: string,\n side: 'left' | 'right',\n rows: number,\n maxRows: number,\n): void {\n const key = `${target}:${side}`\n if (warnedCeilingKeys.has(key)) return\n warnedCeilingKeys.add(key)\n const pct = Math.round((rows / maxRows) * 100)\n console.warn(\n `[noy-db] .join() ${side} side is at ${pct}% of the ${maxRows}-row ` +\n `ceiling for target \"${target}\" (${rows} rows). Streaming joins over ` +\n `scan() are not yet supported for collections that need to exceed this.`,\n )\n}\n\n/**\n * Apply every join leg in the plan against a base set of left-side\n * rows. Called by the query executor after `where` / `orderBy` /\n * `offset` / `limit` have narrowed the left set.\n *\n * Each leg attaches a `leg.as` field to every row. Returns a new\n * array of plain objects — the original left rows are not mutated\n * (structural sharing is fine for the inner fields, but the\n * top-level object is a fresh clone so consumers can further mutate\n * safely).\n *\n * **Ordering:** joins run AFTER orderBy / limit / offset in v1.\n * This keeps the planner simple and means queries like \"top 10\n * invoices with client\" sort and paginate the left side first, then\n * join. Sorting *by* a joined field is out of scope for — users\n * can post-sort the result array in userland or wait for \n * (multi-FK chaining) which can be layered on top.\n *\n * **Multi-FK chaining:** each leg's `maxRows` is enforced\n * against the current left-row count independently. Because\n * joins are equi-joins on the target's primary key (one-to-one or\n * one-to-null), the left row count is constant across legs — no\n * cartesian blowup. The per-leg left-side check is still necessary\n * so that a later leg with a tighter ceiling correctly fires on a\n * query like `.join('a', { maxRows: 100_000 }).join('b', { maxRows: 50 })`,\n * which should throw on the second leg if the left set exceeds 50.\n */\nexport function applyJoins(\n rows: readonly unknown[],\n joins: readonly JoinLeg[],\n context: JoinContext,\n locale?: string,\n): unknown[] {\n if (joins.length === 0) return [...rows]\n\n let result: unknown[] = [...rows]\n for (const leg of joins) {\n result = applyOneJoin(result, leg, context, locale)\n }\n return result\n}\n\nfunction applyOneJoin(\n leftRows: readonly unknown[],\n leg: JoinLeg,\n context: JoinContext,\n locale?: string,\n): unknown[] {\n // Dict join path — resolve left-field value against the\n // dictionary snapshot and attach { key, ...labels } under leg.as.\n if (leg.isDictJoin) {\n const dictSource = context.resolveDictSource?.(leg.field)\n if (!dictSource) {\n throw new Error(\n `.join() field \"${leg.field}\" on \"${context.leftCollection}\" is declared as a ` +\n `dictKey join but the dict source could not be resolved. ` +\n `Ensure the dictionary has at least one entry.`,\n )\n }\n const out: unknown[] = []\n const snapshot = dictSource.snapshot()\n const dictMap = new Map<string, unknown>()\n for (const entry of snapshot) {\n const k = readPath(entry, 'key')\n if (typeof k === 'string') dictMap.set(k, entry)\n }\n for (const left of leftRows) {\n const rawId = readPath(left, leg.field)\n const key = coerceRefKey(rawId)\n const dictEntry = key === null ? undefined : dictMap.get(key)\n out.push({ ...(left as Record<string, unknown>), [leg.as]: dictEntry ?? null })\n }\n return out\n }\n\n const source = context.resolveSource(leg.target)\n if (!source) {\n throw new Error(\n `.join() cannot resolve target collection \"${leg.target}\" ` +\n `(referenced from field \"${leg.field}\" on \"${context.leftCollection}\"). ` +\n `Make sure the target collection has been opened via vault.collection() ` +\n `at least once before running the query.`,\n )\n }\n\n const maxRows = leg.maxRows ?? DEFAULT_JOIN_MAX_ROWS\n\n // Per-leg left-side ceiling check. In a\n // multi-FK chain, each leg's `maxRows` is enforced independently\n // against the current left-row count, so\n // `.join('a', { maxRows: 100_000 }).join('b', { maxRows: 50 })`\n // correctly throws on the second leg if the left set exceeds 50.\n if (leftRows.length > maxRows) {\n throw new JoinTooLargeError({\n leftRows: leftRows.length,\n rightRows: -1,\n maxRows,\n side: 'left',\n message:\n `.join() left side has ${leftRows.length} rows, exceeding the ${maxRows}-row ` +\n `ceiling for target \"${leg.target}\". Filter the left side further with ` +\n `where()/limit() before joining, or raise the ceiling via { maxRows }. ` +\n `Streaming joins over scan() are not yet supported.`,\n })\n }\n if (leftRows.length > maxRows * JOIN_WARN_FRACTION) {\n warnCeilingApproaching(leg.target, 'left', leftRows.length, maxRows)\n }\n\n const rightSnapshot = source.snapshot()\n if (rightSnapshot.length > maxRows) {\n throw new JoinTooLargeError({\n leftRows: leftRows.length,\n rightRows: rightSnapshot.length,\n maxRows,\n side: 'right',\n message:\n `.join() right side \"${leg.target}\" has ${rightSnapshot.length} rows, ` +\n `exceeding the ${maxRows}-row ceiling. Raise the ceiling via { maxRows } ` +\n `if the data genuinely fits in memory, or track for streaming joins.`,\n })\n }\n if (rightSnapshot.length > maxRows * JOIN_WARN_FRACTION) {\n warnCeilingApproaching(leg.target, 'right', rightSnapshot.length, maxRows)\n }\n\n // `join`-layer dressing (#650 Task 6, #626 retirement). When the query\n // carries a locale (per-call or the owning collection's default) and the\n // right side declares a `presentForJoin` hook, resolve each matched right\n // record through it before it's attached. Locale-less → leave raw.\n const effLocale = locale ?? context.defaultLocale\n const presentResolve: ((right: unknown) => unknown) | undefined =\n effLocale !== undefined && source.presentForJoin !== undefined\n ? (right) =>\n right !== null && typeof right === 'object'\n ? source.presentForJoin!(right, effLocale)\n : right\n : undefined\n\n // Strategy selection: explicit override wins; otherwise prefer\n // nested-loop when the source exposes lookupById (O(1) per row),\n // falling back to hash join when it doesn't.\n const strategy: JoinStrategy =\n leg.strategy ?? (source.lookupById ? 'nested' : 'hash')\n\n if (strategy === 'nested' && source.lookupById) {\n // Bind through an arrow so the `this` context of lookupById\n // doesn't drift — same pattern as the existing candidateRecords\n // helper in builder.ts.\n const lookup = (id: string): unknown => source.lookupById?.(id)\n return nestedLoopJoin(leftRows, leg, lookup, presentResolve)\n }\n return hashJoin(leftRows, leg, rightSnapshot, presentResolve)\n}\n\nfunction nestedLoopJoin(\n leftRows: readonly unknown[],\n leg: JoinLeg,\n lookupById: (id: string) => unknown,\n presentResolve?: (right: unknown) => unknown,\n): unknown[] {\n const out: unknown[] = []\n for (const left of leftRows) {\n const rawId = readPath(left, leg.field)\n const key = coerceRefKey(rawId)\n let right = key === null ? undefined : lookupById(key)\n if (presentResolve && right !== undefined) right = presentResolve(right)\n out.push(attachJoin(left, leg, right, rawId))\n }\n return out\n}\n\nfunction hashJoin(\n leftRows: readonly unknown[],\n leg: JoinLeg,\n rightSnapshot: readonly unknown[],\n presentResolve?: (right: unknown) => unknown,\n): unknown[] {\n // Build the right-side hash once per query execution. We key on\n // the `id` field because ref() always points to a target's primary\n // key — non-equi and non-id joins are out of scope for.\n const rightMap = new Map<string, unknown>()\n for (const record of rightSnapshot) {\n const rawId = readPath(record, 'id')\n const key = coerceRefKey(rawId)\n if (key !== null) {\n rightMap.set(key, record)\n }\n }\n const out: unknown[] = []\n for (const left of leftRows) {\n const rawId = readPath(left, leg.field)\n const key = coerceRefKey(rawId)\n let right = key === null ? undefined : rightMap.get(key)\n if (presentResolve && right !== undefined) right = presentResolve(right)\n out.push(attachJoin(left, leg, right, rawId))\n }\n return out\n}\n\n/**\n * Attach the resolved right-side record (or null) to the left row\n * under the alias, applying ref-mode semantics for the dangling\n * case.\n *\n * A left-side record whose FK field is null/undefined is NOT a\n * dangling ref — it's \"no reference at all\", which is always\n * allowed regardless of mode. This matches the write-time\n * `enforceRefsOnPut` behavior: \"Nullish ref values are allowed —\n * treat them as 'no reference'.\"\n *\n * Only non-null FKs pointing at non-existent targets trigger the\n * mode behavior.\n */\nfunction attachJoin(\n left: unknown,\n leg: JoinLeg,\n right: unknown,\n rawId: unknown,\n): unknown {\n if (left === null || typeof left !== 'object') {\n // Pathological input — return as-is. Shouldn't happen in\n // practice because QuerySource yields objects, but defensive\n // because plan execution is untyped at this layer.\n return left\n }\n const merged: Record<string, unknown> = { ...(left as Record<string, unknown>) }\n\n // \"No ref at all\" — null/undefined FK value, or a non-string/non-\n // number FK that coerceRefKey treated as no-ref. Never throws\n // regardless of mode; matches the write-time policy that nullish\n // refs are allowed.\n const refKey = coerceRefKey(rawId)\n if (right === undefined) {\n if (refKey !== null && leg.mode === 'strict') {\n throw new DanglingReferenceError({\n field: leg.field,\n target: leg.target,\n refId: refKey,\n message:\n `.join() strict dangling: record references \"${leg.target}:${refKey}\" ` +\n `via field \"${leg.field}\", but no such record exists. Use ref() mode 'warn' ` +\n `or 'cascade' if dangling refs are acceptable, or run ` +\n `vault.checkIntegrity() to find and fix the orphans.`,\n })\n }\n if (refKey !== null && leg.mode === 'warn') {\n warnOnceDangling(leg.field, leg.target, refKey)\n }\n // For 'cascade' and null refs we attach null silently. Cascade\n // is a delete-time mode; any dangling refs visible at read time\n // are either mid-flight or pre-existing orphans, not a DSL error.\n merged[leg.as] = null\n } else {\n merged[leg.as] = right\n }\n return merged\n}\n\n/**\n * Test-only: reset the join warning deduplication state between\n * tests. Production code never calls this — the dedup state is\n * intentionally process-scoped so a noisy query doesn't spam the\n * console once per component render.\n */\nexport function resetJoinWarnings(): void {\n warnedDanglingKeys.clear()\n warnedCeilingKeys.clear()\n}\n"],"mappings":";;;;;;;;;AAwDO,IAAM,wBAAwB;AAQrC,IAAM,qBAAqB;AAqI3B,SAAS,oBAAoB,QAAgB,SAAuC;AAClF,MAAI,OAAO,SAAS,QAAS,QAAO;AAGpC,SAAO,QAAQ,IAAI,OAAO,MAAM,MAAM,GAAG,EAAE,CAAC,CAAE;AAChD;AAwBO,SAAS,iBACd,SACA,OAC+E;AAC/E,MAAI,MAAM,WAAW,KAAK,QAAQ,WAAW,EAAG,QAAO,EAAE,SAAS,SAAS,UAAU,CAAC,EAAE;AACxF,QAAM,UAAU,IAAI,IAAI,MAAM,IAAI,SAAO,IAAI,EAAE,CAAC;AAChD,QAAM,UAAoB,CAAC;AAC3B,QAAM,WAAqB,CAAC;AAC5B,aAAW,UAAU,SAAS;AAC5B;AAAC,KAAC,oBAAoB,QAAQ,OAAO,IAAI,WAAW,SAAS,KAAK,MAAM;AAAA,EAC1E;AACA,SAAO,EAAE,SAAS,SAAS;AAC7B;AAaA,SAAS,aAAa,OAA+B;AACnD,MAAI,UAAU,QAAQ,UAAU,OAAW,QAAO;AAClD,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,MAAI,OAAO,UAAU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AACvD,QAAI,kBAAkB,UAAU,OAAW,SAAQ,eAAe,KAAK;AACvE,QAAI,KAAK,WAAW,MAAM,KAAK,OAAO,KAAK,CAAC;AAAA,EAC9C;AACA,SAAO;AACT;AAgBA,SAAS,WACP,MACA,KACA,OACA,OACS;AACT,MAAI,SAAS,QAAQ,OAAO,SAAS,UAAU;AAI7C,WAAO;AAAA,EACT;AACA,QAAM,SAAkC,EAAE,GAAI,KAAiC;AAM/E,QAAM,SAAS,aAAa,KAAK;AACjC,MAAI,UAAU,QAAW;AACvB,QAAI,WAAW,QAAQ,IAAI,SAAS,UAAU;AAC5C,YAAM,IAAI,uBAAuB;AAAA,QAC/B,OAAO,IAAI;AAAA,QACX,QAAQ,IAAI;AAAA,QACZ,OAAO;AAAA,QACP,SACE,+CAA+C,IAAI,MAAM,IAAI,MAAM,gBACrD,IAAI,KAAK;AAAA,MAG3B,CAAC;AAAA,IACH;AACA,QAAI,WAAW,QAAQ,IAAI,SAAS,QAAQ;AAC1C,uBAAiB,IAAI,OAAO,IAAI,QAAQ,MAAM;AAAA,IAChD;AAIA,WAAO,IAAI,EAAE,IAAI;AAAA,EACnB,OAAO;AACL,WAAO,IAAI,EAAE,IAAI;AAAA,EACnB;AACA,SAAO;AACT;AAQO,SAAS,oBAA0B;AACxC,qBAAmB,MAAM;AACzB,oBAAkB,MAAM;AAC1B;","names":[]}
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-Z45YRGFO.js";
8
8
  import {
9
9
  loadPersistedSchema
10
- } from "./chunk-CDB2HVQW.js";
10
+ } from "./chunk-P2Y2F6EB.js";
11
11
 
12
12
  // src/with-shape/introspection/walk.ts
13
13
  var INTERNAL_PREFIX = "_";
@@ -238,4 +238,4 @@ function summariseAggregateOp(value) {
238
238
  export {
239
239
  dumpVaultSchema
240
240
  };
241
- //# sourceMappingURL=chunk-X56RTUK3.js.map
241
+ //# sourceMappingURL=chunk-K525AZ5C.js.map
@@ -7,24 +7,24 @@ import {
7
7
  deriveSchemaManifest,
8
8
  loadSchemaManifestEntry,
9
9
  saveSchemaManifest
10
- } from "./chunk-2DHSSLOD.js";
10
+ } from "./chunk-RSHNUOSJ.js";
11
11
  import {
12
12
  MANIFEST_COLLECTION
13
13
  } from "./chunk-EPFF7LOX.js";
14
14
  import {
15
15
  loadFence,
16
16
  saveFence
17
- } from "./chunk-6BU3L4UE.js";
17
+ } from "./chunk-7HF4J7Z5.js";
18
18
  import {
19
19
  derivePersistedSchema
20
20
  } from "./chunk-Z45YRGFO.js";
21
21
  import {
22
22
  loadPersistedSchemaEntry,
23
23
  savePersistedSchema
24
- } from "./chunk-CDB2HVQW.js";
24
+ } from "./chunk-P2Y2F6EB.js";
25
25
  import {
26
26
  envelopePayloadHash
27
- } from "./chunk-6SAFL5YE.js";
27
+ } from "./chunk-AZQVFXJF.js";
28
28
  import {
29
29
  ManifestConflictError,
30
30
  isConflictError
@@ -257,4 +257,4 @@ export {
257
257
  persistClassifiedMarker,
258
258
  persistSatelliteMarker
259
259
  };
260
- //# sourceMappingURL=chunk-2Z3NCLNX.js.map
260
+ //# sourceMappingURL=chunk-K6TQEDVJ.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  openEnvelopeJson
3
- } from "./chunk-3URQC7EH.js";
3
+ } from "./chunk-4X5Z5SRV.js";
4
4
  import {
5
5
  encrypt
6
6
  } from "./chunk-VCETL77O.js";
7
7
  import {
8
8
  NOYDB_FORMAT_VERSION
9
- } from "./chunk-YPYHVOXP.js";
9
+ } from "./chunk-NSRITINN.js";
10
10
  import {
11
11
  ConflictError
12
12
  } from "./chunk-HNGSV2YC.js";
@@ -56,4 +56,4 @@ export {
56
56
  loadSigner,
57
57
  loadOrCreateSigner
58
58
  };
59
- //# sourceMappingURL=chunk-JJNOLSG5.js.map
59
+ //# sourceMappingURL=chunk-L2UHRVB4.js.map
@@ -5,14 +5,14 @@ import {
5
5
  BLOB_INTENT_COLLECTION,
6
6
  BLOB_SLOTS_PREFIX,
7
7
  BLOB_VERSIONS_PREFIX
8
- } from "./chunk-PL2GHSCM.js";
8
+ } from "./chunk-UAHHWR4P.js";
9
9
  import {
10
10
  SCHEMAS_COLLECTION
11
- } from "./chunk-CDB2HVQW.js";
11
+ } from "./chunk-P2Y2F6EB.js";
12
12
  import {
13
13
  assembleBundleContainer,
14
14
  buildExtractedPartitionWrapper
15
- } from "./chunk-4VUPLMZ6.js";
15
+ } from "./chunk-SPA5WX3T.js";
16
16
  import {
17
17
  generateULID
18
18
  } from "./chunk-ZJADGNYF.js";
@@ -23,11 +23,11 @@ import {
23
23
  canonicalJson,
24
24
  envelopePayloadHash,
25
25
  hashEntry
26
- } from "./chunk-6SAFL5YE.js";
26
+ } from "./chunk-AZQVFXJF.js";
27
27
  import {
28
28
  openEnvelopeJson,
29
29
  writeEnvelopeBody
30
- } from "./chunk-3URQC7EH.js";
30
+ } from "./chunk-4X5Z5SRV.js";
31
31
  import {
32
32
  bufferToBase64,
33
33
  decrypt,
@@ -41,7 +41,7 @@ import {
41
41
  import {
42
42
  NOYDB_BACKUP_VERSION,
43
43
  NOYDB_FORMAT_VERSION
44
- } from "./chunk-YPYHVOXP.js";
44
+ } from "./chunk-NSRITINN.js";
45
45
  import {
46
46
  PartitionExtractionError
47
47
  } from "./chunk-HNGSV2YC.js";
@@ -492,4 +492,4 @@ export {
492
492
  extractPartition,
493
493
  extractPartitionCore
494
494
  };
495
- //# sourceMappingURL=chunk-4GZ6XOVW.js.map
495
+ //# sourceMappingURL=chunk-LRNODVQX.js.map
@@ -29,4 +29,4 @@ export {
29
29
  SealedHandle,
30
30
  createStore
31
31
  };
32
- //# sourceMappingURL=chunk-YPYHVOXP.js.map
32
+ //# sourceMappingURL=chunk-NSRITINN.js.map