@contello/store 4.5.0 → 4.5.1
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/fragments.d.ts +0 -2
- package/dist/fragments.d.ts.map +1 -1
- package/dist/fragments.js +1 -2
- package/dist/index.cjs +75 -57
- package/dist/index.d.cts +0 -22
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +0 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +75 -57
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/dist/fragments.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/fragments.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* resolved absolute paths to the `.gql` fragment files that store-backed
|
|
4
3
|
* codegen should include. combines media's primitives with store's own
|
|
@@ -6,5 +5,4 @@
|
|
|
6
5
|
* codegen `documents` config.
|
|
7
6
|
*/
|
|
8
7
|
export declare const fragments: string[];
|
|
9
|
-
//#endregion
|
|
10
8
|
//# sourceMappingURL=fragments.d.ts.map
|
package/dist/fragments.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fragments.d.ts","names":[],"sources":["../src/fragments.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"fragments.d.ts","names":[],"sources":["../src/fragments.ts"],"mappings":";;;;;;qBAYa"}
|
package/dist/fragments.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fileURLToPath } from "node:url";
|
|
2
2
|
import { fragments as fragments$1 } from "@contello/media/fragments";
|
|
3
|
-
|
|
3
|
+
// src/fragments.ts
|
|
4
4
|
const packageRoot = fileURLToPath(new URL("..", import.meta.url));
|
|
5
5
|
/**
|
|
6
6
|
* resolved absolute paths to the `.gql` fragment files that store-backed
|
|
@@ -13,7 +13,6 @@ const fragments = [
|
|
|
13
13
|
`${packageRoot}fragments/asset.gql`,
|
|
14
14
|
`${packageRoot}fragments/route.gql`
|
|
15
15
|
];
|
|
16
|
-
//#endregion
|
|
17
16
|
export { fragments };
|
|
18
17
|
|
|
19
18
|
//# sourceMappingURL=fragments.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -3,9 +3,10 @@ let _contello_client = require("@contello/client");
|
|
|
3
3
|
let _entwico_dash_async = require("@entwico/dash/async");
|
|
4
4
|
let _entwico_projected = require("@entwico/projected");
|
|
5
5
|
let _contello_opentelemetry = require("@contello/opentelemetry");
|
|
6
|
+
let node_async_hooks = require("node:async_hooks");
|
|
6
7
|
let _entwico_dash = require("@entwico/dash");
|
|
7
8
|
let lru_cache = require("lru-cache");
|
|
8
|
-
|
|
9
|
+
// src/generated/graphql.ts
|
|
9
10
|
const MediaAssetFragmentSchema = `fragment MediaAsset on ContelloAsset {
|
|
10
11
|
id
|
|
11
12
|
original {
|
|
@@ -218,11 +219,9 @@ const schema = {
|
|
|
218
219
|
},
|
|
219
220
|
models: { dummy: "DummyEntity" }
|
|
220
221
|
};
|
|
221
|
-
|
|
222
|
-
//#region src/telemetry.ts
|
|
222
|
+
// src/telemetry.ts
|
|
223
223
|
const { wrap } = (0, _contello_opentelemetry.createOperationTelemetry)("@contello/store");
|
|
224
|
-
|
|
225
|
-
//#region src/utils.ts
|
|
224
|
+
// src/utils.ts
|
|
226
225
|
/**
|
|
227
226
|
* default `cache.ttl` applied across all store kinds. eager stores (collections, singletons)
|
|
228
227
|
* use it as the interval for a periodic full refresh; lazy stores use it as the per-item
|
|
@@ -238,6 +237,22 @@ function resolveTtl(ttl) {
|
|
|
238
237
|
if (ttl === false || ttl <= 0) return void 0;
|
|
239
238
|
return ttl;
|
|
240
239
|
}
|
|
240
|
+
function createRefreshRetry() {
|
|
241
|
+
const controller = new AbortController();
|
|
242
|
+
return {
|
|
243
|
+
async run(fn) {
|
|
244
|
+
try {
|
|
245
|
+
await (0, _entwico_dash_async.retryWithBackoff)(fn, { signal: controller.signal });
|
|
246
|
+
return true;
|
|
247
|
+
} catch {
|
|
248
|
+
return false;
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
stop() {
|
|
252
|
+
controller.abort();
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
}
|
|
241
256
|
/**
|
|
242
257
|
* creates a coalescing refresh scheduler with exponential-backoff retry on failure.
|
|
243
258
|
*
|
|
@@ -246,11 +261,11 @@ function resolveTtl(ttl) {
|
|
|
246
261
|
* scheduleRefresh. once the in-flight refresh completes, at most one queued refresh
|
|
247
262
|
* starts, with that latest kind — collapsing any number of intermediate requests into one.
|
|
248
263
|
*
|
|
249
|
-
* on error, retries
|
|
264
|
+
* on error, retries with exponential backoff until `retry` is stopped. the projected value keeps serving
|
|
250
265
|
* the stale cached value throughout (SWR). the `onRefreshed` callback receives the kind that
|
|
251
266
|
* triggered the just-completed refresh.
|
|
252
267
|
*/
|
|
253
|
-
function createRefresher(fn, onRefreshed,
|
|
268
|
+
function createRefresher(fn, onRefreshed, retry) {
|
|
254
269
|
let refreshing = false;
|
|
255
270
|
let inFlightKind;
|
|
256
271
|
let pendingKind;
|
|
@@ -261,8 +276,8 @@ function createRefresher(fn, onRefreshed, onStart) {
|
|
|
261
276
|
}
|
|
262
277
|
refreshing = true;
|
|
263
278
|
inFlightKind = kind;
|
|
264
|
-
|
|
265
|
-
|
|
279
|
+
retry.run(fn).then((refreshed) => {
|
|
280
|
+
if (!refreshed) return;
|
|
266
281
|
const finished = inFlightKind;
|
|
267
282
|
refreshing = false;
|
|
268
283
|
inFlightKind = void 0;
|
|
@@ -289,17 +304,21 @@ function createRefreshChannel(onRefresh) {
|
|
|
289
304
|
};
|
|
290
305
|
}
|
|
291
306
|
function createTtlOrchestrator(options) {
|
|
307
|
+
const runInOwnContext = node_async_hooks.AsyncLocalStorage.snapshot();
|
|
292
308
|
let timer;
|
|
309
|
+
let cleared = false;
|
|
293
310
|
return {
|
|
294
311
|
mark() {
|
|
312
|
+
if (cleared) return;
|
|
295
313
|
if (timer !== void 0) {
|
|
296
314
|
clearTimeout(timer);
|
|
297
315
|
timer = void 0;
|
|
298
316
|
}
|
|
299
317
|
if (options.ttl === void 0) return;
|
|
300
|
-
timer = setTimeout(options.run, options.ttl);
|
|
318
|
+
timer = runInOwnContext(() => setTimeout(options.run, options.ttl));
|
|
301
319
|
},
|
|
302
320
|
clear() {
|
|
321
|
+
cleared = true;
|
|
303
322
|
if (timer === void 0) return;
|
|
304
323
|
clearTimeout(timer);
|
|
305
324
|
timer = void 0;
|
|
@@ -328,8 +347,7 @@ function createRefreshByTtlQueue() {
|
|
|
328
347
|
next();
|
|
329
348
|
} };
|
|
330
349
|
}
|
|
331
|
-
|
|
332
|
-
//#region src/write-buffer.ts
|
|
350
|
+
// src/write-buffer.ts
|
|
333
351
|
function createWriteBuffer() {
|
|
334
352
|
const parked = /* @__PURE__ */ new Map();
|
|
335
353
|
const awaited = /* @__PURE__ */ new Map();
|
|
@@ -374,8 +392,7 @@ function createWriteBuffer() {
|
|
|
374
392
|
}
|
|
375
393
|
};
|
|
376
394
|
}
|
|
377
|
-
|
|
378
|
-
//#region src/assets.ts
|
|
395
|
+
// src/assets.ts
|
|
379
396
|
function mapFile$1(raw) {
|
|
380
397
|
return {
|
|
381
398
|
uid: raw.uid,
|
|
@@ -401,6 +418,7 @@ function createAssetsCollection(options, client, updates$, refreshByTtl) {
|
|
|
401
418
|
eviction: opts.cache?.eviction ?? "refresh"
|
|
402
419
|
};
|
|
403
420
|
const channel = createRefreshChannel(opts.onRefresh);
|
|
421
|
+
const retry = createRefreshRetry();
|
|
404
422
|
const ttl = createTtlOrchestrator({
|
|
405
423
|
ttl: cache.ttl,
|
|
406
424
|
run: () => runFullRefresh("ttl")
|
|
@@ -444,7 +462,7 @@ function createAssetsCollection(options, client, updates$, refreshByTtl) {
|
|
|
444
462
|
});
|
|
445
463
|
}
|
|
446
464
|
function runFullRefresh(kind) {
|
|
447
|
-
refreshByTtl.enqueue(() =>
|
|
465
|
+
refreshByTtl.enqueue(() => retry.run(async () => {
|
|
448
466
|
emit((await projected.refresh()).keys().toArray(), kind);
|
|
449
467
|
ttl.mark();
|
|
450
468
|
}));
|
|
@@ -456,7 +474,7 @@ function createAssetsCollection(options, client, updates$, refreshByTtl) {
|
|
|
456
474
|
return;
|
|
457
475
|
}
|
|
458
476
|
const settled = writeBuffer.awaitingUpstream(refreshIds);
|
|
459
|
-
|
|
477
|
+
retry.run(async () => {
|
|
460
478
|
await projected.refresh(refreshIds);
|
|
461
479
|
emit(changedIds, "upstream-update");
|
|
462
480
|
}).finally(settled);
|
|
@@ -530,6 +548,7 @@ function createAssetsCollection(options, client, updates$, refreshByTtl) {
|
|
|
530
548
|
},
|
|
531
549
|
destroy() {
|
|
532
550
|
unsubUpdates();
|
|
551
|
+
retry.stop();
|
|
533
552
|
ttl.clear();
|
|
534
553
|
channel.complete();
|
|
535
554
|
}
|
|
@@ -551,8 +570,7 @@ function createAssetsSyncCollection(options, client, updates$, refreshByTtl) {
|
|
|
551
570
|
destroy
|
|
552
571
|
};
|
|
553
572
|
}
|
|
554
|
-
|
|
555
|
-
//#region src/dependency-collector.ts
|
|
573
|
+
// src/dependency-collector.ts
|
|
556
574
|
const EMPTY_KEYS = /* @__PURE__ */ new Set();
|
|
557
575
|
function createDependencyKey(target, id) {
|
|
558
576
|
return `${target}\0${id}`;
|
|
@@ -699,8 +717,7 @@ var DependencyCollector = class {
|
|
|
699
717
|
for (const key of this.forwardIndex.keys()) if (!keys.has(key)) this.clearItem(key);
|
|
700
718
|
}
|
|
701
719
|
};
|
|
702
|
-
|
|
703
|
-
//#region src/collection.ts
|
|
720
|
+
// src/collection.ts
|
|
704
721
|
function fetchCollection(source, client, ids) {
|
|
705
722
|
return (0, _entwico_dash_async.concatAsync)((0, _entwico_dash_async.mapAsync)(client.subscribe((0, _contello_client.createSourceSubscription)(source), { ids }), (r) => r.source));
|
|
706
723
|
}
|
|
@@ -730,6 +747,7 @@ function createCollection(source, options, client, updates$, resolver, refreshBy
|
|
|
730
747
|
};
|
|
731
748
|
const dependencyCollector = new DependencyCollector(_def.model, resolver);
|
|
732
749
|
const channel = createRefreshChannel(opts.onRefresh);
|
|
750
|
+
const retry = createRefreshRetry();
|
|
733
751
|
const ttl = createTtlOrchestrator({
|
|
734
752
|
ttl: _def.cache.ttl,
|
|
735
753
|
run: () => runFullRefresh("ttl")
|
|
@@ -775,7 +793,7 @@ function createCollection(source, options, client, updates$, resolver, refreshBy
|
|
|
775
793
|
});
|
|
776
794
|
}
|
|
777
795
|
function runFullRefresh(kind) {
|
|
778
|
-
refreshByTtl.enqueue(() =>
|
|
796
|
+
refreshByTtl.enqueue(() => retry.run(async () => {
|
|
779
797
|
emit((await projected.refresh()).keys().toArray(), kind);
|
|
780
798
|
ttl.mark();
|
|
781
799
|
}));
|
|
@@ -787,7 +805,7 @@ function createCollection(source, options, client, updates$, resolver, refreshBy
|
|
|
787
805
|
return;
|
|
788
806
|
}
|
|
789
807
|
const settled = writeBuffer.awaitingUpstream(refreshIds);
|
|
790
|
-
|
|
808
|
+
retry.run(async () => {
|
|
791
809
|
await projected.refresh(refreshIds);
|
|
792
810
|
emit(changedIds, "upstream-update");
|
|
793
811
|
}).finally(settled);
|
|
@@ -873,6 +891,7 @@ function createCollection(source, options, client, updates$, resolver, refreshBy
|
|
|
873
891
|
},
|
|
874
892
|
destroy() {
|
|
875
893
|
unsubUpdates();
|
|
894
|
+
retry.stop();
|
|
876
895
|
ttl.clear();
|
|
877
896
|
channel.complete();
|
|
878
897
|
}
|
|
@@ -897,8 +916,7 @@ function createCollectionSync(source, options, client, updates$, resolver, refre
|
|
|
897
916
|
destroy
|
|
898
917
|
};
|
|
899
918
|
}
|
|
900
|
-
|
|
901
|
-
//#region src/i18n.ts
|
|
919
|
+
// src/i18n.ts
|
|
902
920
|
function toGqlMessageInput(msg) {
|
|
903
921
|
return {
|
|
904
922
|
token: msg.token,
|
|
@@ -921,6 +939,7 @@ function toGqlMessageInput(msg) {
|
|
|
921
939
|
}
|
|
922
940
|
function createI18nMessagesCollection(def, client, updates$, refreshByTtl) {
|
|
923
941
|
const channel = createRefreshChannel(def.onRefresh);
|
|
942
|
+
const retry = createRefreshRetry();
|
|
924
943
|
const ttl = createTtlOrchestrator({
|
|
925
944
|
ttl: resolveTtl(def.cache?.ttl),
|
|
926
945
|
run: () => runTtlRefresh()
|
|
@@ -958,7 +977,7 @@ function createI18nMessagesCollection(def, client, updates$, refreshByTtl) {
|
|
|
958
977
|
}
|
|
959
978
|
function runTtlRefresh() {
|
|
960
979
|
refreshByTtl.enqueue(async () => {
|
|
961
|
-
|
|
980
|
+
if (!await retry.run(() => projected.refresh())) return;
|
|
962
981
|
emitWithCurrentIds("ttl");
|
|
963
982
|
ttl.mark();
|
|
964
983
|
});
|
|
@@ -966,7 +985,7 @@ function createI18nMessagesCollection(def, client, updates$, refreshByTtl) {
|
|
|
966
985
|
const scheduleRefresh = createRefresher(() => projected.refresh(), (kind) => {
|
|
967
986
|
emitWithCurrentIds(kind);
|
|
968
987
|
ttl.mark();
|
|
969
|
-
},
|
|
988
|
+
}, retry);
|
|
970
989
|
function runPartialRefresh(upsertedIds, deletedIds) {
|
|
971
990
|
const changedIds = [.../* @__PURE__ */ new Set([...upsertedIds, ...deletedIds])];
|
|
972
991
|
if (changedIds.length === 0) return;
|
|
@@ -974,7 +993,7 @@ function createI18nMessagesCollection(def, client, updates$, refreshByTtl) {
|
|
|
974
993
|
emit(changedIds, "upstream-update");
|
|
975
994
|
return;
|
|
976
995
|
}
|
|
977
|
-
|
|
996
|
+
retry.run(async () => {
|
|
978
997
|
await projected.refresh(upsertedIds);
|
|
979
998
|
emit(changedIds, "upstream-update");
|
|
980
999
|
});
|
|
@@ -1010,13 +1029,13 @@ function createI18nMessagesCollection(def, client, updates$, refreshByTtl) {
|
|
|
1010
1029
|
},
|
|
1011
1030
|
destroy() {
|
|
1012
1031
|
unsubUpdates();
|
|
1032
|
+
retry.stop();
|
|
1013
1033
|
ttl.clear();
|
|
1014
1034
|
channel.complete();
|
|
1015
1035
|
}
|
|
1016
1036
|
};
|
|
1017
1037
|
}
|
|
1018
|
-
|
|
1019
|
-
//#region src/lru.ts
|
|
1038
|
+
// src/lru.ts
|
|
1020
1039
|
function createLruCache(options) {
|
|
1021
1040
|
const { max, ttl, onEvict: dispose } = options;
|
|
1022
1041
|
const lru = new lru_cache.LRUCache({
|
|
@@ -1042,8 +1061,7 @@ function createLruCache(options) {
|
|
|
1042
1061
|
keys: () => lru.keys().toArray()
|
|
1043
1062
|
};
|
|
1044
1063
|
}
|
|
1045
|
-
|
|
1046
|
-
//#region src/lazy-assets.ts
|
|
1064
|
+
// src/lazy-assets.ts
|
|
1047
1065
|
function mapFile(raw) {
|
|
1048
1066
|
return {
|
|
1049
1067
|
uid: raw.uid,
|
|
@@ -1088,13 +1106,14 @@ function createLazyAssetsCollection(def, client, updates$) {
|
|
|
1088
1106
|
});
|
|
1089
1107
|
}
|
|
1090
1108
|
let lastRefreshKeys = [];
|
|
1109
|
+
const retry = createRefreshRetry();
|
|
1091
1110
|
const scheduleRefresh = createRefresher(async () => {
|
|
1092
1111
|
lastRefreshKeys = cache.keys();
|
|
1093
1112
|
if (lastRefreshKeys.length === 0) return;
|
|
1094
1113
|
await projected.refresh(lastRefreshKeys);
|
|
1095
1114
|
}, (kind) => {
|
|
1096
1115
|
if (lastRefreshKeys.length > 0) emit(lastRefreshKeys, kind);
|
|
1097
|
-
},
|
|
1116
|
+
}, retry);
|
|
1098
1117
|
const unsubUpdates = updates$.subscribe((batch) => {
|
|
1099
1118
|
if (batch.asset.length === 0) return;
|
|
1100
1119
|
for (const event of batch.asset) projected.delete(event.id);
|
|
@@ -1124,12 +1143,12 @@ function createLazyAssetsCollection(def, client, updates$) {
|
|
|
1124
1143
|
},
|
|
1125
1144
|
destroy() {
|
|
1126
1145
|
unsubUpdates();
|
|
1146
|
+
retry.stop();
|
|
1127
1147
|
channel.complete();
|
|
1128
1148
|
}
|
|
1129
1149
|
};
|
|
1130
1150
|
}
|
|
1131
|
-
|
|
1132
|
-
//#region src/lazy-collection.ts
|
|
1151
|
+
// src/lazy-collection.ts
|
|
1133
1152
|
function createLazyCollection(source, options, client, updates$, resolver) {
|
|
1134
1153
|
const opts = options ?? {};
|
|
1135
1154
|
const mapFn = opts.map ?? ((item) => item);
|
|
@@ -1164,6 +1183,7 @@ function createLazyCollection(source, options, client, updates$, resolver) {
|
|
|
1164
1183
|
refresh$.next(event);
|
|
1165
1184
|
opts.onRefresh?.(event);
|
|
1166
1185
|
}
|
|
1186
|
+
const retry = createRefreshRetry();
|
|
1167
1187
|
let lastRefreshKeys = [];
|
|
1168
1188
|
const scheduleRefresh = createRefresher(async () => {
|
|
1169
1189
|
lastRefreshKeys = cache.keys();
|
|
@@ -1171,7 +1191,7 @@ function createLazyCollection(source, options, client, updates$, resolver) {
|
|
|
1171
1191
|
await projected.refresh(lastRefreshKeys);
|
|
1172
1192
|
}, (kind) => {
|
|
1173
1193
|
if (lastRefreshKeys.length > 0) emit(lastRefreshKeys, kind);
|
|
1174
|
-
},
|
|
1194
|
+
}, retry);
|
|
1175
1195
|
const unsubUpdates = updates$.subscribe((batch) => {
|
|
1176
1196
|
const evicted = /* @__PURE__ */ new Set();
|
|
1177
1197
|
const ownModelEvents = batch.entity.get(_def.model);
|
|
@@ -1201,12 +1221,12 @@ function createLazyCollection(source, options, client, updates$, resolver) {
|
|
|
1201
1221
|
},
|
|
1202
1222
|
destroy() {
|
|
1203
1223
|
unsubUpdates();
|
|
1224
|
+
retry.stop();
|
|
1204
1225
|
refresh$.complete();
|
|
1205
1226
|
}
|
|
1206
1227
|
};
|
|
1207
1228
|
}
|
|
1208
|
-
|
|
1209
|
-
//#region src/route-path.ts
|
|
1229
|
+
// src/route-path.ts
|
|
1210
1230
|
const ESCAPES = /(?:%[\dA-Fa-f]{2})+/g;
|
|
1211
1231
|
const STAYS_ENCODED = /[/%?#\s\p{Cc}]/u;
|
|
1212
1232
|
function decodeRun(run) {
|
|
@@ -1229,8 +1249,7 @@ function decodeRun(run) {
|
|
|
1229
1249
|
function normalizeRoutePath(path) {
|
|
1230
1250
|
return path.replaceAll(ESCAPES, decodeRun).normalize("NFC");
|
|
1231
1251
|
}
|
|
1232
|
-
|
|
1233
|
-
//#region src/routes-mapping.ts
|
|
1252
|
+
// src/routes-mapping.ts
|
|
1234
1253
|
function mapRoute(raw, resolver) {
|
|
1235
1254
|
const base = {
|
|
1236
1255
|
id: raw.id,
|
|
@@ -1280,8 +1299,7 @@ function mapRoute(raw, resolver) {
|
|
|
1280
1299
|
default: return;
|
|
1281
1300
|
}
|
|
1282
1301
|
}
|
|
1283
|
-
|
|
1284
|
-
//#region src/lazy-routes.ts
|
|
1302
|
+
// src/lazy-routes.ts
|
|
1285
1303
|
const ID_PREFIX = "1\0";
|
|
1286
1304
|
const PATH_PREFIX = "2\0";
|
|
1287
1305
|
const CACHE_KEY = Symbol("cacheKey");
|
|
@@ -1391,13 +1409,14 @@ function createLazyRoutesCollection(def, client, updates$, resolver) {
|
|
|
1391
1409
|
});
|
|
1392
1410
|
}
|
|
1393
1411
|
let lastRefreshKeys = [];
|
|
1412
|
+
const retry = createRefreshRetry();
|
|
1394
1413
|
const scheduleRefresh = createRefresher(async () => {
|
|
1395
1414
|
lastRefreshKeys = cache.keys();
|
|
1396
1415
|
if (lastRefreshKeys.length === 0) return;
|
|
1397
1416
|
await projected.refresh(lastRefreshKeys);
|
|
1398
1417
|
}, (kind) => {
|
|
1399
1418
|
if (lastRefreshKeys.length > 0) emit(lastRefreshKeys.map((key) => key.slice(2)), kind);
|
|
1400
|
-
},
|
|
1419
|
+
}, retry);
|
|
1401
1420
|
const unsubUpdates = updates$.subscribe((batch) => {
|
|
1402
1421
|
const evicted = [];
|
|
1403
1422
|
for (const event of batch.route) {
|
|
@@ -1445,12 +1464,12 @@ function createLazyRoutesCollection(def, client, updates$, resolver) {
|
|
|
1445
1464
|
},
|
|
1446
1465
|
destroy() {
|
|
1447
1466
|
unsubUpdates();
|
|
1467
|
+
retry.stop();
|
|
1448
1468
|
channel.complete();
|
|
1449
1469
|
}
|
|
1450
1470
|
};
|
|
1451
1471
|
}
|
|
1452
|
-
|
|
1453
|
-
//#region src/model-resolver.ts
|
|
1472
|
+
// src/model-resolver.ts
|
|
1454
1473
|
var ModelResolver = class {
|
|
1455
1474
|
_typeNames;
|
|
1456
1475
|
_toModel;
|
|
@@ -1487,8 +1506,7 @@ var ModelResolver = class {
|
|
|
1487
1506
|
return this._toModel.get(typeName) ?? typeName;
|
|
1488
1507
|
}
|
|
1489
1508
|
};
|
|
1490
|
-
|
|
1491
|
-
//#region src/routes.ts
|
|
1509
|
+
// src/routes.ts
|
|
1492
1510
|
function createRoutesCollection(options, client, updates$, resolver, refreshByTtl) {
|
|
1493
1511
|
const opts = options ?? {};
|
|
1494
1512
|
const cache = {
|
|
@@ -1496,6 +1514,7 @@ function createRoutesCollection(options, client, updates$, resolver, refreshByTt
|
|
|
1496
1514
|
eviction: opts.cache?.eviction ?? "refresh"
|
|
1497
1515
|
};
|
|
1498
1516
|
const channel = createRefreshChannel(opts.onRefresh);
|
|
1517
|
+
const retry = createRefreshRetry();
|
|
1499
1518
|
const ttl = createTtlOrchestrator({
|
|
1500
1519
|
ttl: cache.ttl,
|
|
1501
1520
|
run: () => runFullRefresh("ttl")
|
|
@@ -1568,7 +1587,7 @@ function createRoutesCollection(options, client, updates$, resolver, refreshByTt
|
|
|
1568
1587
|
});
|
|
1569
1588
|
}
|
|
1570
1589
|
function runFullRefresh(kind) {
|
|
1571
|
-
refreshByTtl.enqueue(() =>
|
|
1590
|
+
refreshByTtl.enqueue(() => retry.run(async () => {
|
|
1572
1591
|
emit((await projected.refresh()).keys().toArray(), kind);
|
|
1573
1592
|
ttl.mark();
|
|
1574
1593
|
}));
|
|
@@ -1580,7 +1599,7 @@ function createRoutesCollection(options, client, updates$, resolver, refreshByTt
|
|
|
1580
1599
|
return;
|
|
1581
1600
|
}
|
|
1582
1601
|
const settled = writeBuffer.awaitingUpstream(refreshIds);
|
|
1583
|
-
|
|
1602
|
+
retry.run(async () => {
|
|
1584
1603
|
await projected.refresh(refreshIds);
|
|
1585
1604
|
emit(changedIds, "upstream-update");
|
|
1586
1605
|
}).finally(settled);
|
|
@@ -1693,6 +1712,7 @@ function createRoutesCollection(options, client, updates$, resolver, refreshByTt
|
|
|
1693
1712
|
},
|
|
1694
1713
|
destroy() {
|
|
1695
1714
|
unsubUpdates();
|
|
1715
|
+
retry.stop();
|
|
1696
1716
|
ttl.clear();
|
|
1697
1717
|
channel.complete();
|
|
1698
1718
|
}
|
|
@@ -1717,8 +1737,7 @@ function createRoutesSyncCollection(options, client, updates$, resolver, refresh
|
|
|
1717
1737
|
destroy
|
|
1718
1738
|
};
|
|
1719
1739
|
}
|
|
1720
|
-
|
|
1721
|
-
//#region src/singleton.ts
|
|
1740
|
+
// src/singleton.ts
|
|
1722
1741
|
function createSingleton(source, options, client, updates$, resolver, refreshByTtl) {
|
|
1723
1742
|
const opts = options ?? {};
|
|
1724
1743
|
const mapFn = opts.map ?? ((item) => item);
|
|
@@ -1733,6 +1752,7 @@ function createSingleton(source, options, client, updates$, resolver, refreshByT
|
|
|
1733
1752
|
const dependencyCollector = new DependencyCollector(_def.model, resolver);
|
|
1734
1753
|
const itemKey = `singleton:${_def.name}`;
|
|
1735
1754
|
const channel = createRefreshChannel(opts.onRefresh);
|
|
1755
|
+
const retry = createRefreshRetry();
|
|
1736
1756
|
const ttl = createTtlOrchestrator({
|
|
1737
1757
|
ttl: _def.cache.ttl,
|
|
1738
1758
|
run: () => runTtlRefresh()
|
|
@@ -1752,7 +1772,7 @@ function createSingleton(source, options, client, updates$, resolver, refreshByT
|
|
|
1752
1772
|
}
|
|
1753
1773
|
function runTtlRefresh() {
|
|
1754
1774
|
refreshByTtl.enqueue(async () => {
|
|
1755
|
-
|
|
1775
|
+
if (!await retry.run(() => projected.refresh())) return;
|
|
1756
1776
|
emit("ttl");
|
|
1757
1777
|
ttl.mark();
|
|
1758
1778
|
});
|
|
@@ -1760,7 +1780,7 @@ function createSingleton(source, options, client, updates$, resolver, refreshByT
|
|
|
1760
1780
|
const scheduleRefresh = createRefresher(() => projected.refresh(), (kind) => {
|
|
1761
1781
|
emit(kind);
|
|
1762
1782
|
ttl.mark();
|
|
1763
|
-
},
|
|
1783
|
+
}, retry);
|
|
1764
1784
|
const unsubUpdates = updates$.subscribe((batch) => {
|
|
1765
1785
|
if (!loaded) return;
|
|
1766
1786
|
const hasOwnModel = batch.entity.has(_def.model);
|
|
@@ -1789,6 +1809,7 @@ function createSingleton(source, options, client, updates$, resolver, refreshByT
|
|
|
1789
1809
|
},
|
|
1790
1810
|
destroy() {
|
|
1791
1811
|
unsubUpdates();
|
|
1812
|
+
retry.stop();
|
|
1792
1813
|
ttl.clear();
|
|
1793
1814
|
channel.complete();
|
|
1794
1815
|
}
|
|
@@ -1808,8 +1829,7 @@ function createSingletonSync(source, options, client, updates$, resolver, refres
|
|
|
1808
1829
|
destroy
|
|
1809
1830
|
};
|
|
1810
1831
|
}
|
|
1811
|
-
|
|
1812
|
-
//#region src/watcher.ts
|
|
1832
|
+
// src/watcher.ts
|
|
1813
1833
|
function addRouteByModel(map, entityType, event) {
|
|
1814
1834
|
let list = map.get(entityType);
|
|
1815
1835
|
if (!list) {
|
|
@@ -1954,8 +1974,7 @@ function createInternalWatcher(client, resolver) {
|
|
|
1954
1974
|
}
|
|
1955
1975
|
};
|
|
1956
1976
|
}
|
|
1957
|
-
|
|
1958
|
-
//#region src/store.ts
|
|
1977
|
+
// src/store.ts
|
|
1959
1978
|
var Store = class {
|
|
1960
1979
|
_client;
|
|
1961
1980
|
_resolver;
|
|
@@ -2073,7 +2092,6 @@ var Store = class {
|
|
|
2073
2092
|
function createStore(options) {
|
|
2074
2093
|
return new Store(options);
|
|
2075
2094
|
}
|
|
2076
|
-
//#endregion
|
|
2077
2095
|
exports.Store = Store;
|
|
2078
2096
|
exports.createStore = createStore;
|
|
2079
2097
|
exports.normalizeRoutePath = normalizeRoutePath;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ConnectionEvents, ContelloClient, DownloadResult, ProxyResult, Schema, SourceCardinality, SourceDef, UploadData, UploadMetadata, UploadOptions } from "@contello/client";
|
|
2
2
|
import { MaybePromise, ReadonlyDeep } from "@entwico/dash";
|
|
3
3
|
import "@entwico/dash/async";
|
|
4
|
-
//#region src/routes-mapping.d.ts
|
|
5
4
|
type StoreRouteCustomHeader = {
|
|
6
5
|
name: string;
|
|
7
6
|
value: string;
|
|
@@ -33,8 +32,6 @@ type StoreRoute = {
|
|
|
33
32
|
type: 'sitemap';
|
|
34
33
|
sitemapId: string;
|
|
35
34
|
});
|
|
36
|
-
//#endregion
|
|
37
|
-
//#region src/watcher.d.ts
|
|
38
35
|
type UpdateEvent<TEntityType extends string = string> = {
|
|
39
36
|
id: string;
|
|
40
37
|
mutation: 'create';
|
|
@@ -79,8 +76,6 @@ type UpdateBatch = {
|
|
|
79
76
|
/** route events grouped by target entity model (both after and before targets for updates) */
|
|
80
77
|
readonly routeByEntityModel: Map<string, UpdateEventFor<'route'>[]>;
|
|
81
78
|
};
|
|
82
|
-
//#endregion
|
|
83
|
-
//#region src/dependency-collector.d.ts
|
|
84
79
|
/**
|
|
85
80
|
* passed to `map()` so the mapper can declare which external entities this item depends on.
|
|
86
81
|
* calls are collected during mapping and indexed once the item key is known.
|
|
@@ -104,8 +99,6 @@ type MapperContext<TModels extends string = string> = {
|
|
|
104
99
|
trackAsset(id: string): void;
|
|
105
100
|
trackRoute(id: string): void;
|
|
106
101
|
};
|
|
107
|
-
//#endregion
|
|
108
|
-
//#region src/types.d.ts
|
|
109
102
|
/** Extracts the typed fragment result from a SourceDef. */
|
|
110
103
|
type ExtractSourceResult<S extends SourceDef<string, 'entity' | 'singleton'>> = NonNullable<S['__result']>;
|
|
111
104
|
/** Keys of `schema.sources` whose entries match the given cardinality. */
|
|
@@ -322,8 +315,6 @@ type LazyCollection<T> = {
|
|
|
322
315
|
refresh(): void;
|
|
323
316
|
clear(): void;
|
|
324
317
|
};
|
|
325
|
-
//#endregion
|
|
326
|
-
//#region src/lazy-assets.d.ts
|
|
327
318
|
type StoreFileMetadata = {
|
|
328
319
|
width: number;
|
|
329
320
|
height: number;
|
|
@@ -353,8 +344,6 @@ type LazyAssets = {
|
|
|
353
344
|
refresh(): void;
|
|
354
345
|
clear(): void;
|
|
355
346
|
};
|
|
356
|
-
//#endregion
|
|
357
|
-
//#region src/assets.d.ts
|
|
358
347
|
type AssetsOptions = {
|
|
359
348
|
cache?: CacheOptions | undefined;
|
|
360
349
|
onLoad?: ((ids: string[]) => void) | undefined;
|
|
@@ -389,8 +378,6 @@ type AssetsSync<TWrites = unknown> = {
|
|
|
389
378
|
proxyHls(path: string, signal?: AbortSignal | undefined): Promise<ProxyResult>;
|
|
390
379
|
refresh(): void;
|
|
391
380
|
} & CollectionWrites<StoreAsset, TWrites>;
|
|
392
|
-
//#endregion
|
|
393
|
-
//#region src/i18n.d.ts
|
|
394
381
|
type I18nTranslation = {
|
|
395
382
|
language: string;
|
|
396
383
|
value: string;
|
|
@@ -434,8 +421,6 @@ type I18nMessages = {
|
|
|
434
421
|
/** Completes refresh$ and detaches from the watcher — called by `Store.destroy()`. */
|
|
435
422
|
destroy(): void;
|
|
436
423
|
};
|
|
437
|
-
//#endregion
|
|
438
|
-
//#region src/lazy-routes.d.ts
|
|
439
424
|
type LazyRoutesOptions = {
|
|
440
425
|
cache?: LazyCacheOptions | undefined;
|
|
441
426
|
onRefresh?: ((event: RefreshEvent) => void) | undefined;
|
|
@@ -449,8 +434,6 @@ type LazyRoutes = {
|
|
|
449
434
|
refresh(): void;
|
|
450
435
|
clear(): void;
|
|
451
436
|
};
|
|
452
|
-
//#endregion
|
|
453
|
-
//#region src/routes.d.ts
|
|
454
437
|
type RoutesOptions = {
|
|
455
438
|
cache?: CacheOptions | undefined;
|
|
456
439
|
onLoad?: ((ids: string[]) => void) | undefined;
|
|
@@ -483,8 +466,6 @@ type RoutesSync<TWrites = unknown> = {
|
|
|
483
466
|
getByPath(paths: readonly string[]): ReadonlyArray<ReadonlyDeep<StoreRoute>>;
|
|
484
467
|
refresh(): void;
|
|
485
468
|
} & CollectionWrites<StoreRoute, TWrites>;
|
|
486
|
-
//#endregion
|
|
487
|
-
//#region src/store.d.ts
|
|
488
469
|
/** Project the model-reference-name union out of a Schema generic, falling back to `string`. */
|
|
489
470
|
type ModelsOf<TSchema> = TSchema extends {
|
|
490
471
|
models: infer M;
|
|
@@ -542,8 +523,6 @@ export declare class Store<TSchema extends Schema | undefined = undefined> {
|
|
|
542
523
|
defineI18nMessages(def: I18nMessageDef): I18nMessages;
|
|
543
524
|
}
|
|
544
525
|
export declare function createStore<TSchema extends Schema | undefined = undefined>(options: CreateStoreOptions<TSchema>): Store<TSchema>;
|
|
545
|
-
//#endregion
|
|
546
|
-
//#region src/route-path.d.ts
|
|
547
526
|
/**
|
|
548
527
|
* The one form a route path is stored and looked up in: percent escapes decoded and unicode
|
|
549
528
|
* composed (NFC), as core normalizes it. A request arrives percent-encoded (`/%C3%BCber-uns`),
|
|
@@ -551,6 +530,5 @@ export declare function createStore<TSchema extends Schema | undefined = undefin
|
|
|
551
530
|
* escape of a character a path cannot hold decoded stays encoded, with uppercase hex.
|
|
552
531
|
*/
|
|
553
532
|
export declare function normalizeRoutePath(path: string): string;
|
|
554
|
-
//#endregion
|
|
555
533
|
export type { Assets, AssetsOptions, AssetsSync, AssetsSyncOptions, BuiltInWrites, CacheOptions, Collection, CollectionOptions, CollectionSync, CollectionSyncOptions, CollectionWrites, CreateStoreOptions, DeleteOptions, ExtractSourceResult, ExtractSourceWrites, I18nInitialTranslation, I18nMessage, I18nMessageDef, I18nMessageRegistrationDefinition, I18nMessages, I18nTranslation, I18nVariableInput, LazyAssets, LazyAssetsOptions, LazyCacheOptions, LazyCollection, LazyCollectionOptions, LazyRoutes, LazyRoutesOptions, Loadable, MapperContext, ResolveSource, Routes, RoutesOptions, RoutesSync, RoutesSyncOptions, Singleton, SingletonOptions, SingletonSync, SingletonSyncOptions, SourceAt, SourceKeysOf, StoreAsset, StoreFile, StoreFileMetadata, StoreRoute, StoreRouteCustomHeader, SyncCacheOptions, UpdateBatch, UpdateEvent, UpdateEventFor, UpdateMutationType };
|
|
556
534
|
//# sourceMappingURL=index.d.cts.map
|
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","../src/route-path.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","../src/route-path.ts"],"mappings":";;;KAGY;EACV;EACA;;KAGU;EACV;EACA;EACA,eAAe;;EAEX;EAAkB;EAAkB;;EACpC;EAAc;EAAiB;;EAC/B;EAAe;EAAiB;EAAgB;EAA6C;;EAC7F;EAAgB;EAAe;EAAoB;;EACnD;EAAiB;;KCJX,YAAY;EAClB;EAAY;EAAoB;EAAiB,OAAO;;EACxD;EAAY;EAAoB;EAAiB,OAAO;EAAY,QAAQ;;EAC5E;EAAY;EAAoB;;EAChC;EAAY;EAA0C;;EACtD;EAAY;EAA0C;EAAuB;;EAC7E;EAAY;EAA0C;EAAkB,OAAO;;KAEzE,qBAAqB;KAErB,eAAe,UAAU,yBAAyB,QAAQ;EAAe,QAAQ;;KAEjF;WACD,QAAQ;WACR,OAAO;WACP,OAAO;WACP,aAAa;;WAEb,QAAQ,YAAY;;WAEpB,oBAAoB,YAAY;;;;;;;;;;;;;;;;KCd/B,cAAc;EACxB,MAAM;IAAO;IAAoB;;EACjC,YAAY,UAAU,SAAS;EAC/B,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