@vercel/next 29.1.0 → 30.0.0-snapshot-579f9b2619d8
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/adapter/index.js +553 -474
- package/dist/bin/proxy-linux-amd64 +0 -0
- package/dist/index.js +1254 -1069
- package/package.json +5 -5
package/dist/adapter/index.js
CHANGED
|
@@ -690,54 +690,54 @@ var require_polyfills = __commonJS({
|
|
|
690
690
|
}
|
|
691
691
|
var chdir;
|
|
692
692
|
module2.exports = patch;
|
|
693
|
-
function patch(
|
|
693
|
+
function patch(fs6) {
|
|
694
694
|
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
|
695
|
-
patchLchmod(
|
|
696
|
-
}
|
|
697
|
-
if (!
|
|
698
|
-
patchLutimes(
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
if (
|
|
719
|
-
|
|
695
|
+
patchLchmod(fs6);
|
|
696
|
+
}
|
|
697
|
+
if (!fs6.lutimes) {
|
|
698
|
+
patchLutimes(fs6);
|
|
699
|
+
}
|
|
700
|
+
fs6.chown = chownFix(fs6.chown);
|
|
701
|
+
fs6.fchown = chownFix(fs6.fchown);
|
|
702
|
+
fs6.lchown = chownFix(fs6.lchown);
|
|
703
|
+
fs6.chmod = chmodFix(fs6.chmod);
|
|
704
|
+
fs6.fchmod = chmodFix(fs6.fchmod);
|
|
705
|
+
fs6.lchmod = chmodFix(fs6.lchmod);
|
|
706
|
+
fs6.chownSync = chownFixSync(fs6.chownSync);
|
|
707
|
+
fs6.fchownSync = chownFixSync(fs6.fchownSync);
|
|
708
|
+
fs6.lchownSync = chownFixSync(fs6.lchownSync);
|
|
709
|
+
fs6.chmodSync = chmodFixSync(fs6.chmodSync);
|
|
710
|
+
fs6.fchmodSync = chmodFixSync(fs6.fchmodSync);
|
|
711
|
+
fs6.lchmodSync = chmodFixSync(fs6.lchmodSync);
|
|
712
|
+
fs6.stat = statFix(fs6.stat);
|
|
713
|
+
fs6.fstat = statFix(fs6.fstat);
|
|
714
|
+
fs6.lstat = statFix(fs6.lstat);
|
|
715
|
+
fs6.statSync = statFixSync(fs6.statSync);
|
|
716
|
+
fs6.fstatSync = statFixSync(fs6.fstatSync);
|
|
717
|
+
fs6.lstatSync = statFixSync(fs6.lstatSync);
|
|
718
|
+
if (fs6.chmod && !fs6.lchmod) {
|
|
719
|
+
fs6.lchmod = function(path5, mode, cb) {
|
|
720
720
|
if (cb) process.nextTick(cb);
|
|
721
721
|
};
|
|
722
|
-
|
|
722
|
+
fs6.lchmodSync = function() {
|
|
723
723
|
};
|
|
724
724
|
}
|
|
725
|
-
if (
|
|
726
|
-
|
|
725
|
+
if (fs6.chown && !fs6.lchown) {
|
|
726
|
+
fs6.lchown = function(path5, uid, gid, cb) {
|
|
727
727
|
if (cb) process.nextTick(cb);
|
|
728
728
|
};
|
|
729
|
-
|
|
729
|
+
fs6.lchownSync = function() {
|
|
730
730
|
};
|
|
731
731
|
}
|
|
732
732
|
if (platform === "win32") {
|
|
733
|
-
|
|
733
|
+
fs6.rename = typeof fs6.rename !== "function" ? fs6.rename : (function(fs$rename) {
|
|
734
734
|
function rename(from, to, cb) {
|
|
735
735
|
var start = Date.now();
|
|
736
736
|
var backoff = 0;
|
|
737
737
|
fs$rename(from, to, function CB(er) {
|
|
738
738
|
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
|
|
739
739
|
setTimeout(function() {
|
|
740
|
-
|
|
740
|
+
fs6.stat(to, function(stater, st) {
|
|
741
741
|
if (stater && stater.code === "ENOENT")
|
|
742
742
|
fs$rename(from, to, CB);
|
|
743
743
|
else
|
|
@@ -753,9 +753,9 @@ var require_polyfills = __commonJS({
|
|
|
753
753
|
}
|
|
754
754
|
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
|
|
755
755
|
return rename;
|
|
756
|
-
})(
|
|
756
|
+
})(fs6.rename);
|
|
757
757
|
}
|
|
758
|
-
|
|
758
|
+
fs6.read = typeof fs6.read !== "function" ? fs6.read : (function(fs$read) {
|
|
759
759
|
function read(fd, buffer, offset, length, position, callback_) {
|
|
760
760
|
var callback;
|
|
761
761
|
if (callback_ && typeof callback_ === "function") {
|
|
@@ -763,22 +763,22 @@ var require_polyfills = __commonJS({
|
|
|
763
763
|
callback = function(er, _, __) {
|
|
764
764
|
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
|
765
765
|
eagCounter++;
|
|
766
|
-
return fs$read.call(
|
|
766
|
+
return fs$read.call(fs6, fd, buffer, offset, length, position, callback);
|
|
767
767
|
}
|
|
768
768
|
callback_.apply(this, arguments);
|
|
769
769
|
};
|
|
770
770
|
}
|
|
771
|
-
return fs$read.call(
|
|
771
|
+
return fs$read.call(fs6, fd, buffer, offset, length, position, callback);
|
|
772
772
|
}
|
|
773
773
|
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
|
774
774
|
return read;
|
|
775
|
-
})(
|
|
776
|
-
|
|
775
|
+
})(fs6.read);
|
|
776
|
+
fs6.readSync = typeof fs6.readSync !== "function" ? fs6.readSync : /* @__PURE__ */ (function(fs$readSync) {
|
|
777
777
|
return function(fd, buffer, offset, length, position) {
|
|
778
778
|
var eagCounter = 0;
|
|
779
779
|
while (true) {
|
|
780
780
|
try {
|
|
781
|
-
return fs$readSync.call(
|
|
781
|
+
return fs$readSync.call(fs6, fd, buffer, offset, length, position);
|
|
782
782
|
} catch (er) {
|
|
783
783
|
if (er.code === "EAGAIN" && eagCounter < 10) {
|
|
784
784
|
eagCounter++;
|
|
@@ -788,11 +788,11 @@ var require_polyfills = __commonJS({
|
|
|
788
788
|
}
|
|
789
789
|
}
|
|
790
790
|
};
|
|
791
|
-
})(
|
|
792
|
-
function patchLchmod(
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
791
|
+
})(fs6.readSync);
|
|
792
|
+
function patchLchmod(fs7) {
|
|
793
|
+
fs7.lchmod = function(path5, mode, callback) {
|
|
794
|
+
fs7.open(
|
|
795
|
+
path5,
|
|
796
796
|
constants.O_WRONLY | constants.O_SYMLINK,
|
|
797
797
|
mode,
|
|
798
798
|
function(err, fd) {
|
|
@@ -800,80 +800,80 @@ var require_polyfills = __commonJS({
|
|
|
800
800
|
if (callback) callback(err);
|
|
801
801
|
return;
|
|
802
802
|
}
|
|
803
|
-
|
|
804
|
-
|
|
803
|
+
fs7.fchmod(fd, mode, function(err2) {
|
|
804
|
+
fs7.close(fd, function(err22) {
|
|
805
805
|
if (callback) callback(err2 || err22);
|
|
806
806
|
});
|
|
807
807
|
});
|
|
808
808
|
}
|
|
809
809
|
);
|
|
810
810
|
};
|
|
811
|
-
|
|
812
|
-
var fd =
|
|
811
|
+
fs7.lchmodSync = function(path5, mode) {
|
|
812
|
+
var fd = fs7.openSync(path5, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
813
813
|
var threw = true;
|
|
814
814
|
var ret;
|
|
815
815
|
try {
|
|
816
|
-
ret =
|
|
816
|
+
ret = fs7.fchmodSync(fd, mode);
|
|
817
817
|
threw = false;
|
|
818
818
|
} finally {
|
|
819
819
|
if (threw) {
|
|
820
820
|
try {
|
|
821
|
-
|
|
821
|
+
fs7.closeSync(fd);
|
|
822
822
|
} catch (er) {
|
|
823
823
|
}
|
|
824
824
|
} else {
|
|
825
|
-
|
|
825
|
+
fs7.closeSync(fd);
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
828
|
return ret;
|
|
829
829
|
};
|
|
830
830
|
}
|
|
831
|
-
function patchLutimes(
|
|
832
|
-
if (constants.hasOwnProperty("O_SYMLINK") &&
|
|
833
|
-
|
|
834
|
-
|
|
831
|
+
function patchLutimes(fs7) {
|
|
832
|
+
if (constants.hasOwnProperty("O_SYMLINK") && fs7.futimes) {
|
|
833
|
+
fs7.lutimes = function(path5, at, mt, cb) {
|
|
834
|
+
fs7.open(path5, constants.O_SYMLINK, function(er, fd) {
|
|
835
835
|
if (er) {
|
|
836
836
|
if (cb) cb(er);
|
|
837
837
|
return;
|
|
838
838
|
}
|
|
839
|
-
|
|
840
|
-
|
|
839
|
+
fs7.futimes(fd, at, mt, function(er2) {
|
|
840
|
+
fs7.close(fd, function(er22) {
|
|
841
841
|
if (cb) cb(er2 || er22);
|
|
842
842
|
});
|
|
843
843
|
});
|
|
844
844
|
});
|
|
845
845
|
};
|
|
846
|
-
|
|
847
|
-
var fd =
|
|
846
|
+
fs7.lutimesSync = function(path5, at, mt) {
|
|
847
|
+
var fd = fs7.openSync(path5, constants.O_SYMLINK);
|
|
848
848
|
var ret;
|
|
849
849
|
var threw = true;
|
|
850
850
|
try {
|
|
851
|
-
ret =
|
|
851
|
+
ret = fs7.futimesSync(fd, at, mt);
|
|
852
852
|
threw = false;
|
|
853
853
|
} finally {
|
|
854
854
|
if (threw) {
|
|
855
855
|
try {
|
|
856
|
-
|
|
856
|
+
fs7.closeSync(fd);
|
|
857
857
|
} catch (er) {
|
|
858
858
|
}
|
|
859
859
|
} else {
|
|
860
|
-
|
|
860
|
+
fs7.closeSync(fd);
|
|
861
861
|
}
|
|
862
862
|
}
|
|
863
863
|
return ret;
|
|
864
864
|
};
|
|
865
|
-
} else if (
|
|
866
|
-
|
|
865
|
+
} else if (fs7.futimes) {
|
|
866
|
+
fs7.lutimes = function(_a, _b, _c, cb) {
|
|
867
867
|
if (cb) process.nextTick(cb);
|
|
868
868
|
};
|
|
869
|
-
|
|
869
|
+
fs7.lutimesSync = function() {
|
|
870
870
|
};
|
|
871
871
|
}
|
|
872
872
|
}
|
|
873
873
|
function chmodFix(orig) {
|
|
874
874
|
if (!orig) return orig;
|
|
875
875
|
return function(target, mode, cb) {
|
|
876
|
-
return orig.call(
|
|
876
|
+
return orig.call(fs6, target, mode, function(er) {
|
|
877
877
|
if (chownErOk(er)) er = null;
|
|
878
878
|
if (cb) cb.apply(this, arguments);
|
|
879
879
|
});
|
|
@@ -883,7 +883,7 @@ var require_polyfills = __commonJS({
|
|
|
883
883
|
if (!orig) return orig;
|
|
884
884
|
return function(target, mode) {
|
|
885
885
|
try {
|
|
886
|
-
return orig.call(
|
|
886
|
+
return orig.call(fs6, target, mode);
|
|
887
887
|
} catch (er) {
|
|
888
888
|
if (!chownErOk(er)) throw er;
|
|
889
889
|
}
|
|
@@ -892,7 +892,7 @@ var require_polyfills = __commonJS({
|
|
|
892
892
|
function chownFix(orig) {
|
|
893
893
|
if (!orig) return orig;
|
|
894
894
|
return function(target, uid, gid, cb) {
|
|
895
|
-
return orig.call(
|
|
895
|
+
return orig.call(fs6, target, uid, gid, function(er) {
|
|
896
896
|
if (chownErOk(er)) er = null;
|
|
897
897
|
if (cb) cb.apply(this, arguments);
|
|
898
898
|
});
|
|
@@ -902,7 +902,7 @@ var require_polyfills = __commonJS({
|
|
|
902
902
|
if (!orig) return orig;
|
|
903
903
|
return function(target, uid, gid) {
|
|
904
904
|
try {
|
|
905
|
-
return orig.call(
|
|
905
|
+
return orig.call(fs6, target, uid, gid);
|
|
906
906
|
} catch (er) {
|
|
907
907
|
if (!chownErOk(er)) throw er;
|
|
908
908
|
}
|
|
@@ -922,13 +922,13 @@ var require_polyfills = __commonJS({
|
|
|
922
922
|
}
|
|
923
923
|
if (cb) cb.apply(this, arguments);
|
|
924
924
|
}
|
|
925
|
-
return options ? orig.call(
|
|
925
|
+
return options ? orig.call(fs6, target, options, callback) : orig.call(fs6, target, callback);
|
|
926
926
|
};
|
|
927
927
|
}
|
|
928
928
|
function statFixSync(orig) {
|
|
929
929
|
if (!orig) return orig;
|
|
930
930
|
return function(target, options) {
|
|
931
|
-
var stats = options ? orig.call(
|
|
931
|
+
var stats = options ? orig.call(fs6, target, options) : orig.call(fs6, target);
|
|
932
932
|
if (stats) {
|
|
933
933
|
if (stats.uid < 0) stats.uid += 4294967296;
|
|
934
934
|
if (stats.gid < 0) stats.gid += 4294967296;
|
|
@@ -957,16 +957,16 @@ var require_legacy_streams = __commonJS({
|
|
|
957
957
|
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
|
|
958
958
|
var Stream = require("stream").Stream;
|
|
959
959
|
module2.exports = legacy;
|
|
960
|
-
function legacy(
|
|
960
|
+
function legacy(fs6) {
|
|
961
961
|
return {
|
|
962
962
|
ReadStream,
|
|
963
963
|
WriteStream
|
|
964
964
|
};
|
|
965
|
-
function ReadStream(
|
|
966
|
-
if (!(this instanceof ReadStream)) return new ReadStream(
|
|
965
|
+
function ReadStream(path5, options) {
|
|
966
|
+
if (!(this instanceof ReadStream)) return new ReadStream(path5, options);
|
|
967
967
|
Stream.call(this);
|
|
968
968
|
var self = this;
|
|
969
|
-
this.path =
|
|
969
|
+
this.path = path5;
|
|
970
970
|
this.fd = null;
|
|
971
971
|
this.readable = true;
|
|
972
972
|
this.paused = false;
|
|
@@ -1000,7 +1000,7 @@ var require_legacy_streams = __commonJS({
|
|
|
1000
1000
|
});
|
|
1001
1001
|
return;
|
|
1002
1002
|
}
|
|
1003
|
-
|
|
1003
|
+
fs6.open(this.path, this.flags, this.mode, function(err, fd) {
|
|
1004
1004
|
if (err) {
|
|
1005
1005
|
self.emit("error", err);
|
|
1006
1006
|
self.readable = false;
|
|
@@ -1011,10 +1011,10 @@ var require_legacy_streams = __commonJS({
|
|
|
1011
1011
|
self._read();
|
|
1012
1012
|
});
|
|
1013
1013
|
}
|
|
1014
|
-
function WriteStream(
|
|
1015
|
-
if (!(this instanceof WriteStream)) return new WriteStream(
|
|
1014
|
+
function WriteStream(path5, options) {
|
|
1015
|
+
if (!(this instanceof WriteStream)) return new WriteStream(path5, options);
|
|
1016
1016
|
Stream.call(this);
|
|
1017
|
-
this.path =
|
|
1017
|
+
this.path = path5;
|
|
1018
1018
|
this.fd = null;
|
|
1019
1019
|
this.writable = true;
|
|
1020
1020
|
this.flags = "w";
|
|
@@ -1039,7 +1039,7 @@ var require_legacy_streams = __commonJS({
|
|
|
1039
1039
|
this.busy = false;
|
|
1040
1040
|
this._queue = [];
|
|
1041
1041
|
if (this.fd === null) {
|
|
1042
|
-
this._open =
|
|
1042
|
+
this._open = fs6.open;
|
|
1043
1043
|
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
|
|
1044
1044
|
this.flush();
|
|
1045
1045
|
}
|
|
@@ -1074,7 +1074,7 @@ var require_clone = __commonJS({
|
|
|
1074
1074
|
// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
|
|
1075
1075
|
var require_graceful_fs = __commonJS({
|
|
1076
1076
|
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
|
|
1077
|
-
var
|
|
1077
|
+
var fs6 = require("fs");
|
|
1078
1078
|
var polyfills = require_polyfills();
|
|
1079
1079
|
var legacy = require_legacy_streams();
|
|
1080
1080
|
var clone = require_clone();
|
|
@@ -1097,21 +1097,21 @@ var require_graceful_fs = __commonJS({
|
|
|
1097
1097
|
}
|
|
1098
1098
|
});
|
|
1099
1099
|
}
|
|
1100
|
-
var
|
|
1100
|
+
var debug2 = noop;
|
|
1101
1101
|
if (util.debuglog)
|
|
1102
|
-
|
|
1102
|
+
debug2 = util.debuglog("gfs4");
|
|
1103
1103
|
else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
|
|
1104
|
-
|
|
1104
|
+
debug2 = function() {
|
|
1105
1105
|
var m = util.format.apply(util, arguments);
|
|
1106
1106
|
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
1107
1107
|
console.error(m);
|
|
1108
1108
|
};
|
|
1109
|
-
if (!
|
|
1109
|
+
if (!fs6[gracefulQueue]) {
|
|
1110
1110
|
queue = global[gracefulQueue] || [];
|
|
1111
|
-
publishQueue(
|
|
1112
|
-
|
|
1111
|
+
publishQueue(fs6, queue);
|
|
1112
|
+
fs6.close = (function(fs$close) {
|
|
1113
1113
|
function close(fd, cb) {
|
|
1114
|
-
return fs$close.call(
|
|
1114
|
+
return fs$close.call(fs6, fd, function(err) {
|
|
1115
1115
|
if (!err) {
|
|
1116
1116
|
resetQueue();
|
|
1117
1117
|
}
|
|
@@ -1123,48 +1123,48 @@ var require_graceful_fs = __commonJS({
|
|
|
1123
1123
|
value: fs$close
|
|
1124
1124
|
});
|
|
1125
1125
|
return close;
|
|
1126
|
-
})(
|
|
1127
|
-
|
|
1126
|
+
})(fs6.close);
|
|
1127
|
+
fs6.closeSync = (function(fs$closeSync) {
|
|
1128
1128
|
function closeSync(fd) {
|
|
1129
|
-
fs$closeSync.apply(
|
|
1129
|
+
fs$closeSync.apply(fs6, arguments);
|
|
1130
1130
|
resetQueue();
|
|
1131
1131
|
}
|
|
1132
1132
|
Object.defineProperty(closeSync, previousSymbol, {
|
|
1133
1133
|
value: fs$closeSync
|
|
1134
1134
|
});
|
|
1135
1135
|
return closeSync;
|
|
1136
|
-
})(
|
|
1136
|
+
})(fs6.closeSync);
|
|
1137
1137
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
1138
1138
|
process.on("exit", function() {
|
|
1139
|
-
|
|
1140
|
-
require("assert").equal(
|
|
1139
|
+
debug2(fs6[gracefulQueue]);
|
|
1140
|
+
require("assert").equal(fs6[gracefulQueue].length, 0);
|
|
1141
1141
|
});
|
|
1142
1142
|
}
|
|
1143
1143
|
}
|
|
1144
1144
|
var queue;
|
|
1145
1145
|
if (!global[gracefulQueue]) {
|
|
1146
|
-
publishQueue(global,
|
|
1147
|
-
}
|
|
1148
|
-
module2.exports = patch(clone(
|
|
1149
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !
|
|
1150
|
-
module2.exports = patch(
|
|
1151
|
-
|
|
1152
|
-
}
|
|
1153
|
-
function patch(
|
|
1154
|
-
polyfills(
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
var fs$readFile =
|
|
1159
|
-
|
|
1160
|
-
function readFile2(
|
|
1146
|
+
publishQueue(global, fs6[gracefulQueue]);
|
|
1147
|
+
}
|
|
1148
|
+
module2.exports = patch(clone(fs6));
|
|
1149
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs6.__patched) {
|
|
1150
|
+
module2.exports = patch(fs6);
|
|
1151
|
+
fs6.__patched = true;
|
|
1152
|
+
}
|
|
1153
|
+
function patch(fs7) {
|
|
1154
|
+
polyfills(fs7);
|
|
1155
|
+
fs7.gracefulify = patch;
|
|
1156
|
+
fs7.createReadStream = createReadStream;
|
|
1157
|
+
fs7.createWriteStream = createWriteStream;
|
|
1158
|
+
var fs$readFile = fs7.readFile;
|
|
1159
|
+
fs7.readFile = readFile2;
|
|
1160
|
+
function readFile2(path5, options, cb) {
|
|
1161
1161
|
if (typeof options === "function")
|
|
1162
1162
|
cb = options, options = null;
|
|
1163
|
-
return go$readFile(
|
|
1164
|
-
function go$readFile(
|
|
1165
|
-
return fs$readFile(
|
|
1163
|
+
return go$readFile(path5, options, cb);
|
|
1164
|
+
function go$readFile(path6, options2, cb2, startTime) {
|
|
1165
|
+
return fs$readFile(path6, options2, function(err) {
|
|
1166
1166
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
1167
|
-
enqueue([go$readFile, [
|
|
1167
|
+
enqueue([go$readFile, [path6, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
1168
1168
|
else {
|
|
1169
1169
|
if (typeof cb2 === "function")
|
|
1170
1170
|
cb2.apply(this, arguments);
|
|
@@ -1172,16 +1172,16 @@ var require_graceful_fs = __commonJS({
|
|
|
1172
1172
|
});
|
|
1173
1173
|
}
|
|
1174
1174
|
}
|
|
1175
|
-
var fs$writeFile =
|
|
1176
|
-
|
|
1177
|
-
function writeFile(
|
|
1175
|
+
var fs$writeFile = fs7.writeFile;
|
|
1176
|
+
fs7.writeFile = writeFile;
|
|
1177
|
+
function writeFile(path5, data, options, cb) {
|
|
1178
1178
|
if (typeof options === "function")
|
|
1179
1179
|
cb = options, options = null;
|
|
1180
|
-
return go$writeFile(
|
|
1181
|
-
function go$writeFile(
|
|
1182
|
-
return fs$writeFile(
|
|
1180
|
+
return go$writeFile(path5, data, options, cb);
|
|
1181
|
+
function go$writeFile(path6, data2, options2, cb2, startTime) {
|
|
1182
|
+
return fs$writeFile(path6, data2, options2, function(err) {
|
|
1183
1183
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
1184
|
-
enqueue([go$writeFile, [
|
|
1184
|
+
enqueue([go$writeFile, [path6, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
1185
1185
|
else {
|
|
1186
1186
|
if (typeof cb2 === "function")
|
|
1187
1187
|
cb2.apply(this, arguments);
|
|
@@ -1189,17 +1189,17 @@ var require_graceful_fs = __commonJS({
|
|
|
1189
1189
|
});
|
|
1190
1190
|
}
|
|
1191
1191
|
}
|
|
1192
|
-
var fs$appendFile =
|
|
1192
|
+
var fs$appendFile = fs7.appendFile;
|
|
1193
1193
|
if (fs$appendFile)
|
|
1194
|
-
|
|
1195
|
-
function appendFile(
|
|
1194
|
+
fs7.appendFile = appendFile;
|
|
1195
|
+
function appendFile(path5, data, options, cb) {
|
|
1196
1196
|
if (typeof options === "function")
|
|
1197
1197
|
cb = options, options = null;
|
|
1198
|
-
return go$appendFile(
|
|
1199
|
-
function go$appendFile(
|
|
1200
|
-
return fs$appendFile(
|
|
1198
|
+
return go$appendFile(path5, data, options, cb);
|
|
1199
|
+
function go$appendFile(path6, data2, options2, cb2, startTime) {
|
|
1200
|
+
return fs$appendFile(path6, data2, options2, function(err) {
|
|
1201
1201
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
1202
|
-
enqueue([go$appendFile, [
|
|
1202
|
+
enqueue([go$appendFile, [path6, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
1203
1203
|
else {
|
|
1204
1204
|
if (typeof cb2 === "function")
|
|
1205
1205
|
cb2.apply(this, arguments);
|
|
@@ -1207,9 +1207,9 @@ var require_graceful_fs = __commonJS({
|
|
|
1207
1207
|
});
|
|
1208
1208
|
}
|
|
1209
1209
|
}
|
|
1210
|
-
var fs$copyFile =
|
|
1210
|
+
var fs$copyFile = fs7.copyFile;
|
|
1211
1211
|
if (fs$copyFile)
|
|
1212
|
-
|
|
1212
|
+
fs7.copyFile = copyFile;
|
|
1213
1213
|
function copyFile(src, dest, flags, cb) {
|
|
1214
1214
|
if (typeof flags === "function") {
|
|
1215
1215
|
cb = flags;
|
|
@@ -1227,34 +1227,34 @@ var require_graceful_fs = __commonJS({
|
|
|
1227
1227
|
});
|
|
1228
1228
|
}
|
|
1229
1229
|
}
|
|
1230
|
-
var fs$readdir =
|
|
1231
|
-
|
|
1230
|
+
var fs$readdir = fs7.readdir;
|
|
1231
|
+
fs7.readdir = readdir;
|
|
1232
1232
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
1233
|
-
function readdir(
|
|
1233
|
+
function readdir(path5, options, cb) {
|
|
1234
1234
|
if (typeof options === "function")
|
|
1235
1235
|
cb = options, options = null;
|
|
1236
|
-
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(
|
|
1237
|
-
return fs$readdir(
|
|
1238
|
-
|
|
1236
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path6, options2, cb2, startTime) {
|
|
1237
|
+
return fs$readdir(path6, fs$readdirCallback(
|
|
1238
|
+
path6,
|
|
1239
1239
|
options2,
|
|
1240
1240
|
cb2,
|
|
1241
1241
|
startTime
|
|
1242
1242
|
));
|
|
1243
|
-
} : function go$readdir2(
|
|
1244
|
-
return fs$readdir(
|
|
1245
|
-
|
|
1243
|
+
} : function go$readdir2(path6, options2, cb2, startTime) {
|
|
1244
|
+
return fs$readdir(path6, options2, fs$readdirCallback(
|
|
1245
|
+
path6,
|
|
1246
1246
|
options2,
|
|
1247
1247
|
cb2,
|
|
1248
1248
|
startTime
|
|
1249
1249
|
));
|
|
1250
1250
|
};
|
|
1251
|
-
return go$readdir(
|
|
1252
|
-
function fs$readdirCallback(
|
|
1251
|
+
return go$readdir(path5, options, cb);
|
|
1252
|
+
function fs$readdirCallback(path6, options2, cb2, startTime) {
|
|
1253
1253
|
return function(err, files) {
|
|
1254
1254
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
1255
1255
|
enqueue([
|
|
1256
1256
|
go$readdir,
|
|
1257
|
-
[
|
|
1257
|
+
[path6, options2, cb2],
|
|
1258
1258
|
err,
|
|
1259
1259
|
startTime || Date.now(),
|
|
1260
1260
|
Date.now()
|
|
@@ -1269,21 +1269,21 @@ var require_graceful_fs = __commonJS({
|
|
|
1269
1269
|
}
|
|
1270
1270
|
}
|
|
1271
1271
|
if (process.version.substr(0, 4) === "v0.8") {
|
|
1272
|
-
var legStreams = legacy(
|
|
1272
|
+
var legStreams = legacy(fs7);
|
|
1273
1273
|
ReadStream = legStreams.ReadStream;
|
|
1274
1274
|
WriteStream = legStreams.WriteStream;
|
|
1275
1275
|
}
|
|
1276
|
-
var fs$ReadStream =
|
|
1276
|
+
var fs$ReadStream = fs7.ReadStream;
|
|
1277
1277
|
if (fs$ReadStream) {
|
|
1278
1278
|
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
|
1279
1279
|
ReadStream.prototype.open = ReadStream$open;
|
|
1280
1280
|
}
|
|
1281
|
-
var fs$WriteStream =
|
|
1281
|
+
var fs$WriteStream = fs7.WriteStream;
|
|
1282
1282
|
if (fs$WriteStream) {
|
|
1283
1283
|
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
|
1284
1284
|
WriteStream.prototype.open = WriteStream$open;
|
|
1285
1285
|
}
|
|
1286
|
-
Object.defineProperty(
|
|
1286
|
+
Object.defineProperty(fs7, "ReadStream", {
|
|
1287
1287
|
get: function() {
|
|
1288
1288
|
return ReadStream;
|
|
1289
1289
|
},
|
|
@@ -1293,7 +1293,7 @@ var require_graceful_fs = __commonJS({
|
|
|
1293
1293
|
enumerable: true,
|
|
1294
1294
|
configurable: true
|
|
1295
1295
|
});
|
|
1296
|
-
Object.defineProperty(
|
|
1296
|
+
Object.defineProperty(fs7, "WriteStream", {
|
|
1297
1297
|
get: function() {
|
|
1298
1298
|
return WriteStream;
|
|
1299
1299
|
},
|
|
@@ -1304,7 +1304,7 @@ var require_graceful_fs = __commonJS({
|
|
|
1304
1304
|
configurable: true
|
|
1305
1305
|
});
|
|
1306
1306
|
var FileReadStream = ReadStream;
|
|
1307
|
-
Object.defineProperty(
|
|
1307
|
+
Object.defineProperty(fs7, "FileReadStream", {
|
|
1308
1308
|
get: function() {
|
|
1309
1309
|
return FileReadStream;
|
|
1310
1310
|
},
|
|
@@ -1315,7 +1315,7 @@ var require_graceful_fs = __commonJS({
|
|
|
1315
1315
|
configurable: true
|
|
1316
1316
|
});
|
|
1317
1317
|
var FileWriteStream = WriteStream;
|
|
1318
|
-
Object.defineProperty(
|
|
1318
|
+
Object.defineProperty(fs7, "FileWriteStream", {
|
|
1319
1319
|
get: function() {
|
|
1320
1320
|
return FileWriteStream;
|
|
1321
1321
|
},
|
|
@@ -1325,7 +1325,7 @@ var require_graceful_fs = __commonJS({
|
|
|
1325
1325
|
enumerable: true,
|
|
1326
1326
|
configurable: true
|
|
1327
1327
|
});
|
|
1328
|
-
function ReadStream(
|
|
1328
|
+
function ReadStream(path5, options) {
|
|
1329
1329
|
if (this instanceof ReadStream)
|
|
1330
1330
|
return fs$ReadStream.apply(this, arguments), this;
|
|
1331
1331
|
else
|
|
@@ -1345,7 +1345,7 @@ var require_graceful_fs = __commonJS({
|
|
|
1345
1345
|
}
|
|
1346
1346
|
});
|
|
1347
1347
|
}
|
|
1348
|
-
function WriteStream(
|
|
1348
|
+
function WriteStream(path5, options) {
|
|
1349
1349
|
if (this instanceof WriteStream)
|
|
1350
1350
|
return fs$WriteStream.apply(this, arguments), this;
|
|
1351
1351
|
else
|
|
@@ -1363,22 +1363,22 @@ var require_graceful_fs = __commonJS({
|
|
|
1363
1363
|
}
|
|
1364
1364
|
});
|
|
1365
1365
|
}
|
|
1366
|
-
function createReadStream(
|
|
1367
|
-
return new
|
|
1366
|
+
function createReadStream(path5, options) {
|
|
1367
|
+
return new fs7.ReadStream(path5, options);
|
|
1368
1368
|
}
|
|
1369
|
-
function createWriteStream(
|
|
1370
|
-
return new
|
|
1369
|
+
function createWriteStream(path5, options) {
|
|
1370
|
+
return new fs7.WriteStream(path5, options);
|
|
1371
1371
|
}
|
|
1372
|
-
var fs$open =
|
|
1373
|
-
|
|
1374
|
-
function open(
|
|
1372
|
+
var fs$open = fs7.open;
|
|
1373
|
+
fs7.open = open;
|
|
1374
|
+
function open(path5, flags, mode, cb) {
|
|
1375
1375
|
if (typeof mode === "function")
|
|
1376
1376
|
cb = mode, mode = null;
|
|
1377
|
-
return go$open(
|
|
1378
|
-
function go$open(
|
|
1379
|
-
return fs$open(
|
|
1377
|
+
return go$open(path5, flags, mode, cb);
|
|
1378
|
+
function go$open(path6, flags2, mode2, cb2, startTime) {
|
|
1379
|
+
return fs$open(path6, flags2, mode2, function(err, fd) {
|
|
1380
1380
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
1381
|
-
enqueue([go$open, [
|
|
1381
|
+
enqueue([go$open, [path6, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
1382
1382
|
else {
|
|
1383
1383
|
if (typeof cb2 === "function")
|
|
1384
1384
|
cb2.apply(this, arguments);
|
|
@@ -1386,20 +1386,20 @@ var require_graceful_fs = __commonJS({
|
|
|
1386
1386
|
});
|
|
1387
1387
|
}
|
|
1388
1388
|
}
|
|
1389
|
-
return
|
|
1389
|
+
return fs7;
|
|
1390
1390
|
}
|
|
1391
1391
|
function enqueue(elem) {
|
|
1392
|
-
|
|
1393
|
-
|
|
1392
|
+
debug2("ENQUEUE", elem[0].name, elem[1]);
|
|
1393
|
+
fs6[gracefulQueue].push(elem);
|
|
1394
1394
|
retry();
|
|
1395
1395
|
}
|
|
1396
1396
|
var retryTimer;
|
|
1397
1397
|
function resetQueue() {
|
|
1398
1398
|
var now = Date.now();
|
|
1399
|
-
for (var i = 0; i <
|
|
1400
|
-
if (
|
|
1401
|
-
|
|
1402
|
-
|
|
1399
|
+
for (var i = 0; i < fs6[gracefulQueue].length; ++i) {
|
|
1400
|
+
if (fs6[gracefulQueue][i].length > 2) {
|
|
1401
|
+
fs6[gracefulQueue][i][3] = now;
|
|
1402
|
+
fs6[gracefulQueue][i][4] = now;
|
|
1403
1403
|
}
|
|
1404
1404
|
}
|
|
1405
1405
|
retry();
|
|
@@ -1407,19 +1407,19 @@ var require_graceful_fs = __commonJS({
|
|
|
1407
1407
|
function retry() {
|
|
1408
1408
|
clearTimeout(retryTimer);
|
|
1409
1409
|
retryTimer = void 0;
|
|
1410
|
-
if (
|
|
1410
|
+
if (fs6[gracefulQueue].length === 0)
|
|
1411
1411
|
return;
|
|
1412
|
-
var elem =
|
|
1412
|
+
var elem = fs6[gracefulQueue].shift();
|
|
1413
1413
|
var fn = elem[0];
|
|
1414
1414
|
var args = elem[1];
|
|
1415
1415
|
var err = elem[2];
|
|
1416
1416
|
var startTime = elem[3];
|
|
1417
1417
|
var lastTime = elem[4];
|
|
1418
1418
|
if (startTime === void 0) {
|
|
1419
|
-
|
|
1419
|
+
debug2("RETRY", fn.name, args);
|
|
1420
1420
|
fn.apply(null, args);
|
|
1421
1421
|
} else if (Date.now() - startTime >= 6e4) {
|
|
1422
|
-
|
|
1422
|
+
debug2("TIMEOUT", fn.name, args);
|
|
1423
1423
|
var cb = args.pop();
|
|
1424
1424
|
if (typeof cb === "function")
|
|
1425
1425
|
cb.call(null, err);
|
|
@@ -1428,10 +1428,10 @@ var require_graceful_fs = __commonJS({
|
|
|
1428
1428
|
var sinceStart = Math.max(lastTime - startTime, 1);
|
|
1429
1429
|
var desiredDelay = Math.min(sinceStart * 1.2, 100);
|
|
1430
1430
|
if (sinceAttempt >= desiredDelay) {
|
|
1431
|
-
|
|
1431
|
+
debug2("RETRY", fn.name, args);
|
|
1432
1432
|
fn.apply(null, args.concat([startTime]));
|
|
1433
1433
|
} else {
|
|
1434
|
-
|
|
1434
|
+
fs6[gracefulQueue].push(elem);
|
|
1435
1435
|
}
|
|
1436
1436
|
}
|
|
1437
1437
|
if (retryTimer === void 0) {
|
|
@@ -1446,7 +1446,7 @@ var require_fs = __commonJS({
|
|
|
1446
1446
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/fs/index.js"(exports2) {
|
|
1447
1447
|
"use strict";
|
|
1448
1448
|
var u = require_universalify().fromCallback;
|
|
1449
|
-
var
|
|
1449
|
+
var fs6 = require_graceful_fs();
|
|
1450
1450
|
var api = [
|
|
1451
1451
|
"access",
|
|
1452
1452
|
"appendFile",
|
|
@@ -1483,26 +1483,26 @@ var require_fs = __commonJS({
|
|
|
1483
1483
|
"utimes",
|
|
1484
1484
|
"writeFile"
|
|
1485
1485
|
].filter((key) => {
|
|
1486
|
-
return typeof
|
|
1486
|
+
return typeof fs6[key] === "function";
|
|
1487
1487
|
});
|
|
1488
|
-
Object.assign(exports2,
|
|
1488
|
+
Object.assign(exports2, fs6);
|
|
1489
1489
|
api.forEach((method) => {
|
|
1490
|
-
exports2[method] = u(
|
|
1490
|
+
exports2[method] = u(fs6[method]);
|
|
1491
1491
|
});
|
|
1492
1492
|
exports2.exists = function(filename, callback) {
|
|
1493
1493
|
if (typeof callback === "function") {
|
|
1494
|
-
return
|
|
1494
|
+
return fs6.exists(filename, callback);
|
|
1495
1495
|
}
|
|
1496
1496
|
return new Promise((resolve) => {
|
|
1497
|
-
return
|
|
1497
|
+
return fs6.exists(filename, resolve);
|
|
1498
1498
|
});
|
|
1499
1499
|
};
|
|
1500
1500
|
exports2.read = function(fd, buffer, offset, length, position, callback) {
|
|
1501
1501
|
if (typeof callback === "function") {
|
|
1502
|
-
return
|
|
1502
|
+
return fs6.read(fd, buffer, offset, length, position, callback);
|
|
1503
1503
|
}
|
|
1504
1504
|
return new Promise((resolve, reject) => {
|
|
1505
|
-
|
|
1505
|
+
fs6.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
|
|
1506
1506
|
if (err) return reject(err);
|
|
1507
1507
|
resolve({ bytesRead, buffer: buffer2 });
|
|
1508
1508
|
});
|
|
@@ -1510,10 +1510,10 @@ var require_fs = __commonJS({
|
|
|
1510
1510
|
};
|
|
1511
1511
|
exports2.write = function(fd, buffer, ...args) {
|
|
1512
1512
|
if (typeof args[args.length - 1] === "function") {
|
|
1513
|
-
return
|
|
1513
|
+
return fs6.write(fd, buffer, ...args);
|
|
1514
1514
|
}
|
|
1515
1515
|
return new Promise((resolve, reject) => {
|
|
1516
|
-
|
|
1516
|
+
fs6.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
|
|
1517
1517
|
if (err) return reject(err);
|
|
1518
1518
|
resolve({ bytesWritten, buffer: buffer2 });
|
|
1519
1519
|
});
|
|
@@ -1521,10 +1521,10 @@ var require_fs = __commonJS({
|
|
|
1521
1521
|
};
|
|
1522
1522
|
exports2.readv = function(fd, buffers, ...args) {
|
|
1523
1523
|
if (typeof args[args.length - 1] === "function") {
|
|
1524
|
-
return
|
|
1524
|
+
return fs6.readv(fd, buffers, ...args);
|
|
1525
1525
|
}
|
|
1526
1526
|
return new Promise((resolve, reject) => {
|
|
1527
|
-
|
|
1527
|
+
fs6.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
|
|
1528
1528
|
if (err) return reject(err);
|
|
1529
1529
|
resolve({ bytesRead, buffers: buffers2 });
|
|
1530
1530
|
});
|
|
@@ -1532,17 +1532,17 @@ var require_fs = __commonJS({
|
|
|
1532
1532
|
};
|
|
1533
1533
|
exports2.writev = function(fd, buffers, ...args) {
|
|
1534
1534
|
if (typeof args[args.length - 1] === "function") {
|
|
1535
|
-
return
|
|
1535
|
+
return fs6.writev(fd, buffers, ...args);
|
|
1536
1536
|
}
|
|
1537
1537
|
return new Promise((resolve, reject) => {
|
|
1538
|
-
|
|
1538
|
+
fs6.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
|
|
1539
1539
|
if (err) return reject(err);
|
|
1540
1540
|
resolve({ bytesWritten, buffers: buffers2 });
|
|
1541
1541
|
});
|
|
1542
1542
|
});
|
|
1543
1543
|
};
|
|
1544
|
-
if (typeof
|
|
1545
|
-
exports2.realpath.native = u(
|
|
1544
|
+
if (typeof fs6.realpath.native === "function") {
|
|
1545
|
+
exports2.realpath.native = u(fs6.realpath.native);
|
|
1546
1546
|
} else {
|
|
1547
1547
|
process.emitWarning(
|
|
1548
1548
|
"fs.realpath.native is not a function. Is fs being monkey-patched?",
|
|
@@ -1557,10 +1557,10 @@ var require_fs = __commonJS({
|
|
|
1557
1557
|
var require_utils = __commonJS({
|
|
1558
1558
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/utils.js"(exports2, module2) {
|
|
1559
1559
|
"use strict";
|
|
1560
|
-
var
|
|
1560
|
+
var path5 = require("path");
|
|
1561
1561
|
module2.exports.checkPath = function checkPath(pth) {
|
|
1562
1562
|
if (process.platform === "win32") {
|
|
1563
|
-
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(
|
|
1563
|
+
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path5.parse(pth).root, ""));
|
|
1564
1564
|
if (pathHasInvalidWinCharacters) {
|
|
1565
1565
|
const error = new Error(`Path contains invalid characters: ${pth}`);
|
|
1566
1566
|
error.code = "EINVAL";
|
|
@@ -1575,7 +1575,7 @@ var require_utils = __commonJS({
|
|
|
1575
1575
|
var require_make_dir = __commonJS({
|
|
1576
1576
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports2, module2) {
|
|
1577
1577
|
"use strict";
|
|
1578
|
-
var
|
|
1578
|
+
var fs6 = require_fs();
|
|
1579
1579
|
var { checkPath } = require_utils();
|
|
1580
1580
|
var getMode = (options) => {
|
|
1581
1581
|
const defaults = { mode: 511 };
|
|
@@ -1584,14 +1584,14 @@ var require_make_dir = __commonJS({
|
|
|
1584
1584
|
};
|
|
1585
1585
|
module2.exports.makeDir = async (dir, options) => {
|
|
1586
1586
|
checkPath(dir);
|
|
1587
|
-
return
|
|
1587
|
+
return fs6.mkdir(dir, {
|
|
1588
1588
|
mode: getMode(options),
|
|
1589
1589
|
recursive: true
|
|
1590
1590
|
});
|
|
1591
1591
|
};
|
|
1592
1592
|
module2.exports.makeDirSync = (dir, options) => {
|
|
1593
1593
|
checkPath(dir);
|
|
1594
|
-
return
|
|
1594
|
+
return fs6.mkdirSync(dir, {
|
|
1595
1595
|
mode: getMode(options),
|
|
1596
1596
|
recursive: true
|
|
1597
1597
|
});
|
|
@@ -1623,13 +1623,13 @@ var require_path_exists = __commonJS({
|
|
|
1623
1623
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/path-exists/index.js"(exports2, module2) {
|
|
1624
1624
|
"use strict";
|
|
1625
1625
|
var u = require_universalify().fromPromise;
|
|
1626
|
-
var
|
|
1627
|
-
function pathExists(
|
|
1628
|
-
return
|
|
1626
|
+
var fs6 = require_fs();
|
|
1627
|
+
function pathExists(path5) {
|
|
1628
|
+
return fs6.access(path5).then(() => true).catch(() => false);
|
|
1629
1629
|
}
|
|
1630
1630
|
module2.exports = {
|
|
1631
1631
|
pathExists: u(pathExists),
|
|
1632
|
-
pathExistsSync:
|
|
1632
|
+
pathExistsSync: fs6.existsSync
|
|
1633
1633
|
};
|
|
1634
1634
|
}
|
|
1635
1635
|
});
|
|
@@ -1638,16 +1638,16 @@ var require_path_exists = __commonJS({
|
|
|
1638
1638
|
var require_utimes = __commonJS({
|
|
1639
1639
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/utimes.js"(exports2, module2) {
|
|
1640
1640
|
"use strict";
|
|
1641
|
-
var
|
|
1641
|
+
var fs6 = require_fs();
|
|
1642
1642
|
var u = require_universalify().fromPromise;
|
|
1643
|
-
async function utimesMillis(
|
|
1644
|
-
const fd = await
|
|
1643
|
+
async function utimesMillis(path5, atime, mtime) {
|
|
1644
|
+
const fd = await fs6.open(path5, "r+");
|
|
1645
1645
|
let closeErr = null;
|
|
1646
1646
|
try {
|
|
1647
|
-
await
|
|
1647
|
+
await fs6.futimes(fd, atime, mtime);
|
|
1648
1648
|
} finally {
|
|
1649
1649
|
try {
|
|
1650
|
-
await
|
|
1650
|
+
await fs6.close(fd);
|
|
1651
1651
|
} catch (e) {
|
|
1652
1652
|
closeErr = e;
|
|
1653
1653
|
}
|
|
@@ -1656,10 +1656,10 @@ var require_utimes = __commonJS({
|
|
|
1656
1656
|
throw closeErr;
|
|
1657
1657
|
}
|
|
1658
1658
|
}
|
|
1659
|
-
function utimesMillisSync(
|
|
1660
|
-
const fd =
|
|
1661
|
-
|
|
1662
|
-
return
|
|
1659
|
+
function utimesMillisSync(path5, atime, mtime) {
|
|
1660
|
+
const fd = fs6.openSync(path5, "r+");
|
|
1661
|
+
fs6.futimesSync(fd, atime, mtime);
|
|
1662
|
+
return fs6.closeSync(fd);
|
|
1663
1663
|
}
|
|
1664
1664
|
module2.exports = {
|
|
1665
1665
|
utimesMillis: u(utimesMillis),
|
|
@@ -1672,11 +1672,11 @@ var require_utimes = __commonJS({
|
|
|
1672
1672
|
var require_stat = __commonJS({
|
|
1673
1673
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/stat.js"(exports2, module2) {
|
|
1674
1674
|
"use strict";
|
|
1675
|
-
var
|
|
1676
|
-
var
|
|
1675
|
+
var fs6 = require_fs();
|
|
1676
|
+
var path5 = require("path");
|
|
1677
1677
|
var u = require_universalify().fromPromise;
|
|
1678
1678
|
function getStats(src, dest, opts) {
|
|
1679
|
-
const statFunc = opts.dereference ? (file) =>
|
|
1679
|
+
const statFunc = opts.dereference ? (file) => fs6.stat(file, { bigint: true }) : (file) => fs6.lstat(file, { bigint: true });
|
|
1680
1680
|
return Promise.all([
|
|
1681
1681
|
statFunc(src),
|
|
1682
1682
|
statFunc(dest).catch((err) => {
|
|
@@ -1687,7 +1687,7 @@ var require_stat = __commonJS({
|
|
|
1687
1687
|
}
|
|
1688
1688
|
function getStatsSync(src, dest, opts) {
|
|
1689
1689
|
let destStat;
|
|
1690
|
-
const statFunc = opts.dereference ? (file) =>
|
|
1690
|
+
const statFunc = opts.dereference ? (file) => fs6.statSync(file, { bigint: true }) : (file) => fs6.lstatSync(file, { bigint: true });
|
|
1691
1691
|
const srcStat = statFunc(src);
|
|
1692
1692
|
try {
|
|
1693
1693
|
destStat = statFunc(dest);
|
|
@@ -1701,8 +1701,8 @@ var require_stat = __commonJS({
|
|
|
1701
1701
|
const { srcStat, destStat } = await getStats(src, dest, opts);
|
|
1702
1702
|
if (destStat) {
|
|
1703
1703
|
if (areIdentical(srcStat, destStat)) {
|
|
1704
|
-
const srcBaseName =
|
|
1705
|
-
const destBaseName =
|
|
1704
|
+
const srcBaseName = path5.basename(src);
|
|
1705
|
+
const destBaseName = path5.basename(dest);
|
|
1706
1706
|
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
1707
1707
|
return { srcStat, destStat, isChangingCase: true };
|
|
1708
1708
|
}
|
|
@@ -1724,8 +1724,8 @@ var require_stat = __commonJS({
|
|
|
1724
1724
|
const { srcStat, destStat } = getStatsSync(src, dest, opts);
|
|
1725
1725
|
if (destStat) {
|
|
1726
1726
|
if (areIdentical(srcStat, destStat)) {
|
|
1727
|
-
const srcBaseName =
|
|
1728
|
-
const destBaseName =
|
|
1727
|
+
const srcBaseName = path5.basename(src);
|
|
1728
|
+
const destBaseName = path5.basename(dest);
|
|
1729
1729
|
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
1730
1730
|
return { srcStat, destStat, isChangingCase: true };
|
|
1731
1731
|
}
|
|
@@ -1744,12 +1744,12 @@ var require_stat = __commonJS({
|
|
|
1744
1744
|
return { srcStat, destStat };
|
|
1745
1745
|
}
|
|
1746
1746
|
async function checkParentPaths(src, srcStat, dest, funcName) {
|
|
1747
|
-
const srcParent =
|
|
1748
|
-
const destParent =
|
|
1749
|
-
if (destParent === srcParent || destParent ===
|
|
1747
|
+
const srcParent = path5.resolve(path5.dirname(src));
|
|
1748
|
+
const destParent = path5.resolve(path5.dirname(dest));
|
|
1749
|
+
if (destParent === srcParent || destParent === path5.parse(destParent).root) return;
|
|
1750
1750
|
let destStat;
|
|
1751
1751
|
try {
|
|
1752
|
-
destStat = await
|
|
1752
|
+
destStat = await fs6.stat(destParent, { bigint: true });
|
|
1753
1753
|
} catch (err) {
|
|
1754
1754
|
if (err.code === "ENOENT") return;
|
|
1755
1755
|
throw err;
|
|
@@ -1760,12 +1760,12 @@ var require_stat = __commonJS({
|
|
|
1760
1760
|
return checkParentPaths(src, srcStat, destParent, funcName);
|
|
1761
1761
|
}
|
|
1762
1762
|
function checkParentPathsSync(src, srcStat, dest, funcName) {
|
|
1763
|
-
const srcParent =
|
|
1764
|
-
const destParent =
|
|
1765
|
-
if (destParent === srcParent || destParent ===
|
|
1763
|
+
const srcParent = path5.resolve(path5.dirname(src));
|
|
1764
|
+
const destParent = path5.resolve(path5.dirname(dest));
|
|
1765
|
+
if (destParent === srcParent || destParent === path5.parse(destParent).root) return;
|
|
1766
1766
|
let destStat;
|
|
1767
1767
|
try {
|
|
1768
|
-
destStat =
|
|
1768
|
+
destStat = fs6.statSync(destParent, { bigint: true });
|
|
1769
1769
|
} catch (err) {
|
|
1770
1770
|
if (err.code === "ENOENT") return;
|
|
1771
1771
|
throw err;
|
|
@@ -1779,8 +1779,8 @@ var require_stat = __commonJS({
|
|
|
1779
1779
|
return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
|
|
1780
1780
|
}
|
|
1781
1781
|
function isSrcSubdir(src, dest) {
|
|
1782
|
-
const srcArr =
|
|
1783
|
-
const destArr =
|
|
1782
|
+
const srcArr = path5.resolve(src).split(path5.sep).filter((i) => i);
|
|
1783
|
+
const destArr = path5.resolve(dest).split(path5.sep).filter((i) => i);
|
|
1784
1784
|
return srcArr.every((cur, i) => destArr[i] === cur);
|
|
1785
1785
|
}
|
|
1786
1786
|
function errMsg(src, dest, funcName) {
|
|
@@ -1804,8 +1804,8 @@ var require_stat = __commonJS({
|
|
|
1804
1804
|
var require_copy = __commonJS({
|
|
1805
1805
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy.js"(exports2, module2) {
|
|
1806
1806
|
"use strict";
|
|
1807
|
-
var
|
|
1808
|
-
var
|
|
1807
|
+
var fs6 = require_fs();
|
|
1808
|
+
var path5 = require("path");
|
|
1809
1809
|
var { mkdirs } = require_mkdirs();
|
|
1810
1810
|
var { pathExists } = require_path_exists();
|
|
1811
1811
|
var { utimesMillis } = require_utimes();
|
|
@@ -1827,7 +1827,7 @@ var require_copy = __commonJS({
|
|
|
1827
1827
|
await stat.checkParentPaths(src, srcStat, dest, "copy");
|
|
1828
1828
|
const include = await runFilter(src, dest, opts);
|
|
1829
1829
|
if (!include) return;
|
|
1830
|
-
const destParent =
|
|
1830
|
+
const destParent = path5.dirname(dest);
|
|
1831
1831
|
const dirExists = await pathExists(destParent);
|
|
1832
1832
|
if (!dirExists) {
|
|
1833
1833
|
await mkdirs(destParent);
|
|
@@ -1839,7 +1839,7 @@ var require_copy = __commonJS({
|
|
|
1839
1839
|
return opts.filter(src, dest);
|
|
1840
1840
|
}
|
|
1841
1841
|
async function getStatsAndPerformCopy(destStat, src, dest, opts) {
|
|
1842
|
-
const statFn = opts.dereference ?
|
|
1842
|
+
const statFn = opts.dereference ? fs6.stat : fs6.lstat;
|
|
1843
1843
|
const srcStat = await statFn(src);
|
|
1844
1844
|
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
|
|
1845
1845
|
if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
|
|
@@ -1851,7 +1851,7 @@ var require_copy = __commonJS({
|
|
|
1851
1851
|
async function onFile(srcStat, destStat, src, dest, opts) {
|
|
1852
1852
|
if (!destStat) return copyFile(srcStat, src, dest, opts);
|
|
1853
1853
|
if (opts.overwrite) {
|
|
1854
|
-
await
|
|
1854
|
+
await fs6.unlink(dest);
|
|
1855
1855
|
return copyFile(srcStat, src, dest, opts);
|
|
1856
1856
|
}
|
|
1857
1857
|
if (opts.errorOnExist) {
|
|
@@ -1859,56 +1859,56 @@ var require_copy = __commonJS({
|
|
|
1859
1859
|
}
|
|
1860
1860
|
}
|
|
1861
1861
|
async function copyFile(srcStat, src, dest, opts) {
|
|
1862
|
-
await
|
|
1862
|
+
await fs6.copyFile(src, dest);
|
|
1863
1863
|
if (opts.preserveTimestamps) {
|
|
1864
1864
|
if (fileIsNotWritable(srcStat.mode)) {
|
|
1865
1865
|
await makeFileWritable(dest, srcStat.mode);
|
|
1866
1866
|
}
|
|
1867
|
-
const updatedSrcStat = await
|
|
1867
|
+
const updatedSrcStat = await fs6.stat(src);
|
|
1868
1868
|
await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
1869
1869
|
}
|
|
1870
|
-
return
|
|
1870
|
+
return fs6.chmod(dest, srcStat.mode);
|
|
1871
1871
|
}
|
|
1872
1872
|
function fileIsNotWritable(srcMode) {
|
|
1873
1873
|
return (srcMode & 128) === 0;
|
|
1874
1874
|
}
|
|
1875
1875
|
function makeFileWritable(dest, srcMode) {
|
|
1876
|
-
return
|
|
1876
|
+
return fs6.chmod(dest, srcMode | 128);
|
|
1877
1877
|
}
|
|
1878
1878
|
async function onDir(srcStat, destStat, src, dest, opts) {
|
|
1879
1879
|
if (!destStat) {
|
|
1880
|
-
await
|
|
1880
|
+
await fs6.mkdir(dest);
|
|
1881
1881
|
}
|
|
1882
|
-
const items = await
|
|
1882
|
+
const items = await fs6.readdir(src);
|
|
1883
1883
|
await Promise.all(items.map(async (item) => {
|
|
1884
|
-
const srcItem =
|
|
1885
|
-
const destItem =
|
|
1884
|
+
const srcItem = path5.join(src, item);
|
|
1885
|
+
const destItem = path5.join(dest, item);
|
|
1886
1886
|
const include = await runFilter(srcItem, destItem, opts);
|
|
1887
1887
|
if (!include) return;
|
|
1888
1888
|
const { destStat: destStat2 } = await stat.checkPaths(srcItem, destItem, "copy", opts);
|
|
1889
1889
|
return getStatsAndPerformCopy(destStat2, srcItem, destItem, opts);
|
|
1890
1890
|
}));
|
|
1891
1891
|
if (!destStat) {
|
|
1892
|
-
await
|
|
1892
|
+
await fs6.chmod(dest, srcStat.mode);
|
|
1893
1893
|
}
|
|
1894
1894
|
}
|
|
1895
1895
|
async function onLink(destStat, src, dest, opts) {
|
|
1896
|
-
let resolvedSrc = await
|
|
1896
|
+
let resolvedSrc = await fs6.readlink(src);
|
|
1897
1897
|
if (opts.dereference) {
|
|
1898
|
-
resolvedSrc =
|
|
1898
|
+
resolvedSrc = path5.resolve(process.cwd(), resolvedSrc);
|
|
1899
1899
|
}
|
|
1900
1900
|
if (!destStat) {
|
|
1901
|
-
return
|
|
1901
|
+
return fs6.symlink(resolvedSrc, dest);
|
|
1902
1902
|
}
|
|
1903
1903
|
let resolvedDest = null;
|
|
1904
1904
|
try {
|
|
1905
|
-
resolvedDest = await
|
|
1905
|
+
resolvedDest = await fs6.readlink(dest);
|
|
1906
1906
|
} catch (e) {
|
|
1907
|
-
if (e.code === "EINVAL" || e.code === "UNKNOWN") return
|
|
1907
|
+
if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs6.symlink(resolvedSrc, dest);
|
|
1908
1908
|
throw e;
|
|
1909
1909
|
}
|
|
1910
1910
|
if (opts.dereference) {
|
|
1911
|
-
resolvedDest =
|
|
1911
|
+
resolvedDest = path5.resolve(process.cwd(), resolvedDest);
|
|
1912
1912
|
}
|
|
1913
1913
|
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
1914
1914
|
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
|
|
@@ -1916,8 +1916,8 @@ var require_copy = __commonJS({
|
|
|
1916
1916
|
if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
|
|
1917
1917
|
throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
|
|
1918
1918
|
}
|
|
1919
|
-
await
|
|
1920
|
-
return
|
|
1919
|
+
await fs6.unlink(dest);
|
|
1920
|
+
return fs6.symlink(resolvedSrc, dest);
|
|
1921
1921
|
}
|
|
1922
1922
|
module2.exports = copy2;
|
|
1923
1923
|
}
|
|
@@ -1927,8 +1927,8 @@ var require_copy = __commonJS({
|
|
|
1927
1927
|
var require_copy_sync = __commonJS({
|
|
1928
1928
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy-sync.js"(exports2, module2) {
|
|
1929
1929
|
"use strict";
|
|
1930
|
-
var
|
|
1931
|
-
var
|
|
1930
|
+
var fs6 = require_graceful_fs();
|
|
1931
|
+
var path5 = require("path");
|
|
1932
1932
|
var mkdirsSync = require_mkdirs().mkdirsSync;
|
|
1933
1933
|
var utimesMillisSync = require_utimes().utimesMillisSync;
|
|
1934
1934
|
var stat = require_stat();
|
|
@@ -1949,12 +1949,12 @@ var require_copy_sync = __commonJS({
|
|
|
1949
1949
|
const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
|
|
1950
1950
|
stat.checkParentPathsSync(src, srcStat, dest, "copy");
|
|
1951
1951
|
if (opts.filter && !opts.filter(src, dest)) return;
|
|
1952
|
-
const destParent =
|
|
1953
|
-
if (!
|
|
1952
|
+
const destParent = path5.dirname(dest);
|
|
1953
|
+
if (!fs6.existsSync(destParent)) mkdirsSync(destParent);
|
|
1954
1954
|
return getStats(destStat, src, dest, opts);
|
|
1955
1955
|
}
|
|
1956
1956
|
function getStats(destStat, src, dest, opts) {
|
|
1957
|
-
const statSync = opts.dereference ?
|
|
1957
|
+
const statSync = opts.dereference ? fs6.statSync : fs6.lstatSync;
|
|
1958
1958
|
const srcStat = statSync(src);
|
|
1959
1959
|
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
|
|
1960
1960
|
else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
|
|
@@ -1969,14 +1969,14 @@ var require_copy_sync = __commonJS({
|
|
|
1969
1969
|
}
|
|
1970
1970
|
function mayCopyFile(srcStat, src, dest, opts) {
|
|
1971
1971
|
if (opts.overwrite) {
|
|
1972
|
-
|
|
1972
|
+
fs6.unlinkSync(dest);
|
|
1973
1973
|
return copyFile(srcStat, src, dest, opts);
|
|
1974
1974
|
} else if (opts.errorOnExist) {
|
|
1975
1975
|
throw new Error(`'${dest}' already exists`);
|
|
1976
1976
|
}
|
|
1977
1977
|
}
|
|
1978
1978
|
function copyFile(srcStat, src, dest, opts) {
|
|
1979
|
-
|
|
1979
|
+
fs6.copyFileSync(src, dest);
|
|
1980
1980
|
if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest);
|
|
1981
1981
|
return setDestMode(dest, srcStat.mode);
|
|
1982
1982
|
}
|
|
@@ -1991,10 +1991,10 @@ var require_copy_sync = __commonJS({
|
|
|
1991
1991
|
return setDestMode(dest, srcMode | 128);
|
|
1992
1992
|
}
|
|
1993
1993
|
function setDestMode(dest, srcMode) {
|
|
1994
|
-
return
|
|
1994
|
+
return fs6.chmodSync(dest, srcMode);
|
|
1995
1995
|
}
|
|
1996
1996
|
function setDestTimestamps(src, dest) {
|
|
1997
|
-
const updatedSrcStat =
|
|
1997
|
+
const updatedSrcStat = fs6.statSync(src);
|
|
1998
1998
|
return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
1999
1999
|
}
|
|
2000
2000
|
function onDir(srcStat, destStat, src, dest, opts) {
|
|
@@ -2002,37 +2002,37 @@ var require_copy_sync = __commonJS({
|
|
|
2002
2002
|
return copyDir(src, dest, opts);
|
|
2003
2003
|
}
|
|
2004
2004
|
function mkDirAndCopy(srcMode, src, dest, opts) {
|
|
2005
|
-
|
|
2005
|
+
fs6.mkdirSync(dest);
|
|
2006
2006
|
copyDir(src, dest, opts);
|
|
2007
2007
|
return setDestMode(dest, srcMode);
|
|
2008
2008
|
}
|
|
2009
2009
|
function copyDir(src, dest, opts) {
|
|
2010
|
-
|
|
2010
|
+
fs6.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
|
|
2011
2011
|
}
|
|
2012
2012
|
function copyDirItem(item, src, dest, opts) {
|
|
2013
|
-
const srcItem =
|
|
2014
|
-
const destItem =
|
|
2013
|
+
const srcItem = path5.join(src, item);
|
|
2014
|
+
const destItem = path5.join(dest, item);
|
|
2015
2015
|
if (opts.filter && !opts.filter(srcItem, destItem)) return;
|
|
2016
2016
|
const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
|
|
2017
2017
|
return getStats(destStat, srcItem, destItem, opts);
|
|
2018
2018
|
}
|
|
2019
2019
|
function onLink(destStat, src, dest, opts) {
|
|
2020
|
-
let resolvedSrc =
|
|
2020
|
+
let resolvedSrc = fs6.readlinkSync(src);
|
|
2021
2021
|
if (opts.dereference) {
|
|
2022
|
-
resolvedSrc =
|
|
2022
|
+
resolvedSrc = path5.resolve(process.cwd(), resolvedSrc);
|
|
2023
2023
|
}
|
|
2024
2024
|
if (!destStat) {
|
|
2025
|
-
return
|
|
2025
|
+
return fs6.symlinkSync(resolvedSrc, dest);
|
|
2026
2026
|
} else {
|
|
2027
2027
|
let resolvedDest;
|
|
2028
2028
|
try {
|
|
2029
|
-
resolvedDest =
|
|
2029
|
+
resolvedDest = fs6.readlinkSync(dest);
|
|
2030
2030
|
} catch (err) {
|
|
2031
|
-
if (err.code === "EINVAL" || err.code === "UNKNOWN") return
|
|
2031
|
+
if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs6.symlinkSync(resolvedSrc, dest);
|
|
2032
2032
|
throw err;
|
|
2033
2033
|
}
|
|
2034
2034
|
if (opts.dereference) {
|
|
2035
|
-
resolvedDest =
|
|
2035
|
+
resolvedDest = path5.resolve(process.cwd(), resolvedDest);
|
|
2036
2036
|
}
|
|
2037
2037
|
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
2038
2038
|
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
|
|
@@ -2044,8 +2044,8 @@ var require_copy_sync = __commonJS({
|
|
|
2044
2044
|
}
|
|
2045
2045
|
}
|
|
2046
2046
|
function copyLink(resolvedSrc, dest) {
|
|
2047
|
-
|
|
2048
|
-
return
|
|
2047
|
+
fs6.unlinkSync(dest);
|
|
2048
|
+
return fs6.symlinkSync(resolvedSrc, dest);
|
|
2049
2049
|
}
|
|
2050
2050
|
module2.exports = copySync;
|
|
2051
2051
|
}
|
|
@@ -2067,13 +2067,13 @@ var require_copy2 = __commonJS({
|
|
|
2067
2067
|
var require_remove = __commonJS({
|
|
2068
2068
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/remove/index.js"(exports2, module2) {
|
|
2069
2069
|
"use strict";
|
|
2070
|
-
var
|
|
2070
|
+
var fs6 = require_graceful_fs();
|
|
2071
2071
|
var u = require_universalify().fromCallback;
|
|
2072
|
-
function remove(
|
|
2073
|
-
|
|
2072
|
+
function remove(path5, callback) {
|
|
2073
|
+
fs6.rm(path5, { recursive: true, force: true }, callback);
|
|
2074
2074
|
}
|
|
2075
|
-
function removeSync(
|
|
2076
|
-
|
|
2075
|
+
function removeSync(path5) {
|
|
2076
|
+
fs6.rmSync(path5, { recursive: true, force: true });
|
|
2077
2077
|
}
|
|
2078
2078
|
module2.exports = {
|
|
2079
2079
|
remove: u(remove),
|
|
@@ -2087,28 +2087,28 @@ var require_empty = __commonJS({
|
|
|
2087
2087
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/empty/index.js"(exports2, module2) {
|
|
2088
2088
|
"use strict";
|
|
2089
2089
|
var u = require_universalify().fromPromise;
|
|
2090
|
-
var
|
|
2091
|
-
var
|
|
2090
|
+
var fs6 = require_fs();
|
|
2091
|
+
var path5 = require("path");
|
|
2092
2092
|
var mkdir = require_mkdirs();
|
|
2093
2093
|
var remove = require_remove();
|
|
2094
2094
|
var emptyDir = u(async function emptyDir2(dir) {
|
|
2095
2095
|
let items;
|
|
2096
2096
|
try {
|
|
2097
|
-
items = await
|
|
2097
|
+
items = await fs6.readdir(dir);
|
|
2098
2098
|
} catch {
|
|
2099
2099
|
return mkdir.mkdirs(dir);
|
|
2100
2100
|
}
|
|
2101
|
-
return Promise.all(items.map((item) => remove.remove(
|
|
2101
|
+
return Promise.all(items.map((item) => remove.remove(path5.join(dir, item))));
|
|
2102
2102
|
});
|
|
2103
2103
|
function emptyDirSync(dir) {
|
|
2104
2104
|
let items;
|
|
2105
2105
|
try {
|
|
2106
|
-
items =
|
|
2106
|
+
items = fs6.readdirSync(dir);
|
|
2107
2107
|
} catch {
|
|
2108
2108
|
return mkdir.mkdirsSync(dir);
|
|
2109
2109
|
}
|
|
2110
2110
|
items.forEach((item) => {
|
|
2111
|
-
item =
|
|
2111
|
+
item = path5.join(dir, item);
|
|
2112
2112
|
remove.removeSync(item);
|
|
2113
2113
|
});
|
|
2114
2114
|
}
|
|
@@ -2126,52 +2126,52 @@ var require_file = __commonJS({
|
|
|
2126
2126
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/file.js"(exports2, module2) {
|
|
2127
2127
|
"use strict";
|
|
2128
2128
|
var u = require_universalify().fromPromise;
|
|
2129
|
-
var
|
|
2130
|
-
var
|
|
2129
|
+
var path5 = require("path");
|
|
2130
|
+
var fs6 = require_fs();
|
|
2131
2131
|
var mkdir = require_mkdirs();
|
|
2132
2132
|
async function createFile(file) {
|
|
2133
2133
|
let stats;
|
|
2134
2134
|
try {
|
|
2135
|
-
stats = await
|
|
2135
|
+
stats = await fs6.stat(file);
|
|
2136
2136
|
} catch {
|
|
2137
2137
|
}
|
|
2138
2138
|
if (stats && stats.isFile()) return;
|
|
2139
|
-
const dir =
|
|
2139
|
+
const dir = path5.dirname(file);
|
|
2140
2140
|
let dirStats = null;
|
|
2141
2141
|
try {
|
|
2142
|
-
dirStats = await
|
|
2142
|
+
dirStats = await fs6.stat(dir);
|
|
2143
2143
|
} catch (err) {
|
|
2144
2144
|
if (err.code === "ENOENT") {
|
|
2145
2145
|
await mkdir.mkdirs(dir);
|
|
2146
|
-
await
|
|
2146
|
+
await fs6.writeFile(file, "");
|
|
2147
2147
|
return;
|
|
2148
2148
|
} else {
|
|
2149
2149
|
throw err;
|
|
2150
2150
|
}
|
|
2151
2151
|
}
|
|
2152
2152
|
if (dirStats.isDirectory()) {
|
|
2153
|
-
await
|
|
2153
|
+
await fs6.writeFile(file, "");
|
|
2154
2154
|
} else {
|
|
2155
|
-
await
|
|
2155
|
+
await fs6.readdir(dir);
|
|
2156
2156
|
}
|
|
2157
2157
|
}
|
|
2158
2158
|
function createFileSync(file) {
|
|
2159
2159
|
let stats;
|
|
2160
2160
|
try {
|
|
2161
|
-
stats =
|
|
2161
|
+
stats = fs6.statSync(file);
|
|
2162
2162
|
} catch {
|
|
2163
2163
|
}
|
|
2164
2164
|
if (stats && stats.isFile()) return;
|
|
2165
|
-
const dir =
|
|
2165
|
+
const dir = path5.dirname(file);
|
|
2166
2166
|
try {
|
|
2167
|
-
if (!
|
|
2168
|
-
|
|
2167
|
+
if (!fs6.statSync(dir).isDirectory()) {
|
|
2168
|
+
fs6.readdirSync(dir);
|
|
2169
2169
|
}
|
|
2170
2170
|
} catch (err) {
|
|
2171
2171
|
if (err && err.code === "ENOENT") mkdir.mkdirsSync(dir);
|
|
2172
2172
|
else throw err;
|
|
2173
2173
|
}
|
|
2174
|
-
|
|
2174
|
+
fs6.writeFileSync(file, "");
|
|
2175
2175
|
}
|
|
2176
2176
|
module2.exports = {
|
|
2177
2177
|
createFile: u(createFile),
|
|
@@ -2185,50 +2185,50 @@ var require_link = __commonJS({
|
|
|
2185
2185
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/link.js"(exports2, module2) {
|
|
2186
2186
|
"use strict";
|
|
2187
2187
|
var u = require_universalify().fromPromise;
|
|
2188
|
-
var
|
|
2189
|
-
var
|
|
2188
|
+
var path5 = require("path");
|
|
2189
|
+
var fs6 = require_fs();
|
|
2190
2190
|
var mkdir = require_mkdirs();
|
|
2191
2191
|
var { pathExists } = require_path_exists();
|
|
2192
2192
|
var { areIdentical } = require_stat();
|
|
2193
2193
|
async function createLink(srcpath, dstpath) {
|
|
2194
2194
|
let dstStat;
|
|
2195
2195
|
try {
|
|
2196
|
-
dstStat = await
|
|
2196
|
+
dstStat = await fs6.lstat(dstpath);
|
|
2197
2197
|
} catch {
|
|
2198
2198
|
}
|
|
2199
2199
|
let srcStat;
|
|
2200
2200
|
try {
|
|
2201
|
-
srcStat = await
|
|
2201
|
+
srcStat = await fs6.lstat(srcpath);
|
|
2202
2202
|
} catch (err) {
|
|
2203
2203
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
2204
2204
|
throw err;
|
|
2205
2205
|
}
|
|
2206
2206
|
if (dstStat && areIdentical(srcStat, dstStat)) return;
|
|
2207
|
-
const dir =
|
|
2207
|
+
const dir = path5.dirname(dstpath);
|
|
2208
2208
|
const dirExists = await pathExists(dir);
|
|
2209
2209
|
if (!dirExists) {
|
|
2210
2210
|
await mkdir.mkdirs(dir);
|
|
2211
2211
|
}
|
|
2212
|
-
await
|
|
2212
|
+
await fs6.link(srcpath, dstpath);
|
|
2213
2213
|
}
|
|
2214
2214
|
function createLinkSync(srcpath, dstpath) {
|
|
2215
2215
|
let dstStat;
|
|
2216
2216
|
try {
|
|
2217
|
-
dstStat =
|
|
2217
|
+
dstStat = fs6.lstatSync(dstpath);
|
|
2218
2218
|
} catch {
|
|
2219
2219
|
}
|
|
2220
2220
|
try {
|
|
2221
|
-
const srcStat =
|
|
2221
|
+
const srcStat = fs6.lstatSync(srcpath);
|
|
2222
2222
|
if (dstStat && areIdentical(srcStat, dstStat)) return;
|
|
2223
2223
|
} catch (err) {
|
|
2224
2224
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
2225
2225
|
throw err;
|
|
2226
2226
|
}
|
|
2227
|
-
const dir =
|
|
2228
|
-
const dirExists =
|
|
2229
|
-
if (dirExists) return
|
|
2227
|
+
const dir = path5.dirname(dstpath);
|
|
2228
|
+
const dirExists = fs6.existsSync(dir);
|
|
2229
|
+
if (dirExists) return fs6.linkSync(srcpath, dstpath);
|
|
2230
2230
|
mkdir.mkdirsSync(dir);
|
|
2231
|
-
return
|
|
2231
|
+
return fs6.linkSync(srcpath, dstpath);
|
|
2232
2232
|
}
|
|
2233
2233
|
module2.exports = {
|
|
2234
2234
|
createLink: u(createLink),
|
|
@@ -2241,14 +2241,14 @@ var require_link = __commonJS({
|
|
|
2241
2241
|
var require_symlink_paths = __commonJS({
|
|
2242
2242
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports2, module2) {
|
|
2243
2243
|
"use strict";
|
|
2244
|
-
var
|
|
2245
|
-
var
|
|
2244
|
+
var path5 = require("path");
|
|
2245
|
+
var fs6 = require_fs();
|
|
2246
2246
|
var { pathExists } = require_path_exists();
|
|
2247
2247
|
var u = require_universalify().fromPromise;
|
|
2248
2248
|
async function symlinkPaths(srcpath, dstpath) {
|
|
2249
|
-
if (
|
|
2249
|
+
if (path5.isAbsolute(srcpath)) {
|
|
2250
2250
|
try {
|
|
2251
|
-
await
|
|
2251
|
+
await fs6.lstat(srcpath);
|
|
2252
2252
|
} catch (err) {
|
|
2253
2253
|
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
2254
2254
|
throw err;
|
|
@@ -2258,8 +2258,8 @@ var require_symlink_paths = __commonJS({
|
|
|
2258
2258
|
toDst: srcpath
|
|
2259
2259
|
};
|
|
2260
2260
|
}
|
|
2261
|
-
const dstdir =
|
|
2262
|
-
const relativeToDst =
|
|
2261
|
+
const dstdir = path5.dirname(dstpath);
|
|
2262
|
+
const relativeToDst = path5.join(dstdir, srcpath);
|
|
2263
2263
|
const exists = await pathExists(relativeToDst);
|
|
2264
2264
|
if (exists) {
|
|
2265
2265
|
return {
|
|
@@ -2268,39 +2268,39 @@ var require_symlink_paths = __commonJS({
|
|
|
2268
2268
|
};
|
|
2269
2269
|
}
|
|
2270
2270
|
try {
|
|
2271
|
-
await
|
|
2271
|
+
await fs6.lstat(srcpath);
|
|
2272
2272
|
} catch (err) {
|
|
2273
2273
|
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
2274
2274
|
throw err;
|
|
2275
2275
|
}
|
|
2276
2276
|
return {
|
|
2277
2277
|
toCwd: srcpath,
|
|
2278
|
-
toDst:
|
|
2278
|
+
toDst: path5.relative(dstdir, srcpath)
|
|
2279
2279
|
};
|
|
2280
2280
|
}
|
|
2281
2281
|
function symlinkPathsSync(srcpath, dstpath) {
|
|
2282
|
-
if (
|
|
2283
|
-
const exists2 =
|
|
2282
|
+
if (path5.isAbsolute(srcpath)) {
|
|
2283
|
+
const exists2 = fs6.existsSync(srcpath);
|
|
2284
2284
|
if (!exists2) throw new Error("absolute srcpath does not exist");
|
|
2285
2285
|
return {
|
|
2286
2286
|
toCwd: srcpath,
|
|
2287
2287
|
toDst: srcpath
|
|
2288
2288
|
};
|
|
2289
2289
|
}
|
|
2290
|
-
const dstdir =
|
|
2291
|
-
const relativeToDst =
|
|
2292
|
-
const exists =
|
|
2290
|
+
const dstdir = path5.dirname(dstpath);
|
|
2291
|
+
const relativeToDst = path5.join(dstdir, srcpath);
|
|
2292
|
+
const exists = fs6.existsSync(relativeToDst);
|
|
2293
2293
|
if (exists) {
|
|
2294
2294
|
return {
|
|
2295
2295
|
toCwd: relativeToDst,
|
|
2296
2296
|
toDst: srcpath
|
|
2297
2297
|
};
|
|
2298
2298
|
}
|
|
2299
|
-
const srcExists =
|
|
2299
|
+
const srcExists = fs6.existsSync(srcpath);
|
|
2300
2300
|
if (!srcExists) throw new Error("relative srcpath does not exist");
|
|
2301
2301
|
return {
|
|
2302
2302
|
toCwd: srcpath,
|
|
2303
|
-
toDst:
|
|
2303
|
+
toDst: path5.relative(dstdir, srcpath)
|
|
2304
2304
|
};
|
|
2305
2305
|
}
|
|
2306
2306
|
module2.exports = {
|
|
@@ -2314,13 +2314,13 @@ var require_symlink_paths = __commonJS({
|
|
|
2314
2314
|
var require_symlink_type = __commonJS({
|
|
2315
2315
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports2, module2) {
|
|
2316
2316
|
"use strict";
|
|
2317
|
-
var
|
|
2317
|
+
var fs6 = require_fs();
|
|
2318
2318
|
var u = require_universalify().fromPromise;
|
|
2319
2319
|
async function symlinkType(srcpath, type) {
|
|
2320
2320
|
if (type) return type;
|
|
2321
2321
|
let stats;
|
|
2322
2322
|
try {
|
|
2323
|
-
stats = await
|
|
2323
|
+
stats = await fs6.lstat(srcpath);
|
|
2324
2324
|
} catch {
|
|
2325
2325
|
return "file";
|
|
2326
2326
|
}
|
|
@@ -2330,7 +2330,7 @@ var require_symlink_type = __commonJS({
|
|
|
2330
2330
|
if (type) return type;
|
|
2331
2331
|
let stats;
|
|
2332
2332
|
try {
|
|
2333
|
-
stats =
|
|
2333
|
+
stats = fs6.lstatSync(srcpath);
|
|
2334
2334
|
} catch {
|
|
2335
2335
|
return "file";
|
|
2336
2336
|
}
|
|
@@ -2348,8 +2348,8 @@ var require_symlink = __commonJS({
|
|
|
2348
2348
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports2, module2) {
|
|
2349
2349
|
"use strict";
|
|
2350
2350
|
var u = require_universalify().fromPromise;
|
|
2351
|
-
var
|
|
2352
|
-
var
|
|
2351
|
+
var path5 = require("path");
|
|
2352
|
+
var fs6 = require_fs();
|
|
2353
2353
|
var { mkdirs, mkdirsSync } = require_mkdirs();
|
|
2354
2354
|
var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
|
|
2355
2355
|
var { symlinkType, symlinkTypeSync } = require_symlink_type();
|
|
@@ -2358,44 +2358,44 @@ var require_symlink = __commonJS({
|
|
|
2358
2358
|
async function createSymlink(srcpath, dstpath, type) {
|
|
2359
2359
|
let stats;
|
|
2360
2360
|
try {
|
|
2361
|
-
stats = await
|
|
2361
|
+
stats = await fs6.lstat(dstpath);
|
|
2362
2362
|
} catch {
|
|
2363
2363
|
}
|
|
2364
2364
|
if (stats && stats.isSymbolicLink()) {
|
|
2365
2365
|
const [srcStat, dstStat] = await Promise.all([
|
|
2366
|
-
|
|
2367
|
-
|
|
2366
|
+
fs6.stat(srcpath),
|
|
2367
|
+
fs6.stat(dstpath)
|
|
2368
2368
|
]);
|
|
2369
2369
|
if (areIdentical(srcStat, dstStat)) return;
|
|
2370
2370
|
}
|
|
2371
2371
|
const relative = await symlinkPaths(srcpath, dstpath);
|
|
2372
2372
|
srcpath = relative.toDst;
|
|
2373
2373
|
const toType = await symlinkType(relative.toCwd, type);
|
|
2374
|
-
const dir =
|
|
2374
|
+
const dir = path5.dirname(dstpath);
|
|
2375
2375
|
if (!await pathExists(dir)) {
|
|
2376
2376
|
await mkdirs(dir);
|
|
2377
2377
|
}
|
|
2378
|
-
return
|
|
2378
|
+
return fs6.symlink(srcpath, dstpath, toType);
|
|
2379
2379
|
}
|
|
2380
2380
|
function createSymlinkSync(srcpath, dstpath, type) {
|
|
2381
2381
|
let stats;
|
|
2382
2382
|
try {
|
|
2383
|
-
stats =
|
|
2383
|
+
stats = fs6.lstatSync(dstpath);
|
|
2384
2384
|
} catch {
|
|
2385
2385
|
}
|
|
2386
2386
|
if (stats && stats.isSymbolicLink()) {
|
|
2387
|
-
const srcStat =
|
|
2388
|
-
const dstStat =
|
|
2387
|
+
const srcStat = fs6.statSync(srcpath);
|
|
2388
|
+
const dstStat = fs6.statSync(dstpath);
|
|
2389
2389
|
if (areIdentical(srcStat, dstStat)) return;
|
|
2390
2390
|
}
|
|
2391
2391
|
const relative = symlinkPathsSync(srcpath, dstpath);
|
|
2392
2392
|
srcpath = relative.toDst;
|
|
2393
2393
|
type = symlinkTypeSync(relative.toCwd, type);
|
|
2394
|
-
const dir =
|
|
2395
|
-
const exists =
|
|
2396
|
-
if (exists) return
|
|
2394
|
+
const dir = path5.dirname(dstpath);
|
|
2395
|
+
const exists = fs6.existsSync(dir);
|
|
2396
|
+
if (exists) return fs6.symlinkSync(srcpath, dstpath, type);
|
|
2397
2397
|
mkdirsSync(dir);
|
|
2398
|
-
return
|
|
2398
|
+
return fs6.symlinkSync(srcpath, dstpath, type);
|
|
2399
2399
|
}
|
|
2400
2400
|
module2.exports = {
|
|
2401
2401
|
createSymlink: u(createSymlink),
|
|
@@ -2462,9 +2462,9 @@ var require_jsonfile = __commonJS({
|
|
|
2462
2462
|
if (typeof options === "string") {
|
|
2463
2463
|
options = { encoding: options };
|
|
2464
2464
|
}
|
|
2465
|
-
const
|
|
2465
|
+
const fs6 = options.fs || _fs;
|
|
2466
2466
|
const shouldThrow = "throws" in options ? options.throws : true;
|
|
2467
|
-
let data = await universalify.fromCallback(
|
|
2467
|
+
let data = await universalify.fromCallback(fs6.readFile)(file, options);
|
|
2468
2468
|
data = stripBom(data);
|
|
2469
2469
|
let obj;
|
|
2470
2470
|
try {
|
|
@@ -2484,10 +2484,10 @@ var require_jsonfile = __commonJS({
|
|
|
2484
2484
|
if (typeof options === "string") {
|
|
2485
2485
|
options = { encoding: options };
|
|
2486
2486
|
}
|
|
2487
|
-
const
|
|
2487
|
+
const fs6 = options.fs || _fs;
|
|
2488
2488
|
const shouldThrow = "throws" in options ? options.throws : true;
|
|
2489
2489
|
try {
|
|
2490
|
-
let content =
|
|
2490
|
+
let content = fs6.readFileSync(file, options);
|
|
2491
2491
|
content = stripBom(content);
|
|
2492
2492
|
return JSON.parse(content, options.reviver);
|
|
2493
2493
|
} catch (err) {
|
|
@@ -2500,15 +2500,15 @@ var require_jsonfile = __commonJS({
|
|
|
2500
2500
|
}
|
|
2501
2501
|
}
|
|
2502
2502
|
async function _writeFile(file, obj, options = {}) {
|
|
2503
|
-
const
|
|
2503
|
+
const fs6 = options.fs || _fs;
|
|
2504
2504
|
const str = stringify(obj, options);
|
|
2505
|
-
await universalify.fromCallback(
|
|
2505
|
+
await universalify.fromCallback(fs6.writeFile)(file, str, options);
|
|
2506
2506
|
}
|
|
2507
2507
|
var writeFile = universalify.fromPromise(_writeFile);
|
|
2508
2508
|
function writeFileSync(file, obj, options = {}) {
|
|
2509
|
-
const
|
|
2509
|
+
const fs6 = options.fs || _fs;
|
|
2510
2510
|
const str = stringify(obj, options);
|
|
2511
|
-
return
|
|
2511
|
+
return fs6.writeFileSync(file, str, options);
|
|
2512
2512
|
}
|
|
2513
2513
|
module2.exports = {
|
|
2514
2514
|
readFile: readFile2,
|
|
@@ -2539,23 +2539,23 @@ var require_output_file = __commonJS({
|
|
|
2539
2539
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/output-file/index.js"(exports2, module2) {
|
|
2540
2540
|
"use strict";
|
|
2541
2541
|
var u = require_universalify().fromPromise;
|
|
2542
|
-
var
|
|
2543
|
-
var
|
|
2542
|
+
var fs6 = require_fs();
|
|
2543
|
+
var path5 = require("path");
|
|
2544
2544
|
var mkdir = require_mkdirs();
|
|
2545
2545
|
var pathExists = require_path_exists().pathExists;
|
|
2546
2546
|
async function outputFile(file, data, encoding = "utf-8") {
|
|
2547
|
-
const dir =
|
|
2547
|
+
const dir = path5.dirname(file);
|
|
2548
2548
|
if (!await pathExists(dir)) {
|
|
2549
2549
|
await mkdir.mkdirs(dir);
|
|
2550
2550
|
}
|
|
2551
|
-
return
|
|
2551
|
+
return fs6.writeFile(file, data, encoding);
|
|
2552
2552
|
}
|
|
2553
2553
|
function outputFileSync(file, ...args) {
|
|
2554
|
-
const dir =
|
|
2555
|
-
if (!
|
|
2554
|
+
const dir = path5.dirname(file);
|
|
2555
|
+
if (!fs6.existsSync(dir)) {
|
|
2556
2556
|
mkdir.mkdirsSync(dir);
|
|
2557
2557
|
}
|
|
2558
|
-
|
|
2558
|
+
fs6.writeFileSync(file, ...args);
|
|
2559
2559
|
}
|
|
2560
2560
|
module2.exports = {
|
|
2561
2561
|
outputFile: u(outputFile),
|
|
@@ -2614,8 +2614,8 @@ var require_json = __commonJS({
|
|
|
2614
2614
|
var require_move = __commonJS({
|
|
2615
2615
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move.js"(exports2, module2) {
|
|
2616
2616
|
"use strict";
|
|
2617
|
-
var
|
|
2618
|
-
var
|
|
2617
|
+
var fs6 = require_fs();
|
|
2618
|
+
var path5 = require("path");
|
|
2619
2619
|
var { copy: copy2 } = require_copy2();
|
|
2620
2620
|
var { remove } = require_remove();
|
|
2621
2621
|
var { mkdirp } = require_mkdirs();
|
|
@@ -2625,8 +2625,8 @@ var require_move = __commonJS({
|
|
|
2625
2625
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
2626
2626
|
const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
|
|
2627
2627
|
await stat.checkParentPaths(src, srcStat, dest, "move");
|
|
2628
|
-
const destParent =
|
|
2629
|
-
const parsedParentPath =
|
|
2628
|
+
const destParent = path5.dirname(dest);
|
|
2629
|
+
const parsedParentPath = path5.parse(destParent);
|
|
2630
2630
|
if (parsedParentPath.root !== destParent) {
|
|
2631
2631
|
await mkdirp(destParent);
|
|
2632
2632
|
}
|
|
@@ -2641,7 +2641,7 @@ var require_move = __commonJS({
|
|
|
2641
2641
|
}
|
|
2642
2642
|
}
|
|
2643
2643
|
try {
|
|
2644
|
-
await
|
|
2644
|
+
await fs6.rename(src, dest);
|
|
2645
2645
|
} catch (err) {
|
|
2646
2646
|
if (err.code !== "EXDEV") {
|
|
2647
2647
|
throw err;
|
|
@@ -2666,8 +2666,8 @@ var require_move = __commonJS({
|
|
|
2666
2666
|
var require_move_sync = __commonJS({
|
|
2667
2667
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move-sync.js"(exports2, module2) {
|
|
2668
2668
|
"use strict";
|
|
2669
|
-
var
|
|
2670
|
-
var
|
|
2669
|
+
var fs6 = require_graceful_fs();
|
|
2670
|
+
var path5 = require("path");
|
|
2671
2671
|
var copySync = require_copy2().copySync;
|
|
2672
2672
|
var removeSync = require_remove().removeSync;
|
|
2673
2673
|
var mkdirpSync = require_mkdirs().mkdirpSync;
|
|
@@ -2677,12 +2677,12 @@ var require_move_sync = __commonJS({
|
|
|
2677
2677
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
2678
2678
|
const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
|
|
2679
2679
|
stat.checkParentPathsSync(src, srcStat, dest, "move");
|
|
2680
|
-
if (!isParentRoot(dest)) mkdirpSync(
|
|
2680
|
+
if (!isParentRoot(dest)) mkdirpSync(path5.dirname(dest));
|
|
2681
2681
|
return doRename(src, dest, overwrite, isChangingCase);
|
|
2682
2682
|
}
|
|
2683
2683
|
function isParentRoot(dest) {
|
|
2684
|
-
const parent =
|
|
2685
|
-
const parsedPath =
|
|
2684
|
+
const parent = path5.dirname(dest);
|
|
2685
|
+
const parsedPath = path5.parse(parent);
|
|
2686
2686
|
return parsedPath.root === parent;
|
|
2687
2687
|
}
|
|
2688
2688
|
function doRename(src, dest, overwrite, isChangingCase) {
|
|
@@ -2691,12 +2691,12 @@ var require_move_sync = __commonJS({
|
|
|
2691
2691
|
removeSync(dest);
|
|
2692
2692
|
return rename(src, dest, overwrite);
|
|
2693
2693
|
}
|
|
2694
|
-
if (
|
|
2694
|
+
if (fs6.existsSync(dest)) throw new Error("dest already exists.");
|
|
2695
2695
|
return rename(src, dest, overwrite);
|
|
2696
2696
|
}
|
|
2697
2697
|
function rename(src, dest, overwrite) {
|
|
2698
2698
|
try {
|
|
2699
|
-
|
|
2699
|
+
fs6.renameSync(src, dest);
|
|
2700
2700
|
} catch (err) {
|
|
2701
2701
|
if (err.code !== "EXDEV") throw err;
|
|
2702
2702
|
return moveAcrossDevice(src, dest, overwrite);
|
|
@@ -5507,8 +5507,8 @@ var require_safe_buffer = __commonJS({
|
|
|
5507
5507
|
var require_convert_source_map = __commonJS({
|
|
5508
5508
|
"../../node_modules/.pnpm/convert-source-map@1.8.0/node_modules/convert-source-map/index.js"(exports2) {
|
|
5509
5509
|
"use strict";
|
|
5510
|
-
var
|
|
5511
|
-
var
|
|
5510
|
+
var fs6 = require("fs");
|
|
5511
|
+
var path5 = require("path");
|
|
5512
5512
|
var SafeBuffer = require_safe_buffer();
|
|
5513
5513
|
Object.defineProperty(exports2, "commentRegex", {
|
|
5514
5514
|
get: function getCommentRegex() {
|
|
@@ -5529,9 +5529,9 @@ var require_convert_source_map = __commonJS({
|
|
|
5529
5529
|
function readFromFileMap(sm, dir) {
|
|
5530
5530
|
var r = exports2.mapFileCommentRegex.exec(sm);
|
|
5531
5531
|
var filename = r[1] || r[2];
|
|
5532
|
-
var filepath =
|
|
5532
|
+
var filepath = path5.resolve(dir, filename);
|
|
5533
5533
|
try {
|
|
5534
|
-
return
|
|
5534
|
+
return fs6.readFileSync(filepath, "utf8");
|
|
5535
5535
|
} catch (e) {
|
|
5536
5536
|
throw new Error("An error occurred while trying to read the map file at " + filepath + "\n" + e);
|
|
5537
5537
|
}
|
|
@@ -5721,27 +5721,27 @@ var require_util = __commonJS({
|
|
|
5721
5721
|
};
|
|
5722
5722
|
}
|
|
5723
5723
|
var normalize = lruMemoize(function normalize2(aPath) {
|
|
5724
|
-
let
|
|
5724
|
+
let path5 = aPath;
|
|
5725
5725
|
const url = urlParse(aPath);
|
|
5726
5726
|
if (url) {
|
|
5727
5727
|
if (!url.path) {
|
|
5728
5728
|
return aPath;
|
|
5729
5729
|
}
|
|
5730
|
-
|
|
5730
|
+
path5 = url.path;
|
|
5731
5731
|
}
|
|
5732
|
-
const isAbsolute = exports2.isAbsolute(
|
|
5732
|
+
const isAbsolute = exports2.isAbsolute(path5);
|
|
5733
5733
|
const parts = [];
|
|
5734
5734
|
let start = 0;
|
|
5735
5735
|
let i = 0;
|
|
5736
5736
|
while (true) {
|
|
5737
5737
|
start = i;
|
|
5738
|
-
i =
|
|
5738
|
+
i = path5.indexOf("/", start);
|
|
5739
5739
|
if (i === -1) {
|
|
5740
|
-
parts.push(
|
|
5740
|
+
parts.push(path5.slice(start));
|
|
5741
5741
|
break;
|
|
5742
5742
|
} else {
|
|
5743
|
-
parts.push(
|
|
5744
|
-
while (i <
|
|
5743
|
+
parts.push(path5.slice(start, i));
|
|
5744
|
+
while (i < path5.length && path5[i] === "/") {
|
|
5745
5745
|
i++;
|
|
5746
5746
|
}
|
|
5747
5747
|
}
|
|
@@ -5763,15 +5763,15 @@ var require_util = __commonJS({
|
|
|
5763
5763
|
}
|
|
5764
5764
|
}
|
|
5765
5765
|
}
|
|
5766
|
-
|
|
5767
|
-
if (
|
|
5768
|
-
|
|
5766
|
+
path5 = parts.join("/");
|
|
5767
|
+
if (path5 === "") {
|
|
5768
|
+
path5 = isAbsolute ? "/" : ".";
|
|
5769
5769
|
}
|
|
5770
5770
|
if (url) {
|
|
5771
|
-
url.path =
|
|
5771
|
+
url.path = path5;
|
|
5772
5772
|
return urlGenerate(url);
|
|
5773
5773
|
}
|
|
5774
|
-
return
|
|
5774
|
+
return path5;
|
|
5775
5775
|
});
|
|
5776
5776
|
exports2.normalize = normalize;
|
|
5777
5777
|
function join2(aRoot, aPath) {
|
|
@@ -6535,12 +6535,12 @@ var require_read_wasm = __commonJS({
|
|
|
6535
6535
|
};
|
|
6536
6536
|
module2.exports.initialize = (input) => mappingsWasm = input;
|
|
6537
6537
|
} else {
|
|
6538
|
-
const
|
|
6539
|
-
const
|
|
6538
|
+
const fs6 = require("fs");
|
|
6539
|
+
const path5 = require("path");
|
|
6540
6540
|
module2.exports = function readWasm() {
|
|
6541
6541
|
return new Promise((resolve, reject) => {
|
|
6542
|
-
const wasmPath =
|
|
6543
|
-
|
|
6542
|
+
const wasmPath = path5.join(__dirname, "mappings.wasm");
|
|
6543
|
+
fs6.readFile(wasmPath, null, (error, data) => {
|
|
6544
6544
|
if (error) {
|
|
6545
6545
|
reject(error);
|
|
6546
6546
|
return;
|
|
@@ -8165,8 +8165,8 @@ var require_utils3 = __commonJS({
|
|
|
8165
8165
|
}
|
|
8166
8166
|
return output;
|
|
8167
8167
|
};
|
|
8168
|
-
exports2.basename = (
|
|
8169
|
-
const segs =
|
|
8168
|
+
exports2.basename = (path5, { windows } = {}) => {
|
|
8169
|
+
const segs = path5.split(windows ? /[\\/]/ : "/");
|
|
8170
8170
|
const last = segs[segs.length - 1];
|
|
8171
8171
|
if (last === "") {
|
|
8172
8172
|
return segs[segs.length - 2];
|
|
@@ -9441,8 +9441,8 @@ var require_picomatch2 = __commonJS({
|
|
|
9441
9441
|
});
|
|
9442
9442
|
|
|
9443
9443
|
// src/index.ts
|
|
9444
|
-
var
|
|
9445
|
-
var
|
|
9444
|
+
var import_promises4 = __toESM(require("node:fs/promises"));
|
|
9445
|
+
var import_node_path4 = __toESM(require("node:path"));
|
|
9446
9446
|
var import_constants3 = __toESM(require_constants2());
|
|
9447
9447
|
|
|
9448
9448
|
// src/go-outputs.ts
|
|
@@ -9826,7 +9826,8 @@ async function handleNodeOutputs(nodeOutputs, {
|
|
|
9826
9826
|
nextVersion,
|
|
9827
9827
|
isMiddleware,
|
|
9828
9828
|
prerenderFallbackFalseMap,
|
|
9829
|
-
vercelOutputDir
|
|
9829
|
+
vercelOutputDir,
|
|
9830
|
+
disableAutomaticFetchInstrumentation = false
|
|
9830
9831
|
}) {
|
|
9831
9832
|
const nodeVersion = await (0, import_build_utils.getNodeVersion)(
|
|
9832
9833
|
projectDir,
|
|
@@ -9997,7 +9998,7 @@ async function handleNodeOutputs(nodeOutputs, {
|
|
|
9997
9998
|
supportsMultiPayloads: true,
|
|
9998
9999
|
supportsResponseStreaming: true,
|
|
9999
10000
|
experimentalAllowBundling: true,
|
|
10000
|
-
shouldDisableAutomaticFetchInstrumentation: process.env.VERCEL_TRACING_DISABLE_AUTOMATIC_FETCH_INSTRUMENTATION === "1",
|
|
10001
|
+
shouldDisableAutomaticFetchInstrumentation: disableAutomaticFetchInstrumentation || process.env.VERCEL_TRACING_DISABLE_AUTOMATIC_FETCH_INSTRUMENTATION === "1",
|
|
10001
10002
|
// middleware handler always expects Request/Response interface
|
|
10002
10003
|
useWebApi: isMiddleware,
|
|
10003
10004
|
launcherType: "Nodejs",
|
|
@@ -10305,8 +10306,8 @@ async function usesSrcDirectory(workPath) {
|
|
|
10305
10306
|
}
|
|
10306
10307
|
return false;
|
|
10307
10308
|
}
|
|
10308
|
-
function isDirectory(
|
|
10309
|
-
return import_fs_extra3.default.lstatSync(
|
|
10309
|
+
function isDirectory(path5) {
|
|
10310
|
+
return import_fs_extra3.default.lstatSync(path5, { throwIfNoEntry: false })?.isDirectory() ?? false;
|
|
10310
10311
|
}
|
|
10311
10312
|
async function getSourceFilePathFromPage({
|
|
10312
10313
|
workPath,
|
|
@@ -10855,13 +10856,13 @@ function extractHeaders(routing) {
|
|
|
10855
10856
|
}
|
|
10856
10857
|
function normalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataResolving, isOverride = false) {
|
|
10857
10858
|
if (!shouldHandleMiddlewareDataResolving) return [];
|
|
10858
|
-
const
|
|
10859
|
+
const path5 = require("node:path");
|
|
10859
10860
|
const basePath = config.basePath || "";
|
|
10860
10861
|
const trailingSlash = config.trailingSlash || false;
|
|
10861
10862
|
return [
|
|
10862
10863
|
// remove x-nextjs-data header for non _next/data requests
|
|
10863
10864
|
{
|
|
10864
|
-
src:
|
|
10865
|
+
src: path5.posix.join("/", basePath, "/(?!_next/data(?:/|$))(.*)"),
|
|
10865
10866
|
has: [
|
|
10866
10867
|
{
|
|
10867
10868
|
type: "header",
|
|
@@ -10881,7 +10882,7 @@ function normalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataReso
|
|
|
10881
10882
|
},
|
|
10882
10883
|
// ensure x-nextjs-data header is always present if we are doing middleware next data resolving
|
|
10883
10884
|
{
|
|
10884
|
-
src:
|
|
10885
|
+
src: path5.posix.join("/", basePath, "/_next/data/(.*)"),
|
|
10885
10886
|
missing: [
|
|
10886
10887
|
{
|
|
10887
10888
|
type: "header",
|
|
@@ -10902,14 +10903,14 @@ function normalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataReso
|
|
|
10902
10903
|
},
|
|
10903
10904
|
// strip _next/data prefix for resolving
|
|
10904
10905
|
{
|
|
10905
|
-
src: `^${
|
|
10906
|
+
src: `^${path5.posix.join(
|
|
10906
10907
|
"/",
|
|
10907
10908
|
basePath,
|
|
10908
10909
|
"/_next/data/",
|
|
10909
10910
|
buildId.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"),
|
|
10910
10911
|
"/(.*).json"
|
|
10911
10912
|
)}`,
|
|
10912
|
-
dest: `${
|
|
10913
|
+
dest: `${path5.posix.join(
|
|
10913
10914
|
"/",
|
|
10914
10915
|
basePath,
|
|
10915
10916
|
"/$1",
|
|
@@ -10926,14 +10927,14 @@ function normalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataReso
|
|
|
10926
10927
|
},
|
|
10927
10928
|
// normalize "/index" from "/_next/data/index.json" to -> just "/"
|
|
10928
10929
|
{
|
|
10929
|
-
src:
|
|
10930
|
+
src: path5.posix.join("^/", basePath, "/index(?:/)?"),
|
|
10930
10931
|
has: [
|
|
10931
10932
|
{
|
|
10932
10933
|
type: "header",
|
|
10933
10934
|
key: "x-nextjs-data"
|
|
10934
10935
|
}
|
|
10935
10936
|
],
|
|
10936
|
-
dest:
|
|
10937
|
+
dest: path5.posix.join("/", basePath, trailingSlash ? "/" : ""),
|
|
10937
10938
|
...isOverride ? { override: true } : {},
|
|
10938
10939
|
continue: true
|
|
10939
10940
|
}
|
|
@@ -10952,12 +10953,12 @@ function extractOnMatchRoutes(routing) {
|
|
|
10952
10953
|
}
|
|
10953
10954
|
function denormalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataResolving, isOverride = false) {
|
|
10954
10955
|
if (!shouldHandleMiddlewareDataResolving) return [];
|
|
10955
|
-
const
|
|
10956
|
+
const path5 = require("node:path");
|
|
10956
10957
|
const basePath = config.basePath || "";
|
|
10957
10958
|
const trailingSlash = config.trailingSlash || false;
|
|
10958
10959
|
return [
|
|
10959
10960
|
{
|
|
10960
|
-
src:
|
|
10961
|
+
src: path5.posix.join(
|
|
10961
10962
|
"^/",
|
|
10962
10963
|
basePath && basePath !== "/" ? `${basePath}${trailingSlash ? "/$" : "$"}` : "$"
|
|
10963
10964
|
),
|
|
@@ -10967,7 +10968,7 @@ function denormalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataRe
|
|
|
10967
10968
|
key: "x-nextjs-data"
|
|
10968
10969
|
}
|
|
10969
10970
|
],
|
|
10970
|
-
dest: `${
|
|
10971
|
+
dest: `${path5.posix.join(
|
|
10971
10972
|
"/",
|
|
10972
10973
|
basePath,
|
|
10973
10974
|
"/_next/data/",
|
|
@@ -10978,14 +10979,14 @@ function denormalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataRe
|
|
|
10978
10979
|
...isOverride ? { override: true } : {}
|
|
10979
10980
|
},
|
|
10980
10981
|
{
|
|
10981
|
-
src:
|
|
10982
|
+
src: path5.posix.join("^/", basePath, "((?!_next/)(?:.*[^/]|.*))/?$"),
|
|
10982
10983
|
has: [
|
|
10983
10984
|
{
|
|
10984
10985
|
type: "header",
|
|
10985
10986
|
key: "x-nextjs-data"
|
|
10986
10987
|
}
|
|
10987
10988
|
],
|
|
10988
|
-
dest: `${
|
|
10989
|
+
dest: `${path5.posix.join(
|
|
10989
10990
|
"/",
|
|
10990
10991
|
basePath,
|
|
10991
10992
|
"/_next/data/",
|
|
@@ -11026,6 +11027,78 @@ if(enabled){
|
|
|
11026
11027
|
}`;
|
|
11027
11028
|
}
|
|
11028
11029
|
|
|
11030
|
+
// src/tracing.ts
|
|
11031
|
+
var import_promises3 = __toESM(require("node:fs/promises"));
|
|
11032
|
+
var import_node_path3 = __toESM(require("node:path"));
|
|
11033
|
+
var import_build_utils3 = require("@vercel/build-utils");
|
|
11034
|
+
var ENTRY_DIR = "./.vercel/otel/";
|
|
11035
|
+
function preparedEntry() {
|
|
11036
|
+
const entry = process.env.VERCEL_DEFAULT_NEXT_TRACING_ENTRY;
|
|
11037
|
+
if (!entry?.startsWith(ENTRY_DIR) || entry.split("/").includes("..")) {
|
|
11038
|
+
return void 0;
|
|
11039
|
+
}
|
|
11040
|
+
return entry;
|
|
11041
|
+
}
|
|
11042
|
+
async function injectDefaultTracing(config, projectDir) {
|
|
11043
|
+
try {
|
|
11044
|
+
const entry = preparedEntry();
|
|
11045
|
+
if (!entry) {
|
|
11046
|
+
skip("the builder did not prepare .vercel/otel");
|
|
11047
|
+
return;
|
|
11048
|
+
}
|
|
11049
|
+
if (await projectHasInstrumentation(projectDir, config)) {
|
|
11050
|
+
skip("project has an instrumentation file");
|
|
11051
|
+
return;
|
|
11052
|
+
}
|
|
11053
|
+
if (config.instrumentationInject?.some((other) => other !== entry)) {
|
|
11054
|
+
skip("instrumentationInject already has other entries");
|
|
11055
|
+
return;
|
|
11056
|
+
}
|
|
11057
|
+
if (!await isFile(import_node_path3.default.join(projectDir, entry))) {
|
|
11058
|
+
skip("the prepared wrapper is missing");
|
|
11059
|
+
return;
|
|
11060
|
+
}
|
|
11061
|
+
config.instrumentationInject ??= [];
|
|
11062
|
+
if (!config.instrumentationInject.includes(entry)) {
|
|
11063
|
+
config.instrumentationInject.push(entry);
|
|
11064
|
+
}
|
|
11065
|
+
} catch (error) {
|
|
11066
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
11067
|
+
skip(message);
|
|
11068
|
+
}
|
|
11069
|
+
}
|
|
11070
|
+
function defaultTracingWasInjected(config) {
|
|
11071
|
+
const entries = "instrumentationInject" in config ? config.instrumentationInject : void 0;
|
|
11072
|
+
const entry = preparedEntry();
|
|
11073
|
+
return entry !== void 0 && Array.isArray(entries) && entries.includes(entry);
|
|
11074
|
+
}
|
|
11075
|
+
function skip(reason) {
|
|
11076
|
+
(0, import_build_utils3.debug)(`Skipping Vercel tracing inject: ${reason}`);
|
|
11077
|
+
}
|
|
11078
|
+
async function projectHasInstrumentation(projectDir, config) {
|
|
11079
|
+
const root = import_node_path3.default.resolve(config.outputFileTracingRoot);
|
|
11080
|
+
for (let dir = import_node_path3.default.resolve(projectDir); ; dir = import_node_path3.default.dirname(dir)) {
|
|
11081
|
+
for (const base of [dir, import_node_path3.default.join(dir, "src")]) {
|
|
11082
|
+
for (const ext of config.pageExtensions) {
|
|
11083
|
+
if (await isFile(import_node_path3.default.join(base, `instrumentation.${ext}`))) {
|
|
11084
|
+
return true;
|
|
11085
|
+
}
|
|
11086
|
+
}
|
|
11087
|
+
}
|
|
11088
|
+
const relative = import_node_path3.default.relative(root, dir);
|
|
11089
|
+
if (!relative || relative.startsWith("..") || import_node_path3.default.isAbsolute(relative)) {
|
|
11090
|
+
return false;
|
|
11091
|
+
}
|
|
11092
|
+
}
|
|
11093
|
+
}
|
|
11094
|
+
async function isFile(file) {
|
|
11095
|
+
try {
|
|
11096
|
+
return (await import_promises3.default.stat(file)).isFile();
|
|
11097
|
+
} catch {
|
|
11098
|
+
return false;
|
|
11099
|
+
}
|
|
11100
|
+
}
|
|
11101
|
+
|
|
11029
11102
|
// src/index.ts
|
|
11030
11103
|
var myAdapter = {
|
|
11031
11104
|
name: "Vercel",
|
|
@@ -11046,10 +11119,10 @@ var myAdapter = {
|
|
|
11046
11119
|
}
|
|
11047
11120
|
if (ctx.phase === import_constants3.PHASE_PRODUCTION_BUILD && process.env.VERCEL_PREVIEW_COMMENTS_ENABLED === "1" && // Only available in newer Next.js versions
|
|
11048
11121
|
typeof ctx.projectDir !== "undefined") {
|
|
11049
|
-
const dir =
|
|
11050
|
-
await
|
|
11051
|
-
await
|
|
11052
|
-
|
|
11122
|
+
const dir = import_node_path4.default.join(ctx.projectDir, ".vercel/");
|
|
11123
|
+
await import_promises4.default.mkdir(dir, { recursive: true });
|
|
11124
|
+
await import_promises4.default.writeFile(
|
|
11125
|
+
import_node_path4.default.join(dir, "adapter-toolbar-script.js"),
|
|
11053
11126
|
generateToolbarScript(
|
|
11054
11127
|
process.env.VERCEL_ENV === "production",
|
|
11055
11128
|
process.env.VERCEL_PREVIEW_COMMENTS_OPT_IN === "1",
|
|
@@ -11064,6 +11137,9 @@ var myAdapter = {
|
|
|
11064
11137
|
`./.vercel/adapter-toolbar-script.js`
|
|
11065
11138
|
);
|
|
11066
11139
|
}
|
|
11140
|
+
if (ctx.phase === import_constants3.PHASE_PRODUCTION_BUILD && typeof ctx.projectDir !== "undefined") {
|
|
11141
|
+
await injectDefaultTracing(config, ctx.projectDir);
|
|
11142
|
+
}
|
|
11067
11143
|
return config;
|
|
11068
11144
|
},
|
|
11069
11145
|
async onBuildComplete({
|
|
@@ -11077,8 +11153,9 @@ var myAdapter = {
|
|
|
11077
11153
|
nextVersion
|
|
11078
11154
|
}) {
|
|
11079
11155
|
const goOutputs = collectGoRouteOutputs(outputs);
|
|
11080
|
-
const vercelOutputDir =
|
|
11081
|
-
await
|
|
11156
|
+
const vercelOutputDir = import_node_path4.default.join(distDir, "output");
|
|
11157
|
+
await import_promises4.default.mkdir(vercelOutputDir, { recursive: true });
|
|
11158
|
+
const disableAutomaticFetchInstrumentation = defaultTracingWasInjected(config);
|
|
11082
11159
|
const escapedBuildId = escapeStringRegexp(buildId);
|
|
11083
11160
|
const hasMiddleware = Boolean(outputs.middleware);
|
|
11084
11161
|
const hasAppDir = outputs.appPages.length > 0 || outputs.appRoutes.length > 0;
|
|
@@ -11097,7 +11174,7 @@ var myAdapter = {
|
|
|
11097
11174
|
images: getImagesConfig(config)
|
|
11098
11175
|
};
|
|
11099
11176
|
await handlePublicFiles(
|
|
11100
|
-
|
|
11177
|
+
import_node_path4.default.join(projectDir, "public"),
|
|
11101
11178
|
vercelOutputDir,
|
|
11102
11179
|
config
|
|
11103
11180
|
);
|
|
@@ -11185,7 +11262,8 @@ var myAdapter = {
|
|
|
11185
11262
|
projectDir,
|
|
11186
11263
|
vercelOutputDir,
|
|
11187
11264
|
nextVersion,
|
|
11188
|
-
prerenderFallbackFalseMap
|
|
11265
|
+
prerenderFallbackFalseMap,
|
|
11266
|
+
disableAutomaticFetchInstrumentation
|
|
11189
11267
|
});
|
|
11190
11268
|
}
|
|
11191
11269
|
await handleNodeOutputs(nodeOutputs, {
|
|
@@ -11195,7 +11273,8 @@ var myAdapter = {
|
|
|
11195
11273
|
projectDir,
|
|
11196
11274
|
nextVersion,
|
|
11197
11275
|
vercelOutputDir,
|
|
11198
|
-
prerenderFallbackFalseMap
|
|
11276
|
+
prerenderFallbackFalseMap,
|
|
11277
|
+
disableAutomaticFetchInstrumentation
|
|
11199
11278
|
});
|
|
11200
11279
|
await handleGoOutputs(goOutputs, {
|
|
11201
11280
|
config,
|
|
@@ -11239,14 +11318,14 @@ var myAdapter = {
|
|
|
11239
11318
|
if (!route.sourceRegex.includes("_next/data") && !addedNextData404Route) {
|
|
11240
11319
|
addedNextData404Route = true;
|
|
11241
11320
|
dynamicRoutes.push({
|
|
11242
|
-
src:
|
|
11243
|
-
dest:
|
|
11321
|
+
src: import_node_path4.default.posix.join("/", config.basePath || "", "_next/data/(.*)"),
|
|
11322
|
+
dest: import_node_path4.default.posix.join("/", config.basePath || "", "404"),
|
|
11244
11323
|
status: 404,
|
|
11245
11324
|
check: true
|
|
11246
11325
|
});
|
|
11247
11326
|
}
|
|
11248
11327
|
}
|
|
11249
|
-
const sourcePath = route.source ?
|
|
11328
|
+
const sourcePath = route.source ? import_node_path4.default.posix.join("/", config.basePath || "", route.source) : void 0;
|
|
11250
11329
|
const isGoRoute = sourcePath && (goPathnames.has(sourcePath) || !otherPathnames.has(sourcePath) && sourcePath.endsWith(".rsc") && goPathnames.has(sourcePath.slice(0, -4)));
|
|
11251
11330
|
dynamicRoutes.push({
|
|
11252
11331
|
src: route.sourceRegex,
|
|
@@ -11280,31 +11359,31 @@ var myAdapter = {
|
|
|
11280
11359
|
// $wildcard
|
|
11281
11360
|
// This is split into two rules to avoid matching the `/index` route as it causes issues with trailing slash redirect
|
|
11282
11361
|
{
|
|
11283
|
-
src: `^${
|
|
11362
|
+
src: `^${import_node_path4.default.posix.join(
|
|
11284
11363
|
"/",
|
|
11285
11364
|
config.basePath,
|
|
11286
11365
|
"/"
|
|
11287
11366
|
)}(?!(?:_next/.*|${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})(?:/.*|$))$`,
|
|
11288
11367
|
// we aren't able to ensure trailing slash mode here
|
|
11289
11368
|
// so ensure this comes after the trailing slash redirect
|
|
11290
|
-
dest: `${config.basePath && config.basePath !== "/" ?
|
|
11369
|
+
dest: `${config.basePath && config.basePath !== "/" ? import_node_path4.default.posix.join("/", config.basePath) : ""}$wildcard${config.trailingSlash ? "/" : ""}`,
|
|
11291
11370
|
continue: true
|
|
11292
11371
|
},
|
|
11293
11372
|
{
|
|
11294
|
-
src: `^${
|
|
11373
|
+
src: `^${import_node_path4.default.posix.join(
|
|
11295
11374
|
"/",
|
|
11296
11375
|
config.basePath,
|
|
11297
11376
|
"/"
|
|
11298
11377
|
)}(?!(?:_next/.*|${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})(?:/.*|$))(.*)$`,
|
|
11299
11378
|
// we aren't able to ensure trailing slash mode here
|
|
11300
11379
|
// so ensure this comes after the trailing slash redirect
|
|
11301
|
-
dest: `${config.basePath && config.basePath !== "/" ?
|
|
11380
|
+
dest: `${config.basePath && config.basePath !== "/" ? import_node_path4.default.posix.join("/", config.basePath) : ""}$wildcard/$1`,
|
|
11302
11381
|
continue: true
|
|
11303
11382
|
},
|
|
11304
11383
|
// Handle redirecting to locale specific domains
|
|
11305
11384
|
...config.i18n.domains && config.i18n.domains.length > 0 && config.i18n.localeDetection !== false ? [
|
|
11306
11385
|
{
|
|
11307
|
-
src: `^${
|
|
11386
|
+
src: `^${import_node_path4.default.posix.join(
|
|
11308
11387
|
"/",
|
|
11309
11388
|
config.basePath
|
|
11310
11389
|
)}/?(?:${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})?/?$`,
|
|
@@ -11351,8 +11430,8 @@ var myAdapter = {
|
|
|
11351
11430
|
// when `skipDefaultLocaleRewrite` is not flagged on
|
|
11352
11431
|
// and when localeDetection is enabled.
|
|
11353
11432
|
{
|
|
11354
|
-
src: `^${
|
|
11355
|
-
dest: `${
|
|
11433
|
+
src: `^${import_node_path4.default.posix.join("/", config.basePath)}$`,
|
|
11434
|
+
dest: `${import_node_path4.default.posix.join(
|
|
11356
11435
|
"/",
|
|
11357
11436
|
config.basePath,
|
|
11358
11437
|
config.i18n.defaultLocale
|
|
@@ -11365,12 +11444,12 @@ var myAdapter = {
|
|
|
11365
11444
|
// e.g. for /de/posts/[slug] x-now-route-matches would have
|
|
11366
11445
|
// 1=posts%2Fpost-1
|
|
11367
11446
|
{
|
|
11368
|
-
src: `^${
|
|
11447
|
+
src: `^${import_node_path4.default.posix.join(
|
|
11369
11448
|
"/",
|
|
11370
11449
|
config.basePath,
|
|
11371
11450
|
"/"
|
|
11372
11451
|
)}(?!(?:_next/.*|${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})(?:/.*|$))(.*)$`,
|
|
11373
|
-
dest: `${
|
|
11452
|
+
dest: `${import_node_path4.default.posix.join(
|
|
11374
11453
|
"/",
|
|
11375
11454
|
config.basePath,
|
|
11376
11455
|
config.i18n.defaultLocale
|
|
@@ -11387,7 +11466,7 @@ var myAdapter = {
|
|
|
11387
11466
|
// add 404 handling if /404 or locale variants are requested literally
|
|
11388
11467
|
...config.i18n ? [
|
|
11389
11468
|
{
|
|
11390
|
-
src: `${
|
|
11469
|
+
src: `${import_node_path4.default.posix.join(
|
|
11391
11470
|
"/",
|
|
11392
11471
|
config.basePath,
|
|
11393
11472
|
"/"
|
|
@@ -11403,7 +11482,7 @@ var myAdapter = {
|
|
|
11403
11482
|
}
|
|
11404
11483
|
] : [
|
|
11405
11484
|
{
|
|
11406
|
-
src:
|
|
11485
|
+
src: import_node_path4.default.posix.join("/", config.basePath, "404/?"),
|
|
11407
11486
|
status: 404,
|
|
11408
11487
|
continue: true,
|
|
11409
11488
|
missing: [
|
|
@@ -11417,7 +11496,7 @@ var myAdapter = {
|
|
|
11417
11496
|
// add 500 handling if /500 or locale variants are requested literally
|
|
11418
11497
|
...config.i18n ? [
|
|
11419
11498
|
{
|
|
11420
|
-
src: `${
|
|
11499
|
+
src: `${import_node_path4.default.posix.join(
|
|
11421
11500
|
"/",
|
|
11422
11501
|
config.basePath,
|
|
11423
11502
|
"/"
|
|
@@ -11427,7 +11506,7 @@ var myAdapter = {
|
|
|
11427
11506
|
}
|
|
11428
11507
|
] : [
|
|
11429
11508
|
{
|
|
11430
|
-
src:
|
|
11509
|
+
src: import_node_path4.default.posix.join("/", config.basePath, "500/?"),
|
|
11431
11510
|
status: 500,
|
|
11432
11511
|
continue: true
|
|
11433
11512
|
}
|
|
@@ -11442,12 +11521,12 @@ var myAdapter = {
|
|
|
11442
11521
|
// RSC and prefetch request handling for App Router
|
|
11443
11522
|
...hasAppDir ? [
|
|
11444
11523
|
{
|
|
11445
|
-
src:
|
|
11524
|
+
src: import_node_path4.default.posix.join(
|
|
11446
11525
|
"/",
|
|
11447
11526
|
config.basePath,
|
|
11448
11527
|
"/(?<path>.+?)(?:/)?$"
|
|
11449
11528
|
),
|
|
11450
|
-
dest:
|
|
11529
|
+
dest: import_node_path4.default.posix.join(
|
|
11451
11530
|
"/",
|
|
11452
11531
|
config.basePath,
|
|
11453
11532
|
`/$path${routing.rsc.prefetchSegmentDirSuffix}/$segmentPath${routing.rsc.prefetchSegmentSuffix}`
|
|
@@ -11473,8 +11552,8 @@ var myAdapter = {
|
|
|
11473
11552
|
override: true
|
|
11474
11553
|
},
|
|
11475
11554
|
{
|
|
11476
|
-
src:
|
|
11477
|
-
dest:
|
|
11555
|
+
src: import_node_path4.default.posix.join("^/", config.basePath, "/?$"),
|
|
11556
|
+
dest: import_node_path4.default.posix.join(
|
|
11478
11557
|
"/",
|
|
11479
11558
|
config.basePath,
|
|
11480
11559
|
`/index${routing.rsc.prefetchSegmentDirSuffix}/$segmentPath${routing.rsc.prefetchSegmentSuffix}`
|
|
@@ -11500,7 +11579,7 @@ var myAdapter = {
|
|
|
11500
11579
|
override: true
|
|
11501
11580
|
},
|
|
11502
11581
|
{
|
|
11503
|
-
src: `^${
|
|
11582
|
+
src: `^${import_node_path4.default.posix.join("/", config.basePath, "/?")}`,
|
|
11504
11583
|
has: [
|
|
11505
11584
|
{
|
|
11506
11585
|
type: "header",
|
|
@@ -11508,7 +11587,7 @@ var myAdapter = {
|
|
|
11508
11587
|
value: "1"
|
|
11509
11588
|
}
|
|
11510
11589
|
],
|
|
11511
|
-
dest:
|
|
11590
|
+
dest: import_node_path4.default.posix.join("/", config.basePath, "/index.rsc"),
|
|
11512
11591
|
headers: {
|
|
11513
11592
|
vary: routing.rsc.varyHeader
|
|
11514
11593
|
},
|
|
@@ -11516,7 +11595,7 @@ var myAdapter = {
|
|
|
11516
11595
|
override: true
|
|
11517
11596
|
},
|
|
11518
11597
|
{
|
|
11519
|
-
src: `^${
|
|
11598
|
+
src: `^${import_node_path4.default.posix.join(
|
|
11520
11599
|
"/",
|
|
11521
11600
|
config.basePath,
|
|
11522
11601
|
"/((?!.+\\.rsc).+?)(?:/)?$"
|
|
@@ -11528,7 +11607,7 @@ var myAdapter = {
|
|
|
11528
11607
|
value: "1"
|
|
11529
11608
|
}
|
|
11530
11609
|
],
|
|
11531
|
-
dest:
|
|
11610
|
+
dest: import_node_path4.default.posix.join("/", config.basePath, "/$1.rsc"),
|
|
11532
11611
|
headers: {
|
|
11533
11612
|
vary: routing.rsc.varyHeader
|
|
11534
11613
|
},
|
|
@@ -11541,7 +11620,7 @@ var myAdapter = {
|
|
|
11541
11620
|
// _next/image path
|
|
11542
11621
|
...config.basePath ? [
|
|
11543
11622
|
{
|
|
11544
|
-
src:
|
|
11623
|
+
src: import_node_path4.default.posix.join("/", config.basePath, "_next/image/?"),
|
|
11545
11624
|
dest: "/_next/image",
|
|
11546
11625
|
check: true
|
|
11547
11626
|
}
|
|
@@ -11557,20 +11636,20 @@ var myAdapter = {
|
|
|
11557
11636
|
// No-op _next/data rewrite to trigger handle: 'rewrites' and then 404
|
|
11558
11637
|
// if no match to prevent rewriting _next/data unexpectedly
|
|
11559
11638
|
{
|
|
11560
|
-
src:
|
|
11561
|
-
dest:
|
|
11639
|
+
src: import_node_path4.default.posix.join("/", config.basePath, "_next/data/(.*)"),
|
|
11640
|
+
dest: import_node_path4.default.posix.join("/", config.basePath, "_next/data/$1"),
|
|
11562
11641
|
check: true
|
|
11563
11642
|
}
|
|
11564
11643
|
] : [],
|
|
11565
11644
|
// normalize /index.rsc to just / for App Router
|
|
11566
11645
|
...hasAppDir ? [
|
|
11567
11646
|
{
|
|
11568
|
-
src:
|
|
11647
|
+
src: import_node_path4.default.posix.join(
|
|
11569
11648
|
"/",
|
|
11570
11649
|
config.basePath,
|
|
11571
11650
|
"/index(\\.action|\\.rsc)"
|
|
11572
11651
|
),
|
|
11573
|
-
dest:
|
|
11652
|
+
dest: import_node_path4.default.posix.join("/", config.basePath),
|
|
11574
11653
|
continue: true
|
|
11575
11654
|
}
|
|
11576
11655
|
] : [],
|
|
@@ -11578,13 +11657,13 @@ var myAdapter = {
|
|
|
11578
11657
|
// ensure bad rewrites with /.rsc are fixed for App Router
|
|
11579
11658
|
...hasAppDir ? [
|
|
11580
11659
|
{
|
|
11581
|
-
src:
|
|
11582
|
-
dest:
|
|
11660
|
+
src: import_node_path4.default.posix.join("/", config.basePath, "/\\.rsc$"),
|
|
11661
|
+
dest: import_node_path4.default.posix.join("/", config.basePath, `/index.rsc`),
|
|
11583
11662
|
check: true
|
|
11584
11663
|
},
|
|
11585
11664
|
{
|
|
11586
|
-
src:
|
|
11587
|
-
dest:
|
|
11665
|
+
src: import_node_path4.default.posix.join("/", config.basePath, "(.+)/\\.rsc$"),
|
|
11666
|
+
dest: import_node_path4.default.posix.join("/", config.basePath, "$1.rsc"),
|
|
11588
11667
|
check: true
|
|
11589
11668
|
}
|
|
11590
11669
|
] : [],
|
|
@@ -11592,14 +11671,14 @@ var myAdapter = {
|
|
|
11592
11671
|
...convertedRewrites.fallback,
|
|
11593
11672
|
// make sure 404 page is used when a directory is matched without
|
|
11594
11673
|
// an index page
|
|
11595
|
-
{ src:
|
|
11674
|
+
{ src: import_node_path4.default.posix.join("/", config.basePath, ".*"), status: 404 },
|
|
11596
11675
|
{ handle: "miss" },
|
|
11597
11676
|
// 404 to plain text file for _next/static
|
|
11598
11677
|
{
|
|
11599
|
-
src:
|
|
11678
|
+
src: import_node_path4.default.posix.join("/", config.basePath, "_next/static/.+"),
|
|
11600
11679
|
status: 404,
|
|
11601
11680
|
check: true,
|
|
11602
|
-
dest:
|
|
11681
|
+
dest: import_node_path4.default.posix.join(
|
|
11603
11682
|
"/",
|
|
11604
11683
|
config.basePath,
|
|
11605
11684
|
"_next/static/not-found.txt"
|
|
@@ -11616,8 +11695,8 @@ var myAdapter = {
|
|
|
11616
11695
|
// we only want to add the rewrite as the fallback case once routing is complete.
|
|
11617
11696
|
...config.i18n?.localeDetection === false ? [
|
|
11618
11697
|
{
|
|
11619
|
-
src: `^${
|
|
11620
|
-
dest: `${
|
|
11698
|
+
src: `^${import_node_path4.default.posix.join("/", config.basePath)}$`,
|
|
11699
|
+
dest: `${import_node_path4.default.posix.join(
|
|
11621
11700
|
"/",
|
|
11622
11701
|
config.basePath,
|
|
11623
11702
|
config.i18n.defaultLocale
|
|
@@ -11630,12 +11709,12 @@ var myAdapter = {
|
|
|
11630
11709
|
// e.g. for /de/posts/[slug] x-now-route-matches would have
|
|
11631
11710
|
// 1=posts%2Fpost-1
|
|
11632
11711
|
{
|
|
11633
|
-
src: `^${
|
|
11712
|
+
src: `^${import_node_path4.default.posix.join(
|
|
11634
11713
|
"/",
|
|
11635
11714
|
config.basePath,
|
|
11636
11715
|
"/"
|
|
11637
11716
|
)}(?!(?:_next/.*|${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})(?:/.*|$))(.*)$`,
|
|
11638
|
-
dest: `${
|
|
11717
|
+
dest: `${import_node_path4.default.posix.join(
|
|
11639
11718
|
"/",
|
|
11640
11719
|
config.basePath,
|
|
11641
11720
|
config.i18n.defaultLocale
|
|
@@ -11644,7 +11723,7 @@ var myAdapter = {
|
|
|
11644
11723
|
}
|
|
11645
11724
|
] : [],
|
|
11646
11725
|
{
|
|
11647
|
-
src:
|
|
11726
|
+
src: import_node_path4.default.posix.join(
|
|
11648
11727
|
"/",
|
|
11649
11728
|
config.basePath,
|
|
11650
11729
|
escapeStringRegexp(config.i18n.defaultLocale)
|
|
@@ -11653,11 +11732,11 @@ var myAdapter = {
|
|
|
11653
11732
|
check: true
|
|
11654
11733
|
},
|
|
11655
11734
|
{
|
|
11656
|
-
src: `^${
|
|
11735
|
+
src: `^${import_node_path4.default.posix.join(
|
|
11657
11736
|
"/",
|
|
11658
11737
|
config.basePath
|
|
11659
11738
|
)}/?(?:${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})/(.*)`,
|
|
11660
|
-
dest: `${
|
|
11739
|
+
dest: `${import_node_path4.default.posix.join("/", config.basePath, "/")}$1`,
|
|
11661
11740
|
check: true
|
|
11662
11741
|
}
|
|
11663
11742
|
] : [],
|
|
@@ -11686,7 +11765,7 @@ var myAdapter = {
|
|
|
11686
11765
|
// if middleware + pages - placeholder for middleware handling
|
|
11687
11766
|
...hasMiddleware ? [
|
|
11688
11767
|
{
|
|
11689
|
-
src: `^${
|
|
11768
|
+
src: `^${import_node_path4.default.posix.join(
|
|
11690
11769
|
"/",
|
|
11691
11770
|
config.basePath,
|
|
11692
11771
|
"/_next/data/",
|
|
@@ -11702,7 +11781,7 @@ var myAdapter = {
|
|
|
11702
11781
|
// add a catch-all data route so we don't 404 when getting
|
|
11703
11782
|
// middleware effects
|
|
11704
11783
|
{
|
|
11705
|
-
src: `^${
|
|
11784
|
+
src: `^${import_node_path4.default.posix.join(
|
|
11706
11785
|
"/",
|
|
11707
11786
|
config.basePath,
|
|
11708
11787
|
"/_next/data/",
|
|
@@ -11716,7 +11795,7 @@ var myAdapter = {
|
|
|
11716
11795
|
...onMatchRoutes,
|
|
11717
11796
|
// add internal matched path header for function bundle mapping
|
|
11718
11797
|
{
|
|
11719
|
-
src: config.basePath && config.basePath !== "/" ?
|
|
11798
|
+
src: config.basePath && config.basePath !== "/" ? import_node_path4.default.posix.join("/", config.basePath, "/?(?:index)?(?:/)?$") : `/(?:index)?(?:/)?$`,
|
|
11720
11799
|
headers: {
|
|
11721
11800
|
"x-matched-path": "/"
|
|
11722
11801
|
},
|
|
@@ -11724,7 +11803,7 @@ var myAdapter = {
|
|
|
11724
11803
|
important: true
|
|
11725
11804
|
},
|
|
11726
11805
|
{
|
|
11727
|
-
src:
|
|
11806
|
+
src: import_node_path4.default.posix.join(
|
|
11728
11807
|
"/",
|
|
11729
11808
|
config.basePath || "",
|
|
11730
11809
|
`/((?!index$).*?)(?:/)?$`
|
|
@@ -11739,12 +11818,12 @@ var myAdapter = {
|
|
|
11739
11818
|
// Custom Next.js 404 page
|
|
11740
11819
|
...config.i18n ? [
|
|
11741
11820
|
{
|
|
11742
|
-
src: `${
|
|
11821
|
+
src: `${import_node_path4.default.posix.join(
|
|
11743
11822
|
"/",
|
|
11744
11823
|
config.basePath,
|
|
11745
11824
|
"/"
|
|
11746
11825
|
)}(?<nextLocale>${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})(/.*|$)`,
|
|
11747
|
-
dest:
|
|
11826
|
+
dest: import_node_path4.default.posix.join(
|
|
11748
11827
|
"/",
|
|
11749
11828
|
config.basePath,
|
|
11750
11829
|
"/$nextLocale",
|
|
@@ -11754,8 +11833,8 @@ var myAdapter = {
|
|
|
11754
11833
|
caseSensitive: true
|
|
11755
11834
|
},
|
|
11756
11835
|
{
|
|
11757
|
-
src:
|
|
11758
|
-
dest:
|
|
11836
|
+
src: import_node_path4.default.posix.join("/", config.basePath, ".*"),
|
|
11837
|
+
dest: import_node_path4.default.posix.join(
|
|
11759
11838
|
"/",
|
|
11760
11839
|
config.basePath,
|
|
11761
11840
|
`/${config.i18n.defaultLocale}`,
|
|
@@ -11765,7 +11844,7 @@ var myAdapter = {
|
|
|
11765
11844
|
}
|
|
11766
11845
|
] : [
|
|
11767
11846
|
{
|
|
11768
|
-
src:
|
|
11847
|
+
src: import_node_path4.default.posix.join(
|
|
11769
11848
|
"/",
|
|
11770
11849
|
config.basePath,
|
|
11771
11850
|
// if config.basePath is populated we need to
|
|
@@ -11773,25 +11852,25 @@ var myAdapter = {
|
|
|
11773
11852
|
// that the config.basePath (basePath) itself matches
|
|
11774
11853
|
`${config.basePath && config.basePath !== "/" ? "?" : ""}.*`
|
|
11775
11854
|
),
|
|
11776
|
-
dest:
|
|
11855
|
+
dest: import_node_path4.default.posix.join("/", config.basePath, notFoundPath),
|
|
11777
11856
|
status: 404
|
|
11778
11857
|
}
|
|
11779
11858
|
],
|
|
11780
11859
|
// custom 500 page if present
|
|
11781
11860
|
...config.i18n && has500Output ? [
|
|
11782
11861
|
{
|
|
11783
|
-
src: `${
|
|
11862
|
+
src: `${import_node_path4.default.posix.join(
|
|
11784
11863
|
"/",
|
|
11785
11864
|
config.basePath,
|
|
11786
11865
|
"/"
|
|
11787
11866
|
)}(?<nextLocale>${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})(/.*|$)`,
|
|
11788
|
-
dest:
|
|
11867
|
+
dest: import_node_path4.default.posix.join("/", config.basePath, "/$nextLocale/500"),
|
|
11789
11868
|
status: 500,
|
|
11790
11869
|
caseSensitive: true
|
|
11791
11870
|
},
|
|
11792
11871
|
{
|
|
11793
|
-
src:
|
|
11794
|
-
dest:
|
|
11872
|
+
src: import_node_path4.default.posix.join("/", config.basePath, ".*"),
|
|
11873
|
+
dest: import_node_path4.default.posix.join(
|
|
11795
11874
|
"/",
|
|
11796
11875
|
config.basePath,
|
|
11797
11876
|
`/${config.i18n.defaultLocale}/500`
|
|
@@ -11800,7 +11879,7 @@ var myAdapter = {
|
|
|
11800
11879
|
}
|
|
11801
11880
|
] : [
|
|
11802
11881
|
{
|
|
11803
|
-
src:
|
|
11882
|
+
src: import_node_path4.default.posix.join(
|
|
11804
11883
|
"/",
|
|
11805
11884
|
config.basePath,
|
|
11806
11885
|
// if config.basePath is populated we need to
|
|
@@ -11808,7 +11887,7 @@ var myAdapter = {
|
|
|
11808
11887
|
// that the config.basePath (basePath) itself matches
|
|
11809
11888
|
`${config.basePath && config.basePath !== "/" ? "?" : ""}.*`
|
|
11810
11889
|
),
|
|
11811
|
-
dest:
|
|
11890
|
+
dest: import_node_path4.default.posix.join(
|
|
11812
11891
|
"/",
|
|
11813
11892
|
config.basePath,
|
|
11814
11893
|
has500Output ? "/500" : "/_error"
|
|
@@ -11817,8 +11896,8 @@ var myAdapter = {
|
|
|
11817
11896
|
}
|
|
11818
11897
|
]
|
|
11819
11898
|
];
|
|
11820
|
-
const outputConfigPath =
|
|
11821
|
-
await
|
|
11899
|
+
const outputConfigPath = import_node_path4.default.join(vercelOutputDir, "config.json");
|
|
11900
|
+
await import_promises4.default.writeFile(outputConfigPath, JSON.stringify(vercelConfig2, null, 2));
|
|
11822
11901
|
}
|
|
11823
11902
|
};
|
|
11824
11903
|
module.exports = myAdapter;
|