@noy-db/hub 0.4.0-pre.1 → 0.4.0-pre.3
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/aggregate/index.js +4 -4
- package/dist/api-UPAT2O3M.js +20 -0
- package/dist/as/index.js +12 -12
- package/dist/attestation/index.js +18 -18
- package/dist/{backup-LU2DTZTI.js → backup-JL2GOTYQ.js} +11 -11
- package/dist/blobs/index.js +27 -15
- package/dist/blobs/index.js.map +1 -1
- package/dist/broker/index.js +12 -12
- package/dist/broker/index.js.map +1 -1
- package/dist/by/index.js +2 -2
- package/dist/cargo/index.js +46 -36
- package/dist/{chunk-QDPZWTN2.js → chunk-25G7U6RD.js} +2 -2
- package/dist/{chunk-GQNGCEP5.js → chunk-25ZDB25Z.js} +2 -2
- package/dist/{chunk-5WZXVULX.js → chunk-2ITLQZV5.js} +2 -2
- package/dist/{chunk-WNGGJWF7.js → chunk-2JZ763FV.js} +2 -2
- package/dist/{chunk-2P7EGNKF.js → chunk-2KL6NDD4.js} +90 -3
- package/dist/chunk-2KL6NDD4.js.map +1 -0
- package/dist/{chunk-3U3FBR7O.js → chunk-2RMDVWGB.js} +2 -2
- package/dist/{chunk-VAIS3SOM.js → chunk-2U7Y7BNJ.js} +2 -2
- package/dist/{chunk-MQ6WOPSY.js → chunk-2VUISNGP.js} +5 -5
- package/dist/chunk-2YELV6TV.js +1 -0
- package/dist/{chunk-2MUZ3LY6.js → chunk-3O62PVDW.js} +3 -3
- package/dist/{chunk-KUPKLSX5.js → chunk-3XVOLB75.js} +3 -3
- package/dist/{chunk-6HY2X62D.js → chunk-5BB3N4KU.js} +2 -2
- package/dist/{chunk-LSASLXGC.js → chunk-5BHNQNBI.js} +1 -1
- package/dist/{chunk-LSASLXGC.js.map → chunk-5BHNQNBI.js.map} +1 -1
- package/dist/{chunk-6NQMXTYC.js → chunk-5OZCCLNC.js} +2 -2
- package/dist/{chunk-HOONYZY2.js → chunk-5P5AAXYA.js} +2 -2
- package/dist/{chunk-T6GU5PPZ.js → chunk-5SZ24DL5.js} +6 -6
- package/dist/{chunk-PK6QCH2C.js → chunk-7B4GPCX7.js} +5 -5
- package/dist/{chunk-G6EQYAL6.js → chunk-AFBJHD55.js} +5 -5
- package/dist/{chunk-LB6OH6K2.js → chunk-BCOKZC4B.js} +2 -2
- package/dist/{chunk-J6Q7UVQE.js → chunk-BVZGNMVM.js} +4 -16
- package/dist/{chunk-J6Q7UVQE.js.map → chunk-BVZGNMVM.js.map} +1 -1
- package/dist/{chunk-IRQY7IR5.js → chunk-BZEPJJOK.js} +4 -4
- package/dist/{chunk-GYYCX5K6.js → chunk-BZK6JEX4.js} +5 -5
- package/dist/{chunk-7CI6CP7Z.js → chunk-CCT4WZI6.js} +5 -5
- package/dist/{chunk-VEALDPHW.js → chunk-CGPO3ZYB.js} +2 -2
- package/dist/{chunk-S3BFKGET.js → chunk-DEQ2JTBR.js} +3 -3
- package/dist/{chunk-3ELCWU56.js → chunk-E2R5NRZD.js} +2 -2
- package/dist/{chunk-BOKIKJJB.js → chunk-EDC6MLXV.js} +2 -2
- package/dist/{chunk-JZWWLLVY.js → chunk-EW4HFWGJ.js} +6 -6
- package/dist/{chunk-2IALOXZS.js → chunk-F4COUZLL.js} +2 -2
- package/dist/{chunk-JRBNCUNT.js → chunk-FLHOTGOO.js} +3 -3
- package/dist/{chunk-6XE5TMPR.js → chunk-GBEXTC6Z.js} +3 -3
- package/dist/{chunk-N55W7KUL.js → chunk-GS3Q2KOZ.js} +2 -2
- package/dist/{chunk-A5BDDEXK.js → chunk-GU5AYA2Q.js} +4 -4
- package/dist/{chunk-M75ZZHSR.js → chunk-GYB2QK5H.js} +2 -2
- package/dist/{chunk-6B4DYGWO.js → chunk-GZ2GKOF6.js} +3 -3
- package/dist/{chunk-VCBHAE4R.js → chunk-H4SMS4O2.js} +2 -2
- package/dist/{chunk-MTQPRQHB.js → chunk-HGVFJL63.js} +4 -4
- package/dist/{chunk-UNCOC7QH.js → chunk-HKR25MGX.js} +9 -9
- package/dist/{chunk-F6T6L2UK.js → chunk-IGAIOGCN.js} +4 -4
- package/dist/{chunk-W2OG6JOL.js → chunk-IGM563N5.js} +18 -1
- package/dist/chunk-IGM563N5.js.map +1 -0
- package/dist/{chunk-GWKAVKHI.js → chunk-ITI3SJRB.js} +2 -2
- package/dist/{chunk-RTEK4C4I.js → chunk-IUIVDVXM.js} +2 -2
- package/dist/{chunk-UBNCR3YK.js → chunk-IZX3WZBF.js} +4 -4
- package/dist/{chunk-RDXW3OBQ.js → chunk-J3VW4J4E.js} +2 -2
- package/dist/{chunk-BMQWTQZ4.js → chunk-J6U4BOKP.js} +11 -11
- package/dist/{chunk-KUIB4B5Q.js → chunk-JA5B3SLH.js} +2 -2
- package/dist/{chunk-4BRCIYFG.js → chunk-JA5O7UEZ.js} +6 -6
- package/dist/{chunk-TAGR72IR.js → chunk-JIMEB4C6.js} +4 -4
- package/dist/chunk-JIMEB4C6.js.map +1 -0
- package/dist/{chunk-6HPG2YNX.js → chunk-JKWNG3TM.js} +2 -2
- package/dist/{chunk-RM2XV574.js → chunk-JLHKBAFY.js} +3 -3
- package/dist/{chunk-ISMV2QVG.js → chunk-KMONEHDJ.js} +2 -2
- package/dist/{chunk-ZEQWCBCM.js → chunk-KR5EGWI4.js} +5 -5
- package/dist/{chunk-JBBSYJHP.js → chunk-KVHWEPT2.js} +2 -2
- package/dist/{chunk-2PCAVW2I.js → chunk-L4OA7G5T.js} +2 -2
- package/dist/{chunk-IY23KFNZ.js → chunk-LLVW4V7R.js} +3 -3
- package/dist/{chunk-3PF6CRDT.js → chunk-LUH2MPEF.js} +136 -196
- package/dist/chunk-LUH2MPEF.js.map +1 -0
- package/dist/{chunk-N6WF5PKC.js → chunk-M25ZIEB2.js} +2 -2
- package/dist/{chunk-A7JJLVGH.js → chunk-MEKAMERX.js} +5 -7
- package/dist/{chunk-A7JJLVGH.js.map → chunk-MEKAMERX.js.map} +1 -1
- package/dist/{chunk-UC2ETWF3.js → chunk-MSO2C3KG.js} +2 -2
- package/dist/{chunk-DDATL6PU.js → chunk-N4A3DCBT.js} +7 -7
- package/dist/{chunk-DDATL6PU.js.map → chunk-N4A3DCBT.js.map} +1 -1
- package/dist/{chunk-ONTBCHCP.js → chunk-N4FZ6ITM.js} +2 -2
- package/dist/{chunk-DRWBEDYO.js → chunk-NM4LVUXH.js} +2 -2
- package/dist/{chunk-HPUWOVR7.js → chunk-NOT7XA7Q.js} +5 -5
- package/dist/{chunk-RA5VTXXG.js → chunk-OGFPMCSP.js} +2 -2
- package/dist/{chunk-T36RFODW.js → chunk-OOTTXUNV.js} +2 -2
- package/dist/{chunk-OF75ACKS.js → chunk-OVFCAS7U.js} +9 -9
- package/dist/{chunk-KWVJAOIN.js → chunk-OWE4BNTM.js} +4 -4
- package/dist/{chunk-7O3AYBC7.js → chunk-OWLPX2GI.js} +70 -59
- package/dist/chunk-OWLPX2GI.js.map +1 -0
- package/dist/{chunk-DVUZMT2W.js → chunk-PEY6ZTCF.js} +8 -8
- package/dist/{chunk-SMGEYW6G.js → chunk-QAFWRGVD.js} +7 -7
- package/dist/{chunk-TOPYT5U5.js → chunk-QCUH2G77.js} +6 -6
- package/dist/{chunk-CBSY2N76.js → chunk-QDNVHA2F.js} +2 -2
- package/dist/{chunk-FH52K7EG.js → chunk-QRHEAZ2Q.js} +2 -6
- package/dist/{chunk-FH52K7EG.js.map → chunk-QRHEAZ2Q.js.map} +1 -1
- package/dist/{chunk-WEYZTLXN.js → chunk-QXPOEAKR.js} +2 -2
- package/dist/{chunk-BGK233EA.js → chunk-QYJIOWKN.js} +7 -7
- package/dist/{chunk-O7WJ47EF.js → chunk-SN75YVM5.js} +4 -4
- package/dist/{chunk-JVBO4SZL.js → chunk-STR7WBOB.js} +2 -2
- package/dist/{chunk-DDHM2TLX.js → chunk-T7S4V52L.js} +4 -4
- package/dist/{chunk-LOF2W3JU.js → chunk-UBF7HTOR.js} +12 -12
- package/dist/{chunk-RND5ZPNP.js → chunk-UEO5CHOP.js} +3 -3
- package/dist/{chunk-EGCRBCNA.js → chunk-V3YB7RGR.js} +3 -3
- package/dist/{chunk-IM3QVF53.js → chunk-V7RGFJ3Z.js} +6 -6
- package/dist/{chunk-SMIRGMS7.js → chunk-VEX6G3YL.js} +2 -2
- package/dist/{chunk-PT37L5DV.js → chunk-WEC3JGBA.js} +3 -3
- package/dist/{chunk-3SV2EPMN.js → chunk-WJDYZP3U.js} +5 -5
- package/dist/chunk-WJDYZP3U.js.map +1 -0
- package/dist/{chunk-GULTLPFB.js → chunk-XGVDLQJE.js} +3 -3
- package/dist/{chunk-YJV2UZ7H.js → chunk-XULHFSHO.js} +5 -5
- package/dist/{chunk-S6Q37VGE.js → chunk-XW7NWO4A.js} +2 -2
- package/dist/{chunk-CCOP5XDW.js → chunk-YG2EG6CB.js} +4 -4
- package/dist/{chunk-5OI6BR4H.js → chunk-YGBIBOCR.js} +307 -17
- package/dist/chunk-YGBIBOCR.js.map +1 -0
- package/dist/{chunk-YTGDPCPW.js → chunk-YHPUDB7Q.js} +2 -2
- package/dist/{chunk-UFEVO57O.js → chunk-ZJGZDOQO.js} +6 -6
- package/dist/classified/index.js +5 -5
- package/dist/{classified-marker-WQVIJAW2.js → classified-marker-7S5IEP6Q.js} +3 -3
- package/dist/collection-facade-ENLTJZBT.js +44 -0
- package/dist/{computed-DSMPXG2Y.js → computed-WZNKRLCY.js} +3 -3
- package/dist/consent/index.js +9 -9
- package/dist/cover-B5MY43CK.js +36 -0
- package/dist/{dead-filter-2A7IAJ3D.js → dead-filter-KRRD57MR.js} +2 -2
- package/dist/delegation-UT76AQIG.js +25 -0
- package/dist/derivations/index.js +12 -12
- package/dist/derive-SGRCCKVP.js +21 -0
- package/dist/{enclave-7MW6ZGXW.js → enclave-YFKA3GJT.js} +9 -9
- package/dist/executor-TEZYRDN3.js +9 -0
- package/dist/executor-WQQRU6DO.js +9 -0
- package/dist/executor-YORMIBWV.js +26 -0
- package/dist/export-accessible-HXMKW5LJ.js +23 -0
- package/dist/extract-partition-QGQ2R42J.js +38 -0
- package/dist/{fanout-sidecar-WDYQ77VB.js → fanout-sidecar-HJV3A7PM.js} +9 -9
- package/dist/find-VV6PBIHK.js +11 -0
- package/dist/forget/index.js +9 -9
- package/dist/guards/index.js +6 -6
- package/dist/history/index.js +12 -12
- package/dist/i18n/index.js +14 -14
- package/dist/index.d.ts +6 -4
- package/dist/index.js +173 -192
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +2 -2
- package/dist/issue-7JJ4Z7E2.js +19 -0
- package/dist/kernel/enclave/index.d.ts +1 -1
- package/dist/kernel/errors.d.ts +19 -0
- package/dist/kernel/noydb.d.ts +13 -7
- package/dist/kernel/types.d.ts +20 -17
- package/dist/kernel/vault.d.ts +0 -4
- package/dist/{ledger-33BC4TR7.js → ledger-SW6QQOAV.js} +11 -11
- package/dist/liberate-FK7JI2QX.js +24 -0
- package/dist/{link-set-QK22TDEX.js → link-set-GNGGCFI4.js} +11 -11
- package/dist/materialized-views/index.js +19 -19
- package/dist/noydb-KUX2TJMX.js +70 -0
- package/dist/on/index.js +9 -9
- package/dist/overlay-views/index.js +4 -4
- package/dist/periods/index.js +13 -13
- package/dist/pod/index.js +27 -12
- package/dist/{policy-NAHB2TUT.js → policy-EAXSJNOT.js} +5 -5
- package/dist/portability/index.js +8 -8
- package/dist/{post-register-JVTMJ6OW.js → post-register-A7HCFBP5.js} +6 -6
- package/dist/query/index.js +6 -6
- package/dist/register-YBMRLZLO.js +23 -0
- package/dist/registry-3LXKNXWI.js +9 -0
- package/dist/registry-4V4YQCXJ.js +19 -0
- package/dist/registry-ZULMLCJK.js +18 -0
- package/dist/request-withdrawal-SEVUEUDG.js +31 -0
- package/dist/{reveal-LGBOM2BO.js → reveal-PB3YG544.js} +6 -6
- package/dist/revoke-5QULL5GT.js +24 -0
- package/dist/satellites/index.js +1 -1
- package/dist/sealed-record/index.js +12 -12
- package/dist/{seed-PWK45HDF.js → seed-EKF4DIBB.js} +11 -11
- package/dist/session/index.js +9 -9
- package/dist/shadow/index.js +2 -2
- package/dist/signer-ZMH35FT4.js +25 -0
- package/dist/snapshots/index.js +10 -10
- package/dist/{stale-FJED42DM.js → stale-4UNPHWOU.js} +10 -10
- package/dist/storage-QOZKQMID.js +23 -0
- package/dist/{store-coordination-provider-APODTV4W.js → store-coordination-provider-3AELCZ4Y.js} +3 -3
- package/dist/sync/index.js +10 -10
- package/dist/team/index.js +29 -29
- package/dist/tiers/index.js +10 -10
- package/dist/to/index.js +1 -1
- package/dist/tx/index.js +3 -3
- package/dist/util/index.js +1 -1
- package/dist/{verify-26Y5GNMK.js → verify-MXN66IIH.js} +5 -5
- package/dist/via/blob/active.d.ts +29 -2
- package/dist/via/blob/index.d.ts +4 -0
- package/dist/{walk-XS3PKM6I.js → walk-H4YE52S2.js} +11 -11
- package/dist/with/index.js +11 -11
- package/dist/with-audit/forget/index.d.ts +2 -1
- package/dist/with-audit/periods/vault-facade.d.ts +6 -0
- package/dist/with-audit/tiers/index.d.ts +1 -0
- package/dist/{legacy/kernel.d.ts → with-cargo/floor.d.ts} +1 -1
- package/dist/with-cargo/index.d.ts +8 -1
- package/dist/with-formula/derivations/index.d.ts +2 -0
- package/dist/with-formula/materialized-views/index.d.ts +1 -0
- package/dist/with-lookup/aggregate/reducers.d.ts +1 -2
- package/dist/with-party/broker/index.d.ts +1 -0
- package/dist/with-party/directory/cover/index.d.ts +0 -5
- package/dist/with-party/directory/cover/schema.d.ts +0 -6
- package/dist/with-party/directory/cover/storage.d.ts +0 -8
- package/dist/with-party/directory/cover/types.d.ts +0 -21
- package/dist/with-party/team/keyring.d.ts +2 -2
- package/dist/with-pod/bundle.d.ts +0 -2
- package/dist/with-pod/index.d.ts +2 -1
- package/dist/with-shape/blobs/blob-compaction.d.ts +43 -3
- package/dist/with-shape/blobs/blob-pinning.d.ts +112 -0
- package/dist/with-shape/blobs/blob-set.d.ts +85 -1
- package/dist/withdraw-accessible-HPOVNG2G.js +28 -0
- package/package.json +5 -8
- package/dist/api-IQFZJSQO.js +0 -20
- package/dist/bundle/index.js +0 -105
- package/dist/chunk-2P7EGNKF.js.map +0 -1
- package/dist/chunk-3PF6CRDT.js.map +0 -1
- package/dist/chunk-3SV2EPMN.js.map +0 -1
- package/dist/chunk-5OI6BR4H.js.map +0 -1
- package/dist/chunk-7O3AYBC7.js.map +0 -1
- package/dist/chunk-CHFZDSE4.js +0 -1
- package/dist/chunk-GVZQ4NAM.js +0 -14
- package/dist/chunk-GVZQ4NAM.js.map +0 -1
- package/dist/chunk-TAGR72IR.js.map +0 -1
- package/dist/chunk-W2OG6JOL.js.map +0 -1
- package/dist/collection-facade-MJXSC3Q6.js +0 -44
- package/dist/cover-B5SJDHR3.js +0 -52
- package/dist/delegation-A5A75KQO.js +0 -25
- package/dist/derive-HJSMH7RA.js +0 -21
- package/dist/executor-AXE4XMLT.js +0 -26
- package/dist/executor-KGNLJD6M.js +0 -9
- package/dist/executor-XGIS6CR7.js +0 -9
- package/dist/export-accessible-VVBJM3MM.js +0 -23
- package/dist/extract-partition-LGGBTQET.js +0 -38
- package/dist/find-YS6XWB46.js +0 -11
- package/dist/issue-LSR5PS6H.js +0 -19
- package/dist/legacy/bundle.d.ts +0 -30
- package/dist/liberate-GBSAYLPJ.js +0 -24
- package/dist/noydb-MTUBMWFE.js +0 -70
- package/dist/register-X462DNDM.js +0 -23
- package/dist/registry-3XMCT7MQ.js +0 -18
- package/dist/registry-KHD2I3M2.js +0 -19
- package/dist/registry-NPOWJHC4.js +0 -9
- package/dist/request-withdrawal-U7K3JTMY.js +0 -31
- package/dist/revoke-OCWDSWRQ.js +0 -24
- package/dist/signer-3YFBLZRN.js +0 -25
- package/dist/storage-W3GURVFU.js +0 -23
- package/dist/withdraw-accessible-Y3B2535F.js +0 -28
- package/dist/withdraw-accessible-Y3B2535F.js.map +0 -1
- /package/dist/{api-IQFZJSQO.js.map → api-UPAT2O3M.js.map} +0 -0
- /package/dist/{backup-LU2DTZTI.js.map → backup-JL2GOTYQ.js.map} +0 -0
- /package/dist/{chunk-QDPZWTN2.js.map → chunk-25G7U6RD.js.map} +0 -0
- /package/dist/{chunk-GQNGCEP5.js.map → chunk-25ZDB25Z.js.map} +0 -0
- /package/dist/{chunk-5WZXVULX.js.map → chunk-2ITLQZV5.js.map} +0 -0
- /package/dist/{chunk-WNGGJWF7.js.map → chunk-2JZ763FV.js.map} +0 -0
- /package/dist/{chunk-3U3FBR7O.js.map → chunk-2RMDVWGB.js.map} +0 -0
- /package/dist/{chunk-VAIS3SOM.js.map → chunk-2U7Y7BNJ.js.map} +0 -0
- /package/dist/{chunk-MQ6WOPSY.js.map → chunk-2VUISNGP.js.map} +0 -0
- /package/dist/{bundle/index.js.map → chunk-2YELV6TV.js.map} +0 -0
- /package/dist/{chunk-2MUZ3LY6.js.map → chunk-3O62PVDW.js.map} +0 -0
- /package/dist/{chunk-KUPKLSX5.js.map → chunk-3XVOLB75.js.map} +0 -0
- /package/dist/{chunk-6HY2X62D.js.map → chunk-5BB3N4KU.js.map} +0 -0
- /package/dist/{chunk-6NQMXTYC.js.map → chunk-5OZCCLNC.js.map} +0 -0
- /package/dist/{chunk-HOONYZY2.js.map → chunk-5P5AAXYA.js.map} +0 -0
- /package/dist/{chunk-T6GU5PPZ.js.map → chunk-5SZ24DL5.js.map} +0 -0
- /package/dist/{chunk-PK6QCH2C.js.map → chunk-7B4GPCX7.js.map} +0 -0
- /package/dist/{chunk-G6EQYAL6.js.map → chunk-AFBJHD55.js.map} +0 -0
- /package/dist/{chunk-LB6OH6K2.js.map → chunk-BCOKZC4B.js.map} +0 -0
- /package/dist/{chunk-IRQY7IR5.js.map → chunk-BZEPJJOK.js.map} +0 -0
- /package/dist/{chunk-GYYCX5K6.js.map → chunk-BZK6JEX4.js.map} +0 -0
- /package/dist/{chunk-7CI6CP7Z.js.map → chunk-CCT4WZI6.js.map} +0 -0
- /package/dist/{chunk-VEALDPHW.js.map → chunk-CGPO3ZYB.js.map} +0 -0
- /package/dist/{chunk-S3BFKGET.js.map → chunk-DEQ2JTBR.js.map} +0 -0
- /package/dist/{chunk-3ELCWU56.js.map → chunk-E2R5NRZD.js.map} +0 -0
- /package/dist/{chunk-BOKIKJJB.js.map → chunk-EDC6MLXV.js.map} +0 -0
- /package/dist/{chunk-JZWWLLVY.js.map → chunk-EW4HFWGJ.js.map} +0 -0
- /package/dist/{chunk-2IALOXZS.js.map → chunk-F4COUZLL.js.map} +0 -0
- /package/dist/{chunk-JRBNCUNT.js.map → chunk-FLHOTGOO.js.map} +0 -0
- /package/dist/{chunk-6XE5TMPR.js.map → chunk-GBEXTC6Z.js.map} +0 -0
- /package/dist/{chunk-N55W7KUL.js.map → chunk-GS3Q2KOZ.js.map} +0 -0
- /package/dist/{chunk-A5BDDEXK.js.map → chunk-GU5AYA2Q.js.map} +0 -0
- /package/dist/{chunk-M75ZZHSR.js.map → chunk-GYB2QK5H.js.map} +0 -0
- /package/dist/{chunk-6B4DYGWO.js.map → chunk-GZ2GKOF6.js.map} +0 -0
- /package/dist/{chunk-VCBHAE4R.js.map → chunk-H4SMS4O2.js.map} +0 -0
- /package/dist/{chunk-MTQPRQHB.js.map → chunk-HGVFJL63.js.map} +0 -0
- /package/dist/{chunk-UNCOC7QH.js.map → chunk-HKR25MGX.js.map} +0 -0
- /package/dist/{chunk-F6T6L2UK.js.map → chunk-IGAIOGCN.js.map} +0 -0
- /package/dist/{chunk-GWKAVKHI.js.map → chunk-ITI3SJRB.js.map} +0 -0
- /package/dist/{chunk-RTEK4C4I.js.map → chunk-IUIVDVXM.js.map} +0 -0
- /package/dist/{chunk-UBNCR3YK.js.map → chunk-IZX3WZBF.js.map} +0 -0
- /package/dist/{chunk-RDXW3OBQ.js.map → chunk-J3VW4J4E.js.map} +0 -0
- /package/dist/{chunk-BMQWTQZ4.js.map → chunk-J6U4BOKP.js.map} +0 -0
- /package/dist/{chunk-KUIB4B5Q.js.map → chunk-JA5B3SLH.js.map} +0 -0
- /package/dist/{chunk-4BRCIYFG.js.map → chunk-JA5O7UEZ.js.map} +0 -0
- /package/dist/{chunk-6HPG2YNX.js.map → chunk-JKWNG3TM.js.map} +0 -0
- /package/dist/{chunk-RM2XV574.js.map → chunk-JLHKBAFY.js.map} +0 -0
- /package/dist/{chunk-ISMV2QVG.js.map → chunk-KMONEHDJ.js.map} +0 -0
- /package/dist/{chunk-ZEQWCBCM.js.map → chunk-KR5EGWI4.js.map} +0 -0
- /package/dist/{chunk-JBBSYJHP.js.map → chunk-KVHWEPT2.js.map} +0 -0
- /package/dist/{chunk-2PCAVW2I.js.map → chunk-L4OA7G5T.js.map} +0 -0
- /package/dist/{chunk-IY23KFNZ.js.map → chunk-LLVW4V7R.js.map} +0 -0
- /package/dist/{chunk-N6WF5PKC.js.map → chunk-M25ZIEB2.js.map} +0 -0
- /package/dist/{chunk-UC2ETWF3.js.map → chunk-MSO2C3KG.js.map} +0 -0
- /package/dist/{chunk-ONTBCHCP.js.map → chunk-N4FZ6ITM.js.map} +0 -0
- /package/dist/{chunk-DRWBEDYO.js.map → chunk-NM4LVUXH.js.map} +0 -0
- /package/dist/{chunk-HPUWOVR7.js.map → chunk-NOT7XA7Q.js.map} +0 -0
- /package/dist/{chunk-RA5VTXXG.js.map → chunk-OGFPMCSP.js.map} +0 -0
- /package/dist/{chunk-T36RFODW.js.map → chunk-OOTTXUNV.js.map} +0 -0
- /package/dist/{chunk-OF75ACKS.js.map → chunk-OVFCAS7U.js.map} +0 -0
- /package/dist/{chunk-KWVJAOIN.js.map → chunk-OWE4BNTM.js.map} +0 -0
- /package/dist/{chunk-DVUZMT2W.js.map → chunk-PEY6ZTCF.js.map} +0 -0
- /package/dist/{chunk-SMGEYW6G.js.map → chunk-QAFWRGVD.js.map} +0 -0
- /package/dist/{chunk-TOPYT5U5.js.map → chunk-QCUH2G77.js.map} +0 -0
- /package/dist/{chunk-CBSY2N76.js.map → chunk-QDNVHA2F.js.map} +0 -0
- /package/dist/{chunk-WEYZTLXN.js.map → chunk-QXPOEAKR.js.map} +0 -0
- /package/dist/{chunk-BGK233EA.js.map → chunk-QYJIOWKN.js.map} +0 -0
- /package/dist/{chunk-O7WJ47EF.js.map → chunk-SN75YVM5.js.map} +0 -0
- /package/dist/{chunk-JVBO4SZL.js.map → chunk-STR7WBOB.js.map} +0 -0
- /package/dist/{chunk-DDHM2TLX.js.map → chunk-T7S4V52L.js.map} +0 -0
- /package/dist/{chunk-LOF2W3JU.js.map → chunk-UBF7HTOR.js.map} +0 -0
- /package/dist/{chunk-RND5ZPNP.js.map → chunk-UEO5CHOP.js.map} +0 -0
- /package/dist/{chunk-EGCRBCNA.js.map → chunk-V3YB7RGR.js.map} +0 -0
- /package/dist/{chunk-IM3QVF53.js.map → chunk-V7RGFJ3Z.js.map} +0 -0
- /package/dist/{chunk-SMIRGMS7.js.map → chunk-VEX6G3YL.js.map} +0 -0
- /package/dist/{chunk-PT37L5DV.js.map → chunk-WEC3JGBA.js.map} +0 -0
- /package/dist/{chunk-GULTLPFB.js.map → chunk-XGVDLQJE.js.map} +0 -0
- /package/dist/{chunk-YJV2UZ7H.js.map → chunk-XULHFSHO.js.map} +0 -0
- /package/dist/{chunk-S6Q37VGE.js.map → chunk-XW7NWO4A.js.map} +0 -0
- /package/dist/{chunk-CCOP5XDW.js.map → chunk-YG2EG6CB.js.map} +0 -0
- /package/dist/{chunk-YTGDPCPW.js.map → chunk-YHPUDB7Q.js.map} +0 -0
- /package/dist/{chunk-UFEVO57O.js.map → chunk-ZJGZDOQO.js.map} +0 -0
- /package/dist/{classified-marker-WQVIJAW2.js.map → classified-marker-7S5IEP6Q.js.map} +0 -0
- /package/dist/{chunk-CHFZDSE4.js.map → collection-facade-ENLTJZBT.js.map} +0 -0
- /package/dist/{collection-facade-MJXSC3Q6.js.map → computed-WZNKRLCY.js.map} +0 -0
- /package/dist/{computed-DSMPXG2Y.js.map → cover-B5MY43CK.js.map} +0 -0
- /package/dist/{dead-filter-2A7IAJ3D.js.map → dead-filter-KRRD57MR.js.map} +0 -0
- /package/dist/{cover-B5SJDHR3.js.map → delegation-UT76AQIG.js.map} +0 -0
- /package/dist/{delegation-A5A75KQO.js.map → derive-SGRCCKVP.js.map} +0 -0
- /package/dist/{derive-HJSMH7RA.js.map → enclave-YFKA3GJT.js.map} +0 -0
- /package/dist/{enclave-7MW6ZGXW.js.map → executor-TEZYRDN3.js.map} +0 -0
- /package/dist/{executor-AXE4XMLT.js.map → executor-WQQRU6DO.js.map} +0 -0
- /package/dist/{executor-KGNLJD6M.js.map → executor-YORMIBWV.js.map} +0 -0
- /package/dist/{executor-XGIS6CR7.js.map → export-accessible-HXMKW5LJ.js.map} +0 -0
- /package/dist/{export-accessible-VVBJM3MM.js.map → extract-partition-QGQ2R42J.js.map} +0 -0
- /package/dist/{fanout-sidecar-WDYQ77VB.js.map → fanout-sidecar-HJV3A7PM.js.map} +0 -0
- /package/dist/{extract-partition-LGGBTQET.js.map → find-VV6PBIHK.js.map} +0 -0
- /package/dist/{find-YS6XWB46.js.map → issue-7JJ4Z7E2.js.map} +0 -0
- /package/dist/{issue-LSR5PS6H.js.map → ledger-SW6QQOAV.js.map} +0 -0
- /package/dist/{ledger-33BC4TR7.js.map → liberate-FK7JI2QX.js.map} +0 -0
- /package/dist/{liberate-GBSAYLPJ.js.map → link-set-GNGGCFI4.js.map} +0 -0
- /package/dist/{link-set-QK22TDEX.js.map → noydb-KUX2TJMX.js.map} +0 -0
- /package/dist/{noydb-MTUBMWFE.js.map → policy-EAXSJNOT.js.map} +0 -0
- /package/dist/{post-register-JVTMJ6OW.js.map → post-register-A7HCFBP5.js.map} +0 -0
- /package/dist/{policy-NAHB2TUT.js.map → register-YBMRLZLO.js.map} +0 -0
- /package/dist/{register-X462DNDM.js.map → registry-3LXKNXWI.js.map} +0 -0
- /package/dist/{registry-3XMCT7MQ.js.map → registry-4V4YQCXJ.js.map} +0 -0
- /package/dist/{registry-KHD2I3M2.js.map → registry-ZULMLCJK.js.map} +0 -0
- /package/dist/{registry-NPOWJHC4.js.map → request-withdrawal-SEVUEUDG.js.map} +0 -0
- /package/dist/{reveal-LGBOM2BO.js.map → reveal-PB3YG544.js.map} +0 -0
- /package/dist/{request-withdrawal-U7K3JTMY.js.map → revoke-5QULL5GT.js.map} +0 -0
- /package/dist/{seed-PWK45HDF.js.map → seed-EKF4DIBB.js.map} +0 -0
- /package/dist/{revoke-OCWDSWRQ.js.map → signer-ZMH35FT4.js.map} +0 -0
- /package/dist/{signer-3YFBLZRN.js.map → stale-4UNPHWOU.js.map} +0 -0
- /package/dist/{stale-FJED42DM.js.map → storage-QOZKQMID.js.map} +0 -0
- /package/dist/{store-coordination-provider-APODTV4W.js.map → store-coordination-provider-3AELCZ4Y.js.map} +0 -0
- /package/dist/{verify-26Y5GNMK.js.map → verify-MXN66IIH.js.map} +0 -0
- /package/dist/{walk-XS3PKM6I.js.map → walk-H4YE52S2.js.map} +0 -0
- /package/dist/{storage-W3GURVFU.js.map → withdraw-accessible-HPOVNG2G.js.map} +0 -0
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
IllegalTransitionError,
|
|
3
3
|
RecordLockedError,
|
|
4
4
|
ValidationError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IGM563N5.js";
|
|
6
6
|
|
|
7
7
|
// src/with-audit/guards/with-guard.ts
|
|
8
8
|
function withGuard(strategy) {
|
|
@@ -120,4 +120,4 @@ export {
|
|
|
120
120
|
immutableGuard,
|
|
121
121
|
transitionGuard
|
|
122
122
|
};
|
|
123
|
-
//# sourceMappingURL=chunk-
|
|
123
|
+
//# sourceMappingURL=chunk-5OZCCLNC.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
DecryptionError,
|
|
3
3
|
InvalidKeyError,
|
|
4
4
|
TamperedError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IGM563N5.js";
|
|
6
6
|
|
|
7
7
|
// src/kernel/enclave/crypto.ts
|
|
8
8
|
var PBKDF2_ITERATIONS = 6e5;
|
|
@@ -401,4 +401,4 @@ export {
|
|
|
401
401
|
bufferToBase64,
|
|
402
402
|
base64ToBuffer
|
|
403
403
|
};
|
|
404
|
-
//# sourceMappingURL=chunk-
|
|
404
|
+
//# sourceMappingURL=chunk-5P5AAXYA.js.map
|
|
@@ -201,7 +201,7 @@ var engineCtx = (ctx) => ({
|
|
|
201
201
|
function withClassified() {
|
|
202
202
|
return {
|
|
203
203
|
async reveal(ctx, id, field) {
|
|
204
|
-
const { revealSealedField } = await import("./reveal-
|
|
204
|
+
const { revealSealedField } = await import("./reveal-PB3YG544.js");
|
|
205
205
|
const value = await revealSealedField({
|
|
206
206
|
collection: ctx.collection,
|
|
207
207
|
encrypted: ctx.encrypted,
|
|
@@ -213,26 +213,26 @@ function withClassified() {
|
|
|
213
213
|
return value;
|
|
214
214
|
},
|
|
215
215
|
async verify(ctx, id, field, candidate) {
|
|
216
|
-
const { verifyDigestField } = await import("./verify-
|
|
216
|
+
const { verifyDigestField } = await import("./verify-MXN66IIH.js");
|
|
217
217
|
const verdict = await verifyDigestField(engineCtx(ctx), id, field, candidate, policyOf(ctx.spec));
|
|
218
218
|
await ctx.onAccess?.("verify", id);
|
|
219
219
|
return verdict;
|
|
220
220
|
},
|
|
221
221
|
async verifyText(ctx, id, field, candidate) {
|
|
222
|
-
const { verifyTextField } = await import("./verify-
|
|
222
|
+
const { verifyTextField } = await import("./verify-MXN66IIH.js");
|
|
223
223
|
const verdict = await verifyTextField(engineCtx(ctx), id, field, candidate, ctx.spec.verifyNormalize ?? "password");
|
|
224
224
|
await ctx.onAccess?.("verify", id);
|
|
225
225
|
return verdict;
|
|
226
226
|
},
|
|
227
227
|
async matchGroup(ctx, id, answers, opts) {
|
|
228
|
-
const { matchGroupFields } = await import("./verify-
|
|
228
|
+
const { matchGroupFields } = await import("./verify-MXN66IIH.js");
|
|
229
229
|
const members = (ctx.groupMembers ?? []).map((m) => ({ field: m.field, policy: policyOf(m.spec) }));
|
|
230
230
|
const result = await matchGroupFields(engineCtx(ctx), id, answers, members, opts);
|
|
231
231
|
await ctx.onAccess?.("verify", id);
|
|
232
232
|
return result;
|
|
233
233
|
},
|
|
234
234
|
async computeTarget(ctx, field, candidate, costByte) {
|
|
235
|
-
const { computeBidxTarget } = await import("./find-
|
|
235
|
+
const { computeBidxTarget } = await import("./find-VV6PBIHK.js");
|
|
236
236
|
const dek = await ctx.getDEK();
|
|
237
237
|
return computeBidxTarget(candidate, policyOf(ctx.spec).normalize, dek, ctx.collection, field, costByte);
|
|
238
238
|
}
|
|
@@ -244,4 +244,4 @@ export {
|
|
|
244
244
|
classified,
|
|
245
245
|
withClassified
|
|
246
246
|
};
|
|
247
|
-
//# sourceMappingURL=chunk-
|
|
247
|
+
//# sourceMappingURL=chunk-5SZ24DL5.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openEnvelopeJson
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PEY6ZTCF.js";
|
|
4
4
|
import {
|
|
5
5
|
encrypt
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5P5AAXYA.js";
|
|
7
7
|
import {
|
|
8
8
|
NOYDB_FORMAT_VERSION
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5BHNQNBI.js";
|
|
10
10
|
import {
|
|
11
11
|
ConflictError,
|
|
12
12
|
USER_ENVELOPE_COLLECTION,
|
|
13
13
|
USER_ENVELOPE_MAX_BYTES,
|
|
14
14
|
UserEnvelopeOversizedError
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-IGM563N5.js";
|
|
16
16
|
|
|
17
17
|
// src/with-party/directory/storage.ts
|
|
18
18
|
var META_COLLECTION = "_meta";
|
|
@@ -147,4 +147,4 @@ export {
|
|
|
147
147
|
deleteUserEnvelope,
|
|
148
148
|
listUserEnvelopeIds
|
|
149
149
|
};
|
|
150
|
-
//# sourceMappingURL=chunk-
|
|
150
|
+
//# sourceMappingURL=chunk-7B4GPCX7.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openEnvelopeJson
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PEY6ZTCF.js";
|
|
4
4
|
import {
|
|
5
5
|
encrypt
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5P5AAXYA.js";
|
|
7
7
|
import {
|
|
8
8
|
NOYDB_FORMAT_VERSION
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5BHNQNBI.js";
|
|
10
10
|
import {
|
|
11
11
|
ConflictError
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-IGM563N5.js";
|
|
13
13
|
|
|
14
14
|
// src/with-audit/attestation/signer.ts
|
|
15
15
|
import { generateDocSigningKeyPair } from "@noy-db/attestation";
|
|
@@ -56,4 +56,4 @@ export {
|
|
|
56
56
|
loadSigner,
|
|
57
57
|
loadOrCreateSigner
|
|
58
58
|
};
|
|
59
|
-
//# sourceMappingURL=chunk-
|
|
59
|
+
//# sourceMappingURL=chunk-AFBJHD55.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NOYDB_FORMAT_VERSION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5BHNQNBI.js";
|
|
4
4
|
|
|
5
5
|
// src/with-party/team/managed-passphrase.ts
|
|
6
6
|
var MemorySealingKeyProvider = class {
|
|
@@ -227,4 +227,4 @@ export {
|
|
|
227
227
|
loadSealedPassphrase,
|
|
228
228
|
resolveManagedSecret
|
|
229
229
|
};
|
|
230
|
-
//# sourceMappingURL=chunk-
|
|
230
|
+
//# sourceMappingURL=chunk-BCOKZC4B.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NOYDB_FORMAT_VERSION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5BHNQNBI.js";
|
|
4
4
|
import {
|
|
5
5
|
ValidationError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IGM563N5.js";
|
|
7
7
|
|
|
8
8
|
// src/with-party/directory/cover/custom.ts
|
|
9
9
|
var CUSTOM_KEY_PATTERN = /^[a-z0-9]+([.-][a-z0-9]+)+$/i;
|
|
@@ -172,8 +172,6 @@ function isCover(x) {
|
|
|
172
172
|
const obj = x;
|
|
173
173
|
return obj["_noydb_public"] === 1 && typeof obj["version"] === "number";
|
|
174
174
|
}
|
|
175
|
-
var validatePublicEnvelopeInput = validateCoverInput;
|
|
176
|
-
var isPublicEnvelope = isCover;
|
|
177
175
|
|
|
178
176
|
// src/with-party/directory/cover/storage.ts
|
|
179
177
|
var COVER_RECORD_ID = "public-envelope";
|
|
@@ -222,27 +220,17 @@ function pickLocale(value, locale, defaultLocale) {
|
|
|
222
220
|
}
|
|
223
221
|
return "";
|
|
224
222
|
}
|
|
225
|
-
var PUBLIC_ENVELOPE_RECORD_ID = COVER_RECORD_ID;
|
|
226
|
-
var loadPublicEnvelope = loadCover;
|
|
227
|
-
var savePublicEnvelope = saveCover;
|
|
228
|
-
var readPublicEnvelope = readCover;
|
|
229
223
|
|
|
230
224
|
export {
|
|
231
225
|
mergeCustom,
|
|
232
226
|
validateCoverSize,
|
|
233
227
|
validateCoverInput,
|
|
234
228
|
isCover,
|
|
235
|
-
validatePublicEnvelopeInput,
|
|
236
|
-
isPublicEnvelope,
|
|
237
229
|
COVER_RECORD_ID,
|
|
238
230
|
loadCover,
|
|
239
231
|
saveCover,
|
|
240
232
|
readCover,
|
|
241
233
|
resolveLocale,
|
|
242
|
-
pickLocale
|
|
243
|
-
PUBLIC_ENVELOPE_RECORD_ID,
|
|
244
|
-
loadPublicEnvelope,
|
|
245
|
-
savePublicEnvelope,
|
|
246
|
-
readPublicEnvelope
|
|
234
|
+
pickLocale
|
|
247
235
|
};
|
|
248
|
-
//# sourceMappingURL=chunk-
|
|
236
|
+
//# sourceMappingURL=chunk-BVZGNMVM.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/with-party/directory/cover/custom.ts","../src/with-party/directory/cover/schema.ts","../src/with-party/directory/cover/storage.ts"],"sourcesContent":["/**\n * The cover's namespaced `custom` extension slot (#800) — input\n * validation, the namespace-level patch merge, and the post-merge\n * size caps.\n *\n * Like everything on the cover, `custom` is plaintext, public by\n * design, and unauthenticated — payloads are hints (display defaults,\n * routing suggestions, registry pointers), never an input to\n * security, authorization, or data-integrity decisions.\n *\n * @see https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/public-envelope.md\n *\n * @module\n */\nimport { ValidationError } from '../../../kernel/errors.js'\nimport type { Cover, JsonValue, ResolvedCoverSchema } from './types.js'\n\n/**\n * Namespace keys must be reverse-DNS or package-style identifiers —\n * at least one dot/dash-separated segment (`noydb.viewer`,\n * `com.acme.registry` pass; a bare `config` fails), so two frameworks\n * can't collide on a bare word.\n */\nconst CUSTOM_KEY_PATTERN = /^[a-z0-9]+([.-][a-z0-9]+)+$/i\n\n/** Maximum nesting depth of a namespace payload (containers, not leaves). */\nconst MAX_CUSTOM_DEPTH = 8\n\n/**\n * Validate the owner-supplied `custom` input: the field must be a\n * plain object, every key must match {@link CUSTOM_KEY_PATTERN}, and\n * every value must be JSON-serializable (no functions, `undefined`,\n * symbols, bigints, or cycles) within the depth cap. `null` is\n * accepted — it is the delete-this-namespace directive and never\n * persists. Throws `ValidationError` on the first violation.\n */\nexport function validateCustomInput(custom: Record<string, JsonValue>): void {\n if (custom === null || typeof custom !== 'object' || Array.isArray(custom)) {\n throw new ValidationError(\n `setCover: custom must be a { [namespace]: value } object, got ${\n Array.isArray(custom) ? 'array' : typeof custom\n }.`,\n )\n }\n for (const [ns, value] of Object.entries(custom)) {\n if (!CUSTOM_KEY_PATTERN.test(ns)) {\n throw new ValidationError(\n `setCover: custom namespace \"${ns}\" is invalid. Keys must be ` +\n 'reverse-DNS or package-style identifiers with at least one ' +\n 'dot/dash-separated segment (e.g. \"noydb.viewer\", \"com.acme.registry\").',\n )\n }\n assertJsonValue(value, ns, 1, new Set())\n }\n}\n\nfunction assertJsonValue(\n value: unknown,\n ns: string,\n depth: number,\n seen: Set<object>,\n): void {\n if (value === null) return\n const t = typeof value\n if (t === 'string' || t === 'number' || t === 'boolean') return\n if (t !== 'object') {\n throw new ValidationError(\n `setCover: custom[\"${ns}\"] contains a non-JSON value (${t}). ` +\n 'Only strings, numbers, booleans, null, arrays, and plain objects are allowed.',\n )\n }\n const container = value as object\n if (seen.has(container)) {\n throw new ValidationError(\n `setCover: custom[\"${ns}\"] contains a circular reference.`,\n )\n }\n if (depth > MAX_CUSTOM_DEPTH) {\n throw new ValidationError(\n `setCover: custom[\"${ns}\"] nests deeper than the ${MAX_CUSTOM_DEPTH}-level cap.`,\n )\n }\n seen.add(container)\n const children = Array.isArray(container) ? container : Object.values(container)\n for (const child of children) {\n assertJsonValue(child, ns, depth + 1, seen)\n }\n seen.delete(container)\n}\n\n/**\n * Namespace-level patch merge for `setCover`: provided namespaces\n * replace their previous value, absent namespaces are preserved, and\n * an explicit `null` deletes that namespace (so `null` never persists\n * as a namespace value). A whole-`custom`-absent patch preserves the\n * previous custom, consistent with the other cover fields. Rationale:\n * framework A must never need read-modify-write of framework B's data.\n *\n * Returns a spreadable fragment — `{ custom }` when the merge leaves\n * at least one namespace, `{}` when it leaves none (the field is\n * dropped from the persisted document rather than stored empty).\n */\nexport function mergeCustom(\n existing: Record<string, JsonValue> | undefined,\n patch: Record<string, JsonValue> | undefined,\n): { custom: Record<string, JsonValue> } | Record<string, never> {\n if (patch === undefined) {\n return existing !== undefined ? { custom: existing } : {}\n }\n const merged: Record<string, JsonValue> = { ...existing }\n for (const [ns, value] of Object.entries(patch)) {\n if (value === null) {\n delete merged[ns]\n } else {\n merged[ns] = value\n }\n }\n return Object.keys(merged).length > 0 ? { custom: merged } : {}\n}\n\n/**\n * Post-merge size caps — validates the WOULD-BE-PERSISTED document\n * (after the namespace merge), so a small patch can't tip the stored\n * cover over a cap unnoticed. `maxCoverBytes` bounds the entire\n * serialized document, which also closes the unbounded locale-map\n * key-count hole for `name` / `description`. Sizes are measured as\n * `JSON.stringify` length. Throws `ValidationError` on violation.\n */\nexport function validateCoverSize(\n cover: Cover,\n schema: ResolvedCoverSchema,\n): void {\n if (cover.custom !== undefined) {\n const customSize = JSON.stringify(cover.custom).length\n if (customSize > schema.maxCustomBytes) {\n throw new ValidationError(\n `setCover: custom exceeds the ${schema.maxCustomBytes}-byte cap ` +\n `(got ${customSize} bytes serialized, after merging with the stored namespaces).`,\n )\n }\n }\n const totalSize = JSON.stringify(cover).length\n if (totalSize > schema.maxCoverBytes) {\n throw new ValidationError(\n `setCover: the cover document exceeds the ${schema.maxCoverBytes}-byte cap ` +\n `(got ${totalSize} bytes serialized).`,\n )\n }\n}\n","/**\n * Validate-on-write for the cover. Runs at every `setCover` call;\n * the developer's schema decides which fields are allowed and the\n * size caps that apply.\n *\n * @module\n */\nimport { ValidationError } from '../../../kernel/errors.js'\nimport { validateCustomInput } from './custom.js'\nimport type {\n Cover,\n CoverText,\n JsonValue,\n ResolvedCoverSchema,\n CoverField,\n} from './types.js'\n\n/** Owner-supplied input — the subset of {@link Cover} the owner can set. */\nexport interface SetCoverInput {\n readonly name?: CoverText\n readonly description?: CoverText\n readonly icon?: string\n readonly defaultLocale?: string\n /**\n * Namespace-level patch for the cover's `custom` slot (#800):\n * provided namespaces replace their previous value, absent\n * namespaces are preserved, an explicit `null` deletes that\n * namespace. Requires `'custom'` in the schema's `fields` list —\n * the `cover: true` shorthand does NOT enable it.\n */\n readonly custom?: Record<string, JsonValue>\n}\n\nconst DATA_URL_PREFIX = /^data:([a-zA-Z0-9.+-]+\\/[a-zA-Z0-9.+-]+);base64,/\n\n/**\n * Validate an owner-supplied cover input against the developer's\n * resolved schema. Throws `ValidationError` on the first violation;\n * returns void on success.\n *\n * The validator is deliberately strict: every fail mode is a hard\n * error rather than a silent drop, so the owner finds out immediately\n * which field they oversized rather than discovering a truncated\n * label months later.\n */\nexport function validateCoverInput(\n input: SetCoverInput,\n schema: ResolvedCoverSchema,\n): void {\n const allowed = new Set<CoverField>(schema.fields)\n\n // Reject any key not in the schema's allowed-field list.\n for (const key of Object.keys(input)) {\n const known: CoverField | undefined =\n key === 'name' || key === 'description' || key === 'icon' || key === 'defaultLocale' || key === 'custom'\n ? key\n : undefined\n if (!known) {\n throw new ValidationError(\n `setCover: unknown field \"${key}\". ` +\n `Allowed fields: ${[...allowed].join(', ')}.`,\n )\n }\n if (!allowed.has(known)) {\n throw new ValidationError(\n `setCover: field \"${known}\" is not enabled in this vault's schema. ` +\n `Allowed fields: ${[...allowed].join(', ')}.`,\n )\n }\n }\n\n if (input.name !== undefined) {\n validateText(input.name, 'name', schema.maxStringChars)\n }\n if (input.description !== undefined) {\n validateText(input.description, 'description', schema.maxStringChars)\n }\n if (input.icon !== undefined) {\n validateIcon(input.icon, schema)\n }\n if (input.defaultLocale !== undefined && typeof input.defaultLocale !== 'string') {\n throw new ValidationError(\n `setCover: defaultLocale must be a string (BCP-47), got ${typeof input.defaultLocale}.`,\n )\n }\n if (input.custom !== undefined) {\n validateCustomInput(input.custom)\n }\n}\n\nfunction validateText(\n value: CoverText,\n field: string,\n maxChars: number,\n): void {\n if (typeof value === 'string') {\n if (value.length > maxChars) {\n throw new ValidationError(\n `setCover: ${field} exceeds the ${maxChars}-character cap (got ${value.length}).`,\n )\n }\n return\n }\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n throw new ValidationError(\n `setCover: ${field} must be a string or { [locale]: string } map, got ${typeof value}.`,\n )\n }\n // Locale map. Each value must be a non-empty string within the cap.\n for (const [locale, str] of Object.entries(value)) {\n if (typeof str !== 'string') {\n throw new ValidationError(\n `setCover: ${field}[${locale}] must be a string, got ${typeof str}.`,\n )\n }\n if (str.length > maxChars) {\n throw new ValidationError(\n `setCover: ${field}[${locale}] exceeds the ${maxChars}-character cap (got ${str.length}).`,\n )\n }\n }\n}\n\nfunction validateIcon(icon: string, schema: ResolvedCoverSchema): void {\n if (typeof icon !== 'string') {\n throw new ValidationError(\n `setCover: icon must be a data: URL string, got ${typeof icon}.`,\n )\n }\n if (icon.length > schema.maxIconBytes) {\n throw new ValidationError(\n `setCover: icon exceeds the ${schema.maxIconBytes}-byte cap (got ${icon.length}).`,\n )\n }\n const m = DATA_URL_PREFIX.exec(icon)\n if (!m) {\n throw new ValidationError(\n 'setCover: icon must be a base64 data URL ' +\n '(`data:image/png;base64,…` or `data:image/svg+xml;base64,…`). ' +\n 'External URLs are not supported in v1.',\n )\n }\n const mime = m[1]!\n if (!schema.iconMimeTypes.includes(mime)) {\n throw new ValidationError(\n `setCover: icon MIME type \"${mime}\" is not allowed. ` +\n `Permitted types: ${schema.iconMimeTypes.join(', ')}.`,\n )\n }\n}\n\n/**\n * Lightweight runtime predicate — used by the bundle header\n * validator to recognise a cover without requiring it. (The wire\n * discriminator keeps its frozen name: `_noydb_public: 1`.)\n */\nexport function isCover(x: unknown): x is Cover {\n if (x === null || typeof x !== 'object' || Array.isArray(x)) return false\n const obj = x as Record<string, unknown>\n return obj['_noydb_public'] === 1 && typeof obj['version'] === 'number'\n}\n\n// ─── Deprecated aliases (#799 public-envelope → cover; remove after one pre-release window) ───\n\n/** @deprecated Use {@link SetCoverInput}. */\nexport type SetPublicEnvelopeInput = SetCoverInput\n/** @deprecated Use {@link validateCoverInput}. */\nexport const validatePublicEnvelopeInput = validateCoverInput\n/** @deprecated Use {@link isCover}. */\nexport const isPublicEnvelope = isCover\n","/**\n * Persistence helpers for `_meta/public-envelope` — the cover's\n * frozen wire location. Mirrors the bypass-AES pattern used by\n * `_meta/handle` and `_meta/policy` — the document is plaintext\n * JSON, the envelope's `_iv` field is left empty.\n *\n * @module\n */\nimport type { NoydbStore, EncryptedEnvelope } from '../../../kernel/types.js'\nimport { NOYDB_FORMAT_VERSION } from '../../../kernel/types.js'\nimport type { Cover } from './types.js'\nimport { isCover } from './schema.js'\n\n/**\n * Reserved id for the vault-level cover record. The VALUE is frozen\n * wire format — the record predates the #799 rename and stays at\n * `_meta/public-envelope` so existing vaults need no migration.\n */\nexport const COVER_RECORD_ID = 'public-envelope'\n\n/**\n * Read the cover from `_meta/public-envelope`. Returns `undefined`\n * when no cover has been persisted (fresh vault, or a vault written\n * before the feature was enabled). Tolerates corrupted documents —\n * a JSON parse failure surfaces as `undefined`, not a thrown error,\n * mirroring `_meta/handle`'s contract.\n */\nexport async function loadCover(\n store: NoydbStore,\n vault: string,\n): Promise<Cover | undefined> {\n const envelope = await store.get(vault, '_meta', COVER_RECORD_ID)\n if (!envelope) return undefined\n try {\n const parsed = JSON.parse(envelope._data) as unknown\n if (!isCover(parsed)) return undefined\n return parsed\n } catch {\n return undefined\n }\n}\n\n/** Persist the cover. Idempotent — overwrites any prior write. */\nexport async function saveCover(\n store: NoydbStore,\n vault: string,\n cover: Cover,\n): Promise<void> {\n const wireEnvelope: EncryptedEnvelope = {\n _noydb: NOYDB_FORMAT_VERSION,\n _v: 1,\n _ts: new Date().toISOString(),\n _iv: '',\n _data: JSON.stringify(cover),\n }\n await store.put(vault, '_meta', COVER_RECORD_ID, wireEnvelope)\n}\n\n/**\n * Public, no-key reader. Plain function, not a method on `Noydb` —\n * the whole point is it works without an authenticated session, so\n * a UI can show \"Acme 2026 Tax Records\" before unlocking.\n *\n * Resolves any `name` / `description` locale map through the supplied\n * `locale` (when provided). Omitting `locale` returns the raw\n * cover, which a multilingual picker can render as it pleases.\n */\nexport async function readCover(\n store: NoydbStore,\n vault: string,\n opts: { readonly locale?: string } = {},\n): Promise<Cover | undefined> {\n const raw = await loadCover(store, vault)\n if (!raw) return undefined\n if (opts.locale === undefined) return raw\n return resolveLocale(raw, opts.locale)\n}\n\n/**\n * Resolve the locale-map fields (`name`, `description`) of a cover\n * to plain strings for the requested locale, falling back through\n * `defaultLocale` and then any available translation.\n *\n * @internal\n */\nexport function resolveLocale(\n cover: Cover,\n locale: string,\n): Cover {\n return {\n ...cover,\n ...(cover.name !== undefined ? { name: pickLocale(cover.name, locale, cover.defaultLocale) } : {}),\n ...(cover.description !== undefined ? { description: pickLocale(cover.description, locale, cover.defaultLocale) } : {}),\n }\n}\n\n/**\n * Resolve a `string | { [locale]: string }` value to a string for a\n * given locale. Exported so the bundle reader can reuse it without\n * duplicating the fallback chain.\n *\n * **Looser than `resolveI18nText`** — the hub's record-field resolver\n * throws `LocaleNotSpecifiedError` when no translation matches, but\n * label semantics deliberately prefer \"show *something*\" over\n * throwing. The fallback chain is:\n * 1. Exact `locale` match.\n * 2. `defaultLocale` (when supplied on the cover).\n * 3. First non-empty value in the map.\n * 4. Empty string (only if every translation is empty — pathological).\n *\n * This deviation is documented in `https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/public-envelope.md`.\n */\nexport function pickLocale(\n value: string | Record<string, string>,\n locale: string,\n defaultLocale: string | undefined,\n): string {\n if (typeof value === 'string') return value\n if (value[locale] !== undefined && value[locale] !== '') return value[locale]\n if (defaultLocale && value[defaultLocale] !== undefined && value[defaultLocale] !== '') {\n return value[defaultLocale]\n }\n for (const v of Object.values(value)) {\n if (v !== '') return v\n }\n return ''\n}\n\n// ─── Deprecated aliases (#799 public-envelope → cover; remove after one pre-release window) ───\n\n/** @deprecated Use {@link COVER_RECORD_ID}. */\nexport const PUBLIC_ENVELOPE_RECORD_ID = COVER_RECORD_ID\n/** @deprecated Use {@link loadCover}. */\nexport const loadPublicEnvelope = loadCover\n/** @deprecated Use {@link saveCover}. */\nexport const savePublicEnvelope = saveCover\n/** @deprecated Use {@link readCover}. */\nexport const readPublicEnvelope = readCover\n"],"mappings":";;;;;;;;AAuBA,IAAM,qBAAqB;AAG3B,IAAM,mBAAmB;AAUlB,SAAS,oBAAoB,QAAyC;AAC3E,MAAI,WAAW,QAAQ,OAAO,WAAW,YAAY,MAAM,QAAQ,MAAM,GAAG;AAC1E,UAAM,IAAI;AAAA,MACR,iEACE,MAAM,QAAQ,MAAM,IAAI,UAAU,OAAO,MA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I,KAAK,WAAW,OAAW,QAAO;AACtC,SAAO,cAAc,KAAK,KAAK,MAAM;AACvC;AASO,SAAS,cACd,OACA,QACO;AACP,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAI,MAAM,SAAS,SAAY,EAAE,MAAM,WAAW,MAAM,MAAM,QAAQ,MAAM,aAAa,EAAE,IAAI,CAAC;AAAA,IAChG,GAAI,MAAM,gBAAgB,SAAY,EAAE,aAAa,WAAW,MAAM,aAAa,QAAQ,MAAM,aAAa,EAAE,IAAI,CAAC;AAAA,EACvH;AACF;AAkBO,SAAS,WACd,OACA,QACA,eACQ;AACR,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,MAAI,MAAM,MAAM,MAAM,UAAa,MAAM,MAAM,MAAM,GAAI,QAAO,MAAM,MAAM;AAC5E,MAAI,iBAAiB,MAAM,aAAa,MAAM,UAAa,MAAM,aAAa,MAAM,IAAI;AACtF,WAAO,MAAM,aAAa;AAAA,EAC5B;AACA,aAAW,KAAK,OAAO,OAAO,KAAK,GAAG;AACpC,QAAI,MAAM,GAAI,QAAO;AAAA,EACvB;AACA,SAAO;AACT;AAKO,IAAM,4BAA4B;AAElC,IAAM,qBAAqB;AAE3B,IAAM,qBAAqB;AAE3B,IAAM,qBAAqB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/with-party/directory/cover/custom.ts","../src/with-party/directory/cover/schema.ts","../src/with-party/directory/cover/storage.ts"],"sourcesContent":["/**\n * The cover's namespaced `custom` extension slot (#800) — input\n * validation, the namespace-level patch merge, and the post-merge\n * size caps.\n *\n * Like everything on the cover, `custom` is plaintext, public by\n * design, and unauthenticated — payloads are hints (display defaults,\n * routing suggestions, registry pointers), never an input to\n * security, authorization, or data-integrity decisions.\n *\n * @see https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/public-envelope.md\n *\n * @module\n */\nimport { ValidationError } from '../../../kernel/errors.js'\nimport type { Cover, JsonValue, ResolvedCoverSchema } from './types.js'\n\n/**\n * Namespace keys must be reverse-DNS or package-style identifiers —\n * at least one dot/dash-separated segment (`noydb.viewer`,\n * `com.acme.registry` pass; a bare `config` fails), so two frameworks\n * can't collide on a bare word.\n */\nconst CUSTOM_KEY_PATTERN = /^[a-z0-9]+([.-][a-z0-9]+)+$/i\n\n/** Maximum nesting depth of a namespace payload (containers, not leaves). */\nconst MAX_CUSTOM_DEPTH = 8\n\n/**\n * Validate the owner-supplied `custom` input: the field must be a\n * plain object, every key must match {@link CUSTOM_KEY_PATTERN}, and\n * every value must be JSON-serializable (no functions, `undefined`,\n * symbols, bigints, or cycles) within the depth cap. `null` is\n * accepted — it is the delete-this-namespace directive and never\n * persists. Throws `ValidationError` on the first violation.\n */\nexport function validateCustomInput(custom: Record<string, JsonValue>): void {\n if (custom === null || typeof custom !== 'object' || Array.isArray(custom)) {\n throw new ValidationError(\n `setCover: custom must be a { [namespace]: value } object, got ${\n Array.isArray(custom) ? 'array' : typeof custom\n }.`,\n )\n }\n for (const [ns, value] of Object.entries(custom)) {\n if (!CUSTOM_KEY_PATTERN.test(ns)) {\n throw new ValidationError(\n `setCover: custom namespace \"${ns}\" is invalid. Keys must be ` +\n 'reverse-DNS or package-style identifiers with at least one ' +\n 'dot/dash-separated segment (e.g. \"noydb.viewer\", \"com.acme.registry\").',\n )\n }\n assertJsonValue(value, ns, 1, new Set())\n }\n}\n\nfunction assertJsonValue(\n value: unknown,\n ns: string,\n depth: number,\n seen: Set<object>,\n): void {\n if (value === null) return\n const t = typeof value\n if (t === 'string' || t === 'number' || t === 'boolean') return\n if (t !== 'object') {\n throw new ValidationError(\n `setCover: custom[\"${ns}\"] contains a non-JSON value (${t}). ` +\n 'Only strings, numbers, booleans, null, arrays, and plain objects are allowed.',\n )\n }\n const container = value as object\n if (seen.has(container)) {\n throw new ValidationError(\n `setCover: custom[\"${ns}\"] contains a circular reference.`,\n )\n }\n if (depth > MAX_CUSTOM_DEPTH) {\n throw new ValidationError(\n `setCover: custom[\"${ns}\"] nests deeper than the ${MAX_CUSTOM_DEPTH}-level cap.`,\n )\n }\n seen.add(container)\n const children = Array.isArray(container) ? container : Object.values(container)\n for (const child of children) {\n assertJsonValue(child, ns, depth + 1, seen)\n }\n seen.delete(container)\n}\n\n/**\n * Namespace-level patch merge for `setCover`: provided namespaces\n * replace their previous value, absent namespaces are preserved, and\n * an explicit `null` deletes that namespace (so `null` never persists\n * as a namespace value). A whole-`custom`-absent patch preserves the\n * previous custom, consistent with the other cover fields. Rationale:\n * framework A must never need read-modify-write of framework B's data.\n *\n * Returns a spreadable fragment — `{ custom }` when the merge leaves\n * at least one namespace, `{}` when it leaves none (the field is\n * dropped from the persisted document rather than stored empty).\n */\nexport function mergeCustom(\n existing: Record<string, JsonValue> | undefined,\n patch: Record<string, JsonValue> | undefined,\n): { custom: Record<string, JsonValue> } | Record<string, never> {\n if (patch === undefined) {\n return existing !== undefined ? { custom: existing } : {}\n }\n const merged: Record<string, JsonValue> = { ...existing }\n for (const [ns, value] of Object.entries(patch)) {\n if (value === null) {\n delete merged[ns]\n } else {\n merged[ns] = value\n }\n }\n return Object.keys(merged).length > 0 ? { custom: merged } : {}\n}\n\n/**\n * Post-merge size caps — validates the WOULD-BE-PERSISTED document\n * (after the namespace merge), so a small patch can't tip the stored\n * cover over a cap unnoticed. `maxCoverBytes` bounds the entire\n * serialized document, which also closes the unbounded locale-map\n * key-count hole for `name` / `description`. Sizes are measured as\n * `JSON.stringify` length. Throws `ValidationError` on violation.\n */\nexport function validateCoverSize(\n cover: Cover,\n schema: ResolvedCoverSchema,\n): void {\n if (cover.custom !== undefined) {\n const customSize = JSON.stringify(cover.custom).length\n if (customSize > schema.maxCustomBytes) {\n throw new ValidationError(\n `setCover: custom exceeds the ${schema.maxCustomBytes}-byte cap ` +\n `(got ${customSize} bytes serialized, after merging with the stored namespaces).`,\n )\n }\n }\n const totalSize = JSON.stringify(cover).length\n if (totalSize > schema.maxCoverBytes) {\n throw new ValidationError(\n `setCover: the cover document exceeds the ${schema.maxCoverBytes}-byte cap ` +\n `(got ${totalSize} bytes serialized).`,\n )\n }\n}\n","/**\n * Validate-on-write for the cover. Runs at every `setCover` call;\n * the developer's schema decides which fields are allowed and the\n * size caps that apply.\n *\n * @module\n */\nimport { ValidationError } from '../../../kernel/errors.js'\nimport { validateCustomInput } from './custom.js'\nimport type {\n Cover,\n CoverText,\n JsonValue,\n ResolvedCoverSchema,\n CoverField,\n} from './types.js'\n\n/** Owner-supplied input — the subset of {@link Cover} the owner can set. */\nexport interface SetCoverInput {\n readonly name?: CoverText\n readonly description?: CoverText\n readonly icon?: string\n readonly defaultLocale?: string\n /**\n * Namespace-level patch for the cover's `custom` slot (#800):\n * provided namespaces replace their previous value, absent\n * namespaces are preserved, an explicit `null` deletes that\n * namespace. Requires `'custom'` in the schema's `fields` list —\n * the `cover: true` shorthand does NOT enable it.\n */\n readonly custom?: Record<string, JsonValue>\n}\n\nconst DATA_URL_PREFIX = /^data:([a-zA-Z0-9.+-]+\\/[a-zA-Z0-9.+-]+);base64,/\n\n/**\n * Validate an owner-supplied cover input against the developer's\n * resolved schema. Throws `ValidationError` on the first violation;\n * returns void on success.\n *\n * The validator is deliberately strict: every fail mode is a hard\n * error rather than a silent drop, so the owner finds out immediately\n * which field they oversized rather than discovering a truncated\n * label months later.\n */\nexport function validateCoverInput(\n input: SetCoverInput,\n schema: ResolvedCoverSchema,\n): void {\n const allowed = new Set<CoverField>(schema.fields)\n\n // Reject any key not in the schema's allowed-field list.\n for (const key of Object.keys(input)) {\n const known: CoverField | undefined =\n key === 'name' || key === 'description' || key === 'icon' || key === 'defaultLocale' || key === 'custom'\n ? key\n : undefined\n if (!known) {\n throw new ValidationError(\n `setCover: unknown field \"${key}\". ` +\n `Allowed fields: ${[...allowed].join(', ')}.`,\n )\n }\n if (!allowed.has(known)) {\n throw new ValidationError(\n `setCover: field \"${known}\" is not enabled in this vault's schema. ` +\n `Allowed fields: ${[...allowed].join(', ')}.`,\n )\n }\n }\n\n if (input.name !== undefined) {\n validateText(input.name, 'name', schema.maxStringChars)\n }\n if (input.description !== undefined) {\n validateText(input.description, 'description', schema.maxStringChars)\n }\n if (input.icon !== undefined) {\n validateIcon(input.icon, schema)\n }\n if (input.defaultLocale !== undefined && typeof input.defaultLocale !== 'string') {\n throw new ValidationError(\n `setCover: defaultLocale must be a string (BCP-47), got ${typeof input.defaultLocale}.`,\n )\n }\n if (input.custom !== undefined) {\n validateCustomInput(input.custom)\n }\n}\n\nfunction validateText(\n value: CoverText,\n field: string,\n maxChars: number,\n): void {\n if (typeof value === 'string') {\n if (value.length > maxChars) {\n throw new ValidationError(\n `setCover: ${field} exceeds the ${maxChars}-character cap (got ${value.length}).`,\n )\n }\n return\n }\n if (typeof value !== 'object' || value === null || Array.isArray(value)) {\n throw new ValidationError(\n `setCover: ${field} must be a string or { [locale]: string } map, got ${typeof value}.`,\n )\n }\n // Locale map. Each value must be a non-empty string within the cap.\n for (const [locale, str] of Object.entries(value)) {\n if (typeof str !== 'string') {\n throw new ValidationError(\n `setCover: ${field}[${locale}] must be a string, got ${typeof str}.`,\n )\n }\n if (str.length > maxChars) {\n throw new ValidationError(\n `setCover: ${field}[${locale}] exceeds the ${maxChars}-character cap (got ${str.length}).`,\n )\n }\n }\n}\n\nfunction validateIcon(icon: string, schema: ResolvedCoverSchema): void {\n if (typeof icon !== 'string') {\n throw new ValidationError(\n `setCover: icon must be a data: URL string, got ${typeof icon}.`,\n )\n }\n if (icon.length > schema.maxIconBytes) {\n throw new ValidationError(\n `setCover: icon exceeds the ${schema.maxIconBytes}-byte cap (got ${icon.length}).`,\n )\n }\n const m = DATA_URL_PREFIX.exec(icon)\n if (!m) {\n throw new ValidationError(\n 'setCover: icon must be a base64 data URL ' +\n '(`data:image/png;base64,…` or `data:image/svg+xml;base64,…`). ' +\n 'External URLs are not supported in v1.',\n )\n }\n const mime = m[1]!\n if (!schema.iconMimeTypes.includes(mime)) {\n throw new ValidationError(\n `setCover: icon MIME type \"${mime}\" is not allowed. ` +\n `Permitted types: ${schema.iconMimeTypes.join(', ')}.`,\n )\n }\n}\n\n/**\n * Lightweight runtime predicate — used by the bundle header\n * validator to recognise a cover without requiring it. (The wire\n * discriminator keeps its frozen name: `_noydb_public: 1`.)\n */\nexport function isCover(x: unknown): x is Cover {\n if (x === null || typeof x !== 'object' || Array.isArray(x)) return false\n const obj = x as Record<string, unknown>\n return obj['_noydb_public'] === 1 && typeof obj['version'] === 'number'\n}\n","/**\n * Persistence helpers for `_meta/public-envelope` — the cover's\n * frozen wire location. Mirrors the bypass-AES pattern used by\n * `_meta/handle` and `_meta/policy` — the document is plaintext\n * JSON, the envelope's `_iv` field is left empty.\n *\n * @module\n */\nimport type { NoydbStore, EncryptedEnvelope } from '../../../kernel/types.js'\nimport { NOYDB_FORMAT_VERSION } from '../../../kernel/types.js'\nimport type { Cover } from './types.js'\nimport { isCover } from './schema.js'\n\n/**\n * Reserved id for the vault-level cover record. The VALUE is frozen\n * wire format — the record predates the #799 rename and stays at\n * `_meta/public-envelope` so existing vaults need no migration.\n */\nexport const COVER_RECORD_ID = 'public-envelope'\n\n/**\n * Read the cover from `_meta/public-envelope`. Returns `undefined`\n * when no cover has been persisted (fresh vault, or a vault written\n * before the feature was enabled). Tolerates corrupted documents —\n * a JSON parse failure surfaces as `undefined`, not a thrown error,\n * mirroring `_meta/handle`'s contract.\n */\nexport async function loadCover(\n store: NoydbStore,\n vault: string,\n): Promise<Cover | undefined> {\n const envelope = await store.get(vault, '_meta', COVER_RECORD_ID)\n if (!envelope) return undefined\n try {\n const parsed = JSON.parse(envelope._data) as unknown\n if (!isCover(parsed)) return undefined\n return parsed\n } catch {\n return undefined\n }\n}\n\n/** Persist the cover. Idempotent — overwrites any prior write. */\nexport async function saveCover(\n store: NoydbStore,\n vault: string,\n cover: Cover,\n): Promise<void> {\n const wireEnvelope: EncryptedEnvelope = {\n _noydb: NOYDB_FORMAT_VERSION,\n _v: 1,\n _ts: new Date().toISOString(),\n _iv: '',\n _data: JSON.stringify(cover),\n }\n await store.put(vault, '_meta', COVER_RECORD_ID, wireEnvelope)\n}\n\n/**\n * Public, no-key reader. Plain function, not a method on `Noydb` —\n * the whole point is it works without an authenticated session, so\n * a UI can show \"Acme 2026 Tax Records\" before unlocking.\n *\n * Resolves any `name` / `description` locale map through the supplied\n * `locale` (when provided). Omitting `locale` returns the raw\n * cover, which a multilingual picker can render as it pleases.\n */\nexport async function readCover(\n store: NoydbStore,\n vault: string,\n opts: { readonly locale?: string } = {},\n): Promise<Cover | undefined> {\n const raw = await loadCover(store, vault)\n if (!raw) return undefined\n if (opts.locale === undefined) return raw\n return resolveLocale(raw, opts.locale)\n}\n\n/**\n * Resolve the locale-map fields (`name`, `description`) of a cover\n * to plain strings for the requested locale, falling back through\n * `defaultLocale` and then any available translation.\n *\n * @internal\n */\nexport function resolveLocale(\n cover: Cover,\n locale: string,\n): Cover {\n return {\n ...cover,\n ...(cover.name !== undefined ? { name: pickLocale(cover.name, locale, cover.defaultLocale) } : {}),\n ...(cover.description !== undefined ? { description: pickLocale(cover.description, locale, cover.defaultLocale) } : {}),\n }\n}\n\n/**\n * Resolve a `string | { [locale]: string }` value to a string for a\n * given locale. Exported so the bundle reader can reuse it without\n * duplicating the fallback chain.\n *\n * **Looser than `resolveI18nText`** — the hub's record-field resolver\n * throws `LocaleNotSpecifiedError` when no translation matches, but\n * label semantics deliberately prefer \"show *something*\" over\n * throwing. The fallback chain is:\n * 1. Exact `locale` match.\n * 2. `defaultLocale` (when supplied on the cover).\n * 3. First non-empty value in the map.\n * 4. Empty string (only if every translation is empty — pathological).\n *\n * This deviation is documented in `https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/services/public-envelope.md`.\n */\nexport function pickLocale(\n value: string | Record<string, string>,\n locale: string,\n defaultLocale: string | undefined,\n): string {\n if (typeof value === 'string') return value\n if (value[locale] !== undefined && value[locale] !== '') return value[locale]\n if (defaultLocale && value[defaultLocale] !== undefined && value[defaultLocale] !== '') {\n return value[defaultLocale]\n }\n for (const v of Object.values(value)) {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AO,KAAK,UAAU,KAAK;AAAA,EAC7B;AACA,QAAM,MAAM,IAAI,OAAO,SAAS,iBAAiB,YAAY;AAC/D;AAWA,eAAsB,UACpB,OACA,OACA,OAAqC,CAAC,GACV;AAC5B,QAAM,MAAM,MAAM,UAAU,OAAO,KAAK;AACxC,MAAI,CAAC,IAAK,QAAO;AACjB,MAAI,KAAK,WAAW,OAAW,QAAO;AACtC,SAAO,cAAc,KAAK,KAAK,MAAM;AACvC;AASO,SAAS,cACd,OACA,QACO;AACP,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAI,MAAM,SAAS,SAAY,EAAE,MAAM,WAAW,MAAM,MAAM,QAAQ,MAAM,aAAa,EAAE,IAAI,CAAC;AAAA,IAChG,GAAI,MAAM,gBAAgB,SAAY,EAAE,aAAa,WAAW,MAAM,aAAa,QAAQ,MAAM,aAAa,EAAE,IAAI,CAAC;AAAA,EACvH;AACF;AAkBO,SAAS,WACd,OACA,QACA,eACQ;AACR,MAAI,OAAO,UAAU,SAAU,QAAO;AACtC,MAAI,MAAM,MAAM,MAAM,UAAa,MAAM,MAAM,MAAM,GAAI,QAAO,MAAM,MAAM;AAC5E,MAAI,iBAAiB,MAAM,aAAa,MAAM,UAAa,MAAM,aAAa,MAAM,IAAI;AACtF,WAAO,MAAM,aAAa;AAAA,EAC5B;AACA,aAAW,KAAK,OAAO,OAAO,KAAK,GAAG;AACpC,QAAI,MAAM,GAAI,QAAO;AAAA,EACvB;AACA,SAAO;AACT;","names":[]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
envelopePayloadHash
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JLHKBAFY.js";
|
|
4
4
|
import {
|
|
5
5
|
NOYDB_FORMAT_VERSION
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5BHNQNBI.js";
|
|
7
7
|
import {
|
|
8
8
|
DictKeyMissingError,
|
|
9
9
|
PermissionDeniedError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IGM563N5.js";
|
|
11
11
|
|
|
12
12
|
// src/via/lookup/handle.ts
|
|
13
13
|
function isDeleteMarker(envelope) {
|
|
@@ -389,4 +389,4 @@ export {
|
|
|
389
389
|
dictCollectionName,
|
|
390
390
|
LookupHandle
|
|
391
391
|
};
|
|
392
|
-
//# sourceMappingURL=chunk-
|
|
392
|
+
//# sourceMappingURL=chunk-BZEPJJOK.js.map
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
dekKey
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MSO2C3KG.js";
|
|
4
4
|
import {
|
|
5
5
|
generateULID
|
|
6
6
|
} from "./chunk-ZJADGNYF.js";
|
|
7
7
|
import {
|
|
8
8
|
openEnvelopeJson
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PEY6ZTCF.js";
|
|
10
10
|
import {
|
|
11
11
|
encrypt,
|
|
12
12
|
unwrapKey,
|
|
13
13
|
wrapKey
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-5P5AAXYA.js";
|
|
15
15
|
import {
|
|
16
16
|
DelegationTargetMissingError
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-IGM563N5.js";
|
|
18
18
|
|
|
19
19
|
// src/with-party/team/delegation.ts
|
|
20
20
|
var DELEGATIONS_COLLECTION = "_delegations";
|
|
@@ -96,4 +96,4 @@ export {
|
|
|
96
96
|
loadActiveDelegations,
|
|
97
97
|
revokeDelegation
|
|
98
98
|
};
|
|
99
|
-
//# sourceMappingURL=chunk-
|
|
99
|
+
//# sourceMappingURL=chunk-BZK6JEX4.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
freezeAndDeleteClosure,
|
|
3
3
|
randomId
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-XULHFSHO.js";
|
|
5
5
|
import {
|
|
6
6
|
buildAccessibleBundle,
|
|
7
7
|
resolveAccessibleCollections
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-25ZDB25Z.js";
|
|
9
9
|
import {
|
|
10
10
|
NOYDB_FORMAT_VERSION
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-5BHNQNBI.js";
|
|
12
12
|
import {
|
|
13
13
|
NoydbError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IGM563N5.js";
|
|
15
15
|
|
|
16
16
|
// src/with-audit/portability/request-withdrawal.ts
|
|
17
17
|
var WITHDRAWAL_REQUESTS_COLLECTION = "_user_withdrawal_requests";
|
|
@@ -161,4 +161,4 @@ export {
|
|
|
161
161
|
approveWithdrawal,
|
|
162
162
|
rejectWithdrawal
|
|
163
163
|
};
|
|
164
|
-
//# sourceMappingURL=chunk-
|
|
164
|
+
//# sourceMappingURL=chunk-CCT4WZI6.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
FieldNotQueryableError,
|
|
7
7
|
IndexRequiredError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-IGM563N5.js";
|
|
9
9
|
|
|
10
10
|
// src/with-lookup/indexing/persisted-indexes.ts
|
|
11
11
|
var IDX_PREFIX = "_idx/";
|
|
@@ -521,4 +521,4 @@ export {
|
|
|
521
521
|
PersistedCollectionIndex,
|
|
522
522
|
LazyQuery
|
|
523
523
|
};
|
|
524
|
-
//# sourceMappingURL=chunk-
|
|
524
|
+
//# sourceMappingURL=chunk-CGPO3ZYB.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sha256Hex
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5P5AAXYA.js";
|
|
4
4
|
import {
|
|
5
5
|
MaterializedViewSourceUnknownError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IGM563N5.js";
|
|
7
7
|
|
|
8
8
|
// src/with-formula/materialized-views/dependency-analyzer.ts
|
|
9
9
|
function analyzeDependencies(query) {
|
|
@@ -366,4 +366,4 @@ export {
|
|
|
366
366
|
MaterializedViewRegistry,
|
|
367
367
|
wrapDbWithPredicates
|
|
368
368
|
};
|
|
369
|
-
//# sourceMappingURL=chunk-
|
|
369
|
+
//# sourceMappingURL=chunk-DEQ2JTBR.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DerivationCycleError,
|
|
3
3
|
MaterializedViewCycleError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IGM563N5.js";
|
|
5
5
|
|
|
6
6
|
// src/kernel/via/graph.ts
|
|
7
7
|
var DEFAULT_POSTURE = { encryptedAtRest: "envelope", queryable: "full", exportable: true, forgettable: false };
|
|
@@ -341,4 +341,4 @@ export {
|
|
|
341
341
|
DEFAULT_POSTURE,
|
|
342
342
|
ViaGraph
|
|
343
343
|
};
|
|
344
|
-
//# sourceMappingURL=chunk-
|
|
344
|
+
//# sourceMappingURL=chunk-E2R5NRZD.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sha256Hex
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5P5AAXYA.js";
|
|
4
4
|
|
|
5
5
|
// src/with-shape/persisted-schemas/canonicalize.ts
|
|
6
6
|
function canonicalize(value) {
|
|
@@ -91,4 +91,4 @@ export {
|
|
|
91
91
|
isZod4Schema,
|
|
92
92
|
derivePersistedSchema
|
|
93
93
|
};
|
|
94
|
-
//# sourceMappingURL=chunk-
|
|
94
|
+
//# sourceMappingURL=chunk-EDC6MLXV.js.map
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
grant,
|
|
5
5
|
revoke,
|
|
6
6
|
rotateKeys
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WJDYZP3U.js";
|
|
8
8
|
import {
|
|
9
9
|
openEnvelopeJson
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PEY6ZTCF.js";
|
|
11
11
|
import {
|
|
12
12
|
encrypt
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5P5AAXYA.js";
|
|
14
14
|
import {
|
|
15
15
|
NOYDB_FORMAT_VERSION
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-5BHNQNBI.js";
|
|
17
17
|
import {
|
|
18
18
|
PermissionDeniedError
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-IGM563N5.js";
|
|
20
20
|
|
|
21
21
|
// src/with-party/team/active.ts
|
|
22
22
|
function withTeam() {
|
|
@@ -96,4 +96,4 @@ export {
|
|
|
96
96
|
listCredentials,
|
|
97
97
|
credentialStatus
|
|
98
98
|
};
|
|
99
|
-
//# sourceMappingURL=chunk-
|
|
99
|
+
//# sourceMappingURL=chunk-EW4HFWGJ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ValidationError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IGM563N5.js";
|
|
4
4
|
|
|
5
5
|
// src/with-audit/periods/window.ts
|
|
6
6
|
var PERIODS_COLLECTION = "_periods";
|
|
@@ -21,4 +21,4 @@ export {
|
|
|
21
21
|
PERIOD_TARGET_PURGES_COLLECTION,
|
|
22
22
|
periodExclusiveUpperBound
|
|
23
23
|
};
|
|
24
|
-
//# sourceMappingURL=chunk-
|
|
24
|
+
//# sourceMappingURL=chunk-F4COUZLL.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
ConflictError,
|
|
7
7
|
InvariantError,
|
|
8
8
|
ValidationError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IGM563N5.js";
|
|
10
10
|
|
|
11
11
|
// src/kernel/best-effort-revert.ts
|
|
12
12
|
async function bestEffortRevert(executed, adapter, compensate) {
|
|
@@ -231,7 +231,7 @@ async function runTransaction(db, fn, options, txInvariants) {
|
|
|
231
231
|
db._clearActiveTxContext(ctx);
|
|
232
232
|
}
|
|
233
233
|
if (ctx._amendment) {
|
|
234
|
-
const { GuardExecutor } = await import("./executor-
|
|
234
|
+
const { GuardExecutor } = await import("./executor-WQQRU6DO.js");
|
|
235
235
|
try {
|
|
236
236
|
for (const [vaultName, v] of ctx._amendmentVaults) {
|
|
237
237
|
const registry = v._getGuardRegistry();
|
|
@@ -368,4 +368,4 @@ export {
|
|
|
368
368
|
runTransaction,
|
|
369
369
|
revertExecuted
|
|
370
370
|
};
|
|
371
|
-
//# sourceMappingURL=chunk-
|
|
371
|
+
//# sourceMappingURL=chunk-FLHOTGOO.js.map
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
base64ToBuffer,
|
|
6
6
|
bufferToBase64
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5P5AAXYA.js";
|
|
8
8
|
import {
|
|
9
9
|
SessionExpiredError,
|
|
10
10
|
SessionNotFoundError,
|
|
11
11
|
SessionPolicyError,
|
|
12
12
|
ValidationError
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-IGM563N5.js";
|
|
14
14
|
|
|
15
15
|
// src/with-party/session/session.ts
|
|
16
16
|
var subtle = globalThis.crypto.subtle;
|
|
@@ -364,4 +364,4 @@ export {
|
|
|
364
364
|
clearDevUnlock,
|
|
365
365
|
isDevUnlockActive
|
|
366
366
|
};
|
|
367
|
-
//# sourceMappingURL=chunk-
|
|
367
|
+
//# sourceMappingURL=chunk-GBEXTC6Z.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
chainAnchor,
|
|
5
5
|
loadPeriods,
|
|
6
6
|
validatePeriodName
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KR5EGWI4.js";
|
|
8
8
|
|
|
9
9
|
// src/with-audit/periods/active.ts
|
|
10
10
|
function withPeriods() {
|
|
@@ -20,4 +20,4 @@ function withPeriods() {
|
|
|
20
20
|
export {
|
|
21
21
|
withPeriods
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=chunk-
|
|
23
|
+
//# sourceMappingURL=chunk-GS3Q2KOZ.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
applyJoins
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OGFPMCSP.js";
|
|
4
4
|
import {
|
|
5
5
|
reducerBuilder
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JIMEB4C6.js";
|
|
7
7
|
import {
|
|
8
8
|
evaluateClause,
|
|
9
9
|
hasFnClause,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
CrossJoinTooLargeError,
|
|
15
15
|
DanglingReferenceError,
|
|
16
16
|
FieldNotQueryableError
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-IGM563N5.js";
|
|
18
18
|
|
|
19
19
|
// src/kernel/query/live.ts
|
|
20
20
|
function buildLiveQuery(recompute, upstreams) {
|
|
@@ -1534,4 +1534,4 @@ export {
|
|
|
1534
1534
|
executePlan,
|
|
1535
1535
|
ScanBuilder
|
|
1536
1536
|
};
|
|
1537
|
-
//# sourceMappingURL=chunk-
|
|
1537
|
+
//# sourceMappingURL=chunk-GU5AYA2Q.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PortabilityNotEnabledError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-IGM563N5.js";
|
|
4
4
|
|
|
5
5
|
// src/with-audit/portability/strategy.ts
|
|
6
6
|
var NO_PORTABILITY = {
|
|
@@ -27,4 +27,4 @@ var NO_PORTABILITY = {
|
|
|
27
27
|
export {
|
|
28
28
|
NO_PORTABILITY
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-GYB2QK5H.js.map
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
persistUserVisibility,
|
|
5
5
|
readUserVisibility,
|
|
6
6
|
saveUserEnvelope
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7B4GPCX7.js";
|
|
8
8
|
import {
|
|
9
9
|
PolicyDeniedError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IGM563N5.js";
|
|
11
11
|
|
|
12
12
|
// src/with-party/directory/user-envelope/api.ts
|
|
13
13
|
var UserApi = class {
|
|
@@ -379,4 +379,4 @@ export {
|
|
|
379
379
|
UserApi,
|
|
380
380
|
createUserApi
|
|
381
381
|
};
|
|
382
|
-
//# sourceMappingURL=chunk-
|
|
382
|
+
//# sourceMappingURL=chunk-GZ2GKOF6.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DerivationCapExceededError,
|
|
3
3
|
DerivationOutputShapeError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IGM563N5.js";
|
|
5
5
|
|
|
6
6
|
// src/with-formula/derivations/executor.ts
|
|
7
7
|
var DerivationExecutor = {
|
|
@@ -121,4 +121,4 @@ var DerivationExecutor = {
|
|
|
121
121
|
export {
|
|
122
122
|
DerivationExecutor
|
|
123
123
|
};
|
|
124
|
-
//# sourceMappingURL=chunk-
|
|
124
|
+
//# sourceMappingURL=chunk-H4SMS4O2.js.map
|