@forsakringskassan/vite-lib-config 1.7.12 → 1.8.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/bin/{build-vue-lib.js → build-vue-lib.mjs} +1 -1
- package/dist/api-extractor.js +69 -96
- package/dist/{cli.js → cli.mjs} +26 -29
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/{vite.config.js → vite.config.cjs} +110 -158
- package/dist/vite.config.mjs +12518 -0
- package/package.json +7 -6
package/dist/api-extractor.js
CHANGED
|
@@ -2718,20 +2718,18 @@ var AST = class _AST {
|
|
|
2718
2718
|
}
|
|
2719
2719
|
}
|
|
2720
2720
|
toJSON() {
|
|
2721
|
-
var _a2;
|
|
2722
2721
|
const ret = this.type === null ? this.#parts.slice().map((p) => typeof p === "string" ? p : p.toJSON()) : [this.type, ...this.#parts.map((p) => p.toJSON())];
|
|
2723
2722
|
if (this.isStart() && !this.type)
|
|
2724
2723
|
ret.unshift([]);
|
|
2725
|
-
if (this.isEnd() && (this === this.#root || this.#root.#filledNegs &&
|
|
2724
|
+
if (this.isEnd() && (this === this.#root || this.#root.#filledNegs && this.#parent?.type === "!")) {
|
|
2726
2725
|
ret.push({});
|
|
2727
2726
|
}
|
|
2728
2727
|
return ret;
|
|
2729
2728
|
}
|
|
2730
2729
|
isStart() {
|
|
2731
|
-
var _a2;
|
|
2732
2730
|
if (this.#root === this)
|
|
2733
2731
|
return true;
|
|
2734
|
-
if (!
|
|
2732
|
+
if (!this.#parent?.isStart())
|
|
2735
2733
|
return false;
|
|
2736
2734
|
if (this.#parentIndex === 0)
|
|
2737
2735
|
return true;
|
|
@@ -2745,15 +2743,14 @@ var AST = class _AST {
|
|
|
2745
2743
|
return true;
|
|
2746
2744
|
}
|
|
2747
2745
|
isEnd() {
|
|
2748
|
-
var _a2, _b, _c;
|
|
2749
2746
|
if (this.#root === this)
|
|
2750
2747
|
return true;
|
|
2751
|
-
if (
|
|
2748
|
+
if (this.#parent?.type === "!")
|
|
2752
2749
|
return true;
|
|
2753
|
-
if (!
|
|
2750
|
+
if (!this.#parent?.isEnd())
|
|
2754
2751
|
return false;
|
|
2755
2752
|
if (!this.type)
|
|
2756
|
-
return
|
|
2753
|
+
return this.#parent?.isEnd();
|
|
2757
2754
|
const pl = this.#parent ? this.#parent.#parts.length : 0;
|
|
2758
2755
|
return this.#parentIndex === pl - 1;
|
|
2759
2756
|
}
|
|
@@ -2969,7 +2966,6 @@ var AST = class _AST {
|
|
|
2969
2966
|
// is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
|
|
2970
2967
|
// or start or whatever) and prepend ^ or / at the Regexp construction.
|
|
2971
2968
|
toRegExpSource(allowDot) {
|
|
2972
|
-
var _a2;
|
|
2973
2969
|
const dot = allowDot ?? !!this.#options.dot;
|
|
2974
2970
|
if (this.#root === this)
|
|
2975
2971
|
this.#fillNegs();
|
|
@@ -2999,7 +2995,7 @@ var AST = class _AST {
|
|
|
2999
2995
|
}
|
|
3000
2996
|
}
|
|
3001
2997
|
let end = "";
|
|
3002
|
-
if (this.isEnd() && this.#root.#filledNegs &&
|
|
2998
|
+
if (this.isEnd() && this.#root.#filledNegs && this.#parent?.type === "!") {
|
|
3003
2999
|
end = "(?:$|\\/)";
|
|
3004
3000
|
}
|
|
3005
3001
|
const final2 = start2 + src + end;
|
|
@@ -3837,7 +3833,6 @@ var emitWarning = (msg, type, code, fn) => {
|
|
|
3837
3833
|
};
|
|
3838
3834
|
var AC = globalThis.AbortController;
|
|
3839
3835
|
var AS = globalThis.AbortSignal;
|
|
3840
|
-
var _a;
|
|
3841
3836
|
if (typeof AC === "undefined") {
|
|
3842
3837
|
AS = class AbortSignal {
|
|
3843
3838
|
onabort;
|
|
@@ -3854,7 +3849,6 @@ if (typeof AC === "undefined") {
|
|
|
3854
3849
|
}
|
|
3855
3850
|
signal = new AS();
|
|
3856
3851
|
abort(reason) {
|
|
3857
|
-
var _a2, _b;
|
|
3858
3852
|
if (this.signal.aborted)
|
|
3859
3853
|
return;
|
|
3860
3854
|
this.signal.reason = reason;
|
|
@@ -3862,10 +3856,10 @@ if (typeof AC === "undefined") {
|
|
|
3862
3856
|
for (const fn of this.signal._onabort) {
|
|
3863
3857
|
fn(reason);
|
|
3864
3858
|
}
|
|
3865
|
-
|
|
3859
|
+
this.signal.onabort?.(reason);
|
|
3866
3860
|
}
|
|
3867
3861
|
};
|
|
3868
|
-
let printACPolyfillWarning =
|
|
3862
|
+
let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1";
|
|
3869
3863
|
const warnACPolyfill = () => {
|
|
3870
3864
|
if (!printACPolyfillWarning)
|
|
3871
3865
|
return;
|
|
@@ -4558,7 +4552,6 @@ var LRUCache = class _LRUCache {
|
|
|
4558
4552
|
* {@link LRUCache#delete}
|
|
4559
4553
|
*/
|
|
4560
4554
|
set(k, v, setOptions = {}) {
|
|
4561
|
-
var _a2, _b, _c, _d, _e;
|
|
4562
4555
|
if (v === void 0) {
|
|
4563
4556
|
this.delete(k);
|
|
4564
4557
|
return this;
|
|
@@ -4597,18 +4590,18 @@ var LRUCache = class _LRUCache {
|
|
|
4597
4590
|
const { __staleWhileFetching: s } = oldVal;
|
|
4598
4591
|
if (s !== void 0 && !noDisposeOnSet) {
|
|
4599
4592
|
if (this.#hasDispose) {
|
|
4600
|
-
|
|
4593
|
+
this.#dispose?.(s, k, "set");
|
|
4601
4594
|
}
|
|
4602
4595
|
if (this.#hasDisposeAfter) {
|
|
4603
|
-
|
|
4596
|
+
this.#disposed?.push([s, k, "set"]);
|
|
4604
4597
|
}
|
|
4605
4598
|
}
|
|
4606
4599
|
} else if (!noDisposeOnSet) {
|
|
4607
4600
|
if (this.#hasDispose) {
|
|
4608
|
-
|
|
4601
|
+
this.#dispose?.(oldVal, k, "set");
|
|
4609
4602
|
}
|
|
4610
4603
|
if (this.#hasDisposeAfter) {
|
|
4611
|
-
|
|
4604
|
+
this.#disposed?.push([oldVal, k, "set"]);
|
|
4612
4605
|
}
|
|
4613
4606
|
}
|
|
4614
4607
|
this.#removeItemSize(index);
|
|
@@ -4637,8 +4630,8 @@ var LRUCache = class _LRUCache {
|
|
|
4637
4630
|
if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {
|
|
4638
4631
|
const dt = this.#disposed;
|
|
4639
4632
|
let task;
|
|
4640
|
-
while (task = dt
|
|
4641
|
-
|
|
4633
|
+
while (task = dt?.shift()) {
|
|
4634
|
+
this.#disposeAfter?.(...task);
|
|
4642
4635
|
}
|
|
4643
4636
|
}
|
|
4644
4637
|
return this;
|
|
@@ -4648,7 +4641,6 @@ var LRUCache = class _LRUCache {
|
|
|
4648
4641
|
* `undefined` if cache is empty.
|
|
4649
4642
|
*/
|
|
4650
4643
|
pop() {
|
|
4651
|
-
var _a2;
|
|
4652
4644
|
try {
|
|
4653
4645
|
while (this.#size) {
|
|
4654
4646
|
const val = this.#valList[this.#head];
|
|
@@ -4665,14 +4657,13 @@ var LRUCache = class _LRUCache {
|
|
|
4665
4657
|
if (this.#hasDisposeAfter && this.#disposed) {
|
|
4666
4658
|
const dt = this.#disposed;
|
|
4667
4659
|
let task;
|
|
4668
|
-
while (task = dt
|
|
4669
|
-
|
|
4660
|
+
while (task = dt?.shift()) {
|
|
4661
|
+
this.#disposeAfter?.(...task);
|
|
4670
4662
|
}
|
|
4671
4663
|
}
|
|
4672
4664
|
}
|
|
4673
4665
|
}
|
|
4674
4666
|
#evict(free) {
|
|
4675
|
-
var _a2, _b;
|
|
4676
4667
|
const head = this.#head;
|
|
4677
4668
|
const k = this.#keyList[head];
|
|
4678
4669
|
const v = this.#valList[head];
|
|
@@ -4680,10 +4671,10 @@ var LRUCache = class _LRUCache {
|
|
|
4680
4671
|
v.__abortController.abort(new Error("evicted"));
|
|
4681
4672
|
} else if (this.#hasDispose || this.#hasDisposeAfter) {
|
|
4682
4673
|
if (this.#hasDispose) {
|
|
4683
|
-
|
|
4674
|
+
this.#dispose?.(v, k, "evict");
|
|
4684
4675
|
}
|
|
4685
4676
|
if (this.#hasDisposeAfter) {
|
|
4686
|
-
|
|
4677
|
+
this.#disposed?.push([v, k, "evict"]);
|
|
4687
4678
|
}
|
|
4688
4679
|
}
|
|
4689
4680
|
this.#removeItemSize(head);
|
|
@@ -4759,7 +4750,7 @@ var LRUCache = class _LRUCache {
|
|
|
4759
4750
|
}
|
|
4760
4751
|
const ac = new AC();
|
|
4761
4752
|
const { signal } = options;
|
|
4762
|
-
signal
|
|
4753
|
+
signal?.addEventListener("abort", () => ac.abort(signal.reason), {
|
|
4763
4754
|
signal: ac.signal
|
|
4764
4755
|
});
|
|
4765
4756
|
const fetchOpts = {
|
|
@@ -4830,8 +4821,7 @@ var LRUCache = class _LRUCache {
|
|
|
4830
4821
|
}
|
|
4831
4822
|
};
|
|
4832
4823
|
const pcall = (res, rej) => {
|
|
4833
|
-
|
|
4834
|
-
const fmp = (_a2 = this.#fetchMethod) == null ? void 0 : _a2.call(this, k, v, fetchOpts);
|
|
4824
|
+
const fmp = this.#fetchMethod?.(k, v, fetchOpts);
|
|
4835
4825
|
if (fmp && fmp instanceof Promise) {
|
|
4836
4826
|
fmp.then((v2) => res(v2 === void 0 ? void 0 : v2), rej);
|
|
4837
4827
|
}
|
|
@@ -5020,7 +5010,6 @@ var LRUCache = class _LRUCache {
|
|
|
5020
5010
|
* Returns true if the key was deleted, false otherwise.
|
|
5021
5011
|
*/
|
|
5022
5012
|
delete(k) {
|
|
5023
|
-
var _a2, _b, _c, _d;
|
|
5024
5013
|
let deleted = false;
|
|
5025
5014
|
if (this.#size !== 0) {
|
|
5026
5015
|
const index = this.#keyMap.get(k);
|
|
@@ -5035,10 +5024,10 @@ var LRUCache = class _LRUCache {
|
|
|
5035
5024
|
v.__abortController.abort(new Error("deleted"));
|
|
5036
5025
|
} else if (this.#hasDispose || this.#hasDisposeAfter) {
|
|
5037
5026
|
if (this.#hasDispose) {
|
|
5038
|
-
|
|
5027
|
+
this.#dispose?.(v, k, "delete");
|
|
5039
5028
|
}
|
|
5040
5029
|
if (this.#hasDisposeAfter) {
|
|
5041
|
-
|
|
5030
|
+
this.#disposed?.push([v, k, "delete"]);
|
|
5042
5031
|
}
|
|
5043
5032
|
}
|
|
5044
5033
|
this.#keyMap.delete(k);
|
|
@@ -5059,11 +5048,11 @@ var LRUCache = class _LRUCache {
|
|
|
5059
5048
|
}
|
|
5060
5049
|
}
|
|
5061
5050
|
}
|
|
5062
|
-
if (this.#hasDisposeAfter &&
|
|
5051
|
+
if (this.#hasDisposeAfter && this.#disposed?.length) {
|
|
5063
5052
|
const dt = this.#disposed;
|
|
5064
5053
|
let task;
|
|
5065
|
-
while (task = dt
|
|
5066
|
-
|
|
5054
|
+
while (task = dt?.shift()) {
|
|
5055
|
+
this.#disposeAfter?.(...task);
|
|
5067
5056
|
}
|
|
5068
5057
|
}
|
|
5069
5058
|
return deleted;
|
|
@@ -5072,7 +5061,6 @@ var LRUCache = class _LRUCache {
|
|
|
5072
5061
|
* Clear the cache entirely, throwing away all values.
|
|
5073
5062
|
*/
|
|
5074
5063
|
clear() {
|
|
5075
|
-
var _a2, _b, _c;
|
|
5076
5064
|
for (const index of this.#rindexes({ allowStale: true })) {
|
|
5077
5065
|
const v = this.#valList[index];
|
|
5078
5066
|
if (this.#isBackgroundFetch(v)) {
|
|
@@ -5080,10 +5068,10 @@ var LRUCache = class _LRUCache {
|
|
|
5080
5068
|
} else {
|
|
5081
5069
|
const k = this.#keyList[index];
|
|
5082
5070
|
if (this.#hasDispose) {
|
|
5083
|
-
|
|
5071
|
+
this.#dispose?.(v, k, "delete");
|
|
5084
5072
|
}
|
|
5085
5073
|
if (this.#hasDisposeAfter) {
|
|
5086
|
-
|
|
5074
|
+
this.#disposed?.push([v, k, "delete"]);
|
|
5087
5075
|
}
|
|
5088
5076
|
}
|
|
5089
5077
|
}
|
|
@@ -5105,8 +5093,8 @@ var LRUCache = class _LRUCache {
|
|
|
5105
5093
|
if (this.#hasDisposeAfter && this.#disposed) {
|
|
5106
5094
|
const dt = this.#disposed;
|
|
5107
5095
|
let task;
|
|
5108
|
-
while (task = dt
|
|
5109
|
-
|
|
5096
|
+
while (task = dt?.shift()) {
|
|
5097
|
+
this.#disposeAfter?.(...task);
|
|
5110
5098
|
}
|
|
5111
5099
|
}
|
|
5112
5100
|
}
|
|
@@ -5334,10 +5322,9 @@ var Minipass = class extends import_node_events.EventEmitter {
|
|
|
5334
5322
|
}
|
|
5335
5323
|
// drop everything and get out of the flow completely
|
|
5336
5324
|
[ABORT]() {
|
|
5337
|
-
var _a2, _b;
|
|
5338
5325
|
this[ABORTED] = true;
|
|
5339
|
-
this.emit("abort",
|
|
5340
|
-
this.destroy(
|
|
5326
|
+
this.emit("abort", this[SIGNAL]?.reason);
|
|
5327
|
+
this.destroy(this[SIGNAL]?.reason);
|
|
5341
5328
|
}
|
|
5342
5329
|
/**
|
|
5343
5330
|
* True if the stream has been aborted.
|
|
@@ -5352,7 +5339,6 @@ var Minipass = class extends import_node_events.EventEmitter {
|
|
|
5352
5339
|
set aborted(_) {
|
|
5353
5340
|
}
|
|
5354
5341
|
write(chunk, encoding, cb) {
|
|
5355
|
-
var _a2;
|
|
5356
5342
|
if (this[ABORTED])
|
|
5357
5343
|
return false;
|
|
5358
5344
|
if (this[EOF])
|
|
@@ -5398,7 +5384,7 @@ var Minipass = class extends import_node_events.EventEmitter {
|
|
|
5398
5384
|
return this[FLOWING];
|
|
5399
5385
|
}
|
|
5400
5386
|
if (typeof chunk === "string" && // unless it is a string already ready for us to use
|
|
5401
|
-
!(encoding === this[ENCODING] && !
|
|
5387
|
+
!(encoding === this[ENCODING] && !this[DECODER]?.lastNeed)) {
|
|
5402
5388
|
chunk = Buffer.from(chunk, encoding);
|
|
5403
5389
|
}
|
|
5404
5390
|
if (Buffer.isBuffer(chunk) && this[ENCODING]) {
|
|
@@ -6574,7 +6560,6 @@ var PathBase = class {
|
|
|
6574
6560
|
* Result is cached, and thus may be outdated if the filesystem is mutated.
|
|
6575
6561
|
*/
|
|
6576
6562
|
async readlink() {
|
|
6577
|
-
var _a2;
|
|
6578
6563
|
const target = this.#linkTarget;
|
|
6579
6564
|
if (target) {
|
|
6580
6565
|
return target;
|
|
@@ -6587,7 +6572,7 @@ var PathBase = class {
|
|
|
6587
6572
|
}
|
|
6588
6573
|
try {
|
|
6589
6574
|
const read = await this.#fs.promises.readlink(this.fullpath());
|
|
6590
|
-
const linkTarget = (
|
|
6575
|
+
const linkTarget = (await this.parent.realpath())?.resolve(read);
|
|
6591
6576
|
if (linkTarget) {
|
|
6592
6577
|
return this.#linkTarget = linkTarget;
|
|
6593
6578
|
}
|
|
@@ -6600,7 +6585,6 @@ var PathBase = class {
|
|
|
6600
6585
|
* Synchronous {@link PathBase.readlink}
|
|
6601
6586
|
*/
|
|
6602
6587
|
readlinkSync() {
|
|
6603
|
-
var _a2;
|
|
6604
6588
|
const target = this.#linkTarget;
|
|
6605
6589
|
if (target) {
|
|
6606
6590
|
return target;
|
|
@@ -6613,7 +6597,7 @@ var PathBase = class {
|
|
|
6613
6597
|
}
|
|
6614
6598
|
try {
|
|
6615
6599
|
const read = this.#fs.readlinkSync(this.fullpath());
|
|
6616
|
-
const linkTarget =
|
|
6600
|
+
const linkTarget = this.parent.realpathSync()?.resolve(read);
|
|
6617
6601
|
if (linkTarget) {
|
|
6618
6602
|
return this.#linkTarget = linkTarget;
|
|
6619
6603
|
}
|
|
@@ -7343,7 +7327,7 @@ var PathScurryBase = class {
|
|
|
7343
7327
|
entry = this.cwd;
|
|
7344
7328
|
}
|
|
7345
7329
|
const e = await entry.readlink();
|
|
7346
|
-
return withFileTypes ? e : e
|
|
7330
|
+
return withFileTypes ? e : e?.fullpath();
|
|
7347
7331
|
}
|
|
7348
7332
|
readlinkSync(entry = this.cwd, { withFileTypes } = {
|
|
7349
7333
|
withFileTypes: false
|
|
@@ -7355,7 +7339,7 @@ var PathScurryBase = class {
|
|
|
7355
7339
|
entry = this.cwd;
|
|
7356
7340
|
}
|
|
7357
7341
|
const e = entry.readlinkSync();
|
|
7358
|
-
return withFileTypes ? e : e
|
|
7342
|
+
return withFileTypes ? e : e?.fullpath();
|
|
7359
7343
|
}
|
|
7360
7344
|
async realpath(entry = this.cwd, { withFileTypes } = {
|
|
7361
7345
|
withFileTypes: false
|
|
@@ -7367,7 +7351,7 @@ var PathScurryBase = class {
|
|
|
7367
7351
|
entry = this.cwd;
|
|
7368
7352
|
}
|
|
7369
7353
|
const e = await entry.realpath();
|
|
7370
|
-
return withFileTypes ? e : e
|
|
7354
|
+
return withFileTypes ? e : e?.fullpath();
|
|
7371
7355
|
}
|
|
7372
7356
|
realpathSync(entry = this.cwd, { withFileTypes } = {
|
|
7373
7357
|
withFileTypes: false
|
|
@@ -7379,7 +7363,7 @@ var PathScurryBase = class {
|
|
|
7379
7363
|
entry = this.cwd;
|
|
7380
7364
|
}
|
|
7381
7365
|
const e = entry.realpathSync();
|
|
7382
|
-
return withFileTypes ? e : e
|
|
7366
|
+
return withFileTypes ? e : e?.fullpath();
|
|
7383
7367
|
}
|
|
7384
7368
|
async walk(entry = this.cwd, opts = {}) {
|
|
7385
7369
|
if (typeof entry === "string") {
|
|
@@ -7413,7 +7397,7 @@ var PathScurryBase = class {
|
|
|
7413
7397
|
results.push(withFileTypes ? e : e.fullpath());
|
|
7414
7398
|
}
|
|
7415
7399
|
if (follow && e.isSymbolicLink()) {
|
|
7416
|
-
e.realpath().then((r) =>
|
|
7400
|
+
e.realpath().then((r) => r?.isUnknown() ? r.lstat() : r).then((r) => r?.shouldWalk(dirs, walkFilter) ? walk(r, next) : next());
|
|
7417
7401
|
} else {
|
|
7418
7402
|
if (e.shouldWalk(dirs, walkFilter)) {
|
|
7419
7403
|
walk(e, next);
|
|
@@ -7559,7 +7543,7 @@ var PathScurryBase = class {
|
|
|
7559
7543
|
const promises = [];
|
|
7560
7544
|
for (const e of entries) {
|
|
7561
7545
|
if (e.isSymbolicLink()) {
|
|
7562
|
-
promises.push(e.realpath().then((r) =>
|
|
7546
|
+
promises.push(e.realpath().then((r) => r?.isUnknown() ? r.lstat() : r));
|
|
7563
7547
|
}
|
|
7564
7548
|
}
|
|
7565
7549
|
if (promises.length) {
|
|
@@ -7987,8 +7971,7 @@ var HasWalkedCache = class _HasWalkedCache {
|
|
|
7987
7971
|
return new _HasWalkedCache(new Map(this.store));
|
|
7988
7972
|
}
|
|
7989
7973
|
hasWalked(target, pattern) {
|
|
7990
|
-
|
|
7991
|
-
return (_a2 = this.store.get(target.fullpath())) == null ? void 0 : _a2.has(pattern.globString());
|
|
7974
|
+
return this.store.get(target.fullpath())?.has(pattern.globString());
|
|
7992
7975
|
}
|
|
7993
7976
|
storeWalked(target, pattern) {
|
|
7994
7977
|
const fullpath = target.fullpath();
|
|
@@ -8100,8 +8083,8 @@ var Processor = class _Processor {
|
|
|
8100
8083
|
if (!t.isSymbolicLink() || this.follow || pattern.checkFollowGlobstar()) {
|
|
8101
8084
|
this.subwalks.add(t, pattern);
|
|
8102
8085
|
}
|
|
8103
|
-
const rp = rest
|
|
8104
|
-
const rrest = rest
|
|
8086
|
+
const rp = rest?.pattern();
|
|
8087
|
+
const rrest = rest?.rest();
|
|
8105
8088
|
if (!rest || (rp === "" || rp === ".") && !rrest) {
|
|
8106
8089
|
this.matches.add(t, absolute, rp === "" || rp === ".");
|
|
8107
8090
|
} else {
|
|
@@ -8236,20 +8219,17 @@ var GlobUtil = class {
|
|
|
8236
8219
|
}
|
|
8237
8220
|
}
|
|
8238
8221
|
#ignored(path5) {
|
|
8239
|
-
|
|
8240
|
-
return this.seen.has(path5) || !!((_b = (_a2 = this.#ignore) == null ? void 0 : _a2.ignored) == null ? void 0 : _b.call(_a2, path5));
|
|
8222
|
+
return this.seen.has(path5) || !!this.#ignore?.ignored?.(path5);
|
|
8241
8223
|
}
|
|
8242
8224
|
#childrenIgnored(path5) {
|
|
8243
|
-
|
|
8244
|
-
return !!((_b = (_a2 = this.#ignore) == null ? void 0 : _a2.childrenIgnored) == null ? void 0 : _b.call(_a2, path5));
|
|
8225
|
+
return !!this.#ignore?.childrenIgnored?.(path5);
|
|
8245
8226
|
}
|
|
8246
8227
|
// backpressure mechanism
|
|
8247
8228
|
pause() {
|
|
8248
8229
|
this.paused = true;
|
|
8249
8230
|
}
|
|
8250
8231
|
resume() {
|
|
8251
|
-
|
|
8252
|
-
if ((_a2 = this.signal) == null ? void 0 : _a2.aborted)
|
|
8232
|
+
if (this.signal?.aborted)
|
|
8253
8233
|
return;
|
|
8254
8234
|
this.paused = false;
|
|
8255
8235
|
let fn = void 0;
|
|
@@ -8258,8 +8238,7 @@ var GlobUtil = class {
|
|
|
8258
8238
|
}
|
|
8259
8239
|
}
|
|
8260
8240
|
onResume(fn) {
|
|
8261
|
-
|
|
8262
|
-
if ((_a2 = this.signal) == null ? void 0 : _a2.aborted)
|
|
8241
|
+
if (this.signal?.aborted)
|
|
8263
8242
|
return;
|
|
8264
8243
|
if (!this.paused) {
|
|
8265
8244
|
fn();
|
|
@@ -8281,7 +8260,7 @@ var GlobUtil = class {
|
|
|
8281
8260
|
}
|
|
8282
8261
|
const needStat = e.isUnknown() || this.opts.stat;
|
|
8283
8262
|
const s = needStat ? await e.lstat() : e;
|
|
8284
|
-
if (this.opts.follow && this.opts.nodir &&
|
|
8263
|
+
if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {
|
|
8285
8264
|
const target = await s.realpath();
|
|
8286
8265
|
if (target && (target.isUnknown() || this.opts.stat)) {
|
|
8287
8266
|
await target.lstat();
|
|
@@ -8290,8 +8269,7 @@ var GlobUtil = class {
|
|
|
8290
8269
|
return this.matchCheckTest(s, ifDir);
|
|
8291
8270
|
}
|
|
8292
8271
|
matchCheckTest(e, ifDir) {
|
|
8293
|
-
|
|
8294
|
-
return e && (this.maxDepth === Infinity || e.depth() <= this.maxDepth) && (!ifDir || e.canReaddir()) && (!this.opts.nodir || !e.isDirectory()) && (!this.opts.nodir || !this.opts.follow || !e.isSymbolicLink() || !((_a2 = e.realpathCached()) == null ? void 0 : _a2.isDirectory())) && !this.#ignored(e) ? e : void 0;
|
|
8272
|
+
return e && (this.maxDepth === Infinity || e.depth() <= this.maxDepth) && (!ifDir || e.canReaddir()) && (!this.opts.nodir || !e.isDirectory()) && (!this.opts.nodir || !this.opts.follow || !e.isSymbolicLink() || !e.realpathCached()?.isDirectory()) && !this.#ignored(e) ? e : void 0;
|
|
8295
8273
|
}
|
|
8296
8274
|
matchCheckSync(e, ifDir) {
|
|
8297
8275
|
if (ifDir && this.opts.nodir)
|
|
@@ -8305,19 +8283,18 @@ var GlobUtil = class {
|
|
|
8305
8283
|
}
|
|
8306
8284
|
const needStat = e.isUnknown() || this.opts.stat;
|
|
8307
8285
|
const s = needStat ? e.lstatSync() : e;
|
|
8308
|
-
if (this.opts.follow && this.opts.nodir &&
|
|
8286
|
+
if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {
|
|
8309
8287
|
const target = s.realpathSync();
|
|
8310
|
-
if (target && (
|
|
8288
|
+
if (target && (target?.isUnknown() || this.opts.stat)) {
|
|
8311
8289
|
target.lstatSync();
|
|
8312
8290
|
}
|
|
8313
8291
|
}
|
|
8314
8292
|
return this.matchCheckTest(s, ifDir);
|
|
8315
8293
|
}
|
|
8316
8294
|
matchFinish(e, absolute) {
|
|
8317
|
-
var _a2;
|
|
8318
8295
|
if (this.#ignored(e))
|
|
8319
8296
|
return;
|
|
8320
|
-
if (!this.includeChildMatches &&
|
|
8297
|
+
if (!this.includeChildMatches && this.#ignore?.add) {
|
|
8321
8298
|
const ign = `${e.relativePosix()}/**`;
|
|
8322
8299
|
this.#ignore.add(ign);
|
|
8323
8300
|
}
|
|
@@ -8346,16 +8323,14 @@ var GlobUtil = class {
|
|
|
8346
8323
|
this.matchFinish(p, absolute);
|
|
8347
8324
|
}
|
|
8348
8325
|
walkCB(target, patterns, cb) {
|
|
8349
|
-
|
|
8350
|
-
if ((_a2 = this.signal) == null ? void 0 : _a2.aborted)
|
|
8326
|
+
if (this.signal?.aborted)
|
|
8351
8327
|
cb();
|
|
8352
8328
|
this.walkCB2(target, patterns, new Processor(this.opts), cb);
|
|
8353
8329
|
}
|
|
8354
8330
|
walkCB2(target, patterns, processor, cb) {
|
|
8355
|
-
var _a2;
|
|
8356
8331
|
if (this.#childrenIgnored(target))
|
|
8357
8332
|
return cb();
|
|
8358
|
-
if (
|
|
8333
|
+
if (this.signal?.aborted)
|
|
8359
8334
|
cb();
|
|
8360
8335
|
if (this.paused) {
|
|
8361
8336
|
this.onResume(() => this.walkCB2(target, patterns, processor, cb));
|
|
@@ -8407,16 +8382,14 @@ var GlobUtil = class {
|
|
|
8407
8382
|
next();
|
|
8408
8383
|
}
|
|
8409
8384
|
walkCBSync(target, patterns, cb) {
|
|
8410
|
-
|
|
8411
|
-
if ((_a2 = this.signal) == null ? void 0 : _a2.aborted)
|
|
8385
|
+
if (this.signal?.aborted)
|
|
8412
8386
|
cb();
|
|
8413
8387
|
this.walkCB2Sync(target, patterns, new Processor(this.opts), cb);
|
|
8414
8388
|
}
|
|
8415
8389
|
walkCB2Sync(target, patterns, processor, cb) {
|
|
8416
|
-
var _a2;
|
|
8417
8390
|
if (this.#childrenIgnored(target))
|
|
8418
8391
|
return cb();
|
|
8419
|
-
if (
|
|
8392
|
+
if (this.signal?.aborted)
|
|
8420
8393
|
cb();
|
|
8421
8394
|
if (this.paused) {
|
|
8422
8395
|
this.onResume(() => this.walkCB2Sync(target, patterns, processor, cb));
|
|
@@ -8471,16 +8444,14 @@ var GlobWalker = class extends GlobUtil {
|
|
|
8471
8444
|
this.matches.add(e);
|
|
8472
8445
|
}
|
|
8473
8446
|
async walk() {
|
|
8474
|
-
|
|
8475
|
-
if ((_a2 = this.signal) == null ? void 0 : _a2.aborted)
|
|
8447
|
+
if (this.signal?.aborted)
|
|
8476
8448
|
throw this.signal.reason;
|
|
8477
8449
|
if (this.path.isUnknown()) {
|
|
8478
8450
|
await this.path.lstat();
|
|
8479
8451
|
}
|
|
8480
8452
|
await new Promise((res, rej) => {
|
|
8481
8453
|
this.walkCB(this.path, this.patterns, () => {
|
|
8482
|
-
|
|
8483
|
-
if ((_a3 = this.signal) == null ? void 0 : _a3.aborted) {
|
|
8454
|
+
if (this.signal?.aborted) {
|
|
8484
8455
|
rej(this.signal.reason);
|
|
8485
8456
|
} else {
|
|
8486
8457
|
res(this.matches);
|
|
@@ -8490,15 +8461,13 @@ var GlobWalker = class extends GlobUtil {
|
|
|
8490
8461
|
return this.matches;
|
|
8491
8462
|
}
|
|
8492
8463
|
walkSync() {
|
|
8493
|
-
|
|
8494
|
-
if ((_a2 = this.signal) == null ? void 0 : _a2.aborted)
|
|
8464
|
+
if (this.signal?.aborted)
|
|
8495
8465
|
throw this.signal.reason;
|
|
8496
8466
|
if (this.path.isUnknown()) {
|
|
8497
8467
|
this.path.lstatSync();
|
|
8498
8468
|
}
|
|
8499
8469
|
this.walkCBSync(this.path, this.patterns, () => {
|
|
8500
|
-
|
|
8501
|
-
if ((_a3 = this.signal) == null ? void 0 : _a3.aborted)
|
|
8470
|
+
if (this.signal?.aborted)
|
|
8502
8471
|
throw this.signal.reason;
|
|
8503
8472
|
});
|
|
8504
8473
|
return this.matches;
|
|
@@ -8805,7 +8774,6 @@ var import_is_ci = __toESM(require_is_ci());
|
|
|
8805
8774
|
|
|
8806
8775
|
// node_modules/find-up/index.js
|
|
8807
8776
|
var import_node_path3 = __toESM(require("node:path"), 1);
|
|
8808
|
-
var import_node_url4 = require("node:url");
|
|
8809
8777
|
|
|
8810
8778
|
// node_modules/locate-path/index.js
|
|
8811
8779
|
var import_node_process = __toESM(require("node:process"), 1);
|
|
@@ -8981,14 +8949,19 @@ async function locatePath(paths, {
|
|
|
8981
8949
|
}, { concurrency, preserveOrder });
|
|
8982
8950
|
}
|
|
8983
8951
|
|
|
8952
|
+
// node_modules/unicorn-magic/node.js
|
|
8953
|
+
var import_node_url4 = require("node:url");
|
|
8954
|
+
function toPath2(urlOrPath) {
|
|
8955
|
+
return urlOrPath instanceof URL ? (0, import_node_url4.fileURLToPath)(urlOrPath) : urlOrPath;
|
|
8956
|
+
}
|
|
8957
|
+
|
|
8984
8958
|
// node_modules/find-up/index.js
|
|
8985
|
-
var toPath2 = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url4.fileURLToPath)(urlOrPath) : urlOrPath;
|
|
8986
8959
|
var findUpStop = Symbol("findUpStop");
|
|
8987
8960
|
async function findUpMultiple(name, options = {}) {
|
|
8988
|
-
let directory = import_node_path3.default.resolve(toPath2(options.cwd)
|
|
8961
|
+
let directory = import_node_path3.default.resolve(toPath2(options.cwd) ?? "");
|
|
8989
8962
|
const { root } = import_node_path3.default.parse(directory);
|
|
8990
|
-
const stopAt = import_node_path3.default.resolve(directory, options.stopAt
|
|
8991
|
-
const limit = options.limit
|
|
8963
|
+
const stopAt = import_node_path3.default.resolve(directory, toPath2(options.stopAt ?? root));
|
|
8964
|
+
const limit = options.limit ?? Number.POSITIVE_INFINITY;
|
|
8992
8965
|
const paths = [name].flat();
|
|
8993
8966
|
const runMatcher = async (locateOptions) => {
|
|
8994
8967
|
if (typeof name !== "function") {
|