@midscene/cli 1.8.9 → 1.8.10-beta-20260604215059.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/es/index.mjs +1115 -783
- package/dist/es/index.mjs.map +1 -1
- package/dist/lib/index.js +1115 -783
- package/dist/lib/index.js.map +1 -1
- package/package.json +7 -7
package/dist/lib/index.js
CHANGED
|
@@ -3374,9 +3374,7 @@ defineYamlBatchTest(${JSON.stringify(testOptions, null, 2)});
|
|
|
3374
3374
|
const cli_namespaceObject = require("@midscene/shared/cli");
|
|
3375
3375
|
var main = __webpack_require__("../../node_modules/.pnpm/dotenv@16.4.5/node_modules/dotenv/lib/main.js");
|
|
3376
3376
|
var main_default = /*#__PURE__*/ __webpack_require__.n(main);
|
|
3377
|
-
var package_namespaceObject = {
|
|
3378
|
-
rE: "1.8.9"
|
|
3379
|
-
};
|
|
3377
|
+
var package_namespaceObject = JSON.parse('{"rE":"1.8.10-beta-20260604215059.0"}');
|
|
3380
3378
|
var logger_ = __webpack_require__("@midscene/shared/logger");
|
|
3381
3379
|
var brace_expansion = __webpack_require__("../../node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js");
|
|
3382
3380
|
const MAX_PATTERN_LENGTH = 65536;
|
|
@@ -4513,85 +4511,47 @@ defineYamlBatchTest(${JSON.stringify(testOptions, null, 2)});
|
|
|
4513
4511
|
minimatch.escape = escape_escape;
|
|
4514
4512
|
minimatch.unescape = unescape_unescape;
|
|
4515
4513
|
var external_node_url_ = __webpack_require__("node:url");
|
|
4516
|
-
const
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
AS = class {
|
|
4526
|
-
onabort;
|
|
4527
|
-
_onabort = [];
|
|
4528
|
-
reason;
|
|
4529
|
-
aborted = false;
|
|
4530
|
-
addEventListener(_, fn) {
|
|
4531
|
-
this._onabort.push(fn);
|
|
4532
|
-
}
|
|
4533
|
-
};
|
|
4534
|
-
AC = class {
|
|
4535
|
-
constructor(){
|
|
4536
|
-
warnACPolyfill();
|
|
4537
|
-
}
|
|
4538
|
-
signal = new AS();
|
|
4539
|
-
abort(reason) {
|
|
4540
|
-
if (this.signal.aborted) return;
|
|
4541
|
-
this.signal.reason = reason;
|
|
4542
|
-
this.signal.aborted = true;
|
|
4543
|
-
for (const fn of this.signal._onabort)fn(reason);
|
|
4544
|
-
this.signal.onabort?.(reason);
|
|
4545
|
-
}
|
|
4546
|
-
};
|
|
4547
|
-
let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== '1';
|
|
4548
|
-
const warnACPolyfill = ()=>{
|
|
4549
|
-
if (!printACPolyfillWarning) return;
|
|
4550
|
-
printACPolyfillWarning = false;
|
|
4551
|
-
emitWarning("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", 'NO_ABORT_CONTROLLER', 'ENOTSUP', warnACPolyfill);
|
|
4552
|
-
};
|
|
4553
|
-
}
|
|
4554
|
-
const shouldWarn = (code)=>!warned.has(code);
|
|
4555
|
-
Symbol('type');
|
|
4556
|
-
const isPosInt = (n)=>n && n === Math.floor(n) && n > 0 && isFinite(n);
|
|
4557
|
-
const getUintArray = (max)=>isPosInt(max) ? max <= Math.pow(2, 8) ? Uint8Array : max <= Math.pow(2, 16) ? Uint16Array : max <= Math.pow(2, 32) ? Uint32Array : max <= Number.MAX_SAFE_INTEGER ? ZeroArray : null : null;
|
|
4558
|
-
class ZeroArray extends Array {
|
|
4559
|
-
constructor(size){
|
|
4560
|
-
super(size);
|
|
4561
|
-
this.fill(0);
|
|
4562
|
-
}
|
|
4563
|
-
}
|
|
4564
|
-
class Stack {
|
|
4514
|
+
const external_node_diagnostics_channel_namespaceObject = require("node:diagnostics_channel");
|
|
4515
|
+
var S = (0, external_node_diagnostics_channel_namespaceObject.channel)("lru-cache:metrics"), W = (0, external_node_diagnostics_channel_namespaceObject.tracingChannel)("lru-cache");
|
|
4516
|
+
var D = ()=>S.hasSubscribers || W.hasSubscribers, G = "object" == typeof performance && performance && "function" == typeof performance.now ? performance : Date, M = new Set, C = "object" == typeof process && process ? process : {}, P = (u, e1, t1, i)=>{
|
|
4517
|
+
"function" == typeof C.emitWarning ? C.emitWarning(u, e1, t1, i) : console.error(`[${t1}] ${e1}: ${u}`);
|
|
4518
|
+
}, H = (u)=>!M.has(u), F = (Symbol("type"), (u)=>!!u && u === Math.floor(u) && u > 0 && isFinite(u)), U = (u)=>F(u) ? u <= Math.pow(2, 8) ? Uint8Array : u <= Math.pow(2, 16) ? Uint16Array : u <= Math.pow(2, 32) ? Uint32Array : u <= Number.MAX_SAFE_INTEGER ? O : null : null, O = class extends Array {
|
|
4519
|
+
constructor(e1){
|
|
4520
|
+
super(e1), this.fill(0);
|
|
4521
|
+
}
|
|
4522
|
+
}, R = class u {
|
|
4565
4523
|
heap;
|
|
4566
4524
|
length;
|
|
4567
|
-
static #
|
|
4568
|
-
static create(
|
|
4569
|
-
|
|
4570
|
-
if (!
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
push(n) {
|
|
4582
|
-
this.heap[this.length++] = n;
|
|
4525
|
+
static #o = !1;
|
|
4526
|
+
static create(e1) {
|
|
4527
|
+
let t1 = U(e1);
|
|
4528
|
+
if (!t1) return [];
|
|
4529
|
+
u.#o = !0;
|
|
4530
|
+
let i = new u(e1, t1);
|
|
4531
|
+
return u.#o = !1, i;
|
|
4532
|
+
}
|
|
4533
|
+
constructor(e1, t1){
|
|
4534
|
+
if (!u.#o) throw new TypeError("instantiate Stack using Stack.create(n)");
|
|
4535
|
+
this.heap = new t1(e1), this.length = 0;
|
|
4536
|
+
}
|
|
4537
|
+
push(e1) {
|
|
4538
|
+
this.heap[this.length++] = e1;
|
|
4583
4539
|
}
|
|
4584
4540
|
pop() {
|
|
4585
4541
|
return this.heap[--this.length];
|
|
4586
4542
|
}
|
|
4587
|
-
}
|
|
4588
|
-
|
|
4589
|
-
#
|
|
4590
|
-
#
|
|
4591
|
-
#
|
|
4592
|
-
#
|
|
4593
|
-
#
|
|
4594
|
-
#
|
|
4543
|
+
}, L = class u {
|
|
4544
|
+
#o;
|
|
4545
|
+
#u;
|
|
4546
|
+
#w;
|
|
4547
|
+
#D;
|
|
4548
|
+
#S;
|
|
4549
|
+
#M;
|
|
4550
|
+
#U;
|
|
4551
|
+
#m;
|
|
4552
|
+
get perf() {
|
|
4553
|
+
return this.#m;
|
|
4554
|
+
}
|
|
4595
4555
|
ttl;
|
|
4596
4556
|
ttlResolution;
|
|
4597
4557
|
ttlAutopurge;
|
|
@@ -4607,823 +4567,613 @@ defineYamlBatchTest(${JSON.stringify(testOptions, null, 2)});
|
|
|
4607
4567
|
allowStaleOnFetchAbort;
|
|
4608
4568
|
allowStaleOnFetchRejection;
|
|
4609
4569
|
ignoreFetchAbort;
|
|
4610
|
-
#
|
|
4611
|
-
#
|
|
4612
|
-
#
|
|
4613
|
-
#
|
|
4614
|
-
#
|
|
4615
|
-
#
|
|
4616
|
-
#
|
|
4617
|
-
#
|
|
4618
|
-
#
|
|
4619
|
-
#
|
|
4620
|
-
#
|
|
4621
|
-
#
|
|
4622
|
-
#
|
|
4623
|
-
#
|
|
4624
|
-
#
|
|
4625
|
-
#
|
|
4626
|
-
#
|
|
4627
|
-
|
|
4570
|
+
#n;
|
|
4571
|
+
#b;
|
|
4572
|
+
#s;
|
|
4573
|
+
#i;
|
|
4574
|
+
#t;
|
|
4575
|
+
#a;
|
|
4576
|
+
#c;
|
|
4577
|
+
#l;
|
|
4578
|
+
#h;
|
|
4579
|
+
#y;
|
|
4580
|
+
#r;
|
|
4581
|
+
#_;
|
|
4582
|
+
#F;
|
|
4583
|
+
#d;
|
|
4584
|
+
#g;
|
|
4585
|
+
#T;
|
|
4586
|
+
#W;
|
|
4587
|
+
#f;
|
|
4588
|
+
#j;
|
|
4589
|
+
static unsafeExposeInternals(e1) {
|
|
4628
4590
|
return {
|
|
4629
|
-
starts:
|
|
4630
|
-
ttls:
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4591
|
+
starts: e1.#F,
|
|
4592
|
+
ttls: e1.#d,
|
|
4593
|
+
autopurgeTimers: e1.#g,
|
|
4594
|
+
sizes: e1.#_,
|
|
4595
|
+
keyMap: e1.#s,
|
|
4596
|
+
keyList: e1.#i,
|
|
4597
|
+
valList: e1.#t,
|
|
4598
|
+
next: e1.#a,
|
|
4599
|
+
prev: e1.#c,
|
|
4637
4600
|
get head () {
|
|
4638
|
-
return
|
|
4601
|
+
return e1.#l;
|
|
4639
4602
|
},
|
|
4640
4603
|
get tail () {
|
|
4641
|
-
return
|
|
4604
|
+
return e1.#h;
|
|
4642
4605
|
},
|
|
4643
|
-
free:
|
|
4644
|
-
isBackgroundFetch: (
|
|
4645
|
-
backgroundFetch: (
|
|
4646
|
-
moveToTail: (
|
|
4647
|
-
indexes: (
|
|
4648
|
-
rindexes: (
|
|
4649
|
-
isStale: (
|
|
4606
|
+
free: e1.#y,
|
|
4607
|
+
isBackgroundFetch: (t1)=>e1.#e(t1),
|
|
4608
|
+
backgroundFetch: (t1, i, s, n)=>e1.#P(t1, i, s, n),
|
|
4609
|
+
moveToTail: (t1)=>e1.#L(t1),
|
|
4610
|
+
indexes: (t1)=>e1.#A(t1),
|
|
4611
|
+
rindexes: (t1)=>e1.#z(t1),
|
|
4612
|
+
isStale: (t1)=>e1.#p(t1)
|
|
4650
4613
|
};
|
|
4651
4614
|
}
|
|
4652
4615
|
get max() {
|
|
4653
|
-
return this.#
|
|
4616
|
+
return this.#o;
|
|
4654
4617
|
}
|
|
4655
4618
|
get maxSize() {
|
|
4656
|
-
return this.#
|
|
4619
|
+
return this.#u;
|
|
4657
4620
|
}
|
|
4658
4621
|
get calculatedSize() {
|
|
4659
|
-
return this.#
|
|
4622
|
+
return this.#b;
|
|
4660
4623
|
}
|
|
4661
4624
|
get size() {
|
|
4662
|
-
return this.#
|
|
4625
|
+
return this.#n;
|
|
4663
4626
|
}
|
|
4664
4627
|
get fetchMethod() {
|
|
4665
|
-
return this.#
|
|
4628
|
+
return this.#M;
|
|
4666
4629
|
}
|
|
4667
4630
|
get memoMethod() {
|
|
4668
|
-
return this.#
|
|
4631
|
+
return this.#U;
|
|
4669
4632
|
}
|
|
4670
4633
|
get dispose() {
|
|
4671
|
-
return this.#
|
|
4634
|
+
return this.#w;
|
|
4672
4635
|
}
|
|
4673
|
-
get
|
|
4674
|
-
return this.#
|
|
4636
|
+
get onInsert() {
|
|
4637
|
+
return this.#D;
|
|
4675
4638
|
}
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
this.#
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
if (this.sizeCalculation) {
|
|
4686
|
-
if (!this.#
|
|
4687
|
-
if (
|
|
4688
|
-
}
|
|
4689
|
-
if (void 0 !==
|
|
4690
|
-
this.#
|
|
4691
|
-
if (
|
|
4692
|
-
|
|
4693
|
-
this.#
|
|
4694
|
-
|
|
4695
|
-
this.#
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
this
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
if (
|
|
4705
|
-
if (
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
}
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
this
|
|
4715
|
-
this
|
|
4716
|
-
this.
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
this
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
}
|
|
4724
|
-
if (!isPosInt(this.maxEntrySize)) throw new TypeError('maxEntrySize must be a positive integer if specified');
|
|
4725
|
-
this.#initializeSizeTracking();
|
|
4726
|
-
}
|
|
4727
|
-
this.allowStale = !!allowStale;
|
|
4728
|
-
this.noDeleteOnStaleGet = !!noDeleteOnStaleGet;
|
|
4729
|
-
this.updateAgeOnGet = !!updateAgeOnGet;
|
|
4730
|
-
this.updateAgeOnHas = !!updateAgeOnHas;
|
|
4731
|
-
this.ttlResolution = isPosInt(ttlResolution) || 0 === ttlResolution ? ttlResolution : 1;
|
|
4732
|
-
this.ttlAutopurge = !!ttlAutopurge;
|
|
4733
|
-
this.ttl = ttl || 0;
|
|
4734
|
-
if (this.ttl) {
|
|
4735
|
-
if (!isPosInt(this.ttl)) throw new TypeError('ttl must be a positive integer if specified');
|
|
4736
|
-
this.#initializeTTLTracking();
|
|
4737
|
-
}
|
|
4738
|
-
if (0 === this.#max && 0 === this.ttl && 0 === this.#maxSize) throw new TypeError('At least one of max, maxSize, or ttl is required');
|
|
4739
|
-
if (!this.ttlAutopurge && !this.#max && !this.#maxSize) {
|
|
4740
|
-
const code = 'LRU_CACHE_UNBOUNDED';
|
|
4741
|
-
if (shouldWarn(code)) {
|
|
4742
|
-
warned.add(code);
|
|
4743
|
-
const msg = "TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.";
|
|
4744
|
-
emitWarning(msg, 'UnboundedCacheWarning', code, LRUCache);
|
|
4745
|
-
}
|
|
4746
|
-
}
|
|
4747
|
-
}
|
|
4748
|
-
getRemainingTTL(key) {
|
|
4749
|
-
return this.#keyMap.has(key) ? 1 / 0 : 0;
|
|
4750
|
-
}
|
|
4751
|
-
#initializeTTLTracking() {
|
|
4752
|
-
const ttls = new ZeroArray(this.#max);
|
|
4753
|
-
const starts = new ZeroArray(this.#max);
|
|
4754
|
-
this.#ttls = ttls;
|
|
4755
|
-
this.#starts = starts;
|
|
4756
|
-
this.#setItemTTL = (index, ttl, start = perf.now())=>{
|
|
4757
|
-
starts[index] = 0 !== ttl ? start : 0;
|
|
4758
|
-
ttls[index] = ttl;
|
|
4759
|
-
if (0 !== ttl && this.ttlAutopurge) {
|
|
4760
|
-
const t1 = setTimeout(()=>{
|
|
4761
|
-
if (this.#isStale(index)) this.#delete(this.#keyList[index], 'expire');
|
|
4762
|
-
}, ttl + 1);
|
|
4763
|
-
if (t1.unref) t1.unref();
|
|
4764
|
-
}
|
|
4765
|
-
};
|
|
4766
|
-
this.#updateItemAge = (index)=>{
|
|
4767
|
-
starts[index] = 0 !== ttls[index] ? perf.now() : 0;
|
|
4639
|
+
get disposeAfter() {
|
|
4640
|
+
return this.#S;
|
|
4641
|
+
}
|
|
4642
|
+
constructor(e1){
|
|
4643
|
+
let { max: t1 = 0, ttl: i, ttlResolution: s = 1, ttlAutopurge: n, updateAgeOnGet: o, updateAgeOnHas: r, allowStale: h, dispose: l, onInsert: c, disposeAfter: f, noDisposeOnSet: g, noUpdateTTL: p, maxSize: T = 0, maxEntrySize: w = 0, sizeCalculation: y, fetchMethod: a, memoMethod: m, noDeleteOnFetchRejection: _, noDeleteOnStaleGet: b, allowStaleOnFetchRejection: d, allowStaleOnFetchAbort: A, ignoreFetchAbort: z, perf: x } = e1;
|
|
4644
|
+
if (void 0 !== x && "function" != typeof x?.now) throw new TypeError("perf option must have a now() method if specified");
|
|
4645
|
+
if (this.#m = x ?? G, 0 !== t1 && !F(t1)) throw new TypeError("max option must be a nonnegative integer");
|
|
4646
|
+
let v = t1 ? U(t1) : Array;
|
|
4647
|
+
if (!v) throw new Error("invalid max value: " + t1);
|
|
4648
|
+
if (this.#o = t1, this.#u = T, this.maxEntrySize = w || this.#u, this.sizeCalculation = y, this.sizeCalculation) {
|
|
4649
|
+
if (!this.#u && !this.maxEntrySize) throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
|
|
4650
|
+
if ("function" != typeof this.sizeCalculation) throw new TypeError("sizeCalculation set to non-function");
|
|
4651
|
+
}
|
|
4652
|
+
if (void 0 !== m && "function" != typeof m) throw new TypeError("memoMethod must be a function if defined");
|
|
4653
|
+
if (this.#U = m, void 0 !== a && "function" != typeof a) throw new TypeError("fetchMethod must be a function if specified");
|
|
4654
|
+
if (this.#M = a, this.#W = !!a, this.#s = new Map, this.#i = Array.from({
|
|
4655
|
+
length: t1
|
|
4656
|
+
}).fill(void 0), this.#t = Array.from({
|
|
4657
|
+
length: t1
|
|
4658
|
+
}).fill(void 0), this.#a = new v(t1), this.#c = new v(t1), this.#l = 0, this.#h = 0, this.#y = R.create(t1), this.#n = 0, this.#b = 0, "function" == typeof l && (this.#w = l), "function" == typeof c && (this.#D = c), "function" == typeof f ? (this.#S = f, this.#r = []) : (this.#S = void 0, this.#r = void 0), this.#T = !!this.#w, this.#j = !!this.#D, this.#f = !!this.#S, this.noDisposeOnSet = !!g, this.noUpdateTTL = !!p, this.noDeleteOnFetchRejection = !!_, this.allowStaleOnFetchRejection = !!d, this.allowStaleOnFetchAbort = !!A, this.ignoreFetchAbort = !!z, 0 !== this.maxEntrySize) {
|
|
4659
|
+
if (0 !== this.#u && !F(this.#u)) throw new TypeError("maxSize must be a positive integer if specified");
|
|
4660
|
+
if (!F(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
|
|
4661
|
+
this.#X();
|
|
4662
|
+
}
|
|
4663
|
+
if (this.allowStale = !!h, this.noDeleteOnStaleGet = !!b, this.updateAgeOnGet = !!o, this.updateAgeOnHas = !!r, this.ttlResolution = F(s) || 0 === s ? s : 1, this.ttlAutopurge = !!n, this.ttl = i || 0, this.ttl) {
|
|
4664
|
+
if (!F(this.ttl)) throw new TypeError("ttl must be a positive integer if specified");
|
|
4665
|
+
this.#H();
|
|
4666
|
+
}
|
|
4667
|
+
if (0 === this.#o && 0 === this.ttl && 0 === this.#u) throw new TypeError("At least one of max, maxSize, or ttl is required");
|
|
4668
|
+
if (!this.ttlAutopurge && !this.#o && !this.#u) {
|
|
4669
|
+
let E = "LRU_CACHE_UNBOUNDED";
|
|
4670
|
+
H(E) && (M.add(E), P("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", E, u));
|
|
4671
|
+
}
|
|
4672
|
+
}
|
|
4673
|
+
getRemainingTTL(e1) {
|
|
4674
|
+
return this.#s.has(e1) ? 1 / 0 : 0;
|
|
4675
|
+
}
|
|
4676
|
+
#H() {
|
|
4677
|
+
let e1 = new O(this.#o), t1 = new O(this.#o);
|
|
4678
|
+
this.#d = e1, this.#F = t1;
|
|
4679
|
+
let i = this.ttlAutopurge ? Array.from({
|
|
4680
|
+
length: this.#o
|
|
4681
|
+
}) : void 0;
|
|
4682
|
+
this.#g = i, this.#N = (r, h, l = this.#m.now())=>{
|
|
4683
|
+
t1[r] = 0 !== h ? l : 0, e1[r] = h, s(r, h);
|
|
4684
|
+
}, this.#x = (r)=>{
|
|
4685
|
+
t1[r] = 0 !== e1[r] ? this.#m.now() : 0, s(r, e1[r]);
|
|
4768
4686
|
};
|
|
4769
|
-
|
|
4770
|
-
if (
|
|
4771
|
-
|
|
4772
|
-
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
|
|
4778
|
-
|
|
4687
|
+
let s = this.ttlAutopurge ? (r, h)=>{
|
|
4688
|
+
if (i?.[r] && (clearTimeout(i[r]), i[r] = void 0), h && 0 !== h && i) {
|
|
4689
|
+
let l = setTimeout(()=>{
|
|
4690
|
+
this.#p(r) && this.#v(this.#i[r], "expire");
|
|
4691
|
+
}, h + 1);
|
|
4692
|
+
l.unref && l.unref(), i[r] = l;
|
|
4693
|
+
}
|
|
4694
|
+
} : ()=>{};
|
|
4695
|
+
this.#E = (r, h)=>{
|
|
4696
|
+
if (e1[h]) {
|
|
4697
|
+
let l = e1[h], c = t1[h];
|
|
4698
|
+
if (!l || !c) return;
|
|
4699
|
+
r.ttl = l, r.start = c, r.now = n || o();
|
|
4700
|
+
let f = r.now - c;
|
|
4701
|
+
r.remainingTTL = l - f;
|
|
4779
4702
|
}
|
|
4780
4703
|
};
|
|
4781
|
-
let
|
|
4782
|
-
|
|
4783
|
-
const n = perf.now();
|
|
4704
|
+
let n = 0, o = ()=>{
|
|
4705
|
+
let r = this.#m.now();
|
|
4784
4706
|
if (this.ttlResolution > 0) {
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4707
|
+
n = r;
|
|
4708
|
+
let h = setTimeout(()=>n = 0, this.ttlResolution);
|
|
4709
|
+
h.unref && h.unref();
|
|
4788
4710
|
}
|
|
4789
|
-
return
|
|
4790
|
-
};
|
|
4791
|
-
this.getRemainingTTL = (key)=>{
|
|
4792
|
-
const index = this.#keyMap.get(key);
|
|
4793
|
-
if (void 0 === index) return 0;
|
|
4794
|
-
const ttl = ttls[index];
|
|
4795
|
-
const start = starts[index];
|
|
4796
|
-
if (!ttl || !start) return 1 / 0;
|
|
4797
|
-
const age = (cachedNow || getNow()) - start;
|
|
4798
|
-
return ttl - age;
|
|
4711
|
+
return r;
|
|
4799
4712
|
};
|
|
4800
|
-
this
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4713
|
+
this.getRemainingTTL = (r)=>{
|
|
4714
|
+
let h = this.#s.get(r);
|
|
4715
|
+
if (void 0 === h) return 0;
|
|
4716
|
+
let l = e1[h], c = t1[h];
|
|
4717
|
+
if (!l || !c) return 1 / 0;
|
|
4718
|
+
let f = (n || o()) - c;
|
|
4719
|
+
return l - f;
|
|
4720
|
+
}, this.#p = (r)=>{
|
|
4721
|
+
let h = t1[r], l = e1[r];
|
|
4722
|
+
return !!l && !!h && (n || o()) - h > l;
|
|
4804
4723
|
};
|
|
4805
4724
|
}
|
|
4806
|
-
#
|
|
4807
|
-
#
|
|
4808
|
-
#
|
|
4809
|
-
#
|
|
4810
|
-
#
|
|
4811
|
-
|
|
4812
|
-
this.#
|
|
4813
|
-
|
|
4814
|
-
this.#
|
|
4815
|
-
this.#
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
if (this.#isBackgroundFetch(v)) return 0;
|
|
4820
|
-
if (!isPosInt(size)) if (sizeCalculation) {
|
|
4821
|
-
if ('function' != typeof sizeCalculation) throw new TypeError('sizeCalculation must be a function');
|
|
4822
|
-
size = sizeCalculation(v, k);
|
|
4823
|
-
if (!isPosInt(size)) throw new TypeError('sizeCalculation return invalid (expect positive integer)');
|
|
4725
|
+
#x = ()=>{};
|
|
4726
|
+
#E = ()=>{};
|
|
4727
|
+
#N = ()=>{};
|
|
4728
|
+
#p = ()=>!1;
|
|
4729
|
+
#X() {
|
|
4730
|
+
let e1 = new O(this.#o);
|
|
4731
|
+
this.#b = 0, this.#_ = e1, this.#R = (t1)=>{
|
|
4732
|
+
this.#b -= e1[t1], e1[t1] = 0;
|
|
4733
|
+
}, this.#k = (t1, i, s, n)=>{
|
|
4734
|
+
if (this.#e(i)) return 0;
|
|
4735
|
+
if (!F(s)) if (n) {
|
|
4736
|
+
if ("function" != typeof n) throw new TypeError("sizeCalculation must be a function");
|
|
4737
|
+
if (s = n(i, t1), !F(s)) throw new TypeError("sizeCalculation return invalid (expect positive integer)");
|
|
4824
4738
|
} else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
|
|
4825
|
-
return
|
|
4826
|
-
}
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
const maxSize = this.#maxSize - sizes[index];
|
|
4831
|
-
while(this.#calculatedSize > maxSize)this.#evict(true);
|
|
4832
|
-
}
|
|
4833
|
-
this.#calculatedSize += sizes[index];
|
|
4834
|
-
if (status) {
|
|
4835
|
-
status.entrySize = size;
|
|
4836
|
-
status.totalCalculatedSize = this.#calculatedSize;
|
|
4739
|
+
return s;
|
|
4740
|
+
}, this.#I = (t1, i, s)=>{
|
|
4741
|
+
if (e1[t1] = i, this.#u) {
|
|
4742
|
+
let n = this.#u - e1[t1];
|
|
4743
|
+
for(; this.#b > n;)this.#G(!0);
|
|
4837
4744
|
}
|
|
4745
|
+
this.#b += e1[t1], s && (s.entrySize = i, s.totalCalculatedSize = this.#b);
|
|
4838
4746
|
};
|
|
4839
4747
|
}
|
|
4840
|
-
#
|
|
4841
|
-
#
|
|
4842
|
-
#
|
|
4843
|
-
if (
|
|
4748
|
+
#R = (e1)=>{};
|
|
4749
|
+
#I = (e1, t1, i)=>{};
|
|
4750
|
+
#k = (e1, t1, i, s)=>{
|
|
4751
|
+
if (i || s) throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
|
|
4844
4752
|
return 0;
|
|
4845
4753
|
};
|
|
4846
|
-
*#
|
|
4847
|
-
if (this.#
|
|
4848
|
-
if (!this.#isValidIndex(i)) break;
|
|
4849
|
-
if (allowStale || !this.#isStale(i)) yield i;
|
|
4850
|
-
if (i === this.#head) break;
|
|
4851
|
-
i = this.#prev[i];
|
|
4852
|
-
}
|
|
4754
|
+
*#A({ allowStale: e1 = this.allowStale } = {}) {
|
|
4755
|
+
if (this.#n) for(let t1 = this.#h; this.#V(t1) && ((e1 || !this.#p(t1)) && (yield t1), t1 !== this.#l);)t1 = this.#c[t1];
|
|
4853
4756
|
}
|
|
4854
|
-
*#
|
|
4855
|
-
if (this.#
|
|
4856
|
-
if (!this.#isValidIndex(i)) break;
|
|
4857
|
-
if (allowStale || !this.#isStale(i)) yield i;
|
|
4858
|
-
if (i === this.#tail) break;
|
|
4859
|
-
i = this.#next[i];
|
|
4860
|
-
}
|
|
4757
|
+
*#z({ allowStale: e1 = this.allowStale } = {}) {
|
|
4758
|
+
if (this.#n) for(let t1 = this.#l; this.#V(t1) && ((e1 || !this.#p(t1)) && (yield t1), t1 !== this.#h);)t1 = this.#a[t1];
|
|
4861
4759
|
}
|
|
4862
|
-
#
|
|
4863
|
-
return void 0 !==
|
|
4760
|
+
#V(e1) {
|
|
4761
|
+
return void 0 !== e1 && this.#s.get(this.#i[e1]) === e1;
|
|
4864
4762
|
}
|
|
4865
4763
|
*entries() {
|
|
4866
|
-
for (
|
|
4867
|
-
this.#
|
|
4868
|
-
this.#
|
|
4869
|
-
];
|
|
4764
|
+
for (let e1 of this.#A())void 0 === this.#t[e1] || void 0 === this.#i[e1] || this.#e(this.#t[e1]) || (yield [
|
|
4765
|
+
this.#i[e1],
|
|
4766
|
+
this.#t[e1]
|
|
4767
|
+
]);
|
|
4870
4768
|
}
|
|
4871
4769
|
*rentries() {
|
|
4872
|
-
for (
|
|
4873
|
-
this.#
|
|
4874
|
-
this.#
|
|
4875
|
-
];
|
|
4770
|
+
for (let e1 of this.#z())void 0 === this.#t[e1] || void 0 === this.#i[e1] || this.#e(this.#t[e1]) || (yield [
|
|
4771
|
+
this.#i[e1],
|
|
4772
|
+
this.#t[e1]
|
|
4773
|
+
]);
|
|
4876
4774
|
}
|
|
4877
4775
|
*keys() {
|
|
4878
|
-
for (
|
|
4879
|
-
|
|
4880
|
-
|
|
4776
|
+
for (let e1 of this.#A()){
|
|
4777
|
+
let t1 = this.#i[e1];
|
|
4778
|
+
void 0 === t1 || this.#e(this.#t[e1]) || (yield t1);
|
|
4881
4779
|
}
|
|
4882
4780
|
}
|
|
4883
4781
|
*rkeys() {
|
|
4884
|
-
for (
|
|
4885
|
-
|
|
4886
|
-
|
|
4782
|
+
for (let e1 of this.#z()){
|
|
4783
|
+
let t1 = this.#i[e1];
|
|
4784
|
+
void 0 === t1 || this.#e(this.#t[e1]) || (yield t1);
|
|
4887
4785
|
}
|
|
4888
4786
|
}
|
|
4889
4787
|
*values() {
|
|
4890
|
-
for (
|
|
4891
|
-
const v = this.#valList[i];
|
|
4892
|
-
if (void 0 !== v && !this.#isBackgroundFetch(this.#valList[i])) yield this.#valList[i];
|
|
4893
|
-
}
|
|
4788
|
+
for (let e1 of this.#A())void 0 === this.#t[e1] || this.#e(this.#t[e1]) || (yield this.#t[e1]);
|
|
4894
4789
|
}
|
|
4895
4790
|
*rvalues() {
|
|
4896
|
-
for (
|
|
4897
|
-
const v = this.#valList[i];
|
|
4898
|
-
if (void 0 !== v && !this.#isBackgroundFetch(this.#valList[i])) yield this.#valList[i];
|
|
4899
|
-
}
|
|
4791
|
+
for (let e1 of this.#z())void 0 === this.#t[e1] || this.#e(this.#t[e1]) || (yield this.#t[e1]);
|
|
4900
4792
|
}
|
|
4901
4793
|
[Symbol.iterator]() {
|
|
4902
4794
|
return this.entries();
|
|
4903
4795
|
}
|
|
4904
|
-
[Symbol.toStringTag] =
|
|
4905
|
-
find(
|
|
4906
|
-
for (
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
if (void 0 !== value) {
|
|
4910
|
-
if (fn(value, this.#keyList[i], this)) return this.get(this.#keyList[i], getOptions);
|
|
4911
|
-
}
|
|
4796
|
+
[Symbol.toStringTag] = "LRUCache";
|
|
4797
|
+
find(e1, t1 = {}) {
|
|
4798
|
+
for (let i of this.#A()){
|
|
4799
|
+
let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
4800
|
+
if (void 0 !== n && e1(n, this.#i[i], this)) return this.#C(this.#i[i], t1);
|
|
4912
4801
|
}
|
|
4913
4802
|
}
|
|
4914
|
-
forEach(
|
|
4915
|
-
for (
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
if (void 0 !== value) fn.call(thisp, value, this.#keyList[i], this);
|
|
4803
|
+
forEach(e1, t1 = this) {
|
|
4804
|
+
for (let i of this.#A()){
|
|
4805
|
+
let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
4806
|
+
void 0 !== n && e1.call(t1, n, this.#i[i], this);
|
|
4919
4807
|
}
|
|
4920
4808
|
}
|
|
4921
|
-
rforEach(
|
|
4922
|
-
for (
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
if (void 0 !== value) fn.call(thisp, value, this.#keyList[i], this);
|
|
4809
|
+
rforEach(e1, t1 = this) {
|
|
4810
|
+
for (let i of this.#z()){
|
|
4811
|
+
let s = this.#t[i], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
4812
|
+
void 0 !== n && e1.call(t1, n, this.#i[i], this);
|
|
4926
4813
|
}
|
|
4927
4814
|
}
|
|
4928
4815
|
purgeStale() {
|
|
4929
|
-
let
|
|
4930
|
-
for (
|
|
4931
|
-
allowStale:
|
|
4932
|
-
}))
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
const value = this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v;
|
|
4943
|
-
if (void 0 === value) return;
|
|
4944
|
-
const entry = {
|
|
4945
|
-
value
|
|
4816
|
+
let e1 = !1;
|
|
4817
|
+
for (let t1 of this.#z({
|
|
4818
|
+
allowStale: !0
|
|
4819
|
+
}))this.#p(t1) && (this.#v(this.#i[t1], "expire"), e1 = !0);
|
|
4820
|
+
return e1;
|
|
4821
|
+
}
|
|
4822
|
+
info(e1) {
|
|
4823
|
+
let t1 = this.#s.get(e1);
|
|
4824
|
+
if (void 0 === t1) return;
|
|
4825
|
+
let i = this.#t[t1], s = this.#e(i) ? i.__staleWhileFetching : i;
|
|
4826
|
+
if (void 0 === s) return;
|
|
4827
|
+
let n = {
|
|
4828
|
+
value: s
|
|
4946
4829
|
};
|
|
4947
|
-
if (this.#
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
entry.ttl = remain;
|
|
4953
|
-
entry.start = Date.now();
|
|
4830
|
+
if (this.#d && this.#F) {
|
|
4831
|
+
let o = this.#d[t1], r = this.#F[t1];
|
|
4832
|
+
if (o && r) {
|
|
4833
|
+
let h = o - (this.#m.now() - r);
|
|
4834
|
+
n.ttl = h, n.start = Date.now();
|
|
4954
4835
|
}
|
|
4955
4836
|
}
|
|
4956
|
-
|
|
4957
|
-
return entry;
|
|
4837
|
+
return this.#_ && (n.size = this.#_[t1]), n;
|
|
4958
4838
|
}
|
|
4959
4839
|
dump() {
|
|
4960
|
-
|
|
4961
|
-
for (
|
|
4962
|
-
allowStale:
|
|
4840
|
+
let e1 = [];
|
|
4841
|
+
for (let t1 of this.#A({
|
|
4842
|
+
allowStale: !0
|
|
4963
4843
|
})){
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
const entry = {
|
|
4969
|
-
value
|
|
4844
|
+
let i = this.#i[t1], s = this.#t[t1], n = this.#e(s) ? s.__staleWhileFetching : s;
|
|
4845
|
+
if (void 0 === n || void 0 === i) continue;
|
|
4846
|
+
let o = {
|
|
4847
|
+
value: n
|
|
4970
4848
|
};
|
|
4971
|
-
if (this.#
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
}
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
entry
|
|
4849
|
+
if (this.#d && this.#F) {
|
|
4850
|
+
o.ttl = this.#d[t1];
|
|
4851
|
+
let r = this.#m.now() - this.#F[t1];
|
|
4852
|
+
o.start = Math.floor(Date.now() - r);
|
|
4853
|
+
}
|
|
4854
|
+
this.#_ && (o.size = this.#_[t1]), e1.unshift([
|
|
4855
|
+
i,
|
|
4856
|
+
o
|
|
4980
4857
|
]);
|
|
4981
4858
|
}
|
|
4982
|
-
return
|
|
4859
|
+
return e1;
|
|
4983
4860
|
}
|
|
4984
|
-
load(
|
|
4861
|
+
load(e1) {
|
|
4985
4862
|
this.clear();
|
|
4986
|
-
for (
|
|
4987
|
-
if (
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
}
|
|
4991
|
-
this
|
|
4992
|
-
}
|
|
4993
|
-
}
|
|
4994
|
-
set(
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
if (
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
if (void 0 !== s && !noDisposeOnSet) {
|
|
5031
|
-
if (this.#hasDispose) this.#dispose?.(s, k, 'set');
|
|
5032
|
-
if (this.#hasDisposeAfter) this.#disposed?.push([
|
|
5033
|
-
s,
|
|
5034
|
-
k,
|
|
5035
|
-
'set'
|
|
5036
|
-
]);
|
|
5037
|
-
}
|
|
5038
|
-
} else if (!noDisposeOnSet) {
|
|
5039
|
-
if (this.#hasDispose) this.#dispose?.(oldVal, k, 'set');
|
|
5040
|
-
if (this.#hasDisposeAfter) this.#disposed?.push([
|
|
5041
|
-
oldVal,
|
|
5042
|
-
k,
|
|
5043
|
-
'set'
|
|
5044
|
-
]);
|
|
5045
|
-
}
|
|
5046
|
-
this.#removeItemSize(index);
|
|
5047
|
-
this.#addItemSize(index, size, status);
|
|
5048
|
-
this.#valList[index] = v;
|
|
5049
|
-
if (status) {
|
|
5050
|
-
status.set = 'replace';
|
|
5051
|
-
const oldValue = oldVal && this.#isBackgroundFetch(oldVal) ? oldVal.__staleWhileFetching : oldVal;
|
|
5052
|
-
if (void 0 !== oldValue) status.oldValue = oldValue;
|
|
4863
|
+
for (let [t1, i] of e1){
|
|
4864
|
+
if (i.start) {
|
|
4865
|
+
let s = Date.now() - i.start;
|
|
4866
|
+
i.start = this.#m.now() - s;
|
|
4867
|
+
}
|
|
4868
|
+
this.#O(t1, i.value, i);
|
|
4869
|
+
}
|
|
4870
|
+
}
|
|
4871
|
+
set(e1, t1, i = {}) {
|
|
4872
|
+
let { status: s = S.hasSubscribers ? {} : void 0 } = i;
|
|
4873
|
+
i.status = s, s && (s.op = "set", s.key = e1, void 0 !== t1 && (s.value = t1));
|
|
4874
|
+
let n = this.#O(e1, t1, i);
|
|
4875
|
+
return s && S.hasSubscribers && S.publish(s), n;
|
|
4876
|
+
}
|
|
4877
|
+
#O(e1, t1, i = {}) {
|
|
4878
|
+
let { ttl: s = this.ttl, start: n, noDisposeOnSet: o = this.noDisposeOnSet, sizeCalculation: r = this.sizeCalculation, status: h } = i;
|
|
4879
|
+
if (void 0 === t1) return h && (h.set = "deleted"), this.delete(e1), this;
|
|
4880
|
+
let { noUpdateTTL: l = this.noUpdateTTL } = i;
|
|
4881
|
+
h && !this.#e(t1) && (h.value = t1);
|
|
4882
|
+
let c = this.#k(e1, t1, i.size || 0, r, h);
|
|
4883
|
+
if (this.maxEntrySize && c > this.maxEntrySize) return this.#v(e1, "set"), h && (h.set = "miss", h.maxEntrySizeExceeded = !0), this;
|
|
4884
|
+
let f = 0 === this.#n ? void 0 : this.#s.get(e1);
|
|
4885
|
+
if (void 0 === f) f = 0 === this.#n ? this.#h : 0 !== this.#y.length ? this.#y.pop() : this.#n === this.#o ? this.#G(!1) : this.#n, this.#i[f] = e1, this.#t[f] = t1, this.#s.set(e1, f), this.#a[this.#h] = f, this.#c[f] = this.#h, this.#h = f, this.#n++, this.#I(f, c, h), h && (h.set = "add"), l = !1, this.#j && this.#D?.(t1, e1, "add");
|
|
4886
|
+
else {
|
|
4887
|
+
this.#L(f);
|
|
4888
|
+
let g = this.#t[f];
|
|
4889
|
+
if (t1 !== g) {
|
|
4890
|
+
if (this.#W && this.#e(g)) {
|
|
4891
|
+
g.__abortController.abort(new Error("replaced"));
|
|
4892
|
+
let { __staleWhileFetching: p } = g;
|
|
4893
|
+
void 0 !== p && !o && (this.#T && this.#w?.(p, e1, "set"), this.#f && this.#r?.push([
|
|
4894
|
+
p,
|
|
4895
|
+
e1,
|
|
4896
|
+
"set"
|
|
4897
|
+
]));
|
|
4898
|
+
} else o || (this.#T && this.#w?.(g, e1, "set"), this.#f && this.#r?.push([
|
|
4899
|
+
g,
|
|
4900
|
+
e1,
|
|
4901
|
+
"set"
|
|
4902
|
+
]));
|
|
4903
|
+
if (this.#R(f), this.#I(f, c, h), this.#t[f] = t1, h) {
|
|
4904
|
+
h.set = "replace";
|
|
4905
|
+
let p = g && this.#e(g) ? g.__staleWhileFetching : g;
|
|
4906
|
+
void 0 !== p && (h.oldValue = p);
|
|
5053
4907
|
}
|
|
5054
|
-
} else
|
|
4908
|
+
} else h && (h.set = "update");
|
|
4909
|
+
this.#j && this.onInsert?.(t1, e1, t1 === g ? "update" : "replace");
|
|
5055
4910
|
}
|
|
5056
|
-
if (0
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
if (status) this.#statusTTL(status, index);
|
|
5060
|
-
}
|
|
5061
|
-
if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {
|
|
5062
|
-
const dt = this.#disposed;
|
|
5063
|
-
let task;
|
|
5064
|
-
while(task = dt?.shift())this.#disposeAfter?.(...task);
|
|
4911
|
+
if (0 === s || this.#d || this.#H(), this.#d && (l || this.#N(f, s, n), h && this.#E(h, f)), !o && this.#f && this.#r) {
|
|
4912
|
+
let g = this.#r, p;
|
|
4913
|
+
for(; p = g?.shift();)this.#S?.(...p);
|
|
5065
4914
|
}
|
|
5066
4915
|
return this;
|
|
5067
4916
|
}
|
|
5068
4917
|
pop() {
|
|
5069
4918
|
try {
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
this.#
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
} else if (void 0 !== val) return val;
|
|
4919
|
+
for(; this.#n;){
|
|
4920
|
+
let e1 = this.#t[this.#l];
|
|
4921
|
+
if (this.#G(!0), this.#e(e1)) {
|
|
4922
|
+
if (e1.__staleWhileFetching) return e1.__staleWhileFetching;
|
|
4923
|
+
} else if (void 0 !== e1) return e1;
|
|
5076
4924
|
}
|
|
5077
4925
|
} finally{
|
|
5078
|
-
if (this.#
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
while(task = dt?.shift())this.#disposeAfter?.(...task);
|
|
4926
|
+
if (this.#f && this.#r) {
|
|
4927
|
+
let e1 = this.#r, t1;
|
|
4928
|
+
for(; t1 = e1?.shift();)this.#S?.(...t1);
|
|
5082
4929
|
}
|
|
5083
4930
|
}
|
|
5084
4931
|
}
|
|
5085
|
-
#
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
4932
|
+
#G(e1) {
|
|
4933
|
+
let t1 = this.#l, i = this.#i[t1], s = this.#t[t1];
|
|
4934
|
+
return this.#W && this.#e(s) ? s.__abortController.abort(new Error("evicted")) : (this.#T || this.#f) && (this.#T && this.#w?.(s, i, "evict"), this.#f && this.#r?.push([
|
|
4935
|
+
s,
|
|
4936
|
+
i,
|
|
4937
|
+
"evict"
|
|
4938
|
+
])), this.#R(t1), this.#g?.[t1] && (clearTimeout(this.#g[t1]), this.#g[t1] = void 0), e1 && (this.#i[t1] = void 0, this.#t[t1] = void 0, this.#y.push(t1)), 1 === this.#n ? (this.#l = this.#h = 0, this.#y.length = 0) : this.#l = this.#a[t1], this.#s.delete(i), this.#n--, t1;
|
|
4939
|
+
}
|
|
4940
|
+
has(e1, t1 = {}) {
|
|
4941
|
+
let { status: i = S.hasSubscribers ? {} : void 0 } = t1;
|
|
4942
|
+
t1.status = i, i && (i.op = "has", i.key = e1);
|
|
4943
|
+
let s = this.#Y(e1, t1);
|
|
4944
|
+
return S.hasSubscribers && S.publish(i), s;
|
|
4945
|
+
}
|
|
4946
|
+
#Y(e1, t1 = {}) {
|
|
4947
|
+
let { updateAgeOnHas: i = this.updateAgeOnHas, status: s } = t1, n = this.#s.get(e1);
|
|
4948
|
+
if (void 0 !== n) {
|
|
4949
|
+
let o = this.#t[n];
|
|
4950
|
+
if (this.#e(o) && void 0 === o.__staleWhileFetching) return !1;
|
|
4951
|
+
if (!this.#p(n)) return i && this.#x(n), s && (s.has = "hit", this.#E(s, n)), !0;
|
|
4952
|
+
s && (s.has = "stale", this.#E(s, n));
|
|
4953
|
+
} else s && (s.has = "miss");
|
|
4954
|
+
return !1;
|
|
4955
|
+
}
|
|
4956
|
+
peek(e1, t1 = {}) {
|
|
4957
|
+
let { status: i = D() ? {} : void 0 } = t1;
|
|
4958
|
+
i && (i.op = "peek", i.key = e1), t1.status = i;
|
|
4959
|
+
let s = this.#J(e1, t1);
|
|
4960
|
+
return S.hasSubscribers && S.publish(i), s;
|
|
4961
|
+
}
|
|
4962
|
+
#J(e1, t1) {
|
|
4963
|
+
let { status: i, allowStale: s = this.allowStale } = t1, n = this.#s.get(e1);
|
|
4964
|
+
if (void 0 === n || !s && this.#p(n)) {
|
|
4965
|
+
i && (i.peek = void 0 === n ? "miss" : "stale");
|
|
4966
|
+
return;
|
|
5097
4967
|
}
|
|
5098
|
-
this.#
|
|
5099
|
-
|
|
5100
|
-
this.#keyList[head] = void 0;
|
|
5101
|
-
this.#valList[head] = void 0;
|
|
5102
|
-
this.#free.push(head);
|
|
5103
|
-
}
|
|
5104
|
-
if (1 === this.#size) {
|
|
5105
|
-
this.#head = this.#tail = 0;
|
|
5106
|
-
this.#free.length = 0;
|
|
5107
|
-
} else this.#head = this.#next[head];
|
|
5108
|
-
this.#keyMap.delete(k);
|
|
5109
|
-
this.#size--;
|
|
5110
|
-
return head;
|
|
5111
|
-
}
|
|
5112
|
-
has(k, hasOptions = {}) {
|
|
5113
|
-
const { updateAgeOnHas = this.updateAgeOnHas, status } = hasOptions;
|
|
5114
|
-
const index = this.#keyMap.get(k);
|
|
5115
|
-
if (void 0 !== index) {
|
|
5116
|
-
const v = this.#valList[index];
|
|
5117
|
-
if (this.#isBackgroundFetch(v) && void 0 === v.__staleWhileFetching) return false;
|
|
5118
|
-
if (this.#isStale(index)) {
|
|
5119
|
-
if (status) {
|
|
5120
|
-
status.has = 'stale';
|
|
5121
|
-
this.#statusTTL(status, index);
|
|
5122
|
-
}
|
|
5123
|
-
} else {
|
|
5124
|
-
if (updateAgeOnHas) this.#updateItemAge(index);
|
|
5125
|
-
if (status) {
|
|
5126
|
-
status.has = 'hit';
|
|
5127
|
-
this.#statusTTL(status, index);
|
|
5128
|
-
}
|
|
5129
|
-
return true;
|
|
5130
|
-
}
|
|
5131
|
-
} else if (status) status.has = 'miss';
|
|
5132
|
-
return false;
|
|
4968
|
+
let o = this.#t[n], r = this.#e(o) ? o.__staleWhileFetching : o;
|
|
4969
|
+
return i && (void 0 !== r ? (i.peek = "hit", i.value = r) : i.peek = "miss"), r;
|
|
5133
4970
|
}
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
}
|
|
5141
|
-
#backgroundFetch(k, index, options, context) {
|
|
5142
|
-
const v = void 0 === index ? void 0 : this.#valList[index];
|
|
5143
|
-
if (this.#isBackgroundFetch(v)) return v;
|
|
5144
|
-
const ac = new AC();
|
|
5145
|
-
const { signal } = options;
|
|
5146
|
-
signal?.addEventListener('abort', ()=>ac.abort(signal.reason), {
|
|
5147
|
-
signal: ac.signal
|
|
4971
|
+
#P(e1, t1, i, s) {
|
|
4972
|
+
let n = void 0 === t1 ? void 0 : this.#t[t1];
|
|
4973
|
+
if (this.#e(n)) return n;
|
|
4974
|
+
let o = new AbortController, { signal: r } = i;
|
|
4975
|
+
r?.addEventListener("abort", ()=>o.abort(r.reason), {
|
|
4976
|
+
signal: o.signal
|
|
5148
4977
|
});
|
|
5149
|
-
|
|
5150
|
-
signal:
|
|
5151
|
-
options,
|
|
5152
|
-
context
|
|
5153
|
-
}
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
else {
|
|
5167
|
-
if (options.status) options.status.fetchUpdated = true;
|
|
5168
|
-
this.set(k, v, fetchOpts.options);
|
|
5169
|
-
}
|
|
5170
|
-
return v;
|
|
5171
|
-
};
|
|
5172
|
-
const eb = (er)=>{
|
|
5173
|
-
if (options.status) {
|
|
5174
|
-
options.status.fetchRejected = true;
|
|
5175
|
-
options.status.fetchError = er;
|
|
5176
|
-
}
|
|
5177
|
-
return fetchFail(er);
|
|
5178
|
-
};
|
|
5179
|
-
const fetchFail = (er)=>{
|
|
5180
|
-
const { aborted } = ac.signal;
|
|
5181
|
-
const allowStaleAborted = aborted && options.allowStaleOnFetchAbort;
|
|
5182
|
-
const allowStale = allowStaleAborted || options.allowStaleOnFetchRejection;
|
|
5183
|
-
const noDelete = allowStale || options.noDeleteOnFetchRejection;
|
|
5184
|
-
const bf = p;
|
|
5185
|
-
if (this.#valList[index] === p) {
|
|
5186
|
-
const del = !noDelete || void 0 === bf.__staleWhileFetching;
|
|
5187
|
-
if (del) this.#delete(k, 'fetch');
|
|
5188
|
-
else if (!allowStaleAborted) this.#valList[index] = bf.__staleWhileFetching;
|
|
5189
|
-
}
|
|
5190
|
-
if (allowStale) {
|
|
5191
|
-
if (options.status && void 0 !== bf.__staleWhileFetching) options.status.returnedStale = true;
|
|
5192
|
-
return bf.__staleWhileFetching;
|
|
5193
|
-
}
|
|
5194
|
-
if (bf.__returned === bf) throw er;
|
|
5195
|
-
};
|
|
5196
|
-
const pcall = (res, rej)=>{
|
|
5197
|
-
const fmp = this.#fetchMethod?.(k, v, fetchOpts);
|
|
5198
|
-
if (fmp && fmp instanceof Promise) fmp.then((v)=>res(void 0 === v ? void 0 : v), rej);
|
|
5199
|
-
ac.signal.addEventListener('abort', ()=>{
|
|
5200
|
-
if (!options.ignoreFetchAbort || options.allowStaleOnFetchAbort) {
|
|
5201
|
-
res(void 0);
|
|
5202
|
-
if (options.allowStaleOnFetchAbort) res = (v)=>cb(v, true);
|
|
5203
|
-
}
|
|
4978
|
+
let h = {
|
|
4979
|
+
signal: o.signal,
|
|
4980
|
+
options: i,
|
|
4981
|
+
context: s
|
|
4982
|
+
}, l = (w, y = !1)=>{
|
|
4983
|
+
let { aborted: a } = o.signal, m = i.ignoreFetchAbort && void 0 !== w, _ = i.ignoreFetchAbort || !!(i.allowStaleOnFetchAbort && void 0 !== w);
|
|
4984
|
+
if (i.status && (a && !y ? (i.status.fetchAborted = !0, i.status.fetchError = o.signal.reason, m && (i.status.fetchAbortIgnored = !0)) : i.status.fetchResolved = !0), a && !m && !y) return f(o.signal.reason, _);
|
|
4985
|
+
let b = p, d = this.#t[t1];
|
|
4986
|
+
return (d === p || void 0 === d && m && y) && (void 0 === w ? void 0 !== b.__staleWhileFetching ? this.#t[t1] = b.__staleWhileFetching : this.#v(e1, "fetch") : (i.status && (i.status.fetchUpdated = !0), this.#O(e1, w, h.options))), w;
|
|
4987
|
+
}, c = (w)=>(i.status && (i.status.fetchRejected = !0, i.status.fetchError = w), f(w, !1)), f = (w, y)=>{
|
|
4988
|
+
let { aborted: a } = o.signal, m = a && i.allowStaleOnFetchAbort, _ = m || i.allowStaleOnFetchRejection, b = _ || i.noDeleteOnFetchRejection, d = p;
|
|
4989
|
+
if (this.#t[t1] === p && (b && (y || void 0 !== d.__staleWhileFetching) ? m || (this.#t[t1] = d.__staleWhileFetching) : this.#v(e1, "fetch")), _) return i.status && void 0 !== d.__staleWhileFetching && (i.status.returnedStale = !0), d.__staleWhileFetching;
|
|
4990
|
+
if (d.__returned === d) throw w;
|
|
4991
|
+
}, g = (w, y)=>{
|
|
4992
|
+
let a = this.#M?.(e1, n, h);
|
|
4993
|
+
a && a instanceof Promise && a.then((m)=>w(void 0 === m ? void 0 : m), y), o.signal.addEventListener("abort", ()=>{
|
|
4994
|
+
(!i.ignoreFetchAbort || i.allowStaleOnFetchAbort) && (w(void 0), i.allowStaleOnFetchAbort && (w = (m)=>l(m, !0)));
|
|
5204
4995
|
});
|
|
5205
4996
|
};
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
__staleWhileFetching: v,
|
|
4997
|
+
i.status && (i.status.fetchDispatched = !0);
|
|
4998
|
+
let p = new Promise(g).then(l, c), T = Object.assign(p, {
|
|
4999
|
+
__abortController: o,
|
|
5000
|
+
__staleWhileFetching: n,
|
|
5211
5001
|
__returned: void 0
|
|
5212
5002
|
});
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
const p = this.#backgroundFetch(k, index, options, context);
|
|
5258
|
-
return p.__returned = p;
|
|
5003
|
+
return void 0 === t1 ? (this.#O(e1, T, {
|
|
5004
|
+
...h.options,
|
|
5005
|
+
status: void 0
|
|
5006
|
+
}), t1 = this.#s.get(e1)) : this.#t[t1] = T, T;
|
|
5007
|
+
}
|
|
5008
|
+
#e(e1) {
|
|
5009
|
+
if (!this.#W) return !1;
|
|
5010
|
+
let t1 = e1;
|
|
5011
|
+
return !!t1 && t1 instanceof Promise && t1.hasOwnProperty("__staleWhileFetching") && t1.__abortController instanceof AbortController;
|
|
5012
|
+
}
|
|
5013
|
+
fetch(e1, t1 = {}) {
|
|
5014
|
+
let i = W.hasSubscribers, { status: s = D() ? {} : void 0 } = t1;
|
|
5015
|
+
t1.status = s, s && t1.context && (s.context = t1.context);
|
|
5016
|
+
let n = this.#B(e1, t1);
|
|
5017
|
+
return s && D() && i && (s.trace = !0, W.tracePromise(()=>n, s).catch(()=>{})), n;
|
|
5018
|
+
}
|
|
5019
|
+
async #B(e1, t1 = {}) {
|
|
5020
|
+
let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, ttl: o = this.ttl, noDisposeOnSet: r = this.noDisposeOnSet, size: h = 0, sizeCalculation: l = this.sizeCalculation, noUpdateTTL: c = this.noUpdateTTL, noDeleteOnFetchRejection: f = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: g = this.allowStaleOnFetchRejection, ignoreFetchAbort: p = this.ignoreFetchAbort, allowStaleOnFetchAbort: T = this.allowStaleOnFetchAbort, context: w, forceRefresh: y = !1, status: a, signal: m } = t1;
|
|
5021
|
+
if (a && (a.op = "fetch", a.key = e1, y && (a.forceRefresh = !0)), !this.#W) return a && (a.fetch = "get"), this.#C(e1, {
|
|
5022
|
+
allowStale: i,
|
|
5023
|
+
updateAgeOnGet: s,
|
|
5024
|
+
noDeleteOnStaleGet: n,
|
|
5025
|
+
status: a
|
|
5026
|
+
});
|
|
5027
|
+
let _ = {
|
|
5028
|
+
allowStale: i,
|
|
5029
|
+
updateAgeOnGet: s,
|
|
5030
|
+
noDeleteOnStaleGet: n,
|
|
5031
|
+
ttl: o,
|
|
5032
|
+
noDisposeOnSet: r,
|
|
5033
|
+
size: h,
|
|
5034
|
+
sizeCalculation: l,
|
|
5035
|
+
noUpdateTTL: c,
|
|
5036
|
+
noDeleteOnFetchRejection: f,
|
|
5037
|
+
allowStaleOnFetchRejection: g,
|
|
5038
|
+
allowStaleOnFetchAbort: T,
|
|
5039
|
+
ignoreFetchAbort: p,
|
|
5040
|
+
status: a,
|
|
5041
|
+
signal: m
|
|
5042
|
+
}, b = this.#s.get(e1);
|
|
5043
|
+
if (void 0 === b) {
|
|
5044
|
+
a && (a.fetch = "miss");
|
|
5045
|
+
let d = this.#P(e1, b, _, w);
|
|
5046
|
+
return d.__returned = d;
|
|
5259
5047
|
}
|
|
5260
5048
|
{
|
|
5261
|
-
|
|
5262
|
-
if (this.#
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
5294
|
-
|
|
5295
|
-
if (
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
const vv = memoMethod(k, v, {
|
|
5300
|
-
options,
|
|
5301
|
-
context
|
|
5049
|
+
let d = this.#t[b];
|
|
5050
|
+
if (this.#e(d)) {
|
|
5051
|
+
let E = i && void 0 !== d.__staleWhileFetching;
|
|
5052
|
+
return a && (a.fetch = "inflight", E && (a.returnedStale = !0)), E ? d.__staleWhileFetching : d.__returned = d;
|
|
5053
|
+
}
|
|
5054
|
+
let A = this.#p(b);
|
|
5055
|
+
if (!y && !A) return a && (a.fetch = "hit"), this.#L(b), s && this.#x(b), a && this.#E(a, b), d;
|
|
5056
|
+
let z = this.#P(e1, b, _, w), v = void 0 !== z.__staleWhileFetching && i;
|
|
5057
|
+
return a && (a.fetch = A ? "stale" : "refresh", v && A && (a.returnedStale = !0)), v ? z.__staleWhileFetching : z.__returned = z;
|
|
5058
|
+
}
|
|
5059
|
+
}
|
|
5060
|
+
forceFetch(e1, t1 = {}) {
|
|
5061
|
+
let i = W.hasSubscribers, { status: s = D() ? {} : void 0 } = t1;
|
|
5062
|
+
t1.status = s, s && t1.context && (s.context = t1.context);
|
|
5063
|
+
let n = this.#K(e1, t1);
|
|
5064
|
+
return s && D() && i && (s.trace = !0, W.tracePromise(()=>n, s).catch(()=>{})), n;
|
|
5065
|
+
}
|
|
5066
|
+
async #K(e1, t1 = {}) {
|
|
5067
|
+
let i = await this.#B(e1, t1);
|
|
5068
|
+
if (void 0 === i) throw new Error("fetch() returned undefined");
|
|
5069
|
+
return i;
|
|
5070
|
+
}
|
|
5071
|
+
memo(e1, t1 = {}) {
|
|
5072
|
+
let { status: i = S.hasSubscribers ? {} : void 0 } = t1;
|
|
5073
|
+
t1.status = i, i && (i.op = "memo", i.key = e1, t1.context && (i.context = t1.context));
|
|
5074
|
+
let s = this.#Q(e1, t1);
|
|
5075
|
+
return i && (i.value = s), S.hasSubscribers && S.publish(i), s;
|
|
5076
|
+
}
|
|
5077
|
+
#Q(e1, t1 = {}) {
|
|
5078
|
+
let i = this.#U;
|
|
5079
|
+
if (!i) throw new Error("no memoMethod provided to constructor");
|
|
5080
|
+
let { context: s, status: n, forceRefresh: o, ...r } = t1;
|
|
5081
|
+
n && o && (n.forceRefresh = !0);
|
|
5082
|
+
let h = this.#C(e1, r), l = o || void 0 === h;
|
|
5083
|
+
if (n && (n.memo = l ? "miss" : "hit", l || (n.value = h)), !l) return h;
|
|
5084
|
+
let c = i(e1, h, {
|
|
5085
|
+
options: r,
|
|
5086
|
+
context: s
|
|
5302
5087
|
});
|
|
5303
|
-
this
|
|
5304
|
-
|
|
5305
|
-
}
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
if (status && allowStale && void 0 !== value.__staleWhileFetching) status.returnedStale = true;
|
|
5317
|
-
return allowStale ? value.__staleWhileFetching : void 0;
|
|
5318
|
-
}
|
|
5319
|
-
if (!noDeleteOnStaleGet) this.#delete(k, 'expire');
|
|
5320
|
-
if (status && allowStale) status.returnedStale = true;
|
|
5321
|
-
return allowStale ? value : void 0;
|
|
5322
|
-
}
|
|
5323
|
-
if (status) status.get = 'hit';
|
|
5324
|
-
if (fetching) return value.__staleWhileFetching;
|
|
5325
|
-
this.#moveToTail(index);
|
|
5326
|
-
if (updateAgeOnGet) this.#updateItemAge(index);
|
|
5327
|
-
return value;
|
|
5088
|
+
return n && (n.value = c), this.#O(e1, c, r), c;
|
|
5089
|
+
}
|
|
5090
|
+
get(e1, t1 = {}) {
|
|
5091
|
+
let { status: i = S.hasSubscribers ? {} : void 0 } = t1;
|
|
5092
|
+
t1.status = i, i && (i.op = "get", i.key = e1);
|
|
5093
|
+
let s = this.#C(e1, t1);
|
|
5094
|
+
return i && (void 0 !== s && (i.value = s), S.hasSubscribers && S.publish(i)), s;
|
|
5095
|
+
}
|
|
5096
|
+
#C(e1, t1 = {}) {
|
|
5097
|
+
let { allowStale: i = this.allowStale, updateAgeOnGet: s = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, status: o } = t1, r = this.#s.get(e1);
|
|
5098
|
+
if (void 0 === r) {
|
|
5099
|
+
o && (o.get = "miss");
|
|
5100
|
+
return;
|
|
5328
5101
|
}
|
|
5329
|
-
|
|
5102
|
+
let h = this.#t[r], l = this.#e(h);
|
|
5103
|
+
return o && this.#E(o, r), this.#p(r) ? l ? (o && (o.get = "stale-fetching"), i && void 0 !== h.__staleWhileFetching ? (o && (o.returnedStale = !0), h.__staleWhileFetching) : void 0) : (n || this.#v(e1, "expire"), o && (o.get = "stale"), i ? (o && (o.returnedStale = !0), h) : void 0) : (o && (o.get = l ? "fetching" : "hit"), this.#L(r), s && this.#x(r), l ? h.__staleWhileFetching : h);
|
|
5330
5104
|
}
|
|
5331
|
-
|
|
5332
|
-
this.#
|
|
5333
|
-
this.#next[p] = n;
|
|
5105
|
+
#$(e1, t1) {
|
|
5106
|
+
this.#c[t1] = e1, this.#a[e1] = t1;
|
|
5334
5107
|
}
|
|
5335
|
-
#
|
|
5336
|
-
|
|
5337
|
-
if (index === this.#head) this.#head = this.#next[index];
|
|
5338
|
-
else this.#connect(this.#prev[index], this.#next[index]);
|
|
5339
|
-
this.#connect(this.#tail, index);
|
|
5340
|
-
this.#tail = index;
|
|
5341
|
-
}
|
|
5108
|
+
#L(e1) {
|
|
5109
|
+
e1 !== this.#h && (e1 === this.#l ? this.#l = this.#a[e1] : this.#$(this.#c[e1], this.#a[e1]), this.#$(this.#h, e1), this.#h = e1);
|
|
5342
5110
|
}
|
|
5343
|
-
delete(
|
|
5344
|
-
return this.#
|
|
5111
|
+
delete(e1) {
|
|
5112
|
+
return this.#v(e1, "delete");
|
|
5345
5113
|
}
|
|
5346
|
-
#
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5114
|
+
#v(e1, t1) {
|
|
5115
|
+
S.hasSubscribers && S.publish({
|
|
5116
|
+
op: "delete",
|
|
5117
|
+
delete: t1,
|
|
5118
|
+
key: e1
|
|
5119
|
+
});
|
|
5120
|
+
let i = !1;
|
|
5121
|
+
if (0 !== this.#n) {
|
|
5122
|
+
let s = this.#s.get(e1);
|
|
5123
|
+
if (void 0 !== s) if (this.#g?.[s] && (clearTimeout(this.#g?.[s]), this.#g[s] = void 0), i = !0, 1 === this.#n) this.#q(t1);
|
|
5124
|
+
else {
|
|
5125
|
+
this.#R(s);
|
|
5126
|
+
let n = this.#t[s];
|
|
5127
|
+
if (this.#e(n) ? n.__abortController.abort(new Error("deleted")) : (this.#T || this.#f) && (this.#T && this.#w?.(n, e1, t1), this.#f && this.#r?.push([
|
|
5128
|
+
n,
|
|
5129
|
+
e1,
|
|
5130
|
+
t1
|
|
5131
|
+
])), this.#s.delete(e1), this.#i[s] = void 0, this.#t[s] = void 0, s === this.#h) this.#h = this.#c[s];
|
|
5132
|
+
else if (s === this.#l) this.#l = this.#a[s];
|
|
5353
5133
|
else {
|
|
5354
|
-
this.#
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
if (this.#hasDispose) this.#dispose?.(v, k, reason);
|
|
5359
|
-
if (this.#hasDisposeAfter) this.#disposed?.push([
|
|
5360
|
-
v,
|
|
5361
|
-
k,
|
|
5362
|
-
reason
|
|
5363
|
-
]);
|
|
5364
|
-
}
|
|
5365
|
-
this.#keyMap.delete(k);
|
|
5366
|
-
this.#keyList[index] = void 0;
|
|
5367
|
-
this.#valList[index] = void 0;
|
|
5368
|
-
if (index === this.#tail) this.#tail = this.#prev[index];
|
|
5369
|
-
else if (index === this.#head) this.#head = this.#next[index];
|
|
5370
|
-
else {
|
|
5371
|
-
const pi = this.#prev[index];
|
|
5372
|
-
this.#next[pi] = this.#next[index];
|
|
5373
|
-
const ni = this.#next[index];
|
|
5374
|
-
this.#prev[ni] = this.#prev[index];
|
|
5375
|
-
}
|
|
5376
|
-
this.#size--;
|
|
5377
|
-
this.#free.push(index);
|
|
5134
|
+
let o = this.#c[s];
|
|
5135
|
+
this.#a[o] = this.#a[s];
|
|
5136
|
+
let r = this.#a[s];
|
|
5137
|
+
this.#c[r] = this.#c[s];
|
|
5378
5138
|
}
|
|
5139
|
+
this.#n--, this.#y.push(s);
|
|
5379
5140
|
}
|
|
5380
5141
|
}
|
|
5381
|
-
if (this.#
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
while(task = dt?.shift())this.#disposeAfter?.(...task);
|
|
5142
|
+
if (this.#f && this.#r?.length) {
|
|
5143
|
+
let s = this.#r, n;
|
|
5144
|
+
for(; n = s?.shift();)this.#S?.(...n);
|
|
5385
5145
|
}
|
|
5386
|
-
return
|
|
5146
|
+
return i;
|
|
5387
5147
|
}
|
|
5388
5148
|
clear() {
|
|
5389
|
-
return this.#
|
|
5149
|
+
return this.#q("delete");
|
|
5390
5150
|
}
|
|
5391
|
-
#
|
|
5392
|
-
for (
|
|
5393
|
-
allowStale:
|
|
5151
|
+
#q(e1) {
|
|
5152
|
+
for (let t1 of this.#z({
|
|
5153
|
+
allowStale: !0
|
|
5394
5154
|
})){
|
|
5395
|
-
|
|
5396
|
-
if (this.#
|
|
5155
|
+
let i = this.#t[t1];
|
|
5156
|
+
if (this.#e(i)) i.__abortController.abort(new Error("deleted"));
|
|
5397
5157
|
else {
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
reason
|
|
5158
|
+
let s = this.#i[t1];
|
|
5159
|
+
this.#T && this.#w?.(i, s, e1), this.#f && this.#r?.push([
|
|
5160
|
+
i,
|
|
5161
|
+
s,
|
|
5162
|
+
e1
|
|
5404
5163
|
]);
|
|
5405
5164
|
}
|
|
5406
5165
|
}
|
|
5407
|
-
this.#
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
this.#ttls.fill(0);
|
|
5412
|
-
this.#starts.fill(0);
|
|
5166
|
+
if (this.#s.clear(), this.#t.fill(void 0), this.#i.fill(void 0), this.#d && this.#F) {
|
|
5167
|
+
this.#d.fill(0), this.#F.fill(0);
|
|
5168
|
+
for (let t1 of this.#g ?? [])void 0 !== t1 && clearTimeout(t1);
|
|
5169
|
+
this.#g?.fill(void 0);
|
|
5413
5170
|
}
|
|
5414
|
-
if (this.#
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
this.#free.length = 0;
|
|
5418
|
-
this.#calculatedSize = 0;
|
|
5419
|
-
this.#size = 0;
|
|
5420
|
-
if (this.#hasDisposeAfter && this.#disposed) {
|
|
5421
|
-
const dt = this.#disposed;
|
|
5422
|
-
let task;
|
|
5423
|
-
while(task = dt?.shift())this.#disposeAfter?.(...task);
|
|
5171
|
+
if (this.#_ && this.#_.fill(0), this.#l = 0, this.#h = 0, this.#y.length = 0, this.#b = 0, this.#n = 0, this.#f && this.#r) {
|
|
5172
|
+
let t1 = this.#r, i;
|
|
5173
|
+
for(; i = t1?.shift();)this.#S?.(...i);
|
|
5424
5174
|
}
|
|
5425
5175
|
}
|
|
5426
|
-
}
|
|
5176
|
+
};
|
|
5427
5177
|
var external_fs_ = __webpack_require__("fs");
|
|
5428
5178
|
const promises_namespaceObject = require("node:fs/promises");
|
|
5429
5179
|
const external_node_events_namespaceObject = require("node:events");
|
|
@@ -5500,7 +5250,7 @@ defineYamlBatchTest(${JSON.stringify(testOptions, null, 2)});
|
|
|
5500
5250
|
}
|
|
5501
5251
|
constructor(src, dest, opts){
|
|
5502
5252
|
super(src, dest, opts);
|
|
5503
|
-
this.proxyErrors = (er)=>dest.emit('error', er);
|
|
5253
|
+
this.proxyErrors = (er)=>this.dest.emit('error', er);
|
|
5504
5254
|
src.on('error', this.proxyErrors);
|
|
5505
5255
|
}
|
|
5506
5256
|
}
|
|
@@ -5952,7 +5702,8 @@ defineYamlBatchTest(${JSON.stringify(testOptions, null, 2)});
|
|
|
5952
5702
|
return: stop,
|
|
5953
5703
|
[Symbol.asyncIterator] () {
|
|
5954
5704
|
return this;
|
|
5955
|
-
}
|
|
5705
|
+
},
|
|
5706
|
+
[Symbol.asyncDispose]: async ()=>{}
|
|
5956
5707
|
};
|
|
5957
5708
|
}
|
|
5958
5709
|
[Symbol.iterator]() {
|
|
@@ -5986,7 +5737,8 @@ defineYamlBatchTest(${JSON.stringify(testOptions, null, 2)});
|
|
|
5986
5737
|
return: stop,
|
|
5987
5738
|
[Symbol.iterator] () {
|
|
5988
5739
|
return this;
|
|
5989
|
-
}
|
|
5740
|
+
},
|
|
5741
|
+
[Symbol.dispose]: ()=>{}
|
|
5990
5742
|
};
|
|
5991
5743
|
}
|
|
5992
5744
|
destroy(er) {
|
|
@@ -6069,14 +5821,14 @@ defineYamlBatchTest(${JSON.stringify(testOptions, null, 2)});
|
|
|
6069
5821
|
normalizeNocaseCache.set(s, n);
|
|
6070
5822
|
return n;
|
|
6071
5823
|
};
|
|
6072
|
-
class ResolveCache extends
|
|
5824
|
+
class ResolveCache extends L {
|
|
6073
5825
|
constructor(){
|
|
6074
5826
|
super({
|
|
6075
5827
|
max: 256
|
|
6076
5828
|
});
|
|
6077
5829
|
}
|
|
6078
5830
|
}
|
|
6079
|
-
class ChildrenCache extends
|
|
5831
|
+
class ChildrenCache extends L {
|
|
6080
5832
|
constructor(maxSize = 16384){
|
|
6081
5833
|
super({
|
|
6082
5834
|
maxSize,
|
|
@@ -7219,6 +6971,586 @@ defineYamlBatchTest(${JSON.stringify(testOptions, null, 2)});
|
|
|
7219
6971
|
return true;
|
|
7220
6972
|
}
|
|
7221
6973
|
}
|
|
6974
|
+
const esm_proc = 'object' == typeof process && process ? process : {
|
|
6975
|
+
stdout: null,
|
|
6976
|
+
stderr: null
|
|
6977
|
+
};
|
|
6978
|
+
const esm_isStream = (s)=>!!s && 'object' == typeof s && (s instanceof esm_Minipass || s instanceof external_node_stream_namespaceObject || esm_isReadable(s) || esm_isWritable(s));
|
|
6979
|
+
const esm_isReadable = (s)=>!!s && 'object' == typeof s && s instanceof external_node_events_namespaceObject.EventEmitter && 'function' == typeof s.pipe && s.pipe !== external_node_stream_namespaceObject.Writable.prototype.pipe;
|
|
6980
|
+
const esm_isWritable = (s)=>!!s && 'object' == typeof s && s instanceof external_node_events_namespaceObject.EventEmitter && 'function' == typeof s.write && 'function' == typeof s.end;
|
|
6981
|
+
const esm_EOF = Symbol('EOF');
|
|
6982
|
+
const esm_MAYBE_EMIT_END = Symbol('maybeEmitEnd');
|
|
6983
|
+
const esm_EMITTED_END = Symbol('emittedEnd');
|
|
6984
|
+
const esm_EMITTING_END = Symbol('emittingEnd');
|
|
6985
|
+
const esm_EMITTED_ERROR = Symbol('emittedError');
|
|
6986
|
+
const esm_CLOSED = Symbol('closed');
|
|
6987
|
+
const esm_READ = Symbol('read');
|
|
6988
|
+
const esm_FLUSH = Symbol('flush');
|
|
6989
|
+
const esm_FLUSHCHUNK = Symbol('flushChunk');
|
|
6990
|
+
const esm_ENCODING = Symbol('encoding');
|
|
6991
|
+
const esm_DECODER = Symbol('decoder');
|
|
6992
|
+
const esm_FLOWING = Symbol('flowing');
|
|
6993
|
+
const esm_PAUSED = Symbol('paused');
|
|
6994
|
+
const esm_RESUME = Symbol('resume');
|
|
6995
|
+
const esm_BUFFER = Symbol('buffer');
|
|
6996
|
+
const esm_PIPES = Symbol('pipes');
|
|
6997
|
+
const esm_BUFFERLENGTH = Symbol('bufferLength');
|
|
6998
|
+
const esm_BUFFERPUSH = Symbol('bufferPush');
|
|
6999
|
+
const esm_BUFFERSHIFT = Symbol('bufferShift');
|
|
7000
|
+
const esm_OBJECTMODE = Symbol('objectMode');
|
|
7001
|
+
const esm_DESTROYED = Symbol('destroyed');
|
|
7002
|
+
const esm_ERROR = Symbol('error');
|
|
7003
|
+
const esm_EMITDATA = Symbol('emitData');
|
|
7004
|
+
const esm_EMITEND = Symbol('emitEnd');
|
|
7005
|
+
const esm_EMITEND2 = Symbol('emitEnd2');
|
|
7006
|
+
const esm_ASYNC = Symbol('async');
|
|
7007
|
+
const esm_ABORT = Symbol('abort');
|
|
7008
|
+
const esm_ABORTED = Symbol('aborted');
|
|
7009
|
+
const esm_SIGNAL = Symbol('signal');
|
|
7010
|
+
const esm_DATALISTENERS = Symbol('dataListeners');
|
|
7011
|
+
const esm_DISCARDED = Symbol('discarded');
|
|
7012
|
+
const esm_defer = (fn)=>Promise.resolve().then(fn);
|
|
7013
|
+
const esm_nodefer = (fn)=>fn();
|
|
7014
|
+
const esm_isEndish = (ev)=>'end' === ev || 'finish' === ev || 'prefinish' === ev;
|
|
7015
|
+
const esm_isArrayBufferLike = (b)=>b instanceof ArrayBuffer || !!b && 'object' == typeof b && b.constructor && 'ArrayBuffer' === b.constructor.name && b.byteLength >= 0;
|
|
7016
|
+
const esm_isArrayBufferView = (b)=>!Buffer.isBuffer(b) && ArrayBuffer.isView(b);
|
|
7017
|
+
class esm_Pipe {
|
|
7018
|
+
src;
|
|
7019
|
+
dest;
|
|
7020
|
+
opts;
|
|
7021
|
+
ondrain;
|
|
7022
|
+
constructor(src, dest, opts){
|
|
7023
|
+
this.src = src;
|
|
7024
|
+
this.dest = dest;
|
|
7025
|
+
this.opts = opts;
|
|
7026
|
+
this.ondrain = ()=>src[esm_RESUME]();
|
|
7027
|
+
this.dest.on('drain', this.ondrain);
|
|
7028
|
+
}
|
|
7029
|
+
unpipe() {
|
|
7030
|
+
this.dest.removeListener('drain', this.ondrain);
|
|
7031
|
+
}
|
|
7032
|
+
proxyErrors(_er) {}
|
|
7033
|
+
end() {
|
|
7034
|
+
this.unpipe();
|
|
7035
|
+
if (this.opts.end) this.dest.end();
|
|
7036
|
+
}
|
|
7037
|
+
}
|
|
7038
|
+
class esm_PipeProxyErrors extends esm_Pipe {
|
|
7039
|
+
unpipe() {
|
|
7040
|
+
this.src.removeListener('error', this.proxyErrors);
|
|
7041
|
+
super.unpipe();
|
|
7042
|
+
}
|
|
7043
|
+
constructor(src, dest, opts){
|
|
7044
|
+
super(src, dest, opts);
|
|
7045
|
+
this.proxyErrors = (er)=>dest.emit('error', er);
|
|
7046
|
+
src.on('error', this.proxyErrors);
|
|
7047
|
+
}
|
|
7048
|
+
}
|
|
7049
|
+
const esm_isObjectModeOptions = (o)=>!!o.objectMode;
|
|
7050
|
+
const esm_isEncodingOptions = (o)=>!o.objectMode && !!o.encoding && 'buffer' !== o.encoding;
|
|
7051
|
+
class esm_Minipass extends external_node_events_namespaceObject.EventEmitter {
|
|
7052
|
+
[esm_FLOWING] = false;
|
|
7053
|
+
[esm_PAUSED] = false;
|
|
7054
|
+
[esm_PIPES] = [];
|
|
7055
|
+
[esm_BUFFER] = [];
|
|
7056
|
+
[esm_OBJECTMODE];
|
|
7057
|
+
[esm_ENCODING];
|
|
7058
|
+
[esm_ASYNC];
|
|
7059
|
+
[esm_DECODER];
|
|
7060
|
+
[esm_EOF] = false;
|
|
7061
|
+
[esm_EMITTED_END] = false;
|
|
7062
|
+
[esm_EMITTING_END] = false;
|
|
7063
|
+
[esm_CLOSED] = false;
|
|
7064
|
+
[esm_EMITTED_ERROR] = null;
|
|
7065
|
+
[esm_BUFFERLENGTH] = 0;
|
|
7066
|
+
[esm_DESTROYED] = false;
|
|
7067
|
+
[esm_SIGNAL];
|
|
7068
|
+
[esm_ABORTED] = false;
|
|
7069
|
+
[esm_DATALISTENERS] = 0;
|
|
7070
|
+
[esm_DISCARDED] = false;
|
|
7071
|
+
writable = true;
|
|
7072
|
+
readable = true;
|
|
7073
|
+
constructor(...args){
|
|
7074
|
+
const options = args[0] || {};
|
|
7075
|
+
super();
|
|
7076
|
+
if (options.objectMode && 'string' == typeof options.encoding) throw new TypeError('Encoding and objectMode may not be used together');
|
|
7077
|
+
if (esm_isObjectModeOptions(options)) {
|
|
7078
|
+
this[esm_OBJECTMODE] = true;
|
|
7079
|
+
this[esm_ENCODING] = null;
|
|
7080
|
+
} else if (esm_isEncodingOptions(options)) {
|
|
7081
|
+
this[esm_ENCODING] = options.encoding;
|
|
7082
|
+
this[esm_OBJECTMODE] = false;
|
|
7083
|
+
} else {
|
|
7084
|
+
this[esm_OBJECTMODE] = false;
|
|
7085
|
+
this[esm_ENCODING] = null;
|
|
7086
|
+
}
|
|
7087
|
+
this[esm_ASYNC] = !!options.async;
|
|
7088
|
+
this[esm_DECODER] = this[esm_ENCODING] ? new external_node_string_decoder_namespaceObject.StringDecoder(this[esm_ENCODING]) : null;
|
|
7089
|
+
if (options && true === options.debugExposeBuffer) Object.defineProperty(this, 'buffer', {
|
|
7090
|
+
get: ()=>this[esm_BUFFER]
|
|
7091
|
+
});
|
|
7092
|
+
if (options && true === options.debugExposePipes) Object.defineProperty(this, 'pipes', {
|
|
7093
|
+
get: ()=>this[esm_PIPES]
|
|
7094
|
+
});
|
|
7095
|
+
const { signal } = options;
|
|
7096
|
+
if (signal) {
|
|
7097
|
+
this[esm_SIGNAL] = signal;
|
|
7098
|
+
if (signal.aborted) this[esm_ABORT]();
|
|
7099
|
+
else signal.addEventListener('abort', ()=>this[esm_ABORT]());
|
|
7100
|
+
}
|
|
7101
|
+
}
|
|
7102
|
+
get bufferLength() {
|
|
7103
|
+
return this[esm_BUFFERLENGTH];
|
|
7104
|
+
}
|
|
7105
|
+
get encoding() {
|
|
7106
|
+
return this[esm_ENCODING];
|
|
7107
|
+
}
|
|
7108
|
+
set encoding(_enc) {
|
|
7109
|
+
throw new Error('Encoding must be set at instantiation time');
|
|
7110
|
+
}
|
|
7111
|
+
setEncoding(_enc) {
|
|
7112
|
+
throw new Error('Encoding must be set at instantiation time');
|
|
7113
|
+
}
|
|
7114
|
+
get objectMode() {
|
|
7115
|
+
return this[esm_OBJECTMODE];
|
|
7116
|
+
}
|
|
7117
|
+
set objectMode(_om) {
|
|
7118
|
+
throw new Error('objectMode must be set at instantiation time');
|
|
7119
|
+
}
|
|
7120
|
+
get ['async']() {
|
|
7121
|
+
return this[esm_ASYNC];
|
|
7122
|
+
}
|
|
7123
|
+
set ['async'](a) {
|
|
7124
|
+
this[esm_ASYNC] = this[esm_ASYNC] || !!a;
|
|
7125
|
+
}
|
|
7126
|
+
[esm_ABORT]() {
|
|
7127
|
+
this[esm_ABORTED] = true;
|
|
7128
|
+
this.emit('abort', this[esm_SIGNAL]?.reason);
|
|
7129
|
+
this.destroy(this[esm_SIGNAL]?.reason);
|
|
7130
|
+
}
|
|
7131
|
+
get aborted() {
|
|
7132
|
+
return this[esm_ABORTED];
|
|
7133
|
+
}
|
|
7134
|
+
set aborted(_) {}
|
|
7135
|
+
write(chunk, encoding, cb) {
|
|
7136
|
+
if (this[esm_ABORTED]) return false;
|
|
7137
|
+
if (this[esm_EOF]) throw new Error('write after end');
|
|
7138
|
+
if (this[esm_DESTROYED]) {
|
|
7139
|
+
this.emit('error', Object.assign(new Error('Cannot call write after a stream was destroyed'), {
|
|
7140
|
+
code: 'ERR_STREAM_DESTROYED'
|
|
7141
|
+
}));
|
|
7142
|
+
return true;
|
|
7143
|
+
}
|
|
7144
|
+
if ('function' == typeof encoding) {
|
|
7145
|
+
cb = encoding;
|
|
7146
|
+
encoding = 'utf8';
|
|
7147
|
+
}
|
|
7148
|
+
if (!encoding) encoding = 'utf8';
|
|
7149
|
+
const fn = this[esm_ASYNC] ? esm_defer : esm_nodefer;
|
|
7150
|
+
if (!this[esm_OBJECTMODE] && !Buffer.isBuffer(chunk)) {
|
|
7151
|
+
if (esm_isArrayBufferView(chunk)) chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength);
|
|
7152
|
+
else if (esm_isArrayBufferLike(chunk)) chunk = Buffer.from(chunk);
|
|
7153
|
+
else if ('string' != typeof chunk) throw new Error('Non-contiguous data written to non-objectMode stream');
|
|
7154
|
+
}
|
|
7155
|
+
if (this[esm_OBJECTMODE]) {
|
|
7156
|
+
if (this[esm_FLOWING] && 0 !== this[esm_BUFFERLENGTH]) this[esm_FLUSH](true);
|
|
7157
|
+
if (this[esm_FLOWING]) this.emit('data', chunk);
|
|
7158
|
+
else this[esm_BUFFERPUSH](chunk);
|
|
7159
|
+
if (0 !== this[esm_BUFFERLENGTH]) this.emit('readable');
|
|
7160
|
+
if (cb) fn(cb);
|
|
7161
|
+
return this[esm_FLOWING];
|
|
7162
|
+
}
|
|
7163
|
+
if (!chunk.length) {
|
|
7164
|
+
if (0 !== this[esm_BUFFERLENGTH]) this.emit('readable');
|
|
7165
|
+
if (cb) fn(cb);
|
|
7166
|
+
return this[esm_FLOWING];
|
|
7167
|
+
}
|
|
7168
|
+
if ('string' == typeof chunk && !(encoding === this[esm_ENCODING] && !this[esm_DECODER]?.lastNeed)) chunk = Buffer.from(chunk, encoding);
|
|
7169
|
+
if (Buffer.isBuffer(chunk) && this[esm_ENCODING]) chunk = this[esm_DECODER].write(chunk);
|
|
7170
|
+
if (this[esm_FLOWING] && 0 !== this[esm_BUFFERLENGTH]) this[esm_FLUSH](true);
|
|
7171
|
+
if (this[esm_FLOWING]) this.emit('data', chunk);
|
|
7172
|
+
else this[esm_BUFFERPUSH](chunk);
|
|
7173
|
+
if (0 !== this[esm_BUFFERLENGTH]) this.emit('readable');
|
|
7174
|
+
if (cb) fn(cb);
|
|
7175
|
+
return this[esm_FLOWING];
|
|
7176
|
+
}
|
|
7177
|
+
read(n) {
|
|
7178
|
+
if (this[esm_DESTROYED]) return null;
|
|
7179
|
+
this[esm_DISCARDED] = false;
|
|
7180
|
+
if (0 === this[esm_BUFFERLENGTH] || 0 === n || n && n > this[esm_BUFFERLENGTH]) {
|
|
7181
|
+
this[esm_MAYBE_EMIT_END]();
|
|
7182
|
+
return null;
|
|
7183
|
+
}
|
|
7184
|
+
if (this[esm_OBJECTMODE]) n = null;
|
|
7185
|
+
if (this[esm_BUFFER].length > 1 && !this[esm_OBJECTMODE]) this[esm_BUFFER] = [
|
|
7186
|
+
this[esm_ENCODING] ? this[esm_BUFFER].join('') : Buffer.concat(this[esm_BUFFER], this[esm_BUFFERLENGTH])
|
|
7187
|
+
];
|
|
7188
|
+
const ret = this[esm_READ](n || null, this[esm_BUFFER][0]);
|
|
7189
|
+
this[esm_MAYBE_EMIT_END]();
|
|
7190
|
+
return ret;
|
|
7191
|
+
}
|
|
7192
|
+
[esm_READ](n, chunk) {
|
|
7193
|
+
if (this[esm_OBJECTMODE]) this[esm_BUFFERSHIFT]();
|
|
7194
|
+
else {
|
|
7195
|
+
const c = chunk;
|
|
7196
|
+
if (n === c.length || null === n) this[esm_BUFFERSHIFT]();
|
|
7197
|
+
else if ('string' == typeof c) {
|
|
7198
|
+
this[esm_BUFFER][0] = c.slice(n);
|
|
7199
|
+
chunk = c.slice(0, n);
|
|
7200
|
+
this[esm_BUFFERLENGTH] -= n;
|
|
7201
|
+
} else {
|
|
7202
|
+
this[esm_BUFFER][0] = c.subarray(n);
|
|
7203
|
+
chunk = c.subarray(0, n);
|
|
7204
|
+
this[esm_BUFFERLENGTH] -= n;
|
|
7205
|
+
}
|
|
7206
|
+
}
|
|
7207
|
+
this.emit('data', chunk);
|
|
7208
|
+
if (!this[esm_BUFFER].length && !this[esm_EOF]) this.emit('drain');
|
|
7209
|
+
return chunk;
|
|
7210
|
+
}
|
|
7211
|
+
end(chunk, encoding, cb) {
|
|
7212
|
+
if ('function' == typeof chunk) {
|
|
7213
|
+
cb = chunk;
|
|
7214
|
+
chunk = void 0;
|
|
7215
|
+
}
|
|
7216
|
+
if ('function' == typeof encoding) {
|
|
7217
|
+
cb = encoding;
|
|
7218
|
+
encoding = 'utf8';
|
|
7219
|
+
}
|
|
7220
|
+
if (void 0 !== chunk) this.write(chunk, encoding);
|
|
7221
|
+
if (cb) this.once('end', cb);
|
|
7222
|
+
this[esm_EOF] = true;
|
|
7223
|
+
this.writable = false;
|
|
7224
|
+
if (this[esm_FLOWING] || !this[esm_PAUSED]) this[esm_MAYBE_EMIT_END]();
|
|
7225
|
+
return this;
|
|
7226
|
+
}
|
|
7227
|
+
[esm_RESUME]() {
|
|
7228
|
+
if (this[esm_DESTROYED]) return;
|
|
7229
|
+
if (!this[esm_DATALISTENERS] && !this[esm_PIPES].length) this[esm_DISCARDED] = true;
|
|
7230
|
+
this[esm_PAUSED] = false;
|
|
7231
|
+
this[esm_FLOWING] = true;
|
|
7232
|
+
this.emit('resume');
|
|
7233
|
+
if (this[esm_BUFFER].length) this[esm_FLUSH]();
|
|
7234
|
+
else if (this[esm_EOF]) this[esm_MAYBE_EMIT_END]();
|
|
7235
|
+
else this.emit('drain');
|
|
7236
|
+
}
|
|
7237
|
+
resume() {
|
|
7238
|
+
return this[esm_RESUME]();
|
|
7239
|
+
}
|
|
7240
|
+
pause() {
|
|
7241
|
+
this[esm_FLOWING] = false;
|
|
7242
|
+
this[esm_PAUSED] = true;
|
|
7243
|
+
this[esm_DISCARDED] = false;
|
|
7244
|
+
}
|
|
7245
|
+
get destroyed() {
|
|
7246
|
+
return this[esm_DESTROYED];
|
|
7247
|
+
}
|
|
7248
|
+
get flowing() {
|
|
7249
|
+
return this[esm_FLOWING];
|
|
7250
|
+
}
|
|
7251
|
+
get paused() {
|
|
7252
|
+
return this[esm_PAUSED];
|
|
7253
|
+
}
|
|
7254
|
+
[esm_BUFFERPUSH](chunk) {
|
|
7255
|
+
if (this[esm_OBJECTMODE]) this[esm_BUFFERLENGTH] += 1;
|
|
7256
|
+
else this[esm_BUFFERLENGTH] += chunk.length;
|
|
7257
|
+
this[esm_BUFFER].push(chunk);
|
|
7258
|
+
}
|
|
7259
|
+
[esm_BUFFERSHIFT]() {
|
|
7260
|
+
if (this[esm_OBJECTMODE]) this[esm_BUFFERLENGTH] -= 1;
|
|
7261
|
+
else this[esm_BUFFERLENGTH] -= this[esm_BUFFER][0].length;
|
|
7262
|
+
return this[esm_BUFFER].shift();
|
|
7263
|
+
}
|
|
7264
|
+
[esm_FLUSH](noDrain = false) {
|
|
7265
|
+
do ;
|
|
7266
|
+
while (this[esm_FLUSHCHUNK](this[esm_BUFFERSHIFT]()) && this[esm_BUFFER].length);
|
|
7267
|
+
if (!noDrain && !this[esm_BUFFER].length && !this[esm_EOF]) this.emit('drain');
|
|
7268
|
+
}
|
|
7269
|
+
[esm_FLUSHCHUNK](chunk) {
|
|
7270
|
+
this.emit('data', chunk);
|
|
7271
|
+
return this[esm_FLOWING];
|
|
7272
|
+
}
|
|
7273
|
+
pipe(dest, opts) {
|
|
7274
|
+
if (this[esm_DESTROYED]) return dest;
|
|
7275
|
+
this[esm_DISCARDED] = false;
|
|
7276
|
+
const ended = this[esm_EMITTED_END];
|
|
7277
|
+
opts = opts || {};
|
|
7278
|
+
if (dest === esm_proc.stdout || dest === esm_proc.stderr) opts.end = false;
|
|
7279
|
+
else opts.end = false !== opts.end;
|
|
7280
|
+
opts.proxyErrors = !!opts.proxyErrors;
|
|
7281
|
+
if (ended) {
|
|
7282
|
+
if (opts.end) dest.end();
|
|
7283
|
+
} else {
|
|
7284
|
+
this[esm_PIPES].push(opts.proxyErrors ? new esm_PipeProxyErrors(this, dest, opts) : new esm_Pipe(this, dest, opts));
|
|
7285
|
+
if (this[esm_ASYNC]) esm_defer(()=>this[esm_RESUME]());
|
|
7286
|
+
else this[esm_RESUME]();
|
|
7287
|
+
}
|
|
7288
|
+
return dest;
|
|
7289
|
+
}
|
|
7290
|
+
unpipe(dest) {
|
|
7291
|
+
const p = this[esm_PIPES].find((p)=>p.dest === dest);
|
|
7292
|
+
if (p) {
|
|
7293
|
+
if (1 === this[esm_PIPES].length) {
|
|
7294
|
+
if (this[esm_FLOWING] && 0 === this[esm_DATALISTENERS]) this[esm_FLOWING] = false;
|
|
7295
|
+
this[esm_PIPES] = [];
|
|
7296
|
+
} else this[esm_PIPES].splice(this[esm_PIPES].indexOf(p), 1);
|
|
7297
|
+
p.unpipe();
|
|
7298
|
+
}
|
|
7299
|
+
}
|
|
7300
|
+
addListener(ev, handler) {
|
|
7301
|
+
return this.on(ev, handler);
|
|
7302
|
+
}
|
|
7303
|
+
on(ev, handler) {
|
|
7304
|
+
const ret = super.on(ev, handler);
|
|
7305
|
+
if ('data' === ev) {
|
|
7306
|
+
this[esm_DISCARDED] = false;
|
|
7307
|
+
this[esm_DATALISTENERS]++;
|
|
7308
|
+
if (!this[esm_PIPES].length && !this[esm_FLOWING]) this[esm_RESUME]();
|
|
7309
|
+
} else if ('readable' === ev && 0 !== this[esm_BUFFERLENGTH]) super.emit('readable');
|
|
7310
|
+
else if (esm_isEndish(ev) && this[esm_EMITTED_END]) {
|
|
7311
|
+
super.emit(ev);
|
|
7312
|
+
this.removeAllListeners(ev);
|
|
7313
|
+
} else if ('error' === ev && this[esm_EMITTED_ERROR]) {
|
|
7314
|
+
const h = handler;
|
|
7315
|
+
if (this[esm_ASYNC]) esm_defer(()=>h.call(this, this[esm_EMITTED_ERROR]));
|
|
7316
|
+
else h.call(this, this[esm_EMITTED_ERROR]);
|
|
7317
|
+
}
|
|
7318
|
+
return ret;
|
|
7319
|
+
}
|
|
7320
|
+
removeListener(ev, handler) {
|
|
7321
|
+
return this.off(ev, handler);
|
|
7322
|
+
}
|
|
7323
|
+
off(ev, handler) {
|
|
7324
|
+
const ret = super.off(ev, handler);
|
|
7325
|
+
if ('data' === ev) {
|
|
7326
|
+
this[esm_DATALISTENERS] = this.listeners('data').length;
|
|
7327
|
+
if (0 === this[esm_DATALISTENERS] && !this[esm_DISCARDED] && !this[esm_PIPES].length) this[esm_FLOWING] = false;
|
|
7328
|
+
}
|
|
7329
|
+
return ret;
|
|
7330
|
+
}
|
|
7331
|
+
removeAllListeners(ev) {
|
|
7332
|
+
const ret = super.removeAllListeners(ev);
|
|
7333
|
+
if ('data' === ev || void 0 === ev) {
|
|
7334
|
+
this[esm_DATALISTENERS] = 0;
|
|
7335
|
+
if (!this[esm_DISCARDED] && !this[esm_PIPES].length) this[esm_FLOWING] = false;
|
|
7336
|
+
}
|
|
7337
|
+
return ret;
|
|
7338
|
+
}
|
|
7339
|
+
get emittedEnd() {
|
|
7340
|
+
return this[esm_EMITTED_END];
|
|
7341
|
+
}
|
|
7342
|
+
[esm_MAYBE_EMIT_END]() {
|
|
7343
|
+
if (!this[esm_EMITTING_END] && !this[esm_EMITTED_END] && !this[esm_DESTROYED] && 0 === this[esm_BUFFER].length && this[esm_EOF]) {
|
|
7344
|
+
this[esm_EMITTING_END] = true;
|
|
7345
|
+
this.emit('end');
|
|
7346
|
+
this.emit('prefinish');
|
|
7347
|
+
this.emit('finish');
|
|
7348
|
+
if (this[esm_CLOSED]) this.emit('close');
|
|
7349
|
+
this[esm_EMITTING_END] = false;
|
|
7350
|
+
}
|
|
7351
|
+
}
|
|
7352
|
+
emit(ev, ...args) {
|
|
7353
|
+
const data = args[0];
|
|
7354
|
+
if ('error' !== ev && 'close' !== ev && ev !== esm_DESTROYED && this[esm_DESTROYED]) return false;
|
|
7355
|
+
if ('data' === ev) return this[esm_OBJECTMODE] || data ? this[esm_ASYNC] ? (esm_defer(()=>this[esm_EMITDATA](data)), true) : this[esm_EMITDATA](data) : false;
|
|
7356
|
+
if ('end' === ev) return this[esm_EMITEND]();
|
|
7357
|
+
if ('close' === ev) {
|
|
7358
|
+
this[esm_CLOSED] = true;
|
|
7359
|
+
if (!this[esm_EMITTED_END] && !this[esm_DESTROYED]) return false;
|
|
7360
|
+
const ret = super.emit('close');
|
|
7361
|
+
this.removeAllListeners('close');
|
|
7362
|
+
return ret;
|
|
7363
|
+
}
|
|
7364
|
+
if ('error' === ev) {
|
|
7365
|
+
this[esm_EMITTED_ERROR] = data;
|
|
7366
|
+
super.emit(esm_ERROR, data);
|
|
7367
|
+
const ret = !this[esm_SIGNAL] || this.listeners('error').length ? super.emit('error', data) : false;
|
|
7368
|
+
this[esm_MAYBE_EMIT_END]();
|
|
7369
|
+
return ret;
|
|
7370
|
+
} else if ('resume' === ev) {
|
|
7371
|
+
const ret = super.emit('resume');
|
|
7372
|
+
this[esm_MAYBE_EMIT_END]();
|
|
7373
|
+
return ret;
|
|
7374
|
+
} else if ('finish' === ev || 'prefinish' === ev) {
|
|
7375
|
+
const ret = super.emit(ev);
|
|
7376
|
+
this.removeAllListeners(ev);
|
|
7377
|
+
return ret;
|
|
7378
|
+
}
|
|
7379
|
+
const ret = super.emit(ev, ...args);
|
|
7380
|
+
this[esm_MAYBE_EMIT_END]();
|
|
7381
|
+
return ret;
|
|
7382
|
+
}
|
|
7383
|
+
[esm_EMITDATA](data) {
|
|
7384
|
+
for (const p of this[esm_PIPES])if (false === p.dest.write(data)) this.pause();
|
|
7385
|
+
const ret = this[esm_DISCARDED] ? false : super.emit('data', data);
|
|
7386
|
+
this[esm_MAYBE_EMIT_END]();
|
|
7387
|
+
return ret;
|
|
7388
|
+
}
|
|
7389
|
+
[esm_EMITEND]() {
|
|
7390
|
+
if (this[esm_EMITTED_END]) return false;
|
|
7391
|
+
this[esm_EMITTED_END] = true;
|
|
7392
|
+
this.readable = false;
|
|
7393
|
+
return this[esm_ASYNC] ? (esm_defer(()=>this[esm_EMITEND2]()), true) : this[esm_EMITEND2]();
|
|
7394
|
+
}
|
|
7395
|
+
[esm_EMITEND2]() {
|
|
7396
|
+
if (this[esm_DECODER]) {
|
|
7397
|
+
const data = this[esm_DECODER].end();
|
|
7398
|
+
if (data) {
|
|
7399
|
+
for (const p of this[esm_PIPES])p.dest.write(data);
|
|
7400
|
+
if (!this[esm_DISCARDED]) super.emit('data', data);
|
|
7401
|
+
}
|
|
7402
|
+
}
|
|
7403
|
+
for (const p of this[esm_PIPES])p.end();
|
|
7404
|
+
const ret = super.emit('end');
|
|
7405
|
+
this.removeAllListeners('end');
|
|
7406
|
+
return ret;
|
|
7407
|
+
}
|
|
7408
|
+
async collect() {
|
|
7409
|
+
const buf = Object.assign([], {
|
|
7410
|
+
dataLength: 0
|
|
7411
|
+
});
|
|
7412
|
+
if (!this[esm_OBJECTMODE]) buf.dataLength = 0;
|
|
7413
|
+
const p = this.promise();
|
|
7414
|
+
this.on('data', (c)=>{
|
|
7415
|
+
buf.push(c);
|
|
7416
|
+
if (!this[esm_OBJECTMODE]) buf.dataLength += c.length;
|
|
7417
|
+
});
|
|
7418
|
+
await p;
|
|
7419
|
+
return buf;
|
|
7420
|
+
}
|
|
7421
|
+
async concat() {
|
|
7422
|
+
if (this[esm_OBJECTMODE]) throw new Error('cannot concat in objectMode');
|
|
7423
|
+
const buf = await this.collect();
|
|
7424
|
+
return this[esm_ENCODING] ? buf.join('') : Buffer.concat(buf, buf.dataLength);
|
|
7425
|
+
}
|
|
7426
|
+
async promise() {
|
|
7427
|
+
return new Promise((resolve, reject)=>{
|
|
7428
|
+
this.on(esm_DESTROYED, ()=>reject(new Error('stream destroyed')));
|
|
7429
|
+
this.on('error', (er)=>reject(er));
|
|
7430
|
+
this.on('end', ()=>resolve());
|
|
7431
|
+
});
|
|
7432
|
+
}
|
|
7433
|
+
[Symbol.asyncIterator]() {
|
|
7434
|
+
this[esm_DISCARDED] = false;
|
|
7435
|
+
let stopped = false;
|
|
7436
|
+
const stop = async ()=>{
|
|
7437
|
+
this.pause();
|
|
7438
|
+
stopped = true;
|
|
7439
|
+
return {
|
|
7440
|
+
value: void 0,
|
|
7441
|
+
done: true
|
|
7442
|
+
};
|
|
7443
|
+
};
|
|
7444
|
+
const next = ()=>{
|
|
7445
|
+
if (stopped) return stop();
|
|
7446
|
+
const res = this.read();
|
|
7447
|
+
if (null !== res) return Promise.resolve({
|
|
7448
|
+
done: false,
|
|
7449
|
+
value: res
|
|
7450
|
+
});
|
|
7451
|
+
if (this[esm_EOF]) return stop();
|
|
7452
|
+
let resolve;
|
|
7453
|
+
let reject;
|
|
7454
|
+
const onerr = (er)=>{
|
|
7455
|
+
this.off('data', ondata);
|
|
7456
|
+
this.off('end', onend);
|
|
7457
|
+
this.off(esm_DESTROYED, ondestroy);
|
|
7458
|
+
stop();
|
|
7459
|
+
reject(er);
|
|
7460
|
+
};
|
|
7461
|
+
const ondata = (value)=>{
|
|
7462
|
+
this.off('error', onerr);
|
|
7463
|
+
this.off('end', onend);
|
|
7464
|
+
this.off(esm_DESTROYED, ondestroy);
|
|
7465
|
+
this.pause();
|
|
7466
|
+
resolve({
|
|
7467
|
+
value,
|
|
7468
|
+
done: !!this[esm_EOF]
|
|
7469
|
+
});
|
|
7470
|
+
};
|
|
7471
|
+
const onend = ()=>{
|
|
7472
|
+
this.off('error', onerr);
|
|
7473
|
+
this.off('data', ondata);
|
|
7474
|
+
this.off(esm_DESTROYED, ondestroy);
|
|
7475
|
+
stop();
|
|
7476
|
+
resolve({
|
|
7477
|
+
done: true,
|
|
7478
|
+
value: void 0
|
|
7479
|
+
});
|
|
7480
|
+
};
|
|
7481
|
+
const ondestroy = ()=>onerr(new Error('stream destroyed'));
|
|
7482
|
+
return new Promise((res, rej)=>{
|
|
7483
|
+
reject = rej;
|
|
7484
|
+
resolve = res;
|
|
7485
|
+
this.once(esm_DESTROYED, ondestroy);
|
|
7486
|
+
this.once('error', onerr);
|
|
7487
|
+
this.once('end', onend);
|
|
7488
|
+
this.once('data', ondata);
|
|
7489
|
+
});
|
|
7490
|
+
};
|
|
7491
|
+
return {
|
|
7492
|
+
next,
|
|
7493
|
+
throw: stop,
|
|
7494
|
+
return: stop,
|
|
7495
|
+
[Symbol.asyncIterator] () {
|
|
7496
|
+
return this;
|
|
7497
|
+
}
|
|
7498
|
+
};
|
|
7499
|
+
}
|
|
7500
|
+
[Symbol.iterator]() {
|
|
7501
|
+
this[esm_DISCARDED] = false;
|
|
7502
|
+
let stopped = false;
|
|
7503
|
+
const stop = ()=>{
|
|
7504
|
+
this.pause();
|
|
7505
|
+
this.off(esm_ERROR, stop);
|
|
7506
|
+
this.off(esm_DESTROYED, stop);
|
|
7507
|
+
this.off('end', stop);
|
|
7508
|
+
stopped = true;
|
|
7509
|
+
return {
|
|
7510
|
+
done: true,
|
|
7511
|
+
value: void 0
|
|
7512
|
+
};
|
|
7513
|
+
};
|
|
7514
|
+
const next = ()=>{
|
|
7515
|
+
if (stopped) return stop();
|
|
7516
|
+
const value = this.read();
|
|
7517
|
+
return null === value ? stop() : {
|
|
7518
|
+
done: false,
|
|
7519
|
+
value
|
|
7520
|
+
};
|
|
7521
|
+
};
|
|
7522
|
+
this.once('end', stop);
|
|
7523
|
+
this.once(esm_ERROR, stop);
|
|
7524
|
+
this.once(esm_DESTROYED, stop);
|
|
7525
|
+
return {
|
|
7526
|
+
next,
|
|
7527
|
+
throw: stop,
|
|
7528
|
+
return: stop,
|
|
7529
|
+
[Symbol.iterator] () {
|
|
7530
|
+
return this;
|
|
7531
|
+
}
|
|
7532
|
+
};
|
|
7533
|
+
}
|
|
7534
|
+
destroy(er) {
|
|
7535
|
+
if (this[esm_DESTROYED]) {
|
|
7536
|
+
if (er) this.emit('error', er);
|
|
7537
|
+
else this.emit(esm_DESTROYED);
|
|
7538
|
+
return this;
|
|
7539
|
+
}
|
|
7540
|
+
this[esm_DESTROYED] = true;
|
|
7541
|
+
this[esm_DISCARDED] = true;
|
|
7542
|
+
this[esm_BUFFER].length = 0;
|
|
7543
|
+
this[esm_BUFFERLENGTH] = 0;
|
|
7544
|
+
const wc = this;
|
|
7545
|
+
if ('function' == typeof wc.close && !this[esm_CLOSED]) wc.close();
|
|
7546
|
+
if (er) this.emit('error', er);
|
|
7547
|
+
else this.emit(esm_DESTROYED);
|
|
7548
|
+
return this;
|
|
7549
|
+
}
|
|
7550
|
+
static get isStream() {
|
|
7551
|
+
return esm_isStream;
|
|
7552
|
+
}
|
|
7553
|
+
}
|
|
7222
7554
|
const ignore_defaultPlatform = 'object' == typeof process && process && 'string' == typeof process.platform ? process.platform : 'linux';
|
|
7223
7555
|
class Ignore {
|
|
7224
7556
|
relative;
|
|
@@ -7697,7 +8029,7 @@ defineYamlBatchTest(${JSON.stringify(testOptions, null, 2)});
|
|
|
7697
8029
|
results;
|
|
7698
8030
|
constructor(patterns, path, opts){
|
|
7699
8031
|
super(patterns, path, opts);
|
|
7700
|
-
this.results = new
|
|
8032
|
+
this.results = new esm_Minipass({
|
|
7701
8033
|
signal: this.signal,
|
|
7702
8034
|
objectMode: true
|
|
7703
8035
|
});
|
|
@@ -11210,7 +11542,7 @@ Usage:
|
|
|
11210
11542
|
type: 'boolean',
|
|
11211
11543
|
description: `Turn on logging to help debug why certain keys or values are not being set as you expect, default is ${config_factory_defaultConfig.dotenvDebug}`
|
|
11212
11544
|
}
|
|
11213
|
-
}).version('version', 'Show version number', "1.8.
|
|
11545
|
+
}).version('version', 'Show version number', "1.8.10-beta-20260604215059.0").help().epilogue(`For complete list of configuration options, please visit:
|
|
11214
11546
|
• Web options: https://midscenejs.com/automate-with-scripts-in-yaml#the-web-part
|
|
11215
11547
|
• Android options: https://midscenejs.com/automate-with-scripts-in-yaml#the-android-part
|
|
11216
11548
|
• iOS options: https://midscenejs.com/automate-with-scripts-in-yaml#the-ios-part
|