@noy-db/hub 0.2.0-pre.7 → 0.2.0-pre.9

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 (235) hide show
  1. package/dist/aggregate/index.cjs.map +1 -1
  2. package/dist/aggregate/index.js +2 -2
  3. package/dist/attestation/index.cjs.map +1 -1
  4. package/dist/attestation/index.d.cts +2 -2
  5. package/dist/attestation/index.d.ts +2 -2
  6. package/dist/attestation/index.js +5 -5
  7. package/dist/blobs/index.cjs.map +1 -1
  8. package/dist/blobs/index.d.cts +3 -3
  9. package/dist/blobs/index.d.ts +3 -3
  10. package/dist/blobs/index.js +4 -4
  11. package/dist/bundle/index.cjs +255 -15
  12. package/dist/bundle/index.cjs.map +1 -1
  13. package/dist/bundle/index.d.cts +4 -4
  14. package/dist/bundle/index.d.ts +4 -4
  15. package/dist/bundle/index.js +8 -8
  16. package/dist/{chunk-AYRTGXF3.js → chunk-22DWZL57.js} +62 -26
  17. package/dist/chunk-22DWZL57.js.map +1 -0
  18. package/dist/{chunk-4EOVWJL6.js → chunk-2GLDA55J.js} +2 -2
  19. package/dist/{chunk-CBHPW77B.js → chunk-2WUSG3IT.js} +2 -2
  20. package/dist/{chunk-WBUG3324.js → chunk-3BFJOWSU.js} +2 -2
  21. package/dist/{chunk-7IH5FDXD.js → chunk-3YPCK6JX.js} +5 -5
  22. package/dist/{chunk-SYOSRZN4.js → chunk-53XBRIRT.js} +4 -4
  23. package/dist/{chunk-UPBZ7NVY.js → chunk-5T22KDPN.js} +4 -4
  24. package/dist/{chunk-KK44CQ5B.js → chunk-5XHKQ56N.js} +2 -2
  25. package/dist/{chunk-3O5FNO5O.js → chunk-6CME4UEK.js} +259 -50
  26. package/dist/chunk-6CME4UEK.js.map +1 -0
  27. package/dist/chunk-6STK5TQP.js +139 -0
  28. package/dist/chunk-6STK5TQP.js.map +1 -0
  29. package/dist/{chunk-REQJJIPP.js → chunk-B6PB7JLN.js} +23 -1
  30. package/dist/{chunk-REQJJIPP.js.map → chunk-B6PB7JLN.js.map} +1 -1
  31. package/dist/{chunk-2TXMTYWZ.js → chunk-BVRYKATC.js} +3 -3
  32. package/dist/{chunk-6ILPGZXZ.js → chunk-DE6GKS6G.js} +2 -2
  33. package/dist/{chunk-TS4FQPDD.js → chunk-DFMLEQZB.js} +2 -2
  34. package/dist/{chunk-3XCXUJTM.js → chunk-DJHHA6XH.js} +2 -2
  35. package/dist/{chunk-LSY46G55.js → chunk-DL3HWOQ5.js} +3 -3
  36. package/dist/{chunk-6MXGU2PW.js → chunk-DO7C2TOG.js} +2 -2
  37. package/dist/{chunk-N4CDTRDH.js → chunk-DONMZAD2.js} +3 -3
  38. package/dist/{chunk-HNC55FLJ.js → chunk-F3GDRNUT.js} +3 -3
  39. package/dist/{chunk-VZOZ3DBN.js → chunk-H2X3ISXG.js} +3 -3
  40. package/dist/{chunk-XZCBBZLS.js → chunk-HNRHLRDC.js} +2 -2
  41. package/dist/{chunk-22ESLVUM.js → chunk-I5FOWO4J.js} +2 -2
  42. package/dist/{chunk-O3JCRQT3.js → chunk-JWRVQKRZ.js} +3 -3
  43. package/dist/{chunk-CSHY53CZ.js → chunk-K3DK3NU5.js} +2 -2
  44. package/dist/{chunk-BNUCCUES.js → chunk-ML236QKC.js} +2 -2
  45. package/dist/{chunk-GZIDTXC4.js → chunk-NONAAENK.js} +2 -2
  46. package/dist/{chunk-JZDA2SRB.js → chunk-O3VZPBZG.js} +4 -4
  47. package/dist/{chunk-PJKGXUMG.js → chunk-OQ6PIGHA.js} +2 -2
  48. package/dist/{chunk-QYO6I7KK.js → chunk-PE2FR4J3.js} +3 -3
  49. package/dist/{chunk-YAMTXW77.js → chunk-PP6W64Y3.js} +2 -2
  50. package/dist/{chunk-HNFXKQD7.js → chunk-PX35GA7L.js} +4 -4
  51. package/dist/{chunk-OXCFFRF3.js → chunk-QEILDE6R.js} +2 -2
  52. package/dist/{chunk-4YVVF6JN.js → chunk-QODLLGQ7.js} +4 -4
  53. package/dist/{chunk-ASFE2X62.js → chunk-RAZ4OVLL.js} +2 -2
  54. package/dist/{chunk-WM5GFORS.js → chunk-SYMWGEET.js} +2 -2
  55. package/dist/{chunk-SLJQIBT7.js → chunk-T7JEBOGN.js} +2 -2
  56. package/dist/{chunk-OA6HE2RW.js → chunk-TFBP23BX.js} +3 -3
  57. package/dist/{chunk-GI6S5ZF2.js → chunk-U26HQ6KJ.js} +2 -2
  58. package/dist/{chunk-WMKCAN4H.js → chunk-VTKGMEPP.js} +2 -2
  59. package/dist/{chunk-BRZFN354.js → chunk-WPLVTJ5D.js} +3 -3
  60. package/dist/{chunk-DCP4L4SH.js → chunk-XJFLDA7A.js} +2 -2
  61. package/dist/{chunk-BE5ZALMB.js → chunk-ZYWZWG6G.js} +4 -4
  62. package/dist/consent/index.cjs.map +1 -1
  63. package/dist/consent/index.d.cts +3 -3
  64. package/dist/consent/index.d.ts +3 -3
  65. package/dist/consent/index.js +3 -3
  66. package/dist/{crypto-TRZ5BJMY.js → crypto-HTZ4FJOP.js} +3 -3
  67. package/dist/{delegation-TLZTK2XW.js → delegation-RI54P6I5.js} +5 -5
  68. package/dist/derivations/index.cjs.map +1 -1
  69. package/dist/derivations/index.d.cts +4 -4
  70. package/dist/derivations/index.d.ts +4 -4
  71. package/dist/derivations/index.js +4 -4
  72. package/dist/{dev-unlock-ClAEZQC4.d.ts → dev-unlock-B4kDxep_.d.ts} +1 -1
  73. package/dist/{dev-unlock-L3z34v0J.d.cts → dev-unlock-BIoEFbwm.d.cts} +1 -1
  74. package/dist/executor-5PNY7LGW.js +8 -0
  75. package/dist/executor-B4QIYGZX.js +8 -0
  76. package/dist/executor-BWXXDQ7K.js +11 -0
  77. package/dist/guards/index.cjs.map +1 -1
  78. package/dist/guards/index.d.cts +4 -4
  79. package/dist/guards/index.d.ts +4 -4
  80. package/dist/guards/index.js +3 -3
  81. package/dist/{hash-M6-JI3Yu.d.cts → hash-DdpVypUp.d.cts} +1 -1
  82. package/dist/{hash-B3lV6lw3.d.ts → hash-HJqD14vS.d.ts} +1 -1
  83. package/dist/history/index.cjs.map +1 -1
  84. package/dist/history/index.d.cts +4 -4
  85. package/dist/history/index.d.ts +4 -4
  86. package/dist/history/index.js +4 -4
  87. package/dist/i18n/index.cjs +217 -22
  88. package/dist/i18n/index.cjs.map +1 -1
  89. package/dist/i18n/index.d.cts +3 -3
  90. package/dist/i18n/index.d.ts +3 -3
  91. package/dist/i18n/index.js +15 -4
  92. package/dist/i18n/index.js.map +1 -1
  93. package/dist/{index-vB43MAt4.d.cts → index-4fBVt8j9.d.cts} +21 -1
  94. package/dist/{index-CmWQyC4e.d.ts → index-D8I_pyJD.d.ts} +21 -1
  95. package/dist/index.cjs +439 -33
  96. package/dist/index.cjs.map +1 -1
  97. package/dist/index.d.cts +11 -11
  98. package/dist/index.d.ts +11 -11
  99. package/dist/index.js +48 -38
  100. package/dist/index.js.map +1 -1
  101. package/dist/indexing/index.cjs.map +1 -1
  102. package/dist/indexing/index.js +2 -2
  103. package/dist/issue-VGDPP4B5.js +12 -0
  104. package/dist/{ledger-SQVVE2DR.js → ledger-TMRZYNVJ.js} +4 -4
  105. package/dist/materialized-views/index.cjs.map +1 -1
  106. package/dist/materialized-views/index.d.cts +5 -5
  107. package/dist/materialized-views/index.d.ts +5 -5
  108. package/dist/materialized-views/index.js +6 -6
  109. package/dist/noydb-G725ZSZG.js +34 -0
  110. package/dist/overlay-views/index.cjs.map +1 -1
  111. package/dist/overlay-views/index.d.cts +4 -4
  112. package/dist/overlay-views/index.d.ts +4 -4
  113. package/dist/overlay-views/index.js +4 -4
  114. package/dist/periods/index.cjs.map +1 -1
  115. package/dist/periods/index.d.cts +3 -3
  116. package/dist/periods/index.d.ts +3 -3
  117. package/dist/periods/index.js +4 -4
  118. package/dist/{public-envelope-BXPXMN3U.js → public-envelope-BW6OXORV.js} +3 -3
  119. package/dist/query/index.cjs.map +1 -1
  120. package/dist/query/index.d.cts +1 -1
  121. package/dist/query/index.d.ts +1 -1
  122. package/dist/query/index.js +3 -3
  123. package/dist/registry-3QP3YKQS.js +8 -0
  124. package/dist/{registry-4R4IURUM.js → registry-OJIOSBV6.js} +3 -3
  125. package/dist/registry-USRVT6YF.js +8 -0
  126. package/dist/{revoke-Y7UDOXGH.js → revoke-JCC7N56X.js} +5 -5
  127. package/dist/session/index.cjs.map +1 -1
  128. package/dist/session/index.d.cts +4 -4
  129. package/dist/session/index.d.ts +4 -4
  130. package/dist/session/index.js +3 -3
  131. package/dist/shadow/index.cjs.map +1 -1
  132. package/dist/shadow/index.d.cts +3 -3
  133. package/dist/shadow/index.d.ts +3 -3
  134. package/dist/shadow/index.js +2 -2
  135. package/dist/{signer-UD2ZSVDJ.js → signer-72QAUSVW.js} +4 -4
  136. package/dist/snapshots/index.cjs +37 -3
  137. package/dist/snapshots/index.cjs.map +1 -1
  138. package/dist/snapshots/index.d.cts +13 -6
  139. package/dist/snapshots/index.d.ts +13 -6
  140. package/dist/snapshots/index.js +40 -6
  141. package/dist/snapshots/index.js.map +1 -1
  142. package/dist/{stale-F4V5E7ZK.js → stale-6ZDBTQT7.js} +2 -2
  143. package/dist/store/index.cjs.map +1 -1
  144. package/dist/store/index.d.cts +3 -3
  145. package/dist/store/index.d.ts +3 -3
  146. package/dist/store/index.js +2 -2
  147. package/dist/sync/index.cjs.map +1 -1
  148. package/dist/sync/index.d.cts +2 -2
  149. package/dist/sync/index.d.ts +2 -2
  150. package/dist/sync/index.js +3 -3
  151. package/dist/team/index.cjs.map +1 -1
  152. package/dist/team/index.d.cts +3 -3
  153. package/dist/team/index.d.ts +3 -3
  154. package/dist/team/index.js +7 -7
  155. package/dist/tx/index.cjs.map +1 -1
  156. package/dist/tx/index.d.cts +3 -3
  157. package/dist/tx/index.d.ts +3 -3
  158. package/dist/tx/index.js +3 -3
  159. package/dist/{types-DT7cXRHq.d.ts → types-Df28QFKb.d.ts} +216 -5
  160. package/dist/{types-r-y7TIqj.d.cts → types-DyXYr8rE.d.cts} +216 -5
  161. package/dist/{ulid-Dt55yn4s.d.ts → ulid-CJ8RzRrm.d.ts} +1 -1
  162. package/dist/{ulid-BkW3mLlz.d.cts → ulid-Drr7ykr6.d.cts} +1 -1
  163. package/dist/util/index.cjs.map +1 -1
  164. package/dist/util/index.js +1 -1
  165. package/dist/{with-derivation-D_Ids_H6.d.ts → with-derivation-DFnFByiQ.d.ts} +1 -1
  166. package/dist/{with-derivation-DB63Po2m.d.cts → with-derivation-DU3Sjazm.d.cts} +1 -1
  167. package/dist/{with-guard-BHThLppa.d.cts → with-guard-ByyxmEe7.d.cts} +1 -1
  168. package/dist/{with-guard-BJwdc0s6.d.ts → with-guard-qube6BMI.d.ts} +1 -1
  169. package/dist/{with-materialized-view-D-CRVSDX.d.ts → with-materialized-view-BLkQxoQN.d.ts} +1 -1
  170. package/dist/{with-materialized-view-BJmJ-FrO.d.cts → with-materialized-view-BmEToIR1.d.cts} +1 -1
  171. package/dist/{with-overlayed-view-zePNtUSq.d.cts → with-overlayed-view-BMsQQbWm.d.cts} +1 -1
  172. package/dist/{with-overlayed-view-CNf6GbDG.d.ts → with-overlayed-view-CRsSEwHR.d.ts} +1 -1
  173. package/package.json +5 -4
  174. package/dist/chunk-3O5FNO5O.js.map +0 -1
  175. package/dist/chunk-AYRTGXF3.js.map +0 -1
  176. package/dist/executor-HAVRTQN4.js +0 -11
  177. package/dist/executor-V3DKOADS.js +0 -8
  178. package/dist/executor-XO4M4243.js +0 -8
  179. package/dist/issue-EJKUQ6FA.js +0 -12
  180. package/dist/noydb-MK4UQ626.js +0 -34
  181. package/dist/registry-GPBLCHG7.js +0 -8
  182. package/dist/registry-ZON5HNIV.js +0 -8
  183. /package/dist/{chunk-4EOVWJL6.js.map → chunk-2GLDA55J.js.map} +0 -0
  184. /package/dist/{chunk-CBHPW77B.js.map → chunk-2WUSG3IT.js.map} +0 -0
  185. /package/dist/{chunk-WBUG3324.js.map → chunk-3BFJOWSU.js.map} +0 -0
  186. /package/dist/{chunk-7IH5FDXD.js.map → chunk-3YPCK6JX.js.map} +0 -0
  187. /package/dist/{chunk-SYOSRZN4.js.map → chunk-53XBRIRT.js.map} +0 -0
  188. /package/dist/{chunk-UPBZ7NVY.js.map → chunk-5T22KDPN.js.map} +0 -0
  189. /package/dist/{chunk-KK44CQ5B.js.map → chunk-5XHKQ56N.js.map} +0 -0
  190. /package/dist/{chunk-2TXMTYWZ.js.map → chunk-BVRYKATC.js.map} +0 -0
  191. /package/dist/{chunk-6ILPGZXZ.js.map → chunk-DE6GKS6G.js.map} +0 -0
  192. /package/dist/{chunk-TS4FQPDD.js.map → chunk-DFMLEQZB.js.map} +0 -0
  193. /package/dist/{chunk-3XCXUJTM.js.map → chunk-DJHHA6XH.js.map} +0 -0
  194. /package/dist/{chunk-LSY46G55.js.map → chunk-DL3HWOQ5.js.map} +0 -0
  195. /package/dist/{chunk-6MXGU2PW.js.map → chunk-DO7C2TOG.js.map} +0 -0
  196. /package/dist/{chunk-N4CDTRDH.js.map → chunk-DONMZAD2.js.map} +0 -0
  197. /package/dist/{chunk-HNC55FLJ.js.map → chunk-F3GDRNUT.js.map} +0 -0
  198. /package/dist/{chunk-VZOZ3DBN.js.map → chunk-H2X3ISXG.js.map} +0 -0
  199. /package/dist/{chunk-XZCBBZLS.js.map → chunk-HNRHLRDC.js.map} +0 -0
  200. /package/dist/{chunk-22ESLVUM.js.map → chunk-I5FOWO4J.js.map} +0 -0
  201. /package/dist/{chunk-O3JCRQT3.js.map → chunk-JWRVQKRZ.js.map} +0 -0
  202. /package/dist/{chunk-CSHY53CZ.js.map → chunk-K3DK3NU5.js.map} +0 -0
  203. /package/dist/{chunk-BNUCCUES.js.map → chunk-ML236QKC.js.map} +0 -0
  204. /package/dist/{chunk-GZIDTXC4.js.map → chunk-NONAAENK.js.map} +0 -0
  205. /package/dist/{chunk-JZDA2SRB.js.map → chunk-O3VZPBZG.js.map} +0 -0
  206. /package/dist/{chunk-PJKGXUMG.js.map → chunk-OQ6PIGHA.js.map} +0 -0
  207. /package/dist/{chunk-QYO6I7KK.js.map → chunk-PE2FR4J3.js.map} +0 -0
  208. /package/dist/{chunk-YAMTXW77.js.map → chunk-PP6W64Y3.js.map} +0 -0
  209. /package/dist/{chunk-HNFXKQD7.js.map → chunk-PX35GA7L.js.map} +0 -0
  210. /package/dist/{chunk-OXCFFRF3.js.map → chunk-QEILDE6R.js.map} +0 -0
  211. /package/dist/{chunk-4YVVF6JN.js.map → chunk-QODLLGQ7.js.map} +0 -0
  212. /package/dist/{chunk-ASFE2X62.js.map → chunk-RAZ4OVLL.js.map} +0 -0
  213. /package/dist/{chunk-WM5GFORS.js.map → chunk-SYMWGEET.js.map} +0 -0
  214. /package/dist/{chunk-SLJQIBT7.js.map → chunk-T7JEBOGN.js.map} +0 -0
  215. /package/dist/{chunk-OA6HE2RW.js.map → chunk-TFBP23BX.js.map} +0 -0
  216. /package/dist/{chunk-GI6S5ZF2.js.map → chunk-U26HQ6KJ.js.map} +0 -0
  217. /package/dist/{chunk-WMKCAN4H.js.map → chunk-VTKGMEPP.js.map} +0 -0
  218. /package/dist/{chunk-BRZFN354.js.map → chunk-WPLVTJ5D.js.map} +0 -0
  219. /package/dist/{chunk-DCP4L4SH.js.map → chunk-XJFLDA7A.js.map} +0 -0
  220. /package/dist/{chunk-BE5ZALMB.js.map → chunk-ZYWZWG6G.js.map} +0 -0
  221. /package/dist/{crypto-TRZ5BJMY.js.map → crypto-HTZ4FJOP.js.map} +0 -0
  222. /package/dist/{delegation-TLZTK2XW.js.map → delegation-RI54P6I5.js.map} +0 -0
  223. /package/dist/{executor-HAVRTQN4.js.map → executor-5PNY7LGW.js.map} +0 -0
  224. /package/dist/{executor-V3DKOADS.js.map → executor-B4QIYGZX.js.map} +0 -0
  225. /package/dist/{executor-XO4M4243.js.map → executor-BWXXDQ7K.js.map} +0 -0
  226. /package/dist/{issue-EJKUQ6FA.js.map → issue-VGDPP4B5.js.map} +0 -0
  227. /package/dist/{ledger-SQVVE2DR.js.map → ledger-TMRZYNVJ.js.map} +0 -0
  228. /package/dist/{noydb-MK4UQ626.js.map → noydb-G725ZSZG.js.map} +0 -0
  229. /package/dist/{public-envelope-BXPXMN3U.js.map → public-envelope-BW6OXORV.js.map} +0 -0
  230. /package/dist/{registry-4R4IURUM.js.map → registry-3QP3YKQS.js.map} +0 -0
  231. /package/dist/{registry-GPBLCHG7.js.map → registry-OJIOSBV6.js.map} +0 -0
  232. /package/dist/{registry-ZON5HNIV.js.map → registry-USRVT6YF.js.map} +0 -0
  233. /package/dist/{revoke-Y7UDOXGH.js.map → revoke-JCC7N56X.js.map} +0 -0
  234. /package/dist/{signer-UD2ZSVDJ.js.map → signer-72QAUSVW.js.map} +0 -0
  235. /package/dist/{stale-F4V5E7ZK.js.map → stale-6ZDBTQT7.js.map} +0 -0
@@ -1,11 +1,11 @@
1
- import { B as BlobStrategy } from '../types-r-y7TIqj.cjs';
2
- export { q as BLOB_CHUNKS_COLLECTION, t as BLOB_COLLECTION, u as BLOB_EVICTION_AUDIT_COLLECTION, w as BLOB_INDEX_COLLECTION, x as BLOB_SLOTS_PREFIX, y as BLOB_VERSIONS_PREFIX, z as BlobEvictionEntry, A as BlobFieldPolicy, C as BlobFieldsConfig, E as BlobObject, F as BlobPutOptions, G as BlobResponseOptions, H as BlobSet, J as BlobStrategyOpenArgs, K as CompactRunOptions, L as CompactionContext, M as CompactionResult, N as DEFAULT_CHUNK_SIZE, O as EXPORT_AUDIT_COLLECTION, Q as ExportBlobsAbortedError, R as ExportBlobsAuditEntry, T as ExportBlobsHandle, U as ExportBlobsOptions, V as ExportedBlob, W as SlotInfo, X as SlotRecord, Y as VersionRecord, Z as createExportBlobsHandle, _ as runCompaction } from '../types-r-y7TIqj.cjs';
1
+ import { B as BlobStrategy } from '../types-DyXYr8rE.cjs';
2
+ export { z as BLOB_CHUNKS_COLLECTION, A as BLOB_COLLECTION, C as BLOB_EVICTION_AUDIT_COLLECTION, E as BLOB_INDEX_COLLECTION, F as BLOB_SLOTS_PREFIX, G as BLOB_VERSIONS_PREFIX, H as BlobEvictionEntry, J as BlobFieldPolicy, K as BlobFieldsConfig, M as BlobObject, N as BlobPutOptions, Q as BlobResponseOptions, T as BlobSet, U as BlobStrategyOpenArgs, V as CompactRunOptions, W as CompactionContext, X as CompactionResult, Y as DEFAULT_CHUNK_SIZE, Z as EXPORT_AUDIT_COLLECTION, _ as ExportBlobsAbortedError, $ as ExportBlobsAuditEntry, a0 as ExportBlobsHandle, a1 as ExportBlobsOptions, a2 as ExportedBlob, a3 as SlotInfo, a4 as SlotRecord, a5 as VersionRecord, a6 as createExportBlobsHandle, a7 as runCompaction } from '../types-DyXYr8rE.cjs';
3
3
  export { d as detectMagic, a as detectMimeType, i as isPreCompressed } from '../mime-magic-CBBSOkjm.cjs';
4
4
  import '../lazy-builder-wY4pMCEe.cjs';
5
5
  import '../predicate-BSAGEyu5.cjs';
6
6
  import '../strategy-DSTrsZ8t.cjs';
7
7
  import '../strategy-BSxFXGzb.cjs';
8
- import '../index-vB43MAt4.cjs';
8
+ import '../index-4fBVt8j9.cjs';
9
9
  import '@noy-db/attestation';
10
10
 
11
11
  /**
@@ -1,11 +1,11 @@
1
- import { B as BlobStrategy } from '../types-DT7cXRHq.js';
2
- export { q as BLOB_CHUNKS_COLLECTION, t as BLOB_COLLECTION, u as BLOB_EVICTION_AUDIT_COLLECTION, w as BLOB_INDEX_COLLECTION, x as BLOB_SLOTS_PREFIX, y as BLOB_VERSIONS_PREFIX, z as BlobEvictionEntry, A as BlobFieldPolicy, C as BlobFieldsConfig, E as BlobObject, F as BlobPutOptions, G as BlobResponseOptions, H as BlobSet, J as BlobStrategyOpenArgs, K as CompactRunOptions, L as CompactionContext, M as CompactionResult, N as DEFAULT_CHUNK_SIZE, O as EXPORT_AUDIT_COLLECTION, Q as ExportBlobsAbortedError, R as ExportBlobsAuditEntry, T as ExportBlobsHandle, U as ExportBlobsOptions, V as ExportedBlob, W as SlotInfo, X as SlotRecord, Y as VersionRecord, Z as createExportBlobsHandle, _ as runCompaction } from '../types-DT7cXRHq.js';
1
+ import { B as BlobStrategy } from '../types-Df28QFKb.js';
2
+ export { z as BLOB_CHUNKS_COLLECTION, A as BLOB_COLLECTION, C as BLOB_EVICTION_AUDIT_COLLECTION, E as BLOB_INDEX_COLLECTION, F as BLOB_SLOTS_PREFIX, G as BLOB_VERSIONS_PREFIX, H as BlobEvictionEntry, J as BlobFieldPolicy, K as BlobFieldsConfig, M as BlobObject, N as BlobPutOptions, Q as BlobResponseOptions, T as BlobSet, U as BlobStrategyOpenArgs, V as CompactRunOptions, W as CompactionContext, X as CompactionResult, Y as DEFAULT_CHUNK_SIZE, Z as EXPORT_AUDIT_COLLECTION, _ as ExportBlobsAbortedError, $ as ExportBlobsAuditEntry, a0 as ExportBlobsHandle, a1 as ExportBlobsOptions, a2 as ExportedBlob, a3 as SlotInfo, a4 as SlotRecord, a5 as VersionRecord, a6 as createExportBlobsHandle, a7 as runCompaction } from '../types-Df28QFKb.js';
3
3
  export { d as detectMagic, a as detectMimeType, i as isPreCompressed } from '../mime-magic-CBBSOkjm.js';
4
4
  import '../lazy-builder-7tIpFyWN.js';
5
5
  import '../predicate-BSAGEyu5.js';
6
6
  import '../strategy-DSTrsZ8t.js';
7
7
  import '../strategy-BSxFXGzb.js';
8
- import '../index-CmWQyC4e.js';
8
+ import '../index-D8I_pyJD.js';
9
9
  import '@noy-db/attestation';
10
10
 
11
11
  /**
@@ -9,17 +9,17 @@ import {
9
9
  detectMagic,
10
10
  detectMimeType,
11
11
  isPreCompressed
12
- } from "../chunk-4YVVF6JN.js";
12
+ } from "../chunk-QODLLGQ7.js";
13
13
  import {
14
14
  BLOB_EVICTION_AUDIT_COLLECTION,
15
15
  EXPORT_AUDIT_COLLECTION,
16
16
  ExportBlobsAbortedError,
17
17
  createExportBlobsHandle,
18
18
  runCompaction
19
- } from "../chunk-WBUG3324.js";
19
+ } from "../chunk-3BFJOWSU.js";
20
20
  import "../chunk-WIRRPTFH.js";
21
- import "../chunk-YAMTXW77.js";
22
- import "../chunk-REQJJIPP.js";
21
+ import "../chunk-PP6W64Y3.js";
22
+ import "../chunk-B6PB7JLN.js";
23
23
 
24
24
  // src/blobs/active.ts
25
25
  function withBlobs() {
@@ -31,7 +31,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
31
31
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
32
 
33
33
  // src/errors.ts
34
- var NoydbError, DecryptionError, TamperedError, InvalidKeyError, KeyringCorruptError, NoAccessError, ReadOnlyError, PermissionDeniedError, ExportCapabilityError, KeyringExpiredError, ImportCapabilityError, StoreCapabilityError, PrivilegeEscalationError, FieldFrozenError, InvariantError, AmendmentForbiddenError, TierNotGrantedError, ElevationExpiredError, AlreadyElevatedError, TierDemoteDeniedError, DelegationTargetMissingError, ConflictError, LedgerContentionError, BundleVersionConflictError, ValidationError, SchemaValidationError, SchemaUpdateError, SchemaFenceError, MigrationRequiredError, QuiesceTimeoutError, GroupCardinalityError, IndexRequiredError, IndexWriteFailureError, BundleIntegrityError, BundleSealMismatchError, ReservedCollectionNameError, TranslatorNotConfiguredError, BackupLedgerError, BackupCorruptedError, PartitionExtractionError, TransferSealError, AdoptionStateError, AttestationError, JoinTooLargeError, CrossJoinTooLargeError, CrossJoinSourceUnknownError, DanglingReferenceError, DerivationCycleError, DerivationOutputShapeError, DerivationCapExceededError, MaterializedViewCycleError, MaterializedViewSourceUnknownError, MaterializedViewTooLargeError, OverlayBaseIsVirtualError, OverlayCollectionUnavailableError, OverlayNameCollisionError, OverlayIdMismatchError;
34
+ var NoydbError, DecryptionError, TamperedError, InvalidKeyError, KeyringCorruptError, NoAccessError, ReadOnlyError, PermissionDeniedError, ExportCapabilityError, KeyringExpiredError, ImportCapabilityError, StoreCapabilityError, PrivilegeEscalationError, FieldFrozenError, InvariantError, AmendmentForbiddenError, TierNotGrantedError, ElevationExpiredError, AlreadyElevatedError, TierDemoteDeniedError, DelegationTargetMissingError, ConflictError, LedgerContentionError, BundleVersionConflictError, ValidationError, SchemaValidationError, SchemaUpdateError, SchemaFenceError, MigrationRequiredError, QuiesceTimeoutError, GroupCardinalityError, IndexRequiredError, IndexWriteFailureError, BundleIntegrityError, BundleSealMismatchError, ReservedCollectionNameError, LocaleNotSpecifiedError, TranslatorNotConfiguredError, BackupLedgerError, BackupCorruptedError, PartitionExtractionError, TransferSealError, AdoptionStateError, AttestationError, JoinTooLargeError, CrossJoinTooLargeError, CrossJoinSourceUnknownError, DanglingReferenceError, DerivationCycleError, DerivationOutputShapeError, DerivationCapExceededError, MaterializedViewCycleError, MaterializedViewSourceUnknownError, MaterializedViewTooLargeError, OverlayBaseIsVirtualError, OverlayCollectionUnavailableError, OverlayNameCollisionError, OverlayIdMismatchError;
35
35
  var init_errors = __esm({
36
36
  "src/errors.ts"() {
37
37
  "use strict";
@@ -403,6 +403,18 @@ Resolutions:
403
403
  this.collectionName = collectionName;
404
404
  }
405
405
  };
406
+ LocaleNotSpecifiedError = class extends NoydbError {
407
+ /** The field name that required a locale. */
408
+ field;
409
+ constructor(field, message) {
410
+ super(
411
+ "LOCALE_NOT_SPECIFIED",
412
+ message ?? `Cannot read i18nText field "${field}" without a locale. Pass { locale } to get()/list()/query() or set a default via openVault(name, { locale }).`
413
+ );
414
+ this.name = "LocaleNotSpecifiedError";
415
+ this.field = field;
416
+ }
417
+ };
406
418
  TranslatorNotConfiguredError = class extends NoydbError {
407
419
  /** The field that requested auto-translation. */
408
420
  field;
@@ -3499,6 +3511,19 @@ var init_strategy = __esm({
3499
3511
  }
3500
3512
  });
3501
3513
 
3514
+ // src/i18n/policy.ts
3515
+ function resolvePolicy(onMissing, layer) {
3516
+ const explicit = onMissing && typeof onMissing === "object" ? onMissing[layer] : void 0;
3517
+ const scalar = typeof onMissing === "string" ? onMissing : void 0;
3518
+ const layerDefault = layer === "guard" ? "substitute" : void 0;
3519
+ return explicit ?? layerDefault ?? scalar ?? "throw";
3520
+ }
3521
+ var init_policy = __esm({
3522
+ "src/i18n/policy.ts"() {
3523
+ "use strict";
3524
+ }
3525
+ });
3526
+
3502
3527
  // src/i18n/core.ts
3503
3528
  function getAtPath(obj, path) {
3504
3529
  const arrayIdx = path.indexOf("[].");
@@ -3558,6 +3583,9 @@ var init_strategy2 = __esm({
3558
3583
  validateI18nTextValue() {
3559
3584
  throw notEnabled("i18nText field validation");
3560
3585
  },
3586
+ enforceScript(value) {
3587
+ return { value, warnings: [] };
3588
+ },
3561
3589
  buildDictionaryHandle() {
3562
3590
  throw notEnabled("vault.dictionary()");
3563
3591
  }
@@ -5790,7 +5818,7 @@ function estimateRecordBytes(record) {
5790
5818
  }
5791
5819
  }
5792
5820
  var UNITS;
5793
- var init_policy = __esm({
5821
+ var init_policy2 = __esm({
5794
5822
  "src/cache/policy.ts"() {
5795
5823
  "use strict";
5796
5824
  UNITS = {
@@ -5809,7 +5837,7 @@ var init_cache = __esm({
5809
5837
  "src/cache/index.ts"() {
5810
5838
  "use strict";
5811
5839
  init_lru();
5812
- init_policy();
5840
+ init_policy2();
5813
5841
  }
5814
5842
  });
5815
5843
 
@@ -6833,6 +6861,7 @@ var init_collection = __esm({
6833
6861
  init_strategy();
6834
6862
  init_core();
6835
6863
  init_strategy2();
6864
+ init_policy();
6836
6865
  init_crypto();
6837
6866
  init_errors();
6838
6867
  init_tiers();
@@ -7472,6 +7501,22 @@ var init_collection = __esm({
7472
7501
  setAtPathInPlace(obj, field, translated);
7473
7502
  }
7474
7503
  }
7504
+ if (this.i18nFields) {
7505
+ const obj = record;
7506
+ for (const [field, descriptor] of Object.entries(this.i18nFields)) {
7507
+ if (!descriptor.options.script) continue;
7508
+ for (const leaf of getAtPath(obj, field)) {
7509
+ if (!leaf || typeof leaf !== "object" || Array.isArray(leaf)) continue;
7510
+ const leafMap = leaf;
7511
+ const { value: cleaned } = this.i18nStrategy.enforceScript(
7512
+ leafMap,
7513
+ field,
7514
+ descriptor
7515
+ );
7516
+ if (cleaned !== leafMap) Object.assign(leafMap, cleaned);
7517
+ }
7518
+ }
7519
+ }
7475
7520
  if (this.i18nPutValidator !== void 0) {
7476
7521
  this.i18nPutValidator(record);
7477
7522
  }
@@ -8914,17 +8959,52 @@ var init_collection = __esm({
8914
8959
  }
8915
8960
  if (hasDict && this.dictKeyFields && this.dictLabelResolver && locale !== "raw") {
8916
8961
  const withLabels = { ...result };
8962
+ const resolver = this.dictLabelResolver;
8917
8963
  for (const [field, desc] of Object.entries(this.dictKeyFields)) {
8918
- const key = result[field];
8919
- if (typeof key !== "string") continue;
8920
- const label = await this.dictLabelResolver(
8921
- desc.name,
8922
- key,
8923
- locale,
8924
- localeOpts?.fallback
8925
- );
8926
- if (label !== void 0) {
8927
- withLabels[`${field}Label`] = label;
8964
+ const policy = desc.onMissing ? resolvePolicy(desc.onMissing, "read") : "null";
8965
+ const fallback = policy === "substitute" ? localeOpts?.fallback ?? desc.substitute : localeOpts?.fallback;
8966
+ const resolveKey = async (key) => {
8967
+ const label = await resolver(desc.name, key, locale, fallback);
8968
+ if (label === void 0) {
8969
+ if (policy === "throw") {
8970
+ throw new LocaleNotSpecifiedError(
8971
+ field,
8972
+ `dictKey "${field}": no label for key "${key}" in locale "${locale}".`
8973
+ );
8974
+ }
8975
+ return null;
8976
+ }
8977
+ return label;
8978
+ };
8979
+ if (field.includes("[].")) {
8980
+ const parts = field.split("[].");
8981
+ const arrayKey = parts[0];
8982
+ const leaf = parts[1];
8983
+ if (!leaf || leaf.includes(".")) continue;
8984
+ const arr = withLabels[arrayKey];
8985
+ if (!Array.isArray(arr)) continue;
8986
+ const labelKey = `${leaf}Label`;
8987
+ withLabels[arrayKey] = await Promise.all(
8988
+ arr.map(async (el) => {
8989
+ if (!el || typeof el !== "object" || Array.isArray(el)) return el;
8990
+ const k = el[leaf];
8991
+ if (typeof k !== "string") return el;
8992
+ return { ...el, [labelKey]: await resolveKey(k) };
8993
+ })
8994
+ );
8995
+ continue;
8996
+ }
8997
+ const val = result[field];
8998
+ if (Array.isArray(val)) {
8999
+ withLabels[`${field}Label`] = await Promise.all(
9000
+ val.map(async (k) => ({
9001
+ key: k,
9002
+ label: typeof k === "string" ? await resolveKey(k) : null
9003
+ }))
9004
+ );
9005
+ } else if (typeof val === "string") {
9006
+ const label = await resolveKey(val);
9007
+ if (label !== null) withLabels[`${field}Label`] = label;
8928
9008
  }
8929
9009
  }
8930
9010
  result = withLabels;
@@ -15096,6 +15176,125 @@ var init_strategy10 = __esm({
15096
15176
  },
15097
15177
  async restoreSnapshot() {
15098
15178
  throw NOT_ENABLED5;
15179
+ },
15180
+ async autoSnapshot() {
15181
+ throw NOT_ENABLED5;
15182
+ }
15183
+ };
15184
+ }
15185
+ });
15186
+
15187
+ // src/snapshots/scheduler.ts
15188
+ var SnapshotScheduler;
15189
+ var init_scheduler = __esm({
15190
+ "src/snapshots/scheduler.ts"() {
15191
+ "use strict";
15192
+ SnapshotScheduler = class {
15193
+ policy;
15194
+ callbacks;
15195
+ debounceTimer = null;
15196
+ intervalTimer = null;
15197
+ lastFireTime = 0;
15198
+ firing = false;
15199
+ started = false;
15200
+ boundVisibility = null;
15201
+ boundUnload = null;
15202
+ constructor(policy, callbacks) {
15203
+ this.policy = policy;
15204
+ this.callbacks = callbacks;
15205
+ if (this.shouldRegisterUnload()) {
15206
+ this.boundVisibility = this.handleVisibility.bind(this);
15207
+ this.boundUnload = this.handleUnload.bind(this);
15208
+ }
15209
+ }
15210
+ start() {
15211
+ if (this.started) return;
15212
+ this.started = true;
15213
+ if (this.policy.mode === "interval") {
15214
+ const ms = this.policy.intervalMs ?? 3e5;
15215
+ this.intervalTimer = setInterval(() => {
15216
+ void this.execFire();
15217
+ }, ms);
15218
+ }
15219
+ if (this.boundVisibility && this.boundUnload) {
15220
+ if (typeof document !== "undefined") {
15221
+ document.addEventListener("visibilitychange", this.boundVisibility);
15222
+ }
15223
+ if (typeof globalThis.addEventListener === "function") {
15224
+ globalThis.addEventListener("pagehide", this.boundUnload);
15225
+ }
15226
+ if (typeof process !== "undefined" && typeof process.on === "function") {
15227
+ process.on("beforeExit", this.boundUnload);
15228
+ }
15229
+ }
15230
+ }
15231
+ stop() {
15232
+ if (!this.started) return;
15233
+ this.started = false;
15234
+ if (this.debounceTimer) {
15235
+ clearTimeout(this.debounceTimer);
15236
+ this.debounceTimer = null;
15237
+ }
15238
+ if (this.intervalTimer) {
15239
+ clearInterval(this.intervalTimer);
15240
+ this.intervalTimer = null;
15241
+ }
15242
+ if (this.boundVisibility && this.boundUnload) {
15243
+ if (typeof document !== "undefined") {
15244
+ document.removeEventListener("visibilitychange", this.boundVisibility);
15245
+ }
15246
+ if (typeof globalThis.removeEventListener === "function") {
15247
+ globalThis.removeEventListener("pagehide", this.boundUnload);
15248
+ }
15249
+ if (typeof process !== "undefined" && typeof process.removeListener === "function") {
15250
+ process.removeListener("beforeExit", this.boundUnload);
15251
+ }
15252
+ }
15253
+ }
15254
+ notifyChange() {
15255
+ if (!this.started) return;
15256
+ if (this.policy.mode === "debounce") this.resetDebounce();
15257
+ }
15258
+ resetDebounce() {
15259
+ if (this.debounceTimer) clearTimeout(this.debounceTimer);
15260
+ const ms = this.policy.debounceMs ?? 3e4;
15261
+ this.debounceTimer = setTimeout(() => {
15262
+ this.debounceTimer = null;
15263
+ void this.execFire();
15264
+ }, ms);
15265
+ }
15266
+ async execFire() {
15267
+ if (this.firing) return;
15268
+ const minInterval = this.policy.minIntervalMs ?? 0;
15269
+ if (minInterval > 0 && Date.now() - this.lastFireTime < minInterval) {
15270
+ if (this.policy.mode === "debounce") this.resetDebounce();
15271
+ return;
15272
+ }
15273
+ if (this.callbacks.pendingCount() === 0) return;
15274
+ this.firing = true;
15275
+ try {
15276
+ await this.callbacks.fire();
15277
+ this.lastFireTime = Date.now();
15278
+ } catch {
15279
+ } finally {
15280
+ this.firing = false;
15281
+ }
15282
+ }
15283
+ handleVisibility() {
15284
+ if (typeof document !== "undefined" && document.visibilityState === "hidden") {
15285
+ this.flush();
15286
+ }
15287
+ }
15288
+ handleUnload() {
15289
+ this.flush();
15290
+ }
15291
+ flush() {
15292
+ if (this.callbacks.pendingCount() === 0) return;
15293
+ void this.callbacks.fire().catch(() => {
15294
+ });
15295
+ }
15296
+ shouldRegisterUnload() {
15297
+ return this.policy.onUnload ?? this.policy.mode !== "manual";
15099
15298
  }
15100
15299
  };
15101
15300
  }
@@ -15412,7 +15611,7 @@ var init_engine = __esm({
15412
15611
  });
15413
15612
 
15414
15613
  // src/policy/index.ts
15415
- var init_policy2 = __esm({
15614
+ var init_policy3 = __esm({
15416
15615
  "src/policy/index.ts"() {
15417
15616
  "use strict";
15418
15617
  init_presets();
@@ -15576,11 +15775,12 @@ var init_noydb = __esm({
15576
15775
  init_unlock_state();
15577
15776
  init_sync_strategy();
15578
15777
  init_strategy10();
15778
+ init_scheduler();
15579
15779
  init_transaction();
15580
15780
  init_strategy11();
15581
15781
  init_sync_policy();
15582
15782
  init_strategy12();
15583
- init_policy2();
15783
+ init_policy3();
15584
15784
  ROLE_RANK = {
15585
15785
  client: 1,
15586
15786
  viewer: 2,
@@ -15637,6 +15837,8 @@ var init_noydb = __esm({
15637
15837
  sessionStrategy;
15638
15838
  syncStrategy;
15639
15839
  snapshotStrategy;
15840
+ snapshotScheduler = null;
15841
+ dirtySnapshotVaults = /* @__PURE__ */ new Set();
15640
15842
  /**
15641
15843
  * Currently-running multi-record transaction, set by
15642
15844
  * `runTransaction` at the start of Phase 2 (commit) and cleared in
@@ -15662,6 +15864,7 @@ var init_noydb = __esm({
15662
15864
  this.sessionStrategy = options.sessionStrategy ?? NO_SESSION;
15663
15865
  this.syncStrategy = options.syncStrategy ?? NO_SYNC;
15664
15866
  this.snapshotStrategy = options.snapshotStrategy ?? NO_SNAPSHOTS;
15867
+ this.initSnapshotCadence();
15665
15868
  this.publicEnvelopeSchema = resolveSchema(options.publicEnvelope);
15666
15869
  if (options.sessionPolicy) {
15667
15870
  this.sessionStrategy.validateSessionPolicy(options.sessionPolicy);
@@ -16618,6 +16821,8 @@ var init_noydb = __esm({
16618
16821
  }
16619
16822
  close() {
16620
16823
  this.closed = true;
16824
+ this.snapshotScheduler?.stop();
16825
+ this.snapshotScheduler = null;
16621
16826
  if (this.sessionTimer) {
16622
16827
  clearTimeout(this.sessionTimer);
16623
16828
  this.sessionTimer = null;
@@ -17663,6 +17868,41 @@ var init_noydb = __esm({
17663
17868
  }
17664
17869
  return this.snapshotStrategy.snapshot(v, this.options.user, opts);
17665
17870
  }
17871
+ /**
17872
+ * Wire the automatic-snapshot cadence when a non-manual `snapshotPolicy` is
17873
+ * configured. Subscribes to `onAfterWrite` to mark the written vault dirty and
17874
+ * nudge the scheduler; the scheduler fires `autoSnapshot()` per dirty vault.
17875
+ * No-op for `mode:'manual'` or no policy.
17876
+ */
17877
+ initSnapshotCadence() {
17878
+ const policy = this.snapshotStrategy.policy;
17879
+ if (!policy || !policy.mode || policy.mode === "manual") return;
17880
+ const scheduler = new SnapshotScheduler(policy, {
17881
+ fire: async () => {
17882
+ const names = [...this.dirtySnapshotVaults];
17883
+ this.dirtySnapshotVaults.clear();
17884
+ for (const name of names) {
17885
+ const v = this.vaultCache.get(name);
17886
+ if (!v) continue;
17887
+ try {
17888
+ await this.snapshotStrategy.autoSnapshot(v, this.options.user);
17889
+ } catch (err) {
17890
+ this.dirtySnapshotVaults.add(name);
17891
+ console.warn(
17892
+ `[noy-db] auto-snapshot failed for vault "${name}": ` + (err instanceof Error ? err.message : String(err))
17893
+ );
17894
+ }
17895
+ }
17896
+ },
17897
+ pendingCount: () => this.dirtySnapshotVaults.size
17898
+ });
17899
+ this.onAfterWrite((event) => {
17900
+ this.dirtySnapshotVaults.add(event.vault);
17901
+ scheduler.notifyChange();
17902
+ });
17903
+ scheduler.start();
17904
+ this.snapshotScheduler = scheduler;
17905
+ }
17666
17906
  /**
17667
17907
  * List all snapshots for the given vault, newest first.
17668
17908
  * Reads only the sidecar index — does not download snapshot bytes.