@rspack-debug/browser 2.0.0-beta.7 → 2.0.0-beta.9
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/Compilation.d.ts +2 -0
- package/dist/FileSystem.d.ts +1 -1
- package/dist/browser/BrowserRequirePlugin.d.ts +1 -1
- package/dist/browser/fs.d.ts +1 -1
- package/dist/builtin-loader/swc/pluginImport.d.ts +1 -1
- package/dist/builtin-loader/swc/types.d.ts +6 -0
- package/dist/builtin-plugin/EsmNodeTargetPlugin.d.ts +9 -0
- package/dist/builtin-plugin/index.d.ts +1 -0
- package/dist/config/types.d.ts +5 -2
- package/dist/exports.d.ts +3 -3
- package/dist/index.d.ts +1 -2
- package/dist/index.js +607 -434
- package/dist/napi-binding.d.ts +41 -32
- package/dist/swc.d.ts +1 -1
- package/dist/wasi-worker-browser.mjs +268 -159
- package/package.json +3 -3
- package/dist/rslib-runtime.js +0 -65
|
@@ -10382,13 +10382,13 @@
|
|
|
10382
10382
|
function requireBuffer$1() {
|
|
10383
10383
|
if (hasRequiredBuffer$1) return buffer$1;
|
|
10384
10384
|
hasRequiredBuffer$1 = 1;
|
|
10385
|
-
(function(exports) {
|
|
10386
|
-
Object.defineProperty(exports, "__esModule", {
|
|
10385
|
+
(function(exports$1) {
|
|
10386
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
10387
10387
|
value: true
|
|
10388
10388
|
});
|
|
10389
|
-
exports.Buffer = void 0;
|
|
10389
|
+
exports$1.Buffer = void 0;
|
|
10390
10390
|
var node_buffer_1 = require$$0$2;
|
|
10391
|
-
Object.defineProperty(exports, "Buffer", {
|
|
10391
|
+
Object.defineProperty(exports$1, "Buffer", {
|
|
10392
10392
|
enumerable: true,
|
|
10393
10393
|
get: function() {
|
|
10394
10394
|
return node_buffer_1.Buffer;
|
|
@@ -10401,13 +10401,13 @@
|
|
|
10401
10401
|
function requireBuffer() {
|
|
10402
10402
|
if (hasRequiredBuffer) return buffer$2;
|
|
10403
10403
|
hasRequiredBuffer = 1;
|
|
10404
|
-
(function(exports) {
|
|
10405
|
-
Object.defineProperty(exports, "__esModule", {
|
|
10404
|
+
(function(exports$1) {
|
|
10405
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
10406
10406
|
value: true
|
|
10407
10407
|
});
|
|
10408
|
-
exports.bufferFrom = exports.bufferAllocUnsafe = exports.Buffer = void 0;
|
|
10408
|
+
exports$1.bufferFrom = exports$1.bufferAllocUnsafe = exports$1.Buffer = void 0;
|
|
10409
10409
|
const buffer_1 = requireBuffer$1();
|
|
10410
|
-
Object.defineProperty(exports, "Buffer", {
|
|
10410
|
+
Object.defineProperty(exports$1, "Buffer", {
|
|
10411
10411
|
enumerable: true,
|
|
10412
10412
|
get: function() {
|
|
10413
10413
|
return buffer_1.Buffer;
|
|
@@ -10417,9 +10417,9 @@
|
|
|
10417
10417
|
return new buffer_1.Buffer(arg0, ...args);
|
|
10418
10418
|
}
|
|
10419
10419
|
const bufferAllocUnsafe = buffer_1.Buffer.allocUnsafe || bufferV0P12Ponyfill;
|
|
10420
|
-
exports.bufferAllocUnsafe = bufferAllocUnsafe;
|
|
10420
|
+
exports$1.bufferAllocUnsafe = bufferAllocUnsafe;
|
|
10421
10421
|
const bufferFrom = buffer_1.Buffer.from || bufferV0P12Ponyfill;
|
|
10422
|
-
exports.bufferFrom = bufferFrom;
|
|
10422
|
+
exports$1.bufferFrom = bufferFrom;
|
|
10423
10423
|
})(buffer$2);
|
|
10424
10424
|
return buffer$2;
|
|
10425
10425
|
}
|
|
@@ -10508,13 +10508,13 @@
|
|
|
10508
10508
|
function requireErrors$1() {
|
|
10509
10509
|
if (hasRequiredErrors$1) return errors$1;
|
|
10510
10510
|
hasRequiredErrors$1 = 1;
|
|
10511
|
-
(function(exports) {
|
|
10512
|
-
Object.defineProperty(exports, "__esModule", {
|
|
10511
|
+
(function(exports$1) {
|
|
10512
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
10513
10513
|
value: true
|
|
10514
10514
|
});
|
|
10515
|
-
exports.AssertionError = exports.RangeError = exports.TypeError = exports.Error = void 0;
|
|
10516
|
-
exports.message = message;
|
|
10517
|
-
exports.E = E;
|
|
10515
|
+
exports$1.AssertionError = exports$1.RangeError = exports$1.TypeError = exports$1.Error = void 0;
|
|
10516
|
+
exports$1.message = message;
|
|
10517
|
+
exports$1.E = E;
|
|
10518
10518
|
const util_1 = requireUtil$4();
|
|
10519
10519
|
const kCode = "u" < typeof Symbol ? '_kCode' : Symbol('code');
|
|
10520
10520
|
const messages = {};
|
|
@@ -10531,7 +10531,7 @@
|
|
|
10531
10531
|
const g = "u" > typeof globalThis ? globalThis : commonjsGlobal;
|
|
10532
10532
|
class AssertionError extends g.Error {
|
|
10533
10533
|
constructor(options){
|
|
10534
|
-
if ('object' != typeof options || null === options) throw new exports.TypeError('ERR_INVALID_ARG_TYPE', 'options', 'object');
|
|
10534
|
+
if ('object' != typeof options || null === options) throw new exports$1.TypeError('ERR_INVALID_ARG_TYPE', 'options', 'object');
|
|
10535
10535
|
if (options.message) super(options.message);
|
|
10536
10536
|
else super(`${(0, util_1.inspect)(options.actual).slice(0, 128)} ${options.operator} ${(0, util_1.inspect)(options.expected).slice(0, 128)}`);
|
|
10537
10537
|
this.generatedMessage = !options.message;
|
|
@@ -10540,14 +10540,14 @@
|
|
|
10540
10540
|
this.actual = options.actual;
|
|
10541
10541
|
this.expected = options.expected;
|
|
10542
10542
|
this.operator = options.operator;
|
|
10543
|
-
exports.Error.captureStackTrace(this, options.stackStartFunction);
|
|
10543
|
+
exports$1.Error.captureStackTrace(this, options.stackStartFunction);
|
|
10544
10544
|
}
|
|
10545
10545
|
}
|
|
10546
|
-
exports.AssertionError = AssertionError;
|
|
10546
|
+
exports$1.AssertionError = AssertionError;
|
|
10547
10547
|
function message(key, args) {
|
|
10548
|
-
if ('string' != typeof key) throw new exports.Error('Error message key must be a string');
|
|
10548
|
+
if ('string' != typeof key) throw new exports$1.Error('Error message key must be a string');
|
|
10549
10549
|
const msg = messages[key];
|
|
10550
|
-
if (!msg) throw new exports.Error(`An invalid error message key was used: ${key}.`);
|
|
10550
|
+
if (!msg) throw new exports$1.Error(`An invalid error message key was used: ${key}.`);
|
|
10551
10551
|
let fmt;
|
|
10552
10552
|
if ('function' == typeof msg) fmt = msg;
|
|
10553
10553
|
else {
|
|
@@ -10560,9 +10560,9 @@
|
|
|
10560
10560
|
function E(sym, val) {
|
|
10561
10561
|
messages[sym] = 'function' == typeof val ? val : String(val);
|
|
10562
10562
|
}
|
|
10563
|
-
exports.Error = makeNodeError(g.Error);
|
|
10564
|
-
exports.TypeError = makeNodeError(g.TypeError);
|
|
10565
|
-
exports.RangeError = makeNodeError(g.RangeError);
|
|
10563
|
+
exports$1.Error = makeNodeError(g.Error);
|
|
10564
|
+
exports$1.TypeError = makeNodeError(g.TypeError);
|
|
10565
|
+
exports$1.RangeError = makeNodeError(g.RangeError);
|
|
10566
10566
|
E('ERR_DIR_CLOSED', 'Directory handle was closed');
|
|
10567
10567
|
E('ERR_DIR_CONCURRENT_OPERATION', 'Cannot do synchronous work on directory handle with concurrent asynchronous operations');
|
|
10568
10568
|
E('ERR_INVALID_FILE_URL_HOST', 'File URL host must be "localhost" or empty on %s');
|
|
@@ -10577,21 +10577,21 @@
|
|
|
10577
10577
|
function requireEncoding() {
|
|
10578
10578
|
if (hasRequiredEncoding) return fs_encoding;
|
|
10579
10579
|
hasRequiredEncoding = 1;
|
|
10580
|
-
(function(exports) {
|
|
10581
|
-
Object.defineProperty(exports, "__esModule", {
|
|
10580
|
+
(function(exports$1) {
|
|
10581
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
10582
10582
|
value: true
|
|
10583
10583
|
});
|
|
10584
|
-
exports.ENCODING_UTF8 = void 0;
|
|
10585
|
-
exports.assertEncoding = assertEncoding;
|
|
10586
|
-
exports.strToEncoding = strToEncoding;
|
|
10584
|
+
exports$1.ENCODING_UTF8 = void 0;
|
|
10585
|
+
exports$1.assertEncoding = assertEncoding;
|
|
10586
|
+
exports$1.strToEncoding = strToEncoding;
|
|
10587
10587
|
const buffer_1 = requireBuffer();
|
|
10588
10588
|
const errors = requireErrors$1();
|
|
10589
|
-
exports.ENCODING_UTF8 = 'utf8';
|
|
10589
|
+
exports$1.ENCODING_UTF8 = 'utf8';
|
|
10590
10590
|
function assertEncoding(encoding) {
|
|
10591
10591
|
if (encoding && !buffer_1.Buffer.isEncoding(encoding)) throw new errors.TypeError('ERR_INVALID_OPT_VALUE_ENCODING', encoding);
|
|
10592
10592
|
}
|
|
10593
10593
|
function strToEncoding(str, encoding) {
|
|
10594
|
-
if (!encoding || encoding === exports.ENCODING_UTF8) return str;
|
|
10594
|
+
if (!encoding || encoding === exports$1.ENCODING_UTF8) return str;
|
|
10595
10595
|
if ('buffer' === encoding) return new buffer_1.Buffer(str);
|
|
10596
10596
|
return new buffer_1.Buffer(str).toString(encoding);
|
|
10597
10597
|
}
|
|
@@ -11125,61 +11125,61 @@
|
|
|
11125
11125
|
function requirePath() {
|
|
11126
11126
|
if (hasRequiredPath) return fs_path;
|
|
11127
11127
|
hasRequiredPath = 1;
|
|
11128
|
-
(function(exports) {
|
|
11129
|
-
Object.defineProperty(exports, "__esModule", {
|
|
11128
|
+
(function(exports$1) {
|
|
11129
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
11130
11130
|
value: true
|
|
11131
11131
|
});
|
|
11132
|
-
exports.basename = exports.isAbsolute = exports.normalize = exports.dirname = exports.relative = exports.join = exports.posix = exports.sep = exports.resolve = void 0;
|
|
11132
|
+
exports$1.basename = exports$1.isAbsolute = exports$1.normalize = exports$1.dirname = exports$1.relative = exports$1.join = exports$1.posix = exports$1.sep = exports$1.resolve = void 0;
|
|
11133
11133
|
var node_path_1 = requirePathBrowserify();
|
|
11134
|
-
Object.defineProperty(exports, "resolve", {
|
|
11134
|
+
Object.defineProperty(exports$1, "resolve", {
|
|
11135
11135
|
enumerable: true,
|
|
11136
11136
|
get: function() {
|
|
11137
11137
|
return node_path_1.resolve;
|
|
11138
11138
|
}
|
|
11139
11139
|
});
|
|
11140
|
-
Object.defineProperty(exports, "sep", {
|
|
11140
|
+
Object.defineProperty(exports$1, "sep", {
|
|
11141
11141
|
enumerable: true,
|
|
11142
11142
|
get: function() {
|
|
11143
11143
|
return node_path_1.sep;
|
|
11144
11144
|
}
|
|
11145
11145
|
});
|
|
11146
|
-
Object.defineProperty(exports, "posix", {
|
|
11146
|
+
Object.defineProperty(exports$1, "posix", {
|
|
11147
11147
|
enumerable: true,
|
|
11148
11148
|
get: function() {
|
|
11149
11149
|
return node_path_1.posix;
|
|
11150
11150
|
}
|
|
11151
11151
|
});
|
|
11152
|
-
Object.defineProperty(exports, "join", {
|
|
11152
|
+
Object.defineProperty(exports$1, "join", {
|
|
11153
11153
|
enumerable: true,
|
|
11154
11154
|
get: function() {
|
|
11155
11155
|
return node_path_1.join;
|
|
11156
11156
|
}
|
|
11157
11157
|
});
|
|
11158
|
-
Object.defineProperty(exports, "relative", {
|
|
11158
|
+
Object.defineProperty(exports$1, "relative", {
|
|
11159
11159
|
enumerable: true,
|
|
11160
11160
|
get: function() {
|
|
11161
11161
|
return node_path_1.relative;
|
|
11162
11162
|
}
|
|
11163
11163
|
});
|
|
11164
|
-
Object.defineProperty(exports, "dirname", {
|
|
11164
|
+
Object.defineProperty(exports$1, "dirname", {
|
|
11165
11165
|
enumerable: true,
|
|
11166
11166
|
get: function() {
|
|
11167
11167
|
return node_path_1.dirname;
|
|
11168
11168
|
}
|
|
11169
11169
|
});
|
|
11170
|
-
Object.defineProperty(exports, "normalize", {
|
|
11170
|
+
Object.defineProperty(exports$1, "normalize", {
|
|
11171
11171
|
enumerable: true,
|
|
11172
11172
|
get: function() {
|
|
11173
11173
|
return node_path_1.normalize;
|
|
11174
11174
|
}
|
|
11175
11175
|
});
|
|
11176
|
-
Object.defineProperty(exports, "isAbsolute", {
|
|
11176
|
+
Object.defineProperty(exports$1, "isAbsolute", {
|
|
11177
11177
|
enumerable: true,
|
|
11178
11178
|
get: function() {
|
|
11179
11179
|
return node_path_1.isAbsolute;
|
|
11180
11180
|
}
|
|
11181
11181
|
});
|
|
11182
|
-
Object.defineProperty(exports, "basename", {
|
|
11182
|
+
Object.defineProperty(exports$1, "basename", {
|
|
11183
11183
|
enumerable: true,
|
|
11184
11184
|
get: function() {
|
|
11185
11185
|
return node_path_1.basename;
|
|
@@ -11859,6 +11859,7 @@
|
|
|
11859
11859
|
const { S_IFMT, S_IFDIR, S_IFREG, S_IFLNK, S_IFCHR } = constants_1.constants;
|
|
11860
11860
|
const getuid = ()=>process_1.default.getuid?.() ?? 0;
|
|
11861
11861
|
const getgid = ()=>process_1.default.getgid?.() ?? 0;
|
|
11862
|
+
const EMPTY_BUFFER = (0, buffer_1.bufferAllocUnsafe)(0);
|
|
11862
11863
|
let Node$1 = class {
|
|
11863
11864
|
constructor(ino, mode = 0o666){
|
|
11864
11865
|
this.changes = new fanout_1.FanOut();
|
|
@@ -11867,6 +11868,9 @@
|
|
|
11867
11868
|
this._atime = new Date();
|
|
11868
11869
|
this._mtime = new Date();
|
|
11869
11870
|
this._ctime = new Date();
|
|
11871
|
+
this.buf = EMPTY_BUFFER;
|
|
11872
|
+
this.capacity = 0;
|
|
11873
|
+
this.size = 0;
|
|
11870
11874
|
this.rdev = 0;
|
|
11871
11875
|
this._nlink = 1;
|
|
11872
11876
|
this.mode = mode;
|
|
@@ -11924,20 +11928,26 @@
|
|
|
11924
11928
|
return this.getBuffer().toString(encoding);
|
|
11925
11929
|
}
|
|
11926
11930
|
setString(str) {
|
|
11927
|
-
this.
|
|
11928
|
-
this.touch();
|
|
11931
|
+
this._setBuf((0, buffer_1.bufferFrom)(str, 'utf8'));
|
|
11929
11932
|
}
|
|
11930
11933
|
getBuffer() {
|
|
11931
11934
|
this.atime = new Date();
|
|
11932
11935
|
if (!this.buf) this.buf = (0, buffer_1.bufferAllocUnsafe)(0);
|
|
11933
|
-
return (0, buffer_1.bufferFrom)(this.buf);
|
|
11936
|
+
return (0, buffer_1.bufferFrom)(this.buf.subarray(0, this.size));
|
|
11934
11937
|
}
|
|
11935
11938
|
setBuffer(buf) {
|
|
11936
|
-
|
|
11939
|
+
const copy = (0, buffer_1.bufferFrom)(buf);
|
|
11940
|
+
this._setBuf(copy);
|
|
11941
|
+
}
|
|
11942
|
+
_setBuf(buf) {
|
|
11943
|
+
const size = buf.length;
|
|
11944
|
+
this.buf = buf;
|
|
11945
|
+
this.capacity = size;
|
|
11946
|
+
this.size = size;
|
|
11937
11947
|
this.touch();
|
|
11938
11948
|
}
|
|
11939
11949
|
getSize() {
|
|
11940
|
-
return this.
|
|
11950
|
+
return this.size;
|
|
11941
11951
|
}
|
|
11942
11952
|
setModeProperty(property) {
|
|
11943
11953
|
this.mode = property;
|
|
@@ -11959,38 +11969,56 @@
|
|
|
11959
11969
|
this.symlink = symlink;
|
|
11960
11970
|
}
|
|
11961
11971
|
write(buf, off = 0, len = buf.length, pos = 0) {
|
|
11962
|
-
|
|
11963
|
-
if (
|
|
11964
|
-
|
|
11965
|
-
|
|
11972
|
+
const bufLength = buf.length;
|
|
11973
|
+
if (off + len > bufLength) len = bufLength - off;
|
|
11974
|
+
if (len <= 0) return 0;
|
|
11975
|
+
const requiredSize = pos + len;
|
|
11976
|
+
if (requiredSize > this.capacity) {
|
|
11977
|
+
let newCapacity = Math.max(2 * this.capacity, 64);
|
|
11978
|
+
while(newCapacity < requiredSize)newCapacity *= 2;
|
|
11979
|
+
const newBuf = (0, buffer_1.bufferAllocUnsafe)(newCapacity);
|
|
11980
|
+
if (this.size > 0) this.buf.copy(newBuf, 0, 0, this.size);
|
|
11966
11981
|
this.buf = newBuf;
|
|
11982
|
+
this.capacity = newCapacity;
|
|
11967
11983
|
}
|
|
11984
|
+
if (pos > this.size) this.buf.fill(0, this.size, pos);
|
|
11968
11985
|
buf.copy(this.buf, pos, off, off + len);
|
|
11986
|
+
if (requiredSize > this.size) this.size = requiredSize;
|
|
11969
11987
|
this.touch();
|
|
11970
11988
|
return len;
|
|
11971
11989
|
}
|
|
11972
11990
|
read(buf, off = 0, len = buf.byteLength, pos = 0) {
|
|
11973
11991
|
this.atime = new Date();
|
|
11974
|
-
if (
|
|
11975
|
-
if (pos >= this.buf.length) return 0;
|
|
11992
|
+
if (pos >= this.size) return 0;
|
|
11976
11993
|
let actualLen = len;
|
|
11977
11994
|
if (actualLen > buf.byteLength) actualLen = buf.byteLength;
|
|
11978
|
-
if (actualLen + pos > this.
|
|
11995
|
+
if (actualLen + pos > this.size) actualLen = this.size - pos;
|
|
11996
|
+
if (actualLen <= 0) return 0;
|
|
11979
11997
|
const buf2 = buf instanceof buffer_1.Buffer ? buf : buffer_1.Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
|
|
11980
11998
|
this.buf.copy(buf2, off, pos, pos + actualLen);
|
|
11981
11999
|
return actualLen;
|
|
11982
12000
|
}
|
|
11983
12001
|
truncate(len = 0) {
|
|
11984
|
-
if (len) {
|
|
11985
|
-
|
|
11986
|
-
|
|
11987
|
-
|
|
11988
|
-
|
|
11989
|
-
|
|
11990
|
-
|
|
12002
|
+
if (!len) {
|
|
12003
|
+
this.buf = EMPTY_BUFFER;
|
|
12004
|
+
this.capacity = 0;
|
|
12005
|
+
this.size = 0;
|
|
12006
|
+
this.touch();
|
|
12007
|
+
return;
|
|
12008
|
+
}
|
|
12009
|
+
if (len <= this.size) this.size = len;
|
|
12010
|
+
else {
|
|
12011
|
+
if (len > this.capacity) {
|
|
12012
|
+
let newCapacity = Math.max(2 * this.capacity, 64);
|
|
12013
|
+
while(newCapacity < len)newCapacity *= 2;
|
|
12014
|
+
const buf = (0, buffer_1.bufferAllocUnsafe)(newCapacity);
|
|
12015
|
+
if (this.size > 0) this.buf.copy(buf, 0, 0, this.size);
|
|
12016
|
+
buf.fill(0, this.size, len);
|
|
11991
12017
|
this.buf = buf;
|
|
11992
|
-
|
|
11993
|
-
|
|
12018
|
+
this.capacity = newCapacity;
|
|
12019
|
+
} else this.buf.fill(0, this.size, len);
|
|
12020
|
+
this.size = len;
|
|
12021
|
+
}
|
|
11994
12022
|
this.touch();
|
|
11995
12023
|
}
|
|
11996
12024
|
chmod(perm) {
|
|
@@ -12304,25 +12332,25 @@
|
|
|
12304
12332
|
function requireUtil$3() {
|
|
12305
12333
|
if (hasRequiredUtil$3) return util$2;
|
|
12306
12334
|
hasRequiredUtil$3 = 1;
|
|
12307
|
-
(function(exports) {
|
|
12308
|
-
Object.defineProperty(exports, "__esModule", {
|
|
12335
|
+
(function(exports$1) {
|
|
12336
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
12309
12337
|
value: true
|
|
12310
12338
|
});
|
|
12311
|
-
exports.filenameToSteps = exports.resolve = exports.unixify = exports.isWin = void 0;
|
|
12312
|
-
exports.isFd = isFd;
|
|
12313
|
-
exports.validateFd = validateFd;
|
|
12314
|
-
exports.dataToBuffer = dataToBuffer;
|
|
12339
|
+
exports$1.filenameToSteps = exports$1.resolve = exports$1.unixify = exports$1.isWin = void 0;
|
|
12340
|
+
exports$1.isFd = isFd;
|
|
12341
|
+
exports$1.validateFd = validateFd;
|
|
12342
|
+
exports$1.dataToBuffer = dataToBuffer;
|
|
12315
12343
|
const path_1 = requirePath();
|
|
12316
12344
|
const buffer_1 = requireBuffer();
|
|
12317
12345
|
const process_1 = requireProcess();
|
|
12318
12346
|
const encoding_1 = requireEncoding();
|
|
12319
12347
|
const constants_1 = requireConstants();
|
|
12320
|
-
exports.isWin = 'win32' === process_1.default.platform;
|
|
12348
|
+
exports$1.isWin = 'win32' === process_1.default.platform;
|
|
12321
12349
|
const resolveCrossPlatform = path_1.resolve;
|
|
12322
12350
|
const pathSep = path_1.posix ? path_1.posix.sep : path_1.sep;
|
|
12323
12351
|
const isSeparator = (str, i)=>{
|
|
12324
12352
|
let char = str[i];
|
|
12325
|
-
return i > 0 && ('/' === char || exports.isWin && '\\' === char);
|
|
12353
|
+
return i > 0 && ('/' === char || exports$1.isWin && '\\' === char);
|
|
12326
12354
|
};
|
|
12327
12355
|
const removeTrailingSeparator = (str)=>{
|
|
12328
12356
|
let i = str.length - 1;
|
|
@@ -12337,18 +12365,18 @@
|
|
|
12337
12365
|
return str;
|
|
12338
12366
|
};
|
|
12339
12367
|
const unixify = (filepath, stripTrailing = true)=>{
|
|
12340
|
-
if (exports.isWin) {
|
|
12368
|
+
if (exports$1.isWin) {
|
|
12341
12369
|
filepath = normalizePath(filepath, stripTrailing);
|
|
12342
12370
|
return filepath.replace(/^([a-zA-Z]+:|\.\/)/, '');
|
|
12343
12371
|
}
|
|
12344
12372
|
return filepath;
|
|
12345
12373
|
};
|
|
12346
|
-
exports.unixify = unixify;
|
|
12374
|
+
exports$1.unixify = unixify;
|
|
12347
12375
|
let resolve = (filename, base = process_1.default.cwd())=>resolveCrossPlatform(base, filename);
|
|
12348
|
-
exports.resolve = resolve;
|
|
12349
|
-
if (exports.isWin) {
|
|
12376
|
+
exports$1.resolve = resolve;
|
|
12377
|
+
if (exports$1.isWin) {
|
|
12350
12378
|
const _resolve = resolve;
|
|
12351
|
-
exports.resolve = resolve = (filename, base)=>(0, exports.unixify)(_resolve(filename, base));
|
|
12379
|
+
exports$1.resolve = resolve = (filename, base)=>(0, exports$1.unixify)(_resolve(filename, base));
|
|
12352
12380
|
}
|
|
12353
12381
|
const filenameToSteps = (filename, base)=>{
|
|
12354
12382
|
const fullPath = resolve(filename, base);
|
|
@@ -12356,7 +12384,7 @@
|
|
|
12356
12384
|
if (!fullPathSansSlash) return [];
|
|
12357
12385
|
return fullPathSansSlash.split(pathSep);
|
|
12358
12386
|
};
|
|
12359
|
-
exports.filenameToSteps = filenameToSteps;
|
|
12387
|
+
exports$1.filenameToSteps = filenameToSteps;
|
|
12360
12388
|
function isFd(path) {
|
|
12361
12389
|
return path >>> 0 === path;
|
|
12362
12390
|
}
|
|
@@ -12381,9 +12409,9 @@
|
|
|
12381
12409
|
function requirePunycode() {
|
|
12382
12410
|
if (hasRequiredPunycode) return punycode$1.exports;
|
|
12383
12411
|
hasRequiredPunycode = 1;
|
|
12384
|
-
(function(module, exports) {
|
|
12412
|
+
(function(module, exports$1) {
|
|
12385
12413
|
(function(root) {
|
|
12386
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
12414
|
+
var freeExports = exports$1 && !exports$1.nodeType && exports$1;
|
|
12387
12415
|
var freeModule = module && !module.nodeType && module;
|
|
12388
12416
|
var freeGlobal = 'object' == typeof commonjsGlobal && commonjsGlobal;
|
|
12389
12417
|
if (freeGlobal.undefined === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal) root = freeGlobal;
|
|
@@ -15833,37 +15861,37 @@
|
|
|
15833
15861
|
function requireCore() {
|
|
15834
15862
|
if (hasRequiredCore) return fs_core;
|
|
15835
15863
|
hasRequiredCore = 1;
|
|
15836
|
-
(function(exports) {
|
|
15837
|
-
Object.defineProperty(exports, "__esModule", {
|
|
15864
|
+
(function(exports$1) {
|
|
15865
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
15838
15866
|
value: true
|
|
15839
15867
|
});
|
|
15840
|
-
exports.Superblock = exports.File = exports.Link = exports.Node = void 0;
|
|
15868
|
+
exports$1.Superblock = exports$1.File = exports$1.Link = exports$1.Node = void 0;
|
|
15841
15869
|
const tslib_1 = require$$0$1;
|
|
15842
|
-
tslib_1.__exportStar(requireTypes(), exports);
|
|
15843
|
-
tslib_1.__exportStar(requireJson(), exports);
|
|
15870
|
+
tslib_1.__exportStar(requireTypes(), exports$1);
|
|
15871
|
+
tslib_1.__exportStar(requireJson(), exports$1);
|
|
15844
15872
|
var Node_1 = requireNode();
|
|
15845
|
-
Object.defineProperty(exports, "Node", {
|
|
15873
|
+
Object.defineProperty(exports$1, "Node", {
|
|
15846
15874
|
enumerable: true,
|
|
15847
15875
|
get: function() {
|
|
15848
15876
|
return Node_1.Node;
|
|
15849
15877
|
}
|
|
15850
15878
|
});
|
|
15851
15879
|
var Link_1 = requireLink();
|
|
15852
|
-
Object.defineProperty(exports, "Link", {
|
|
15880
|
+
Object.defineProperty(exports$1, "Link", {
|
|
15853
15881
|
enumerable: true,
|
|
15854
15882
|
get: function() {
|
|
15855
15883
|
return Link_1.Link;
|
|
15856
15884
|
}
|
|
15857
15885
|
});
|
|
15858
15886
|
var File_1 = requireFile();
|
|
15859
|
-
Object.defineProperty(exports, "File", {
|
|
15887
|
+
Object.defineProperty(exports$1, "File", {
|
|
15860
15888
|
enumerable: true,
|
|
15861
15889
|
get: function() {
|
|
15862
15890
|
return File_1.File;
|
|
15863
15891
|
}
|
|
15864
15892
|
});
|
|
15865
15893
|
var Superblock_1 = requireSuperblock();
|
|
15866
|
-
Object.defineProperty(exports, "Superblock", {
|
|
15894
|
+
Object.defineProperty(exports$1, "Superblock", {
|
|
15867
15895
|
enumerable: true,
|
|
15868
15896
|
get: function() {
|
|
15869
15897
|
return Superblock_1.Superblock;
|
|
@@ -17848,7 +17876,7 @@
|
|
|
17848
17876
|
function requireSafeBuffer() {
|
|
17849
17877
|
if (hasRequiredSafeBuffer) return safeBuffer.exports;
|
|
17850
17878
|
hasRequiredSafeBuffer = 1;
|
|
17851
|
-
(function(module, exports) {
|
|
17879
|
+
(function(module, exports$1) {
|
|
17852
17880
|
var buffer = require$$0$2;
|
|
17853
17881
|
var Buffer = buffer.Buffer;
|
|
17854
17882
|
function copyProps(src, dst) {
|
|
@@ -17856,8 +17884,8 @@
|
|
|
17856
17884
|
}
|
|
17857
17885
|
if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) module.exports = buffer;
|
|
17858
17886
|
else {
|
|
17859
|
-
copyProps(buffer, exports);
|
|
17860
|
-
exports.Buffer = SafeBuffer;
|
|
17887
|
+
copyProps(buffer, exports$1);
|
|
17888
|
+
exports$1.Buffer = SafeBuffer;
|
|
17861
17889
|
}
|
|
17862
17890
|
function SafeBuffer(arg, encodingOrOffset, length) {
|
|
17863
17891
|
return Buffer(arg, encodingOrOffset, length);
|
|
@@ -20978,19 +21006,19 @@
|
|
|
20978
21006
|
function requireStream() {
|
|
20979
21007
|
if (hasRequiredStream) return stream$1;
|
|
20980
21008
|
hasRequiredStream = 1;
|
|
20981
|
-
(function(exports) {
|
|
20982
|
-
Object.defineProperty(exports, "__esModule", {
|
|
21009
|
+
(function(exports$1) {
|
|
21010
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
20983
21011
|
value: true
|
|
20984
21012
|
});
|
|
20985
|
-
exports.Writable = exports.Readable = void 0;
|
|
21013
|
+
exports$1.Writable = exports$1.Readable = void 0;
|
|
20986
21014
|
var node_stream_1 = requireBrowser();
|
|
20987
|
-
Object.defineProperty(exports, "Readable", {
|
|
21015
|
+
Object.defineProperty(exports$1, "Readable", {
|
|
20988
21016
|
enumerable: true,
|
|
20989
21017
|
get: function() {
|
|
20990
21018
|
return node_stream_1.Readable;
|
|
20991
21019
|
}
|
|
20992
21020
|
});
|
|
20993
|
-
Object.defineProperty(exports, "Writable", {
|
|
21021
|
+
Object.defineProperty(exports$1, "Writable", {
|
|
20994
21022
|
enumerable: true,
|
|
20995
21023
|
get: function() {
|
|
20996
21024
|
return node_stream_1.Writable;
|
|
@@ -21004,13 +21032,13 @@
|
|
|
21004
21032
|
function requireEvents() {
|
|
21005
21033
|
if (hasRequiredEvents) return fs_events;
|
|
21006
21034
|
hasRequiredEvents = 1;
|
|
21007
|
-
(function(exports) {
|
|
21008
|
-
Object.defineProperty(exports, "__esModule", {
|
|
21035
|
+
(function(exports$1) {
|
|
21036
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
21009
21037
|
value: true
|
|
21010
21038
|
});
|
|
21011
|
-
exports.EventEmitter = void 0;
|
|
21039
|
+
exports$1.EventEmitter = void 0;
|
|
21012
21040
|
var node_events_1 = requireEvents$1();
|
|
21013
|
-
Object.defineProperty(exports, "EventEmitter", {
|
|
21041
|
+
Object.defineProperty(exports$1, "EventEmitter", {
|
|
21014
21042
|
enumerable: true,
|
|
21015
21043
|
get: function() {
|
|
21016
21044
|
return node_events_1.EventEmitter;
|
|
@@ -21428,14 +21456,14 @@
|
|
|
21428
21456
|
function requireLib$2() {
|
|
21429
21457
|
if (hasRequiredLib$2) return lib$1;
|
|
21430
21458
|
hasRequiredLib$2 = 1;
|
|
21431
|
-
(function(exports) {
|
|
21432
|
-
Object.defineProperty(exports, "__esModule", {
|
|
21459
|
+
(function(exports$1) {
|
|
21460
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
21433
21461
|
value: true
|
|
21434
21462
|
});
|
|
21435
21463
|
const tslib_1 = require$$0$1;
|
|
21436
|
-
tslib_1.__exportStar(requirePrintTree(), exports);
|
|
21437
|
-
tslib_1.__exportStar(requirePrintBinary(), exports);
|
|
21438
|
-
tslib_1.__exportStar(requirePrintJson(), exports);
|
|
21464
|
+
tslib_1.__exportStar(requirePrintTree(), exports$1);
|
|
21465
|
+
tslib_1.__exportStar(requirePrintBinary(), exports$1);
|
|
21466
|
+
tslib_1.__exportStar(requirePrintJson(), exports$1);
|
|
21439
21467
|
})(lib$1);
|
|
21440
21468
|
return lib$1;
|
|
21441
21469
|
}
|
|
@@ -21483,11 +21511,11 @@
|
|
|
21483
21511
|
function requirePrint() {
|
|
21484
21512
|
if (hasRequiredPrint) return fs_print;
|
|
21485
21513
|
hasRequiredPrint = 1;
|
|
21486
|
-
(function(exports) {
|
|
21487
|
-
Object.defineProperty(exports, "__esModule", {
|
|
21514
|
+
(function(exports$1) {
|
|
21515
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
21488
21516
|
value: true
|
|
21489
21517
|
});
|
|
21490
|
-
exports.toTreeSync = void 0;
|
|
21518
|
+
exports$1.toTreeSync = void 0;
|
|
21491
21519
|
const tree_dump_1 = requireLib$2();
|
|
21492
21520
|
const util_1 = requireUtil();
|
|
21493
21521
|
const toTreeSync = (fs, opts = {})=>{
|
|
@@ -21496,13 +21524,20 @@
|
|
|
21496
21524
|
if (dir[dir.length - 1] !== separator) dir += separator;
|
|
21497
21525
|
const tab = opts.tab || '';
|
|
21498
21526
|
const depth = opts.depth ?? 10;
|
|
21527
|
+
const sort = opts.sort ?? true;
|
|
21499
21528
|
let subtree = ' (...)';
|
|
21500
21529
|
if (depth > 0) {
|
|
21501
21530
|
const list = fs.readdirSync(dir, {
|
|
21502
21531
|
withFileTypes: true
|
|
21503
21532
|
});
|
|
21533
|
+
if (sort) list.sort((a, b)=>{
|
|
21534
|
+
if (a.isDirectory() && b.isDirectory()) return a.name.toString().localeCompare(b.name.toString());
|
|
21535
|
+
if (a.isDirectory()) return -1;
|
|
21536
|
+
if (b.isDirectory()) return 1;
|
|
21537
|
+
return a.name.toString().localeCompare(b.name.toString());
|
|
21538
|
+
});
|
|
21504
21539
|
subtree = (0, tree_dump_1.printTree)(tab, list.map((entry)=>(tab)=>{
|
|
21505
|
-
if (entry.isDirectory()) return (0, exports.toTreeSync)(fs, {
|
|
21540
|
+
if (entry.isDirectory()) return (0, exports$1.toTreeSync)(fs, {
|
|
21506
21541
|
dir: dir + entry.name,
|
|
21507
21542
|
depth: depth - 1,
|
|
21508
21543
|
tab
|
|
@@ -21514,7 +21549,7 @@
|
|
|
21514
21549
|
const base = (0, util_1.basename)(dir, separator) + separator;
|
|
21515
21550
|
return base + subtree;
|
|
21516
21551
|
};
|
|
21517
|
-
exports.toTreeSync = toTreeSync;
|
|
21552
|
+
exports$1.toTreeSync = toTreeSync;
|
|
21518
21553
|
})(fs_print);
|
|
21519
21554
|
return fs_print;
|
|
21520
21555
|
}
|
|
@@ -21523,14 +21558,14 @@
|
|
|
21523
21558
|
function requireOptions() {
|
|
21524
21559
|
if (hasRequiredOptions) return fs_options;
|
|
21525
21560
|
hasRequiredOptions = 1;
|
|
21526
|
-
(function(exports) {
|
|
21527
|
-
Object.defineProperty(exports, "__esModule", {
|
|
21561
|
+
(function(exports$1) {
|
|
21562
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
21528
21563
|
value: true
|
|
21529
21564
|
});
|
|
21530
|
-
exports.getWriteFileOptions = exports.writeFileDefaults = exports.getRealpathOptsAndCb = exports.getRealpathOptions = exports.getStatfsOptsAndCb = exports.getStatfsOptions = exports.getStatOptsAndCb = exports.getStatOptions = exports.getAppendFileOptsAndCb = exports.getAppendFileOpts = exports.getOpendirOptsAndCb = exports.getOpendirOptions = exports.getReaddirOptsAndCb = exports.getReaddirOptions = exports.getReadFileOptions = exports.getRmOptsAndCb = exports.getRmdirOptions = exports.getDefaultOptsAndCb = exports.getDefaultOpts = exports.optsDefaults = exports.getMkdirOptions = void 0;
|
|
21531
|
-
exports.getOptions = getOptions;
|
|
21532
|
-
exports.optsGenerator = optsGenerator;
|
|
21533
|
-
exports.optsAndCbGenerator = optsAndCbGenerator;
|
|
21565
|
+
exports$1.getWriteFileOptions = exports$1.writeFileDefaults = exports$1.getRealpathOptsAndCb = exports$1.getRealpathOptions = exports$1.getStatfsOptsAndCb = exports$1.getStatfsOptions = exports$1.getStatOptsAndCb = exports$1.getStatOptions = exports$1.getAppendFileOptsAndCb = exports$1.getAppendFileOpts = exports$1.getOpendirOptsAndCb = exports$1.getOpendirOptions = exports$1.getReaddirOptsAndCb = exports$1.getReaddirOptions = exports$1.getReadFileOptions = exports$1.getRmOptsAndCb = exports$1.getRmdirOptions = exports$1.getDefaultOptsAndCb = exports$1.getDefaultOpts = exports$1.optsDefaults = exports$1.getMkdirOptions = void 0;
|
|
21566
|
+
exports$1.getOptions = getOptions;
|
|
21567
|
+
exports$1.optsGenerator = optsGenerator;
|
|
21568
|
+
exports$1.optsAndCbGenerator = optsAndCbGenerator;
|
|
21534
21569
|
const constants_1 = requireConstants();
|
|
21535
21570
|
const encoding_1 = requireEncoding();
|
|
21536
21571
|
const util_1 = requireUtil$2();
|
|
@@ -21544,7 +21579,7 @@
|
|
|
21544
21579
|
});
|
|
21545
21580
|
return Object.assign({}, mkdirDefaults, options);
|
|
21546
21581
|
};
|
|
21547
|
-
exports.getMkdirOptions = getMkdirOptions;
|
|
21582
|
+
exports$1.getMkdirOptions = getMkdirOptions;
|
|
21548
21583
|
const ERRSTR_OPTS = (tipeof)=>`Expected options to be either an object or a string, but got ${tipeof} instead`;
|
|
21549
21584
|
function getOptions(defaults, options) {
|
|
21550
21585
|
let opts;
|
|
@@ -21579,78 +21614,78 @@
|
|
|
21579
21614
|
(0, util_1.validateCallback)(callback)
|
|
21580
21615
|
];
|
|
21581
21616
|
}
|
|
21582
|
-
exports.optsDefaults = {
|
|
21617
|
+
exports$1.optsDefaults = {
|
|
21583
21618
|
encoding: 'utf8'
|
|
21584
21619
|
};
|
|
21585
|
-
exports.getDefaultOpts = optsGenerator(exports.optsDefaults);
|
|
21586
|
-
exports.getDefaultOptsAndCb = optsAndCbGenerator(exports.getDefaultOpts);
|
|
21620
|
+
exports$1.getDefaultOpts = optsGenerator(exports$1.optsDefaults);
|
|
21621
|
+
exports$1.getDefaultOptsAndCb = optsAndCbGenerator(exports$1.getDefaultOpts);
|
|
21587
21622
|
const rmdirDefaults = {
|
|
21588
21623
|
recursive: false
|
|
21589
21624
|
};
|
|
21590
21625
|
const getRmdirOptions = (options)=>Object.assign({}, rmdirDefaults, options);
|
|
21591
|
-
exports.getRmdirOptions = getRmdirOptions;
|
|
21592
|
-
const getRmOpts = optsGenerator(exports.optsDefaults);
|
|
21593
|
-
exports.getRmOptsAndCb = optsAndCbGenerator(getRmOpts);
|
|
21626
|
+
exports$1.getRmdirOptions = getRmdirOptions;
|
|
21627
|
+
const getRmOpts = optsGenerator(exports$1.optsDefaults);
|
|
21628
|
+
exports$1.getRmOptsAndCb = optsAndCbGenerator(getRmOpts);
|
|
21594
21629
|
const readFileOptsDefaults = {
|
|
21595
21630
|
flag: 'r'
|
|
21596
21631
|
};
|
|
21597
|
-
exports.getReadFileOptions = optsGenerator(readFileOptsDefaults);
|
|
21632
|
+
exports$1.getReadFileOptions = optsGenerator(readFileOptsDefaults);
|
|
21598
21633
|
const readdirDefaults = {
|
|
21599
21634
|
encoding: 'utf8',
|
|
21600
21635
|
recursive: false,
|
|
21601
21636
|
withFileTypes: false
|
|
21602
21637
|
};
|
|
21603
|
-
exports.getReaddirOptions = optsGenerator(readdirDefaults);
|
|
21604
|
-
exports.getReaddirOptsAndCb = optsAndCbGenerator(exports.getReaddirOptions);
|
|
21638
|
+
exports$1.getReaddirOptions = optsGenerator(readdirDefaults);
|
|
21639
|
+
exports$1.getReaddirOptsAndCb = optsAndCbGenerator(exports$1.getReaddirOptions);
|
|
21605
21640
|
const opendirDefaults = {
|
|
21606
21641
|
encoding: 'utf8',
|
|
21607
21642
|
bufferSize: 32,
|
|
21608
21643
|
recursive: false
|
|
21609
21644
|
};
|
|
21610
|
-
exports.getOpendirOptions = optsGenerator(opendirDefaults);
|
|
21611
|
-
exports.getOpendirOptsAndCb = optsAndCbGenerator(exports.getOpendirOptions);
|
|
21645
|
+
exports$1.getOpendirOptions = optsGenerator(opendirDefaults);
|
|
21646
|
+
exports$1.getOpendirOptsAndCb = optsAndCbGenerator(exports$1.getOpendirOptions);
|
|
21612
21647
|
const appendFileDefaults = {
|
|
21613
21648
|
encoding: 'utf8',
|
|
21614
21649
|
mode: 438,
|
|
21615
21650
|
flag: constants_1.FLAGS[constants_1.FLAGS.a]
|
|
21616
21651
|
};
|
|
21617
|
-
exports.getAppendFileOpts = optsGenerator(appendFileDefaults);
|
|
21618
|
-
exports.getAppendFileOptsAndCb = optsAndCbGenerator(exports.getAppendFileOpts);
|
|
21652
|
+
exports$1.getAppendFileOpts = optsGenerator(appendFileDefaults);
|
|
21653
|
+
exports$1.getAppendFileOptsAndCb = optsAndCbGenerator(exports$1.getAppendFileOpts);
|
|
21619
21654
|
const statDefaults = {
|
|
21620
21655
|
bigint: false
|
|
21621
21656
|
};
|
|
21622
21657
|
const getStatOptions = (options = {})=>Object.assign({}, statDefaults, options);
|
|
21623
|
-
exports.getStatOptions = getStatOptions;
|
|
21658
|
+
exports$1.getStatOptions = getStatOptions;
|
|
21624
21659
|
const getStatOptsAndCb = (options, callback)=>'function' == typeof options ? [
|
|
21625
|
-
(0, exports.getStatOptions)(),
|
|
21660
|
+
(0, exports$1.getStatOptions)(),
|
|
21626
21661
|
options
|
|
21627
21662
|
] : [
|
|
21628
|
-
(0, exports.getStatOptions)(options),
|
|
21663
|
+
(0, exports$1.getStatOptions)(options),
|
|
21629
21664
|
(0, util_1.validateCallback)(callback)
|
|
21630
21665
|
];
|
|
21631
|
-
exports.getStatOptsAndCb = getStatOptsAndCb;
|
|
21666
|
+
exports$1.getStatOptsAndCb = getStatOptsAndCb;
|
|
21632
21667
|
const statfsDefaults = {
|
|
21633
21668
|
bigint: false
|
|
21634
21669
|
};
|
|
21635
21670
|
const getStatfsOptions = (options = {})=>Object.assign({}, statfsDefaults, options);
|
|
21636
|
-
exports.getStatfsOptions = getStatfsOptions;
|
|
21671
|
+
exports$1.getStatfsOptions = getStatfsOptions;
|
|
21637
21672
|
const getStatfsOptsAndCb = (options, callback)=>'function' == typeof options ? [
|
|
21638
|
-
(0, exports.getStatfsOptions)(),
|
|
21673
|
+
(0, exports$1.getStatfsOptions)(),
|
|
21639
21674
|
options
|
|
21640
21675
|
] : [
|
|
21641
|
-
(0, exports.getStatfsOptions)(options),
|
|
21676
|
+
(0, exports$1.getStatfsOptions)(options),
|
|
21642
21677
|
(0, util_1.validateCallback)(callback)
|
|
21643
21678
|
];
|
|
21644
|
-
exports.getStatfsOptsAndCb = getStatfsOptsAndCb;
|
|
21645
|
-
const realpathDefaults = exports.optsDefaults;
|
|
21646
|
-
exports.getRealpathOptions = optsGenerator(realpathDefaults);
|
|
21647
|
-
exports.getRealpathOptsAndCb = optsAndCbGenerator(exports.getRealpathOptions);
|
|
21648
|
-
exports.writeFileDefaults = {
|
|
21679
|
+
exports$1.getStatfsOptsAndCb = getStatfsOptsAndCb;
|
|
21680
|
+
const realpathDefaults = exports$1.optsDefaults;
|
|
21681
|
+
exports$1.getRealpathOptions = optsGenerator(realpathDefaults);
|
|
21682
|
+
exports$1.getRealpathOptsAndCb = optsAndCbGenerator(exports$1.getRealpathOptions);
|
|
21683
|
+
exports$1.writeFileDefaults = {
|
|
21649
21684
|
encoding: 'utf8',
|
|
21650
21685
|
mode: 438,
|
|
21651
21686
|
flag: constants_1.FLAGS[constants_1.FLAGS.w]
|
|
21652
21687
|
};
|
|
21653
|
-
exports.getWriteFileOptions = optsGenerator(exports.writeFileDefaults);
|
|
21688
|
+
exports$1.getWriteFileOptions = optsGenerator(exports$1.writeFileDefaults);
|
|
21654
21689
|
})(fs_options);
|
|
21655
21690
|
return fs_options;
|
|
21656
21691
|
}
|
|
@@ -21795,12 +21830,73 @@
|
|
|
21795
21830
|
function requireLib$1() {
|
|
21796
21831
|
if (hasRequiredLib$1) return lib;
|
|
21797
21832
|
hasRequiredLib$1 = 1;
|
|
21798
|
-
(function(exports) {
|
|
21799
|
-
Object.defineProperty(exports, "__esModule", {
|
|
21833
|
+
(function(exports$1) {
|
|
21834
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
21800
21835
|
value: true
|
|
21801
21836
|
});
|
|
21802
|
-
exports.toMatcher = exports.toRegex = void 0;
|
|
21837
|
+
exports$1.toMatcher = exports$1.toRegex = void 0;
|
|
21803
21838
|
const escapeRe = (ch)=>/[.^$+{}()|\\]/.test(ch) ? `\\${ch}` : ch;
|
|
21839
|
+
const parseExtGlob = (pattern, startIdx, prefix, options)=>{
|
|
21840
|
+
let i = startIdx;
|
|
21841
|
+
const parts = [];
|
|
21842
|
+
let cur = '';
|
|
21843
|
+
let depth = 1;
|
|
21844
|
+
while(i < pattern.length && depth > 0){
|
|
21845
|
+
const ch = pattern[i];
|
|
21846
|
+
if ('(' === ch) {
|
|
21847
|
+
depth++;
|
|
21848
|
+
cur += ch;
|
|
21849
|
+
i++;
|
|
21850
|
+
} else if (')' === ch) {
|
|
21851
|
+
depth--;
|
|
21852
|
+
if (0 === depth) {
|
|
21853
|
+
parts.push(cur);
|
|
21854
|
+
i++;
|
|
21855
|
+
break;
|
|
21856
|
+
}
|
|
21857
|
+
cur += ch;
|
|
21858
|
+
i++;
|
|
21859
|
+
} else if ('|' === ch && 1 === depth) {
|
|
21860
|
+
parts.push(cur);
|
|
21861
|
+
cur = '';
|
|
21862
|
+
i++;
|
|
21863
|
+
} else {
|
|
21864
|
+
cur += ch;
|
|
21865
|
+
i++;
|
|
21866
|
+
}
|
|
21867
|
+
}
|
|
21868
|
+
if (0 !== depth) return;
|
|
21869
|
+
let alternatives = '';
|
|
21870
|
+
const length = parts.length;
|
|
21871
|
+
for(let j = 0; j < length; j++)alternatives += (alternatives ? '|' : '') + (0, exports$1.toRegex)(parts[j], options).source.replace(/^\^/, '').replace(/\$$/, '');
|
|
21872
|
+
switch(prefix){
|
|
21873
|
+
case '?':
|
|
21874
|
+
return [
|
|
21875
|
+
`(?:${alternatives})?`,
|
|
21876
|
+
i
|
|
21877
|
+
];
|
|
21878
|
+
case '*':
|
|
21879
|
+
return [
|
|
21880
|
+
`(?:${alternatives})*`,
|
|
21881
|
+
i
|
|
21882
|
+
];
|
|
21883
|
+
case '+':
|
|
21884
|
+
return [
|
|
21885
|
+
`(?:${alternatives})+`,
|
|
21886
|
+
i
|
|
21887
|
+
];
|
|
21888
|
+
case '@':
|
|
21889
|
+
return [
|
|
21890
|
+
`(?:${alternatives})`,
|
|
21891
|
+
i
|
|
21892
|
+
];
|
|
21893
|
+
case '!':
|
|
21894
|
+
return [
|
|
21895
|
+
`(?!${alternatives})[^/]*`,
|
|
21896
|
+
i
|
|
21897
|
+
];
|
|
21898
|
+
}
|
|
21899
|
+
};
|
|
21804
21900
|
const toRegex = (pattern, options)=>{
|
|
21805
21901
|
let regexStr = '';
|
|
21806
21902
|
let i = 0;
|
|
@@ -21827,11 +21923,22 @@
|
|
|
21827
21923
|
i++;
|
|
21828
21924
|
}
|
|
21829
21925
|
if (!closed) return '\\{' + escapeRe(cur);
|
|
21830
|
-
const alt = parts.map((p)=>(0, exports.toRegex)(p, options).source.replace(/^\^/, '').replace(/\$$/, '')).join('|');
|
|
21926
|
+
const alt = parts.map((p)=>(0, exports$1.toRegex)(p, options).source.replace(/^\^/, '').replace(/\$$/, '')).join('|');
|
|
21831
21927
|
return `(?:${alt})`;
|
|
21832
21928
|
};
|
|
21929
|
+
const extglob = !!options?.extglob;
|
|
21833
21930
|
while(i < pattern.length){
|
|
21834
21931
|
const char = pattern[i];
|
|
21932
|
+
if (extglob && '(' === pattern[i + 1]) {
|
|
21933
|
+
if ('?' === char || '*' === char || '+' === char || '@' === char || '!' === char) {
|
|
21934
|
+
const result = parseExtGlob(pattern, i + 2, char, options);
|
|
21935
|
+
if (result) {
|
|
21936
|
+
regexStr += result[0];
|
|
21937
|
+
i = result[1];
|
|
21938
|
+
continue;
|
|
21939
|
+
}
|
|
21940
|
+
}
|
|
21941
|
+
}
|
|
21835
21942
|
switch(char){
|
|
21836
21943
|
case '*':
|
|
21837
21944
|
if ('*' === pattern[i + 1]) {
|
|
@@ -21907,7 +22014,7 @@
|
|
|
21907
22014
|
const flags = options?.nocase ? 'i' : '';
|
|
21908
22015
|
return new RegExp('^' + regexStr + '$', flags);
|
|
21909
22016
|
};
|
|
21910
|
-
exports.toRegex = toRegex;
|
|
22017
|
+
exports$1.toRegex = toRegex;
|
|
21911
22018
|
const isRegExp = /^\/(.{1,4096})\/([gimsuy]{0,6})$/;
|
|
21912
22019
|
const toMatcher = (pattern, options)=>{
|
|
21913
22020
|
const regexes = [];
|
|
@@ -21919,11 +22026,11 @@
|
|
|
21919
22026
|
if (match) {
|
|
21920
22027
|
const [, expr, flags] = match;
|
|
21921
22028
|
regexes.push(new RegExp(expr, flags));
|
|
21922
|
-
} else regexes.push((0, exports.toRegex)(pat, options));
|
|
22029
|
+
} else regexes.push((0, exports$1.toRegex)(pat, options));
|
|
21923
22030
|
} else regexes.push(pat);
|
|
21924
22031
|
return regexes.length ? new Function('p', 'return ' + regexes.map((r)=>r + '.test(p)').join('||')) : ()=>false;
|
|
21925
22032
|
};
|
|
21926
|
-
exports.toMatcher = toMatcher;
|
|
22033
|
+
exports$1.toMatcher = toMatcher;
|
|
21927
22034
|
})(lib);
|
|
21928
22035
|
return lib;
|
|
21929
22036
|
}
|
|
@@ -23499,6 +23606,7 @@
|
|
|
23499
23606
|
'fsyncSync',
|
|
23500
23607
|
'ftruncateSync',
|
|
23501
23608
|
'futimesSync',
|
|
23609
|
+
'globSync',
|
|
23502
23610
|
'lchmodSync',
|
|
23503
23611
|
'lchownSync',
|
|
23504
23612
|
'linkSync',
|
|
@@ -23555,6 +23663,7 @@
|
|
|
23555
23663
|
'fsync',
|
|
23556
23664
|
'ftruncate',
|
|
23557
23665
|
'futimes',
|
|
23666
|
+
'glob',
|
|
23558
23667
|
'lchmod',
|
|
23559
23668
|
'lchown',
|
|
23560
23669
|
'link',
|
|
@@ -23593,16 +23702,16 @@
|
|
|
23593
23702
|
function requireLib() {
|
|
23594
23703
|
if (hasRequiredLib) return lib$3.exports;
|
|
23595
23704
|
hasRequiredLib = 1;
|
|
23596
|
-
(function(module, exports) {
|
|
23597
|
-
Object.defineProperty(exports, "__esModule", {
|
|
23705
|
+
(function(module, exports$1) {
|
|
23706
|
+
Object.defineProperty(exports$1, "__esModule", {
|
|
23598
23707
|
value: true
|
|
23599
23708
|
});
|
|
23600
|
-
exports.memfs = exports.fs = exports.vol = exports.Volume = void 0;
|
|
23601
|
-
exports.createFsFromVolume = createFsFromVolume;
|
|
23709
|
+
exports$1.memfs = exports$1.fs = exports$1.vol = exports$1.Volume = void 0;
|
|
23710
|
+
exports$1.createFsFromVolume = createFsFromVolume;
|
|
23602
23711
|
const Stats_1 = requireStats();
|
|
23603
23712
|
const Dirent_1 = requireDirent();
|
|
23604
23713
|
const volume_1 = requireVolume();
|
|
23605
|
-
Object.defineProperty(exports, "Volume", {
|
|
23714
|
+
Object.defineProperty(exports$1, "Volume", {
|
|
23606
23715
|
enumerable: true,
|
|
23607
23716
|
get: function() {
|
|
23608
23717
|
return volume_1.Volume;
|
|
@@ -23612,7 +23721,7 @@
|
|
|
23612
23721
|
const fsSynchronousApiList_1 = requireFsSynchronousApiList();
|
|
23613
23722
|
const fsCallbackApiList_1 = requireFsCallbackApiList();
|
|
23614
23723
|
const { F_OK, R_OK, W_OK, X_OK } = constants_1.constants;
|
|
23615
|
-
exports.vol = new volume_1.Volume();
|
|
23724
|
+
exports$1.vol = new volume_1.Volume();
|
|
23616
23725
|
function createFsFromVolume(vol) {
|
|
23617
23726
|
const fs = {
|
|
23618
23727
|
F_OK,
|
|
@@ -23642,7 +23751,7 @@
|
|
|
23642
23751
|
fs.__vol = vol;
|
|
23643
23752
|
return fs;
|
|
23644
23753
|
}
|
|
23645
|
-
exports.fs = createFsFromVolume(exports.vol);
|
|
23754
|
+
exports$1.fs = createFsFromVolume(exports$1.vol);
|
|
23646
23755
|
const memfs = (json = {}, cwd = '/')=>{
|
|
23647
23756
|
const vol = volume_1.Volume.fromNestedJSON(json, cwd);
|
|
23648
23757
|
const fs = createFsFromVolume(vol);
|
|
@@ -23651,10 +23760,10 @@
|
|
|
23651
23760
|
vol
|
|
23652
23761
|
};
|
|
23653
23762
|
};
|
|
23654
|
-
exports.memfs = memfs;
|
|
23763
|
+
exports$1.memfs = memfs;
|
|
23655
23764
|
module.exports = {
|
|
23656
23765
|
...module.exports,
|
|
23657
|
-
...exports.fs
|
|
23766
|
+
...exports$1.fs
|
|
23658
23767
|
};
|
|
23659
23768
|
module.exports.semantic = true;
|
|
23660
23769
|
})(lib$3, lib$3.exports);
|