@kubb/core 0.40.0 → 0.41.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +17 -28
- package/dist/index.global.js +551 -223
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +36 -38
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +35 -38
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -1
package/dist/index.global.js
CHANGED
|
@@ -4289,9 +4289,9 @@ var kubb = (function (exports) {
|
|
|
4289
4289
|
if (typeof maybeCb !== "function") {
|
|
4290
4290
|
throw new TypeError("The last argument must be of type Function");
|
|
4291
4291
|
}
|
|
4292
|
-
var
|
|
4292
|
+
var self2 = this;
|
|
4293
4293
|
var cb = function() {
|
|
4294
|
-
return maybeCb.apply(
|
|
4294
|
+
return maybeCb.apply(self2, arguments);
|
|
4295
4295
|
};
|
|
4296
4296
|
original.apply(this, args).then(
|
|
4297
4297
|
function(ret) {
|
|
@@ -4334,17 +4334,17 @@ var kubb = (function (exports) {
|
|
|
4334
4334
|
throw new TypeError("Cannot call a class as a function");
|
|
4335
4335
|
}
|
|
4336
4336
|
}
|
|
4337
|
-
function _possibleConstructorReturn(
|
|
4337
|
+
function _possibleConstructorReturn(self2, call) {
|
|
4338
4338
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
4339
4339
|
return call;
|
|
4340
4340
|
}
|
|
4341
|
-
return _assertThisInitialized(
|
|
4341
|
+
return _assertThisInitialized(self2);
|
|
4342
4342
|
}
|
|
4343
|
-
function _assertThisInitialized(
|
|
4344
|
-
if (
|
|
4343
|
+
function _assertThisInitialized(self2) {
|
|
4344
|
+
if (self2 === void 0) {
|
|
4345
4345
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4346
4346
|
}
|
|
4347
|
-
return
|
|
4347
|
+
return self2;
|
|
4348
4348
|
}
|
|
4349
4349
|
function _getPrototypeOf(o) {
|
|
4350
4350
|
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) {
|
|
@@ -4550,17 +4550,17 @@ var kubb = (function (exports) {
|
|
|
4550
4550
|
_defineProperties(Constructor, staticProps);
|
|
4551
4551
|
return Constructor;
|
|
4552
4552
|
}
|
|
4553
|
-
function _possibleConstructorReturn(
|
|
4553
|
+
function _possibleConstructorReturn(self2, call) {
|
|
4554
4554
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
4555
4555
|
return call;
|
|
4556
4556
|
}
|
|
4557
|
-
return _assertThisInitialized(
|
|
4557
|
+
return _assertThisInitialized(self2);
|
|
4558
4558
|
}
|
|
4559
|
-
function _assertThisInitialized(
|
|
4560
|
-
if (
|
|
4559
|
+
function _assertThisInitialized(self2) {
|
|
4560
|
+
if (self2 === void 0) {
|
|
4561
4561
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4562
4562
|
}
|
|
4563
|
-
return
|
|
4563
|
+
return self2;
|
|
4564
4564
|
}
|
|
4565
4565
|
function _inherits(subClass, superClass) {
|
|
4566
4566
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -7936,16 +7936,16 @@ var kubb = (function (exports) {
|
|
|
7936
7936
|
});
|
|
7937
7937
|
return this;
|
|
7938
7938
|
}
|
|
7939
|
-
function emitErrorAndCloseNT(
|
|
7940
|
-
emitErrorNT(
|
|
7941
|
-
emitCloseNT(
|
|
7939
|
+
function emitErrorAndCloseNT(self2, err) {
|
|
7940
|
+
emitErrorNT(self2, err);
|
|
7941
|
+
emitCloseNT(self2);
|
|
7942
7942
|
}
|
|
7943
|
-
function emitCloseNT(
|
|
7944
|
-
if (
|
|
7943
|
+
function emitCloseNT(self2) {
|
|
7944
|
+
if (self2._writableState && !self2._writableState.emitClose)
|
|
7945
7945
|
return;
|
|
7946
|
-
if (
|
|
7946
|
+
if (self2._readableState && !self2._readableState.emitClose)
|
|
7947
7947
|
return;
|
|
7948
|
-
|
|
7948
|
+
self2.emit("close");
|
|
7949
7949
|
}
|
|
7950
7950
|
function undestroy() {
|
|
7951
7951
|
if (this._readableState) {
|
|
@@ -7964,8 +7964,8 @@ var kubb = (function (exports) {
|
|
|
7964
7964
|
this._writableState.errorEmitted = false;
|
|
7965
7965
|
}
|
|
7966
7966
|
}
|
|
7967
|
-
function emitErrorNT(
|
|
7968
|
-
|
|
7967
|
+
function emitErrorNT(self2, err) {
|
|
7968
|
+
self2.emit("error", err);
|
|
7969
7969
|
}
|
|
7970
7970
|
function errorOrDestroy(stream, err) {
|
|
7971
7971
|
var rState = stream._readableState;
|
|
@@ -8732,8 +8732,8 @@ var kubb = (function (exports) {
|
|
|
8732
8732
|
return;
|
|
8733
8733
|
define_process_default.nextTick(onEndNT, this);
|
|
8734
8734
|
}
|
|
8735
|
-
function onEndNT(
|
|
8736
|
-
|
|
8735
|
+
function onEndNT(self2) {
|
|
8736
|
+
self2.end();
|
|
8737
8737
|
}
|
|
8738
8738
|
Object.defineProperty(Duplex.prototype, "destroyed", {
|
|
8739
8739
|
// making it explicit this property is not enumerable
|
|
@@ -8942,14 +8942,14 @@ var kubb = (function (exports) {
|
|
|
8942
8942
|
return 4;
|
|
8943
8943
|
return byte >> 6 === 2 ? -1 : -2;
|
|
8944
8944
|
}
|
|
8945
|
-
function utf8CheckIncomplete(
|
|
8945
|
+
function utf8CheckIncomplete(self2, buf, i) {
|
|
8946
8946
|
var j = buf.length - 1;
|
|
8947
8947
|
if (j < i)
|
|
8948
8948
|
return 0;
|
|
8949
8949
|
var nb = utf8CheckByte(buf[j]);
|
|
8950
8950
|
if (nb >= 0) {
|
|
8951
8951
|
if (nb > 0)
|
|
8952
|
-
|
|
8952
|
+
self2.lastNeed = nb - 1;
|
|
8953
8953
|
return nb;
|
|
8954
8954
|
}
|
|
8955
8955
|
if (--j < i || nb === -2)
|
|
@@ -8957,7 +8957,7 @@ var kubb = (function (exports) {
|
|
|
8957
8957
|
nb = utf8CheckByte(buf[j]);
|
|
8958
8958
|
if (nb >= 0) {
|
|
8959
8959
|
if (nb > 0)
|
|
8960
|
-
|
|
8960
|
+
self2.lastNeed = nb - 2;
|
|
8961
8961
|
return nb;
|
|
8962
8962
|
}
|
|
8963
8963
|
if (--j < i || nb === -2)
|
|
@@ -8968,25 +8968,25 @@ var kubb = (function (exports) {
|
|
|
8968
8968
|
if (nb === 2)
|
|
8969
8969
|
nb = 0;
|
|
8970
8970
|
else
|
|
8971
|
-
|
|
8971
|
+
self2.lastNeed = nb - 3;
|
|
8972
8972
|
}
|
|
8973
8973
|
return nb;
|
|
8974
8974
|
}
|
|
8975
8975
|
return 0;
|
|
8976
8976
|
}
|
|
8977
|
-
function utf8CheckExtraBytes(
|
|
8977
|
+
function utf8CheckExtraBytes(self2, buf, p) {
|
|
8978
8978
|
if ((buf[0] & 192) !== 128) {
|
|
8979
|
-
|
|
8979
|
+
self2.lastNeed = 0;
|
|
8980
8980
|
return "\uFFFD";
|
|
8981
8981
|
}
|
|
8982
|
-
if (
|
|
8982
|
+
if (self2.lastNeed > 1 && buf.length > 1) {
|
|
8983
8983
|
if ((buf[1] & 192) !== 128) {
|
|
8984
|
-
|
|
8984
|
+
self2.lastNeed = 1;
|
|
8985
8985
|
return "\uFFFD";
|
|
8986
8986
|
}
|
|
8987
|
-
if (
|
|
8987
|
+
if (self2.lastNeed > 2 && buf.length > 2) {
|
|
8988
8988
|
if ((buf[2] & 192) !== 128) {
|
|
8989
|
-
|
|
8989
|
+
self2.lastNeed = 2;
|
|
8990
8990
|
return "\uFFFD";
|
|
8991
8991
|
}
|
|
8992
8992
|
}
|
|
@@ -9939,18 +9939,18 @@ var kubb = (function (exports) {
|
|
|
9939
9939
|
}
|
|
9940
9940
|
return res;
|
|
9941
9941
|
};
|
|
9942
|
-
function updateReadableListening(
|
|
9943
|
-
var state =
|
|
9944
|
-
state.readableListening =
|
|
9942
|
+
function updateReadableListening(self2) {
|
|
9943
|
+
var state = self2._readableState;
|
|
9944
|
+
state.readableListening = self2.listenerCount("readable") > 0;
|
|
9945
9945
|
if (state.resumeScheduled && !state.paused) {
|
|
9946
9946
|
state.flowing = true;
|
|
9947
|
-
} else if (
|
|
9948
|
-
|
|
9947
|
+
} else if (self2.listenerCount("data") > 0) {
|
|
9948
|
+
self2.resume();
|
|
9949
9949
|
}
|
|
9950
9950
|
}
|
|
9951
|
-
function nReadingNextTick(
|
|
9951
|
+
function nReadingNextTick(self2) {
|
|
9952
9952
|
debug("readable nexttick read 0");
|
|
9953
|
-
|
|
9953
|
+
self2.read(0);
|
|
9954
9954
|
}
|
|
9955
9955
|
Readable.prototype.resume = function() {
|
|
9956
9956
|
var state = this._readableState;
|
|
@@ -12026,12 +12026,12 @@ var kubb = (function (exports) {
|
|
|
12026
12026
|
this.props = Object.assign({ Node: node_1.Node, Link: node_1.Link, File: node_1.File }, props);
|
|
12027
12027
|
var root = this.createLink();
|
|
12028
12028
|
root.setNode(this.createNode(true));
|
|
12029
|
-
var
|
|
12029
|
+
var self2 = this;
|
|
12030
12030
|
this.StatWatcher = /** @class */
|
|
12031
12031
|
function(_super) {
|
|
12032
12032
|
__extends(StatWatcher2, _super);
|
|
12033
12033
|
function StatWatcher2() {
|
|
12034
|
-
return _super.call(this,
|
|
12034
|
+
return _super.call(this, self2) || this;
|
|
12035
12035
|
}
|
|
12036
12036
|
return StatWatcher2;
|
|
12037
12037
|
}(StatWatcher);
|
|
@@ -12044,7 +12044,7 @@ var kubb = (function (exports) {
|
|
|
12044
12044
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
12045
12045
|
args[_i] = arguments[_i];
|
|
12046
12046
|
}
|
|
12047
|
-
return _super.apply(this, __spreadArray([
|
|
12047
|
+
return _super.apply(this, __spreadArray([self2], args, false)) || this;
|
|
12048
12048
|
}
|
|
12049
12049
|
return class_1;
|
|
12050
12050
|
}(_ReadStream);
|
|
@@ -12057,7 +12057,7 @@ var kubb = (function (exports) {
|
|
|
12057
12057
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
12058
12058
|
args[_i] = arguments[_i];
|
|
12059
12059
|
}
|
|
12060
|
-
return _super.apply(this, __spreadArray([
|
|
12060
|
+
return _super.apply(this, __spreadArray([self2], args, false)) || this;
|
|
12061
12061
|
}
|
|
12062
12062
|
return class_2;
|
|
12063
12063
|
}(_WriteStream);
|
|
@@ -12065,7 +12065,7 @@ var kubb = (function (exports) {
|
|
|
12065
12065
|
function(_super) {
|
|
12066
12066
|
__extends(FSWatcher2, _super);
|
|
12067
12067
|
function FSWatcher2() {
|
|
12068
|
-
return _super.call(this,
|
|
12068
|
+
return _super.call(this, self2) || this;
|
|
12069
12069
|
}
|
|
12070
12070
|
return FSWatcher2;
|
|
12071
12071
|
}(FSWatcher);
|
|
@@ -13358,8 +13358,8 @@ var kubb = (function (exports) {
|
|
|
13358
13358
|
}()
|
|
13359
13359
|
);
|
|
13360
13360
|
exports.Volume = Volume;
|
|
13361
|
-
function emitStop(
|
|
13362
|
-
|
|
13361
|
+
function emitStop(self2) {
|
|
13362
|
+
self2.emit("stop");
|
|
13363
13363
|
}
|
|
13364
13364
|
var StatWatcher = (
|
|
13365
13365
|
/** @class */
|
|
@@ -13460,19 +13460,19 @@ var kubb = (function (exports) {
|
|
|
13460
13460
|
});
|
|
13461
13461
|
}
|
|
13462
13462
|
FsReadStream.prototype.open = function() {
|
|
13463
|
-
var
|
|
13463
|
+
var self2 = this;
|
|
13464
13464
|
this._vol.open(this.path, this.flags, this.mode, function(er, fd) {
|
|
13465
13465
|
if (er) {
|
|
13466
|
-
if (
|
|
13467
|
-
if (
|
|
13468
|
-
|
|
13466
|
+
if (self2.autoClose) {
|
|
13467
|
+
if (self2.destroy)
|
|
13468
|
+
self2.destroy();
|
|
13469
13469
|
}
|
|
13470
|
-
|
|
13470
|
+
self2.emit("error", er);
|
|
13471
13471
|
return;
|
|
13472
13472
|
}
|
|
13473
|
-
|
|
13474
|
-
|
|
13475
|
-
|
|
13473
|
+
self2.fd = fd;
|
|
13474
|
+
self2.emit("open", fd);
|
|
13475
|
+
self2.read();
|
|
13476
13476
|
});
|
|
13477
13477
|
};
|
|
13478
13478
|
FsReadStream.prototype._read = function(n) {
|
|
@@ -13493,24 +13493,24 @@ var kubb = (function (exports) {
|
|
|
13493
13493
|
toRead = Math.min(this.end - this.pos + 1, toRead);
|
|
13494
13494
|
if (toRead <= 0)
|
|
13495
13495
|
return this.push(null);
|
|
13496
|
-
var
|
|
13496
|
+
var self2 = this;
|
|
13497
13497
|
this._vol.read(this.fd, pool, pool.used, toRead, this.pos, onread);
|
|
13498
13498
|
if (this.pos !== void 0)
|
|
13499
13499
|
this.pos += toRead;
|
|
13500
13500
|
pool.used += toRead;
|
|
13501
13501
|
function onread(er, bytesRead) {
|
|
13502
13502
|
if (er) {
|
|
13503
|
-
if (
|
|
13504
|
-
|
|
13503
|
+
if (self2.autoClose && self2.destroy) {
|
|
13504
|
+
self2.destroy();
|
|
13505
13505
|
}
|
|
13506
|
-
|
|
13506
|
+
self2.emit("error", er);
|
|
13507
13507
|
} else {
|
|
13508
13508
|
var b = null;
|
|
13509
13509
|
if (bytesRead > 0) {
|
|
13510
|
-
|
|
13510
|
+
self2.bytesRead += bytesRead;
|
|
13511
13511
|
b = thisPool.slice(start, start + bytesRead);
|
|
13512
13512
|
}
|
|
13513
|
-
|
|
13513
|
+
self2.push(b);
|
|
13514
13514
|
}
|
|
13515
13515
|
}
|
|
13516
13516
|
};
|
|
@@ -13605,15 +13605,15 @@ var kubb = (function (exports) {
|
|
|
13605
13605
|
this._write(data, encoding, cb);
|
|
13606
13606
|
});
|
|
13607
13607
|
}
|
|
13608
|
-
var
|
|
13608
|
+
var self2 = this;
|
|
13609
13609
|
this._vol.write(this.fd, data, 0, data.length, this.pos, function(er, bytes) {
|
|
13610
13610
|
if (er) {
|
|
13611
|
-
if (
|
|
13612
|
-
|
|
13611
|
+
if (self2.autoClose && self2.destroy) {
|
|
13612
|
+
self2.destroy();
|
|
13613
13613
|
}
|
|
13614
13614
|
return cb(er);
|
|
13615
13615
|
}
|
|
13616
|
-
|
|
13616
|
+
self2.bytesWritten += bytes;
|
|
13617
13617
|
cb();
|
|
13618
13618
|
});
|
|
13619
13619
|
if (this.pos !== void 0)
|
|
@@ -13625,7 +13625,7 @@ var kubb = (function (exports) {
|
|
|
13625
13625
|
this._writev(data, cb);
|
|
13626
13626
|
});
|
|
13627
13627
|
}
|
|
13628
|
-
var
|
|
13628
|
+
var self2 = this;
|
|
13629
13629
|
var len = data.length;
|
|
13630
13630
|
var chunks = new Array(len);
|
|
13631
13631
|
var size = 0;
|
|
@@ -13637,11 +13637,11 @@ var kubb = (function (exports) {
|
|
|
13637
13637
|
var buf = buffer_1.Buffer.concat(chunks);
|
|
13638
13638
|
this._vol.write(this.fd, buf, 0, buf.length, this.pos, function(er, bytes) {
|
|
13639
13639
|
if (er) {
|
|
13640
|
-
if (
|
|
13641
|
-
|
|
13640
|
+
if (self2.destroy)
|
|
13641
|
+
self2.destroy();
|
|
13642
13642
|
return cb(er);
|
|
13643
13643
|
}
|
|
13644
|
-
|
|
13644
|
+
self2.bytesWritten += bytes;
|
|
13645
13645
|
cb();
|
|
13646
13646
|
});
|
|
13647
13647
|
if (this.pos !== void 0)
|
|
@@ -14550,7 +14550,7 @@ var kubb = (function (exports) {
|
|
|
14550
14550
|
var reClassStart = -1;
|
|
14551
14551
|
var classStart = -1;
|
|
14552
14552
|
var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
|
|
14553
|
-
var
|
|
14553
|
+
var self2 = this;
|
|
14554
14554
|
function clearStateChar() {
|
|
14555
14555
|
if (stateChar) {
|
|
14556
14556
|
switch (stateChar) {
|
|
@@ -14566,7 +14566,7 @@ var kubb = (function (exports) {
|
|
|
14566
14566
|
re += "\\" + stateChar;
|
|
14567
14567
|
break;
|
|
14568
14568
|
}
|
|
14569
|
-
|
|
14569
|
+
self2.debug("clearStateChar %j %j", stateChar, re);
|
|
14570
14570
|
stateChar = false;
|
|
14571
14571
|
}
|
|
14572
14572
|
}
|
|
@@ -14598,7 +14598,7 @@ var kubb = (function (exports) {
|
|
|
14598
14598
|
re += c;
|
|
14599
14599
|
continue;
|
|
14600
14600
|
}
|
|
14601
|
-
|
|
14601
|
+
self2.debug("call clearStateChar %j", stateChar);
|
|
14602
14602
|
clearStateChar();
|
|
14603
14603
|
stateChar = c;
|
|
14604
14604
|
if (options.noext)
|
|
@@ -14963,12 +14963,12 @@ var kubb = (function (exports) {
|
|
|
14963
14963
|
function alphasort(a, b) {
|
|
14964
14964
|
return a.localeCompare(b, "en");
|
|
14965
14965
|
}
|
|
14966
|
-
function setupIgnores(
|
|
14967
|
-
|
|
14968
|
-
if (!Array.isArray(
|
|
14969
|
-
|
|
14970
|
-
if (
|
|
14971
|
-
|
|
14966
|
+
function setupIgnores(self2, options) {
|
|
14967
|
+
self2.ignore = options.ignore || [];
|
|
14968
|
+
if (!Array.isArray(self2.ignore))
|
|
14969
|
+
self2.ignore = [self2.ignore];
|
|
14970
|
+
if (self2.ignore.length) {
|
|
14971
|
+
self2.ignore = self2.ignore.map(ignoreMap);
|
|
14972
14972
|
}
|
|
14973
14973
|
}
|
|
14974
14974
|
function ignoreMap(pattern) {
|
|
@@ -14982,7 +14982,7 @@ var kubb = (function (exports) {
|
|
|
14982
14982
|
gmatcher
|
|
14983
14983
|
};
|
|
14984
14984
|
}
|
|
14985
|
-
function setopts(
|
|
14985
|
+
function setopts(self2, pattern, options) {
|
|
14986
14986
|
if (!options)
|
|
14987
14987
|
options = {};
|
|
14988
14988
|
if (options.matchBase && -1 === pattern.indexOf("/")) {
|
|
@@ -14991,61 +14991,61 @@ var kubb = (function (exports) {
|
|
|
14991
14991
|
}
|
|
14992
14992
|
pattern = "**/" + pattern;
|
|
14993
14993
|
}
|
|
14994
|
-
|
|
14995
|
-
|
|
14996
|
-
|
|
14997
|
-
|
|
14998
|
-
|
|
14999
|
-
|
|
15000
|
-
|
|
15001
|
-
|
|
15002
|
-
|
|
15003
|
-
if (
|
|
15004
|
-
|
|
15005
|
-
|
|
15006
|
-
|
|
15007
|
-
|
|
15008
|
-
|
|
15009
|
-
|
|
15010
|
-
|
|
15011
|
-
|
|
15012
|
-
|
|
15013
|
-
|
|
15014
|
-
|
|
15015
|
-
|
|
15016
|
-
|
|
15017
|
-
|
|
15018
|
-
setupIgnores(
|
|
15019
|
-
|
|
14994
|
+
self2.silent = !!options.silent;
|
|
14995
|
+
self2.pattern = pattern;
|
|
14996
|
+
self2.strict = options.strict !== false;
|
|
14997
|
+
self2.realpath = !!options.realpath;
|
|
14998
|
+
self2.realpathCache = options.realpathCache || /* @__PURE__ */ Object.create(null);
|
|
14999
|
+
self2.follow = !!options.follow;
|
|
15000
|
+
self2.dot = !!options.dot;
|
|
15001
|
+
self2.mark = !!options.mark;
|
|
15002
|
+
self2.nodir = !!options.nodir;
|
|
15003
|
+
if (self2.nodir)
|
|
15004
|
+
self2.mark = true;
|
|
15005
|
+
self2.sync = !!options.sync;
|
|
15006
|
+
self2.nounique = !!options.nounique;
|
|
15007
|
+
self2.nonull = !!options.nonull;
|
|
15008
|
+
self2.nosort = !!options.nosort;
|
|
15009
|
+
self2.nocase = !!options.nocase;
|
|
15010
|
+
self2.stat = !!options.stat;
|
|
15011
|
+
self2.noprocess = !!options.noprocess;
|
|
15012
|
+
self2.absolute = !!options.absolute;
|
|
15013
|
+
self2.fs = options.fs || fs3;
|
|
15014
|
+
self2.maxLength = options.maxLength || Infinity;
|
|
15015
|
+
self2.cache = options.cache || /* @__PURE__ */ Object.create(null);
|
|
15016
|
+
self2.statCache = options.statCache || /* @__PURE__ */ Object.create(null);
|
|
15017
|
+
self2.symlinks = options.symlinks || /* @__PURE__ */ Object.create(null);
|
|
15018
|
+
setupIgnores(self2, options);
|
|
15019
|
+
self2.changedCwd = false;
|
|
15020
15020
|
var cwd = define_process_default.cwd();
|
|
15021
15021
|
if (!ownProp(options, "cwd"))
|
|
15022
|
-
|
|
15022
|
+
self2.cwd = cwd;
|
|
15023
15023
|
else {
|
|
15024
|
-
|
|
15025
|
-
|
|
15024
|
+
self2.cwd = path.resolve(options.cwd);
|
|
15025
|
+
self2.changedCwd = self2.cwd !== cwd;
|
|
15026
15026
|
}
|
|
15027
|
-
|
|
15028
|
-
|
|
15027
|
+
self2.root = options.root || path.resolve(self2.cwd, "/");
|
|
15028
|
+
self2.root = path.resolve(self2.root);
|
|
15029
15029
|
if (define_process_default.platform === "win32")
|
|
15030
|
-
|
|
15031
|
-
|
|
15030
|
+
self2.root = self2.root.replace(/\\/g, "/");
|
|
15031
|
+
self2.cwdAbs = isAbsolute(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd);
|
|
15032
15032
|
if (define_process_default.platform === "win32")
|
|
15033
|
-
|
|
15034
|
-
|
|
15033
|
+
self2.cwdAbs = self2.cwdAbs.replace(/\\/g, "/");
|
|
15034
|
+
self2.nomount = !!options.nomount;
|
|
15035
15035
|
options.nonegate = true;
|
|
15036
15036
|
options.nocomment = true;
|
|
15037
15037
|
options.allowWindowsEscape = false;
|
|
15038
|
-
|
|
15039
|
-
|
|
15038
|
+
self2.minimatch = new Minimatch(pattern, options);
|
|
15039
|
+
self2.options = self2.minimatch.options;
|
|
15040
15040
|
}
|
|
15041
|
-
function finish(
|
|
15042
|
-
var nou =
|
|
15041
|
+
function finish(self2) {
|
|
15042
|
+
var nou = self2.nounique;
|
|
15043
15043
|
var all = nou ? [] : /* @__PURE__ */ Object.create(null);
|
|
15044
|
-
for (var i = 0, l =
|
|
15045
|
-
var matches =
|
|
15044
|
+
for (var i = 0, l = self2.matches.length; i < l; i++) {
|
|
15045
|
+
var matches = self2.matches[i];
|
|
15046
15046
|
if (!matches || Object.keys(matches).length === 0) {
|
|
15047
|
-
if (
|
|
15048
|
-
var literal =
|
|
15047
|
+
if (self2.nonull) {
|
|
15048
|
+
var literal = self2.minimatch.globSet[i];
|
|
15049
15049
|
if (nou)
|
|
15050
15050
|
all.push(literal);
|
|
15051
15051
|
else
|
|
@@ -15063,31 +15063,31 @@ var kubb = (function (exports) {
|
|
|
15063
15063
|
}
|
|
15064
15064
|
if (!nou)
|
|
15065
15065
|
all = Object.keys(all);
|
|
15066
|
-
if (!
|
|
15066
|
+
if (!self2.nosort)
|
|
15067
15067
|
all = all.sort(alphasort);
|
|
15068
|
-
if (
|
|
15068
|
+
if (self2.mark) {
|
|
15069
15069
|
for (var i = 0; i < all.length; i++) {
|
|
15070
|
-
all[i] =
|
|
15070
|
+
all[i] = self2._mark(all[i]);
|
|
15071
15071
|
}
|
|
15072
|
-
if (
|
|
15072
|
+
if (self2.nodir) {
|
|
15073
15073
|
all = all.filter(function(e) {
|
|
15074
15074
|
var notDir = !/\/$/.test(e);
|
|
15075
|
-
var c =
|
|
15075
|
+
var c = self2.cache[e] || self2.cache[makeAbs(self2, e)];
|
|
15076
15076
|
if (notDir && c)
|
|
15077
15077
|
notDir = c !== "DIR" && !Array.isArray(c);
|
|
15078
15078
|
return notDir;
|
|
15079
15079
|
});
|
|
15080
15080
|
}
|
|
15081
15081
|
}
|
|
15082
|
-
if (
|
|
15082
|
+
if (self2.ignore.length)
|
|
15083
15083
|
all = all.filter(function(m2) {
|
|
15084
|
-
return !isIgnored(
|
|
15084
|
+
return !isIgnored(self2, m2);
|
|
15085
15085
|
});
|
|
15086
|
-
|
|
15086
|
+
self2.found = all;
|
|
15087
15087
|
}
|
|
15088
|
-
function mark(
|
|
15089
|
-
var abs = makeAbs(
|
|
15090
|
-
var c =
|
|
15088
|
+
function mark(self2, p) {
|
|
15089
|
+
var abs = makeAbs(self2, p);
|
|
15090
|
+
var c = self2.cache[abs];
|
|
15091
15091
|
var m = p;
|
|
15092
15092
|
if (c) {
|
|
15093
15093
|
var isDir = c === "DIR" || Array.isArray(c);
|
|
@@ -15097,21 +15097,21 @@ var kubb = (function (exports) {
|
|
|
15097
15097
|
else if (!isDir && slash)
|
|
15098
15098
|
m = m.slice(0, -1);
|
|
15099
15099
|
if (m !== p) {
|
|
15100
|
-
var mabs = makeAbs(
|
|
15101
|
-
|
|
15102
|
-
|
|
15100
|
+
var mabs = makeAbs(self2, m);
|
|
15101
|
+
self2.statCache[mabs] = self2.statCache[abs];
|
|
15102
|
+
self2.cache[mabs] = self2.cache[abs];
|
|
15103
15103
|
}
|
|
15104
15104
|
}
|
|
15105
15105
|
return m;
|
|
15106
15106
|
}
|
|
15107
|
-
function makeAbs(
|
|
15107
|
+
function makeAbs(self2, f) {
|
|
15108
15108
|
var abs = f;
|
|
15109
15109
|
if (f.charAt(0) === "/") {
|
|
15110
|
-
abs = path.join(
|
|
15110
|
+
abs = path.join(self2.root, f);
|
|
15111
15111
|
} else if (isAbsolute(f) || f === "") {
|
|
15112
15112
|
abs = f;
|
|
15113
|
-
} else if (
|
|
15114
|
-
abs = path.resolve(
|
|
15113
|
+
} else if (self2.changedCwd) {
|
|
15114
|
+
abs = path.resolve(self2.cwd, f);
|
|
15115
15115
|
} else {
|
|
15116
15116
|
abs = path.resolve(f);
|
|
15117
15117
|
}
|
|
@@ -15119,17 +15119,17 @@ var kubb = (function (exports) {
|
|
|
15119
15119
|
abs = abs.replace(/\\/g, "/");
|
|
15120
15120
|
return abs;
|
|
15121
15121
|
}
|
|
15122
|
-
function isIgnored(
|
|
15123
|
-
if (!
|
|
15122
|
+
function isIgnored(self2, path2) {
|
|
15123
|
+
if (!self2.ignore.length)
|
|
15124
15124
|
return false;
|
|
15125
|
-
return
|
|
15125
|
+
return self2.ignore.some(function(item) {
|
|
15126
15126
|
return item.matcher.match(path2) || !!(item.gmatcher && item.gmatcher.match(path2));
|
|
15127
15127
|
});
|
|
15128
15128
|
}
|
|
15129
|
-
function childrenIgnored(
|
|
15130
|
-
if (!
|
|
15129
|
+
function childrenIgnored(self2, path2) {
|
|
15130
|
+
if (!self2.ignore.length)
|
|
15131
15131
|
return false;
|
|
15132
|
-
return
|
|
15132
|
+
return self2.ignore.some(function(item) {
|
|
15133
15133
|
return !!(item.gmatcher && item.gmatcher.match(path2));
|
|
15134
15134
|
});
|
|
15135
15135
|
}
|
|
@@ -15180,17 +15180,17 @@ var kubb = (function (exports) {
|
|
|
15180
15180
|
GlobSync.prototype._finish = function() {
|
|
15181
15181
|
assert.ok(this instanceof GlobSync);
|
|
15182
15182
|
if (this.realpath) {
|
|
15183
|
-
var
|
|
15183
|
+
var self2 = this;
|
|
15184
15184
|
this.matches.forEach(function(matchset, index) {
|
|
15185
|
-
var set =
|
|
15185
|
+
var set = self2.matches[index] = /* @__PURE__ */ Object.create(null);
|
|
15186
15186
|
for (var p in matchset) {
|
|
15187
15187
|
try {
|
|
15188
|
-
p =
|
|
15189
|
-
var real = rp.realpathSync(p,
|
|
15188
|
+
p = self2._makeAbs(p);
|
|
15189
|
+
var real = rp.realpathSync(p, self2.realpathCache);
|
|
15190
15190
|
set[real] = true;
|
|
15191
15191
|
} catch (er) {
|
|
15192
15192
|
if (er.syscall === "stat")
|
|
15193
|
-
set[
|
|
15193
|
+
set[self2._makeAbs(p)] = true;
|
|
15194
15194
|
else
|
|
15195
15195
|
throw er;
|
|
15196
15196
|
}
|
|
@@ -15700,7 +15700,7 @@ var kubb = (function (exports) {
|
|
|
15700
15700
|
cb(null, matches);
|
|
15701
15701
|
});
|
|
15702
15702
|
}
|
|
15703
|
-
var
|
|
15703
|
+
var self2 = this;
|
|
15704
15704
|
this._processing = 0;
|
|
15705
15705
|
this._emitQueue = [];
|
|
15706
15706
|
this._processQueue = [];
|
|
@@ -15715,14 +15715,14 @@ var kubb = (function (exports) {
|
|
|
15715
15715
|
}
|
|
15716
15716
|
sync = false;
|
|
15717
15717
|
function done() {
|
|
15718
|
-
--
|
|
15719
|
-
if (
|
|
15718
|
+
--self2._processing;
|
|
15719
|
+
if (self2._processing <= 0) {
|
|
15720
15720
|
if (sync) {
|
|
15721
15721
|
define_process_default.nextTick(function() {
|
|
15722
|
-
|
|
15722
|
+
self2._finish();
|
|
15723
15723
|
});
|
|
15724
15724
|
} else {
|
|
15725
|
-
|
|
15725
|
+
self2._finish();
|
|
15726
15726
|
}
|
|
15727
15727
|
}
|
|
15728
15728
|
}
|
|
@@ -15743,12 +15743,12 @@ var kubb = (function (exports) {
|
|
|
15743
15743
|
var n = this.matches.length;
|
|
15744
15744
|
if (n === 0)
|
|
15745
15745
|
return this._finish();
|
|
15746
|
-
var
|
|
15746
|
+
var self2 = this;
|
|
15747
15747
|
for (var i = 0; i < this.matches.length; i++)
|
|
15748
15748
|
this._realpathSet(i, next);
|
|
15749
15749
|
function next() {
|
|
15750
15750
|
if (--n === 0)
|
|
15751
|
-
|
|
15751
|
+
self2._finish();
|
|
15752
15752
|
}
|
|
15753
15753
|
};
|
|
15754
15754
|
Glob.prototype._realpathSet = function(index, cb) {
|
|
@@ -15756,22 +15756,22 @@ var kubb = (function (exports) {
|
|
|
15756
15756
|
if (!matchset)
|
|
15757
15757
|
return cb();
|
|
15758
15758
|
var found = Object.keys(matchset);
|
|
15759
|
-
var
|
|
15759
|
+
var self2 = this;
|
|
15760
15760
|
var n = found.length;
|
|
15761
15761
|
if (n === 0)
|
|
15762
15762
|
return cb();
|
|
15763
15763
|
var set = this.matches[index] = /* @__PURE__ */ Object.create(null);
|
|
15764
15764
|
found.forEach(function(p, i) {
|
|
15765
|
-
p =
|
|
15766
|
-
rp.realpath(p,
|
|
15765
|
+
p = self2._makeAbs(p);
|
|
15766
|
+
rp.realpath(p, self2.realpathCache, function(er, real) {
|
|
15767
15767
|
if (!er)
|
|
15768
15768
|
set[real] = true;
|
|
15769
15769
|
else if (er.syscall === "stat")
|
|
15770
15770
|
set[p] = true;
|
|
15771
15771
|
else
|
|
15772
|
-
|
|
15772
|
+
self2.emit("error", er);
|
|
15773
15773
|
if (--n === 0) {
|
|
15774
|
-
|
|
15774
|
+
self2.matches[index] = set;
|
|
15775
15775
|
cb();
|
|
15776
15776
|
}
|
|
15777
15777
|
});
|
|
@@ -15864,9 +15864,9 @@ var kubb = (function (exports) {
|
|
|
15864
15864
|
this._processReaddir(prefix, read2, abs, remain, index, inGlobStar, cb);
|
|
15865
15865
|
};
|
|
15866
15866
|
Glob.prototype._processReaddir = function(prefix, read2, abs, remain, index, inGlobStar, cb) {
|
|
15867
|
-
var
|
|
15867
|
+
var self2 = this;
|
|
15868
15868
|
this._readdir(abs, inGlobStar, function(er, entries) {
|
|
15869
|
-
return
|
|
15869
|
+
return self2._processReaddir2(prefix, read2, abs, remain, index, inGlobStar, entries, cb);
|
|
15870
15870
|
});
|
|
15871
15871
|
};
|
|
15872
15872
|
Glob.prototype._processReaddir2 = function(prefix, read2, abs, remain, index, inGlobStar, entries, cb) {
|
|
@@ -15957,20 +15957,20 @@ var kubb = (function (exports) {
|
|
|
15957
15957
|
if (this.follow)
|
|
15958
15958
|
return this._readdir(abs, false, cb);
|
|
15959
15959
|
var lstatkey = "lstat\0" + abs;
|
|
15960
|
-
var
|
|
15960
|
+
var self2 = this;
|
|
15961
15961
|
var lstatcb = inflight(lstatkey, lstatcb_);
|
|
15962
15962
|
if (lstatcb)
|
|
15963
|
-
|
|
15963
|
+
self2.fs.lstat(abs, lstatcb);
|
|
15964
15964
|
function lstatcb_(er, lstat) {
|
|
15965
15965
|
if (er && er.code === "ENOENT")
|
|
15966
15966
|
return cb();
|
|
15967
15967
|
var isSym = lstat && lstat.isSymbolicLink();
|
|
15968
|
-
|
|
15968
|
+
self2.symlinks[abs] = isSym;
|
|
15969
15969
|
if (!isSym && lstat && !lstat.isDirectory()) {
|
|
15970
|
-
|
|
15970
|
+
self2.cache[abs] = "FILE";
|
|
15971
15971
|
cb();
|
|
15972
15972
|
} else
|
|
15973
|
-
|
|
15973
|
+
self2._readdir(abs, false, cb);
|
|
15974
15974
|
}
|
|
15975
15975
|
};
|
|
15976
15976
|
Glob.prototype._readdir = function(abs, inGlobStar, cb) {
|
|
@@ -15988,15 +15988,15 @@ var kubb = (function (exports) {
|
|
|
15988
15988
|
if (Array.isArray(c))
|
|
15989
15989
|
return cb(null, c);
|
|
15990
15990
|
}
|
|
15991
|
-
var
|
|
15992
|
-
|
|
15991
|
+
var self2 = this;
|
|
15992
|
+
self2.fs.readdir(abs, readdirCb(this, abs, cb));
|
|
15993
15993
|
};
|
|
15994
|
-
function readdirCb(
|
|
15994
|
+
function readdirCb(self2, abs, cb) {
|
|
15995
15995
|
return function(er, entries) {
|
|
15996
15996
|
if (er)
|
|
15997
|
-
|
|
15997
|
+
self2._readdirError(abs, er, cb);
|
|
15998
15998
|
else
|
|
15999
|
-
|
|
15999
|
+
self2._readdirEntries(abs, entries, cb);
|
|
16000
16000
|
};
|
|
16001
16001
|
}
|
|
16002
16002
|
Glob.prototype._readdirEntries = function(abs, entries, cb) {
|
|
@@ -16050,9 +16050,9 @@ var kubb = (function (exports) {
|
|
|
16050
16050
|
return cb();
|
|
16051
16051
|
};
|
|
16052
16052
|
Glob.prototype._processGlobStar = function(prefix, read2, abs, remain, index, inGlobStar, cb) {
|
|
16053
|
-
var
|
|
16053
|
+
var self2 = this;
|
|
16054
16054
|
this._readdir(abs, inGlobStar, function(er, entries) {
|
|
16055
|
-
|
|
16055
|
+
self2._processGlobStar2(prefix, read2, abs, remain, index, inGlobStar, entries, cb);
|
|
16056
16056
|
});
|
|
16057
16057
|
};
|
|
16058
16058
|
Glob.prototype._processGlobStar2 = function(prefix, read2, abs, remain, index, inGlobStar, entries, cb) {
|
|
@@ -16078,9 +16078,9 @@ var kubb = (function (exports) {
|
|
|
16078
16078
|
cb();
|
|
16079
16079
|
};
|
|
16080
16080
|
Glob.prototype._processSimple = function(prefix, index, cb) {
|
|
16081
|
-
var
|
|
16081
|
+
var self2 = this;
|
|
16082
16082
|
this._stat(prefix, function(er, exists) {
|
|
16083
|
-
|
|
16083
|
+
self2._processSimple2(prefix, index, er, exists, cb);
|
|
16084
16084
|
});
|
|
16085
16085
|
};
|
|
16086
16086
|
Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) {
|
|
@@ -16129,20 +16129,20 @@ var kubb = (function (exports) {
|
|
|
16129
16129
|
return cb(null, type, stat);
|
|
16130
16130
|
}
|
|
16131
16131
|
}
|
|
16132
|
-
var
|
|
16132
|
+
var self2 = this;
|
|
16133
16133
|
var statcb = inflight("stat\0" + abs, lstatcb_);
|
|
16134
16134
|
if (statcb)
|
|
16135
|
-
|
|
16135
|
+
self2.fs.lstat(abs, statcb);
|
|
16136
16136
|
function lstatcb_(er, lstat) {
|
|
16137
16137
|
if (lstat && lstat.isSymbolicLink()) {
|
|
16138
|
-
return
|
|
16138
|
+
return self2.fs.stat(abs, function(er2, stat2) {
|
|
16139
16139
|
if (er2)
|
|
16140
|
-
|
|
16140
|
+
self2._stat2(f, abs, null, lstat, cb);
|
|
16141
16141
|
else
|
|
16142
|
-
|
|
16142
|
+
self2._stat2(f, abs, er2, stat2, cb);
|
|
16143
16143
|
});
|
|
16144
16144
|
} else {
|
|
16145
|
-
|
|
16145
|
+
self2._stat2(f, abs, er, lstat, cb);
|
|
16146
16146
|
}
|
|
16147
16147
|
}
|
|
16148
16148
|
};
|
|
@@ -16448,6 +16448,335 @@ var kubb = (function (exports) {
|
|
|
16448
16448
|
}
|
|
16449
16449
|
});
|
|
16450
16450
|
|
|
16451
|
+
// ../../node_modules/.pnpm/lodash.uniq@4.5.0/node_modules/lodash.uniq/index.js
|
|
16452
|
+
var require_lodash = __commonJS({
|
|
16453
|
+
"../../node_modules/.pnpm/lodash.uniq@4.5.0/node_modules/lodash.uniq/index.js"(exports, module) {
|
|
16454
|
+
init_define_process();
|
|
16455
|
+
var LARGE_ARRAY_SIZE = 200;
|
|
16456
|
+
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
16457
|
+
var INFINITY = 1 / 0;
|
|
16458
|
+
var funcTag = "[object Function]";
|
|
16459
|
+
var genTag = "[object GeneratorFunction]";
|
|
16460
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
16461
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
16462
|
+
var freeGlobal = typeof globalThis == "object" && globalThis && globalThis.Object === Object && globalThis;
|
|
16463
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
16464
|
+
var root = freeGlobal || freeSelf || Function("return this")();
|
|
16465
|
+
function arrayIncludes(array, value) {
|
|
16466
|
+
var length = array ? array.length : 0;
|
|
16467
|
+
return !!length && baseIndexOf(array, value, 0) > -1;
|
|
16468
|
+
}
|
|
16469
|
+
function arrayIncludesWith(array, value, comparator) {
|
|
16470
|
+
var index = -1, length = array ? array.length : 0;
|
|
16471
|
+
while (++index < length) {
|
|
16472
|
+
if (comparator(value, array[index])) {
|
|
16473
|
+
return true;
|
|
16474
|
+
}
|
|
16475
|
+
}
|
|
16476
|
+
return false;
|
|
16477
|
+
}
|
|
16478
|
+
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
16479
|
+
var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
|
|
16480
|
+
while (fromRight ? index-- : ++index < length) {
|
|
16481
|
+
if (predicate(array[index], index, array)) {
|
|
16482
|
+
return index;
|
|
16483
|
+
}
|
|
16484
|
+
}
|
|
16485
|
+
return -1;
|
|
16486
|
+
}
|
|
16487
|
+
function baseIndexOf(array, value, fromIndex) {
|
|
16488
|
+
if (value !== value) {
|
|
16489
|
+
return baseFindIndex(array, baseIsNaN, fromIndex);
|
|
16490
|
+
}
|
|
16491
|
+
var index = fromIndex - 1, length = array.length;
|
|
16492
|
+
while (++index < length) {
|
|
16493
|
+
if (array[index] === value) {
|
|
16494
|
+
return index;
|
|
16495
|
+
}
|
|
16496
|
+
}
|
|
16497
|
+
return -1;
|
|
16498
|
+
}
|
|
16499
|
+
function baseIsNaN(value) {
|
|
16500
|
+
return value !== value;
|
|
16501
|
+
}
|
|
16502
|
+
function cacheHas(cache, key) {
|
|
16503
|
+
return cache.has(key);
|
|
16504
|
+
}
|
|
16505
|
+
function getValue(object, key) {
|
|
16506
|
+
return object == null ? void 0 : object[key];
|
|
16507
|
+
}
|
|
16508
|
+
function isHostObject(value) {
|
|
16509
|
+
var result = false;
|
|
16510
|
+
if (value != null && typeof value.toString != "function") {
|
|
16511
|
+
try {
|
|
16512
|
+
result = !!(value + "");
|
|
16513
|
+
} catch (e) {
|
|
16514
|
+
}
|
|
16515
|
+
}
|
|
16516
|
+
return result;
|
|
16517
|
+
}
|
|
16518
|
+
function setToArray(set) {
|
|
16519
|
+
var index = -1, result = Array(set.size);
|
|
16520
|
+
set.forEach(function(value) {
|
|
16521
|
+
result[++index] = value;
|
|
16522
|
+
});
|
|
16523
|
+
return result;
|
|
16524
|
+
}
|
|
16525
|
+
var arrayProto = Array.prototype;
|
|
16526
|
+
var funcProto = Function.prototype;
|
|
16527
|
+
var objectProto = Object.prototype;
|
|
16528
|
+
var coreJsData = root["__core-js_shared__"];
|
|
16529
|
+
var maskSrcKey = function() {
|
|
16530
|
+
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
16531
|
+
return uid ? "Symbol(src)_1." + uid : "";
|
|
16532
|
+
}();
|
|
16533
|
+
var funcToString = funcProto.toString;
|
|
16534
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
16535
|
+
var objectToString = objectProto.toString;
|
|
16536
|
+
var reIsNative = RegExp(
|
|
16537
|
+
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
16538
|
+
);
|
|
16539
|
+
var splice = arrayProto.splice;
|
|
16540
|
+
var Map2 = getNative(root, "Map");
|
|
16541
|
+
var Set2 = getNative(root, "Set");
|
|
16542
|
+
var nativeCreate = getNative(Object, "create");
|
|
16543
|
+
function Hash(entries) {
|
|
16544
|
+
var index = -1, length = entries ? entries.length : 0;
|
|
16545
|
+
this.clear();
|
|
16546
|
+
while (++index < length) {
|
|
16547
|
+
var entry = entries[index];
|
|
16548
|
+
this.set(entry[0], entry[1]);
|
|
16549
|
+
}
|
|
16550
|
+
}
|
|
16551
|
+
function hashClear() {
|
|
16552
|
+
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
16553
|
+
}
|
|
16554
|
+
function hashDelete(key) {
|
|
16555
|
+
return this.has(key) && delete this.__data__[key];
|
|
16556
|
+
}
|
|
16557
|
+
function hashGet(key) {
|
|
16558
|
+
var data = this.__data__;
|
|
16559
|
+
if (nativeCreate) {
|
|
16560
|
+
var result = data[key];
|
|
16561
|
+
return result === HASH_UNDEFINED ? void 0 : result;
|
|
16562
|
+
}
|
|
16563
|
+
return hasOwnProperty.call(data, key) ? data[key] : void 0;
|
|
16564
|
+
}
|
|
16565
|
+
function hashHas(key) {
|
|
16566
|
+
var data = this.__data__;
|
|
16567
|
+
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
|
|
16568
|
+
}
|
|
16569
|
+
function hashSet(key, value) {
|
|
16570
|
+
var data = this.__data__;
|
|
16571
|
+
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
|
|
16572
|
+
return this;
|
|
16573
|
+
}
|
|
16574
|
+
Hash.prototype.clear = hashClear;
|
|
16575
|
+
Hash.prototype["delete"] = hashDelete;
|
|
16576
|
+
Hash.prototype.get = hashGet;
|
|
16577
|
+
Hash.prototype.has = hashHas;
|
|
16578
|
+
Hash.prototype.set = hashSet;
|
|
16579
|
+
function ListCache(entries) {
|
|
16580
|
+
var index = -1, length = entries ? entries.length : 0;
|
|
16581
|
+
this.clear();
|
|
16582
|
+
while (++index < length) {
|
|
16583
|
+
var entry = entries[index];
|
|
16584
|
+
this.set(entry[0], entry[1]);
|
|
16585
|
+
}
|
|
16586
|
+
}
|
|
16587
|
+
function listCacheClear() {
|
|
16588
|
+
this.__data__ = [];
|
|
16589
|
+
}
|
|
16590
|
+
function listCacheDelete(key) {
|
|
16591
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
16592
|
+
if (index < 0) {
|
|
16593
|
+
return false;
|
|
16594
|
+
}
|
|
16595
|
+
var lastIndex = data.length - 1;
|
|
16596
|
+
if (index == lastIndex) {
|
|
16597
|
+
data.pop();
|
|
16598
|
+
} else {
|
|
16599
|
+
splice.call(data, index, 1);
|
|
16600
|
+
}
|
|
16601
|
+
return true;
|
|
16602
|
+
}
|
|
16603
|
+
function listCacheGet(key) {
|
|
16604
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
16605
|
+
return index < 0 ? void 0 : data[index][1];
|
|
16606
|
+
}
|
|
16607
|
+
function listCacheHas(key) {
|
|
16608
|
+
return assocIndexOf(this.__data__, key) > -1;
|
|
16609
|
+
}
|
|
16610
|
+
function listCacheSet(key, value) {
|
|
16611
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
16612
|
+
if (index < 0) {
|
|
16613
|
+
data.push([key, value]);
|
|
16614
|
+
} else {
|
|
16615
|
+
data[index][1] = value;
|
|
16616
|
+
}
|
|
16617
|
+
return this;
|
|
16618
|
+
}
|
|
16619
|
+
ListCache.prototype.clear = listCacheClear;
|
|
16620
|
+
ListCache.prototype["delete"] = listCacheDelete;
|
|
16621
|
+
ListCache.prototype.get = listCacheGet;
|
|
16622
|
+
ListCache.prototype.has = listCacheHas;
|
|
16623
|
+
ListCache.prototype.set = listCacheSet;
|
|
16624
|
+
function MapCache(entries) {
|
|
16625
|
+
var index = -1, length = entries ? entries.length : 0;
|
|
16626
|
+
this.clear();
|
|
16627
|
+
while (++index < length) {
|
|
16628
|
+
var entry = entries[index];
|
|
16629
|
+
this.set(entry[0], entry[1]);
|
|
16630
|
+
}
|
|
16631
|
+
}
|
|
16632
|
+
function mapCacheClear() {
|
|
16633
|
+
this.__data__ = {
|
|
16634
|
+
"hash": new Hash(),
|
|
16635
|
+
"map": new (Map2 || ListCache)(),
|
|
16636
|
+
"string": new Hash()
|
|
16637
|
+
};
|
|
16638
|
+
}
|
|
16639
|
+
function mapCacheDelete(key) {
|
|
16640
|
+
return getMapData(this, key)["delete"](key);
|
|
16641
|
+
}
|
|
16642
|
+
function mapCacheGet(key) {
|
|
16643
|
+
return getMapData(this, key).get(key);
|
|
16644
|
+
}
|
|
16645
|
+
function mapCacheHas(key) {
|
|
16646
|
+
return getMapData(this, key).has(key);
|
|
16647
|
+
}
|
|
16648
|
+
function mapCacheSet(key, value) {
|
|
16649
|
+
getMapData(this, key).set(key, value);
|
|
16650
|
+
return this;
|
|
16651
|
+
}
|
|
16652
|
+
MapCache.prototype.clear = mapCacheClear;
|
|
16653
|
+
MapCache.prototype["delete"] = mapCacheDelete;
|
|
16654
|
+
MapCache.prototype.get = mapCacheGet;
|
|
16655
|
+
MapCache.prototype.has = mapCacheHas;
|
|
16656
|
+
MapCache.prototype.set = mapCacheSet;
|
|
16657
|
+
function SetCache(values) {
|
|
16658
|
+
var index = -1, length = values ? values.length : 0;
|
|
16659
|
+
this.__data__ = new MapCache();
|
|
16660
|
+
while (++index < length) {
|
|
16661
|
+
this.add(values[index]);
|
|
16662
|
+
}
|
|
16663
|
+
}
|
|
16664
|
+
function setCacheAdd(value) {
|
|
16665
|
+
this.__data__.set(value, HASH_UNDEFINED);
|
|
16666
|
+
return this;
|
|
16667
|
+
}
|
|
16668
|
+
function setCacheHas(value) {
|
|
16669
|
+
return this.__data__.has(value);
|
|
16670
|
+
}
|
|
16671
|
+
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
|
16672
|
+
SetCache.prototype.has = setCacheHas;
|
|
16673
|
+
function assocIndexOf(array, key) {
|
|
16674
|
+
var length = array.length;
|
|
16675
|
+
while (length--) {
|
|
16676
|
+
if (eq(array[length][0], key)) {
|
|
16677
|
+
return length;
|
|
16678
|
+
}
|
|
16679
|
+
}
|
|
16680
|
+
return -1;
|
|
16681
|
+
}
|
|
16682
|
+
function baseIsNative(value) {
|
|
16683
|
+
if (!isObject(value) || isMasked(value)) {
|
|
16684
|
+
return false;
|
|
16685
|
+
}
|
|
16686
|
+
var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;
|
|
16687
|
+
return pattern.test(toSource(value));
|
|
16688
|
+
}
|
|
16689
|
+
function baseUniq(array, iteratee, comparator) {
|
|
16690
|
+
var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result;
|
|
16691
|
+
if (comparator) {
|
|
16692
|
+
isCommon = false;
|
|
16693
|
+
includes = arrayIncludesWith;
|
|
16694
|
+
} else if (length >= LARGE_ARRAY_SIZE) {
|
|
16695
|
+
var set = iteratee ? null : createSet(array);
|
|
16696
|
+
if (set) {
|
|
16697
|
+
return setToArray(set);
|
|
16698
|
+
}
|
|
16699
|
+
isCommon = false;
|
|
16700
|
+
includes = cacheHas;
|
|
16701
|
+
seen = new SetCache();
|
|
16702
|
+
} else {
|
|
16703
|
+
seen = iteratee ? [] : result;
|
|
16704
|
+
}
|
|
16705
|
+
outer:
|
|
16706
|
+
while (++index < length) {
|
|
16707
|
+
var value = array[index], computed = iteratee ? iteratee(value) : value;
|
|
16708
|
+
value = comparator || value !== 0 ? value : 0;
|
|
16709
|
+
if (isCommon && computed === computed) {
|
|
16710
|
+
var seenIndex = seen.length;
|
|
16711
|
+
while (seenIndex--) {
|
|
16712
|
+
if (seen[seenIndex] === computed) {
|
|
16713
|
+
continue outer;
|
|
16714
|
+
}
|
|
16715
|
+
}
|
|
16716
|
+
if (iteratee) {
|
|
16717
|
+
seen.push(computed);
|
|
16718
|
+
}
|
|
16719
|
+
result.push(value);
|
|
16720
|
+
} else if (!includes(seen, computed, comparator)) {
|
|
16721
|
+
if (seen !== result) {
|
|
16722
|
+
seen.push(computed);
|
|
16723
|
+
}
|
|
16724
|
+
result.push(value);
|
|
16725
|
+
}
|
|
16726
|
+
}
|
|
16727
|
+
return result;
|
|
16728
|
+
}
|
|
16729
|
+
var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop : function(values) {
|
|
16730
|
+
return new Set2(values);
|
|
16731
|
+
};
|
|
16732
|
+
function getMapData(map, key) {
|
|
16733
|
+
var data = map.__data__;
|
|
16734
|
+
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
16735
|
+
}
|
|
16736
|
+
function getNative(object, key) {
|
|
16737
|
+
var value = getValue(object, key);
|
|
16738
|
+
return baseIsNative(value) ? value : void 0;
|
|
16739
|
+
}
|
|
16740
|
+
function isKeyable(value) {
|
|
16741
|
+
var type = typeof value;
|
|
16742
|
+
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
16743
|
+
}
|
|
16744
|
+
function isMasked(func) {
|
|
16745
|
+
return !!maskSrcKey && maskSrcKey in func;
|
|
16746
|
+
}
|
|
16747
|
+
function toSource(func) {
|
|
16748
|
+
if (func != null) {
|
|
16749
|
+
try {
|
|
16750
|
+
return funcToString.call(func);
|
|
16751
|
+
} catch (e) {
|
|
16752
|
+
}
|
|
16753
|
+
try {
|
|
16754
|
+
return func + "";
|
|
16755
|
+
} catch (e) {
|
|
16756
|
+
}
|
|
16757
|
+
}
|
|
16758
|
+
return "";
|
|
16759
|
+
}
|
|
16760
|
+
function uniq2(array) {
|
|
16761
|
+
return array && array.length ? baseUniq(array) : [];
|
|
16762
|
+
}
|
|
16763
|
+
function eq(value, other) {
|
|
16764
|
+
return value === other || value !== value && other !== other;
|
|
16765
|
+
}
|
|
16766
|
+
function isFunction(value) {
|
|
16767
|
+
var tag = isObject(value) ? objectToString.call(value) : "";
|
|
16768
|
+
return tag == funcTag || tag == genTag;
|
|
16769
|
+
}
|
|
16770
|
+
function isObject(value) {
|
|
16771
|
+
var type = typeof value;
|
|
16772
|
+
return !!value && (type == "object" || type == "function");
|
|
16773
|
+
}
|
|
16774
|
+
function noop() {
|
|
16775
|
+
}
|
|
16776
|
+
module.exports = uniq2;
|
|
16777
|
+
}
|
|
16778
|
+
});
|
|
16779
|
+
|
|
16451
16780
|
// ../../node_modules/.pnpm/directory-tree@3.5.1/node_modules/directory-tree/lib/directory-tree.js
|
|
16452
16781
|
var require_directory_tree = __commonJS({
|
|
16453
16782
|
"../../node_modules/.pnpm/directory-tree@3.5.1/node_modules/directory-tree/lib/directory-tree.js"(exports, module) {
|
|
@@ -16691,9 +17020,6 @@ var kubb = (function (exports) {
|
|
|
16691
17020
|
};
|
|
16692
17021
|
}
|
|
16693
17022
|
var name = "core";
|
|
16694
|
-
var isEmittedFile = (result) => {
|
|
16695
|
-
return !!result.id;
|
|
16696
|
-
};
|
|
16697
17023
|
var definePlugin = createPlugin((options) => {
|
|
16698
17024
|
const { fileManager, resolveId, load } = options;
|
|
16699
17025
|
const api = {
|
|
@@ -16701,17 +17027,7 @@ var kubb = (function (exports) {
|
|
|
16701
17027
|
return options.config;
|
|
16702
17028
|
},
|
|
16703
17029
|
fileManager,
|
|
16704
|
-
async addFile(file
|
|
16705
|
-
if (isEmittedFile(file)) {
|
|
16706
|
-
const resolvedId = await resolveId({ fileName: file.id, directory: file.importer, options: file.options });
|
|
16707
|
-
const path = resolvedId || file.importer || file.id;
|
|
16708
|
-
return fileManager.add({
|
|
16709
|
-
path,
|
|
16710
|
-
fileName: file.name || file.id,
|
|
16711
|
-
source: file.source || ""
|
|
16712
|
-
});
|
|
16713
|
-
}
|
|
16714
|
-
if (options2?.root) ;
|
|
17030
|
+
async addFile(file) {
|
|
16715
17031
|
return fileManager.addOrAppend(file);
|
|
16716
17032
|
},
|
|
16717
17033
|
resolveId,
|
|
@@ -16720,6 +17036,7 @@ var kubb = (function (exports) {
|
|
|
16720
17036
|
};
|
|
16721
17037
|
return {
|
|
16722
17038
|
name,
|
|
17039
|
+
options,
|
|
16723
17040
|
api,
|
|
16724
17041
|
resolveId(fileName, directory) {
|
|
16725
17042
|
if (!directory) {
|
|
@@ -16738,6 +17055,9 @@ var kubb = (function (exports) {
|
|
|
16738
17055
|
var import_index = __toESM(require_eventemitter3(), 1);
|
|
16739
17056
|
var eventemitter3_default = import_index.default;
|
|
16740
17057
|
|
|
17058
|
+
// src/managers/fileManager/FileManager.ts
|
|
17059
|
+
var import_lodash = __toESM(require_lodash());
|
|
17060
|
+
|
|
16741
17061
|
// ../../node_modules/.pnpm/uuid@9.0.0/node_modules/uuid/dist/esm-browser/index.js
|
|
16742
17062
|
init_define_process();
|
|
16743
17063
|
|
|
@@ -16883,32 +17203,16 @@ var kubb = (function (exports) {
|
|
|
16883
17203
|
});
|
|
16884
17204
|
return count;
|
|
16885
17205
|
}
|
|
16886
|
-
|
|
16887
|
-
const files = [];
|
|
16888
|
-
this.cache.forEach((item) => {
|
|
16889
|
-
files.push(item.file);
|
|
16890
|
-
});
|
|
16891
|
-
return files;
|
|
16892
|
-
}
|
|
16893
|
-
add(file) {
|
|
16894
|
-
const cacheItem = { id: v4_default(), file, status: "new" };
|
|
16895
|
-
this.cache.set(cacheItem.id, cacheItem);
|
|
16896
|
-
this.events.emitFile(cacheItem.id, file);
|
|
16897
|
-
return new Promise((resolve) => {
|
|
16898
|
-
const unsubscribe = this.events.onRemove(cacheItem.id, (file2) => {
|
|
16899
|
-
resolve(file2);
|
|
16900
|
-
unsubscribe();
|
|
16901
|
-
});
|
|
16902
|
-
});
|
|
16903
|
-
}
|
|
16904
|
-
build(file) {
|
|
17206
|
+
getSource(file) {
|
|
16905
17207
|
const imports = [];
|
|
16906
17208
|
file.imports?.forEach((curr) => {
|
|
16907
17209
|
const exists = imports.find((imp) => imp.path === curr.path);
|
|
16908
|
-
if (exists) {
|
|
16909
|
-
exists.name = [...exists.name, ...curr.name];
|
|
16910
|
-
} else {
|
|
17210
|
+
if (!exists) {
|
|
16911
17211
|
imports.push(curr);
|
|
17212
|
+
return;
|
|
17213
|
+
}
|
|
17214
|
+
if (exists && Array.isArray(curr.name)) {
|
|
17215
|
+
exists.name = (0, import_lodash.default)([...exists.name, ...curr.name]);
|
|
16912
17216
|
}
|
|
16913
17217
|
});
|
|
16914
17218
|
const importSource = imports.reduce((prev, curr) => {
|
|
@@ -16925,6 +17229,30 @@ ${file.source}`;
|
|
|
16925
17229
|
}
|
|
16926
17230
|
return file.source;
|
|
16927
17231
|
}
|
|
17232
|
+
get files() {
|
|
17233
|
+
const files = [];
|
|
17234
|
+
this.cache.forEach((item) => {
|
|
17235
|
+
files.push(item.file);
|
|
17236
|
+
});
|
|
17237
|
+
return files;
|
|
17238
|
+
}
|
|
17239
|
+
add(file) {
|
|
17240
|
+
const cacheItem = { id: v4_default(), file, status: "new" };
|
|
17241
|
+
this.cache.set(cacheItem.id, cacheItem);
|
|
17242
|
+
this.events.emitFile(cacheItem.id, file);
|
|
17243
|
+
return new Promise((resolve) => {
|
|
17244
|
+
const unsubscribe = this.events.onRemove(cacheItem.id, (file2) => {
|
|
17245
|
+
resolve(file2);
|
|
17246
|
+
unsubscribe();
|
|
17247
|
+
});
|
|
17248
|
+
});
|
|
17249
|
+
}
|
|
17250
|
+
build(file) {
|
|
17251
|
+
return {
|
|
17252
|
+
...file,
|
|
17253
|
+
source: this.getSource(file)
|
|
17254
|
+
};
|
|
17255
|
+
}
|
|
16928
17256
|
addOrAppend(file) {
|
|
16929
17257
|
const previousCache = this.getCacheByPath(file.path);
|
|
16930
17258
|
if (previousCache) {
|
|
@@ -17264,12 +17592,12 @@ ${file.source}`,
|
|
|
17264
17592
|
fileManager.events.onSuccess(async () => {
|
|
17265
17593
|
await pluginManager.hookParallel("buildEnd");
|
|
17266
17594
|
setTimeout(() => {
|
|
17267
|
-
done({ files: fileManager.files });
|
|
17595
|
+
done({ files: fileManager.files.map((file) => fileManager.build(file)) });
|
|
17268
17596
|
}, 1e3);
|
|
17269
17597
|
});
|
|
17270
17598
|
fileManager.events.onAdd(async (id, file) => {
|
|
17271
17599
|
const { path } = file;
|
|
17272
|
-
let code = fileManager.build(file);
|
|
17600
|
+
let { source: code } = fileManager.build(file);
|
|
17273
17601
|
const loadedResult = await pluginManager.hookFirst("load", [path]);
|
|
17274
17602
|
if (loadedResult) {
|
|
17275
17603
|
code = loadedResult;
|