@prisma/fetch-engine 6.5.0-dev.8 → 6.5.0-dev.81
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/{chunk-6ACSEAQE.js → chunk-5EMIKDK5.js} +155 -101
- package/dist/{chunk-G7EM4XDM.js → chunk-HACCWU3B.js} +423 -1304
- package/dist/{chunk-FKKOTNO6.js → chunk-I3P4GT6A.js} +5 -5
- package/dist/{chunk-S2NYJIEH.js → chunk-JULCS4UJ.js} +154 -100
- package/dist/{chunk-7NQURTUG.js → chunk-ORVVLJ4G.js} +781 -9
- package/dist/{chunk-AGZFDFHU.js → chunk-ZSBPBV34.js} +45 -31
- package/dist/cleanupCache.js +3 -3
- package/dist/download.js +11 -11
- package/dist/downloadZip.js +4 -4
- package/dist/getProxyAgent.js +2 -2
- package/dist/index.js +14 -14
- package/dist/utils.js +5 -5
- package/package.json +8 -8
@@ -26,17 +26,17 @@ 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_ORVVLJ4G_exports = {};
|
30
|
+
__export(chunk_ORVVLJ4G_exports, {
|
31
31
|
downloadZip: () => downloadZip,
|
32
32
|
require_is_stream: () => require_is_stream,
|
33
33
|
require_temp_dir: () => require_temp_dir
|
34
34
|
});
|
35
|
-
module.exports = __toCommonJS(
|
35
|
+
module.exports = __toCommonJS(chunk_ORVVLJ4G_exports);
|
36
36
|
var import_chunk_TIRVZJHP = require("./chunk-TIRVZJHP.js");
|
37
37
|
var import_chunk_ZAFWMCVK = require("./chunk-ZAFWMCVK.js");
|
38
|
-
var
|
39
|
-
var
|
38
|
+
var import_chunk_HACCWU3B = require("./chunk-HACCWU3B.js");
|
39
|
+
var import_chunk_ZSBPBV34 = require("./chunk-ZSBPBV34.js");
|
40
40
|
var import_chunk_AH6QHEOA = require("./chunk-AH6QHEOA.js");
|
41
41
|
var import_debug = __toESM(require("@prisma/debug"));
|
42
42
|
var import_fs = __toESM(require("fs"));
|
@@ -6608,6 +6608,778 @@ var require_globby = (0, import_chunk_AH6QHEOA.__commonJS)({
|
|
6608
6608
|
module2.exports.gitignore = gitignore;
|
6609
6609
|
}
|
6610
6610
|
});
|
6611
|
+
var require_polyfills = (0, import_chunk_AH6QHEOA.__commonJS)({
|
6612
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/polyfills.js"(exports, module2) {
|
6613
|
+
"use strict";
|
6614
|
+
var constants = (0, import_chunk_AH6QHEOA.__require)("constants");
|
6615
|
+
var origCwd = process.cwd;
|
6616
|
+
var cwd = null;
|
6617
|
+
var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
|
6618
|
+
process.cwd = function() {
|
6619
|
+
if (!cwd)
|
6620
|
+
cwd = origCwd.call(process);
|
6621
|
+
return cwd;
|
6622
|
+
};
|
6623
|
+
try {
|
6624
|
+
process.cwd();
|
6625
|
+
} catch (er) {
|
6626
|
+
}
|
6627
|
+
if (typeof process.chdir === "function") {
|
6628
|
+
chdir = process.chdir;
|
6629
|
+
process.chdir = function(d) {
|
6630
|
+
cwd = null;
|
6631
|
+
chdir.call(process, d);
|
6632
|
+
};
|
6633
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir);
|
6634
|
+
}
|
6635
|
+
var chdir;
|
6636
|
+
module2.exports = patch;
|
6637
|
+
function patch(fs2) {
|
6638
|
+
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
6639
|
+
patchLchmod(fs2);
|
6640
|
+
}
|
6641
|
+
if (!fs2.lutimes) {
|
6642
|
+
patchLutimes(fs2);
|
6643
|
+
}
|
6644
|
+
fs2.chown = chownFix(fs2.chown);
|
6645
|
+
fs2.fchown = chownFix(fs2.fchown);
|
6646
|
+
fs2.lchown = chownFix(fs2.lchown);
|
6647
|
+
fs2.chmod = chmodFix(fs2.chmod);
|
6648
|
+
fs2.fchmod = chmodFix(fs2.fchmod);
|
6649
|
+
fs2.lchmod = chmodFix(fs2.lchmod);
|
6650
|
+
fs2.chownSync = chownFixSync(fs2.chownSync);
|
6651
|
+
fs2.fchownSync = chownFixSync(fs2.fchownSync);
|
6652
|
+
fs2.lchownSync = chownFixSync(fs2.lchownSync);
|
6653
|
+
fs2.chmodSync = chmodFixSync(fs2.chmodSync);
|
6654
|
+
fs2.fchmodSync = chmodFixSync(fs2.fchmodSync);
|
6655
|
+
fs2.lchmodSync = chmodFixSync(fs2.lchmodSync);
|
6656
|
+
fs2.stat = statFix(fs2.stat);
|
6657
|
+
fs2.fstat = statFix(fs2.fstat);
|
6658
|
+
fs2.lstat = statFix(fs2.lstat);
|
6659
|
+
fs2.statSync = statFixSync(fs2.statSync);
|
6660
|
+
fs2.fstatSync = statFixSync(fs2.fstatSync);
|
6661
|
+
fs2.lstatSync = statFixSync(fs2.lstatSync);
|
6662
|
+
if (fs2.chmod && !fs2.lchmod) {
|
6663
|
+
fs2.lchmod = function(path2, mode, cb) {
|
6664
|
+
if (cb) process.nextTick(cb);
|
6665
|
+
};
|
6666
|
+
fs2.lchmodSync = function() {
|
6667
|
+
};
|
6668
|
+
}
|
6669
|
+
if (fs2.chown && !fs2.lchown) {
|
6670
|
+
fs2.lchown = function(path2, uid, gid, cb) {
|
6671
|
+
if (cb) process.nextTick(cb);
|
6672
|
+
};
|
6673
|
+
fs2.lchownSync = function() {
|
6674
|
+
};
|
6675
|
+
}
|
6676
|
+
if (platform === "win32") {
|
6677
|
+
fs2.rename = typeof fs2.rename !== "function" ? fs2.rename : function(fs$rename) {
|
6678
|
+
function rename(from, to, cb) {
|
6679
|
+
var start = Date.now();
|
6680
|
+
var backoff = 0;
|
6681
|
+
fs$rename(from, to, function CB(er) {
|
6682
|
+
if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) {
|
6683
|
+
setTimeout(function() {
|
6684
|
+
fs2.stat(to, function(stater, st) {
|
6685
|
+
if (stater && stater.code === "ENOENT")
|
6686
|
+
fs$rename(from, to, CB);
|
6687
|
+
else
|
6688
|
+
cb(er);
|
6689
|
+
});
|
6690
|
+
}, backoff);
|
6691
|
+
if (backoff < 100)
|
6692
|
+
backoff += 10;
|
6693
|
+
return;
|
6694
|
+
}
|
6695
|
+
if (cb) cb(er);
|
6696
|
+
});
|
6697
|
+
}
|
6698
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
|
6699
|
+
return rename;
|
6700
|
+
}(fs2.rename);
|
6701
|
+
}
|
6702
|
+
fs2.read = typeof fs2.read !== "function" ? fs2.read : function(fs$read) {
|
6703
|
+
function read(fd, buffer, offset, length, position, callback_) {
|
6704
|
+
var callback;
|
6705
|
+
if (callback_ && typeof callback_ === "function") {
|
6706
|
+
var eagCounter = 0;
|
6707
|
+
callback = function(er, _, __) {
|
6708
|
+
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
6709
|
+
eagCounter++;
|
6710
|
+
return fs$read.call(fs2, fd, buffer, offset, length, position, callback);
|
6711
|
+
}
|
6712
|
+
callback_.apply(this, arguments);
|
6713
|
+
};
|
6714
|
+
}
|
6715
|
+
return fs$read.call(fs2, fd, buffer, offset, length, position, callback);
|
6716
|
+
}
|
6717
|
+
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
6718
|
+
return read;
|
6719
|
+
}(fs2.read);
|
6720
|
+
fs2.readSync = typeof fs2.readSync !== "function" ? fs2.readSync : /* @__PURE__ */ function(fs$readSync) {
|
6721
|
+
return function(fd, buffer, offset, length, position) {
|
6722
|
+
var eagCounter = 0;
|
6723
|
+
while (true) {
|
6724
|
+
try {
|
6725
|
+
return fs$readSync.call(fs2, fd, buffer, offset, length, position);
|
6726
|
+
} catch (er) {
|
6727
|
+
if (er.code === "EAGAIN" && eagCounter < 10) {
|
6728
|
+
eagCounter++;
|
6729
|
+
continue;
|
6730
|
+
}
|
6731
|
+
throw er;
|
6732
|
+
}
|
6733
|
+
}
|
6734
|
+
};
|
6735
|
+
}(fs2.readSync);
|
6736
|
+
function patchLchmod(fs3) {
|
6737
|
+
fs3.lchmod = function(path2, mode, callback) {
|
6738
|
+
fs3.open(
|
6739
|
+
path2,
|
6740
|
+
constants.O_WRONLY | constants.O_SYMLINK,
|
6741
|
+
mode,
|
6742
|
+
function(err, fd) {
|
6743
|
+
if (err) {
|
6744
|
+
if (callback) callback(err);
|
6745
|
+
return;
|
6746
|
+
}
|
6747
|
+
fs3.fchmod(fd, mode, function(err2) {
|
6748
|
+
fs3.close(fd, function(err22) {
|
6749
|
+
if (callback) callback(err2 || err22);
|
6750
|
+
});
|
6751
|
+
});
|
6752
|
+
}
|
6753
|
+
);
|
6754
|
+
};
|
6755
|
+
fs3.lchmodSync = function(path2, mode) {
|
6756
|
+
var fd = fs3.openSync(path2, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
6757
|
+
var threw = true;
|
6758
|
+
var ret;
|
6759
|
+
try {
|
6760
|
+
ret = fs3.fchmodSync(fd, mode);
|
6761
|
+
threw = false;
|
6762
|
+
} finally {
|
6763
|
+
if (threw) {
|
6764
|
+
try {
|
6765
|
+
fs3.closeSync(fd);
|
6766
|
+
} catch (er) {
|
6767
|
+
}
|
6768
|
+
} else {
|
6769
|
+
fs3.closeSync(fd);
|
6770
|
+
}
|
6771
|
+
}
|
6772
|
+
return ret;
|
6773
|
+
};
|
6774
|
+
}
|
6775
|
+
function patchLutimes(fs3) {
|
6776
|
+
if (constants.hasOwnProperty("O_SYMLINK") && fs3.futimes) {
|
6777
|
+
fs3.lutimes = function(path2, at, mt, cb) {
|
6778
|
+
fs3.open(path2, constants.O_SYMLINK, function(er, fd) {
|
6779
|
+
if (er) {
|
6780
|
+
if (cb) cb(er);
|
6781
|
+
return;
|
6782
|
+
}
|
6783
|
+
fs3.futimes(fd, at, mt, function(er2) {
|
6784
|
+
fs3.close(fd, function(er22) {
|
6785
|
+
if (cb) cb(er2 || er22);
|
6786
|
+
});
|
6787
|
+
});
|
6788
|
+
});
|
6789
|
+
};
|
6790
|
+
fs3.lutimesSync = function(path2, at, mt) {
|
6791
|
+
var fd = fs3.openSync(path2, constants.O_SYMLINK);
|
6792
|
+
var ret;
|
6793
|
+
var threw = true;
|
6794
|
+
try {
|
6795
|
+
ret = fs3.futimesSync(fd, at, mt);
|
6796
|
+
threw = false;
|
6797
|
+
} finally {
|
6798
|
+
if (threw) {
|
6799
|
+
try {
|
6800
|
+
fs3.closeSync(fd);
|
6801
|
+
} catch (er) {
|
6802
|
+
}
|
6803
|
+
} else {
|
6804
|
+
fs3.closeSync(fd);
|
6805
|
+
}
|
6806
|
+
}
|
6807
|
+
return ret;
|
6808
|
+
};
|
6809
|
+
} else if (fs3.futimes) {
|
6810
|
+
fs3.lutimes = function(_a, _b, _c, cb) {
|
6811
|
+
if (cb) process.nextTick(cb);
|
6812
|
+
};
|
6813
|
+
fs3.lutimesSync = function() {
|
6814
|
+
};
|
6815
|
+
}
|
6816
|
+
}
|
6817
|
+
function chmodFix(orig) {
|
6818
|
+
if (!orig) return orig;
|
6819
|
+
return function(target, mode, cb) {
|
6820
|
+
return orig.call(fs2, target, mode, function(er) {
|
6821
|
+
if (chownErOk(er)) er = null;
|
6822
|
+
if (cb) cb.apply(this, arguments);
|
6823
|
+
});
|
6824
|
+
};
|
6825
|
+
}
|
6826
|
+
function chmodFixSync(orig) {
|
6827
|
+
if (!orig) return orig;
|
6828
|
+
return function(target, mode) {
|
6829
|
+
try {
|
6830
|
+
return orig.call(fs2, target, mode);
|
6831
|
+
} catch (er) {
|
6832
|
+
if (!chownErOk(er)) throw er;
|
6833
|
+
}
|
6834
|
+
};
|
6835
|
+
}
|
6836
|
+
function chownFix(orig) {
|
6837
|
+
if (!orig) return orig;
|
6838
|
+
return function(target, uid, gid, cb) {
|
6839
|
+
return orig.call(fs2, target, uid, gid, function(er) {
|
6840
|
+
if (chownErOk(er)) er = null;
|
6841
|
+
if (cb) cb.apply(this, arguments);
|
6842
|
+
});
|
6843
|
+
};
|
6844
|
+
}
|
6845
|
+
function chownFixSync(orig) {
|
6846
|
+
if (!orig) return orig;
|
6847
|
+
return function(target, uid, gid) {
|
6848
|
+
try {
|
6849
|
+
return orig.call(fs2, target, uid, gid);
|
6850
|
+
} catch (er) {
|
6851
|
+
if (!chownErOk(er)) throw er;
|
6852
|
+
}
|
6853
|
+
};
|
6854
|
+
}
|
6855
|
+
function statFix(orig) {
|
6856
|
+
if (!orig) return orig;
|
6857
|
+
return function(target, options, cb) {
|
6858
|
+
if (typeof options === "function") {
|
6859
|
+
cb = options;
|
6860
|
+
options = null;
|
6861
|
+
}
|
6862
|
+
function callback(er, stats) {
|
6863
|
+
if (stats) {
|
6864
|
+
if (stats.uid < 0) stats.uid += 4294967296;
|
6865
|
+
if (stats.gid < 0) stats.gid += 4294967296;
|
6866
|
+
}
|
6867
|
+
if (cb) cb.apply(this, arguments);
|
6868
|
+
}
|
6869
|
+
return options ? orig.call(fs2, target, options, callback) : orig.call(fs2, target, callback);
|
6870
|
+
};
|
6871
|
+
}
|
6872
|
+
function statFixSync(orig) {
|
6873
|
+
if (!orig) return orig;
|
6874
|
+
return function(target, options) {
|
6875
|
+
var stats = options ? orig.call(fs2, target, options) : orig.call(fs2, target);
|
6876
|
+
if (stats) {
|
6877
|
+
if (stats.uid < 0) stats.uid += 4294967296;
|
6878
|
+
if (stats.gid < 0) stats.gid += 4294967296;
|
6879
|
+
}
|
6880
|
+
return stats;
|
6881
|
+
};
|
6882
|
+
}
|
6883
|
+
function chownErOk(er) {
|
6884
|
+
if (!er)
|
6885
|
+
return true;
|
6886
|
+
if (er.code === "ENOSYS")
|
6887
|
+
return true;
|
6888
|
+
var nonroot = !process.getuid || process.getuid() !== 0;
|
6889
|
+
if (nonroot) {
|
6890
|
+
if (er.code === "EINVAL" || er.code === "EPERM")
|
6891
|
+
return true;
|
6892
|
+
}
|
6893
|
+
return false;
|
6894
|
+
}
|
6895
|
+
}
|
6896
|
+
}
|
6897
|
+
});
|
6898
|
+
var require_legacy_streams = (0, import_chunk_AH6QHEOA.__commonJS)({
|
6899
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/legacy-streams.js"(exports, module2) {
|
6900
|
+
"use strict";
|
6901
|
+
var Stream3 = (0, import_chunk_AH6QHEOA.__require)("stream").Stream;
|
6902
|
+
module2.exports = legacy;
|
6903
|
+
function legacy(fs2) {
|
6904
|
+
return {
|
6905
|
+
ReadStream,
|
6906
|
+
WriteStream
|
6907
|
+
};
|
6908
|
+
function ReadStream(path2, options) {
|
6909
|
+
if (!(this instanceof ReadStream)) return new ReadStream(path2, options);
|
6910
|
+
Stream3.call(this);
|
6911
|
+
var self = this;
|
6912
|
+
this.path = path2;
|
6913
|
+
this.fd = null;
|
6914
|
+
this.readable = true;
|
6915
|
+
this.paused = false;
|
6916
|
+
this.flags = "r";
|
6917
|
+
this.mode = 438;
|
6918
|
+
this.bufferSize = 64 * 1024;
|
6919
|
+
options = options || {};
|
6920
|
+
var keys = Object.keys(options);
|
6921
|
+
for (var index = 0, length = keys.length; index < length; index++) {
|
6922
|
+
var key = keys[index];
|
6923
|
+
this[key] = options[key];
|
6924
|
+
}
|
6925
|
+
if (this.encoding) this.setEncoding(this.encoding);
|
6926
|
+
if (this.start !== void 0) {
|
6927
|
+
if ("number" !== typeof this.start) {
|
6928
|
+
throw TypeError("start must be a Number");
|
6929
|
+
}
|
6930
|
+
if (this.end === void 0) {
|
6931
|
+
this.end = Infinity;
|
6932
|
+
} else if ("number" !== typeof this.end) {
|
6933
|
+
throw TypeError("end must be a Number");
|
6934
|
+
}
|
6935
|
+
if (this.start > this.end) {
|
6936
|
+
throw new Error("start must be <= end");
|
6937
|
+
}
|
6938
|
+
this.pos = this.start;
|
6939
|
+
}
|
6940
|
+
if (this.fd !== null) {
|
6941
|
+
process.nextTick(function() {
|
6942
|
+
self._read();
|
6943
|
+
});
|
6944
|
+
return;
|
6945
|
+
}
|
6946
|
+
fs2.open(this.path, this.flags, this.mode, function(err, fd) {
|
6947
|
+
if (err) {
|
6948
|
+
self.emit("error", err);
|
6949
|
+
self.readable = false;
|
6950
|
+
return;
|
6951
|
+
}
|
6952
|
+
self.fd = fd;
|
6953
|
+
self.emit("open", fd);
|
6954
|
+
self._read();
|
6955
|
+
});
|
6956
|
+
}
|
6957
|
+
function WriteStream(path2, options) {
|
6958
|
+
if (!(this instanceof WriteStream)) return new WriteStream(path2, options);
|
6959
|
+
Stream3.call(this);
|
6960
|
+
this.path = path2;
|
6961
|
+
this.fd = null;
|
6962
|
+
this.writable = true;
|
6963
|
+
this.flags = "w";
|
6964
|
+
this.encoding = "binary";
|
6965
|
+
this.mode = 438;
|
6966
|
+
this.bytesWritten = 0;
|
6967
|
+
options = options || {};
|
6968
|
+
var keys = Object.keys(options);
|
6969
|
+
for (var index = 0, length = keys.length; index < length; index++) {
|
6970
|
+
var key = keys[index];
|
6971
|
+
this[key] = options[key];
|
6972
|
+
}
|
6973
|
+
if (this.start !== void 0) {
|
6974
|
+
if ("number" !== typeof this.start) {
|
6975
|
+
throw TypeError("start must be a Number");
|
6976
|
+
}
|
6977
|
+
if (this.start < 0) {
|
6978
|
+
throw new Error("start must be >= zero");
|
6979
|
+
}
|
6980
|
+
this.pos = this.start;
|
6981
|
+
}
|
6982
|
+
this.busy = false;
|
6983
|
+
this._queue = [];
|
6984
|
+
if (this.fd === null) {
|
6985
|
+
this._open = fs2.open;
|
6986
|
+
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
|
6987
|
+
this.flush();
|
6988
|
+
}
|
6989
|
+
}
|
6990
|
+
}
|
6991
|
+
}
|
6992
|
+
});
|
6993
|
+
var require_clone = (0, import_chunk_AH6QHEOA.__commonJS)({
|
6994
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/clone.js"(exports, module2) {
|
6995
|
+
"use strict";
|
6996
|
+
module2.exports = clone2;
|
6997
|
+
var getPrototypeOf = Object.getPrototypeOf || function(obj) {
|
6998
|
+
return obj.__proto__;
|
6999
|
+
};
|
7000
|
+
function clone2(obj) {
|
7001
|
+
if (obj === null || typeof obj !== "object")
|
7002
|
+
return obj;
|
7003
|
+
if (obj instanceof Object)
|
7004
|
+
var copy = { __proto__: getPrototypeOf(obj) };
|
7005
|
+
else
|
7006
|
+
var copy = /* @__PURE__ */ Object.create(null);
|
7007
|
+
Object.getOwnPropertyNames(obj).forEach(function(key) {
|
7008
|
+
Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
|
7009
|
+
});
|
7010
|
+
return copy;
|
7011
|
+
}
|
7012
|
+
}
|
7013
|
+
});
|
7014
|
+
var require_graceful_fs = (0, import_chunk_AH6QHEOA.__commonJS)({
|
7015
|
+
"../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js"(exports, module2) {
|
7016
|
+
"use strict";
|
7017
|
+
var fs2 = (0, import_chunk_AH6QHEOA.__require)("fs");
|
7018
|
+
var polyfills = require_polyfills();
|
7019
|
+
var legacy = require_legacy_streams();
|
7020
|
+
var clone2 = require_clone();
|
7021
|
+
var util = (0, import_chunk_AH6QHEOA.__require)("util");
|
7022
|
+
var gracefulQueue;
|
7023
|
+
var previousSymbol;
|
7024
|
+
if (typeof Symbol === "function" && typeof Symbol.for === "function") {
|
7025
|
+
gracefulQueue = Symbol.for("graceful-fs.queue");
|
7026
|
+
previousSymbol = Symbol.for("graceful-fs.previous");
|
7027
|
+
} else {
|
7028
|
+
gracefulQueue = "___graceful-fs.queue";
|
7029
|
+
previousSymbol = "___graceful-fs.previous";
|
7030
|
+
}
|
7031
|
+
function noop() {
|
7032
|
+
}
|
7033
|
+
function publishQueue(context, queue2) {
|
7034
|
+
Object.defineProperty(context, gracefulQueue, {
|
7035
|
+
get: function() {
|
7036
|
+
return queue2;
|
7037
|
+
}
|
7038
|
+
});
|
7039
|
+
}
|
7040
|
+
var debug2 = noop;
|
7041
|
+
if (util.debuglog)
|
7042
|
+
debug2 = util.debuglog("gfs4");
|
7043
|
+
else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
|
7044
|
+
debug2 = function() {
|
7045
|
+
var m = util.format.apply(util, arguments);
|
7046
|
+
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
7047
|
+
console.error(m);
|
7048
|
+
};
|
7049
|
+
if (!fs2[gracefulQueue]) {
|
7050
|
+
queue = global[gracefulQueue] || [];
|
7051
|
+
publishQueue(fs2, queue);
|
7052
|
+
fs2.close = function(fs$close) {
|
7053
|
+
function close(fd, cb) {
|
7054
|
+
return fs$close.call(fs2, fd, function(err) {
|
7055
|
+
if (!err) {
|
7056
|
+
resetQueue();
|
7057
|
+
}
|
7058
|
+
if (typeof cb === "function")
|
7059
|
+
cb.apply(this, arguments);
|
7060
|
+
});
|
7061
|
+
}
|
7062
|
+
Object.defineProperty(close, previousSymbol, {
|
7063
|
+
value: fs$close
|
7064
|
+
});
|
7065
|
+
return close;
|
7066
|
+
}(fs2.close);
|
7067
|
+
fs2.closeSync = function(fs$closeSync) {
|
7068
|
+
function closeSync(fd) {
|
7069
|
+
fs$closeSync.apply(fs2, arguments);
|
7070
|
+
resetQueue();
|
7071
|
+
}
|
7072
|
+
Object.defineProperty(closeSync, previousSymbol, {
|
7073
|
+
value: fs$closeSync
|
7074
|
+
});
|
7075
|
+
return closeSync;
|
7076
|
+
}(fs2.closeSync);
|
7077
|
+
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
7078
|
+
process.on("exit", function() {
|
7079
|
+
debug2(fs2[gracefulQueue]);
|
7080
|
+
(0, import_chunk_AH6QHEOA.__require)("assert").equal(fs2[gracefulQueue].length, 0);
|
7081
|
+
});
|
7082
|
+
}
|
7083
|
+
}
|
7084
|
+
var queue;
|
7085
|
+
if (!global[gracefulQueue]) {
|
7086
|
+
publishQueue(global, fs2[gracefulQueue]);
|
7087
|
+
}
|
7088
|
+
module2.exports = patch(clone2(fs2));
|
7089
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs2.__patched) {
|
7090
|
+
module2.exports = patch(fs2);
|
7091
|
+
fs2.__patched = true;
|
7092
|
+
}
|
7093
|
+
function patch(fs3) {
|
7094
|
+
polyfills(fs3);
|
7095
|
+
fs3.gracefulify = patch;
|
7096
|
+
fs3.createReadStream = createReadStream;
|
7097
|
+
fs3.createWriteStream = createWriteStream;
|
7098
|
+
var fs$readFile = fs3.readFile;
|
7099
|
+
fs3.readFile = readFile;
|
7100
|
+
function readFile(path2, options, cb) {
|
7101
|
+
if (typeof options === "function")
|
7102
|
+
cb = options, options = null;
|
7103
|
+
return go$readFile(path2, options, cb);
|
7104
|
+
function go$readFile(path3, options2, cb2, startTime) {
|
7105
|
+
return fs$readFile(path3, options2, function(err) {
|
7106
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
7107
|
+
enqueue([go$readFile, [path3, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
7108
|
+
else {
|
7109
|
+
if (typeof cb2 === "function")
|
7110
|
+
cb2.apply(this, arguments);
|
7111
|
+
}
|
7112
|
+
});
|
7113
|
+
}
|
7114
|
+
}
|
7115
|
+
var fs$writeFile = fs3.writeFile;
|
7116
|
+
fs3.writeFile = writeFile;
|
7117
|
+
function writeFile(path2, data, options, cb) {
|
7118
|
+
if (typeof options === "function")
|
7119
|
+
cb = options, options = null;
|
7120
|
+
return go$writeFile(path2, data, options, cb);
|
7121
|
+
function go$writeFile(path3, data2, options2, cb2, startTime) {
|
7122
|
+
return fs$writeFile(path3, data2, options2, function(err) {
|
7123
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
7124
|
+
enqueue([go$writeFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
7125
|
+
else {
|
7126
|
+
if (typeof cb2 === "function")
|
7127
|
+
cb2.apply(this, arguments);
|
7128
|
+
}
|
7129
|
+
});
|
7130
|
+
}
|
7131
|
+
}
|
7132
|
+
var fs$appendFile = fs3.appendFile;
|
7133
|
+
if (fs$appendFile)
|
7134
|
+
fs3.appendFile = appendFile;
|
7135
|
+
function appendFile(path2, data, options, cb) {
|
7136
|
+
if (typeof options === "function")
|
7137
|
+
cb = options, options = null;
|
7138
|
+
return go$appendFile(path2, data, options, cb);
|
7139
|
+
function go$appendFile(path3, data2, options2, cb2, startTime) {
|
7140
|
+
return fs$appendFile(path3, data2, options2, function(err) {
|
7141
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
7142
|
+
enqueue([go$appendFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
7143
|
+
else {
|
7144
|
+
if (typeof cb2 === "function")
|
7145
|
+
cb2.apply(this, arguments);
|
7146
|
+
}
|
7147
|
+
});
|
7148
|
+
}
|
7149
|
+
}
|
7150
|
+
var fs$copyFile = fs3.copyFile;
|
7151
|
+
if (fs$copyFile)
|
7152
|
+
fs3.copyFile = copyFile;
|
7153
|
+
function copyFile(src, dest, flags, cb) {
|
7154
|
+
if (typeof flags === "function") {
|
7155
|
+
cb = flags;
|
7156
|
+
flags = 0;
|
7157
|
+
}
|
7158
|
+
return go$copyFile(src, dest, flags, cb);
|
7159
|
+
function go$copyFile(src2, dest2, flags2, cb2, startTime) {
|
7160
|
+
return fs$copyFile(src2, dest2, flags2, function(err) {
|
7161
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
7162
|
+
enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]);
|
7163
|
+
else {
|
7164
|
+
if (typeof cb2 === "function")
|
7165
|
+
cb2.apply(this, arguments);
|
7166
|
+
}
|
7167
|
+
});
|
7168
|
+
}
|
7169
|
+
}
|
7170
|
+
var fs$readdir = fs3.readdir;
|
7171
|
+
fs3.readdir = readdir;
|
7172
|
+
var noReaddirOptionVersions = /^v[0-5]\./;
|
7173
|
+
function readdir(path2, options, cb) {
|
7174
|
+
if (typeof options === "function")
|
7175
|
+
cb = options, options = null;
|
7176
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path3, options2, cb2, startTime) {
|
7177
|
+
return fs$readdir(path3, fs$readdirCallback(
|
7178
|
+
path3,
|
7179
|
+
options2,
|
7180
|
+
cb2,
|
7181
|
+
startTime
|
7182
|
+
));
|
7183
|
+
} : function go$readdir2(path3, options2, cb2, startTime) {
|
7184
|
+
return fs$readdir(path3, options2, fs$readdirCallback(
|
7185
|
+
path3,
|
7186
|
+
options2,
|
7187
|
+
cb2,
|
7188
|
+
startTime
|
7189
|
+
));
|
7190
|
+
};
|
7191
|
+
return go$readdir(path2, options, cb);
|
7192
|
+
function fs$readdirCallback(path3, options2, cb2, startTime) {
|
7193
|
+
return function(err, files) {
|
7194
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
7195
|
+
enqueue([
|
7196
|
+
go$readdir,
|
7197
|
+
[path3, options2, cb2],
|
7198
|
+
err,
|
7199
|
+
startTime || Date.now(),
|
7200
|
+
Date.now()
|
7201
|
+
]);
|
7202
|
+
else {
|
7203
|
+
if (files && files.sort)
|
7204
|
+
files.sort();
|
7205
|
+
if (typeof cb2 === "function")
|
7206
|
+
cb2.call(this, err, files);
|
7207
|
+
}
|
7208
|
+
};
|
7209
|
+
}
|
7210
|
+
}
|
7211
|
+
if (process.version.substr(0, 4) === "v0.8") {
|
7212
|
+
var legStreams = legacy(fs3);
|
7213
|
+
ReadStream = legStreams.ReadStream;
|
7214
|
+
WriteStream = legStreams.WriteStream;
|
7215
|
+
}
|
7216
|
+
var fs$ReadStream = fs3.ReadStream;
|
7217
|
+
if (fs$ReadStream) {
|
7218
|
+
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
7219
|
+
ReadStream.prototype.open = ReadStream$open;
|
7220
|
+
}
|
7221
|
+
var fs$WriteStream = fs3.WriteStream;
|
7222
|
+
if (fs$WriteStream) {
|
7223
|
+
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
7224
|
+
WriteStream.prototype.open = WriteStream$open;
|
7225
|
+
}
|
7226
|
+
Object.defineProperty(fs3, "ReadStream", {
|
7227
|
+
get: function() {
|
7228
|
+
return ReadStream;
|
7229
|
+
},
|
7230
|
+
set: function(val) {
|
7231
|
+
ReadStream = val;
|
7232
|
+
},
|
7233
|
+
enumerable: true,
|
7234
|
+
configurable: true
|
7235
|
+
});
|
7236
|
+
Object.defineProperty(fs3, "WriteStream", {
|
7237
|
+
get: function() {
|
7238
|
+
return WriteStream;
|
7239
|
+
},
|
7240
|
+
set: function(val) {
|
7241
|
+
WriteStream = val;
|
7242
|
+
},
|
7243
|
+
enumerable: true,
|
7244
|
+
configurable: true
|
7245
|
+
});
|
7246
|
+
var FileReadStream = ReadStream;
|
7247
|
+
Object.defineProperty(fs3, "FileReadStream", {
|
7248
|
+
get: function() {
|
7249
|
+
return FileReadStream;
|
7250
|
+
},
|
7251
|
+
set: function(val) {
|
7252
|
+
FileReadStream = val;
|
7253
|
+
},
|
7254
|
+
enumerable: true,
|
7255
|
+
configurable: true
|
7256
|
+
});
|
7257
|
+
var FileWriteStream = WriteStream;
|
7258
|
+
Object.defineProperty(fs3, "FileWriteStream", {
|
7259
|
+
get: function() {
|
7260
|
+
return FileWriteStream;
|
7261
|
+
},
|
7262
|
+
set: function(val) {
|
7263
|
+
FileWriteStream = val;
|
7264
|
+
},
|
7265
|
+
enumerable: true,
|
7266
|
+
configurable: true
|
7267
|
+
});
|
7268
|
+
function ReadStream(path2, options) {
|
7269
|
+
if (this instanceof ReadStream)
|
7270
|
+
return fs$ReadStream.apply(this, arguments), this;
|
7271
|
+
else
|
7272
|
+
return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
|
7273
|
+
}
|
7274
|
+
function ReadStream$open() {
|
7275
|
+
var that = this;
|
7276
|
+
open(that.path, that.flags, that.mode, function(err, fd) {
|
7277
|
+
if (err) {
|
7278
|
+
if (that.autoClose)
|
7279
|
+
that.destroy();
|
7280
|
+
that.emit("error", err);
|
7281
|
+
} else {
|
7282
|
+
that.fd = fd;
|
7283
|
+
that.emit("open", fd);
|
7284
|
+
that.read();
|
7285
|
+
}
|
7286
|
+
});
|
7287
|
+
}
|
7288
|
+
function WriteStream(path2, options) {
|
7289
|
+
if (this instanceof WriteStream)
|
7290
|
+
return fs$WriteStream.apply(this, arguments), this;
|
7291
|
+
else
|
7292
|
+
return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
|
7293
|
+
}
|
7294
|
+
function WriteStream$open() {
|
7295
|
+
var that = this;
|
7296
|
+
open(that.path, that.flags, that.mode, function(err, fd) {
|
7297
|
+
if (err) {
|
7298
|
+
that.destroy();
|
7299
|
+
that.emit("error", err);
|
7300
|
+
} else {
|
7301
|
+
that.fd = fd;
|
7302
|
+
that.emit("open", fd);
|
7303
|
+
}
|
7304
|
+
});
|
7305
|
+
}
|
7306
|
+
function createReadStream(path2, options) {
|
7307
|
+
return new fs3.ReadStream(path2, options);
|
7308
|
+
}
|
7309
|
+
function createWriteStream(path2, options) {
|
7310
|
+
return new fs3.WriteStream(path2, options);
|
7311
|
+
}
|
7312
|
+
var fs$open = fs3.open;
|
7313
|
+
fs3.open = open;
|
7314
|
+
function open(path2, flags, mode, cb) {
|
7315
|
+
if (typeof mode === "function")
|
7316
|
+
cb = mode, mode = null;
|
7317
|
+
return go$open(path2, flags, mode, cb);
|
7318
|
+
function go$open(path3, flags2, mode2, cb2, startTime) {
|
7319
|
+
return fs$open(path3, flags2, mode2, function(err, fd) {
|
7320
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
7321
|
+
enqueue([go$open, [path3, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
|
7322
|
+
else {
|
7323
|
+
if (typeof cb2 === "function")
|
7324
|
+
cb2.apply(this, arguments);
|
7325
|
+
}
|
7326
|
+
});
|
7327
|
+
}
|
7328
|
+
}
|
7329
|
+
return fs3;
|
7330
|
+
}
|
7331
|
+
function enqueue(elem) {
|
7332
|
+
debug2("ENQUEUE", elem[0].name, elem[1]);
|
7333
|
+
fs2[gracefulQueue].push(elem);
|
7334
|
+
retry2();
|
7335
|
+
}
|
7336
|
+
var retryTimer;
|
7337
|
+
function resetQueue() {
|
7338
|
+
var now = Date.now();
|
7339
|
+
for (var i = 0; i < fs2[gracefulQueue].length; ++i) {
|
7340
|
+
if (fs2[gracefulQueue][i].length > 2) {
|
7341
|
+
fs2[gracefulQueue][i][3] = now;
|
7342
|
+
fs2[gracefulQueue][i][4] = now;
|
7343
|
+
}
|
7344
|
+
}
|
7345
|
+
retry2();
|
7346
|
+
}
|
7347
|
+
function retry2() {
|
7348
|
+
clearTimeout(retryTimer);
|
7349
|
+
retryTimer = void 0;
|
7350
|
+
if (fs2[gracefulQueue].length === 0)
|
7351
|
+
return;
|
7352
|
+
var elem = fs2[gracefulQueue].shift();
|
7353
|
+
var fn = elem[0];
|
7354
|
+
var args = elem[1];
|
7355
|
+
var err = elem[2];
|
7356
|
+
var startTime = elem[3];
|
7357
|
+
var lastTime = elem[4];
|
7358
|
+
if (startTime === void 0) {
|
7359
|
+
debug2("RETRY", fn.name, args);
|
7360
|
+
fn.apply(null, args);
|
7361
|
+
} else if (Date.now() - startTime >= 6e4) {
|
7362
|
+
debug2("TIMEOUT", fn.name, args);
|
7363
|
+
var cb = args.pop();
|
7364
|
+
if (typeof cb === "function")
|
7365
|
+
cb.call(null, err);
|
7366
|
+
} else {
|
7367
|
+
var sinceAttempt = Date.now() - lastTime;
|
7368
|
+
var sinceStart = Math.max(lastTime - startTime, 1);
|
7369
|
+
var desiredDelay = Math.min(sinceStart * 1.2, 100);
|
7370
|
+
if (sinceAttempt >= desiredDelay) {
|
7371
|
+
debug2("RETRY", fn.name, args);
|
7372
|
+
fn.apply(null, args.concat([startTime]));
|
7373
|
+
} else {
|
7374
|
+
fs2[gracefulQueue].push(elem);
|
7375
|
+
}
|
7376
|
+
}
|
7377
|
+
if (retryTimer === void 0) {
|
7378
|
+
retryTimer = setTimeout(retry2, 0);
|
7379
|
+
}
|
7380
|
+
}
|
7381
|
+
}
|
7382
|
+
});
|
6611
7383
|
var require_is_path_cwd = (0, import_chunk_AH6QHEOA.__commonJS)({
|
6612
7384
|
"../../node_modules/.pnpm/is-path-cwd@2.2.0/node_modules/is-path-cwd/index.js"(exports, module2) {
|
6613
7385
|
"use strict";
|
@@ -6643,7 +7415,7 @@ var require_del = (0, import_chunk_AH6QHEOA.__commonJS)({
|
|
6643
7415
|
var globby = require_globby();
|
6644
7416
|
var isGlob = require_is_glob();
|
6645
7417
|
var slash = require_slash();
|
6646
|
-
var gracefulFs =
|
7418
|
+
var gracefulFs = require_graceful_fs();
|
6647
7419
|
var isPathCwd = require_is_path_cwd();
|
6648
7420
|
var isPathInside = require_is_path_inside();
|
6649
7421
|
var rimraf2 = (0, import_chunk_ZAFWMCVK.require_rimraf)();
|
@@ -8050,7 +8822,7 @@ async function fetchChecksum(url) {
|
|
8050
8822
|
try {
|
8051
8823
|
const checksumUrl = `${url}.sha256`;
|
8052
8824
|
const response = await fetch(checksumUrl, {
|
8053
|
-
agent: (0,
|
8825
|
+
agent: (0, import_chunk_ZSBPBV34.getProxyAgent)(url)
|
8054
8826
|
});
|
8055
8827
|
if (!response.ok) {
|
8056
8828
|
let errorMessage = `Failed to fetch sha256 checksum at ${checksumUrl} - ${response.status} ${response.statusText}`;
|
@@ -8096,7 +8868,7 @@ async function downloadZip(url, target, progressCb) {
|
|
8096
8868
|
async () => {
|
8097
8869
|
const response = await fetch(url, {
|
8098
8870
|
compress: false,
|
8099
|
-
agent: (0,
|
8871
|
+
agent: (0, import_chunk_ZSBPBV34.getProxyAgent)(url)
|
8100
8872
|
});
|
8101
8873
|
if (!response.ok) {
|
8102
8874
|
throw new Error(`Failed to fetch the engine file at ${url} - ${response.status} ${response.statusText}`);
|
@@ -8143,7 +8915,7 @@ async function downloadZip(url, target, progressCb) {
|
|
8143
8915
|
onFailedAttempt: (err) => debug("An error occurred while downloading the engine file", err)
|
8144
8916
|
}
|
8145
8917
|
);
|
8146
|
-
await (0,
|
8918
|
+
await (0, import_chunk_HACCWU3B.overwriteFile)(partial, target);
|
8147
8919
|
try {
|
8148
8920
|
await del(partial);
|
8149
8921
|
await del(tmpDir);
|