@vercel/next 11.0.4 → 12.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter/index.js +531 -463
- package/dist/index.js +8 -1
- package/package.json +5 -5
package/dist/adapter/index.js
CHANGED
|
@@ -678,54 +678,54 @@ var require_polyfills = __commonJS({
|
|
|
678
678
|
}
|
|
679
679
|
var chdir;
|
|
680
680
|
module2.exports = patch;
|
|
681
|
-
function patch(
|
|
681
|
+
function patch(fs5) {
|
|
682
682
|
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
|
683
|
-
patchLchmod(
|
|
684
|
-
}
|
|
685
|
-
if (!
|
|
686
|
-
patchLutimes(
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
if (
|
|
707
|
-
|
|
683
|
+
patchLchmod(fs5);
|
|
684
|
+
}
|
|
685
|
+
if (!fs5.lutimes) {
|
|
686
|
+
patchLutimes(fs5);
|
|
687
|
+
}
|
|
688
|
+
fs5.chown = chownFix(fs5.chown);
|
|
689
|
+
fs5.fchown = chownFix(fs5.fchown);
|
|
690
|
+
fs5.lchown = chownFix(fs5.lchown);
|
|
691
|
+
fs5.chmod = chmodFix(fs5.chmod);
|
|
692
|
+
fs5.fchmod = chmodFix(fs5.fchmod);
|
|
693
|
+
fs5.lchmod = chmodFix(fs5.lchmod);
|
|
694
|
+
fs5.chownSync = chownFixSync(fs5.chownSync);
|
|
695
|
+
fs5.fchownSync = chownFixSync(fs5.fchownSync);
|
|
696
|
+
fs5.lchownSync = chownFixSync(fs5.lchownSync);
|
|
697
|
+
fs5.chmodSync = chmodFixSync(fs5.chmodSync);
|
|
698
|
+
fs5.fchmodSync = chmodFixSync(fs5.fchmodSync);
|
|
699
|
+
fs5.lchmodSync = chmodFixSync(fs5.lchmodSync);
|
|
700
|
+
fs5.stat = statFix(fs5.stat);
|
|
701
|
+
fs5.fstat = statFix(fs5.fstat);
|
|
702
|
+
fs5.lstat = statFix(fs5.lstat);
|
|
703
|
+
fs5.statSync = statFixSync(fs5.statSync);
|
|
704
|
+
fs5.fstatSync = statFixSync(fs5.fstatSync);
|
|
705
|
+
fs5.lstatSync = statFixSync(fs5.lstatSync);
|
|
706
|
+
if (fs5.chmod && !fs5.lchmod) {
|
|
707
|
+
fs5.lchmod = function(path4, mode, cb) {
|
|
708
708
|
if (cb) process.nextTick(cb);
|
|
709
709
|
};
|
|
710
|
-
|
|
710
|
+
fs5.lchmodSync = function() {
|
|
711
711
|
};
|
|
712
712
|
}
|
|
713
|
-
if (
|
|
714
|
-
|
|
713
|
+
if (fs5.chown && !fs5.lchown) {
|
|
714
|
+
fs5.lchown = function(path4, uid, gid, cb) {
|
|
715
715
|
if (cb) process.nextTick(cb);
|
|
716
716
|
};
|
|
717
|
-
|
|
717
|
+
fs5.lchownSync = function() {
|
|
718
718
|
};
|
|
719
719
|
}
|
|
720
720
|
if (platform === "win32") {
|
|
721
|
-
|
|
721
|
+
fs5.rename = typeof fs5.rename !== "function" ? fs5.rename : (function(fs$rename) {
|
|
722
722
|
function rename(from, to, cb) {
|
|
723
723
|
var start = Date.now();
|
|
724
724
|
var backoff = 0;
|
|
725
725
|
fs$rename(from, to, function CB(er) {
|
|
726
726
|
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
|
|
727
727
|
setTimeout(function() {
|
|
728
|
-
|
|
728
|
+
fs5.stat(to, function(stater, st) {
|
|
729
729
|
if (stater && stater.code === "ENOENT")
|
|
730
730
|
fs$rename(from, to, CB);
|
|
731
731
|
else
|
|
@@ -741,9 +741,9 @@ var require_polyfills = __commonJS({
|
|
|
741
741
|
}
|
|
742
742
|
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
|
|
743
743
|
return rename;
|
|
744
|
-
})(
|
|
744
|
+
})(fs5.rename);
|
|
745
745
|
}
|
|
746
|
-
|
|
746
|
+
fs5.read = typeof fs5.read !== "function" ? fs5.read : (function(fs$read) {
|
|
747
747
|
function read(fd, buffer, offset, length, position, callback_) {
|
|
748
748
|
var callback;
|
|
749
749
|
if (callback_ && typeof callback_ === "function") {
|
|
@@ -751,22 +751,22 @@ var require_polyfills = __commonJS({
|
|
|
751
751
|
callback = function(er, _, __) {
|
|
752
752
|
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
|
753
753
|
eagCounter++;
|
|
754
|
-
return fs$read.call(
|
|
754
|
+
return fs$read.call(fs5, fd, buffer, offset, length, position, callback);
|
|
755
755
|
}
|
|
756
756
|
callback_.apply(this, arguments);
|
|
757
757
|
};
|
|
758
758
|
}
|
|
759
|
-
return fs$read.call(
|
|
759
|
+
return fs$read.call(fs5, fd, buffer, offset, length, position, callback);
|
|
760
760
|
}
|
|
761
761
|
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
|
762
762
|
return read;
|
|
763
|
-
})(
|
|
764
|
-
|
|
763
|
+
})(fs5.read);
|
|
764
|
+
fs5.readSync = typeof fs5.readSync !== "function" ? fs5.readSync : /* @__PURE__ */ (function(fs$readSync) {
|
|
765
765
|
return function(fd, buffer, offset, length, position) {
|
|
766
766
|
var eagCounter = 0;
|
|
767
767
|
while (true) {
|
|
768
768
|
try {
|
|
769
|
-
return fs$readSync.call(
|
|
769
|
+
return fs$readSync.call(fs5, fd, buffer, offset, length, position);
|
|
770
770
|
} catch (er) {
|
|
771
771
|
if (er.code === "EAGAIN" && eagCounter < 10) {
|
|
772
772
|
eagCounter++;
|
|
@@ -776,11 +776,11 @@ var require_polyfills = __commonJS({
|
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
778
|
};
|
|
779
|
-
})(
|
|
780
|
-
function patchLchmod(
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
779
|
+
})(fs5.readSync);
|
|
780
|
+
function patchLchmod(fs6) {
|
|
781
|
+
fs6.lchmod = function(path4, mode, callback) {
|
|
782
|
+
fs6.open(
|
|
783
|
+
path4,
|
|
784
784
|
constants.O_WRONLY | constants.O_SYMLINK,
|
|
785
785
|
mode,
|
|
786
786
|
function(err, fd) {
|
|
@@ -788,80 +788,80 @@ var require_polyfills = __commonJS({
|
|
|
788
788
|
if (callback) callback(err);
|
|
789
789
|
return;
|
|
790
790
|
}
|
|
791
|
-
|
|
792
|
-
|
|
791
|
+
fs6.fchmod(fd, mode, function(err2) {
|
|
792
|
+
fs6.close(fd, function(err22) {
|
|
793
793
|
if (callback) callback(err2 || err22);
|
|
794
794
|
});
|
|
795
795
|
});
|
|
796
796
|
}
|
|
797
797
|
);
|
|
798
798
|
};
|
|
799
|
-
|
|
800
|
-
var fd =
|
|
799
|
+
fs6.lchmodSync = function(path4, mode) {
|
|
800
|
+
var fd = fs6.openSync(path4, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
801
801
|
var threw = true;
|
|
802
802
|
var ret;
|
|
803
803
|
try {
|
|
804
|
-
ret =
|
|
804
|
+
ret = fs6.fchmodSync(fd, mode);
|
|
805
805
|
threw = false;
|
|
806
806
|
} finally {
|
|
807
807
|
if (threw) {
|
|
808
808
|
try {
|
|
809
|
-
|
|
809
|
+
fs6.closeSync(fd);
|
|
810
810
|
} catch (er) {
|
|
811
811
|
}
|
|
812
812
|
} else {
|
|
813
|
-
|
|
813
|
+
fs6.closeSync(fd);
|
|
814
814
|
}
|
|
815
815
|
}
|
|
816
816
|
return ret;
|
|
817
817
|
};
|
|
818
818
|
}
|
|
819
|
-
function patchLutimes(
|
|
820
|
-
if (constants.hasOwnProperty("O_SYMLINK") &&
|
|
821
|
-
|
|
822
|
-
|
|
819
|
+
function patchLutimes(fs6) {
|
|
820
|
+
if (constants.hasOwnProperty("O_SYMLINK") && fs6.futimes) {
|
|
821
|
+
fs6.lutimes = function(path4, at, mt, cb) {
|
|
822
|
+
fs6.open(path4, constants.O_SYMLINK, function(er, fd) {
|
|
823
823
|
if (er) {
|
|
824
824
|
if (cb) cb(er);
|
|
825
825
|
return;
|
|
826
826
|
}
|
|
827
|
-
|
|
828
|
-
|
|
827
|
+
fs6.futimes(fd, at, mt, function(er2) {
|
|
828
|
+
fs6.close(fd, function(er22) {
|
|
829
829
|
if (cb) cb(er2 || er22);
|
|
830
830
|
});
|
|
831
831
|
});
|
|
832
832
|
});
|
|
833
833
|
};
|
|
834
|
-
|
|
835
|
-
var fd =
|
|
834
|
+
fs6.lutimesSync = function(path4, at, mt) {
|
|
835
|
+
var fd = fs6.openSync(path4, constants.O_SYMLINK);
|
|
836
836
|
var ret;
|
|
837
837
|
var threw = true;
|
|
838
838
|
try {
|
|
839
|
-
ret =
|
|
839
|
+
ret = fs6.futimesSync(fd, at, mt);
|
|
840
840
|
threw = false;
|
|
841
841
|
} finally {
|
|
842
842
|
if (threw) {
|
|
843
843
|
try {
|
|
844
|
-
|
|
844
|
+
fs6.closeSync(fd);
|
|
845
845
|
} catch (er) {
|
|
846
846
|
}
|
|
847
847
|
} else {
|
|
848
|
-
|
|
848
|
+
fs6.closeSync(fd);
|
|
849
849
|
}
|
|
850
850
|
}
|
|
851
851
|
return ret;
|
|
852
852
|
};
|
|
853
|
-
} else if (
|
|
854
|
-
|
|
853
|
+
} else if (fs6.futimes) {
|
|
854
|
+
fs6.lutimes = function(_a, _b, _c, cb) {
|
|
855
855
|
if (cb) process.nextTick(cb);
|
|
856
856
|
};
|
|
857
|
-
|
|
857
|
+
fs6.lutimesSync = function() {
|
|
858
858
|
};
|
|
859
859
|
}
|
|
860
860
|
}
|
|
861
861
|
function chmodFix(orig) {
|
|
862
862
|
if (!orig) return orig;
|
|
863
863
|
return function(target, mode, cb) {
|
|
864
|
-
return orig.call(
|
|
864
|
+
return orig.call(fs5, target, mode, function(er) {
|
|
865
865
|
if (chownErOk(er)) er = null;
|
|
866
866
|
if (cb) cb.apply(this, arguments);
|
|
867
867
|
});
|
|
@@ -871,7 +871,7 @@ var require_polyfills = __commonJS({
|
|
|
871
871
|
if (!orig) return orig;
|
|
872
872
|
return function(target, mode) {
|
|
873
873
|
try {
|
|
874
|
-
return orig.call(
|
|
874
|
+
return orig.call(fs5, target, mode);
|
|
875
875
|
} catch (er) {
|
|
876
876
|
if (!chownErOk(er)) throw er;
|
|
877
877
|
}
|
|
@@ -880,7 +880,7 @@ var require_polyfills = __commonJS({
|
|
|
880
880
|
function chownFix(orig) {
|
|
881
881
|
if (!orig) return orig;
|
|
882
882
|
return function(target, uid, gid, cb) {
|
|
883
|
-
return orig.call(
|
|
883
|
+
return orig.call(fs5, target, uid, gid, function(er) {
|
|
884
884
|
if (chownErOk(er)) er = null;
|
|
885
885
|
if (cb) cb.apply(this, arguments);
|
|
886
886
|
});
|
|
@@ -890,7 +890,7 @@ var require_polyfills = __commonJS({
|
|
|
890
890
|
if (!orig) return orig;
|
|
891
891
|
return function(target, uid, gid) {
|
|
892
892
|
try {
|
|
893
|
-
return orig.call(
|
|
893
|
+
return orig.call(fs5, target, uid, gid);
|
|
894
894
|
} catch (er) {
|
|
895
895
|
if (!chownErOk(er)) throw er;
|
|
896
896
|
}
|
|
@@ -910,13 +910,13 @@ var require_polyfills = __commonJS({
|
|
|
910
910
|
}
|
|
911
911
|
if (cb) cb.apply(this, arguments);
|
|
912
912
|
}
|
|
913
|
-
return options ? orig.call(
|
|
913
|
+
return options ? orig.call(fs5, target, options, callback) : orig.call(fs5, target, callback);
|
|
914
914
|
};
|
|
915
915
|
}
|
|
916
916
|
function statFixSync(orig) {
|
|
917
917
|
if (!orig) return orig;
|
|
918
918
|
return function(target, options) {
|
|
919
|
-
var stats = options ? orig.call(
|
|
919
|
+
var stats = options ? orig.call(fs5, target, options) : orig.call(fs5, target);
|
|
920
920
|
if (stats) {
|
|
921
921
|
if (stats.uid < 0) stats.uid += 4294967296;
|
|
922
922
|
if (stats.gid < 0) stats.gid += 4294967296;
|
|
@@ -945,16 +945,16 @@ var require_legacy_streams = __commonJS({
|
|
|
945
945
|
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
|
|
946
946
|
var Stream = require("stream").Stream;
|
|
947
947
|
module2.exports = legacy;
|
|
948
|
-
function legacy(
|
|
948
|
+
function legacy(fs5) {
|
|
949
949
|
return {
|
|
950
950
|
ReadStream,
|
|
951
951
|
WriteStream
|
|
952
952
|
};
|
|
953
|
-
function ReadStream(
|
|
954
|
-
if (!(this instanceof ReadStream)) return new ReadStream(
|
|
953
|
+
function ReadStream(path4, options) {
|
|
954
|
+
if (!(this instanceof ReadStream)) return new ReadStream(path4, options);
|
|
955
955
|
Stream.call(this);
|
|
956
956
|
var self = this;
|
|
957
|
-
this.path =
|
|
957
|
+
this.path = path4;
|
|
958
958
|
this.fd = null;
|
|
959
959
|
this.readable = true;
|
|
960
960
|
this.paused = false;
|
|
@@ -988,7 +988,7 @@ var require_legacy_streams = __commonJS({
|
|
|
988
988
|
});
|
|
989
989
|
return;
|
|
990
990
|
}
|
|
991
|
-
|
|
991
|
+
fs5.open(this.path, this.flags, this.mode, function(err, fd) {
|
|
992
992
|
if (err) {
|
|
993
993
|
self.emit("error", err);
|
|
994
994
|
self.readable = false;
|
|
@@ -999,10 +999,10 @@ var require_legacy_streams = __commonJS({
|
|
|
999
999
|
self._read();
|
|
1000
1000
|
});
|
|
1001
1001
|
}
|
|
1002
|
-
function WriteStream(
|
|
1003
|
-
if (!(this instanceof WriteStream)) return new WriteStream(
|
|
1002
|
+
function WriteStream(path4, options) {
|
|
1003
|
+
if (!(this instanceof WriteStream)) return new WriteStream(path4, options);
|
|
1004
1004
|
Stream.call(this);
|
|
1005
|
-
this.path =
|
|
1005
|
+
this.path = path4;
|
|
1006
1006
|
this.fd = null;
|
|
1007
1007
|
this.writable = true;
|
|
1008
1008
|
this.flags = "w";
|
|
@@ -1027,7 +1027,7 @@ var require_legacy_streams = __commonJS({
|
|
|
1027
1027
|
this.busy = false;
|
|
1028
1028
|
this._queue = [];
|
|
1029
1029
|
if (this.fd === null) {
|
|
1030
|
-
this._open =
|
|
1030
|
+
this._open = fs5.open;
|
|
1031
1031
|
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
|
|
1032
1032
|
this.flush();
|
|
1033
1033
|
}
|
|
@@ -1062,7 +1062,7 @@ var require_clone = __commonJS({
|
|
|
1062
1062
|
// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
|
|
1063
1063
|
var require_graceful_fs = __commonJS({
|
|
1064
1064
|
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
|
|
1065
|
-
var
|
|
1065
|
+
var fs5 = require("fs");
|
|
1066
1066
|
var polyfills = require_polyfills();
|
|
1067
1067
|
var legacy = require_legacy_streams();
|
|
1068
1068
|
var clone = require_clone();
|
|
@@ -1094,12 +1094,12 @@ var require_graceful_fs = __commonJS({
|
|
|
1094
1094
|
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
1095
1095
|
console.error(m);
|
|
1096
1096
|
};
|
|
1097
|
-
if (!
|
|
1097
|
+
if (!fs5[gracefulQueue]) {
|
|
1098
1098
|
queue = global[gracefulQueue] || [];
|
|
1099
|
-
publishQueue(
|
|
1100
|
-
|
|
1099
|
+
publishQueue(fs5, queue);
|
|
1100
|
+
fs5.close = (function(fs$close) {
|
|
1101
1101
|
function close(fd, cb) {
|
|
1102
|
-
return fs$close.call(
|
|
1102
|
+
return fs$close.call(fs5, fd, function(err) {
|
|
1103
1103
|
if (!err) {
|
|
1104
1104
|
resetQueue();
|
|
1105
1105
|
}
|
|
@@ -1111,48 +1111,48 @@ var require_graceful_fs = __commonJS({
|
|
|
1111
1111
|
value: fs$close
|
|
1112
1112
|
});
|
|
1113
1113
|
return close;
|
|
1114
|
-
})(
|
|
1115
|
-
|
|
1114
|
+
})(fs5.close);
|
|
1115
|
+
fs5.closeSync = (function(fs$closeSync) {
|
|
1116
1116
|
function closeSync(fd) {
|
|
1117
|
-
fs$closeSync.apply(
|
|
1117
|
+
fs$closeSync.apply(fs5, arguments);
|
|
1118
1118
|
resetQueue();
|
|
1119
1119
|
}
|
|
1120
1120
|
Object.defineProperty(closeSync, previousSymbol, {
|
|
1121
1121
|
value: fs$closeSync
|
|
1122
1122
|
});
|
|
1123
1123
|
return closeSync;
|
|
1124
|
-
})(
|
|
1124
|
+
})(fs5.closeSync);
|
|
1125
1125
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
1126
1126
|
process.on("exit", function() {
|
|
1127
|
-
debug(
|
|
1128
|
-
require("assert").equal(
|
|
1127
|
+
debug(fs5[gracefulQueue]);
|
|
1128
|
+
require("assert").equal(fs5[gracefulQueue].length, 0);
|
|
1129
1129
|
});
|
|
1130
1130
|
}
|
|
1131
1131
|
}
|
|
1132
1132
|
var queue;
|
|
1133
1133
|
if (!global[gracefulQueue]) {
|
|
1134
|
-
publishQueue(global,
|
|
1135
|
-
}
|
|
1136
|
-
module2.exports = patch(clone(
|
|
1137
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !
|
|
1138
|
-
module2.exports = patch(
|
|
1139
|
-
|
|
1140
|
-
}
|
|
1141
|
-
function patch(
|
|
1142
|
-
polyfills(
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
var fs$readFile =
|
|
1147
|
-
|
|
1148
|
-
function readFile2(
|
|
1134
|
+
publishQueue(global, fs5[gracefulQueue]);
|
|
1135
|
+
}
|
|
1136
|
+
module2.exports = patch(clone(fs5));
|
|
1137
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs5.__patched) {
|
|
1138
|
+
module2.exports = patch(fs5);
|
|
1139
|
+
fs5.__patched = true;
|
|
1140
|
+
}
|
|
1141
|
+
function patch(fs6) {
|
|
1142
|
+
polyfills(fs6);
|
|
1143
|
+
fs6.gracefulify = patch;
|
|
1144
|
+
fs6.createReadStream = createReadStream;
|
|
1145
|
+
fs6.createWriteStream = createWriteStream;
|
|
1146
|
+
var fs$readFile = fs6.readFile;
|
|
1147
|
+
fs6.readFile = readFile2;
|
|
1148
|
+
function readFile2(path4, options, cb) {
|
|
1149
1149
|
if (typeof options === "function")
|
|
1150
1150
|
cb = options, options = null;
|
|
1151
|
-
return go$readFile(
|
|
1152
|
-
function go$readFile(
|
|
1153
|
-
return fs$readFile(
|
|
1151
|
+
return go$readFile(path4, options, cb);
|
|
1152
|
+
function go$readFile(path5, options2, cb2, startTime) {
|
|
1153
|
+
return fs$readFile(path5, options2, function(err) {
|
|
1154
1154
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
1155
|
-
enqueue([go$readFile, [
|
|
1155
|
+
enqueue([go$readFile, [path5, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
1156
1156
|
else {
|
|
1157
1157
|
if (typeof cb2 === "function")
|
|
1158
1158
|
cb2.apply(this, arguments);
|
|
@@ -1160,16 +1160,16 @@ var require_graceful_fs = __commonJS({
|
|
|
1160
1160
|
});
|
|
1161
1161
|
}
|
|
1162
1162
|
}
|
|
1163
|
-
var fs$writeFile =
|
|
1164
|
-
|
|
1165
|
-
function writeFile(
|
|
1163
|
+
var fs$writeFile = fs6.writeFile;
|
|
1164
|
+
fs6.writeFile = writeFile;
|
|
1165
|
+
function writeFile(path4, data, options, cb) {
|
|
1166
1166
|
if (typeof options === "function")
|
|
1167
1167
|
cb = options, options = null;
|
|
1168
|
-
return go$writeFile(
|
|
1169
|
-
function go$writeFile(
|
|
1170
|
-
return fs$writeFile(
|
|
1168
|
+
return go$writeFile(path4, data, options, cb);
|
|
1169
|
+
function go$writeFile(path5, data2, options2, cb2, startTime) {
|
|
1170
|
+
return fs$writeFile(path5, data2, options2, function(err) {
|
|
1171
1171
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
1172
|
-
enqueue([go$writeFile, [
|
|
1172
|
+
enqueue([go$writeFile, [path5, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
1173
1173
|
else {
|
|
1174
1174
|
if (typeof cb2 === "function")
|
|
1175
1175
|
cb2.apply(this, arguments);
|
|
@@ -1177,17 +1177,17 @@ var require_graceful_fs = __commonJS({
|
|
|
1177
1177
|
});
|
|
1178
1178
|
}
|
|
1179
1179
|
}
|
|
1180
|
-
var fs$appendFile =
|
|
1180
|
+
var fs$appendFile = fs6.appendFile;
|
|
1181
1181
|
if (fs$appendFile)
|
|
1182
|
-
|
|
1183
|
-
function appendFile(
|
|
1182
|
+
fs6.appendFile = appendFile;
|
|
1183
|
+
function appendFile(path4, data, options, cb) {
|
|
1184
1184
|
if (typeof options === "function")
|
|
1185
1185
|
cb = options, options = null;
|
|
1186
|
-
return go$appendFile(
|
|
1187
|
-
function go$appendFile(
|
|
1188
|
-
return fs$appendFile(
|
|
1186
|
+
return go$appendFile(path4, data, options, cb);
|
|
1187
|
+
function go$appendFile(path5, data2, options2, cb2, startTime) {
|
|
1188
|
+
return fs$appendFile(path5, data2, options2, function(err) {
|
|
1189
1189
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
1190
|
-
enqueue([go$appendFile, [
|
|
1190
|
+
enqueue([go$appendFile, [path5, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
1191
1191
|
else {
|
|
1192
1192
|
if (typeof cb2 === "function")
|
|
1193
1193
|
cb2.apply(this, arguments);
|
|
@@ -1195,9 +1195,9 @@ var require_graceful_fs = __commonJS({
|
|
|
1195
1195
|
});
|
|
1196
1196
|
}
|
|
1197
1197
|
}
|
|
1198
|
-
var fs$copyFile =
|
|
1198
|
+
var fs$copyFile = fs6.copyFile;
|
|
1199
1199
|
if (fs$copyFile)
|
|
1200
|
-
|
|
1200
|
+
fs6.copyFile = copyFile;
|
|
1201
1201
|
function copyFile(src, dest, flags, cb) {
|
|
1202
1202
|
if (typeof flags === "function") {
|
|
1203
1203
|
cb = flags;
|
|
@@ -1215,34 +1215,34 @@ var require_graceful_fs = __commonJS({
|
|
|
1215
1215
|
});
|
|
1216
1216
|
}
|
|
1217
1217
|
}
|
|
1218
|
-
var fs$readdir =
|
|
1219
|
-
|
|
1218
|
+
var fs$readdir = fs6.readdir;
|
|
1219
|
+
fs6.readdir = readdir;
|
|
1220
1220
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
1221
|
-
function readdir(
|
|
1221
|
+
function readdir(path4, options, cb) {
|
|
1222
1222
|
if (typeof options === "function")
|
|
1223
1223
|
cb = options, options = null;
|
|
1224
|
-
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(
|
|
1225
|
-
return fs$readdir(
|
|
1226
|
-
|
|
1224
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path5, options2, cb2, startTime) {
|
|
1225
|
+
return fs$readdir(path5, fs$readdirCallback(
|
|
1226
|
+
path5,
|
|
1227
1227
|
options2,
|
|
1228
1228
|
cb2,
|
|
1229
1229
|
startTime
|
|
1230
1230
|
));
|
|
1231
|
-
} : function go$readdir2(
|
|
1232
|
-
return fs$readdir(
|
|
1233
|
-
|
|
1231
|
+
} : function go$readdir2(path5, options2, cb2, startTime) {
|
|
1232
|
+
return fs$readdir(path5, options2, fs$readdirCallback(
|
|
1233
|
+
path5,
|
|
1234
1234
|
options2,
|
|
1235
1235
|
cb2,
|
|
1236
1236
|
startTime
|
|
1237
1237
|
));
|
|
1238
1238
|
};
|
|
1239
|
-
return go$readdir(
|
|
1240
|
-
function fs$readdirCallback(
|
|
1239
|
+
return go$readdir(path4, options, cb);
|
|
1240
|
+
function fs$readdirCallback(path5, options2, cb2, startTime) {
|
|
1241
1241
|
return function(err, files) {
|
|
1242
1242
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
1243
1243
|
enqueue([
|
|
1244
1244
|
go$readdir,
|
|
1245
|
-
[
|
|
1245
|
+
[path5, options2, cb2],
|
|
1246
1246
|
err,
|
|
1247
1247
|
startTime || Date.now(),
|
|
1248
1248
|
Date.now()
|
|
@@ -1257,21 +1257,21 @@ var require_graceful_fs = __commonJS({
|
|
|
1257
1257
|
}
|
|
1258
1258
|
}
|
|
1259
1259
|
if (process.version.substr(0, 4) === "v0.8") {
|
|
1260
|
-
var legStreams = legacy(
|
|
1260
|
+
var legStreams = legacy(fs6);
|
|
1261
1261
|
ReadStream = legStreams.ReadStream;
|
|
1262
1262
|
WriteStream = legStreams.WriteStream;
|
|
1263
1263
|
}
|
|
1264
|
-
var fs$ReadStream =
|
|
1264
|
+
var fs$ReadStream = fs6.ReadStream;
|
|
1265
1265
|
if (fs$ReadStream) {
|
|
1266
1266
|
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
|
1267
1267
|
ReadStream.prototype.open = ReadStream$open;
|
|
1268
1268
|
}
|
|
1269
|
-
var fs$WriteStream =
|
|
1269
|
+
var fs$WriteStream = fs6.WriteStream;
|
|
1270
1270
|
if (fs$WriteStream) {
|
|
1271
1271
|
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
|
1272
1272
|
WriteStream.prototype.open = WriteStream$open;
|
|
1273
1273
|
}
|
|
1274
|
-
Object.defineProperty(
|
|
1274
|
+
Object.defineProperty(fs6, "ReadStream", {
|
|
1275
1275
|
get: function() {
|
|
1276
1276
|
return ReadStream;
|
|
1277
1277
|
},
|
|
@@ -1281,7 +1281,7 @@ var require_graceful_fs = __commonJS({
|
|
|
1281
1281
|
enumerable: true,
|
|
1282
1282
|
configurable: true
|
|
1283
1283
|
});
|
|
1284
|
-
Object.defineProperty(
|
|
1284
|
+
Object.defineProperty(fs6, "WriteStream", {
|
|
1285
1285
|
get: function() {
|
|
1286
1286
|
return WriteStream;
|
|
1287
1287
|
},
|
|
@@ -1292,7 +1292,7 @@ var require_graceful_fs = __commonJS({
|
|
|
1292
1292
|
configurable: true
|
|
1293
1293
|
});
|
|
1294
1294
|
var FileReadStream = ReadStream;
|
|
1295
|
-
Object.defineProperty(
|
|
1295
|
+
Object.defineProperty(fs6, "FileReadStream", {
|
|
1296
1296
|
get: function() {
|
|
1297
1297
|
return FileReadStream;
|
|
1298
1298
|
},
|
|
@@ -1303,7 +1303,7 @@ var require_graceful_fs = __commonJS({
|
|
|
1303
1303
|
configurable: true
|
|
1304
1304
|
});
|
|
1305
1305
|
var FileWriteStream = WriteStream;
|
|
1306
|
-
Object.defineProperty(
|
|
1306
|
+
Object.defineProperty(fs6, "FileWriteStream", {
|
|
1307
1307
|
get: function() {
|
|
1308
1308
|
return FileWriteStream;
|
|
1309
1309
|
},
|
|
@@ -1313,7 +1313,7 @@ var require_graceful_fs = __commonJS({
|
|
|
1313
1313
|
enumerable: true,
|
|
1314
1314
|
configurable: true
|
|
1315
1315
|
});
|
|
1316
|
-
function ReadStream(
|
|
1316
|
+
function ReadStream(path4, options) {
|
|
1317
1317
|
if (this instanceof ReadStream)
|
|
1318
1318
|
return fs$ReadStream.apply(this, arguments), this;
|
|
1319
1319
|
else
|
|
@@ -1333,7 +1333,7 @@ var require_graceful_fs = __commonJS({
|
|
|
1333
1333
|
}
|
|
1334
1334
|
});
|
|
1335
1335
|
}
|
|
1336
|
-
function WriteStream(
|
|
1336
|
+
function WriteStream(path4, options) {
|
|
1337
1337
|
if (this instanceof WriteStream)
|
|
1338
1338
|
return fs$WriteStream.apply(this, arguments), this;
|
|
1339
1339
|
else
|
|
@@ -1351,22 +1351,22 @@ var require_graceful_fs = __commonJS({
|
|
|
1351
1351
|
}
|
|
1352
1352
|
});
|
|
1353
1353
|
}
|
|
1354
|
-
function createReadStream(
|
|
1355
|
-
return new
|
|
1354
|
+
function createReadStream(path4, options) {
|
|
1355
|
+
return new fs6.ReadStream(path4, options);
|
|
1356
1356
|
}
|
|
1357
|
-
function createWriteStream(
|
|
1358
|
-
return new
|
|
1357
|
+
function createWriteStream(path4, options) {
|
|
1358
|
+
return new fs6.WriteStream(path4, options);
|
|
1359
1359
|
}
|
|
1360
|
-
var fs$open =
|
|
1361
|
-
|
|
1362
|
-
function open(
|
|
1360
|
+
var fs$open = fs6.open;
|
|
1361
|
+
fs6.open = open;
|
|
1362
|
+
function open(path4, flags, mode, cb) {
|
|
1363
1363
|
if (typeof mode === "function")
|
|
1364
1364
|
cb = mode, mode = null;
|
|
1365
|
-
return go$open(
|
|
1366
|
-
function go$open(
|
|
1367
|
-
return fs$open(
|
|
1365
|
+
return go$open(path4, flags, mode, cb);
|
|
1366
|
+
function go$open(path5, flags2, mode2, cb2, startTime) {
|
|
1367
|
+
return fs$open(path5, flags2, mode2, function(err, fd) {
|
|
1368
1368
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
1369
|
-
enqueue([go$open, [
|
|
1369
|
+
enqueue([go$open, [path5, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
1370
1370
|
else {
|
|
1371
1371
|
if (typeof cb2 === "function")
|
|
1372
1372
|
cb2.apply(this, arguments);
|
|
@@ -1374,20 +1374,20 @@ var require_graceful_fs = __commonJS({
|
|
|
1374
1374
|
});
|
|
1375
1375
|
}
|
|
1376
1376
|
}
|
|
1377
|
-
return
|
|
1377
|
+
return fs6;
|
|
1378
1378
|
}
|
|
1379
1379
|
function enqueue(elem) {
|
|
1380
1380
|
debug("ENQUEUE", elem[0].name, elem[1]);
|
|
1381
|
-
|
|
1381
|
+
fs5[gracefulQueue].push(elem);
|
|
1382
1382
|
retry();
|
|
1383
1383
|
}
|
|
1384
1384
|
var retryTimer;
|
|
1385
1385
|
function resetQueue() {
|
|
1386
1386
|
var now = Date.now();
|
|
1387
|
-
for (var i = 0; i <
|
|
1388
|
-
if (
|
|
1389
|
-
|
|
1390
|
-
|
|
1387
|
+
for (var i = 0; i < fs5[gracefulQueue].length; ++i) {
|
|
1388
|
+
if (fs5[gracefulQueue][i].length > 2) {
|
|
1389
|
+
fs5[gracefulQueue][i][3] = now;
|
|
1390
|
+
fs5[gracefulQueue][i][4] = now;
|
|
1391
1391
|
}
|
|
1392
1392
|
}
|
|
1393
1393
|
retry();
|
|
@@ -1395,9 +1395,9 @@ var require_graceful_fs = __commonJS({
|
|
|
1395
1395
|
function retry() {
|
|
1396
1396
|
clearTimeout(retryTimer);
|
|
1397
1397
|
retryTimer = void 0;
|
|
1398
|
-
if (
|
|
1398
|
+
if (fs5[gracefulQueue].length === 0)
|
|
1399
1399
|
return;
|
|
1400
|
-
var elem =
|
|
1400
|
+
var elem = fs5[gracefulQueue].shift();
|
|
1401
1401
|
var fn = elem[0];
|
|
1402
1402
|
var args = elem[1];
|
|
1403
1403
|
var err = elem[2];
|
|
@@ -1419,7 +1419,7 @@ var require_graceful_fs = __commonJS({
|
|
|
1419
1419
|
debug("RETRY", fn.name, args);
|
|
1420
1420
|
fn.apply(null, args.concat([startTime]));
|
|
1421
1421
|
} else {
|
|
1422
|
-
|
|
1422
|
+
fs5[gracefulQueue].push(elem);
|
|
1423
1423
|
}
|
|
1424
1424
|
}
|
|
1425
1425
|
if (retryTimer === void 0) {
|
|
@@ -1434,7 +1434,7 @@ var require_fs = __commonJS({
|
|
|
1434
1434
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/fs/index.js"(exports2) {
|
|
1435
1435
|
"use strict";
|
|
1436
1436
|
var u = require_universalify().fromCallback;
|
|
1437
|
-
var
|
|
1437
|
+
var fs5 = require_graceful_fs();
|
|
1438
1438
|
var api = [
|
|
1439
1439
|
"access",
|
|
1440
1440
|
"appendFile",
|
|
@@ -1471,26 +1471,26 @@ var require_fs = __commonJS({
|
|
|
1471
1471
|
"utimes",
|
|
1472
1472
|
"writeFile"
|
|
1473
1473
|
].filter((key) => {
|
|
1474
|
-
return typeof
|
|
1474
|
+
return typeof fs5[key] === "function";
|
|
1475
1475
|
});
|
|
1476
|
-
Object.assign(exports2,
|
|
1476
|
+
Object.assign(exports2, fs5);
|
|
1477
1477
|
api.forEach((method) => {
|
|
1478
|
-
exports2[method] = u(
|
|
1478
|
+
exports2[method] = u(fs5[method]);
|
|
1479
1479
|
});
|
|
1480
1480
|
exports2.exists = function(filename, callback) {
|
|
1481
1481
|
if (typeof callback === "function") {
|
|
1482
|
-
return
|
|
1482
|
+
return fs5.exists(filename, callback);
|
|
1483
1483
|
}
|
|
1484
1484
|
return new Promise((resolve) => {
|
|
1485
|
-
return
|
|
1485
|
+
return fs5.exists(filename, resolve);
|
|
1486
1486
|
});
|
|
1487
1487
|
};
|
|
1488
1488
|
exports2.read = function(fd, buffer, offset, length, position, callback) {
|
|
1489
1489
|
if (typeof callback === "function") {
|
|
1490
|
-
return
|
|
1490
|
+
return fs5.read(fd, buffer, offset, length, position, callback);
|
|
1491
1491
|
}
|
|
1492
1492
|
return new Promise((resolve, reject) => {
|
|
1493
|
-
|
|
1493
|
+
fs5.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
|
|
1494
1494
|
if (err) return reject(err);
|
|
1495
1495
|
resolve({ bytesRead, buffer: buffer2 });
|
|
1496
1496
|
});
|
|
@@ -1498,10 +1498,10 @@ var require_fs = __commonJS({
|
|
|
1498
1498
|
};
|
|
1499
1499
|
exports2.write = function(fd, buffer, ...args) {
|
|
1500
1500
|
if (typeof args[args.length - 1] === "function") {
|
|
1501
|
-
return
|
|
1501
|
+
return fs5.write(fd, buffer, ...args);
|
|
1502
1502
|
}
|
|
1503
1503
|
return new Promise((resolve, reject) => {
|
|
1504
|
-
|
|
1504
|
+
fs5.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
|
|
1505
1505
|
if (err) return reject(err);
|
|
1506
1506
|
resolve({ bytesWritten, buffer: buffer2 });
|
|
1507
1507
|
});
|
|
@@ -1509,10 +1509,10 @@ var require_fs = __commonJS({
|
|
|
1509
1509
|
};
|
|
1510
1510
|
exports2.readv = function(fd, buffers, ...args) {
|
|
1511
1511
|
if (typeof args[args.length - 1] === "function") {
|
|
1512
|
-
return
|
|
1512
|
+
return fs5.readv(fd, buffers, ...args);
|
|
1513
1513
|
}
|
|
1514
1514
|
return new Promise((resolve, reject) => {
|
|
1515
|
-
|
|
1515
|
+
fs5.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
|
|
1516
1516
|
if (err) return reject(err);
|
|
1517
1517
|
resolve({ bytesRead, buffers: buffers2 });
|
|
1518
1518
|
});
|
|
@@ -1520,17 +1520,17 @@ var require_fs = __commonJS({
|
|
|
1520
1520
|
};
|
|
1521
1521
|
exports2.writev = function(fd, buffers, ...args) {
|
|
1522
1522
|
if (typeof args[args.length - 1] === "function") {
|
|
1523
|
-
return
|
|
1523
|
+
return fs5.writev(fd, buffers, ...args);
|
|
1524
1524
|
}
|
|
1525
1525
|
return new Promise((resolve, reject) => {
|
|
1526
|
-
|
|
1526
|
+
fs5.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
|
|
1527
1527
|
if (err) return reject(err);
|
|
1528
1528
|
resolve({ bytesWritten, buffers: buffers2 });
|
|
1529
1529
|
});
|
|
1530
1530
|
});
|
|
1531
1531
|
};
|
|
1532
|
-
if (typeof
|
|
1533
|
-
exports2.realpath.native = u(
|
|
1532
|
+
if (typeof fs5.realpath.native === "function") {
|
|
1533
|
+
exports2.realpath.native = u(fs5.realpath.native);
|
|
1534
1534
|
} else {
|
|
1535
1535
|
process.emitWarning(
|
|
1536
1536
|
"fs.realpath.native is not a function. Is fs being monkey-patched?",
|
|
@@ -1545,10 +1545,10 @@ var require_fs = __commonJS({
|
|
|
1545
1545
|
var require_utils = __commonJS({
|
|
1546
1546
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/utils.js"(exports2, module2) {
|
|
1547
1547
|
"use strict";
|
|
1548
|
-
var
|
|
1548
|
+
var path4 = require("path");
|
|
1549
1549
|
module2.exports.checkPath = function checkPath(pth) {
|
|
1550
1550
|
if (process.platform === "win32") {
|
|
1551
|
-
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(
|
|
1551
|
+
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path4.parse(pth).root, ""));
|
|
1552
1552
|
if (pathHasInvalidWinCharacters) {
|
|
1553
1553
|
const error = new Error(`Path contains invalid characters: ${pth}`);
|
|
1554
1554
|
error.code = "EINVAL";
|
|
@@ -1563,7 +1563,7 @@ var require_utils = __commonJS({
|
|
|
1563
1563
|
var require_make_dir = __commonJS({
|
|
1564
1564
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports2, module2) {
|
|
1565
1565
|
"use strict";
|
|
1566
|
-
var
|
|
1566
|
+
var fs5 = require_fs();
|
|
1567
1567
|
var { checkPath } = require_utils();
|
|
1568
1568
|
var getMode = (options) => {
|
|
1569
1569
|
const defaults = { mode: 511 };
|
|
@@ -1572,14 +1572,14 @@ var require_make_dir = __commonJS({
|
|
|
1572
1572
|
};
|
|
1573
1573
|
module2.exports.makeDir = async (dir, options) => {
|
|
1574
1574
|
checkPath(dir);
|
|
1575
|
-
return
|
|
1575
|
+
return fs5.mkdir(dir, {
|
|
1576
1576
|
mode: getMode(options),
|
|
1577
1577
|
recursive: true
|
|
1578
1578
|
});
|
|
1579
1579
|
};
|
|
1580
1580
|
module2.exports.makeDirSync = (dir, options) => {
|
|
1581
1581
|
checkPath(dir);
|
|
1582
|
-
return
|
|
1582
|
+
return fs5.mkdirSync(dir, {
|
|
1583
1583
|
mode: getMode(options),
|
|
1584
1584
|
recursive: true
|
|
1585
1585
|
});
|
|
@@ -1611,13 +1611,13 @@ var require_path_exists = __commonJS({
|
|
|
1611
1611
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/path-exists/index.js"(exports2, module2) {
|
|
1612
1612
|
"use strict";
|
|
1613
1613
|
var u = require_universalify().fromPromise;
|
|
1614
|
-
var
|
|
1615
|
-
function pathExists(
|
|
1616
|
-
return
|
|
1614
|
+
var fs5 = require_fs();
|
|
1615
|
+
function pathExists(path4) {
|
|
1616
|
+
return fs5.access(path4).then(() => true).catch(() => false);
|
|
1617
1617
|
}
|
|
1618
1618
|
module2.exports = {
|
|
1619
1619
|
pathExists: u(pathExists),
|
|
1620
|
-
pathExistsSync:
|
|
1620
|
+
pathExistsSync: fs5.existsSync
|
|
1621
1621
|
};
|
|
1622
1622
|
}
|
|
1623
1623
|
});
|
|
@@ -1626,16 +1626,16 @@ var require_path_exists = __commonJS({
|
|
|
1626
1626
|
var require_utimes = __commonJS({
|
|
1627
1627
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/utimes.js"(exports2, module2) {
|
|
1628
1628
|
"use strict";
|
|
1629
|
-
var
|
|
1629
|
+
var fs5 = require_fs();
|
|
1630
1630
|
var u = require_universalify().fromPromise;
|
|
1631
|
-
async function utimesMillis(
|
|
1632
|
-
const fd = await
|
|
1631
|
+
async function utimesMillis(path4, atime, mtime) {
|
|
1632
|
+
const fd = await fs5.open(path4, "r+");
|
|
1633
1633
|
let closeErr = null;
|
|
1634
1634
|
try {
|
|
1635
|
-
await
|
|
1635
|
+
await fs5.futimes(fd, atime, mtime);
|
|
1636
1636
|
} finally {
|
|
1637
1637
|
try {
|
|
1638
|
-
await
|
|
1638
|
+
await fs5.close(fd);
|
|
1639
1639
|
} catch (e) {
|
|
1640
1640
|
closeErr = e;
|
|
1641
1641
|
}
|
|
@@ -1644,10 +1644,10 @@ var require_utimes = __commonJS({
|
|
|
1644
1644
|
throw closeErr;
|
|
1645
1645
|
}
|
|
1646
1646
|
}
|
|
1647
|
-
function utimesMillisSync(
|
|
1648
|
-
const fd =
|
|
1649
|
-
|
|
1650
|
-
return
|
|
1647
|
+
function utimesMillisSync(path4, atime, mtime) {
|
|
1648
|
+
const fd = fs5.openSync(path4, "r+");
|
|
1649
|
+
fs5.futimesSync(fd, atime, mtime);
|
|
1650
|
+
return fs5.closeSync(fd);
|
|
1651
1651
|
}
|
|
1652
1652
|
module2.exports = {
|
|
1653
1653
|
utimesMillis: u(utimesMillis),
|
|
@@ -1660,11 +1660,11 @@ var require_utimes = __commonJS({
|
|
|
1660
1660
|
var require_stat = __commonJS({
|
|
1661
1661
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/stat.js"(exports2, module2) {
|
|
1662
1662
|
"use strict";
|
|
1663
|
-
var
|
|
1664
|
-
var
|
|
1663
|
+
var fs5 = require_fs();
|
|
1664
|
+
var path4 = require("path");
|
|
1665
1665
|
var u = require_universalify().fromPromise;
|
|
1666
1666
|
function getStats(src, dest, opts) {
|
|
1667
|
-
const statFunc = opts.dereference ? (file) =>
|
|
1667
|
+
const statFunc = opts.dereference ? (file) => fs5.stat(file, { bigint: true }) : (file) => fs5.lstat(file, { bigint: true });
|
|
1668
1668
|
return Promise.all([
|
|
1669
1669
|
statFunc(src),
|
|
1670
1670
|
statFunc(dest).catch((err) => {
|
|
@@ -1675,7 +1675,7 @@ var require_stat = __commonJS({
|
|
|
1675
1675
|
}
|
|
1676
1676
|
function getStatsSync(src, dest, opts) {
|
|
1677
1677
|
let destStat;
|
|
1678
|
-
const statFunc = opts.dereference ? (file) =>
|
|
1678
|
+
const statFunc = opts.dereference ? (file) => fs5.statSync(file, { bigint: true }) : (file) => fs5.lstatSync(file, { bigint: true });
|
|
1679
1679
|
const srcStat = statFunc(src);
|
|
1680
1680
|
try {
|
|
1681
1681
|
destStat = statFunc(dest);
|
|
@@ -1689,8 +1689,8 @@ var require_stat = __commonJS({
|
|
|
1689
1689
|
const { srcStat, destStat } = await getStats(src, dest, opts);
|
|
1690
1690
|
if (destStat) {
|
|
1691
1691
|
if (areIdentical(srcStat, destStat)) {
|
|
1692
|
-
const srcBaseName =
|
|
1693
|
-
const destBaseName =
|
|
1692
|
+
const srcBaseName = path4.basename(src);
|
|
1693
|
+
const destBaseName = path4.basename(dest);
|
|
1694
1694
|
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
1695
1695
|
return { srcStat, destStat, isChangingCase: true };
|
|
1696
1696
|
}
|
|
@@ -1712,8 +1712,8 @@ var require_stat = __commonJS({
|
|
|
1712
1712
|
const { srcStat, destStat } = getStatsSync(src, dest, opts);
|
|
1713
1713
|
if (destStat) {
|
|
1714
1714
|
if (areIdentical(srcStat, destStat)) {
|
|
1715
|
-
const srcBaseName =
|
|
1716
|
-
const destBaseName =
|
|
1715
|
+
const srcBaseName = path4.basename(src);
|
|
1716
|
+
const destBaseName = path4.basename(dest);
|
|
1717
1717
|
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
|
|
1718
1718
|
return { srcStat, destStat, isChangingCase: true };
|
|
1719
1719
|
}
|
|
@@ -1732,12 +1732,12 @@ var require_stat = __commonJS({
|
|
|
1732
1732
|
return { srcStat, destStat };
|
|
1733
1733
|
}
|
|
1734
1734
|
async function checkParentPaths(src, srcStat, dest, funcName) {
|
|
1735
|
-
const srcParent =
|
|
1736
|
-
const destParent =
|
|
1737
|
-
if (destParent === srcParent || destParent ===
|
|
1735
|
+
const srcParent = path4.resolve(path4.dirname(src));
|
|
1736
|
+
const destParent = path4.resolve(path4.dirname(dest));
|
|
1737
|
+
if (destParent === srcParent || destParent === path4.parse(destParent).root) return;
|
|
1738
1738
|
let destStat;
|
|
1739
1739
|
try {
|
|
1740
|
-
destStat = await
|
|
1740
|
+
destStat = await fs5.stat(destParent, { bigint: true });
|
|
1741
1741
|
} catch (err) {
|
|
1742
1742
|
if (err.code === "ENOENT") return;
|
|
1743
1743
|
throw err;
|
|
@@ -1748,12 +1748,12 @@ var require_stat = __commonJS({
|
|
|
1748
1748
|
return checkParentPaths(src, srcStat, destParent, funcName);
|
|
1749
1749
|
}
|
|
1750
1750
|
function checkParentPathsSync(src, srcStat, dest, funcName) {
|
|
1751
|
-
const srcParent =
|
|
1752
|
-
const destParent =
|
|
1753
|
-
if (destParent === srcParent || destParent ===
|
|
1751
|
+
const srcParent = path4.resolve(path4.dirname(src));
|
|
1752
|
+
const destParent = path4.resolve(path4.dirname(dest));
|
|
1753
|
+
if (destParent === srcParent || destParent === path4.parse(destParent).root) return;
|
|
1754
1754
|
let destStat;
|
|
1755
1755
|
try {
|
|
1756
|
-
destStat =
|
|
1756
|
+
destStat = fs5.statSync(destParent, { bigint: true });
|
|
1757
1757
|
} catch (err) {
|
|
1758
1758
|
if (err.code === "ENOENT") return;
|
|
1759
1759
|
throw err;
|
|
@@ -1767,8 +1767,8 @@ var require_stat = __commonJS({
|
|
|
1767
1767
|
return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
|
|
1768
1768
|
}
|
|
1769
1769
|
function isSrcSubdir(src, dest) {
|
|
1770
|
-
const srcArr =
|
|
1771
|
-
const destArr =
|
|
1770
|
+
const srcArr = path4.resolve(src).split(path4.sep).filter((i) => i);
|
|
1771
|
+
const destArr = path4.resolve(dest).split(path4.sep).filter((i) => i);
|
|
1772
1772
|
return srcArr.every((cur, i) => destArr[i] === cur);
|
|
1773
1773
|
}
|
|
1774
1774
|
function errMsg(src, dest, funcName) {
|
|
@@ -1792,8 +1792,8 @@ var require_stat = __commonJS({
|
|
|
1792
1792
|
var require_copy = __commonJS({
|
|
1793
1793
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy.js"(exports2, module2) {
|
|
1794
1794
|
"use strict";
|
|
1795
|
-
var
|
|
1796
|
-
var
|
|
1795
|
+
var fs5 = require_fs();
|
|
1796
|
+
var path4 = require("path");
|
|
1797
1797
|
var { mkdirs } = require_mkdirs();
|
|
1798
1798
|
var { pathExists } = require_path_exists();
|
|
1799
1799
|
var { utimesMillis } = require_utimes();
|
|
@@ -1815,7 +1815,7 @@ var require_copy = __commonJS({
|
|
|
1815
1815
|
await stat.checkParentPaths(src, srcStat, dest, "copy");
|
|
1816
1816
|
const include = await runFilter(src, dest, opts);
|
|
1817
1817
|
if (!include) return;
|
|
1818
|
-
const destParent =
|
|
1818
|
+
const destParent = path4.dirname(dest);
|
|
1819
1819
|
const dirExists = await pathExists(destParent);
|
|
1820
1820
|
if (!dirExists) {
|
|
1821
1821
|
await mkdirs(destParent);
|
|
@@ -1827,7 +1827,7 @@ var require_copy = __commonJS({
|
|
|
1827
1827
|
return opts.filter(src, dest);
|
|
1828
1828
|
}
|
|
1829
1829
|
async function getStatsAndPerformCopy(destStat, src, dest, opts) {
|
|
1830
|
-
const statFn = opts.dereference ?
|
|
1830
|
+
const statFn = opts.dereference ? fs5.stat : fs5.lstat;
|
|
1831
1831
|
const srcStat = await statFn(src);
|
|
1832
1832
|
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
|
|
1833
1833
|
if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
|
|
@@ -1839,7 +1839,7 @@ var require_copy = __commonJS({
|
|
|
1839
1839
|
async function onFile(srcStat, destStat, src, dest, opts) {
|
|
1840
1840
|
if (!destStat) return copyFile(srcStat, src, dest, opts);
|
|
1841
1841
|
if (opts.overwrite) {
|
|
1842
|
-
await
|
|
1842
|
+
await fs5.unlink(dest);
|
|
1843
1843
|
return copyFile(srcStat, src, dest, opts);
|
|
1844
1844
|
}
|
|
1845
1845
|
if (opts.errorOnExist) {
|
|
@@ -1847,56 +1847,56 @@ var require_copy = __commonJS({
|
|
|
1847
1847
|
}
|
|
1848
1848
|
}
|
|
1849
1849
|
async function copyFile(srcStat, src, dest, opts) {
|
|
1850
|
-
await
|
|
1850
|
+
await fs5.copyFile(src, dest);
|
|
1851
1851
|
if (opts.preserveTimestamps) {
|
|
1852
1852
|
if (fileIsNotWritable(srcStat.mode)) {
|
|
1853
1853
|
await makeFileWritable(dest, srcStat.mode);
|
|
1854
1854
|
}
|
|
1855
|
-
const updatedSrcStat = await
|
|
1855
|
+
const updatedSrcStat = await fs5.stat(src);
|
|
1856
1856
|
await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
1857
1857
|
}
|
|
1858
|
-
return
|
|
1858
|
+
return fs5.chmod(dest, srcStat.mode);
|
|
1859
1859
|
}
|
|
1860
1860
|
function fileIsNotWritable(srcMode) {
|
|
1861
1861
|
return (srcMode & 128) === 0;
|
|
1862
1862
|
}
|
|
1863
1863
|
function makeFileWritable(dest, srcMode) {
|
|
1864
|
-
return
|
|
1864
|
+
return fs5.chmod(dest, srcMode | 128);
|
|
1865
1865
|
}
|
|
1866
1866
|
async function onDir(srcStat, destStat, src, dest, opts) {
|
|
1867
1867
|
if (!destStat) {
|
|
1868
|
-
await
|
|
1868
|
+
await fs5.mkdir(dest);
|
|
1869
1869
|
}
|
|
1870
|
-
const items = await
|
|
1870
|
+
const items = await fs5.readdir(src);
|
|
1871
1871
|
await Promise.all(items.map(async (item) => {
|
|
1872
|
-
const srcItem =
|
|
1873
|
-
const destItem =
|
|
1872
|
+
const srcItem = path4.join(src, item);
|
|
1873
|
+
const destItem = path4.join(dest, item);
|
|
1874
1874
|
const include = await runFilter(srcItem, destItem, opts);
|
|
1875
1875
|
if (!include) return;
|
|
1876
1876
|
const { destStat: destStat2 } = await stat.checkPaths(srcItem, destItem, "copy", opts);
|
|
1877
1877
|
return getStatsAndPerformCopy(destStat2, srcItem, destItem, opts);
|
|
1878
1878
|
}));
|
|
1879
1879
|
if (!destStat) {
|
|
1880
|
-
await
|
|
1880
|
+
await fs5.chmod(dest, srcStat.mode);
|
|
1881
1881
|
}
|
|
1882
1882
|
}
|
|
1883
1883
|
async function onLink(destStat, src, dest, opts) {
|
|
1884
|
-
let resolvedSrc = await
|
|
1884
|
+
let resolvedSrc = await fs5.readlink(src);
|
|
1885
1885
|
if (opts.dereference) {
|
|
1886
|
-
resolvedSrc =
|
|
1886
|
+
resolvedSrc = path4.resolve(process.cwd(), resolvedSrc);
|
|
1887
1887
|
}
|
|
1888
1888
|
if (!destStat) {
|
|
1889
|
-
return
|
|
1889
|
+
return fs5.symlink(resolvedSrc, dest);
|
|
1890
1890
|
}
|
|
1891
1891
|
let resolvedDest = null;
|
|
1892
1892
|
try {
|
|
1893
|
-
resolvedDest = await
|
|
1893
|
+
resolvedDest = await fs5.readlink(dest);
|
|
1894
1894
|
} catch (e) {
|
|
1895
|
-
if (e.code === "EINVAL" || e.code === "UNKNOWN") return
|
|
1895
|
+
if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs5.symlink(resolvedSrc, dest);
|
|
1896
1896
|
throw e;
|
|
1897
1897
|
}
|
|
1898
1898
|
if (opts.dereference) {
|
|
1899
|
-
resolvedDest =
|
|
1899
|
+
resolvedDest = path4.resolve(process.cwd(), resolvedDest);
|
|
1900
1900
|
}
|
|
1901
1901
|
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
1902
1902
|
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
|
|
@@ -1904,8 +1904,8 @@ var require_copy = __commonJS({
|
|
|
1904
1904
|
if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
|
|
1905
1905
|
throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
|
|
1906
1906
|
}
|
|
1907
|
-
await
|
|
1908
|
-
return
|
|
1907
|
+
await fs5.unlink(dest);
|
|
1908
|
+
return fs5.symlink(resolvedSrc, dest);
|
|
1909
1909
|
}
|
|
1910
1910
|
module2.exports = copy2;
|
|
1911
1911
|
}
|
|
@@ -1915,8 +1915,8 @@ var require_copy = __commonJS({
|
|
|
1915
1915
|
var require_copy_sync = __commonJS({
|
|
1916
1916
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy-sync.js"(exports2, module2) {
|
|
1917
1917
|
"use strict";
|
|
1918
|
-
var
|
|
1919
|
-
var
|
|
1918
|
+
var fs5 = require_graceful_fs();
|
|
1919
|
+
var path4 = require("path");
|
|
1920
1920
|
var mkdirsSync = require_mkdirs().mkdirsSync;
|
|
1921
1921
|
var utimesMillisSync = require_utimes().utimesMillisSync;
|
|
1922
1922
|
var stat = require_stat();
|
|
@@ -1937,12 +1937,12 @@ var require_copy_sync = __commonJS({
|
|
|
1937
1937
|
const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
|
|
1938
1938
|
stat.checkParentPathsSync(src, srcStat, dest, "copy");
|
|
1939
1939
|
if (opts.filter && !opts.filter(src, dest)) return;
|
|
1940
|
-
const destParent =
|
|
1941
|
-
if (!
|
|
1940
|
+
const destParent = path4.dirname(dest);
|
|
1941
|
+
if (!fs5.existsSync(destParent)) mkdirsSync(destParent);
|
|
1942
1942
|
return getStats(destStat, src, dest, opts);
|
|
1943
1943
|
}
|
|
1944
1944
|
function getStats(destStat, src, dest, opts) {
|
|
1945
|
-
const statSync = opts.dereference ?
|
|
1945
|
+
const statSync = opts.dereference ? fs5.statSync : fs5.lstatSync;
|
|
1946
1946
|
const srcStat = statSync(src);
|
|
1947
1947
|
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
|
|
1948
1948
|
else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
|
|
@@ -1957,14 +1957,14 @@ var require_copy_sync = __commonJS({
|
|
|
1957
1957
|
}
|
|
1958
1958
|
function mayCopyFile(srcStat, src, dest, opts) {
|
|
1959
1959
|
if (opts.overwrite) {
|
|
1960
|
-
|
|
1960
|
+
fs5.unlinkSync(dest);
|
|
1961
1961
|
return copyFile(srcStat, src, dest, opts);
|
|
1962
1962
|
} else if (opts.errorOnExist) {
|
|
1963
1963
|
throw new Error(`'${dest}' already exists`);
|
|
1964
1964
|
}
|
|
1965
1965
|
}
|
|
1966
1966
|
function copyFile(srcStat, src, dest, opts) {
|
|
1967
|
-
|
|
1967
|
+
fs5.copyFileSync(src, dest);
|
|
1968
1968
|
if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest);
|
|
1969
1969
|
return setDestMode(dest, srcStat.mode);
|
|
1970
1970
|
}
|
|
@@ -1979,10 +1979,10 @@ var require_copy_sync = __commonJS({
|
|
|
1979
1979
|
return setDestMode(dest, srcMode | 128);
|
|
1980
1980
|
}
|
|
1981
1981
|
function setDestMode(dest, srcMode) {
|
|
1982
|
-
return
|
|
1982
|
+
return fs5.chmodSync(dest, srcMode);
|
|
1983
1983
|
}
|
|
1984
1984
|
function setDestTimestamps(src, dest) {
|
|
1985
|
-
const updatedSrcStat =
|
|
1985
|
+
const updatedSrcStat = fs5.statSync(src);
|
|
1986
1986
|
return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
1987
1987
|
}
|
|
1988
1988
|
function onDir(srcStat, destStat, src, dest, opts) {
|
|
@@ -1990,37 +1990,37 @@ var require_copy_sync = __commonJS({
|
|
|
1990
1990
|
return copyDir(src, dest, opts);
|
|
1991
1991
|
}
|
|
1992
1992
|
function mkDirAndCopy(srcMode, src, dest, opts) {
|
|
1993
|
-
|
|
1993
|
+
fs5.mkdirSync(dest);
|
|
1994
1994
|
copyDir(src, dest, opts);
|
|
1995
1995
|
return setDestMode(dest, srcMode);
|
|
1996
1996
|
}
|
|
1997
1997
|
function copyDir(src, dest, opts) {
|
|
1998
|
-
|
|
1998
|
+
fs5.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
|
|
1999
1999
|
}
|
|
2000
2000
|
function copyDirItem(item, src, dest, opts) {
|
|
2001
|
-
const srcItem =
|
|
2002
|
-
const destItem =
|
|
2001
|
+
const srcItem = path4.join(src, item);
|
|
2002
|
+
const destItem = path4.join(dest, item);
|
|
2003
2003
|
if (opts.filter && !opts.filter(srcItem, destItem)) return;
|
|
2004
2004
|
const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
|
|
2005
2005
|
return getStats(destStat, srcItem, destItem, opts);
|
|
2006
2006
|
}
|
|
2007
2007
|
function onLink(destStat, src, dest, opts) {
|
|
2008
|
-
let resolvedSrc =
|
|
2008
|
+
let resolvedSrc = fs5.readlinkSync(src);
|
|
2009
2009
|
if (opts.dereference) {
|
|
2010
|
-
resolvedSrc =
|
|
2010
|
+
resolvedSrc = path4.resolve(process.cwd(), resolvedSrc);
|
|
2011
2011
|
}
|
|
2012
2012
|
if (!destStat) {
|
|
2013
|
-
return
|
|
2013
|
+
return fs5.symlinkSync(resolvedSrc, dest);
|
|
2014
2014
|
} else {
|
|
2015
2015
|
let resolvedDest;
|
|
2016
2016
|
try {
|
|
2017
|
-
resolvedDest =
|
|
2017
|
+
resolvedDest = fs5.readlinkSync(dest);
|
|
2018
2018
|
} catch (err) {
|
|
2019
|
-
if (err.code === "EINVAL" || err.code === "UNKNOWN") return
|
|
2019
|
+
if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs5.symlinkSync(resolvedSrc, dest);
|
|
2020
2020
|
throw err;
|
|
2021
2021
|
}
|
|
2022
2022
|
if (opts.dereference) {
|
|
2023
|
-
resolvedDest =
|
|
2023
|
+
resolvedDest = path4.resolve(process.cwd(), resolvedDest);
|
|
2024
2024
|
}
|
|
2025
2025
|
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
|
|
2026
2026
|
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
|
|
@@ -2032,8 +2032,8 @@ var require_copy_sync = __commonJS({
|
|
|
2032
2032
|
}
|
|
2033
2033
|
}
|
|
2034
2034
|
function copyLink(resolvedSrc, dest) {
|
|
2035
|
-
|
|
2036
|
-
return
|
|
2035
|
+
fs5.unlinkSync(dest);
|
|
2036
|
+
return fs5.symlinkSync(resolvedSrc, dest);
|
|
2037
2037
|
}
|
|
2038
2038
|
module2.exports = copySync;
|
|
2039
2039
|
}
|
|
@@ -2055,13 +2055,13 @@ var require_copy2 = __commonJS({
|
|
|
2055
2055
|
var require_remove = __commonJS({
|
|
2056
2056
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/remove/index.js"(exports2, module2) {
|
|
2057
2057
|
"use strict";
|
|
2058
|
-
var
|
|
2058
|
+
var fs5 = require_graceful_fs();
|
|
2059
2059
|
var u = require_universalify().fromCallback;
|
|
2060
|
-
function remove(
|
|
2061
|
-
|
|
2060
|
+
function remove(path4, callback) {
|
|
2061
|
+
fs5.rm(path4, { recursive: true, force: true }, callback);
|
|
2062
2062
|
}
|
|
2063
|
-
function removeSync(
|
|
2064
|
-
|
|
2063
|
+
function removeSync(path4) {
|
|
2064
|
+
fs5.rmSync(path4, { recursive: true, force: true });
|
|
2065
2065
|
}
|
|
2066
2066
|
module2.exports = {
|
|
2067
2067
|
remove: u(remove),
|
|
@@ -2075,28 +2075,28 @@ var require_empty = __commonJS({
|
|
|
2075
2075
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/empty/index.js"(exports2, module2) {
|
|
2076
2076
|
"use strict";
|
|
2077
2077
|
var u = require_universalify().fromPromise;
|
|
2078
|
-
var
|
|
2079
|
-
var
|
|
2078
|
+
var fs5 = require_fs();
|
|
2079
|
+
var path4 = require("path");
|
|
2080
2080
|
var mkdir = require_mkdirs();
|
|
2081
2081
|
var remove = require_remove();
|
|
2082
2082
|
var emptyDir = u(async function emptyDir2(dir) {
|
|
2083
2083
|
let items;
|
|
2084
2084
|
try {
|
|
2085
|
-
items = await
|
|
2085
|
+
items = await fs5.readdir(dir);
|
|
2086
2086
|
} catch {
|
|
2087
2087
|
return mkdir.mkdirs(dir);
|
|
2088
2088
|
}
|
|
2089
|
-
return Promise.all(items.map((item) => remove.remove(
|
|
2089
|
+
return Promise.all(items.map((item) => remove.remove(path4.join(dir, item))));
|
|
2090
2090
|
});
|
|
2091
2091
|
function emptyDirSync(dir) {
|
|
2092
2092
|
let items;
|
|
2093
2093
|
try {
|
|
2094
|
-
items =
|
|
2094
|
+
items = fs5.readdirSync(dir);
|
|
2095
2095
|
} catch {
|
|
2096
2096
|
return mkdir.mkdirsSync(dir);
|
|
2097
2097
|
}
|
|
2098
2098
|
items.forEach((item) => {
|
|
2099
|
-
item =
|
|
2099
|
+
item = path4.join(dir, item);
|
|
2100
2100
|
remove.removeSync(item);
|
|
2101
2101
|
});
|
|
2102
2102
|
}
|
|
@@ -2114,52 +2114,52 @@ var require_file = __commonJS({
|
|
|
2114
2114
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/file.js"(exports2, module2) {
|
|
2115
2115
|
"use strict";
|
|
2116
2116
|
var u = require_universalify().fromPromise;
|
|
2117
|
-
var
|
|
2118
|
-
var
|
|
2117
|
+
var path4 = require("path");
|
|
2118
|
+
var fs5 = require_fs();
|
|
2119
2119
|
var mkdir = require_mkdirs();
|
|
2120
2120
|
async function createFile(file) {
|
|
2121
2121
|
let stats;
|
|
2122
2122
|
try {
|
|
2123
|
-
stats = await
|
|
2123
|
+
stats = await fs5.stat(file);
|
|
2124
2124
|
} catch {
|
|
2125
2125
|
}
|
|
2126
2126
|
if (stats && stats.isFile()) return;
|
|
2127
|
-
const dir =
|
|
2127
|
+
const dir = path4.dirname(file);
|
|
2128
2128
|
let dirStats = null;
|
|
2129
2129
|
try {
|
|
2130
|
-
dirStats = await
|
|
2130
|
+
dirStats = await fs5.stat(dir);
|
|
2131
2131
|
} catch (err) {
|
|
2132
2132
|
if (err.code === "ENOENT") {
|
|
2133
2133
|
await mkdir.mkdirs(dir);
|
|
2134
|
-
await
|
|
2134
|
+
await fs5.writeFile(file, "");
|
|
2135
2135
|
return;
|
|
2136
2136
|
} else {
|
|
2137
2137
|
throw err;
|
|
2138
2138
|
}
|
|
2139
2139
|
}
|
|
2140
2140
|
if (dirStats.isDirectory()) {
|
|
2141
|
-
await
|
|
2141
|
+
await fs5.writeFile(file, "");
|
|
2142
2142
|
} else {
|
|
2143
|
-
await
|
|
2143
|
+
await fs5.readdir(dir);
|
|
2144
2144
|
}
|
|
2145
2145
|
}
|
|
2146
2146
|
function createFileSync(file) {
|
|
2147
2147
|
let stats;
|
|
2148
2148
|
try {
|
|
2149
|
-
stats =
|
|
2149
|
+
stats = fs5.statSync(file);
|
|
2150
2150
|
} catch {
|
|
2151
2151
|
}
|
|
2152
2152
|
if (stats && stats.isFile()) return;
|
|
2153
|
-
const dir =
|
|
2153
|
+
const dir = path4.dirname(file);
|
|
2154
2154
|
try {
|
|
2155
|
-
if (!
|
|
2156
|
-
|
|
2155
|
+
if (!fs5.statSync(dir).isDirectory()) {
|
|
2156
|
+
fs5.readdirSync(dir);
|
|
2157
2157
|
}
|
|
2158
2158
|
} catch (err) {
|
|
2159
2159
|
if (err && err.code === "ENOENT") mkdir.mkdirsSync(dir);
|
|
2160
2160
|
else throw err;
|
|
2161
2161
|
}
|
|
2162
|
-
|
|
2162
|
+
fs5.writeFileSync(file, "");
|
|
2163
2163
|
}
|
|
2164
2164
|
module2.exports = {
|
|
2165
2165
|
createFile: u(createFile),
|
|
@@ -2173,50 +2173,50 @@ var require_link = __commonJS({
|
|
|
2173
2173
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/link.js"(exports2, module2) {
|
|
2174
2174
|
"use strict";
|
|
2175
2175
|
var u = require_universalify().fromPromise;
|
|
2176
|
-
var
|
|
2177
|
-
var
|
|
2176
|
+
var path4 = require("path");
|
|
2177
|
+
var fs5 = require_fs();
|
|
2178
2178
|
var mkdir = require_mkdirs();
|
|
2179
2179
|
var { pathExists } = require_path_exists();
|
|
2180
2180
|
var { areIdentical } = require_stat();
|
|
2181
2181
|
async function createLink(srcpath, dstpath) {
|
|
2182
2182
|
let dstStat;
|
|
2183
2183
|
try {
|
|
2184
|
-
dstStat = await
|
|
2184
|
+
dstStat = await fs5.lstat(dstpath);
|
|
2185
2185
|
} catch {
|
|
2186
2186
|
}
|
|
2187
2187
|
let srcStat;
|
|
2188
2188
|
try {
|
|
2189
|
-
srcStat = await
|
|
2189
|
+
srcStat = await fs5.lstat(srcpath);
|
|
2190
2190
|
} catch (err) {
|
|
2191
2191
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
2192
2192
|
throw err;
|
|
2193
2193
|
}
|
|
2194
2194
|
if (dstStat && areIdentical(srcStat, dstStat)) return;
|
|
2195
|
-
const dir =
|
|
2195
|
+
const dir = path4.dirname(dstpath);
|
|
2196
2196
|
const dirExists = await pathExists(dir);
|
|
2197
2197
|
if (!dirExists) {
|
|
2198
2198
|
await mkdir.mkdirs(dir);
|
|
2199
2199
|
}
|
|
2200
|
-
await
|
|
2200
|
+
await fs5.link(srcpath, dstpath);
|
|
2201
2201
|
}
|
|
2202
2202
|
function createLinkSync(srcpath, dstpath) {
|
|
2203
2203
|
let dstStat;
|
|
2204
2204
|
try {
|
|
2205
|
-
dstStat =
|
|
2205
|
+
dstStat = fs5.lstatSync(dstpath);
|
|
2206
2206
|
} catch {
|
|
2207
2207
|
}
|
|
2208
2208
|
try {
|
|
2209
|
-
const srcStat =
|
|
2209
|
+
const srcStat = fs5.lstatSync(srcpath);
|
|
2210
2210
|
if (dstStat && areIdentical(srcStat, dstStat)) return;
|
|
2211
2211
|
} catch (err) {
|
|
2212
2212
|
err.message = err.message.replace("lstat", "ensureLink");
|
|
2213
2213
|
throw err;
|
|
2214
2214
|
}
|
|
2215
|
-
const dir =
|
|
2216
|
-
const dirExists =
|
|
2217
|
-
if (dirExists) return
|
|
2215
|
+
const dir = path4.dirname(dstpath);
|
|
2216
|
+
const dirExists = fs5.existsSync(dir);
|
|
2217
|
+
if (dirExists) return fs5.linkSync(srcpath, dstpath);
|
|
2218
2218
|
mkdir.mkdirsSync(dir);
|
|
2219
|
-
return
|
|
2219
|
+
return fs5.linkSync(srcpath, dstpath);
|
|
2220
2220
|
}
|
|
2221
2221
|
module2.exports = {
|
|
2222
2222
|
createLink: u(createLink),
|
|
@@ -2229,14 +2229,14 @@ var require_link = __commonJS({
|
|
|
2229
2229
|
var require_symlink_paths = __commonJS({
|
|
2230
2230
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports2, module2) {
|
|
2231
2231
|
"use strict";
|
|
2232
|
-
var
|
|
2233
|
-
var
|
|
2232
|
+
var path4 = require("path");
|
|
2233
|
+
var fs5 = require_fs();
|
|
2234
2234
|
var { pathExists } = require_path_exists();
|
|
2235
2235
|
var u = require_universalify().fromPromise;
|
|
2236
2236
|
async function symlinkPaths(srcpath, dstpath) {
|
|
2237
|
-
if (
|
|
2237
|
+
if (path4.isAbsolute(srcpath)) {
|
|
2238
2238
|
try {
|
|
2239
|
-
await
|
|
2239
|
+
await fs5.lstat(srcpath);
|
|
2240
2240
|
} catch (err) {
|
|
2241
2241
|
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
2242
2242
|
throw err;
|
|
@@ -2246,8 +2246,8 @@ var require_symlink_paths = __commonJS({
|
|
|
2246
2246
|
toDst: srcpath
|
|
2247
2247
|
};
|
|
2248
2248
|
}
|
|
2249
|
-
const dstdir =
|
|
2250
|
-
const relativeToDst =
|
|
2249
|
+
const dstdir = path4.dirname(dstpath);
|
|
2250
|
+
const relativeToDst = path4.join(dstdir, srcpath);
|
|
2251
2251
|
const exists = await pathExists(relativeToDst);
|
|
2252
2252
|
if (exists) {
|
|
2253
2253
|
return {
|
|
@@ -2256,39 +2256,39 @@ var require_symlink_paths = __commonJS({
|
|
|
2256
2256
|
};
|
|
2257
2257
|
}
|
|
2258
2258
|
try {
|
|
2259
|
-
await
|
|
2259
|
+
await fs5.lstat(srcpath);
|
|
2260
2260
|
} catch (err) {
|
|
2261
2261
|
err.message = err.message.replace("lstat", "ensureSymlink");
|
|
2262
2262
|
throw err;
|
|
2263
2263
|
}
|
|
2264
2264
|
return {
|
|
2265
2265
|
toCwd: srcpath,
|
|
2266
|
-
toDst:
|
|
2266
|
+
toDst: path4.relative(dstdir, srcpath)
|
|
2267
2267
|
};
|
|
2268
2268
|
}
|
|
2269
2269
|
function symlinkPathsSync(srcpath, dstpath) {
|
|
2270
|
-
if (
|
|
2271
|
-
const exists2 =
|
|
2270
|
+
if (path4.isAbsolute(srcpath)) {
|
|
2271
|
+
const exists2 = fs5.existsSync(srcpath);
|
|
2272
2272
|
if (!exists2) throw new Error("absolute srcpath does not exist");
|
|
2273
2273
|
return {
|
|
2274
2274
|
toCwd: srcpath,
|
|
2275
2275
|
toDst: srcpath
|
|
2276
2276
|
};
|
|
2277
2277
|
}
|
|
2278
|
-
const dstdir =
|
|
2279
|
-
const relativeToDst =
|
|
2280
|
-
const exists =
|
|
2278
|
+
const dstdir = path4.dirname(dstpath);
|
|
2279
|
+
const relativeToDst = path4.join(dstdir, srcpath);
|
|
2280
|
+
const exists = fs5.existsSync(relativeToDst);
|
|
2281
2281
|
if (exists) {
|
|
2282
2282
|
return {
|
|
2283
2283
|
toCwd: relativeToDst,
|
|
2284
2284
|
toDst: srcpath
|
|
2285
2285
|
};
|
|
2286
2286
|
}
|
|
2287
|
-
const srcExists =
|
|
2287
|
+
const srcExists = fs5.existsSync(srcpath);
|
|
2288
2288
|
if (!srcExists) throw new Error("relative srcpath does not exist");
|
|
2289
2289
|
return {
|
|
2290
2290
|
toCwd: srcpath,
|
|
2291
|
-
toDst:
|
|
2291
|
+
toDst: path4.relative(dstdir, srcpath)
|
|
2292
2292
|
};
|
|
2293
2293
|
}
|
|
2294
2294
|
module2.exports = {
|
|
@@ -2302,13 +2302,13 @@ var require_symlink_paths = __commonJS({
|
|
|
2302
2302
|
var require_symlink_type = __commonJS({
|
|
2303
2303
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports2, module2) {
|
|
2304
2304
|
"use strict";
|
|
2305
|
-
var
|
|
2305
|
+
var fs5 = require_fs();
|
|
2306
2306
|
var u = require_universalify().fromPromise;
|
|
2307
2307
|
async function symlinkType(srcpath, type) {
|
|
2308
2308
|
if (type) return type;
|
|
2309
2309
|
let stats;
|
|
2310
2310
|
try {
|
|
2311
|
-
stats = await
|
|
2311
|
+
stats = await fs5.lstat(srcpath);
|
|
2312
2312
|
} catch {
|
|
2313
2313
|
return "file";
|
|
2314
2314
|
}
|
|
@@ -2318,7 +2318,7 @@ var require_symlink_type = __commonJS({
|
|
|
2318
2318
|
if (type) return type;
|
|
2319
2319
|
let stats;
|
|
2320
2320
|
try {
|
|
2321
|
-
stats =
|
|
2321
|
+
stats = fs5.lstatSync(srcpath);
|
|
2322
2322
|
} catch {
|
|
2323
2323
|
return "file";
|
|
2324
2324
|
}
|
|
@@ -2336,8 +2336,8 @@ var require_symlink = __commonJS({
|
|
|
2336
2336
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports2, module2) {
|
|
2337
2337
|
"use strict";
|
|
2338
2338
|
var u = require_universalify().fromPromise;
|
|
2339
|
-
var
|
|
2340
|
-
var
|
|
2339
|
+
var path4 = require("path");
|
|
2340
|
+
var fs5 = require_fs();
|
|
2341
2341
|
var { mkdirs, mkdirsSync } = require_mkdirs();
|
|
2342
2342
|
var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
|
|
2343
2343
|
var { symlinkType, symlinkTypeSync } = require_symlink_type();
|
|
@@ -2346,44 +2346,44 @@ var require_symlink = __commonJS({
|
|
|
2346
2346
|
async function createSymlink(srcpath, dstpath, type) {
|
|
2347
2347
|
let stats;
|
|
2348
2348
|
try {
|
|
2349
|
-
stats = await
|
|
2349
|
+
stats = await fs5.lstat(dstpath);
|
|
2350
2350
|
} catch {
|
|
2351
2351
|
}
|
|
2352
2352
|
if (stats && stats.isSymbolicLink()) {
|
|
2353
2353
|
const [srcStat, dstStat] = await Promise.all([
|
|
2354
|
-
|
|
2355
|
-
|
|
2354
|
+
fs5.stat(srcpath),
|
|
2355
|
+
fs5.stat(dstpath)
|
|
2356
2356
|
]);
|
|
2357
2357
|
if (areIdentical(srcStat, dstStat)) return;
|
|
2358
2358
|
}
|
|
2359
2359
|
const relative = await symlinkPaths(srcpath, dstpath);
|
|
2360
2360
|
srcpath = relative.toDst;
|
|
2361
2361
|
const toType = await symlinkType(relative.toCwd, type);
|
|
2362
|
-
const dir =
|
|
2362
|
+
const dir = path4.dirname(dstpath);
|
|
2363
2363
|
if (!await pathExists(dir)) {
|
|
2364
2364
|
await mkdirs(dir);
|
|
2365
2365
|
}
|
|
2366
|
-
return
|
|
2366
|
+
return fs5.symlink(srcpath, dstpath, toType);
|
|
2367
2367
|
}
|
|
2368
2368
|
function createSymlinkSync(srcpath, dstpath, type) {
|
|
2369
2369
|
let stats;
|
|
2370
2370
|
try {
|
|
2371
|
-
stats =
|
|
2371
|
+
stats = fs5.lstatSync(dstpath);
|
|
2372
2372
|
} catch {
|
|
2373
2373
|
}
|
|
2374
2374
|
if (stats && stats.isSymbolicLink()) {
|
|
2375
|
-
const srcStat =
|
|
2376
|
-
const dstStat =
|
|
2375
|
+
const srcStat = fs5.statSync(srcpath);
|
|
2376
|
+
const dstStat = fs5.statSync(dstpath);
|
|
2377
2377
|
if (areIdentical(srcStat, dstStat)) return;
|
|
2378
2378
|
}
|
|
2379
2379
|
const relative = symlinkPathsSync(srcpath, dstpath);
|
|
2380
2380
|
srcpath = relative.toDst;
|
|
2381
2381
|
type = symlinkTypeSync(relative.toCwd, type);
|
|
2382
|
-
const dir =
|
|
2383
|
-
const exists =
|
|
2384
|
-
if (exists) return
|
|
2382
|
+
const dir = path4.dirname(dstpath);
|
|
2383
|
+
const exists = fs5.existsSync(dir);
|
|
2384
|
+
if (exists) return fs5.symlinkSync(srcpath, dstpath, type);
|
|
2385
2385
|
mkdirsSync(dir);
|
|
2386
|
-
return
|
|
2386
|
+
return fs5.symlinkSync(srcpath, dstpath, type);
|
|
2387
2387
|
}
|
|
2388
2388
|
module2.exports = {
|
|
2389
2389
|
createSymlink: u(createSymlink),
|
|
@@ -2450,9 +2450,9 @@ var require_jsonfile = __commonJS({
|
|
|
2450
2450
|
if (typeof options === "string") {
|
|
2451
2451
|
options = { encoding: options };
|
|
2452
2452
|
}
|
|
2453
|
-
const
|
|
2453
|
+
const fs5 = options.fs || _fs;
|
|
2454
2454
|
const shouldThrow = "throws" in options ? options.throws : true;
|
|
2455
|
-
let data = await universalify.fromCallback(
|
|
2455
|
+
let data = await universalify.fromCallback(fs5.readFile)(file, options);
|
|
2456
2456
|
data = stripBom(data);
|
|
2457
2457
|
let obj;
|
|
2458
2458
|
try {
|
|
@@ -2472,10 +2472,10 @@ var require_jsonfile = __commonJS({
|
|
|
2472
2472
|
if (typeof options === "string") {
|
|
2473
2473
|
options = { encoding: options };
|
|
2474
2474
|
}
|
|
2475
|
-
const
|
|
2475
|
+
const fs5 = options.fs || _fs;
|
|
2476
2476
|
const shouldThrow = "throws" in options ? options.throws : true;
|
|
2477
2477
|
try {
|
|
2478
|
-
let content =
|
|
2478
|
+
let content = fs5.readFileSync(file, options);
|
|
2479
2479
|
content = stripBom(content);
|
|
2480
2480
|
return JSON.parse(content, options.reviver);
|
|
2481
2481
|
} catch (err) {
|
|
@@ -2488,15 +2488,15 @@ var require_jsonfile = __commonJS({
|
|
|
2488
2488
|
}
|
|
2489
2489
|
}
|
|
2490
2490
|
async function _writeFile(file, obj, options = {}) {
|
|
2491
|
-
const
|
|
2491
|
+
const fs5 = options.fs || _fs;
|
|
2492
2492
|
const str = stringify(obj, options);
|
|
2493
|
-
await universalify.fromCallback(
|
|
2493
|
+
await universalify.fromCallback(fs5.writeFile)(file, str, options);
|
|
2494
2494
|
}
|
|
2495
2495
|
var writeFile = universalify.fromPromise(_writeFile);
|
|
2496
2496
|
function writeFileSync(file, obj, options = {}) {
|
|
2497
|
-
const
|
|
2497
|
+
const fs5 = options.fs || _fs;
|
|
2498
2498
|
const str = stringify(obj, options);
|
|
2499
|
-
return
|
|
2499
|
+
return fs5.writeFileSync(file, str, options);
|
|
2500
2500
|
}
|
|
2501
2501
|
module2.exports = {
|
|
2502
2502
|
readFile: readFile2,
|
|
@@ -2527,23 +2527,23 @@ var require_output_file = __commonJS({
|
|
|
2527
2527
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/output-file/index.js"(exports2, module2) {
|
|
2528
2528
|
"use strict";
|
|
2529
2529
|
var u = require_universalify().fromPromise;
|
|
2530
|
-
var
|
|
2531
|
-
var
|
|
2530
|
+
var fs5 = require_fs();
|
|
2531
|
+
var path4 = require("path");
|
|
2532
2532
|
var mkdir = require_mkdirs();
|
|
2533
2533
|
var pathExists = require_path_exists().pathExists;
|
|
2534
2534
|
async function outputFile(file, data, encoding = "utf-8") {
|
|
2535
|
-
const dir =
|
|
2535
|
+
const dir = path4.dirname(file);
|
|
2536
2536
|
if (!await pathExists(dir)) {
|
|
2537
2537
|
await mkdir.mkdirs(dir);
|
|
2538
2538
|
}
|
|
2539
|
-
return
|
|
2539
|
+
return fs5.writeFile(file, data, encoding);
|
|
2540
2540
|
}
|
|
2541
2541
|
function outputFileSync(file, ...args) {
|
|
2542
|
-
const dir =
|
|
2543
|
-
if (!
|
|
2542
|
+
const dir = path4.dirname(file);
|
|
2543
|
+
if (!fs5.existsSync(dir)) {
|
|
2544
2544
|
mkdir.mkdirsSync(dir);
|
|
2545
2545
|
}
|
|
2546
|
-
|
|
2546
|
+
fs5.writeFileSync(file, ...args);
|
|
2547
2547
|
}
|
|
2548
2548
|
module2.exports = {
|
|
2549
2549
|
outputFile: u(outputFile),
|
|
@@ -2602,8 +2602,8 @@ var require_json = __commonJS({
|
|
|
2602
2602
|
var require_move = __commonJS({
|
|
2603
2603
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move.js"(exports2, module2) {
|
|
2604
2604
|
"use strict";
|
|
2605
|
-
var
|
|
2606
|
-
var
|
|
2605
|
+
var fs5 = require_fs();
|
|
2606
|
+
var path4 = require("path");
|
|
2607
2607
|
var { copy: copy2 } = require_copy2();
|
|
2608
2608
|
var { remove } = require_remove();
|
|
2609
2609
|
var { mkdirp } = require_mkdirs();
|
|
@@ -2613,8 +2613,8 @@ var require_move = __commonJS({
|
|
|
2613
2613
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
2614
2614
|
const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
|
|
2615
2615
|
await stat.checkParentPaths(src, srcStat, dest, "move");
|
|
2616
|
-
const destParent =
|
|
2617
|
-
const parsedParentPath =
|
|
2616
|
+
const destParent = path4.dirname(dest);
|
|
2617
|
+
const parsedParentPath = path4.parse(destParent);
|
|
2618
2618
|
if (parsedParentPath.root !== destParent) {
|
|
2619
2619
|
await mkdirp(destParent);
|
|
2620
2620
|
}
|
|
@@ -2629,7 +2629,7 @@ var require_move = __commonJS({
|
|
|
2629
2629
|
}
|
|
2630
2630
|
}
|
|
2631
2631
|
try {
|
|
2632
|
-
await
|
|
2632
|
+
await fs5.rename(src, dest);
|
|
2633
2633
|
} catch (err) {
|
|
2634
2634
|
if (err.code !== "EXDEV") {
|
|
2635
2635
|
throw err;
|
|
@@ -2654,8 +2654,8 @@ var require_move = __commonJS({
|
|
|
2654
2654
|
var require_move_sync = __commonJS({
|
|
2655
2655
|
"../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move-sync.js"(exports2, module2) {
|
|
2656
2656
|
"use strict";
|
|
2657
|
-
var
|
|
2658
|
-
var
|
|
2657
|
+
var fs5 = require_graceful_fs();
|
|
2658
|
+
var path4 = require("path");
|
|
2659
2659
|
var copySync = require_copy2().copySync;
|
|
2660
2660
|
var removeSync = require_remove().removeSync;
|
|
2661
2661
|
var mkdirpSync = require_mkdirs().mkdirpSync;
|
|
@@ -2665,12 +2665,12 @@ var require_move_sync = __commonJS({
|
|
|
2665
2665
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
2666
2666
|
const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
|
|
2667
2667
|
stat.checkParentPathsSync(src, srcStat, dest, "move");
|
|
2668
|
-
if (!isParentRoot(dest)) mkdirpSync(
|
|
2668
|
+
if (!isParentRoot(dest)) mkdirpSync(path4.dirname(dest));
|
|
2669
2669
|
return doRename(src, dest, overwrite, isChangingCase);
|
|
2670
2670
|
}
|
|
2671
2671
|
function isParentRoot(dest) {
|
|
2672
|
-
const parent =
|
|
2673
|
-
const parsedPath =
|
|
2672
|
+
const parent = path4.dirname(dest);
|
|
2673
|
+
const parsedPath = path4.parse(parent);
|
|
2674
2674
|
return parsedPath.root === parent;
|
|
2675
2675
|
}
|
|
2676
2676
|
function doRename(src, dest, overwrite, isChangingCase) {
|
|
@@ -2679,12 +2679,12 @@ var require_move_sync = __commonJS({
|
|
|
2679
2679
|
removeSync(dest);
|
|
2680
2680
|
return rename(src, dest, overwrite);
|
|
2681
2681
|
}
|
|
2682
|
-
if (
|
|
2682
|
+
if (fs5.existsSync(dest)) throw new Error("dest already exists.");
|
|
2683
2683
|
return rename(src, dest, overwrite);
|
|
2684
2684
|
}
|
|
2685
2685
|
function rename(src, dest, overwrite) {
|
|
2686
2686
|
try {
|
|
2687
|
-
|
|
2687
|
+
fs5.renameSync(src, dest);
|
|
2688
2688
|
} catch (err) {
|
|
2689
2689
|
if (err.code !== "EXDEV") throw err;
|
|
2690
2690
|
return moveAcrossDevice(src, dest, overwrite);
|
|
@@ -5495,8 +5495,8 @@ var require_safe_buffer = __commonJS({
|
|
|
5495
5495
|
var require_convert_source_map = __commonJS({
|
|
5496
5496
|
"../../node_modules/.pnpm/convert-source-map@1.8.0/node_modules/convert-source-map/index.js"(exports2) {
|
|
5497
5497
|
"use strict";
|
|
5498
|
-
var
|
|
5499
|
-
var
|
|
5498
|
+
var fs5 = require("fs");
|
|
5499
|
+
var path4 = require("path");
|
|
5500
5500
|
var SafeBuffer = require_safe_buffer();
|
|
5501
5501
|
Object.defineProperty(exports2, "commentRegex", {
|
|
5502
5502
|
get: function getCommentRegex() {
|
|
@@ -5517,9 +5517,9 @@ var require_convert_source_map = __commonJS({
|
|
|
5517
5517
|
function readFromFileMap(sm, dir) {
|
|
5518
5518
|
var r = exports2.mapFileCommentRegex.exec(sm);
|
|
5519
5519
|
var filename = r[1] || r[2];
|
|
5520
|
-
var filepath =
|
|
5520
|
+
var filepath = path4.resolve(dir, filename);
|
|
5521
5521
|
try {
|
|
5522
|
-
return
|
|
5522
|
+
return fs5.readFileSync(filepath, "utf8");
|
|
5523
5523
|
} catch (e) {
|
|
5524
5524
|
throw new Error("An error occurred while trying to read the map file at " + filepath + "\n" + e);
|
|
5525
5525
|
}
|
|
@@ -5709,27 +5709,27 @@ var require_util = __commonJS({
|
|
|
5709
5709
|
};
|
|
5710
5710
|
}
|
|
5711
5711
|
var normalize = lruMemoize(function normalize2(aPath) {
|
|
5712
|
-
let
|
|
5712
|
+
let path4 = aPath;
|
|
5713
5713
|
const url = urlParse(aPath);
|
|
5714
5714
|
if (url) {
|
|
5715
5715
|
if (!url.path) {
|
|
5716
5716
|
return aPath;
|
|
5717
5717
|
}
|
|
5718
|
-
|
|
5718
|
+
path4 = url.path;
|
|
5719
5719
|
}
|
|
5720
|
-
const isAbsolute = exports2.isAbsolute(
|
|
5720
|
+
const isAbsolute = exports2.isAbsolute(path4);
|
|
5721
5721
|
const parts = [];
|
|
5722
5722
|
let start = 0;
|
|
5723
5723
|
let i = 0;
|
|
5724
5724
|
while (true) {
|
|
5725
5725
|
start = i;
|
|
5726
|
-
i =
|
|
5726
|
+
i = path4.indexOf("/", start);
|
|
5727
5727
|
if (i === -1) {
|
|
5728
|
-
parts.push(
|
|
5728
|
+
parts.push(path4.slice(start));
|
|
5729
5729
|
break;
|
|
5730
5730
|
} else {
|
|
5731
|
-
parts.push(
|
|
5732
|
-
while (i <
|
|
5731
|
+
parts.push(path4.slice(start, i));
|
|
5732
|
+
while (i < path4.length && path4[i] === "/") {
|
|
5733
5733
|
i++;
|
|
5734
5734
|
}
|
|
5735
5735
|
}
|
|
@@ -5751,15 +5751,15 @@ var require_util = __commonJS({
|
|
|
5751
5751
|
}
|
|
5752
5752
|
}
|
|
5753
5753
|
}
|
|
5754
|
-
|
|
5755
|
-
if (
|
|
5756
|
-
|
|
5754
|
+
path4 = parts.join("/");
|
|
5755
|
+
if (path4 === "") {
|
|
5756
|
+
path4 = isAbsolute ? "/" : ".";
|
|
5757
5757
|
}
|
|
5758
5758
|
if (url) {
|
|
5759
|
-
url.path =
|
|
5759
|
+
url.path = path4;
|
|
5760
5760
|
return urlGenerate(url);
|
|
5761
5761
|
}
|
|
5762
|
-
return
|
|
5762
|
+
return path4;
|
|
5763
5763
|
});
|
|
5764
5764
|
exports2.normalize = normalize;
|
|
5765
5765
|
function join2(aRoot, aPath) {
|
|
@@ -6523,12 +6523,12 @@ var require_read_wasm = __commonJS({
|
|
|
6523
6523
|
};
|
|
6524
6524
|
module2.exports.initialize = (input) => mappingsWasm = input;
|
|
6525
6525
|
} else {
|
|
6526
|
-
const
|
|
6527
|
-
const
|
|
6526
|
+
const fs5 = require("fs");
|
|
6527
|
+
const path4 = require("path");
|
|
6528
6528
|
module2.exports = function readWasm() {
|
|
6529
6529
|
return new Promise((resolve, reject) => {
|
|
6530
|
-
const wasmPath =
|
|
6531
|
-
|
|
6530
|
+
const wasmPath = path4.join(__dirname, "mappings.wasm");
|
|
6531
|
+
fs5.readFile(wasmPath, null, (error, data) => {
|
|
6532
6532
|
if (error) {
|
|
6533
6533
|
reject(error);
|
|
6534
6534
|
return;
|
|
@@ -8153,8 +8153,8 @@ var require_utils3 = __commonJS({
|
|
|
8153
8153
|
}
|
|
8154
8154
|
return output;
|
|
8155
8155
|
};
|
|
8156
|
-
exports2.basename = (
|
|
8157
|
-
const segs =
|
|
8156
|
+
exports2.basename = (path4, { windows } = {}) => {
|
|
8157
|
+
const segs = path4.split(windows ? /[\\/]/ : "/");
|
|
8158
8158
|
const last = segs[segs.length - 1];
|
|
8159
8159
|
if (last === "") {
|
|
8160
8160
|
return segs[segs.length - 2];
|
|
@@ -9429,8 +9429,8 @@ var require_picomatch2 = __commonJS({
|
|
|
9429
9429
|
});
|
|
9430
9430
|
|
|
9431
9431
|
// src/index.ts
|
|
9432
|
-
var
|
|
9433
|
-
var
|
|
9432
|
+
var import_promises3 = __toESM(require("node:fs/promises"));
|
|
9433
|
+
var import_node_path3 = __toESM(require("node:path"));
|
|
9434
9434
|
var import_constants2 = __toESM(require_constants2());
|
|
9435
9435
|
|
|
9436
9436
|
// src/outputs.ts
|
|
@@ -9965,6 +9965,7 @@ async function handleNodeOutputs(nodeOutputs, {
|
|
|
9965
9965
|
supportsMultiPayloads: true,
|
|
9966
9966
|
supportsResponseStreaming: true,
|
|
9967
9967
|
experimentalAllowBundling: true,
|
|
9968
|
+
shouldDisableAutomaticFetchInstrumentation: process.env.VERCEL_TRACING_DISABLE_AUTOMATIC_FETCH_INSTRUMENTATION === "1",
|
|
9968
9969
|
// middleware handler always expects Request/Response interface
|
|
9969
9970
|
useWebApi: isMiddleware,
|
|
9970
9971
|
launcherType: "Nodejs",
|
|
@@ -10089,6 +10090,7 @@ async function handlePrerenderOutputs(prerenderOutputs, {
|
|
|
10089
10090
|
// TODO: strongly type this
|
|
10090
10091
|
{
|
|
10091
10092
|
group: output.groupId,
|
|
10093
|
+
exposeErrBody: true,
|
|
10092
10094
|
expiration: typeof output.fallback?.initialRevalidate !== "undefined" ? output.fallback?.initialRevalidate : 1,
|
|
10093
10095
|
staleExpiration: output.fallback?.initialExpiration,
|
|
10094
10096
|
sourcePath: parentNodeOutput?.pathname,
|
|
@@ -10274,8 +10276,8 @@ async function usesSrcDirectory(workPath) {
|
|
|
10274
10276
|
}
|
|
10275
10277
|
return false;
|
|
10276
10278
|
}
|
|
10277
|
-
function isDirectory(
|
|
10278
|
-
return import_fs_extra3.default.lstatSync(
|
|
10279
|
+
function isDirectory(path4) {
|
|
10280
|
+
return import_fs_extra3.default.lstatSync(path4, { throwIfNoEntry: false })?.isDirectory() ?? false;
|
|
10279
10281
|
}
|
|
10280
10282
|
async function getSourceFilePathFromPage({
|
|
10281
10283
|
workPath,
|
|
@@ -10478,13 +10480,13 @@ function extractHeaders(routing) {
|
|
|
10478
10480
|
}
|
|
10479
10481
|
function normalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataResolving, isOverride = false) {
|
|
10480
10482
|
if (!shouldHandleMiddlewareDataResolving) return [];
|
|
10481
|
-
const
|
|
10483
|
+
const path4 = require("node:path");
|
|
10482
10484
|
const basePath = config.basePath || "";
|
|
10483
10485
|
const trailingSlash = config.trailingSlash || false;
|
|
10484
10486
|
return [
|
|
10485
10487
|
// remove x-nextjs-data header for non _next/data requests
|
|
10486
10488
|
{
|
|
10487
|
-
src:
|
|
10489
|
+
src: path4.posix.join("/", basePath, "/(?!_next/data(?:/|$))(.*)"),
|
|
10488
10490
|
has: [
|
|
10489
10491
|
{
|
|
10490
10492
|
type: "header",
|
|
@@ -10504,7 +10506,7 @@ function normalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataReso
|
|
|
10504
10506
|
},
|
|
10505
10507
|
// ensure x-nextjs-data header is always present if we are doing middleware next data resolving
|
|
10506
10508
|
{
|
|
10507
|
-
src:
|
|
10509
|
+
src: path4.posix.join("/", basePath, "/_next/data/(.*)"),
|
|
10508
10510
|
missing: [
|
|
10509
10511
|
{
|
|
10510
10512
|
type: "header",
|
|
@@ -10525,14 +10527,14 @@ function normalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataReso
|
|
|
10525
10527
|
},
|
|
10526
10528
|
// strip _next/data prefix for resolving
|
|
10527
10529
|
{
|
|
10528
|
-
src: `^${
|
|
10530
|
+
src: `^${path4.posix.join(
|
|
10529
10531
|
"/",
|
|
10530
10532
|
basePath,
|
|
10531
10533
|
"/_next/data/",
|
|
10532
10534
|
buildId.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"),
|
|
10533
10535
|
"/(.*).json"
|
|
10534
10536
|
)}`,
|
|
10535
|
-
dest: `${
|
|
10537
|
+
dest: `${path4.posix.join(
|
|
10536
10538
|
"/",
|
|
10537
10539
|
basePath,
|
|
10538
10540
|
"/$1",
|
|
@@ -10549,14 +10551,14 @@ function normalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataReso
|
|
|
10549
10551
|
},
|
|
10550
10552
|
// normalize "/index" from "/_next/data/index.json" to -> just "/"
|
|
10551
10553
|
{
|
|
10552
|
-
src:
|
|
10554
|
+
src: path4.posix.join("^/", basePath, "/index(?:/)?"),
|
|
10553
10555
|
has: [
|
|
10554
10556
|
{
|
|
10555
10557
|
type: "header",
|
|
10556
10558
|
key: "x-nextjs-data"
|
|
10557
10559
|
}
|
|
10558
10560
|
],
|
|
10559
|
-
dest:
|
|
10561
|
+
dest: path4.posix.join("/", basePath, trailingSlash ? "/" : ""),
|
|
10560
10562
|
...isOverride ? { override: true } : {},
|
|
10561
10563
|
continue: true
|
|
10562
10564
|
}
|
|
@@ -10575,12 +10577,12 @@ function extractOnMatchRoutes(routing) {
|
|
|
10575
10577
|
}
|
|
10576
10578
|
function denormalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataResolving, isOverride = false) {
|
|
10577
10579
|
if (!shouldHandleMiddlewareDataResolving) return [];
|
|
10578
|
-
const
|
|
10580
|
+
const path4 = require("node:path");
|
|
10579
10581
|
const basePath = config.basePath || "";
|
|
10580
10582
|
const trailingSlash = config.trailingSlash || false;
|
|
10581
10583
|
return [
|
|
10582
10584
|
{
|
|
10583
|
-
src:
|
|
10585
|
+
src: path4.posix.join(
|
|
10584
10586
|
"^/",
|
|
10585
10587
|
basePath && basePath !== "/" ? `${basePath}${trailingSlash ? "/$" : "$"}` : "$"
|
|
10586
10588
|
),
|
|
@@ -10590,7 +10592,7 @@ function denormalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataRe
|
|
|
10590
10592
|
key: "x-nextjs-data"
|
|
10591
10593
|
}
|
|
10592
10594
|
],
|
|
10593
|
-
dest: `${
|
|
10595
|
+
dest: `${path4.posix.join(
|
|
10594
10596
|
"/",
|
|
10595
10597
|
basePath,
|
|
10596
10598
|
"/_next/data/",
|
|
@@ -10601,14 +10603,14 @@ function denormalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataRe
|
|
|
10601
10603
|
...isOverride ? { override: true } : {}
|
|
10602
10604
|
},
|
|
10603
10605
|
{
|
|
10604
|
-
src:
|
|
10606
|
+
src: path4.posix.join("^/", basePath, "((?!_next/)(?:.*[^/]|.*))/?$"),
|
|
10605
10607
|
has: [
|
|
10606
10608
|
{
|
|
10607
10609
|
type: "header",
|
|
10608
10610
|
key: "x-nextjs-data"
|
|
10609
10611
|
}
|
|
10610
10612
|
],
|
|
10611
|
-
dest: `${
|
|
10613
|
+
dest: `${path4.posix.join(
|
|
10612
10614
|
"/",
|
|
10613
10615
|
basePath,
|
|
10614
10616
|
"/_next/data/",
|
|
@@ -10621,6 +10623,68 @@ function denormalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataRe
|
|
|
10621
10623
|
];
|
|
10622
10624
|
}
|
|
10623
10625
|
|
|
10626
|
+
// src/server-actions.ts
|
|
10627
|
+
var import_promises2 = __toESM(require("node:fs/promises"));
|
|
10628
|
+
var import_node_path2 = __toESM(require("node:path"));
|
|
10629
|
+
async function getServerActionMetaRoutes(distDir) {
|
|
10630
|
+
const manifestPath = import_node_path2.default.join(
|
|
10631
|
+
distDir,
|
|
10632
|
+
"server",
|
|
10633
|
+
"server-reference-manifest.json"
|
|
10634
|
+
);
|
|
10635
|
+
let manifestContent;
|
|
10636
|
+
try {
|
|
10637
|
+
manifestContent = await import_promises2.default.readFile(manifestPath, "utf8");
|
|
10638
|
+
} catch (error) {
|
|
10639
|
+
if (error.code === "ENOENT") {
|
|
10640
|
+
return [];
|
|
10641
|
+
}
|
|
10642
|
+
throw error;
|
|
10643
|
+
}
|
|
10644
|
+
let manifest;
|
|
10645
|
+
try {
|
|
10646
|
+
manifest = JSON.parse(manifestContent);
|
|
10647
|
+
} catch {
|
|
10648
|
+
console.warn(
|
|
10649
|
+
`Failed to parse ${manifestPath}, skipping server action meta routes`
|
|
10650
|
+
);
|
|
10651
|
+
return [];
|
|
10652
|
+
}
|
|
10653
|
+
const routes = [];
|
|
10654
|
+
const seenIds = /* @__PURE__ */ new Set();
|
|
10655
|
+
for (const runtimeType of ["node", "edge"]) {
|
|
10656
|
+
const runtime = manifest[runtimeType];
|
|
10657
|
+
if (!runtime) continue;
|
|
10658
|
+
for (const [id, entry] of Object.entries(runtime)) {
|
|
10659
|
+
if (!entry.filename || !entry.exportedName) continue;
|
|
10660
|
+
if (seenIds.has(id)) continue;
|
|
10661
|
+
seenIds.add(id);
|
|
10662
|
+
const exportedName = entry.exportedName.startsWith("$$RSC_SERVER_ACTION_") ? "anonymous_fn" : entry.exportedName;
|
|
10663
|
+
routes.push({
|
|
10664
|
+
src: "/(.*)",
|
|
10665
|
+
has: [
|
|
10666
|
+
{
|
|
10667
|
+
type: "header",
|
|
10668
|
+
key: "next-action",
|
|
10669
|
+
value: id
|
|
10670
|
+
}
|
|
10671
|
+
],
|
|
10672
|
+
transforms: [
|
|
10673
|
+
{
|
|
10674
|
+
type: "request.headers",
|
|
10675
|
+
op: "append",
|
|
10676
|
+
target: {
|
|
10677
|
+
key: "x-server-action-name"
|
|
10678
|
+
},
|
|
10679
|
+
args: `${entry.filename}#${exportedName}`
|
|
10680
|
+
}
|
|
10681
|
+
]
|
|
10682
|
+
});
|
|
10683
|
+
}
|
|
10684
|
+
}
|
|
10685
|
+
return routes;
|
|
10686
|
+
}
|
|
10687
|
+
|
|
10624
10688
|
// src/toolbar.ts
|
|
10625
10689
|
function generateToolbarScript(isProduction, optIn, deploymentIdExpr) {
|
|
10626
10690
|
let cookieCheck = "true";
|
|
@@ -10645,6 +10709,9 @@ if(${cookieCheck}){
|
|
|
10645
10709
|
var myAdapter = {
|
|
10646
10710
|
name: "Vercel",
|
|
10647
10711
|
async modifyConfig(config, ctx) {
|
|
10712
|
+
if (ctx.phase === import_constants2.PHASE_PRODUCTION_BUILD && process.env.CI) {
|
|
10713
|
+
process.env.TURBO_ENGINE_READ_CONCURRENCY = "4";
|
|
10714
|
+
}
|
|
10648
10715
|
if (ctx.phase === import_constants2.PHASE_PRODUCTION_BUILD) {
|
|
10649
10716
|
config.experimental.supportsImmutableAssets = // Default to true, allow users to opt-out
|
|
10650
10717
|
(config.experimental.supportsImmutableAssets ?? true) && // AND with infra support to allow disabling via feature flag if necessary.
|
|
@@ -10658,10 +10725,10 @@ var myAdapter = {
|
|
|
10658
10725
|
}
|
|
10659
10726
|
if (ctx.phase === import_constants2.PHASE_PRODUCTION_BUILD && process.env.VERCEL_PREVIEW_COMMENTS_ENABLED === "1" && // Only available in newer Next.js versions
|
|
10660
10727
|
typeof ctx.projectDir !== "undefined") {
|
|
10661
|
-
const dir =
|
|
10662
|
-
await
|
|
10663
|
-
await
|
|
10664
|
-
|
|
10728
|
+
const dir = import_node_path3.default.join(ctx.projectDir, ".vercel/");
|
|
10729
|
+
await import_promises3.default.mkdir(dir, { recursive: true });
|
|
10730
|
+
await import_promises3.default.writeFile(
|
|
10731
|
+
import_node_path3.default.join(dir, "adapter-toolbar-script.js"),
|
|
10665
10732
|
generateToolbarScript(
|
|
10666
10733
|
process.env.VERCEL_ENV === "production",
|
|
10667
10734
|
process.env.VERCEL_PREVIEW_COMMENTS_OPT_IN === "1",
|
|
@@ -10688,8 +10755,8 @@ var myAdapter = {
|
|
|
10688
10755
|
projectDir,
|
|
10689
10756
|
nextVersion
|
|
10690
10757
|
}) {
|
|
10691
|
-
const vercelOutputDir =
|
|
10692
|
-
await
|
|
10758
|
+
const vercelOutputDir = import_node_path3.default.join(distDir, "output");
|
|
10759
|
+
await import_promises3.default.mkdir(vercelOutputDir, { recursive: true });
|
|
10693
10760
|
const escapedBuildId = escapeStringRegexp(buildId);
|
|
10694
10761
|
const hasMiddleware = Boolean(outputs.middleware);
|
|
10695
10762
|
const hasAppDir = outputs.appPages.length > 0 || outputs.appRoutes.length > 0;
|
|
@@ -10708,7 +10775,7 @@ var myAdapter = {
|
|
|
10708
10775
|
images: getImagesConfig(config)
|
|
10709
10776
|
};
|
|
10710
10777
|
await handlePublicFiles(
|
|
10711
|
-
|
|
10778
|
+
import_node_path3.default.join(projectDir, "public"),
|
|
10712
10779
|
vercelOutputDir,
|
|
10713
10780
|
config
|
|
10714
10781
|
);
|
|
@@ -10833,6 +10900,7 @@ var myAdapter = {
|
|
|
10833
10900
|
const { priority: priorityRedirects, normal: redirects } = extractRedirects(routing);
|
|
10834
10901
|
const headers = extractHeaders(routing);
|
|
10835
10902
|
const onMatchRoutes = extractOnMatchRoutes(routing);
|
|
10903
|
+
const serverActionMetaRoutes = await getServerActionMetaRoutes(distDir);
|
|
10836
10904
|
const dynamicRoutes = [];
|
|
10837
10905
|
let addedNextData404Route = false;
|
|
10838
10906
|
for (const route of routing.dynamicRoutes) {
|
|
@@ -10840,8 +10908,8 @@ var myAdapter = {
|
|
|
10840
10908
|
if (!route.sourceRegex.includes("_next/data") && !addedNextData404Route) {
|
|
10841
10909
|
addedNextData404Route = true;
|
|
10842
10910
|
dynamicRoutes.push({
|
|
10843
|
-
src:
|
|
10844
|
-
dest:
|
|
10911
|
+
src: import_node_path3.default.posix.join("/", config.basePath || "", "_next/data/(.*)"),
|
|
10912
|
+
dest: import_node_path3.default.posix.join("/", config.basePath || "", "404"),
|
|
10845
10913
|
status: 404,
|
|
10846
10914
|
check: true
|
|
10847
10915
|
});
|
|
@@ -10879,31 +10947,31 @@ var myAdapter = {
|
|
|
10879
10947
|
// $wildcard
|
|
10880
10948
|
// This is split into two rules to avoid matching the `/index` route as it causes issues with trailing slash redirect
|
|
10881
10949
|
{
|
|
10882
|
-
src: `^${
|
|
10950
|
+
src: `^${import_node_path3.default.posix.join(
|
|
10883
10951
|
"/",
|
|
10884
10952
|
config.basePath,
|
|
10885
10953
|
"/"
|
|
10886
10954
|
)}(?!(?:_next/.*|${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})(?:/.*|$))$`,
|
|
10887
10955
|
// we aren't able to ensure trailing slash mode here
|
|
10888
10956
|
// so ensure this comes after the trailing slash redirect
|
|
10889
|
-
dest: `${config.basePath && config.basePath !== "/" ?
|
|
10957
|
+
dest: `${config.basePath && config.basePath !== "/" ? import_node_path3.default.posix.join("/", config.basePath) : ""}$wildcard${config.trailingSlash ? "/" : ""}`,
|
|
10890
10958
|
continue: true
|
|
10891
10959
|
},
|
|
10892
10960
|
{
|
|
10893
|
-
src: `^${
|
|
10961
|
+
src: `^${import_node_path3.default.posix.join(
|
|
10894
10962
|
"/",
|
|
10895
10963
|
config.basePath,
|
|
10896
10964
|
"/"
|
|
10897
10965
|
)}(?!(?:_next/.*|${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})(?:/.*|$))(.*)$`,
|
|
10898
10966
|
// we aren't able to ensure trailing slash mode here
|
|
10899
10967
|
// so ensure this comes after the trailing slash redirect
|
|
10900
|
-
dest: `${config.basePath && config.basePath !== "/" ?
|
|
10968
|
+
dest: `${config.basePath && config.basePath !== "/" ? import_node_path3.default.posix.join("/", config.basePath) : ""}$wildcard/$1`,
|
|
10901
10969
|
continue: true
|
|
10902
10970
|
},
|
|
10903
10971
|
// Handle redirecting to locale specific domains
|
|
10904
10972
|
...config.i18n.domains && config.i18n.domains.length > 0 && config.i18n.localeDetection !== false ? [
|
|
10905
10973
|
{
|
|
10906
|
-
src: `^${
|
|
10974
|
+
src: `^${import_node_path3.default.posix.join(
|
|
10907
10975
|
"/",
|
|
10908
10976
|
config.basePath
|
|
10909
10977
|
)}/?(?:${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})?/?$`,
|
|
@@ -10950,8 +11018,8 @@ var myAdapter = {
|
|
|
10950
11018
|
// when `skipDefaultLocaleRewrite` is not flagged on
|
|
10951
11019
|
// and when localeDetection is enabled.
|
|
10952
11020
|
{
|
|
10953
|
-
src: `^${
|
|
10954
|
-
dest: `${
|
|
11021
|
+
src: `^${import_node_path3.default.posix.join("/", config.basePath)}$`,
|
|
11022
|
+
dest: `${import_node_path3.default.posix.join(
|
|
10955
11023
|
"/",
|
|
10956
11024
|
config.basePath,
|
|
10957
11025
|
config.i18n.defaultLocale
|
|
@@ -10964,12 +11032,12 @@ var myAdapter = {
|
|
|
10964
11032
|
// e.g. for /de/posts/[slug] x-now-route-matches would have
|
|
10965
11033
|
// 1=posts%2Fpost-1
|
|
10966
11034
|
{
|
|
10967
|
-
src: `^${
|
|
11035
|
+
src: `^${import_node_path3.default.posix.join(
|
|
10968
11036
|
"/",
|
|
10969
11037
|
config.basePath,
|
|
10970
11038
|
"/"
|
|
10971
11039
|
)}(?!(?:_next/.*|${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})(?:/.*|$))(.*)$`,
|
|
10972
|
-
dest: `${
|
|
11040
|
+
dest: `${import_node_path3.default.posix.join(
|
|
10973
11041
|
"/",
|
|
10974
11042
|
config.basePath,
|
|
10975
11043
|
config.i18n.defaultLocale
|
|
@@ -10979,14 +11047,14 @@ var myAdapter = {
|
|
|
10979
11047
|
] : [],
|
|
10980
11048
|
...headers,
|
|
10981
11049
|
...redirects,
|
|
10982
|
-
|
|
11050
|
+
...serverActionMetaRoutes,
|
|
10983
11051
|
// middleware route - placeholder for middleware configuration
|
|
10984
11052
|
...middlewareRoutes,
|
|
10985
11053
|
...convertedRewrites.beforeFiles,
|
|
10986
11054
|
// add 404 handling if /404 or locale variants are requested literally
|
|
10987
11055
|
...config.i18n ? [
|
|
10988
11056
|
{
|
|
10989
|
-
src: `${
|
|
11057
|
+
src: `${import_node_path3.default.posix.join(
|
|
10990
11058
|
"/",
|
|
10991
11059
|
config.basePath,
|
|
10992
11060
|
"/"
|
|
@@ -11002,7 +11070,7 @@ var myAdapter = {
|
|
|
11002
11070
|
}
|
|
11003
11071
|
] : [
|
|
11004
11072
|
{
|
|
11005
|
-
src:
|
|
11073
|
+
src: import_node_path3.default.posix.join("/", config.basePath, "404/?"),
|
|
11006
11074
|
status: 404,
|
|
11007
11075
|
continue: true,
|
|
11008
11076
|
missing: [
|
|
@@ -11016,7 +11084,7 @@ var myAdapter = {
|
|
|
11016
11084
|
// add 500 handling if /500 or locale variants are requested literally
|
|
11017
11085
|
...config.i18n ? [
|
|
11018
11086
|
{
|
|
11019
|
-
src: `${
|
|
11087
|
+
src: `${import_node_path3.default.posix.join(
|
|
11020
11088
|
"/",
|
|
11021
11089
|
config.basePath,
|
|
11022
11090
|
"/"
|
|
@@ -11026,7 +11094,7 @@ var myAdapter = {
|
|
|
11026
11094
|
}
|
|
11027
11095
|
] : [
|
|
11028
11096
|
{
|
|
11029
|
-
src:
|
|
11097
|
+
src: import_node_path3.default.posix.join("/", config.basePath, "500/?"),
|
|
11030
11098
|
status: 500,
|
|
11031
11099
|
continue: true
|
|
11032
11100
|
}
|
|
@@ -11041,12 +11109,12 @@ var myAdapter = {
|
|
|
11041
11109
|
// RSC and prefetch request handling for App Router
|
|
11042
11110
|
...hasAppDir ? [
|
|
11043
11111
|
{
|
|
11044
|
-
src:
|
|
11112
|
+
src: import_node_path3.default.posix.join(
|
|
11045
11113
|
"/",
|
|
11046
11114
|
config.basePath,
|
|
11047
11115
|
"/(?<path>.+?)(?:/)?$"
|
|
11048
11116
|
),
|
|
11049
|
-
dest:
|
|
11117
|
+
dest: import_node_path3.default.posix.join(
|
|
11050
11118
|
"/",
|
|
11051
11119
|
config.basePath,
|
|
11052
11120
|
`/$path${routing.rsc.prefetchSegmentDirSuffix}/$segmentPath${routing.rsc.prefetchSegmentSuffix}`
|
|
@@ -11072,8 +11140,8 @@ var myAdapter = {
|
|
|
11072
11140
|
override: true
|
|
11073
11141
|
},
|
|
11074
11142
|
{
|
|
11075
|
-
src:
|
|
11076
|
-
dest:
|
|
11143
|
+
src: import_node_path3.default.posix.join("^/", config.basePath, "/?$"),
|
|
11144
|
+
dest: import_node_path3.default.posix.join(
|
|
11077
11145
|
"/",
|
|
11078
11146
|
config.basePath,
|
|
11079
11147
|
`/index${routing.rsc.prefetchSegmentDirSuffix}/$segmentPath${routing.rsc.prefetchSegmentSuffix}`
|
|
@@ -11099,7 +11167,7 @@ var myAdapter = {
|
|
|
11099
11167
|
override: true
|
|
11100
11168
|
},
|
|
11101
11169
|
{
|
|
11102
|
-
src: `^${
|
|
11170
|
+
src: `^${import_node_path3.default.posix.join("/", config.basePath, "/?")}`,
|
|
11103
11171
|
has: [
|
|
11104
11172
|
{
|
|
11105
11173
|
type: "header",
|
|
@@ -11107,7 +11175,7 @@ var myAdapter = {
|
|
|
11107
11175
|
value: "1"
|
|
11108
11176
|
}
|
|
11109
11177
|
],
|
|
11110
|
-
dest:
|
|
11178
|
+
dest: import_node_path3.default.posix.join("/", config.basePath, "/index.rsc"),
|
|
11111
11179
|
headers: {
|
|
11112
11180
|
vary: routing.rsc.varyHeader
|
|
11113
11181
|
},
|
|
@@ -11115,7 +11183,7 @@ var myAdapter = {
|
|
|
11115
11183
|
override: true
|
|
11116
11184
|
},
|
|
11117
11185
|
{
|
|
11118
|
-
src: `^${
|
|
11186
|
+
src: `^${import_node_path3.default.posix.join(
|
|
11119
11187
|
"/",
|
|
11120
11188
|
config.basePath,
|
|
11121
11189
|
"/((?!.+\\.rsc).+?)(?:/)?$"
|
|
@@ -11127,7 +11195,7 @@ var myAdapter = {
|
|
|
11127
11195
|
value: "1"
|
|
11128
11196
|
}
|
|
11129
11197
|
],
|
|
11130
|
-
dest:
|
|
11198
|
+
dest: import_node_path3.default.posix.join("/", config.basePath, "/$1.rsc"),
|
|
11131
11199
|
headers: {
|
|
11132
11200
|
vary: routing.rsc.varyHeader
|
|
11133
11201
|
},
|
|
@@ -11140,7 +11208,7 @@ var myAdapter = {
|
|
|
11140
11208
|
// _next/image path
|
|
11141
11209
|
...config.basePath ? [
|
|
11142
11210
|
{
|
|
11143
|
-
src:
|
|
11211
|
+
src: import_node_path3.default.posix.join("/", config.basePath, "_next/image/?"),
|
|
11144
11212
|
dest: "/_next/image",
|
|
11145
11213
|
check: true
|
|
11146
11214
|
}
|
|
@@ -11156,20 +11224,20 @@ var myAdapter = {
|
|
|
11156
11224
|
// No-op _next/data rewrite to trigger handle: 'rewrites' and then 404
|
|
11157
11225
|
// if no match to prevent rewriting _next/data unexpectedly
|
|
11158
11226
|
{
|
|
11159
|
-
src:
|
|
11160
|
-
dest:
|
|
11227
|
+
src: import_node_path3.default.posix.join("/", config.basePath, "_next/data/(.*)"),
|
|
11228
|
+
dest: import_node_path3.default.posix.join("/", config.basePath, "_next/data/$1"),
|
|
11161
11229
|
check: true
|
|
11162
11230
|
}
|
|
11163
11231
|
] : [],
|
|
11164
11232
|
// normalize /index.rsc to just / for App Router
|
|
11165
11233
|
...hasAppDir ? [
|
|
11166
11234
|
{
|
|
11167
|
-
src:
|
|
11235
|
+
src: import_node_path3.default.posix.join(
|
|
11168
11236
|
"/",
|
|
11169
11237
|
config.basePath,
|
|
11170
11238
|
"/index(\\.action|\\.rsc)"
|
|
11171
11239
|
),
|
|
11172
|
-
dest:
|
|
11240
|
+
dest: import_node_path3.default.posix.join("/", config.basePath),
|
|
11173
11241
|
continue: true
|
|
11174
11242
|
}
|
|
11175
11243
|
] : [],
|
|
@@ -11177,13 +11245,13 @@ var myAdapter = {
|
|
|
11177
11245
|
// ensure bad rewrites with /.rsc are fixed for App Router
|
|
11178
11246
|
...hasAppDir ? [
|
|
11179
11247
|
{
|
|
11180
|
-
src:
|
|
11181
|
-
dest:
|
|
11248
|
+
src: import_node_path3.default.posix.join("/", config.basePath, "/\\.rsc$"),
|
|
11249
|
+
dest: import_node_path3.default.posix.join("/", config.basePath, `/index.rsc`),
|
|
11182
11250
|
check: true
|
|
11183
11251
|
},
|
|
11184
11252
|
{
|
|
11185
|
-
src:
|
|
11186
|
-
dest:
|
|
11253
|
+
src: import_node_path3.default.posix.join("/", config.basePath, "(.+)/\\.rsc$"),
|
|
11254
|
+
dest: import_node_path3.default.posix.join("/", config.basePath, "$1.rsc"),
|
|
11187
11255
|
check: true
|
|
11188
11256
|
}
|
|
11189
11257
|
] : [],
|
|
@@ -11191,14 +11259,14 @@ var myAdapter = {
|
|
|
11191
11259
|
...convertedRewrites.fallback,
|
|
11192
11260
|
// make sure 404 page is used when a directory is matched without
|
|
11193
11261
|
// an index page
|
|
11194
|
-
{ src:
|
|
11262
|
+
{ src: import_node_path3.default.posix.join("/", config.basePath, ".*"), status: 404 },
|
|
11195
11263
|
{ handle: "miss" },
|
|
11196
11264
|
// 404 to plain text file for _next/static
|
|
11197
11265
|
{
|
|
11198
|
-
src:
|
|
11266
|
+
src: import_node_path3.default.posix.join("/", config.basePath, "_next/static/.+"),
|
|
11199
11267
|
status: 404,
|
|
11200
11268
|
check: true,
|
|
11201
|
-
dest:
|
|
11269
|
+
dest: import_node_path3.default.posix.join(
|
|
11202
11270
|
"/",
|
|
11203
11271
|
config.basePath,
|
|
11204
11272
|
"_next/static/not-found.txt"
|
|
@@ -11215,8 +11283,8 @@ var myAdapter = {
|
|
|
11215
11283
|
// we only want to add the rewrite as the fallback case once routing is complete.
|
|
11216
11284
|
...config.i18n?.localeDetection === false ? [
|
|
11217
11285
|
{
|
|
11218
|
-
src: `^${
|
|
11219
|
-
dest: `${
|
|
11286
|
+
src: `^${import_node_path3.default.posix.join("/", config.basePath)}$`,
|
|
11287
|
+
dest: `${import_node_path3.default.posix.join(
|
|
11220
11288
|
"/",
|
|
11221
11289
|
config.basePath,
|
|
11222
11290
|
config.i18n.defaultLocale
|
|
@@ -11229,12 +11297,12 @@ var myAdapter = {
|
|
|
11229
11297
|
// e.g. for /de/posts/[slug] x-now-route-matches would have
|
|
11230
11298
|
// 1=posts%2Fpost-1
|
|
11231
11299
|
{
|
|
11232
|
-
src: `^${
|
|
11300
|
+
src: `^${import_node_path3.default.posix.join(
|
|
11233
11301
|
"/",
|
|
11234
11302
|
config.basePath,
|
|
11235
11303
|
"/"
|
|
11236
11304
|
)}(?!(?:_next/.*|${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})(?:/.*|$))(.*)$`,
|
|
11237
|
-
dest: `${
|
|
11305
|
+
dest: `${import_node_path3.default.posix.join(
|
|
11238
11306
|
"/",
|
|
11239
11307
|
config.basePath,
|
|
11240
11308
|
config.i18n.defaultLocale
|
|
@@ -11243,7 +11311,7 @@ var myAdapter = {
|
|
|
11243
11311
|
}
|
|
11244
11312
|
] : [],
|
|
11245
11313
|
{
|
|
11246
|
-
src:
|
|
11314
|
+
src: import_node_path3.default.posix.join(
|
|
11247
11315
|
"/",
|
|
11248
11316
|
config.basePath,
|
|
11249
11317
|
escapeStringRegexp(config.i18n.defaultLocale)
|
|
@@ -11252,11 +11320,11 @@ var myAdapter = {
|
|
|
11252
11320
|
check: true
|
|
11253
11321
|
},
|
|
11254
11322
|
{
|
|
11255
|
-
src: `^${
|
|
11323
|
+
src: `^${import_node_path3.default.posix.join(
|
|
11256
11324
|
"/",
|
|
11257
11325
|
config.basePath
|
|
11258
11326
|
)}/?(?:${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})/(.*)`,
|
|
11259
|
-
dest: `${
|
|
11327
|
+
dest: `${import_node_path3.default.posix.join("/", config.basePath, "/")}$1`,
|
|
11260
11328
|
check: true
|
|
11261
11329
|
}
|
|
11262
11330
|
] : [],
|
|
@@ -11285,7 +11353,7 @@ var myAdapter = {
|
|
|
11285
11353
|
// if middleware + pages - placeholder for middleware handling
|
|
11286
11354
|
...hasMiddleware ? [
|
|
11287
11355
|
{
|
|
11288
|
-
src: `^${
|
|
11356
|
+
src: `^${import_node_path3.default.posix.join(
|
|
11289
11357
|
"/",
|
|
11290
11358
|
config.basePath,
|
|
11291
11359
|
"/_next/data/",
|
|
@@ -11301,7 +11369,7 @@ var myAdapter = {
|
|
|
11301
11369
|
// add a catch-all data route so we don't 404 when getting
|
|
11302
11370
|
// middleware effects
|
|
11303
11371
|
{
|
|
11304
|
-
src: `^${
|
|
11372
|
+
src: `^${import_node_path3.default.posix.join(
|
|
11305
11373
|
"/",
|
|
11306
11374
|
config.basePath,
|
|
11307
11375
|
"/_next/data/",
|
|
@@ -11315,7 +11383,7 @@ var myAdapter = {
|
|
|
11315
11383
|
...onMatchRoutes,
|
|
11316
11384
|
// add internal matched path header for function bundle mapping
|
|
11317
11385
|
{
|
|
11318
|
-
src: config.basePath && config.basePath !== "/" ?
|
|
11386
|
+
src: config.basePath && config.basePath !== "/" ? import_node_path3.default.posix.join("/", config.basePath, "/?(?:index)?(?:/)?$") : `/(?:index)?(?:/)?$`,
|
|
11319
11387
|
headers: {
|
|
11320
11388
|
"x-matched-path": "/"
|
|
11321
11389
|
},
|
|
@@ -11323,7 +11391,7 @@ var myAdapter = {
|
|
|
11323
11391
|
important: true
|
|
11324
11392
|
},
|
|
11325
11393
|
{
|
|
11326
|
-
src:
|
|
11394
|
+
src: import_node_path3.default.posix.join(
|
|
11327
11395
|
"/",
|
|
11328
11396
|
config.basePath || "",
|
|
11329
11397
|
`/((?!index$).*?)(?:/)?$`
|
|
@@ -11338,12 +11406,12 @@ var myAdapter = {
|
|
|
11338
11406
|
// Custom Next.js 404 page
|
|
11339
11407
|
...config.i18n ? [
|
|
11340
11408
|
{
|
|
11341
|
-
src: `${
|
|
11409
|
+
src: `${import_node_path3.default.posix.join(
|
|
11342
11410
|
"/",
|
|
11343
11411
|
config.basePath,
|
|
11344
11412
|
"/"
|
|
11345
11413
|
)}(?<nextLocale>${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})(/.*|$)`,
|
|
11346
|
-
dest:
|
|
11414
|
+
dest: import_node_path3.default.posix.join(
|
|
11347
11415
|
"/",
|
|
11348
11416
|
config.basePath,
|
|
11349
11417
|
"/$nextLocale",
|
|
@@ -11353,8 +11421,8 @@ var myAdapter = {
|
|
|
11353
11421
|
caseSensitive: true
|
|
11354
11422
|
},
|
|
11355
11423
|
{
|
|
11356
|
-
src:
|
|
11357
|
-
dest:
|
|
11424
|
+
src: import_node_path3.default.posix.join("/", config.basePath, ".*"),
|
|
11425
|
+
dest: import_node_path3.default.posix.join(
|
|
11358
11426
|
"/",
|
|
11359
11427
|
config.basePath,
|
|
11360
11428
|
`/${config.i18n.defaultLocale}`,
|
|
@@ -11364,7 +11432,7 @@ var myAdapter = {
|
|
|
11364
11432
|
}
|
|
11365
11433
|
] : [
|
|
11366
11434
|
{
|
|
11367
|
-
src:
|
|
11435
|
+
src: import_node_path3.default.posix.join(
|
|
11368
11436
|
"/",
|
|
11369
11437
|
config.basePath,
|
|
11370
11438
|
// if config.basePath is populated we need to
|
|
@@ -11372,25 +11440,25 @@ var myAdapter = {
|
|
|
11372
11440
|
// that the config.basePath (basePath) itself matches
|
|
11373
11441
|
`${config.basePath && config.basePath !== "/" ? "?" : ""}.*`
|
|
11374
11442
|
),
|
|
11375
|
-
dest:
|
|
11443
|
+
dest: import_node_path3.default.posix.join("/", config.basePath, notFoundPath),
|
|
11376
11444
|
status: 404
|
|
11377
11445
|
}
|
|
11378
11446
|
],
|
|
11379
11447
|
// custom 500 page if present
|
|
11380
11448
|
...config.i18n && has500Output ? [
|
|
11381
11449
|
{
|
|
11382
|
-
src: `${
|
|
11450
|
+
src: `${import_node_path3.default.posix.join(
|
|
11383
11451
|
"/",
|
|
11384
11452
|
config.basePath,
|
|
11385
11453
|
"/"
|
|
11386
11454
|
)}(?<nextLocale>${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})(/.*|$)`,
|
|
11387
|
-
dest:
|
|
11455
|
+
dest: import_node_path3.default.posix.join("/", config.basePath, "/$nextLocale/500"),
|
|
11388
11456
|
status: 500,
|
|
11389
11457
|
caseSensitive: true
|
|
11390
11458
|
},
|
|
11391
11459
|
{
|
|
11392
|
-
src:
|
|
11393
|
-
dest:
|
|
11460
|
+
src: import_node_path3.default.posix.join("/", config.basePath, ".*"),
|
|
11461
|
+
dest: import_node_path3.default.posix.join(
|
|
11394
11462
|
"/",
|
|
11395
11463
|
config.basePath,
|
|
11396
11464
|
`/${config.i18n.defaultLocale}/500`
|
|
@@ -11399,7 +11467,7 @@ var myAdapter = {
|
|
|
11399
11467
|
}
|
|
11400
11468
|
] : [
|
|
11401
11469
|
{
|
|
11402
|
-
src:
|
|
11470
|
+
src: import_node_path3.default.posix.join(
|
|
11403
11471
|
"/",
|
|
11404
11472
|
config.basePath,
|
|
11405
11473
|
// if config.basePath is populated we need to
|
|
@@ -11407,7 +11475,7 @@ var myAdapter = {
|
|
|
11407
11475
|
// that the config.basePath (basePath) itself matches
|
|
11408
11476
|
`${config.basePath && config.basePath !== "/" ? "?" : ""}.*`
|
|
11409
11477
|
),
|
|
11410
|
-
dest:
|
|
11478
|
+
dest: import_node_path3.default.posix.join(
|
|
11411
11479
|
"/",
|
|
11412
11480
|
config.basePath,
|
|
11413
11481
|
has500Output ? "/500" : "/_error"
|
|
@@ -11416,8 +11484,8 @@ var myAdapter = {
|
|
|
11416
11484
|
}
|
|
11417
11485
|
]
|
|
11418
11486
|
];
|
|
11419
|
-
const outputConfigPath =
|
|
11420
|
-
await
|
|
11487
|
+
const outputConfigPath = import_node_path3.default.join(vercelOutputDir, "config.json");
|
|
11488
|
+
await import_promises3.default.writeFile(outputConfigPath, JSON.stringify(vercelConfig2, null, 2));
|
|
11421
11489
|
}
|
|
11422
11490
|
};
|
|
11423
11491
|
module.exports = myAdapter;
|