@contello/store 3.1.0 → 4.0.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/dist/index.cjs +85 -83
- package/dist/index.d.cts +1 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -20
- package/dist/index.js.map +1 -1
- package/package.json +7 -6
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
let _contello_client = require("@contello/client");
|
|
3
|
-
let
|
|
3
|
+
let _entwico_dash_async = require("@entwico/dash/async");
|
|
4
|
+
let _entwico_projected = require("@entwico/projected");
|
|
4
5
|
let _contello_opentelemetry = require("@contello/opentelemetry");
|
|
6
|
+
let _entwico_dash = require("@entwico/dash");
|
|
5
7
|
let lru_cache = require("lru-cache");
|
|
6
8
|
//#region src/generated/graphql.ts
|
|
7
9
|
const MediaAssetFragmentSchema = `fragment MediaAsset on ContelloAsset {
|
|
@@ -210,7 +212,7 @@ function createRefresher(fn, onRefreshed, onStart) {
|
|
|
210
212
|
refreshing = true;
|
|
211
213
|
inFlightKind = kind;
|
|
212
214
|
onStart?.();
|
|
213
|
-
(0,
|
|
215
|
+
(0, _entwico_dash_async.retryWithBackoff)(fn).then(() => {
|
|
214
216
|
const finished = inFlightKind;
|
|
215
217
|
refreshing = false;
|
|
216
218
|
inFlightKind = void 0;
|
|
@@ -225,7 +227,7 @@ function createRefresher(fn, onRefreshed, onStart) {
|
|
|
225
227
|
return scheduleRefresh;
|
|
226
228
|
}
|
|
227
229
|
function createRefreshChannel(onRefresh) {
|
|
228
|
-
const stream$ = (0,
|
|
230
|
+
const stream$ = (0, _entwico_dash_async.createAsyncIterableSubject)();
|
|
229
231
|
return {
|
|
230
232
|
stream$,
|
|
231
233
|
emit(event) {
|
|
@@ -310,10 +312,10 @@ function createAssetsCollection(options, client, updates$, refreshByTtl) {
|
|
|
310
312
|
});
|
|
311
313
|
let loaded = false;
|
|
312
314
|
const assetsSourceDoc = (0, _contello_client.createSourceSubscription)(schema.sources.storeAsset);
|
|
313
|
-
const projected
|
|
315
|
+
const projected = new _entwico_projected.ProjectedMap({
|
|
314
316
|
key: (asset) => asset.id,
|
|
315
317
|
values: (ids) => wrap("assets", async () => {
|
|
316
|
-
const items = (await (0,
|
|
318
|
+
const items = (await (0, _entwico_dash_async.concatAsync)((0, _entwico_dash_async.mapAsync)(client.subscribe(assetsSourceDoc, { ids }), (data) => data.source))).map((item) => mapAsset$1(item));
|
|
317
319
|
if (ids === void 0 && !loaded) {
|
|
318
320
|
loaded = true;
|
|
319
321
|
ttl.mark();
|
|
@@ -329,8 +331,8 @@ function createAssetsCollection(options, client, updates$, refreshByTtl) {
|
|
|
329
331
|
});
|
|
330
332
|
}
|
|
331
333
|
function runFullRefresh(kind) {
|
|
332
|
-
refreshByTtl.enqueue(() => (0,
|
|
333
|
-
emit((await projected
|
|
334
|
+
refreshByTtl.enqueue(() => (0, _entwico_dash_async.retryWithBackoff)(async () => {
|
|
335
|
+
emit((await projected.refresh()).keys().toArray(), kind);
|
|
334
336
|
ttl.mark();
|
|
335
337
|
}));
|
|
336
338
|
}
|
|
@@ -340,8 +342,8 @@ function createAssetsCollection(options, client, updates$, refreshByTtl) {
|
|
|
340
342
|
emit(changedIds, "upstream-update");
|
|
341
343
|
return;
|
|
342
344
|
}
|
|
343
|
-
(0,
|
|
344
|
-
await projected
|
|
345
|
+
(0, _entwico_dash_async.retryWithBackoff)(async () => {
|
|
346
|
+
await projected.refresh(refreshIds);
|
|
345
347
|
emit(changedIds, "upstream-update");
|
|
346
348
|
});
|
|
347
349
|
}
|
|
@@ -352,20 +354,20 @@ function createAssetsCollection(options, client, updates$, refreshByTtl) {
|
|
|
352
354
|
for (const event of batch.asset) if (event.mutation === "delete") deleted.push(event.id);
|
|
353
355
|
else upserted.add(event.id);
|
|
354
356
|
if (cache.eviction === "clear") {
|
|
355
|
-
projected
|
|
357
|
+
projected.clear();
|
|
356
358
|
return;
|
|
357
359
|
}
|
|
358
|
-
if (deleted.length > 0) projected
|
|
360
|
+
if (deleted.length > 0) projected.delete(deleted);
|
|
359
361
|
runPartialRefresh([...upserted], deleted);
|
|
360
362
|
});
|
|
361
363
|
return {
|
|
362
364
|
instance: {
|
|
363
365
|
refresh$: channel.stream$,
|
|
364
366
|
async load() {
|
|
365
|
-
if (!loaded) await projected
|
|
367
|
+
if (!loaded) await projected.getAllAsMap();
|
|
366
368
|
},
|
|
367
369
|
get(idOrIds) {
|
|
368
|
-
return projected
|
|
370
|
+
return projected.get(idOrIds);
|
|
369
371
|
},
|
|
370
372
|
upload(data, meta, options) {
|
|
371
373
|
return client.upload(data, meta, options);
|
|
@@ -555,7 +557,7 @@ var DependencyCollector = class {
|
|
|
555
557
|
//#endregion
|
|
556
558
|
//#region src/collection.ts
|
|
557
559
|
function fetchCollection(source, client, ids) {
|
|
558
|
-
return (0,
|
|
560
|
+
return (0, _entwico_dash_async.concatAsync)((0, _entwico_dash_async.mapAsync)(client.subscribe((0, _contello_client.createSourceSubscription)(source), { ids }), (r) => r.source));
|
|
559
561
|
}
|
|
560
562
|
function createCollection(source, options, client, updates$, resolver, refreshByTtl) {
|
|
561
563
|
const opts = options ?? {};
|
|
@@ -575,10 +577,10 @@ function createCollection(source, options, client, updates$, resolver, refreshBy
|
|
|
575
577
|
run: () => runFullRefresh("ttl")
|
|
576
578
|
});
|
|
577
579
|
let loaded = false;
|
|
578
|
-
const projected
|
|
580
|
+
const projected = new _entwico_projected.ProjectedMap({
|
|
579
581
|
key: (item) => item.id,
|
|
580
|
-
values: (ids) => wrap(`collection:${_def.name}`, () => (0,
|
|
581
|
-
const items = await Promise.all(rawItems.map((item) => Promise.resolve(dependencyCollector.createContext((ref, register) => (0,
|
|
582
|
+
values: (ids) => wrap(`collection:${_def.name}`, () => (0, _entwico_dash.maybeThen)(fetchCollection(source, client, ids), async (rawItems) => {
|
|
583
|
+
const items = await Promise.all(rawItems.map((item) => Promise.resolve(dependencyCollector.createContext((ref, register) => (0, _entwico_dash.maybeThen)(mapFn(item, ref), (mapped) => {
|
|
582
584
|
register(mapped.id);
|
|
583
585
|
return mapped;
|
|
584
586
|
})))));
|
|
@@ -604,8 +606,8 @@ function createCollection(source, options, client, updates$, resolver, refreshBy
|
|
|
604
606
|
});
|
|
605
607
|
}
|
|
606
608
|
function runFullRefresh(kind) {
|
|
607
|
-
refreshByTtl.enqueue(() => (0,
|
|
608
|
-
emit((await projected
|
|
609
|
+
refreshByTtl.enqueue(() => (0, _entwico_dash_async.retryWithBackoff)(async () => {
|
|
610
|
+
emit((await projected.refresh()).keys().toArray(), kind);
|
|
609
611
|
ttl.mark();
|
|
610
612
|
}));
|
|
611
613
|
}
|
|
@@ -615,8 +617,8 @@ function createCollection(source, options, client, updates$, resolver, refreshBy
|
|
|
615
617
|
emit(changedIds, "upstream-update");
|
|
616
618
|
return;
|
|
617
619
|
}
|
|
618
|
-
(0,
|
|
619
|
-
await projected
|
|
620
|
+
(0, _entwico_dash_async.retryWithBackoff)(async () => {
|
|
621
|
+
await projected.refresh(refreshIds);
|
|
620
622
|
emit(changedIds, "upstream-update");
|
|
621
623
|
});
|
|
622
624
|
}
|
|
@@ -632,11 +634,11 @@ function createCollection(source, options, client, updates$, resolver, refreshBy
|
|
|
632
634
|
if (deleted.length === 0 && upserted.size === 0 && depAffected.size === 0) return;
|
|
633
635
|
if (_def.cache.eviction === "clear") {
|
|
634
636
|
dependencyCollector.clear();
|
|
635
|
-
projected
|
|
637
|
+
projected.clear();
|
|
636
638
|
return;
|
|
637
639
|
}
|
|
638
640
|
for (const id of deleted) dependencyCollector.removeItem(id);
|
|
639
|
-
if (deleted.length > 0) projected
|
|
641
|
+
if (deleted.length > 0) projected.delete(deleted);
|
|
640
642
|
const refreshIds = upserted.union(depAffected);
|
|
641
643
|
for (const id of deleted) refreshIds.delete(id);
|
|
642
644
|
runPartialRefresh([...refreshIds], deleted);
|
|
@@ -646,16 +648,16 @@ function createCollection(source, options, client, updates$, resolver, refreshBy
|
|
|
646
648
|
name: _def.name,
|
|
647
649
|
refresh$: channel.stream$,
|
|
648
650
|
get(idOrIds) {
|
|
649
|
-
return projected
|
|
651
|
+
return projected.get(idOrIds);
|
|
650
652
|
},
|
|
651
653
|
getAll() {
|
|
652
|
-
return projected
|
|
654
|
+
return projected.getAll();
|
|
653
655
|
},
|
|
654
656
|
refresh() {
|
|
655
657
|
runFullRefresh("on-demand");
|
|
656
658
|
},
|
|
657
659
|
async load() {
|
|
658
|
-
if (!loaded) await projected
|
|
660
|
+
if (!loaded) await projected.getAllAsMap();
|
|
659
661
|
}
|
|
660
662
|
},
|
|
661
663
|
destroy() {
|
|
@@ -714,10 +716,10 @@ function createI18nMessagesCollection(def, client, updates$, refreshByTtl) {
|
|
|
714
716
|
});
|
|
715
717
|
let loaded = false;
|
|
716
718
|
const i18nSourceDoc = (0, _contello_client.createSourceSubscription)(schema.sources.storeI18nMessage);
|
|
717
|
-
const projected
|
|
719
|
+
const projected = new _entwico_projected.ProjectedMap({
|
|
718
720
|
key: (msg) => msg.id,
|
|
719
721
|
values: (ids) => wrap(`i18n:${def.collection}`, async () => {
|
|
720
|
-
const items = (await (0,
|
|
722
|
+
const items = (await (0, _entwico_dash_async.concatAsync)((0, _entwico_dash_async.mapAsync)(client.subscribe(i18nSourceDoc, {
|
|
721
723
|
collection: def.collection,
|
|
722
724
|
ids
|
|
723
725
|
}), (data) => data.source))).map((msg) => ({
|
|
@@ -739,18 +741,18 @@ function createI18nMessagesCollection(def, client, updates$, refreshByTtl) {
|
|
|
739
741
|
});
|
|
740
742
|
}
|
|
741
743
|
function emitWithCurrentIds(kind) {
|
|
742
|
-
(0,
|
|
744
|
+
(0, _entwico_dash.maybeThen)(projected.getAll(), (msgs) => {
|
|
743
745
|
emit(msgs.map((m) => m.id), kind);
|
|
744
746
|
});
|
|
745
747
|
}
|
|
746
748
|
function runTtlRefresh() {
|
|
747
749
|
refreshByTtl.enqueue(async () => {
|
|
748
|
-
await (0,
|
|
750
|
+
await (0, _entwico_dash_async.retryWithBackoff)(() => projected.refresh());
|
|
749
751
|
emitWithCurrentIds("ttl");
|
|
750
752
|
ttl.mark();
|
|
751
753
|
});
|
|
752
754
|
}
|
|
753
|
-
const scheduleRefresh = createRefresher(() => projected
|
|
755
|
+
const scheduleRefresh = createRefresher(() => projected.refresh(), (kind) => {
|
|
754
756
|
emitWithCurrentIds(kind);
|
|
755
757
|
ttl.mark();
|
|
756
758
|
}, () => {});
|
|
@@ -761,8 +763,8 @@ function createI18nMessagesCollection(def, client, updates$, refreshByTtl) {
|
|
|
761
763
|
emit(changedIds, "upstream-update");
|
|
762
764
|
return;
|
|
763
765
|
}
|
|
764
|
-
(0,
|
|
765
|
-
await projected
|
|
766
|
+
(0, _entwico_dash_async.retryWithBackoff)(async () => {
|
|
767
|
+
await projected.refresh(upsertedIds);
|
|
766
768
|
emit(changedIds, "upstream-update");
|
|
767
769
|
});
|
|
768
770
|
}
|
|
@@ -773,16 +775,16 @@ function createI18nMessagesCollection(def, client, updates$, refreshByTtl) {
|
|
|
773
775
|
const upserted = /* @__PURE__ */ new Set();
|
|
774
776
|
for (const event of batch.i18nMessage) if (event.mutation === "delete") deleted.push(event.id);
|
|
775
777
|
else upserted.add(event.id);
|
|
776
|
-
if (deleted.length > 0) projected
|
|
778
|
+
if (deleted.length > 0) projected.delete(deleted);
|
|
777
779
|
runPartialRefresh([...upserted], deleted);
|
|
778
780
|
});
|
|
779
781
|
return {
|
|
780
782
|
refresh$: channel.stream$,
|
|
781
783
|
get(idOrIds) {
|
|
782
|
-
return projected
|
|
784
|
+
return projected.get(idOrIds);
|
|
783
785
|
},
|
|
784
786
|
getAll() {
|
|
785
|
-
return projected
|
|
787
|
+
return projected.getAll();
|
|
786
788
|
},
|
|
787
789
|
register(messages) {
|
|
788
790
|
return wrap(`i18n-register:${def.collection}`, async () => {
|
|
@@ -860,10 +862,10 @@ function createLazyAssetsCollection(def, client, updates$) {
|
|
|
860
862
|
onEvict: void 0
|
|
861
863
|
});
|
|
862
864
|
const assetsSourceDoc = (0, _contello_client.createSourceSubscription)(schema.sources.storeAsset);
|
|
863
|
-
const projected
|
|
865
|
+
const projected = new _entwico_projected.ProjectedLazyMap({
|
|
864
866
|
key: (asset) => asset.id,
|
|
865
867
|
values: (ids) => wrap("assets", async () => {
|
|
866
|
-
return (await (0,
|
|
868
|
+
return (await (0, _entwico_dash_async.concatAsync)((0, _entwico_dash_async.mapAsync)(client.subscribe(assetsSourceDoc, { ids }), (data) => data.source))).map((item) => mapAsset(item));
|
|
867
869
|
}),
|
|
868
870
|
cache
|
|
869
871
|
});
|
|
@@ -878,20 +880,20 @@ function createLazyAssetsCollection(def, client, updates$) {
|
|
|
878
880
|
const scheduleRefresh = createRefresher(async () => {
|
|
879
881
|
lastRefreshKeys = cache.keys();
|
|
880
882
|
if (lastRefreshKeys.length === 0) return;
|
|
881
|
-
await projected
|
|
883
|
+
await projected.refresh(lastRefreshKeys);
|
|
882
884
|
}, (kind) => {
|
|
883
885
|
if (lastRefreshKeys.length > 0) emit(lastRefreshKeys, kind);
|
|
884
886
|
}, () => {});
|
|
885
887
|
const unsubUpdates = updates$.subscribe((batch) => {
|
|
886
888
|
if (batch.asset.length === 0) return;
|
|
887
|
-
for (const event of batch.asset) projected
|
|
889
|
+
for (const event of batch.asset) projected.delete(event.id);
|
|
888
890
|
emit(batch.asset.map((e) => e.id), "upstream-update");
|
|
889
891
|
});
|
|
890
892
|
return {
|
|
891
893
|
instance: {
|
|
892
894
|
refresh$: channel.stream$,
|
|
893
895
|
get(idOrIds) {
|
|
894
|
-
return projected
|
|
896
|
+
return projected.get(idOrIds);
|
|
895
897
|
},
|
|
896
898
|
upload(data, meta, options) {
|
|
897
899
|
return client.upload(data, meta, options);
|
|
@@ -906,7 +908,7 @@ function createLazyAssetsCollection(def, client, updates$) {
|
|
|
906
908
|
scheduleRefresh("on-demand");
|
|
907
909
|
},
|
|
908
910
|
clear() {
|
|
909
|
-
projected
|
|
911
|
+
projected.clear();
|
|
910
912
|
}
|
|
911
913
|
},
|
|
912
914
|
destroy() {
|
|
@@ -934,15 +936,15 @@ function createLazyCollection(source, options, client, updates$, resolver) {
|
|
|
934
936
|
ttl: _def.cache.ttl,
|
|
935
937
|
onEvict: (_value, key) => dependencyCollector.removeItem(key)
|
|
936
938
|
});
|
|
937
|
-
const projected
|
|
939
|
+
const projected = new _entwico_projected.ProjectedLazyMap({
|
|
938
940
|
key: (item) => item.id,
|
|
939
|
-
values: (keys) => wrap(`lazy-collection:${_def.name}`, () => (0,
|
|
941
|
+
values: (keys) => wrap(`lazy-collection:${_def.name}`, () => (0, _entwico_dash.maybeThen)((0, _entwico_dash_async.concatAsync)((0, _entwico_dash_async.mapAsync)(client.subscribe((0, _contello_client.createSourceSubscription)(source), { ids: keys }), (r) => r.source)), (rawItems) => Promise.all(rawItems.map((item) => Promise.resolve(dependencyCollector.createContext((ref, register) => (0, _entwico_dash.maybeThen)(mapFn(item, ref), (mapped) => {
|
|
940
942
|
register(mapped.id);
|
|
941
943
|
return mapped;
|
|
942
944
|
}))))))),
|
|
943
945
|
cache
|
|
944
946
|
});
|
|
945
|
-
const refresh$ = (0,
|
|
947
|
+
const refresh$ = (0, _entwico_dash_async.createAsyncIterableSubject)();
|
|
946
948
|
function emit(ids, kind) {
|
|
947
949
|
const event = {
|
|
948
950
|
ids,
|
|
@@ -955,7 +957,7 @@ function createLazyCollection(source, options, client, updates$, resolver) {
|
|
|
955
957
|
const scheduleRefresh = createRefresher(async () => {
|
|
956
958
|
lastRefreshKeys = cache.keys();
|
|
957
959
|
if (lastRefreshKeys.length === 0) return;
|
|
958
|
-
await projected
|
|
960
|
+
await projected.refresh(lastRefreshKeys);
|
|
959
961
|
}, (kind) => {
|
|
960
962
|
if (lastRefreshKeys.length > 0) emit(lastRefreshKeys, kind);
|
|
961
963
|
}, () => {});
|
|
@@ -967,7 +969,7 @@ function createLazyCollection(source, options, client, updates$, resolver) {
|
|
|
967
969
|
if (evicted.size > 0) {
|
|
968
970
|
for (const key of evicted) {
|
|
969
971
|
dependencyCollector.removeItem(key);
|
|
970
|
-
projected
|
|
972
|
+
projected.delete(key);
|
|
971
973
|
}
|
|
972
974
|
emit([...evicted], "upstream-update");
|
|
973
975
|
}
|
|
@@ -977,14 +979,14 @@ function createLazyCollection(source, options, client, updates$, resolver) {
|
|
|
977
979
|
name: _def.name,
|
|
978
980
|
refresh$,
|
|
979
981
|
get(idOrIds) {
|
|
980
|
-
return projected
|
|
982
|
+
return projected.get(idOrIds);
|
|
981
983
|
},
|
|
982
984
|
refresh() {
|
|
983
985
|
scheduleRefresh("on-demand");
|
|
984
986
|
},
|
|
985
987
|
clear() {
|
|
986
988
|
dependencyCollector.clear();
|
|
987
|
-
projected
|
|
989
|
+
projected.clear();
|
|
988
990
|
}
|
|
989
991
|
},
|
|
990
992
|
destroy() {
|
|
@@ -1115,9 +1117,9 @@ function createLazyRoutesCollection(def, client, updates$, resolver) {
|
|
|
1115
1117
|
const cache = createRoutesCache(_def.cache.max, _def.cache.ttl);
|
|
1116
1118
|
const routesSourceDoc = (0, _contello_client.createSourceSubscription)(schema.sources.storeRoute);
|
|
1117
1119
|
function fetchRoutes(vars) {
|
|
1118
|
-
return (0,
|
|
1120
|
+
return (0, _entwico_dash_async.concatAsync)((0, _entwico_dash_async.mapAsync)(client.subscribe(routesSourceDoc, vars), (data) => data.source));
|
|
1119
1121
|
}
|
|
1120
|
-
const projected
|
|
1122
|
+
const projected = new _entwico_projected.ProjectedLazyMap({
|
|
1121
1123
|
key: (route) => route[CACHE_KEY] ?? ID_PREFIX + route.id,
|
|
1122
1124
|
values: (prefixedKeys) => wrap("routes", async () => {
|
|
1123
1125
|
const ids = [];
|
|
@@ -1145,7 +1147,7 @@ function createLazyRoutesCollection(def, client, updates$, resolver) {
|
|
|
1145
1147
|
const scheduleRefresh = createRefresher(async () => {
|
|
1146
1148
|
lastRefreshKeys = cache.keys();
|
|
1147
1149
|
if (lastRefreshKeys.length === 0) return;
|
|
1148
|
-
await projected
|
|
1150
|
+
await projected.refresh(lastRefreshKeys);
|
|
1149
1151
|
}, (kind) => {
|
|
1150
1152
|
if (lastRefreshKeys.length > 0) emit(lastRefreshKeys.map((key) => key.slice(2)), kind);
|
|
1151
1153
|
}, () => {});
|
|
@@ -1167,18 +1169,18 @@ function createLazyRoutesCollection(def, client, updates$, resolver) {
|
|
|
1167
1169
|
instance: {
|
|
1168
1170
|
refresh$: channel.stream$,
|
|
1169
1171
|
get(idOrIds) {
|
|
1170
|
-
if (Array.isArray(idOrIds)) return projected
|
|
1171
|
-
return projected
|
|
1172
|
+
if (Array.isArray(idOrIds)) return projected.get(idOrIds.map((id) => ID_PREFIX + id));
|
|
1173
|
+
return projected.get(ID_PREFIX + idOrIds);
|
|
1172
1174
|
},
|
|
1173
1175
|
getByPath(pathOrPaths) {
|
|
1174
|
-
if (Array.isArray(pathOrPaths)) return projected
|
|
1175
|
-
return projected
|
|
1176
|
+
if (Array.isArray(pathOrPaths)) return projected.get(pathOrPaths.map((p) => PATH_PREFIX + p));
|
|
1177
|
+
return projected.get(PATH_PREFIX + pathOrPaths);
|
|
1176
1178
|
},
|
|
1177
1179
|
refresh() {
|
|
1178
1180
|
scheduleRefresh("on-demand");
|
|
1179
1181
|
},
|
|
1180
1182
|
clear() {
|
|
1181
|
-
projected
|
|
1183
|
+
projected.clear();
|
|
1182
1184
|
}
|
|
1183
1185
|
},
|
|
1184
1186
|
destroy() {
|
|
@@ -1242,10 +1244,10 @@ function createRoutesCollection(options, client, updates$, resolver, refreshByTt
|
|
|
1242
1244
|
const idByPath = /* @__PURE__ */ new Map();
|
|
1243
1245
|
let loaded = false;
|
|
1244
1246
|
const routesSourceDoc = (0, _contello_client.createSourceSubscription)(schema.sources.storeRoute);
|
|
1245
|
-
const projected
|
|
1247
|
+
const projected = new _entwico_projected.ProjectedMap({
|
|
1246
1248
|
key: (route) => route.id,
|
|
1247
1249
|
values: (ids) => wrap("routes", async () => {
|
|
1248
|
-
const items = (await (0,
|
|
1250
|
+
const items = (await (0, _entwico_dash_async.concatAsync)((0, _entwico_dash_async.mapAsync)(client.subscribe(routesSourceDoc, { ids }), (data) => data.source))).reduce((acc, raw) => {
|
|
1249
1251
|
const mapped = mapRoute(raw, resolver);
|
|
1250
1252
|
if (mapped) acc.push(mapped);
|
|
1251
1253
|
return acc;
|
|
@@ -1289,8 +1291,8 @@ function createRoutesCollection(options, client, updates$, resolver, refreshByTt
|
|
|
1289
1291
|
});
|
|
1290
1292
|
}
|
|
1291
1293
|
function runFullRefresh(kind) {
|
|
1292
|
-
refreshByTtl.enqueue(() => (0,
|
|
1293
|
-
emit((await projected
|
|
1294
|
+
refreshByTtl.enqueue(() => (0, _entwico_dash_async.retryWithBackoff)(async () => {
|
|
1295
|
+
emit((await projected.refresh()).keys().toArray(), kind);
|
|
1294
1296
|
ttl.mark();
|
|
1295
1297
|
}));
|
|
1296
1298
|
}
|
|
@@ -1300,8 +1302,8 @@ function createRoutesCollection(options, client, updates$, resolver, refreshByTt
|
|
|
1300
1302
|
emit(changedIds, "upstream-update");
|
|
1301
1303
|
return;
|
|
1302
1304
|
}
|
|
1303
|
-
(0,
|
|
1304
|
-
await projected
|
|
1305
|
+
(0, _entwico_dash_async.retryWithBackoff)(async () => {
|
|
1306
|
+
await projected.refresh(refreshIds);
|
|
1305
1307
|
emit(changedIds, "upstream-update");
|
|
1306
1308
|
});
|
|
1307
1309
|
}
|
|
@@ -1314,7 +1316,7 @@ function createRoutesCollection(options, client, updates$, resolver, refreshByTt
|
|
|
1314
1316
|
if (cache.eviction === "clear") {
|
|
1315
1317
|
pathById.clear();
|
|
1316
1318
|
idByPath.clear();
|
|
1317
|
-
projected
|
|
1319
|
+
projected.clear();
|
|
1318
1320
|
return;
|
|
1319
1321
|
}
|
|
1320
1322
|
for (const id of deleted) {
|
|
@@ -1324,40 +1326,40 @@ function createRoutesCollection(options, client, updates$, resolver, refreshByTt
|
|
|
1324
1326
|
pathById.delete(id);
|
|
1325
1327
|
}
|
|
1326
1328
|
}
|
|
1327
|
-
if (deleted.length > 0) projected
|
|
1329
|
+
if (deleted.length > 0) projected.delete(deleted);
|
|
1328
1330
|
runPartialRefresh([...upserted], deleted);
|
|
1329
1331
|
});
|
|
1330
1332
|
function getByIdSingle(id) {
|
|
1331
|
-
return projected
|
|
1333
|
+
return projected.get(id);
|
|
1332
1334
|
}
|
|
1333
1335
|
function getByIds(ids) {
|
|
1334
|
-
return projected
|
|
1336
|
+
return projected.get(ids);
|
|
1335
1337
|
}
|
|
1336
1338
|
function lookupByPathSingle(path) {
|
|
1337
|
-
return (0,
|
|
1339
|
+
return (0, _entwico_dash.maybeThen)(ensureLoaded(), () => {
|
|
1338
1340
|
const id = idByPath.get(path);
|
|
1339
|
-
return id === void 0 ? void 0 : projected
|
|
1341
|
+
return id === void 0 ? void 0 : projected.get(id);
|
|
1340
1342
|
});
|
|
1341
1343
|
}
|
|
1342
1344
|
function lookupByPaths(paths) {
|
|
1343
|
-
return (0,
|
|
1345
|
+
return (0, _entwico_dash.maybeThen)(ensureLoaded(), () => {
|
|
1344
1346
|
const ids = [];
|
|
1345
1347
|
for (const p of paths) {
|
|
1346
1348
|
const id = idByPath.get(p);
|
|
1347
1349
|
if (id !== void 0) ids.push(id);
|
|
1348
1350
|
}
|
|
1349
|
-
return projected
|
|
1351
|
+
return projected.get(ids);
|
|
1350
1352
|
});
|
|
1351
1353
|
}
|
|
1352
1354
|
function ensureLoaded() {
|
|
1353
1355
|
if (loaded) return;
|
|
1354
|
-
return (0,
|
|
1356
|
+
return (0, _entwico_dash.maybeThen)(projected.getAllAsMap(), () => {});
|
|
1355
1357
|
}
|
|
1356
1358
|
return {
|
|
1357
1359
|
instance: {
|
|
1358
1360
|
refresh$: channel.stream$,
|
|
1359
1361
|
async load() {
|
|
1360
|
-
if (!loaded) await projected
|
|
1362
|
+
if (!loaded) await projected.getAllAsMap();
|
|
1361
1363
|
},
|
|
1362
1364
|
get(idOrIds) {
|
|
1363
1365
|
return typeof idOrIds === "string" ? getByIdSingle(idOrIds) : getByIds(idOrIds);
|
|
@@ -1416,7 +1418,7 @@ function createSingleton(source, options, client, updates$, resolver, refreshByT
|
|
|
1416
1418
|
run: () => runTtlRefresh()
|
|
1417
1419
|
});
|
|
1418
1420
|
let loaded = false;
|
|
1419
|
-
const projected
|
|
1421
|
+
const projected = new _entwico_projected.ProjectedValue({ value: () => wrap(`singleton:${_def.name}`, () => (0, _entwico_dash.maybeThen)((0, _entwico_dash_async.firstAsync)((0, _entwico_dash_async.mapAsync)(client.subscribe((0, _contello_client.createSourceSubscription)(source)), (r) => r.source)), (raw) => dependencyCollector.createContext((ref, register) => (0, _entwico_dash.maybeThen)(mapFn(raw, ref), (mapped) => {
|
|
1420
1422
|
register(itemKey);
|
|
1421
1423
|
if (!loaded) {
|
|
1422
1424
|
loaded = true;
|
|
@@ -1430,12 +1432,12 @@ function createSingleton(source, options, client, updates$, resolver, refreshByT
|
|
|
1430
1432
|
}
|
|
1431
1433
|
function runTtlRefresh() {
|
|
1432
1434
|
refreshByTtl.enqueue(async () => {
|
|
1433
|
-
await (0,
|
|
1435
|
+
await (0, _entwico_dash_async.retryWithBackoff)(() => projected.refresh());
|
|
1434
1436
|
emit("ttl");
|
|
1435
1437
|
ttl.mark();
|
|
1436
1438
|
});
|
|
1437
1439
|
}
|
|
1438
|
-
const scheduleRefresh = createRefresher(() => projected
|
|
1440
|
+
const scheduleRefresh = createRefresher(() => projected.refresh(), (kind) => {
|
|
1439
1441
|
emit(kind);
|
|
1440
1442
|
ttl.mark();
|
|
1441
1443
|
}, () => {});
|
|
@@ -1446,7 +1448,7 @@ function createSingleton(source, options, client, updates$, resolver, refreshByT
|
|
|
1446
1448
|
if (!hasOwnModel && !hasAffectedRefs) return;
|
|
1447
1449
|
if (_def.cache.eviction === "clear") {
|
|
1448
1450
|
dependencyCollector.clear();
|
|
1449
|
-
projected
|
|
1451
|
+
projected.clear();
|
|
1450
1452
|
return;
|
|
1451
1453
|
}
|
|
1452
1454
|
scheduleRefresh("upstream-update");
|
|
@@ -1456,13 +1458,13 @@ function createSingleton(source, options, client, updates$, resolver, refreshByT
|
|
|
1456
1458
|
name: _def.name,
|
|
1457
1459
|
refresh$: channel.stream$,
|
|
1458
1460
|
get() {
|
|
1459
|
-
return projected
|
|
1461
|
+
return projected.get();
|
|
1460
1462
|
},
|
|
1461
1463
|
refresh() {
|
|
1462
1464
|
scheduleRefresh("on-demand");
|
|
1463
1465
|
},
|
|
1464
1466
|
async load() {
|
|
1465
|
-
if (!loaded) await projected
|
|
1467
|
+
if (!loaded) await projected.get();
|
|
1466
1468
|
}
|
|
1467
1469
|
},
|
|
1468
1470
|
destroy() {
|
|
@@ -1603,7 +1605,7 @@ function safeMapEvent(raw, resolver) {
|
|
|
1603
1605
|
}
|
|
1604
1606
|
}
|
|
1605
1607
|
function createInternalWatcher(client, resolver) {
|
|
1606
|
-
const updates$ = (0,
|
|
1608
|
+
const updates$ = (0, _entwico_dash_async.createAsyncIterableSubject)();
|
|
1607
1609
|
let controller;
|
|
1608
1610
|
return {
|
|
1609
1611
|
updates$,
|
|
@@ -1613,7 +1615,7 @@ function createInternalWatcher(client, resolver) {
|
|
|
1613
1615
|
const signal = controller.signal;
|
|
1614
1616
|
wrap("watcher:start", () => {
|
|
1615
1617
|
(async () => {
|
|
1616
|
-
const events = (0,
|
|
1618
|
+
const events = (0, _entwico_dash_async.mapAsync)((0, _entwico_dash_async.keepalive)(() => client.subscribe(storeWatchUpdatesDocument), { signal }), (data) => (data.contelloUpdatesBatch?.events ?? []).map((e) => safeMapEvent(e, resolver)).filter((e) => e !== void 0));
|
|
1617
1619
|
for await (const list of events) {
|
|
1618
1620
|
if (signal.aborted) return;
|
|
1619
1621
|
if (list.length === 0) continue;
|
|
@@ -1756,12 +1758,12 @@ exports.createStore = createStore;
|
|
|
1756
1758
|
Object.defineProperty(exports, "maybeCatch", {
|
|
1757
1759
|
enumerable: true,
|
|
1758
1760
|
get: function() {
|
|
1759
|
-
return
|
|
1761
|
+
return _entwico_dash.maybeCatch;
|
|
1760
1762
|
}
|
|
1761
1763
|
});
|
|
1762
1764
|
Object.defineProperty(exports, "maybeThen", {
|
|
1763
1765
|
enumerable: true,
|
|
1764
1766
|
get: function() {
|
|
1765
|
-
return
|
|
1767
|
+
return _entwico_dash.maybeThen;
|
|
1766
1768
|
}
|
|
1767
1769
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ConnectionEvents, ContelloClient, DownloadResult, ProxyResult, Schema, SourceCardinality, SourceDef, UploadData, UploadMetadata, UploadOptions } from "@contello/client";
|
|
2
|
-
import { MaybePromise, MaybePromise as MaybePromise$1, ReadonlyDeep, ReadonlyDeep as ReadonlyDeep$1, maybeCatch, maybeThen } from "
|
|
3
|
-
|
|
2
|
+
import { MaybePromise, MaybePromise as MaybePromise$1, ReadonlyDeep, ReadonlyDeep as ReadonlyDeep$1, maybeCatch, maybeThen } from "@entwico/dash";
|
|
4
3
|
//#region src/routes-mapping.d.ts
|
|
5
4
|
type StoreRouteCustomHeader = {
|
|
6
5
|
name: string;
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/routes-mapping.ts","../src/watcher.ts","../src/dependency-collector.ts","../src/types.ts","../src/lazy-assets.ts","../src/assets.ts","../src/i18n.ts","../src/lazy-routes.ts","../src/routes.ts","../src/store.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/routes-mapping.ts","../src/watcher.ts","../src/dependency-collector.ts","../src/types.ts","../src/lazy-assets.ts","../src/assets.ts","../src/i18n.ts","../src/lazy-routes.ts","../src/routes.ts","../src/store.ts"],"mappings":";;;KAGY,sBAAA;EACV,IAAA;EACA,KAAK;AAAA;AAAA,KAGK,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AA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConnectionEvents, ContelloClient, DownloadResult, ProxyResult, Schema, SourceCardinality, SourceDef, UploadData, UploadMetadata, UploadOptions } from "@contello/client";
|
|
2
|
-
import { MaybePromise, MaybePromise as MaybePromise$1, ReadonlyDeep, ReadonlyDeep as ReadonlyDeep$1, maybeCatch, maybeThen } from "
|
|
2
|
+
import { MaybePromise, MaybePromise as MaybePromise$1, ReadonlyDeep, ReadonlyDeep as ReadonlyDeep$1, maybeCatch, maybeThen } from "@entwico/dash";
|
|
3
3
|
|
|
4
4
|
//#region src/routes-mapping.d.ts
|
|
5
5
|
type StoreRouteCustomHeader = {
|