@vercel/next 29.0.0-snapshot-801db9d533c3 → 29.0.0

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.
@@ -36,9 +36,9 @@ var require_interop_require_default = __commonJS({
36
36
  }
37
37
  });
38
38
 
39
- // ../../node_modules/.pnpm/next@16.4.0-canary.38_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/modern-browserslist-target.js
39
+ // ../../node_modules/.pnpm/next@16.5.0-canary.40_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/modern-browserslist-target.js
40
40
  var require_modern_browserslist_target = __commonJS({
41
- "../../node_modules/.pnpm/next@16.4.0-canary.38_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/modern-browserslist-target.js"(exports2, module2) {
41
+ "../../node_modules/.pnpm/next@16.5.0-canary.40_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/modern-browserslist-target.js"(exports2, module2) {
42
42
  "use strict";
43
43
  var MODERN_BROWSERSLIST_TARGET = [
44
44
  "chrome 111",
@@ -50,9 +50,9 @@ var require_modern_browserslist_target = __commonJS({
50
50
  }
51
51
  });
52
52
 
53
- // ../../node_modules/.pnpm/next@16.4.0-canary.38_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/entry-constants.js
53
+ // ../../node_modules/.pnpm/next@16.5.0-canary.40_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/entry-constants.js
54
54
  var require_entry_constants = __commonJS({
55
- "../../node_modules/.pnpm/next@16.4.0-canary.38_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/entry-constants.js"(exports2) {
55
+ "../../node_modules/.pnpm/next@16.5.0-canary.40_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/entry-constants.js"(exports2) {
56
56
  "use strict";
57
57
  Object.defineProperty(exports2, "__esModule", {
58
58
  value: true
@@ -84,9 +84,9 @@ var require_entry_constants = __commonJS({
84
84
  }
85
85
  });
86
86
 
87
- // ../../node_modules/.pnpm/next@16.4.0-canary.38_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/constants.js
87
+ // ../../node_modules/.pnpm/next@16.5.0-canary.40_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/constants.js
88
88
  var require_constants = __commonJS({
89
- "../../node_modules/.pnpm/next@16.4.0-canary.38_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/constants.js"(exports2, module2) {
89
+ "../../node_modules/.pnpm/next@16.5.0-canary.40_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/shared/lib/constants.js"(exports2, module2) {
90
90
  "use strict";
91
91
  Object.defineProperty(exports2, "__esModule", {
92
92
  value: true
@@ -108,7 +108,7 @@ var require_constants = __commonJS({
108
108
  return APP_PATH_ROUTES_MANIFEST;
109
109
  },
110
110
  AdapterOutputType: function() {
111
- return AdapterOutputType2;
111
+ return AdapterOutputType3;
112
112
  },
113
113
  BARREL_OPTIMIZATION_PREFIX: function() {
114
114
  return BARREL_OPTIMIZATION_PREFIX;
@@ -131,6 +131,12 @@ var require_constants = __commonJS({
131
131
  CLIENT_STATIC_FILES_PATH: function() {
132
132
  return CLIENT_STATIC_FILES_PATH;
133
133
  },
134
+ CLIENT_STATIC_FILES_RUNTIME_EXTERNAL_BROWSER_RUNTIME: function() {
135
+ return CLIENT_STATIC_FILES_RUNTIME_EXTERNAL_BROWSER_RUNTIME;
136
+ },
137
+ CLIENT_STATIC_FILES_RUNTIME_EXTERNAL_BROWSER_RUNTIME_SYMBOL: function() {
138
+ return CLIENT_STATIC_FILES_RUNTIME_EXTERNAL_BROWSER_RUNTIME_SYMBOL;
139
+ },
134
140
  CLIENT_STATIC_FILES_RUNTIME_MAIN: function() {
135
141
  return CLIENT_STATIC_FILES_RUNTIME_MAIN;
136
142
  },
@@ -325,15 +331,15 @@ var require_constants = __commonJS({
325
331
  [COMPILER_NAMES.server]: 1,
326
332
  [COMPILER_NAMES.edgeServer]: 2
327
333
  };
328
- var AdapterOutputType2 = /* @__PURE__ */ (function(AdapterOutputType3) {
329
- AdapterOutputType3["PAGES"] = "PAGES";
330
- AdapterOutputType3["PAGES_API"] = "PAGES_API";
331
- AdapterOutputType3["APP_PAGE"] = "APP_PAGE";
332
- AdapterOutputType3["APP_ROUTE"] = "APP_ROUTE";
333
- AdapterOutputType3["PRERENDER"] = "PRERENDER";
334
- AdapterOutputType3["STATIC_FILE"] = "STATIC_FILE";
335
- AdapterOutputType3["MIDDLEWARE"] = "MIDDLEWARE";
336
- return AdapterOutputType3;
334
+ var AdapterOutputType3 = /* @__PURE__ */ (function(AdapterOutputType4) {
335
+ AdapterOutputType4["PAGES"] = "PAGES";
336
+ AdapterOutputType4["PAGES_API"] = "PAGES_API";
337
+ AdapterOutputType4["APP_PAGE"] = "APP_PAGE";
338
+ AdapterOutputType4["APP_ROUTE"] = "APP_ROUTE";
339
+ AdapterOutputType4["PRERENDER"] = "PRERENDER";
340
+ AdapterOutputType4["STATIC_FILE"] = "STATIC_FILE";
341
+ AdapterOutputType4["MIDDLEWARE"] = "MIDDLEWARE";
342
+ return AdapterOutputType4;
337
343
  })({});
338
344
  var PHASE_EXPORT = "phase-export";
339
345
  var PHASE_ANALYZE = "phase-analyze";
@@ -399,6 +405,8 @@ var require_constants = __commonJS({
399
405
  var CLIENT_STATIC_FILES_RUNTIME_WEBPACK = `webpack`;
400
406
  var CLIENT_STATIC_FILES_RUNTIME_POLYFILLS = "polyfills";
401
407
  var CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL = Symbol(CLIENT_STATIC_FILES_RUNTIME_POLYFILLS);
408
+ var CLIENT_STATIC_FILES_RUNTIME_EXTERNAL_BROWSER_RUNTIME = "external-browser-runtime";
409
+ var CLIENT_STATIC_FILES_RUNTIME_EXTERNAL_BROWSER_RUNTIME_SYMBOL = Symbol(CLIENT_STATIC_FILES_RUNTIME_EXTERNAL_BROWSER_RUNTIME);
402
410
  var DEFAULT_RUNTIME_WEBPACK = "webpack-runtime";
403
411
  var EDGE_RUNTIME_WEBPACK = "edge-runtime-webpack";
404
412
  var STATIC_PROPS_ID = "__N_SSG";
@@ -455,9 +463,9 @@ var require_constants = __commonJS({
455
463
  }
456
464
  });
457
465
 
458
- // ../../node_modules/.pnpm/next@16.4.0-canary.38_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/constants.js
466
+ // ../../node_modules/.pnpm/next@16.5.0-canary.40_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/constants.js
459
467
  var require_constants2 = __commonJS({
460
- "../../node_modules/.pnpm/next@16.4.0-canary.38_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/constants.js"(exports2, module2) {
468
+ "../../node_modules/.pnpm/next@16.5.0-canary.40_@types+node@20.6.5_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/constants.js"(exports2, module2) {
461
469
  module2.exports = require_constants();
462
470
  }
463
471
  });
@@ -682,54 +690,54 @@ var require_polyfills = __commonJS({
682
690
  }
683
691
  var chdir;
684
692
  module2.exports = patch;
685
- function patch(fs4) {
693
+ function patch(fs5) {
686
694
  if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
687
- patchLchmod(fs4);
688
- }
689
- if (!fs4.lutimes) {
690
- patchLutimes(fs4);
691
- }
692
- fs4.chown = chownFix(fs4.chown);
693
- fs4.fchown = chownFix(fs4.fchown);
694
- fs4.lchown = chownFix(fs4.lchown);
695
- fs4.chmod = chmodFix(fs4.chmod);
696
- fs4.fchmod = chmodFix(fs4.fchmod);
697
- fs4.lchmod = chmodFix(fs4.lchmod);
698
- fs4.chownSync = chownFixSync(fs4.chownSync);
699
- fs4.fchownSync = chownFixSync(fs4.fchownSync);
700
- fs4.lchownSync = chownFixSync(fs4.lchownSync);
701
- fs4.chmodSync = chmodFixSync(fs4.chmodSync);
702
- fs4.fchmodSync = chmodFixSync(fs4.fchmodSync);
703
- fs4.lchmodSync = chmodFixSync(fs4.lchmodSync);
704
- fs4.stat = statFix(fs4.stat);
705
- fs4.fstat = statFix(fs4.fstat);
706
- fs4.lstat = statFix(fs4.lstat);
707
- fs4.statSync = statFixSync(fs4.statSync);
708
- fs4.fstatSync = statFixSync(fs4.fstatSync);
709
- fs4.lstatSync = statFixSync(fs4.lstatSync);
710
- if (fs4.chmod && !fs4.lchmod) {
711
- fs4.lchmod = function(path3, mode, cb) {
695
+ patchLchmod(fs5);
696
+ }
697
+ if (!fs5.lutimes) {
698
+ patchLutimes(fs5);
699
+ }
700
+ fs5.chown = chownFix(fs5.chown);
701
+ fs5.fchown = chownFix(fs5.fchown);
702
+ fs5.lchown = chownFix(fs5.lchown);
703
+ fs5.chmod = chmodFix(fs5.chmod);
704
+ fs5.fchmod = chmodFix(fs5.fchmod);
705
+ fs5.lchmod = chmodFix(fs5.lchmod);
706
+ fs5.chownSync = chownFixSync(fs5.chownSync);
707
+ fs5.fchownSync = chownFixSync(fs5.fchownSync);
708
+ fs5.lchownSync = chownFixSync(fs5.lchownSync);
709
+ fs5.chmodSync = chmodFixSync(fs5.chmodSync);
710
+ fs5.fchmodSync = chmodFixSync(fs5.fchmodSync);
711
+ fs5.lchmodSync = chmodFixSync(fs5.lchmodSync);
712
+ fs5.stat = statFix(fs5.stat);
713
+ fs5.fstat = statFix(fs5.fstat);
714
+ fs5.lstat = statFix(fs5.lstat);
715
+ fs5.statSync = statFixSync(fs5.statSync);
716
+ fs5.fstatSync = statFixSync(fs5.fstatSync);
717
+ fs5.lstatSync = statFixSync(fs5.lstatSync);
718
+ if (fs5.chmod && !fs5.lchmod) {
719
+ fs5.lchmod = function(path4, mode, cb) {
712
720
  if (cb) process.nextTick(cb);
713
721
  };
714
- fs4.lchmodSync = function() {
722
+ fs5.lchmodSync = function() {
715
723
  };
716
724
  }
717
- if (fs4.chown && !fs4.lchown) {
718
- fs4.lchown = function(path3, uid, gid, cb) {
725
+ if (fs5.chown && !fs5.lchown) {
726
+ fs5.lchown = function(path4, uid, gid, cb) {
719
727
  if (cb) process.nextTick(cb);
720
728
  };
721
- fs4.lchownSync = function() {
729
+ fs5.lchownSync = function() {
722
730
  };
723
731
  }
724
732
  if (platform === "win32") {
725
- fs4.rename = typeof fs4.rename !== "function" ? fs4.rename : (function(fs$rename) {
733
+ fs5.rename = typeof fs5.rename !== "function" ? fs5.rename : (function(fs$rename) {
726
734
  function rename(from, to, cb) {
727
735
  var start = Date.now();
728
736
  var backoff = 0;
729
737
  fs$rename(from, to, function CB(er) {
730
738
  if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
731
739
  setTimeout(function() {
732
- fs4.stat(to, function(stater, st) {
740
+ fs5.stat(to, function(stater, st) {
733
741
  if (stater && stater.code === "ENOENT")
734
742
  fs$rename(from, to, CB);
735
743
  else
@@ -745,9 +753,9 @@ var require_polyfills = __commonJS({
745
753
  }
746
754
  if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
747
755
  return rename;
748
- })(fs4.rename);
756
+ })(fs5.rename);
749
757
  }
750
- fs4.read = typeof fs4.read !== "function" ? fs4.read : (function(fs$read) {
758
+ fs5.read = typeof fs5.read !== "function" ? fs5.read : (function(fs$read) {
751
759
  function read(fd, buffer, offset, length, position, callback_) {
752
760
  var callback;
753
761
  if (callback_ && typeof callback_ === "function") {
@@ -755,22 +763,22 @@ var require_polyfills = __commonJS({
755
763
  callback = function(er, _, __) {
756
764
  if (er && er.code === "EAGAIN" && eagCounter < 10) {
757
765
  eagCounter++;
758
- return fs$read.call(fs4, fd, buffer, offset, length, position, callback);
766
+ return fs$read.call(fs5, fd, buffer, offset, length, position, callback);
759
767
  }
760
768
  callback_.apply(this, arguments);
761
769
  };
762
770
  }
763
- return fs$read.call(fs4, fd, buffer, offset, length, position, callback);
771
+ return fs$read.call(fs5, fd, buffer, offset, length, position, callback);
764
772
  }
765
773
  if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
766
774
  return read;
767
- })(fs4.read);
768
- fs4.readSync = typeof fs4.readSync !== "function" ? fs4.readSync : /* @__PURE__ */ (function(fs$readSync) {
775
+ })(fs5.read);
776
+ fs5.readSync = typeof fs5.readSync !== "function" ? fs5.readSync : /* @__PURE__ */ (function(fs$readSync) {
769
777
  return function(fd, buffer, offset, length, position) {
770
778
  var eagCounter = 0;
771
779
  while (true) {
772
780
  try {
773
- return fs$readSync.call(fs4, fd, buffer, offset, length, position);
781
+ return fs$readSync.call(fs5, fd, buffer, offset, length, position);
774
782
  } catch (er) {
775
783
  if (er.code === "EAGAIN" && eagCounter < 10) {
776
784
  eagCounter++;
@@ -780,11 +788,11 @@ var require_polyfills = __commonJS({
780
788
  }
781
789
  }
782
790
  };
783
- })(fs4.readSync);
784
- function patchLchmod(fs5) {
785
- fs5.lchmod = function(path3, mode, callback) {
786
- fs5.open(
787
- path3,
791
+ })(fs5.readSync);
792
+ function patchLchmod(fs6) {
793
+ fs6.lchmod = function(path4, mode, callback) {
794
+ fs6.open(
795
+ path4,
788
796
  constants.O_WRONLY | constants.O_SYMLINK,
789
797
  mode,
790
798
  function(err, fd) {
@@ -792,80 +800,80 @@ var require_polyfills = __commonJS({
792
800
  if (callback) callback(err);
793
801
  return;
794
802
  }
795
- fs5.fchmod(fd, mode, function(err2) {
796
- fs5.close(fd, function(err22) {
803
+ fs6.fchmod(fd, mode, function(err2) {
804
+ fs6.close(fd, function(err22) {
797
805
  if (callback) callback(err2 || err22);
798
806
  });
799
807
  });
800
808
  }
801
809
  );
802
810
  };
803
- fs5.lchmodSync = function(path3, mode) {
804
- var fd = fs5.openSync(path3, constants.O_WRONLY | constants.O_SYMLINK, mode);
811
+ fs6.lchmodSync = function(path4, mode) {
812
+ var fd = fs6.openSync(path4, constants.O_WRONLY | constants.O_SYMLINK, mode);
805
813
  var threw = true;
806
814
  var ret;
807
815
  try {
808
- ret = fs5.fchmodSync(fd, mode);
816
+ ret = fs6.fchmodSync(fd, mode);
809
817
  threw = false;
810
818
  } finally {
811
819
  if (threw) {
812
820
  try {
813
- fs5.closeSync(fd);
821
+ fs6.closeSync(fd);
814
822
  } catch (er) {
815
823
  }
816
824
  } else {
817
- fs5.closeSync(fd);
825
+ fs6.closeSync(fd);
818
826
  }
819
827
  }
820
828
  return ret;
821
829
  };
822
830
  }
823
- function patchLutimes(fs5) {
824
- if (constants.hasOwnProperty("O_SYMLINK") && fs5.futimes) {
825
- fs5.lutimes = function(path3, at, mt, cb) {
826
- fs5.open(path3, constants.O_SYMLINK, function(er, fd) {
831
+ function patchLutimes(fs6) {
832
+ if (constants.hasOwnProperty("O_SYMLINK") && fs6.futimes) {
833
+ fs6.lutimes = function(path4, at, mt, cb) {
834
+ fs6.open(path4, constants.O_SYMLINK, function(er, fd) {
827
835
  if (er) {
828
836
  if (cb) cb(er);
829
837
  return;
830
838
  }
831
- fs5.futimes(fd, at, mt, function(er2) {
832
- fs5.close(fd, function(er22) {
839
+ fs6.futimes(fd, at, mt, function(er2) {
840
+ fs6.close(fd, function(er22) {
833
841
  if (cb) cb(er2 || er22);
834
842
  });
835
843
  });
836
844
  });
837
845
  };
838
- fs5.lutimesSync = function(path3, at, mt) {
839
- var fd = fs5.openSync(path3, constants.O_SYMLINK);
846
+ fs6.lutimesSync = function(path4, at, mt) {
847
+ var fd = fs6.openSync(path4, constants.O_SYMLINK);
840
848
  var ret;
841
849
  var threw = true;
842
850
  try {
843
- ret = fs5.futimesSync(fd, at, mt);
851
+ ret = fs6.futimesSync(fd, at, mt);
844
852
  threw = false;
845
853
  } finally {
846
854
  if (threw) {
847
855
  try {
848
- fs5.closeSync(fd);
856
+ fs6.closeSync(fd);
849
857
  } catch (er) {
850
858
  }
851
859
  } else {
852
- fs5.closeSync(fd);
860
+ fs6.closeSync(fd);
853
861
  }
854
862
  }
855
863
  return ret;
856
864
  };
857
- } else if (fs5.futimes) {
858
- fs5.lutimes = function(_a, _b, _c, cb) {
865
+ } else if (fs6.futimes) {
866
+ fs6.lutimes = function(_a, _b, _c, cb) {
859
867
  if (cb) process.nextTick(cb);
860
868
  };
861
- fs5.lutimesSync = function() {
869
+ fs6.lutimesSync = function() {
862
870
  };
863
871
  }
864
872
  }
865
873
  function chmodFix(orig) {
866
874
  if (!orig) return orig;
867
875
  return function(target, mode, cb) {
868
- return orig.call(fs4, target, mode, function(er) {
876
+ return orig.call(fs5, target, mode, function(er) {
869
877
  if (chownErOk(er)) er = null;
870
878
  if (cb) cb.apply(this, arguments);
871
879
  });
@@ -875,7 +883,7 @@ var require_polyfills = __commonJS({
875
883
  if (!orig) return orig;
876
884
  return function(target, mode) {
877
885
  try {
878
- return orig.call(fs4, target, mode);
886
+ return orig.call(fs5, target, mode);
879
887
  } catch (er) {
880
888
  if (!chownErOk(er)) throw er;
881
889
  }
@@ -884,7 +892,7 @@ var require_polyfills = __commonJS({
884
892
  function chownFix(orig) {
885
893
  if (!orig) return orig;
886
894
  return function(target, uid, gid, cb) {
887
- return orig.call(fs4, target, uid, gid, function(er) {
895
+ return orig.call(fs5, target, uid, gid, function(er) {
888
896
  if (chownErOk(er)) er = null;
889
897
  if (cb) cb.apply(this, arguments);
890
898
  });
@@ -894,7 +902,7 @@ var require_polyfills = __commonJS({
894
902
  if (!orig) return orig;
895
903
  return function(target, uid, gid) {
896
904
  try {
897
- return orig.call(fs4, target, uid, gid);
905
+ return orig.call(fs5, target, uid, gid);
898
906
  } catch (er) {
899
907
  if (!chownErOk(er)) throw er;
900
908
  }
@@ -914,13 +922,13 @@ var require_polyfills = __commonJS({
914
922
  }
915
923
  if (cb) cb.apply(this, arguments);
916
924
  }
917
- return options ? orig.call(fs4, target, options, callback) : orig.call(fs4, target, callback);
925
+ return options ? orig.call(fs5, target, options, callback) : orig.call(fs5, target, callback);
918
926
  };
919
927
  }
920
928
  function statFixSync(orig) {
921
929
  if (!orig) return orig;
922
930
  return function(target, options) {
923
- var stats = options ? orig.call(fs4, target, options) : orig.call(fs4, target);
931
+ var stats = options ? orig.call(fs5, target, options) : orig.call(fs5, target);
924
932
  if (stats) {
925
933
  if (stats.uid < 0) stats.uid += 4294967296;
926
934
  if (stats.gid < 0) stats.gid += 4294967296;
@@ -949,16 +957,16 @@ var require_legacy_streams = __commonJS({
949
957
  "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
950
958
  var Stream = require("stream").Stream;
951
959
  module2.exports = legacy;
952
- function legacy(fs4) {
960
+ function legacy(fs5) {
953
961
  return {
954
962
  ReadStream,
955
963
  WriteStream
956
964
  };
957
- function ReadStream(path3, options) {
958
- if (!(this instanceof ReadStream)) return new ReadStream(path3, options);
965
+ function ReadStream(path4, options) {
966
+ if (!(this instanceof ReadStream)) return new ReadStream(path4, options);
959
967
  Stream.call(this);
960
968
  var self = this;
961
- this.path = path3;
969
+ this.path = path4;
962
970
  this.fd = null;
963
971
  this.readable = true;
964
972
  this.paused = false;
@@ -992,7 +1000,7 @@ var require_legacy_streams = __commonJS({
992
1000
  });
993
1001
  return;
994
1002
  }
995
- fs4.open(this.path, this.flags, this.mode, function(err, fd) {
1003
+ fs5.open(this.path, this.flags, this.mode, function(err, fd) {
996
1004
  if (err) {
997
1005
  self.emit("error", err);
998
1006
  self.readable = false;
@@ -1003,10 +1011,10 @@ var require_legacy_streams = __commonJS({
1003
1011
  self._read();
1004
1012
  });
1005
1013
  }
1006
- function WriteStream(path3, options) {
1007
- if (!(this instanceof WriteStream)) return new WriteStream(path3, options);
1014
+ function WriteStream(path4, options) {
1015
+ if (!(this instanceof WriteStream)) return new WriteStream(path4, options);
1008
1016
  Stream.call(this);
1009
- this.path = path3;
1017
+ this.path = path4;
1010
1018
  this.fd = null;
1011
1019
  this.writable = true;
1012
1020
  this.flags = "w";
@@ -1031,7 +1039,7 @@ var require_legacy_streams = __commonJS({
1031
1039
  this.busy = false;
1032
1040
  this._queue = [];
1033
1041
  if (this.fd === null) {
1034
- this._open = fs4.open;
1042
+ this._open = fs5.open;
1035
1043
  this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
1036
1044
  this.flush();
1037
1045
  }
@@ -1066,7 +1074,7 @@ var require_clone = __commonJS({
1066
1074
  // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
1067
1075
  var require_graceful_fs = __commonJS({
1068
1076
  "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
1069
- var fs4 = require("fs");
1077
+ var fs5 = require("fs");
1070
1078
  var polyfills = require_polyfills();
1071
1079
  var legacy = require_legacy_streams();
1072
1080
  var clone = require_clone();
@@ -1098,12 +1106,12 @@ var require_graceful_fs = __commonJS({
1098
1106
  m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
1099
1107
  console.error(m);
1100
1108
  };
1101
- if (!fs4[gracefulQueue]) {
1109
+ if (!fs5[gracefulQueue]) {
1102
1110
  queue = global[gracefulQueue] || [];
1103
- publishQueue(fs4, queue);
1104
- fs4.close = (function(fs$close) {
1111
+ publishQueue(fs5, queue);
1112
+ fs5.close = (function(fs$close) {
1105
1113
  function close(fd, cb) {
1106
- return fs$close.call(fs4, fd, function(err) {
1114
+ return fs$close.call(fs5, fd, function(err) {
1107
1115
  if (!err) {
1108
1116
  resetQueue();
1109
1117
  }
@@ -1115,48 +1123,48 @@ var require_graceful_fs = __commonJS({
1115
1123
  value: fs$close
1116
1124
  });
1117
1125
  return close;
1118
- })(fs4.close);
1119
- fs4.closeSync = (function(fs$closeSync) {
1126
+ })(fs5.close);
1127
+ fs5.closeSync = (function(fs$closeSync) {
1120
1128
  function closeSync(fd) {
1121
- fs$closeSync.apply(fs4, arguments);
1129
+ fs$closeSync.apply(fs5, arguments);
1122
1130
  resetQueue();
1123
1131
  }
1124
1132
  Object.defineProperty(closeSync, previousSymbol, {
1125
1133
  value: fs$closeSync
1126
1134
  });
1127
1135
  return closeSync;
1128
- })(fs4.closeSync);
1136
+ })(fs5.closeSync);
1129
1137
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
1130
1138
  process.on("exit", function() {
1131
- debug(fs4[gracefulQueue]);
1132
- require("assert").equal(fs4[gracefulQueue].length, 0);
1139
+ debug(fs5[gracefulQueue]);
1140
+ require("assert").equal(fs5[gracefulQueue].length, 0);
1133
1141
  });
1134
1142
  }
1135
1143
  }
1136
1144
  var queue;
1137
1145
  if (!global[gracefulQueue]) {
1138
- publishQueue(global, fs4[gracefulQueue]);
1139
- }
1140
- module2.exports = patch(clone(fs4));
1141
- if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs4.__patched) {
1142
- module2.exports = patch(fs4);
1143
- fs4.__patched = true;
1144
- }
1145
- function patch(fs5) {
1146
- polyfills(fs5);
1147
- fs5.gracefulify = patch;
1148
- fs5.createReadStream = createReadStream;
1149
- fs5.createWriteStream = createWriteStream;
1150
- var fs$readFile = fs5.readFile;
1151
- fs5.readFile = readFile2;
1152
- function readFile2(path3, options, cb) {
1146
+ publishQueue(global, fs5[gracefulQueue]);
1147
+ }
1148
+ module2.exports = patch(clone(fs5));
1149
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs5.__patched) {
1150
+ module2.exports = patch(fs5);
1151
+ fs5.__patched = true;
1152
+ }
1153
+ function patch(fs6) {
1154
+ polyfills(fs6);
1155
+ fs6.gracefulify = patch;
1156
+ fs6.createReadStream = createReadStream;
1157
+ fs6.createWriteStream = createWriteStream;
1158
+ var fs$readFile = fs6.readFile;
1159
+ fs6.readFile = readFile2;
1160
+ function readFile2(path4, options, cb) {
1153
1161
  if (typeof options === "function")
1154
1162
  cb = options, options = null;
1155
- return go$readFile(path3, options, cb);
1156
- function go$readFile(path4, options2, cb2, startTime) {
1157
- return fs$readFile(path4, options2, function(err) {
1163
+ return go$readFile(path4, options, cb);
1164
+ function go$readFile(path5, options2, cb2, startTime) {
1165
+ return fs$readFile(path5, options2, function(err) {
1158
1166
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
1159
- enqueue([go$readFile, [path4, options2, cb2], err, startTime || Date.now(), Date.now()]);
1167
+ enqueue([go$readFile, [path5, options2, cb2], err, startTime || Date.now(), Date.now()]);
1160
1168
  else {
1161
1169
  if (typeof cb2 === "function")
1162
1170
  cb2.apply(this, arguments);
@@ -1164,16 +1172,16 @@ var require_graceful_fs = __commonJS({
1164
1172
  });
1165
1173
  }
1166
1174
  }
1167
- var fs$writeFile = fs5.writeFile;
1168
- fs5.writeFile = writeFile;
1169
- function writeFile(path3, data, options, cb) {
1175
+ var fs$writeFile = fs6.writeFile;
1176
+ fs6.writeFile = writeFile;
1177
+ function writeFile(path4, data, options, cb) {
1170
1178
  if (typeof options === "function")
1171
1179
  cb = options, options = null;
1172
- return go$writeFile(path3, data, options, cb);
1173
- function go$writeFile(path4, data2, options2, cb2, startTime) {
1174
- return fs$writeFile(path4, data2, options2, function(err) {
1180
+ return go$writeFile(path4, data, options, cb);
1181
+ function go$writeFile(path5, data2, options2, cb2, startTime) {
1182
+ return fs$writeFile(path5, data2, options2, function(err) {
1175
1183
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
1176
- enqueue([go$writeFile, [path4, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
1184
+ enqueue([go$writeFile, [path5, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
1177
1185
  else {
1178
1186
  if (typeof cb2 === "function")
1179
1187
  cb2.apply(this, arguments);
@@ -1181,17 +1189,17 @@ var require_graceful_fs = __commonJS({
1181
1189
  });
1182
1190
  }
1183
1191
  }
1184
- var fs$appendFile = fs5.appendFile;
1192
+ var fs$appendFile = fs6.appendFile;
1185
1193
  if (fs$appendFile)
1186
- fs5.appendFile = appendFile;
1187
- function appendFile(path3, data, options, cb) {
1194
+ fs6.appendFile = appendFile;
1195
+ function appendFile(path4, data, options, cb) {
1188
1196
  if (typeof options === "function")
1189
1197
  cb = options, options = null;
1190
- return go$appendFile(path3, data, options, cb);
1191
- function go$appendFile(path4, data2, options2, cb2, startTime) {
1192
- return fs$appendFile(path4, data2, options2, function(err) {
1198
+ return go$appendFile(path4, data, options, cb);
1199
+ function go$appendFile(path5, data2, options2, cb2, startTime) {
1200
+ return fs$appendFile(path5, data2, options2, function(err) {
1193
1201
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
1194
- enqueue([go$appendFile, [path4, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
1202
+ enqueue([go$appendFile, [path5, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
1195
1203
  else {
1196
1204
  if (typeof cb2 === "function")
1197
1205
  cb2.apply(this, arguments);
@@ -1199,9 +1207,9 @@ var require_graceful_fs = __commonJS({
1199
1207
  });
1200
1208
  }
1201
1209
  }
1202
- var fs$copyFile = fs5.copyFile;
1210
+ var fs$copyFile = fs6.copyFile;
1203
1211
  if (fs$copyFile)
1204
- fs5.copyFile = copyFile;
1212
+ fs6.copyFile = copyFile;
1205
1213
  function copyFile(src, dest, flags, cb) {
1206
1214
  if (typeof flags === "function") {
1207
1215
  cb = flags;
@@ -1219,34 +1227,34 @@ var require_graceful_fs = __commonJS({
1219
1227
  });
1220
1228
  }
1221
1229
  }
1222
- var fs$readdir = fs5.readdir;
1223
- fs5.readdir = readdir;
1230
+ var fs$readdir = fs6.readdir;
1231
+ fs6.readdir = readdir;
1224
1232
  var noReaddirOptionVersions = /^v[0-5]\./;
1225
- function readdir(path3, options, cb) {
1233
+ function readdir(path4, options, cb) {
1226
1234
  if (typeof options === "function")
1227
1235
  cb = options, options = null;
1228
- var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path4, options2, cb2, startTime) {
1229
- return fs$readdir(path4, fs$readdirCallback(
1230
- path4,
1236
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path5, options2, cb2, startTime) {
1237
+ return fs$readdir(path5, fs$readdirCallback(
1238
+ path5,
1231
1239
  options2,
1232
1240
  cb2,
1233
1241
  startTime
1234
1242
  ));
1235
- } : function go$readdir2(path4, options2, cb2, startTime) {
1236
- return fs$readdir(path4, options2, fs$readdirCallback(
1237
- path4,
1243
+ } : function go$readdir2(path5, options2, cb2, startTime) {
1244
+ return fs$readdir(path5, options2, fs$readdirCallback(
1245
+ path5,
1238
1246
  options2,
1239
1247
  cb2,
1240
1248
  startTime
1241
1249
  ));
1242
1250
  };
1243
- return go$readdir(path3, options, cb);
1244
- function fs$readdirCallback(path4, options2, cb2, startTime) {
1251
+ return go$readdir(path4, options, cb);
1252
+ function fs$readdirCallback(path5, options2, cb2, startTime) {
1245
1253
  return function(err, files) {
1246
1254
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
1247
1255
  enqueue([
1248
1256
  go$readdir,
1249
- [path4, options2, cb2],
1257
+ [path5, options2, cb2],
1250
1258
  err,
1251
1259
  startTime || Date.now(),
1252
1260
  Date.now()
@@ -1261,21 +1269,21 @@ var require_graceful_fs = __commonJS({
1261
1269
  }
1262
1270
  }
1263
1271
  if (process.version.substr(0, 4) === "v0.8") {
1264
- var legStreams = legacy(fs5);
1272
+ var legStreams = legacy(fs6);
1265
1273
  ReadStream = legStreams.ReadStream;
1266
1274
  WriteStream = legStreams.WriteStream;
1267
1275
  }
1268
- var fs$ReadStream = fs5.ReadStream;
1276
+ var fs$ReadStream = fs6.ReadStream;
1269
1277
  if (fs$ReadStream) {
1270
1278
  ReadStream.prototype = Object.create(fs$ReadStream.prototype);
1271
1279
  ReadStream.prototype.open = ReadStream$open;
1272
1280
  }
1273
- var fs$WriteStream = fs5.WriteStream;
1281
+ var fs$WriteStream = fs6.WriteStream;
1274
1282
  if (fs$WriteStream) {
1275
1283
  WriteStream.prototype = Object.create(fs$WriteStream.prototype);
1276
1284
  WriteStream.prototype.open = WriteStream$open;
1277
1285
  }
1278
- Object.defineProperty(fs5, "ReadStream", {
1286
+ Object.defineProperty(fs6, "ReadStream", {
1279
1287
  get: function() {
1280
1288
  return ReadStream;
1281
1289
  },
@@ -1285,7 +1293,7 @@ var require_graceful_fs = __commonJS({
1285
1293
  enumerable: true,
1286
1294
  configurable: true
1287
1295
  });
1288
- Object.defineProperty(fs5, "WriteStream", {
1296
+ Object.defineProperty(fs6, "WriteStream", {
1289
1297
  get: function() {
1290
1298
  return WriteStream;
1291
1299
  },
@@ -1296,7 +1304,7 @@ var require_graceful_fs = __commonJS({
1296
1304
  configurable: true
1297
1305
  });
1298
1306
  var FileReadStream = ReadStream;
1299
- Object.defineProperty(fs5, "FileReadStream", {
1307
+ Object.defineProperty(fs6, "FileReadStream", {
1300
1308
  get: function() {
1301
1309
  return FileReadStream;
1302
1310
  },
@@ -1307,7 +1315,7 @@ var require_graceful_fs = __commonJS({
1307
1315
  configurable: true
1308
1316
  });
1309
1317
  var FileWriteStream = WriteStream;
1310
- Object.defineProperty(fs5, "FileWriteStream", {
1318
+ Object.defineProperty(fs6, "FileWriteStream", {
1311
1319
  get: function() {
1312
1320
  return FileWriteStream;
1313
1321
  },
@@ -1317,7 +1325,7 @@ var require_graceful_fs = __commonJS({
1317
1325
  enumerable: true,
1318
1326
  configurable: true
1319
1327
  });
1320
- function ReadStream(path3, options) {
1328
+ function ReadStream(path4, options) {
1321
1329
  if (this instanceof ReadStream)
1322
1330
  return fs$ReadStream.apply(this, arguments), this;
1323
1331
  else
@@ -1337,7 +1345,7 @@ var require_graceful_fs = __commonJS({
1337
1345
  }
1338
1346
  });
1339
1347
  }
1340
- function WriteStream(path3, options) {
1348
+ function WriteStream(path4, options) {
1341
1349
  if (this instanceof WriteStream)
1342
1350
  return fs$WriteStream.apply(this, arguments), this;
1343
1351
  else
@@ -1355,22 +1363,22 @@ var require_graceful_fs = __commonJS({
1355
1363
  }
1356
1364
  });
1357
1365
  }
1358
- function createReadStream(path3, options) {
1359
- return new fs5.ReadStream(path3, options);
1366
+ function createReadStream(path4, options) {
1367
+ return new fs6.ReadStream(path4, options);
1360
1368
  }
1361
- function createWriteStream(path3, options) {
1362
- return new fs5.WriteStream(path3, options);
1369
+ function createWriteStream(path4, options) {
1370
+ return new fs6.WriteStream(path4, options);
1363
1371
  }
1364
- var fs$open = fs5.open;
1365
- fs5.open = open;
1366
- function open(path3, flags, mode, cb) {
1372
+ var fs$open = fs6.open;
1373
+ fs6.open = open;
1374
+ function open(path4, flags, mode, cb) {
1367
1375
  if (typeof mode === "function")
1368
1376
  cb = mode, mode = null;
1369
- return go$open(path3, flags, mode, cb);
1370
- function go$open(path4, flags2, mode2, cb2, startTime) {
1371
- return fs$open(path4, flags2, mode2, function(err, fd) {
1377
+ return go$open(path4, flags, mode, cb);
1378
+ function go$open(path5, flags2, mode2, cb2, startTime) {
1379
+ return fs$open(path5, flags2, mode2, function(err, fd) {
1372
1380
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
1373
- enqueue([go$open, [path4, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
1381
+ enqueue([go$open, [path5, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
1374
1382
  else {
1375
1383
  if (typeof cb2 === "function")
1376
1384
  cb2.apply(this, arguments);
@@ -1378,20 +1386,20 @@ var require_graceful_fs = __commonJS({
1378
1386
  });
1379
1387
  }
1380
1388
  }
1381
- return fs5;
1389
+ return fs6;
1382
1390
  }
1383
1391
  function enqueue(elem) {
1384
1392
  debug("ENQUEUE", elem[0].name, elem[1]);
1385
- fs4[gracefulQueue].push(elem);
1393
+ fs5[gracefulQueue].push(elem);
1386
1394
  retry();
1387
1395
  }
1388
1396
  var retryTimer;
1389
1397
  function resetQueue() {
1390
1398
  var now = Date.now();
1391
- for (var i = 0; i < fs4[gracefulQueue].length; ++i) {
1392
- if (fs4[gracefulQueue][i].length > 2) {
1393
- fs4[gracefulQueue][i][3] = now;
1394
- fs4[gracefulQueue][i][4] = now;
1399
+ for (var i = 0; i < fs5[gracefulQueue].length; ++i) {
1400
+ if (fs5[gracefulQueue][i].length > 2) {
1401
+ fs5[gracefulQueue][i][3] = now;
1402
+ fs5[gracefulQueue][i][4] = now;
1395
1403
  }
1396
1404
  }
1397
1405
  retry();
@@ -1399,9 +1407,9 @@ var require_graceful_fs = __commonJS({
1399
1407
  function retry() {
1400
1408
  clearTimeout(retryTimer);
1401
1409
  retryTimer = void 0;
1402
- if (fs4[gracefulQueue].length === 0)
1410
+ if (fs5[gracefulQueue].length === 0)
1403
1411
  return;
1404
- var elem = fs4[gracefulQueue].shift();
1412
+ var elem = fs5[gracefulQueue].shift();
1405
1413
  var fn = elem[0];
1406
1414
  var args = elem[1];
1407
1415
  var err = elem[2];
@@ -1423,7 +1431,7 @@ var require_graceful_fs = __commonJS({
1423
1431
  debug("RETRY", fn.name, args);
1424
1432
  fn.apply(null, args.concat([startTime]));
1425
1433
  } else {
1426
- fs4[gracefulQueue].push(elem);
1434
+ fs5[gracefulQueue].push(elem);
1427
1435
  }
1428
1436
  }
1429
1437
  if (retryTimer === void 0) {
@@ -1438,7 +1446,7 @@ var require_fs = __commonJS({
1438
1446
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/fs/index.js"(exports2) {
1439
1447
  "use strict";
1440
1448
  var u = require_universalify().fromCallback;
1441
- var fs4 = require_graceful_fs();
1449
+ var fs5 = require_graceful_fs();
1442
1450
  var api = [
1443
1451
  "access",
1444
1452
  "appendFile",
@@ -1475,26 +1483,26 @@ var require_fs = __commonJS({
1475
1483
  "utimes",
1476
1484
  "writeFile"
1477
1485
  ].filter((key) => {
1478
- return typeof fs4[key] === "function";
1486
+ return typeof fs5[key] === "function";
1479
1487
  });
1480
- Object.assign(exports2, fs4);
1488
+ Object.assign(exports2, fs5);
1481
1489
  api.forEach((method) => {
1482
- exports2[method] = u(fs4[method]);
1490
+ exports2[method] = u(fs5[method]);
1483
1491
  });
1484
1492
  exports2.exists = function(filename, callback) {
1485
1493
  if (typeof callback === "function") {
1486
- return fs4.exists(filename, callback);
1494
+ return fs5.exists(filename, callback);
1487
1495
  }
1488
1496
  return new Promise((resolve) => {
1489
- return fs4.exists(filename, resolve);
1497
+ return fs5.exists(filename, resolve);
1490
1498
  });
1491
1499
  };
1492
1500
  exports2.read = function(fd, buffer, offset, length, position, callback) {
1493
1501
  if (typeof callback === "function") {
1494
- return fs4.read(fd, buffer, offset, length, position, callback);
1502
+ return fs5.read(fd, buffer, offset, length, position, callback);
1495
1503
  }
1496
1504
  return new Promise((resolve, reject) => {
1497
- fs4.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
1505
+ fs5.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
1498
1506
  if (err) return reject(err);
1499
1507
  resolve({ bytesRead, buffer: buffer2 });
1500
1508
  });
@@ -1502,10 +1510,10 @@ var require_fs = __commonJS({
1502
1510
  };
1503
1511
  exports2.write = function(fd, buffer, ...args) {
1504
1512
  if (typeof args[args.length - 1] === "function") {
1505
- return fs4.write(fd, buffer, ...args);
1513
+ return fs5.write(fd, buffer, ...args);
1506
1514
  }
1507
1515
  return new Promise((resolve, reject) => {
1508
- fs4.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
1516
+ fs5.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
1509
1517
  if (err) return reject(err);
1510
1518
  resolve({ bytesWritten, buffer: buffer2 });
1511
1519
  });
@@ -1513,10 +1521,10 @@ var require_fs = __commonJS({
1513
1521
  };
1514
1522
  exports2.readv = function(fd, buffers, ...args) {
1515
1523
  if (typeof args[args.length - 1] === "function") {
1516
- return fs4.readv(fd, buffers, ...args);
1524
+ return fs5.readv(fd, buffers, ...args);
1517
1525
  }
1518
1526
  return new Promise((resolve, reject) => {
1519
- fs4.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
1527
+ fs5.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
1520
1528
  if (err) return reject(err);
1521
1529
  resolve({ bytesRead, buffers: buffers2 });
1522
1530
  });
@@ -1524,17 +1532,17 @@ var require_fs = __commonJS({
1524
1532
  };
1525
1533
  exports2.writev = function(fd, buffers, ...args) {
1526
1534
  if (typeof args[args.length - 1] === "function") {
1527
- return fs4.writev(fd, buffers, ...args);
1535
+ return fs5.writev(fd, buffers, ...args);
1528
1536
  }
1529
1537
  return new Promise((resolve, reject) => {
1530
- fs4.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
1538
+ fs5.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
1531
1539
  if (err) return reject(err);
1532
1540
  resolve({ bytesWritten, buffers: buffers2 });
1533
1541
  });
1534
1542
  });
1535
1543
  };
1536
- if (typeof fs4.realpath.native === "function") {
1537
- exports2.realpath.native = u(fs4.realpath.native);
1544
+ if (typeof fs5.realpath.native === "function") {
1545
+ exports2.realpath.native = u(fs5.realpath.native);
1538
1546
  } else {
1539
1547
  process.emitWarning(
1540
1548
  "fs.realpath.native is not a function. Is fs being monkey-patched?",
@@ -1549,10 +1557,10 @@ var require_fs = __commonJS({
1549
1557
  var require_utils = __commonJS({
1550
1558
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/utils.js"(exports2, module2) {
1551
1559
  "use strict";
1552
- var path3 = require("path");
1560
+ var path4 = require("path");
1553
1561
  module2.exports.checkPath = function checkPath(pth) {
1554
1562
  if (process.platform === "win32") {
1555
- const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path3.parse(pth).root, ""));
1563
+ const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path4.parse(pth).root, ""));
1556
1564
  if (pathHasInvalidWinCharacters) {
1557
1565
  const error = new Error(`Path contains invalid characters: ${pth}`);
1558
1566
  error.code = "EINVAL";
@@ -1567,7 +1575,7 @@ var require_utils = __commonJS({
1567
1575
  var require_make_dir = __commonJS({
1568
1576
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports2, module2) {
1569
1577
  "use strict";
1570
- var fs4 = require_fs();
1578
+ var fs5 = require_fs();
1571
1579
  var { checkPath } = require_utils();
1572
1580
  var getMode = (options) => {
1573
1581
  const defaults = { mode: 511 };
@@ -1576,14 +1584,14 @@ var require_make_dir = __commonJS({
1576
1584
  };
1577
1585
  module2.exports.makeDir = async (dir, options) => {
1578
1586
  checkPath(dir);
1579
- return fs4.mkdir(dir, {
1587
+ return fs5.mkdir(dir, {
1580
1588
  mode: getMode(options),
1581
1589
  recursive: true
1582
1590
  });
1583
1591
  };
1584
1592
  module2.exports.makeDirSync = (dir, options) => {
1585
1593
  checkPath(dir);
1586
- return fs4.mkdirSync(dir, {
1594
+ return fs5.mkdirSync(dir, {
1587
1595
  mode: getMode(options),
1588
1596
  recursive: true
1589
1597
  });
@@ -1615,13 +1623,13 @@ var require_path_exists = __commonJS({
1615
1623
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/path-exists/index.js"(exports2, module2) {
1616
1624
  "use strict";
1617
1625
  var u = require_universalify().fromPromise;
1618
- var fs4 = require_fs();
1619
- function pathExists(path3) {
1620
- return fs4.access(path3).then(() => true).catch(() => false);
1626
+ var fs5 = require_fs();
1627
+ function pathExists(path4) {
1628
+ return fs5.access(path4).then(() => true).catch(() => false);
1621
1629
  }
1622
1630
  module2.exports = {
1623
1631
  pathExists: u(pathExists),
1624
- pathExistsSync: fs4.existsSync
1632
+ pathExistsSync: fs5.existsSync
1625
1633
  };
1626
1634
  }
1627
1635
  });
@@ -1630,16 +1638,16 @@ var require_path_exists = __commonJS({
1630
1638
  var require_utimes = __commonJS({
1631
1639
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/utimes.js"(exports2, module2) {
1632
1640
  "use strict";
1633
- var fs4 = require_fs();
1641
+ var fs5 = require_fs();
1634
1642
  var u = require_universalify().fromPromise;
1635
- async function utimesMillis(path3, atime, mtime) {
1636
- const fd = await fs4.open(path3, "r+");
1643
+ async function utimesMillis(path4, atime, mtime) {
1644
+ const fd = await fs5.open(path4, "r+");
1637
1645
  let closeErr = null;
1638
1646
  try {
1639
- await fs4.futimes(fd, atime, mtime);
1647
+ await fs5.futimes(fd, atime, mtime);
1640
1648
  } finally {
1641
1649
  try {
1642
- await fs4.close(fd);
1650
+ await fs5.close(fd);
1643
1651
  } catch (e) {
1644
1652
  closeErr = e;
1645
1653
  }
@@ -1648,10 +1656,10 @@ var require_utimes = __commonJS({
1648
1656
  throw closeErr;
1649
1657
  }
1650
1658
  }
1651
- function utimesMillisSync(path3, atime, mtime) {
1652
- const fd = fs4.openSync(path3, "r+");
1653
- fs4.futimesSync(fd, atime, mtime);
1654
- return fs4.closeSync(fd);
1659
+ function utimesMillisSync(path4, atime, mtime) {
1660
+ const fd = fs5.openSync(path4, "r+");
1661
+ fs5.futimesSync(fd, atime, mtime);
1662
+ return fs5.closeSync(fd);
1655
1663
  }
1656
1664
  module2.exports = {
1657
1665
  utimesMillis: u(utimesMillis),
@@ -1664,11 +1672,11 @@ var require_utimes = __commonJS({
1664
1672
  var require_stat = __commonJS({
1665
1673
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/stat.js"(exports2, module2) {
1666
1674
  "use strict";
1667
- var fs4 = require_fs();
1668
- var path3 = require("path");
1675
+ var fs5 = require_fs();
1676
+ var path4 = require("path");
1669
1677
  var u = require_universalify().fromPromise;
1670
1678
  function getStats(src, dest, opts) {
1671
- const statFunc = opts.dereference ? (file) => fs4.stat(file, { bigint: true }) : (file) => fs4.lstat(file, { bigint: true });
1679
+ const statFunc = opts.dereference ? (file) => fs5.stat(file, { bigint: true }) : (file) => fs5.lstat(file, { bigint: true });
1672
1680
  return Promise.all([
1673
1681
  statFunc(src),
1674
1682
  statFunc(dest).catch((err) => {
@@ -1679,7 +1687,7 @@ var require_stat = __commonJS({
1679
1687
  }
1680
1688
  function getStatsSync(src, dest, opts) {
1681
1689
  let destStat;
1682
- const statFunc = opts.dereference ? (file) => fs4.statSync(file, { bigint: true }) : (file) => fs4.lstatSync(file, { bigint: true });
1690
+ const statFunc = opts.dereference ? (file) => fs5.statSync(file, { bigint: true }) : (file) => fs5.lstatSync(file, { bigint: true });
1683
1691
  const srcStat = statFunc(src);
1684
1692
  try {
1685
1693
  destStat = statFunc(dest);
@@ -1693,8 +1701,8 @@ var require_stat = __commonJS({
1693
1701
  const { srcStat, destStat } = await getStats(src, dest, opts);
1694
1702
  if (destStat) {
1695
1703
  if (areIdentical(srcStat, destStat)) {
1696
- const srcBaseName = path3.basename(src);
1697
- const destBaseName = path3.basename(dest);
1704
+ const srcBaseName = path4.basename(src);
1705
+ const destBaseName = path4.basename(dest);
1698
1706
  if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
1699
1707
  return { srcStat, destStat, isChangingCase: true };
1700
1708
  }
@@ -1716,8 +1724,8 @@ var require_stat = __commonJS({
1716
1724
  const { srcStat, destStat } = getStatsSync(src, dest, opts);
1717
1725
  if (destStat) {
1718
1726
  if (areIdentical(srcStat, destStat)) {
1719
- const srcBaseName = path3.basename(src);
1720
- const destBaseName = path3.basename(dest);
1727
+ const srcBaseName = path4.basename(src);
1728
+ const destBaseName = path4.basename(dest);
1721
1729
  if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
1722
1730
  return { srcStat, destStat, isChangingCase: true };
1723
1731
  }
@@ -1736,12 +1744,12 @@ var require_stat = __commonJS({
1736
1744
  return { srcStat, destStat };
1737
1745
  }
1738
1746
  async function checkParentPaths(src, srcStat, dest, funcName) {
1739
- const srcParent = path3.resolve(path3.dirname(src));
1740
- const destParent = path3.resolve(path3.dirname(dest));
1741
- if (destParent === srcParent || destParent === path3.parse(destParent).root) return;
1747
+ const srcParent = path4.resolve(path4.dirname(src));
1748
+ const destParent = path4.resolve(path4.dirname(dest));
1749
+ if (destParent === srcParent || destParent === path4.parse(destParent).root) return;
1742
1750
  let destStat;
1743
1751
  try {
1744
- destStat = await fs4.stat(destParent, { bigint: true });
1752
+ destStat = await fs5.stat(destParent, { bigint: true });
1745
1753
  } catch (err) {
1746
1754
  if (err.code === "ENOENT") return;
1747
1755
  throw err;
@@ -1752,12 +1760,12 @@ var require_stat = __commonJS({
1752
1760
  return checkParentPaths(src, srcStat, destParent, funcName);
1753
1761
  }
1754
1762
  function checkParentPathsSync(src, srcStat, dest, funcName) {
1755
- const srcParent = path3.resolve(path3.dirname(src));
1756
- const destParent = path3.resolve(path3.dirname(dest));
1757
- if (destParent === srcParent || destParent === path3.parse(destParent).root) return;
1763
+ const srcParent = path4.resolve(path4.dirname(src));
1764
+ const destParent = path4.resolve(path4.dirname(dest));
1765
+ if (destParent === srcParent || destParent === path4.parse(destParent).root) return;
1758
1766
  let destStat;
1759
1767
  try {
1760
- destStat = fs4.statSync(destParent, { bigint: true });
1768
+ destStat = fs5.statSync(destParent, { bigint: true });
1761
1769
  } catch (err) {
1762
1770
  if (err.code === "ENOENT") return;
1763
1771
  throw err;
@@ -1771,8 +1779,8 @@ var require_stat = __commonJS({
1771
1779
  return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
1772
1780
  }
1773
1781
  function isSrcSubdir(src, dest) {
1774
- const srcArr = path3.resolve(src).split(path3.sep).filter((i) => i);
1775
- const destArr = path3.resolve(dest).split(path3.sep).filter((i) => i);
1782
+ const srcArr = path4.resolve(src).split(path4.sep).filter((i) => i);
1783
+ const destArr = path4.resolve(dest).split(path4.sep).filter((i) => i);
1776
1784
  return srcArr.every((cur, i) => destArr[i] === cur);
1777
1785
  }
1778
1786
  function errMsg(src, dest, funcName) {
@@ -1796,8 +1804,8 @@ var require_stat = __commonJS({
1796
1804
  var require_copy = __commonJS({
1797
1805
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy.js"(exports2, module2) {
1798
1806
  "use strict";
1799
- var fs4 = require_fs();
1800
- var path3 = require("path");
1807
+ var fs5 = require_fs();
1808
+ var path4 = require("path");
1801
1809
  var { mkdirs } = require_mkdirs();
1802
1810
  var { pathExists } = require_path_exists();
1803
1811
  var { utimesMillis } = require_utimes();
@@ -1819,7 +1827,7 @@ var require_copy = __commonJS({
1819
1827
  await stat.checkParentPaths(src, srcStat, dest, "copy");
1820
1828
  const include = await runFilter(src, dest, opts);
1821
1829
  if (!include) return;
1822
- const destParent = path3.dirname(dest);
1830
+ const destParent = path4.dirname(dest);
1823
1831
  const dirExists = await pathExists(destParent);
1824
1832
  if (!dirExists) {
1825
1833
  await mkdirs(destParent);
@@ -1831,7 +1839,7 @@ var require_copy = __commonJS({
1831
1839
  return opts.filter(src, dest);
1832
1840
  }
1833
1841
  async function getStatsAndPerformCopy(destStat, src, dest, opts) {
1834
- const statFn = opts.dereference ? fs4.stat : fs4.lstat;
1842
+ const statFn = opts.dereference ? fs5.stat : fs5.lstat;
1835
1843
  const srcStat = await statFn(src);
1836
1844
  if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
1837
1845
  if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
@@ -1843,7 +1851,7 @@ var require_copy = __commonJS({
1843
1851
  async function onFile(srcStat, destStat, src, dest, opts) {
1844
1852
  if (!destStat) return copyFile(srcStat, src, dest, opts);
1845
1853
  if (opts.overwrite) {
1846
- await fs4.unlink(dest);
1854
+ await fs5.unlink(dest);
1847
1855
  return copyFile(srcStat, src, dest, opts);
1848
1856
  }
1849
1857
  if (opts.errorOnExist) {
@@ -1851,56 +1859,56 @@ var require_copy = __commonJS({
1851
1859
  }
1852
1860
  }
1853
1861
  async function copyFile(srcStat, src, dest, opts) {
1854
- await fs4.copyFile(src, dest);
1862
+ await fs5.copyFile(src, dest);
1855
1863
  if (opts.preserveTimestamps) {
1856
1864
  if (fileIsNotWritable(srcStat.mode)) {
1857
1865
  await makeFileWritable(dest, srcStat.mode);
1858
1866
  }
1859
- const updatedSrcStat = await fs4.stat(src);
1867
+ const updatedSrcStat = await fs5.stat(src);
1860
1868
  await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
1861
1869
  }
1862
- return fs4.chmod(dest, srcStat.mode);
1870
+ return fs5.chmod(dest, srcStat.mode);
1863
1871
  }
1864
1872
  function fileIsNotWritable(srcMode) {
1865
1873
  return (srcMode & 128) === 0;
1866
1874
  }
1867
1875
  function makeFileWritable(dest, srcMode) {
1868
- return fs4.chmod(dest, srcMode | 128);
1876
+ return fs5.chmod(dest, srcMode | 128);
1869
1877
  }
1870
1878
  async function onDir(srcStat, destStat, src, dest, opts) {
1871
1879
  if (!destStat) {
1872
- await fs4.mkdir(dest);
1880
+ await fs5.mkdir(dest);
1873
1881
  }
1874
- const items = await fs4.readdir(src);
1882
+ const items = await fs5.readdir(src);
1875
1883
  await Promise.all(items.map(async (item) => {
1876
- const srcItem = path3.join(src, item);
1877
- const destItem = path3.join(dest, item);
1884
+ const srcItem = path4.join(src, item);
1885
+ const destItem = path4.join(dest, item);
1878
1886
  const include = await runFilter(srcItem, destItem, opts);
1879
1887
  if (!include) return;
1880
1888
  const { destStat: destStat2 } = await stat.checkPaths(srcItem, destItem, "copy", opts);
1881
1889
  return getStatsAndPerformCopy(destStat2, srcItem, destItem, opts);
1882
1890
  }));
1883
1891
  if (!destStat) {
1884
- await fs4.chmod(dest, srcStat.mode);
1892
+ await fs5.chmod(dest, srcStat.mode);
1885
1893
  }
1886
1894
  }
1887
1895
  async function onLink(destStat, src, dest, opts) {
1888
- let resolvedSrc = await fs4.readlink(src);
1896
+ let resolvedSrc = await fs5.readlink(src);
1889
1897
  if (opts.dereference) {
1890
- resolvedSrc = path3.resolve(process.cwd(), resolvedSrc);
1898
+ resolvedSrc = path4.resolve(process.cwd(), resolvedSrc);
1891
1899
  }
1892
1900
  if (!destStat) {
1893
- return fs4.symlink(resolvedSrc, dest);
1901
+ return fs5.symlink(resolvedSrc, dest);
1894
1902
  }
1895
1903
  let resolvedDest = null;
1896
1904
  try {
1897
- resolvedDest = await fs4.readlink(dest);
1905
+ resolvedDest = await fs5.readlink(dest);
1898
1906
  } catch (e) {
1899
- if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs4.symlink(resolvedSrc, dest);
1907
+ if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs5.symlink(resolvedSrc, dest);
1900
1908
  throw e;
1901
1909
  }
1902
1910
  if (opts.dereference) {
1903
- resolvedDest = path3.resolve(process.cwd(), resolvedDest);
1911
+ resolvedDest = path4.resolve(process.cwd(), resolvedDest);
1904
1912
  }
1905
1913
  if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
1906
1914
  throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
@@ -1908,8 +1916,8 @@ var require_copy = __commonJS({
1908
1916
  if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
1909
1917
  throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
1910
1918
  }
1911
- await fs4.unlink(dest);
1912
- return fs4.symlink(resolvedSrc, dest);
1919
+ await fs5.unlink(dest);
1920
+ return fs5.symlink(resolvedSrc, dest);
1913
1921
  }
1914
1922
  module2.exports = copy2;
1915
1923
  }
@@ -1919,8 +1927,8 @@ var require_copy = __commonJS({
1919
1927
  var require_copy_sync = __commonJS({
1920
1928
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy-sync.js"(exports2, module2) {
1921
1929
  "use strict";
1922
- var fs4 = require_graceful_fs();
1923
- var path3 = require("path");
1930
+ var fs5 = require_graceful_fs();
1931
+ var path4 = require("path");
1924
1932
  var mkdirsSync = require_mkdirs().mkdirsSync;
1925
1933
  var utimesMillisSync = require_utimes().utimesMillisSync;
1926
1934
  var stat = require_stat();
@@ -1941,12 +1949,12 @@ var require_copy_sync = __commonJS({
1941
1949
  const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
1942
1950
  stat.checkParentPathsSync(src, srcStat, dest, "copy");
1943
1951
  if (opts.filter && !opts.filter(src, dest)) return;
1944
- const destParent = path3.dirname(dest);
1945
- if (!fs4.existsSync(destParent)) mkdirsSync(destParent);
1952
+ const destParent = path4.dirname(dest);
1953
+ if (!fs5.existsSync(destParent)) mkdirsSync(destParent);
1946
1954
  return getStats(destStat, src, dest, opts);
1947
1955
  }
1948
1956
  function getStats(destStat, src, dest, opts) {
1949
- const statSync = opts.dereference ? fs4.statSync : fs4.lstatSync;
1957
+ const statSync = opts.dereference ? fs5.statSync : fs5.lstatSync;
1950
1958
  const srcStat = statSync(src);
1951
1959
  if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
1952
1960
  else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
@@ -1961,14 +1969,14 @@ var require_copy_sync = __commonJS({
1961
1969
  }
1962
1970
  function mayCopyFile(srcStat, src, dest, opts) {
1963
1971
  if (opts.overwrite) {
1964
- fs4.unlinkSync(dest);
1972
+ fs5.unlinkSync(dest);
1965
1973
  return copyFile(srcStat, src, dest, opts);
1966
1974
  } else if (opts.errorOnExist) {
1967
1975
  throw new Error(`'${dest}' already exists`);
1968
1976
  }
1969
1977
  }
1970
1978
  function copyFile(srcStat, src, dest, opts) {
1971
- fs4.copyFileSync(src, dest);
1979
+ fs5.copyFileSync(src, dest);
1972
1980
  if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest);
1973
1981
  return setDestMode(dest, srcStat.mode);
1974
1982
  }
@@ -1983,10 +1991,10 @@ var require_copy_sync = __commonJS({
1983
1991
  return setDestMode(dest, srcMode | 128);
1984
1992
  }
1985
1993
  function setDestMode(dest, srcMode) {
1986
- return fs4.chmodSync(dest, srcMode);
1994
+ return fs5.chmodSync(dest, srcMode);
1987
1995
  }
1988
1996
  function setDestTimestamps(src, dest) {
1989
- const updatedSrcStat = fs4.statSync(src);
1997
+ const updatedSrcStat = fs5.statSync(src);
1990
1998
  return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
1991
1999
  }
1992
2000
  function onDir(srcStat, destStat, src, dest, opts) {
@@ -1994,37 +2002,37 @@ var require_copy_sync = __commonJS({
1994
2002
  return copyDir(src, dest, opts);
1995
2003
  }
1996
2004
  function mkDirAndCopy(srcMode, src, dest, opts) {
1997
- fs4.mkdirSync(dest);
2005
+ fs5.mkdirSync(dest);
1998
2006
  copyDir(src, dest, opts);
1999
2007
  return setDestMode(dest, srcMode);
2000
2008
  }
2001
2009
  function copyDir(src, dest, opts) {
2002
- fs4.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
2010
+ fs5.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
2003
2011
  }
2004
2012
  function copyDirItem(item, src, dest, opts) {
2005
- const srcItem = path3.join(src, item);
2006
- const destItem = path3.join(dest, item);
2013
+ const srcItem = path4.join(src, item);
2014
+ const destItem = path4.join(dest, item);
2007
2015
  if (opts.filter && !opts.filter(srcItem, destItem)) return;
2008
2016
  const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
2009
2017
  return getStats(destStat, srcItem, destItem, opts);
2010
2018
  }
2011
2019
  function onLink(destStat, src, dest, opts) {
2012
- let resolvedSrc = fs4.readlinkSync(src);
2020
+ let resolvedSrc = fs5.readlinkSync(src);
2013
2021
  if (opts.dereference) {
2014
- resolvedSrc = path3.resolve(process.cwd(), resolvedSrc);
2022
+ resolvedSrc = path4.resolve(process.cwd(), resolvedSrc);
2015
2023
  }
2016
2024
  if (!destStat) {
2017
- return fs4.symlinkSync(resolvedSrc, dest);
2025
+ return fs5.symlinkSync(resolvedSrc, dest);
2018
2026
  } else {
2019
2027
  let resolvedDest;
2020
2028
  try {
2021
- resolvedDest = fs4.readlinkSync(dest);
2029
+ resolvedDest = fs5.readlinkSync(dest);
2022
2030
  } catch (err) {
2023
- if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs4.symlinkSync(resolvedSrc, dest);
2031
+ if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs5.symlinkSync(resolvedSrc, dest);
2024
2032
  throw err;
2025
2033
  }
2026
2034
  if (opts.dereference) {
2027
- resolvedDest = path3.resolve(process.cwd(), resolvedDest);
2035
+ resolvedDest = path4.resolve(process.cwd(), resolvedDest);
2028
2036
  }
2029
2037
  if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
2030
2038
  throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
@@ -2036,8 +2044,8 @@ var require_copy_sync = __commonJS({
2036
2044
  }
2037
2045
  }
2038
2046
  function copyLink(resolvedSrc, dest) {
2039
- fs4.unlinkSync(dest);
2040
- return fs4.symlinkSync(resolvedSrc, dest);
2047
+ fs5.unlinkSync(dest);
2048
+ return fs5.symlinkSync(resolvedSrc, dest);
2041
2049
  }
2042
2050
  module2.exports = copySync;
2043
2051
  }
@@ -2059,13 +2067,13 @@ var require_copy2 = __commonJS({
2059
2067
  var require_remove = __commonJS({
2060
2068
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/remove/index.js"(exports2, module2) {
2061
2069
  "use strict";
2062
- var fs4 = require_graceful_fs();
2070
+ var fs5 = require_graceful_fs();
2063
2071
  var u = require_universalify().fromCallback;
2064
- function remove(path3, callback) {
2065
- fs4.rm(path3, { recursive: true, force: true }, callback);
2072
+ function remove(path4, callback) {
2073
+ fs5.rm(path4, { recursive: true, force: true }, callback);
2066
2074
  }
2067
- function removeSync(path3) {
2068
- fs4.rmSync(path3, { recursive: true, force: true });
2075
+ function removeSync(path4) {
2076
+ fs5.rmSync(path4, { recursive: true, force: true });
2069
2077
  }
2070
2078
  module2.exports = {
2071
2079
  remove: u(remove),
@@ -2079,28 +2087,28 @@ var require_empty = __commonJS({
2079
2087
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/empty/index.js"(exports2, module2) {
2080
2088
  "use strict";
2081
2089
  var u = require_universalify().fromPromise;
2082
- var fs4 = require_fs();
2083
- var path3 = require("path");
2090
+ var fs5 = require_fs();
2091
+ var path4 = require("path");
2084
2092
  var mkdir = require_mkdirs();
2085
2093
  var remove = require_remove();
2086
2094
  var emptyDir = u(async function emptyDir2(dir) {
2087
2095
  let items;
2088
2096
  try {
2089
- items = await fs4.readdir(dir);
2097
+ items = await fs5.readdir(dir);
2090
2098
  } catch {
2091
2099
  return mkdir.mkdirs(dir);
2092
2100
  }
2093
- return Promise.all(items.map((item) => remove.remove(path3.join(dir, item))));
2101
+ return Promise.all(items.map((item) => remove.remove(path4.join(dir, item))));
2094
2102
  });
2095
2103
  function emptyDirSync(dir) {
2096
2104
  let items;
2097
2105
  try {
2098
- items = fs4.readdirSync(dir);
2106
+ items = fs5.readdirSync(dir);
2099
2107
  } catch {
2100
2108
  return mkdir.mkdirsSync(dir);
2101
2109
  }
2102
2110
  items.forEach((item) => {
2103
- item = path3.join(dir, item);
2111
+ item = path4.join(dir, item);
2104
2112
  remove.removeSync(item);
2105
2113
  });
2106
2114
  }
@@ -2118,52 +2126,52 @@ var require_file = __commonJS({
2118
2126
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/file.js"(exports2, module2) {
2119
2127
  "use strict";
2120
2128
  var u = require_universalify().fromPromise;
2121
- var path3 = require("path");
2122
- var fs4 = require_fs();
2129
+ var path4 = require("path");
2130
+ var fs5 = require_fs();
2123
2131
  var mkdir = require_mkdirs();
2124
2132
  async function createFile(file) {
2125
2133
  let stats;
2126
2134
  try {
2127
- stats = await fs4.stat(file);
2135
+ stats = await fs5.stat(file);
2128
2136
  } catch {
2129
2137
  }
2130
2138
  if (stats && stats.isFile()) return;
2131
- const dir = path3.dirname(file);
2139
+ const dir = path4.dirname(file);
2132
2140
  let dirStats = null;
2133
2141
  try {
2134
- dirStats = await fs4.stat(dir);
2142
+ dirStats = await fs5.stat(dir);
2135
2143
  } catch (err) {
2136
2144
  if (err.code === "ENOENT") {
2137
2145
  await mkdir.mkdirs(dir);
2138
- await fs4.writeFile(file, "");
2146
+ await fs5.writeFile(file, "");
2139
2147
  return;
2140
2148
  } else {
2141
2149
  throw err;
2142
2150
  }
2143
2151
  }
2144
2152
  if (dirStats.isDirectory()) {
2145
- await fs4.writeFile(file, "");
2153
+ await fs5.writeFile(file, "");
2146
2154
  } else {
2147
- await fs4.readdir(dir);
2155
+ await fs5.readdir(dir);
2148
2156
  }
2149
2157
  }
2150
2158
  function createFileSync(file) {
2151
2159
  let stats;
2152
2160
  try {
2153
- stats = fs4.statSync(file);
2161
+ stats = fs5.statSync(file);
2154
2162
  } catch {
2155
2163
  }
2156
2164
  if (stats && stats.isFile()) return;
2157
- const dir = path3.dirname(file);
2165
+ const dir = path4.dirname(file);
2158
2166
  try {
2159
- if (!fs4.statSync(dir).isDirectory()) {
2160
- fs4.readdirSync(dir);
2167
+ if (!fs5.statSync(dir).isDirectory()) {
2168
+ fs5.readdirSync(dir);
2161
2169
  }
2162
2170
  } catch (err) {
2163
2171
  if (err && err.code === "ENOENT") mkdir.mkdirsSync(dir);
2164
2172
  else throw err;
2165
2173
  }
2166
- fs4.writeFileSync(file, "");
2174
+ fs5.writeFileSync(file, "");
2167
2175
  }
2168
2176
  module2.exports = {
2169
2177
  createFile: u(createFile),
@@ -2177,50 +2185,50 @@ var require_link = __commonJS({
2177
2185
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/link.js"(exports2, module2) {
2178
2186
  "use strict";
2179
2187
  var u = require_universalify().fromPromise;
2180
- var path3 = require("path");
2181
- var fs4 = require_fs();
2188
+ var path4 = require("path");
2189
+ var fs5 = require_fs();
2182
2190
  var mkdir = require_mkdirs();
2183
2191
  var { pathExists } = require_path_exists();
2184
2192
  var { areIdentical } = require_stat();
2185
2193
  async function createLink(srcpath, dstpath) {
2186
2194
  let dstStat;
2187
2195
  try {
2188
- dstStat = await fs4.lstat(dstpath);
2196
+ dstStat = await fs5.lstat(dstpath);
2189
2197
  } catch {
2190
2198
  }
2191
2199
  let srcStat;
2192
2200
  try {
2193
- srcStat = await fs4.lstat(srcpath);
2201
+ srcStat = await fs5.lstat(srcpath);
2194
2202
  } catch (err) {
2195
2203
  err.message = err.message.replace("lstat", "ensureLink");
2196
2204
  throw err;
2197
2205
  }
2198
2206
  if (dstStat && areIdentical(srcStat, dstStat)) return;
2199
- const dir = path3.dirname(dstpath);
2207
+ const dir = path4.dirname(dstpath);
2200
2208
  const dirExists = await pathExists(dir);
2201
2209
  if (!dirExists) {
2202
2210
  await mkdir.mkdirs(dir);
2203
2211
  }
2204
- await fs4.link(srcpath, dstpath);
2212
+ await fs5.link(srcpath, dstpath);
2205
2213
  }
2206
2214
  function createLinkSync(srcpath, dstpath) {
2207
2215
  let dstStat;
2208
2216
  try {
2209
- dstStat = fs4.lstatSync(dstpath);
2217
+ dstStat = fs5.lstatSync(dstpath);
2210
2218
  } catch {
2211
2219
  }
2212
2220
  try {
2213
- const srcStat = fs4.lstatSync(srcpath);
2221
+ const srcStat = fs5.lstatSync(srcpath);
2214
2222
  if (dstStat && areIdentical(srcStat, dstStat)) return;
2215
2223
  } catch (err) {
2216
2224
  err.message = err.message.replace("lstat", "ensureLink");
2217
2225
  throw err;
2218
2226
  }
2219
- const dir = path3.dirname(dstpath);
2220
- const dirExists = fs4.existsSync(dir);
2221
- if (dirExists) return fs4.linkSync(srcpath, dstpath);
2227
+ const dir = path4.dirname(dstpath);
2228
+ const dirExists = fs5.existsSync(dir);
2229
+ if (dirExists) return fs5.linkSync(srcpath, dstpath);
2222
2230
  mkdir.mkdirsSync(dir);
2223
- return fs4.linkSync(srcpath, dstpath);
2231
+ return fs5.linkSync(srcpath, dstpath);
2224
2232
  }
2225
2233
  module2.exports = {
2226
2234
  createLink: u(createLink),
@@ -2233,14 +2241,14 @@ var require_link = __commonJS({
2233
2241
  var require_symlink_paths = __commonJS({
2234
2242
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports2, module2) {
2235
2243
  "use strict";
2236
- var path3 = require("path");
2237
- var fs4 = require_fs();
2244
+ var path4 = require("path");
2245
+ var fs5 = require_fs();
2238
2246
  var { pathExists } = require_path_exists();
2239
2247
  var u = require_universalify().fromPromise;
2240
2248
  async function symlinkPaths(srcpath, dstpath) {
2241
- if (path3.isAbsolute(srcpath)) {
2249
+ if (path4.isAbsolute(srcpath)) {
2242
2250
  try {
2243
- await fs4.lstat(srcpath);
2251
+ await fs5.lstat(srcpath);
2244
2252
  } catch (err) {
2245
2253
  err.message = err.message.replace("lstat", "ensureSymlink");
2246
2254
  throw err;
@@ -2250,8 +2258,8 @@ var require_symlink_paths = __commonJS({
2250
2258
  toDst: srcpath
2251
2259
  };
2252
2260
  }
2253
- const dstdir = path3.dirname(dstpath);
2254
- const relativeToDst = path3.join(dstdir, srcpath);
2261
+ const dstdir = path4.dirname(dstpath);
2262
+ const relativeToDst = path4.join(dstdir, srcpath);
2255
2263
  const exists = await pathExists(relativeToDst);
2256
2264
  if (exists) {
2257
2265
  return {
@@ -2260,39 +2268,39 @@ var require_symlink_paths = __commonJS({
2260
2268
  };
2261
2269
  }
2262
2270
  try {
2263
- await fs4.lstat(srcpath);
2271
+ await fs5.lstat(srcpath);
2264
2272
  } catch (err) {
2265
2273
  err.message = err.message.replace("lstat", "ensureSymlink");
2266
2274
  throw err;
2267
2275
  }
2268
2276
  return {
2269
2277
  toCwd: srcpath,
2270
- toDst: path3.relative(dstdir, srcpath)
2278
+ toDst: path4.relative(dstdir, srcpath)
2271
2279
  };
2272
2280
  }
2273
2281
  function symlinkPathsSync(srcpath, dstpath) {
2274
- if (path3.isAbsolute(srcpath)) {
2275
- const exists2 = fs4.existsSync(srcpath);
2282
+ if (path4.isAbsolute(srcpath)) {
2283
+ const exists2 = fs5.existsSync(srcpath);
2276
2284
  if (!exists2) throw new Error("absolute srcpath does not exist");
2277
2285
  return {
2278
2286
  toCwd: srcpath,
2279
2287
  toDst: srcpath
2280
2288
  };
2281
2289
  }
2282
- const dstdir = path3.dirname(dstpath);
2283
- const relativeToDst = path3.join(dstdir, srcpath);
2284
- const exists = fs4.existsSync(relativeToDst);
2290
+ const dstdir = path4.dirname(dstpath);
2291
+ const relativeToDst = path4.join(dstdir, srcpath);
2292
+ const exists = fs5.existsSync(relativeToDst);
2285
2293
  if (exists) {
2286
2294
  return {
2287
2295
  toCwd: relativeToDst,
2288
2296
  toDst: srcpath
2289
2297
  };
2290
2298
  }
2291
- const srcExists = fs4.existsSync(srcpath);
2299
+ const srcExists = fs5.existsSync(srcpath);
2292
2300
  if (!srcExists) throw new Error("relative srcpath does not exist");
2293
2301
  return {
2294
2302
  toCwd: srcpath,
2295
- toDst: path3.relative(dstdir, srcpath)
2303
+ toDst: path4.relative(dstdir, srcpath)
2296
2304
  };
2297
2305
  }
2298
2306
  module2.exports = {
@@ -2306,13 +2314,13 @@ var require_symlink_paths = __commonJS({
2306
2314
  var require_symlink_type = __commonJS({
2307
2315
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports2, module2) {
2308
2316
  "use strict";
2309
- var fs4 = require_fs();
2317
+ var fs5 = require_fs();
2310
2318
  var u = require_universalify().fromPromise;
2311
2319
  async function symlinkType(srcpath, type) {
2312
2320
  if (type) return type;
2313
2321
  let stats;
2314
2322
  try {
2315
- stats = await fs4.lstat(srcpath);
2323
+ stats = await fs5.lstat(srcpath);
2316
2324
  } catch {
2317
2325
  return "file";
2318
2326
  }
@@ -2322,7 +2330,7 @@ var require_symlink_type = __commonJS({
2322
2330
  if (type) return type;
2323
2331
  let stats;
2324
2332
  try {
2325
- stats = fs4.lstatSync(srcpath);
2333
+ stats = fs5.lstatSync(srcpath);
2326
2334
  } catch {
2327
2335
  return "file";
2328
2336
  }
@@ -2340,8 +2348,8 @@ var require_symlink = __commonJS({
2340
2348
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports2, module2) {
2341
2349
  "use strict";
2342
2350
  var u = require_universalify().fromPromise;
2343
- var path3 = require("path");
2344
- var fs4 = require_fs();
2351
+ var path4 = require("path");
2352
+ var fs5 = require_fs();
2345
2353
  var { mkdirs, mkdirsSync } = require_mkdirs();
2346
2354
  var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
2347
2355
  var { symlinkType, symlinkTypeSync } = require_symlink_type();
@@ -2350,44 +2358,44 @@ var require_symlink = __commonJS({
2350
2358
  async function createSymlink(srcpath, dstpath, type) {
2351
2359
  let stats;
2352
2360
  try {
2353
- stats = await fs4.lstat(dstpath);
2361
+ stats = await fs5.lstat(dstpath);
2354
2362
  } catch {
2355
2363
  }
2356
2364
  if (stats && stats.isSymbolicLink()) {
2357
2365
  const [srcStat, dstStat] = await Promise.all([
2358
- fs4.stat(srcpath),
2359
- fs4.stat(dstpath)
2366
+ fs5.stat(srcpath),
2367
+ fs5.stat(dstpath)
2360
2368
  ]);
2361
2369
  if (areIdentical(srcStat, dstStat)) return;
2362
2370
  }
2363
2371
  const relative = await symlinkPaths(srcpath, dstpath);
2364
2372
  srcpath = relative.toDst;
2365
2373
  const toType = await symlinkType(relative.toCwd, type);
2366
- const dir = path3.dirname(dstpath);
2374
+ const dir = path4.dirname(dstpath);
2367
2375
  if (!await pathExists(dir)) {
2368
2376
  await mkdirs(dir);
2369
2377
  }
2370
- return fs4.symlink(srcpath, dstpath, toType);
2378
+ return fs5.symlink(srcpath, dstpath, toType);
2371
2379
  }
2372
2380
  function createSymlinkSync(srcpath, dstpath, type) {
2373
2381
  let stats;
2374
2382
  try {
2375
- stats = fs4.lstatSync(dstpath);
2383
+ stats = fs5.lstatSync(dstpath);
2376
2384
  } catch {
2377
2385
  }
2378
2386
  if (stats && stats.isSymbolicLink()) {
2379
- const srcStat = fs4.statSync(srcpath);
2380
- const dstStat = fs4.statSync(dstpath);
2387
+ const srcStat = fs5.statSync(srcpath);
2388
+ const dstStat = fs5.statSync(dstpath);
2381
2389
  if (areIdentical(srcStat, dstStat)) return;
2382
2390
  }
2383
2391
  const relative = symlinkPathsSync(srcpath, dstpath);
2384
2392
  srcpath = relative.toDst;
2385
2393
  type = symlinkTypeSync(relative.toCwd, type);
2386
- const dir = path3.dirname(dstpath);
2387
- const exists = fs4.existsSync(dir);
2388
- if (exists) return fs4.symlinkSync(srcpath, dstpath, type);
2394
+ const dir = path4.dirname(dstpath);
2395
+ const exists = fs5.existsSync(dir);
2396
+ if (exists) return fs5.symlinkSync(srcpath, dstpath, type);
2389
2397
  mkdirsSync(dir);
2390
- return fs4.symlinkSync(srcpath, dstpath, type);
2398
+ return fs5.symlinkSync(srcpath, dstpath, type);
2391
2399
  }
2392
2400
  module2.exports = {
2393
2401
  createSymlink: u(createSymlink),
@@ -2454,9 +2462,9 @@ var require_jsonfile = __commonJS({
2454
2462
  if (typeof options === "string") {
2455
2463
  options = { encoding: options };
2456
2464
  }
2457
- const fs4 = options.fs || _fs;
2465
+ const fs5 = options.fs || _fs;
2458
2466
  const shouldThrow = "throws" in options ? options.throws : true;
2459
- let data = await universalify.fromCallback(fs4.readFile)(file, options);
2467
+ let data = await universalify.fromCallback(fs5.readFile)(file, options);
2460
2468
  data = stripBom(data);
2461
2469
  let obj;
2462
2470
  try {
@@ -2476,10 +2484,10 @@ var require_jsonfile = __commonJS({
2476
2484
  if (typeof options === "string") {
2477
2485
  options = { encoding: options };
2478
2486
  }
2479
- const fs4 = options.fs || _fs;
2487
+ const fs5 = options.fs || _fs;
2480
2488
  const shouldThrow = "throws" in options ? options.throws : true;
2481
2489
  try {
2482
- let content = fs4.readFileSync(file, options);
2490
+ let content = fs5.readFileSync(file, options);
2483
2491
  content = stripBom(content);
2484
2492
  return JSON.parse(content, options.reviver);
2485
2493
  } catch (err) {
@@ -2492,15 +2500,15 @@ var require_jsonfile = __commonJS({
2492
2500
  }
2493
2501
  }
2494
2502
  async function _writeFile(file, obj, options = {}) {
2495
- const fs4 = options.fs || _fs;
2503
+ const fs5 = options.fs || _fs;
2496
2504
  const str = stringify(obj, options);
2497
- await universalify.fromCallback(fs4.writeFile)(file, str, options);
2505
+ await universalify.fromCallback(fs5.writeFile)(file, str, options);
2498
2506
  }
2499
2507
  var writeFile = universalify.fromPromise(_writeFile);
2500
2508
  function writeFileSync(file, obj, options = {}) {
2501
- const fs4 = options.fs || _fs;
2509
+ const fs5 = options.fs || _fs;
2502
2510
  const str = stringify(obj, options);
2503
- return fs4.writeFileSync(file, str, options);
2511
+ return fs5.writeFileSync(file, str, options);
2504
2512
  }
2505
2513
  module2.exports = {
2506
2514
  readFile: readFile2,
@@ -2531,23 +2539,23 @@ var require_output_file = __commonJS({
2531
2539
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/output-file/index.js"(exports2, module2) {
2532
2540
  "use strict";
2533
2541
  var u = require_universalify().fromPromise;
2534
- var fs4 = require_fs();
2535
- var path3 = require("path");
2542
+ var fs5 = require_fs();
2543
+ var path4 = require("path");
2536
2544
  var mkdir = require_mkdirs();
2537
2545
  var pathExists = require_path_exists().pathExists;
2538
2546
  async function outputFile(file, data, encoding = "utf-8") {
2539
- const dir = path3.dirname(file);
2547
+ const dir = path4.dirname(file);
2540
2548
  if (!await pathExists(dir)) {
2541
2549
  await mkdir.mkdirs(dir);
2542
2550
  }
2543
- return fs4.writeFile(file, data, encoding);
2551
+ return fs5.writeFile(file, data, encoding);
2544
2552
  }
2545
2553
  function outputFileSync(file, ...args) {
2546
- const dir = path3.dirname(file);
2547
- if (!fs4.existsSync(dir)) {
2554
+ const dir = path4.dirname(file);
2555
+ if (!fs5.existsSync(dir)) {
2548
2556
  mkdir.mkdirsSync(dir);
2549
2557
  }
2550
- fs4.writeFileSync(file, ...args);
2558
+ fs5.writeFileSync(file, ...args);
2551
2559
  }
2552
2560
  module2.exports = {
2553
2561
  outputFile: u(outputFile),
@@ -2606,8 +2614,8 @@ var require_json = __commonJS({
2606
2614
  var require_move = __commonJS({
2607
2615
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move.js"(exports2, module2) {
2608
2616
  "use strict";
2609
- var fs4 = require_fs();
2610
- var path3 = require("path");
2617
+ var fs5 = require_fs();
2618
+ var path4 = require("path");
2611
2619
  var { copy: copy2 } = require_copy2();
2612
2620
  var { remove } = require_remove();
2613
2621
  var { mkdirp } = require_mkdirs();
@@ -2617,8 +2625,8 @@ var require_move = __commonJS({
2617
2625
  const overwrite = opts.overwrite || opts.clobber || false;
2618
2626
  const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
2619
2627
  await stat.checkParentPaths(src, srcStat, dest, "move");
2620
- const destParent = path3.dirname(dest);
2621
- const parsedParentPath = path3.parse(destParent);
2628
+ const destParent = path4.dirname(dest);
2629
+ const parsedParentPath = path4.parse(destParent);
2622
2630
  if (parsedParentPath.root !== destParent) {
2623
2631
  await mkdirp(destParent);
2624
2632
  }
@@ -2633,7 +2641,7 @@ var require_move = __commonJS({
2633
2641
  }
2634
2642
  }
2635
2643
  try {
2636
- await fs4.rename(src, dest);
2644
+ await fs5.rename(src, dest);
2637
2645
  } catch (err) {
2638
2646
  if (err.code !== "EXDEV") {
2639
2647
  throw err;
@@ -2658,8 +2666,8 @@ var require_move = __commonJS({
2658
2666
  var require_move_sync = __commonJS({
2659
2667
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move-sync.js"(exports2, module2) {
2660
2668
  "use strict";
2661
- var fs4 = require_graceful_fs();
2662
- var path3 = require("path");
2669
+ var fs5 = require_graceful_fs();
2670
+ var path4 = require("path");
2663
2671
  var copySync = require_copy2().copySync;
2664
2672
  var removeSync = require_remove().removeSync;
2665
2673
  var mkdirpSync = require_mkdirs().mkdirpSync;
@@ -2669,12 +2677,12 @@ var require_move_sync = __commonJS({
2669
2677
  const overwrite = opts.overwrite || opts.clobber || false;
2670
2678
  const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
2671
2679
  stat.checkParentPathsSync(src, srcStat, dest, "move");
2672
- if (!isParentRoot(dest)) mkdirpSync(path3.dirname(dest));
2680
+ if (!isParentRoot(dest)) mkdirpSync(path4.dirname(dest));
2673
2681
  return doRename(src, dest, overwrite, isChangingCase);
2674
2682
  }
2675
2683
  function isParentRoot(dest) {
2676
- const parent = path3.dirname(dest);
2677
- const parsedPath = path3.parse(parent);
2684
+ const parent = path4.dirname(dest);
2685
+ const parsedPath = path4.parse(parent);
2678
2686
  return parsedPath.root === parent;
2679
2687
  }
2680
2688
  function doRename(src, dest, overwrite, isChangingCase) {
@@ -2683,12 +2691,12 @@ var require_move_sync = __commonJS({
2683
2691
  removeSync(dest);
2684
2692
  return rename(src, dest, overwrite);
2685
2693
  }
2686
- if (fs4.existsSync(dest)) throw new Error("dest already exists.");
2694
+ if (fs5.existsSync(dest)) throw new Error("dest already exists.");
2687
2695
  return rename(src, dest, overwrite);
2688
2696
  }
2689
2697
  function rename(src, dest, overwrite) {
2690
2698
  try {
2691
- fs4.renameSync(src, dest);
2699
+ fs5.renameSync(src, dest);
2692
2700
  } catch (err) {
2693
2701
  if (err.code !== "EXDEV") throw err;
2694
2702
  return moveAcrossDevice(src, dest, overwrite);
@@ -5499,8 +5507,8 @@ var require_safe_buffer = __commonJS({
5499
5507
  var require_convert_source_map = __commonJS({
5500
5508
  "../../node_modules/.pnpm/convert-source-map@1.8.0/node_modules/convert-source-map/index.js"(exports2) {
5501
5509
  "use strict";
5502
- var fs4 = require("fs");
5503
- var path3 = require("path");
5510
+ var fs5 = require("fs");
5511
+ var path4 = require("path");
5504
5512
  var SafeBuffer = require_safe_buffer();
5505
5513
  Object.defineProperty(exports2, "commentRegex", {
5506
5514
  get: function getCommentRegex() {
@@ -5521,9 +5529,9 @@ var require_convert_source_map = __commonJS({
5521
5529
  function readFromFileMap(sm, dir) {
5522
5530
  var r = exports2.mapFileCommentRegex.exec(sm);
5523
5531
  var filename = r[1] || r[2];
5524
- var filepath = path3.resolve(dir, filename);
5532
+ var filepath = path4.resolve(dir, filename);
5525
5533
  try {
5526
- return fs4.readFileSync(filepath, "utf8");
5534
+ return fs5.readFileSync(filepath, "utf8");
5527
5535
  } catch (e) {
5528
5536
  throw new Error("An error occurred while trying to read the map file at " + filepath + "\n" + e);
5529
5537
  }
@@ -5713,27 +5721,27 @@ var require_util = __commonJS({
5713
5721
  };
5714
5722
  }
5715
5723
  var normalize = lruMemoize(function normalize2(aPath) {
5716
- let path3 = aPath;
5724
+ let path4 = aPath;
5717
5725
  const url = urlParse(aPath);
5718
5726
  if (url) {
5719
5727
  if (!url.path) {
5720
5728
  return aPath;
5721
5729
  }
5722
- path3 = url.path;
5730
+ path4 = url.path;
5723
5731
  }
5724
- const isAbsolute = exports2.isAbsolute(path3);
5732
+ const isAbsolute = exports2.isAbsolute(path4);
5725
5733
  const parts = [];
5726
5734
  let start = 0;
5727
5735
  let i = 0;
5728
5736
  while (true) {
5729
5737
  start = i;
5730
- i = path3.indexOf("/", start);
5738
+ i = path4.indexOf("/", start);
5731
5739
  if (i === -1) {
5732
- parts.push(path3.slice(start));
5740
+ parts.push(path4.slice(start));
5733
5741
  break;
5734
5742
  } else {
5735
- parts.push(path3.slice(start, i));
5736
- while (i < path3.length && path3[i] === "/") {
5743
+ parts.push(path4.slice(start, i));
5744
+ while (i < path4.length && path4[i] === "/") {
5737
5745
  i++;
5738
5746
  }
5739
5747
  }
@@ -5755,15 +5763,15 @@ var require_util = __commonJS({
5755
5763
  }
5756
5764
  }
5757
5765
  }
5758
- path3 = parts.join("/");
5759
- if (path3 === "") {
5760
- path3 = isAbsolute ? "/" : ".";
5766
+ path4 = parts.join("/");
5767
+ if (path4 === "") {
5768
+ path4 = isAbsolute ? "/" : ".";
5761
5769
  }
5762
5770
  if (url) {
5763
- url.path = path3;
5771
+ url.path = path4;
5764
5772
  return urlGenerate(url);
5765
5773
  }
5766
- return path3;
5774
+ return path4;
5767
5775
  });
5768
5776
  exports2.normalize = normalize;
5769
5777
  function join2(aRoot, aPath) {
@@ -6527,12 +6535,12 @@ var require_read_wasm = __commonJS({
6527
6535
  };
6528
6536
  module2.exports.initialize = (input) => mappingsWasm = input;
6529
6537
  } else {
6530
- const fs4 = require("fs");
6531
- const path3 = require("path");
6538
+ const fs5 = require("fs");
6539
+ const path4 = require("path");
6532
6540
  module2.exports = function readWasm() {
6533
6541
  return new Promise((resolve, reject) => {
6534
- const wasmPath = path3.join(__dirname, "mappings.wasm");
6535
- fs4.readFile(wasmPath, null, (error, data) => {
6542
+ const wasmPath = path4.join(__dirname, "mappings.wasm");
6543
+ fs5.readFile(wasmPath, null, (error, data) => {
6536
6544
  if (error) {
6537
6545
  reject(error);
6538
6546
  return;
@@ -8157,8 +8165,8 @@ var require_utils3 = __commonJS({
8157
8165
  }
8158
8166
  return output;
8159
8167
  };
8160
- exports2.basename = (path3, { windows } = {}) => {
8161
- const segs = path3.split(windows ? /[\\/]/ : "/");
8168
+ exports2.basename = (path4, { windows } = {}) => {
8169
+ const segs = path4.split(windows ? /[\\/]/ : "/");
8162
8170
  const last = segs[segs.length - 1];
8163
8171
  if (last === "") {
8164
8172
  return segs[segs.length - 2];
@@ -9433,8 +9441,14 @@ var require_picomatch2 = __commonJS({
9433
9441
  });
9434
9442
 
9435
9443
  // src/index.ts
9444
+ var import_promises3 = __toESM(require("node:fs/promises"));
9445
+ var import_node_path3 = __toESM(require("node:path"));
9446
+ var import_constants3 = __toESM(require_constants2());
9447
+
9448
+ // src/go-outputs.ts
9436
9449
  var import_promises2 = __toESM(require("node:fs/promises"));
9437
9450
  var import_node_path2 = __toESM(require("node:path"));
9451
+ var import_build_utils2 = require("@vercel/build-utils");
9438
9452
  var import_constants2 = __toESM(require_constants2());
9439
9453
 
9440
9454
  // src/outputs.ts
@@ -9443,7 +9457,7 @@ var import_node_path = __toESM(require("node:path"));
9443
9457
  var import_build_utils = require("@vercel/build-utils");
9444
9458
  var import_async_sema = __toESM(require_lib());
9445
9459
  var import_fs_extra3 = __toESM(require_lib2());
9446
- var import_constants = __toESM(require_constants());
9460
+ var import_constants = __toESM(require_constants2());
9447
9461
 
9448
9462
  // src/get-edge-function-source.ts
9449
9463
  var import_fs_extra2 = __toESM(require_lib2());
@@ -9847,7 +9861,7 @@ async function handleNodeOutputs(nodeOutputs, {
9847
9861
  const envFileHashes = {};
9848
9862
  let nextEnvLoaderPathRelativeToProjectDir;
9849
9863
  for (const envFile of envFiles) {
9850
- envFilePathMap[import_node_path.default.posix.join(import_node_path.default.posix.relative(repoRoot, projectDir), envFile)] = import_node_path.default.posix.relative(repoRoot, import_node_path.default.join(projectDir, envFile));
9864
+ envFilePathMap[import_node_path.default.posix.join(handlerRelativeDir, envFile)] = import_node_path.default.posix.relative(repoRoot, import_node_path.default.join(projectDir, envFile));
9851
9865
  envFileHashes[envFile] = sha256(
9852
9866
  await import_promises.default.readFile(import_node_path.default.join(projectDir, envFile))
9853
9867
  );
@@ -9878,6 +9892,10 @@ async function handleNodeOutputs(nodeOutputs, {
9878
9892
  nextEnvLoaderPathRelativeToProjectDir
9879
9893
  });
9880
9894
  const handlerSourceHash = sha256(handlerSource);
9895
+ const handlerRelativePath = import_node_path.default.posix.join(
9896
+ handlerRelativeDir,
9897
+ "___next_launcher.cjs"
9898
+ );
9881
9899
  const relativeToRepoRootCache = /* @__PURE__ */ new Map();
9882
9900
  const relativeToRepoRoot = (fsPath) => {
9883
9901
  let relPath = relativeToRepoRootCache.get(fsPath);
@@ -9910,15 +9928,22 @@ async function handleNodeOutputs(nodeOutputs, {
9910
9928
  if (output.type === import_constants.AdapterOutputType.PAGES) {
9911
9929
  const notFoundOutput = pages404Output || pagesErrorOutput;
9912
9930
  if (notFoundOutput) {
9913
- for (const [relPath, fsPath] of Object.entries(
9931
+ for (const [relPath2, fsPath] of Object.entries(
9914
9932
  notFoundOutput.assets
9915
9933
  )) {
9916
- files[relPath] = relativeToRepoRoot(fsPath);
9934
+ files[relPath2] = relativeToRepoRoot(fsPath);
9917
9935
  if (filesHashes) {
9918
- filesHashes[relPath] = notFoundOutput.assetsHashes?.[relPath];
9936
+ filesHashes[relPath2] = notFoundOutput.assetsHashes?.[relPath2];
9919
9937
  }
9920
9938
  }
9921
- files[import_node_path.default.posix.relative(repoRoot, notFoundOutput.filePath)] = import_node_path.default.posix.relative(repoRoot, notFoundOutput.filePath);
9939
+ const relPath = import_node_path.default.posix.relative(
9940
+ repoRoot,
9941
+ notFoundOutput.filePath
9942
+ );
9943
+ files[relPath] = relPath;
9944
+ if (filesHashes) {
9945
+ filesHashes[relPath] = notFoundOutput.assetsHashes?.[relPath];
9946
+ }
9922
9947
  }
9923
9948
  }
9924
9949
  files[routesManifestRelativePath] = import_node_path.default.posix.relative(
@@ -9928,15 +9953,11 @@ async function handleNodeOutputs(nodeOutputs, {
9928
9953
  if (filesHashes) {
9929
9954
  filesHashes[routesManifestRelativePath] = routesManifestHash;
9930
9955
  }
9931
- const handlerFilePath = import_node_path.default.join(
9932
- functionDir,
9933
- handlerRelativeDir,
9934
- "___next_launcher.cjs"
9935
- );
9936
- await import_promises.default.mkdir(import_node_path.default.dirname(handlerFilePath), { recursive: true });
9937
- await writeIfNotExists(handlerFilePath, handlerSource);
9956
+ const handlerAbsolutePath = import_node_path.default.join(functionDir, handlerRelativePath);
9957
+ await import_promises.default.mkdir(import_node_path.default.dirname(handlerAbsolutePath), { recursive: true });
9958
+ await writeIfNotExists(handlerAbsolutePath, handlerSource);
9938
9959
  if (filesHashes) {
9939
- filesHashes["___next_launcher.cjs"] = handlerSourceHash;
9960
+ filesHashes[handlerRelativePath] = handlerSourceHash;
9940
9961
  }
9941
9962
  const operationType = output.type === import_constants.AdapterOutputType.APP_PAGE || output.type === import_constants.AdapterOutputType.PAGES ? "PAGE" : "API";
9942
9963
  const sourceFile = await getSourceFilePathFromPage({
@@ -9970,10 +9991,7 @@ async function handleNodeOutputs(nodeOutputs, {
9970
9991
  slug: "nextjs",
9971
9992
  version: nextVersion
9972
9993
  },
9973
- handler: import_node_path.default.posix.join(
9974
- import_node_path.default.posix.relative(repoRoot, projectDir),
9975
- "___next_launcher.cjs"
9976
- ),
9994
+ handler: handlerRelativePath,
9977
9995
  runtime: nodeVersion.runtime,
9978
9996
  maxDuration,
9979
9997
  supportsMultiPayloads: true,
@@ -10228,10 +10246,7 @@ async function handleEdgeOutputs(edgeOutputs, {
10228
10246
  const edgeConfig = {
10229
10247
  runtime: "edge",
10230
10248
  name: params.name,
10231
- entrypoint: import_node_path.default.posix.join(
10232
- import_node_path.default.posix.relative(repoRoot, projectDir),
10233
- "index.js"
10234
- ),
10249
+ entrypoint: import_node_path.default.posix.join(handlerRelativeDir, "index.js"),
10235
10250
  filePathMap: files,
10236
10251
  assets: nonJsAssetFiles,
10237
10252
  deploymentTarget: "v8-worker",
@@ -10290,25 +10305,28 @@ async function usesSrcDirectory(workPath) {
10290
10305
  }
10291
10306
  return false;
10292
10307
  }
10293
- function isDirectory(path3) {
10294
- return import_fs_extra3.default.lstatSync(path3, { throwIfNoEntry: false })?.isDirectory() ?? false;
10308
+ function isDirectory(path4) {
10309
+ return import_fs_extra3.default.lstatSync(path4, { throwIfNoEntry: false })?.isDirectory() ?? false;
10295
10310
  }
10296
10311
  async function getSourceFilePathFromPage({
10297
10312
  workPath,
10298
10313
  page,
10299
10314
  pageExtensions,
10300
- usesSrcDir
10315
+ usesSrcDir,
10316
+ pageTypes,
10317
+ allowExtensionless = true,
10318
+ allowDirectoryIndex = true
10301
10319
  }) {
10302
10320
  const extensionsToTry = pageExtensions || ["js", "jsx", "ts", "tsx"];
10303
10321
  for (const pageType of [
10304
10322
  // middleware is not nested in pages/app
10305
- ...page === "middleware" ? [""] : ["pages", "app"]
10323
+ ...page === "middleware" ? [""] : pageTypes || ["pages", "app"]
10306
10324
  ]) {
10307
10325
  let fsPath = import_node_path.default.join(workPath, pageType, page);
10308
10326
  if (usesSrcDir) {
10309
10327
  fsPath = import_node_path.default.join(workPath, "src", pageType, page);
10310
10328
  }
10311
- if (import_fs_extra3.default.existsSync(fsPath)) {
10329
+ if (allowExtensionless && import_fs_extra3.default.existsSync(fsPath)) {
10312
10330
  return import_node_path.default.relative(workPath, fsPath);
10313
10331
  }
10314
10332
  const extensionless = fsPath;
@@ -10321,7 +10339,7 @@ async function getSourceFilePathFromPage({
10321
10339
  return import_node_path.default.relative(workPath, fsPath);
10322
10340
  }
10323
10341
  }
10324
- if (isDirectory(extensionless)) {
10342
+ if (allowDirectoryIndex && isDirectory(extensionless)) {
10325
10343
  if (pageType === "pages") {
10326
10344
  for (const ext of extensionsToTry) {
10327
10345
  fsPath = import_node_path.default.join(extensionless, `index.${ext}`);
@@ -10352,7 +10370,350 @@ async function getSourceFilePathFromPage({
10352
10370
  return "";
10353
10371
  }
10354
10372
 
10373
+ // src/go-outputs.ts
10374
+ var RESERVED_NAMES = /* @__PURE__ */ new Set([
10375
+ "executable",
10376
+ "user-server",
10377
+ ".vc-config.json"
10378
+ ]);
10379
+ function isRecord(value) {
10380
+ return typeof value === "object" && value !== null && !Array.isArray(value);
10381
+ }
10382
+ function assertRelativeFilePath(value, description) {
10383
+ if (typeof value !== "string" || !value || value.includes("\\") || value.includes("\0") || import_node_path2.default.posix.isAbsolute(value) || /^[A-Za-z]:/.test(value) || value.split("/").some((segment) => !segment || segment === "." || segment === "..")) {
10384
+ throw new Error(
10385
+ `Invalid Go ${description}: expected a normalized relative file path`
10386
+ );
10387
+ }
10388
+ }
10389
+ function assertPathname(value, description = "output pathname") {
10390
+ if (typeof value !== "string" || !value.startsWith("/") || value.includes("\\") || value.includes("\0") || value.includes("?") || value.includes("#") || value !== "/" && value.slice(1).split("/").some((part) => !part || part === "." || part === "..")) {
10391
+ throw new Error(`Invalid Go ${description}`);
10392
+ }
10393
+ }
10394
+ function assertGoRouteOutput(value) {
10395
+ if (!isRecord(value) || value.type !== import_constants2.AdapterOutputType.APP_ROUTE || value.runtime !== "go") {
10396
+ throw new Error(
10397
+ "Go is supported only for App Router route.go handler outputs"
10398
+ );
10399
+ }
10400
+ if (typeof value.id !== "string" || !value.id || typeof value.sourcePage !== "string") {
10401
+ throw new Error("Go outputs require a route id and sourcePage");
10402
+ }
10403
+ assertPathname(value.pathname);
10404
+ assertPathname(value.sourcePage, "sourcePage");
10405
+ if (!value.sourcePage.endsWith("/route")) {
10406
+ throw new Error("Go sourcePage must identify an App Router route handler");
10407
+ }
10408
+ if (typeof value.filePath !== "string" || !import_node_path2.default.isAbsolute(value.filePath)) {
10409
+ throw new Error(
10410
+ "Go filePath must be an absolute path to the precompiled server"
10411
+ );
10412
+ }
10413
+ if (!isRecord(value.assets) || !isRecord(value.assetsHashes) || !isRecord(value.config)) {
10414
+ throw new Error(
10415
+ "Go outputs require assets, assetsHashes, and config objects"
10416
+ );
10417
+ }
10418
+ const destinations = Object.keys(value.assets);
10419
+ const portableDestinations = /* @__PURE__ */ new Set();
10420
+ const portablePaths = /* @__PURE__ */ new Map();
10421
+ for (const destination of destinations) {
10422
+ assertRelativeFilePath(destination, "asset destination");
10423
+ const portableDestination = destination.toLowerCase();
10424
+ if (RESERVED_NAMES.has(portableDestination.split("/")[0])) {
10425
+ throw new Error(`Reserved Go function asset destination: ${destination}`);
10426
+ }
10427
+ if (portableDestinations.has(portableDestination)) {
10428
+ throw new Error(`Conflicting Go asset destinations: ${destination}`);
10429
+ }
10430
+ portableDestinations.add(portableDestination);
10431
+ const parts = destination.split("/");
10432
+ for (let i = 1; i <= parts.length; i++) {
10433
+ const prefix = parts.slice(0, i).join("/");
10434
+ const portablePrefix = prefix.toLowerCase();
10435
+ const previous = portablePaths.get(portablePrefix);
10436
+ if (previous && previous !== prefix) {
10437
+ throw new Error(`Conflicting Go asset destinations: ${destination}`);
10438
+ }
10439
+ portablePaths.set(portablePrefix, prefix);
10440
+ }
10441
+ const source = value.assets[destination];
10442
+ if (typeof source !== "string" || !import_node_path2.default.isAbsolute(source)) {
10443
+ throw new Error(
10444
+ `Go asset ${destination} requires an absolute source path`
10445
+ );
10446
+ }
10447
+ }
10448
+ for (const destination of portableDestinations) {
10449
+ const parts = destination.split("/");
10450
+ for (let i = 1; i < parts.length; i++) {
10451
+ if (portableDestinations.has(parts.slice(0, i).join("/"))) {
10452
+ throw new Error(`Conflicting Go asset destinations: ${destination}`);
10453
+ }
10454
+ }
10455
+ }
10456
+ }
10457
+ function collectGoRouteOutputs(outputs) {
10458
+ const goOutputs = [];
10459
+ for (const kind of [
10460
+ "appRoutes",
10461
+ "appPages",
10462
+ "pages",
10463
+ "pagesApi",
10464
+ "staticFiles",
10465
+ "middleware"
10466
+ ]) {
10467
+ const entries = kind === "middleware" ? outputs.middleware ? [outputs.middleware] : [] : outputs[kind];
10468
+ for (const candidate of entries) {
10469
+ const output = candidate;
10470
+ if (!isRecord(output) || !("runtime" in output)) continue;
10471
+ if (output.runtime === "nodejs" || output.runtime === "edge") continue;
10472
+ if (output.runtime !== "go") {
10473
+ throw new Error(
10474
+ `Unsupported Next.js adapter output runtime: ${String(output.runtime)}`
10475
+ );
10476
+ }
10477
+ if (kind !== "appRoutes") {
10478
+ throw new Error(
10479
+ `Go ${kind} outputs are unsupported; only App Router route.go handlers are supported`
10480
+ );
10481
+ }
10482
+ assertGoRouteOutput(output);
10483
+ goOutputs.push(output);
10484
+ }
10485
+ }
10486
+ const goIds = /* @__PURE__ */ new Set();
10487
+ for (const output of goOutputs) {
10488
+ if (goIds.has(output.id))
10489
+ throw new Error(`Duplicate Go output id: ${output.id}`);
10490
+ goIds.add(output.id);
10491
+ }
10492
+ if (outputs.prerenders.some((output) => goIds.has(output.parentOutputId))) {
10493
+ throw new Error("Go route outputs cannot be prerender parents");
10494
+ }
10495
+ return goOutputs;
10496
+ }
10497
+ function loadGoPackager() {
10498
+ const modulePath = process.env.NEXT_ADAPTER_VERCEL_GO_PACKAGER_PATH;
10499
+ if (!modulePath || !import_node_path2.default.isAbsolute(modulePath)) {
10500
+ throw new Error(
10501
+ "Go outputs require a hosted @vercel/next Go packager (NEXT_ADAPTER_VERCEL_GO_PACKAGER_PATH)"
10502
+ );
10503
+ }
10504
+ const packager = require(modulePath);
10505
+ if (!isRecord(packager) || packager.version !== 1 || typeof packager.prepareGoFunction !== "function") {
10506
+ throw new Error(
10507
+ "Unsupported @vercel/next Go packager: expected protocol version 1"
10508
+ );
10509
+ }
10510
+ return packager;
10511
+ }
10512
+ function assertPreparedGoFunction(value) {
10513
+ if (!isRecord(value) || !isRecord(value.files)) {
10514
+ throw new Error("Invalid Go packager response");
10515
+ }
10516
+ if (Object.keys(value.files).length !== 2 || !Object.hasOwn(value.files, "executable") || !Object.hasOwn(value.files, "user-server")) {
10517
+ throw new Error(
10518
+ "Go packager must provide executable and user-server files"
10519
+ );
10520
+ }
10521
+ for (const file of Object.values(value.files)) {
10522
+ if (!isRecord(file) || typeof file.fsPath !== "string" || !import_node_path2.default.isAbsolute(file.fsPath) || file.mode !== 493) {
10523
+ throw new Error(
10524
+ "Go packager files must have absolute paths and mode 0755"
10525
+ );
10526
+ }
10527
+ }
10528
+ }
10529
+ function preferredRegions(preferredRegion) {
10530
+ if (!preferredRegion) return void 0;
10531
+ const regions = typeof preferredRegion === "string" ? [preferredRegion] : preferredRegion;
10532
+ if (regions.includes("global")) {
10533
+ throw new Error('Go preferredRegion="global" is unsupported');
10534
+ }
10535
+ if (regions.includes("auto")) return void 0;
10536
+ const normalized = regions.flatMap(
10537
+ (region) => region === "home" ? (process.env.VERCEL_FUNCTION_REGIONS || "").split(",").filter(Boolean) : [region]
10538
+ );
10539
+ return normalized.length ? normalized : void 0;
10540
+ }
10541
+ function outputCollision(functionDir) {
10542
+ return Object.assign(
10543
+ new Error(`Refusing to replace a non-Go function output: ${functionDir}`),
10544
+ { code: "EEXIST" }
10545
+ );
10546
+ }
10547
+ async function existingGoFunction(functionDir) {
10548
+ const stat = await import_promises2.default.lstat(functionDir).catch((error) => {
10549
+ if (error.code === "ENOENT") return void 0;
10550
+ throw error;
10551
+ });
10552
+ if (!stat) return false;
10553
+ if (!stat.isDirectory() || stat.isSymbolicLink()) {
10554
+ throw outputCollision(functionDir);
10555
+ }
10556
+ const configPath = import_node_path2.default.join(functionDir, ".vc-config.json");
10557
+ const previousConfig = await (async () => {
10558
+ try {
10559
+ const configStat = await import_promises2.default.lstat(configPath);
10560
+ if (!configStat.isFile() || configStat.isSymbolicLink()) return void 0;
10561
+ return JSON.parse(await import_promises2.default.readFile(configPath, "utf8"));
10562
+ } catch {
10563
+ return void 0;
10564
+ }
10565
+ })();
10566
+ if (!isRecord(previousConfig) || previousConfig.runtime !== "executable" || previousConfig.handler !== "executable" || previousConfig.runtimeLanguage !== "go" || !isRecord(previousConfig.framework) || previousConfig.framework.slug !== "nextjs") {
10567
+ throw outputCollision(functionDir);
10568
+ }
10569
+ return true;
10570
+ }
10571
+ async function ensureFunctionParent(functionsDir, functionDir) {
10572
+ await import_promises2.default.mkdir(functionsDir, { recursive: true });
10573
+ let current = functionsDir;
10574
+ const relativeParent = import_node_path2.default.relative(functionsDir, import_node_path2.default.dirname(functionDir));
10575
+ for (const part of ["", ...relativeParent.split(import_node_path2.default.sep).filter(Boolean)]) {
10576
+ current = import_node_path2.default.join(current, part);
10577
+ if (part) {
10578
+ await import_promises2.default.mkdir(current).catch((error) => {
10579
+ if (error.code !== "EEXIST") throw error;
10580
+ });
10581
+ }
10582
+ const stat = await import_promises2.default.lstat(current);
10583
+ if (!stat.isDirectory() || stat.isSymbolicLink()) {
10584
+ throw outputCollision(functionDir);
10585
+ }
10586
+ }
10587
+ }
10588
+ async function usesSrcAppDirectory(workPath) {
10589
+ try {
10590
+ if ((await import_promises2.default.stat(import_node_path2.default.join(workPath, "app"))).isDirectory()) {
10591
+ return false;
10592
+ }
10593
+ } catch (_err) {
10594
+ }
10595
+ try {
10596
+ return (await import_promises2.default.stat(import_node_path2.default.join(workPath, "src", "app"))).isDirectory();
10597
+ } catch (_err) {
10598
+ return false;
10599
+ }
10600
+ }
10601
+ async function handleGoOutputs(outputs, {
10602
+ config,
10603
+ projectDir,
10604
+ nextVersion,
10605
+ vercelOutputDir
10606
+ }) {
10607
+ if (!outputs.length) return;
10608
+ const packager = loadGoPackager();
10609
+ const builderConfig = JSON.parse(
10610
+ process.env.NEXT_ADAPTER_VERCEL_CONFIG || "{}"
10611
+ );
10612
+ const functionsDir = import_node_path2.default.join(vercelOutputDir, "functions");
10613
+ const usesSrcDir = await usesSrcAppDirectory(projectDir);
10614
+ const functionPaths = /* @__PURE__ */ new Map();
10615
+ for (const output of outputs) {
10616
+ assertGoRouteOutput(output);
10617
+ const pathname = normalizeIndexPathname(output.pathname, config);
10618
+ const functionPath = `${pathname.slice(1)}.func`;
10619
+ const caseInsensitivePath = functionPath.toLowerCase();
10620
+ const previous = functionPaths.get(caseInsensitivePath);
10621
+ if (previous && previous !== functionPath)
10622
+ throw new Error(`Conflicting Go function output: ${pathname}`);
10623
+ functionPaths.set(caseInsensitivePath, functionPath);
10624
+ }
10625
+ for (const output of outputs) {
10626
+ const sourceFile = (await getSourceFilePathFromPage({
10627
+ workPath: projectDir,
10628
+ page: output.sourcePage,
10629
+ pageExtensions: ["go"],
10630
+ usesSrcDir,
10631
+ pageTypes: ["app"],
10632
+ allowExtensionless: false,
10633
+ allowDirectoryIndex: false
10634
+ })).replace(/\\/g, "/");
10635
+ if (!/^(src\/)?app\/(?:.*\/)?route\.go$/.test(sourceFile)) {
10636
+ throw new Error(
10637
+ `Could not resolve Go route.go source for ${output.sourcePage}`
10638
+ );
10639
+ }
10640
+ const overrides = await (0, import_build_utils2.getLambdaOptionsFromFunction)({
10641
+ sourceFile,
10642
+ config: builderConfig
10643
+ });
10644
+ const prepared = await packager.prepareGoFunction({
10645
+ userServerPath: output.filePath
10646
+ });
10647
+ assertPreparedGoFunction(prepared);
10648
+ if (overrides.architecture && overrides.architecture !== "x86_64") {
10649
+ throw new Error(
10650
+ `Go target architecture conflicts with function configuration for ${sourceFile}`
10651
+ );
10652
+ }
10653
+ const pathname = normalizeIndexPathname(output.pathname, config);
10654
+ const functionDir = import_node_path2.default.join(functionsDir, `${pathname.slice(1)}.func`);
10655
+ await ensureFunctionParent(functionsDir, functionDir);
10656
+ await existingGoFunction(functionDir);
10657
+ const stagingDir = await import_promises2.default.mkdtemp(
10658
+ import_node_path2.default.join(import_node_path2.default.dirname(functionDir), ".go-function-")
10659
+ );
10660
+ try {
10661
+ for (const [destination, source] of Object.entries(output.assets)) {
10662
+ const sourceStat = await import_promises2.default.stat(source);
10663
+ if (!sourceStat.isFile())
10664
+ throw new Error(`Go asset is not a regular file: ${destination}`);
10665
+ const destinationPath = import_node_path2.default.join(stagingDir, destination);
10666
+ await import_promises2.default.mkdir(import_node_path2.default.dirname(destinationPath), { recursive: true });
10667
+ await import_promises2.default.copyFile(source, destinationPath);
10668
+ await import_promises2.default.chmod(destinationPath, sourceStat.mode & 511);
10669
+ }
10670
+ for (const [destination, file] of Object.entries(prepared.files)) {
10671
+ await import_promises2.default.copyFile(file.fsPath, import_node_path2.default.join(stagingDir, destination));
10672
+ await import_promises2.default.chmod(import_node_path2.default.join(stagingDir, destination), file.mode);
10673
+ }
10674
+ const functionConfig = {
10675
+ ...overrides,
10676
+ runtime: "executable",
10677
+ handler: "executable",
10678
+ runtimeLanguage: "go",
10679
+ architecture: "x86_64",
10680
+ supportsResponseStreaming: true,
10681
+ maxDuration: output.config.maxDuration ?? overrides.maxDuration,
10682
+ regions: overrides.regions ?? preferredRegions(output.config.preferredRegion),
10683
+ operationType: "API",
10684
+ framework: { slug: "nextjs", version: nextVersion }
10685
+ };
10686
+ await import_promises2.default.writeFile(
10687
+ import_node_path2.default.join(stagingDir, ".vc-config.json"),
10688
+ JSON.stringify(functionConfig, null, 2)
10689
+ );
10690
+ if (await existingGoFunction(functionDir)) {
10691
+ await import_promises2.default.rm(functionDir, { recursive: true });
10692
+ }
10693
+ await import_promises2.default.rename(stagingDir, functionDir);
10694
+ } catch (error) {
10695
+ await import_promises2.default.rm(stagingDir, { recursive: true, force: true });
10696
+ throw error;
10697
+ }
10698
+ }
10699
+ }
10700
+
10355
10701
  // src/routing.ts
10702
+ function removeGoRouteParams(destination) {
10703
+ if (!destination) return destination;
10704
+ const queryIndex = destination.indexOf("?");
10705
+ if (queryIndex === -1) return destination;
10706
+ const hashIndex = destination.indexOf("#", queryIndex);
10707
+ const queryEnd = hashIndex === -1 ? destination.length : hashIndex;
10708
+ const params = destination.slice(queryIndex + 1, queryEnd).split("&");
10709
+ const remaining = params.filter((param) => {
10710
+ const key = param.split("=")[0];
10711
+ return !key.startsWith("nxtP") && !key.startsWith("nxtI");
10712
+ });
10713
+ if (remaining.length === params.length) return destination;
10714
+ const query = remaining.join("&");
10715
+ return destination.slice(0, queryIndex) + (query ? `?${query}` : "") + destination.slice(queryEnd);
10716
+ }
10356
10717
  function modifyWithRewriteHeaders(rewrites, {
10357
10718
  isAfterFilesRewrite = false,
10358
10719
  shouldHandleSegmentPrefetches
@@ -10494,13 +10855,13 @@ function extractHeaders(routing) {
10494
10855
  }
10495
10856
  function normalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataResolving, isOverride = false) {
10496
10857
  if (!shouldHandleMiddlewareDataResolving) return [];
10497
- const path3 = require("node:path");
10858
+ const path4 = require("node:path");
10498
10859
  const basePath = config.basePath || "";
10499
10860
  const trailingSlash = config.trailingSlash || false;
10500
10861
  return [
10501
10862
  // remove x-nextjs-data header for non _next/data requests
10502
10863
  {
10503
- src: path3.posix.join("/", basePath, "/(?!_next/data(?:/|$))(.*)"),
10864
+ src: path4.posix.join("/", basePath, "/(?!_next/data(?:/|$))(.*)"),
10504
10865
  has: [
10505
10866
  {
10506
10867
  type: "header",
@@ -10520,7 +10881,7 @@ function normalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataReso
10520
10881
  },
10521
10882
  // ensure x-nextjs-data header is always present if we are doing middleware next data resolving
10522
10883
  {
10523
- src: path3.posix.join("/", basePath, "/_next/data/(.*)"),
10884
+ src: path4.posix.join("/", basePath, "/_next/data/(.*)"),
10524
10885
  missing: [
10525
10886
  {
10526
10887
  type: "header",
@@ -10541,14 +10902,14 @@ function normalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataReso
10541
10902
  },
10542
10903
  // strip _next/data prefix for resolving
10543
10904
  {
10544
- src: `^${path3.posix.join(
10905
+ src: `^${path4.posix.join(
10545
10906
  "/",
10546
10907
  basePath,
10547
10908
  "/_next/data/",
10548
10909
  buildId.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"),
10549
10910
  "/(.*).json"
10550
10911
  )}`,
10551
- dest: `${path3.posix.join(
10912
+ dest: `${path4.posix.join(
10552
10913
  "/",
10553
10914
  basePath,
10554
10915
  "/$1",
@@ -10565,14 +10926,14 @@ function normalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataReso
10565
10926
  },
10566
10927
  // normalize "/index" from "/_next/data/index.json" to -> just "/"
10567
10928
  {
10568
- src: path3.posix.join("^/", basePath, "/index(?:/)?"),
10929
+ src: path4.posix.join("^/", basePath, "/index(?:/)?"),
10569
10930
  has: [
10570
10931
  {
10571
10932
  type: "header",
10572
10933
  key: "x-nextjs-data"
10573
10934
  }
10574
10935
  ],
10575
- dest: path3.posix.join("/", basePath, trailingSlash ? "/" : ""),
10936
+ dest: path4.posix.join("/", basePath, trailingSlash ? "/" : ""),
10576
10937
  ...isOverride ? { override: true } : {},
10577
10938
  continue: true
10578
10939
  }
@@ -10591,12 +10952,12 @@ function extractOnMatchRoutes(routing) {
10591
10952
  }
10592
10953
  function denormalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataResolving, isOverride = false) {
10593
10954
  if (!shouldHandleMiddlewareDataResolving) return [];
10594
- const path3 = require("node:path");
10955
+ const path4 = require("node:path");
10595
10956
  const basePath = config.basePath || "";
10596
10957
  const trailingSlash = config.trailingSlash || false;
10597
10958
  return [
10598
10959
  {
10599
- src: path3.posix.join(
10960
+ src: path4.posix.join(
10600
10961
  "^/",
10601
10962
  basePath && basePath !== "/" ? `${basePath}${trailingSlash ? "/$" : "$"}` : "$"
10602
10963
  ),
@@ -10606,7 +10967,7 @@ function denormalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataRe
10606
10967
  key: "x-nextjs-data"
10607
10968
  }
10608
10969
  ],
10609
- dest: `${path3.posix.join(
10970
+ dest: `${path4.posix.join(
10610
10971
  "/",
10611
10972
  basePath,
10612
10973
  "/_next/data/",
@@ -10617,14 +10978,14 @@ function denormalizeNextDataRoutes(config, buildId, shouldHandleMiddlewareDataRe
10617
10978
  ...isOverride ? { override: true } : {}
10618
10979
  },
10619
10980
  {
10620
- src: path3.posix.join("^/", basePath, "((?!_next/)(?:.*[^/]|.*))/?$"),
10981
+ src: path4.posix.join("^/", basePath, "((?!_next/)(?:.*[^/]|.*))/?$"),
10621
10982
  has: [
10622
10983
  {
10623
10984
  type: "header",
10624
10985
  key: "x-nextjs-data"
10625
10986
  }
10626
10987
  ],
10627
- dest: `${path3.posix.join(
10988
+ dest: `${path4.posix.join(
10628
10989
  "/",
10629
10990
  basePath,
10630
10991
  "/_next/data/",
@@ -10669,10 +11030,10 @@ if(enabled){
10669
11030
  var myAdapter = {
10670
11031
  name: "Vercel",
10671
11032
  async modifyConfig(config, ctx) {
10672
- if (ctx.phase === import_constants2.PHASE_PRODUCTION_BUILD && process.env.CI) {
11033
+ if (ctx.phase === import_constants3.PHASE_PRODUCTION_BUILD && process.env.CI) {
10673
11034
  process.env.TURBO_ENGINE_READ_CONCURRENCY = "4";
10674
11035
  }
10675
- if (ctx.phase === import_constants2.PHASE_PRODUCTION_BUILD) {
11036
+ if (ctx.phase === import_constants3.PHASE_PRODUCTION_BUILD) {
10676
11037
  config.experimental.supportsImmutableAssets = // Default to true, allow users to opt-out
10677
11038
  (config.experimental.supportsImmutableAssets ?? true) && // AND with infra support to allow disabling via feature flag if necessary.
10678
11039
  process.env.VERCEL_IMMUTABLE_STATIC_FILES_ENABLED === "1";
@@ -10680,15 +11041,15 @@ var myAdapter = {
10680
11041
  if (process.env.VERCEL_HASH_SALT != null) {
10681
11042
  config.experimental.outputHashSalt = (config.experimental.outputHashSalt ?? "") + process.env.VERCEL_HASH_SALT;
10682
11043
  }
10683
- if (ctx.phase === import_constants2.PHASE_PRODUCTION_BUILD && process.env.VERCEL_SKEW_PROTECTION_ENABLED === "1" && process.env.VERCEL_DEPLOYMENT_ID && !process.env.NEXT_DEPLOYMENT_ID && config.deploymentId == null) {
11044
+ if (ctx.phase === import_constants3.PHASE_PRODUCTION_BUILD && process.env.VERCEL_SKEW_PROTECTION_ENABLED === "1" && process.env.VERCEL_DEPLOYMENT_ID && !process.env.NEXT_DEPLOYMENT_ID && config.deploymentId == null) {
10684
11045
  config.deploymentId = process.env.VERCEL_DEPLOYMENT_ID;
10685
11046
  }
10686
- if (ctx.phase === import_constants2.PHASE_PRODUCTION_BUILD && process.env.VERCEL_PREVIEW_COMMENTS_ENABLED === "1" && // Only available in newer Next.js versions
11047
+ if (ctx.phase === import_constants3.PHASE_PRODUCTION_BUILD && process.env.VERCEL_PREVIEW_COMMENTS_ENABLED === "1" && // Only available in newer Next.js versions
10687
11048
  typeof ctx.projectDir !== "undefined") {
10688
- const dir = import_node_path2.default.join(ctx.projectDir, ".vercel/");
10689
- await import_promises2.default.mkdir(dir, { recursive: true });
10690
- await import_promises2.default.writeFile(
10691
- import_node_path2.default.join(dir, "adapter-toolbar-script.js"),
11049
+ const dir = import_node_path3.default.join(ctx.projectDir, ".vercel/");
11050
+ await import_promises3.default.mkdir(dir, { recursive: true });
11051
+ await import_promises3.default.writeFile(
11052
+ import_node_path3.default.join(dir, "adapter-toolbar-script.js"),
10692
11053
  generateToolbarScript(
10693
11054
  process.env.VERCEL_ENV === "production",
10694
11055
  process.env.VERCEL_PREVIEW_COMMENTS_OPT_IN === "1",
@@ -10715,8 +11076,9 @@ var myAdapter = {
10715
11076
  projectDir,
10716
11077
  nextVersion
10717
11078
  }) {
10718
- const vercelOutputDir = import_node_path2.default.join(distDir, "output");
10719
- await import_promises2.default.mkdir(vercelOutputDir, { recursive: true });
11079
+ const goOutputs = collectGoRouteOutputs(outputs);
11080
+ const vercelOutputDir = import_node_path3.default.join(distDir, "output");
11081
+ await import_promises3.default.mkdir(vercelOutputDir, { recursive: true });
10720
11082
  const escapedBuildId = escapeStringRegexp(buildId);
10721
11083
  const hasMiddleware = Boolean(outputs.middleware);
10722
11084
  const hasAppDir = outputs.appPages.length > 0 || outputs.appRoutes.length > 0;
@@ -10735,7 +11097,7 @@ var myAdapter = {
10735
11097
  images: getImagesConfig(config)
10736
11098
  };
10737
11099
  await handlePublicFiles(
10738
- import_node_path2.default.join(projectDir, "public"),
11100
+ import_node_path3.default.join(projectDir, "public"),
10739
11101
  vercelOutputDir,
10740
11102
  config
10741
11103
  );
@@ -10835,6 +11197,12 @@ var myAdapter = {
10835
11197
  vercelOutputDir,
10836
11198
  prerenderFallbackFalseMap
10837
11199
  });
11200
+ await handleGoOutputs(goOutputs, {
11201
+ config,
11202
+ projectDir,
11203
+ nextVersion,
11204
+ vercelOutputDir
11205
+ });
10838
11206
  await handlePrerenderOutputs(outputs.prerenders, {
10839
11207
  config,
10840
11208
  hasAppEntries: outputs.appPages.length > 0,
@@ -10861,22 +11229,28 @@ var myAdapter = {
10861
11229
  const headers = extractHeaders(routing);
10862
11230
  const onMatchRoutes = extractOnMatchRoutes(routing);
10863
11231
  const dynamicRoutes = [];
11232
+ const goPathnames = new Set(goOutputs.map((output) => output.pathname));
11233
+ const otherPathnames = new Set(
11234
+ [...nodeOutputs, ...edgeOutputs].map((output) => output.pathname)
11235
+ );
10864
11236
  let addedNextData404Route = false;
10865
11237
  for (const route of routing.dynamicRoutes) {
10866
11238
  if (hasPagesDir && !hasMiddleware) {
10867
11239
  if (!route.sourceRegex.includes("_next/data") && !addedNextData404Route) {
10868
11240
  addedNextData404Route = true;
10869
11241
  dynamicRoutes.push({
10870
- src: import_node_path2.default.posix.join("/", config.basePath || "", "_next/data/(.*)"),
10871
- dest: import_node_path2.default.posix.join("/", config.basePath || "", "404"),
11242
+ src: import_node_path3.default.posix.join("/", config.basePath || "", "_next/data/(.*)"),
11243
+ dest: import_node_path3.default.posix.join("/", config.basePath || "", "404"),
10872
11244
  status: 404,
10873
11245
  check: true
10874
11246
  });
10875
11247
  }
10876
11248
  }
11249
+ const sourcePath = route.source ? import_node_path3.default.posix.join("/", config.basePath || "", route.source) : void 0;
11250
+ const isGoRoute = sourcePath && (goPathnames.has(sourcePath) || !otherPathnames.has(sourcePath) && sourcePath.endsWith(".rsc") && goPathnames.has(sourcePath.slice(0, -4)));
10877
11251
  dynamicRoutes.push({
10878
11252
  src: route.sourceRegex,
10879
- dest: route.destination,
11253
+ dest: isGoRoute ? removeGoRouteParams(route.destination) : route.destination,
10880
11254
  check: true,
10881
11255
  has: route.has,
10882
11256
  missing: route.missing
@@ -10906,31 +11280,31 @@ var myAdapter = {
10906
11280
  // $wildcard
10907
11281
  // This is split into two rules to avoid matching the `/index` route as it causes issues with trailing slash redirect
10908
11282
  {
10909
- src: `^${import_node_path2.default.posix.join(
11283
+ src: `^${import_node_path3.default.posix.join(
10910
11284
  "/",
10911
11285
  config.basePath,
10912
11286
  "/"
10913
11287
  )}(?!(?:_next/.*|${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})(?:/.*|$))$`,
10914
11288
  // we aren't able to ensure trailing slash mode here
10915
11289
  // so ensure this comes after the trailing slash redirect
10916
- dest: `${config.basePath && config.basePath !== "/" ? import_node_path2.default.posix.join("/", config.basePath) : ""}$wildcard${config.trailingSlash ? "/" : ""}`,
11290
+ dest: `${config.basePath && config.basePath !== "/" ? import_node_path3.default.posix.join("/", config.basePath) : ""}$wildcard${config.trailingSlash ? "/" : ""}`,
10917
11291
  continue: true
10918
11292
  },
10919
11293
  {
10920
- src: `^${import_node_path2.default.posix.join(
11294
+ src: `^${import_node_path3.default.posix.join(
10921
11295
  "/",
10922
11296
  config.basePath,
10923
11297
  "/"
10924
11298
  )}(?!(?:_next/.*|${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})(?:/.*|$))(.*)$`,
10925
11299
  // we aren't able to ensure trailing slash mode here
10926
11300
  // so ensure this comes after the trailing slash redirect
10927
- dest: `${config.basePath && config.basePath !== "/" ? import_node_path2.default.posix.join("/", config.basePath) : ""}$wildcard/$1`,
11301
+ dest: `${config.basePath && config.basePath !== "/" ? import_node_path3.default.posix.join("/", config.basePath) : ""}$wildcard/$1`,
10928
11302
  continue: true
10929
11303
  },
10930
11304
  // Handle redirecting to locale specific domains
10931
11305
  ...config.i18n.domains && config.i18n.domains.length > 0 && config.i18n.localeDetection !== false ? [
10932
11306
  {
10933
- src: `^${import_node_path2.default.posix.join(
11307
+ src: `^${import_node_path3.default.posix.join(
10934
11308
  "/",
10935
11309
  config.basePath
10936
11310
  )}/?(?:${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})?/?$`,
@@ -10977,8 +11351,8 @@ var myAdapter = {
10977
11351
  // when `skipDefaultLocaleRewrite` is not flagged on
10978
11352
  // and when localeDetection is enabled.
10979
11353
  {
10980
- src: `^${import_node_path2.default.posix.join("/", config.basePath)}$`,
10981
- dest: `${import_node_path2.default.posix.join(
11354
+ src: `^${import_node_path3.default.posix.join("/", config.basePath)}$`,
11355
+ dest: `${import_node_path3.default.posix.join(
10982
11356
  "/",
10983
11357
  config.basePath,
10984
11358
  config.i18n.defaultLocale
@@ -10991,12 +11365,12 @@ var myAdapter = {
10991
11365
  // e.g. for /de/posts/[slug] x-now-route-matches would have
10992
11366
  // 1=posts%2Fpost-1
10993
11367
  {
10994
- src: `^${import_node_path2.default.posix.join(
11368
+ src: `^${import_node_path3.default.posix.join(
10995
11369
  "/",
10996
11370
  config.basePath,
10997
11371
  "/"
10998
11372
  )}(?!(?:_next/.*|${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})(?:/.*|$))(.*)$`,
10999
- dest: `${import_node_path2.default.posix.join(
11373
+ dest: `${import_node_path3.default.posix.join(
11000
11374
  "/",
11001
11375
  config.basePath,
11002
11376
  config.i18n.defaultLocale
@@ -11013,7 +11387,7 @@ var myAdapter = {
11013
11387
  // add 404 handling if /404 or locale variants are requested literally
11014
11388
  ...config.i18n ? [
11015
11389
  {
11016
- src: `${import_node_path2.default.posix.join(
11390
+ src: `${import_node_path3.default.posix.join(
11017
11391
  "/",
11018
11392
  config.basePath,
11019
11393
  "/"
@@ -11029,7 +11403,7 @@ var myAdapter = {
11029
11403
  }
11030
11404
  ] : [
11031
11405
  {
11032
- src: import_node_path2.default.posix.join("/", config.basePath, "404/?"),
11406
+ src: import_node_path3.default.posix.join("/", config.basePath, "404/?"),
11033
11407
  status: 404,
11034
11408
  continue: true,
11035
11409
  missing: [
@@ -11043,7 +11417,7 @@ var myAdapter = {
11043
11417
  // add 500 handling if /500 or locale variants are requested literally
11044
11418
  ...config.i18n ? [
11045
11419
  {
11046
- src: `${import_node_path2.default.posix.join(
11420
+ src: `${import_node_path3.default.posix.join(
11047
11421
  "/",
11048
11422
  config.basePath,
11049
11423
  "/"
@@ -11053,7 +11427,7 @@ var myAdapter = {
11053
11427
  }
11054
11428
  ] : [
11055
11429
  {
11056
- src: import_node_path2.default.posix.join("/", config.basePath, "500/?"),
11430
+ src: import_node_path3.default.posix.join("/", config.basePath, "500/?"),
11057
11431
  status: 500,
11058
11432
  continue: true
11059
11433
  }
@@ -11068,12 +11442,12 @@ var myAdapter = {
11068
11442
  // RSC and prefetch request handling for App Router
11069
11443
  ...hasAppDir ? [
11070
11444
  {
11071
- src: import_node_path2.default.posix.join(
11445
+ src: import_node_path3.default.posix.join(
11072
11446
  "/",
11073
11447
  config.basePath,
11074
11448
  "/(?<path>.+?)(?:/)?$"
11075
11449
  ),
11076
- dest: import_node_path2.default.posix.join(
11450
+ dest: import_node_path3.default.posix.join(
11077
11451
  "/",
11078
11452
  config.basePath,
11079
11453
  `/$path${routing.rsc.prefetchSegmentDirSuffix}/$segmentPath${routing.rsc.prefetchSegmentSuffix}`
@@ -11099,8 +11473,8 @@ var myAdapter = {
11099
11473
  override: true
11100
11474
  },
11101
11475
  {
11102
- src: import_node_path2.default.posix.join("^/", config.basePath, "/?$"),
11103
- dest: import_node_path2.default.posix.join(
11476
+ src: import_node_path3.default.posix.join("^/", config.basePath, "/?$"),
11477
+ dest: import_node_path3.default.posix.join(
11104
11478
  "/",
11105
11479
  config.basePath,
11106
11480
  `/index${routing.rsc.prefetchSegmentDirSuffix}/$segmentPath${routing.rsc.prefetchSegmentSuffix}`
@@ -11126,7 +11500,7 @@ var myAdapter = {
11126
11500
  override: true
11127
11501
  },
11128
11502
  {
11129
- src: `^${import_node_path2.default.posix.join("/", config.basePath, "/?")}`,
11503
+ src: `^${import_node_path3.default.posix.join("/", config.basePath, "/?")}`,
11130
11504
  has: [
11131
11505
  {
11132
11506
  type: "header",
@@ -11134,7 +11508,7 @@ var myAdapter = {
11134
11508
  value: "1"
11135
11509
  }
11136
11510
  ],
11137
- dest: import_node_path2.default.posix.join("/", config.basePath, "/index.rsc"),
11511
+ dest: import_node_path3.default.posix.join("/", config.basePath, "/index.rsc"),
11138
11512
  headers: {
11139
11513
  vary: routing.rsc.varyHeader
11140
11514
  },
@@ -11142,7 +11516,7 @@ var myAdapter = {
11142
11516
  override: true
11143
11517
  },
11144
11518
  {
11145
- src: `^${import_node_path2.default.posix.join(
11519
+ src: `^${import_node_path3.default.posix.join(
11146
11520
  "/",
11147
11521
  config.basePath,
11148
11522
  "/((?!.+\\.rsc).+?)(?:/)?$"
@@ -11154,7 +11528,7 @@ var myAdapter = {
11154
11528
  value: "1"
11155
11529
  }
11156
11530
  ],
11157
- dest: import_node_path2.default.posix.join("/", config.basePath, "/$1.rsc"),
11531
+ dest: import_node_path3.default.posix.join("/", config.basePath, "/$1.rsc"),
11158
11532
  headers: {
11159
11533
  vary: routing.rsc.varyHeader
11160
11534
  },
@@ -11167,7 +11541,7 @@ var myAdapter = {
11167
11541
  // _next/image path
11168
11542
  ...config.basePath ? [
11169
11543
  {
11170
- src: import_node_path2.default.posix.join("/", config.basePath, "_next/image/?"),
11544
+ src: import_node_path3.default.posix.join("/", config.basePath, "_next/image/?"),
11171
11545
  dest: "/_next/image",
11172
11546
  check: true
11173
11547
  }
@@ -11183,20 +11557,20 @@ var myAdapter = {
11183
11557
  // No-op _next/data rewrite to trigger handle: 'rewrites' and then 404
11184
11558
  // if no match to prevent rewriting _next/data unexpectedly
11185
11559
  {
11186
- src: import_node_path2.default.posix.join("/", config.basePath, "_next/data/(.*)"),
11187
- dest: import_node_path2.default.posix.join("/", config.basePath, "_next/data/$1"),
11560
+ src: import_node_path3.default.posix.join("/", config.basePath, "_next/data/(.*)"),
11561
+ dest: import_node_path3.default.posix.join("/", config.basePath, "_next/data/$1"),
11188
11562
  check: true
11189
11563
  }
11190
11564
  ] : [],
11191
11565
  // normalize /index.rsc to just / for App Router
11192
11566
  ...hasAppDir ? [
11193
11567
  {
11194
- src: import_node_path2.default.posix.join(
11568
+ src: import_node_path3.default.posix.join(
11195
11569
  "/",
11196
11570
  config.basePath,
11197
11571
  "/index(\\.action|\\.rsc)"
11198
11572
  ),
11199
- dest: import_node_path2.default.posix.join("/", config.basePath),
11573
+ dest: import_node_path3.default.posix.join("/", config.basePath),
11200
11574
  continue: true
11201
11575
  }
11202
11576
  ] : [],
@@ -11204,13 +11578,13 @@ var myAdapter = {
11204
11578
  // ensure bad rewrites with /.rsc are fixed for App Router
11205
11579
  ...hasAppDir ? [
11206
11580
  {
11207
- src: import_node_path2.default.posix.join("/", config.basePath, "/\\.rsc$"),
11208
- dest: import_node_path2.default.posix.join("/", config.basePath, `/index.rsc`),
11581
+ src: import_node_path3.default.posix.join("/", config.basePath, "/\\.rsc$"),
11582
+ dest: import_node_path3.default.posix.join("/", config.basePath, `/index.rsc`),
11209
11583
  check: true
11210
11584
  },
11211
11585
  {
11212
- src: import_node_path2.default.posix.join("/", config.basePath, "(.+)/\\.rsc$"),
11213
- dest: import_node_path2.default.posix.join("/", config.basePath, "$1.rsc"),
11586
+ src: import_node_path3.default.posix.join("/", config.basePath, "(.+)/\\.rsc$"),
11587
+ dest: import_node_path3.default.posix.join("/", config.basePath, "$1.rsc"),
11214
11588
  check: true
11215
11589
  }
11216
11590
  ] : [],
@@ -11218,14 +11592,14 @@ var myAdapter = {
11218
11592
  ...convertedRewrites.fallback,
11219
11593
  // make sure 404 page is used when a directory is matched without
11220
11594
  // an index page
11221
- { src: import_node_path2.default.posix.join("/", config.basePath, ".*"), status: 404 },
11595
+ { src: import_node_path3.default.posix.join("/", config.basePath, ".*"), status: 404 },
11222
11596
  { handle: "miss" },
11223
11597
  // 404 to plain text file for _next/static
11224
11598
  {
11225
- src: import_node_path2.default.posix.join("/", config.basePath, "_next/static/.+"),
11599
+ src: import_node_path3.default.posix.join("/", config.basePath, "_next/static/.+"),
11226
11600
  status: 404,
11227
11601
  check: true,
11228
- dest: import_node_path2.default.posix.join(
11602
+ dest: import_node_path3.default.posix.join(
11229
11603
  "/",
11230
11604
  config.basePath,
11231
11605
  "_next/static/not-found.txt"
@@ -11242,8 +11616,8 @@ var myAdapter = {
11242
11616
  // we only want to add the rewrite as the fallback case once routing is complete.
11243
11617
  ...config.i18n?.localeDetection === false ? [
11244
11618
  {
11245
- src: `^${import_node_path2.default.posix.join("/", config.basePath)}$`,
11246
- dest: `${import_node_path2.default.posix.join(
11619
+ src: `^${import_node_path3.default.posix.join("/", config.basePath)}$`,
11620
+ dest: `${import_node_path3.default.posix.join(
11247
11621
  "/",
11248
11622
  config.basePath,
11249
11623
  config.i18n.defaultLocale
@@ -11256,12 +11630,12 @@ var myAdapter = {
11256
11630
  // e.g. for /de/posts/[slug] x-now-route-matches would have
11257
11631
  // 1=posts%2Fpost-1
11258
11632
  {
11259
- src: `^${import_node_path2.default.posix.join(
11633
+ src: `^${import_node_path3.default.posix.join(
11260
11634
  "/",
11261
11635
  config.basePath,
11262
11636
  "/"
11263
11637
  )}(?!(?:_next/.*|${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})(?:/.*|$))(.*)$`,
11264
- dest: `${import_node_path2.default.posix.join(
11638
+ dest: `${import_node_path3.default.posix.join(
11265
11639
  "/",
11266
11640
  config.basePath,
11267
11641
  config.i18n.defaultLocale
@@ -11270,7 +11644,7 @@ var myAdapter = {
11270
11644
  }
11271
11645
  ] : [],
11272
11646
  {
11273
- src: import_node_path2.default.posix.join(
11647
+ src: import_node_path3.default.posix.join(
11274
11648
  "/",
11275
11649
  config.basePath,
11276
11650
  escapeStringRegexp(config.i18n.defaultLocale)
@@ -11279,11 +11653,11 @@ var myAdapter = {
11279
11653
  check: true
11280
11654
  },
11281
11655
  {
11282
- src: `^${import_node_path2.default.posix.join(
11656
+ src: `^${import_node_path3.default.posix.join(
11283
11657
  "/",
11284
11658
  config.basePath
11285
11659
  )}/?(?:${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})/(.*)`,
11286
- dest: `${import_node_path2.default.posix.join("/", config.basePath, "/")}$1`,
11660
+ dest: `${import_node_path3.default.posix.join("/", config.basePath, "/")}$1`,
11287
11661
  check: true
11288
11662
  }
11289
11663
  ] : [],
@@ -11312,7 +11686,7 @@ var myAdapter = {
11312
11686
  // if middleware + pages - placeholder for middleware handling
11313
11687
  ...hasMiddleware ? [
11314
11688
  {
11315
- src: `^${import_node_path2.default.posix.join(
11689
+ src: `^${import_node_path3.default.posix.join(
11316
11690
  "/",
11317
11691
  config.basePath,
11318
11692
  "/_next/data/",
@@ -11328,7 +11702,7 @@ var myAdapter = {
11328
11702
  // add a catch-all data route so we don't 404 when getting
11329
11703
  // middleware effects
11330
11704
  {
11331
- src: `^${import_node_path2.default.posix.join(
11705
+ src: `^${import_node_path3.default.posix.join(
11332
11706
  "/",
11333
11707
  config.basePath,
11334
11708
  "/_next/data/",
@@ -11342,7 +11716,7 @@ var myAdapter = {
11342
11716
  ...onMatchRoutes,
11343
11717
  // add internal matched path header for function bundle mapping
11344
11718
  {
11345
- src: config.basePath && config.basePath !== "/" ? import_node_path2.default.posix.join("/", config.basePath, "/?(?:index)?(?:/)?$") : `/(?:index)?(?:/)?$`,
11719
+ src: config.basePath && config.basePath !== "/" ? import_node_path3.default.posix.join("/", config.basePath, "/?(?:index)?(?:/)?$") : `/(?:index)?(?:/)?$`,
11346
11720
  headers: {
11347
11721
  "x-matched-path": "/"
11348
11722
  },
@@ -11350,7 +11724,7 @@ var myAdapter = {
11350
11724
  important: true
11351
11725
  },
11352
11726
  {
11353
- src: import_node_path2.default.posix.join(
11727
+ src: import_node_path3.default.posix.join(
11354
11728
  "/",
11355
11729
  config.basePath || "",
11356
11730
  `/((?!index$).*?)(?:/)?$`
@@ -11365,12 +11739,12 @@ var myAdapter = {
11365
11739
  // Custom Next.js 404 page
11366
11740
  ...config.i18n ? [
11367
11741
  {
11368
- src: `${import_node_path2.default.posix.join(
11742
+ src: `${import_node_path3.default.posix.join(
11369
11743
  "/",
11370
11744
  config.basePath,
11371
11745
  "/"
11372
11746
  )}(?<nextLocale>${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})(/.*|$)`,
11373
- dest: import_node_path2.default.posix.join(
11747
+ dest: import_node_path3.default.posix.join(
11374
11748
  "/",
11375
11749
  config.basePath,
11376
11750
  "/$nextLocale",
@@ -11380,8 +11754,8 @@ var myAdapter = {
11380
11754
  caseSensitive: true
11381
11755
  },
11382
11756
  {
11383
- src: import_node_path2.default.posix.join("/", config.basePath, ".*"),
11384
- dest: import_node_path2.default.posix.join(
11757
+ src: import_node_path3.default.posix.join("/", config.basePath, ".*"),
11758
+ dest: import_node_path3.default.posix.join(
11385
11759
  "/",
11386
11760
  config.basePath,
11387
11761
  `/${config.i18n.defaultLocale}`,
@@ -11391,7 +11765,7 @@ var myAdapter = {
11391
11765
  }
11392
11766
  ] : [
11393
11767
  {
11394
- src: import_node_path2.default.posix.join(
11768
+ src: import_node_path3.default.posix.join(
11395
11769
  "/",
11396
11770
  config.basePath,
11397
11771
  // if config.basePath is populated we need to
@@ -11399,25 +11773,25 @@ var myAdapter = {
11399
11773
  // that the config.basePath (basePath) itself matches
11400
11774
  `${config.basePath && config.basePath !== "/" ? "?" : ""}.*`
11401
11775
  ),
11402
- dest: import_node_path2.default.posix.join("/", config.basePath, notFoundPath),
11776
+ dest: import_node_path3.default.posix.join("/", config.basePath, notFoundPath),
11403
11777
  status: 404
11404
11778
  }
11405
11779
  ],
11406
11780
  // custom 500 page if present
11407
11781
  ...config.i18n && has500Output ? [
11408
11782
  {
11409
- src: `${import_node_path2.default.posix.join(
11783
+ src: `${import_node_path3.default.posix.join(
11410
11784
  "/",
11411
11785
  config.basePath,
11412
11786
  "/"
11413
11787
  )}(?<nextLocale>${config.i18n.locales.map((locale) => escapeStringRegexp(locale)).join("|")})(/.*|$)`,
11414
- dest: import_node_path2.default.posix.join("/", config.basePath, "/$nextLocale/500"),
11788
+ dest: import_node_path3.default.posix.join("/", config.basePath, "/$nextLocale/500"),
11415
11789
  status: 500,
11416
11790
  caseSensitive: true
11417
11791
  },
11418
11792
  {
11419
- src: import_node_path2.default.posix.join("/", config.basePath, ".*"),
11420
- dest: import_node_path2.default.posix.join(
11793
+ src: import_node_path3.default.posix.join("/", config.basePath, ".*"),
11794
+ dest: import_node_path3.default.posix.join(
11421
11795
  "/",
11422
11796
  config.basePath,
11423
11797
  `/${config.i18n.defaultLocale}/500`
@@ -11426,7 +11800,7 @@ var myAdapter = {
11426
11800
  }
11427
11801
  ] : [
11428
11802
  {
11429
- src: import_node_path2.default.posix.join(
11803
+ src: import_node_path3.default.posix.join(
11430
11804
  "/",
11431
11805
  config.basePath,
11432
11806
  // if config.basePath is populated we need to
@@ -11434,7 +11808,7 @@ var myAdapter = {
11434
11808
  // that the config.basePath (basePath) itself matches
11435
11809
  `${config.basePath && config.basePath !== "/" ? "?" : ""}.*`
11436
11810
  ),
11437
- dest: import_node_path2.default.posix.join(
11811
+ dest: import_node_path3.default.posix.join(
11438
11812
  "/",
11439
11813
  config.basePath,
11440
11814
  has500Output ? "/500" : "/_error"
@@ -11443,8 +11817,8 @@ var myAdapter = {
11443
11817
  }
11444
11818
  ]
11445
11819
  ];
11446
- const outputConfigPath = import_node_path2.default.join(vercelOutputDir, "config.json");
11447
- await import_promises2.default.writeFile(outputConfigPath, JSON.stringify(vercelConfig2, null, 2));
11820
+ const outputConfigPath = import_node_path3.default.join(vercelOutputDir, "config.json");
11821
+ await import_promises3.default.writeFile(outputConfigPath, JSON.stringify(vercelConfig2, null, 2));
11448
11822
  }
11449
11823
  };
11450
11824
  module.exports = myAdapter;