@noy-db/hub 0.7.0-pre.8 → 0.7.0
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/CHANGELOG.md +1379 -0
- package/README.md +7 -6
- package/dist/api-TXFOVOXX.js +19 -0
- package/dist/as/index.js +14 -14
- package/dist/at/index.js +9 -10
- package/dist/attestation/index.js +18 -19
- package/dist/attestation/index.js.map +1 -1
- package/dist/{backup-SZBDQQSL.js → backup-IJTB4S4M.js} +14 -15
- package/dist/{backup-SZBDQQSL.js.map → backup-IJTB4S4M.js.map} +1 -1
- package/dist/blobs/index.js +13 -14
- package/dist/blobs/index.js.map +1 -1
- package/dist/broker/index.js +12 -13
- package/dist/broker/index.js.map +1 -1
- package/dist/by/index.js +2 -3
- package/dist/cargo/index.js +33 -34
- package/dist/{chunk-X6TBQKHW.js → chunk-2577DKXB.js} +2 -2
- package/dist/chunk-2C3AQB46.js +1652 -0
- package/dist/chunk-2C3AQB46.js.map +1 -0
- package/dist/{chunk-L3FHEWA3.js → chunk-2N4GY74U.js} +6 -6
- package/dist/{chunk-626TSARM.js → chunk-2Y4IMKA6.js} +4 -4
- package/dist/{chunk-7CWII4BL.js → chunk-3RCJJBNR.js} +10 -10
- package/dist/{chunk-M7UC2QPT.js → chunk-453F654R.js} +2 -2
- package/dist/{chunk-2QNKXGUS.js → chunk-4GVM6QZA.js} +2 -2
- package/dist/{chunk-AB5P32RE.js → chunk-4OZNXTO4.js} +2 -2
- package/dist/{chunk-L3HDEHGM.js → chunk-5VCRVKOZ.js} +4 -4
- package/dist/{chunk-6AQIFBSP.js → chunk-5WDXHNSW.js} +5 -5
- package/dist/chunk-66TQOPFM.js +37 -0
- package/dist/chunk-66TQOPFM.js.map +1 -0
- package/dist/{chunk-BOFRKAUS.js → chunk-6GMZ7HEE.js} +6 -6
- package/dist/{chunk-PRHCMEUK.js → chunk-6GOE5PGN.js} +168 -1328
- package/dist/chunk-6GOE5PGN.js.map +1 -0
- package/dist/{chunk-XBFEKTIY.js → chunk-6I2RQCET.js} +4 -4
- package/dist/{chunk-PUJTKLPL.js → chunk-6X6SEMEE.js} +6 -4
- package/dist/{chunk-PUJTKLPL.js.map → chunk-6X6SEMEE.js.map} +1 -1
- package/dist/{chunk-UCUALOSM.js → chunk-6YXCPL4T.js} +2 -2
- package/dist/{chunk-BYBB4ABD.js → chunk-77K4PG6P.js} +8 -8
- package/dist/{chunk-S2VG3ABP.js → chunk-7MG2LHO5.js} +3 -3
- package/dist/{chunk-GU3LQYW2.js → chunk-7MG7SJT7.js} +1 -1
- package/dist/chunk-7MG7SJT7.js.map +1 -0
- package/dist/{chunk-JBIV4FLR.js → chunk-7O3Y4PPD.js} +5 -1
- package/dist/chunk-7O3Y4PPD.js.map +1 -0
- package/dist/{chunk-EO2KGKEJ.js → chunk-7V4TP3AF.js} +4 -4
- package/dist/{chunk-LFDMKZIP.js → chunk-ANATMFIO.js} +5 -5
- package/dist/{chunk-T3PHCEN4.js → chunk-ANSIZYEG.js} +3 -3
- package/dist/{chunk-ZKRRBRSZ.js → chunk-AO42KJO6.js} +7 -7
- package/dist/{chunk-VFIWDPXZ.js → chunk-BLN54W3L.js} +3 -3
- package/dist/{chunk-ZQ2UUHSL.js → chunk-BM5TWITZ.js} +7 -7
- package/dist/{chunk-WLFABTZ6.js → chunk-BOET4NA4.js} +3 -3
- package/dist/{chunk-FOG7YEJP.js → chunk-BOWNCWZT.js} +3 -3
- package/dist/{chunk-7XODKGTW.js → chunk-BSFNRLK2.js} +5 -5
- package/dist/{chunk-YPSOHDNC.js → chunk-BUE2D7PX.js} +26 -3
- package/dist/chunk-BUE2D7PX.js.map +1 -0
- package/dist/{chunk-J4MN6XIU.js → chunk-BZ3534YM.js} +2 -2
- package/dist/chunk-CARABLSQ.js +176 -0
- package/dist/chunk-CARABLSQ.js.map +1 -0
- package/dist/{chunk-4MZEZ37W.js → chunk-CHJBLCOG.js} +10 -8
- package/dist/{chunk-4MZEZ37W.js.map → chunk-CHJBLCOG.js.map} +1 -1
- package/dist/{chunk-IF56DYJK.js → chunk-CPWQB3N5.js} +7 -7
- package/dist/{chunk-SHILAQH5.js → chunk-DGOZ4UZD.js} +2 -2
- package/dist/{chunk-BWWUXE3L.js → chunk-ELNXJMGB.js} +6 -6
- package/dist/{chunk-44C2URL7.js → chunk-EQEYOJBM.js} +3 -3
- package/dist/{chunk-Y3XWRDAM.js → chunk-EYBQEIUY.js} +3 -3
- package/dist/{chunk-Z7ZXZL6Y.js → chunk-FAHMLERK.js} +2 -2
- package/dist/chunk-FFWI7UH7.js +53 -0
- package/dist/chunk-FFWI7UH7.js.map +1 -0
- package/dist/{chunk-EXDIHWFO.js → chunk-FMZY5Q6L.js} +3 -3
- package/dist/{chunk-H6WXKZL7.js → chunk-FXBIP2WD.js} +6 -6
- package/dist/{chunk-ZTYG36DH.js → chunk-G56KBWFY.js} +67 -22
- package/dist/chunk-G56KBWFY.js.map +1 -0
- package/dist/{chunk-672U6STZ.js → chunk-GPEQUXHL.js} +4 -4
- package/dist/{chunk-Z2PWOSCJ.js → chunk-GY4WYNNG.js} +2 -2
- package/dist/{chunk-RDHUZ674.js → chunk-HDOU6I2Y.js} +80 -8
- package/dist/chunk-HDOU6I2Y.js.map +1 -0
- package/dist/{chunk-OMHHGOG4.js → chunk-J6FXAEUG.js} +15 -13
- package/dist/chunk-J6FXAEUG.js.map +1 -0
- package/dist/{chunk-4A4TYISP.js → chunk-JBDFMYKQ.js} +2 -2
- package/dist/{chunk-POS53FG6.js → chunk-JMGDHKQF.js} +2 -2
- package/dist/{chunk-Q7GEDVHC.js → chunk-K6LHRFBL.js} +7 -7
- package/dist/{chunk-4JDIRUTT.js → chunk-K7NTTA6P.js} +2 -2
- package/dist/{chunk-26W5VETY.js → chunk-KG7TZKZG.js} +5 -5
- package/dist/{chunk-RJ7RIIX6.js → chunk-KJIMGIWO.js} +8 -8
- package/dist/{chunk-F7ZFRPGQ.js → chunk-KTFRCC5C.js} +2 -2
- package/dist/{chunk-HSGEIMJS.js → chunk-KUJDV5QH.js} +5 -5
- package/dist/{chunk-XWNLKG6R.js → chunk-KUX3OB6D.js} +7 -5
- package/dist/{chunk-XWNLKG6R.js.map → chunk-KUX3OB6D.js.map} +1 -1
- package/dist/{chunk-UPJMBMCR.js → chunk-L742JPKZ.js} +6 -6
- package/dist/{chunk-4TZUFNXL.js → chunk-L7CIOOBW.js} +2 -2
- package/dist/{chunk-7LYUJNU3.js → chunk-LWBCUYZW.js} +2 -2
- package/dist/{chunk-JHLJQUXU.js → chunk-MUM7IANK.js} +3 -3
- package/dist/{chunk-2GXEQUEX.js → chunk-MVMXZYXT.js} +2 -2
- package/dist/{chunk-XLPXGN66.js → chunk-NA2NIJZI.js} +8 -8
- package/dist/{chunk-S6YB5ZRP.js → chunk-NKHRDYOR.js} +4 -4
- package/dist/{chunk-XJ3FEKEY.js → chunk-NQKIUNW5.js} +2 -2
- package/dist/{chunk-6NRVFD55.js → chunk-PT43Y56J.js} +6 -6
- package/dist/{chunk-5ACAVJUI.js → chunk-Q2PU57HC.js} +2 -2
- package/dist/{chunk-E6YA6UAP.js → chunk-Q7HZX3IF.js} +2 -2
- package/dist/{chunk-4ZPE6SKS.js → chunk-QIBVIOXO.js} +3 -3
- package/dist/{chunk-WLLUM35R.js → chunk-QIZPZMUI.js} +2 -2
- package/dist/{chunk-P6ASQOZR.js → chunk-REDOOY2Q.js} +3 -3
- package/dist/chunk-REDOOY2Q.js.map +1 -0
- package/dist/{chunk-LKFKXS5K.js → chunk-RMF67KCG.js} +2 -2
- package/dist/{chunk-YCSM3GZU.js → chunk-RMS3NEA3.js} +2 -2
- package/dist/{chunk-4FPEWQKF.js → chunk-RRNRNANG.js} +27 -17
- package/dist/chunk-RRNRNANG.js.map +1 -0
- package/dist/chunk-RTBJ5IOO.js +87 -0
- package/dist/chunk-RTBJ5IOO.js.map +1 -0
- package/dist/chunk-RXLYKVTF.js +17 -0
- package/dist/chunk-RXLYKVTF.js.map +1 -0
- package/dist/{chunk-OPXR4PB2.js → chunk-SFAWCTEM.js} +2 -2
- package/dist/{chunk-3QARDAYW.js → chunk-SKGMN35F.js} +2 -2
- package/dist/{chunk-W5LHQXZU.js → chunk-SL3JAAKN.js} +2 -2
- package/dist/chunk-SMH6SRX7.js +87 -0
- package/dist/chunk-SMH6SRX7.js.map +1 -0
- package/dist/{chunk-JJZIIJSA.js → chunk-SPXXX5E4.js} +12 -82
- package/dist/chunk-SPXXX5E4.js.map +1 -0
- package/dist/{chunk-UALOYGCP.js → chunk-SPYWXKJN.js} +3 -3
- package/dist/{chunk-QU3YUP2X.js → chunk-SZJ3DLZA.js} +2 -2
- package/dist/chunk-TFMM5DBB.js +20 -0
- package/dist/chunk-TFMM5DBB.js.map +1 -0
- package/dist/{chunk-225O5CXQ.js → chunk-TFR7DSOV.js} +2 -2
- package/dist/{chunk-X67FCULK.js → chunk-TRGTKX5E.js} +3 -3
- package/dist/{chunk-JVLSU7S2.js → chunk-TUFM4UZP.js} +2 -2
- package/dist/{chunk-VVAVTSTR.js → chunk-U4FOQDY4.js} +5 -172
- package/dist/chunk-U4FOQDY4.js.map +1 -0
- package/dist/{chunk-HTGRQZFB.js → chunk-UGTBXF5U.js} +3 -3
- package/dist/{chunk-THNJ3IKU.js → chunk-ULUMAZ5S.js} +2 -2
- package/dist/{chunk-XDVVBETV.js → chunk-UXVWEX5L.js} +2 -2
- package/dist/{chunk-FKFIEEY6.js → chunk-UXWB3FPF.js} +10 -10
- package/dist/{chunk-NO272T7Q.js → chunk-V4PXLYWM.js} +2 -31
- package/dist/chunk-V4PXLYWM.js.map +1 -0
- package/dist/{chunk-CBRS2NEK.js → chunk-VTFVLCUH.js} +2 -2
- package/dist/{chunk-TOV6VMHF.js → chunk-VXANTWBJ.js} +3 -3
- package/dist/{chunk-VSLUSXVK.js → chunk-VXGSWL6L.js} +6 -6
- package/dist/{chunk-KHKKD62N.js → chunk-VYYM3MEN.js} +2 -16
- package/dist/chunk-VYYM3MEN.js.map +1 -0
- package/dist/{chunk-HQINBNHM.js → chunk-WEQEYLCS.js} +7 -7
- package/dist/{chunk-U6GCYG2T.js → chunk-X2DLENDQ.js} +3 -3
- package/dist/{chunk-XVU7J43V.js → chunk-XLMEZIAJ.js} +2 -2
- package/dist/{chunk-ILSR22WM.js → chunk-XTXOCYOJ.js} +5 -5
- package/dist/{chunk-KDJGJR7F.js → chunk-YSRUYAVU.js} +2 -2
- package/dist/{chunk-NLKLXXTO.js → chunk-YYP7WSEB.js} +2 -2
- package/dist/{chunk-4G25SDQL.js → chunk-ZN4FD4PE.js} +4 -4
- package/dist/{chunk-XSN63FUS.js → chunk-ZORTV6NH.js} +2 -2
- package/dist/{chunk-S3I7VKID.js → chunk-ZVO4QVPD.js} +5 -5
- package/dist/classified/index.js +5 -6
- package/dist/{classified-marker-KL4YXUXD.js → classified-marker-LI2SF2E4.js} +3 -5
- package/dist/{classified-marker-KL4YXUXD.js.map → classified-marker-LI2SF2E4.js.map} +1 -1
- package/dist/collection-facade-4GRREZ6C.js +45 -0
- package/dist/computed-VPOKQK4N.js +10 -0
- package/dist/consent/index.js +9 -10
- package/dist/consent/index.js.map +1 -1
- package/dist/cover/index.js +9 -10
- package/dist/crdt/index.js +0 -1
- package/dist/crdt/index.js.map +1 -1
- package/dist/custody/index.js +12 -13
- package/dist/{dead-filter-ZGRFZKYE.js → dead-filter-TSWZQRR5.js} +2 -3
- package/dist/{dead-filter-ZGRFZKYE.js.map → dead-filter-TSWZQRR5.js.map} +1 -1
- package/dist/debug/index.js +1 -2
- package/dist/debug/index.js.map +1 -1
- package/dist/{delegation-2DO3VI5E.js → delegation-OVIFFPG4.js} +11 -12
- package/dist/{delegation-2DO3VI5E.js.map → delegation-OVIFFPG4.js.map} +1 -1
- package/dist/derivations/index.js +30 -16
- package/dist/derive-6O5SWQKN.js +21 -0
- package/dist/directory/index.js +10 -11
- package/dist/dispatch-S73TK3IY.js +302 -0
- package/dist/dispatch-S73TK3IY.js.map +1 -0
- package/dist/{dispatch-M62IAL2S.js → dispatch-WC6X2M6C.js} +5 -7
- package/dist/{dispatch-M62IAL2S.js.map → dispatch-WC6X2M6C.js.map} +1 -1
- package/dist/{enclave-4P4KH5ZW.js → enclave-KJOTOH7X.js} +9 -10
- package/dist/executor-5NIMLSKZ.js +8 -0
- package/dist/executor-AQVXV5GZ.js +8 -0
- package/dist/executor-PUAO6AKJ.js +29 -0
- package/dist/export-accessible-72EQNBMR.js +22 -0
- package/dist/extract-partition-PUYNU3UF.js +37 -0
- package/dist/{fanout-sidecar-BRQHWTZQ.js → fanout-sidecar-WUFXNYP4.js} +9 -10
- package/dist/{fanout-sidecar-BRQHWTZQ.js.map → fanout-sidecar-WUFXNYP4.js.map} +1 -1
- package/dist/{fence-watcher-ZVSMLKQD.js → fence-watcher-U2PW6JU5.js} +1 -3
- package/dist/{fence-watcher-ZVSMLKQD.js.map → fence-watcher-U2PW6JU5.js.map} +1 -1
- package/dist/find-2ABFCZX4.js +10 -0
- package/dist/forget/index.js +9 -10
- package/dist/forget/index.js.map +1 -1
- package/dist/guards/index.js +4 -5
- package/dist/history/index.js +13 -14
- package/dist/history/index.js.map +1 -1
- package/dist/i18n/index.js +14 -15
- package/dist/i18n/index.js.map +1 -1
- package/dist/index.d.ts +20 -4
- package/dist/index.js +122 -115
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.js +2 -3
- package/dist/indexing/index.js.map +1 -1
- package/dist/introspection/index.js +13 -13
- package/dist/issue-SIDORTSZ.js +18 -0
- package/dist/{json-schema-I22JCYCG.js → json-schema-V3M5MUCM.js} +1 -3
- package/dist/{json-schema-I22JCYCG.js.map → json-schema-V3M5MUCM.js.map} +1 -1
- package/dist/kernel/collection-config.d.ts +34 -0
- package/dist/kernel/collection.d.ts +11 -6
- package/dist/kernel/errors.d.ts +45 -0
- package/dist/kernel/match-pairs.d.ts +30 -0
- package/dist/kernel/types.d.ts +66 -0
- package/dist/lazy/index.js +3 -3
- package/dist/{ledger-4X5ZH43X.js → ledger-F33ZVMTK.js} +11 -12
- package/dist/liberate-LCDPNAG2.js +24 -0
- package/dist/link-set-FKNWAYKS.js +30 -0
- package/dist/{managed-secret-CXALLEUB.js → managed-secret-PQYKSR6T.js} +10 -11
- package/dist/materialized-views/index.js +21 -21
- package/dist/{migrate-cek-LBRKYUZZ.js → migrate-cek-5ENH64AA.js} +2 -3
- package/dist/{migrate-cek-LBRKYUZZ.js.map → migrate-cek-5ENH64AA.js.map} +1 -1
- package/dist/money/index.js +4 -5
- package/dist/noydb-DUXZPKSN.js +90 -0
- package/dist/overlay-views/index.js +4 -5
- package/dist/periods/index.js +12 -13
- package/dist/pod/index.js +64 -60
- package/dist/{pod-handle-DHEYBTJ2.js → pod-handle-Q736KYON.js} +10 -11
- package/dist/{pod-handle-DHEYBTJ2.js.map → pod-handle-Q736KYON.js.map} +1 -1
- package/dist/policy/index.js +10 -11
- package/dist/port/to/index.d.ts +40 -0
- package/dist/portability/index.js +8 -9
- package/dist/portability/index.js.map +1 -1
- package/dist/{post-register-4DXRYGTU.js → post-register-LNE2FE2A.js} +6 -7
- package/dist/{post-register-4DXRYGTU.js.map → post-register-LNE2FE2A.js.map} +1 -1
- package/dist/{purge-scope-FGNNLWHD.js → purge-scope-4HEFPDOW.js} +1 -3
- package/dist/{purge-scope-FGNNLWHD.js.map → purge-scope-4HEFPDOW.js.map} +1 -1
- package/dist/query/index.js +3 -4
- package/dist/{read-only-facade-CHCKSEPD.js → read-only-facade-BIGO37U3.js} +1 -2
- package/dist/reduce/index.js +4 -5
- package/dist/reduce/index.js.map +1 -1
- package/dist/register-I2DZXGAR.js +31 -0
- package/dist/registry-23WF3TGH.js +8 -0
- package/dist/registry-4AYVUNXK.js +8 -0
- package/dist/registry-VSSQPIGF.js +18 -0
- package/dist/registry-YLEWMGAC.js +32 -0
- package/dist/request-withdrawal-KFQHEZ25.js +30 -0
- package/dist/{reveal-X2QMWOVX.js → reveal-67RDQRIN.js} +6 -7
- package/dist/{reveal-X2QMWOVX.js.map → reveal-67RDQRIN.js.map} +1 -1
- package/dist/revoke-DQDZAZZM.js +23 -0
- package/dist/satellites/index.js +1 -2
- package/dist/schema-update/index.js +2 -3
- package/dist/sealed-record/index.js +12 -13
- package/dist/sealed-record/index.js.map +1 -1
- package/dist/search/index.js +4 -5
- package/dist/{seed-IX5NFSH5.js → seed-G42JYN56.js} +12 -13
- package/dist/{seed-IX5NFSH5.js.map → seed-G42JYN56.js.map} +1 -1
- package/dist/sequence/index.js +9 -10
- package/dist/session/index.js +9 -10
- package/dist/session/index.js.map +1 -1
- package/dist/shadow/index.js +2 -3
- package/dist/shadow/index.js.map +1 -1
- package/dist/share-link/index.js +0 -1
- package/dist/share-link/index.js.map +1 -1
- package/dist/signer-WAMDZHEN.js +24 -0
- package/dist/snapshots/index.js +10 -11
- package/dist/snapshots/index.js.map +1 -1
- package/dist/{stale-5I36LPVK.js → stale-DDL7WQEZ.js} +10 -11
- package/dist/storage-FLR73HHF.js +22 -0
- package/dist/store/index.js +0 -1
- package/dist/{store-coordination-provider-OLPNRMFO.js → store-coordination-provider-MEQ2MJQG.js} +10 -11
- package/dist/{store-coordination-provider-OLPNRMFO.js.map → store-coordination-provider-MEQ2MJQG.js.map} +1 -1
- package/dist/sync/index.js +10 -11
- package/dist/sync/index.js.map +1 -1
- package/dist/team/index.js +15 -16
- package/dist/tiers/index.js +11 -12
- package/dist/to/index.js +2 -3
- package/dist/to/index.js.map +1 -1
- package/dist/transactions/index.js +3 -4
- package/dist/transactions/index.js.map +1 -1
- package/dist/{ulid-VQW6ERQN.js → ulid-4MKXG325.js} +1 -2
- package/dist/util/index.js +1 -2
- package/dist/util/index.js.map +1 -1
- package/dist/{vault-diff-FE5J35NJ.js → vault-diff-C6WUJFNP.js} +1 -2
- package/dist/vault-head/index.js +8 -9
- package/dist/vault-head/index.js.map +1 -1
- package/dist/{verify-WYOFLSNA.js → verify-KOV2G5D6.js} +5 -6
- package/dist/{verify-WYOFLSNA.js.map → verify-KOV2G5D6.js.map} +1 -1
- package/dist/walk-3UQBRMDV.js +21 -0
- package/dist/with-formula/derivations/dispatch.d.ts +16 -1
- package/dist/with-formula/derivations/registry.d.ts +20 -0
- package/dist/with-formula/derivations/trigger-match.d.ts +104 -0
- package/dist/with-formula/derivations/types.d.ts +61 -0
- package/dist/with-party/team/roster-epoch.d.ts +71 -0
- package/dist/with-party/team/roster-tag.d.ts +1 -1
- package/dist/with-shape/introspection/behaviors.d.ts +7 -0
- package/dist/with-shape/introspection/describe.d.ts +10 -1
- package/dist/with-shape/introspection/field-meta.d.ts +86 -0
- package/dist/withdraw-accessible-EL5GXZBS.js +27 -0
- package/package.json +8 -3
- package/dist/api-OAZLPNVV.js +0 -20
- package/dist/chunk-4FPEWQKF.js.map +0 -1
- package/dist/chunk-5263OEM3.js +0 -344
- package/dist/chunk-5263OEM3.js.map +0 -1
- package/dist/chunk-GU3LQYW2.js.map +0 -1
- package/dist/chunk-JBIV4FLR.js.map +0 -1
- package/dist/chunk-JJZIIJSA.js.map +0 -1
- package/dist/chunk-KHKKD62N.js.map +0 -1
- package/dist/chunk-NO272T7Q.js.map +0 -1
- package/dist/chunk-OMHHGOG4.js.map +0 -1
- package/dist/chunk-P6ASQOZR.js.map +0 -1
- package/dist/chunk-PRHCMEUK.js.map +0 -1
- package/dist/chunk-PZ5AY32C.js +0 -10
- package/dist/chunk-RDHUZ674.js.map +0 -1
- package/dist/chunk-VAG47QHV.js +0 -81
- package/dist/chunk-VAG47QHV.js.map +0 -1
- package/dist/chunk-VVAVTSTR.js.map +0 -1
- package/dist/chunk-YPSOHDNC.js.map +0 -1
- package/dist/chunk-ZTYG36DH.js.map +0 -1
- package/dist/collection-facade-6IY2LW6W.js +0 -45
- package/dist/computed-ASBNTLOK.js +0 -11
- package/dist/derive-TCTS7ULE.js +0 -22
- package/dist/dispatch-FNCCONFK.js +0 -194
- package/dist/dispatch-FNCCONFK.js.map +0 -1
- package/dist/executor-AFHQYRAU.js +0 -9
- package/dist/executor-CDIMJVE2.js +0 -29
- package/dist/executor-YYDW6XQI.js +0 -9
- package/dist/export-accessible-WADNWX35.js +0 -23
- package/dist/extract-partition-SHQYQSWE.js +0 -38
- package/dist/find-SZBL2HPB.js +0 -11
- package/dist/issue-2DGG7NKE.js +0 -19
- package/dist/liberate-7NEPRE52.js +0 -25
- package/dist/link-set-WHTYVTOV.js +0 -31
- package/dist/noydb-BQ3ZTN2Z.js +0 -86
- package/dist/register-GLCOH73C.js +0 -32
- package/dist/registry-GWGHZWGP.js +0 -19
- package/dist/registry-IWFMXCHX.js +0 -9
- package/dist/registry-Q3FG3OAX.js +0 -9
- package/dist/registry-T346IZCF.js +0 -18
- package/dist/request-withdrawal-2RERJECX.js +0 -31
- package/dist/revoke-4NRSCPNW.js +0 -24
- package/dist/signer-HJHTGX7X.js +0 -25
- package/dist/storage-ZYYAB3J3.js +0 -23
- package/dist/walk-LTV7LOCN.js +0 -21
- package/dist/withdraw-accessible-V4XCPH7U.js +0 -28
- package/dist/withdraw-accessible-V4XCPH7U.js.map +0 -1
- package/dist/zod-HAJM7LMS.js +0 -14763
- package/dist/zod-HAJM7LMS.js.map +0 -1
- /package/dist/{api-OAZLPNVV.js.map → api-TXFOVOXX.js.map} +0 -0
- /package/dist/{chunk-X6TBQKHW.js.map → chunk-2577DKXB.js.map} +0 -0
- /package/dist/{chunk-L3FHEWA3.js.map → chunk-2N4GY74U.js.map} +0 -0
- /package/dist/{chunk-626TSARM.js.map → chunk-2Y4IMKA6.js.map} +0 -0
- /package/dist/{chunk-7CWII4BL.js.map → chunk-3RCJJBNR.js.map} +0 -0
- /package/dist/{chunk-M7UC2QPT.js.map → chunk-453F654R.js.map} +0 -0
- /package/dist/{chunk-2QNKXGUS.js.map → chunk-4GVM6QZA.js.map} +0 -0
- /package/dist/{chunk-AB5P32RE.js.map → chunk-4OZNXTO4.js.map} +0 -0
- /package/dist/{chunk-L3HDEHGM.js.map → chunk-5VCRVKOZ.js.map} +0 -0
- /package/dist/{chunk-6AQIFBSP.js.map → chunk-5WDXHNSW.js.map} +0 -0
- /package/dist/{chunk-BOFRKAUS.js.map → chunk-6GMZ7HEE.js.map} +0 -0
- /package/dist/{chunk-XBFEKTIY.js.map → chunk-6I2RQCET.js.map} +0 -0
- /package/dist/{chunk-UCUALOSM.js.map → chunk-6YXCPL4T.js.map} +0 -0
- /package/dist/{chunk-BYBB4ABD.js.map → chunk-77K4PG6P.js.map} +0 -0
- /package/dist/{chunk-S2VG3ABP.js.map → chunk-7MG2LHO5.js.map} +0 -0
- /package/dist/{chunk-EO2KGKEJ.js.map → chunk-7V4TP3AF.js.map} +0 -0
- /package/dist/{chunk-LFDMKZIP.js.map → chunk-ANATMFIO.js.map} +0 -0
- /package/dist/{chunk-T3PHCEN4.js.map → chunk-ANSIZYEG.js.map} +0 -0
- /package/dist/{chunk-ZKRRBRSZ.js.map → chunk-AO42KJO6.js.map} +0 -0
- /package/dist/{chunk-VFIWDPXZ.js.map → chunk-BLN54W3L.js.map} +0 -0
- /package/dist/{chunk-ZQ2UUHSL.js.map → chunk-BM5TWITZ.js.map} +0 -0
- /package/dist/{chunk-WLFABTZ6.js.map → chunk-BOET4NA4.js.map} +0 -0
- /package/dist/{chunk-FOG7YEJP.js.map → chunk-BOWNCWZT.js.map} +0 -0
- /package/dist/{chunk-7XODKGTW.js.map → chunk-BSFNRLK2.js.map} +0 -0
- /package/dist/{chunk-J4MN6XIU.js.map → chunk-BZ3534YM.js.map} +0 -0
- /package/dist/{chunk-IF56DYJK.js.map → chunk-CPWQB3N5.js.map} +0 -0
- /package/dist/{chunk-SHILAQH5.js.map → chunk-DGOZ4UZD.js.map} +0 -0
- /package/dist/{chunk-BWWUXE3L.js.map → chunk-ELNXJMGB.js.map} +0 -0
- /package/dist/{chunk-44C2URL7.js.map → chunk-EQEYOJBM.js.map} +0 -0
- /package/dist/{chunk-Y3XWRDAM.js.map → chunk-EYBQEIUY.js.map} +0 -0
- /package/dist/{chunk-Z7ZXZL6Y.js.map → chunk-FAHMLERK.js.map} +0 -0
- /package/dist/{chunk-EXDIHWFO.js.map → chunk-FMZY5Q6L.js.map} +0 -0
- /package/dist/{chunk-H6WXKZL7.js.map → chunk-FXBIP2WD.js.map} +0 -0
- /package/dist/{chunk-672U6STZ.js.map → chunk-GPEQUXHL.js.map} +0 -0
- /package/dist/{chunk-Z2PWOSCJ.js.map → chunk-GY4WYNNG.js.map} +0 -0
- /package/dist/{chunk-4A4TYISP.js.map → chunk-JBDFMYKQ.js.map} +0 -0
- /package/dist/{chunk-POS53FG6.js.map → chunk-JMGDHKQF.js.map} +0 -0
- /package/dist/{chunk-Q7GEDVHC.js.map → chunk-K6LHRFBL.js.map} +0 -0
- /package/dist/{chunk-4JDIRUTT.js.map → chunk-K7NTTA6P.js.map} +0 -0
- /package/dist/{chunk-26W5VETY.js.map → chunk-KG7TZKZG.js.map} +0 -0
- /package/dist/{chunk-RJ7RIIX6.js.map → chunk-KJIMGIWO.js.map} +0 -0
- /package/dist/{chunk-F7ZFRPGQ.js.map → chunk-KTFRCC5C.js.map} +0 -0
- /package/dist/{chunk-HSGEIMJS.js.map → chunk-KUJDV5QH.js.map} +0 -0
- /package/dist/{chunk-UPJMBMCR.js.map → chunk-L742JPKZ.js.map} +0 -0
- /package/dist/{chunk-4TZUFNXL.js.map → chunk-L7CIOOBW.js.map} +0 -0
- /package/dist/{chunk-7LYUJNU3.js.map → chunk-LWBCUYZW.js.map} +0 -0
- /package/dist/{chunk-JHLJQUXU.js.map → chunk-MUM7IANK.js.map} +0 -0
- /package/dist/{chunk-2GXEQUEX.js.map → chunk-MVMXZYXT.js.map} +0 -0
- /package/dist/{chunk-XLPXGN66.js.map → chunk-NA2NIJZI.js.map} +0 -0
- /package/dist/{chunk-S6YB5ZRP.js.map → chunk-NKHRDYOR.js.map} +0 -0
- /package/dist/{chunk-XJ3FEKEY.js.map → chunk-NQKIUNW5.js.map} +0 -0
- /package/dist/{chunk-6NRVFD55.js.map → chunk-PT43Y56J.js.map} +0 -0
- /package/dist/{chunk-5ACAVJUI.js.map → chunk-Q2PU57HC.js.map} +0 -0
- /package/dist/{chunk-E6YA6UAP.js.map → chunk-Q7HZX3IF.js.map} +0 -0
- /package/dist/{chunk-4ZPE6SKS.js.map → chunk-QIBVIOXO.js.map} +0 -0
- /package/dist/{chunk-WLLUM35R.js.map → chunk-QIZPZMUI.js.map} +0 -0
- /package/dist/{chunk-LKFKXS5K.js.map → chunk-RMF67KCG.js.map} +0 -0
- /package/dist/{chunk-YCSM3GZU.js.map → chunk-RMS3NEA3.js.map} +0 -0
- /package/dist/{chunk-OPXR4PB2.js.map → chunk-SFAWCTEM.js.map} +0 -0
- /package/dist/{chunk-3QARDAYW.js.map → chunk-SKGMN35F.js.map} +0 -0
- /package/dist/{chunk-W5LHQXZU.js.map → chunk-SL3JAAKN.js.map} +0 -0
- /package/dist/{chunk-UALOYGCP.js.map → chunk-SPYWXKJN.js.map} +0 -0
- /package/dist/{chunk-QU3YUP2X.js.map → chunk-SZJ3DLZA.js.map} +0 -0
- /package/dist/{chunk-225O5CXQ.js.map → chunk-TFR7DSOV.js.map} +0 -0
- /package/dist/{chunk-X67FCULK.js.map → chunk-TRGTKX5E.js.map} +0 -0
- /package/dist/{chunk-JVLSU7S2.js.map → chunk-TUFM4UZP.js.map} +0 -0
- /package/dist/{chunk-HTGRQZFB.js.map → chunk-UGTBXF5U.js.map} +0 -0
- /package/dist/{chunk-THNJ3IKU.js.map → chunk-ULUMAZ5S.js.map} +0 -0
- /package/dist/{chunk-XDVVBETV.js.map → chunk-UXVWEX5L.js.map} +0 -0
- /package/dist/{chunk-FKFIEEY6.js.map → chunk-UXWB3FPF.js.map} +0 -0
- /package/dist/{chunk-CBRS2NEK.js.map → chunk-VTFVLCUH.js.map} +0 -0
- /package/dist/{chunk-TOV6VMHF.js.map → chunk-VXANTWBJ.js.map} +0 -0
- /package/dist/{chunk-VSLUSXVK.js.map → chunk-VXGSWL6L.js.map} +0 -0
- /package/dist/{chunk-HQINBNHM.js.map → chunk-WEQEYLCS.js.map} +0 -0
- /package/dist/{chunk-U6GCYG2T.js.map → chunk-X2DLENDQ.js.map} +0 -0
- /package/dist/{chunk-XVU7J43V.js.map → chunk-XLMEZIAJ.js.map} +0 -0
- /package/dist/{chunk-ILSR22WM.js.map → chunk-XTXOCYOJ.js.map} +0 -0
- /package/dist/{chunk-KDJGJR7F.js.map → chunk-YSRUYAVU.js.map} +0 -0
- /package/dist/{chunk-NLKLXXTO.js.map → chunk-YYP7WSEB.js.map} +0 -0
- /package/dist/{chunk-4G25SDQL.js.map → chunk-ZN4FD4PE.js.map} +0 -0
- /package/dist/{chunk-XSN63FUS.js.map → chunk-ZORTV6NH.js.map} +0 -0
- /package/dist/{chunk-S3I7VKID.js.map → chunk-ZVO4QVPD.js.map} +0 -0
- /package/dist/{chunk-PZ5AY32C.js.map → collection-facade-4GRREZ6C.js.map} +0 -0
- /package/dist/{collection-facade-6IY2LW6W.js.map → computed-VPOKQK4N.js.map} +0 -0
- /package/dist/{computed-ASBNTLOK.js.map → derive-6O5SWQKN.js.map} +0 -0
- /package/dist/{derive-TCTS7ULE.js.map → enclave-KJOTOH7X.js.map} +0 -0
- /package/dist/{enclave-4P4KH5ZW.js.map → executor-5NIMLSKZ.js.map} +0 -0
- /package/dist/{executor-AFHQYRAU.js.map → executor-AQVXV5GZ.js.map} +0 -0
- /package/dist/{executor-CDIMJVE2.js.map → executor-PUAO6AKJ.js.map} +0 -0
- /package/dist/{executor-YYDW6XQI.js.map → export-accessible-72EQNBMR.js.map} +0 -0
- /package/dist/{export-accessible-WADNWX35.js.map → extract-partition-PUYNU3UF.js.map} +0 -0
- /package/dist/{extract-partition-SHQYQSWE.js.map → find-2ABFCZX4.js.map} +0 -0
- /package/dist/{find-SZBL2HPB.js.map → issue-SIDORTSZ.js.map} +0 -0
- /package/dist/{issue-2DGG7NKE.js.map → ledger-F33ZVMTK.js.map} +0 -0
- /package/dist/{ledger-4X5ZH43X.js.map → liberate-LCDPNAG2.js.map} +0 -0
- /package/dist/{liberate-7NEPRE52.js.map → link-set-FKNWAYKS.js.map} +0 -0
- /package/dist/{link-set-WHTYVTOV.js.map → managed-secret-PQYKSR6T.js.map} +0 -0
- /package/dist/{managed-secret-CXALLEUB.js.map → noydb-DUXZPKSN.js.map} +0 -0
- /package/dist/{noydb-BQ3ZTN2Z.js.map → read-only-facade-BIGO37U3.js.map} +0 -0
- /package/dist/{read-only-facade-CHCKSEPD.js.map → register-I2DZXGAR.js.map} +0 -0
- /package/dist/{register-GLCOH73C.js.map → registry-23WF3TGH.js.map} +0 -0
- /package/dist/{registry-GWGHZWGP.js.map → registry-4AYVUNXK.js.map} +0 -0
- /package/dist/{registry-IWFMXCHX.js.map → registry-VSSQPIGF.js.map} +0 -0
- /package/dist/{registry-Q3FG3OAX.js.map → registry-YLEWMGAC.js.map} +0 -0
- /package/dist/{registry-T346IZCF.js.map → request-withdrawal-KFQHEZ25.js.map} +0 -0
- /package/dist/{request-withdrawal-2RERJECX.js.map → revoke-DQDZAZZM.js.map} +0 -0
- /package/dist/{revoke-4NRSCPNW.js.map → signer-WAMDZHEN.js.map} +0 -0
- /package/dist/{signer-HJHTGX7X.js.map → stale-DDL7WQEZ.js.map} +0 -0
- /package/dist/{stale-5I36LPVK.js.map → storage-FLR73HHF.js.map} +0 -0
- /package/dist/{storage-ZYYAB3J3.js.map → ulid-4MKXG325.js.map} +0 -0
- /package/dist/{ulid-VQW6ERQN.js.map → vault-diff-C6WUJFNP.js.map} +0 -0
- /package/dist/{vault-diff-FE5J35NJ.js.map → walk-3UQBRMDV.js.map} +0 -0
- /package/dist/{walk-LTV7LOCN.js.map → withdraw-accessible-EL5GXZBS.js.map} +0 -0
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
resolveStaleOnRead
|
|
3
|
-
} from "./chunk-VAG47QHV.js";
|
|
4
1
|
import {
|
|
5
2
|
isManifestReservedCollection
|
|
6
3
|
} from "./chunk-EPFF7LOX.js";
|
|
@@ -10,20 +7,21 @@ import {
|
|
|
10
7
|
isLinkCollectionName,
|
|
11
8
|
linkCollectionName,
|
|
12
9
|
linkRowKey
|
|
13
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QIZPZMUI.js";
|
|
14
11
|
import {
|
|
15
12
|
hashFields,
|
|
16
13
|
validateSatelliteDeclaration
|
|
17
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-TUFM4UZP.js";
|
|
15
|
+
import {
|
|
16
|
+
resolveStaleOnRead
|
|
17
|
+
} from "./chunk-SMH6SRX7.js";
|
|
18
18
|
import {
|
|
19
19
|
loadFence
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-453F654R.js";
|
|
21
21
|
import {
|
|
22
|
-
VectorSet,
|
|
23
22
|
buildPersistedIndexCallbacks,
|
|
24
|
-
encodeVecId,
|
|
25
23
|
syncTierSearch
|
|
26
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-SPXXX5E4.js";
|
|
27
25
|
import {
|
|
28
26
|
isBaseLive,
|
|
29
27
|
liveBaseIdSet
|
|
@@ -33,54 +31,78 @@ import {
|
|
|
33
31
|
} from "./chunk-6LJY7X5A.js";
|
|
34
32
|
import {
|
|
35
33
|
NO_ATTESTATION
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import {
|
|
38
|
-
NO_CLASSIFIED,
|
|
39
|
-
guardClassifiedCompat,
|
|
40
|
-
resolveClassifiedFields
|
|
41
|
-
} from "./chunk-L3HDEHGM.js";
|
|
34
|
+
} from "./chunk-Q7HZX3IF.js";
|
|
42
35
|
import {
|
|
43
36
|
NO_TIERS,
|
|
44
37
|
classifySealedShred,
|
|
45
38
|
syncDerivedOutputs
|
|
46
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-KJIMGIWO.js";
|
|
47
40
|
import {
|
|
48
41
|
NO_PORTABILITY
|
|
49
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-BZ3534YM.js";
|
|
50
43
|
import {
|
|
51
44
|
NO_CARGO
|
|
52
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-NQKIUNW5.js";
|
|
53
46
|
import {
|
|
54
47
|
saveSealedSecret
|
|
55
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-4GVM6QZA.js";
|
|
56
49
|
import {
|
|
57
50
|
runDrainBarrier
|
|
58
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-VTFVLCUH.js";
|
|
59
52
|
import {
|
|
60
|
-
fallbackDerivationName
|
|
61
|
-
|
|
62
|
-
} from "./chunk-KHKKD62N.js";
|
|
63
|
-
import {
|
|
64
|
-
derivePersistedSchema,
|
|
65
|
-
isZod4Schema
|
|
66
|
-
} from "./chunk-P6ASQOZR.js";
|
|
67
|
-
import {
|
|
68
|
-
loadPersistedSchema
|
|
69
|
-
} from "./chunk-626TSARM.js";
|
|
53
|
+
fallbackDerivationName
|
|
54
|
+
} from "./chunk-RXLYKVTF.js";
|
|
70
55
|
import {
|
|
71
56
|
NO_SEQUENCE,
|
|
72
57
|
SEQUENCE_COLLECTION,
|
|
73
58
|
compileSequenceFormat,
|
|
74
59
|
resolveSequenceKey
|
|
75
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-ZVO4QVPD.js";
|
|
76
61
|
import {
|
|
77
62
|
CustodyApi,
|
|
78
63
|
NO_CUSTODY
|
|
79
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-GPEQUXHL.js";
|
|
80
65
|
import {
|
|
81
66
|
DEFAULT_POSTURE,
|
|
82
|
-
|
|
83
|
-
|
|
67
|
+
EXPORT_REDACTION_MARKER,
|
|
68
|
+
ViaGraph,
|
|
69
|
+
ViaPipeline,
|
|
70
|
+
buildDescription,
|
|
71
|
+
collectKnownFieldNames,
|
|
72
|
+
computedEntryParts,
|
|
73
|
+
deriveZodFields,
|
|
74
|
+
exportRedact,
|
|
75
|
+
guardReconcileCollisions,
|
|
76
|
+
mergeViaFields,
|
|
77
|
+
resolveCollectionConfig,
|
|
78
|
+
resolveComputedEdges,
|
|
79
|
+
resolveDescribeFieldIds,
|
|
80
|
+
resolveVirtualMoneyFields
|
|
81
|
+
} from "./chunk-2C3AQB46.js";
|
|
82
|
+
import {
|
|
83
|
+
findMatchingIdsByPairs
|
|
84
|
+
} from "./chunk-TFMM5DBB.js";
|
|
85
|
+
import {
|
|
86
|
+
encodeVecId
|
|
87
|
+
} from "./chunk-RTBJ5IOO.js";
|
|
88
|
+
import {
|
|
89
|
+
NO_CLASSIFIED,
|
|
90
|
+
guardClassifiedCompat,
|
|
91
|
+
resolveClassifiedFields
|
|
92
|
+
} from "./chunk-5VCRVKOZ.js";
|
|
93
|
+
import {
|
|
94
|
+
derivePersistedSchema
|
|
95
|
+
} from "./chunk-REDOOY2Q.js";
|
|
96
|
+
import {
|
|
97
|
+
findRollupSpecForIntent,
|
|
98
|
+
forgetDerivedFanout,
|
|
99
|
+
ledgerAuditHook,
|
|
100
|
+
putDerivedOutput,
|
|
101
|
+
resolveRollupDeleteIntents,
|
|
102
|
+
runGraphDispatchWave,
|
|
103
|
+
selfWriteFieldEqual,
|
|
104
|
+
touchFor
|
|
105
|
+
} from "./chunk-CARABLSQ.js";
|
|
84
106
|
import {
|
|
85
107
|
buildLookupAltIndex,
|
|
86
108
|
buildLookupSnapshotRows,
|
|
@@ -89,25 +111,16 @@ import {
|
|
|
89
111
|
coerceLookupKey,
|
|
90
112
|
collectLookupDictCompat,
|
|
91
113
|
enforceStaticDictOnPut,
|
|
92
|
-
findRollupSpecForIntent,
|
|
93
|
-
forgetDerivedFanout,
|
|
94
|
-
isLookupDescriptor,
|
|
95
|
-
ledgerAuditHook,
|
|
96
114
|
matchesReferencingValue,
|
|
97
|
-
putDerivedOutput,
|
|
98
115
|
registerLookupRefEdges,
|
|
99
116
|
reservedDictDepsOf,
|
|
100
117
|
resolveDictSource,
|
|
101
118
|
resolveLabelFromMap,
|
|
102
|
-
resolveRollupDeleteIntents,
|
|
103
|
-
runGraphDispatchWave,
|
|
104
|
-
selfWriteFieldEqual,
|
|
105
|
-
touchFor,
|
|
106
119
|
updateReferencingRecords
|
|
107
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-U4FOQDY4.js";
|
|
108
121
|
import {
|
|
109
122
|
OverlayedCollection
|
|
110
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-SKGMN35F.js";
|
|
111
124
|
import {
|
|
112
125
|
INDEXED_STORE_POLICY,
|
|
113
126
|
NO_SYNC
|
|
@@ -122,7 +135,7 @@ import {
|
|
|
122
135
|
resolvePeriodKey,
|
|
123
136
|
resolveReopenState,
|
|
124
137
|
samePartition
|
|
125
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-PT43Y56J.js";
|
|
126
139
|
import {
|
|
127
140
|
PERIODS_COLLECTION,
|
|
128
141
|
PERIOD_ARCHIVES_COLLECTION,
|
|
@@ -130,7 +143,7 @@ import {
|
|
|
130
143
|
PERIOD_REOPENS_COLLECTION,
|
|
131
144
|
PERIOD_TARGET_PURGES_COLLECTION,
|
|
132
145
|
periodExclusiveUpperBound
|
|
133
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-FAHMLERK.js";
|
|
134
147
|
import {
|
|
135
148
|
NO_SHADOW
|
|
136
149
|
} from "./chunk-SMY5X46Z.js";
|
|
@@ -140,7 +153,7 @@ import {
|
|
|
140
153
|
import {
|
|
141
154
|
TxContext,
|
|
142
155
|
bestEffortRevert
|
|
143
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-BLN54W3L.js";
|
|
144
157
|
import {
|
|
145
158
|
lazy
|
|
146
159
|
} from "./chunk-5D2ALSM5.js";
|
|
@@ -148,34 +161,35 @@ import {
|
|
|
148
161
|
InvertedIndex,
|
|
149
162
|
MemoryIndexStore,
|
|
150
163
|
NO_SEARCH
|
|
151
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-UXWB3FPF.js";
|
|
152
165
|
import {
|
|
153
166
|
NO_SEALED_RECORD
|
|
154
|
-
} from "./chunk-
|
|
167
|
+
} from "./chunk-6YXCPL4T.js";
|
|
155
168
|
import {
|
|
156
169
|
Query,
|
|
157
170
|
ScanBuilder
|
|
158
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-7MG2LHO5.js";
|
|
159
172
|
import {
|
|
160
173
|
EXPORT_AUDIT_COLLECTION,
|
|
161
174
|
NO_BLOBS,
|
|
162
175
|
createExportBlobsHandle,
|
|
163
176
|
runCompaction
|
|
164
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-AO42KJO6.js";
|
|
165
178
|
import {
|
|
166
179
|
LazyQuery,
|
|
167
180
|
NO_INDEXING,
|
|
168
181
|
decodeIdxId,
|
|
169
182
|
encodeIdxId
|
|
170
|
-
} from "./chunk-
|
|
183
|
+
} from "./chunk-KTFRCC5C.js";
|
|
171
184
|
import {
|
|
172
185
|
normalizeIndexDefs
|
|
173
186
|
} from "./chunk-I3ISCYT7.js";
|
|
174
187
|
import {
|
|
175
|
-
IMPLICIT_LAZY
|
|
176
|
-
|
|
188
|
+
IMPLICIT_LAZY
|
|
189
|
+
} from "./chunk-66TQOPFM.js";
|
|
190
|
+
import {
|
|
177
191
|
estimateRecordBytes
|
|
178
|
-
} from "./chunk-
|
|
192
|
+
} from "./chunk-V4PXLYWM.js";
|
|
179
193
|
import {
|
|
180
194
|
canonicalGroupKey
|
|
181
195
|
} from "./chunk-XZHEOSQ2.js";
|
|
@@ -190,19 +204,17 @@ import {
|
|
|
190
204
|
} from "./chunk-PVEWA2DU.js";
|
|
191
205
|
import {
|
|
192
206
|
dictCollectionName
|
|
193
|
-
} from "./chunk-
|
|
207
|
+
} from "./chunk-6I2RQCET.js";
|
|
194
208
|
import {
|
|
195
209
|
NO_I18N,
|
|
196
210
|
getAtPath,
|
|
197
211
|
isDictCollectionName,
|
|
198
|
-
isDictKeyDescriptor,
|
|
199
|
-
isI18nTextDescriptor,
|
|
200
212
|
isStaticDictDescriptor
|
|
201
|
-
} from "./chunk-
|
|
213
|
+
} from "./chunk-TRGTKX5E.js";
|
|
202
214
|
import {
|
|
203
215
|
isViaInstalled,
|
|
204
216
|
viaBinder
|
|
205
|
-
} from "./chunk-
|
|
217
|
+
} from "./chunk-UXVWEX5L.js";
|
|
206
218
|
import {
|
|
207
219
|
NO_TEAM,
|
|
208
220
|
describeAllUsersAuth,
|
|
@@ -225,7 +237,7 @@ import {
|
|
|
225
237
|
saveShamirRecoveryEntries,
|
|
226
238
|
updateAuthenticator,
|
|
227
239
|
writeMagicLinkGrant
|
|
228
|
-
} from "./chunk-
|
|
240
|
+
} from "./chunk-RRNRNANG.js";
|
|
229
241
|
import {
|
|
230
242
|
assertKeyringOpenAllowed,
|
|
231
243
|
buildRecipientKeyringFile,
|
|
@@ -240,15 +252,15 @@ import {
|
|
|
240
252
|
listUsers,
|
|
241
253
|
loadKeyring,
|
|
242
254
|
updateKeyringIdentity
|
|
243
|
-
} from "./chunk-
|
|
255
|
+
} from "./chunk-G56KBWFY.js";
|
|
244
256
|
import {
|
|
245
257
|
persistDirectoryConfig,
|
|
246
258
|
readDirectoryConfig
|
|
247
|
-
} from "./chunk-
|
|
259
|
+
} from "./chunk-KG7TZKZG.js";
|
|
248
260
|
import {
|
|
249
261
|
NO_BROKER,
|
|
250
262
|
buildCredentialBrokerHandle
|
|
251
|
-
} from "./chunk-
|
|
263
|
+
} from "./chunk-JBDFMYKQ.js";
|
|
252
264
|
import {
|
|
253
265
|
NO_SESSION
|
|
254
266
|
} from "./chunk-VKQCVU2Z.js";
|
|
@@ -257,16 +269,16 @@ import {
|
|
|
257
269
|
} from "./chunk-4AOERLTV.js";
|
|
258
270
|
import {
|
|
259
271
|
NO_HISTORY
|
|
260
|
-
} from "./chunk-
|
|
272
|
+
} from "./chunk-X2DLENDQ.js";
|
|
261
273
|
import {
|
|
262
274
|
sha256Hex
|
|
263
|
-
} from "./chunk-
|
|
275
|
+
} from "./chunk-BOET4NA4.js";
|
|
264
276
|
import {
|
|
265
277
|
assertCutoverTierSafe,
|
|
266
278
|
assertTierWritable,
|
|
267
279
|
dekKey,
|
|
268
280
|
liveRecordIsElevated
|
|
269
|
-
} from "./chunk-
|
|
281
|
+
} from "./chunk-JMGDHKQF.js";
|
|
270
282
|
import {
|
|
271
283
|
NO_VAULT_HEAD
|
|
272
284
|
} from "./chunk-HK67PX4J.js";
|
|
@@ -278,7 +290,7 @@ import {
|
|
|
278
290
|
readDottedPath,
|
|
279
291
|
rebuildSubjectIndex,
|
|
280
292
|
removeSubjectRef
|
|
281
|
-
} from "./chunk-
|
|
293
|
+
} from "./chunk-7V4TP3AF.js";
|
|
282
294
|
import {
|
|
283
295
|
RecordCodec,
|
|
284
296
|
SEALED_CEK_NS,
|
|
@@ -294,20 +306,20 @@ import {
|
|
|
294
306
|
rewrapBodyToDek,
|
|
295
307
|
validateSchemaInput,
|
|
296
308
|
verifyRecordIdentity
|
|
297
|
-
} from "./chunk-
|
|
309
|
+
} from "./chunk-77K4PG6P.js";
|
|
298
310
|
import {
|
|
299
311
|
buildDeleteMarker,
|
|
300
312
|
buildRecordEnvelope,
|
|
301
313
|
buildTombstone,
|
|
302
314
|
isDeleteMarker,
|
|
303
315
|
isTombstone
|
|
304
|
-
} from "./chunk-
|
|
316
|
+
} from "./chunk-SZJ3DLZA.js";
|
|
305
317
|
import {
|
|
306
318
|
encrypt
|
|
307
|
-
} from "./chunk-
|
|
319
|
+
} from "./chunk-SL3JAAKN.js";
|
|
308
320
|
import {
|
|
309
321
|
SealedHandle
|
|
310
|
-
} from "./chunk-
|
|
322
|
+
} from "./chunk-7MG7SJT7.js";
|
|
311
323
|
import {
|
|
312
324
|
AlreadyElevatedError,
|
|
313
325
|
AttestationError,
|
|
@@ -320,7 +332,6 @@ import {
|
|
|
320
332
|
EchoCeremonyRequiredError,
|
|
321
333
|
ElevationExpiredError,
|
|
322
334
|
ExportCapabilityError,
|
|
323
|
-
FieldNotQueryableError,
|
|
324
335
|
ForgetStrategyNotConfiguredError,
|
|
325
336
|
ImportCapabilityError,
|
|
326
337
|
IndexWriteFailureError,
|
|
@@ -347,10 +358,9 @@ import {
|
|
|
347
358
|
USER_ENVELOPE_COLLECTION,
|
|
348
359
|
UniqueConstraintError,
|
|
349
360
|
UnsupportedIndexOptionError,
|
|
350
|
-
UnsupportedTierCompositionError,
|
|
351
361
|
ValidationError,
|
|
352
362
|
isConflictError
|
|
353
|
-
} from "./chunk-
|
|
363
|
+
} from "./chunk-7O3Y4PPD.js";
|
|
354
364
|
|
|
355
365
|
// src/kernel/merge-authority.ts
|
|
356
366
|
function buildMergeAuthority(keyring) {
|
|
@@ -530,7 +540,7 @@ function validateSecretModeOptions(options) {
|
|
|
530
540
|
}
|
|
531
541
|
async function resolveEffectiveSecret(options, store, vault) {
|
|
532
542
|
if (options.secretMode === "managed") {
|
|
533
|
-
const { resolveManagedSecret } = await import("./managed-secret-
|
|
543
|
+
const { resolveManagedSecret } = await import("./managed-secret-PQYKSR6T.js");
|
|
534
544
|
return resolveManagedSecret(store, vault, options.sealingKey);
|
|
535
545
|
}
|
|
536
546
|
return options.secret;
|
|
@@ -548,7 +558,7 @@ function ownerKeyringOptions(options, secret) {
|
|
|
548
558
|
|
|
549
559
|
// src/port/by/default-provider.ts
|
|
550
560
|
async function createDefaultMesh(store) {
|
|
551
|
-
const { StoreMesh } = await import("./store-coordination-provider-
|
|
561
|
+
const { StoreMesh } = await import("./store-coordination-provider-MEQ2MJQG.js");
|
|
552
562
|
return new StoreMesh(store);
|
|
553
563
|
}
|
|
554
564
|
|
|
@@ -603,370 +613,6 @@ function populateCollectionRegistries(r, collectionName, options, effectiveViaFi
|
|
|
603
613
|
}
|
|
604
614
|
}
|
|
605
615
|
|
|
606
|
-
// src/kernel/via/pipeline.ts
|
|
607
|
-
var ViaPipeline = class _ViaPipeline {
|
|
608
|
-
constructor(bindings, taint) {
|
|
609
|
-
this.bindings = bindings;
|
|
610
|
-
this.taint = taint;
|
|
611
|
-
const moneyVias = bindings.filter((b) => b.brand === "money");
|
|
612
|
-
const computedVias = bindings.filter((b) => b.brand === "computed");
|
|
613
|
-
const restBindings = bindings.filter((b) => b.brand !== "money" && b.brand !== "computed");
|
|
614
|
-
this._presentOrder = [...moneyVias, ...computedVias, ...restBindings];
|
|
615
|
-
this._presentLateBoundary = moneyVias.length + computedVias.length;
|
|
616
|
-
}
|
|
617
|
-
bindings;
|
|
618
|
-
taint;
|
|
619
|
-
/**
|
|
620
|
-
* Present-phase-ONLY order (#665, corrected under #665 review) — a stable
|
|
621
|
-
* THREE-WAY partition of `bindings` computed once here at construction:
|
|
622
|
-
* every `'money'`-brand binding first (existing relative order), then
|
|
623
|
-
* every `'computed'`-brand binding (existing relative order), then
|
|
624
|
-
* everything else (existing relative order). `present()` folds over this
|
|
625
|
-
* instead of `bindings` so a `mode: 'virtual'` computed field's value
|
|
626
|
-
* exists before i18n/lookup's dressing `present()` hooks run on it
|
|
627
|
-
* (today's `compileVias` order is money→i18n→lookup→classified→
|
|
628
|
-
* blob→computed, `collection-config.ts:554`, so dressing unconditionally
|
|
629
|
-
* ran BEFORE the value it dresses existed). This reorder is binding-level,
|
|
630
|
-
* not conditioned on any particular field composition — it applies to
|
|
631
|
-
* EVERY collection that compiles a `'computed'` binding at all, not only
|
|
632
|
-
* ones stacking a dresser on the SAME field as a computed one. EVERY other
|
|
633
|
-
* phase (`ingest`/`encodeWrite`/`encodeAtRest`/`enforceWrite`/etc.) keeps
|
|
634
|
-
* folding over `bindings` unchanged — those write/query phases need
|
|
635
|
-
* money-first (`_applyMoneyFields` PREPENDS money, `_applyClassifiedFields`
|
|
636
|
-
* APPENDS classified to preserve it, `kernel/collection.ts:1275-1284,1364-
|
|
637
|
-
* 1368`).
|
|
638
|
-
*
|
|
639
|
-
* Money is deliberately carved OUT of the generic "everything else" slice
|
|
640
|
-
* and kept FIRST — the original two-way `[computed..., rest...]` partition
|
|
641
|
-
* regressed money's composed-field behavior from a benign missing-dressing
|
|
642
|
-
* gap into VALUE CORRUPTION: money's `present()` DECODES its input as a
|
|
643
|
-
* STORED SCALED-INT (and derives `<field>Formatted` from it) — it is not a
|
|
644
|
-
* pure dressing CONSUMER like i18n/lookup, which only ADD a `<field>Label`
|
|
645
|
-
* key and never rewrite the field's own value. Running money AFTER
|
|
646
|
-
* computed on a field composing `computed(virtual)` + `money(...)` on
|
|
647
|
-
* ITSELF means money's decode sees the virtual field's raw MAJOR-unit
|
|
648
|
-
* output (e.g. `21`) and misreads it as a scaled-int, producing a
|
|
649
|
-
* corrupted value (`'0.21'`) instead of the pre-#665 result (the raw `21`
|
|
650
|
-
* surviving untouched, with no `Formatted` key added — a benign
|
|
651
|
-
* missing-dressing gap, not a wrong value). Money-first restores money's
|
|
652
|
-
* exact pre-#665 present position — byte-identical money behavior; the
|
|
653
|
-
* materialized composition pins from the #631 work and the money suites
|
|
654
|
-
* all ran under money-first. i18n/lookup are genuine dressing consumers
|
|
655
|
-
* (they only ADD, never rewrite), so they stay after computed, which is
|
|
656
|
-
* the fix #665 intended. A `'taint'` binding (appended LAST by
|
|
657
|
-
* `via/graph-wiring.ts#applyTaintOverlay`) stays last here too (it's
|
|
658
|
-
* neither money nor computed, so it lands at the tail of the "everything
|
|
659
|
-
* else" slice), preserving its "runs after computed, redacts tainted
|
|
660
|
-
* virtual output" contract (`via/taint-binding.ts`'s `taintBinding` doc
|
|
661
|
-
* comment).
|
|
662
|
-
*
|
|
663
|
-
* Money-dressing a virtual computed field's OWN output (the composed
|
|
664
|
-
* `computed(virtual) + money` case) is NOT resolved by this partition
|
|
665
|
-
* alone — #669 resolves it with a separate mid-fold hook instead:
|
|
666
|
-
* `NoydbVia.presentLate` runs after every binding's `present()` in this
|
|
667
|
-
* money+computed segment, before the "everything else" segment below, so
|
|
668
|
-
* money can quantize/reinterpret a virtual field's fresh MAJOR-UNITS
|
|
669
|
-
* output as if it were a stored value, without perturbing this ordering
|
|
670
|
-
* or the #665 invariant above it (`_presentLateBoundary` below marks
|
|
671
|
-
* exactly where that mid-fold point sits within `_presentOrder`).
|
|
672
|
-
*/
|
|
673
|
-
_presentOrder;
|
|
674
|
-
/** #669 — index into `_presentOrder` where the money+computed segment ends and the
|
|
675
|
-
* "everything else" segment begins (`moneyVias.length + computedVias.length`);
|
|
676
|
-
* `present()` runs every binding's `presentLate` at exactly this boundary. */
|
|
677
|
-
_presentLateBoundary;
|
|
678
|
-
/** undefined when there is nothing to enforce — the zero-via fast path is
|
|
679
|
-
* `this.via === undefined` (#553: keeps an all-plain collection sync). A
|
|
680
|
-
* `'*'`-defaulted output collection (#642) counts as "something to enforce"
|
|
681
|
-
* even with zero field-specific postures and zero bindings. */
|
|
682
|
-
static build(bindings, taint) {
|
|
683
|
-
if (bindings.length === 0 && (!taint || taint.postures.size === 0 && taint.defaultPosture === void 0)) return void 0;
|
|
684
|
-
return new _ViaPipeline(bindings, taint);
|
|
685
|
-
}
|
|
686
|
-
/** Refuse a write before crypto runs: awaits each binding's `enforceWrite` in order — first throw wins. */
|
|
687
|
-
async enforceWrite(record, ctx) {
|
|
688
|
-
for (const b of this.bindings) if (b.enforceWrite) await b.enforceWrite(record, ctx);
|
|
689
|
-
}
|
|
690
|
-
ingest(record) {
|
|
691
|
-
let r = record;
|
|
692
|
-
for (const b of this.bindings) if (b.ingest) r = b.ingest(r);
|
|
693
|
-
return r;
|
|
694
|
-
}
|
|
695
|
-
canonicalizeStored(record) {
|
|
696
|
-
let r = record;
|
|
697
|
-
for (const b of this.bindings) if (b.canonicalizeStored) r = b.canonicalizeStored(r);
|
|
698
|
-
return r;
|
|
699
|
-
}
|
|
700
|
-
async encodeWrite(record, ctx) {
|
|
701
|
-
let r = record;
|
|
702
|
-
for (const b of this.bindings) if (b.encodeWrite) r = await b.encodeWrite(r, ctx);
|
|
703
|
-
return r;
|
|
704
|
-
}
|
|
705
|
-
/**
|
|
706
|
-
* Final write-pipeline stage: folds each binding's `encodeAtRest` in
|
|
707
|
-
* order, threading the record and accumulating the sealed-slot map. A
|
|
708
|
-
* field belongs to exactly one via feature — two bindings sealing the
|
|
709
|
-
* same field is a brand-keyed collision and throws.
|
|
710
|
-
*/
|
|
711
|
-
async encodeAtRest(record, crypto) {
|
|
712
|
-
let r = record;
|
|
713
|
-
let sealed;
|
|
714
|
-
const sealedBy = /* @__PURE__ */ new Map();
|
|
715
|
-
for (const b of this.bindings) {
|
|
716
|
-
if (!b.encodeAtRest) continue;
|
|
717
|
-
const result = await b.encodeAtRest(r, crypto);
|
|
718
|
-
r = result.record;
|
|
719
|
-
if (!result.sealed) continue;
|
|
720
|
-
for (const [field, ref2] of Object.entries(result.sealed)) {
|
|
721
|
-
const priorBrand = sealedBy.get(field);
|
|
722
|
-
if (priorBrand !== void 0) {
|
|
723
|
-
throw new ValidationError(
|
|
724
|
-
`via encodeAtRest: field "${field}" sealed by binding "${priorBrand}" is also sealed by binding "${b.brand}"`
|
|
725
|
-
);
|
|
726
|
-
}
|
|
727
|
-
sealedBy.set(field, b.brand);
|
|
728
|
-
sealed ??= {};
|
|
729
|
-
sealed[field] = ref2;
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
return sealed ? { record: r, sealed } : { record: r };
|
|
733
|
-
}
|
|
734
|
-
/** First read-pipeline stage: folds each binding's `decodeAtRest` in order. */
|
|
735
|
-
async decodeAtRest(record, sealed, crypto, opts) {
|
|
736
|
-
let r = record;
|
|
737
|
-
for (const b of this.bindings) if (b.decodeAtRest) r = await b.decodeAtRest(r, sealed, crypto, opts);
|
|
738
|
-
return r;
|
|
739
|
-
}
|
|
740
|
-
async present(record, ctx) {
|
|
741
|
-
let r = record;
|
|
742
|
-
for (let i = 0; i < this._presentLateBoundary; i++) {
|
|
743
|
-
const b = this._presentOrder[i];
|
|
744
|
-
if (b.present) r = await b.present(r, ctx);
|
|
745
|
-
}
|
|
746
|
-
for (const b of this.bindings) if (b.presentLate) r = await b.presentLate(r, ctx);
|
|
747
|
-
for (let i = this._presentLateBoundary; i < this._presentOrder.length; i++) {
|
|
748
|
-
const b = this._presentOrder[i];
|
|
749
|
-
if (b.present) r = await b.present(r, ctx);
|
|
750
|
-
}
|
|
751
|
-
return r;
|
|
752
|
-
}
|
|
753
|
-
buildClause(field, op, value) {
|
|
754
|
-
for (const b of this.bindings) {
|
|
755
|
-
const payload = b.buildClause?.(field, op, value);
|
|
756
|
-
if (payload !== void 0) return { brand: b.brand, payload };
|
|
757
|
-
}
|
|
758
|
-
return void 0;
|
|
759
|
-
}
|
|
760
|
-
evaluateClause(clause, actual, op) {
|
|
761
|
-
const b = this.bindings.find((x) => x.brand === clause.brand);
|
|
762
|
-
return b?.evaluateClause ? b.evaluateClause(actual, op, clause.payload) : false;
|
|
763
|
-
}
|
|
764
|
-
/**
|
|
765
|
-
* Resolve a `buildClause` payload to an index-probe operand (#625) —
|
|
766
|
-
* mirrors `evaluateClause`'s brand dispatch. `undefined` (a binding
|
|
767
|
-
* with no `indexProbe`, or one that declines to probe this op/payload)
|
|
768
|
-
* means the caller (`candidateRecords()`) must fall back to a scan.
|
|
769
|
-
*/
|
|
770
|
-
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
771
|
-
indexProbe(clause, op) {
|
|
772
|
-
const b = this.bindings.find((x) => x.brand === clause.brand);
|
|
773
|
-
return b?.indexProbe ? b.indexProbe(op, clause.payload) : void 0;
|
|
774
|
-
}
|
|
775
|
-
/**
|
|
776
|
-
* Resolve a raw STORED field value to its canonical eager-index bucket
|
|
777
|
-
* key (#672) — folds every binding's `canonicalizeIndexKey`, first
|
|
778
|
-
* non-undefined wins (same fold discipline as `buildClause`). `undefined`
|
|
779
|
-
* means no binding claims `field` (or the value can't be canonicalized)
|
|
780
|
-
* — the caller buckets the raw stringified value, unchanged from before
|
|
781
|
-
* this hook existed.
|
|
782
|
-
*/
|
|
783
|
-
canonicalizeIndexKey(field, rawValue) {
|
|
784
|
-
for (const b of this.bindings) {
|
|
785
|
-
const key = b.canonicalizeIndexKey?.(field, rawValue);
|
|
786
|
-
if (key !== void 0) return key;
|
|
787
|
-
}
|
|
788
|
-
return void 0;
|
|
789
|
-
}
|
|
790
|
-
decodeResults(record) {
|
|
791
|
-
let r = record;
|
|
792
|
-
for (const b of this.bindings) if (b.decodeResults) r = b.decodeResults(r);
|
|
793
|
-
return r;
|
|
794
|
-
}
|
|
795
|
-
/** undefined = no binding covers the field → caller falls back to generic compare. */
|
|
796
|
-
compareForOrder(field, a, b) {
|
|
797
|
-
for (const bind of this.bindings) {
|
|
798
|
-
const c = bind.compareForOrder?.(field, a, b);
|
|
799
|
-
if (c !== void 0) return c;
|
|
800
|
-
}
|
|
801
|
-
return void 0;
|
|
802
|
-
}
|
|
803
|
-
/** undefined = no binding resolves an order-sort label for `key` at `field`/`locale` (#650 Task 7 —
|
|
804
|
-
* the `orderBy(..., {by:'label'})` per-call-locale channel `compareForOrder` above can't serve). */
|
|
805
|
-
resolveOrderLabel(field, key, locale) {
|
|
806
|
-
for (const bind of this.bindings) {
|
|
807
|
-
const label = bind.resolveOrderLabel?.(field, key, locale);
|
|
808
|
-
if (label !== void 0) return label;
|
|
809
|
-
}
|
|
810
|
-
return void 0;
|
|
811
|
-
}
|
|
812
|
-
/**
|
|
813
|
-
* Which posture governs `field`, if any binding covers it — `undefined`
|
|
814
|
-
* means no binding declares `field` (the generic, non-via query path
|
|
815
|
-
* applies). #629 Task 8's posture consumer: `.where()`/`.orderBy()`
|
|
816
|
-
* consult this before building/evaluating a clause, refusing fields whose
|
|
817
|
-
* posture is `queryable: 'none'` (e.g. blob); every other posture
|
|
818
|
-
* ('det-exact'/'ordered'/'full') is left to the existing per-binding
|
|
819
|
-
* buildClause/evaluateClause/compareForOrder machinery, unchanged.
|
|
820
|
-
*
|
|
821
|
-
* #638 Task 3: the graph-computed taint overlay is consulted FIRST — a
|
|
822
|
-
* derived field's assigned (most-restrictive-of-sources) posture wins over
|
|
823
|
-
* whatever a binding would otherwise report for that field name (no
|
|
824
|
-
* binding covers a computed/derived field today, so this never actually
|
|
825
|
-
* shadows one — see `via/taint-binding.ts`'s `taintBinding.covers`, which
|
|
826
|
-
* only claims the sealed subset for `encodeAtRest`/`decodeAtRest`, not for
|
|
827
|
-
* this lookup).
|
|
828
|
-
*/
|
|
829
|
-
postureFor(field) {
|
|
830
|
-
const t = this.taint?.postures.get(field);
|
|
831
|
-
if (t) return t;
|
|
832
|
-
for (const b of this.bindings) {
|
|
833
|
-
if (b.covers?.(field)) return b.posture;
|
|
834
|
-
}
|
|
835
|
-
return this.taint?.defaultPosture;
|
|
836
|
-
}
|
|
837
|
-
/**
|
|
838
|
-
* Refuse any field-based reducer over a `queryable: 'none'` field (blob) —
|
|
839
|
-
* metadata-only: walks each reducer's `.field` and checks posture, no
|
|
840
|
-
* rewriting. Reducers with no `.field` (e.g. `count()`) are skipped.
|
|
841
|
-
*
|
|
842
|
-
* Shared by `wrapReducers` below (which ALSO applies each binding's
|
|
843
|
-
* rewrite, e.g. money's exact-BigInt reducer swap) and by
|
|
844
|
-
* `ScanBuilder.aggregate()` (#629 Task 8 review fix wave 1), which must
|
|
845
|
-
* call THIS, not `wrapReducers` — wiring full `wrapReducers` into
|
|
846
|
-
* `ScanBuilder.aggregate()` would newly activate money/i18n reducer
|
|
847
|
-
* wrapping on a path that has never run it, a parity-breaking behavior
|
|
848
|
-
* change for existing brands.
|
|
849
|
-
*/
|
|
850
|
-
refuseUnqueryableReducers(spec) {
|
|
851
|
-
for (const reducer of Object.values(spec)) {
|
|
852
|
-
const field = reducer?.field;
|
|
853
|
-
if (field !== void 0 && this.postureFor(field)?.queryable === "none") {
|
|
854
|
-
throw new FieldNotQueryableError(field);
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
}
|
|
858
|
-
/**
|
|
859
|
-
* Rewrite an aggregate spec (money exact reducers), then refuse any
|
|
860
|
-
* field-based reducer over a `queryable: 'none'` field (blob) — the same
|
|
861
|
-
* posture gate `.where()`/`.orderBy()` apply, extended to `.aggregate()`
|
|
862
|
-
* (both the bare-spec and builder forms funnel through here).
|
|
863
|
-
*/
|
|
864
|
-
wrapReducers(spec) {
|
|
865
|
-
this.refuseUnqueryableReducers(spec);
|
|
866
|
-
let s = spec;
|
|
867
|
-
for (const b of this.bindings) if (b.wrapReducers) s = b.wrapReducers(s);
|
|
868
|
-
return s;
|
|
869
|
-
}
|
|
870
|
-
/**
|
|
871
|
-
* Deliberate export-layer redaction (#629 Task 9's posture consumer):
|
|
872
|
-
* for every OWN field the decoded record carries, if the covering
|
|
873
|
-
* binding's posture declares `exportable: false` (classified today;
|
|
874
|
-
* money/i18n/blob are all `true`), replace the value with
|
|
875
|
-
* {@link EXPORT_REDACTION_MARKER} — the same `'[sealed]'` string
|
|
876
|
-
* `SealedHandle.toJSON()` (`kernel/types.ts`) already emits, so this is
|
|
877
|
-
* byte-parity with today's accidental redaction, now independent of the
|
|
878
|
-
* field's runtime shape. `SealedHandle.toJSON()` stays untouched as
|
|
879
|
-
* defense-in-depth: a record read via `collection.get()` and
|
|
880
|
-
* JSON.stringify'd outside `exportStream()` still gets the accident's
|
|
881
|
-
* redaction on its own. Never mutates the input; returns a new object
|
|
882
|
-
* only when a field was actually redacted.
|
|
883
|
-
*/
|
|
884
|
-
redactForExport(record) {
|
|
885
|
-
let out;
|
|
886
|
-
for (const field of Object.keys(record)) {
|
|
887
|
-
if (this.postureFor(field)?.exportable === false) {
|
|
888
|
-
out ??= { ...record };
|
|
889
|
-
out[field] = EXPORT_REDACTION_MARKER;
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
return out ?? record;
|
|
893
|
-
}
|
|
894
|
-
/**
|
|
895
|
-
* Shared fold over a subset of `this.bindings`: runs each binding's
|
|
896
|
-
* `erase`, concatenating shredded/retainedShared counts and residue.
|
|
897
|
-
* Consults `posture.forgettable` (#629 Task 10) — a binding declaring
|
|
898
|
-
* `forgettable: false` is skipped even if it defines `erase` (none does
|
|
899
|
-
* today; a future non-forgettable binding is supported without a brand check).
|
|
900
|
-
*/
|
|
901
|
-
async foldErase(ctx, bindings) {
|
|
902
|
-
let shredded = 0;
|
|
903
|
-
let retainedShared = 0;
|
|
904
|
-
const residue = [];
|
|
905
|
-
for (const b of bindings) {
|
|
906
|
-
if (!b.erase || b.posture.forgettable === false) continue;
|
|
907
|
-
const report = await b.erase(ctx);
|
|
908
|
-
shredded += report.shredded;
|
|
909
|
-
retainedShared += report.retainedShared ?? 0;
|
|
910
|
-
residue.push(...report.residue);
|
|
911
|
-
}
|
|
912
|
-
return retainedShared > 0 ? { shredded, residue, retainedShared } : { shredded, residue };
|
|
913
|
-
}
|
|
914
|
-
/** `forget()`'s per-ref erasure door: folds every binding's `erase`. */
|
|
915
|
-
async erase(ctx) {
|
|
916
|
-
return this.foldErase(ctx, this.bindings);
|
|
917
|
-
}
|
|
918
|
-
/**
|
|
919
|
-
* `forget()`'s SEALED-posture-only erase fold (#629 Task 10, `Collection._onViaErase`'s
|
|
920
|
-
* one caller) — classified today; metadata-filtered on
|
|
921
|
-
* `posture.encryptedAtRest`, not brand-checked. `undefined` when no
|
|
922
|
-
* sealed-posture binding is compiled in — `vault.ts` then falls back to
|
|
923
|
-
* its own bare-`sensitive` classification, which no via binding covers.
|
|
924
|
-
*/
|
|
925
|
-
async eraseSealed(ctx) {
|
|
926
|
-
const sealed = this.bindings.filter((b) => b.posture.encryptedAtRest === "sealed");
|
|
927
|
-
return sealed.length === 0 ? void 0 : this.foldErase(ctx, sealed);
|
|
928
|
-
}
|
|
929
|
-
/** True iff any binding implements decodeResults (query fast-path gating). */
|
|
930
|
-
get hasResultDecode() {
|
|
931
|
-
return this.bindings.some((b) => b.decodeResults !== void 0);
|
|
932
|
-
}
|
|
933
|
-
/**
|
|
934
|
-
* True iff any binding declares an at-rest hook (`encodeAtRest`/
|
|
935
|
-
* `decodeAtRest`) — the codec boundary's async-stack gate (#629 Task 3
|
|
936
|
-
* consults this to choose between the hook path and today's inline
|
|
937
|
-
* sealed-slot path; a stack with only sync hooks, e.g. money-only, stays
|
|
938
|
-
* `false`).
|
|
939
|
-
*/
|
|
940
|
-
get hasAtRestHooks() {
|
|
941
|
-
return this.bindings.some((b) => b.encodeAtRest !== void 0 || b.decodeAtRest !== void 0);
|
|
942
|
-
}
|
|
943
|
-
/**
|
|
944
|
-
* Fold every binding's `describeFragment()` into one `brand -> fragment`
|
|
945
|
-
* map (#650 Task 7 — the first-ever consumer; `describeFragment` was
|
|
946
|
-
* declared at `via/index.ts:136` since #623 with zero callers until this task).
|
|
947
|
-
* `undefined` when no compiled binding implements it. Consumed by
|
|
948
|
-
* `Collection.describe()`/`describeAsync()`, threaded to `buildDescription`
|
|
949
|
-
* as `BuildDescriptionInput.viaFragments`.
|
|
950
|
-
*/
|
|
951
|
-
describeFragments() {
|
|
952
|
-
let out;
|
|
953
|
-
for (const b of this.bindings) {
|
|
954
|
-
const f = b.describeFragment?.();
|
|
955
|
-
if (f !== void 0) {
|
|
956
|
-
out ??= {};
|
|
957
|
-
out[b.brand] = f;
|
|
958
|
-
}
|
|
959
|
-
}
|
|
960
|
-
return out;
|
|
961
|
-
}
|
|
962
|
-
};
|
|
963
|
-
var EXPORT_REDACTION_MARKER = "[sealed]";
|
|
964
|
-
function exportRedact(coll, record) {
|
|
965
|
-
if (record === null || typeof record !== "object") return record;
|
|
966
|
-
const via2 = coll._via;
|
|
967
|
-
return via2 ? via2.redactForExport(record) : record;
|
|
968
|
-
}
|
|
969
|
-
|
|
970
616
|
// src/kernel/lazy-count.ts
|
|
971
617
|
var COUNT_PAGE_SIZE = 1e3;
|
|
972
618
|
function isLive(env, storeCiphertext) {
|
|
@@ -1575,346 +1221,6 @@ function buildUniqueConstraintSet(collectionName, indexes, mode) {
|
|
|
1575
1221
|
return new UniqueConstraintSet(collectionName, uniqueDefs);
|
|
1576
1222
|
}
|
|
1577
1223
|
|
|
1578
|
-
// src/with-shape/introspection/field-meta.ts
|
|
1579
|
-
var FieldMetaUnknownFieldError = class extends Error {
|
|
1580
|
-
constructor(collection, key) {
|
|
1581
|
-
super(`fieldMeta for collection "${collection}" references unknown field "${key}". Declare it in the schema/config or remove the fieldMeta entry.`);
|
|
1582
|
-
this.collection = collection;
|
|
1583
|
-
this.key = key;
|
|
1584
|
-
this.name = "FieldMetaUnknownFieldError";
|
|
1585
|
-
}
|
|
1586
|
-
collection;
|
|
1587
|
-
key;
|
|
1588
|
-
};
|
|
1589
|
-
function validateFieldMetaKeys(collection, fieldMeta, knownFields) {
|
|
1590
|
-
for (const key of Object.keys(fieldMeta)) {
|
|
1591
|
-
if (!knownFields.has(key)) throw new FieldMetaUnknownFieldError(collection, key);
|
|
1592
|
-
}
|
|
1593
|
-
}
|
|
1594
|
-
function humanizeFieldKey(key) {
|
|
1595
|
-
return key.replace(/[_-]+/g, " ").replace(/([a-z0-9])([A-Z])/g, "$1 $2").trim().split(/\s+/).map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");
|
|
1596
|
-
}
|
|
1597
|
-
function resolveFieldMeta(key, inputs) {
|
|
1598
|
-
const { channel, zodMeta, inferred } = inputs;
|
|
1599
|
-
const pick = (k) => channel?.[k] ?? zodMeta?.[k] ?? inferred?.[k];
|
|
1600
|
-
const description = pick("description");
|
|
1601
|
-
const semanticType = pick("semanticType");
|
|
1602
|
-
const unit = pick("unit");
|
|
1603
|
-
const sensitivity = pick("sensitivity");
|
|
1604
|
-
const aggregate = pick("aggregate");
|
|
1605
|
-
const aliases = pick("aliases");
|
|
1606
|
-
const displayFor = pick("displayFor");
|
|
1607
|
-
const widget = pick("widget");
|
|
1608
|
-
const group = pick("group");
|
|
1609
|
-
const order = pick("order");
|
|
1610
|
-
return {
|
|
1611
|
-
label: pick("label") ?? humanizeFieldKey(key),
|
|
1612
|
-
...description !== void 0 ? { description } : {},
|
|
1613
|
-
...semanticType !== void 0 ? { semanticType } : {},
|
|
1614
|
-
...unit !== void 0 ? { unit } : {},
|
|
1615
|
-
...sensitivity !== void 0 ? { sensitivity } : {},
|
|
1616
|
-
...aggregate !== void 0 ? { aggregate } : {},
|
|
1617
|
-
...aliases !== void 0 ? { aliases } : {},
|
|
1618
|
-
...displayFor !== void 0 ? { displayFor } : {},
|
|
1619
|
-
...widget !== void 0 ? { widget } : {},
|
|
1620
|
-
...group !== void 0 ? { group } : {},
|
|
1621
|
-
...order !== void 0 ? { order } : {}
|
|
1622
|
-
};
|
|
1623
|
-
}
|
|
1624
|
-
|
|
1625
|
-
// src/with-shape/introspection/describe.ts
|
|
1626
|
-
var ZOD_META_KEYS = /* @__PURE__ */ new Set([
|
|
1627
|
-
"label",
|
|
1628
|
-
"description",
|
|
1629
|
-
"unit",
|
|
1630
|
-
"semanticType",
|
|
1631
|
-
"sensitivity",
|
|
1632
|
-
"aggregate",
|
|
1633
|
-
"aliases",
|
|
1634
|
-
"displayFor",
|
|
1635
|
-
"group",
|
|
1636
|
-
"order"
|
|
1637
|
-
]);
|
|
1638
|
-
async function deriveZodFields(schema) {
|
|
1639
|
-
const envelope = await derivePersistedSchema(schema);
|
|
1640
|
-
if (!envelope.jsonSchema) return {};
|
|
1641
|
-
const isZod4 = isZod4Schema(schema);
|
|
1642
|
-
const jsonSchema = envelope.jsonSchema;
|
|
1643
|
-
const fieldDescriptors = jsonSchemaToFields(jsonSchema, "live-validator");
|
|
1644
|
-
const propertiesRaw = jsonSchema["properties"];
|
|
1645
|
-
const result = {};
|
|
1646
|
-
for (const [key, descriptor] of Object.entries(fieldDescriptors)) {
|
|
1647
|
-
let meta;
|
|
1648
|
-
if (isZod4 && propertiesRaw) {
|
|
1649
|
-
const prop = propertiesRaw[key];
|
|
1650
|
-
if (prop) {
|
|
1651
|
-
const extracted = {};
|
|
1652
|
-
let hasAny = false;
|
|
1653
|
-
for (const mk of ZOD_META_KEYS) {
|
|
1654
|
-
if (mk in prop) {
|
|
1655
|
-
extracted[mk] = prop[mk];
|
|
1656
|
-
hasAny = true;
|
|
1657
|
-
}
|
|
1658
|
-
}
|
|
1659
|
-
if (hasAny) meta = extracted;
|
|
1660
|
-
}
|
|
1661
|
-
}
|
|
1662
|
-
result[key] = {
|
|
1663
|
-
type: descriptor.type,
|
|
1664
|
-
optional: descriptor.optional === true,
|
|
1665
|
-
...descriptor.constraints !== void 0 ? { constraints: descriptor.constraints } : {},
|
|
1666
|
-
...meta !== void 0 ? { meta } : {}
|
|
1667
|
-
};
|
|
1668
|
-
}
|
|
1669
|
-
return result;
|
|
1670
|
-
}
|
|
1671
|
-
async function resolveDescribeFieldIds(store, vaultName, collectionName, getDEK) {
|
|
1672
|
-
let dek;
|
|
1673
|
-
try {
|
|
1674
|
-
dek = await getDEK(collectionName);
|
|
1675
|
-
} catch {
|
|
1676
|
-
return {};
|
|
1677
|
-
}
|
|
1678
|
-
const persisted = await loadPersistedSchema(store, vaultName, collectionName, dek);
|
|
1679
|
-
return persisted?.fieldIds !== void 0 ? { fieldIds: persisted.fieldIds } : {};
|
|
1680
|
-
}
|
|
1681
|
-
function deriveWidget(opts) {
|
|
1682
|
-
if (opts.resolvedWidget !== void 0) return opts.resolvedWidget;
|
|
1683
|
-
switch (opts.semanticType) {
|
|
1684
|
-
case "date":
|
|
1685
|
-
case "datetime":
|
|
1686
|
-
return "date";
|
|
1687
|
-
case "currency":
|
|
1688
|
-
return "money";
|
|
1689
|
-
case "entity":
|
|
1690
|
-
return "ref-select";
|
|
1691
|
-
case "url":
|
|
1692
|
-
return "url";
|
|
1693
|
-
case "email":
|
|
1694
|
-
return "email";
|
|
1695
|
-
case "percent":
|
|
1696
|
-
return "number";
|
|
1697
|
-
}
|
|
1698
|
-
if (opts.dict !== void 0 || opts.lookup !== void 0) return "select";
|
|
1699
|
-
if (opts.blob !== void 0) return "file";
|
|
1700
|
-
if (opts.type === "boolean") return "checkbox";
|
|
1701
|
-
if (opts.type === "number") return "number";
|
|
1702
|
-
return "text";
|
|
1703
|
-
}
|
|
1704
|
-
function buildDescription(input) {
|
|
1705
|
-
const { collection, fieldMeta, moneyFields, dictKeyFields, lookupFields, computed, refs, zodFields, dictLabels, meta, i18nFields, classified, taint, fieldIds } = input;
|
|
1706
|
-
const lookupFragments = input.viaFragments?.["lookup"]?.lookupFields;
|
|
1707
|
-
const blobFragments = input.viaFragments?.["blob"]?.blobFields;
|
|
1708
|
-
if (zodFields !== void 0 && Object.keys(zodFields).length > 0 && fieldMeta !== void 0) {
|
|
1709
|
-
const knownFields = /* @__PURE__ */ new Set([
|
|
1710
|
-
...Object.keys(moneyFields ?? {}),
|
|
1711
|
-
...Object.keys(dictKeyFields ?? {}),
|
|
1712
|
-
...Object.keys(refs),
|
|
1713
|
-
...Object.keys(computed ?? {}),
|
|
1714
|
-
...Object.keys(zodFields),
|
|
1715
|
-
...Object.keys(i18nFields ?? {}),
|
|
1716
|
-
...Object.keys(lookupFields ?? {}),
|
|
1717
|
-
...Object.keys(blobFragments ?? {})
|
|
1718
|
-
]);
|
|
1719
|
-
validateFieldMetaKeys(collection, fieldMeta, knownFields);
|
|
1720
|
-
}
|
|
1721
|
-
const allKeys = /* @__PURE__ */ new Set([
|
|
1722
|
-
...Object.keys(moneyFields ?? {}),
|
|
1723
|
-
...Object.keys(dictKeyFields ?? {}),
|
|
1724
|
-
...Object.keys(lookupFields ?? {}),
|
|
1725
|
-
...Object.keys(refs),
|
|
1726
|
-
...Object.keys(computed ?? {}),
|
|
1727
|
-
...Object.keys(fieldMeta ?? {}),
|
|
1728
|
-
...Object.keys(zodFields ?? {}),
|
|
1729
|
-
...Object.keys(i18nFields ?? {}),
|
|
1730
|
-
...Object.keys(classified ?? {}),
|
|
1731
|
-
...Object.keys(blobFragments ?? {})
|
|
1732
|
-
]);
|
|
1733
|
-
const fields = [];
|
|
1734
|
-
for (const key of [...allKeys].sort()) {
|
|
1735
|
-
const zod = zodFields?.[key];
|
|
1736
|
-
const money = moneyFields?.[key];
|
|
1737
|
-
const dict = dictKeyFields?.[key];
|
|
1738
|
-
const lookupDesc = lookupFields?.[key];
|
|
1739
|
-
const refDesc = refs[key];
|
|
1740
|
-
const isComputed = computed !== void 0 && key in computed;
|
|
1741
|
-
const i18nDesc = i18nFields?.[key];
|
|
1742
|
-
const cls = classified?.[key];
|
|
1743
|
-
const blobFragmentEntry = blobFragments?.[key];
|
|
1744
|
-
const taintPosture = taint?.postures.get(key);
|
|
1745
|
-
let type = zod?.type ?? "unknown";
|
|
1746
|
-
const inferred = {};
|
|
1747
|
-
let moneyBlock;
|
|
1748
|
-
let dictBlock;
|
|
1749
|
-
let refBlock;
|
|
1750
|
-
let lookupBlock;
|
|
1751
|
-
let blobBlock;
|
|
1752
|
-
if (money) {
|
|
1753
|
-
type = "number";
|
|
1754
|
-
inferred.semanticType = "currency";
|
|
1755
|
-
inferred.aggregate = "sum";
|
|
1756
|
-
const currency = money.soleCurrency();
|
|
1757
|
-
const scale = currency !== void 0 ? money.scaleFor(currency) : void 0;
|
|
1758
|
-
moneyBlock = {
|
|
1759
|
-
mode: money.mode,
|
|
1760
|
-
...currency !== void 0 ? { currency } : {},
|
|
1761
|
-
...scale !== void 0 ? { scale } : {},
|
|
1762
|
-
...money.rounding !== void 0 ? { rounding: money.rounding } : {}
|
|
1763
|
-
};
|
|
1764
|
-
} else if (refDesc) {
|
|
1765
|
-
type = refDesc.isArray ? "array" : "string";
|
|
1766
|
-
inferred.semanticType = "entity";
|
|
1767
|
-
refBlock = {
|
|
1768
|
-
target: refDesc.target,
|
|
1769
|
-
mode: refDesc.mode,
|
|
1770
|
-
...refDesc.isArray ? { isArray: true } : {}
|
|
1771
|
-
};
|
|
1772
|
-
} else if (dict) {
|
|
1773
|
-
type = "enum";
|
|
1774
|
-
if (isStaticDictDescriptor(dict)) {
|
|
1775
|
-
const displayLocale = dict.displayLocale;
|
|
1776
|
-
const values = dict.keys.map((k) => {
|
|
1777
|
-
const localeMap = dict.table[k];
|
|
1778
|
-
const label = displayLocale !== void 0 ? localeMap?.[displayLocale] ?? void 0 : void 0;
|
|
1779
|
-
return label !== void 0 ? { value: k, label } : { value: k };
|
|
1780
|
-
});
|
|
1781
|
-
dictBlock = { name: dict.name, static: true, values };
|
|
1782
|
-
} else {
|
|
1783
|
-
const labelMap = dictLabels?.[dict.name];
|
|
1784
|
-
const labelMapHasEntries = labelMap !== void 0 && Object.keys(labelMap).length > 0;
|
|
1785
|
-
if (labelMapHasEntries) {
|
|
1786
|
-
const values = Object.entries(labelMap).map(([value, label]) => ({ value, label }));
|
|
1787
|
-
dictBlock = { name: dict.name, static: false, values };
|
|
1788
|
-
} else if (dict.keys !== void 0) {
|
|
1789
|
-
const values = dict.keys.map((k) => {
|
|
1790
|
-
const label = dict.labels?.[k];
|
|
1791
|
-
return label !== void 0 ? { value: k, label } : { value: k };
|
|
1792
|
-
});
|
|
1793
|
-
dictBlock = { name: dict.name, static: false, values };
|
|
1794
|
-
} else {
|
|
1795
|
-
dictBlock = { name: dict.name, static: false };
|
|
1796
|
-
}
|
|
1797
|
-
}
|
|
1798
|
-
} else if (lookupDesc) {
|
|
1799
|
-
type = "enum";
|
|
1800
|
-
const lookupLabelMap = dictLabels?.[lookupDesc.dimension];
|
|
1801
|
-
const lookupLabelMapHasEntries = lookupLabelMap !== void 0 && Object.keys(lookupLabelMap).length > 0;
|
|
1802
|
-
if (lookupDesc.table !== void 0) {
|
|
1803
|
-
const displayLocale = lookupDesc.displayLocale;
|
|
1804
|
-
const table = lookupDesc.table;
|
|
1805
|
-
const values = (lookupDesc.keys ?? Object.keys(table)).map((k) => {
|
|
1806
|
-
const localeMap = table[k];
|
|
1807
|
-
const label = displayLocale !== void 0 ? localeMap?.[displayLocale] ?? void 0 : void 0;
|
|
1808
|
-
return label !== void 0 ? { value: k, label } : { value: k };
|
|
1809
|
-
});
|
|
1810
|
-
dictBlock = { name: lookupDesc.dimension, static: true, values };
|
|
1811
|
-
} else if (lookupLabelMapHasEntries) {
|
|
1812
|
-
const values = Object.entries(lookupLabelMap).map(([value, label]) => ({ value, label }));
|
|
1813
|
-
dictBlock = { name: lookupDesc.dimension, static: false, values };
|
|
1814
|
-
} else if (lookupDesc.keys !== void 0) {
|
|
1815
|
-
const values = lookupDesc.keys.map((k) => {
|
|
1816
|
-
const label = lookupDesc.labels?.[k];
|
|
1817
|
-
return label !== void 0 ? { value: k, label } : { value: k };
|
|
1818
|
-
});
|
|
1819
|
-
dictBlock = { name: lookupDesc.dimension, static: false, values };
|
|
1820
|
-
} else {
|
|
1821
|
-
dictBlock = { name: lookupDesc.dimension, static: false };
|
|
1822
|
-
}
|
|
1823
|
-
} else if (i18nDesc) {
|
|
1824
|
-
type = "string";
|
|
1825
|
-
} else if (isComputed) {
|
|
1826
|
-
} else if (blobFragmentEntry !== void 0) {
|
|
1827
|
-
type = "blob";
|
|
1828
|
-
blobBlock = { ...blobFragmentEntry, queryable: "none" };
|
|
1829
|
-
}
|
|
1830
|
-
const lookupFragmentEntry = lookupFragments?.[key];
|
|
1831
|
-
if (lookupFragmentEntry !== void 0) {
|
|
1832
|
-
lookupBlock = {
|
|
1833
|
-
...lookupFragmentEntry.dimension !== void 0 ? { dimension: lookupFragmentEntry.dimension } : {},
|
|
1834
|
-
backing: lookupFragmentEntry.backing,
|
|
1835
|
-
vocabulary: lookupFragmentEntry.vocabulary,
|
|
1836
|
-
key: lookupFragmentEntry.key,
|
|
1837
|
-
onDelete: lookupFragmentEntry.onDelete,
|
|
1838
|
-
...lookupFragmentEntry.altKeys !== void 0 ? { altKeys: lookupFragmentEntry.altKeys } : {},
|
|
1839
|
-
...lookupFragmentEntry.present !== void 0 ? { present: lookupFragmentEntry.present } : {},
|
|
1840
|
-
...lookupFragmentEntry.sortBy !== void 0 ? { sortBy: lookupFragmentEntry.sortBy } : {},
|
|
1841
|
-
...lookupFragmentEntry.keys !== void 0 ? { keys: lookupFragmentEntry.keys } : {}
|
|
1842
|
-
};
|
|
1843
|
-
}
|
|
1844
|
-
if (cls !== void 0) inferred.sensitivity = cls.sensitivity;
|
|
1845
|
-
const channelEntry = fieldMeta?.[key];
|
|
1846
|
-
const zodMeta = zod?.meta;
|
|
1847
|
-
const resolved = resolveFieldMeta(key, {
|
|
1848
|
-
...channelEntry !== void 0 ? { channel: channelEntry } : {},
|
|
1849
|
-
...zodMeta !== void 0 ? { zodMeta } : {},
|
|
1850
|
-
inferred
|
|
1851
|
-
});
|
|
1852
|
-
let i18nBlock;
|
|
1853
|
-
if (i18nDesc !== void 0) {
|
|
1854
|
-
const locales = i18nDesc.options.languages;
|
|
1855
|
-
const densify = i18nDesc.options.densifyOnWrite;
|
|
1856
|
-
i18nBlock = {
|
|
1857
|
-
...locales !== void 0 ? { locales } : {},
|
|
1858
|
-
...densify !== void 0 ? { densify } : {}
|
|
1859
|
-
};
|
|
1860
|
-
}
|
|
1861
|
-
const widget = deriveWidget({
|
|
1862
|
-
type,
|
|
1863
|
-
...resolved.semanticType !== void 0 ? { semanticType: resolved.semanticType } : {},
|
|
1864
|
-
...dictBlock !== void 0 ? { dict: dictBlock } : {},
|
|
1865
|
-
...lookupBlock !== void 0 ? { lookup: lookupBlock } : {},
|
|
1866
|
-
...blobBlock !== void 0 ? { blob: blobBlock } : {},
|
|
1867
|
-
...resolved.widget !== void 0 ? { resolvedWidget: resolved.widget } : {}
|
|
1868
|
-
});
|
|
1869
|
-
const editable = !isComputed && key !== "id" && blobBlock === void 0;
|
|
1870
|
-
const field = {
|
|
1871
|
-
key,
|
|
1872
|
-
...fieldIds?.[key] !== void 0 ? { id: fieldIds[key] } : {},
|
|
1873
|
-
type,
|
|
1874
|
-
optional: zod?.optional ?? false,
|
|
1875
|
-
...zod?.constraints !== void 0 ? { constraints: zod.constraints } : {},
|
|
1876
|
-
label: resolved.label,
|
|
1877
|
-
...resolved.description !== void 0 ? { description: resolved.description } : {},
|
|
1878
|
-
...resolved.group !== void 0 ? { group: resolved.group } : {},
|
|
1879
|
-
...resolved.order !== void 0 ? { order: resolved.order } : {},
|
|
1880
|
-
...resolved.semanticType !== void 0 ? { semanticType: resolved.semanticType } : {},
|
|
1881
|
-
...resolved.unit !== void 0 ? { unit: resolved.unit } : {},
|
|
1882
|
-
...resolved.sensitivity !== void 0 ? { sensitivity: resolved.sensitivity } : {},
|
|
1883
|
-
...resolved.aggregate !== void 0 ? { aggregate: resolved.aggregate } : {},
|
|
1884
|
-
...resolved.aliases !== void 0 ? { aliases: resolved.aliases } : {},
|
|
1885
|
-
...resolved.displayFor !== void 0 ? { displayFor: resolved.displayFor } : {},
|
|
1886
|
-
...refBlock !== void 0 ? { ref: refBlock } : {},
|
|
1887
|
-
...moneyBlock !== void 0 ? { money: moneyBlock } : {},
|
|
1888
|
-
...dictBlock !== void 0 ? { dict: dictBlock } : {},
|
|
1889
|
-
...lookupBlock !== void 0 ? { lookup: lookupBlock } : {},
|
|
1890
|
-
...blobBlock !== void 0 ? { blob: blobBlock } : {},
|
|
1891
|
-
...isComputed ? { computed: true } : {},
|
|
1892
|
-
...i18nBlock !== void 0 ? { i18n: i18nBlock } : {},
|
|
1893
|
-
widget,
|
|
1894
|
-
editable,
|
|
1895
|
-
...cls !== void 0 ? {
|
|
1896
|
-
classified: {
|
|
1897
|
-
preset: cls.preset,
|
|
1898
|
-
storage: cls.storage,
|
|
1899
|
-
list: cls.list.kind === "omit" ? "omit" : cls.list.kind === "mask" ? { mask: cls.list.pattern } : { rider: cls.list.rider },
|
|
1900
|
-
...cls.equatable === true ? { equatable: true } : {}
|
|
1901
|
-
}
|
|
1902
|
-
} : {},
|
|
1903
|
-
...taintPosture !== void 0 ? { taint: { posture: taintPosture, forcedBy: taint?.provenance?.get(key) ?? [] } } : {}
|
|
1904
|
-
};
|
|
1905
|
-
fields.push(field);
|
|
1906
|
-
}
|
|
1907
|
-
const collectionMeta = {
|
|
1908
|
-
...meta,
|
|
1909
|
-
label: meta?.label ?? humanizeFieldKey(collection)
|
|
1910
|
-
};
|
|
1911
|
-
return {
|
|
1912
|
-
collection,
|
|
1913
|
-
fields,
|
|
1914
|
-
meta: collectionMeta
|
|
1915
|
-
};
|
|
1916
|
-
}
|
|
1917
|
-
|
|
1918
1224
|
// src/kernel/put-many-atomic.ts
|
|
1919
1225
|
var toRevertLeg = ({ op, priorEnvelope }) => ({
|
|
1920
1226
|
vaultName: op.vaultName,
|
|
@@ -2018,471 +1324,8 @@ async function commitSequentially(ctx, entries, priors) {
|
|
|
2018
1324
|
}
|
|
2019
1325
|
}
|
|
2020
1326
|
|
|
2021
|
-
// src/kernel/via/compose.ts
|
|
2022
|
-
function via(...descriptors) {
|
|
2023
|
-
if (descriptors.length === 0) {
|
|
2024
|
-
throw new ValidationError("via(): at least one descriptor is required, e.g. via(money({ currency: 'EUR' }))");
|
|
2025
|
-
}
|
|
2026
|
-
return { _noydbVia: true, descriptors };
|
|
2027
|
-
}
|
|
2028
|
-
function isViaFieldSpec(x) {
|
|
2029
|
-
return typeof x === "object" && x !== null && x._noydbVia === true;
|
|
2030
|
-
}
|
|
2031
|
-
function mergeViaFields(sources) {
|
|
2032
|
-
for (const field of Object.keys(sources.dictKeyFields ?? {})) {
|
|
2033
|
-
if (sources.lookupFields && field in sources.lookupFields) {
|
|
2034
|
-
throw new ValidationError(
|
|
2035
|
-
`mergeViaFields(): field "${field}" is declared in both \`dictKeyFields\` and \`lookupFields\` \u2014 declare it in one place only.`
|
|
2036
|
-
);
|
|
2037
|
-
}
|
|
2038
|
-
}
|
|
2039
|
-
if (!sources.viaFields || Object.keys(sources.viaFields).length === 0) {
|
|
2040
|
-
return {
|
|
2041
|
-
moneyFields: sources.moneyFields,
|
|
2042
|
-
i18nFields: sources.i18nFields,
|
|
2043
|
-
dictKeyFields: sources.dictKeyFields,
|
|
2044
|
-
computedFields: void 0,
|
|
2045
|
-
lookupFields: sources.lookupFields
|
|
2046
|
-
};
|
|
2047
|
-
}
|
|
2048
|
-
const sugarFieldNames = /* @__PURE__ */ new Set([
|
|
2049
|
-
...Object.keys(sources.moneyFields ?? {}),
|
|
2050
|
-
...Object.keys(sources.i18nFields ?? {}),
|
|
2051
|
-
...Object.keys(sources.dictKeyFields ?? {}),
|
|
2052
|
-
...Object.keys(sources.lookupFields ?? {})
|
|
2053
|
-
]);
|
|
2054
|
-
const viaMoney = {};
|
|
2055
|
-
const viaI18nText = {};
|
|
2056
|
-
const viaDictKey = {};
|
|
2057
|
-
const viaComputed = {};
|
|
2058
|
-
const viaLookup = {};
|
|
2059
|
-
for (const [field, spec] of Object.entries(sources.viaFields)) {
|
|
2060
|
-
if (sugarFieldNames.has(field)) {
|
|
2061
|
-
throw new ValidationError(
|
|
2062
|
-
`via(): field "${field}" is declared via both a sugar key and \`viaFields\` \u2014 declare it in one place only.`
|
|
2063
|
-
);
|
|
2064
|
-
}
|
|
2065
|
-
for (const descriptor of spec.descriptors) {
|
|
2066
|
-
if (descriptor._viaBrand === "money") {
|
|
2067
|
-
viaMoney[field] = descriptor;
|
|
2068
|
-
} else if (descriptor._viaBrand === "i18n") {
|
|
2069
|
-
if (isI18nTextDescriptor(descriptor)) viaI18nText[field] = descriptor;
|
|
2070
|
-
else if (isDictKeyDescriptor(descriptor) || isStaticDictDescriptor(descriptor)) viaDictKey[field] = descriptor;
|
|
2071
|
-
} else if (descriptor._viaBrand === "computed") {
|
|
2072
|
-
viaComputed[field] = descriptor;
|
|
2073
|
-
} else if (descriptor._viaBrand === "lookup" && isLookupDescriptor(descriptor)) {
|
|
2074
|
-
viaLookup[field] = descriptor;
|
|
2075
|
-
} else {
|
|
2076
|
-
throw new ValidationError(`via(): field "${field}" has a descriptor with unrecognized _viaBrand "${descriptor._viaBrand}" \u2014 via() only supports money/i18n/computed/lookup descriptors today.`);
|
|
2077
|
-
}
|
|
2078
|
-
}
|
|
2079
|
-
}
|
|
2080
|
-
return {
|
|
2081
|
-
moneyFields: Object.keys(viaMoney).length > 0 ? { ...sources.moneyFields ?? {}, ...viaMoney } : sources.moneyFields,
|
|
2082
|
-
i18nFields: Object.keys(viaI18nText).length > 0 ? { ...sources.i18nFields ?? {}, ...viaI18nText } : sources.i18nFields,
|
|
2083
|
-
dictKeyFields: Object.keys(viaDictKey).length > 0 ? { ...sources.dictKeyFields ?? {}, ...viaDictKey } : sources.dictKeyFields,
|
|
2084
|
-
computedFields: Object.keys(viaComputed).length > 0 ? viaComputed : void 0,
|
|
2085
|
-
lookupFields: Object.keys(viaLookup).length > 0 ? { ...sources.lookupFields ?? {}, ...viaLookup } : sources.lookupFields
|
|
2086
|
-
};
|
|
2087
|
-
}
|
|
2088
|
-
var VIA_FIELD_MAP_FAMILY = {
|
|
2089
|
-
moneyFields: "money",
|
|
2090
|
-
i18nFields: "i18n",
|
|
2091
|
-
dictKeyFields: "i18n",
|
|
2092
|
-
lookupFields: "lookup",
|
|
2093
|
-
classifiedFields: "classified",
|
|
2094
|
-
blobFields: "blob",
|
|
2095
|
-
computed: "computed"
|
|
2096
|
-
};
|
|
2097
|
-
function guardCrossBindingFieldCollisions(fieldMaps, callerPrefix = "compileVias()") {
|
|
2098
|
-
const claimantsByField = /* @__PURE__ */ new Map();
|
|
2099
|
-
for (const [sourceKey, map] of Object.entries(fieldMaps)) {
|
|
2100
|
-
for (const field of Object.keys(map ?? {})) {
|
|
2101
|
-
const claimants = claimantsByField.get(field) ?? /* @__PURE__ */ new Set();
|
|
2102
|
-
claimants.add(sourceKey);
|
|
2103
|
-
claimantsByField.set(field, claimants);
|
|
2104
|
-
}
|
|
2105
|
-
}
|
|
2106
|
-
for (const [field, sourceKeys] of claimantsByField) {
|
|
2107
|
-
const families = new Set([...sourceKeys].map((key) => VIA_FIELD_MAP_FAMILY[key]));
|
|
2108
|
-
if (families.size < 2) continue;
|
|
2109
|
-
if (sourceKeys.size === 2 && families.has("computed")) {
|
|
2110
|
-
const other = [...families].find((f) => f !== "computed");
|
|
2111
|
-
if (other === "money" || other === "i18n" || other === "lookup") continue;
|
|
2112
|
-
}
|
|
2113
|
-
const keys = [...sourceKeys].sort().map((k) => `\`${k}\``);
|
|
2114
|
-
const joined = keys.length === 2 ? keys.join(" and ") : `${keys.slice(0, -1).join(", ")}, and ${keys[keys.length - 1]}`;
|
|
2115
|
-
throw new ValidationError(
|
|
2116
|
-
`${callerPrefix}: field "${field}" is declared in both ${joined} \u2014 a field cannot be claimed by two different via-binding families. Declare it in one place only.`
|
|
2117
|
-
);
|
|
2118
|
-
}
|
|
2119
|
-
}
|
|
2120
|
-
function guardReconcileCollisions(existingVia, incomingFieldMaps) {
|
|
2121
|
-
guardCrossBindingFieldCollisions(incomingFieldMaps, "guardReconcileCollisions()");
|
|
2122
|
-
if (!existingVia) return;
|
|
2123
|
-
const existingBindings = existingVia.bindings.filter((b) => b.brand !== "taint");
|
|
2124
|
-
for (const [sourceKey, map] of Object.entries(incomingFieldMaps)) {
|
|
2125
|
-
const incomingFamily = VIA_FIELD_MAP_FAMILY[sourceKey];
|
|
2126
|
-
if (incomingFamily === void 0) continue;
|
|
2127
|
-
for (const field of Object.keys(map ?? {})) {
|
|
2128
|
-
const existingFamilies = new Set(
|
|
2129
|
-
existingBindings.filter((b) => b.covers?.(field)).map((b) => b.brand)
|
|
2130
|
-
);
|
|
2131
|
-
for (const existingFamily of existingFamilies) {
|
|
2132
|
-
if (existingFamily === incomingFamily) continue;
|
|
2133
|
-
const isExempt = existingFamily === "computed" && (incomingFamily === "money" || incomingFamily === "i18n" || incomingFamily === "lookup") || incomingFamily === "computed" && (existingFamily === "money" || existingFamily === "i18n" || existingFamily === "lookup");
|
|
2134
|
-
if (isExempt) continue;
|
|
2135
|
-
throw new ValidationError(
|
|
2136
|
-
`vault.collection(): field "${field}" is already bound by the "${existingFamily}" via family on this collection \u2014 an incoming \`${sourceKey}\` declaration cannot claim it for a different family ("${incomingFamily}"). Declare it in one place only.`
|
|
2137
|
-
);
|
|
2138
|
-
}
|
|
2139
|
-
}
|
|
2140
|
-
}
|
|
2141
|
-
}
|
|
2142
|
-
|
|
2143
|
-
// src/kernel/collection-config.ts
|
|
2144
|
-
function computedEntryParts(entry) {
|
|
2145
|
-
if (typeof entry === "function") return { fn: entry, mode: "materialized" };
|
|
2146
|
-
return { fn: entry.fn, ...entry.deps !== void 0 ? { deps: entry.deps } : {}, mode: entry.mode ?? "materialized" };
|
|
2147
|
-
}
|
|
2148
|
-
function unifyComputedFields(opts, viaComputedFields) {
|
|
2149
|
-
return { ...opts.computed ?? {}, ...viaComputedFields ?? {} };
|
|
2150
|
-
}
|
|
2151
|
-
function compileVias(opts, classifiedGuardCtx, eraseCfgOut) {
|
|
2152
|
-
const { moneyFields, i18nFields, dictKeyFields, computedFields, lookupFields } = mergeViaFields(opts);
|
|
2153
|
-
const allComputedFields = unifyComputedFields(opts, computedFields);
|
|
2154
|
-
guardCrossBindingFieldCollisions({
|
|
2155
|
-
moneyFields,
|
|
2156
|
-
i18nFields,
|
|
2157
|
-
dictKeyFields,
|
|
2158
|
-
lookupFields,
|
|
2159
|
-
classifiedFields: opts.classifiedFields !== void 0 ? resolveClassifiedFields(opts.name, opts.classifiedFields).byField : void 0,
|
|
2160
|
-
blobFields: opts.blobFields,
|
|
2161
|
-
computed: allComputedFields
|
|
2162
|
-
});
|
|
2163
|
-
const bindings = [];
|
|
2164
|
-
const virtualFields = /* @__PURE__ */ new Map();
|
|
2165
|
-
for (const [field, entry] of Object.entries(allComputedFields)) {
|
|
2166
|
-
const parts = computedEntryParts(entry);
|
|
2167
|
-
if (parts.mode === "virtual") {
|
|
2168
|
-
virtualFields.set(field, { _viaBrand: "computed", fn: parts.fn, mode: "virtual", ...parts.deps !== void 0 ? { deps: parts.deps } : {} });
|
|
2169
|
-
}
|
|
2170
|
-
}
|
|
2171
|
-
if (moneyFields) {
|
|
2172
|
-
const virtualMoney = resolveVirtualMoneyFields(Object.keys(moneyFields), (f) => virtualFields.has(f));
|
|
2173
|
-
bindings.push(viaBinder("money")({ moneyFields, ...virtualMoney.size > 0 ? { virtualMoneyFields: virtualMoney } : {} }));
|
|
2174
|
-
}
|
|
2175
|
-
if (i18nFields || dictKeyFields) {
|
|
2176
|
-
const densify = i18nFields ? Object.fromEntries(
|
|
2177
|
-
Object.entries(i18nFields).filter(([, d]) => d.options.densifyOnWrite === true)
|
|
2178
|
-
) : {};
|
|
2179
|
-
const i18nDensifyFields = Object.keys(densify).length > 0 ? densify : void 0;
|
|
2180
|
-
bindings.push(viaBinder("i18n")({
|
|
2181
|
-
...i18nFields !== void 0 ? { i18nFields } : {},
|
|
2182
|
-
...dictKeyFields !== void 0 ? { dictKeyFields } : {},
|
|
2183
|
-
...i18nDensifyFields !== void 0 ? { i18nDensifyFields } : {},
|
|
2184
|
-
strategy: opts.strategies.i18n,
|
|
2185
|
-
...opts.defaultLocale !== void 0 ? { defaultLocale: opts.defaultLocale } : {},
|
|
2186
|
-
...opts.autoTranslateHook !== void 0 ? { autoTranslateHook: opts.autoTranslateHook } : {},
|
|
2187
|
-
...opts.dictLabelResolver !== void 0 ? { dictLabelResolver: opts.dictLabelResolver } : {},
|
|
2188
|
-
...opts.i18nPutValidator !== void 0 ? { i18nPutValidator: opts.i18nPutValidator } : {},
|
|
2189
|
-
collectionName: opts.name
|
|
2190
|
-
}));
|
|
2191
|
-
}
|
|
2192
|
-
if (lookupFields !== void 0) {
|
|
2193
|
-
bindings.push(viaBinder("lookup")({
|
|
2194
|
-
lookupFields,
|
|
2195
|
-
...opts.lookupLabelResolver !== void 0 ? { lookupLabelResolver: opts.lookupLabelResolver } : {},
|
|
2196
|
-
...opts.getLookupBacking !== void 0 ? { getLookupBacking: opts.getLookupBacking } : {},
|
|
2197
|
-
...opts.membership !== void 0 ? { membership: opts.membership } : {},
|
|
2198
|
-
...opts.getAltIndex !== void 0 ? { getAltIndex: opts.getAltIndex } : {},
|
|
2199
|
-
...opts.snapshotFor !== void 0 ? { snapshotFor: opts.snapshotFor } : {},
|
|
2200
|
-
collectionName: opts.name
|
|
2201
|
-
}));
|
|
2202
|
-
}
|
|
2203
|
-
if (opts.classifiedFields !== void 0) {
|
|
2204
|
-
const classifiedCfg = {
|
|
2205
|
-
entries: opts.classifiedFields,
|
|
2206
|
-
collectionName: opts.name,
|
|
2207
|
-
guardCtx: classifiedGuardCtx
|
|
2208
|
-
};
|
|
2209
|
-
if (eraseCfgOut) eraseCfgOut.classified = classifiedCfg;
|
|
2210
|
-
bindings.push(viaBinder("classified")(classifiedCfg));
|
|
2211
|
-
}
|
|
2212
|
-
if (opts.blobFields !== void 0) {
|
|
2213
|
-
bindings.push(viaBinder("blob")({
|
|
2214
|
-
fields: opts.blobFields,
|
|
2215
|
-
collectionName: opts.name
|
|
2216
|
-
}));
|
|
2217
|
-
}
|
|
2218
|
-
if (virtualFields.size > 0) {
|
|
2219
|
-
bindings.push(viaBinder("computed")({ virtualFields }));
|
|
2220
|
-
}
|
|
2221
|
-
return bindings;
|
|
2222
|
-
}
|
|
2223
|
-
function resolveVirtualMoneyFields(moneyFieldNames, isVirtual) {
|
|
2224
|
-
const out = /* @__PURE__ */ new Set();
|
|
2225
|
-
for (const field of moneyFieldNames) if (isVirtual(field)) out.add(field);
|
|
2226
|
-
return out;
|
|
2227
|
-
}
|
|
2228
|
-
function collectKnownFieldNames(parts) {
|
|
2229
|
-
return /* @__PURE__ */ new Set([
|
|
2230
|
-
...Object.keys(parts.moneyFields ?? {}),
|
|
2231
|
-
...Object.keys(parts.i18nFields ?? {}),
|
|
2232
|
-
...Object.keys(parts.dictKeyFields ?? {}),
|
|
2233
|
-
...Object.keys(parts.classifiedFields ?? {}),
|
|
2234
|
-
...Object.keys(parts.computed ?? {}),
|
|
2235
|
-
...Object.keys(parts.lookupFields ?? {})
|
|
2236
|
-
]);
|
|
2237
|
-
}
|
|
2238
|
-
var EMPTY_KNOWN_FIELDS = /* @__PURE__ */ new Set();
|
|
2239
|
-
function resolveComputedEdges(collectionName, computed, hasClassifiedFields, knownFields = EMPTY_KNOWN_FIELDS) {
|
|
2240
|
-
if (!computed) return [];
|
|
2241
|
-
const edges = [];
|
|
2242
|
-
for (const [field, entry] of Object.entries(computed)) {
|
|
2243
|
-
const parts = computedEntryParts(entry);
|
|
2244
|
-
const deps = parts.deps;
|
|
2245
|
-
if (deps === void 0) {
|
|
2246
|
-
if (hasClassifiedFields) {
|
|
2247
|
-
throw new ValidationError(
|
|
2248
|
-
`Collection "${collectionName}": computed field "${field}" has no declared \`deps\` and the collection declares classified fields \u2014 an opaque computed function could silently copy a classified field's plaintext into an ordinary, unredacted field. Declare \`deps\` naming the source fields it reads, e.g. computed: { ${field}: { fn, deps: [...] } } or via(computed(fn, { deps: [...] })).`
|
|
2249
|
-
);
|
|
2250
|
-
}
|
|
2251
|
-
continue;
|
|
2252
|
-
}
|
|
2253
|
-
if (deps.length === 0) {
|
|
2254
|
-
throw new ValidationError(`Collection "${collectionName}": computed field "${field}"'s \`deps\` must be non-empty.`);
|
|
2255
|
-
}
|
|
2256
|
-
for (const dep of deps) {
|
|
2257
|
-
if (typeof dep !== "string" || dep.length === 0) {
|
|
2258
|
-
throw new ValidationError(`Collection "${collectionName}": computed field "${field}"'s \`deps\` entries must be non-empty strings.`);
|
|
2259
|
-
}
|
|
2260
|
-
if (hasClassifiedFields && !knownFields.has(dep)) {
|
|
2261
|
-
throw new ValidationError(
|
|
2262
|
-
`Collection "${collectionName}": computed field "${field}"'s \`deps\` entry "${dep}" does not name a declared field, and the collection declares classified fields \u2014 an opaque computed function could silently copy a classified field's plaintext into an ordinary, unredacted field via a mistyped/unknown dep name. Declare \`deps\` naming only known fields (money/i18n/dictKey/classified/computed) \u2014 check "${dep}" for a typo.`
|
|
2263
|
-
);
|
|
2264
|
-
}
|
|
2265
|
-
}
|
|
2266
|
-
edges.push({
|
|
2267
|
-
target: { collection: collectionName, field },
|
|
2268
|
-
sources: deps.map((d) => ({ collection: collectionName, field: d })),
|
|
2269
|
-
grain: parts.mode === "virtual" ? "virtual" : "record"
|
|
2270
|
-
});
|
|
2271
|
-
}
|
|
2272
|
-
return edges;
|
|
2273
|
-
}
|
|
2274
|
-
function resolveViaDepsEdges(collectionName, bindings, knownFields) {
|
|
2275
|
-
const edges = [];
|
|
2276
|
-
for (const binding of bindings) {
|
|
2277
|
-
if (!binding.deps || binding.deps.length === 0) continue;
|
|
2278
|
-
for (const dep of binding.deps) {
|
|
2279
|
-
if (!knownFields.has(dep)) {
|
|
2280
|
-
throw new ValidationError(
|
|
2281
|
-
`Collection "${collectionName}": via binding "${binding.brand}" deps references undeclared field "${dep}".`
|
|
2282
|
-
);
|
|
2283
|
-
}
|
|
2284
|
-
}
|
|
2285
|
-
const sources = binding.deps.map((d) => ({ collection: collectionName, field: d }));
|
|
2286
|
-
for (const field of knownFields) {
|
|
2287
|
-
if (binding.covers?.(field)) edges.push({ target: { collection: collectionName, field }, sources });
|
|
2288
|
-
}
|
|
2289
|
-
}
|
|
2290
|
-
return edges;
|
|
2291
|
-
}
|
|
2292
|
-
function resolveCollectionConfig(opts) {
|
|
2293
|
-
if (opts.embeddings && opts.crdt) {
|
|
2294
|
-
throw new Error(
|
|
2295
|
-
`Collection "${opts.name}": embeddings are not supported on CRDT collections (L2). Use a non-CRDT collection for semantic search.`
|
|
2296
|
-
);
|
|
2297
|
-
}
|
|
2298
|
-
if (opts.sensitive && opts.sensitive.length > 0 && opts.crdt) {
|
|
2299
|
-
throw new Error(
|
|
2300
|
-
`Collection "${opts.name}": sensitive (structural group-encryption) is not supported on CRDT collections \u2014 the CRDT write path bypasses per-field sealing, so the fields would be stored in the ordinary encrypted body with no \`_sealed\` slot and no per-field key. Use a non-CRDT collection for sealed fields.`
|
|
2301
|
-
);
|
|
2302
|
-
}
|
|
2303
|
-
if (opts.tiers && opts.tiers.length > 0 && opts.blobFields !== void 0 && Object.keys(opts.blobFields).length > 0 && opts.perRecordKeys !== true) {
|
|
2304
|
-
throw new UnsupportedTierCompositionError(
|
|
2305
|
-
"blobs",
|
|
2306
|
-
`Collection "${opts.name}": tiered collections that declare blobFields require \`perRecordKeys: true\` \u2014 legacy (non-perRecordKeys) blobs have no per-blob content CEK and cannot be tier-isolated on elevate/demote.`
|
|
2307
|
-
);
|
|
2308
|
-
}
|
|
2309
|
-
if (opts.tiers && opts.tiers.length > 0 && opts.blobFields !== void 0) {
|
|
2310
|
-
for (const [field, policy] of Object.entries(opts.blobFields)) {
|
|
2311
|
-
if (policy?.external && policy.public === true) {
|
|
2312
|
-
throw new UnsupportedTierCompositionError(
|
|
2313
|
-
"blobs",
|
|
2314
|
-
`Collection "${opts.name}": blob field "${field}" cannot be both \`external: true, public: true\` and declared on a tiered collection \u2014 the object key is deterministic and its bytes are world-readable by design, so tier-invisibility can never be enforced for it once elevated. Use a private/presigned external field (\`public\` omitted or \`false\`) or move this field to a non-tiered collection.`
|
|
2315
|
-
);
|
|
2316
|
-
}
|
|
2317
|
-
}
|
|
2318
|
-
}
|
|
2319
|
-
if (opts.tiers && opts.tiers.length > 0 && opts.encrypted === false) {
|
|
2320
|
-
throw new UnsupportedTierCompositionError(
|
|
2321
|
-
"plaintext",
|
|
2322
|
-
`Collection "${opts.name}": tiers are per-tier ENCRYPTION keys \u2014 a plaintext collection (\`encrypted: false\`) has nothing to re-key, so \`putAtTier\`/\`elevate\` would encrypt/decrypt incoherently. Use an encrypted collection.`
|
|
2323
|
-
);
|
|
2324
|
-
}
|
|
2325
|
-
if (opts.tiers && opts.tiers.length > 0 && opts.crdt !== void 0 && ((opts.derivationSource?.registry().strategiesForSource(opts.name).length ?? 0) > 0 || (opts.materializedViewSource?.registry().mvsForSource(opts.name).length ?? 0) > 0)) {
|
|
2326
|
-
throw new UnsupportedTierCompositionError(
|
|
2327
|
-
"crdt-derivation",
|
|
2328
|
-
`Collection "${opts.name}": tiers + crdt cannot be combined with this collection acting as a derivation/rollup source (#739) \u2014 the tier-aware pre-move decode \`syncDerived\` uses on elevate()/demote() does not resolve CRDT state, so a registered derivation/rollup reads raw CrdtState instead of the record and silently no-ops. Use a non-CRDT collection for a tiered derivation/rollup source, or move the derivation off this collection.`
|
|
2329
|
-
);
|
|
2330
|
-
}
|
|
2331
|
-
const effectiveViaFields = mergeViaFields(opts);
|
|
2332
|
-
const resolvedClassified = opts.classifiedFields !== void 0 ? resolveClassifiedFields(opts.name, opts.classifiedFields) : void 0;
|
|
2333
|
-
const allComputed = unifyComputedFields(opts, effectiveViaFields.computedFields);
|
|
2334
|
-
const materializedComputed = {};
|
|
2335
|
-
for (const [field, entry] of Object.entries(allComputed)) {
|
|
2336
|
-
if (computedEntryParts(entry).mode !== "virtual") materializedComputed[field] = entry;
|
|
2337
|
-
}
|
|
2338
|
-
let mergedComputed = Object.keys(materializedComputed).length > 0 ? materializedComputed : void 0;
|
|
2339
|
-
if (resolvedClassified !== void 0) {
|
|
2340
|
-
for (const key of Object.keys(allComputed)) {
|
|
2341
|
-
if (resolvedClassified.riderComputed[key] !== void 0) {
|
|
2342
|
-
throw new ClassifiedConfigError(opts.name, `computed field "${key}" collides with a rider companion`);
|
|
2343
|
-
}
|
|
2344
|
-
}
|
|
2345
|
-
mergedComputed = { ...resolvedClassified.riderComputed, ...materializedComputed };
|
|
2346
|
-
}
|
|
2347
|
-
let deterministicFields;
|
|
2348
|
-
if (opts.deterministicFields && opts.deterministicFields.length > 0) {
|
|
2349
|
-
if (opts.acknowledgeDeterministicRisk !== true) {
|
|
2350
|
-
throw new Error(
|
|
2351
|
-
`Collection "${opts.name}": deterministicFields requires \`acknowledgeDeterministicRisk: true\`. Deterministic encryption leaks equality between records \u2014 two records with the same field value produce identical ciphertexts visible to anyone with store access. If that trade-off is acceptable for your threat model, set \`acknowledgeDeterministicRisk: true\` to enable.`
|
|
2352
|
-
);
|
|
2353
|
-
}
|
|
2354
|
-
deterministicFields = Object.freeze(new Set(opts.deterministicFields));
|
|
2355
|
-
} else {
|
|
2356
|
-
deterministicFields = null;
|
|
2357
|
-
}
|
|
2358
|
-
const guardIndexedFields = /* @__PURE__ */ new Set();
|
|
2359
|
-
for (const ix of opts.indexes ?? []) {
|
|
2360
|
-
if (typeof ix === "string") guardIndexedFields.add(ix);
|
|
2361
|
-
else if (Array.isArray(ix)) for (const f of ix) guardIndexedFields.add(f);
|
|
2362
|
-
else for (const f of ix.fields) guardIndexedFields.add(f);
|
|
2363
|
-
}
|
|
2364
|
-
const embeddingSources = opts.embeddings === void 0 ? [] : typeof opts.embeddings.source === "string" ? [opts.embeddings.source] : [...opts.embeddings.source];
|
|
2365
|
-
const classifiedGuardCtx = {
|
|
2366
|
-
perRecordKeys: opts.perRecordKeys === true,
|
|
2367
|
-
crdt: opts.crdt !== void 0,
|
|
2368
|
-
hasConflictPolicy: opts.conflictPolicy !== void 0,
|
|
2369
|
-
storeCiphertext: opts.encrypted,
|
|
2370
|
-
deterministicFields,
|
|
2371
|
-
indexedFields: guardIndexedFields,
|
|
2372
|
-
textIndexFields: new Set(opts.textIndexes ?? []),
|
|
2373
|
-
vectorSourceFields: new Set(embeddingSources),
|
|
2374
|
-
subjectKeyField: opts.subjectKeyField,
|
|
2375
|
-
bareSensitiveFields: new Set(opts.sensitive ?? []),
|
|
2376
|
-
acknowledgeEquatableRisk: opts.acknowledgeEquatableRisk === true
|
|
2377
|
-
};
|
|
2378
|
-
if (resolvedClassified !== void 0) {
|
|
2379
|
-
guardClassifiedCompat(opts.name, resolvedClassified.byField, classifiedGuardCtx);
|
|
2380
|
-
}
|
|
2381
|
-
const classifiedSensitive = resolvedClassified === void 0 ? [] : Object.entries(resolvedClassified.byField).filter(([, s]) => s.storage === "recoverable").map(([f]) => f);
|
|
2382
|
-
const sensitiveList = [...opts.sensitive ?? [], ...classifiedSensitive];
|
|
2383
|
-
const sensitiveFields = sensitiveList.length > 0 ? Object.freeze(new Set(sensitiveList)) : Object.freeze(/* @__PURE__ */ new Set());
|
|
2384
|
-
const vdigEntries = resolvedClassified === void 0 ? [] : Object.entries(resolvedClassified.byField).filter(([, s]) => s.storage === "digest-only").map(([f, s]) => [f, {
|
|
2385
|
-
normalize: s.verifyNormalize ?? "password",
|
|
2386
|
-
notLastN: s.notLastN ?? 0,
|
|
2387
|
-
equatable: s.equatable === true,
|
|
2388
|
-
...s.rotateDays !== void 0 ? { rotateDays: s.rotateDays } : {}
|
|
2389
|
-
}]);
|
|
2390
|
-
const vdigFields = vdigEntries.length > 0 ? new Map(vdigEntries) : null;
|
|
2391
|
-
const perRecordCek = opts.perRecordKeys === true;
|
|
2392
|
-
const cekCache = perRecordCek ? new Lru({ maxRecords: 4096 }) : null;
|
|
2393
|
-
const viaEraseCfgOut = {};
|
|
2394
|
-
const via2 = ViaPipeline.build(compileVias(opts, classifiedGuardCtx, viaEraseCfgOut));
|
|
2395
|
-
const knownFields = collectKnownFieldNames({
|
|
2396
|
-
moneyFields: effectiveViaFields.moneyFields,
|
|
2397
|
-
i18nFields: effectiveViaFields.i18nFields,
|
|
2398
|
-
dictKeyFields: effectiveViaFields.dictKeyFields,
|
|
2399
|
-
classifiedFields: resolvedClassified?.byField,
|
|
2400
|
-
computed: allComputed,
|
|
2401
|
-
lookupFields: effectiveViaFields.lookupFields
|
|
2402
|
-
});
|
|
2403
|
-
const computedEdges = resolveComputedEdges(opts.name, allComputed, resolvedClassified !== void 0, knownFields);
|
|
2404
|
-
const viaDepsEdges = resolveViaDepsEdges(opts.name, via2?.bindings ?? [], knownFields);
|
|
2405
|
-
return {
|
|
2406
|
-
adapter: opts.adapter,
|
|
2407
|
-
vault: opts.vault,
|
|
2408
|
-
name: opts.name,
|
|
2409
|
-
keyring: opts.keyring,
|
|
2410
|
-
storeCiphertext: opts.encrypted,
|
|
2411
|
-
ramCiphertext: opts.ramCiphertext ?? false,
|
|
2412
|
-
emitter: opts.emitter,
|
|
2413
|
-
writeQueue: opts.writeQueue,
|
|
2414
|
-
schemaUpdateGate: opts.schemaUpdateGate,
|
|
2415
|
-
schemaFence: opts.schemaFence,
|
|
2416
|
-
writeHooks: opts.writeHooks,
|
|
2417
|
-
subsystemBus: opts.subsystemBus,
|
|
2418
|
-
activeTxId: opts.activeTxId,
|
|
2419
|
-
strategies: opts.strategies,
|
|
2420
|
-
objectStore: opts.objectStore,
|
|
2421
|
-
blobFields: opts.blobFields,
|
|
2422
|
-
reconcileOnOpen: opts.reconcileOnOpen ?? "off",
|
|
2423
|
-
getDEK: opts.getDEK,
|
|
2424
|
-
onDirty: opts.onDirty,
|
|
2425
|
-
tabCoordinated: opts.tabCoordinated,
|
|
2426
|
-
historyConfig: opts.historyConfig ?? { enabled: true },
|
|
2427
|
-
historyConfigExplicit: opts.historyConfigExplicit ?? false,
|
|
2428
|
-
schema: opts.schema,
|
|
2429
|
-
ledger: opts.ledger,
|
|
2430
|
-
refEnforcer: opts.refEnforcer,
|
|
2431
|
-
joinResolver: opts.joinResolver,
|
|
2432
|
-
i18nFields: effectiveViaFields.i18nFields,
|
|
2433
|
-
textIndexes: opts.textIndexes,
|
|
2434
|
-
embeddings: opts.embeddings,
|
|
2435
|
-
vectorSet: opts.embeddings ? new VectorSet() : void 0,
|
|
2436
|
-
dictKeyFields: effectiveViaFields.dictKeyFields,
|
|
2437
|
-
lookupFields: effectiveViaFields.lookupFields,
|
|
2438
|
-
// #650 Task 6 — the sync join-dressing hook (#626 retirement, spec §5);
|
|
2439
|
-
// `undefined` when this collection declares neither i18nText nor lookup
|
|
2440
|
-
// fields, matching today's `i18nFields`-absent JoinableSource shape.
|
|
2441
|
-
presentForJoin: buildPresentForJoin(effectiveViaFields.i18nFields, effectiveViaFields.lookupFields, opts.snapshotFor),
|
|
2442
|
-
fieldMeta: opts.fieldMeta,
|
|
2443
|
-
meta: opts.meta,
|
|
2444
|
-
_refs: opts.declaredRefs ?? {},
|
|
2445
|
-
via: via2,
|
|
2446
|
-
classifiedEraseCfg: viaEraseCfgOut.classified,
|
|
2447
|
-
moneyFields: effectiveViaFields.moneyFields,
|
|
2448
|
-
classified: resolvedClassified,
|
|
2449
|
-
classifiedGuardCtx,
|
|
2450
|
-
computed: mergedComputed,
|
|
2451
|
-
computedEdges,
|
|
2452
|
-
viaDepsEdges,
|
|
2453
|
-
// #638 Task 7 — every declared computed field name (both modes, both surfaces); the
|
|
2454
|
-
// reconcile path's cross-call depsless-computed leak-guard memory
|
|
2455
|
-
// (`via/graph-wiring.ts#registerCollectionGraphSources`) reads this instead of
|
|
2456
|
-
// `Object.keys(opts.computed ?? {})` alone, so a via(computed(...))-declared field
|
|
2457
|
-
// participates in that guard identically to a sugar-declared one.
|
|
2458
|
-
computedFieldNames: Object.keys(allComputed),
|
|
2459
|
-
dictLabelResolver: opts.dictLabelResolver,
|
|
2460
|
-
getDictionary: opts.getDictionary,
|
|
2461
|
-
i18nPutValidator: opts.i18nPutValidator,
|
|
2462
|
-
autoTranslateHook: opts.autoTranslateHook,
|
|
2463
|
-
defaultLocale: opts.defaultLocale,
|
|
2464
|
-
crdtMode: opts.crdt,
|
|
2465
|
-
syncAdapter: opts.syncAdapter,
|
|
2466
|
-
onAccess: opts.onAccess,
|
|
2467
|
-
derivationSource: opts.derivationSource,
|
|
2468
|
-
materializedViewSource: opts.materializedViewSource,
|
|
2469
|
-
graphDispatch: opts.graphDispatch,
|
|
2470
|
-
tiers: opts.tiers && opts.tiers.length > 0 ? new Set(opts.tiers) : null,
|
|
2471
|
-
tierMode: opts.tierMode ?? "invisibility",
|
|
2472
|
-
blobTierPolicy: opts.blobTierPolicy ?? "isolate",
|
|
2473
|
-
onCrossTierAccess: opts.onCrossTierAccess,
|
|
2474
|
-
addSubjectRef: opts.addSubjectRef,
|
|
2475
|
-
deterministicFields,
|
|
2476
|
-
sensitiveFields,
|
|
2477
|
-
vdigFields,
|
|
2478
|
-
perRecordCek,
|
|
2479
|
-
cekCache,
|
|
2480
|
-
provenance: opts.provenance === true
|
|
2481
|
-
};
|
|
2482
|
-
}
|
|
2483
|
-
|
|
2484
1327
|
// src/with-formula/computed/lazy.ts
|
|
2485
|
-
var loadComputed = lazy(() => import("./computed-
|
|
1328
|
+
var loadComputed = lazy(() => import("./computed-VPOKQK4N.js"));
|
|
2486
1329
|
async function loadEvalComputedFields() {
|
|
2487
1330
|
return (await loadComputed()).evalComputedFields;
|
|
2488
1331
|
}
|
|
@@ -3093,6 +1936,8 @@ var Collection = class {
|
|
|
3093
1936
|
computed: this.computed,
|
|
3094
1937
|
refs: this._refs,
|
|
3095
1938
|
zodFields: void 0,
|
|
1939
|
+
schema: this.schema,
|
|
1940
|
+
// #1253 — sync fieldMeta key-validation
|
|
3096
1941
|
...this.meta !== void 0 ? { meta: this.meta } : {},
|
|
3097
1942
|
...this.i18nFields !== void 0 ? { i18nFields: this.i18nFields } : {},
|
|
3098
1943
|
...this.classified !== void 0 ? { classified: this.classified.byField } : {},
|
|
@@ -3149,7 +1994,7 @@ var Collection = class {
|
|
|
3149
1994
|
}
|
|
3150
1995
|
/** JSON Schema for this collection with describe() metadata as x- extensions. */
|
|
3151
1996
|
async toJSONSchema() {
|
|
3152
|
-
const { buildJsonSchema } = await import("./json-schema-
|
|
1997
|
+
const { buildJsonSchema } = await import("./json-schema-V3M5MUCM.js");
|
|
3153
1998
|
const desc = await this.describe({});
|
|
3154
1999
|
let base = null;
|
|
3155
2000
|
if (this.schema !== void 0) {
|
|
@@ -3265,7 +2110,7 @@ var Collection = class {
|
|
|
3265
2110
|
}
|
|
3266
2111
|
await this.onAccess?.("find", "*");
|
|
3267
2112
|
if (hits.length === 0) return [];
|
|
3268
|
-
const { verifyDigestField } = await import("./verify-
|
|
2113
|
+
const { verifyDigestField } = await import("./verify-KOV2G5D6.js");
|
|
3269
2114
|
const policy = {
|
|
3270
2115
|
normalize: spec.verifyNormalize ?? "password",
|
|
3271
2116
|
notLastN: spec.notLastN ?? 0,
|
|
@@ -3477,7 +2322,7 @@ var Collection = class {
|
|
|
3477
2322
|
}
|
|
3478
2323
|
}
|
|
3479
2324
|
if (this.materializedViewSource !== void 0) {
|
|
3480
|
-
const { resolveStaleMVOnRead } = await import("./stale-
|
|
2325
|
+
const { resolveStaleMVOnRead } = await import("./stale-DDL7WQEZ.js");
|
|
3481
2326
|
await resolveStaleMVOnRead(this.materializedViewSource, this.name, this.#dispatchCtx({ collection: this.name, id: "resolve-on-read" }));
|
|
3482
2327
|
}
|
|
3483
2328
|
let record;
|
|
@@ -3829,7 +2674,8 @@ var Collection = class {
|
|
|
3829
2674
|
this.indexes?.upsert(id, indexed, prior ? prior.record : null);
|
|
3830
2675
|
this.uniqueConstraints?.upsert(id, indexed, prior?.record);
|
|
3831
2676
|
}
|
|
3832
|
-
|
|
2677
|
+
const priorForTrigger = prior ? prior.record : null;
|
|
2678
|
+
await this._onRecordMutated(id, "put", "local-write", { record: event, version, prior: priorForTrigger });
|
|
3833
2679
|
}
|
|
3834
2680
|
/**
|
|
3835
2681
|
* The pre-envelope stages both write paths share (#904): permission + tier
|
|
@@ -4008,7 +2854,7 @@ var Collection = class {
|
|
|
4008
2854
|
*/
|
|
4009
2855
|
async dispatchMaterializedViews(id, record, wave) {
|
|
4010
2856
|
if (this.materializedViewSource === void 0) return;
|
|
4011
|
-
const { dispatchMaterializedViews } = await import("./dispatch-
|
|
2857
|
+
const { dispatchMaterializedViews } = await import("./dispatch-WC6X2M6C.js");
|
|
4012
2858
|
return dispatchMaterializedViews(this.#mvDispatchCtx(this.materializedViewSource), id, record, wave);
|
|
4013
2859
|
}
|
|
4014
2860
|
/**
|
|
@@ -4067,34 +2913,23 @@ var Collection = class {
|
|
|
4067
2913
|
const record = await this.codec.decryptRecord({ collection: this.name, id }, env, {});
|
|
4068
2914
|
return record === null ? null : { record, version: env._v };
|
|
4069
2915
|
}
|
|
4070
|
-
/**
|
|
4071
|
-
* @internal Ids of records whose top-level `field` equals `value`.
|
|
4072
|
-
* Uses the FK index when the field is indexed (O(matches)); otherwise a
|
|
4073
|
-
* linear scan (O(N) — fine for small child sets; index the FK to scale).
|
|
4074
|
-
*/
|
|
2916
|
+
/** @internal Ids of records whose top-level `field` equals `value` — delegates to the composite scan. */
|
|
4075
2917
|
async _findMatchingIds(field, value) {
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
}
|
|
4091
|
-
const ids = await this.adapter.list(this.vault, this.name);
|
|
4092
|
-
const out = [];
|
|
4093
|
-
for (const rid of ids) {
|
|
4094
|
-
const raw = await this._getStoredRecord(rid);
|
|
4095
|
-
if (raw !== null && matches(raw)) out.push(rid);
|
|
4096
|
-
}
|
|
4097
|
-
return out;
|
|
2918
|
+
if (typeof value !== "string" && typeof value !== "number") return [];
|
|
2919
|
+
return this._findMatchingCompositeIds([{ field, value: String(value) }]);
|
|
2920
|
+
}
|
|
2921
|
+
/** @internal — conjunction fan-out for composite triggerBy (#1249). First indexed pair narrows,
|
|
2922
|
+
* filtered by the OTHER pairs only; zero reads when the index alone decides membership. */
|
|
2923
|
+
async _findMatchingCompositeIds(pairs) {
|
|
2924
|
+
if (!this.lazy) await this.ensureHydrated();
|
|
2925
|
+
const i = pairs.findIndex((p) => this.getIndexes()?.lookupEqual(p.field, p.value));
|
|
2926
|
+
const hit = i < 0 ? null : this.getIndexes().lookupEqual(pairs[i].field, pairs[i].value);
|
|
2927
|
+
const residual = i < 0 ? pairs : pairs.filter((_, j) => j !== i);
|
|
2928
|
+
return findMatchingIdsByPairs(residual, {
|
|
2929
|
+
indexCandidates: hit ? [...hit] : null,
|
|
2930
|
+
listIds: async () => this.lazy ? this.adapter.list(this.vault, this.name) : [...this.cache.keys()],
|
|
2931
|
+
getRecord: async (id) => this.lazy ? await this._getStoredRecord(id) : this.cache.get(id)?.record ?? null
|
|
2932
|
+
});
|
|
4098
2933
|
}
|
|
4099
2934
|
/** @internal — ctx for `putDerivedOutput`'s frozen-period skip+audit (#638 Task 5). */
|
|
4100
2935
|
/** What `with-formula/materialized-views/dispatch.ts` needs from this collection (#842). */
|
|
@@ -4177,18 +3012,22 @@ var Collection = class {
|
|
|
4177
3012
|
if (spec) await this.recomputeRollup(spec, intent.parentId, { collection: this.name, id: "<sync-delete>" }, wave);
|
|
4178
3013
|
}
|
|
4179
3014
|
}
|
|
3015
|
+
/** Extras added onto {@link #derivationDeleteCtx} — shared by `dispatchDerivations` and `dispatchTriggerDerivationsOnDelete` (#1249). */
|
|
3016
|
+
#derivationDispatchCtx() {
|
|
3017
|
+
return { ...this.#derivationDeleteCtx(this.derivationSource), via: this.via, recomputeRollup: this.recomputeRollup.bind(this), dispatchCtx: this.#dispatchCtx.bind(this), trackPut: this.#trackPut.bind(this) };
|
|
3018
|
+
}
|
|
4180
3019
|
/** @internal `wave` (#638 Task 4) — threaded to `recomputeRollup` for the sync/cutover/restore
|
|
4181
3020
|
* dispatch wave's per-target dedup; `undefined` on the local-write path (byte-identical). */
|
|
4182
|
-
async dispatchDerivations(id, record, version, wave) {
|
|
3021
|
+
async dispatchDerivations(id, record, version, wave, prior) {
|
|
4183
3022
|
if (this.derivationSource === void 0) return;
|
|
4184
|
-
const { dispatchDerivations } = await import("./dispatch-
|
|
4185
|
-
return dispatchDerivations(
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
3023
|
+
const { dispatchDerivations } = await import("./dispatch-S73TK3IY.js");
|
|
3024
|
+
return dispatchDerivations(this.#derivationDispatchCtx(), id, record, version, wave, prior);
|
|
3025
|
+
}
|
|
3026
|
+
/** @internal — trigger fan-out for a deleted parent (#1249); see dispatch.ts. */
|
|
3027
|
+
async dispatchTriggerDerivationsOnDelete(id, deleted) {
|
|
3028
|
+
if (this.derivationSource === void 0) return;
|
|
3029
|
+
const { dispatchTriggerDerivationsOnDelete } = await import("./dispatch-S73TK3IY.js");
|
|
3030
|
+
return dispatchTriggerDerivationsOnDelete(this.#derivationDispatchCtx(), id, deleted);
|
|
4192
3031
|
}
|
|
4193
3032
|
/**
|
|
4194
3033
|
* Delete a record by ID. Runs inside the hub's write-queue tracker
|
|
@@ -4426,7 +3265,10 @@ var Collection = class {
|
|
|
4426
3265
|
if (!internal) {
|
|
4427
3266
|
await this.dispatchMaterializedViewsOnDelete(id);
|
|
4428
3267
|
await this.dispatchArrayDerivationsOnDelete(id);
|
|
4429
|
-
if (existing)
|
|
3268
|
+
if (existing) {
|
|
3269
|
+
await this.dispatchRollupsOnDelete(id, existing.record);
|
|
3270
|
+
await this.dispatchTriggerDerivationsOnDelete(id, existing.record);
|
|
3271
|
+
}
|
|
4430
3272
|
}
|
|
4431
3273
|
return true;
|
|
4432
3274
|
}
|
|
@@ -4496,7 +3338,7 @@ var Collection = class {
|
|
|
4496
3338
|
*/
|
|
4497
3339
|
async dispatchArrayDerivationsOnDelete(id, eraseRecordShapeToo = false) {
|
|
4498
3340
|
if (this.derivationSource === void 0) return 0;
|
|
4499
|
-
const { dispatchArrayDerivationsOnDelete } = await import("./dispatch-
|
|
3341
|
+
const { dispatchArrayDerivationsOnDelete } = await import("./dispatch-S73TK3IY.js");
|
|
4500
3342
|
return dispatchArrayDerivationsOnDelete(this.#derivationDeleteCtx(this.derivationSource), id, eraseRecordShapeToo);
|
|
4501
3343
|
}
|
|
4502
3344
|
/**
|
|
@@ -4510,7 +3352,7 @@ var Collection = class {
|
|
|
4510
3352
|
*/
|
|
4511
3353
|
async dispatchMaterializedViewsOnDelete(id) {
|
|
4512
3354
|
if (this.materializedViewSource === void 0) return { deleted: 0, residueUndecodable: [], residueDeclined: [] };
|
|
4513
|
-
const { dispatchMaterializedViewsOnDelete } = await import("./dispatch-
|
|
3355
|
+
const { dispatchMaterializedViewsOnDelete } = await import("./dispatch-WC6X2M6C.js");
|
|
4514
3356
|
return dispatchMaterializedViewsOnDelete(this.#mvDispatchCtx(this.materializedViewSource), id);
|
|
4515
3357
|
}
|
|
4516
3358
|
/**
|
|
@@ -4530,7 +3372,7 @@ var Collection = class {
|
|
|
4530
3372
|
);
|
|
4531
3373
|
}
|
|
4532
3374
|
if (this.materializedViewSource !== void 0) {
|
|
4533
|
-
const { resolveStaleMVOnRead } = await import("./stale-
|
|
3375
|
+
const { resolveStaleMVOnRead } = await import("./stale-DDL7WQEZ.js");
|
|
4534
3376
|
await resolveStaleMVOnRead(this.materializedViewSource, this.name, this.#dispatchCtx({ collection: this.name, id: "resolve-on-read" }));
|
|
4535
3377
|
}
|
|
4536
3378
|
await this.ensureHydrated();
|
|
@@ -5194,7 +4036,7 @@ var Collection = class {
|
|
|
5194
4036
|
this.emitter.emit("change", { vault: this.vault, collection: this.name, id, action: "put" });
|
|
5195
4037
|
this.searchIndexStore?.markDirty();
|
|
5196
4038
|
await this.onAccess?.("put", id);
|
|
5197
|
-
await this.dispatchDerivations(id, record, version);
|
|
4039
|
+
await this.dispatchDerivations(id, record, version, void 0, ctx.prior);
|
|
5198
4040
|
await this.dispatchMaterializedViews(id, record);
|
|
5199
4041
|
return;
|
|
5200
4042
|
}
|
|
@@ -5640,14 +4482,14 @@ var Collection = class {
|
|
|
5640
4482
|
/** C-A/R10: persist the classified marker once per classified handle (store I/O in config-drift.ts). */
|
|
5641
4483
|
async _ensureClassifiedMarker() {
|
|
5642
4484
|
if (this._markerPersisted || this.vdigFields === null) return;
|
|
5643
|
-
const { persistClassifiedMarkerForFields } = await import("./classified-marker-
|
|
4485
|
+
const { persistClassifiedMarkerForFields } = await import("./classified-marker-LI2SF2E4.js");
|
|
5644
4486
|
await persistClassifiedMarkerForFields(this.adapter, this.vault, this.name, this.vdigFields, await this.getDEK(this.name));
|
|
5645
4487
|
this._markerPersisted = true;
|
|
5646
4488
|
}
|
|
5647
4489
|
/** C-A/R10 drift signal — the marker's declared digest-only set, memoized to one store read per handle (see config-drift.ts). */
|
|
5648
4490
|
async _classifiedMarkerDigestOnly() {
|
|
5649
4491
|
if (this._markerDigestOnlyCache !== void 0) return this._markerDigestOnlyCache;
|
|
5650
|
-
const { readClassifiedMarkerDigestOnly } = await import("./classified-marker-
|
|
4492
|
+
const { readClassifiedMarkerDigestOnly } = await import("./classified-marker-LI2SF2E4.js");
|
|
5651
4493
|
this._markerDigestOnlyCache = await readClassifiedMarkerDigestOnly(this.adapter, this.vault, this.name, await this.getDEK(this.name));
|
|
5652
4494
|
return this._markerDigestOnlyCache;
|
|
5653
4495
|
}
|
|
@@ -7273,7 +6115,7 @@ var VaultLinks = class {
|
|
|
7273
6115
|
// src/with-shape/links/lazy-handle.ts
|
|
7274
6116
|
function makeLazyLinkSetHandle(d) {
|
|
7275
6117
|
let engine = null;
|
|
7276
|
-
const load = () => engine ??= import("./link-set-
|
|
6118
|
+
const load = () => engine ??= import("./link-set-FKNWAYKS.js").then(
|
|
7277
6119
|
({ LinkSet }) => new LinkSet(d.adapter, d.vault, d.name, d.spec, d.encrypted, d.getDEK, d.actor, d.emitter, d.endpointExists)
|
|
7278
6120
|
);
|
|
7279
6121
|
return {
|
|
@@ -7924,7 +6766,7 @@ function declareSatellite(ctx, collectionName, options, existingRegistry) {
|
|
|
7924
6766
|
ctx.forEachSyncEngine((e) => e.remirrorPairResolvers([spec.base, spec.satellite]));
|
|
7925
6767
|
const registry = reg;
|
|
7926
6768
|
const baseSchema = ctx.getBaseSchema(spec.base);
|
|
7927
|
-
void import("./post-register-
|
|
6769
|
+
void import("./post-register-LNE2FE2A.js").then((m) => m.postRegister(ctx.adapter, ctx.vaultName, spec, ctx.getDEK, baseSchema, registry)).catch(() => {
|
|
7928
6770
|
});
|
|
7929
6771
|
return reg;
|
|
7930
6772
|
}
|
|
@@ -8899,7 +7741,7 @@ var Vault = class {
|
|
|
8899
7741
|
const strategies = options.schemaUpdate ?? [];
|
|
8900
7742
|
const work = (async () => {
|
|
8901
7743
|
const dek = await this.getDEK(collectionName);
|
|
8902
|
-
const { persistSchemaIfNeeded } = await import("./register-
|
|
7744
|
+
const { persistSchemaIfNeeded } = await import("./register-I2DZXGAR.js");
|
|
8903
7745
|
const result = await persistSchemaIfNeeded({
|
|
8904
7746
|
store: this.adapter,
|
|
8905
7747
|
vault: this.name,
|
|
@@ -8961,7 +7803,7 @@ var Vault = class {
|
|
|
8961
7803
|
// Vaults without derivations skip this so `Collection.put`'s
|
|
8962
7804
|
// `if (this.derivationSource)` branch no-ops without touching the
|
|
8963
7805
|
// derivation service code.
|
|
8964
|
-
...this.derivationRegistry !== null ? {
|
|
7806
|
+
...this.derivationRegistry !== null ? (this.derivationRegistry.validateFieldsFor(collectionName, options?.schema, Object.keys({ ...options?.fieldMeta, ...options?.moneyFields, ...options?.dictKeyFields, ...options?.refs, ...options?.computed, ...options?.i18nFields, ...options?.lookupFields, ...options?.blobFields, ...options?.classifiedFields }), options), {
|
|
8965
7807
|
derivationSource: {
|
|
8966
7808
|
registry: () => this.derivationRegistry,
|
|
8967
7809
|
getCollection: (name) => this.collection(name),
|
|
@@ -8971,7 +7813,7 @@ var Vault = class {
|
|
|
8971
7813
|
setActiveTxContext: (ctx) => this.noydb._setActiveTxContext(ctx),
|
|
8972
7814
|
clearActiveTxContext: (ctx) => this.noydb._clearActiveTxContext(ctx)
|
|
8973
7815
|
}
|
|
8974
|
-
} : {},
|
|
7816
|
+
}) : {},
|
|
8975
7817
|
...this.materializedViewRegistry !== null ? {
|
|
8976
7818
|
materializedViewSource: {
|
|
8977
7819
|
registry: () => this.materializedViewRegistry,
|
|
@@ -9049,7 +7891,7 @@ var Vault = class {
|
|
|
9049
7891
|
const work = (async () => {
|
|
9050
7892
|
try {
|
|
9051
7893
|
const dek = await this.getDEK(collectionName);
|
|
9052
|
-
await (await import("./register-
|
|
7894
|
+
await (await import("./register-I2DZXGAR.js")).persistSchemaIfNeeded({
|
|
9053
7895
|
store: this.adapter,
|
|
9054
7896
|
vault: this.name,
|
|
9055
7897
|
collectionName,
|
|
@@ -9095,7 +7937,7 @@ var Vault = class {
|
|
|
9095
7937
|
* writes (unfenced walk — see `with-shape/satellites/migrate-cek.ts`); resumable.
|
|
9096
7938
|
*/
|
|
9097
7939
|
async migrateSatellitePerRecordKeys(satelliteName) {
|
|
9098
|
-
const { migrateSatelliteCek } = await import("./migrate-cek-
|
|
7940
|
+
const { migrateSatelliteCek } = await import("./migrate-cek-5ENH64AA.js");
|
|
9099
7941
|
return migrateSatelliteCek(satelliteName, this.collection(satelliteName, { perRecordKeys: true }));
|
|
9100
7942
|
}
|
|
9101
7943
|
/**
|
|
@@ -9277,7 +8119,7 @@ var Vault = class {
|
|
|
9277
8119
|
async _ensureFenceCoordination() {
|
|
9278
8120
|
if (this.#fenceCoordinationStarted) return;
|
|
9279
8121
|
this.#fenceCoordinationStarted = true;
|
|
9280
|
-
const { FenceWatcher } = await import("./fence-watcher-
|
|
8122
|
+
const { FenceWatcher } = await import("./fence-watcher-U2PW6JU5.js");
|
|
9281
8123
|
if (!this.#fenceCoordinationStarted) return;
|
|
9282
8124
|
this.#fenceWatcher = new FenceWatcher({
|
|
9283
8125
|
coordination: this.noydb.mesh,
|
|
@@ -9726,7 +8568,7 @@ var Vault = class {
|
|
|
9726
8568
|
*/
|
|
9727
8569
|
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
9728
8570
|
async _loadPodSigner() {
|
|
9729
|
-
const { loadSigner } = await import("./signer-
|
|
8571
|
+
const { loadSigner } = await import("./signer-WAMDZHEN.js");
|
|
9730
8572
|
return loadSigner(this.adapter, this.name, this.getDEK);
|
|
9731
8573
|
}
|
|
9732
8574
|
async writeExportAudit(entry) {
|
|
@@ -9955,7 +8797,7 @@ var Vault = class {
|
|
|
9955
8797
|
const blobsEnabled = this.strategies.blobs !== NO_BLOBS;
|
|
9956
8798
|
const actor = this.keyring.userId;
|
|
9957
8799
|
const fanoutStats = { recordsErased: 0, aggregatesRecomputed: 0, residueFrozen: [], lookupReferencesCascaded: 0, lookupReferencesNullified: 0, lookupReferencesResidue: [], derivedResidueUndecodable: [], derivedResidueDeclined: [] };
|
|
9958
|
-
const { partitionSealedCekKeys, shouldSkipBlobScan, bumpResidueCount, residueNoticesFromMap } = await import("./purge-scope-
|
|
8800
|
+
const { partitionSealedCekKeys, shouldSkipBlobScan, bumpResidueCount, residueNoticesFromMap } = await import("./purge-scope-4HEFPDOW.js");
|
|
9959
8801
|
const scopedPurge = this.strategies.forget.scopedPurge === true;
|
|
9960
8802
|
const sealedCekScopedSkipped = /* @__PURE__ */ new Map();
|
|
9961
8803
|
const blobScopedSkipped = /* @__PURE__ */ new Map();
|
|
@@ -10216,8 +9058,8 @@ var Vault = class {
|
|
|
10216
9058
|
async _initGuards(handles) {
|
|
10217
9059
|
if (handles.length === 0) return;
|
|
10218
9060
|
const [{ GuardRegistry }, { ReadOnlyVaultFacade }] = await Promise.all([
|
|
10219
|
-
import("./registry-
|
|
10220
|
-
import("./read-only-facade-
|
|
9061
|
+
import("./registry-4AYVUNXK.js"),
|
|
9062
|
+
import("./read-only-facade-BIGO37U3.js")
|
|
10221
9063
|
]);
|
|
10222
9064
|
const registry = new GuardRegistry();
|
|
10223
9065
|
for (const h of handles) registry.register(h.spec);
|
|
@@ -10244,8 +9086,8 @@ var Vault = class {
|
|
|
10244
9086
|
async _initDerivations(handles) {
|
|
10245
9087
|
if (handles.length === 0) return;
|
|
10246
9088
|
const [{ DerivationRegistry }, { ReadOnlyVaultFacade }] = await Promise.all([
|
|
10247
|
-
import("./registry-
|
|
10248
|
-
import("./read-only-facade-
|
|
9089
|
+
import("./registry-YLEWMGAC.js"),
|
|
9090
|
+
import("./read-only-facade-BIGO37U3.js")
|
|
10249
9091
|
]);
|
|
10250
9092
|
const registry = new DerivationRegistry();
|
|
10251
9093
|
for (const h of handles) {
|
|
@@ -10276,7 +9118,7 @@ var Vault = class {
|
|
|
10276
9118
|
*/
|
|
10277
9119
|
async _initMaterializedViews(handles) {
|
|
10278
9120
|
if (handles.length === 0) return;
|
|
10279
|
-
const { MaterializedViewRegistry } = await import("./registry-
|
|
9121
|
+
const { MaterializedViewRegistry } = await import("./registry-VSSQPIGF.js");
|
|
10280
9122
|
const registry = new MaterializedViewRegistry();
|
|
10281
9123
|
this.materializedViewRegistry = registry;
|
|
10282
9124
|
const db = this;
|
|
@@ -10301,7 +9143,7 @@ var Vault = class {
|
|
|
10301
9143
|
*/
|
|
10302
9144
|
async _initOverlayedViews(handles) {
|
|
10303
9145
|
if (handles.length === 0) return;
|
|
10304
|
-
const { OverlayedViewRegistry } = await import("./registry-
|
|
9146
|
+
const { OverlayedViewRegistry } = await import("./registry-23WF3TGH.js");
|
|
10305
9147
|
const registry = new OverlayedViewRegistry();
|
|
10306
9148
|
const mvRegistry = this.materializedViewRegistry;
|
|
10307
9149
|
const overlayNames = /* @__PURE__ */ new Set();
|
|
@@ -10364,14 +9206,14 @@ var Vault = class {
|
|
|
10364
9206
|
if (!reg) {
|
|
10365
9207
|
throw new Error(`refreshView: no MV registered with name "${name}"`);
|
|
10366
9208
|
}
|
|
10367
|
-
const { MaterializedViewExecutor } = await import("./executor-
|
|
9209
|
+
const { MaterializedViewExecutor } = await import("./executor-PUAO6AKJ.js");
|
|
10368
9210
|
const result = await MaterializedViewExecutor.refresh(reg, {
|
|
10369
9211
|
getCollection: (n) => this.collection(n),
|
|
10370
9212
|
getActiveTxContext: () => this.noydb._activeTxContextOrNull,
|
|
10371
9213
|
getQueryContext: () => this,
|
|
10372
9214
|
dispatchCtx: this._dispatchCtx({ collection: name, id: "refreshView" })
|
|
10373
9215
|
});
|
|
10374
|
-
const { clearMVStaleFully } = await import("./stale-
|
|
9216
|
+
const { clearMVStaleFully } = await import("./stale-DDL7WQEZ.js");
|
|
10375
9217
|
await clearMVStaleFully(this.adapter, this.name, registry, name);
|
|
10376
9218
|
return result;
|
|
10377
9219
|
}
|
|
@@ -10384,10 +9226,10 @@ var Vault = class {
|
|
|
10384
9226
|
if (registry === null) return { derived: 0, failed: 0, skippedFrozen: 0 };
|
|
10385
9227
|
const strategies = registry.strategiesForSource(sourceCollection);
|
|
10386
9228
|
if (strategies.length === 0) return { derived: 0, failed: 0, skippedFrozen: 0 };
|
|
10387
|
-
const { DerivationExecutor } = await import("./executor-
|
|
9229
|
+
const { DerivationExecutor } = await import("./executor-5NIMLSKZ.js");
|
|
10388
9230
|
const sourceColl = this.collection(sourceCollection);
|
|
10389
9231
|
const records = await sourceColl.list();
|
|
10390
|
-
const ctx = { vault: this.derivationFacade ?? new (await import("./read-only-facade-
|
|
9232
|
+
const ctx = { vault: this.derivationFacade ?? new (await import("./read-only-facade-BIGO37U3.js")).ReadOnlyVaultFacade(this, "derivation") };
|
|
10391
9233
|
let derived = 0;
|
|
10392
9234
|
let failed = 0;
|
|
10393
9235
|
let skippedFrozen = 0;
|
|
@@ -10411,7 +9253,7 @@ var Vault = class {
|
|
|
10411
9253
|
if (!outSpec) continue;
|
|
10412
9254
|
const outputColl = this.collection(outSpec.collection);
|
|
10413
9255
|
if (out.kind === "array") {
|
|
10414
|
-
const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-
|
|
9256
|
+
const { loadFanoutSidecar, saveFanoutSidecar } = await import("./fanout-sidecar-WUFXNYP4.js");
|
|
10415
9257
|
const prior = await loadFanoutSidecar(this.adapter, this.name, spec.source, id, key, this.getDEK, this.encrypted);
|
|
10416
9258
|
const prevKeys = new Set(prior?.keys ?? []);
|
|
10417
9259
|
const newKeysList = out.entries.map((e) => e.key);
|
|
@@ -10638,7 +9480,7 @@ var Vault = class {
|
|
|
10638
9480
|
* collection.
|
|
10639
9481
|
*/
|
|
10640
9482
|
async delegate(opts) {
|
|
10641
|
-
const { issueDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-
|
|
9483
|
+
const { issueDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-OVIFFPG4.js");
|
|
10642
9484
|
if (!this.keyring.kek) {
|
|
10643
9485
|
throw new ValidationError(
|
|
10644
9486
|
"issueDelegation: keyring.kek is null \u2014 issuing a delegation requires a tier-1 unlock. Re-authenticate at tier 1 (secret) first."
|
|
@@ -10660,7 +9502,7 @@ var Vault = class {
|
|
|
10660
9502
|
* if the id does not exist.
|
|
10661
9503
|
*/
|
|
10662
9504
|
async revokeDelegation(id) {
|
|
10663
|
-
const { revokeDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-
|
|
9505
|
+
const { revokeDelegation, DELEGATIONS_COLLECTION } = await import("./delegation-OVIFFPG4.js");
|
|
10664
9506
|
await revokeDelegation(this.adapter, this.name, id);
|
|
10665
9507
|
void DELEGATIONS_COLLECTION;
|
|
10666
9508
|
}
|
|
@@ -10913,7 +9755,7 @@ var Vault = class {
|
|
|
10913
9755
|
* @see design-history/2026-05-22-schema-dump-design.md
|
|
10914
9756
|
*/
|
|
10915
9757
|
async dumpSchema(opts = {}) {
|
|
10916
|
-
const { dumpVaultSchema } = await import("./walk-
|
|
9758
|
+
const { dumpVaultSchema } = await import("./walk-3UQBRMDV.js");
|
|
10917
9759
|
return dumpVaultSchema(this, opts);
|
|
10918
9760
|
}
|
|
10919
9761
|
/**
|
|
@@ -11009,7 +9851,7 @@ var Vault = class {
|
|
|
11009
9851
|
* separate vault instances now.
|
|
11010
9852
|
*/
|
|
11011
9853
|
async getPodHandle() {
|
|
11012
|
-
const { buildPodHandle } = await import("./pod-handle-
|
|
9854
|
+
const { buildPodHandle } = await import("./pod-handle-Q736KYON.js");
|
|
11013
9855
|
return buildPodHandle(this.adapter, this.name);
|
|
11014
9856
|
}
|
|
11015
9857
|
/**
|
|
@@ -11041,7 +9883,7 @@ var Vault = class {
|
|
|
11041
9883
|
* both modes round-trip cleanly.
|
|
11042
9884
|
*/
|
|
11043
9885
|
async dump() {
|
|
11044
|
-
const { dumpVault } = await import("./backup-
|
|
9886
|
+
const { dumpVault } = await import("./backup-IJTB4S4M.js");
|
|
11045
9887
|
return dumpVault(this.backupContext());
|
|
11046
9888
|
}
|
|
11047
9889
|
/**
|
|
@@ -11093,7 +9935,7 @@ var Vault = class {
|
|
|
11093
9935
|
* — there's no chain to verify against.
|
|
11094
9936
|
*/
|
|
11095
9937
|
async load(backupJson) {
|
|
11096
|
-
const { loadVault } = await import("./backup-
|
|
9938
|
+
const { loadVault } = await import("./backup-IJTB4S4M.js");
|
|
11097
9939
|
return loadVault(this.backupContext(), backupJson);
|
|
11098
9940
|
}
|
|
11099
9941
|
/**
|
|
@@ -11125,7 +9967,7 @@ var Vault = class {
|
|
|
11125
9967
|
* way to detect tampering of an in-place vault.
|
|
11126
9968
|
*/
|
|
11127
9969
|
async verifyBackupIntegrity() {
|
|
11128
|
-
const { verifyBackupIntegrity } = await import("./backup-
|
|
9970
|
+
const { verifyBackupIntegrity } = await import("./backup-IJTB4S4M.js");
|
|
11129
9971
|
return verifyBackupIntegrity(this.backupContext());
|
|
11130
9972
|
}
|
|
11131
9973
|
/**
|
|
@@ -11355,7 +10197,7 @@ var Vault = class {
|
|
|
11355
10197
|
* is the live validator object, not a serialization of it).
|
|
11356
10198
|
*/
|
|
11357
10199
|
async exportJSON(opts = {}) {
|
|
11358
|
-
const { exportVaultJSON } = await import("./backup-
|
|
10200
|
+
const { exportVaultJSON } = await import("./backup-IJTB4S4M.js");
|
|
11359
10201
|
return exportVaultJSON(this.backupContext(), opts);
|
|
11360
10202
|
}
|
|
11361
10203
|
};
|
|
@@ -13283,7 +12125,7 @@ var Noydb = class {
|
|
|
13283
12125
|
if (!facade) return;
|
|
13284
12126
|
const ctx = { existing, vault: facade, userId: e.userId, role: e.role };
|
|
13285
12127
|
await registry.runChecks(e.collection, incoming, ctx);
|
|
13286
|
-
const { GuardExecutor } = await import("./executor-
|
|
12128
|
+
const { GuardExecutor } = await import("./executor-AQVXV5GZ.js");
|
|
13287
12129
|
for (const g of guards) {
|
|
13288
12130
|
await GuardExecutor.checkFrozenFields(g, e.docId, existing, incoming, e.computedFieldNames);
|
|
13289
12131
|
}
|
|
@@ -14655,7 +13497,7 @@ async function createNoydb(options) {
|
|
|
14655
13497
|
if (!options.store) options = { ...options, store: memoryStore() };
|
|
14656
13498
|
validateSecretModeOptions(options);
|
|
14657
13499
|
if (!options.mesh) options = { ...options, mesh: await createDefaultMesh(options.store) };
|
|
14658
|
-
if (!options.userApiFactory) options = { ...options, userApiFactory: (await import("./api-
|
|
13500
|
+
if (!options.userApiFactory) options = { ...options, userApiFactory: (await import("./api-TXFOVOXX.js")).createUserApi };
|
|
14659
13501
|
if (!options.policyFactory) {
|
|
14660
13502
|
const policyModule = await import("./policy/index.js");
|
|
14661
13503
|
options = { ...options, policyFactory: policyModule.createNoydbPolicy, policyCheckGateFn: policyModule.checkGate };
|
|
@@ -14674,8 +13516,6 @@ function normalizeSyncTargets(sync) {
|
|
|
14674
13516
|
export {
|
|
14675
13517
|
memoryStore,
|
|
14676
13518
|
withArchive,
|
|
14677
|
-
via,
|
|
14678
|
-
isViaFieldSpec,
|
|
14679
13519
|
Collection,
|
|
14680
13520
|
ELEVATION_AUDIT_COLLECTION,
|
|
14681
13521
|
ElevatedHandle,
|
|
@@ -14690,4 +13530,4 @@ export {
|
|
|
14690
13530
|
Noydb,
|
|
14691
13531
|
createNoydb
|
|
14692
13532
|
};
|
|
14693
|
-
//# sourceMappingURL=chunk-
|
|
13533
|
+
//# sourceMappingURL=chunk-6GOE5PGN.js.map
|