@prisma/fetch-engine 6.19.0 → 6.20.0-integration-next.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/BinaryType.d.ts +0 -2
- package/dist/BinaryType.js +2 -2
- package/dist/{chunk-3VVCXIQ5.js → chunk-4CBSYQEY.js} +5 -5
- package/dist/{chunk-X37PZICB.js → chunk-66KG5WKV.js} +3 -5
- package/dist/{chunk-RXM4EBGR.js → chunk-BYDIRBHB.js} +687 -213
- package/dist/{chunk-VAPNG6TS.js → chunk-CNO6T77T.js} +69 -238
- package/dist/{chunk-VCBTN2LA.js → chunk-GQZPGRKF.js} +29 -43
- package/dist/{chunk-CY52DY2B.js → chunk-UZIIO3VK.js} +83 -820
- package/dist/{chunk-LONQL55G.js → chunk-VGMB4WXF.js} +8 -15
- package/dist/{chunk-QFA3XBMW.js → chunk-XNR2KDTK.js} +3 -11
- package/dist/{chunk-GRUBMFLQ.js → chunk-YMRBJ7QH.js} +30 -44
- package/dist/cleanupCache.js +3 -4
- package/dist/download.d.ts +1 -1
- package/dist/download.js +14 -14
- package/dist/downloadZip.js +5 -6
- package/dist/env.d.ts +0 -2
- package/dist/env.js +6 -6
- package/dist/getProxyAgent.js +2 -2
- package/dist/index.js +22 -22
- package/dist/{multipart-parser-ASKQAOL4.js → multipart-parser-AOASR4DL.js} +6 -6
- package/dist/utils.js +5 -6
- package/package.json +5 -5
|
@@ -26,16 +26,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_UZIIO3VK_exports = {};
|
|
30
|
+
__export(chunk_UZIIO3VK_exports, {
|
|
31
31
|
downloadZip: () => downloadZip,
|
|
32
32
|
require_temp_dir: () => require_temp_dir
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_UZIIO3VK_exports);
|
|
35
|
+
var import_chunk_BYDIRBHB = require("./chunk-BYDIRBHB.js");
|
|
36
36
|
var import_chunk_FSAAZH62 = require("./chunk-FSAAZH62.js");
|
|
37
|
-
var
|
|
38
|
-
var
|
|
37
|
+
var import_chunk_VGMB4WXF = require("./chunk-VGMB4WXF.js");
|
|
38
|
+
var import_chunk_CNO6T77T = require("./chunk-CNO6T77T.js");
|
|
39
39
|
var import_chunk_QGM4M3NI = require("./chunk-QGM4M3NI.js");
|
|
40
40
|
var import_node_fs = __toESM(require("node:fs"));
|
|
41
41
|
var import_node_path = __toESM(require("node:path"));
|
|
@@ -4462,7 +4462,7 @@ var require_out2 = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
4462
4462
|
}
|
|
4463
4463
|
});
|
|
4464
4464
|
var require_reusify = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
4465
|
-
"../../node_modules/.pnpm/reusify@1.0
|
|
4465
|
+
"../../node_modules/.pnpm/reusify@1.1.0/node_modules/reusify/reusify.js"(exports, module2) {
|
|
4466
4466
|
"use strict";
|
|
4467
4467
|
function reusify(Constructor) {
|
|
4468
4468
|
var head = new Constructor();
|
|
@@ -4491,17 +4491,17 @@ var require_reusify = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
4491
4491
|
}
|
|
4492
4492
|
});
|
|
4493
4493
|
var require_queue = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
4494
|
-
"../../node_modules/.pnpm/fastq@1.
|
|
4494
|
+
"../../node_modules/.pnpm/fastq@1.19.1/node_modules/fastq/queue.js"(exports, module2) {
|
|
4495
4495
|
"use strict";
|
|
4496
4496
|
var reusify = require_reusify();
|
|
4497
|
-
function fastqueue(context, worker,
|
|
4497
|
+
function fastqueue(context, worker, _concurrency) {
|
|
4498
4498
|
if (typeof context === "function") {
|
|
4499
|
-
|
|
4499
|
+
_concurrency = worker;
|
|
4500
4500
|
worker = context;
|
|
4501
4501
|
context = null;
|
|
4502
4502
|
}
|
|
4503
|
-
if (
|
|
4504
|
-
throw new Error("fastqueue concurrency must be greater than 1");
|
|
4503
|
+
if (!(_concurrency >= 1)) {
|
|
4504
|
+
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
4505
4505
|
}
|
|
4506
4506
|
var cache = reusify(Task);
|
|
4507
4507
|
var queueHead = null;
|
|
@@ -4514,7 +4514,20 @@ var require_queue = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
4514
4514
|
saturated: noop,
|
|
4515
4515
|
pause,
|
|
4516
4516
|
paused: false,
|
|
4517
|
-
concurrency
|
|
4517
|
+
get concurrency() {
|
|
4518
|
+
return _concurrency;
|
|
4519
|
+
},
|
|
4520
|
+
set concurrency(value) {
|
|
4521
|
+
if (!(value >= 1)) {
|
|
4522
|
+
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
4523
|
+
}
|
|
4524
|
+
_concurrency = value;
|
|
4525
|
+
if (self.paused) return;
|
|
4526
|
+
for (; queueHead && _running < _concurrency; ) {
|
|
4527
|
+
_running++;
|
|
4528
|
+
release();
|
|
4529
|
+
}
|
|
4530
|
+
},
|
|
4518
4531
|
running,
|
|
4519
4532
|
resume,
|
|
4520
4533
|
idle,
|
|
@@ -4554,7 +4567,12 @@ var require_queue = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
4554
4567
|
function resume() {
|
|
4555
4568
|
if (!self.paused) return;
|
|
4556
4569
|
self.paused = false;
|
|
4557
|
-
|
|
4570
|
+
if (queueHead === null) {
|
|
4571
|
+
_running++;
|
|
4572
|
+
release();
|
|
4573
|
+
return;
|
|
4574
|
+
}
|
|
4575
|
+
for (; queueHead && _running < _concurrency; ) {
|
|
4558
4576
|
_running++;
|
|
4559
4577
|
release();
|
|
4560
4578
|
}
|
|
@@ -4569,7 +4587,7 @@ var require_queue = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
4569
4587
|
current.value = value;
|
|
4570
4588
|
current.callback = done || noop;
|
|
4571
4589
|
current.errorHandler = errorHandler;
|
|
4572
|
-
if (_running
|
|
4590
|
+
if (_running >= _concurrency || self.paused) {
|
|
4573
4591
|
if (queueTail) {
|
|
4574
4592
|
queueTail.next = current;
|
|
4575
4593
|
queueTail = current;
|
|
@@ -4589,7 +4607,8 @@ var require_queue = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
4589
4607
|
current.release = release;
|
|
4590
4608
|
current.value = value;
|
|
4591
4609
|
current.callback = done || noop;
|
|
4592
|
-
|
|
4610
|
+
current.errorHandler = errorHandler;
|
|
4611
|
+
if (_running >= _concurrency || self.paused) {
|
|
4593
4612
|
if (queueHead) {
|
|
4594
4613
|
current.next = queueHead;
|
|
4595
4614
|
queueHead = current;
|
|
@@ -4608,7 +4627,7 @@ var require_queue = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
4608
4627
|
cache.release(holder);
|
|
4609
4628
|
}
|
|
4610
4629
|
var next = queueHead;
|
|
4611
|
-
if (next) {
|
|
4630
|
+
if (next && _running <= _concurrency) {
|
|
4612
4631
|
if (!self.paused) {
|
|
4613
4632
|
if (queueTail === queueHead) {
|
|
4614
4633
|
queueTail = null;
|
|
@@ -4664,9 +4683,9 @@ var require_queue = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
4664
4683
|
self.release(self);
|
|
4665
4684
|
};
|
|
4666
4685
|
}
|
|
4667
|
-
function queueAsPromised(context, worker,
|
|
4686
|
+
function queueAsPromised(context, worker, _concurrency) {
|
|
4668
4687
|
if (typeof context === "function") {
|
|
4669
|
-
|
|
4688
|
+
_concurrency = worker;
|
|
4670
4689
|
worker = context;
|
|
4671
4690
|
context = null;
|
|
4672
4691
|
}
|
|
@@ -4675,7 +4694,7 @@ var require_queue = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
4675
4694
|
cb(null, res);
|
|
4676
4695
|
}, cb);
|
|
4677
4696
|
}
|
|
4678
|
-
var queue = fastqueue(context, asyncWrapper,
|
|
4697
|
+
var queue = fastqueue(context, asyncWrapper, _concurrency);
|
|
4679
4698
|
var pushCb = queue.push;
|
|
4680
4699
|
var unshiftCb = queue.unshift;
|
|
4681
4700
|
queue.push = push;
|
|
@@ -4709,17 +4728,19 @@ var require_queue = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
4709
4728
|
return p;
|
|
4710
4729
|
}
|
|
4711
4730
|
function drained() {
|
|
4712
|
-
if (queue.idle()) {
|
|
4713
|
-
return new Promise(function(resolve) {
|
|
4714
|
-
resolve();
|
|
4715
|
-
});
|
|
4716
|
-
}
|
|
4717
|
-
var previousDrain = queue.drain;
|
|
4718
4731
|
var p = new Promise(function(resolve) {
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4732
|
+
process.nextTick(function() {
|
|
4733
|
+
if (queue.idle()) {
|
|
4734
|
+
resolve();
|
|
4735
|
+
} else {
|
|
4736
|
+
var previousDrain = queue.drain;
|
|
4737
|
+
queue.drain = function() {
|
|
4738
|
+
if (typeof previousDrain === "function") previousDrain();
|
|
4739
|
+
resolve();
|
|
4740
|
+
queue.drain = previousDrain;
|
|
4741
|
+
};
|
|
4742
|
+
}
|
|
4743
|
+
});
|
|
4723
4744
|
});
|
|
4724
4745
|
return p;
|
|
4725
4746
|
}
|
|
@@ -5951,7 +5972,7 @@ var require_dir_glob = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
5951
5972
|
}
|
|
5952
5973
|
});
|
|
5953
5974
|
var require_ignore = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
5954
|
-
"../../node_modules/.pnpm/ignore@5.2
|
|
5975
|
+
"../../node_modules/.pnpm/ignore@5.3.2/node_modules/ignore/index.js"(exports, module2) {
|
|
5955
5976
|
"use strict";
|
|
5956
5977
|
function makeArray(subject) {
|
|
5957
5978
|
return Array.isArray(subject) ? subject : [subject];
|
|
@@ -5983,18 +6004,32 @@ var require_ignore = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
5983
6004
|
return slashes.slice(0, length - length % 2);
|
|
5984
6005
|
};
|
|
5985
6006
|
var REPLACERS = [
|
|
6007
|
+
[
|
|
6008
|
+
// remove BOM
|
|
6009
|
+
// TODO:
|
|
6010
|
+
// Other similar zero-width characters?
|
|
6011
|
+
/^\uFEFF/,
|
|
6012
|
+
() => EMPTY
|
|
6013
|
+
],
|
|
5986
6014
|
// > Trailing spaces are ignored unless they are quoted with backslash ("\")
|
|
5987
6015
|
[
|
|
5988
6016
|
// (a\ ) -> (a )
|
|
5989
6017
|
// (a ) -> (a)
|
|
6018
|
+
// (a ) -> (a)
|
|
5990
6019
|
// (a \ ) -> (a )
|
|
5991
|
-
|
|
5992
|
-
(
|
|
6020
|
+
/((?:\\\\)*?)(\\?\s+)$/,
|
|
6021
|
+
(_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY)
|
|
5993
6022
|
],
|
|
5994
6023
|
// replace (\ ) with ' '
|
|
6024
|
+
// (\ ) -> ' '
|
|
6025
|
+
// (\\ ) -> '\\ '
|
|
6026
|
+
// (\\\ ) -> '\\ '
|
|
5995
6027
|
[
|
|
5996
|
-
|
|
5997
|
-
() =>
|
|
6028
|
+
/(\\+?)\s/g,
|
|
6029
|
+
(_, m1) => {
|
|
6030
|
+
const { length } = m1;
|
|
6031
|
+
return m1.slice(0, length - length % 2) + SPACE;
|
|
6032
|
+
}
|
|
5998
6033
|
],
|
|
5999
6034
|
// Escape metacharacters
|
|
6000
6035
|
// which is written down by users but means special for regular expressions.
|
|
@@ -6129,7 +6164,7 @@ var require_ignore = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
6129
6164
|
let source = regexCache[pattern];
|
|
6130
6165
|
if (!source) {
|
|
6131
6166
|
source = REPLACERS.reduce(
|
|
6132
|
-
(prev,
|
|
6167
|
+
(prev, [matcher, replacer]) => prev.replace(matcher, replacer.bind(pattern)),
|
|
6133
6168
|
pattern
|
|
6134
6169
|
);
|
|
6135
6170
|
regexCache[pattern] = source;
|
|
@@ -6606,778 +6641,6 @@ var require_globby = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
6606
6641
|
module2.exports.gitignore = gitignore;
|
|
6607
6642
|
}
|
|
6608
6643
|
});
|
|
6609
|
-
var require_polyfills = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
6610
|
-
"../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/polyfills.js"(exports, module2) {
|
|
6611
|
-
"use strict";
|
|
6612
|
-
var constants = (0, import_chunk_QGM4M3NI.__require)("constants");
|
|
6613
|
-
var origCwd = process.cwd;
|
|
6614
|
-
var cwd = null;
|
|
6615
|
-
var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
|
|
6616
|
-
process.cwd = function() {
|
|
6617
|
-
if (!cwd)
|
|
6618
|
-
cwd = origCwd.call(process);
|
|
6619
|
-
return cwd;
|
|
6620
|
-
};
|
|
6621
|
-
try {
|
|
6622
|
-
process.cwd();
|
|
6623
|
-
} catch (er) {
|
|
6624
|
-
}
|
|
6625
|
-
if (typeof process.chdir === "function") {
|
|
6626
|
-
chdir = process.chdir;
|
|
6627
|
-
process.chdir = function(d) {
|
|
6628
|
-
cwd = null;
|
|
6629
|
-
chdir.call(process, d);
|
|
6630
|
-
};
|
|
6631
|
-
if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir);
|
|
6632
|
-
}
|
|
6633
|
-
var chdir;
|
|
6634
|
-
module2.exports = patch;
|
|
6635
|
-
function patch(fs2) {
|
|
6636
|
-
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
|
6637
|
-
patchLchmod(fs2);
|
|
6638
|
-
}
|
|
6639
|
-
if (!fs2.lutimes) {
|
|
6640
|
-
patchLutimes(fs2);
|
|
6641
|
-
}
|
|
6642
|
-
fs2.chown = chownFix(fs2.chown);
|
|
6643
|
-
fs2.fchown = chownFix(fs2.fchown);
|
|
6644
|
-
fs2.lchown = chownFix(fs2.lchown);
|
|
6645
|
-
fs2.chmod = chmodFix(fs2.chmod);
|
|
6646
|
-
fs2.fchmod = chmodFix(fs2.fchmod);
|
|
6647
|
-
fs2.lchmod = chmodFix(fs2.lchmod);
|
|
6648
|
-
fs2.chownSync = chownFixSync(fs2.chownSync);
|
|
6649
|
-
fs2.fchownSync = chownFixSync(fs2.fchownSync);
|
|
6650
|
-
fs2.lchownSync = chownFixSync(fs2.lchownSync);
|
|
6651
|
-
fs2.chmodSync = chmodFixSync(fs2.chmodSync);
|
|
6652
|
-
fs2.fchmodSync = chmodFixSync(fs2.fchmodSync);
|
|
6653
|
-
fs2.lchmodSync = chmodFixSync(fs2.lchmodSync);
|
|
6654
|
-
fs2.stat = statFix(fs2.stat);
|
|
6655
|
-
fs2.fstat = statFix(fs2.fstat);
|
|
6656
|
-
fs2.lstat = statFix(fs2.lstat);
|
|
6657
|
-
fs2.statSync = statFixSync(fs2.statSync);
|
|
6658
|
-
fs2.fstatSync = statFixSync(fs2.fstatSync);
|
|
6659
|
-
fs2.lstatSync = statFixSync(fs2.lstatSync);
|
|
6660
|
-
if (fs2.chmod && !fs2.lchmod) {
|
|
6661
|
-
fs2.lchmod = function(path2, mode, cb) {
|
|
6662
|
-
if (cb) process.nextTick(cb);
|
|
6663
|
-
};
|
|
6664
|
-
fs2.lchmodSync = function() {
|
|
6665
|
-
};
|
|
6666
|
-
}
|
|
6667
|
-
if (fs2.chown && !fs2.lchown) {
|
|
6668
|
-
fs2.lchown = function(path2, uid, gid, cb) {
|
|
6669
|
-
if (cb) process.nextTick(cb);
|
|
6670
|
-
};
|
|
6671
|
-
fs2.lchownSync = function() {
|
|
6672
|
-
};
|
|
6673
|
-
}
|
|
6674
|
-
if (platform === "win32") {
|
|
6675
|
-
fs2.rename = typeof fs2.rename !== "function" ? fs2.rename : function(fs$rename) {
|
|
6676
|
-
function rename(from, to, cb) {
|
|
6677
|
-
var start = Date.now();
|
|
6678
|
-
var backoff = 0;
|
|
6679
|
-
fs$rename(from, to, function CB(er) {
|
|
6680
|
-
if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) {
|
|
6681
|
-
setTimeout(function() {
|
|
6682
|
-
fs2.stat(to, function(stater, st) {
|
|
6683
|
-
if (stater && stater.code === "ENOENT")
|
|
6684
|
-
fs$rename(from, to, CB);
|
|
6685
|
-
else
|
|
6686
|
-
cb(er);
|
|
6687
|
-
});
|
|
6688
|
-
}, backoff);
|
|
6689
|
-
if (backoff < 100)
|
|
6690
|
-
backoff += 10;
|
|
6691
|
-
return;
|
|
6692
|
-
}
|
|
6693
|
-
if (cb) cb(er);
|
|
6694
|
-
});
|
|
6695
|
-
}
|
|
6696
|
-
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
|
|
6697
|
-
return rename;
|
|
6698
|
-
}(fs2.rename);
|
|
6699
|
-
}
|
|
6700
|
-
fs2.read = typeof fs2.read !== "function" ? fs2.read : function(fs$read) {
|
|
6701
|
-
function read(fd, buffer, offset, length, position, callback_) {
|
|
6702
|
-
var callback;
|
|
6703
|
-
if (callback_ && typeof callback_ === "function") {
|
|
6704
|
-
var eagCounter = 0;
|
|
6705
|
-
callback = function(er, _, __) {
|
|
6706
|
-
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
|
6707
|
-
eagCounter++;
|
|
6708
|
-
return fs$read.call(fs2, fd, buffer, offset, length, position, callback);
|
|
6709
|
-
}
|
|
6710
|
-
callback_.apply(this, arguments);
|
|
6711
|
-
};
|
|
6712
|
-
}
|
|
6713
|
-
return fs$read.call(fs2, fd, buffer, offset, length, position, callback);
|
|
6714
|
-
}
|
|
6715
|
-
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
|
6716
|
-
return read;
|
|
6717
|
-
}(fs2.read);
|
|
6718
|
-
fs2.readSync = typeof fs2.readSync !== "function" ? fs2.readSync : /* @__PURE__ */ function(fs$readSync) {
|
|
6719
|
-
return function(fd, buffer, offset, length, position) {
|
|
6720
|
-
var eagCounter = 0;
|
|
6721
|
-
while (true) {
|
|
6722
|
-
try {
|
|
6723
|
-
return fs$readSync.call(fs2, fd, buffer, offset, length, position);
|
|
6724
|
-
} catch (er) {
|
|
6725
|
-
if (er.code === "EAGAIN" && eagCounter < 10) {
|
|
6726
|
-
eagCounter++;
|
|
6727
|
-
continue;
|
|
6728
|
-
}
|
|
6729
|
-
throw er;
|
|
6730
|
-
}
|
|
6731
|
-
}
|
|
6732
|
-
};
|
|
6733
|
-
}(fs2.readSync);
|
|
6734
|
-
function patchLchmod(fs3) {
|
|
6735
|
-
fs3.lchmod = function(path2, mode, callback) {
|
|
6736
|
-
fs3.open(
|
|
6737
|
-
path2,
|
|
6738
|
-
constants.O_WRONLY | constants.O_SYMLINK,
|
|
6739
|
-
mode,
|
|
6740
|
-
function(err, fd) {
|
|
6741
|
-
if (err) {
|
|
6742
|
-
if (callback) callback(err);
|
|
6743
|
-
return;
|
|
6744
|
-
}
|
|
6745
|
-
fs3.fchmod(fd, mode, function(err2) {
|
|
6746
|
-
fs3.close(fd, function(err22) {
|
|
6747
|
-
if (callback) callback(err2 || err22);
|
|
6748
|
-
});
|
|
6749
|
-
});
|
|
6750
|
-
}
|
|
6751
|
-
);
|
|
6752
|
-
};
|
|
6753
|
-
fs3.lchmodSync = function(path2, mode) {
|
|
6754
|
-
var fd = fs3.openSync(path2, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
6755
|
-
var threw = true;
|
|
6756
|
-
var ret;
|
|
6757
|
-
try {
|
|
6758
|
-
ret = fs3.fchmodSync(fd, mode);
|
|
6759
|
-
threw = false;
|
|
6760
|
-
} finally {
|
|
6761
|
-
if (threw) {
|
|
6762
|
-
try {
|
|
6763
|
-
fs3.closeSync(fd);
|
|
6764
|
-
} catch (er) {
|
|
6765
|
-
}
|
|
6766
|
-
} else {
|
|
6767
|
-
fs3.closeSync(fd);
|
|
6768
|
-
}
|
|
6769
|
-
}
|
|
6770
|
-
return ret;
|
|
6771
|
-
};
|
|
6772
|
-
}
|
|
6773
|
-
function patchLutimes(fs3) {
|
|
6774
|
-
if (constants.hasOwnProperty("O_SYMLINK") && fs3.futimes) {
|
|
6775
|
-
fs3.lutimes = function(path2, at, mt, cb) {
|
|
6776
|
-
fs3.open(path2, constants.O_SYMLINK, function(er, fd) {
|
|
6777
|
-
if (er) {
|
|
6778
|
-
if (cb) cb(er);
|
|
6779
|
-
return;
|
|
6780
|
-
}
|
|
6781
|
-
fs3.futimes(fd, at, mt, function(er2) {
|
|
6782
|
-
fs3.close(fd, function(er22) {
|
|
6783
|
-
if (cb) cb(er2 || er22);
|
|
6784
|
-
});
|
|
6785
|
-
});
|
|
6786
|
-
});
|
|
6787
|
-
};
|
|
6788
|
-
fs3.lutimesSync = function(path2, at, mt) {
|
|
6789
|
-
var fd = fs3.openSync(path2, constants.O_SYMLINK);
|
|
6790
|
-
var ret;
|
|
6791
|
-
var threw = true;
|
|
6792
|
-
try {
|
|
6793
|
-
ret = fs3.futimesSync(fd, at, mt);
|
|
6794
|
-
threw = false;
|
|
6795
|
-
} finally {
|
|
6796
|
-
if (threw) {
|
|
6797
|
-
try {
|
|
6798
|
-
fs3.closeSync(fd);
|
|
6799
|
-
} catch (er) {
|
|
6800
|
-
}
|
|
6801
|
-
} else {
|
|
6802
|
-
fs3.closeSync(fd);
|
|
6803
|
-
}
|
|
6804
|
-
}
|
|
6805
|
-
return ret;
|
|
6806
|
-
};
|
|
6807
|
-
} else if (fs3.futimes) {
|
|
6808
|
-
fs3.lutimes = function(_a, _b, _c, cb) {
|
|
6809
|
-
if (cb) process.nextTick(cb);
|
|
6810
|
-
};
|
|
6811
|
-
fs3.lutimesSync = function() {
|
|
6812
|
-
};
|
|
6813
|
-
}
|
|
6814
|
-
}
|
|
6815
|
-
function chmodFix(orig) {
|
|
6816
|
-
if (!orig) return orig;
|
|
6817
|
-
return function(target, mode, cb) {
|
|
6818
|
-
return orig.call(fs2, target, mode, function(er) {
|
|
6819
|
-
if (chownErOk(er)) er = null;
|
|
6820
|
-
if (cb) cb.apply(this, arguments);
|
|
6821
|
-
});
|
|
6822
|
-
};
|
|
6823
|
-
}
|
|
6824
|
-
function chmodFixSync(orig) {
|
|
6825
|
-
if (!orig) return orig;
|
|
6826
|
-
return function(target, mode) {
|
|
6827
|
-
try {
|
|
6828
|
-
return orig.call(fs2, target, mode);
|
|
6829
|
-
} catch (er) {
|
|
6830
|
-
if (!chownErOk(er)) throw er;
|
|
6831
|
-
}
|
|
6832
|
-
};
|
|
6833
|
-
}
|
|
6834
|
-
function chownFix(orig) {
|
|
6835
|
-
if (!orig) return orig;
|
|
6836
|
-
return function(target, uid, gid, cb) {
|
|
6837
|
-
return orig.call(fs2, target, uid, gid, function(er) {
|
|
6838
|
-
if (chownErOk(er)) er = null;
|
|
6839
|
-
if (cb) cb.apply(this, arguments);
|
|
6840
|
-
});
|
|
6841
|
-
};
|
|
6842
|
-
}
|
|
6843
|
-
function chownFixSync(orig) {
|
|
6844
|
-
if (!orig) return orig;
|
|
6845
|
-
return function(target, uid, gid) {
|
|
6846
|
-
try {
|
|
6847
|
-
return orig.call(fs2, target, uid, gid);
|
|
6848
|
-
} catch (er) {
|
|
6849
|
-
if (!chownErOk(er)) throw er;
|
|
6850
|
-
}
|
|
6851
|
-
};
|
|
6852
|
-
}
|
|
6853
|
-
function statFix(orig) {
|
|
6854
|
-
if (!orig) return orig;
|
|
6855
|
-
return function(target, options, cb) {
|
|
6856
|
-
if (typeof options === "function") {
|
|
6857
|
-
cb = options;
|
|
6858
|
-
options = null;
|
|
6859
|
-
}
|
|
6860
|
-
function callback(er, stats) {
|
|
6861
|
-
if (stats) {
|
|
6862
|
-
if (stats.uid < 0) stats.uid += 4294967296;
|
|
6863
|
-
if (stats.gid < 0) stats.gid += 4294967296;
|
|
6864
|
-
}
|
|
6865
|
-
if (cb) cb.apply(this, arguments);
|
|
6866
|
-
}
|
|
6867
|
-
return options ? orig.call(fs2, target, options, callback) : orig.call(fs2, target, callback);
|
|
6868
|
-
};
|
|
6869
|
-
}
|
|
6870
|
-
function statFixSync(orig) {
|
|
6871
|
-
if (!orig) return orig;
|
|
6872
|
-
return function(target, options) {
|
|
6873
|
-
var stats = options ? orig.call(fs2, target, options) : orig.call(fs2, target);
|
|
6874
|
-
if (stats) {
|
|
6875
|
-
if (stats.uid < 0) stats.uid += 4294967296;
|
|
6876
|
-
if (stats.gid < 0) stats.gid += 4294967296;
|
|
6877
|
-
}
|
|
6878
|
-
return stats;
|
|
6879
|
-
};
|
|
6880
|
-
}
|
|
6881
|
-
function chownErOk(er) {
|
|
6882
|
-
if (!er)
|
|
6883
|
-
return true;
|
|
6884
|
-
if (er.code === "ENOSYS")
|
|
6885
|
-
return true;
|
|
6886
|
-
var nonroot = !process.getuid || process.getuid() !== 0;
|
|
6887
|
-
if (nonroot) {
|
|
6888
|
-
if (er.code === "EINVAL" || er.code === "EPERM")
|
|
6889
|
-
return true;
|
|
6890
|
-
}
|
|
6891
|
-
return false;
|
|
6892
|
-
}
|
|
6893
|
-
}
|
|
6894
|
-
}
|
|
6895
|
-
});
|
|
6896
|
-
var require_legacy_streams = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
6897
|
-
"../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/legacy-streams.js"(exports, module2) {
|
|
6898
|
-
"use strict";
|
|
6899
|
-
var Stream3 = (0, import_chunk_QGM4M3NI.__require)("stream").Stream;
|
|
6900
|
-
module2.exports = legacy;
|
|
6901
|
-
function legacy(fs2) {
|
|
6902
|
-
return {
|
|
6903
|
-
ReadStream,
|
|
6904
|
-
WriteStream
|
|
6905
|
-
};
|
|
6906
|
-
function ReadStream(path2, options) {
|
|
6907
|
-
if (!(this instanceof ReadStream)) return new ReadStream(path2, options);
|
|
6908
|
-
Stream3.call(this);
|
|
6909
|
-
var self = this;
|
|
6910
|
-
this.path = path2;
|
|
6911
|
-
this.fd = null;
|
|
6912
|
-
this.readable = true;
|
|
6913
|
-
this.paused = false;
|
|
6914
|
-
this.flags = "r";
|
|
6915
|
-
this.mode = 438;
|
|
6916
|
-
this.bufferSize = 64 * 1024;
|
|
6917
|
-
options = options || {};
|
|
6918
|
-
var keys = Object.keys(options);
|
|
6919
|
-
for (var index = 0, length = keys.length; index < length; index++) {
|
|
6920
|
-
var key = keys[index];
|
|
6921
|
-
this[key] = options[key];
|
|
6922
|
-
}
|
|
6923
|
-
if (this.encoding) this.setEncoding(this.encoding);
|
|
6924
|
-
if (this.start !== void 0) {
|
|
6925
|
-
if ("number" !== typeof this.start) {
|
|
6926
|
-
throw TypeError("start must be a Number");
|
|
6927
|
-
}
|
|
6928
|
-
if (this.end === void 0) {
|
|
6929
|
-
this.end = Infinity;
|
|
6930
|
-
} else if ("number" !== typeof this.end) {
|
|
6931
|
-
throw TypeError("end must be a Number");
|
|
6932
|
-
}
|
|
6933
|
-
if (this.start > this.end) {
|
|
6934
|
-
throw new Error("start must be <= end");
|
|
6935
|
-
}
|
|
6936
|
-
this.pos = this.start;
|
|
6937
|
-
}
|
|
6938
|
-
if (this.fd !== null) {
|
|
6939
|
-
process.nextTick(function() {
|
|
6940
|
-
self._read();
|
|
6941
|
-
});
|
|
6942
|
-
return;
|
|
6943
|
-
}
|
|
6944
|
-
fs2.open(this.path, this.flags, this.mode, function(err, fd) {
|
|
6945
|
-
if (err) {
|
|
6946
|
-
self.emit("error", err);
|
|
6947
|
-
self.readable = false;
|
|
6948
|
-
return;
|
|
6949
|
-
}
|
|
6950
|
-
self.fd = fd;
|
|
6951
|
-
self.emit("open", fd);
|
|
6952
|
-
self._read();
|
|
6953
|
-
});
|
|
6954
|
-
}
|
|
6955
|
-
function WriteStream(path2, options) {
|
|
6956
|
-
if (!(this instanceof WriteStream)) return new WriteStream(path2, options);
|
|
6957
|
-
Stream3.call(this);
|
|
6958
|
-
this.path = path2;
|
|
6959
|
-
this.fd = null;
|
|
6960
|
-
this.writable = true;
|
|
6961
|
-
this.flags = "w";
|
|
6962
|
-
this.encoding = "binary";
|
|
6963
|
-
this.mode = 438;
|
|
6964
|
-
this.bytesWritten = 0;
|
|
6965
|
-
options = options || {};
|
|
6966
|
-
var keys = Object.keys(options);
|
|
6967
|
-
for (var index = 0, length = keys.length; index < length; index++) {
|
|
6968
|
-
var key = keys[index];
|
|
6969
|
-
this[key] = options[key];
|
|
6970
|
-
}
|
|
6971
|
-
if (this.start !== void 0) {
|
|
6972
|
-
if ("number" !== typeof this.start) {
|
|
6973
|
-
throw TypeError("start must be a Number");
|
|
6974
|
-
}
|
|
6975
|
-
if (this.start < 0) {
|
|
6976
|
-
throw new Error("start must be >= zero");
|
|
6977
|
-
}
|
|
6978
|
-
this.pos = this.start;
|
|
6979
|
-
}
|
|
6980
|
-
this.busy = false;
|
|
6981
|
-
this._queue = [];
|
|
6982
|
-
if (this.fd === null) {
|
|
6983
|
-
this._open = fs2.open;
|
|
6984
|
-
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
|
|
6985
|
-
this.flush();
|
|
6986
|
-
}
|
|
6987
|
-
}
|
|
6988
|
-
}
|
|
6989
|
-
}
|
|
6990
|
-
});
|
|
6991
|
-
var require_clone = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
6992
|
-
"../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/clone.js"(exports, module2) {
|
|
6993
|
-
"use strict";
|
|
6994
|
-
module2.exports = clone2;
|
|
6995
|
-
var getPrototypeOf = Object.getPrototypeOf || function(obj) {
|
|
6996
|
-
return obj.__proto__;
|
|
6997
|
-
};
|
|
6998
|
-
function clone2(obj) {
|
|
6999
|
-
if (obj === null || typeof obj !== "object")
|
|
7000
|
-
return obj;
|
|
7001
|
-
if (obj instanceof Object)
|
|
7002
|
-
var copy = { __proto__: getPrototypeOf(obj) };
|
|
7003
|
-
else
|
|
7004
|
-
var copy = /* @__PURE__ */ Object.create(null);
|
|
7005
|
-
Object.getOwnPropertyNames(obj).forEach(function(key) {
|
|
7006
|
-
Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
|
|
7007
|
-
});
|
|
7008
|
-
return copy;
|
|
7009
|
-
}
|
|
7010
|
-
}
|
|
7011
|
-
});
|
|
7012
|
-
var require_graceful_fs = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
7013
|
-
"../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js"(exports, module2) {
|
|
7014
|
-
"use strict";
|
|
7015
|
-
var fs2 = (0, import_chunk_QGM4M3NI.__require)("fs");
|
|
7016
|
-
var polyfills = require_polyfills();
|
|
7017
|
-
var legacy = require_legacy_streams();
|
|
7018
|
-
var clone2 = require_clone();
|
|
7019
|
-
var util = (0, import_chunk_QGM4M3NI.__require)("util");
|
|
7020
|
-
var gracefulQueue;
|
|
7021
|
-
var previousSymbol;
|
|
7022
|
-
if (typeof Symbol === "function" && typeof Symbol.for === "function") {
|
|
7023
|
-
gracefulQueue = Symbol.for("graceful-fs.queue");
|
|
7024
|
-
previousSymbol = Symbol.for("graceful-fs.previous");
|
|
7025
|
-
} else {
|
|
7026
|
-
gracefulQueue = "___graceful-fs.queue";
|
|
7027
|
-
previousSymbol = "___graceful-fs.previous";
|
|
7028
|
-
}
|
|
7029
|
-
function noop() {
|
|
7030
|
-
}
|
|
7031
|
-
function publishQueue(context, queue2) {
|
|
7032
|
-
Object.defineProperty(context, gracefulQueue, {
|
|
7033
|
-
get: function() {
|
|
7034
|
-
return queue2;
|
|
7035
|
-
}
|
|
7036
|
-
});
|
|
7037
|
-
}
|
|
7038
|
-
var debug2 = noop;
|
|
7039
|
-
if (util.debuglog)
|
|
7040
|
-
debug2 = util.debuglog("gfs4");
|
|
7041
|
-
else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
|
|
7042
|
-
debug2 = function() {
|
|
7043
|
-
var m = util.format.apply(util, arguments);
|
|
7044
|
-
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
7045
|
-
console.error(m);
|
|
7046
|
-
};
|
|
7047
|
-
if (!fs2[gracefulQueue]) {
|
|
7048
|
-
queue = global[gracefulQueue] || [];
|
|
7049
|
-
publishQueue(fs2, queue);
|
|
7050
|
-
fs2.close = function(fs$close) {
|
|
7051
|
-
function close(fd, cb) {
|
|
7052
|
-
return fs$close.call(fs2, fd, function(err) {
|
|
7053
|
-
if (!err) {
|
|
7054
|
-
resetQueue();
|
|
7055
|
-
}
|
|
7056
|
-
if (typeof cb === "function")
|
|
7057
|
-
cb.apply(this, arguments);
|
|
7058
|
-
});
|
|
7059
|
-
}
|
|
7060
|
-
Object.defineProperty(close, previousSymbol, {
|
|
7061
|
-
value: fs$close
|
|
7062
|
-
});
|
|
7063
|
-
return close;
|
|
7064
|
-
}(fs2.close);
|
|
7065
|
-
fs2.closeSync = function(fs$closeSync) {
|
|
7066
|
-
function closeSync(fd) {
|
|
7067
|
-
fs$closeSync.apply(fs2, arguments);
|
|
7068
|
-
resetQueue();
|
|
7069
|
-
}
|
|
7070
|
-
Object.defineProperty(closeSync, previousSymbol, {
|
|
7071
|
-
value: fs$closeSync
|
|
7072
|
-
});
|
|
7073
|
-
return closeSync;
|
|
7074
|
-
}(fs2.closeSync);
|
|
7075
|
-
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
7076
|
-
process.on("exit", function() {
|
|
7077
|
-
debug2(fs2[gracefulQueue]);
|
|
7078
|
-
(0, import_chunk_QGM4M3NI.__require)("assert").equal(fs2[gracefulQueue].length, 0);
|
|
7079
|
-
});
|
|
7080
|
-
}
|
|
7081
|
-
}
|
|
7082
|
-
var queue;
|
|
7083
|
-
if (!global[gracefulQueue]) {
|
|
7084
|
-
publishQueue(global, fs2[gracefulQueue]);
|
|
7085
|
-
}
|
|
7086
|
-
module2.exports = patch(clone2(fs2));
|
|
7087
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs2.__patched) {
|
|
7088
|
-
module2.exports = patch(fs2);
|
|
7089
|
-
fs2.__patched = true;
|
|
7090
|
-
}
|
|
7091
|
-
function patch(fs3) {
|
|
7092
|
-
polyfills(fs3);
|
|
7093
|
-
fs3.gracefulify = patch;
|
|
7094
|
-
fs3.createReadStream = createReadStream;
|
|
7095
|
-
fs3.createWriteStream = createWriteStream;
|
|
7096
|
-
var fs$readFile = fs3.readFile;
|
|
7097
|
-
fs3.readFile = readFile;
|
|
7098
|
-
function readFile(path2, options, cb) {
|
|
7099
|
-
if (typeof options === "function")
|
|
7100
|
-
cb = options, options = null;
|
|
7101
|
-
return go$readFile(path2, options, cb);
|
|
7102
|
-
function go$readFile(path3, options2, cb2, startTime) {
|
|
7103
|
-
return fs$readFile(path3, options2, function(err) {
|
|
7104
|
-
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
7105
|
-
enqueue([go$readFile, [path3, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
7106
|
-
else {
|
|
7107
|
-
if (typeof cb2 === "function")
|
|
7108
|
-
cb2.apply(this, arguments);
|
|
7109
|
-
}
|
|
7110
|
-
});
|
|
7111
|
-
}
|
|
7112
|
-
}
|
|
7113
|
-
var fs$writeFile = fs3.writeFile;
|
|
7114
|
-
fs3.writeFile = writeFile;
|
|
7115
|
-
function writeFile(path2, data, options, cb) {
|
|
7116
|
-
if (typeof options === "function")
|
|
7117
|
-
cb = options, options = null;
|
|
7118
|
-
return go$writeFile(path2, data, options, cb);
|
|
7119
|
-
function go$writeFile(path3, data2, options2, cb2, startTime) {
|
|
7120
|
-
return fs$writeFile(path3, data2, options2, function(err) {
|
|
7121
|
-
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
7122
|
-
enqueue([go$writeFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
7123
|
-
else {
|
|
7124
|
-
if (typeof cb2 === "function")
|
|
7125
|
-
cb2.apply(this, arguments);
|
|
7126
|
-
}
|
|
7127
|
-
});
|
|
7128
|
-
}
|
|
7129
|
-
}
|
|
7130
|
-
var fs$appendFile = fs3.appendFile;
|
|
7131
|
-
if (fs$appendFile)
|
|
7132
|
-
fs3.appendFile = appendFile;
|
|
7133
|
-
function appendFile(path2, data, options, cb) {
|
|
7134
|
-
if (typeof options === "function")
|
|
7135
|
-
cb = options, options = null;
|
|
7136
|
-
return go$appendFile(path2, data, options, cb);
|
|
7137
|
-
function go$appendFile(path3, data2, options2, cb2, startTime) {
|
|
7138
|
-
return fs$appendFile(path3, data2, options2, function(err) {
|
|
7139
|
-
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
7140
|
-
enqueue([go$appendFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
7141
|
-
else {
|
|
7142
|
-
if (typeof cb2 === "function")
|
|
7143
|
-
cb2.apply(this, arguments);
|
|
7144
|
-
}
|
|
7145
|
-
});
|
|
7146
|
-
}
|
|
7147
|
-
}
|
|
7148
|
-
var fs$copyFile = fs3.copyFile;
|
|
7149
|
-
if (fs$copyFile)
|
|
7150
|
-
fs3.copyFile = copyFile;
|
|
7151
|
-
function copyFile(src, dest, flags, cb) {
|
|
7152
|
-
if (typeof flags === "function") {
|
|
7153
|
-
cb = flags;
|
|
7154
|
-
flags = 0;
|
|
7155
|
-
}
|
|
7156
|
-
return go$copyFile(src, dest, flags, cb);
|
|
7157
|
-
function go$copyFile(src2, dest2, flags2, cb2, startTime) {
|
|
7158
|
-
return fs$copyFile(src2, dest2, flags2, function(err) {
|
|
7159
|
-
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
7160
|
-
enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
7161
|
-
else {
|
|
7162
|
-
if (typeof cb2 === "function")
|
|
7163
|
-
cb2.apply(this, arguments);
|
|
7164
|
-
}
|
|
7165
|
-
});
|
|
7166
|
-
}
|
|
7167
|
-
}
|
|
7168
|
-
var fs$readdir = fs3.readdir;
|
|
7169
|
-
fs3.readdir = readdir;
|
|
7170
|
-
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
7171
|
-
function readdir(path2, options, cb) {
|
|
7172
|
-
if (typeof options === "function")
|
|
7173
|
-
cb = options, options = null;
|
|
7174
|
-
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path3, options2, cb2, startTime) {
|
|
7175
|
-
return fs$readdir(path3, fs$readdirCallback(
|
|
7176
|
-
path3,
|
|
7177
|
-
options2,
|
|
7178
|
-
cb2,
|
|
7179
|
-
startTime
|
|
7180
|
-
));
|
|
7181
|
-
} : function go$readdir2(path3, options2, cb2, startTime) {
|
|
7182
|
-
return fs$readdir(path3, options2, fs$readdirCallback(
|
|
7183
|
-
path3,
|
|
7184
|
-
options2,
|
|
7185
|
-
cb2,
|
|
7186
|
-
startTime
|
|
7187
|
-
));
|
|
7188
|
-
};
|
|
7189
|
-
return go$readdir(path2, options, cb);
|
|
7190
|
-
function fs$readdirCallback(path3, options2, cb2, startTime) {
|
|
7191
|
-
return function(err, files) {
|
|
7192
|
-
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
7193
|
-
enqueue([
|
|
7194
|
-
go$readdir,
|
|
7195
|
-
[path3, options2, cb2],
|
|
7196
|
-
err,
|
|
7197
|
-
startTime || Date.now(),
|
|
7198
|
-
Date.now()
|
|
7199
|
-
]);
|
|
7200
|
-
else {
|
|
7201
|
-
if (files && files.sort)
|
|
7202
|
-
files.sort();
|
|
7203
|
-
if (typeof cb2 === "function")
|
|
7204
|
-
cb2.call(this, err, files);
|
|
7205
|
-
}
|
|
7206
|
-
};
|
|
7207
|
-
}
|
|
7208
|
-
}
|
|
7209
|
-
if (process.version.substr(0, 4) === "v0.8") {
|
|
7210
|
-
var legStreams = legacy(fs3);
|
|
7211
|
-
ReadStream = legStreams.ReadStream;
|
|
7212
|
-
WriteStream = legStreams.WriteStream;
|
|
7213
|
-
}
|
|
7214
|
-
var fs$ReadStream = fs3.ReadStream;
|
|
7215
|
-
if (fs$ReadStream) {
|
|
7216
|
-
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
|
7217
|
-
ReadStream.prototype.open = ReadStream$open;
|
|
7218
|
-
}
|
|
7219
|
-
var fs$WriteStream = fs3.WriteStream;
|
|
7220
|
-
if (fs$WriteStream) {
|
|
7221
|
-
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
|
7222
|
-
WriteStream.prototype.open = WriteStream$open;
|
|
7223
|
-
}
|
|
7224
|
-
Object.defineProperty(fs3, "ReadStream", {
|
|
7225
|
-
get: function() {
|
|
7226
|
-
return ReadStream;
|
|
7227
|
-
},
|
|
7228
|
-
set: function(val) {
|
|
7229
|
-
ReadStream = val;
|
|
7230
|
-
},
|
|
7231
|
-
enumerable: true,
|
|
7232
|
-
configurable: true
|
|
7233
|
-
});
|
|
7234
|
-
Object.defineProperty(fs3, "WriteStream", {
|
|
7235
|
-
get: function() {
|
|
7236
|
-
return WriteStream;
|
|
7237
|
-
},
|
|
7238
|
-
set: function(val) {
|
|
7239
|
-
WriteStream = val;
|
|
7240
|
-
},
|
|
7241
|
-
enumerable: true,
|
|
7242
|
-
configurable: true
|
|
7243
|
-
});
|
|
7244
|
-
var FileReadStream = ReadStream;
|
|
7245
|
-
Object.defineProperty(fs3, "FileReadStream", {
|
|
7246
|
-
get: function() {
|
|
7247
|
-
return FileReadStream;
|
|
7248
|
-
},
|
|
7249
|
-
set: function(val) {
|
|
7250
|
-
FileReadStream = val;
|
|
7251
|
-
},
|
|
7252
|
-
enumerable: true,
|
|
7253
|
-
configurable: true
|
|
7254
|
-
});
|
|
7255
|
-
var FileWriteStream = WriteStream;
|
|
7256
|
-
Object.defineProperty(fs3, "FileWriteStream", {
|
|
7257
|
-
get: function() {
|
|
7258
|
-
return FileWriteStream;
|
|
7259
|
-
},
|
|
7260
|
-
set: function(val) {
|
|
7261
|
-
FileWriteStream = val;
|
|
7262
|
-
},
|
|
7263
|
-
enumerable: true,
|
|
7264
|
-
configurable: true
|
|
7265
|
-
});
|
|
7266
|
-
function ReadStream(path2, options) {
|
|
7267
|
-
if (this instanceof ReadStream)
|
|
7268
|
-
return fs$ReadStream.apply(this, arguments), this;
|
|
7269
|
-
else
|
|
7270
|
-
return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
|
|
7271
|
-
}
|
|
7272
|
-
function ReadStream$open() {
|
|
7273
|
-
var that = this;
|
|
7274
|
-
open(that.path, that.flags, that.mode, function(err, fd) {
|
|
7275
|
-
if (err) {
|
|
7276
|
-
if (that.autoClose)
|
|
7277
|
-
that.destroy();
|
|
7278
|
-
that.emit("error", err);
|
|
7279
|
-
} else {
|
|
7280
|
-
that.fd = fd;
|
|
7281
|
-
that.emit("open", fd);
|
|
7282
|
-
that.read();
|
|
7283
|
-
}
|
|
7284
|
-
});
|
|
7285
|
-
}
|
|
7286
|
-
function WriteStream(path2, options) {
|
|
7287
|
-
if (this instanceof WriteStream)
|
|
7288
|
-
return fs$WriteStream.apply(this, arguments), this;
|
|
7289
|
-
else
|
|
7290
|
-
return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
|
|
7291
|
-
}
|
|
7292
|
-
function WriteStream$open() {
|
|
7293
|
-
var that = this;
|
|
7294
|
-
open(that.path, that.flags, that.mode, function(err, fd) {
|
|
7295
|
-
if (err) {
|
|
7296
|
-
that.destroy();
|
|
7297
|
-
that.emit("error", err);
|
|
7298
|
-
} else {
|
|
7299
|
-
that.fd = fd;
|
|
7300
|
-
that.emit("open", fd);
|
|
7301
|
-
}
|
|
7302
|
-
});
|
|
7303
|
-
}
|
|
7304
|
-
function createReadStream(path2, options) {
|
|
7305
|
-
return new fs3.ReadStream(path2, options);
|
|
7306
|
-
}
|
|
7307
|
-
function createWriteStream(path2, options) {
|
|
7308
|
-
return new fs3.WriteStream(path2, options);
|
|
7309
|
-
}
|
|
7310
|
-
var fs$open = fs3.open;
|
|
7311
|
-
fs3.open = open;
|
|
7312
|
-
function open(path2, flags, mode, cb) {
|
|
7313
|
-
if (typeof mode === "function")
|
|
7314
|
-
cb = mode, mode = null;
|
|
7315
|
-
return go$open(path2, flags, mode, cb);
|
|
7316
|
-
function go$open(path3, flags2, mode2, cb2, startTime) {
|
|
7317
|
-
return fs$open(path3, flags2, mode2, function(err, fd) {
|
|
7318
|
-
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
7319
|
-
enqueue([go$open, [path3, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
7320
|
-
else {
|
|
7321
|
-
if (typeof cb2 === "function")
|
|
7322
|
-
cb2.apply(this, arguments);
|
|
7323
|
-
}
|
|
7324
|
-
});
|
|
7325
|
-
}
|
|
7326
|
-
}
|
|
7327
|
-
return fs3;
|
|
7328
|
-
}
|
|
7329
|
-
function enqueue(elem) {
|
|
7330
|
-
debug2("ENQUEUE", elem[0].name, elem[1]);
|
|
7331
|
-
fs2[gracefulQueue].push(elem);
|
|
7332
|
-
retry2();
|
|
7333
|
-
}
|
|
7334
|
-
var retryTimer;
|
|
7335
|
-
function resetQueue() {
|
|
7336
|
-
var now = Date.now();
|
|
7337
|
-
for (var i = 0; i < fs2[gracefulQueue].length; ++i) {
|
|
7338
|
-
if (fs2[gracefulQueue][i].length > 2) {
|
|
7339
|
-
fs2[gracefulQueue][i][3] = now;
|
|
7340
|
-
fs2[gracefulQueue][i][4] = now;
|
|
7341
|
-
}
|
|
7342
|
-
}
|
|
7343
|
-
retry2();
|
|
7344
|
-
}
|
|
7345
|
-
function retry2() {
|
|
7346
|
-
clearTimeout(retryTimer);
|
|
7347
|
-
retryTimer = void 0;
|
|
7348
|
-
if (fs2[gracefulQueue].length === 0)
|
|
7349
|
-
return;
|
|
7350
|
-
var elem = fs2[gracefulQueue].shift();
|
|
7351
|
-
var fn = elem[0];
|
|
7352
|
-
var args = elem[1];
|
|
7353
|
-
var err = elem[2];
|
|
7354
|
-
var startTime = elem[3];
|
|
7355
|
-
var lastTime = elem[4];
|
|
7356
|
-
if (startTime === void 0) {
|
|
7357
|
-
debug2("RETRY", fn.name, args);
|
|
7358
|
-
fn.apply(null, args);
|
|
7359
|
-
} else if (Date.now() - startTime >= 6e4) {
|
|
7360
|
-
debug2("TIMEOUT", fn.name, args);
|
|
7361
|
-
var cb = args.pop();
|
|
7362
|
-
if (typeof cb === "function")
|
|
7363
|
-
cb.call(null, err);
|
|
7364
|
-
} else {
|
|
7365
|
-
var sinceAttempt = Date.now() - lastTime;
|
|
7366
|
-
var sinceStart = Math.max(lastTime - startTime, 1);
|
|
7367
|
-
var desiredDelay = Math.min(sinceStart * 1.2, 100);
|
|
7368
|
-
if (sinceAttempt >= desiredDelay) {
|
|
7369
|
-
debug2("RETRY", fn.name, args);
|
|
7370
|
-
fn.apply(null, args.concat([startTime]));
|
|
7371
|
-
} else {
|
|
7372
|
-
fs2[gracefulQueue].push(elem);
|
|
7373
|
-
}
|
|
7374
|
-
}
|
|
7375
|
-
if (retryTimer === void 0) {
|
|
7376
|
-
retryTimer = setTimeout(retry2, 0);
|
|
7377
|
-
}
|
|
7378
|
-
}
|
|
7379
|
-
}
|
|
7380
|
-
});
|
|
7381
6644
|
var require_is_path_cwd = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
7382
6645
|
"../../node_modules/.pnpm/is-path-cwd@2.2.0/node_modules/is-path-cwd/index.js"(exports, module2) {
|
|
7383
6646
|
"use strict";
|
|
@@ -7736,7 +6999,7 @@ var require_balanced_match = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
7736
6999
|
}
|
|
7737
7000
|
});
|
|
7738
7001
|
var require_brace_expansion = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
7739
|
-
"../../node_modules/.pnpm/brace-expansion@1.1.
|
|
7002
|
+
"../../node_modules/.pnpm/brace-expansion@1.1.12/node_modules/brace-expansion/index.js"(exports, module2) {
|
|
7740
7003
|
"use strict";
|
|
7741
7004
|
var concatMap = require_concat_map();
|
|
7742
7005
|
var balanced = require_balanced_match();
|
|
@@ -7804,7 +7067,7 @@ var require_brace_expansion = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
7804
7067
|
var isSequence = isNumericSequence || isAlphaSequence;
|
|
7805
7068
|
var isOptions = m.body.indexOf(",") >= 0;
|
|
7806
7069
|
if (!isSequence && !isOptions) {
|
|
7807
|
-
if (m.post.match(
|
|
7070
|
+
if (m.post.match(/,(?!,).*\}/)) {
|
|
7808
7071
|
str = m.pre + "{" + m.body + escClose + m.post;
|
|
7809
7072
|
return expand(str);
|
|
7810
7073
|
}
|
|
@@ -10018,7 +9281,7 @@ var require_del = (0, import_chunk_QGM4M3NI.__commonJS)({
|
|
|
10018
9281
|
var globby = require_globby();
|
|
10019
9282
|
var isGlob = require_is_glob();
|
|
10020
9283
|
var slash = require_slash();
|
|
10021
|
-
var gracefulFs = require_graceful_fs();
|
|
9284
|
+
var gracefulFs = (0, import_chunk_VGMB4WXF.require_graceful_fs)();
|
|
10022
9285
|
var isPathCwd = require_is_path_cwd();
|
|
10023
9286
|
var isPathInside = require_is_path_inside();
|
|
10024
9287
|
var rimraf2 = require_rimraf();
|
|
@@ -10286,8 +9549,8 @@ var Body = class {
|
|
|
10286
9549
|
} else if (ArrayBuffer.isView(body)) {
|
|
10287
9550
|
body = import_node_buffer2.Buffer.from(body.buffer, body.byteOffset, body.byteLength);
|
|
10288
9551
|
} else if (body instanceof import_node_stream2.default) {
|
|
10289
|
-
} else if (body instanceof
|
|
10290
|
-
body = (0,
|
|
9552
|
+
} else if (body instanceof import_chunk_BYDIRBHB.FormData) {
|
|
9553
|
+
body = (0, import_chunk_BYDIRBHB.formDataToBlob)(body);
|
|
10291
9554
|
boundary = body.type.split("=")[1];
|
|
10292
9555
|
} else {
|
|
10293
9556
|
body = import_node_buffer2.Buffer.from(String(body));
|
|
@@ -10331,14 +9594,14 @@ var Body = class {
|
|
|
10331
9594
|
async formData() {
|
|
10332
9595
|
const ct = this.headers.get("content-type");
|
|
10333
9596
|
if (ct.startsWith("application/x-www-form-urlencoded")) {
|
|
10334
|
-
const formData = new
|
|
9597
|
+
const formData = new import_chunk_BYDIRBHB.FormData();
|
|
10335
9598
|
const parameters = new URLSearchParams(await this.text());
|
|
10336
9599
|
for (const [name, value] of parameters) {
|
|
10337
9600
|
formData.append(name, value);
|
|
10338
9601
|
}
|
|
10339
9602
|
return formData;
|
|
10340
9603
|
}
|
|
10341
|
-
const { toFormData } = await import("./multipart-parser-
|
|
9604
|
+
const { toFormData } = await import("./multipart-parser-AOASR4DL.js");
|
|
10342
9605
|
return toFormData(this.body, ct);
|
|
10343
9606
|
}
|
|
10344
9607
|
/**
|
|
@@ -10349,7 +9612,7 @@ var Body = class {
|
|
|
10349
9612
|
async blob() {
|
|
10350
9613
|
const ct = this.headers && this.headers.get("content-type") || this[INTERNALS].body && this[INTERNALS].body.type || "";
|
|
10351
9614
|
const buf = await this.arrayBuffer();
|
|
10352
|
-
return new
|
|
9615
|
+
return new import_chunk_BYDIRBHB.fetch_blob_default([buf], {
|
|
10353
9616
|
type: ct
|
|
10354
9617
|
});
|
|
10355
9618
|
}
|
|
@@ -10477,7 +9740,7 @@ var extractContentType = (body, request) => {
|
|
|
10477
9740
|
if (import_node_buffer2.Buffer.isBuffer(body) || import_node_util.types.isAnyArrayBuffer(body) || ArrayBuffer.isView(body)) {
|
|
10478
9741
|
return null;
|
|
10479
9742
|
}
|
|
10480
|
-
if (body instanceof
|
|
9743
|
+
if (body instanceof import_chunk_BYDIRBHB.FormData) {
|
|
10481
9744
|
return `multipart/form-data; boundary=${request[INTERNALS].boundary}`;
|
|
10482
9745
|
}
|
|
10483
9746
|
if (body && typeof body.getBoundary === "function") {
|
|
@@ -11424,7 +10687,7 @@ async function fetchChecksum(url) {
|
|
|
11424
10687
|
try {
|
|
11425
10688
|
const checksumUrl = `${url}.sha256`;
|
|
11426
10689
|
const response = await fetch(checksumUrl, {
|
|
11427
|
-
agent: (0,
|
|
10690
|
+
agent: (0, import_chunk_CNO6T77T.getProxyAgent)(url)
|
|
11428
10691
|
});
|
|
11429
10692
|
if (!response.ok) {
|
|
11430
10693
|
let errorMessage = `Failed to fetch sha256 checksum at ${checksumUrl} - ${response.status} ${response.statusText}`;
|
|
@@ -11470,7 +10733,7 @@ async function downloadZip(url, target, progressCb) {
|
|
|
11470
10733
|
async () => {
|
|
11471
10734
|
const response = await fetch(url, {
|
|
11472
10735
|
compress: false,
|
|
11473
|
-
agent: (0,
|
|
10736
|
+
agent: (0, import_chunk_CNO6T77T.getProxyAgent)(url)
|
|
11474
10737
|
});
|
|
11475
10738
|
if (!response.ok) {
|
|
11476
10739
|
throw new Error(`Failed to fetch the engine file at ${url} - ${response.status} ${response.statusText}`);
|
|
@@ -11517,7 +10780,7 @@ async function downloadZip(url, target, progressCb) {
|
|
|
11517
10780
|
onFailedAttempt: (err) => debug("An error occurred while downloading the engine file", err)
|
|
11518
10781
|
}
|
|
11519
10782
|
);
|
|
11520
|
-
await (0,
|
|
10783
|
+
await (0, import_chunk_VGMB4WXF.overwriteFile)(partial, target);
|
|
11521
10784
|
try {
|
|
11522
10785
|
await rimraf(partial);
|
|
11523
10786
|
await rimraf(tmpDir);
|