@noy-db/hub 0.2.0-pre.19 → 0.2.0-pre.20

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 (272) hide show
  1. package/dist/aggregate/index.cjs.map +1 -1
  2. package/dist/aggregate/index.d.cts +3 -3
  3. package/dist/aggregate/index.d.ts +3 -3
  4. package/dist/aggregate/index.js +5 -5
  5. package/dist/attestation/index.cjs.map +1 -1
  6. package/dist/attestation/index.d.cts +4 -4
  7. package/dist/attestation/index.d.ts +4 -4
  8. package/dist/attestation/index.js +6 -6
  9. package/dist/blobs/index.cjs +252 -2
  10. package/dist/blobs/index.cjs.map +1 -1
  11. package/dist/blobs/index.d.cts +6 -6
  12. package/dist/blobs/index.d.ts +6 -6
  13. package/dist/blobs/index.js +11 -7
  14. package/dist/blobs/index.js.map +1 -1
  15. package/dist/bundle/index.cjs +81 -7
  16. package/dist/bundle/index.cjs.map +1 -1
  17. package/dist/bundle/index.d.cts +6 -6
  18. package/dist/bundle/index.d.ts +6 -6
  19. package/dist/bundle/index.js +10 -10
  20. package/dist/{chunk-U7JNBSS3.js → chunk-2XA2ZML4.js} +3 -3
  21. package/dist/chunk-2XA2ZML4.js.map +1 -0
  22. package/dist/{chunk-OKOKPYWH.js → chunk-37VGJM3T.js} +2 -2
  23. package/dist/{chunk-B6E5IRPJ.js → chunk-3HNKR65T.js} +3 -3
  24. package/dist/{chunk-6KESZO5D.js → chunk-5YTXYPES.js} +5 -5
  25. package/dist/{chunk-7HD67R6U.js → chunk-6QAZ5O6X.js} +2 -2
  26. package/dist/{chunk-XPH3FWME.js → chunk-6QE4DUYC.js} +2 -2
  27. package/dist/{chunk-4ULLGYPA.js → chunk-7MRT7EPB.js} +3 -3
  28. package/dist/{chunk-KYGGXXT6.js → chunk-7PH4OPBZ.js} +119 -58
  29. package/dist/chunk-7PH4OPBZ.js.map +1 -0
  30. package/dist/{chunk-3FSMVWBN.js → chunk-AI4USDRI.js} +4 -4
  31. package/dist/{chunk-GKQAU52M.js → chunk-BZW5IL43.js} +4 -4
  32. package/dist/{chunk-NN6IISZO.js → chunk-C2RJVZZL.js} +2 -2
  33. package/dist/{chunk-VNUE6FHP.js → chunk-C6W5KVDV.js} +3 -3
  34. package/dist/{chunk-KNKNOJFS.js → chunk-CQYEDODS.js} +3 -3
  35. package/dist/{chunk-FPHRTW2Z.js → chunk-EYK72OTL.js} +5 -5
  36. package/dist/{chunk-FBLAWK6A.js → chunk-F5GWNSE2.js} +2 -2
  37. package/dist/{chunk-Y5J63SMF.js → chunk-F5ILTHMU.js} +5 -5
  38. package/dist/{chunk-M3FPNTO2.js → chunk-FRRJIUSI.js} +4 -4
  39. package/dist/chunk-FRRJIUSI.js.map +1 -0
  40. package/dist/{chunk-Q5MCHUXZ.js → chunk-GJTKMME7.js} +2 -2
  41. package/dist/{chunk-S22UOMHM.js → chunk-HYJMAV53.js} +6 -6
  42. package/dist/{chunk-YZE6C3TQ.js → chunk-I3IYTUUI.js} +3 -3
  43. package/dist/{chunk-5IGWRMEC.js → chunk-IVZWHIEK.js} +5 -5
  44. package/dist/{chunk-7C6VFNIY.js → chunk-IW4L4X65.js} +2 -2
  45. package/dist/{chunk-V3VIRTTE.js → chunk-IY24WS2P.js} +3 -3
  46. package/dist/{chunk-IVP5IVON.js → chunk-J6RGRZOY.js} +2 -2
  47. package/dist/{chunk-DY3EOJEN.js → chunk-JBBWALNI.js} +2 -2
  48. package/dist/{chunk-YX333DPS.js → chunk-JDCPRJVS.js} +4 -4
  49. package/dist/{chunk-E66DSTJP.js → chunk-JOK73NDT.js} +3 -3
  50. package/dist/{chunk-G4PYA575.js → chunk-JTI57WRT.js} +2 -2
  51. package/dist/{chunk-OBMYMKGO.js → chunk-JYNH4FIM.js} +4 -4
  52. package/dist/{chunk-GYAWXHFO.js → chunk-KOAJ3TZM.js} +2 -2
  53. package/dist/{chunk-X7FJMKT3.js → chunk-MBXKRHSS.js} +2 -2
  54. package/dist/{chunk-WFK2EVYU.js → chunk-NSXNXLYM.js} +2 -2
  55. package/dist/{chunk-3Q2AOPLT.js → chunk-NV4IHBZS.js} +5 -5
  56. package/dist/{chunk-H42KZXNV.js → chunk-O5XKZCUD.js} +5 -5
  57. package/dist/{chunk-DJF3FXW5.js → chunk-OTWT6BAJ.js} +18 -1
  58. package/dist/chunk-OTWT6BAJ.js.map +1 -0
  59. package/dist/{chunk-6OSOE6BY.js → chunk-S45MDEEF.js} +2 -2
  60. package/dist/{chunk-S3XA7G35.js → chunk-SQKAECUL.js} +2 -2
  61. package/dist/{chunk-YLRRU72W.js → chunk-SQOK5UM6.js} +2 -2
  62. package/dist/{chunk-SHIUFIPW.js → chunk-TA6HPKWQ.js} +1 -1
  63. package/dist/chunk-TA6HPKWQ.js.map +1 -0
  64. package/dist/{chunk-V5FZWQNN.js → chunk-TAMRU7A2.js} +4 -4
  65. package/dist/{chunk-PWFTQHYX.js → chunk-TGIJTNM3.js} +2 -2
  66. package/dist/{chunk-VEIVAYJ7.js → chunk-TNH5SLCD.js} +2 -2
  67. package/dist/{chunk-IBVTH4JR.js → chunk-TYMDCIQM.js} +4 -4
  68. package/dist/{chunk-LSIIPKYT.js → chunk-U2XSUCDF.js} +2 -2
  69. package/dist/{chunk-MI36HL5G.js → chunk-UU6M64HI.js} +4 -4
  70. package/dist/{chunk-KEDJDWWQ.js → chunk-WE2BUQD2.js} +3 -3
  71. package/dist/{chunk-OY7RX2VL.js → chunk-WWVJXBOT.js} +256 -8
  72. package/dist/chunk-WWVJXBOT.js.map +1 -0
  73. package/dist/{chunk-CYNTFU2D.js → chunk-YPIOFSN3.js} +2 -2
  74. package/dist/{chunk-PTGQPWMV.js → chunk-ZONKSLF2.js} +2 -2
  75. package/dist/consent/index.cjs.map +1 -1
  76. package/dist/consent/index.d.cts +5 -5
  77. package/dist/consent/index.d.ts +5 -5
  78. package/dist/consent/index.js +3 -3
  79. package/dist/{crypto-B46VNH6X.js → crypto-456N7UVX.js} +3 -3
  80. package/dist/{delegation-5HON72PV.js → delegation-DP4COTXB.js} +5 -5
  81. package/dist/derivations/index.cjs.map +1 -1
  82. package/dist/derivations/index.d.cts +6 -6
  83. package/dist/derivations/index.d.ts +6 -6
  84. package/dist/derivations/index.js +4 -4
  85. package/dist/{dev-unlock-BR1rMOS-.d.cts → dev-unlock-CY0HIZA0.d.cts} +1 -1
  86. package/dist/{dev-unlock-whL49sxV.d.ts → dev-unlock-CpKSkl2c.d.ts} +1 -1
  87. package/dist/{errors-DL-zTrrF.d.cts → errors-Dkc_fi-S.d.cts} +21 -1
  88. package/dist/{errors-DL-zTrrF.d.ts → errors-Dkc_fi-S.d.ts} +21 -1
  89. package/dist/executor-4IEW4KG5.js +8 -0
  90. package/dist/executor-KYJCJCIN.js +12 -0
  91. package/dist/executor-W7VIBOBZ.js +8 -0
  92. package/dist/{fanout-sidecar-DCQWJQ6S.js → fanout-sidecar-YXNAEZ33.js} +2 -2
  93. package/dist/forget/index.js +4 -4
  94. package/dist/guards/index.cjs.map +1 -1
  95. package/dist/guards/index.d.cts +6 -6
  96. package/dist/guards/index.d.ts +6 -6
  97. package/dist/guards/index.js +3 -3
  98. package/dist/{hash-BEUBmmI4.d.cts → hash-BSd0-_L8.d.cts} +1 -1
  99. package/dist/{hash-Dtb7FwWd.d.ts → hash-BnBQx39y.d.ts} +1 -1
  100. package/dist/history/index.cjs.map +1 -1
  101. package/dist/history/index.d.cts +6 -6
  102. package/dist/history/index.d.ts +6 -6
  103. package/dist/history/index.js +5 -5
  104. package/dist/i18n/index.cjs.map +1 -1
  105. package/dist/i18n/index.d.cts +5 -5
  106. package/dist/i18n/index.d.ts +5 -5
  107. package/dist/i18n/index.js +6 -6
  108. package/dist/{index-BelbyUwz.d.ts → index-Bm9hIY7t.d.ts} +2 -2
  109. package/dist/{index-BM7O48Ur.d.cts → index-tZqVB9g5.d.cts} +2 -2
  110. package/dist/index.cjs +358 -9
  111. package/dist/index.cjs.map +1 -1
  112. package/dist/index.d.cts +42 -16
  113. package/dist/index.d.ts +42 -16
  114. package/dist/index.js +73 -46
  115. package/dist/index.js.map +1 -1
  116. package/dist/indexing/index.cjs.map +1 -1
  117. package/dist/indexing/index.js +4 -4
  118. package/dist/issue-JXC6T2QR.js +12 -0
  119. package/dist/{ledger-LS6GXCBP.js → ledger-I7JUYP4L.js} +5 -5
  120. package/dist/materialized-views/index.cjs.map +1 -1
  121. package/dist/materialized-views/index.d.cts +6 -6
  122. package/dist/materialized-views/index.d.ts +6 -6
  123. package/dist/materialized-views/index.js +8 -8
  124. package/dist/mime-magic-BnJCGJzB.d.cts +103 -0
  125. package/dist/mime-magic-CjSyakO4.d.ts +103 -0
  126. package/dist/noydb-ZZCRF6TE.js +38 -0
  127. package/dist/overlay-views/index.cjs.map +1 -1
  128. package/dist/overlay-views/index.d.cts +6 -6
  129. package/dist/overlay-views/index.d.ts +6 -6
  130. package/dist/overlay-views/index.js +4 -4
  131. package/dist/periods/index.cjs.map +1 -1
  132. package/dist/periods/index.d.cts +5 -5
  133. package/dist/periods/index.d.ts +5 -5
  134. package/dist/periods/index.js +5 -5
  135. package/dist/{public-envelope-AGU6SS4Z.js → public-envelope-5XRTUNKF.js} +4 -4
  136. package/dist/query/index.cjs.map +1 -1
  137. package/dist/query/index.d.cts +3 -3
  138. package/dist/query/index.d.ts +3 -3
  139. package/dist/query/index.js +7 -7
  140. package/dist/registry-ATRHOG5B.js +8 -0
  141. package/dist/registry-LEHB26TY.js +8 -0
  142. package/dist/{registry-RDPTFXQ7.js → registry-NWHOLD5M.js} +3 -3
  143. package/dist/{revoke-IFLXEZA5.js → revoke-5IEK22KT.js} +6 -6
  144. package/dist/sealed-record/index.cjs.map +1 -1
  145. package/dist/sealed-record/index.d.cts +1 -1
  146. package/dist/sealed-record/index.d.ts +1 -1
  147. package/dist/sealed-record/index.js +2 -2
  148. package/dist/session/index.cjs.map +1 -1
  149. package/dist/session/index.d.cts +6 -6
  150. package/dist/session/index.d.ts +6 -6
  151. package/dist/session/index.js +3 -3
  152. package/dist/shadow/index.cjs.map +1 -1
  153. package/dist/shadow/index.d.cts +5 -5
  154. package/dist/shadow/index.d.ts +5 -5
  155. package/dist/shadow/index.js +2 -2
  156. package/dist/{signer-UNWOUJAK.js → signer-I6YARZQA.js} +5 -5
  157. package/dist/snapshots/index.cjs.map +1 -1
  158. package/dist/snapshots/index.d.cts +5 -5
  159. package/dist/snapshots/index.d.ts +5 -5
  160. package/dist/snapshots/index.js +4 -4
  161. package/dist/{stale-NTEV5SLX.js → stale-CPESGAPL.js} +2 -2
  162. package/dist/{state-vault-TUTFRTOA.js → state-vault-JR3CFGNP.js} +4 -4
  163. package/dist/store/index.cjs.map +1 -1
  164. package/dist/store/index.d.cts +5 -5
  165. package/dist/store/index.d.ts +5 -5
  166. package/dist/store/index.js +2 -2
  167. package/dist/{strategy-BDxQnnTX.d.ts → strategy-54eIwox5.d.ts} +1 -1
  168. package/dist/{strategy-C5ol6NdV.d.cts → strategy-WtB-jXYv.d.cts} +1 -1
  169. package/dist/sync/index.cjs.map +1 -1
  170. package/dist/sync/index.d.cts +4 -4
  171. package/dist/sync/index.d.ts +4 -4
  172. package/dist/sync/index.js +4 -4
  173. package/dist/team/index.cjs.map +1 -1
  174. package/dist/team/index.d.cts +5 -5
  175. package/dist/team/index.d.ts +5 -5
  176. package/dist/team/index.js +8 -8
  177. package/dist/{transition-guard-C__YeF3_.d.ts → transition-guard-D4bfIAiW.d.ts} +1 -1
  178. package/dist/{transition-guard-B1N82hMf.d.cts → transition-guard-Dmpqzg-_.d.cts} +1 -1
  179. package/dist/tx/index.cjs.map +1 -1
  180. package/dist/tx/index.d.cts +5 -5
  181. package/dist/tx/index.d.ts +5 -5
  182. package/dist/tx/index.js +3 -3
  183. package/dist/{types-CraiZOyO.d.ts → types-DLfWFr6U.d.ts} +374 -139
  184. package/dist/{types-D-gr5t0G.d.cts → types-DyOI6XZ_.d.cts} +374 -139
  185. package/dist/{ulid-FFRRHkVf.d.ts → ulid-B2L_aqVA.d.ts} +1 -1
  186. package/dist/{ulid-DQnSAP5W.d.cts → ulid-LaxfH2tK.d.cts} +1 -1
  187. package/dist/util/index.cjs.map +1 -1
  188. package/dist/util/index.js +1 -1
  189. package/dist/{vault-group-27EV7KB4.js → vault-group-BB246VIM.js} +7 -7
  190. package/dist/{with-materialized-view-BboqxyV3.d.cts → with-materialized-view-CeZYGJVf.d.cts} +1 -1
  191. package/dist/{with-materialized-view-CguCeVcT.d.ts → with-materialized-view-DNULSxoP.d.ts} +1 -1
  192. package/dist/{with-overlayed-view-DO08u_tx.d.ts → with-overlayed-view-C9joG7UZ.d.ts} +1 -1
  193. package/dist/{with-overlayed-view-mmsg5Of3.d.cts → with-overlayed-view-kdcPGHih.d.cts} +1 -1
  194. package/dist/{with-rollup-_TyBzz3T.d.ts → with-rollup-DJDbrxjf.d.ts} +1 -1
  195. package/dist/{with-rollup-aaxOZcIb.d.cts → with-rollup-s58XAeWO.d.cts} +1 -1
  196. package/package.json +3 -3
  197. package/dist/chunk-DJF3FXW5.js.map +0 -1
  198. package/dist/chunk-KYGGXXT6.js.map +0 -1
  199. package/dist/chunk-M3FPNTO2.js.map +0 -1
  200. package/dist/chunk-OY7RX2VL.js.map +0 -1
  201. package/dist/chunk-SHIUFIPW.js.map +0 -1
  202. package/dist/chunk-U7JNBSS3.js.map +0 -1
  203. package/dist/executor-44R5CUS2.js +0 -12
  204. package/dist/executor-AOACUK7Z.js +0 -8
  205. package/dist/executor-OKFLQCDW.js +0 -8
  206. package/dist/issue-EPA2PSWP.js +0 -12
  207. package/dist/mime-magic-CBBSOkjm.d.cts +0 -50
  208. package/dist/mime-magic-CBBSOkjm.d.ts +0 -50
  209. package/dist/noydb-BVKFP74P.js +0 -38
  210. package/dist/registry-ERNAMRDE.js +0 -8
  211. package/dist/registry-EXTHSXQW.js +0 -8
  212. /package/dist/{chunk-OKOKPYWH.js.map → chunk-37VGJM3T.js.map} +0 -0
  213. /package/dist/{chunk-B6E5IRPJ.js.map → chunk-3HNKR65T.js.map} +0 -0
  214. /package/dist/{chunk-6KESZO5D.js.map → chunk-5YTXYPES.js.map} +0 -0
  215. /package/dist/{chunk-7HD67R6U.js.map → chunk-6QAZ5O6X.js.map} +0 -0
  216. /package/dist/{chunk-XPH3FWME.js.map → chunk-6QE4DUYC.js.map} +0 -0
  217. /package/dist/{chunk-4ULLGYPA.js.map → chunk-7MRT7EPB.js.map} +0 -0
  218. /package/dist/{chunk-3FSMVWBN.js.map → chunk-AI4USDRI.js.map} +0 -0
  219. /package/dist/{chunk-GKQAU52M.js.map → chunk-BZW5IL43.js.map} +0 -0
  220. /package/dist/{chunk-NN6IISZO.js.map → chunk-C2RJVZZL.js.map} +0 -0
  221. /package/dist/{chunk-VNUE6FHP.js.map → chunk-C6W5KVDV.js.map} +0 -0
  222. /package/dist/{chunk-KNKNOJFS.js.map → chunk-CQYEDODS.js.map} +0 -0
  223. /package/dist/{chunk-FPHRTW2Z.js.map → chunk-EYK72OTL.js.map} +0 -0
  224. /package/dist/{chunk-FBLAWK6A.js.map → chunk-F5GWNSE2.js.map} +0 -0
  225. /package/dist/{chunk-Y5J63SMF.js.map → chunk-F5ILTHMU.js.map} +0 -0
  226. /package/dist/{chunk-Q5MCHUXZ.js.map → chunk-GJTKMME7.js.map} +0 -0
  227. /package/dist/{chunk-S22UOMHM.js.map → chunk-HYJMAV53.js.map} +0 -0
  228. /package/dist/{chunk-YZE6C3TQ.js.map → chunk-I3IYTUUI.js.map} +0 -0
  229. /package/dist/{chunk-5IGWRMEC.js.map → chunk-IVZWHIEK.js.map} +0 -0
  230. /package/dist/{chunk-7C6VFNIY.js.map → chunk-IW4L4X65.js.map} +0 -0
  231. /package/dist/{chunk-V3VIRTTE.js.map → chunk-IY24WS2P.js.map} +0 -0
  232. /package/dist/{chunk-IVP5IVON.js.map → chunk-J6RGRZOY.js.map} +0 -0
  233. /package/dist/{chunk-DY3EOJEN.js.map → chunk-JBBWALNI.js.map} +0 -0
  234. /package/dist/{chunk-YX333DPS.js.map → chunk-JDCPRJVS.js.map} +0 -0
  235. /package/dist/{chunk-E66DSTJP.js.map → chunk-JOK73NDT.js.map} +0 -0
  236. /package/dist/{chunk-G4PYA575.js.map → chunk-JTI57WRT.js.map} +0 -0
  237. /package/dist/{chunk-OBMYMKGO.js.map → chunk-JYNH4FIM.js.map} +0 -0
  238. /package/dist/{chunk-GYAWXHFO.js.map → chunk-KOAJ3TZM.js.map} +0 -0
  239. /package/dist/{chunk-X7FJMKT3.js.map → chunk-MBXKRHSS.js.map} +0 -0
  240. /package/dist/{chunk-WFK2EVYU.js.map → chunk-NSXNXLYM.js.map} +0 -0
  241. /package/dist/{chunk-3Q2AOPLT.js.map → chunk-NV4IHBZS.js.map} +0 -0
  242. /package/dist/{chunk-H42KZXNV.js.map → chunk-O5XKZCUD.js.map} +0 -0
  243. /package/dist/{chunk-6OSOE6BY.js.map → chunk-S45MDEEF.js.map} +0 -0
  244. /package/dist/{chunk-S3XA7G35.js.map → chunk-SQKAECUL.js.map} +0 -0
  245. /package/dist/{chunk-YLRRU72W.js.map → chunk-SQOK5UM6.js.map} +0 -0
  246. /package/dist/{chunk-V5FZWQNN.js.map → chunk-TAMRU7A2.js.map} +0 -0
  247. /package/dist/{chunk-PWFTQHYX.js.map → chunk-TGIJTNM3.js.map} +0 -0
  248. /package/dist/{chunk-VEIVAYJ7.js.map → chunk-TNH5SLCD.js.map} +0 -0
  249. /package/dist/{chunk-IBVTH4JR.js.map → chunk-TYMDCIQM.js.map} +0 -0
  250. /package/dist/{chunk-LSIIPKYT.js.map → chunk-U2XSUCDF.js.map} +0 -0
  251. /package/dist/{chunk-MI36HL5G.js.map → chunk-UU6M64HI.js.map} +0 -0
  252. /package/dist/{chunk-KEDJDWWQ.js.map → chunk-WE2BUQD2.js.map} +0 -0
  253. /package/dist/{chunk-CYNTFU2D.js.map → chunk-YPIOFSN3.js.map} +0 -0
  254. /package/dist/{chunk-PTGQPWMV.js.map → chunk-ZONKSLF2.js.map} +0 -0
  255. /package/dist/{crypto-B46VNH6X.js.map → crypto-456N7UVX.js.map} +0 -0
  256. /package/dist/{delegation-5HON72PV.js.map → delegation-DP4COTXB.js.map} +0 -0
  257. /package/dist/{executor-44R5CUS2.js.map → executor-4IEW4KG5.js.map} +0 -0
  258. /package/dist/{executor-AOACUK7Z.js.map → executor-KYJCJCIN.js.map} +0 -0
  259. /package/dist/{executor-OKFLQCDW.js.map → executor-W7VIBOBZ.js.map} +0 -0
  260. /package/dist/{fanout-sidecar-DCQWJQ6S.js.map → fanout-sidecar-YXNAEZ33.js.map} +0 -0
  261. /package/dist/{issue-EPA2PSWP.js.map → issue-JXC6T2QR.js.map} +0 -0
  262. /package/dist/{ledger-LS6GXCBP.js.map → ledger-I7JUYP4L.js.map} +0 -0
  263. /package/dist/{noydb-BVKFP74P.js.map → noydb-ZZCRF6TE.js.map} +0 -0
  264. /package/dist/{public-envelope-AGU6SS4Z.js.map → public-envelope-5XRTUNKF.js.map} +0 -0
  265. /package/dist/{registry-ERNAMRDE.js.map → registry-ATRHOG5B.js.map} +0 -0
  266. /package/dist/{registry-EXTHSXQW.js.map → registry-LEHB26TY.js.map} +0 -0
  267. /package/dist/{registry-RDPTFXQ7.js.map → registry-NWHOLD5M.js.map} +0 -0
  268. /package/dist/{revoke-IFLXEZA5.js.map → revoke-5IEK22KT.js.map} +0 -0
  269. /package/dist/{signer-UNWOUJAK.js.map → signer-I6YARZQA.js.map} +0 -0
  270. /package/dist/{stale-NTEV5SLX.js.map → stale-CPESGAPL.js.map} +0 -0
  271. /package/dist/{state-vault-TUTFRTOA.js.map → state-vault-JR3CFGNP.js.map} +0 -0
  272. /package/dist/{vault-group-27EV7KB4.js.map → vault-group-BB246VIM.js.map} +0 -0
@@ -1,13 +1,13 @@
1
- import { aP as NoydbStore } from '../types-D-gr5t0G.cjs';
1
+ import { aW as NoydbStore } from '../types-DyOI6XZ_.cjs';
2
2
  import { AttestationFieldSchema, QrPayload, RevocationList } from '@noy-db/attestation';
3
3
  export { AttestationFieldSchema, QrPayload, RevocationList, VerifyInput, VerifyResult, decodeQr, isRevoked, signRevocationList, verifyAttestation, verifyRevocationList } from '@noy-db/attestation';
4
- export { s as AttestationError } from '../errors-DL-zTrrF.cjs';
4
+ export { s as AttestationError } from '../errors-Dkc_fi-S.cjs';
5
5
  import '../lazy-builder-eYZzLEL1.cjs';
6
6
  import '../predicate-BmhBSPCH.cjs';
7
- import '../strategy-C5ol6NdV.cjs';
7
+ import '../strategy-WtB-jXYv.cjs';
8
8
  import '../strategy-BSxFXGzb.cjs';
9
9
  import '../index-BMmajblo.cjs';
10
- import '../index-BM7O48Ur.cjs';
10
+ import '../index-tZqVB9g5.cjs';
11
11
 
12
12
  /** Everything issueAttestationCore needs from the Vault, injected for testability. */
13
13
  interface IssueContext {
@@ -1,13 +1,13 @@
1
- import { aP as NoydbStore } from '../types-CraiZOyO.js';
1
+ import { aW as NoydbStore } from '../types-DLfWFr6U.js';
2
2
  import { AttestationFieldSchema, QrPayload, RevocationList } from '@noy-db/attestation';
3
3
  export { AttestationFieldSchema, QrPayload, RevocationList, VerifyInput, VerifyResult, decodeQr, isRevoked, signRevocationList, verifyAttestation, verifyRevocationList } from '@noy-db/attestation';
4
- export { s as AttestationError } from '../errors-DL-zTrrF.js';
4
+ export { s as AttestationError } from '../errors-Dkc_fi-S.js';
5
5
  import '../lazy-builder-ChSqcF5t.js';
6
6
  import '../predicate-BmhBSPCH.js';
7
- import '../strategy-BDxQnnTX.js';
7
+ import '../strategy-54eIwox5.js';
8
8
  import '../strategy-BSxFXGzb.js';
9
9
  import '../index-BMmajblo.js';
10
- import '../index-BelbyUwz.js';
10
+ import '../index-Bm9hIY7t.js';
11
11
 
12
12
  /** Everything issueAttestationCore needs from the Vault, injected for testability. */
13
13
  interface IssueContext {
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  issueAttestationCore
3
- } from "../chunk-Y5J63SMF.js";
3
+ } from "../chunk-F5ILTHMU.js";
4
4
  import {
5
5
  getRevokedDocIdsCore,
6
6
  publishRevocationListCore,
7
7
  revokeDocCore,
8
8
  unrevokeDocCore
9
- } from "../chunk-5IGWRMEC.js";
9
+ } from "../chunk-IVZWHIEK.js";
10
10
  import {
11
11
  ATTESTATIONS_COLLECTION
12
- } from "../chunk-V5FZWQNN.js";
12
+ } from "../chunk-TAMRU7A2.js";
13
13
  import "../chunk-FZU343FL.js";
14
- import "../chunk-SHIUFIPW.js";
15
- import "../chunk-OKOKPYWH.js";
14
+ import "../chunk-TA6HPKWQ.js";
15
+ import "../chunk-37VGJM3T.js";
16
16
  import {
17
17
  AttestationError
18
- } from "../chunk-DJF3FXW5.js";
18
+ } from "../chunk-OTWT6BAJ.js";
19
19
 
20
20
  // src/attestation/index.ts
21
21
  import { verifyAttestation, decodeQr, verifyRevocationList, isRevoked, signRevocationList } from "@noy-db/attestation";
@@ -397,7 +397,9 @@ __export(blobs_exports, {
397
397
  createExportBlobsHandle: () => createExportBlobsHandle,
398
398
  detectMagic: () => detectMagic,
399
399
  detectMimeType: () => detectMimeType,
400
+ importExternalObjects: () => importExternalObjects,
400
401
  isPreCompressed: () => isPreCompressed,
402
+ memoryObjectProjection: () => memoryObjectProjection,
401
403
  runCompaction: () => runCompaction,
402
404
  withBlobs: () => withBlobs
403
405
  });
@@ -677,6 +679,9 @@ var BlobSet = class {
677
679
  userId;
678
680
  maxBlobBytes;
679
681
  erasableBlobs;
682
+ debugPlaintext;
683
+ objectStore;
684
+ blobFields;
680
685
  constructor(opts) {
681
686
  this.store = opts.store;
682
687
  this.vault = opts.vault;
@@ -687,6 +692,9 @@ var BlobSet = class {
687
692
  this.userId = opts.userId;
688
693
  this.maxBlobBytes = opts.maxBlobBytes;
689
694
  this.erasableBlobs = opts.erasableBlobs === true;
695
+ this.debugPlaintext = opts.debugPlaintext === true;
696
+ this.objectStore = opts.objectStore;
697
+ this.blobFields = opts.blobFields;
690
698
  }
691
699
  /**
692
700
  * Resolve the key the blob's CHUNKS are encrypted under.
@@ -1074,6 +1082,49 @@ var BlobSet = class {
1074
1082
  * If overwriting an existing slot, decrements the old eTag's refCount.
1075
1083
  */
1076
1084
  async put(slotName, data, opts) {
1085
+ if (this.objectStore && this.blobFields?.[slotName]?.external) {
1086
+ const policy = this.blobFields[slotName];
1087
+ let contentType = opts?.mimeType;
1088
+ if (!contentType) {
1089
+ const detected = detectMagic(data.subarray(0, 16));
1090
+ contentType = detected?.mime ?? "application/octet-stream";
1091
+ }
1092
+ const key = `${this.collection}/${this.recordId}/${slotName}`;
1093
+ const isPublic = policy.public === true;
1094
+ const backlink = await this.buildBacklink(slotName, policy.backlink ?? "opaque-token");
1095
+ await this.objectStore.putObject(key, data, {
1096
+ contentType,
1097
+ public: isPublic,
1098
+ ...backlink.userMeta ? { userMeta: backlink.userMeta } : {}
1099
+ });
1100
+ const uploaderUserId2 = opts?.uploadedBy ?? this.userId;
1101
+ let oldETag;
1102
+ await this.casUpdateSlots((slots) => {
1103
+ oldETag = slots[slotName]?.eTag || void 0;
1104
+ const prevMeta = slots[slotName]?.external?.meta;
1105
+ slots[slotName] = {
1106
+ eTag: "",
1107
+ external: {
1108
+ key,
1109
+ contentType,
1110
+ ...isPublic ? { public: true } : {},
1111
+ ...backlink.token ? { backlink: backlink.token } : {},
1112
+ ...prevMeta ? { meta: prevMeta } : {}
1113
+ },
1114
+ filename: slotName,
1115
+ size: data.byteLength,
1116
+ mimeType: contentType,
1117
+ uploadedAt: (/* @__PURE__ */ new Date()).toISOString(),
1118
+ ...uploaderUserId2 !== void 0 ? { uploadedBy: uploaderUserId2 } : {}
1119
+ };
1120
+ return slots;
1121
+ });
1122
+ if (oldETag) {
1123
+ await this.releaseRef(oldETag, 1, false).catch(() => {
1124
+ });
1125
+ }
1126
+ return;
1127
+ }
1077
1128
  const blobDEK = this.encrypted ? await this.getDEK(BLOB_COLLECTION) : null;
1078
1129
  const eTag = blobDEK ? await hmacSha256Hex(blobDEK, data) : await plainSha256Hex(data);
1079
1130
  let mimeType = opts?.mimeType;
@@ -1089,12 +1140,13 @@ var BlobSet = class {
1089
1140
  } else {
1090
1141
  shouldCompress = true;
1091
1142
  }
1143
+ if (this.debugPlaintext) shouldCompress = false;
1092
1144
  const existingBlob = await this.loadBlobObject(eTag);
1093
1145
  if (existingBlob) {
1094
1146
  await this.casUpdateRefCount(eTag, 1);
1095
1147
  } else {
1096
1148
  const { bytes: compressed, algorithm } = shouldCompress ? await compressBytes(data) : { bytes: data, algorithm: "none" };
1097
- const chunkSize = this.effectiveChunkSize(opts);
1149
+ const chunkSize = this.debugPlaintext ? Math.max(compressed.byteLength, 1) : this.effectiveChunkSize(opts);
1098
1150
  const chunkCount = Math.max(1, Math.ceil(compressed.byteLength / chunkSize));
1099
1151
  let chunkKey = blobDEK;
1100
1152
  let wrappedCek;
@@ -1159,10 +1211,114 @@ var BlobSet = class {
1159
1211
  const { slots } = await this.loadSlots();
1160
1212
  const slot = slots[slotName];
1161
1213
  if (!slot) return null;
1214
+ if (slot.external) {
1215
+ if (!this.objectStore) {
1216
+ throw new NotFoundError(`Blob slot "${slotName}" is external but no objectStore is configured`);
1217
+ }
1218
+ return this.objectStore.getObject(slot.external.key);
1219
+ }
1162
1220
  const result = await this.loadBlobObject(slot.eTag);
1163
1221
  if (!result) return null;
1164
1222
  return this.fetchAllChunks(result.blob);
1165
1223
  }
1224
+ /**
1225
+ * A URL to fetch an `external` slot's object directly — presigned
1226
+ * (time-limited) or public, per the projection. Returns `null` if the slot
1227
+ * does not exist. Throws for a non-external slot (use `get()`/`response()`).
1228
+ */
1229
+ async url(slotName, opts) {
1230
+ const { slots } = await this.loadSlots();
1231
+ const slot = slots[slotName];
1232
+ if (!slot) return null;
1233
+ if (!slot.external) {
1234
+ throw new NotFoundError(`Blob slot "${slotName}" is not external \u2014 url() is only for external fields`);
1235
+ }
1236
+ if (!this.objectStore) {
1237
+ throw new NotFoundError(`Blob slot "${slotName}" is external but no objectStore is configured`);
1238
+ }
1239
+ return this.objectStore.objectUrl(slot.external.key, opts);
1240
+ }
1241
+ /**
1242
+ * Build the backlink stamped onto an external object's metadata — the
1243
+ * self-describing "secondary store" reference back to this record. See
1244
+ * {@link BlobFieldPolicy.backlink}. Returns the `userMeta` to attach and, for
1245
+ * `opaque-token`, the `token` to record on the slot.
1246
+ */
1247
+ async buildBacklink(slotName, mode) {
1248
+ if (mode === "none") return {};
1249
+ const ref = { vault: this.vault, collection: this.collection, record: this.recordId, field: slotName };
1250
+ if (mode === "plain") {
1251
+ return {
1252
+ userMeta: {
1253
+ "noydb-vault": ref.vault,
1254
+ "noydb-collection": ref.collection,
1255
+ "noydb-record": ref.record,
1256
+ "noydb-field": ref.field
1257
+ }
1258
+ };
1259
+ }
1260
+ if (mode === "encrypted" && this.encrypted) {
1261
+ const dek = await this.getDEK(BLOB_COLLECTION);
1262
+ const { iv, data } = await encrypt(JSON.stringify(ref), dek);
1263
+ return { userMeta: { "noydb-backlink-enc": `${iv}.${data}` } };
1264
+ }
1265
+ const bytes = globalThis.crypto.getRandomValues(new Uint8Array(16));
1266
+ const token = Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("");
1267
+ return { userMeta: { "noydb-backlink": token }, token };
1268
+ }
1269
+ /**
1270
+ * Adopt an EXISTING object in the projection into this slot **without
1271
+ * re-uploading** — used by import/bootstrap to anchor objects already in the
1272
+ * bucket. Writes the external slot record (the catalog entry).
1273
+ */
1274
+ async adoptExternal(slotName, ref) {
1275
+ const uploaderUserId = this.userId;
1276
+ await this.casUpdateSlots((slots) => {
1277
+ slots[slotName] = {
1278
+ eTag: "",
1279
+ external: {
1280
+ key: ref.key,
1281
+ ...ref.contentType ? { contentType: ref.contentType } : {},
1282
+ ...ref.public ? { public: true } : {},
1283
+ ...ref.backlink ? { backlink: ref.backlink } : {},
1284
+ ...ref.meta ? { meta: ref.meta } : {}
1285
+ },
1286
+ filename: slotName,
1287
+ size: ref.size ?? 0,
1288
+ ...ref.contentType ? { mimeType: ref.contentType } : {},
1289
+ uploadedAt: (/* @__PURE__ */ new Date()).toISOString(),
1290
+ ...uploaderUserId !== void 0 ? { uploadedBy: uploaderUserId } : {}
1291
+ };
1292
+ return slots;
1293
+ });
1294
+ }
1295
+ /**
1296
+ * Merge derived metadata (video `duration`, image `width`/`height`, arbitrary
1297
+ * metatags) into an external slot's secondary metadata store. Typically called
1298
+ * from an AWS-side processing callback (MediaConvert / ffprobe / Rekognition)
1299
+ * once it has probed the object. No-op for a missing or non-external slot.
1300
+ */
1301
+ async setExternalMeta(slotName, meta) {
1302
+ await this.casUpdateSlots((slots) => {
1303
+ const slot = slots[slotName];
1304
+ if (!slot?.external) return null;
1305
+ slots[slotName] = {
1306
+ ...slot,
1307
+ external: { ...slot.external, meta: { ...slot.external.meta, ...meta } }
1308
+ };
1309
+ return slots;
1310
+ });
1311
+ }
1312
+ /**
1313
+ * Read an external slot's synced derived metadata (the secondary store).
1314
+ * Returns `null` for a missing or non-external slot, `{}` if none synced yet.
1315
+ */
1316
+ async externalMeta(slotName) {
1317
+ const { slots } = await this.loadSlots();
1318
+ const slot = slots[slotName];
1319
+ if (!slot?.external) return null;
1320
+ return slot.external.meta ?? {};
1321
+ }
1166
1322
  /**
1167
1323
  * List all slot entries for this record.
1168
1324
  * Returns metadata only — no chunk data is loaded.
@@ -1177,12 +1333,19 @@ var BlobSet = class {
1177
1333
  */
1178
1334
  async delete(slotName) {
1179
1335
  let eTagToRelease;
1336
+ let externalKeyToDelete;
1180
1337
  await this.casUpdateSlots((slots) => {
1181
1338
  if (!(slotName in slots)) return null;
1182
- eTagToRelease = slots[slotName].eTag;
1339
+ const slot = slots[slotName];
1340
+ if (slot.external) externalKeyToDelete = slot.external.key;
1341
+ else eTagToRelease = slot.eTag;
1183
1342
  delete slots[slotName];
1184
1343
  return slots;
1185
1344
  });
1345
+ if (externalKeyToDelete && this.objectStore) {
1346
+ await this.objectStore.deleteObject(externalKeyToDelete).catch(() => {
1347
+ });
1348
+ }
1186
1349
  if (eTagToRelease) {
1187
1350
  await this.releaseRef(eTagToRelease, 1, false).catch(() => {
1188
1351
  });
@@ -1449,6 +1612,91 @@ function withBlobs() {
1449
1612
  };
1450
1613
  }
1451
1614
 
1615
+ // src/blobs/object-projection.ts
1616
+ function memoryObjectProjection(opts = {}) {
1617
+ const base = opts.baseUrl ?? "memory://objects";
1618
+ const store = /* @__PURE__ */ new Map();
1619
+ return {
1620
+ name: "memory",
1621
+ async putObject(key, bytes, o) {
1622
+ store.set(key, {
1623
+ bytes,
1624
+ contentType: o.contentType,
1625
+ public: o.public === true,
1626
+ ...o.userMeta ? { userMeta: o.userMeta } : {}
1627
+ });
1628
+ },
1629
+ async getObject(key) {
1630
+ return store.get(key)?.bytes ?? null;
1631
+ },
1632
+ async deleteObject(key) {
1633
+ store.delete(key);
1634
+ },
1635
+ async headObject(key) {
1636
+ const e = store.get(key);
1637
+ if (!e) return null;
1638
+ return {
1639
+ size: e.bytes.byteLength,
1640
+ contentType: e.contentType,
1641
+ ...e.userMeta ? { userMeta: e.userMeta } : {}
1642
+ };
1643
+ },
1644
+ async objectUrl(key, o) {
1645
+ const e = store.get(key);
1646
+ if (e?.public) return `${base}/${key}`;
1647
+ return `${base}/${key}?sig=memory&expires=${o?.expiresInSeconds ?? 900}`;
1648
+ },
1649
+ async putUrl(key, o) {
1650
+ return `${base}/${key}?upload=memory&ct=${encodeURIComponent(o.contentType)}`;
1651
+ },
1652
+ async listPrefix(prefix) {
1653
+ const out = [];
1654
+ for (const [key, e] of store) {
1655
+ if (!key.startsWith(prefix)) continue;
1656
+ out.push({
1657
+ key,
1658
+ meta: { size: e.bytes.byteLength, contentType: e.contentType, ...e.userMeta ? { userMeta: e.userMeta } : {} }
1659
+ });
1660
+ }
1661
+ return out;
1662
+ }
1663
+ };
1664
+ }
1665
+
1666
+ // src/blobs/import-external.ts
1667
+ function defaultDeriveRecordId(key) {
1668
+ const parts = key.split("/");
1669
+ return parts.length >= 2 ? parts[parts.length - 2] ?? null : null;
1670
+ }
1671
+ async function importExternalObjects(args) {
1672
+ const { collection, objectStore, field } = args;
1673
+ const opts = args.options ?? {};
1674
+ const derive = opts.deriveRecordId ?? defaultDeriveRecordId;
1675
+ const makeRecord = opts.makeRecord ?? ((id) => ({ id }));
1676
+ const objects = await objectStore.listPrefix(opts.prefix ?? "");
1677
+ const recordIds = [];
1678
+ let imported = 0;
1679
+ let skipped = 0;
1680
+ for (const { key, meta } of objects) {
1681
+ const recordId = derive(key);
1682
+ if (!recordId) {
1683
+ skipped++;
1684
+ continue;
1685
+ }
1686
+ if (await collection.get(recordId) == null) {
1687
+ await collection.put(recordId, makeRecord(recordId));
1688
+ }
1689
+ await collection.blob(recordId).adoptExternal(field, {
1690
+ key,
1691
+ ...meta.size !== void 0 ? { size: meta.size } : {},
1692
+ ...meta.contentType ? { contentType: meta.contentType } : {}
1693
+ });
1694
+ recordIds.push(recordId);
1695
+ imported++;
1696
+ }
1697
+ return { imported, skipped, recordIds };
1698
+ }
1699
+
1452
1700
  // src/blobs/blob-compaction.ts
1453
1701
  init_crypto();
1454
1702
  var BLOB_EVICTION_AUDIT_COLLECTION = "_blob_eviction_audit";
@@ -1710,7 +1958,9 @@ function generateBatchId() {
1710
1958
  createExportBlobsHandle,
1711
1959
  detectMagic,
1712
1960
  detectMimeType,
1961
+ importExternalObjects,
1713
1962
  isPreCompressed,
1963
+ memoryObjectProjection,
1714
1964
  runCompaction,
1715
1965
  withBlobs
1716
1966
  });