@noy-db/hub 0.6.0-pre.12 → 0.6.0-pre.14
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.
- package/dist/api-6IBOZN6F.js +20 -0
- package/dist/attestation/index.js +19 -19
- package/dist/{backup-AWHG6ODK.js → backup-FNAYQMLF.js} +15 -14
- package/dist/backup-FNAYQMLF.js.map +1 -0
- package/dist/blobs/index.js +13 -13
- package/dist/broker/index.js +12 -12
- package/dist/cargo/index.js +30 -30
- package/dist/{chunk-DG27IUVI.js → chunk-42IDLU5V.js} +2 -2
- package/dist/{chunk-35EBKWQU.js → chunk-4444HN72.js} +4 -4
- package/dist/{chunk-N35NC4JH.js → chunk-466KGOQB.js} +2 -2
- package/dist/{chunk-ZJADGNYF.js → chunk-4AOERLTV.js} +1 -1
- package/dist/chunk-4AOERLTV.js.map +1 -0
- package/dist/{chunk-SPA5WX3T.js → chunk-4LNFXGNW.js} +64 -70
- package/dist/chunk-4LNFXGNW.js.map +1 -0
- package/dist/{chunk-6OC6YASM.js → chunk-4NI5PR5S.js} +2 -2
- package/dist/{chunk-OUST5WDV.js → chunk-4YUIVHII.js} +5 -5
- package/dist/{chunk-6HFM7EIT.js → chunk-5NKSNW25.js} +2 -2
- package/dist/{chunk-FDX7OWWI.js → chunk-5SK5AFYH.js} +2 -2
- package/dist/{chunk-DMQCLZ4Z.js → chunk-6U7M7AX6.js} +2 -2
- package/dist/{chunk-NSRITINN.js → chunk-6ZFTVY3O.js} +1 -1
- package/dist/chunk-6ZFTVY3O.js.map +1 -0
- package/dist/{chunk-FNSMZQS4.js → chunk-7EIPPOEL.js} +2 -2
- package/dist/{chunk-OXCU7G5I.js → chunk-7J6YERYT.js} +10 -10
- package/dist/{chunk-P2PLXMHO.js → chunk-7VIIEXQ2.js} +15 -12
- package/dist/chunk-7VIIEXQ2.js.map +1 -0
- package/dist/{chunk-AZQVFXJF.js → chunk-A4JJUWSV.js} +3 -3
- package/dist/{chunk-BGQ63MCT.js → chunk-AFSMT3WI.js} +3 -3
- package/dist/{chunk-3FSX6LDG.js → chunk-AMKCY454.js} +2 -2
- package/dist/{chunk-K6TQEDVJ.js → chunk-BVYRPAB2.js} +7 -7
- package/dist/{chunk-7F4DBNSP.js → chunk-C66T4W5P.js} +3 -3
- package/dist/{chunk-UFM3WVIF.js → chunk-C6MI5OCF.js} +6 -6
- package/dist/{chunk-PK3URBVU.js → chunk-CAJ7QAPC.js} +3 -3
- package/dist/{chunk-P2Y2F6EB.js → chunk-CK6Z5DJQ.js} +4 -4
- package/dist/{chunk-G4VQSGXL.js → chunk-CK7IRIRY.js} +5 -5
- package/dist/{chunk-44JENXEG.js → chunk-CNA3QRLM.js} +2 -2
- package/dist/chunk-CNA3QRLM.js.map +1 -0
- package/dist/{chunk-UAHHWR4P.js → chunk-CWX6YIX5.js} +7 -7
- package/dist/{chunk-5XFTL73S.js → chunk-D763JZRO.js} +3 -3
- package/dist/{chunk-ZSKB5BDK.js → chunk-DZWRTWN2.js} +82 -82
- package/dist/{chunk-ZSKB5BDK.js.map → chunk-DZWRTWN2.js.map} +1 -1
- package/dist/{chunk-CCZJJ4I2.js → chunk-ESABIXMQ.js} +4 -4
- package/dist/{chunk-5GMMIDJX.js → chunk-FMZV43QY.js} +4 -4
- package/dist/{chunk-HXGUIPQB.js → chunk-FSZPQCDR.js} +3 -3
- package/dist/{chunk-SYFEJFIO.js → chunk-GBTLOHJM.js} +9 -6
- package/dist/chunk-GBTLOHJM.js.map +1 -0
- package/dist/{chunk-Z7SMBVNM.js → chunk-GE2AGI67.js} +3 -3
- package/dist/{chunk-7VPWXVKU.js → chunk-GJX6DOGD.js} +5 -5
- package/dist/{chunk-VBCDVWRU.js → chunk-GLS7OSZT.js} +7 -7
- package/dist/{chunk-W3TVWF6N.js → chunk-H545OIWE.js} +2 -2
- package/dist/{chunk-VA3PPYTQ.js → chunk-HJAFOPTN.js} +6 -6
- package/dist/{chunk-Z45YRGFO.js → chunk-HNOBRU24.js} +2 -2
- package/dist/{chunk-OI7ZJUYT.js → chunk-HVPQ5QIZ.js} +8 -8
- package/dist/{chunk-AR2JDFAE.js → chunk-HVR74IBG.js} +2 -2
- package/dist/{chunk-HNGSV2YC.js → chunk-I64WQSN3.js} +7 -9
- package/dist/chunk-I64WQSN3.js.map +1 -0
- package/dist/{chunk-2APC6HS6.js → chunk-IMYGJ5HU.js} +2 -2
- package/dist/{chunk-25FGCLYS.js → chunk-IYYGLI2K.js} +6 -6
- package/dist/{chunk-E2TN45ZD.js → chunk-JBMSNYOS.js} +5 -5
- package/dist/{chunk-55LKVALY.js → chunk-JN64WH3U.js} +1 -3
- package/dist/chunk-JN64WH3U.js.map +1 -0
- package/dist/{chunk-RXYYFSBB.js → chunk-JU3JKOY5.js} +3 -3
- package/dist/{chunk-CEJWMBXO.js → chunk-K2MR7ROB.js} +2 -2
- package/dist/{chunk-PGWXE5CR.js → chunk-KCLNKE4W.js} +6 -6
- package/dist/{chunk-LRNODVQX.js → chunk-KPD6HNQD.js} +12 -12
- package/dist/chunk-KPD6HNQD.js.map +1 -0
- package/dist/{chunk-K525AZ5C.js → chunk-KTCQKXHW.js} +3 -3
- package/dist/{chunk-7HF4J7Z5.js → chunk-LBQIKMBH.js} +2 -2
- package/dist/{chunk-EBEKSNKS.js → chunk-LWOSNMHE.js} +11 -11
- package/dist/chunk-LWOSNMHE.js.map +1 -0
- package/dist/{chunk-4HDYQL3J.js → chunk-MVG67SMN.js} +2 -2
- package/dist/{chunk-7MT56F4U.js → chunk-N6OJLR2M.js} +3 -3
- package/dist/{chunk-DIICZPWS.js → chunk-P2UFDX2F.js} +5 -5
- package/dist/{chunk-HVQGCKY4.js → chunk-PCXAUC65.js} +2 -2
- package/dist/{chunk-MSWYQLMQ.js → chunk-PJ5TGJ7U.js} +2 -2
- package/dist/{chunk-CCZ5DEJ7.js → chunk-QEYXKICE.js} +2 -2
- package/dist/{chunk-H4YQSDOI.js → chunk-QI2KXQOM.js} +2 -2
- package/dist/{chunk-UANGJ2YB.js → chunk-QJYTGH5V.js} +11 -10
- package/dist/{chunk-UANGJ2YB.js.map → chunk-QJYTGH5V.js.map} +1 -1
- package/dist/{chunk-FAXZQ5UF.js → chunk-QLMUW7OC.js} +2 -2
- package/dist/{chunk-XXVIHJZY.js → chunk-QQP5KJMS.js} +4 -4
- package/dist/{chunk-VCETL77O.js → chunk-QTDAPDDV.js} +14 -6
- package/dist/chunk-QTDAPDDV.js.map +1 -0
- package/dist/{chunk-RTAMLDWP.js → chunk-QWNYUTI2.js} +2 -2
- package/dist/{chunk-NT432TE6.js → chunk-R7E7X4CQ.js} +3 -3
- package/dist/{chunk-747LRSOO.js → chunk-RBTZLXZJ.js} +2 -2
- package/dist/{chunk-OF3L2SD6.js → chunk-RDPZMUCX.js} +2 -2
- package/dist/{chunk-JIUVJ4M7.js → chunk-RJTGXZT6.js} +2 -2
- package/dist/{chunk-XJIGOFN6.js → chunk-ROFEKKMI.js} +4 -4
- package/dist/{chunk-UHXCLPGC.js → chunk-RVTOCAHQ.js} +2 -2
- package/dist/{chunk-WLYIROCJ.js → chunk-RWPNRCK2.js} +2 -2
- package/dist/{chunk-HNHCQ556.js → chunk-S6CP5FWF.js} +2 -2
- package/dist/{chunk-YY3PEDBR.js → chunk-S77LTWCZ.js} +7 -7
- package/dist/{chunk-JRCYZEHU.js → chunk-SGEI3IJK.js} +2 -2
- package/dist/{chunk-7G6VDWXB.js → chunk-SZZEDEIU.js} +3 -3
- package/dist/{chunk-4UVDI4XE.js → chunk-T7AEAFEE.js} +4 -4
- package/dist/{chunk-B2P7M2D2.js → chunk-THYGVKZB.js} +7 -11
- package/dist/chunk-THYGVKZB.js.map +1 -0
- package/dist/{chunk-FUHKW252.js → chunk-TQ7IRULX.js} +2 -2
- package/dist/{chunk-VJFMXYKP.js → chunk-TQLYMYOK.js} +2 -2
- package/dist/{chunk-QS2PUZC7.js → chunk-UTQLKPBS.js} +6 -6
- package/dist/{chunk-T227WEHE.js → chunk-V2BEYLNR.js} +6 -6
- package/dist/{chunk-HPLWFNG4.js → chunk-V4M4BZNW.js} +2 -2
- package/dist/{chunk-KUDZVJKQ.js → chunk-VTTRWLOR.js} +2 -2
- package/dist/{chunk-L2UHRVB4.js → chunk-VVMSDWRG.js} +5 -5
- package/dist/{chunk-SV4BNALS.js → chunk-WLZKVY33.js} +6 -6
- package/dist/{chunk-TJCRCCPT.js → chunk-XHX3NTRP.js} +4 -4
- package/dist/{chunk-7BEHYALK.js → chunk-Y7MJSOZ7.js} +7 -7
- package/dist/{chunk-7BEHYALK.js.map → chunk-Y7MJSOZ7.js.map} +1 -1
- package/dist/{chunk-YAWK6AWF.js → chunk-YDJXGYYA.js} +2 -2
- package/dist/{chunk-VMCCGUQB.js → chunk-YGJZLOSR.js} +2 -2
- package/dist/{chunk-7TSYBD3E.js → chunk-YH65A6WM.js} +2 -2
- package/dist/{chunk-Y3H4WOP3.js → chunk-YKEJ5P3H.js} +5 -5
- package/dist/{chunk-GV2EFYNV.js → chunk-YODIXNV4.js} +4 -4
- package/dist/{chunk-AHLJSVRL.js → chunk-YVOW35HH.js} +2 -2
- package/dist/{chunk-DEFCPAXD.js → chunk-YZ7BRD26.js} +2 -2
- package/dist/{chunk-NJDQ4YSV.js → chunk-Z3U2YVNM.js} +4 -4
- package/dist/{chunk-RSHNUOSJ.js → chunk-ZHDMT2MJ.js} +6 -6
- package/dist/{chunk-4X5Z5SRV.js → chunk-ZWPUYBNK.js} +35 -8
- package/dist/chunk-ZWPUYBNK.js.map +1 -0
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-EHRSGBM7.js → classified-marker-3STDEUFT.js} +3 -3
- package/dist/collection-facade-SGTS3TRS.js +45 -0
- package/dist/{computed-6G5M3UPH.js → computed-5E2OM6EN.js} +3 -3
- package/dist/consent/index.js +10 -10
- package/dist/cover/index.js +3 -3
- package/dist/custody/index.js +11 -11
- package/dist/{dead-filter-ANPRM2LD.js → dead-filter-ZNWVGV5U.js} +2 -2
- package/dist/debug/index.js +1 -1
- package/dist/{delegation-6NUQCURX.js → delegation-LZWFOST7.js} +14 -12
- package/dist/delegation-LZWFOST7.js.map +1 -0
- package/dist/derivations/index.js +12 -12
- package/dist/derive-BWXA2L7D.js +22 -0
- package/dist/directory/index.js +10 -10
- package/dist/{dispatch-EO2QHEXK.js → dispatch-S34AUC43.js} +18 -18
- package/dist/{dispatch-UGU775MV.js → dispatch-TIYW3UDN.js} +5 -5
- package/dist/{enclave-3Z7VTJAW.js → enclave-Y6GMYQMS.js} +11 -9
- package/dist/executor-JDMH2IGK.js +29 -0
- package/dist/executor-PCZN2LTY.js +9 -0
- package/dist/executor-WFTHIDT7.js +9 -0
- package/dist/export-accessible-U6GXZZMQ.js +23 -0
- package/dist/extract-partition-IDI6NDUR.js +38 -0
- package/dist/{fanout-sidecar-3Q6BWNSS.js → fanout-sidecar-BVFOEJTP.js} +9 -9
- package/dist/find-VBNMB42N.js +11 -0
- package/dist/forget/index.js +9 -9
- package/dist/guards/index.js +4 -4
- package/dist/history/index.js +12 -12
- package/dist/i18n/index.js +14 -14
- package/dist/index.d.ts +12 -12
- package/dist/index.js +104 -118
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +2 -2
- package/dist/introspection/index.js +11 -11
- package/dist/issue-TEGTAN7N.js +19 -0
- package/dist/kernel/enclave/crypto.d.ts +24 -4
- package/dist/kernel/enclave/index.d.ts +2 -0
- package/dist/kernel/enclave/record-aad.d.ts +59 -0
- package/dist/kernel/errors.d.ts +6 -10
- package/dist/kernel/sync-policy.d.ts +0 -2
- package/dist/kernel/types.d.ts +3 -6
- package/dist/kernel/vault.d.ts +4 -4
- package/dist/{ledger-ZO5OKKGR.js → ledger-NFLBQASD.js} +11 -11
- package/dist/liberate-SG2PPGAJ.js +24 -0
- package/dist/{link-set-ZZYDZPL4.js → link-set-IPS57KDM.js} +11 -11
- package/dist/{managed-secret-6FITSKDO.js → managed-secret-GFYGPLNI.js} +3 -3
- package/dist/materialized-views/index.js +20 -20
- package/dist/money/index.js +4 -4
- package/dist/noydb-TN2VIJJO.js +83 -0
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +12 -12
- package/dist/pod/index.js +72 -84
- package/dist/{bundle-handle-G4R37BQV.js → pod-handle-I4ZME246.js} +6 -6
- package/dist/pod-handle-I4ZME246.js.map +1 -0
- package/dist/policy/index.js +4 -4
- package/dist/port/to/index.d.ts +2 -2
- package/dist/port/with/service-bus.d.ts +0 -4
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-577X4FAU.js → post-register-JUSV3X4E.js} +6 -6
- package/dist/query/index.js +3 -3
- package/dist/reduce/index.js +4 -4
- package/dist/register-UTMPUAQW.js +32 -0
- package/dist/registry-B2S4UNUI.js +19 -0
- package/dist/registry-E4FM32KD.js +9 -0
- package/dist/registry-HACMULJJ.js +9 -0
- package/dist/registry-NDLBGQLJ.js +18 -0
- package/dist/request-withdrawal-Q5G43PR7.js +31 -0
- package/dist/{reveal-PCQYK4NO.js → reveal-YJU7GUYJ.js} +6 -6
- package/dist/revoke-NXOUPYS3.js +24 -0
- package/dist/satellites/index.js +1 -1
- package/dist/schema-update/index.js +2 -2
- package/dist/sealed-record/index.js +12 -12
- package/dist/search/index.js +4 -4
- package/dist/{seed-BVO6SSKH.js → seed-XXLR4KXU.js} +11 -11
- package/dist/sequence/index.js +9 -9
- package/dist/session/index.js +10 -10
- package/dist/shadow/index.js +2 -2
- package/dist/share-link/index.js +1 -1
- package/dist/signer-FCGAUB6E.js +25 -0
- package/dist/snapshots/index.js +10 -10
- package/dist/snapshots/index.js.map +1 -1
- package/dist/{stale-3FW6U4OU.js → stale-OT5NMBXU.js} +10 -10
- package/dist/storage-EWWIFB43.js +23 -0
- package/dist/{store-coordination-provider-3QGSXG3P.js → store-coordination-provider-PPLVM2I2.js} +3 -3
- package/dist/sync/index.js +11 -11
- package/dist/team/index.js +14 -14
- package/dist/tiers/index.js +10 -10
- package/dist/to/index.js +1 -3
- package/dist/to/index.js.map +1 -1
- package/dist/transactions/index.js +4 -4
- package/dist/{ulid-PTAIMDG4.js → ulid-VQW6ERQN.js} +2 -2
- package/dist/util/index.js +1 -1
- package/dist/{verify-RO5RTZOJ.js → verify-SHJXGZGM.js} +5 -5
- package/dist/walk-4NIT2ZBH.js +21 -0
- package/dist/with-cargo/adopt-partition.d.ts +1 -1
- package/dist/with-cargo/extract-partition.d.ts +1 -1
- package/dist/with-cargo/index.d.ts +1 -1
- package/dist/with-party/team/index.d.ts +1 -1
- package/dist/with-party/team/keyring.d.ts +2 -2
- package/dist/with-pod/format.d.ts +10 -12
- package/dist/with-pod/index.d.ts +10 -10
- package/dist/with-pod/open.d.ts +2 -2
- package/dist/with-pod/{bundle-handle.d.ts → pod-handle.d.ts} +2 -2
- package/dist/with-pod/pod-store.d.ts +0 -8
- package/dist/with-pod/{bundle.d.ts → pod.d.ts} +11 -19
- package/dist/with-pod/ulid.d.ts +1 -1
- package/dist/withdraw-accessible-LJG66PZQ.js +28 -0
- package/package.json +3 -3
- package/dist/api-XDMGLURJ.js +0 -20
- package/dist/backup-AWHG6ODK.js.map +0 -1
- package/dist/bundle-handle-G4R37BQV.js.map +0 -1
- package/dist/chunk-44JENXEG.js.map +0 -1
- package/dist/chunk-4X5Z5SRV.js.map +0 -1
- package/dist/chunk-55LKVALY.js.map +0 -1
- package/dist/chunk-B2P7M2D2.js.map +0 -1
- package/dist/chunk-EBEKSNKS.js.map +0 -1
- package/dist/chunk-HNGSV2YC.js.map +0 -1
- package/dist/chunk-LRNODVQX.js.map +0 -1
- package/dist/chunk-NSRITINN.js.map +0 -1
- package/dist/chunk-P2PLXMHO.js.map +0 -1
- package/dist/chunk-SPA5WX3T.js.map +0 -1
- package/dist/chunk-SYFEJFIO.js.map +0 -1
- package/dist/chunk-VCETL77O.js.map +0 -1
- package/dist/chunk-ZJADGNYF.js.map +0 -1
- package/dist/collection-facade-5UJW6QRB.js +0 -45
- package/dist/delegation-6NUQCURX.js.map +0 -1
- package/dist/derive-5PFJNNNU.js +0 -22
- package/dist/executor-AB4BCJO4.js +0 -29
- package/dist/executor-CYJQLKKI.js +0 -9
- package/dist/executor-S4QIKEHW.js +0 -9
- package/dist/export-accessible-JXCJGHCF.js +0 -23
- package/dist/extract-partition-2WDL4FJ5.js +0 -38
- package/dist/find-RBBYKXI7.js +0 -11
- package/dist/issue-EABYJWX5.js +0 -19
- package/dist/liberate-S3JR4TQT.js +0 -24
- package/dist/noydb-SPEVD5JA.js +0 -83
- package/dist/register-OXUXXIWT.js +0 -32
- package/dist/registry-CZVINVQH.js +0 -9
- package/dist/registry-IKUR2MXD.js +0 -9
- package/dist/registry-L3CO5ZAY.js +0 -18
- package/dist/registry-QFIVGS2W.js +0 -19
- package/dist/request-withdrawal-UV42CNR5.js +0 -31
- package/dist/revoke-26DFO36Z.js +0 -24
- package/dist/signer-DDO7QEID.js +0 -25
- package/dist/storage-M7L2EK3F.js +0 -23
- package/dist/walk-OFXQN5US.js +0 -21
- package/dist/withdraw-accessible-7XKYVTMP.js +0 -28
- /package/dist/{api-XDMGLURJ.js.map → api-6IBOZN6F.js.map} +0 -0
- /package/dist/{chunk-DG27IUVI.js.map → chunk-42IDLU5V.js.map} +0 -0
- /package/dist/{chunk-35EBKWQU.js.map → chunk-4444HN72.js.map} +0 -0
- /package/dist/{chunk-N35NC4JH.js.map → chunk-466KGOQB.js.map} +0 -0
- /package/dist/{chunk-6OC6YASM.js.map → chunk-4NI5PR5S.js.map} +0 -0
- /package/dist/{chunk-OUST5WDV.js.map → chunk-4YUIVHII.js.map} +0 -0
- /package/dist/{chunk-6HFM7EIT.js.map → chunk-5NKSNW25.js.map} +0 -0
- /package/dist/{chunk-FDX7OWWI.js.map → chunk-5SK5AFYH.js.map} +0 -0
- /package/dist/{chunk-DMQCLZ4Z.js.map → chunk-6U7M7AX6.js.map} +0 -0
- /package/dist/{chunk-FNSMZQS4.js.map → chunk-7EIPPOEL.js.map} +0 -0
- /package/dist/{chunk-OXCU7G5I.js.map → chunk-7J6YERYT.js.map} +0 -0
- /package/dist/{chunk-AZQVFXJF.js.map → chunk-A4JJUWSV.js.map} +0 -0
- /package/dist/{chunk-BGQ63MCT.js.map → chunk-AFSMT3WI.js.map} +0 -0
- /package/dist/{chunk-3FSX6LDG.js.map → chunk-AMKCY454.js.map} +0 -0
- /package/dist/{chunk-K6TQEDVJ.js.map → chunk-BVYRPAB2.js.map} +0 -0
- /package/dist/{chunk-7F4DBNSP.js.map → chunk-C66T4W5P.js.map} +0 -0
- /package/dist/{chunk-UFM3WVIF.js.map → chunk-C6MI5OCF.js.map} +0 -0
- /package/dist/{chunk-PK3URBVU.js.map → chunk-CAJ7QAPC.js.map} +0 -0
- /package/dist/{chunk-P2Y2F6EB.js.map → chunk-CK6Z5DJQ.js.map} +0 -0
- /package/dist/{chunk-G4VQSGXL.js.map → chunk-CK7IRIRY.js.map} +0 -0
- /package/dist/{chunk-UAHHWR4P.js.map → chunk-CWX6YIX5.js.map} +0 -0
- /package/dist/{chunk-5XFTL73S.js.map → chunk-D763JZRO.js.map} +0 -0
- /package/dist/{chunk-CCZJJ4I2.js.map → chunk-ESABIXMQ.js.map} +0 -0
- /package/dist/{chunk-5GMMIDJX.js.map → chunk-FMZV43QY.js.map} +0 -0
- /package/dist/{chunk-HXGUIPQB.js.map → chunk-FSZPQCDR.js.map} +0 -0
- /package/dist/{chunk-Z7SMBVNM.js.map → chunk-GE2AGI67.js.map} +0 -0
- /package/dist/{chunk-7VPWXVKU.js.map → chunk-GJX6DOGD.js.map} +0 -0
- /package/dist/{chunk-VBCDVWRU.js.map → chunk-GLS7OSZT.js.map} +0 -0
- /package/dist/{chunk-W3TVWF6N.js.map → chunk-H545OIWE.js.map} +0 -0
- /package/dist/{chunk-VA3PPYTQ.js.map → chunk-HJAFOPTN.js.map} +0 -0
- /package/dist/{chunk-Z45YRGFO.js.map → chunk-HNOBRU24.js.map} +0 -0
- /package/dist/{chunk-OI7ZJUYT.js.map → chunk-HVPQ5QIZ.js.map} +0 -0
- /package/dist/{chunk-AR2JDFAE.js.map → chunk-HVR74IBG.js.map} +0 -0
- /package/dist/{chunk-2APC6HS6.js.map → chunk-IMYGJ5HU.js.map} +0 -0
- /package/dist/{chunk-25FGCLYS.js.map → chunk-IYYGLI2K.js.map} +0 -0
- /package/dist/{chunk-E2TN45ZD.js.map → chunk-JBMSNYOS.js.map} +0 -0
- /package/dist/{chunk-RXYYFSBB.js.map → chunk-JU3JKOY5.js.map} +0 -0
- /package/dist/{chunk-CEJWMBXO.js.map → chunk-K2MR7ROB.js.map} +0 -0
- /package/dist/{chunk-PGWXE5CR.js.map → chunk-KCLNKE4W.js.map} +0 -0
- /package/dist/{chunk-K525AZ5C.js.map → chunk-KTCQKXHW.js.map} +0 -0
- /package/dist/{chunk-7HF4J7Z5.js.map → chunk-LBQIKMBH.js.map} +0 -0
- /package/dist/{chunk-4HDYQL3J.js.map → chunk-MVG67SMN.js.map} +0 -0
- /package/dist/{chunk-7MT56F4U.js.map → chunk-N6OJLR2M.js.map} +0 -0
- /package/dist/{chunk-DIICZPWS.js.map → chunk-P2UFDX2F.js.map} +0 -0
- /package/dist/{chunk-HVQGCKY4.js.map → chunk-PCXAUC65.js.map} +0 -0
- /package/dist/{chunk-MSWYQLMQ.js.map → chunk-PJ5TGJ7U.js.map} +0 -0
- /package/dist/{chunk-CCZ5DEJ7.js.map → chunk-QEYXKICE.js.map} +0 -0
- /package/dist/{chunk-H4YQSDOI.js.map → chunk-QI2KXQOM.js.map} +0 -0
- /package/dist/{chunk-FAXZQ5UF.js.map → chunk-QLMUW7OC.js.map} +0 -0
- /package/dist/{chunk-XXVIHJZY.js.map → chunk-QQP5KJMS.js.map} +0 -0
- /package/dist/{chunk-RTAMLDWP.js.map → chunk-QWNYUTI2.js.map} +0 -0
- /package/dist/{chunk-NT432TE6.js.map → chunk-R7E7X4CQ.js.map} +0 -0
- /package/dist/{chunk-747LRSOO.js.map → chunk-RBTZLXZJ.js.map} +0 -0
- /package/dist/{chunk-OF3L2SD6.js.map → chunk-RDPZMUCX.js.map} +0 -0
- /package/dist/{chunk-JIUVJ4M7.js.map → chunk-RJTGXZT6.js.map} +0 -0
- /package/dist/{chunk-XJIGOFN6.js.map → chunk-ROFEKKMI.js.map} +0 -0
- /package/dist/{chunk-UHXCLPGC.js.map → chunk-RVTOCAHQ.js.map} +0 -0
- /package/dist/{chunk-WLYIROCJ.js.map → chunk-RWPNRCK2.js.map} +0 -0
- /package/dist/{chunk-HNHCQ556.js.map → chunk-S6CP5FWF.js.map} +0 -0
- /package/dist/{chunk-YY3PEDBR.js.map → chunk-S77LTWCZ.js.map} +0 -0
- /package/dist/{chunk-JRCYZEHU.js.map → chunk-SGEI3IJK.js.map} +0 -0
- /package/dist/{chunk-7G6VDWXB.js.map → chunk-SZZEDEIU.js.map} +0 -0
- /package/dist/{chunk-4UVDI4XE.js.map → chunk-T7AEAFEE.js.map} +0 -0
- /package/dist/{chunk-FUHKW252.js.map → chunk-TQ7IRULX.js.map} +0 -0
- /package/dist/{chunk-VJFMXYKP.js.map → chunk-TQLYMYOK.js.map} +0 -0
- /package/dist/{chunk-QS2PUZC7.js.map → chunk-UTQLKPBS.js.map} +0 -0
- /package/dist/{chunk-T227WEHE.js.map → chunk-V2BEYLNR.js.map} +0 -0
- /package/dist/{chunk-HPLWFNG4.js.map → chunk-V4M4BZNW.js.map} +0 -0
- /package/dist/{chunk-KUDZVJKQ.js.map → chunk-VTTRWLOR.js.map} +0 -0
- /package/dist/{chunk-L2UHRVB4.js.map → chunk-VVMSDWRG.js.map} +0 -0
- /package/dist/{chunk-SV4BNALS.js.map → chunk-WLZKVY33.js.map} +0 -0
- /package/dist/{chunk-TJCRCCPT.js.map → chunk-XHX3NTRP.js.map} +0 -0
- /package/dist/{chunk-YAWK6AWF.js.map → chunk-YDJXGYYA.js.map} +0 -0
- /package/dist/{chunk-VMCCGUQB.js.map → chunk-YGJZLOSR.js.map} +0 -0
- /package/dist/{chunk-7TSYBD3E.js.map → chunk-YH65A6WM.js.map} +0 -0
- /package/dist/{chunk-Y3H4WOP3.js.map → chunk-YKEJ5P3H.js.map} +0 -0
- /package/dist/{chunk-GV2EFYNV.js.map → chunk-YODIXNV4.js.map} +0 -0
- /package/dist/{chunk-AHLJSVRL.js.map → chunk-YVOW35HH.js.map} +0 -0
- /package/dist/{chunk-DEFCPAXD.js.map → chunk-YZ7BRD26.js.map} +0 -0
- /package/dist/{chunk-NJDQ4YSV.js.map → chunk-Z3U2YVNM.js.map} +0 -0
- /package/dist/{chunk-RSHNUOSJ.js.map → chunk-ZHDMT2MJ.js.map} +0 -0
- /package/dist/{classified-marker-EHRSGBM7.js.map → classified-marker-3STDEUFT.js.map} +0 -0
- /package/dist/{collection-facade-5UJW6QRB.js.map → collection-facade-SGTS3TRS.js.map} +0 -0
- /package/dist/{computed-6G5M3UPH.js.map → computed-5E2OM6EN.js.map} +0 -0
- /package/dist/{dead-filter-ANPRM2LD.js.map → dead-filter-ZNWVGV5U.js.map} +0 -0
- /package/dist/{derive-5PFJNNNU.js.map → derive-BWXA2L7D.js.map} +0 -0
- /package/dist/{dispatch-EO2QHEXK.js.map → dispatch-S34AUC43.js.map} +0 -0
- /package/dist/{dispatch-UGU775MV.js.map → dispatch-TIYW3UDN.js.map} +0 -0
- /package/dist/{enclave-3Z7VTJAW.js.map → enclave-Y6GMYQMS.js.map} +0 -0
- /package/dist/{executor-AB4BCJO4.js.map → executor-JDMH2IGK.js.map} +0 -0
- /package/dist/{executor-CYJQLKKI.js.map → executor-PCZN2LTY.js.map} +0 -0
- /package/dist/{executor-S4QIKEHW.js.map → executor-WFTHIDT7.js.map} +0 -0
- /package/dist/{export-accessible-JXCJGHCF.js.map → export-accessible-U6GXZZMQ.js.map} +0 -0
- /package/dist/{extract-partition-2WDL4FJ5.js.map → extract-partition-IDI6NDUR.js.map} +0 -0
- /package/dist/{fanout-sidecar-3Q6BWNSS.js.map → fanout-sidecar-BVFOEJTP.js.map} +0 -0
- /package/dist/{find-RBBYKXI7.js.map → find-VBNMB42N.js.map} +0 -0
- /package/dist/{issue-EABYJWX5.js.map → issue-TEGTAN7N.js.map} +0 -0
- /package/dist/{ledger-ZO5OKKGR.js.map → ledger-NFLBQASD.js.map} +0 -0
- /package/dist/{liberate-S3JR4TQT.js.map → liberate-SG2PPGAJ.js.map} +0 -0
- /package/dist/{link-set-ZZYDZPL4.js.map → link-set-IPS57KDM.js.map} +0 -0
- /package/dist/{managed-secret-6FITSKDO.js.map → managed-secret-GFYGPLNI.js.map} +0 -0
- /package/dist/{noydb-SPEVD5JA.js.map → noydb-TN2VIJJO.js.map} +0 -0
- /package/dist/{post-register-577X4FAU.js.map → post-register-JUSV3X4E.js.map} +0 -0
- /package/dist/{register-OXUXXIWT.js.map → register-UTMPUAQW.js.map} +0 -0
- /package/dist/{registry-CZVINVQH.js.map → registry-B2S4UNUI.js.map} +0 -0
- /package/dist/{registry-IKUR2MXD.js.map → registry-E4FM32KD.js.map} +0 -0
- /package/dist/{registry-L3CO5ZAY.js.map → registry-HACMULJJ.js.map} +0 -0
- /package/dist/{registry-QFIVGS2W.js.map → registry-NDLBGQLJ.js.map} +0 -0
- /package/dist/{request-withdrawal-UV42CNR5.js.map → request-withdrawal-Q5G43PR7.js.map} +0 -0
- /package/dist/{reveal-PCQYK4NO.js.map → reveal-YJU7GUYJ.js.map} +0 -0
- /package/dist/{revoke-26DFO36Z.js.map → revoke-NXOUPYS3.js.map} +0 -0
- /package/dist/{seed-BVO6SSKH.js.map → seed-XXLR4KXU.js.map} +0 -0
- /package/dist/{signer-DDO7QEID.js.map → signer-FCGAUB6E.js.map} +0 -0
- /package/dist/{stale-3FW6U4OU.js.map → stale-OT5NMBXU.js.map} +0 -0
- /package/dist/{storage-M7L2EK3F.js.map → storage-EWWIFB43.js.map} +0 -0
- /package/dist/{store-coordination-provider-3QGSXG3P.js.map → store-coordination-provider-PPLVM2I2.js.map} +0 -0
- /package/dist/{ulid-PTAIMDG4.js.map → ulid-VQW6ERQN.js.map} +0 -0
- /package/dist/{verify-RO5RTZOJ.js.map → verify-SHJXGZGM.js.map} +0 -0
- /package/dist/{walk-OFXQN5US.js.map → walk-4NIT2ZBH.js.map} +0 -0
- /package/dist/{withdraw-accessible-7XKYVTMP.js.map → withdraw-accessible-LJG66PZQ.js.map} +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ATTESTATIONS_COLLECTION,
|
|
3
|
+
REVOKED_RECORD_ID,
|
|
4
|
+
SIGNER_RECORD_ID,
|
|
5
|
+
loadOrCreateSigner,
|
|
6
|
+
loadSigner
|
|
7
|
+
} from "./chunk-VVMSDWRG.js";
|
|
8
|
+
import "./chunk-ZWPUYBNK.js";
|
|
9
|
+
import "./chunk-IMYGJ5HU.js";
|
|
10
|
+
import "./chunk-FSZPQCDR.js";
|
|
11
|
+
import "./chunk-HVR74IBG.js";
|
|
12
|
+
import "./chunk-RBTZLXZJ.js";
|
|
13
|
+
import "./chunk-LP7BEXCT.js";
|
|
14
|
+
import "./chunk-QTDAPDDV.js";
|
|
15
|
+
import "./chunk-6ZFTVY3O.js";
|
|
16
|
+
import "./chunk-I64WQSN3.js";
|
|
17
|
+
import "./chunk-PZ5AY32C.js";
|
|
18
|
+
export {
|
|
19
|
+
ATTESTATIONS_COLLECTION,
|
|
20
|
+
REVOKED_RECORD_ID,
|
|
21
|
+
SIGNER_RECORD_ID,
|
|
22
|
+
loadOrCreateSigner,
|
|
23
|
+
loadSigner
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=signer-FCGAUB6E.js.map
|
package/dist/snapshots/index.js
CHANGED
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
readPod,
|
|
6
6
|
writePod
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-4LNFXGNW.js";
|
|
8
|
+
import "../chunk-GE2AGI67.js";
|
|
9
|
+
import "../chunk-ZWPUYBNK.js";
|
|
10
|
+
import "../chunk-IMYGJ5HU.js";
|
|
11
|
+
import "../chunk-FSZPQCDR.js";
|
|
12
|
+
import "../chunk-HVR74IBG.js";
|
|
13
|
+
import "../chunk-RBTZLXZJ.js";
|
|
14
14
|
import "../chunk-LP7BEXCT.js";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-QTDAPDDV.js";
|
|
16
|
+
import "../chunk-6ZFTVY3O.js";
|
|
17
17
|
import {
|
|
18
18
|
SnapshotNotFoundError
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-I64WQSN3.js";
|
|
20
20
|
import "../chunk-PZ5AY32C.js";
|
|
21
21
|
|
|
22
22
|
// src/with-fork/snapshots/engine.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/with-fork/snapshots/engine.ts","../../src/with-fork/snapshots/active.ts"],"sourcesContent":["import { writePod, readPod } from '../../with-pod/bundle.js'\nimport { SnapshotNotFoundError } from '../../kernel/errors.js'\nimport type { NoydbPodStore } from '../../kernel/types.js'\nimport type { Vault } from '../../kernel/vault.js'\nimport type { SnapshotMeta, RetentionPolicy, SnapshotIndex } from './strategy.js'\n\nexport class SnapshotEngine {\n constructor(\n private readonly store: NoydbPodStore,\n private readonly retention: RetentionPolicy,\n ) {}\n\n private indexKey(vaultName: string): string {\n return `${vaultName}__index`\n }\n\n private snapKey(vaultName: string, n: number): string {\n return `${vaultName}__snap_${n.toString().padStart(6, '0')}`\n }\n\n private autoKey(vaultName: string): string {\n return `${vaultName}__auto`\n }\n\n private async readIndex(\n vaultName: string,\n ): Promise<{ index: SnapshotIndex; indexVersion: string | null }> {\n const result = await this.store.readBundle(this.indexKey(vaultName))\n if (!result) return { index: { snapshots: [], nextCounter: 1 }, indexVersion: null }\n const text = new TextDecoder().decode(result.bytes)\n return { index: JSON.parse(text) as SnapshotIndex, indexVersion: result.version }\n }\n\n private async writeIndex(\n vaultName: string,\n index: SnapshotIndex,\n expectedVersion: string | null,\n ): Promise<void> {\n const bytes = new TextEncoder().encode(JSON.stringify(index))\n await this.store.writeBundle(this.indexKey(vaultName), bytes, expectedVersion)\n }\n\n async snapshot(\n vault: Vault,\n by: string,\n opts?: { label?: string; note?: string },\n ): Promise<SnapshotMeta> {\n const bytes = await writePod(vault, {})\n const { index, indexVersion } = await this.readIndex(vault.name)\n const key = this.snapKey(vault.name, index.nextCounter)\n\n // Write blob first. If the subsequent index write fails, the next snapshot()\n // call will re-derive the same key (counter not persisted) and overwrite this blob.\n // This is an accepted v1 trade-off: failure window is narrow and requires a store\n // error between the two writes. A retry produces a fresh snapshot at the same key.\n await this.store.writeBundle(key, bytes, null)\n\n const meta: SnapshotMeta = {\n version: key,\n ...(opts?.label !== undefined ? { label: opts.label } : {}),\n ...(opts?.note !== undefined ? { note: opts.note } : {}),\n exportedAt: new Date().toISOString(),\n exportedBy: by,\n size: bytes.length,\n integrity: 'verified',\n }\n\n const newIndex: SnapshotIndex = {\n snapshots: [...index.snapshots, meta],\n nextCounter: index.nextCounter + 1,\n // Preserve the rolling auto slot — on-demand snapshots never touch it.\n ...(index.auto ? { auto: index.auto } : {}),\n }\n const toDelete = this.applyRetention(newIndex)\n await this.writeIndex(vault.name, newIndex, indexVersion)\n\n for (const k of toDelete) {\n await this.store.deleteBundle(k)\n }\n\n return meta\n }\n\n /**\n * Rolling auto-snapshot. Overwrites the single fixed `<vault>__auto` key and\n * stores its meta in `index.auto`, separate from the immutable `snapshots`\n * pool — retention never prunes it. Used by the cadence scheduler.\n */\n async autoSnapshot(\n vault: Vault,\n by: string,\n opts?: { label?: string; note?: string },\n ): Promise<SnapshotMeta> {\n const bytes = await writePod(vault, {})\n const { index, indexVersion } = await this.readIndex(vault.name)\n const key = this.autoKey(vault.name)\n\n // Unconditional overwrite of the rolling slot.\n await this.store.writeBundle(key, bytes, null)\n\n const meta: SnapshotMeta = {\n version: key,\n label: opts?.label ?? 'auto',\n ...(opts?.note !== undefined ? { note: opts.note } : {}),\n exportedAt: new Date().toISOString(),\n exportedBy: by,\n size: bytes.length,\n integrity: 'verified',\n auto: true,\n }\n\n index.auto = meta\n await this.writeIndex(vault.name, index, indexVersion)\n return meta\n }\n\n async listSnapshots(vaultId: string): Promise<SnapshotMeta[]> {\n const { index } = await this.readIndex(vaultId)\n const immutable = [...index.snapshots].reverse()\n return index.auto ? [index.auto, ...immutable] : immutable\n }\n\n async restoreSnapshot(vault: Vault, version: string): Promise<void> {\n if (!version.startsWith(`${vault.name}__`)) throw new SnapshotNotFoundError(version)\n const result = await this.store.readBundle(version)\n if (!result) throw new SnapshotNotFoundError(version)\n const { dumpJson } = await readPod(result.bytes)\n await vault.load(dumpJson)\n }\n\n /**\n * Applies the configured retention policy to `index`, mutating `index.snapshots`\n * in place and returning the blob keys that should be deleted from the store.\n * Called by `snapshot()` before the index is written.\n *\n * @internal — public for direct testing only\n */\n applyRetention(index: SnapshotIndex): string[] {\n const prune = this.retention.prune ?? true\n if (!prune) return []\n\n const toDelete: string[] = []\n let remaining = index.snapshots.slice()\n\n if (this.retention.keepLast !== undefined && remaining.length > this.retention.keepLast) {\n const excess = remaining.splice(0, remaining.length - this.retention.keepLast)\n toDelete.push(...excess.map(m => m.version))\n }\n\n if (this.retention.maxAgeDays !== undefined) {\n const cutoffMs = this.retention.maxAgeDays * 86_400_000\n const now = Date.now()\n const fresh = remaining.filter(m => now - new Date(m.exportedAt).getTime() <= cutoffMs)\n toDelete.push(...remaining.filter(m => !fresh.includes(m)).map(m => m.version))\n remaining = fresh\n }\n\n index.snapshots = remaining\n return toDelete\n }\n}\n","import { SnapshotEngine } from './engine.js'\nimport type { SnapshotsStrategy, RetentionPolicy } from './strategy.js'\nimport type { SnapshotPolicy } from './policy.js'\nimport type { NoydbPodStore } from '../../kernel/types.js'\nimport type { Vault } from '../../kernel/vault.js'\n\nexport interface WithSnapshotsOptions {\n /** Bundle store where snapshot blobs and the sidecar index are written. */\n store: NoydbPodStore\n /**\n * Declarative retention policy. Enforced eagerly after each on-demand `snapshot()`.\n * Defaults to no retention (all on-demand snapshots kept forever). Never affects\n * the rolling auto-snapshot.\n */\n retention?: RetentionPolicy\n /**\n * Automatic-snapshot cadence. Default `mode:'manual'` ⇒ no timers; snapshots\n * stay on-demand. Set `mode:'debounce'`/`'interval'` to enable auto-snapshots\n * to the rolling `<vault>__auto` key.\n */\n snapshotPolicy?: SnapshotPolicy\n}\n\nexport function withSnapshots(opts: WithSnapshotsOptions): SnapshotsStrategy {\n const engine = new SnapshotEngine(opts.store, opts.retention ?? {})\n return {\n snapshot(vault, by, snapOpts) {\n return engine.snapshot(vault as Vault, by, snapOpts)\n },\n listSnapshots(vaultId) {\n return engine.listSnapshots(vaultId)\n },\n restoreSnapshot(vault, version) {\n return engine.restoreSnapshot(vault as Vault, version)\n },\n autoSnapshot(vault, by, snapOpts) {\n return engine.autoSnapshot(vault as Vault, by, snapOpts)\n },\n ...(opts.snapshotPolicy ? { policy: opts.snapshotPolicy } : {}),\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAMO,IAAM,iBAAN,MAAqB;AAAA,EAC1B,YACmB,OACA,WACjB;AAFiB;AACA;AAAA,EAChB;AAAA,EAFgB;AAAA,EACA;AAAA,EAGX,SAAS,WAA2B;AAC1C,WAAO,GAAG,SAAS;AAAA,EACrB;AAAA,EAEQ,QAAQ,WAAmB,GAAmB;AACpD,WAAO,GAAG,SAAS,UAAU,EAAE,SAAS,EAAE,SAAS,GAAG,GAAG,CAAC;AAAA,EAC5D;AAAA,EAEQ,QAAQ,WAA2B;AACzC,WAAO,GAAG,SAAS;AAAA,EACrB;AAAA,EAEA,MAAc,UACZ,WACgE;AAChE,UAAM,SAAS,MAAM,KAAK,MAAM,WAAW,KAAK,SAAS,SAAS,CAAC;AACnE,QAAI,CAAC,OAAQ,QAAO,EAAE,OAAO,E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AQ;AAAA,IACzD;AAAA,IACA,GAAI,KAAK,iBAAiB,EAAE,QAAQ,KAAK,eAAe,IAAI,CAAC;AAAA,EAC/D;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/with-fork/snapshots/engine.ts","../../src/with-fork/snapshots/active.ts"],"sourcesContent":["import { writePod, readPod } from '../../with-pod/pod.js'\nimport { SnapshotNotFoundError } from '../../kernel/errors.js'\nimport type { NoydbPodStore } from '../../kernel/types.js'\nimport type { Vault } from '../../kernel/vault.js'\nimport type { SnapshotMeta, RetentionPolicy, SnapshotIndex } from './strategy.js'\n\nexport class SnapshotEngine {\n constructor(\n private readonly store: NoydbPodStore,\n private readonly retention: RetentionPolicy,\n ) {}\n\n private indexKey(vaultName: string): string {\n return `${vaultName}__index`\n }\n\n private snapKey(vaultName: string, n: number): string {\n return `${vaultName}__snap_${n.toString().padStart(6, '0')}`\n }\n\n private autoKey(vaultName: string): string {\n return `${vaultName}__auto`\n }\n\n private async readIndex(\n vaultName: string,\n ): Promise<{ index: SnapshotIndex; indexVersion: string | null }> {\n const result = await this.store.readBundle(this.indexKey(vaultName))\n if (!result) return { index: { snapshots: [], nextCounter: 1 }, indexVersion: null }\n const text = new TextDecoder().decode(result.bytes)\n return { index: JSON.parse(text) as SnapshotIndex, indexVersion: result.version }\n }\n\n private async writeIndex(\n vaultName: string,\n index: SnapshotIndex,\n expectedVersion: string | null,\n ): Promise<void> {\n const bytes = new TextEncoder().encode(JSON.stringify(index))\n await this.store.writeBundle(this.indexKey(vaultName), bytes, expectedVersion)\n }\n\n async snapshot(\n vault: Vault,\n by: string,\n opts?: { label?: string; note?: string },\n ): Promise<SnapshotMeta> {\n const bytes = await writePod(vault, {})\n const { index, indexVersion } = await this.readIndex(vault.name)\n const key = this.snapKey(vault.name, index.nextCounter)\n\n // Write blob first. If the subsequent index write fails, the next snapshot()\n // call will re-derive the same key (counter not persisted) and overwrite this blob.\n // This is an accepted v1 trade-off: failure window is narrow and requires a store\n // error between the two writes. A retry produces a fresh snapshot at the same key.\n await this.store.writeBundle(key, bytes, null)\n\n const meta: SnapshotMeta = {\n version: key,\n ...(opts?.label !== undefined ? { label: opts.label } : {}),\n ...(opts?.note !== undefined ? { note: opts.note } : {}),\n exportedAt: new Date().toISOString(),\n exportedBy: by,\n size: bytes.length,\n integrity: 'verified',\n }\n\n const newIndex: SnapshotIndex = {\n snapshots: [...index.snapshots, meta],\n nextCounter: index.nextCounter + 1,\n // Preserve the rolling auto slot — on-demand snapshots never touch it.\n ...(index.auto ? { auto: index.auto } : {}),\n }\n const toDelete = this.applyRetention(newIndex)\n await this.writeIndex(vault.name, newIndex, indexVersion)\n\n for (const k of toDelete) {\n await this.store.deleteBundle(k)\n }\n\n return meta\n }\n\n /**\n * Rolling auto-snapshot. Overwrites the single fixed `<vault>__auto` key and\n * stores its meta in `index.auto`, separate from the immutable `snapshots`\n * pool — retention never prunes it. Used by the cadence scheduler.\n */\n async autoSnapshot(\n vault: Vault,\n by: string,\n opts?: { label?: string; note?: string },\n ): Promise<SnapshotMeta> {\n const bytes = await writePod(vault, {})\n const { index, indexVersion } = await this.readIndex(vault.name)\n const key = this.autoKey(vault.name)\n\n // Unconditional overwrite of the rolling slot.\n await this.store.writeBundle(key, bytes, null)\n\n const meta: SnapshotMeta = {\n version: key,\n label: opts?.label ?? 'auto',\n ...(opts?.note !== undefined ? { note: opts.note } : {}),\n exportedAt: new Date().toISOString(),\n exportedBy: by,\n size: bytes.length,\n integrity: 'verified',\n auto: true,\n }\n\n index.auto = meta\n await this.writeIndex(vault.name, index, indexVersion)\n return meta\n }\n\n async listSnapshots(vaultId: string): Promise<SnapshotMeta[]> {\n const { index } = await this.readIndex(vaultId)\n const immutable = [...index.snapshots].reverse()\n return index.auto ? [index.auto, ...immutable] : immutable\n }\n\n async restoreSnapshot(vault: Vault, version: string): Promise<void> {\n if (!version.startsWith(`${vault.name}__`)) throw new SnapshotNotFoundError(version)\n const result = await this.store.readBundle(version)\n if (!result) throw new SnapshotNotFoundError(version)\n const { dumpJson } = await readPod(result.bytes)\n await vault.load(dumpJson)\n }\n\n /**\n * Applies the configured retention policy to `index`, mutating `index.snapshots`\n * in place and returning the blob keys that should be deleted from the store.\n * Called by `snapshot()` before the index is written.\n *\n * @internal — public for direct testing only\n */\n applyRetention(index: SnapshotIndex): string[] {\n const prune = this.retention.prune ?? true\n if (!prune) return []\n\n const toDelete: string[] = []\n let remaining = index.snapshots.slice()\n\n if (this.retention.keepLast !== undefined && remaining.length > this.retention.keepLast) {\n const excess = remaining.splice(0, remaining.length - this.retention.keepLast)\n toDelete.push(...excess.map(m => m.version))\n }\n\n if (this.retention.maxAgeDays !== undefined) {\n const cutoffMs = this.retention.maxAgeDays * 86_400_000\n const now = Date.now()\n const fresh = remaining.filter(m => now - new Date(m.exportedAt).getTime() <= cutoffMs)\n toDelete.push(...remaining.filter(m => !fresh.includes(m)).map(m => m.version))\n remaining = fresh\n }\n\n index.snapshots = remaining\n return toDelete\n }\n}\n","import { SnapshotEngine } from './engine.js'\nimport type { SnapshotsStrategy, RetentionPolicy } from './strategy.js'\nimport type { SnapshotPolicy } from './policy.js'\nimport type { NoydbPodStore } from '../../kernel/types.js'\nimport type { Vault } from '../../kernel/vault.js'\n\nexport interface WithSnapshotsOptions {\n /** Bundle store where snapshot blobs and the sidecar index are written. */\n store: NoydbPodStore\n /**\n * Declarative retention policy. Enforced eagerly after each on-demand `snapshot()`.\n * Defaults to no retention (all on-demand snapshots kept forever). Never affects\n * the rolling auto-snapshot.\n */\n retention?: RetentionPolicy\n /**\n * Automatic-snapshot cadence. Default `mode:'manual'` ⇒ no timers; snapshots\n * stay on-demand. Set `mode:'debounce'`/`'interval'` to enable auto-snapshots\n * to the rolling `<vault>__auto` key.\n */\n snapshotPolicy?: SnapshotPolicy\n}\n\nexport function withSnapshots(opts: WithSnapshotsOptions): SnapshotsStrategy {\n const engine = new SnapshotEngine(opts.store, opts.retention ?? {})\n return {\n snapshot(vault, by, snapOpts) {\n return engine.snapshot(vault as Vault, by, snapOpts)\n },\n listSnapshots(vaultId) {\n return engine.listSnapshots(vaultId)\n },\n restoreSnapshot(vault, version) {\n return engine.restoreSnapshot(vault as Vault, version)\n },\n autoSnapshot(vault, by, snapOpts) {\n return engine.autoSnapshot(vault as Vault, by, snapOpts)\n },\n ...(opts.snapshotPolicy ? { policy: opts.snapshotPolicy } : {}),\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAMO,IAAM,iBAAN,MAAqB;AAAA,EAC1B,YACmB,OACA,WACjB;AAFiB;AACA;AAAA,EAChB;AAAA,EAFgB;AAAA,EACA;AAAA,EAGX,SAAS,WAA2B;AAC1C,WAAO,GAAG,SAAS;AAAA,EACrB;AAAA,EAEQ,QAAQ,WAAmB,GAAmB;AACpD,WAAO,GAAG,SAAS,UAAU,EAAE,SAAS,EAAE,SAAS,GAAG,GAAG,CAAC;AAAA,EAC5D;AAAA,EAEQ,QAAQ,WAA2B;AACzC,WAAO,GAAG,SAAS;AAAA,EACrB;AAAA,EAEA,MAAc,UACZ,WACgE;AAChE,UAAM,SAAS,MAAM,KAAK,MAAM,WAAW,KAAK,SAAS,SAAS,CAAC;AACnE,QAAI,CAAC,OAAQ,QAAO,EAAE,OAAO,EAAE,WAAW,CAAC,GAAG,aAAa,EAAE,GAAG,cAAc,KAAK;AACnF,UAAM,OAAO,IAAI,YAAY,EAAE,OAAO,OAAO,KAAK;AAClD,WAAO,EAAE,OAAO,KAAK,MAAM,IAAI,GAAoB,cAAc,OAAO,QAAQ;AAAA,EAClF;AAAA,EAEA,MAAc,WACZ,WACA,OACA,iBACe;AACf,UAAM,QAAQ,IAAI,YAAY,EAAE,OAAO,KAAK,UAAU,KAAK,CAAC;AAC5D,UAAM,KAAK,MAAM,YAAY,KAAK,SAAS,SAAS,GAAG,OAAO,eAAe;AAAA,EAC/E;AAAA,EAEA,MAAM,SACJ,OACA,IACA,MACuB;AACvB,UAAM,QAAQ,MAAM,SAAS,OAAO,CAAC,CAAC;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W;AAC3C,YAAM,WAAW,KAAK,UAAU,aAAa;AAC7C,YAAM,MAAM,KAAK,IAAI;AACrB,YAAM,QAAQ,UAAU,OAAO,OAAK,MAAM,IAAI,KAAK,EAAE,UAAU,EAAE,QAAQ,KAAK,QAAQ;AACtF,eAAS,KAAK,GAAG,UAAU,OAAO,OAAK,CAAC,MAAM,SAAS,CAAC,CAAC,EAAE,IAAI,OAAK,EAAE,OAAO,CAAC;AAC9E,kBAAY;AAAA,IACd;AAEA,UAAM,YAAY;AAClB,WAAO;AAAA,EACT;AACF;;;ACzIO,SAAS,cAAc,MAA+C;AAC3E,QAAM,SAAS,IAAI,eAAe,KAAK,OAAO,KAAK,aAAa,CAAC,CAAC;AAClE,SAAO;AAAA,IACL,SAAS,OAAO,IAAI,UAAU;AAC5B,aAAO,OAAO,SAAS,OAAgB,IAAI,QAAQ;AAAA,IACrD;AAAA,IACA,cAAc,SAAS;AACrB,aAAO,OAAO,cAAc,OAAO;AAAA,IACrC;AAAA,IACA,gBAAgB,OAAO,SAAS;AAC9B,aAAO,OAAO,gBAAgB,OAAgB,OAAO;AAAA,IACvD;AAAA,IACA,aAAa,OAAO,IAAI,UAAU;AAChC,aAAO,OAAO,aAAa,OAAgB,IAAI,QAAQ;AAAA,IACzD;AAAA,IACA,GAAI,KAAK,iBAAiB,EAAE,QAAQ,KAAK,eAAe,IAAI,CAAC;AAAA,EAC/D;AACF;","names":[]}
|
|
@@ -6,17 +6,17 @@ import {
|
|
|
6
6
|
isMVStale,
|
|
7
7
|
markMVStale,
|
|
8
8
|
resolveStaleMVOnRead
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-R7E7X4CQ.js";
|
|
10
10
|
import "./chunk-5D2ALSM5.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-ZWPUYBNK.js";
|
|
12
|
+
import "./chunk-IMYGJ5HU.js";
|
|
13
|
+
import "./chunk-FSZPQCDR.js";
|
|
14
|
+
import "./chunk-HVR74IBG.js";
|
|
15
|
+
import "./chunk-RBTZLXZJ.js";
|
|
16
16
|
import "./chunk-LP7BEXCT.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-QTDAPDDV.js";
|
|
18
|
+
import "./chunk-6ZFTVY3O.js";
|
|
19
|
+
import "./chunk-I64WQSN3.js";
|
|
20
20
|
import "./chunk-PZ5AY32C.js";
|
|
21
21
|
export {
|
|
22
22
|
MV_STALE_COLLECTION,
|
|
@@ -27,4 +27,4 @@ export {
|
|
|
27
27
|
markMVStale,
|
|
28
28
|
resolveStaleMVOnRead
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=stale-
|
|
30
|
+
//# sourceMappingURL=stale-OT5NMBXU.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SCHEMAS_COLLECTION,
|
|
3
|
+
loadPersistedSchema,
|
|
4
|
+
loadPersistedSchemaEntry,
|
|
5
|
+
savePersistedSchema
|
|
6
|
+
} from "./chunk-CK6Z5DJQ.js";
|
|
7
|
+
import "./chunk-ZWPUYBNK.js";
|
|
8
|
+
import "./chunk-IMYGJ5HU.js";
|
|
9
|
+
import "./chunk-FSZPQCDR.js";
|
|
10
|
+
import "./chunk-HVR74IBG.js";
|
|
11
|
+
import "./chunk-RBTZLXZJ.js";
|
|
12
|
+
import "./chunk-LP7BEXCT.js";
|
|
13
|
+
import "./chunk-QTDAPDDV.js";
|
|
14
|
+
import "./chunk-6ZFTVY3O.js";
|
|
15
|
+
import "./chunk-I64WQSN3.js";
|
|
16
|
+
import "./chunk-PZ5AY32C.js";
|
|
17
|
+
export {
|
|
18
|
+
SCHEMAS_COLLECTION,
|
|
19
|
+
loadPersistedSchema,
|
|
20
|
+
loadPersistedSchemaEntry,
|
|
21
|
+
savePersistedSchema
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=storage-EWWIFB43.js.map
|
package/dist/{store-coordination-provider-3QGSXG3P.js → store-coordination-provider-PPLVM2I2.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadFence,
|
|
3
3
|
saveFence
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LBQIKMBH.js";
|
|
5
5
|
import {
|
|
6
6
|
NOYDB_FORMAT_VERSION
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6ZFTVY3O.js";
|
|
8
8
|
import "./chunk-PZ5AY32C.js";
|
|
9
9
|
|
|
10
10
|
// src/with-shape/schema-update/client-registry.ts
|
|
@@ -139,4 +139,4 @@ function unref(timer) {
|
|
|
139
139
|
export {
|
|
140
140
|
StoreCoordinationProvider
|
|
141
141
|
};
|
|
142
|
-
//# sourceMappingURL=store-coordination-provider-
|
|
142
|
+
//# sourceMappingURL=store-coordination-provider-PPLVM2I2.js.map
|
package/dist/sync/index.js
CHANGED
|
@@ -2,20 +2,20 @@ import {
|
|
|
2
2
|
PresenceHandle,
|
|
3
3
|
SyncEngine,
|
|
4
4
|
SyncTransaction
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-QJYTGH5V.js";
|
|
6
6
|
import {
|
|
7
7
|
NO_SYNC
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-JN64WH3U.js";
|
|
9
|
+
import "../chunk-V4M4BZNW.js";
|
|
10
|
+
import "../chunk-ZWPUYBNK.js";
|
|
11
|
+
import "../chunk-IMYGJ5HU.js";
|
|
12
|
+
import "../chunk-FSZPQCDR.js";
|
|
13
|
+
import "../chunk-HVR74IBG.js";
|
|
14
|
+
import "../chunk-RBTZLXZJ.js";
|
|
15
15
|
import "../chunk-LP7BEXCT.js";
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-QTDAPDDV.js";
|
|
17
|
+
import "../chunk-6ZFTVY3O.js";
|
|
18
|
+
import "../chunk-I64WQSN3.js";
|
|
19
19
|
import "../chunk-PZ5AY32C.js";
|
|
20
20
|
|
|
21
21
|
// src/with-sync/active.ts
|
package/dist/team/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
MemoryDeviceSealProvider,
|
|
3
3
|
beginEchoUnlock,
|
|
4
4
|
withTeam
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-N6OJLR2M.js";
|
|
6
6
|
import {
|
|
7
7
|
NO_TEAM,
|
|
8
8
|
burnPaperRecoveryEntry,
|
|
@@ -31,8 +31,8 @@ import {
|
|
|
31
31
|
unwrapMagicLinkGrant,
|
|
32
32
|
updateAuthenticator,
|
|
33
33
|
writeMagicLinkGrant
|
|
34
|
-
} from "../chunk-
|
|
35
|
-
import "../chunk-
|
|
34
|
+
} from "../chunk-LWOSNMHE.js";
|
|
35
|
+
import "../chunk-YZ7BRD26.js";
|
|
36
36
|
import {
|
|
37
37
|
buildEchoBlock,
|
|
38
38
|
buildRecipientKeyringFile,
|
|
@@ -53,20 +53,20 @@ import {
|
|
|
53
53
|
updateKeyringIdentity,
|
|
54
54
|
verifyPrompt,
|
|
55
55
|
verifyTypedEcho
|
|
56
|
-
} from "../chunk-
|
|
57
|
-
import "../chunk-
|
|
58
|
-
import "../chunk-
|
|
59
|
-
import "../chunk-
|
|
60
|
-
import "../chunk-
|
|
61
|
-
import "../chunk-
|
|
62
|
-
import "../chunk-
|
|
63
|
-
import "../chunk-
|
|
56
|
+
} from "../chunk-Y7MJSOZ7.js";
|
|
57
|
+
import "../chunk-CK7IRIRY.js";
|
|
58
|
+
import "../chunk-YVOW35HH.js";
|
|
59
|
+
import "../chunk-ZWPUYBNK.js";
|
|
60
|
+
import "../chunk-IMYGJ5HU.js";
|
|
61
|
+
import "../chunk-FSZPQCDR.js";
|
|
62
|
+
import "../chunk-HVR74IBG.js";
|
|
63
|
+
import "../chunk-RBTZLXZJ.js";
|
|
64
64
|
import "../chunk-LP7BEXCT.js";
|
|
65
|
-
import "../chunk-
|
|
66
|
-
import "../chunk-
|
|
65
|
+
import "../chunk-QTDAPDDV.js";
|
|
66
|
+
import "../chunk-6ZFTVY3O.js";
|
|
67
67
|
import {
|
|
68
68
|
TeamNotEnabledError
|
|
69
|
-
} from "../chunk-
|
|
69
|
+
} from "../chunk-I64WQSN3.js";
|
|
70
70
|
import "../chunk-PZ5AY32C.js";
|
|
71
71
|
export {
|
|
72
72
|
MemoryDeviceSealProvider,
|
package/dist/tiers/index.js
CHANGED
|
@@ -11,19 +11,19 @@ import {
|
|
|
11
11
|
putAtTier,
|
|
12
12
|
syncDerivedOutputs,
|
|
13
13
|
withTiers
|
|
14
|
-
} from "../chunk-
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
14
|
+
} from "../chunk-GLS7OSZT.js";
|
|
15
|
+
import "../chunk-YVOW35HH.js";
|
|
16
|
+
import "../chunk-ZWPUYBNK.js";
|
|
17
|
+
import "../chunk-IMYGJ5HU.js";
|
|
18
|
+
import "../chunk-FSZPQCDR.js";
|
|
19
|
+
import "../chunk-HVR74IBG.js";
|
|
20
|
+
import "../chunk-RBTZLXZJ.js";
|
|
21
21
|
import "../chunk-LP7BEXCT.js";
|
|
22
|
-
import "../chunk-
|
|
23
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-QTDAPDDV.js";
|
|
23
|
+
import "../chunk-6ZFTVY3O.js";
|
|
24
24
|
import {
|
|
25
25
|
TiersNotEnabledError
|
|
26
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-I64WQSN3.js";
|
|
27
27
|
import "../chunk-PZ5AY32C.js";
|
|
28
28
|
export {
|
|
29
29
|
NO_TIERS,
|
package/dist/to/index.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
|
-
BundleVersionConflictError,
|
|
3
2
|
ConflictError,
|
|
4
3
|
DuplicateStoreKindError,
|
|
5
4
|
NetworkError,
|
|
6
5
|
PodVersionConflictError,
|
|
7
6
|
StoreCapabilityError,
|
|
8
7
|
UnknownStoreKindError
|
|
9
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-I64WQSN3.js";
|
|
10
9
|
import "../chunk-PZ5AY32C.js";
|
|
11
10
|
|
|
12
11
|
// src/port/to/locator.ts
|
|
@@ -38,7 +37,6 @@ function createStoreLocator() {
|
|
|
38
37
|
};
|
|
39
38
|
}
|
|
40
39
|
export {
|
|
41
|
-
BundleVersionConflictError,
|
|
42
40
|
ConflictError,
|
|
43
41
|
DuplicateStoreKindError,
|
|
44
42
|
NetworkError,
|
package/dist/to/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/port/to/locator.ts"],"sourcesContent":["/**\n * The Locator seam (#945 Task 1): a serializable, CREDENTIALLESS store\n * descriptor plus a factory registry that reconstructs a `NoydbStore` from\n * data.\n *\n * A `StoreDescriptor` is the pod-portable \"what store and where\" — kind,\n * broad topology class, and a kind-specific serializable address/options\n * bag. It is deliberately dumb data: no field on it is ever typed as a\n * function, a `StoreCredentialSource`, or a `StoreCredentials` value, so a\n * descriptor can be written into a pod / manifest / sync payload without an\n * audit for leaked secrets. Anything that must resolve device-side or\n * user-side — a short-lived credential, a device-local directory override,\n * a mounted drive handle — travels out-of-band via `resolve()`'s `opts`,\n * never through the descriptor itself.\n *\n * This module is pure TypeScript: no imports beyond the kernel's own types\n * and errors, no Node built-ins, no crypto. It adds zero runtime\n * dependencies to `@noy-db/hub/to`.\n */\nimport type { NoydbStore, NoydbPodStore, StoreCredentialSource } from '../../kernel/types.js'\nimport { DuplicateStoreKindError, UnknownStoreKindError } from '../../kernel/errors.js'\n\n/**\n * The broad topology bucket a store descriptor's kind falls into —\n * used by callers/UI to group or filter descriptors without knowing every\n * concrete `kind` string.\n */\nexport type StoreClass = 'local' | 'browser' | 'lan' | 'cloud'\n\n/**\n * A serializable, CREDENTIALLESS description of a store instance: enough\n * data to reconstruct a `NoydbStore` via a registered `StoreFactory`, and\n * safe to persist or transmit as-is.\n *\n * CREDENTIALLESS BY CONSTRUCTION: no field here may be typed as a function,\n * a `StoreCredentialSource`, or a `StoreCredentials` value. Credentials\n * NEVER ride the descriptor — they are supplied separately (as a\n * `StoreCredentialSource`) to `StoreLocator.resolve()` at resolve time.\n */\nexport interface StoreDescriptor {\n /** The registered factory key (e.g. `'file'`, `'aws-s3'`, `'webdav'`). */\n readonly kind: string\n /** The broad topology bucket this kind falls into. */\n readonly class: StoreClass\n /** Kind-specific serializable location (e.g. `{ dir }`, `{ bucket, region }`). */\n readonly address: unknown\n /** Kind-specific serializable tuning options. */\n readonly options?: unknown\n}\n\n/**\n * A kind-specific, device-local supplement to a `StoreDescriptor` — a\n * directory override, a mount point, a drive handle — that is resolved\n * device-side and never carried inside a pod alongside the descriptor.\n */\nexport type StoreBinding = unknown\n\n/**\n * Either store shape a factory may produce: the 6-method KV `NoydbStore`, or\n * the whole-vault `NoydbPodStore` implemented by `to-drive` / `to-icloud`.\n *\n * The two are DISJOINT, not sub/supertypes — a pod store has none of the six\n * KV methods — which is why moving between them needs a double cast and why\n * `isPodStore()` exists to narrow instead.\n */\nexport type AnyNoydbStore = NoydbStore | NoydbPodStore\n\n/**\n * Narrow an `AnyNoydbStore` to the pod shape. Discriminates on the\n * `kind: 'bundle'` tag `NoydbPodStore` carries for exactly this purpose; a\n * `NoydbStore` has no `kind` field at all.\n *\n * Use this at a `resolve()` boundary instead of casting — a store resolved\n * from a descriptor read out of a pod is only known to be one of the two\n * shapes at runtime.\n */\nexport function isPodStore(store: AnyNoydbStore): store is NoydbPodStore {\n return (store as NoydbPodStore).kind === 'bundle'\n}\n\n/**\n * Reconstructs a live store from a `StoreDescriptor`. Registered against a\n * `StoreLocator` under the descriptor's `kind`.\n *\n * The type parameter says WHICH shape this factory builds. It defaults to\n * `NoydbStore`, so a bare `StoreFactory` means exactly what it always has;\n * a pod-store factory declares `StoreFactory<NoydbPodStore>` and registers\n * without a cast (#988).\n */\nexport type StoreFactory<S extends AnyNoydbStore = NoydbStore> = (\n descriptor: StoreDescriptor,\n opts: { binding?: StoreBinding; credentials?: StoreCredentialSource },\n) => S | Promise<S>\n\n/** A registry of `StoreFactory`s, keyed by `StoreDescriptor.kind`. */\nexport interface StoreLocator {\n /**\n * Register a factory for `kind`. Throws if `kind` is already registered.\n *\n * Accepts a factory building EITHER store shape — `S` is inferred from the\n * factory's own return type, so a `NoydbPodStore` factory needs no cast.\n */\n register<S extends AnyNoydbStore>(kind: string, factory: StoreFactory<S>): void\n /**\n * Resolve `descriptor` to a live store via its kind's registered factory.\n *\n * Returns `NoydbStore`. If the `kind` was registered with a pod-store\n * factory, the resolved value is really a `NoydbPodStore`: this signature\n * is the seam's remaining unsoundness, kept because widening it to\n * `AnyNoydbStore` would break every existing caller. Where the descriptor's\n * kind is not statically known, prefer `resolveAny()` and `isPodStore()`.\n */\n resolve(\n descriptor: StoreDescriptor,\n opts?: { binding?: StoreBinding; credentials?: StoreCredentialSource },\n ): NoydbStore | Promise<NoydbStore>\n /**\n * As `resolve()`, but typed honestly: the registry is keyed by a runtime\n * `kind` string, so which of the two shapes comes back is not knowable\n * statically. Narrow the result with `isPodStore()`.\n */\n resolveAny(\n descriptor: StoreDescriptor,\n opts?: { binding?: StoreBinding; credentials?: StoreCredentialSource },\n ): AnyNoydbStore | Promise<AnyNoydbStore>\n}\n\n/**\n * Creates a fresh, empty `StoreLocator`.\n *\n * DUPLICATE REGISTRATION: `register()` throws if `kind` is already\n * registered, rather than silently overwriting it (last-wins). A\n * composition root that registers the same kind twice is almost always a\n * mistake — a copy-pasted setup block, two satellite packages fighting\n * over the same kind string — and last-wins would hide it behind whichever\n * registration happened to run last. This mirrors the\n * `DuplicateBehaviorNameError` philosophy (#947): fail loudly at the\n * mistake's source instead of silently at some unrelated `resolve()` call\n * later.\n */\nexport function createStoreLocator(): StoreLocator {\n const factories = new Map<string, StoreFactory<AnyNoydbStore>>()\n\n function lookup(kind: string): StoreFactory<AnyNoydbStore> {\n const factory = factories.get(kind)\n if (!factory) {\n throw new UnknownStoreKindError(kind, [...factories.keys()].sort())\n }\n return factory\n }\n\n return {\n register(kind, factory) {\n if (factories.has(kind)) {\n throw new DuplicateStoreKindError(kind)\n }\n factories.set(kind, factory)\n },\n resolve(descriptor, opts = {}) {\n // The one place the seam's `resolve(): NoydbStore` signature is paid\n // for. A pod-store `kind` really returns a `NoydbPodStore`; the registry\n // is keyed by a runtime string so nothing here can prove otherwise.\n // Concentrated in the module that owns the invariant rather than\n // duplicated as `as unknown as StoreFactory` in every pod-store package\n // (#988). `resolveAny()` is the honest signature over the same call.\n return lookup(descriptor.kind)(descriptor, opts) as NoydbStore | Promise<NoydbStore>\n },\n resolveAny(descriptor, opts = {}) {\n return lookup(descriptor.kind)(descriptor, opts)\n },\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/port/to/locator.ts"],"sourcesContent":["/**\n * The Locator seam (#945 Task 1): a serializable, CREDENTIALLESS store\n * descriptor plus a factory registry that reconstructs a `NoydbStore` from\n * data.\n *\n * A `StoreDescriptor` is the pod-portable \"what store and where\" — kind,\n * broad topology class, and a kind-specific serializable address/options\n * bag. It is deliberately dumb data: no field on it is ever typed as a\n * function, a `StoreCredentialSource`, or a `StoreCredentials` value, so a\n * descriptor can be written into a pod / manifest / sync payload without an\n * audit for leaked secrets. Anything that must resolve device-side or\n * user-side — a short-lived credential, a device-local directory override,\n * a mounted drive handle — travels out-of-band via `resolve()`'s `opts`,\n * never through the descriptor itself.\n *\n * This module is pure TypeScript: no imports beyond the kernel's own types\n * and errors, no Node built-ins, no crypto. It adds zero runtime\n * dependencies to `@noy-db/hub/to`.\n */\nimport type { NoydbStore, NoydbPodStore, StoreCredentialSource } from '../../kernel/types.js'\nimport { DuplicateStoreKindError, UnknownStoreKindError } from '../../kernel/errors.js'\n\n/**\n * The broad topology bucket a store descriptor's kind falls into —\n * used by callers/UI to group or filter descriptors without knowing every\n * concrete `kind` string.\n */\nexport type StoreClass = 'local' | 'browser' | 'lan' | 'cloud'\n\n/**\n * A serializable, CREDENTIALLESS description of a store instance: enough\n * data to reconstruct a `NoydbStore` via a registered `StoreFactory`, and\n * safe to persist or transmit as-is.\n *\n * CREDENTIALLESS BY CONSTRUCTION: no field here may be typed as a function,\n * a `StoreCredentialSource`, or a `StoreCredentials` value. Credentials\n * NEVER ride the descriptor — they are supplied separately (as a\n * `StoreCredentialSource`) to `StoreLocator.resolve()` at resolve time.\n */\nexport interface StoreDescriptor {\n /** The registered factory key (e.g. `'file'`, `'aws-s3'`, `'webdav'`). */\n readonly kind: string\n /** The broad topology bucket this kind falls into. */\n readonly class: StoreClass\n /** Kind-specific serializable location (e.g. `{ dir }`, `{ bucket, region }`). */\n readonly address: unknown\n /** Kind-specific serializable tuning options. */\n readonly options?: unknown\n}\n\n/**\n * A kind-specific, device-local supplement to a `StoreDescriptor` — a\n * directory override, a mount point, a drive handle — that is resolved\n * device-side and never carried inside a pod alongside the descriptor.\n */\nexport type StoreBinding = unknown\n\n/**\n * Either store shape a factory may produce: the 6-method KV `NoydbStore`, or\n * the whole-vault `NoydbPodStore` implemented by `to-drive` / `to-icloud`.\n *\n * The two are DISJOINT, not sub/supertypes — a pod store has none of the six\n * KV methods — which is why moving between them needs a double cast and why\n * `isPodStore()` exists to narrow instead.\n */\nexport type AnyNoydbStore = NoydbStore | NoydbPodStore\n\n/**\n * Narrow an `AnyNoydbStore` to the pod shape. Discriminates on the\n * `kind: 'bundle'` tag `NoydbPodStore` carries for exactly this purpose; a\n * `NoydbStore` has no `kind` field at all.\n *\n * Use this at a `resolve()` boundary instead of casting — a store resolved\n * from a descriptor read out of a pod is only known to be one of the two\n * shapes at runtime.\n */\nexport function isPodStore(store: AnyNoydbStore): store is NoydbPodStore {\n return (store as NoydbPodStore).kind === 'bundle'\n}\n\n/**\n * Reconstructs a live store from a `StoreDescriptor`. Registered against a\n * `StoreLocator` under the descriptor's `kind`.\n *\n * The type parameter says WHICH shape this factory builds. It defaults to\n * `NoydbStore`, so a bare `StoreFactory` means exactly what it always has;\n * a pod-store factory declares `StoreFactory<NoydbPodStore>` and registers\n * without a cast (#988).\n */\nexport type StoreFactory<S extends AnyNoydbStore = NoydbStore> = (\n descriptor: StoreDescriptor,\n opts: { binding?: StoreBinding; credentials?: StoreCredentialSource },\n) => S | Promise<S>\n\n/** A registry of `StoreFactory`s, keyed by `StoreDescriptor.kind`. */\nexport interface StoreLocator {\n /**\n * Register a factory for `kind`. Throws if `kind` is already registered.\n *\n * Accepts a factory building EITHER store shape — `S` is inferred from the\n * factory's own return type, so a `NoydbPodStore` factory needs no cast.\n */\n register<S extends AnyNoydbStore>(kind: string, factory: StoreFactory<S>): void\n /**\n * Resolve `descriptor` to a live store via its kind's registered factory.\n *\n * Returns `NoydbStore`. If the `kind` was registered with a pod-store\n * factory, the resolved value is really a `NoydbPodStore`: this signature\n * is the seam's remaining unsoundness, kept because widening it to\n * `AnyNoydbStore` would break every existing caller. Where the descriptor's\n * kind is not statically known, prefer `resolveAny()` and `isPodStore()`.\n */\n resolve(\n descriptor: StoreDescriptor,\n opts?: { binding?: StoreBinding; credentials?: StoreCredentialSource },\n ): NoydbStore | Promise<NoydbStore>\n /**\n * As `resolve()`, but typed honestly: the registry is keyed by a runtime\n * `kind` string, so which of the two shapes comes back is not knowable\n * statically. Narrow the result with `isPodStore()`.\n */\n resolveAny(\n descriptor: StoreDescriptor,\n opts?: { binding?: StoreBinding; credentials?: StoreCredentialSource },\n ): AnyNoydbStore | Promise<AnyNoydbStore>\n}\n\n/**\n * Creates a fresh, empty `StoreLocator`.\n *\n * DUPLICATE REGISTRATION: `register()` throws if `kind` is already\n * registered, rather than silently overwriting it (last-wins). A\n * composition root that registers the same kind twice is almost always a\n * mistake — a copy-pasted setup block, two satellite packages fighting\n * over the same kind string — and last-wins would hide it behind whichever\n * registration happened to run last. This mirrors the\n * `DuplicateBehaviorNameError` philosophy (#947): fail loudly at the\n * mistake's source instead of silently at some unrelated `resolve()` call\n * later.\n */\nexport function createStoreLocator(): StoreLocator {\n const factories = new Map<string, StoreFactory<AnyNoydbStore>>()\n\n function lookup(kind: string): StoreFactory<AnyNoydbStore> {\n const factory = factories.get(kind)\n if (!factory) {\n throw new UnknownStoreKindError(kind, [...factories.keys()].sort())\n }\n return factory\n }\n\n return {\n register(kind, factory) {\n if (factories.has(kind)) {\n throw new DuplicateStoreKindError(kind)\n }\n factories.set(kind, factory)\n },\n resolve(descriptor, opts = {}) {\n // The one place the seam's `resolve(): NoydbStore` signature is paid\n // for. A pod-store `kind` really returns a `NoydbPodStore`; the registry\n // is keyed by a runtime string so nothing here can prove otherwise.\n // Concentrated in the module that owns the invariant rather than\n // duplicated as `as unknown as StoreFactory` in every pod-store package\n // (#988). `resolveAny()` is the honest signature over the same call.\n return lookup(descriptor.kind)(descriptor, opts) as NoydbStore | Promise<NoydbStore>\n },\n resolveAny(descriptor, opts = {}) {\n return lookup(descriptor.kind)(descriptor, opts)\n },\n }\n}\n"],"mappings":";;;;;;;;;;;AA4EO,SAAS,WAAW,OAA8C;AACvE,SAAQ,MAAwB,SAAS;AAC3C;AA8DO,SAAS,qBAAmC;AACjD,QAAM,YAAY,oBAAI,IAAyC;AAE/D,WAAS,OAAO,MAA2C;AACzD,UAAM,UAAU,UAAU,IAAI,IAAI;AAClC,QAAI,CAAC,SAAS;AACZ,YAAM,IAAI,sBAAsB,MAAM,CAAC,GAAG,UAAU,KAAK,CAAC,EAAE,KAAK,CAAC;AAAA,IACpE;AACA,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL,SAAS,MAAM,SAAS;AACtB,UAAI,UAAU,IAAI,IAAI,GAAG;AACvB,cAAM,IAAI,wBAAwB,IAAI;AAAA,MACxC;AACA,gBAAU,IAAI,MAAM,OAAO;AAAA,IAC7B;AAAA,IACA,QAAQ,YAAY,OAAO,CAAC,GAAG;AAO7B,aAAO,OAAO,WAAW,IAAI,EAAE,YAAY,IAAI;AAAA,IACjD;AAAA,IACA,WAAW,YAAY,OAAO,CAAC,GAAG;AAChC,aAAO,OAAO,WAAW,IAAI,EAAE,YAAY,IAAI;AAAA,IACjD;AAAA,EACF;AACF;","names":[]}
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
TxContext,
|
|
4
4
|
TxVault,
|
|
5
5
|
runTransaction
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-4444HN72.js";
|
|
7
7
|
import {
|
|
8
8
|
lazy
|
|
9
9
|
} from "../chunk-5D2ALSM5.js";
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-4AOERLTV.js";
|
|
11
|
+
import "../chunk-I64WQSN3.js";
|
|
12
12
|
import "../chunk-PZ5AY32C.js";
|
|
13
13
|
|
|
14
14
|
// src/with-commit/tx/dry-run.ts
|
|
15
|
-
var loadGuardExecutor = lazy(() => import("../executor-
|
|
15
|
+
var loadGuardExecutor = lazy(() => import("../executor-WFTHIDT7.js"));
|
|
16
16
|
var SEP = " ";
|
|
17
17
|
var keyOf = (op) => `${op.vaultName}${SEP}${op.collectionName}${SEP}${op.id}`;
|
|
18
18
|
async function runDryRun(db, fn) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generateULID,
|
|
3
3
|
isULID
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4AOERLTV.js";
|
|
5
5
|
import "./chunk-PZ5AY32C.js";
|
|
6
6
|
export {
|
|
7
7
|
generateULID,
|
|
8
8
|
isULID
|
|
9
9
|
};
|
|
10
|
-
//# sourceMappingURL=ulid-
|
|
10
|
+
//# sourceMappingURL=ulid-VQW6ERQN.js.map
|
package/dist/util/index.js
CHANGED
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
blindedEqual,
|
|
3
3
|
evaluateKofN,
|
|
4
4
|
openVdigPayload
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-FSZPQCDR.js";
|
|
6
6
|
import {
|
|
7
7
|
dualReadSealedSlot
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HVR74IBG.js";
|
|
9
9
|
import {
|
|
10
10
|
VDIG_ITERATIONS,
|
|
11
11
|
normalizeForVerify,
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
base64ToBuffer,
|
|
16
16
|
generateSalt
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-QTDAPDDV.js";
|
|
18
18
|
import {
|
|
19
19
|
ClassifiedConfigError,
|
|
20
20
|
ClassifiedVerifyError
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-I64WQSN3.js";
|
|
22
22
|
import "./chunk-PZ5AY32C.js";
|
|
23
23
|
|
|
24
24
|
// src/kernel/enclave/classify/verify.ts
|
|
@@ -137,4 +137,4 @@ export {
|
|
|
137
137
|
verifyDigestField,
|
|
138
138
|
verifyTextField
|
|
139
139
|
};
|
|
140
|
-
//# sourceMappingURL=verify-
|
|
140
|
+
//# sourceMappingURL=verify-SHJXGZGM.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
dumpVaultSchema
|
|
3
|
+
} from "./chunk-KTCQKXHW.js";
|
|
4
|
+
import "./chunk-KHKKD62N.js";
|
|
5
|
+
import "./chunk-HNOBRU24.js";
|
|
6
|
+
import "./chunk-Y2NBBT6K.js";
|
|
7
|
+
import "./chunk-CK6Z5DJQ.js";
|
|
8
|
+
import "./chunk-ZWPUYBNK.js";
|
|
9
|
+
import "./chunk-IMYGJ5HU.js";
|
|
10
|
+
import "./chunk-FSZPQCDR.js";
|
|
11
|
+
import "./chunk-HVR74IBG.js";
|
|
12
|
+
import "./chunk-RBTZLXZJ.js";
|
|
13
|
+
import "./chunk-LP7BEXCT.js";
|
|
14
|
+
import "./chunk-QTDAPDDV.js";
|
|
15
|
+
import "./chunk-6ZFTVY3O.js";
|
|
16
|
+
import "./chunk-I64WQSN3.js";
|
|
17
|
+
import "./chunk-PZ5AY32C.js";
|
|
18
|
+
export {
|
|
19
|
+
dumpVaultSchema
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=walk-4NIT2ZBH.js.map
|
|
@@ -12,7 +12,7 @@ import type { NoydbStore } from '../kernel/types.js';
|
|
|
12
12
|
import type { SealingKeyProvider } from '../with-party/team/managed-secret.js';
|
|
13
13
|
import type { ShamirRecoveryProvider } from '../with-party/team/shamir-recovery-provider.js';
|
|
14
14
|
import type { RecoveryEnrollmentInput } from '../with-party/team/rotate-recover.js';
|
|
15
|
-
import type { TransferSealPayload } from '../with-pod/
|
|
15
|
+
import type { TransferSealPayload } from '../with-pod/pod.js';
|
|
16
16
|
/**
|
|
17
17
|
* Reverse of `sealDeks`. Imports the transfer key, decrypts the
|
|
18
18
|
* sealed `{ collection: base64(rawDEK) }` map (layout iv(12)‖ct‖tag), and
|
|
@@ -10,7 +10,7 @@ import type { Vault } from '../kernel/vault.js';
|
|
|
10
10
|
import type { EncryptedEnvelope } from '../kernel/types.js';
|
|
11
11
|
import { type EnclaveKey } from '../kernel/enclave/index.js';
|
|
12
12
|
import { type WalkClosureOptions, type DanglingRefNotice } from './walk-closure.js';
|
|
13
|
-
import { type TransferSealPayload } from '../with-pod/
|
|
13
|
+
import { type TransferSealPayload } from '../with-pod/pod.js';
|
|
14
14
|
/** Re-keyed collections snapshot + the fresh DEKs used. */
|
|
15
15
|
export interface ReKeyResult {
|
|
16
16
|
readonly collections: Record<string, Record<string, EncryptedEnvelope>>;
|
|
@@ -43,4 +43,4 @@ export type { WriteConflict } from '../kernel/types.js';
|
|
|
43
43
|
export type { AccessibleVault } from '../kernel/types.js';
|
|
44
44
|
export type { Unsubscribe } from '../kernel/types.js';
|
|
45
45
|
export type { ExtractPartitionOptions } from './extract-partition.js';
|
|
46
|
-
export type { TransferSealPayload } from '../with-pod/
|
|
46
|
+
export type { TransferSealPayload } from '../with-pod/pod.js';
|
|
@@ -17,7 +17,7 @@ export { NO_TEAM, type TeamStrategy } from './strategy.js';
|
|
|
17
17
|
export { TeamNotEnabledError } from '../../kernel/errors.js';
|
|
18
18
|
export type { UnlockedKeyring } from './keyring.js';
|
|
19
19
|
export { loadKeyring, createOwnerKeyring, grant, revoke, changeSecret, listUsers, listUsersWithEnvelopes, ensureCollectionDEK, persistKeyring, updateKeyringIdentity, buildRecipientKeyringFile, } from './keyring.js';
|
|
20
|
-
export type {
|
|
20
|
+
export type { PodRecipient, ListUsersOptions } from './keyring.js';
|
|
21
21
|
export type { LoadKeyringOptions, CreateOwnerKeyringOptions, RotateKeysOptions, ChangeSecretOptions, } from './keyring.js';
|
|
22
22
|
export { enrollAuthenticator, removeAuthenticator, updateAuthenticator, findAuthenticator, } from './authenticators.js';
|
|
23
23
|
export type { EnrollAuthenticatorOptions, EnrollAuthenticatorWrappingKEKOptions, EnrollAuthenticatorWrappingDEKsOptions, UpdateAuthenticatorOptions, } from './authenticators.js';
|
|
@@ -261,7 +261,7 @@ export interface EchoRecipientSecret extends EchoSecretParts {
|
|
|
261
261
|
*
|
|
262
262
|
* @public
|
|
263
263
|
*/
|
|
264
|
-
export interface
|
|
264
|
+
export interface PodRecipient {
|
|
265
265
|
/** User id stamped onto the keyring file in the bundle. */
|
|
266
266
|
readonly id: string;
|
|
267
267
|
/** Optional display name. Defaults to `id`. */
|
|
@@ -312,7 +312,7 @@ export interface BundleRecipient {
|
|
|
312
312
|
*
|
|
313
313
|
* @internal
|
|
314
314
|
*/
|
|
315
|
-
export declare function buildRecipientKeyringFile(callerKeyring: UnlockedKeyring, recipient:
|
|
315
|
+
export declare function buildRecipientKeyringFile(callerKeyring: UnlockedKeyring, recipient: PodRecipient): Promise<KeyringFile>;
|
|
316
316
|
/** List all users with access to a vault. */
|
|
317
317
|
export declare function listUsers(store: NoydbStore, vault: string): Promise<UserInfo[]>;
|
|
318
318
|
/**
|
|
@@ -47,14 +47,14 @@
|
|
|
47
47
|
*/
|
|
48
48
|
import type { Cover } from '../with-party/directory/cover/types.js';
|
|
49
49
|
import type { Redirect } from './redirect.js';
|
|
50
|
-
/** Magic bytes 'NDB1' (ASCII)
|
|
51
|
-
export declare const
|
|
50
|
+
/** Magic bytes 'NDB1' (ASCII) — `NoyDB 1` — identifying a NOYDB pod (`.noydb` container). */
|
|
51
|
+
export declare const NOYDB_POD_MAGIC: Uint8Array<ArrayBuffer>;
|
|
52
52
|
/** Total fixed prefix before the header JSON: 4+1+1+4 bytes. */
|
|
53
|
-
export declare const
|
|
53
|
+
export declare const NOYDB_POD_PREFIX_BYTES = 10;
|
|
54
54
|
/** Current bundle format version. Bumped on layout changes. Default for unsigned pods. */
|
|
55
|
-
export declare const
|
|
55
|
+
export declare const NOYDB_POD_FORMAT_VERSION = 1;
|
|
56
56
|
/** Format version for pods carrying a header signature (`sig`/`keyId`/`sigAlg`). */
|
|
57
|
-
export declare const
|
|
57
|
+
export declare const NOYDB_POD_FORMAT_VERSION_SIGNED = 2;
|
|
58
58
|
/**
|
|
59
59
|
* Bitfield interpretation of the flags byte.
|
|
60
60
|
*
|
|
@@ -85,7 +85,7 @@ export type CompressionAlgo = 0 | 1 | 2;
|
|
|
85
85
|
*
|
|
86
86
|
* **Minimum-disclosure rules:** these are the ONLY allowed keys.
|
|
87
87
|
* Any other key in a parsed header causes
|
|
88
|
-
* `
|
|
88
|
+
* `validatePodHeaderFields` to throw. The set is kept short to
|
|
89
89
|
* minimize attack surface from cloud-storage metadata indexing —
|
|
90
90
|
* see the file-level doc comment for the rationale.
|
|
91
91
|
*
|
|
@@ -249,8 +249,6 @@ export interface NoydbPodHeader {
|
|
|
249
249
|
* family (see `unlockMethods` doc comment on `NoydbPodHeader`).
|
|
250
250
|
*/
|
|
251
251
|
export type UnlockMethod = 'password' | 'webauthn' | 'oidc' | 'totp' | 'email-otp' | 'magic-link' | 'pin' | 'recovery' | 'shamir';
|
|
252
|
-
/** @deprecated Use `NoydbPodHeader`. */
|
|
253
|
-
export type NoydbBundleHeader = NoydbPodHeader;
|
|
254
252
|
/**
|
|
255
253
|
* Validate a parsed bundle header. Throws on any deviation from
|
|
256
254
|
* the minimum-disclosure schema:
|
|
@@ -266,18 +264,18 @@ export type NoydbBundleHeader = NoydbPodHeader;
|
|
|
266
264
|
* The error messages name the offending field so consumers can
|
|
267
265
|
* fix the producer rather than the reader.
|
|
268
266
|
*/
|
|
269
|
-
export declare function
|
|
267
|
+
export declare function validatePodHeaderFields(parsed: unknown): asserts parsed is NoydbPodHeader;
|
|
270
268
|
/**
|
|
271
269
|
* Encode a header object to UTF-8 JSON bytes after validating
|
|
272
270
|
* minimum disclosure. Used by the writer to serialize the header
|
|
273
271
|
* region of the container.
|
|
274
272
|
*/
|
|
275
|
-
export declare function
|
|
273
|
+
export declare function encodePodHeader(header: NoydbPodHeader): Uint8Array;
|
|
276
274
|
/**
|
|
277
275
|
* Parse a bundle header from its UTF-8 JSON bytes. Throws on
|
|
278
276
|
* invalid JSON or any minimum-disclosure violation.
|
|
279
277
|
*/
|
|
280
|
-
export declare function
|
|
278
|
+
export declare function decodePodHeader(bytes: Uint8Array): NoydbPodHeader;
|
|
281
279
|
/**
|
|
282
280
|
* Read a uint32 from `bytes` at `offset` in big-endian byte order.
|
|
283
281
|
* No bounds check — callers must guarantee `offset + 4 <= bytes.length`.
|
|
@@ -295,4 +293,4 @@ export declare function writeUint32BE(bytes: Uint8Array, offset: number, value:
|
|
|
295
293
|
* 4 bytes match `NDB1`. Used by readers as a fast file-type check
|
|
296
294
|
* before any further parsing.
|
|
297
295
|
*/
|
|
298
|
-
export declare function
|
|
296
|
+
export declare function hasNoydbPodMagic(bytes: Uint8Array): boolean;
|
package/dist/with-pod/index.d.ts
CHANGED
|
@@ -11,19 +11,19 @@
|
|
|
11
11
|
* omit this subpath and save ~805 LOC of format code + Brotli/gzip
|
|
12
12
|
* wiring.
|
|
13
13
|
*/
|
|
14
|
-
export { writePod, readPod, readPodHeader, readPodCover,
|
|
14
|
+
export { writePod, readPod, readPodHeader, readPodCover, resetBrotliSupportCache, } from './pod.js';
|
|
15
15
|
export type { Cover } from '../with-party/directory/cover/types.js';
|
|
16
|
-
export type { WritePodOptions,
|
|
17
|
-
export { verifyPodHeader } from './
|
|
18
|
-
export type { PodVerifyResult } from './
|
|
16
|
+
export type { WritePodOptions, ReadPodOptions, PodReadResult, } from './pod.js';
|
|
17
|
+
export { verifyPodHeader } from './pod.js';
|
|
18
|
+
export type { PodVerifyResult } from './pod.js';
|
|
19
19
|
export { signRecord, verifyRecord, signedBytes, POD_SIG_ALG } from './signature.js';
|
|
20
|
-
export {
|
|
21
|
-
export type { CompressionAlgo, NoydbPodHeader,
|
|
20
|
+
export { NOYDB_POD_MAGIC, NOYDB_POD_PREFIX_BYTES, NOYDB_POD_FORMAT_VERSION, FLAG_COMPRESSED, FLAG_HAS_INTEGRITY_HASH, COMPRESSION_NONE, COMPRESSION_GZIP, COMPRESSION_BROTLI, validatePodHeaderFields, encodePodHeader, hasNoydbPodMagic, } from './format.js';
|
|
21
|
+
export type { CompressionAlgo, NoydbPodHeader, UnlockMethod, } from './format.js';
|
|
22
22
|
export { generateULID, isULID } from './ulid.js';
|
|
23
|
-
export { wrapPodStore, createPodStore
|
|
24
|
-
export type { WrappedPodNoydbStore, WrapPodStoreOptions,
|
|
25
|
-
export {
|
|
26
|
-
export { readPodRedirect } from './
|
|
23
|
+
export { wrapPodStore, createPodStore } from './pod-store.js';
|
|
24
|
+
export type { WrappedPodNoydbStore, WrapPodStoreOptions, } from './pod-store.js';
|
|
25
|
+
export { PodIntegrityError, PodSealMismatchError, PodVersionConflictError, BackupLedgerError, BackupCorruptedError, } from '../kernel/errors.js';
|
|
26
|
+
export { readPodRedirect } from './pod.js';
|
|
27
27
|
export { signRedirect, verifyRedirect, followRedirects } from './redirect.js';
|
|
28
28
|
export type { Redirect, RedirectHop, FollowRedirectsResult } from './redirect.js';
|
|
29
29
|
export type { DocSigner } from '../with-audit/attestation/signer.js';
|