@noy-db/hub 0.2.0-pre.14 → 0.2.0-pre.16
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 +160 -64
- package/dist/aggregate/index.cjs.map +1 -1
- package/dist/aggregate/index.d.cts +2 -2
- package/dist/aggregate/index.d.ts +2 -2
- package/dist/aggregate/index.js +3 -3
- package/dist/attestation/index.cjs.map +1 -1
- package/dist/attestation/index.d.cts +5 -5
- package/dist/attestation/index.d.ts +5 -5
- package/dist/attestation/index.js +4 -4
- package/dist/blobs/index.cjs.map +1 -1
- package/dist/blobs/index.d.cts +6 -6
- package/dist/blobs/index.d.ts +6 -6
- package/dist/blobs/index.js +3 -3
- package/dist/bundle/index.cjs +607 -114
- package/dist/bundle/index.cjs.map +1 -1
- package/dist/bundle/index.d.cts +7 -7
- package/dist/bundle/index.d.ts +7 -7
- package/dist/bundle/index.js +7 -7
- package/dist/{chunk-BIYRQQV6.js → chunk-3YWP3WBP.js} +3 -3
- package/dist/{chunk-VU7SWWT5.js → chunk-42FEUPZQ.js} +10 -6
- package/dist/chunk-42FEUPZQ.js.map +1 -0
- package/dist/{chunk-ACKFRSAH.js → chunk-667MB6AH.js} +132 -54
- package/dist/chunk-667MB6AH.js.map +1 -0
- package/dist/{chunk-A5ZOOZFB.js → chunk-6H2ZUNR7.js} +2 -2
- package/dist/{chunk-7HT2MEZ5.js → chunk-7BQ4QWYX.js} +3 -3
- package/dist/{chunk-DQU36Q7I.js → chunk-7Z7KSVA5.js} +13 -4
- package/dist/chunk-7Z7KSVA5.js.map +1 -0
- package/dist/{chunk-WBAYSNUQ.js → chunk-BI6ETQPF.js} +2 -2
- package/dist/{chunk-56DJ7JVK.js → chunk-BR3AMFGS.js} +2 -2
- package/dist/chunk-CJORTUJ2.js +524 -0
- package/dist/chunk-CJORTUJ2.js.map +1 -0
- package/dist/{chunk-YNTBADIY.js → chunk-CZI2A4MQ.js} +2 -2
- package/dist/{chunk-COFPAMX6.js → chunk-DLZ2ONOD.js} +3 -3
- package/dist/{chunk-KGCORI4L.js → chunk-DUREQF5W.js} +266 -66
- package/dist/chunk-DUREQF5W.js.map +1 -0
- package/dist/{chunk-PE4AQGFH.js → chunk-E2CDVKMH.js} +3 -3
- package/dist/{chunk-GC4V7RU7.js → chunk-F3BPIPLS.js} +1 -1
- package/dist/{chunk-GC4V7RU7.js.map → chunk-F3BPIPLS.js.map} +1 -1
- package/dist/{chunk-L2FE64BU.js → chunk-FFXM3ZIF.js} +2 -2
- package/dist/{chunk-5LQG6ZO2.js → chunk-G4SCICH5.js} +8 -3
- package/dist/chunk-G4SCICH5.js.map +1 -0
- package/dist/{chunk-WGHU7BLI.js → chunk-GNI5STXQ.js} +2 -2
- package/dist/{chunk-UWNYBOOO.js → chunk-HBXJ37ZY.js} +11 -5
- package/dist/chunk-HBXJ37ZY.js.map +1 -0
- package/dist/{chunk-NP6EZT44.js → chunk-IQLVUT37.js} +2 -2
- package/dist/{chunk-7PS7EOCF.js → chunk-IXBIFDEW.js} +2 -2
- package/dist/{chunk-LX3CB26H.js → chunk-KABJXG2F.js} +2 -2
- package/dist/{chunk-3EWA37FV.js → chunk-L2BNJ6HM.js} +32 -276
- package/dist/chunk-L2BNJ6HM.js.map +1 -0
- package/dist/{chunk-DKO2QFSA.js → chunk-OB2ZJQ2D.js} +2 -2
- package/dist/{chunk-4PEFEETV.js → chunk-OMAMZKKD.js} +2 -2
- package/dist/{chunk-EGD5DXFT.js → chunk-OQSRJG6A.js} +13 -1
- package/dist/chunk-OQSRJG6A.js.map +1 -0
- package/dist/{chunk-KI6HAJWL.js → chunk-QSUK7YWK.js} +2 -2
- package/dist/{chunk-YHPM5D7Y.js → chunk-QVIEAYTP.js} +61 -2
- package/dist/chunk-QVIEAYTP.js.map +1 -0
- package/dist/{chunk-NSCVNK5K.js → chunk-SCJPI4Z5.js} +3 -3
- package/dist/{chunk-ZWTNWAO4.js → chunk-TKIY625R.js} +13 -3
- package/dist/chunk-TKIY625R.js.map +1 -0
- package/dist/{chunk-OHVFWCJP.js → chunk-VLMPU56Q.js} +48 -18
- package/dist/chunk-VLMPU56Q.js.map +1 -0
- package/dist/{chunk-6AJBSQU4.js → chunk-XL35NSEN.js} +2 -2
- package/dist/{chunk-WIBHRONM.js → chunk-XWH4MXIU.js} +2 -2
- package/dist/consent/index.d.cts +6 -6
- package/dist/consent/index.d.ts +6 -6
- package/dist/derivations/index.cjs +24 -3
- package/dist/derivations/index.cjs.map +1 -1
- package/dist/derivations/index.d.cts +7 -7
- package/dist/derivations/index.d.ts +7 -7
- package/dist/derivations/index.js +2 -2
- package/dist/{dev-unlock-BF4OSxRv.d.cts → dev-unlock-8XzcD2Z4.d.cts} +1 -1
- package/dist/{dev-unlock-DV7ujTCI.d.ts → dev-unlock-DR3upLd1.d.ts} +1 -1
- package/dist/executor-AZLS3KBK.js +11 -0
- package/dist/{fanout-sidecar-N6OJX6QR.js → fanout-sidecar-67CMI3UT.js} +2 -2
- package/dist/guards/index.cjs +9 -5
- package/dist/guards/index.cjs.map +1 -1
- package/dist/guards/index.d.cts +7 -7
- package/dist/guards/index.d.ts +7 -7
- package/dist/guards/index.js +1 -1
- package/dist/{hash-DswxkLtW.d.ts → hash-CDjye9KV.d.ts} +1 -1
- package/dist/{hash-BcF5WQXl.d.cts → hash-DuQ88_5W.d.cts} +1 -1
- package/dist/history/index.cjs.map +1 -1
- package/dist/history/index.d.cts +7 -7
- package/dist/history/index.d.ts +7 -7
- package/dist/history/index.js +2 -2
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.d.cts +6 -6
- package/dist/i18n/index.d.ts +6 -6
- package/dist/i18n/index.js +3 -3
- package/dist/{immutable-guard-7KqslW2K.d.cts → immutable-guard-CRPvu24K.d.cts} +16 -1
- package/dist/{immutable-guard-C8IYdzfu.d.ts → immutable-guard-Dov3WvwF.d.ts} +16 -1
- package/dist/{index-Cqzp4tt9.d.ts → index-C8Bk3-VF.d.cts} +11 -3
- package/dist/{index-CUVOMtgg.d.cts → index-nP99bXLg.d.ts} +11 -3
- package/dist/index.cjs +840 -122
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +146 -15
- package/dist/index.d.ts +146 -15
- package/dist/index.js +153 -35
- package/dist/index.js.map +1 -1
- package/dist/indexing/index.cjs +92 -31
- 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 +3 -3
- package/dist/{issue-ADVS4OVP.js → issue-RZP3VI6O.js} +4 -4
- package/dist/{lazy-builder-D5GU14TS.d.ts → lazy-builder-ChSqcF5t.d.ts} +1 -1
- package/dist/{lazy-builder-Ci5_YG73.d.cts → lazy-builder-eYZzLEL1.d.cts} +1 -1
- package/dist/{ledger-CWSE3BLF.js → ledger-A3LL253R.js} +3 -3
- package/dist/materialized-views/index.cjs +409 -7
- package/dist/materialized-views/index.cjs.map +1 -1
- package/dist/materialized-views/index.d.cts +7 -7
- package/dist/materialized-views/index.d.ts +7 -7
- package/dist/materialized-views/index.js +6 -6
- package/dist/noydb-WCMY2ZOW.js +35 -0
- package/dist/overlay-views/index.cjs +47 -17
- package/dist/overlay-views/index.cjs.map +1 -1
- package/dist/overlay-views/index.d.cts +28 -10
- package/dist/overlay-views/index.d.ts +28 -10
- package/dist/overlay-views/index.js +1 -1
- package/dist/periods/index.cjs.map +1 -1
- package/dist/periods/index.d.cts +6 -6
- package/dist/periods/index.d.ts +6 -6
- package/dist/periods/index.js +3 -3
- package/dist/{predicate-Bt5ft-9c.d.cts → predicate-BmhBSPCH.d.cts} +59 -2
- package/dist/{predicate-Bt5ft-9c.d.ts → predicate-BmhBSPCH.d.ts} +59 -2
- package/dist/{public-envelope-SYHEYQ3X.js → public-envelope-YP2UWMLG.js} +3 -3
- package/dist/query/index.cjs +604 -205
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +3 -3
- package/dist/query/index.d.ts +3 -3
- package/dist/query/index.js +5 -5
- package/dist/{registry-XGLNADIE.js → registry-EB6SISTA.js} +2 -2
- package/dist/{registry-DK5YWAAA.js → registry-UTA4CLQS.js} +2 -2
- package/dist/{revoke-ZDFKMR5E.js → revoke-HNMQZSCL.js} +4 -4
- package/dist/session/index.d.cts +7 -7
- package/dist/session/index.d.ts +7 -7
- package/dist/shadow/index.d.cts +6 -6
- package/dist/shadow/index.d.ts +6 -6
- package/dist/{signer-P5D7Y72U.js → signer-DCMNKXSF.js} +3 -3
- package/dist/snapshots/index.d.cts +6 -6
- package/dist/snapshots/index.d.ts +6 -6
- package/dist/snapshots/index.js +3 -3
- package/dist/{stale-7FRJVHN6.js → stale-W5PQTRYH.js} +2 -2
- package/dist/store/index.d.cts +6 -6
- package/dist/store/index.d.ts +6 -6
- package/dist/{strategy-CrS7PnbE.d.cts → strategy-BtW8fAjz.d.cts} +2 -2
- package/dist/{strategy-CrS7PnbE.d.ts → strategy-BtW8fAjz.d.ts} +2 -2
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +5 -5
- package/dist/sync/index.d.ts +5 -5
- package/dist/sync/index.js +2 -2
- package/dist/team/index.cjs.map +1 -1
- package/dist/team/index.d.cts +6 -6
- package/dist/team/index.d.ts +6 -6
- package/dist/team/index.js +5 -5
- package/dist/tx/index.cjs +66 -3
- package/dist/tx/index.cjs.map +1 -1
- package/dist/tx/index.d.cts +24 -8
- package/dist/tx/index.d.ts +24 -8
- package/dist/tx/index.js +7 -3
- package/dist/tx/index.js.map +1 -1
- package/dist/{types-V5R2-pd4.d.cts → types-Bze6vkwm.d.cts} +391 -144
- package/dist/{types-BFHQUjdy.d.ts → types-DrmBTscX.d.ts} +391 -144
- package/dist/{ulid-p2nKiiKg.d.ts → ulid-DbBVrNSt.d.ts} +1 -1
- package/dist/{ulid-CwNf9e6-.d.cts → ulid-DfZlAh0u.d.cts} +1 -1
- package/dist/{vault-group-W7QC4UYW.js → vault-group-DX2HFQMX.js} +3 -3
- package/dist/{with-derivation-C9K43BOB.d.cts → with-derivation-CCqAchD5.d.cts} +1 -1
- package/dist/{with-derivation-Ds9yZgCj.d.ts → with-derivation-_lySGdlm.d.ts} +1 -1
- package/dist/{with-materialized-view-DgQcAjYv.d.cts → with-materialized-view--4PsvMDu.d.cts} +1 -1
- package/dist/{with-materialized-view-DwR4jkV5.d.ts → with-materialized-view-QT1Tp7NO.d.ts} +1 -1
- package/dist/{with-overlayed-view-ByyhHdVr.d.ts → with-overlayed-view-BEXfpzSb.d.ts} +1 -1
- package/dist/{with-overlayed-view-7-rUB3vD.d.cts → with-overlayed-view-DlH5qmeB.d.cts} +1 -1
- package/package.json +3 -3
- package/dist/chunk-3EWA37FV.js.map +0 -1
- package/dist/chunk-5LQG6ZO2.js.map +0 -1
- package/dist/chunk-ACKFRSAH.js.map +0 -1
- package/dist/chunk-DQU36Q7I.js.map +0 -1
- package/dist/chunk-EGD5DXFT.js.map +0 -1
- package/dist/chunk-KGCORI4L.js.map +0 -1
- package/dist/chunk-OHVFWCJP.js.map +0 -1
- package/dist/chunk-TV3YZ35S.js +0 -90
- package/dist/chunk-TV3YZ35S.js.map +0 -1
- package/dist/chunk-UWNYBOOO.js.map +0 -1
- package/dist/chunk-VU7SWWT5.js.map +0 -1
- package/dist/chunk-YHPM5D7Y.js.map +0 -1
- package/dist/chunk-ZWTNWAO4.js.map +0 -1
- package/dist/executor-723ZP6TH.js +0 -11
- package/dist/noydb-VZ4JVW55.js +0 -35
- /package/dist/{chunk-BIYRQQV6.js.map → chunk-3YWP3WBP.js.map} +0 -0
- /package/dist/{chunk-A5ZOOZFB.js.map → chunk-6H2ZUNR7.js.map} +0 -0
- /package/dist/{chunk-7HT2MEZ5.js.map → chunk-7BQ4QWYX.js.map} +0 -0
- /package/dist/{chunk-WBAYSNUQ.js.map → chunk-BI6ETQPF.js.map} +0 -0
- /package/dist/{chunk-56DJ7JVK.js.map → chunk-BR3AMFGS.js.map} +0 -0
- /package/dist/{chunk-YNTBADIY.js.map → chunk-CZI2A4MQ.js.map} +0 -0
- /package/dist/{chunk-COFPAMX6.js.map → chunk-DLZ2ONOD.js.map} +0 -0
- /package/dist/{chunk-PE4AQGFH.js.map → chunk-E2CDVKMH.js.map} +0 -0
- /package/dist/{chunk-L2FE64BU.js.map → chunk-FFXM3ZIF.js.map} +0 -0
- /package/dist/{chunk-WGHU7BLI.js.map → chunk-GNI5STXQ.js.map} +0 -0
- /package/dist/{chunk-NP6EZT44.js.map → chunk-IQLVUT37.js.map} +0 -0
- /package/dist/{chunk-7PS7EOCF.js.map → chunk-IXBIFDEW.js.map} +0 -0
- /package/dist/{chunk-LX3CB26H.js.map → chunk-KABJXG2F.js.map} +0 -0
- /package/dist/{chunk-DKO2QFSA.js.map → chunk-OB2ZJQ2D.js.map} +0 -0
- /package/dist/{chunk-4PEFEETV.js.map → chunk-OMAMZKKD.js.map} +0 -0
- /package/dist/{chunk-KI6HAJWL.js.map → chunk-QSUK7YWK.js.map} +0 -0
- /package/dist/{chunk-NSCVNK5K.js.map → chunk-SCJPI4Z5.js.map} +0 -0
- /package/dist/{chunk-6AJBSQU4.js.map → chunk-XL35NSEN.js.map} +0 -0
- /package/dist/{chunk-WIBHRONM.js.map → chunk-XWH4MXIU.js.map} +0 -0
- /package/dist/{executor-723ZP6TH.js.map → executor-AZLS3KBK.js.map} +0 -0
- /package/dist/{fanout-sidecar-N6OJX6QR.js.map → fanout-sidecar-67CMI3UT.js.map} +0 -0
- /package/dist/{issue-ADVS4OVP.js.map → issue-RZP3VI6O.js.map} +0 -0
- /package/dist/{ledger-CWSE3BLF.js.map → ledger-A3LL253R.js.map} +0 -0
- /package/dist/{noydb-VZ4JVW55.js.map → noydb-WCMY2ZOW.js.map} +0 -0
- /package/dist/{public-envelope-SYHEYQ3X.js.map → public-envelope-YP2UWMLG.js.map} +0 -0
- /package/dist/{registry-DK5YWAAA.js.map → registry-EB6SISTA.js.map} +0 -0
- /package/dist/{registry-XGLNADIE.js.map → registry-UTA4CLQS.js.map} +0 -0
- /package/dist/{revoke-ZDFKMR5E.js.map → revoke-HNMQZSCL.js.map} +0 -0
- /package/dist/{signer-P5D7Y72U.js.map → signer-DCMNKXSF.js.map} +0 -0
- /package/dist/{stale-7FRJVHN6.js.map → stale-W5PQTRYH.js.map} +0 -0
- /package/dist/{vault-group-W7QC4UYW.js.map → vault-group-DX2HFQMX.js.map} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { w as withMaterializedView } from '../with-materialized-view
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
4
|
-
import { Q as Query } from '../index-
|
|
5
|
-
export { a3 as MaterializedViewConfigError, a4 as MaterializedViewCycleError, a5 as MaterializedViewSourceUnknownError, a6 as MaterializedViewTooLargeError } from '../strategy-
|
|
6
|
-
import '../lazy-builder-
|
|
7
|
-
import '../predicate-
|
|
1
|
+
export { w as withMaterializedView } from '../with-materialized-view--4PsvMDu.cjs';
|
|
2
|
+
import { aS as Collection, bv as TxContext, bw as MVQueryContext, bx as RegisteredMV, by as MaterializedViewRegistry } from '../types-Bze6vkwm.cjs';
|
|
3
|
+
export { bz as MaterializedFromMeta, bA as MaterializedViewOutput, aP as MaterializedViewStrategy, aQ as MaterializedViewStrategyHandle, bB as UnionArmJoin, bC as UnionSource } from '../types-Bze6vkwm.cjs';
|
|
4
|
+
import { Q as Query } from '../index-C8Bk3-VF.cjs';
|
|
5
|
+
export { a3 as MaterializedViewConfigError, a4 as MaterializedViewCycleError, a5 as MaterializedViewSourceUnknownError, a6 as MaterializedViewTooLargeError } from '../strategy-BtW8fAjz.cjs';
|
|
6
|
+
import '../lazy-builder-eYZzLEL1.cjs';
|
|
7
|
+
import '../predicate-BmhBSPCH.cjs';
|
|
8
8
|
import '../strategy-BSxFXGzb.cjs';
|
|
9
9
|
import '@noy-db/attestation';
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { w as withMaterializedView } from '../with-materialized-view-
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
4
|
-
import { Q as Query } from '../index-
|
|
5
|
-
export { a3 as MaterializedViewConfigError, a4 as MaterializedViewCycleError, a5 as MaterializedViewSourceUnknownError, a6 as MaterializedViewTooLargeError } from '../strategy-
|
|
6
|
-
import '../lazy-builder-
|
|
7
|
-
import '../predicate-
|
|
1
|
+
export { w as withMaterializedView } from '../with-materialized-view-QT1Tp7NO.js';
|
|
2
|
+
import { aS as Collection, bv as TxContext, bw as MVQueryContext, bx as RegisteredMV, by as MaterializedViewRegistry } from '../types-DrmBTscX.js';
|
|
3
|
+
export { bz as MaterializedFromMeta, bA as MaterializedViewOutput, aP as MaterializedViewStrategy, aQ as MaterializedViewStrategyHandle, bB as UnionArmJoin, bC as UnionSource } from '../types-DrmBTscX.js';
|
|
4
|
+
import { Q as Query } from '../index-nP99bXLg.js';
|
|
5
|
+
export { a3 as MaterializedViewConfigError, a4 as MaterializedViewCycleError, a5 as MaterializedViewSourceUnknownError, a6 as MaterializedViewTooLargeError } from '../strategy-BtW8fAjz.js';
|
|
6
|
+
import '../lazy-builder-ChSqcF5t.js';
|
|
7
|
+
import '../predicate-BmhBSPCH.js';
|
|
8
8
|
import '../strategy-BSxFXGzb.js';
|
|
9
9
|
import '@noy-db/attestation';
|
|
10
10
|
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
withMaterializedView
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-TKIY625R.js";
|
|
4
4
|
import {
|
|
5
5
|
clearMVStale,
|
|
6
6
|
isMVStale,
|
|
7
7
|
markMVStale,
|
|
8
8
|
resolveStaleMVOnRead
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-OMAMZKKD.js";
|
|
10
10
|
import {
|
|
11
11
|
MaterializedViewExecutor
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-HBXJ37ZY.js";
|
|
13
13
|
import {
|
|
14
14
|
MaterializedViewRegistry,
|
|
15
15
|
analyzeDependencies,
|
|
16
16
|
canonicalizeQueryPlan,
|
|
17
17
|
computeQueryHash,
|
|
18
18
|
summarizeQueryPlan
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
19
|
+
} from "../chunk-G4SCICH5.js";
|
|
20
|
+
import "../chunk-L2BNJ6HM.js";
|
|
21
|
+
import "../chunk-CJORTUJ2.js";
|
|
22
22
|
import {
|
|
23
23
|
MaterializedViewConfigError,
|
|
24
24
|
MaterializedViewCycleError,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Noydb,
|
|
3
|
+
createNoydb
|
|
4
|
+
} from "./chunk-667MB6AH.js";
|
|
5
|
+
import "./chunk-ZC7J6ZYV.js";
|
|
6
|
+
import "./chunk-EMIGCR7X.js";
|
|
7
|
+
import "./chunk-QVIEAYTP.js";
|
|
8
|
+
import "./chunk-VLMPU56Q.js";
|
|
9
|
+
import "./chunk-CZI2A4MQ.js";
|
|
10
|
+
import "./chunk-GNI5STXQ.js";
|
|
11
|
+
import "./chunk-OB2ZJQ2D.js";
|
|
12
|
+
import "./chunk-QSUK7YWK.js";
|
|
13
|
+
import "./chunk-UF3BUNQZ.js";
|
|
14
|
+
import "./chunk-7BQ4QWYX.js";
|
|
15
|
+
import "./chunk-DLZ2ONOD.js";
|
|
16
|
+
import "./chunk-4TBBMHVC.js";
|
|
17
|
+
import "./chunk-6H2ZUNR7.js";
|
|
18
|
+
import "./chunk-2QR2PQTT.js";
|
|
19
|
+
import "./chunk-FZU343FL.js";
|
|
20
|
+
import "./chunk-BR3AMFGS.js";
|
|
21
|
+
import "./chunk-Z6FNBOTC.js";
|
|
22
|
+
import "./chunk-DUREQF5W.js";
|
|
23
|
+
import "./chunk-XWH4MXIU.js";
|
|
24
|
+
import "./chunk-IQLVUT37.js";
|
|
25
|
+
import "./chunk-L2BNJ6HM.js";
|
|
26
|
+
import "./chunk-CJORTUJ2.js";
|
|
27
|
+
import "./chunk-XL35NSEN.js";
|
|
28
|
+
import "./chunk-F3BPIPLS.js";
|
|
29
|
+
import "./chunk-YULZKK4F.js";
|
|
30
|
+
import "./chunk-535SSHBS.js";
|
|
31
|
+
export {
|
|
32
|
+
Noydb,
|
|
33
|
+
createNoydb
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=noydb-WCMY2ZOW.js.map
|
|
@@ -217,37 +217,34 @@ var OverlayedCollection = class {
|
|
|
217
217
|
/** Get the merged row by id. */
|
|
218
218
|
async get(id) {
|
|
219
219
|
const overlayRow = await this.overlayCollection.get(id);
|
|
220
|
-
if (overlayRow !== null && this.shadowPredicateApplies(overlayRow)) {
|
|
221
|
-
return overlayRow;
|
|
222
|
-
}
|
|
223
220
|
const baseRow = await this.baseCollection.get(id);
|
|
224
|
-
|
|
225
|
-
return null;
|
|
221
|
+
return this.mergeRows(overlayRow, baseRow);
|
|
226
222
|
}
|
|
227
223
|
/** List union of base + overlay ids, applying the merge per row. */
|
|
228
224
|
async list() {
|
|
229
225
|
const baseRows = await this.baseCollection.list();
|
|
230
226
|
const overlayRows = await this.overlayCollection.list();
|
|
231
|
-
const merged = /* @__PURE__ */ new Map();
|
|
232
227
|
const idOf = (row) => {
|
|
233
228
|
if (this.baseRowKey) return this.baseRowKey(row);
|
|
234
229
|
const idField = row.id;
|
|
235
230
|
return typeof idField === "string" ? idField : "";
|
|
236
231
|
};
|
|
232
|
+
const baseById = /* @__PURE__ */ new Map();
|
|
233
|
+
const overlayById = /* @__PURE__ */ new Map();
|
|
237
234
|
for (const row of baseRows) {
|
|
238
235
|
const id = idOf(row);
|
|
239
|
-
if (id)
|
|
236
|
+
if (id) baseById.set(id, row);
|
|
240
237
|
}
|
|
241
238
|
for (const row of overlayRows) {
|
|
242
239
|
const id = idOf(row);
|
|
243
|
-
if (
|
|
244
|
-
if (this.shadowPredicateApplies(row)) {
|
|
245
|
-
merged.set(id, row);
|
|
246
|
-
} else if (!merged.has(id)) {
|
|
247
|
-
continue;
|
|
248
|
-
}
|
|
240
|
+
if (id) overlayById.set(id, row);
|
|
249
241
|
}
|
|
250
|
-
|
|
242
|
+
const out = [];
|
|
243
|
+
for (const id of /* @__PURE__ */ new Set([...baseById.keys(), ...overlayById.keys()])) {
|
|
244
|
+
const merged = this.mergeRows(overlayById.get(id) ?? null, baseById.get(id) ?? null);
|
|
245
|
+
if (merged !== null) out.push(merged);
|
|
246
|
+
}
|
|
247
|
+
return out;
|
|
251
248
|
}
|
|
252
249
|
/**
|
|
253
250
|
* Write to the overlay. Two forms:
|
|
@@ -287,9 +284,42 @@ var OverlayedCollection = class {
|
|
|
287
284
|
async delete(id) {
|
|
288
285
|
await this.overlayCollection.delete(id);
|
|
289
286
|
}
|
|
290
|
-
/**
|
|
291
|
-
|
|
292
|
-
|
|
287
|
+
/**
|
|
288
|
+
* Merge a single id's overlay + base rows into the visible row.
|
|
289
|
+
*
|
|
290
|
+
* Priority (first match wins):
|
|
291
|
+
* 1. Binary shadow win — overlay present AND
|
|
292
|
+
* `overlay[shadowField] === shadowValue` → return the overlay row
|
|
293
|
+
* entirely. This stays FIRST so the original binary behaviour is
|
|
294
|
+
* unchanged whether or not `mergeMode` is configured.
|
|
295
|
+
* 2. Field-level merge — overlay present, `mergeMode` configured,
|
|
296
|
+
* and a rule whose `whenStatus` equals `overlay[shadowField]`.
|
|
297
|
+
* The matched rule pulls its `overlayFields` (those present on
|
|
298
|
+
* the overlay row) on top of the base row. With no base row, the
|
|
299
|
+
* overlay row is returned as-is.
|
|
300
|
+
* 3. Fallback — return the base row (possibly `null`). An
|
|
301
|
+
* overlay-only row that qualifies under neither (1) nor (2) and
|
|
302
|
+
* has no base is therefore NOT surfaced.
|
|
303
|
+
*/
|
|
304
|
+
mergeRows(overlayRow, baseRow) {
|
|
305
|
+
const shadowField = this.spec.shadowField;
|
|
306
|
+
if (overlayRow !== null && overlayRow[shadowField] === this.spec.shadowValue) {
|
|
307
|
+
return overlayRow;
|
|
308
|
+
}
|
|
309
|
+
if (overlayRow !== null && this.spec.mergeMode) {
|
|
310
|
+
const status = overlayRow[shadowField];
|
|
311
|
+
const rule = this.spec.mergeMode.rules.find((r) => r.whenStatus === status);
|
|
312
|
+
if (rule) {
|
|
313
|
+
if (baseRow === null) return overlayRow;
|
|
314
|
+
const overlaySrc = overlayRow;
|
|
315
|
+
const picked = {};
|
|
316
|
+
for (const field of rule.overlayFields) {
|
|
317
|
+
if (field in overlaySrc) picked[field] = overlaySrc[field];
|
|
318
|
+
}
|
|
319
|
+
return { ...baseRow, ...picked };
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
return baseRow;
|
|
293
323
|
}
|
|
294
324
|
// ─── Throw-stubs for the unimplemented Collection<T> surface ───────
|
|
295
325
|
//
|