@forsakringskassan/vite-lib-config 1.7.13 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/{build-vue-lib.js → build-vue-lib.mjs} +1 -1
- package/dist/api-extractor.js +75 -96
- package/dist/{cli.js → cli.mjs} +26 -29
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/{vite.config.js → vite.config.cjs} +122 -158
- package/dist/vite.config.mjs +12530 -0
- package/package.json +7 -6
package/dist/api-extractor.js
CHANGED
|
@@ -967,6 +967,8 @@ var require_semver = __commonJS({
|
|
|
967
967
|
this.inc("patch", identifier, identifierBase);
|
|
968
968
|
this.inc("pre", identifier, identifierBase);
|
|
969
969
|
break;
|
|
970
|
+
// If the input is a non-prerelease version, this acts the same as
|
|
971
|
+
// prepatch.
|
|
970
972
|
case "prerelease":
|
|
971
973
|
if (this.prerelease.length === 0) {
|
|
972
974
|
this.inc("patch", identifier, identifierBase);
|
|
@@ -994,6 +996,8 @@ var require_semver = __commonJS({
|
|
|
994
996
|
}
|
|
995
997
|
this.prerelease = [];
|
|
996
998
|
break;
|
|
999
|
+
// This probably shouldn't be used publicly.
|
|
1000
|
+
// 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
|
|
997
1001
|
case "pre": {
|
|
998
1002
|
const base = Number(identifierBase) ? 1 : 0;
|
|
999
1003
|
if (!identifier && identifierBase === false) {
|
|
@@ -2037,6 +2041,7 @@ var require_min_version = __commonJS({
|
|
|
2037
2041
|
compver.prerelease.push(0);
|
|
2038
2042
|
}
|
|
2039
2043
|
compver.raw = compver.format();
|
|
2044
|
+
/* fallthrough */
|
|
2040
2045
|
case "":
|
|
2041
2046
|
case ">=":
|
|
2042
2047
|
if (!setMin || gt(compver, setMin)) {
|
|
@@ -2046,6 +2051,7 @@ var require_min_version = __commonJS({
|
|
|
2046
2051
|
case "<":
|
|
2047
2052
|
case "<=":
|
|
2048
2053
|
break;
|
|
2054
|
+
/* istanbul ignore next */
|
|
2049
2055
|
default:
|
|
2050
2056
|
throw new Error(`Unexpected operation: ${comparator.operator}`);
|
|
2051
2057
|
}
|
|
@@ -2718,20 +2724,18 @@ var AST = class _AST {
|
|
|
2718
2724
|
}
|
|
2719
2725
|
}
|
|
2720
2726
|
toJSON() {
|
|
2721
|
-
var _a2;
|
|
2722
2727
|
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
2728
|
if (this.isStart() && !this.type)
|
|
2724
2729
|
ret.unshift([]);
|
|
2725
|
-
if (this.isEnd() && (this === this.#root || this.#root.#filledNegs &&
|
|
2730
|
+
if (this.isEnd() && (this === this.#root || this.#root.#filledNegs && this.#parent?.type === "!")) {
|
|
2726
2731
|
ret.push({});
|
|
2727
2732
|
}
|
|
2728
2733
|
return ret;
|
|
2729
2734
|
}
|
|
2730
2735
|
isStart() {
|
|
2731
|
-
var _a2;
|
|
2732
2736
|
if (this.#root === this)
|
|
2733
2737
|
return true;
|
|
2734
|
-
if (!
|
|
2738
|
+
if (!this.#parent?.isStart())
|
|
2735
2739
|
return false;
|
|
2736
2740
|
if (this.#parentIndex === 0)
|
|
2737
2741
|
return true;
|
|
@@ -2745,15 +2749,14 @@ var AST = class _AST {
|
|
|
2745
2749
|
return true;
|
|
2746
2750
|
}
|
|
2747
2751
|
isEnd() {
|
|
2748
|
-
var _a2, _b, _c;
|
|
2749
2752
|
if (this.#root === this)
|
|
2750
2753
|
return true;
|
|
2751
|
-
if (
|
|
2754
|
+
if (this.#parent?.type === "!")
|
|
2752
2755
|
return true;
|
|
2753
|
-
if (!
|
|
2756
|
+
if (!this.#parent?.isEnd())
|
|
2754
2757
|
return false;
|
|
2755
2758
|
if (!this.type)
|
|
2756
|
-
return
|
|
2759
|
+
return this.#parent?.isEnd();
|
|
2757
2760
|
const pl = this.#parent ? this.#parent.#parts.length : 0;
|
|
2758
2761
|
return this.#parentIndex === pl - 1;
|
|
2759
2762
|
}
|
|
@@ -2969,7 +2972,6 @@ var AST = class _AST {
|
|
|
2969
2972
|
// is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
|
|
2970
2973
|
// or start or whatever) and prepend ^ or / at the Regexp construction.
|
|
2971
2974
|
toRegExpSource(allowDot) {
|
|
2972
|
-
var _a2;
|
|
2973
2975
|
const dot = allowDot ?? !!this.#options.dot;
|
|
2974
2976
|
if (this.#root === this)
|
|
2975
2977
|
this.#fillNegs();
|
|
@@ -2999,7 +3001,7 @@ var AST = class _AST {
|
|
|
2999
3001
|
}
|
|
3000
3002
|
}
|
|
3001
3003
|
let end = "";
|
|
3002
|
-
if (this.isEnd() && this.#root.#filledNegs &&
|
|
3004
|
+
if (this.isEnd() && this.#root.#filledNegs && this.#parent?.type === "!") {
|
|
3003
3005
|
end = "(?:$|\\/)";
|
|
3004
3006
|
}
|
|
3005
3007
|
const final2 = start2 + src + end;
|
|
@@ -3837,7 +3839,6 @@ var emitWarning = (msg, type, code, fn) => {
|
|
|
3837
3839
|
};
|
|
3838
3840
|
var AC = globalThis.AbortController;
|
|
3839
3841
|
var AS = globalThis.AbortSignal;
|
|
3840
|
-
var _a;
|
|
3841
3842
|
if (typeof AC === "undefined") {
|
|
3842
3843
|
AS = class AbortSignal {
|
|
3843
3844
|
onabort;
|
|
@@ -3854,7 +3855,6 @@ if (typeof AC === "undefined") {
|
|
|
3854
3855
|
}
|
|
3855
3856
|
signal = new AS();
|
|
3856
3857
|
abort(reason) {
|
|
3857
|
-
var _a2, _b;
|
|
3858
3858
|
if (this.signal.aborted)
|
|
3859
3859
|
return;
|
|
3860
3860
|
this.signal.reason = reason;
|
|
@@ -3862,10 +3862,10 @@ if (typeof AC === "undefined") {
|
|
|
3862
3862
|
for (const fn of this.signal._onabort) {
|
|
3863
3863
|
fn(reason);
|
|
3864
3864
|
}
|
|
3865
|
-
|
|
3865
|
+
this.signal.onabort?.(reason);
|
|
3866
3866
|
}
|
|
3867
3867
|
};
|
|
3868
|
-
let printACPolyfillWarning =
|
|
3868
|
+
let printACPolyfillWarning = PROCESS.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1";
|
|
3869
3869
|
const warnACPolyfill = () => {
|
|
3870
3870
|
if (!printACPolyfillWarning)
|
|
3871
3871
|
return;
|
|
@@ -4558,7 +4558,6 @@ var LRUCache = class _LRUCache {
|
|
|
4558
4558
|
* {@link LRUCache#delete}
|
|
4559
4559
|
*/
|
|
4560
4560
|
set(k, v, setOptions = {}) {
|
|
4561
|
-
var _a2, _b, _c, _d, _e;
|
|
4562
4561
|
if (v === void 0) {
|
|
4563
4562
|
this.delete(k);
|
|
4564
4563
|
return this;
|
|
@@ -4597,18 +4596,18 @@ var LRUCache = class _LRUCache {
|
|
|
4597
4596
|
const { __staleWhileFetching: s } = oldVal;
|
|
4598
4597
|
if (s !== void 0 && !noDisposeOnSet) {
|
|
4599
4598
|
if (this.#hasDispose) {
|
|
4600
|
-
|
|
4599
|
+
this.#dispose?.(s, k, "set");
|
|
4601
4600
|
}
|
|
4602
4601
|
if (this.#hasDisposeAfter) {
|
|
4603
|
-
|
|
4602
|
+
this.#disposed?.push([s, k, "set"]);
|
|
4604
4603
|
}
|
|
4605
4604
|
}
|
|
4606
4605
|
} else if (!noDisposeOnSet) {
|
|
4607
4606
|
if (this.#hasDispose) {
|
|
4608
|
-
|
|
4607
|
+
this.#dispose?.(oldVal, k, "set");
|
|
4609
4608
|
}
|
|
4610
4609
|
if (this.#hasDisposeAfter) {
|
|
4611
|
-
|
|
4610
|
+
this.#disposed?.push([oldVal, k, "set"]);
|
|
4612
4611
|
}
|
|
4613
4612
|
}
|
|
4614
4613
|
this.#removeItemSize(index);
|
|
@@ -4637,8 +4636,8 @@ var LRUCache = class _LRUCache {
|
|
|
4637
4636
|
if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {
|
|
4638
4637
|
const dt = this.#disposed;
|
|
4639
4638
|
let task;
|
|
4640
|
-
while (task = dt
|
|
4641
|
-
|
|
4639
|
+
while (task = dt?.shift()) {
|
|
4640
|
+
this.#disposeAfter?.(...task);
|
|
4642
4641
|
}
|
|
4643
4642
|
}
|
|
4644
4643
|
return this;
|
|
@@ -4648,7 +4647,6 @@ var LRUCache = class _LRUCache {
|
|
|
4648
4647
|
* `undefined` if cache is empty.
|
|
4649
4648
|
*/
|
|
4650
4649
|
pop() {
|
|
4651
|
-
var _a2;
|
|
4652
4650
|
try {
|
|
4653
4651
|
while (this.#size) {
|
|
4654
4652
|
const val = this.#valList[this.#head];
|
|
@@ -4665,14 +4663,13 @@ var LRUCache = class _LRUCache {
|
|
|
4665
4663
|
if (this.#hasDisposeAfter && this.#disposed) {
|
|
4666
4664
|
const dt = this.#disposed;
|
|
4667
4665
|
let task;
|
|
4668
|
-
while (task = dt
|
|
4669
|
-
|
|
4666
|
+
while (task = dt?.shift()) {
|
|
4667
|
+
this.#disposeAfter?.(...task);
|
|
4670
4668
|
}
|
|
4671
4669
|
}
|
|
4672
4670
|
}
|
|
4673
4671
|
}
|
|
4674
4672
|
#evict(free) {
|
|
4675
|
-
var _a2, _b;
|
|
4676
4673
|
const head = this.#head;
|
|
4677
4674
|
const k = this.#keyList[head];
|
|
4678
4675
|
const v = this.#valList[head];
|
|
@@ -4680,10 +4677,10 @@ var LRUCache = class _LRUCache {
|
|
|
4680
4677
|
v.__abortController.abort(new Error("evicted"));
|
|
4681
4678
|
} else if (this.#hasDispose || this.#hasDisposeAfter) {
|
|
4682
4679
|
if (this.#hasDispose) {
|
|
4683
|
-
|
|
4680
|
+
this.#dispose?.(v, k, "evict");
|
|
4684
4681
|
}
|
|
4685
4682
|
if (this.#hasDisposeAfter) {
|
|
4686
|
-
|
|
4683
|
+
this.#disposed?.push([v, k, "evict"]);
|
|
4687
4684
|
}
|
|
4688
4685
|
}
|
|
4689
4686
|
this.#removeItemSize(head);
|
|
@@ -4759,7 +4756,7 @@ var LRUCache = class _LRUCache {
|
|
|
4759
4756
|
}
|
|
4760
4757
|
const ac = new AC();
|
|
4761
4758
|
const { signal } = options;
|
|
4762
|
-
signal
|
|
4759
|
+
signal?.addEventListener("abort", () => ac.abort(signal.reason), {
|
|
4763
4760
|
signal: ac.signal
|
|
4764
4761
|
});
|
|
4765
4762
|
const fetchOpts = {
|
|
@@ -4830,8 +4827,7 @@ var LRUCache = class _LRUCache {
|
|
|
4830
4827
|
}
|
|
4831
4828
|
};
|
|
4832
4829
|
const pcall = (res, rej) => {
|
|
4833
|
-
|
|
4834
|
-
const fmp = (_a2 = this.#fetchMethod) == null ? void 0 : _a2.call(this, k, v, fetchOpts);
|
|
4830
|
+
const fmp = this.#fetchMethod?.(k, v, fetchOpts);
|
|
4835
4831
|
if (fmp && fmp instanceof Promise) {
|
|
4836
4832
|
fmp.then((v2) => res(v2 === void 0 ? void 0 : v2), rej);
|
|
4837
4833
|
}
|
|
@@ -5020,7 +5016,6 @@ var LRUCache = class _LRUCache {
|
|
|
5020
5016
|
* Returns true if the key was deleted, false otherwise.
|
|
5021
5017
|
*/
|
|
5022
5018
|
delete(k) {
|
|
5023
|
-
var _a2, _b, _c, _d;
|
|
5024
5019
|
let deleted = false;
|
|
5025
5020
|
if (this.#size !== 0) {
|
|
5026
5021
|
const index = this.#keyMap.get(k);
|
|
@@ -5035,10 +5030,10 @@ var LRUCache = class _LRUCache {
|
|
|
5035
5030
|
v.__abortController.abort(new Error("deleted"));
|
|
5036
5031
|
} else if (this.#hasDispose || this.#hasDisposeAfter) {
|
|
5037
5032
|
if (this.#hasDispose) {
|
|
5038
|
-
|
|
5033
|
+
this.#dispose?.(v, k, "delete");
|
|
5039
5034
|
}
|
|
5040
5035
|
if (this.#hasDisposeAfter) {
|
|
5041
|
-
|
|
5036
|
+
this.#disposed?.push([v, k, "delete"]);
|
|
5042
5037
|
}
|
|
5043
5038
|
}
|
|
5044
5039
|
this.#keyMap.delete(k);
|
|
@@ -5059,11 +5054,11 @@ var LRUCache = class _LRUCache {
|
|
|
5059
5054
|
}
|
|
5060
5055
|
}
|
|
5061
5056
|
}
|
|
5062
|
-
if (this.#hasDisposeAfter &&
|
|
5057
|
+
if (this.#hasDisposeAfter && this.#disposed?.length) {
|
|
5063
5058
|
const dt = this.#disposed;
|
|
5064
5059
|
let task;
|
|
5065
|
-
while (task = dt
|
|
5066
|
-
|
|
5060
|
+
while (task = dt?.shift()) {
|
|
5061
|
+
this.#disposeAfter?.(...task);
|
|
5067
5062
|
}
|
|
5068
5063
|
}
|
|
5069
5064
|
return deleted;
|
|
@@ -5072,7 +5067,6 @@ var LRUCache = class _LRUCache {
|
|
|
5072
5067
|
* Clear the cache entirely, throwing away all values.
|
|
5073
5068
|
*/
|
|
5074
5069
|
clear() {
|
|
5075
|
-
var _a2, _b, _c;
|
|
5076
5070
|
for (const index of this.#rindexes({ allowStale: true })) {
|
|
5077
5071
|
const v = this.#valList[index];
|
|
5078
5072
|
if (this.#isBackgroundFetch(v)) {
|
|
@@ -5080,10 +5074,10 @@ var LRUCache = class _LRUCache {
|
|
|
5080
5074
|
} else {
|
|
5081
5075
|
const k = this.#keyList[index];
|
|
5082
5076
|
if (this.#hasDispose) {
|
|
5083
|
-
|
|
5077
|
+
this.#dispose?.(v, k, "delete");
|
|
5084
5078
|
}
|
|
5085
5079
|
if (this.#hasDisposeAfter) {
|
|
5086
|
-
|
|
5080
|
+
this.#disposed?.push([v, k, "delete"]);
|
|
5087
5081
|
}
|
|
5088
5082
|
}
|
|
5089
5083
|
}
|
|
@@ -5105,8 +5099,8 @@ var LRUCache = class _LRUCache {
|
|
|
5105
5099
|
if (this.#hasDisposeAfter && this.#disposed) {
|
|
5106
5100
|
const dt = this.#disposed;
|
|
5107
5101
|
let task;
|
|
5108
|
-
while (task = dt
|
|
5109
|
-
|
|
5102
|
+
while (task = dt?.shift()) {
|
|
5103
|
+
this.#disposeAfter?.(...task);
|
|
5110
5104
|
}
|
|
5111
5105
|
}
|
|
5112
5106
|
}
|
|
@@ -5334,10 +5328,9 @@ var Minipass = class extends import_node_events.EventEmitter {
|
|
|
5334
5328
|
}
|
|
5335
5329
|
// drop everything and get out of the flow completely
|
|
5336
5330
|
[ABORT]() {
|
|
5337
|
-
var _a2, _b;
|
|
5338
5331
|
this[ABORTED] = true;
|
|
5339
|
-
this.emit("abort",
|
|
5340
|
-
this.destroy(
|
|
5332
|
+
this.emit("abort", this[SIGNAL]?.reason);
|
|
5333
|
+
this.destroy(this[SIGNAL]?.reason);
|
|
5341
5334
|
}
|
|
5342
5335
|
/**
|
|
5343
5336
|
* True if the stream has been aborted.
|
|
@@ -5352,7 +5345,6 @@ var Minipass = class extends import_node_events.EventEmitter {
|
|
|
5352
5345
|
set aborted(_) {
|
|
5353
5346
|
}
|
|
5354
5347
|
write(chunk, encoding, cb) {
|
|
5355
|
-
var _a2;
|
|
5356
5348
|
if (this[ABORTED])
|
|
5357
5349
|
return false;
|
|
5358
5350
|
if (this[EOF])
|
|
@@ -5398,7 +5390,7 @@ var Minipass = class extends import_node_events.EventEmitter {
|
|
|
5398
5390
|
return this[FLOWING];
|
|
5399
5391
|
}
|
|
5400
5392
|
if (typeof chunk === "string" && // unless it is a string already ready for us to use
|
|
5401
|
-
!(encoding === this[ENCODING] && !
|
|
5393
|
+
!(encoding === this[ENCODING] && !this[DECODER]?.lastNeed)) {
|
|
5402
5394
|
chunk = Buffer.from(chunk, encoding);
|
|
5403
5395
|
}
|
|
5404
5396
|
if (Buffer.isBuffer(chunk) && this[ENCODING]) {
|
|
@@ -6574,7 +6566,6 @@ var PathBase = class {
|
|
|
6574
6566
|
* Result is cached, and thus may be outdated if the filesystem is mutated.
|
|
6575
6567
|
*/
|
|
6576
6568
|
async readlink() {
|
|
6577
|
-
var _a2;
|
|
6578
6569
|
const target = this.#linkTarget;
|
|
6579
6570
|
if (target) {
|
|
6580
6571
|
return target;
|
|
@@ -6587,7 +6578,7 @@ var PathBase = class {
|
|
|
6587
6578
|
}
|
|
6588
6579
|
try {
|
|
6589
6580
|
const read = await this.#fs.promises.readlink(this.fullpath());
|
|
6590
|
-
const linkTarget = (
|
|
6581
|
+
const linkTarget = (await this.parent.realpath())?.resolve(read);
|
|
6591
6582
|
if (linkTarget) {
|
|
6592
6583
|
return this.#linkTarget = linkTarget;
|
|
6593
6584
|
}
|
|
@@ -6600,7 +6591,6 @@ var PathBase = class {
|
|
|
6600
6591
|
* Synchronous {@link PathBase.readlink}
|
|
6601
6592
|
*/
|
|
6602
6593
|
readlinkSync() {
|
|
6603
|
-
var _a2;
|
|
6604
6594
|
const target = this.#linkTarget;
|
|
6605
6595
|
if (target) {
|
|
6606
6596
|
return target;
|
|
@@ -6613,7 +6603,7 @@ var PathBase = class {
|
|
|
6613
6603
|
}
|
|
6614
6604
|
try {
|
|
6615
6605
|
const read = this.#fs.readlinkSync(this.fullpath());
|
|
6616
|
-
const linkTarget =
|
|
6606
|
+
const linkTarget = this.parent.realpathSync()?.resolve(read);
|
|
6617
6607
|
if (linkTarget) {
|
|
6618
6608
|
return this.#linkTarget = linkTarget;
|
|
6619
6609
|
}
|
|
@@ -7343,7 +7333,7 @@ var PathScurryBase = class {
|
|
|
7343
7333
|
entry = this.cwd;
|
|
7344
7334
|
}
|
|
7345
7335
|
const e = await entry.readlink();
|
|
7346
|
-
return withFileTypes ? e : e
|
|
7336
|
+
return withFileTypes ? e : e?.fullpath();
|
|
7347
7337
|
}
|
|
7348
7338
|
readlinkSync(entry = this.cwd, { withFileTypes } = {
|
|
7349
7339
|
withFileTypes: false
|
|
@@ -7355,7 +7345,7 @@ var PathScurryBase = class {
|
|
|
7355
7345
|
entry = this.cwd;
|
|
7356
7346
|
}
|
|
7357
7347
|
const e = entry.readlinkSync();
|
|
7358
|
-
return withFileTypes ? e : e
|
|
7348
|
+
return withFileTypes ? e : e?.fullpath();
|
|
7359
7349
|
}
|
|
7360
7350
|
async realpath(entry = this.cwd, { withFileTypes } = {
|
|
7361
7351
|
withFileTypes: false
|
|
@@ -7367,7 +7357,7 @@ var PathScurryBase = class {
|
|
|
7367
7357
|
entry = this.cwd;
|
|
7368
7358
|
}
|
|
7369
7359
|
const e = await entry.realpath();
|
|
7370
|
-
return withFileTypes ? e : e
|
|
7360
|
+
return withFileTypes ? e : e?.fullpath();
|
|
7371
7361
|
}
|
|
7372
7362
|
realpathSync(entry = this.cwd, { withFileTypes } = {
|
|
7373
7363
|
withFileTypes: false
|
|
@@ -7379,7 +7369,7 @@ var PathScurryBase = class {
|
|
|
7379
7369
|
entry = this.cwd;
|
|
7380
7370
|
}
|
|
7381
7371
|
const e = entry.realpathSync();
|
|
7382
|
-
return withFileTypes ? e : e
|
|
7372
|
+
return withFileTypes ? e : e?.fullpath();
|
|
7383
7373
|
}
|
|
7384
7374
|
async walk(entry = this.cwd, opts = {}) {
|
|
7385
7375
|
if (typeof entry === "string") {
|
|
@@ -7413,7 +7403,7 @@ var PathScurryBase = class {
|
|
|
7413
7403
|
results.push(withFileTypes ? e : e.fullpath());
|
|
7414
7404
|
}
|
|
7415
7405
|
if (follow && e.isSymbolicLink()) {
|
|
7416
|
-
e.realpath().then((r) =>
|
|
7406
|
+
e.realpath().then((r) => r?.isUnknown() ? r.lstat() : r).then((r) => r?.shouldWalk(dirs, walkFilter) ? walk(r, next) : next());
|
|
7417
7407
|
} else {
|
|
7418
7408
|
if (e.shouldWalk(dirs, walkFilter)) {
|
|
7419
7409
|
walk(e, next);
|
|
@@ -7559,7 +7549,7 @@ var PathScurryBase = class {
|
|
|
7559
7549
|
const promises = [];
|
|
7560
7550
|
for (const e of entries) {
|
|
7561
7551
|
if (e.isSymbolicLink()) {
|
|
7562
|
-
promises.push(e.realpath().then((r) =>
|
|
7552
|
+
promises.push(e.realpath().then((r) => r?.isUnknown() ? r.lstat() : r));
|
|
7563
7553
|
}
|
|
7564
7554
|
}
|
|
7565
7555
|
if (promises.length) {
|
|
@@ -7987,8 +7977,7 @@ var HasWalkedCache = class _HasWalkedCache {
|
|
|
7987
7977
|
return new _HasWalkedCache(new Map(this.store));
|
|
7988
7978
|
}
|
|
7989
7979
|
hasWalked(target, pattern) {
|
|
7990
|
-
|
|
7991
|
-
return (_a2 = this.store.get(target.fullpath())) == null ? void 0 : _a2.has(pattern.globString());
|
|
7980
|
+
return this.store.get(target.fullpath())?.has(pattern.globString());
|
|
7992
7981
|
}
|
|
7993
7982
|
storeWalked(target, pattern) {
|
|
7994
7983
|
const fullpath = target.fullpath();
|
|
@@ -8100,8 +8089,8 @@ var Processor = class _Processor {
|
|
|
8100
8089
|
if (!t.isSymbolicLink() || this.follow || pattern.checkFollowGlobstar()) {
|
|
8101
8090
|
this.subwalks.add(t, pattern);
|
|
8102
8091
|
}
|
|
8103
|
-
const rp = rest
|
|
8104
|
-
const rrest = rest
|
|
8092
|
+
const rp = rest?.pattern();
|
|
8093
|
+
const rrest = rest?.rest();
|
|
8105
8094
|
if (!rest || (rp === "" || rp === ".") && !rrest) {
|
|
8106
8095
|
this.matches.add(t, absolute, rp === "" || rp === ".");
|
|
8107
8096
|
} else {
|
|
@@ -8236,20 +8225,17 @@ var GlobUtil = class {
|
|
|
8236
8225
|
}
|
|
8237
8226
|
}
|
|
8238
8227
|
#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));
|
|
8228
|
+
return this.seen.has(path5) || !!this.#ignore?.ignored?.(path5);
|
|
8241
8229
|
}
|
|
8242
8230
|
#childrenIgnored(path5) {
|
|
8243
|
-
|
|
8244
|
-
return !!((_b = (_a2 = this.#ignore) == null ? void 0 : _a2.childrenIgnored) == null ? void 0 : _b.call(_a2, path5));
|
|
8231
|
+
return !!this.#ignore?.childrenIgnored?.(path5);
|
|
8245
8232
|
}
|
|
8246
8233
|
// backpressure mechanism
|
|
8247
8234
|
pause() {
|
|
8248
8235
|
this.paused = true;
|
|
8249
8236
|
}
|
|
8250
8237
|
resume() {
|
|
8251
|
-
|
|
8252
|
-
if ((_a2 = this.signal) == null ? void 0 : _a2.aborted)
|
|
8238
|
+
if (this.signal?.aborted)
|
|
8253
8239
|
return;
|
|
8254
8240
|
this.paused = false;
|
|
8255
8241
|
let fn = void 0;
|
|
@@ -8258,8 +8244,7 @@ var GlobUtil = class {
|
|
|
8258
8244
|
}
|
|
8259
8245
|
}
|
|
8260
8246
|
onResume(fn) {
|
|
8261
|
-
|
|
8262
|
-
if ((_a2 = this.signal) == null ? void 0 : _a2.aborted)
|
|
8247
|
+
if (this.signal?.aborted)
|
|
8263
8248
|
return;
|
|
8264
8249
|
if (!this.paused) {
|
|
8265
8250
|
fn();
|
|
@@ -8281,7 +8266,7 @@ var GlobUtil = class {
|
|
|
8281
8266
|
}
|
|
8282
8267
|
const needStat = e.isUnknown() || this.opts.stat;
|
|
8283
8268
|
const s = needStat ? await e.lstat() : e;
|
|
8284
|
-
if (this.opts.follow && this.opts.nodir &&
|
|
8269
|
+
if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {
|
|
8285
8270
|
const target = await s.realpath();
|
|
8286
8271
|
if (target && (target.isUnknown() || this.opts.stat)) {
|
|
8287
8272
|
await target.lstat();
|
|
@@ -8290,8 +8275,7 @@ var GlobUtil = class {
|
|
|
8290
8275
|
return this.matchCheckTest(s, ifDir);
|
|
8291
8276
|
}
|
|
8292
8277
|
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;
|
|
8278
|
+
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
8279
|
}
|
|
8296
8280
|
matchCheckSync(e, ifDir) {
|
|
8297
8281
|
if (ifDir && this.opts.nodir)
|
|
@@ -8305,19 +8289,18 @@ var GlobUtil = class {
|
|
|
8305
8289
|
}
|
|
8306
8290
|
const needStat = e.isUnknown() || this.opts.stat;
|
|
8307
8291
|
const s = needStat ? e.lstatSync() : e;
|
|
8308
|
-
if (this.opts.follow && this.opts.nodir &&
|
|
8292
|
+
if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {
|
|
8309
8293
|
const target = s.realpathSync();
|
|
8310
|
-
if (target && (
|
|
8294
|
+
if (target && (target?.isUnknown() || this.opts.stat)) {
|
|
8311
8295
|
target.lstatSync();
|
|
8312
8296
|
}
|
|
8313
8297
|
}
|
|
8314
8298
|
return this.matchCheckTest(s, ifDir);
|
|
8315
8299
|
}
|
|
8316
8300
|
matchFinish(e, absolute) {
|
|
8317
|
-
var _a2;
|
|
8318
8301
|
if (this.#ignored(e))
|
|
8319
8302
|
return;
|
|
8320
|
-
if (!this.includeChildMatches &&
|
|
8303
|
+
if (!this.includeChildMatches && this.#ignore?.add) {
|
|
8321
8304
|
const ign = `${e.relativePosix()}/**`;
|
|
8322
8305
|
this.#ignore.add(ign);
|
|
8323
8306
|
}
|
|
@@ -8346,16 +8329,14 @@ var GlobUtil = class {
|
|
|
8346
8329
|
this.matchFinish(p, absolute);
|
|
8347
8330
|
}
|
|
8348
8331
|
walkCB(target, patterns, cb) {
|
|
8349
|
-
|
|
8350
|
-
if ((_a2 = this.signal) == null ? void 0 : _a2.aborted)
|
|
8332
|
+
if (this.signal?.aborted)
|
|
8351
8333
|
cb();
|
|
8352
8334
|
this.walkCB2(target, patterns, new Processor(this.opts), cb);
|
|
8353
8335
|
}
|
|
8354
8336
|
walkCB2(target, patterns, processor, cb) {
|
|
8355
|
-
var _a2;
|
|
8356
8337
|
if (this.#childrenIgnored(target))
|
|
8357
8338
|
return cb();
|
|
8358
|
-
if (
|
|
8339
|
+
if (this.signal?.aborted)
|
|
8359
8340
|
cb();
|
|
8360
8341
|
if (this.paused) {
|
|
8361
8342
|
this.onResume(() => this.walkCB2(target, patterns, processor, cb));
|
|
@@ -8407,16 +8388,14 @@ var GlobUtil = class {
|
|
|
8407
8388
|
next();
|
|
8408
8389
|
}
|
|
8409
8390
|
walkCBSync(target, patterns, cb) {
|
|
8410
|
-
|
|
8411
|
-
if ((_a2 = this.signal) == null ? void 0 : _a2.aborted)
|
|
8391
|
+
if (this.signal?.aborted)
|
|
8412
8392
|
cb();
|
|
8413
8393
|
this.walkCB2Sync(target, patterns, new Processor(this.opts), cb);
|
|
8414
8394
|
}
|
|
8415
8395
|
walkCB2Sync(target, patterns, processor, cb) {
|
|
8416
|
-
var _a2;
|
|
8417
8396
|
if (this.#childrenIgnored(target))
|
|
8418
8397
|
return cb();
|
|
8419
|
-
if (
|
|
8398
|
+
if (this.signal?.aborted)
|
|
8420
8399
|
cb();
|
|
8421
8400
|
if (this.paused) {
|
|
8422
8401
|
this.onResume(() => this.walkCB2Sync(target, patterns, processor, cb));
|
|
@@ -8471,16 +8450,14 @@ var GlobWalker = class extends GlobUtil {
|
|
|
8471
8450
|
this.matches.add(e);
|
|
8472
8451
|
}
|
|
8473
8452
|
async walk() {
|
|
8474
|
-
|
|
8475
|
-
if ((_a2 = this.signal) == null ? void 0 : _a2.aborted)
|
|
8453
|
+
if (this.signal?.aborted)
|
|
8476
8454
|
throw this.signal.reason;
|
|
8477
8455
|
if (this.path.isUnknown()) {
|
|
8478
8456
|
await this.path.lstat();
|
|
8479
8457
|
}
|
|
8480
8458
|
await new Promise((res, rej) => {
|
|
8481
8459
|
this.walkCB(this.path, this.patterns, () => {
|
|
8482
|
-
|
|
8483
|
-
if ((_a3 = this.signal) == null ? void 0 : _a3.aborted) {
|
|
8460
|
+
if (this.signal?.aborted) {
|
|
8484
8461
|
rej(this.signal.reason);
|
|
8485
8462
|
} else {
|
|
8486
8463
|
res(this.matches);
|
|
@@ -8490,15 +8467,13 @@ var GlobWalker = class extends GlobUtil {
|
|
|
8490
8467
|
return this.matches;
|
|
8491
8468
|
}
|
|
8492
8469
|
walkSync() {
|
|
8493
|
-
|
|
8494
|
-
if ((_a2 = this.signal) == null ? void 0 : _a2.aborted)
|
|
8470
|
+
if (this.signal?.aborted)
|
|
8495
8471
|
throw this.signal.reason;
|
|
8496
8472
|
if (this.path.isUnknown()) {
|
|
8497
8473
|
this.path.lstatSync();
|
|
8498
8474
|
}
|
|
8499
8475
|
this.walkCBSync(this.path, this.patterns, () => {
|
|
8500
|
-
|
|
8501
|
-
if ((_a3 = this.signal) == null ? void 0 : _a3.aborted)
|
|
8476
|
+
if (this.signal?.aborted)
|
|
8502
8477
|
throw this.signal.reason;
|
|
8503
8478
|
});
|
|
8504
8479
|
return this.matches;
|
|
@@ -8805,7 +8780,6 @@ var import_is_ci = __toESM(require_is_ci());
|
|
|
8805
8780
|
|
|
8806
8781
|
// node_modules/find-up/index.js
|
|
8807
8782
|
var import_node_path3 = __toESM(require("node:path"), 1);
|
|
8808
|
-
var import_node_url4 = require("node:url");
|
|
8809
8783
|
|
|
8810
8784
|
// node_modules/locate-path/index.js
|
|
8811
8785
|
var import_node_process = __toESM(require("node:process"), 1);
|
|
@@ -8981,14 +8955,19 @@ async function locatePath(paths, {
|
|
|
8981
8955
|
}, { concurrency, preserveOrder });
|
|
8982
8956
|
}
|
|
8983
8957
|
|
|
8958
|
+
// node_modules/unicorn-magic/node.js
|
|
8959
|
+
var import_node_url4 = require("node:url");
|
|
8960
|
+
function toPath2(urlOrPath) {
|
|
8961
|
+
return urlOrPath instanceof URL ? (0, import_node_url4.fileURLToPath)(urlOrPath) : urlOrPath;
|
|
8962
|
+
}
|
|
8963
|
+
|
|
8984
8964
|
// node_modules/find-up/index.js
|
|
8985
|
-
var toPath2 = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url4.fileURLToPath)(urlOrPath) : urlOrPath;
|
|
8986
8965
|
var findUpStop = Symbol("findUpStop");
|
|
8987
8966
|
async function findUpMultiple(name, options = {}) {
|
|
8988
|
-
let directory = import_node_path3.default.resolve(toPath2(options.cwd)
|
|
8967
|
+
let directory = import_node_path3.default.resolve(toPath2(options.cwd) ?? "");
|
|
8989
8968
|
const { root } = import_node_path3.default.parse(directory);
|
|
8990
|
-
const stopAt = import_node_path3.default.resolve(directory, options.stopAt
|
|
8991
|
-
const limit = options.limit
|
|
8969
|
+
const stopAt = import_node_path3.default.resolve(directory, toPath2(options.stopAt ?? root));
|
|
8970
|
+
const limit = options.limit ?? Number.POSITIVE_INFINITY;
|
|
8992
8971
|
const paths = [name].flat();
|
|
8993
8972
|
const runMatcher = async (locateOptions) => {
|
|
8994
8973
|
if (typeof name !== "function") {
|