@sentio/runtime 2.62.0-rc.4 → 2.62.0-rc.5
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/lib/{chunk-6SI5TBIR.js → chunk-RPV67F56.js} +43 -13
- package/lib/{chunk-6SI5TBIR.js.map → chunk-RPV67F56.js.map} +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +1 -1
- package/lib/{processor-KRKdS8v-.d.ts → processor-HNY62jHs.d.ts} +1 -1
- package/lib/processor-runner.d.ts +0 -33
- package/lib/processor-runner.js +4162 -1422
- package/lib/processor-runner.js.map +1 -1
- package/lib/service-worker.js +1 -1
- package/lib/test-processor.test.d.ts +1 -1
- package/package.json +1 -3
- package/src/processor-runner.ts +185 -161
- package/src/service-manager.ts +2 -1
@@ -55590,8 +55590,8 @@ var PQueue = class extends import_index.default {
|
|
55590
55590
|
// src/provider.ts
|
55591
55591
|
var import_chain = __toESM(require_dist(), 1);
|
55592
55592
|
|
55593
|
-
// ../../node_modules/.pnpm/lru-cache@11.
|
55594
|
-
var
|
55593
|
+
// ../../node_modules/.pnpm/lru-cache@11.2.1/node_modules/lru-cache/dist/esm/index.js
|
55594
|
+
var defaultPerf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
|
55595
55595
|
var warned = /* @__PURE__ */ new Set();
|
55596
55596
|
var PROCESS = typeof process === "object" && !!process ? process : {};
|
55597
55597
|
var emitWarning = (msg, type, code, fn) => {
|
@@ -55676,9 +55676,17 @@ var LRUCache = class _LRUCache {
|
|
55676
55676
|
#max;
|
55677
55677
|
#maxSize;
|
55678
55678
|
#dispose;
|
55679
|
+
#onInsert;
|
55679
55680
|
#disposeAfter;
|
55680
55681
|
#fetchMethod;
|
55681
55682
|
#memoMethod;
|
55683
|
+
#perf;
|
55684
|
+
/**
|
55685
|
+
* {@link LRUCache.OptionsBase.perf}
|
55686
|
+
*/
|
55687
|
+
get perf() {
|
55688
|
+
return this.#perf;
|
55689
|
+
}
|
55682
55690
|
/**
|
55683
55691
|
* {@link LRUCache.OptionsBase.ttl}
|
55684
55692
|
*/
|
@@ -55757,6 +55765,7 @@ var LRUCache = class _LRUCache {
|
|
55757
55765
|
#hasDispose;
|
55758
55766
|
#hasFetchMethod;
|
55759
55767
|
#hasDisposeAfter;
|
55768
|
+
#hasOnInsert;
|
55760
55769
|
/**
|
55761
55770
|
* Do not call this method unless you need to inspect the
|
55762
55771
|
* inner workings of the cache. If anything returned by this
|
@@ -55833,6 +55842,12 @@ var LRUCache = class _LRUCache {
|
|
55833
55842
|
get dispose() {
|
55834
55843
|
return this.#dispose;
|
55835
55844
|
}
|
55845
|
+
/**
|
55846
|
+
* {@link LRUCache.OptionsBase.onInsert} (read-only)
|
55847
|
+
*/
|
55848
|
+
get onInsert() {
|
55849
|
+
return this.#onInsert;
|
55850
|
+
}
|
55836
55851
|
/**
|
55837
55852
|
* {@link LRUCache.OptionsBase.disposeAfter} (read-only)
|
55838
55853
|
*/
|
@@ -55840,7 +55855,13 @@ var LRUCache = class _LRUCache {
|
|
55840
55855
|
return this.#disposeAfter;
|
55841
55856
|
}
|
55842
55857
|
constructor(options) {
|
55843
|
-
const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, memoMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort } = options;
|
55858
|
+
const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, onInsert, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, memoMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort, perf } = options;
|
55859
|
+
if (perf !== void 0) {
|
55860
|
+
if (typeof perf?.now !== "function") {
|
55861
|
+
throw new TypeError("perf option must have a now() method if specified");
|
55862
|
+
}
|
55863
|
+
}
|
55864
|
+
this.#perf = perf ?? defaultPerf;
|
55844
55865
|
if (max !== 0 && !isPosInt(max)) {
|
55845
55866
|
throw new TypeError("max option must be a nonnegative integer");
|
55846
55867
|
}
|
@@ -55882,6 +55903,9 @@ var LRUCache = class _LRUCache {
|
|
55882
55903
|
if (typeof dispose === "function") {
|
55883
55904
|
this.#dispose = dispose;
|
55884
55905
|
}
|
55906
|
+
if (typeof onInsert === "function") {
|
55907
|
+
this.#onInsert = onInsert;
|
55908
|
+
}
|
55885
55909
|
if (typeof disposeAfter === "function") {
|
55886
55910
|
this.#disposeAfter = disposeAfter;
|
55887
55911
|
this.#disposed = [];
|
@@ -55890,6 +55914,7 @@ var LRUCache = class _LRUCache {
|
|
55890
55914
|
this.#disposed = void 0;
|
55891
55915
|
}
|
55892
55916
|
this.#hasDispose = !!this.#dispose;
|
55917
|
+
this.#hasOnInsert = !!this.#onInsert;
|
55893
55918
|
this.#hasDisposeAfter = !!this.#disposeAfter;
|
55894
55919
|
this.noDisposeOnSet = !!noDisposeOnSet;
|
55895
55920
|
this.noUpdateTTL = !!noUpdateTTL;
|
@@ -55945,7 +55970,7 @@ var LRUCache = class _LRUCache {
|
|
55945
55970
|
const starts = new ZeroArray(this.#max);
|
55946
55971
|
this.#ttls = ttls;
|
55947
55972
|
this.#starts = starts;
|
55948
|
-
this.#setItemTTL = (index, ttl, start = perf.now()) => {
|
55973
|
+
this.#setItemTTL = (index, ttl, start = this.#perf.now()) => {
|
55949
55974
|
starts[index] = ttl !== 0 ? start : 0;
|
55950
55975
|
ttls[index] = ttl;
|
55951
55976
|
if (ttl !== 0 && this.ttlAutopurge) {
|
@@ -55960,7 +55985,7 @@ var LRUCache = class _LRUCache {
|
|
55960
55985
|
}
|
55961
55986
|
};
|
55962
55987
|
this.#updateItemAge = (index) => {
|
55963
|
-
starts[index] = ttls[index] !== 0 ? perf.now() : 0;
|
55988
|
+
starts[index] = ttls[index] !== 0 ? this.#perf.now() : 0;
|
55964
55989
|
};
|
55965
55990
|
this.#statusTTL = (status, index) => {
|
55966
55991
|
if (ttls[index]) {
|
@@ -55977,7 +56002,7 @@ var LRUCache = class _LRUCache {
|
|
55977
56002
|
};
|
55978
56003
|
let cachedNow = 0;
|
55979
56004
|
const getNow = () => {
|
55980
|
-
const n2 = perf.now();
|
56005
|
+
const n2 = this.#perf.now();
|
55981
56006
|
if (this.ttlResolution > 0) {
|
55982
56007
|
cachedNow = n2;
|
55983
56008
|
const t = setTimeout(() => cachedNow = 0, this.ttlResolution);
|
@@ -56280,7 +56305,7 @@ var LRUCache = class _LRUCache {
|
|
56280
56305
|
const ttl = this.#ttls[i];
|
56281
56306
|
const start = this.#starts[i];
|
56282
56307
|
if (ttl && start) {
|
56283
|
-
const remain = ttl - (perf.now() - start);
|
56308
|
+
const remain = ttl - (this.#perf.now() - start);
|
56284
56309
|
entry.ttl = remain;
|
56285
56310
|
entry.start = Date.now();
|
56286
56311
|
}
|
@@ -56292,7 +56317,7 @@ var LRUCache = class _LRUCache {
|
|
56292
56317
|
}
|
56293
56318
|
/**
|
56294
56319
|
* Return an array of [key, {@link LRUCache.Entry}] tuples which can be
|
56295
|
-
* passed to {@link
|
56320
|
+
* passed to {@link LRUCache#load}.
|
56296
56321
|
*
|
56297
56322
|
* The `start` fields are calculated relative to a portable `Date.now()`
|
56298
56323
|
* timestamp, even if `performance.now()` is available.
|
@@ -56314,7 +56339,7 @@ var LRUCache = class _LRUCache {
|
|
56314
56339
|
const entry = { value };
|
56315
56340
|
if (this.#ttls && this.#starts) {
|
56316
56341
|
entry.ttl = this.#ttls[i];
|
56317
|
-
const age = perf.now() - this.#starts[i];
|
56342
|
+
const age = this.#perf.now() - this.#starts[i];
|
56318
56343
|
entry.start = Math.floor(Date.now() - age);
|
56319
56344
|
}
|
56320
56345
|
if (this.#sizes) {
|
@@ -56338,7 +56363,7 @@ var LRUCache = class _LRUCache {
|
|
56338
56363
|
for (const [key, entry] of arr) {
|
56339
56364
|
if (entry.start) {
|
56340
56365
|
const age = Date.now() - entry.start;
|
56341
|
-
entry.start = perf.now() - age;
|
56366
|
+
entry.start = this.#perf.now() - age;
|
56342
56367
|
}
|
56343
56368
|
this.set(key, entry.value, entry);
|
56344
56369
|
}
|
@@ -56403,6 +56428,9 @@ var LRUCache = class _LRUCache {
|
|
56403
56428
|
if (status)
|
56404
56429
|
status.set = "add";
|
56405
56430
|
noUpdateTTL = false;
|
56431
|
+
if (this.#hasOnInsert) {
|
56432
|
+
this.#onInsert?.(v, k, "add");
|
56433
|
+
}
|
56406
56434
|
} else {
|
56407
56435
|
this.#moveToTail(index);
|
56408
56436
|
const oldVal = this.#valList[index];
|
@@ -56438,6 +56466,9 @@ var LRUCache = class _LRUCache {
|
|
56438
56466
|
} else if (status) {
|
56439
56467
|
status.set = "update";
|
56440
56468
|
}
|
56469
|
+
if (this.#hasOnInsert) {
|
56470
|
+
this.onInsert?.(v, k, v === oldVal ? "update" : "replace");
|
56471
|
+
}
|
56441
56472
|
}
|
56442
56473
|
if (ttl !== 0 && !this.#ttls) {
|
56443
56474
|
this.#initializeTTLTracking();
|
@@ -56607,7 +56638,7 @@ var LRUCache = class _LRUCache {
|
|
56607
56638
|
const bf2 = p;
|
56608
56639
|
if (this.#valList[index] === p) {
|
56609
56640
|
if (v2 === void 0) {
|
56610
|
-
if (bf2.__staleWhileFetching) {
|
56641
|
+
if (bf2.__staleWhileFetching !== void 0) {
|
56611
56642
|
this.#valList[index] = bf2.__staleWhileFetching;
|
56612
56643
|
} else {
|
56613
56644
|
this.#delete(k, "fetch");
|
@@ -59642,7 +59673,6 @@ export {
|
|
59642
59673
|
Endpoints,
|
59643
59674
|
configureEndpoints,
|
59644
59675
|
require_lib2,
|
59645
|
-
require_lodash,
|
59646
59676
|
require_src3 as require_src,
|
59647
59677
|
es_exports2 as es_exports,
|
59648
59678
|
init_es2 as init_es,
|
@@ -59750,4 +59780,4 @@ long/umd/index.js:
|
|
59750
59780
|
@noble/curves/esm/secp256k1.js:
|
59751
59781
|
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
59752
59782
|
*/
|
59753
|
-
//# sourceMappingURL=chunk-
|
59783
|
+
//# sourceMappingURL=chunk-RPV67F56.js.map
|