@noy-db/hub 0.2.0-pre.6 → 0.2.0-pre.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aggregate/index.cjs.map +1 -1
- package/dist/aggregate/index.js +4 -4
- package/dist/attestation/index.cjs.map +1 -1
- package/dist/attestation/index.d.cts +4 -4
- package/dist/attestation/index.d.ts +4 -4
- package/dist/attestation/index.js +6 -6
- package/dist/blobs/index.cjs.map +1 -1
- package/dist/blobs/index.d.cts +5 -5
- package/dist/blobs/index.d.ts +5 -5
- package/dist/blobs/index.js +5 -5
- package/dist/bundle/index.cjs +420 -29
- package/dist/bundle/index.cjs.map +1 -1
- package/dist/bundle/index.d.cts +6 -6
- package/dist/bundle/index.d.ts +6 -6
- package/dist/bundle/index.js +12 -12
- package/dist/{chunk-JICBEFBT.js → chunk-22DWZL57.js} +63 -27
- package/dist/chunk-22DWZL57.js.map +1 -0
- package/dist/{chunk-XDW37COG.js → chunk-2GLDA55J.js} +212 -7
- package/dist/chunk-2GLDA55J.js.map +1 -0
- package/dist/{chunk-RIHZBSWJ.js → chunk-2WUSG3IT.js} +3 -3
- package/dist/{chunk-JSYTGEX4.js → chunk-3BFJOWSU.js} +3 -3
- package/dist/{chunk-Y3P5DEMZ.js → chunk-3YPCK6JX.js} +6 -6
- package/dist/{chunk-A4JNVBPF.js → chunk-53XBRIRT.js} +5 -5
- package/dist/{chunk-CKH247ZR.js → chunk-5T22KDPN.js} +4 -4
- package/dist/{chunk-PX3MJ6RB.js → chunk-5XHKQ56N.js} +3 -3
- package/dist/{chunk-W277AG6N.js → chunk-6774ZOQ7.js} +170 -57
- package/dist/chunk-6774ZOQ7.js.map +1 -0
- package/dist/chunk-6STK5TQP.js +139 -0
- package/dist/chunk-6STK5TQP.js.map +1 -0
- package/dist/{chunk-6HJ2ZALB.js → chunk-B6PB7JLN.js} +66 -2
- package/dist/chunk-B6PB7JLN.js.map +1 -0
- package/dist/{chunk-5QPF2MJ5.js → chunk-BVRYKATC.js} +3 -3
- package/dist/{chunk-UGVDIOY7.js → chunk-DE6GKS6G.js} +2 -2
- package/dist/{chunk-R4LTCI6O.js → chunk-DFMLEQZB.js} +2 -2
- package/dist/{chunk-34XGYMQT.js → chunk-DJHHA6XH.js} +2 -2
- package/dist/{chunk-OPD3PZOG.js → chunk-DL3HWOQ5.js} +4 -4
- package/dist/{chunk-DFCINPB5.js → chunk-DO7C2TOG.js} +2 -2
- package/dist/{chunk-T6MTNGBM.js → chunk-DONMZAD2.js} +4 -4
- package/dist/{chunk-ARZAHCCF.js → chunk-F3GDRNUT.js} +3 -3
- package/dist/{chunk-XVJFFGTG.js → chunk-H2X3ISXG.js} +3 -3
- package/dist/{chunk-R7JTYCRX.js → chunk-HNRHLRDC.js} +2 -2
- package/dist/{chunk-E225X5CQ.js → chunk-I5FOWO4J.js} +3 -3
- package/dist/{chunk-ZQMYB56Z.js → chunk-JWRVQKRZ.js} +3 -3
- package/dist/{chunk-LWFQYT4N.js → chunk-K3DK3NU5.js} +2 -2
- package/dist/{chunk-WEA4TDTJ.js → chunk-ML236QKC.js} +3 -3
- package/dist/{chunk-G26QAQNI.js → chunk-NONAAENK.js} +2 -2
- package/dist/{chunk-YEHUEUNP.js → chunk-O3VZPBZG.js} +4 -4
- package/dist/{chunk-HIELMTUK.js → chunk-OIF6LZUR.js} +2 -2
- package/dist/{chunk-ED3E3OLO.js → chunk-OQ6PIGHA.js} +2 -2
- package/dist/{chunk-6A4AMQ2H.js → chunk-PE2FR4J3.js} +4 -4
- package/dist/{chunk-EKTOYEZ3.js → chunk-PP6W64Y3.js} +2 -2
- package/dist/{chunk-SGSHQ4PH.js → chunk-PX35GA7L.js} +5 -5
- package/dist/{chunk-YJ46RFCD.js → chunk-QEILDE6R.js} +2 -2
- package/dist/{chunk-KGFV72WK.js → chunk-QODLLGQ7.js} +5 -5
- package/dist/{chunk-2GMRNNI3.js → chunk-RAZ4OVLL.js} +2 -2
- package/dist/{chunk-25WFLKOH.js → chunk-SYMWGEET.js} +2 -2
- package/dist/{chunk-7TX7HN42.js → chunk-T7JEBOGN.js} +20 -3
- package/dist/chunk-T7JEBOGN.js.map +1 -0
- package/dist/{chunk-LJO6Q3X6.js → chunk-TFBP23BX.js} +3 -3
- package/dist/{chunk-ICH4AIGL.js → chunk-TV3YZ35S.js} +5 -1
- package/dist/chunk-TV3YZ35S.js.map +1 -0
- package/dist/{chunk-TNBIWSQ7.js → chunk-U26HQ6KJ.js} +2 -2
- package/dist/{chunk-CGJFCT3X.js → chunk-VTKGMEPP.js} +2 -2
- package/dist/{chunk-5VMTAX4Y.js → chunk-W6EQLGMB.js} +2 -2
- package/dist/{chunk-5OVIFUQE.js → chunk-WIRRPTFH.js} +1 -1
- package/dist/chunk-WIRRPTFH.js.map +1 -0
- package/dist/{chunk-PS5G6A3Y.js → chunk-WPLVTJ5D.js} +4 -4
- package/dist/{chunk-MDIC4FAU.js → chunk-XJFLDA7A.js} +2 -2
- package/dist/{chunk-CCC25PA7.js → chunk-ZYWZWG6G.js} +5 -5
- package/dist/consent/index.cjs.map +1 -1
- package/dist/consent/index.d.cts +5 -5
- package/dist/consent/index.d.ts +5 -5
- package/dist/consent/index.js +3 -3
- package/dist/{crypto-5UDZZL26.js → crypto-HTZ4FJOP.js} +3 -3
- package/dist/{delegation-42LO4WFO.js → delegation-RI54P6I5.js} +5 -5
- package/dist/derivations/index.cjs.map +1 -1
- package/dist/derivations/index.d.cts +6 -6
- package/dist/derivations/index.d.ts +6 -6
- package/dist/derivations/index.js +4 -4
- package/dist/{dev-unlock-Dy1qVpkL.d.cts → dev-unlock-M4VAWNq_.d.cts} +1 -1
- package/dist/{dev-unlock-Cvo-xCQC.d.ts → dev-unlock-p3ysikWP.d.ts} +1 -1
- package/dist/executor-5PNY7LGW.js +8 -0
- package/dist/executor-B4QIYGZX.js +8 -0
- package/dist/executor-BWXXDQ7K.js +11 -0
- package/dist/{fanout-sidecar-EVICRM46.js → fanout-sidecar-OKPMMPLG.js} +2 -2
- package/dist/guards/index.cjs.map +1 -1
- package/dist/guards/index.d.cts +6 -6
- package/dist/guards/index.d.ts +6 -6
- package/dist/guards/index.js +3 -3
- package/dist/{hash-BgEQklQc.d.cts → hash-BPsYPcv_.d.cts} +1 -1
- package/dist/{hash-BAlWR4WD.d.ts → hash-C1GtiOhR.d.ts} +1 -1
- package/dist/history/index.cjs.map +1 -1
- package/dist/history/index.d.cts +6 -6
- package/dist/history/index.d.ts +6 -6
- package/dist/history/index.js +5 -5
- package/dist/i18n/index.cjs +217 -22
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +5 -5
- package/dist/i18n/index.d.ts +5 -5
- package/dist/i18n/index.js +16 -5
- package/dist/i18n/index.js.map +1 -1
- package/dist/{index-5I0MZ0jQ.d.cts → index-4fBVt8j9.d.cts} +104 -7
- package/dist/{index-fIPPh5dg.d.ts → index-D8I_pyJD.d.ts} +104 -7
- package/dist/index.cjs +625 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +70 -52
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.cjs +4 -0
- package/dist/indexing/index.cjs.map +1 -1
- package/dist/indexing/index.d.cts +3 -3
- package/dist/indexing/index.d.ts +3 -3
- package/dist/indexing/index.js +4 -4
- package/dist/issue-VGDPP4B5.js +12 -0
- package/dist/{lazy-builder-D1MyR1qH.d.ts → lazy-builder-7tIpFyWN.d.ts} +1 -1
- package/dist/{lazy-builder-DXlSCNCJ.d.cts → lazy-builder-wY4pMCEe.d.cts} +1 -1
- package/dist/{ledger-UX4QIHWI.js → ledger-TMRZYNVJ.js} +5 -5
- package/dist/materialized-views/index.cjs +18 -1
- package/dist/materialized-views/index.cjs.map +1 -1
- package/dist/materialized-views/index.d.cts +10 -8
- package/dist/materialized-views/index.d.ts +10 -8
- package/dist/materialized-views/index.js +12 -12
- package/dist/noydb-LZBH3XDK.js +34 -0
- package/dist/overlay-views/index.cjs.map +1 -1
- package/dist/overlay-views/index.d.cts +6 -6
- package/dist/overlay-views/index.d.ts +6 -6
- package/dist/overlay-views/index.js +6 -6
- package/dist/periods/index.cjs.map +1 -1
- package/dist/periods/index.d.cts +5 -5
- package/dist/periods/index.d.ts +5 -5
- package/dist/periods/index.js +5 -5
- package/dist/{predicate-B0IKeBXx.d.cts → predicate-BSAGEyu5.d.cts} +26 -2
- package/dist/{predicate-B0IKeBXx.d.ts → predicate-BSAGEyu5.d.ts} +26 -2
- package/dist/{public-envelope-YKHKP74C.js → public-envelope-BW6OXORV.js} +4 -4
- package/dist/query/index.cjs +244 -4
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +2 -2
- package/dist/query/index.d.ts +2 -2
- package/dist/query/index.js +12 -6
- package/dist/registry-3QP3YKQS.js +8 -0
- package/dist/{registry-4NEW7LQY.js → registry-OJIOSBV6.js} +3 -3
- package/dist/registry-USRVT6YF.js +8 -0
- package/dist/{revoke-R5NIQ74J.js → revoke-JCC7N56X.js} +6 -6
- package/dist/session/index.cjs.map +1 -1
- package/dist/session/index.d.cts +6 -6
- package/dist/session/index.d.ts +6 -6
- package/dist/session/index.js +3 -3
- package/dist/shadow/index.cjs.map +1 -1
- package/dist/shadow/index.d.cts +5 -5
- package/dist/shadow/index.d.ts +5 -5
- package/dist/shadow/index.js +2 -2
- package/dist/{signer-WGDJNWSU.js → signer-72QAUSVW.js} +5 -5
- package/dist/snapshots/index.cjs +903 -0
- package/dist/snapshots/index.cjs.map +1 -0
- package/dist/snapshots/index.d.cts +21 -0
- package/dist/snapshots/index.d.ts +21 -0
- package/dist/snapshots/index.js +118 -0
- package/dist/snapshots/index.js.map +1 -0
- package/dist/{stale-74WGLVZ2.js → stale-6ZDBTQT7.js} +2 -2
- package/dist/store/index.cjs.map +1 -1
- package/dist/store/index.d.cts +5 -5
- package/dist/store/index.d.ts +5 -5
- package/dist/store/index.js +2 -2
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +4 -4
- package/dist/sync/index.d.ts +4 -4
- package/dist/sync/index.js +4 -4
- package/dist/team/index.cjs.map +1 -1
- package/dist/team/index.d.cts +5 -5
- package/dist/team/index.d.ts +5 -5
- package/dist/team/index.js +8 -8
- package/dist/tx/index.cjs.map +1 -1
- package/dist/tx/index.d.cts +5 -5
- package/dist/tx/index.d.ts +5 -5
- package/dist/tx/index.js +3 -3
- package/dist/{types-DlnZh1_i.d.ts → types-DGU60JDt.d.ts} +235 -7
- package/dist/{types-DVlvNn2c.d.cts → types-DjunxzJa.d.cts} +235 -7
- package/dist/{ulid-CzPONlhG.d.ts → ulid-BFJkYRRW.d.ts} +1 -1
- package/dist/{ulid-r98nkjVd.d.cts → ulid-DPeuPgi3.d.cts} +1 -1
- package/dist/util/index.cjs.map +1 -1
- package/dist/util/index.js +1 -1
- package/dist/{with-derivation-BMQ9pIHe.d.cts → with-derivation-Df0kMlED.d.cts} +1 -1
- package/dist/{with-derivation-B98shCV8.d.ts → with-derivation-DfOpKjFw.d.ts} +1 -1
- package/dist/{with-guard-DmT50nVG.d.ts → with-guard-0KksDtSR.d.ts} +1 -1
- package/dist/{with-guard-DUnC3JDN.d.cts → with-guard-C6W5RVrH.d.cts} +1 -1
- package/dist/{with-materialized-view-Bp_M3sNG.d.ts → with-materialized-view-BiasFcYx.d.ts} +1 -1
- package/dist/{with-materialized-view-eMTZ65_J.d.cts → with-materialized-view-BmDKyHrm.d.cts} +1 -1
- package/dist/{with-overlayed-view-BoY6PB3n.d.cts → with-overlayed-view-CA66vhHz.d.cts} +1 -1
- package/dist/{with-overlayed-view-zzSnRQmS.d.ts → with-overlayed-view-CQViuko_.d.ts} +1 -1
- package/package.json +15 -4
- package/dist/chunk-5OVIFUQE.js.map +0 -1
- package/dist/chunk-6HJ2ZALB.js.map +0 -1
- package/dist/chunk-7TX7HN42.js.map +0 -1
- package/dist/chunk-ICH4AIGL.js.map +0 -1
- package/dist/chunk-JICBEFBT.js.map +0 -1
- package/dist/chunk-W277AG6N.js.map +0 -1
- package/dist/chunk-XDW37COG.js.map +0 -1
- package/dist/executor-AWCHQ2KN.js +0 -8
- package/dist/executor-RWICJI7J.js +0 -11
- package/dist/executor-SOLEQVUB.js +0 -8
- package/dist/issue-IODMTPME.js +0 -12
- package/dist/noydb-FY2666NY.js +0 -34
- package/dist/registry-446I2NMN.js +0 -8
- package/dist/registry-524KJZG4.js +0 -8
- /package/dist/{chunk-RIHZBSWJ.js.map → chunk-2WUSG3IT.js.map} +0 -0
- /package/dist/{chunk-JSYTGEX4.js.map → chunk-3BFJOWSU.js.map} +0 -0
- /package/dist/{chunk-Y3P5DEMZ.js.map → chunk-3YPCK6JX.js.map} +0 -0
- /package/dist/{chunk-A4JNVBPF.js.map → chunk-53XBRIRT.js.map} +0 -0
- /package/dist/{chunk-CKH247ZR.js.map → chunk-5T22KDPN.js.map} +0 -0
- /package/dist/{chunk-PX3MJ6RB.js.map → chunk-5XHKQ56N.js.map} +0 -0
- /package/dist/{chunk-5QPF2MJ5.js.map → chunk-BVRYKATC.js.map} +0 -0
- /package/dist/{chunk-UGVDIOY7.js.map → chunk-DE6GKS6G.js.map} +0 -0
- /package/dist/{chunk-R4LTCI6O.js.map → chunk-DFMLEQZB.js.map} +0 -0
- /package/dist/{chunk-34XGYMQT.js.map → chunk-DJHHA6XH.js.map} +0 -0
- /package/dist/{chunk-OPD3PZOG.js.map → chunk-DL3HWOQ5.js.map} +0 -0
- /package/dist/{chunk-DFCINPB5.js.map → chunk-DO7C2TOG.js.map} +0 -0
- /package/dist/{chunk-T6MTNGBM.js.map → chunk-DONMZAD2.js.map} +0 -0
- /package/dist/{chunk-ARZAHCCF.js.map → chunk-F3GDRNUT.js.map} +0 -0
- /package/dist/{chunk-XVJFFGTG.js.map → chunk-H2X3ISXG.js.map} +0 -0
- /package/dist/{chunk-R7JTYCRX.js.map → chunk-HNRHLRDC.js.map} +0 -0
- /package/dist/{chunk-E225X5CQ.js.map → chunk-I5FOWO4J.js.map} +0 -0
- /package/dist/{chunk-ZQMYB56Z.js.map → chunk-JWRVQKRZ.js.map} +0 -0
- /package/dist/{chunk-LWFQYT4N.js.map → chunk-K3DK3NU5.js.map} +0 -0
- /package/dist/{chunk-WEA4TDTJ.js.map → chunk-ML236QKC.js.map} +0 -0
- /package/dist/{chunk-G26QAQNI.js.map → chunk-NONAAENK.js.map} +0 -0
- /package/dist/{chunk-YEHUEUNP.js.map → chunk-O3VZPBZG.js.map} +0 -0
- /package/dist/{chunk-HIELMTUK.js.map → chunk-OIF6LZUR.js.map} +0 -0
- /package/dist/{chunk-ED3E3OLO.js.map → chunk-OQ6PIGHA.js.map} +0 -0
- /package/dist/{chunk-6A4AMQ2H.js.map → chunk-PE2FR4J3.js.map} +0 -0
- /package/dist/{chunk-EKTOYEZ3.js.map → chunk-PP6W64Y3.js.map} +0 -0
- /package/dist/{chunk-SGSHQ4PH.js.map → chunk-PX35GA7L.js.map} +0 -0
- /package/dist/{chunk-YJ46RFCD.js.map → chunk-QEILDE6R.js.map} +0 -0
- /package/dist/{chunk-KGFV72WK.js.map → chunk-QODLLGQ7.js.map} +0 -0
- /package/dist/{chunk-2GMRNNI3.js.map → chunk-RAZ4OVLL.js.map} +0 -0
- /package/dist/{chunk-25WFLKOH.js.map → chunk-SYMWGEET.js.map} +0 -0
- /package/dist/{chunk-LJO6Q3X6.js.map → chunk-TFBP23BX.js.map} +0 -0
- /package/dist/{chunk-TNBIWSQ7.js.map → chunk-U26HQ6KJ.js.map} +0 -0
- /package/dist/{chunk-CGJFCT3X.js.map → chunk-VTKGMEPP.js.map} +0 -0
- /package/dist/{chunk-5VMTAX4Y.js.map → chunk-W6EQLGMB.js.map} +0 -0
- /package/dist/{chunk-PS5G6A3Y.js.map → chunk-WPLVTJ5D.js.map} +0 -0
- /package/dist/{chunk-MDIC4FAU.js.map → chunk-XJFLDA7A.js.map} +0 -0
- /package/dist/{chunk-CCC25PA7.js.map → chunk-ZYWZWG6G.js.map} +0 -0
- /package/dist/{crypto-5UDZZL26.js.map → crypto-HTZ4FJOP.js.map} +0 -0
- /package/dist/{delegation-42LO4WFO.js.map → delegation-RI54P6I5.js.map} +0 -0
- /package/dist/{executor-AWCHQ2KN.js.map → executor-5PNY7LGW.js.map} +0 -0
- /package/dist/{executor-RWICJI7J.js.map → executor-B4QIYGZX.js.map} +0 -0
- /package/dist/{executor-SOLEQVUB.js.map → executor-BWXXDQ7K.js.map} +0 -0
- /package/dist/{fanout-sidecar-EVICRM46.js.map → fanout-sidecar-OKPMMPLG.js.map} +0 -0
- /package/dist/{issue-IODMTPME.js.map → issue-VGDPP4B5.js.map} +0 -0
- /package/dist/{ledger-UX4QIHWI.js.map → ledger-TMRZYNVJ.js.map} +0 -0
- /package/dist/{noydb-FY2666NY.js.map → noydb-LZBH3XDK.js.map} +0 -0
- /package/dist/{public-envelope-YKHKP74C.js.map → public-envelope-BW6OXORV.js.map} +0 -0
- /package/dist/{registry-446I2NMN.js.map → registry-3QP3YKQS.js.map} +0 -0
- /package/dist/{registry-4NEW7LQY.js.map → registry-OJIOSBV6.js.map} +0 -0
- /package/dist/{registry-524KJZG4.js.map → registry-USRVT6YF.js.map} +0 -0
- /package/dist/{revoke-R5NIQ74J.js.map → revoke-JCC7N56X.js.map} +0 -0
- /package/dist/{signer-WGDJNWSU.js.map → signer-72QAUSVW.js.map} +0 -0
- /package/dist/{stale-74WGLVZ2.js.map → stale-6ZDBTQT7.js.map} +0 -0
package/dist/history/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from '../hash-
|
|
4
|
-
import '../lazy-builder-
|
|
5
|
-
import '../predicate-
|
|
1
|
+
import { b0 as HistoryStrategy, b1 as NoydbStore, b2 as HistoryOptions, b3 as EncryptedEnvelope, b4 as PruneOptions } from '../types-DjunxzJa.cjs';
|
|
2
|
+
export { b5 as AppendInput, b6 as ChangeType, b7 as CollectionInstant, b8 as DiffEntry, b9 as JsonPatch, ba as JsonPatchOp, bb as LedgerEntry, bc as LedgerStore, bd as VaultEngine, be as VaultInstant, bf as VerifyResult, bg as applyPatch, bh as canonicalJson, bi as computePatch, bj as diff, bk as formatDiff, bl as hashEntry, bm as paddedIndex, bn as parseIndex, bo as sha256Hex } from '../types-DjunxzJa.cjs';
|
|
3
|
+
export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from '../hash-BPsYPcv_.cjs';
|
|
4
|
+
import '../lazy-builder-wY4pMCEe.cjs';
|
|
5
|
+
import '../predicate-BSAGEyu5.cjs';
|
|
6
6
|
import '../strategy-DSTrsZ8t.cjs';
|
|
7
7
|
import '../strategy-BSxFXGzb.cjs';
|
|
8
|
-
import '../index-
|
|
8
|
+
import '../index-4fBVt8j9.cjs';
|
|
9
9
|
import '@noy-db/attestation';
|
|
10
10
|
|
|
11
11
|
/**
|
package/dist/history/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from '../hash-
|
|
4
|
-
import '../lazy-builder-
|
|
5
|
-
import '../predicate-
|
|
1
|
+
import { b0 as HistoryStrategy, b1 as NoydbStore, b2 as HistoryOptions, b3 as EncryptedEnvelope, b4 as PruneOptions } from '../types-DGU60JDt.js';
|
|
2
|
+
export { b5 as AppendInput, b6 as ChangeType, b7 as CollectionInstant, b8 as DiffEntry, b9 as JsonPatch, ba as JsonPatchOp, bb as LedgerEntry, bc as LedgerStore, bd as VaultEngine, be as VaultInstant, bf as VerifyResult, bg as applyPatch, bh as canonicalJson, bi as computePatch, bj as diff, bk as formatDiff, bl as hashEntry, bm as paddedIndex, bn as parseIndex, bo as sha256Hex } from '../types-DGU60JDt.js';
|
|
3
|
+
export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from '../hash-C1GtiOhR.js';
|
|
4
|
+
import '../lazy-builder-7tIpFyWN.js';
|
|
5
|
+
import '../predicate-BSAGEyu5.js';
|
|
6
6
|
import '../strategy-DSTrsZ8t.js';
|
|
7
7
|
import '../strategy-BSxFXGzb.js';
|
|
8
|
-
import '../index-
|
|
8
|
+
import '../index-D8I_pyJD.js';
|
|
9
9
|
import '@noy-db/attestation';
|
|
10
10
|
|
|
11
11
|
/**
|
package/dist/history/index.js
CHANGED
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
getVersionEnvelope,
|
|
9
9
|
pruneHistory,
|
|
10
10
|
saveHistory
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-F3GDRNUT.js";
|
|
12
12
|
import {
|
|
13
13
|
LEDGER_COLLECTION,
|
|
14
14
|
LEDGER_DELTAS_COLLECTION,
|
|
15
15
|
LedgerStore,
|
|
16
16
|
applyPatch,
|
|
17
17
|
computePatch
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-PE2FR4J3.js";
|
|
19
19
|
import {
|
|
20
20
|
canonicalJson,
|
|
21
21
|
envelopePayloadHash,
|
|
@@ -24,9 +24,9 @@ import {
|
|
|
24
24
|
parseIndex,
|
|
25
25
|
sha256Hex
|
|
26
26
|
} from "../chunk-Z6FNBOTC.js";
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
27
|
+
import "../chunk-WIRRPTFH.js";
|
|
28
|
+
import "../chunk-PP6W64Y3.js";
|
|
29
|
+
import "../chunk-B6PB7JLN.js";
|
|
30
30
|
|
|
31
31
|
// src/history/active.ts
|
|
32
32
|
function withHistory() {
|
package/dist/i18n/index.cjs
CHANGED
|
@@ -27,16 +27,20 @@ __export(i18n_exports, {
|
|
|
27
27
|
LocaleNotSpecifiedError: () => LocaleNotSpecifiedError,
|
|
28
28
|
MissingTranslationError: () => MissingTranslationError,
|
|
29
29
|
ReservedCollectionNameError: () => ReservedCollectionNameError,
|
|
30
|
+
ScriptViolationError: () => ScriptViolationError,
|
|
30
31
|
TranslatorNotConfiguredError: () => TranslatorNotConfiguredError,
|
|
31
32
|
applyI18nLocale: () => applyI18nLocale,
|
|
32
33
|
dictCollectionName: () => dictCollectionName,
|
|
33
34
|
dictKey: () => dictKey,
|
|
35
|
+
enforceScript: () => enforceScript,
|
|
34
36
|
getAtPath: () => getAtPath,
|
|
35
37
|
i18nText: () => i18nText,
|
|
38
|
+
inferScripts: () => inferScripts,
|
|
36
39
|
isDictCollectionName: () => isDictCollectionName,
|
|
37
40
|
isDictKeyDescriptor: () => isDictKeyDescriptor,
|
|
38
41
|
isI18nTextDescriptor: () => isI18nTextDescriptor,
|
|
39
42
|
resolveI18nText: () => resolveI18nText,
|
|
43
|
+
resolvePolicy: () => resolvePolicy,
|
|
40
44
|
setAtPathInPlace: () => setAtPathInPlace,
|
|
41
45
|
validateI18nTextValue: () => validateI18nTextValue,
|
|
42
46
|
withI18n: () => withI18n
|
|
@@ -152,6 +156,27 @@ var LocaleNotSpecifiedError = class extends NoydbError {
|
|
|
152
156
|
this.field = field;
|
|
153
157
|
}
|
|
154
158
|
};
|
|
159
|
+
var ScriptViolationError = class extends NoydbError {
|
|
160
|
+
/** The field whose value violated its script constraint. */
|
|
161
|
+
field;
|
|
162
|
+
/** The locale slot (e.g. `'en'`) that was checked. */
|
|
163
|
+
locale;
|
|
164
|
+
/** The Unicode scripts allowed for this slot. */
|
|
165
|
+
expected;
|
|
166
|
+
/** A short sample of the offending characters, for diagnostics. */
|
|
167
|
+
sample;
|
|
168
|
+
constructor(field, locale, expected, sample, message) {
|
|
169
|
+
super(
|
|
170
|
+
"SCRIPT_VIOLATION",
|
|
171
|
+
message ?? `Field "${field}" slot "${locale}" expects script(s) [${expected.join(", ")}] but contains disallowed character(s): "${sample}".`
|
|
172
|
+
);
|
|
173
|
+
this.name = "ScriptViolationError";
|
|
174
|
+
this.field = field;
|
|
175
|
+
this.locale = locale;
|
|
176
|
+
this.expected = expected;
|
|
177
|
+
this.sample = sample;
|
|
178
|
+
}
|
|
179
|
+
};
|
|
155
180
|
var TranslatorNotConfiguredError = class extends NoydbError {
|
|
156
181
|
/** The field that requested auto-translation. */
|
|
157
182
|
field;
|
|
@@ -168,6 +193,14 @@ var TranslatorNotConfiguredError = class extends NoydbError {
|
|
|
168
193
|
}
|
|
169
194
|
};
|
|
170
195
|
|
|
196
|
+
// src/i18n/policy.ts
|
|
197
|
+
function resolvePolicy(onMissing, layer) {
|
|
198
|
+
const explicit = onMissing && typeof onMissing === "object" ? onMissing[layer] : void 0;
|
|
199
|
+
const scalar = typeof onMissing === "string" ? onMissing : void 0;
|
|
200
|
+
const layerDefault = layer === "guard" ? "substitute" : void 0;
|
|
201
|
+
return explicit ?? layerDefault ?? scalar ?? "throw";
|
|
202
|
+
}
|
|
203
|
+
|
|
171
204
|
// src/i18n/core.ts
|
|
172
205
|
function i18nText(options) {
|
|
173
206
|
return { _noydbI18nText: true, options };
|
|
@@ -231,7 +264,21 @@ function validateI18nTextValue(value, field, descriptor) {
|
|
|
231
264
|
}
|
|
232
265
|
}
|
|
233
266
|
}
|
|
234
|
-
function
|
|
267
|
+
function toChain(fallback) {
|
|
268
|
+
return Array.isArray(fallback) ? fallback : fallback ? [fallback] : [];
|
|
269
|
+
}
|
|
270
|
+
function pickFromChain(value, chain) {
|
|
271
|
+
for (const fb of chain) {
|
|
272
|
+
if (fb === "any") {
|
|
273
|
+
const any = Object.values(value).find((v) => v !== "");
|
|
274
|
+
if (any !== void 0) return any;
|
|
275
|
+
} else if (value[fb] !== void 0 && value[fb] !== "") {
|
|
276
|
+
return value[fb];
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
return void 0;
|
|
280
|
+
}
|
|
281
|
+
function resolveI18nText(value, locale, fallback, field, opts) {
|
|
235
282
|
if (locale === "raw") {
|
|
236
283
|
return value;
|
|
237
284
|
}
|
|
@@ -241,19 +288,21 @@ function resolveI18nText(value, locale, fallback, field) {
|
|
|
241
288
|
if (value[locale] !== void 0 && value[locale] !== "") {
|
|
242
289
|
return value[locale];
|
|
243
290
|
}
|
|
244
|
-
const
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
291
|
+
const policy = opts?.policy ?? "throw";
|
|
292
|
+
const callerChain = toChain(fallback);
|
|
293
|
+
const callerHit = pickFromChain(value, callerChain);
|
|
294
|
+
if (callerHit !== void 0) return callerHit;
|
|
295
|
+
if (policy === "substitute") {
|
|
296
|
+
const subHit = pickFromChain(value, toChain(opts?.substitute));
|
|
297
|
+
if (subHit !== void 0) return subHit;
|
|
252
298
|
}
|
|
253
|
-
throw
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
299
|
+
if (policy === "throw") {
|
|
300
|
+
throw new LocaleNotSpecifiedError(
|
|
301
|
+
field ?? "<unknown>",
|
|
302
|
+
`No translation available for locale "${locale}"` + (callerChain.length > 0 ? ` or fallback chain [${callerChain.join(", ")}]` : "") + "."
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
return null;
|
|
257
306
|
}
|
|
258
307
|
function getAtPath(obj, path) {
|
|
259
308
|
const arrayIdx = path.indexOf("[].");
|
|
@@ -290,7 +339,7 @@ function setAtPathInPlace(obj, path, value) {
|
|
|
290
339
|
}
|
|
291
340
|
obj[path] = value;
|
|
292
341
|
}
|
|
293
|
-
function applyAtPath(obj, path, locale, fallback) {
|
|
342
|
+
function applyAtPath(obj, path, locale, fallback, opts) {
|
|
294
343
|
const arrayIdx = path.indexOf("[].");
|
|
295
344
|
if (arrayIdx !== -1) {
|
|
296
345
|
const arrayKey = path.slice(0, arrayIdx);
|
|
@@ -301,7 +350,7 @@ function applyAtPath(obj, path, locale, fallback) {
|
|
|
301
350
|
...obj,
|
|
302
351
|
[arrayKey]: arr.map((item) => {
|
|
303
352
|
if (!item || typeof item !== "object" || Array.isArray(item)) return item;
|
|
304
|
-
return applyAtPath(item, restPath, locale, fallback);
|
|
353
|
+
return applyAtPath(item, restPath, locale, fallback, opts);
|
|
305
354
|
})
|
|
306
355
|
};
|
|
307
356
|
}
|
|
@@ -313,7 +362,7 @@ function applyAtPath(obj, path, locale, fallback) {
|
|
|
313
362
|
if (!nested || typeof nested !== "object" || Array.isArray(nested)) return obj;
|
|
314
363
|
return {
|
|
315
364
|
...obj,
|
|
316
|
-
[head]: applyAtPath(nested, rest, locale, fallback)
|
|
365
|
+
[head]: applyAtPath(nested, rest, locale, fallback, opts)
|
|
317
366
|
};
|
|
318
367
|
}
|
|
319
368
|
const raw = obj[path];
|
|
@@ -321,15 +370,20 @@ function applyAtPath(obj, path, locale, fallback) {
|
|
|
321
370
|
if (typeof raw !== "object" || Array.isArray(raw)) return obj;
|
|
322
371
|
return {
|
|
323
372
|
...obj,
|
|
324
|
-
[path]: resolveI18nText(raw, locale, fallback, path)
|
|
373
|
+
[path]: resolveI18nText(raw, locale, fallback, path, opts)
|
|
325
374
|
};
|
|
326
375
|
}
|
|
327
|
-
function applyI18nLocale(record, i18nFields, locale, fallback) {
|
|
376
|
+
function applyI18nLocale(record, i18nFields, locale, fallback, layer = "read") {
|
|
328
377
|
const fieldNames = Object.keys(i18nFields);
|
|
329
378
|
if (fieldNames.length === 0) return record;
|
|
330
379
|
let result = record;
|
|
331
|
-
for (const field of
|
|
332
|
-
|
|
380
|
+
for (const [field, descriptor] of Object.entries(i18nFields)) {
|
|
381
|
+
const { onMissing, substitute } = descriptor.options;
|
|
382
|
+
const opts = {
|
|
383
|
+
policy: resolvePolicy(onMissing, layer),
|
|
384
|
+
...substitute !== void 0 ? { substitute } : {}
|
|
385
|
+
};
|
|
386
|
+
result = applyAtPath(result, field, locale, fallback, opts);
|
|
333
387
|
}
|
|
334
388
|
return result;
|
|
335
389
|
}
|
|
@@ -515,8 +569,14 @@ function dictCollectionName(dictionaryName) {
|
|
|
515
569
|
function isDictCollectionName(name) {
|
|
516
570
|
return name.startsWith(DICT_COLLECTION_PREFIX);
|
|
517
571
|
}
|
|
518
|
-
function dictKey(name, keys) {
|
|
519
|
-
return {
|
|
572
|
+
function dictKey(name, keys, opts) {
|
|
573
|
+
return {
|
|
574
|
+
_noydbDictKey: true,
|
|
575
|
+
name,
|
|
576
|
+
keys,
|
|
577
|
+
...opts?.onMissing !== void 0 ? { onMissing: opts.onMissing } : {},
|
|
578
|
+
...opts?.substitute !== void 0 ? { substitute: opts.substitute } : {}
|
|
579
|
+
};
|
|
520
580
|
}
|
|
521
581
|
function isDictKeyDescriptor(x) {
|
|
522
582
|
return typeof x === "object" && x !== null && x._noydbDictKey === true;
|
|
@@ -858,11 +918,142 @@ var DictionaryHandle = class {
|
|
|
858
918
|
}
|
|
859
919
|
};
|
|
860
920
|
|
|
921
|
+
// src/i18n/script.ts
|
|
922
|
+
var LATIN_BASE = /* @__PURE__ */ new Set([
|
|
923
|
+
"en",
|
|
924
|
+
"fr",
|
|
925
|
+
"de",
|
|
926
|
+
"es",
|
|
927
|
+
"it",
|
|
928
|
+
"pt",
|
|
929
|
+
"nl",
|
|
930
|
+
"sv",
|
|
931
|
+
"no",
|
|
932
|
+
"da",
|
|
933
|
+
"fi",
|
|
934
|
+
"is",
|
|
935
|
+
"pl",
|
|
936
|
+
"cs",
|
|
937
|
+
"sk",
|
|
938
|
+
"hu",
|
|
939
|
+
"ro",
|
|
940
|
+
"hr",
|
|
941
|
+
"sl",
|
|
942
|
+
"et",
|
|
943
|
+
"lv",
|
|
944
|
+
"lt",
|
|
945
|
+
"tr",
|
|
946
|
+
"vi",
|
|
947
|
+
"id",
|
|
948
|
+
"ms",
|
|
949
|
+
"tl",
|
|
950
|
+
"sw",
|
|
951
|
+
"af",
|
|
952
|
+
"ca",
|
|
953
|
+
"gl",
|
|
954
|
+
"eu",
|
|
955
|
+
"cy",
|
|
956
|
+
"ga"
|
|
957
|
+
]);
|
|
958
|
+
var SCRIPT_TABLE = {
|
|
959
|
+
th: ["Thai"],
|
|
960
|
+
ko: ["Hangul", "Han"],
|
|
961
|
+
ja: ["Han", "Hiragana", "Katakana"],
|
|
962
|
+
zh: ["Han"],
|
|
963
|
+
ar: ["Arabic"],
|
|
964
|
+
fa: ["Arabic"],
|
|
965
|
+
ur: ["Arabic"],
|
|
966
|
+
ru: ["Cyrillic"],
|
|
967
|
+
uk: ["Cyrillic"],
|
|
968
|
+
bg: ["Cyrillic"],
|
|
969
|
+
sr: ["Cyrillic"],
|
|
970
|
+
he: ["Hebrew"],
|
|
971
|
+
el: ["Greek"],
|
|
972
|
+
hi: ["Devanagari"],
|
|
973
|
+
ta: ["Tamil"],
|
|
974
|
+
km: ["Khmer"],
|
|
975
|
+
lo: ["Lao"],
|
|
976
|
+
my: ["Myanmar"]
|
|
977
|
+
};
|
|
978
|
+
var SUBTAG_SCRIPTS = {
|
|
979
|
+
Latn: ["Latin"],
|
|
980
|
+
Cyrl: ["Cyrillic", "Latin"],
|
|
981
|
+
Hans: ["Han", "Latin"],
|
|
982
|
+
Hant: ["Han", "Latin"],
|
|
983
|
+
Thai: ["Thai", "Latin"],
|
|
984
|
+
Arab: ["Arabic", "Latin"]
|
|
985
|
+
};
|
|
986
|
+
function inferScripts(locale) {
|
|
987
|
+
const parts = locale.split("-");
|
|
988
|
+
const subtag = parts.find((t) => /^[A-Z][a-z]{3}$/.test(t));
|
|
989
|
+
if (subtag && SUBTAG_SCRIPTS[subtag]) return SUBTAG_SCRIPTS[subtag];
|
|
990
|
+
const base = (parts[0] ?? "").toLowerCase();
|
|
991
|
+
if (LATIN_BASE.has(base)) return ["Latin"];
|
|
992
|
+
const primary = SCRIPT_TABLE[base];
|
|
993
|
+
if (primary) return [...primary, "Latin"];
|
|
994
|
+
return ["Latin"];
|
|
995
|
+
}
|
|
996
|
+
function allowedFor(descriptor, locale) {
|
|
997
|
+
const script = descriptor.options.script;
|
|
998
|
+
if (script && script !== "auto") {
|
|
999
|
+
const explicit = script[locale];
|
|
1000
|
+
if (explicit) return explicit;
|
|
1001
|
+
}
|
|
1002
|
+
return inferScripts(locale);
|
|
1003
|
+
}
|
|
1004
|
+
var BASELINE = String.raw`\p{White_Space}\p{Script=Common}\p{Script=Inherited}\p{Mark}`;
|
|
1005
|
+
function fullMatcher(scripts) {
|
|
1006
|
+
const cls = scripts.map((s) => `\\p{Script=${s}}`).join("");
|
|
1007
|
+
return new RegExp(`^[${BASELINE}${cls}]*$`, "u");
|
|
1008
|
+
}
|
|
1009
|
+
function charMatcher(scripts) {
|
|
1010
|
+
const cls = scripts.map((s) => `\\p{Script=${s}}`).join("");
|
|
1011
|
+
return new RegExp(`[${BASELINE}${cls}]`, "u");
|
|
1012
|
+
}
|
|
1013
|
+
function offendingSample(str, scripts) {
|
|
1014
|
+
const ok = charMatcher(scripts);
|
|
1015
|
+
const bad = [];
|
|
1016
|
+
for (const ch of str) {
|
|
1017
|
+
if (!ok.test(ch)) bad.push(ch);
|
|
1018
|
+
if (bad.length >= 8) break;
|
|
1019
|
+
}
|
|
1020
|
+
return bad.join("");
|
|
1021
|
+
}
|
|
1022
|
+
function stripDisallowed(str, scripts) {
|
|
1023
|
+
const ok = charMatcher(scripts);
|
|
1024
|
+
let out = "";
|
|
1025
|
+
for (const ch of str) if (ok.test(ch)) out += ch;
|
|
1026
|
+
return out;
|
|
1027
|
+
}
|
|
1028
|
+
function enforceScript(value, field, descriptor) {
|
|
1029
|
+
const opt = descriptor.options;
|
|
1030
|
+
if (!opt.script) return { value, warnings: [] };
|
|
1031
|
+
const mode = opt.onScriptViolation ?? "reject";
|
|
1032
|
+
const warnings = [];
|
|
1033
|
+
let out = value;
|
|
1034
|
+
for (const [locale, raw] of Object.entries(value)) {
|
|
1035
|
+
if (typeof raw !== "string") continue;
|
|
1036
|
+
const allowed = allowedFor(descriptor, locale);
|
|
1037
|
+
if (fullMatcher(allowed).test(raw)) continue;
|
|
1038
|
+
const sample = offendingSample(raw, allowed);
|
|
1039
|
+
if (mode === "reject") {
|
|
1040
|
+
throw new ScriptViolationError(field, locale, allowed, sample);
|
|
1041
|
+
}
|
|
1042
|
+
warnings.push({ field, locale, expected: allowed, sample });
|
|
1043
|
+
if (mode === "filter") {
|
|
1044
|
+
if (out === value) out = { ...value };
|
|
1045
|
+
out[locale] = stripDisallowed(raw, allowed);
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
return { value: out, warnings };
|
|
1049
|
+
}
|
|
1050
|
+
|
|
861
1051
|
// src/i18n/active.ts
|
|
862
1052
|
function withI18n() {
|
|
863
1053
|
return {
|
|
864
1054
|
applyI18nLocale,
|
|
865
1055
|
validateI18nTextValue,
|
|
1056
|
+
enforceScript,
|
|
866
1057
|
buildDictionaryHandle(opts) {
|
|
867
1058
|
return new DictionaryHandle(
|
|
868
1059
|
opts.adapter,
|
|
@@ -888,16 +1079,20 @@ function withI18n() {
|
|
|
888
1079
|
LocaleNotSpecifiedError,
|
|
889
1080
|
MissingTranslationError,
|
|
890
1081
|
ReservedCollectionNameError,
|
|
1082
|
+
ScriptViolationError,
|
|
891
1083
|
TranslatorNotConfiguredError,
|
|
892
1084
|
applyI18nLocale,
|
|
893
1085
|
dictCollectionName,
|
|
894
1086
|
dictKey,
|
|
1087
|
+
enforceScript,
|
|
895
1088
|
getAtPath,
|
|
896
1089
|
i18nText,
|
|
1090
|
+
inferScripts,
|
|
897
1091
|
isDictCollectionName,
|
|
898
1092
|
isDictKeyDescriptor,
|
|
899
1093
|
isI18nTextDescriptor,
|
|
900
1094
|
resolveI18nText,
|
|
1095
|
+
resolvePolicy,
|
|
901
1096
|
setAtPathInPlace,
|
|
902
1097
|
validateI18nTextValue,
|
|
903
1098
|
withI18n
|