@vercel/next 4.12.0 → 4.12.2

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.
Files changed (2) hide show
  1. package/dist/index.js +774 -624
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -128,7 +128,7 @@ var require_dist = __commonJS({
128
128
  var result = [];
129
129
  var key = 0;
130
130
  var i = 0;
131
- var path5 = "";
131
+ var path6 = "";
132
132
  var tryConsume = function(type) {
133
133
  if (i < tokens.length && tokens[i].type === type)
134
134
  return tokens[i++].value;
@@ -155,12 +155,12 @@ var require_dist = __commonJS({
155
155
  if (name || pattern) {
156
156
  var prefix = char || "";
157
157
  if (prefixes.indexOf(prefix) === -1) {
158
- path5 += prefix;
158
+ path6 += prefix;
159
159
  prefix = "";
160
160
  }
161
- if (path5) {
162
- result.push(path5);
163
- path5 = "";
161
+ if (path6) {
162
+ result.push(path6);
163
+ path6 = "";
164
164
  }
165
165
  result.push({
166
166
  name: name || key++,
@@ -173,12 +173,12 @@ var require_dist = __commonJS({
173
173
  }
174
174
  var value = char || tryConsume("ESCAPED_CHAR");
175
175
  if (value) {
176
- path5 += value;
176
+ path6 += value;
177
177
  continue;
178
178
  }
179
- if (path5) {
180
- result.push(path5);
181
- path5 = "";
179
+ if (path6) {
180
+ result.push(path6);
181
+ path6 = "";
182
182
  }
183
183
  var open = tryConsume("OPEN");
184
184
  if (open) {
@@ -219,11 +219,11 @@ var require_dist = __commonJS({
219
219
  }
220
220
  });
221
221
  return function(data) {
222
- var path5 = "";
222
+ var path6 = "";
223
223
  for (var i = 0; i < tokens.length; i++) {
224
224
  var token = tokens[i];
225
225
  if (typeof token === "string") {
226
- path5 += token;
226
+ path6 += token;
227
227
  continue;
228
228
  }
229
229
  var value = data ? data[token.name] : void 0;
@@ -243,7 +243,7 @@ var require_dist = __commonJS({
243
243
  if (validate && !matches[i].test(segment)) {
244
244
  throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but got "' + segment + '"');
245
245
  }
246
- path5 += token.prefix + segment + token.suffix;
246
+ path6 += token.prefix + segment + token.suffix;
247
247
  }
248
248
  continue;
249
249
  }
@@ -252,7 +252,7 @@ var require_dist = __commonJS({
252
252
  if (validate && !matches[i].test(segment)) {
253
253
  throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but got "' + segment + '"');
254
254
  }
255
- path5 += token.prefix + segment + token.suffix;
255
+ path6 += token.prefix + segment + token.suffix;
256
256
  continue;
257
257
  }
258
258
  if (optional)
@@ -260,7 +260,7 @@ var require_dist = __commonJS({
260
260
  var typeOfMessage = repeat ? "an array" : "a string";
261
261
  throw new TypeError('Expected "' + token.name + '" to be ' + typeOfMessage);
262
262
  }
263
- return path5;
263
+ return path6;
264
264
  };
265
265
  }
266
266
  exports.tokensToFunction = tokensToFunction;
@@ -281,7 +281,7 @@ var require_dist = __commonJS({
281
281
  var m = re.exec(pathname);
282
282
  if (!m)
283
283
  return false;
284
- var path5 = m[0], index = m.index;
284
+ var path6 = m[0], index = m.index;
285
285
  var params = /* @__PURE__ */ Object.create(null);
286
286
  var _loop_1 = function(i2) {
287
287
  if (m[i2] === void 0)
@@ -298,7 +298,7 @@ var require_dist = __commonJS({
298
298
  for (var i = 1; i < m.length; i++) {
299
299
  _loop_1(i);
300
300
  }
301
- return { path: path5, index, params };
301
+ return { path: path6, index, params };
302
302
  };
303
303
  }
304
304
  exports.regexpToFunction = regexpToFunction;
@@ -308,10 +308,10 @@ var require_dist = __commonJS({
308
308
  function flags(options) {
309
309
  return options && options.sensitive ? "" : "i";
310
310
  }
311
- function regexpToRegexp(path5, keys) {
311
+ function regexpToRegexp(path6, keys) {
312
312
  if (!keys)
313
- return path5;
314
- var groups = path5.source.match(/\((?!\?)/g);
313
+ return path6;
314
+ var groups = path6.source.match(/\((?!\?)/g);
315
315
  if (groups) {
316
316
  for (var i = 0; i < groups.length; i++) {
317
317
  keys.push({
@@ -323,16 +323,16 @@ var require_dist = __commonJS({
323
323
  });
324
324
  }
325
325
  }
326
- return path5;
326
+ return path6;
327
327
  }
328
328
  function arrayToRegexp(paths, keys, options) {
329
- var parts = paths.map(function(path5) {
330
- return pathToRegexp(path5, keys, options).source;
329
+ var parts = paths.map(function(path6) {
330
+ return pathToRegexp(path6, keys, options).source;
331
331
  });
332
332
  return new RegExp("(?:" + parts.join("|") + ")", flags(options));
333
333
  }
334
- function stringToRegexp(path5, keys, options) {
335
- return tokensToRegexp(parse(path5, options), keys, options);
334
+ function stringToRegexp(path6, keys, options) {
335
+ return tokensToRegexp(parse(path6, options), keys, options);
336
336
  }
337
337
  function tokensToRegexp(tokens, keys, options) {
338
338
  if (options === void 0) {
@@ -389,12 +389,12 @@ var require_dist = __commonJS({
389
389
  return new RegExp(route, flags(options));
390
390
  }
391
391
  exports.tokensToRegexp = tokensToRegexp;
392
- function pathToRegexp(path5, keys, options) {
393
- if (path5 instanceof RegExp)
394
- return regexpToRegexp(path5, keys);
395
- if (Array.isArray(path5))
396
- return arrayToRegexp(path5, keys, options);
397
- return stringToRegexp(path5, keys, options);
392
+ function pathToRegexp(path6, keys, options) {
393
+ if (path6 instanceof RegExp)
394
+ return regexpToRegexp(path6, keys);
395
+ if (Array.isArray(path6))
396
+ return arrayToRegexp(path6, keys, options);
397
+ return stringToRegexp(path6, keys, options);
398
398
  }
399
399
  exports.pathToRegexp = pathToRegexp;
400
400
  }
@@ -498,7 +498,7 @@ var require_dist2 = __commonJS({
498
498
  var result = [];
499
499
  var key = 0;
500
500
  var i = 0;
501
- var path5 = "";
501
+ var path6 = "";
502
502
  var tryConsume = function(type) {
503
503
  if (i < tokens.length && tokens[i].type === type)
504
504
  return tokens[i++].value;
@@ -543,12 +543,12 @@ var require_dist2 = __commonJS({
543
543
  if (name || pattern) {
544
544
  var prefix = char || "";
545
545
  if (prefixes.indexOf(prefix) === -1) {
546
- path5 += prefix;
546
+ path6 += prefix;
547
547
  prefix = "";
548
548
  }
549
- if (path5) {
550
- result.push(path5);
551
- path5 = "";
549
+ if (path6) {
550
+ result.push(path6);
551
+ path6 = "";
552
552
  }
553
553
  result.push({
554
554
  name: name || key++,
@@ -561,12 +561,12 @@ var require_dist2 = __commonJS({
561
561
  }
562
562
  var value = char || tryConsume("ESCAPED_CHAR");
563
563
  if (value) {
564
- path5 += value;
564
+ path6 += value;
565
565
  continue;
566
566
  }
567
- if (path5) {
568
- result.push(path5);
569
- path5 = "";
567
+ if (path6) {
568
+ result.push(path6);
569
+ path6 = "";
570
570
  }
571
571
  var open = tryConsume("OPEN");
572
572
  if (open) {
@@ -607,11 +607,11 @@ var require_dist2 = __commonJS({
607
607
  }
608
608
  });
609
609
  return function(data) {
610
- var path5 = "";
610
+ var path6 = "";
611
611
  for (var i = 0; i < tokens.length; i++) {
612
612
  var token = tokens[i];
613
613
  if (typeof token === "string") {
614
- path5 += token;
614
+ path6 += token;
615
615
  continue;
616
616
  }
617
617
  var value = data ? data[token.name] : void 0;
@@ -631,7 +631,7 @@ var require_dist2 = __commonJS({
631
631
  if (validate && !matches[i].test(segment)) {
632
632
  throw new TypeError('Expected all "'.concat(token.name, '" to match "').concat(token.pattern, '", but got "').concat(segment, '"'));
633
633
  }
634
- path5 += token.prefix + segment + token.suffix;
634
+ path6 += token.prefix + segment + token.suffix;
635
635
  }
636
636
  continue;
637
637
  }
@@ -640,7 +640,7 @@ var require_dist2 = __commonJS({
640
640
  if (validate && !matches[i].test(segment)) {
641
641
  throw new TypeError('Expected "'.concat(token.name, '" to match "').concat(token.pattern, '", but got "').concat(segment, '"'));
642
642
  }
643
- path5 += token.prefix + segment + token.suffix;
643
+ path6 += token.prefix + segment + token.suffix;
644
644
  continue;
645
645
  }
646
646
  if (optional)
@@ -648,7 +648,7 @@ var require_dist2 = __commonJS({
648
648
  var typeOfMessage = repeat ? "an array" : "a string";
649
649
  throw new TypeError('Expected "'.concat(token.name, '" to be ').concat(typeOfMessage));
650
650
  }
651
- return path5;
651
+ return path6;
652
652
  };
653
653
  }
654
654
  exports.tokensToFunction = tokensToFunction;
@@ -669,7 +669,7 @@ var require_dist2 = __commonJS({
669
669
  var m = re.exec(pathname);
670
670
  if (!m)
671
671
  return false;
672
- var path5 = m[0], index = m.index;
672
+ var path6 = m[0], index = m.index;
673
673
  var params = /* @__PURE__ */ Object.create(null);
674
674
  var _loop_1 = function(i2) {
675
675
  if (m[i2] === void 0)
@@ -686,7 +686,7 @@ var require_dist2 = __commonJS({
686
686
  for (var i = 1; i < m.length; i++) {
687
687
  _loop_1(i);
688
688
  }
689
- return { path: path5, index, params };
689
+ return { path: path6, index, params };
690
690
  };
691
691
  }
692
692
  exports.regexpToFunction = regexpToFunction;
@@ -696,12 +696,12 @@ var require_dist2 = __commonJS({
696
696
  function flags(options) {
697
697
  return options && options.sensitive ? "" : "i";
698
698
  }
699
- function regexpToRegexp(path5, keys) {
699
+ function regexpToRegexp(path6, keys) {
700
700
  if (!keys)
701
- return path5;
701
+ return path6;
702
702
  var groupsRegex = /\((?:\?<(.*?)>)?(?!\?)/g;
703
703
  var index = 0;
704
- var execResult = groupsRegex.exec(path5.source);
704
+ var execResult = groupsRegex.exec(path6.source);
705
705
  while (execResult) {
706
706
  keys.push({
707
707
  // Use parenthesized substring match if available, index otherwise
@@ -711,18 +711,18 @@ var require_dist2 = __commonJS({
711
711
  modifier: "",
712
712
  pattern: ""
713
713
  });
714
- execResult = groupsRegex.exec(path5.source);
714
+ execResult = groupsRegex.exec(path6.source);
715
715
  }
716
- return path5;
716
+ return path6;
717
717
  }
718
718
  function arrayToRegexp(paths, keys, options) {
719
- var parts = paths.map(function(path5) {
720
- return pathToRegexp(path5, keys, options).source;
719
+ var parts = paths.map(function(path6) {
720
+ return pathToRegexp(path6, keys, options).source;
721
721
  });
722
722
  return new RegExp("(?:".concat(parts.join("|"), ")"), flags(options));
723
723
  }
724
- function stringToRegexp(path5, keys, options) {
725
- return tokensToRegexp(parse(path5, options), keys, options);
724
+ function stringToRegexp(path6, keys, options) {
725
+ return tokensToRegexp(parse(path6, options), keys, options);
726
726
  }
727
727
  function tokensToRegexp(tokens, keys, options) {
728
728
  if (options === void 0) {
@@ -779,12 +779,12 @@ var require_dist2 = __commonJS({
779
779
  return new RegExp(route, flags(options));
780
780
  }
781
781
  exports.tokensToRegexp = tokensToRegexp;
782
- function pathToRegexp(path5, keys, options) {
783
- if (path5 instanceof RegExp)
784
- return regexpToRegexp(path5, keys);
785
- if (Array.isArray(path5))
786
- return arrayToRegexp(path5, keys, options);
787
- return stringToRegexp(path5, keys, options);
782
+ function pathToRegexp(path6, keys, options) {
783
+ if (path6 instanceof RegExp)
784
+ return regexpToRegexp(path6, keys);
785
+ if (Array.isArray(path6))
786
+ return arrayToRegexp(path6, keys, options);
787
+ return stringToRegexp(path6, keys, options);
788
788
  }
789
789
  exports.pathToRegexp = pathToRegexp;
790
790
  }
@@ -838,16 +838,16 @@ var require_superstatic = __commonJS({
838
838
  const rightSerialized = typeof right === "undefined" ? "undefined" : right.toString();
839
839
  return leftSerialized === rightSerialized;
840
840
  }
841
- function pathToRegexp(callerId, path5, keys, options) {
841
+ function pathToRegexp(callerId, path6, keys, options) {
842
842
  const newKeys = cloneKeys(keys);
843
- const currentRegExp = (0, import_path_to_regexp.pathToRegexp)(path5, keys, options);
843
+ const currentRegExp = (0, import_path_to_regexp.pathToRegexp)(path6, keys, options);
844
844
  try {
845
845
  const currentKeys = keys;
846
- const newRegExp = (0, import_path_to_regexp_updated.pathToRegexp)(path5, newKeys, options);
846
+ const newRegExp = (0, import_path_to_regexp_updated.pathToRegexp)(path6, newKeys, options);
847
847
  const isDiffRegExp = currentRegExp.toString() !== newRegExp.toString();
848
848
  if (process.env.FORCE_PATH_TO_REGEXP_LOG || isDiffRegExp) {
849
849
  const message = JSON.stringify({
850
- path: path5,
850
+ path: path6,
851
851
  currentRegExp: currentRegExp.toString(),
852
852
  newRegExp: newRegExp.toString()
853
853
  });
@@ -865,7 +865,7 @@ var require_superstatic = __commonJS({
865
865
  } catch (err) {
866
866
  const error = err;
867
867
  const message = JSON.stringify({
868
- path: path5,
868
+ path: path6,
869
869
  error: error.message
870
870
  });
871
871
  console.error(`[vc] PATH TO REGEXP ERROR @ #${callerId}: ${message}`);
@@ -1481,7 +1481,7 @@ var require_p_locate = __commonJS({
1481
1481
  var require_locate_path = __commonJS({
1482
1482
  "../../node_modules/.pnpm/locate-path@5.0.0/node_modules/locate-path/index.js"(exports, module2) {
1483
1483
  "use strict";
1484
- var path5 = require("path");
1484
+ var path6 = require("path");
1485
1485
  var fs5 = require("fs");
1486
1486
  var { promisify: promisify2 } = require("util");
1487
1487
  var pLocate = require_p_locate();
@@ -1509,7 +1509,7 @@ var require_locate_path = __commonJS({
1509
1509
  const statFn = options.allowSymlinks ? fsStat : fsLStat;
1510
1510
  return pLocate(paths, async (path_) => {
1511
1511
  try {
1512
- const stat2 = await statFn(path5.resolve(options.cwd, path_));
1512
+ const stat2 = await statFn(path6.resolve(options.cwd, path_));
1513
1513
  return matchType(options.type, stat2);
1514
1514
  } catch (_) {
1515
1515
  return false;
@@ -1527,7 +1527,7 @@ var require_locate_path = __commonJS({
1527
1527
  const statFn = options.allowSymlinks ? fs5.statSync : fs5.lstatSync;
1528
1528
  for (const path_ of paths) {
1529
1529
  try {
1530
- const stat2 = statFn(path5.resolve(options.cwd, path_));
1530
+ const stat2 = statFn(path6.resolve(options.cwd, path_));
1531
1531
  if (matchType(options.type, stat2)) {
1532
1532
  return path_;
1533
1533
  }
@@ -1545,17 +1545,17 @@ var require_path_exists = __commonJS({
1545
1545
  var fs5 = require("fs");
1546
1546
  var { promisify: promisify2 } = require("util");
1547
1547
  var pAccess = promisify2(fs5.access);
1548
- module2.exports = async (path5) => {
1548
+ module2.exports = async (path6) => {
1549
1549
  try {
1550
- await pAccess(path5);
1550
+ await pAccess(path6);
1551
1551
  return true;
1552
1552
  } catch (_) {
1553
1553
  return false;
1554
1554
  }
1555
1555
  };
1556
- module2.exports.sync = (path5) => {
1556
+ module2.exports.sync = (path6) => {
1557
1557
  try {
1558
- fs5.accessSync(path5);
1558
+ fs5.accessSync(path6);
1559
1559
  return true;
1560
1560
  } catch (_) {
1561
1561
  return false;
@@ -1568,13 +1568,13 @@ var require_path_exists = __commonJS({
1568
1568
  var require_find_up = __commonJS({
1569
1569
  "../../node_modules/.pnpm/find-up@4.1.0/node_modules/find-up/index.js"(exports, module2) {
1570
1570
  "use strict";
1571
- var path5 = require("path");
1571
+ var path6 = require("path");
1572
1572
  var locatePath = require_locate_path();
1573
1573
  var pathExists2 = require_path_exists();
1574
1574
  var stop = Symbol("findUp.stop");
1575
1575
  module2.exports = async (name, options = {}) => {
1576
- let directory = path5.resolve(options.cwd || "");
1577
- const { root } = path5.parse(directory);
1576
+ let directory = path6.resolve(options.cwd || "");
1577
+ const { root } = path6.parse(directory);
1578
1578
  const paths = [].concat(name);
1579
1579
  const runMatcher = async (locateOptions) => {
1580
1580
  if (typeof name !== "function") {
@@ -1592,17 +1592,17 @@ var require_find_up = __commonJS({
1592
1592
  return;
1593
1593
  }
1594
1594
  if (foundPath) {
1595
- return path5.resolve(directory, foundPath);
1595
+ return path6.resolve(directory, foundPath);
1596
1596
  }
1597
1597
  if (directory === root) {
1598
1598
  return;
1599
1599
  }
1600
- directory = path5.dirname(directory);
1600
+ directory = path6.dirname(directory);
1601
1601
  }
1602
1602
  };
1603
1603
  module2.exports.sync = (name, options = {}) => {
1604
- let directory = path5.resolve(options.cwd || "");
1605
- const { root } = path5.parse(directory);
1604
+ let directory = path6.resolve(options.cwd || "");
1605
+ const { root } = path6.parse(directory);
1606
1606
  const paths = [].concat(name);
1607
1607
  const runMatcher = (locateOptions) => {
1608
1608
  if (typeof name !== "function") {
@@ -1620,12 +1620,12 @@ var require_find_up = __commonJS({
1620
1620
  return;
1621
1621
  }
1622
1622
  if (foundPath) {
1623
- return path5.resolve(directory, foundPath);
1623
+ return path6.resolve(directory, foundPath);
1624
1624
  }
1625
1625
  if (directory === root) {
1626
1626
  return;
1627
1627
  }
1628
- directory = path5.dirname(directory);
1628
+ directory = path6.dirname(directory);
1629
1629
  }
1630
1630
  };
1631
1631
  module2.exports.exists = pathExists2;
@@ -1717,7 +1717,7 @@ var require_polyfills = __commonJS({
1717
1717
  fs5.fstatSync = statFixSync(fs5.fstatSync);
1718
1718
  fs5.lstatSync = statFixSync(fs5.lstatSync);
1719
1719
  if (fs5.chmod && !fs5.lchmod) {
1720
- fs5.lchmod = function(path5, mode, cb) {
1720
+ fs5.lchmod = function(path6, mode, cb) {
1721
1721
  if (cb)
1722
1722
  process.nextTick(cb);
1723
1723
  };
@@ -1725,7 +1725,7 @@ var require_polyfills = __commonJS({
1725
1725
  };
1726
1726
  }
1727
1727
  if (fs5.chown && !fs5.lchown) {
1728
- fs5.lchown = function(path5, uid, gid, cb) {
1728
+ fs5.lchown = function(path6, uid, gid, cb) {
1729
1729
  if (cb)
1730
1730
  process.nextTick(cb);
1731
1731
  };
@@ -1796,9 +1796,9 @@ var require_polyfills = __commonJS({
1796
1796
  };
1797
1797
  }(fs5.readSync);
1798
1798
  function patchLchmod(fs6) {
1799
- fs6.lchmod = function(path5, mode, callback) {
1799
+ fs6.lchmod = function(path6, mode, callback) {
1800
1800
  fs6.open(
1801
- path5,
1801
+ path6,
1802
1802
  constants.O_WRONLY | constants.O_SYMLINK,
1803
1803
  mode,
1804
1804
  function(err, fd) {
@@ -1816,8 +1816,8 @@ var require_polyfills = __commonJS({
1816
1816
  }
1817
1817
  );
1818
1818
  };
1819
- fs6.lchmodSync = function(path5, mode) {
1820
- var fd = fs6.openSync(path5, constants.O_WRONLY | constants.O_SYMLINK, mode);
1819
+ fs6.lchmodSync = function(path6, mode) {
1820
+ var fd = fs6.openSync(path6, constants.O_WRONLY | constants.O_SYMLINK, mode);
1821
1821
  var threw = true;
1822
1822
  var ret;
1823
1823
  try {
@@ -1838,8 +1838,8 @@ var require_polyfills = __commonJS({
1838
1838
  }
1839
1839
  function patchLutimes(fs6) {
1840
1840
  if (constants.hasOwnProperty("O_SYMLINK") && fs6.futimes) {
1841
- fs6.lutimes = function(path5, at, mt, cb) {
1842
- fs6.open(path5, constants.O_SYMLINK, function(er, fd) {
1841
+ fs6.lutimes = function(path6, at, mt, cb) {
1842
+ fs6.open(path6, constants.O_SYMLINK, function(er, fd) {
1843
1843
  if (er) {
1844
1844
  if (cb)
1845
1845
  cb(er);
@@ -1853,8 +1853,8 @@ var require_polyfills = __commonJS({
1853
1853
  });
1854
1854
  });
1855
1855
  };
1856
- fs6.lutimesSync = function(path5, at, mt) {
1857
- var fd = fs6.openSync(path5, constants.O_SYMLINK);
1856
+ fs6.lutimesSync = function(path6, at, mt) {
1857
+ var fd = fs6.openSync(path6, constants.O_SYMLINK);
1858
1858
  var ret;
1859
1859
  var threw = true;
1860
1860
  try {
@@ -1990,12 +1990,12 @@ var require_legacy_streams = __commonJS({
1990
1990
  ReadStream,
1991
1991
  WriteStream
1992
1992
  };
1993
- function ReadStream(path5, options) {
1993
+ function ReadStream(path6, options) {
1994
1994
  if (!(this instanceof ReadStream))
1995
- return new ReadStream(path5, options);
1995
+ return new ReadStream(path6, options);
1996
1996
  Stream.call(this);
1997
1997
  var self = this;
1998
- this.path = path5;
1998
+ this.path = path6;
1999
1999
  this.fd = null;
2000
2000
  this.readable = true;
2001
2001
  this.paused = false;
@@ -2041,11 +2041,11 @@ var require_legacy_streams = __commonJS({
2041
2041
  self._read();
2042
2042
  });
2043
2043
  }
2044
- function WriteStream(path5, options) {
2044
+ function WriteStream(path6, options) {
2045
2045
  if (!(this instanceof WriteStream))
2046
- return new WriteStream(path5, options);
2046
+ return new WriteStream(path6, options);
2047
2047
  Stream.call(this);
2048
- this.path = path5;
2048
+ this.path = path6;
2049
2049
  this.fd = null;
2050
2050
  this.writable = true;
2051
2051
  this.flags = "w";
@@ -2188,14 +2188,14 @@ var require_graceful_fs = __commonJS({
2188
2188
  fs6.createWriteStream = createWriteStream;
2189
2189
  var fs$readFile = fs6.readFile;
2190
2190
  fs6.readFile = readFile3;
2191
- function readFile3(path5, options, cb) {
2191
+ function readFile3(path6, options, cb) {
2192
2192
  if (typeof options === "function")
2193
2193
  cb = options, options = null;
2194
- return go$readFile(path5, options, cb);
2195
- function go$readFile(path6, options2, cb2, startTime) {
2196
- return fs$readFile(path6, options2, function(err) {
2194
+ return go$readFile(path6, options, cb);
2195
+ function go$readFile(path7, options2, cb2, startTime) {
2196
+ return fs$readFile(path7, options2, function(err) {
2197
2197
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2198
- enqueue([go$readFile, [path6, options2, cb2], err, startTime || Date.now(), Date.now()]);
2198
+ enqueue([go$readFile, [path7, options2, cb2], err, startTime || Date.now(), Date.now()]);
2199
2199
  else {
2200
2200
  if (typeof cb2 === "function")
2201
2201
  cb2.apply(this, arguments);
@@ -2205,14 +2205,14 @@ var require_graceful_fs = __commonJS({
2205
2205
  }
2206
2206
  var fs$writeFile = fs6.writeFile;
2207
2207
  fs6.writeFile = writeFile2;
2208
- function writeFile2(path5, data, options, cb) {
2208
+ function writeFile2(path6, data, options, cb) {
2209
2209
  if (typeof options === "function")
2210
2210
  cb = options, options = null;
2211
- return go$writeFile(path5, data, options, cb);
2212
- function go$writeFile(path6, data2, options2, cb2, startTime) {
2213
- return fs$writeFile(path6, data2, options2, function(err) {
2211
+ return go$writeFile(path6, data, options, cb);
2212
+ function go$writeFile(path7, data2, options2, cb2, startTime) {
2213
+ return fs$writeFile(path7, data2, options2, function(err) {
2214
2214
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2215
- enqueue([go$writeFile, [path6, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
2215
+ enqueue([go$writeFile, [path7, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
2216
2216
  else {
2217
2217
  if (typeof cb2 === "function")
2218
2218
  cb2.apply(this, arguments);
@@ -2223,14 +2223,14 @@ var require_graceful_fs = __commonJS({
2223
2223
  var fs$appendFile = fs6.appendFile;
2224
2224
  if (fs$appendFile)
2225
2225
  fs6.appendFile = appendFile;
2226
- function appendFile(path5, data, options, cb) {
2226
+ function appendFile(path6, data, options, cb) {
2227
2227
  if (typeof options === "function")
2228
2228
  cb = options, options = null;
2229
- return go$appendFile(path5, data, options, cb);
2230
- function go$appendFile(path6, data2, options2, cb2, startTime) {
2231
- return fs$appendFile(path6, data2, options2, function(err) {
2229
+ return go$appendFile(path6, data, options, cb);
2230
+ function go$appendFile(path7, data2, options2, cb2, startTime) {
2231
+ return fs$appendFile(path7, data2, options2, function(err) {
2232
2232
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2233
- enqueue([go$appendFile, [path6, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
2233
+ enqueue([go$appendFile, [path7, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
2234
2234
  else {
2235
2235
  if (typeof cb2 === "function")
2236
2236
  cb2.apply(this, arguments);
@@ -2261,31 +2261,31 @@ var require_graceful_fs = __commonJS({
2261
2261
  var fs$readdir = fs6.readdir;
2262
2262
  fs6.readdir = readdir;
2263
2263
  var noReaddirOptionVersions = /^v[0-5]\./;
2264
- function readdir(path5, options, cb) {
2264
+ function readdir(path6, options, cb) {
2265
2265
  if (typeof options === "function")
2266
2266
  cb = options, options = null;
2267
- var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path6, options2, cb2, startTime) {
2268
- return fs$readdir(path6, fs$readdirCallback(
2269
- path6,
2267
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path7, options2, cb2, startTime) {
2268
+ return fs$readdir(path7, fs$readdirCallback(
2269
+ path7,
2270
2270
  options2,
2271
2271
  cb2,
2272
2272
  startTime
2273
2273
  ));
2274
- } : function go$readdir2(path6, options2, cb2, startTime) {
2275
- return fs$readdir(path6, options2, fs$readdirCallback(
2276
- path6,
2274
+ } : function go$readdir2(path7, options2, cb2, startTime) {
2275
+ return fs$readdir(path7, options2, fs$readdirCallback(
2276
+ path7,
2277
2277
  options2,
2278
2278
  cb2,
2279
2279
  startTime
2280
2280
  ));
2281
2281
  };
2282
- return go$readdir(path5, options, cb);
2283
- function fs$readdirCallback(path6, options2, cb2, startTime) {
2282
+ return go$readdir(path6, options, cb);
2283
+ function fs$readdirCallback(path7, options2, cb2, startTime) {
2284
2284
  return function(err, files) {
2285
2285
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2286
2286
  enqueue([
2287
2287
  go$readdir,
2288
- [path6, options2, cb2],
2288
+ [path7, options2, cb2],
2289
2289
  err,
2290
2290
  startTime || Date.now(),
2291
2291
  Date.now()
@@ -2356,7 +2356,7 @@ var require_graceful_fs = __commonJS({
2356
2356
  enumerable: true,
2357
2357
  configurable: true
2358
2358
  });
2359
- function ReadStream(path5, options) {
2359
+ function ReadStream(path6, options) {
2360
2360
  if (this instanceof ReadStream)
2361
2361
  return fs$ReadStream.apply(this, arguments), this;
2362
2362
  else
@@ -2376,7 +2376,7 @@ var require_graceful_fs = __commonJS({
2376
2376
  }
2377
2377
  });
2378
2378
  }
2379
- function WriteStream(path5, options) {
2379
+ function WriteStream(path6, options) {
2380
2380
  if (this instanceof WriteStream)
2381
2381
  return fs$WriteStream.apply(this, arguments), this;
2382
2382
  else
@@ -2394,22 +2394,22 @@ var require_graceful_fs = __commonJS({
2394
2394
  }
2395
2395
  });
2396
2396
  }
2397
- function createReadStream(path5, options) {
2398
- return new fs6.ReadStream(path5, options);
2397
+ function createReadStream(path6, options) {
2398
+ return new fs6.ReadStream(path6, options);
2399
2399
  }
2400
- function createWriteStream(path5, options) {
2401
- return new fs6.WriteStream(path5, options);
2400
+ function createWriteStream(path6, options) {
2401
+ return new fs6.WriteStream(path6, options);
2402
2402
  }
2403
2403
  var fs$open = fs6.open;
2404
2404
  fs6.open = open;
2405
- function open(path5, flags, mode, cb) {
2405
+ function open(path6, flags, mode, cb) {
2406
2406
  if (typeof mode === "function")
2407
2407
  cb = mode, mode = null;
2408
- return go$open(path5, flags, mode, cb);
2409
- function go$open(path6, flags2, mode2, cb2, startTime) {
2410
- return fs$open(path6, flags2, mode2, function(err, fd) {
2408
+ return go$open(path6, flags, mode, cb);
2409
+ function go$open(path7, flags2, mode2, cb2, startTime) {
2410
+ return fs$open(path7, flags2, mode2, function(err, fd) {
2411
2411
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2412
- enqueue([go$open, [path6, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
2412
+ enqueue([go$open, [path7, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
2413
2413
  else {
2414
2414
  if (typeof cb2 === "function")
2415
2415
  cb2.apply(this, arguments);
@@ -2592,10 +2592,10 @@ var require_fs = __commonJS({
2592
2592
  var require_utils = __commonJS({
2593
2593
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module2) {
2594
2594
  "use strict";
2595
- var path5 = require("path");
2595
+ var path6 = require("path");
2596
2596
  module2.exports.checkPath = function checkPath(pth) {
2597
2597
  if (process.platform === "win32") {
2598
- const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path5.parse(pth).root, ""));
2598
+ const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path6.parse(pth).root, ""));
2599
2599
  if (pathHasInvalidWinCharacters) {
2600
2600
  const error = new Error(`Path contains invalid characters: ${pth}`);
2601
2601
  error.code = "EINVAL";
@@ -2660,8 +2660,8 @@ var require_path_exists2 = __commonJS({
2660
2660
  "use strict";
2661
2661
  var u = require_universalify().fromPromise;
2662
2662
  var fs5 = require_fs();
2663
- function pathExists2(path5) {
2664
- return fs5.access(path5).then(() => true).catch(() => false);
2663
+ function pathExists2(path6) {
2664
+ return fs5.access(path6).then(() => true).catch(() => false);
2665
2665
  }
2666
2666
  module2.exports = {
2667
2667
  pathExists: u(pathExists2),
@@ -2676,8 +2676,8 @@ var require_utimes = __commonJS({
2676
2676
  "use strict";
2677
2677
  var fs5 = require_fs();
2678
2678
  var u = require_universalify().fromPromise;
2679
- async function utimesMillis(path5, atime, mtime) {
2680
- const fd = await fs5.open(path5, "r+");
2679
+ async function utimesMillis(path6, atime, mtime) {
2680
+ const fd = await fs5.open(path6, "r+");
2681
2681
  let closeErr = null;
2682
2682
  try {
2683
2683
  await fs5.futimes(fd, atime, mtime);
@@ -2692,8 +2692,8 @@ var require_utimes = __commonJS({
2692
2692
  throw closeErr;
2693
2693
  }
2694
2694
  }
2695
- function utimesMillisSync(path5, atime, mtime) {
2696
- const fd = fs5.openSync(path5, "r+");
2695
+ function utimesMillisSync(path6, atime, mtime) {
2696
+ const fd = fs5.openSync(path6, "r+");
2697
2697
  fs5.futimesSync(fd, atime, mtime);
2698
2698
  return fs5.closeSync(fd);
2699
2699
  }
@@ -2709,7 +2709,7 @@ var require_stat = __commonJS({
2709
2709
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/stat.js"(exports, module2) {
2710
2710
  "use strict";
2711
2711
  var fs5 = require_fs();
2712
- var path5 = require("path");
2712
+ var path6 = require("path");
2713
2713
  var u = require_universalify().fromPromise;
2714
2714
  function getStats(src, dest, opts) {
2715
2715
  const statFunc = opts.dereference ? (file) => fs5.stat(file, { bigint: true }) : (file) => fs5.lstat(file, { bigint: true });
@@ -2739,8 +2739,8 @@ var require_stat = __commonJS({
2739
2739
  const { srcStat, destStat } = await getStats(src, dest, opts);
2740
2740
  if (destStat) {
2741
2741
  if (areIdentical(srcStat, destStat)) {
2742
- const srcBaseName = path5.basename(src);
2743
- const destBaseName = path5.basename(dest);
2742
+ const srcBaseName = path6.basename(src);
2743
+ const destBaseName = path6.basename(dest);
2744
2744
  if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
2745
2745
  return { srcStat, destStat, isChangingCase: true };
2746
2746
  }
@@ -2762,8 +2762,8 @@ var require_stat = __commonJS({
2762
2762
  const { srcStat, destStat } = getStatsSync(src, dest, opts);
2763
2763
  if (destStat) {
2764
2764
  if (areIdentical(srcStat, destStat)) {
2765
- const srcBaseName = path5.basename(src);
2766
- const destBaseName = path5.basename(dest);
2765
+ const srcBaseName = path6.basename(src);
2766
+ const destBaseName = path6.basename(dest);
2767
2767
  if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
2768
2768
  return { srcStat, destStat, isChangingCase: true };
2769
2769
  }
@@ -2782,9 +2782,9 @@ var require_stat = __commonJS({
2782
2782
  return { srcStat, destStat };
2783
2783
  }
2784
2784
  async function checkParentPaths(src, srcStat, dest, funcName) {
2785
- const srcParent = path5.resolve(path5.dirname(src));
2786
- const destParent = path5.resolve(path5.dirname(dest));
2787
- if (destParent === srcParent || destParent === path5.parse(destParent).root)
2785
+ const srcParent = path6.resolve(path6.dirname(src));
2786
+ const destParent = path6.resolve(path6.dirname(dest));
2787
+ if (destParent === srcParent || destParent === path6.parse(destParent).root)
2788
2788
  return;
2789
2789
  let destStat;
2790
2790
  try {
@@ -2800,9 +2800,9 @@ var require_stat = __commonJS({
2800
2800
  return checkParentPaths(src, srcStat, destParent, funcName);
2801
2801
  }
2802
2802
  function checkParentPathsSync(src, srcStat, dest, funcName) {
2803
- const srcParent = path5.resolve(path5.dirname(src));
2804
- const destParent = path5.resolve(path5.dirname(dest));
2805
- if (destParent === srcParent || destParent === path5.parse(destParent).root)
2803
+ const srcParent = path6.resolve(path6.dirname(src));
2804
+ const destParent = path6.resolve(path6.dirname(dest));
2805
+ if (destParent === srcParent || destParent === path6.parse(destParent).root)
2806
2806
  return;
2807
2807
  let destStat;
2808
2808
  try {
@@ -2821,8 +2821,8 @@ var require_stat = __commonJS({
2821
2821
  return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
2822
2822
  }
2823
2823
  function isSrcSubdir(src, dest) {
2824
- const srcArr = path5.resolve(src).split(path5.sep).filter((i) => i);
2825
- const destArr = path5.resolve(dest).split(path5.sep).filter((i) => i);
2824
+ const srcArr = path6.resolve(src).split(path6.sep).filter((i) => i);
2825
+ const destArr = path6.resolve(dest).split(path6.sep).filter((i) => i);
2826
2826
  return srcArr.every((cur, i) => destArr[i] === cur);
2827
2827
  }
2828
2828
  function errMsg(src, dest, funcName) {
@@ -2847,7 +2847,7 @@ var require_copy = __commonJS({
2847
2847
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy.js"(exports, module2) {
2848
2848
  "use strict";
2849
2849
  var fs5 = require_fs();
2850
- var path5 = require("path");
2850
+ var path6 = require("path");
2851
2851
  var { mkdirs } = require_mkdirs();
2852
2852
  var { pathExists: pathExists2 } = require_path_exists2();
2853
2853
  var { utimesMillis } = require_utimes();
@@ -2870,7 +2870,7 @@ var require_copy = __commonJS({
2870
2870
  const include = await runFilter(src, dest, opts);
2871
2871
  if (!include)
2872
2872
  return;
2873
- const destParent = path5.dirname(dest);
2873
+ const destParent = path6.dirname(dest);
2874
2874
  const dirExists = await pathExists2(destParent);
2875
2875
  if (!dirExists) {
2876
2876
  await mkdirs(destParent);
@@ -2931,8 +2931,8 @@ var require_copy = __commonJS({
2931
2931
  }
2932
2932
  const items = await fs5.readdir(src);
2933
2933
  await Promise.all(items.map(async (item) => {
2934
- const srcItem = path5.join(src, item);
2935
- const destItem = path5.join(dest, item);
2934
+ const srcItem = path6.join(src, item);
2935
+ const destItem = path6.join(dest, item);
2936
2936
  const include = await runFilter(srcItem, destItem, opts);
2937
2937
  if (!include)
2938
2938
  return;
@@ -2946,7 +2946,7 @@ var require_copy = __commonJS({
2946
2946
  async function onLink(destStat, src, dest, opts) {
2947
2947
  let resolvedSrc = await fs5.readlink(src);
2948
2948
  if (opts.dereference) {
2949
- resolvedSrc = path5.resolve(process.cwd(), resolvedSrc);
2949
+ resolvedSrc = path6.resolve(process.cwd(), resolvedSrc);
2950
2950
  }
2951
2951
  if (!destStat) {
2952
2952
  return fs5.symlink(resolvedSrc, dest);
@@ -2960,7 +2960,7 @@ var require_copy = __commonJS({
2960
2960
  throw e;
2961
2961
  }
2962
2962
  if (opts.dereference) {
2963
- resolvedDest = path5.resolve(process.cwd(), resolvedDest);
2963
+ resolvedDest = path6.resolve(process.cwd(), resolvedDest);
2964
2964
  }
2965
2965
  if (stat2.isSrcSubdir(resolvedSrc, resolvedDest)) {
2966
2966
  throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
@@ -2980,7 +2980,7 @@ var require_copy_sync = __commonJS({
2980
2980
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module2) {
2981
2981
  "use strict";
2982
2982
  var fs5 = require_graceful_fs();
2983
- var path5 = require("path");
2983
+ var path6 = require("path");
2984
2984
  var mkdirsSync = require_mkdirs().mkdirsSync;
2985
2985
  var utimesMillisSync = require_utimes().utimesMillisSync;
2986
2986
  var stat2 = require_stat();
@@ -3002,7 +3002,7 @@ var require_copy_sync = __commonJS({
3002
3002
  stat2.checkParentPathsSync(src, srcStat, dest, "copy");
3003
3003
  if (opts.filter && !opts.filter(src, dest))
3004
3004
  return;
3005
- const destParent = path5.dirname(dest);
3005
+ const destParent = path6.dirname(dest);
3006
3006
  if (!fs5.existsSync(destParent))
3007
3007
  mkdirsSync(destParent);
3008
3008
  return getStats(destStat, src, dest, opts);
@@ -3073,8 +3073,8 @@ var require_copy_sync = __commonJS({
3073
3073
  fs5.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
3074
3074
  }
3075
3075
  function copyDirItem(item, src, dest, opts) {
3076
- const srcItem = path5.join(src, item);
3077
- const destItem = path5.join(dest, item);
3076
+ const srcItem = path6.join(src, item);
3077
+ const destItem = path6.join(dest, item);
3078
3078
  if (opts.filter && !opts.filter(srcItem, destItem))
3079
3079
  return;
3080
3080
  const { destStat } = stat2.checkPathsSync(srcItem, destItem, "copy", opts);
@@ -3083,7 +3083,7 @@ var require_copy_sync = __commonJS({
3083
3083
  function onLink(destStat, src, dest, opts) {
3084
3084
  let resolvedSrc = fs5.readlinkSync(src);
3085
3085
  if (opts.dereference) {
3086
- resolvedSrc = path5.resolve(process.cwd(), resolvedSrc);
3086
+ resolvedSrc = path6.resolve(process.cwd(), resolvedSrc);
3087
3087
  }
3088
3088
  if (!destStat) {
3089
3089
  return fs5.symlinkSync(resolvedSrc, dest);
@@ -3097,7 +3097,7 @@ var require_copy_sync = __commonJS({
3097
3097
  throw err;
3098
3098
  }
3099
3099
  if (opts.dereference) {
3100
- resolvedDest = path5.resolve(process.cwd(), resolvedDest);
3100
+ resolvedDest = path6.resolve(process.cwd(), resolvedDest);
3101
3101
  }
3102
3102
  if (stat2.isSrcSubdir(resolvedSrc, resolvedDest)) {
3103
3103
  throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
@@ -3134,11 +3134,11 @@ var require_remove = __commonJS({
3134
3134
  "use strict";
3135
3135
  var fs5 = require_graceful_fs();
3136
3136
  var u = require_universalify().fromCallback;
3137
- function remove2(path5, callback) {
3138
- fs5.rm(path5, { recursive: true, force: true }, callback);
3137
+ function remove2(path6, callback) {
3138
+ fs5.rm(path6, { recursive: true, force: true }, callback);
3139
3139
  }
3140
- function removeSync(path5) {
3141
- fs5.rmSync(path5, { recursive: true, force: true });
3140
+ function removeSync(path6) {
3141
+ fs5.rmSync(path6, { recursive: true, force: true });
3142
3142
  }
3143
3143
  module2.exports = {
3144
3144
  remove: u(remove2),
@@ -3153,7 +3153,7 @@ var require_empty = __commonJS({
3153
3153
  "use strict";
3154
3154
  var u = require_universalify().fromPromise;
3155
3155
  var fs5 = require_fs();
3156
- var path5 = require("path");
3156
+ var path6 = require("path");
3157
3157
  var mkdir = require_mkdirs();
3158
3158
  var remove2 = require_remove();
3159
3159
  var emptyDir = u(async function emptyDir2(dir) {
@@ -3163,7 +3163,7 @@ var require_empty = __commonJS({
3163
3163
  } catch {
3164
3164
  return mkdir.mkdirs(dir);
3165
3165
  }
3166
- return Promise.all(items.map((item) => remove2.remove(path5.join(dir, item))));
3166
+ return Promise.all(items.map((item) => remove2.remove(path6.join(dir, item))));
3167
3167
  });
3168
3168
  function emptyDirSync(dir) {
3169
3169
  let items;
@@ -3173,7 +3173,7 @@ var require_empty = __commonJS({
3173
3173
  return mkdir.mkdirsSync(dir);
3174
3174
  }
3175
3175
  items.forEach((item) => {
3176
- item = path5.join(dir, item);
3176
+ item = path6.join(dir, item);
3177
3177
  remove2.removeSync(item);
3178
3178
  });
3179
3179
  }
@@ -3191,7 +3191,7 @@ var require_file = __commonJS({
3191
3191
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/file.js"(exports, module2) {
3192
3192
  "use strict";
3193
3193
  var u = require_universalify().fromPromise;
3194
- var path5 = require("path");
3194
+ var path6 = require("path");
3195
3195
  var fs5 = require_fs();
3196
3196
  var mkdir = require_mkdirs();
3197
3197
  async function createFile(file) {
@@ -3202,7 +3202,7 @@ var require_file = __commonJS({
3202
3202
  }
3203
3203
  if (stats && stats.isFile())
3204
3204
  return;
3205
- const dir = path5.dirname(file);
3205
+ const dir = path6.dirname(file);
3206
3206
  let dirStats = null;
3207
3207
  try {
3208
3208
  dirStats = await fs5.stat(dir);
@@ -3229,7 +3229,7 @@ var require_file = __commonJS({
3229
3229
  }
3230
3230
  if (stats && stats.isFile())
3231
3231
  return;
3232
- const dir = path5.dirname(file);
3232
+ const dir = path6.dirname(file);
3233
3233
  try {
3234
3234
  if (!fs5.statSync(dir).isDirectory()) {
3235
3235
  fs5.readdirSync(dir);
@@ -3254,7 +3254,7 @@ var require_link = __commonJS({
3254
3254
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/link.js"(exports, module2) {
3255
3255
  "use strict";
3256
3256
  var u = require_universalify().fromPromise;
3257
- var path5 = require("path");
3257
+ var path6 = require("path");
3258
3258
  var fs5 = require_fs();
3259
3259
  var mkdir = require_mkdirs();
3260
3260
  var { pathExists: pathExists2 } = require_path_exists2();
@@ -3274,7 +3274,7 @@ var require_link = __commonJS({
3274
3274
  }
3275
3275
  if (dstStat && areIdentical(srcStat, dstStat))
3276
3276
  return;
3277
- const dir = path5.dirname(dstpath);
3277
+ const dir = path6.dirname(dstpath);
3278
3278
  const dirExists = await pathExists2(dir);
3279
3279
  if (!dirExists) {
3280
3280
  await mkdir.mkdirs(dir);
@@ -3295,7 +3295,7 @@ var require_link = __commonJS({
3295
3295
  err.message = err.message.replace("lstat", "ensureLink");
3296
3296
  throw err;
3297
3297
  }
3298
- const dir = path5.dirname(dstpath);
3298
+ const dir = path6.dirname(dstpath);
3299
3299
  const dirExists = fs5.existsSync(dir);
3300
3300
  if (dirExists)
3301
3301
  return fs5.linkSync(srcpath, dstpath);
@@ -3313,12 +3313,12 @@ var require_link = __commonJS({
3313
3313
  var require_symlink_paths = __commonJS({
3314
3314
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module2) {
3315
3315
  "use strict";
3316
- var path5 = require("path");
3316
+ var path6 = require("path");
3317
3317
  var fs5 = require_fs();
3318
3318
  var { pathExists: pathExists2 } = require_path_exists2();
3319
3319
  var u = require_universalify().fromPromise;
3320
3320
  async function symlinkPaths(srcpath, dstpath) {
3321
- if (path5.isAbsolute(srcpath)) {
3321
+ if (path6.isAbsolute(srcpath)) {
3322
3322
  try {
3323
3323
  await fs5.lstat(srcpath);
3324
3324
  } catch (err) {
@@ -3330,8 +3330,8 @@ var require_symlink_paths = __commonJS({
3330
3330
  toDst: srcpath
3331
3331
  };
3332
3332
  }
3333
- const dstdir = path5.dirname(dstpath);
3334
- const relativeToDst = path5.join(dstdir, srcpath);
3333
+ const dstdir = path6.dirname(dstpath);
3334
+ const relativeToDst = path6.join(dstdir, srcpath);
3335
3335
  const exists = await pathExists2(relativeToDst);
3336
3336
  if (exists) {
3337
3337
  return {
@@ -3347,11 +3347,11 @@ var require_symlink_paths = __commonJS({
3347
3347
  }
3348
3348
  return {
3349
3349
  toCwd: srcpath,
3350
- toDst: path5.relative(dstdir, srcpath)
3350
+ toDst: path6.relative(dstdir, srcpath)
3351
3351
  };
3352
3352
  }
3353
3353
  function symlinkPathsSync(srcpath, dstpath) {
3354
- if (path5.isAbsolute(srcpath)) {
3354
+ if (path6.isAbsolute(srcpath)) {
3355
3355
  const exists2 = fs5.existsSync(srcpath);
3356
3356
  if (!exists2)
3357
3357
  throw new Error("absolute srcpath does not exist");
@@ -3360,8 +3360,8 @@ var require_symlink_paths = __commonJS({
3360
3360
  toDst: srcpath
3361
3361
  };
3362
3362
  }
3363
- const dstdir = path5.dirname(dstpath);
3364
- const relativeToDst = path5.join(dstdir, srcpath);
3363
+ const dstdir = path6.dirname(dstpath);
3364
+ const relativeToDst = path6.join(dstdir, srcpath);
3365
3365
  const exists = fs5.existsSync(relativeToDst);
3366
3366
  if (exists) {
3367
3367
  return {
@@ -3374,7 +3374,7 @@ var require_symlink_paths = __commonJS({
3374
3374
  throw new Error("relative srcpath does not exist");
3375
3375
  return {
3376
3376
  toCwd: srcpath,
3377
- toDst: path5.relative(dstdir, srcpath)
3377
+ toDst: path6.relative(dstdir, srcpath)
3378
3378
  };
3379
3379
  }
3380
3380
  module2.exports = {
@@ -3424,7 +3424,7 @@ var require_symlink = __commonJS({
3424
3424
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module2) {
3425
3425
  "use strict";
3426
3426
  var u = require_universalify().fromPromise;
3427
- var path5 = require("path");
3427
+ var path6 = require("path");
3428
3428
  var fs5 = require_fs();
3429
3429
  var { mkdirs, mkdirsSync } = require_mkdirs();
3430
3430
  var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
@@ -3448,7 +3448,7 @@ var require_symlink = __commonJS({
3448
3448
  const relative = await symlinkPaths(srcpath, dstpath);
3449
3449
  srcpath = relative.toDst;
3450
3450
  const toType = await symlinkType(relative.toCwd, type);
3451
- const dir = path5.dirname(dstpath);
3451
+ const dir = path6.dirname(dstpath);
3452
3452
  if (!await pathExists2(dir)) {
3453
3453
  await mkdirs(dir);
3454
3454
  }
@@ -3469,7 +3469,7 @@ var require_symlink = __commonJS({
3469
3469
  const relative = symlinkPathsSync(srcpath, dstpath);
3470
3470
  srcpath = relative.toDst;
3471
3471
  type = symlinkTypeSync(relative.toCwd, type);
3472
- const dir = path5.dirname(dstpath);
3472
+ const dir = path6.dirname(dstpath);
3473
3473
  const exists = fs5.existsSync(dir);
3474
3474
  if (exists)
3475
3475
  return fs5.symlinkSync(srcpath, dstpath, type);
@@ -3621,18 +3621,18 @@ var require_output_file = __commonJS({
3621
3621
  "use strict";
3622
3622
  var u = require_universalify().fromPromise;
3623
3623
  var fs5 = require_fs();
3624
- var path5 = require("path");
3624
+ var path6 = require("path");
3625
3625
  var mkdir = require_mkdirs();
3626
3626
  var pathExists2 = require_path_exists2().pathExists;
3627
3627
  async function outputFile(file, data, encoding = "utf-8") {
3628
- const dir = path5.dirname(file);
3628
+ const dir = path6.dirname(file);
3629
3629
  if (!await pathExists2(dir)) {
3630
3630
  await mkdir.mkdirs(dir);
3631
3631
  }
3632
3632
  return fs5.writeFile(file, data, encoding);
3633
3633
  }
3634
3634
  function outputFileSync(file, ...args) {
3635
- const dir = path5.dirname(file);
3635
+ const dir = path6.dirname(file);
3636
3636
  if (!fs5.existsSync(dir)) {
3637
3637
  mkdir.mkdirsSync(dir);
3638
3638
  }
@@ -3696,7 +3696,7 @@ var require_move = __commonJS({
3696
3696
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move.js"(exports, module2) {
3697
3697
  "use strict";
3698
3698
  var fs5 = require_fs();
3699
- var path5 = require("path");
3699
+ var path6 = require("path");
3700
3700
  var { copy } = require_copy2();
3701
3701
  var { remove: remove2 } = require_remove();
3702
3702
  var { mkdirp } = require_mkdirs();
@@ -3706,8 +3706,8 @@ var require_move = __commonJS({
3706
3706
  const overwrite = opts.overwrite || opts.clobber || false;
3707
3707
  const { srcStat, isChangingCase = false } = await stat2.checkPaths(src, dest, "move", opts);
3708
3708
  await stat2.checkParentPaths(src, srcStat, dest, "move");
3709
- const destParent = path5.dirname(dest);
3710
- const parsedParentPath = path5.parse(destParent);
3709
+ const destParent = path6.dirname(dest);
3710
+ const parsedParentPath = path6.parse(destParent);
3711
3711
  if (parsedParentPath.root !== destParent) {
3712
3712
  await mkdirp(destParent);
3713
3713
  }
@@ -3748,7 +3748,7 @@ var require_move_sync = __commonJS({
3748
3748
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move-sync.js"(exports, module2) {
3749
3749
  "use strict";
3750
3750
  var fs5 = require_graceful_fs();
3751
- var path5 = require("path");
3751
+ var path6 = require("path");
3752
3752
  var copySync = require_copy2().copySync;
3753
3753
  var removeSync = require_remove().removeSync;
3754
3754
  var mkdirpSync = require_mkdirs().mkdirpSync;
@@ -3759,12 +3759,12 @@ var require_move_sync = __commonJS({
3759
3759
  const { srcStat, isChangingCase = false } = stat2.checkPathsSync(src, dest, "move", opts);
3760
3760
  stat2.checkParentPathsSync(src, srcStat, dest, "move");
3761
3761
  if (!isParentRoot(dest))
3762
- mkdirpSync(path5.dirname(dest));
3762
+ mkdirpSync(path6.dirname(dest));
3763
3763
  return doRename(src, dest, overwrite, isChangingCase);
3764
3764
  }
3765
3765
  function isParentRoot(dest) {
3766
- const parent = path5.dirname(dest);
3767
- const parsedPath = path5.parse(parent);
3766
+ const parent = path6.dirname(dest);
3767
+ const parsedPath = path6.parse(parent);
3768
3768
  return parsedPath.root === parent;
3769
3769
  }
3770
3770
  function doRename(src, dest, overwrite, isChangingCase) {
@@ -8229,27 +8229,27 @@ var require_util = __commonJS({
8229
8229
  };
8230
8230
  }
8231
8231
  var normalize = lruMemoize(function normalize2(aPath) {
8232
- let path5 = aPath;
8232
+ let path6 = aPath;
8233
8233
  const url3 = urlParse(aPath);
8234
8234
  if (url3) {
8235
8235
  if (!url3.path) {
8236
8236
  return aPath;
8237
8237
  }
8238
- path5 = url3.path;
8238
+ path6 = url3.path;
8239
8239
  }
8240
- const isAbsolute = exports.isAbsolute(path5);
8240
+ const isAbsolute = exports.isAbsolute(path6);
8241
8241
  const parts = [];
8242
8242
  let start = 0;
8243
8243
  let i = 0;
8244
8244
  while (true) {
8245
8245
  start = i;
8246
- i = path5.indexOf("/", start);
8246
+ i = path6.indexOf("/", start);
8247
8247
  if (i === -1) {
8248
- parts.push(path5.slice(start));
8248
+ parts.push(path6.slice(start));
8249
8249
  break;
8250
8250
  } else {
8251
- parts.push(path5.slice(start, i));
8252
- while (i < path5.length && path5[i] === "/") {
8251
+ parts.push(path6.slice(start, i));
8252
+ while (i < path6.length && path6[i] === "/") {
8253
8253
  i++;
8254
8254
  }
8255
8255
  }
@@ -8271,15 +8271,15 @@ var require_util = __commonJS({
8271
8271
  }
8272
8272
  }
8273
8273
  }
8274
- path5 = parts.join("/");
8275
- if (path5 === "") {
8276
- path5 = isAbsolute ? "/" : ".";
8274
+ path6 = parts.join("/");
8275
+ if (path6 === "") {
8276
+ path6 = isAbsolute ? "/" : ".";
8277
8277
  }
8278
8278
  if (url3) {
8279
- url3.path = path5;
8279
+ url3.path = path6;
8280
8280
  return urlGenerate(url3);
8281
8281
  }
8282
- return path5;
8282
+ return path6;
8283
8283
  });
8284
8284
  exports.normalize = normalize;
8285
8285
  function join2(aRoot, aPath) {
@@ -9044,10 +9044,10 @@ var require_read_wasm = __commonJS({
9044
9044
  module2.exports.initialize = (input) => mappingsWasm = input;
9045
9045
  } else {
9046
9046
  const fs5 = require("fs");
9047
- const path5 = require("path");
9047
+ const path6 = require("path");
9048
9048
  module2.exports = function readWasm() {
9049
9049
  return new Promise((resolve, reject) => {
9050
- const wasmPath = path5.join(__dirname, "mappings.wasm");
9050
+ const wasmPath = path6.join(__dirname, "mappings.wasm");
9051
9051
  fs5.readFile(wasmPath, null, (error, data) => {
9052
9052
  if (error) {
9053
9053
  reject(error);
@@ -10495,7 +10495,7 @@ var require_convert_source_map = __commonJS({
10495
10495
  "../../node_modules/.pnpm/convert-source-map@1.8.0/node_modules/convert-source-map/index.js"(exports) {
10496
10496
  "use strict";
10497
10497
  var fs5 = require("fs");
10498
- var path5 = require("path");
10498
+ var path6 = require("path");
10499
10499
  var SafeBuffer = require_safe_buffer();
10500
10500
  Object.defineProperty(exports, "commentRegex", {
10501
10501
  get: function getCommentRegex() {
@@ -10516,7 +10516,7 @@ var require_convert_source_map = __commonJS({
10516
10516
  function readFromFileMap(sm, dir) {
10517
10517
  var r = exports.mapFileCommentRegex.exec(sm);
10518
10518
  var filename = r[1] || r[2];
10519
- var filepath = path5.resolve(dir, filename);
10519
+ var filepath = path6.resolve(dir, filename);
10520
10520
  try {
10521
10521
  return fs5.readFileSync(filepath, "utf8");
10522
10522
  } catch (e) {
@@ -10700,7 +10700,7 @@ var require_get_nextjs_edge_function = __commonJS({
10700
10700
  var require_resolve_from = __commonJS({
10701
10701
  "../../node_modules/.pnpm/resolve-from@5.0.0/node_modules/resolve-from/index.js"(exports, module2) {
10702
10702
  "use strict";
10703
- var path5 = require("path");
10703
+ var path6 = require("path");
10704
10704
  var Module = require("module");
10705
10705
  var fs5 = require("fs");
10706
10706
  var resolveFrom2 = (fromDirectory, moduleId, silent) => {
@@ -10714,14 +10714,14 @@ var require_resolve_from = __commonJS({
10714
10714
  fromDirectory = fs5.realpathSync(fromDirectory);
10715
10715
  } catch (error) {
10716
10716
  if (error.code === "ENOENT") {
10717
- fromDirectory = path5.resolve(fromDirectory);
10717
+ fromDirectory = path6.resolve(fromDirectory);
10718
10718
  } else if (silent) {
10719
10719
  return;
10720
10720
  } else {
10721
10721
  throw error;
10722
10722
  }
10723
10723
  }
10724
- const fromFile = path5.join(fromDirectory, "noop.js");
10724
+ const fromFile = path6.join(fromDirectory, "noop.js");
10725
10725
  const resolveFileName = () => Module._resolveFilename(moduleId, {
10726
10726
  id: fromFile,
10727
10727
  filename: fromFile,
@@ -10821,13 +10821,13 @@ var import_async_sema3 = __toESM(require_lib());
10821
10821
  var import_escape_string_regexp3 = __toESM(require_escape_string_regexp());
10822
10822
  var import_find_up = __toESM(require_find_up());
10823
10823
  var import_fs_extra6 = __toESM(require_lib2());
10824
- var import_path5 = __toESM(require("path"));
10824
+ var import_path6 = __toESM(require("path"));
10825
10825
  var import_semver4 = __toESM(require_semver());
10826
10826
  var import_url2 = __toESM(require("url"));
10827
10827
 
10828
10828
  // src/create-serverless-config.ts
10829
10829
  var import_fs_extra4 = __toESM(require_lib2());
10830
- var import_path3 = __toESM(require("path"));
10830
+ var import_path4 = __toESM(require("path"));
10831
10831
  var import_semver2 = __toESM(require_semver());
10832
10832
 
10833
10833
  // src/utils.ts
@@ -10835,7 +10835,7 @@ var import_build_utils = require("@vercel/build-utils");
10835
10835
  var import_async_sema = __toESM(require_lib());
10836
10836
  var import_buffer_crc32 = __toESM(require_buffer_crc32());
10837
10837
  var import_fs_extra3 = __toESM(require_lib2());
10838
- var import_path2 = __toESM(require("path"));
10838
+ var import_path3 = __toESM(require("path"));
10839
10839
  var import_semver = __toESM(require_semver());
10840
10840
  var import_url = __toESM(require("url"));
10841
10841
  var import_module = require("module");
@@ -10988,6 +10988,129 @@ async function validateSize(script, wasmFiles) {
10988
10988
  }
10989
10989
  }
10990
10990
 
10991
+ // src/metadata.ts
10992
+ var import_path2 = __toESM(require("path"));
10993
+ var STATIC_METADATA_IMAGES = {
10994
+ icon: {
10995
+ filename: "icon",
10996
+ extensions: ["ico", "jpg", "jpeg", "png", "svg"]
10997
+ },
10998
+ apple: {
10999
+ filename: "apple-icon",
11000
+ extensions: ["jpg", "jpeg", "png"]
11001
+ },
11002
+ openGraph: {
11003
+ filename: "opengraph-image",
11004
+ extensions: ["jpg", "jpeg", "png", "gif"]
11005
+ },
11006
+ twitter: {
11007
+ filename: "twitter-image",
11008
+ extensions: ["jpg", "jpeg", "png", "gif"]
11009
+ }
11010
+ };
11011
+ var groupSuffix = "(-\\w{6})?";
11012
+ var suffixMatcher = "\\d?";
11013
+ var METADATA_STATIC_FILE_REGEX = [
11014
+ new RegExp(`^[\\\\/]robots\\.txt$`),
11015
+ new RegExp(`^[\\\\/]manifest\\.(webmanifest|json)$`),
11016
+ new RegExp(`[\\\\/]sitemap\\.xml$`),
11017
+ new RegExp(`^[\\\\/]favicon\\.ico$`),
11018
+ new RegExp(
11019
+ `[\\\\/]${STATIC_METADATA_IMAGES.icon.filename}${suffixMatcher}${groupSuffix}${`\\.(?:${STATIC_METADATA_IMAGES.icon.extensions.join("|")})`}$`
11020
+ ),
11021
+ new RegExp(
11022
+ `[\\\\/]${STATIC_METADATA_IMAGES.apple.filename}${suffixMatcher}${groupSuffix}${`\\.(?:${STATIC_METADATA_IMAGES.apple.extensions.join("|")})`}$`
11023
+ ),
11024
+ new RegExp(
11025
+ `[\\\\/]${STATIC_METADATA_IMAGES.openGraph.filename}${suffixMatcher}${groupSuffix}${`\\.(?:${STATIC_METADATA_IMAGES.openGraph.extensions.join("|")})`}$`
11026
+ ),
11027
+ new RegExp(
11028
+ `[\\\\/]${STATIC_METADATA_IMAGES.twitter.filename}${suffixMatcher}${groupSuffix}${`\\.(?:${STATIC_METADATA_IMAGES.twitter.extensions.join("|")})`}$`
11029
+ )
11030
+ ];
11031
+ function isStaticMetadataRoute(pathname) {
11032
+ return METADATA_STATIC_FILE_REGEX.some((regex) => regex.test(pathname));
11033
+ }
11034
+ var CONTENT_TYPE_MAP = {
11035
+ ico: "image/x-icon",
11036
+ png: "image/png",
11037
+ jpg: "image/jpeg",
11038
+ jpeg: "image/jpeg",
11039
+ gif: "image/gif",
11040
+ svg: "image/svg+xml",
11041
+ txt: "text/plain",
11042
+ xml: "application/xml",
11043
+ json: "application/manifest+json",
11044
+ webmanifest: "application/manifest+json"
11045
+ };
11046
+ function djb2Hash(str) {
11047
+ let hash = 5381;
11048
+ for (let i = 0; i < str.length; i++) {
11049
+ const char = str.charCodeAt(i);
11050
+ hash = (hash << 5) + hash + char & 4294967295;
11051
+ }
11052
+ return hash >>> 0;
11053
+ }
11054
+ function getMetadataRouteSuffix(page) {
11055
+ const parentPathname = import_path2.default.dirname(page);
11056
+ if (page.endsWith("/sitemap")) {
11057
+ return "";
11058
+ }
11059
+ let suffix = "";
11060
+ const segments = parentPathname.split("/");
11061
+ if (segments.some(
11062
+ (seg) => seg.startsWith("(") && seg.endsWith(")") || seg.startsWith("@") && seg !== "@children"
11063
+ )) {
11064
+ suffix = djb2Hash(parentPathname).toString(36).slice(0, 6);
11065
+ }
11066
+ return suffix;
11067
+ }
11068
+ function normalizeAppPath(route) {
11069
+ const normalized = route.split("/").reduce((pathname2, segment) => {
11070
+ if (!segment) {
11071
+ return pathname2;
11072
+ }
11073
+ if (segment.startsWith("(") && segment.endsWith(")")) {
11074
+ return pathname2;
11075
+ }
11076
+ if (segment[0] === "@") {
11077
+ return pathname2;
11078
+ }
11079
+ return `${pathname2}/${segment}`;
11080
+ }, "");
11081
+ const { dir, name, ext } = import_path2.default.parse(normalized);
11082
+ const suffix = getMetadataRouteSuffix(route);
11083
+ const pathname = import_path2.default.posix.join(
11084
+ dir,
11085
+ `${name}${suffix ? `-${suffix}` : ""}${ext}`
11086
+ );
11087
+ return pathname;
11088
+ }
11089
+ function getContentTypeFromFile(fileRef) {
11090
+ const ext = import_path2.default.extname(fileRef.fsPath).slice(1);
11091
+ return CONTENT_TYPE_MAP[ext];
11092
+ }
11093
+ function getSourceFileRefOfStaticMetadata(routeKey, appPathnameFilesMap) {
11094
+ const isMetadataPattern = isStaticMetadataRoute(routeKey);
11095
+ if (isMetadataPattern) {
11096
+ const hasStaticSourceFile = appPathnameFilesMap.has(routeKey);
11097
+ if (hasStaticSourceFile) {
11098
+ return appPathnameFilesMap.get(routeKey);
11099
+ }
11100
+ }
11101
+ return void 0;
11102
+ }
11103
+ function getAppRouterPathnameFilesMap(files) {
11104
+ const appPathnameFilesMap = /* @__PURE__ */ new Map();
11105
+ for (const [filePath, fileRef] of Object.entries(files)) {
11106
+ if (filePath.startsWith("app/") && "fsPath" in fileRef) {
11107
+ const normalizedPath = normalizeAppPath(filePath.slice(3));
11108
+ appPathnameFilesMap.set(normalizedPath, fileRef);
11109
+ }
11110
+ }
11111
+ return appPathnameFilesMap;
11112
+ }
11113
+
10991
11114
  // src/utils.ts
10992
11115
  var require_ = (0, import_module.createRequire)(__filename);
10993
11116
  var RSC_CONTENT_TYPE = "x-component";
@@ -11060,11 +11183,11 @@ function normalizePackageJson(defaultPackageJson = {}) {
11060
11183
  };
11061
11184
  }
11062
11185
  async function getNextConfig(workPath, entryPath) {
11063
- const entryConfig = import_path2.default.join(entryPath, "./next.config.js");
11186
+ const entryConfig = import_path3.default.join(entryPath, "./next.config.js");
11064
11187
  if (await import_fs_extra3.default.pathExists(entryConfig)) {
11065
11188
  return import_fs_extra3.default.readFile(entryConfig, "utf8");
11066
11189
  }
11067
- const workConfig = import_path2.default.join(workPath, "./next.config.js");
11190
+ const workConfig = import_path3.default.join(workPath, "./next.config.js");
11068
11191
  if (await import_fs_extra3.default.pathExists(workConfig)) {
11069
11192
  return import_fs_extra3.default.readFile(workConfig, "utf8");
11070
11193
  }
@@ -11097,7 +11220,7 @@ async function getRoutesManifest(entryPath, outputDirectory, nextVersion) {
11097
11220
  const shouldHaveManifest = nextVersion && import_semver.default.gte(nextVersion, "9.1.4-canary.0");
11098
11221
  if (!shouldHaveManifest)
11099
11222
  return;
11100
- const pathRoutesManifest = import_path2.default.join(
11223
+ const pathRoutesManifest = import_path3.default.join(
11101
11224
  entryPath,
11102
11225
  outputDirectory,
11103
11226
  "routes-manifest.json"
@@ -11126,7 +11249,7 @@ async function getRoutesManifest(entryPath, outputDirectory, nextVersion) {
11126
11249
  return routesManifest;
11127
11250
  }
11128
11251
  function getDestinationForSegmentRoute(isDev, entryDirectory, routeKeys, prefetchSegmentDataRoute) {
11129
- return `${!isDev ? import_path2.default.posix.join(
11252
+ return `${!isDev ? import_path3.default.posix.join(
11130
11253
  "/",
11131
11254
  entryDirectory,
11132
11255
  prefetchSegmentDataRoute.destination
@@ -11155,7 +11278,7 @@ async function getDynamicRoutes({
11155
11278
  return routesManifest.dynamicRoutes.filter(({ page }) => canUsePreviewMode || !omittedRoutes?.has(page)).map(({ page, regex }) => {
11156
11279
  return {
11157
11280
  src: regex,
11158
- dest: !isDev ? import_path2.default.posix.join("/", entryDirectory, page) : page,
11281
+ dest: !isDev ? import_path3.default.posix.join("/", entryDirectory, page) : page,
11159
11282
  check: true,
11160
11283
  status: canUsePreviewMode && omittedRoutes?.has(page) ? 404 : void 0
11161
11284
  };
@@ -11197,7 +11320,7 @@ async function getDynamicRoutes({
11197
11320
  } = params;
11198
11321
  const route = {
11199
11322
  src: namedRegex || regex,
11200
- dest: `${!isDev ? import_path2.default.posix.join("/", entryDirectory, page) : page}${routeKeys ? `?${Object.keys(routeKeys).map((key) => `${routeKeys[key]}=$${key}`).join("&")}` : ""}`
11323
+ dest: `${!isDev ? import_path3.default.posix.join("/", entryDirectory, page) : page}${routeKeys ? `?${Object.keys(routeKeys).map((key) => `${routeKeys[key]}=$${key}`).join("&")}` : ""}`
11201
11324
  };
11202
11325
  const { renderingMode, prefetchDataRoute } = prerenderManifest.fallbackRoutes[page] ?? prerenderManifest.blockingFallbackRoutes[page] ?? prerenderManifest.omittedRoutes[page] ?? {};
11203
11326
  const isRoutePPREnabled = renderingMode === "PARTIALLY_STATIC" /* PARTIALLY_STATIC */;
@@ -11312,7 +11435,7 @@ async function getDynamicRoutes({
11312
11435
  }));
11313
11436
  const routes = [];
11314
11437
  pageMatchers.forEach((pageMatcher) => {
11315
- const dest = !isDev ? import_path2.default.posix.join("/", entryDirectory, pageMatcher.pageName) : pageMatcher.pageName;
11438
+ const dest = !isDev ? import_path3.default.posix.join("/", entryDirectory, pageMatcher.pageName) : pageMatcher.pageName;
11316
11439
  if (pageMatcher && pageMatcher.matcher) {
11317
11440
  routes.push({
11318
11441
  src: pageMatcher.matcher.source,
@@ -11357,8 +11480,8 @@ function localizeDynamicRoutes(dynamicRoutes, dynamicPrefix, entryDirectory, sta
11357
11480
  );
11358
11481
  if (isLocalePrefixed && !(isCorrectLocaleAPIRoutes && isApiRoute) && !isAppRoute) {
11359
11482
  route.dest = route.dest.replace(
11360
- `${import_path2.default.posix.join("/", entryDirectory, "/")}`,
11361
- `${import_path2.default.posix.join("/", entryDirectory, "$nextLocale", "/")}`
11483
+ `${import_path3.default.posix.join("/", entryDirectory, "/")}`,
11484
+ `${import_path3.default.posix.join("/", entryDirectory, "$nextLocale", "/")}`
11362
11485
  );
11363
11486
  }
11364
11487
  } else {
@@ -11372,7 +11495,7 @@ function localizeDynamicRoutes(dynamicRoutes, dynamicPrefix, entryDirectory, sta
11372
11495
  return finalDynamicRoutes;
11373
11496
  }
11374
11497
  async function getImagesManifest(entryPath, outputDirectory) {
11375
- const pathImagesManifest = import_path2.default.join(
11498
+ const pathImagesManifest = import_path3.default.join(
11376
11499
  entryPath,
11377
11500
  outputDirectory,
11378
11501
  "images-manifest.json"
@@ -11394,7 +11517,7 @@ function filterStaticPages(staticPageFiles, dynamicPages, entryDirectory, htmlCo
11394
11517
  if (prerenderManifest.staticRoutes[routeName] || prerenderManifest.fallbackRoutes[routeName] || prerenderManifest.staticRoutes[normalizePage(pathname)] || prerenderManifest.fallbackRoutes[normalizePage(pathname)]) {
11395
11518
  return;
11396
11519
  }
11397
- const staticRoute = import_path2.default.posix.join(entryDirectory, pathname);
11520
+ const staticRoute = import_path3.default.posix.join(entryDirectory, pathname);
11398
11521
  staticPages[staticRoute] = staticPageFiles[page];
11399
11522
  staticPages[staticRoute].contentType = htmlContentType2;
11400
11523
  if (isDynamicRoute(pathname)) {
@@ -11440,7 +11563,7 @@ var collectTracedFiles = (baseDir, lstatResults, lstatSema, reasons) => async (f
11440
11563
  if (reason && reason.type.includes("initial")) {
11441
11564
  return;
11442
11565
  }
11443
- const filePath = import_path2.default.join(baseDir, file);
11566
+ const filePath = import_path3.default.join(baseDir, file);
11444
11567
  if (!lstatResults[filePath]) {
11445
11568
  lstatResults[filePath] = lstatSema.acquire().then(() => (0, import_fs_extra3.lstat)(filePath)).finally(() => lstatSema.release());
11446
11569
  }
@@ -11448,7 +11571,7 @@ var collectTracedFiles = (baseDir, lstatResults, lstatSema, reasons) => async (f
11448
11571
  return [
11449
11572
  file,
11450
11573
  new import_build_utils.FileFsRef({
11451
- fsPath: import_path2.default.join(baseDir, file),
11574
+ fsPath: import_path3.default.join(baseDir, file),
11452
11575
  mode
11453
11576
  })
11454
11577
  ];
@@ -11527,7 +11650,7 @@ async function createLambdaFromPseudoLayers({
11527
11650
  });
11528
11651
  }
11529
11652
  async function getExportIntent(entryPath) {
11530
- const pathExportMarker = import_path2.default.join(entryPath, ".next", "export-marker.json");
11653
+ const pathExportMarker = import_path3.default.join(entryPath, ".next", "export-marker.json");
11531
11654
  const hasExportMarker = await import_fs_extra3.default.access(pathExportMarker, import_fs_extra3.default.constants.F_OK).then(() => true).catch(() => false);
11532
11655
  if (!hasExportMarker) {
11533
11656
  return false;
@@ -11546,7 +11669,7 @@ async function getExportIntent(entryPath) {
11546
11669
  }
11547
11670
  }
11548
11671
  async function getExportStatus(entryPath) {
11549
- const pathExportDetail = import_path2.default.join(entryPath, ".next", "export-detail.json");
11672
+ const pathExportDetail = import_path3.default.join(entryPath, ".next", "export-detail.json");
11550
11673
  const hasExportDetail = await import_fs_extra3.default.access(pathExportDetail, import_fs_extra3.default.constants.F_OK).then(() => true).catch(() => false);
11551
11674
  if (!hasExportDetail) {
11552
11675
  return false;
@@ -11565,7 +11688,7 @@ async function getExportStatus(entryPath) {
11565
11688
  }
11566
11689
  }
11567
11690
  async function getRequiredServerFilesManifest(entryPath, outputDirectory) {
11568
- const pathRequiredServerFilesManifest = import_path2.default.join(
11691
+ const pathRequiredServerFilesManifest = import_path3.default.join(
11569
11692
  entryPath,
11570
11693
  outputDirectory,
11571
11694
  "required-server-files.json"
@@ -11601,7 +11724,7 @@ async function getRequiredServerFilesManifest(entryPath, outputDirectory) {
11601
11724
  return requiredServerFiles;
11602
11725
  }
11603
11726
  async function getPrerenderManifest(entryPath, outputDirectory) {
11604
- const pathPrerenderManifest = import_path2.default.join(
11727
+ const pathPrerenderManifest = import_path3.default.join(
11605
11728
  entryPath,
11606
11729
  outputDirectory,
11607
11730
  "prerender-manifest.json"
@@ -11814,7 +11937,7 @@ async function getPrerenderManifest(entryPath, outputDirectory) {
11814
11937
  var _usesSrcCache;
11815
11938
  async function usesSrcDirectory(workPath) {
11816
11939
  if (!_usesSrcCache) {
11817
- const sourcePages = import_path2.default.join(workPath, "src", "pages");
11940
+ const sourcePages = import_path3.default.join(workPath, "src", "pages");
11818
11941
  try {
11819
11942
  if ((await import_fs_extra3.default.stat(sourcePages)).isDirectory()) {
11820
11943
  _usesSrcCache = true;
@@ -11824,7 +11947,7 @@ async function usesSrcDirectory(workPath) {
11824
11947
  }
11825
11948
  }
11826
11949
  if (!_usesSrcCache) {
11827
- const sourceAppdir = import_path2.default.join(workPath, "src", "app");
11950
+ const sourceAppdir = import_path3.default.join(workPath, "src", "app");
11828
11951
  try {
11829
11952
  if ((await import_fs_extra3.default.stat(sourceAppdir)).isDirectory()) {
11830
11953
  _usesSrcCache = true;
@@ -11846,40 +11969,40 @@ async function getSourceFilePathFromPage({
11846
11969
  // middleware is not nested in pages/app
11847
11970
  ...page === "middleware" ? [""] : ["pages", "app"]
11848
11971
  ]) {
11849
- let fsPath = import_path2.default.join(workPath, pageType, page);
11972
+ let fsPath = import_path3.default.join(workPath, pageType, page);
11850
11973
  if (usesSrcDir) {
11851
- fsPath = import_path2.default.join(workPath, "src", pageType, page);
11974
+ fsPath = import_path3.default.join(workPath, "src", pageType, page);
11852
11975
  }
11853
11976
  if (import_fs_extra3.default.existsSync(fsPath)) {
11854
- return import_path2.default.relative(workPath, fsPath);
11977
+ return import_path3.default.relative(workPath, fsPath);
11855
11978
  }
11856
- const extensionless = fsPath.replace(import_path2.default.extname(fsPath), "");
11979
+ const extensionless = fsPath.replace(import_path3.default.extname(fsPath), "");
11857
11980
  for (const ext of extensionsToTry) {
11858
11981
  fsPath = `${extensionless}.${ext}`;
11859
- if (pageType === "app" && extensionless === import_path2.default.join(workPath, `${usesSrcDir ? "src/" : ""}app/index`)) {
11982
+ if (pageType === "app" && extensionless === import_path3.default.join(workPath, `${usesSrcDir ? "src/" : ""}app/index`)) {
11860
11983
  fsPath = `${extensionless.replace(/index$/, "page")}.${ext}`;
11861
11984
  }
11862
11985
  if (import_fs_extra3.default.existsSync(fsPath)) {
11863
- return import_path2.default.relative(workPath, fsPath);
11986
+ return import_path3.default.relative(workPath, fsPath);
11864
11987
  }
11865
11988
  }
11866
11989
  if (isDirectory(extensionless)) {
11867
11990
  if (pageType === "pages") {
11868
11991
  for (const ext of extensionsToTry) {
11869
- fsPath = import_path2.default.join(extensionless, `index.${ext}`);
11992
+ fsPath = import_path3.default.join(extensionless, `index.${ext}`);
11870
11993
  if (import_fs_extra3.default.existsSync(fsPath)) {
11871
- return import_path2.default.relative(workPath, fsPath);
11994
+ return import_path3.default.relative(workPath, fsPath);
11872
11995
  }
11873
11996
  }
11874
11997
  } else {
11875
11998
  for (const ext of extensionsToTry) {
11876
- fsPath = import_path2.default.join(extensionless, `page.${ext}`);
11999
+ fsPath = import_path3.default.join(extensionless, `page.${ext}`);
11877
12000
  if (import_fs_extra3.default.existsSync(fsPath)) {
11878
- return import_path2.default.relative(workPath, fsPath);
12001
+ return import_path3.default.relative(workPath, fsPath);
11879
12002
  }
11880
- fsPath = import_path2.default.join(extensionless, `route.${ext}`);
12003
+ fsPath = import_path3.default.join(extensionless, `route.${ext}`);
11881
12004
  if (import_fs_extra3.default.existsSync(fsPath)) {
11882
- return import_path2.default.relative(workPath, fsPath);
12005
+ return import_path3.default.relative(workPath, fsPath);
11883
12006
  }
11884
12007
  }
11885
12008
  }
@@ -11900,8 +12023,8 @@ async function getSourceFilePathFromPage({
11900
12023
  }
11901
12024
  return "";
11902
12025
  }
11903
- function isDirectory(path5) {
11904
- return import_fs_extra3.default.existsSync(path5) && import_fs_extra3.default.lstatSync(path5).isDirectory();
12026
+ function isDirectory(path6) {
12027
+ return import_fs_extra3.default.existsSync(path6) && import_fs_extra3.default.lstatSync(path6).isDirectory();
11905
12028
  }
11906
12029
  function normalizeLocalePath(pathname, locales) {
11907
12030
  let detectedLocale;
@@ -11985,7 +12108,7 @@ async function getPageLambdaGroups({
11985
12108
  });
11986
12109
  const config2 = JSON.parse(
11987
12110
  await import_fs_extra3.default.readFile(
11988
- import_path2.default.join(entryPath, import_path2.default.dirname(sourceFile), "../config.json"),
12111
+ import_path3.default.join(entryPath, import_path3.default.dirname(sourceFile), "../config.json"),
11989
12112
  "utf8"
11990
12113
  ).catch(() => "{}")
11991
12114
  );
@@ -12179,10 +12302,10 @@ var onPrerenderRouteInitial = (prerenderManifest, canUsePreviewMode, entryDirect
12179
12302
  const isAppPathRoute = appDir && (!dataRoute || dataRoute?.endsWith(".rsc"));
12180
12303
  const routeNoLocale = routesManifest?.i18n ? normalizeLocalePath(routeKey, routesManifest.i18n.locales).pathname : routeKey;
12181
12304
  if (routeNoLocale === "/404") {
12182
- static404Page = import_path2.default.posix.join(entryDirectory, routeKey);
12305
+ static404Page = import_path3.default.posix.join(entryDirectory, routeKey);
12183
12306
  }
12184
12307
  if (routeNoLocale === "/500") {
12185
- static500Page = import_path2.default.posix.join(entryDirectory, routeKey);
12308
+ static500Page = import_path3.default.posix.join(entryDirectory, routeKey);
12186
12309
  }
12187
12310
  if (
12188
12311
  // App paths must be Prerenders to ensure Vary header is
@@ -12231,7 +12354,8 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
12231
12354
  isEmptyAllowQueryForPrendered,
12232
12355
  isAppPPREnabled,
12233
12356
  isAppClientSegmentCacheEnabled,
12234
- isAppClientParamParsingEnabled
12357
+ isAppClientParamParsingEnabled,
12358
+ appPathnameFilesMap
12235
12359
  } = prerenderRouteArgs;
12236
12360
  if (isBlocking && isFallback) {
12237
12361
  throw new import_build_utils.NowBuildError({
@@ -12350,7 +12474,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
12350
12474
  let didPostpone = false;
12351
12475
  if (renderingMode === "PARTIALLY_STATIC" /* PARTIALLY_STATIC */ && appDir && !isBlocking) {
12352
12476
  postponedState = getHTMLPostponedState({ appDir, routeFileNoExt });
12353
- const htmlPath = import_path2.default.join(appDir, `${routeFileNoExt}.html`);
12477
+ const htmlPath = import_path3.default.join(appDir, `${routeFileNoExt}.html`);
12354
12478
  if (import_fs_extra3.default.existsSync(htmlPath)) {
12355
12479
  const html = import_fs_extra3.default.readFileSync(htmlPath, "utf8");
12356
12480
  initialHeaders ??= {};
@@ -12376,7 +12500,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
12376
12500
  });
12377
12501
  } else if (appDir && !dataRoute && !prefetchDataRoute && isAppPathRoute && !(isBlocking || isFallback)) {
12378
12502
  const contentType = initialHeaders?.["content-type"];
12379
- const fsPath = import_path2.default.join(appDir, `${routeFileNoExt}.body`);
12503
+ const fsPath = import_path3.default.join(appDir, `${routeFileNoExt}.body`);
12380
12504
  if (import_fs_extra3.default.existsSync(fsPath)) {
12381
12505
  htmlFallbackFsRef = new import_build_utils.FileFsRef({
12382
12506
  fsPath,
@@ -12388,7 +12512,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
12388
12512
  // Blocking pages do not have an HTML fallback
12389
12513
  null
12390
12514
  ) : new import_build_utils.FileFsRef({
12391
- fsPath: import_path2.default.join(
12515
+ fsPath: import_path3.default.join(
12392
12516
  isAppPathRoute && !isOmittedOrNotFound && appDir ? appDir : pagesDir,
12393
12517
  isFallback ? (
12394
12518
  // Fallback pages have a special file.
@@ -12409,7 +12533,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
12409
12533
  if (!isFallback && !isBlocking && (!isNotFound || static404Page) && dataRoute && (!isAppClientParamParsingEnabled || prefetchDataRoute)) {
12410
12534
  const basePath = isAppPathRoute && !isOmittedOrNotFound && appDir ? appDir : pagesDir;
12411
12535
  dataFallbackFsRef = new import_build_utils.FileFsRef({
12412
- fsPath: import_path2.default.join(
12536
+ fsPath: import_path3.default.join(
12413
12537
  basePath,
12414
12538
  `${isOmittedOrNotFound ? localePrefixed404 ? addLocaleOrDefault("/404.html", routesManifest, locale) : "/404.html" : isAppPathRoute ? (
12415
12539
  // When experimental PPR is enabled, we expect that the data
@@ -12425,17 +12549,17 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
12425
12549
  if (isOmittedOrNotFound) {
12426
12550
  initialStatus = 404;
12427
12551
  }
12428
- let outputPathPage = import_path2.default.posix.join(entryDirectory, routeFileNoExt);
12552
+ let outputPathPage = import_path3.default.posix.join(entryDirectory, routeFileNoExt);
12429
12553
  if (!isAppPathRoute) {
12430
12554
  outputPathPage = normalizeIndexOutput(outputPathPage, isServerMode);
12431
12555
  }
12432
- const outputPathPageOrig = import_path2.default.posix.join(
12556
+ const outputPathPageOrig = import_path3.default.posix.join(
12433
12557
  entryDirectory,
12434
12558
  origRouteFileNoExt
12435
12559
  );
12436
12560
  let lambda;
12437
12561
  function normalizeDataRoute(route) {
12438
- let normalized = import_path2.default.posix.join(entryDirectory, route);
12562
+ let normalized = import_path3.default.posix.join(entryDirectory, route);
12439
12563
  if (nonDynamicSsg || isFallback || isOmitted) {
12440
12564
  normalized = normalized.replace(
12441
12565
  new RegExp(`${(0, import_escape_string_regexp.default)(origRouteFileNoExt)}.json$`),
@@ -12464,9 +12588,9 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
12464
12588
  }
12465
12589
  if (isSharedLambdas) {
12466
12590
  const outputSrcPathPage = normalizeIndexOutput(
12467
- import_path2.default.join(
12591
+ import_path3.default.join(
12468
12592
  "/",
12469
- srcRoute == null ? outputPathPageOrig : import_path2.default.posix.join(
12593
+ srcRoute == null ? outputPathPageOrig : import_path3.default.posix.join(
12470
12594
  entryDirectory,
12471
12595
  srcRoute === "/" ? "/index" : srcRoute
12472
12596
  )
@@ -12476,7 +12600,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
12476
12600
  const lambdaId = pageLambdaMap[outputSrcPathPage];
12477
12601
  lambda = lambdas[lambdaId];
12478
12602
  } else {
12479
- let outputSrcPathPage = srcRoute == null ? outputPathPageOrig : import_path2.default.posix.join(
12603
+ let outputSrcPathPage = srcRoute == null ? outputPathPageOrig : import_path3.default.posix.join(
12480
12604
  entryDirectory,
12481
12605
  srcRoute === "/" ? "/index" : srcRoute
12482
12606
  );
@@ -12583,31 +12707,46 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
12583
12707
  htmlAllowQuery = [];
12584
12708
  }
12585
12709
  }
12586
- prerenders[outputPathPage] = new import_build_utils.Prerender({
12587
- expiration: initialRevalidate,
12588
- staleExpiration: initialExpire,
12589
- lambda,
12590
- allowQuery: htmlAllowQuery,
12591
- fallback: htmlFallbackFsRef,
12592
- group: prerenderGroup,
12593
- bypassToken: prerenderManifest.bypassToken,
12594
- experimentalBypassFor,
12595
- initialStatus,
12596
- initialHeaders,
12597
- sourcePath,
12598
- experimentalStreamingLambdaPath,
12599
- chain,
12600
- allowHeader,
12601
- ...isNotFound ? {
12602
- initialStatus: 404
12603
- } : {},
12604
- ...rscEnabled ? {
12605
- initialHeaders: {
12606
- ...initialHeaders,
12607
- vary: rscVaryHeader
12608
- }
12609
- } : {}
12610
- });
12710
+ const staticMetadataFile = getSourceFileRefOfStaticMetadata(
12711
+ routeKey,
12712
+ appPathnameFilesMap
12713
+ );
12714
+ if (staticMetadataFile) {
12715
+ const metadataFsRef = new import_build_utils.FileFsRef({
12716
+ fsPath: staticMetadataFile.fsPath
12717
+ });
12718
+ const contentType = getContentTypeFromFile(staticMetadataFile);
12719
+ if (contentType) {
12720
+ metadataFsRef.contentType = contentType;
12721
+ }
12722
+ prerenders[outputPathPage] = metadataFsRef;
12723
+ } else {
12724
+ prerenders[outputPathPage] = new import_build_utils.Prerender({
12725
+ expiration: initialRevalidate,
12726
+ staleExpiration: initialExpire,
12727
+ lambda,
12728
+ allowQuery: htmlAllowQuery,
12729
+ fallback: htmlFallbackFsRef,
12730
+ group: prerenderGroup,
12731
+ bypassToken: prerenderManifest.bypassToken,
12732
+ experimentalBypassFor,
12733
+ initialStatus,
12734
+ initialHeaders,
12735
+ sourcePath,
12736
+ experimentalStreamingLambdaPath,
12737
+ chain,
12738
+ allowHeader,
12739
+ ...isNotFound ? {
12740
+ initialStatus: 404
12741
+ } : {},
12742
+ ...rscEnabled ? {
12743
+ initialHeaders: {
12744
+ ...initialHeaders,
12745
+ vary: rscVaryHeader
12746
+ }
12747
+ } : {}
12748
+ });
12749
+ }
12611
12750
  const normalizePathData = (pathData) => {
12612
12751
  if ((srcRoute === "/" || srcRoute == "/index") && pathData.endsWith(RSC_PREFETCH_SUFFIX)) {
12613
12752
  delete lambdas[pathData];
@@ -12657,11 +12796,15 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
12657
12796
  const contentType = `application/x-nextjs-pre-render; state-length=${postponedState.length}; origin=${JSON.stringify(
12658
12797
  rscContentTypeHeader
12659
12798
  )}`;
12799
+ let rdcRSCAllowQuery = allowQuery;
12800
+ if (isAppClientParamParsingEnabled && (isFallback || isBlocking)) {
12801
+ rdcRSCAllowQuery = [];
12802
+ }
12660
12803
  prerenders[normalizePathData(outputPathData)] = new import_build_utils.Prerender({
12661
12804
  expiration: initialRevalidate,
12662
12805
  staleExpiration: initialExpire,
12663
12806
  lambda,
12664
- allowQuery,
12807
+ allowQuery: rdcRSCAllowQuery,
12665
12808
  fallback: isFallback ? null : new import_build_utils.FileBlob({
12666
12809
  data: postponedState,
12667
12810
  contentType
@@ -12689,11 +12832,11 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
12689
12832
  const prefetchSegmentSuffix = routesManifest?.rsc?.prefetchSegmentSuffix;
12690
12833
  const prefetchSegmentDirSuffix = routesManifest?.rsc?.prefetchSegmentDirSuffix;
12691
12834
  if (isAppClientSegmentCacheEnabled && prefetchSegmentSuffix && prefetchSegmentDirSuffix && rscDidPostponeHeader && appDir) {
12692
- const metaPath = import_path2.default.join(appDir, `${routeFileNoExt}.meta`);
12835
+ const metaPath = import_path3.default.join(appDir, `${routeFileNoExt}.meta`);
12693
12836
  if (import_fs_extra3.default.existsSync(metaPath)) {
12694
12837
  const meta = JSON.parse(import_fs_extra3.default.readFileSync(metaPath, "utf8"));
12695
12838
  if (typeof meta === "object" && meta !== null && "segmentPaths" in meta && typeof meta.segmentPaths === "object" && meta.segmentPaths !== null && Array.isArray(meta.segmentPaths)) {
12696
- const segmentsDir = import_path2.default.join(
12839
+ const segmentsDir = import_path3.default.join(
12697
12840
  appDir,
12698
12841
  routeFileNoExt + prefetchSegmentDirSuffix
12699
12842
  );
@@ -12702,13 +12845,13 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
12702
12845
  segmentAllowQuery = [];
12703
12846
  }
12704
12847
  for (const segmentPath of meta.segmentPaths) {
12705
- const outputSegmentPath = import_path2.default.join(
12848
+ const outputSegmentPath = import_path3.default.join(
12706
12849
  outputPathPage + prefetchSegmentDirSuffix,
12707
12850
  segmentPath
12708
12851
  ) + prefetchSegmentSuffix;
12709
12852
  let fallback = null;
12710
12853
  if (segmentAllowQuery && segmentAllowQuery.length === 0) {
12711
- const fsPath = import_path2.default.join(
12854
+ const fsPath = import_path3.default.join(
12712
12855
  segmentsDir,
12713
12856
  segmentPath + prefetchSegmentSuffix
12714
12857
  );
@@ -12756,7 +12899,7 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
12756
12899
  routesManifest,
12757
12900
  locale2
12758
12901
  );
12759
- let localeOutputPathPage = import_path2.default.posix.join(
12902
+ let localeOutputPathPage = import_path3.default.posix.join(
12760
12903
  entryDirectory,
12761
12904
  localeRouteFileNoExt
12762
12905
  );
@@ -12804,18 +12947,18 @@ async function getStaticFiles(entryPath, entryDirectory, outputDirectory) {
12804
12947
  console.time(collectLabel);
12805
12948
  const nextStaticFiles = await (0, import_build_utils.glob)(
12806
12949
  "**",
12807
- import_path2.default.join(entryPath, outputDirectory, "static")
12950
+ import_path3.default.join(entryPath, outputDirectory, "static")
12808
12951
  );
12809
- const staticFolderFiles = await (0, import_build_utils.glob)("**", import_path2.default.join(entryPath, "static"));
12952
+ const staticFolderFiles = await (0, import_build_utils.glob)("**", import_path3.default.join(entryPath, "static"));
12810
12953
  let publicFolderFiles = {};
12811
12954
  let publicFolderPath;
12812
- if (await import_fs_extra3.default.pathExists(import_path2.default.join(entryPath, "public"))) {
12813
- publicFolderPath = import_path2.default.join(entryPath, "public");
12955
+ if (await import_fs_extra3.default.pathExists(import_path3.default.join(entryPath, "public"))) {
12956
+ publicFolderPath = import_path3.default.join(entryPath, "public");
12814
12957
  } else if (
12815
12958
  // check at the same level as the output directory also
12816
- await import_fs_extra3.default.pathExists(import_path2.default.join(entryPath, outputDirectory, "../public"))
12959
+ await import_fs_extra3.default.pathExists(import_path3.default.join(entryPath, outputDirectory, "../public"))
12817
12960
  ) {
12818
- publicFolderPath = import_path2.default.join(entryPath, outputDirectory, "../public");
12961
+ publicFolderPath = import_path3.default.join(entryPath, outputDirectory, "../public");
12819
12962
  }
12820
12963
  if (publicFolderPath) {
12821
12964
  (0, import_build_utils.debug)(`Using public folder at ${publicFolderPath}`);
@@ -12827,13 +12970,16 @@ async function getStaticFiles(entryPath, entryDirectory, outputDirectory) {
12827
12970
  const staticDirectoryFiles = {};
12828
12971
  const publicDirectoryFiles = {};
12829
12972
  for (const file of Object.keys(nextStaticFiles)) {
12830
- staticFiles[import_path2.default.posix.join(entryDirectory, `_next/static/${file}`)] = nextStaticFiles[file];
12973
+ const outputPath = import_path3.default.posix.join(entryDirectory, `_next/static/${file}`);
12974
+ staticFiles[outputPath] = nextStaticFiles[file];
12831
12975
  }
12832
12976
  for (const file of Object.keys(staticFolderFiles)) {
12833
- staticDirectoryFiles[import_path2.default.posix.join(entryDirectory, "static", file)] = staticFolderFiles[file];
12977
+ const outputPath = import_path3.default.posix.join(entryDirectory, "static", file);
12978
+ staticDirectoryFiles[outputPath] = staticFolderFiles[file];
12834
12979
  }
12835
12980
  for (const file of Object.keys(publicFolderFiles)) {
12836
- publicDirectoryFiles[import_path2.default.posix.join(entryDirectory, file)] = publicFolderFiles[file];
12981
+ const outputPath = import_path3.default.posix.join(entryDirectory, file);
12982
+ publicDirectoryFiles[outputPath] = publicFolderFiles[file];
12837
12983
  }
12838
12984
  console.timeEnd(collectLabel);
12839
12985
  return {
@@ -12855,17 +13001,17 @@ function pathnameToOutputName(entryDirectory, pathname) {
12855
13001
  if (pathname === "/") {
12856
13002
  pathname = "/index";
12857
13003
  }
12858
- return import_path2.default.posix.join(entryDirectory, pathname);
13004
+ return import_path3.default.posix.join(entryDirectory, pathname);
12859
13005
  }
12860
13006
  function getPostponeResumePathname(pathname) {
12861
13007
  if (pathname === "/")
12862
13008
  pathname = "/index";
12863
- return import_path2.default.posix.join("_next/postponed/resume", pathname);
13009
+ return import_path3.default.posix.join("_next/postponed/resume", pathname);
12864
13010
  }
12865
13011
  function getPostponeResumeOutput(entryDirectory, pathname) {
12866
13012
  if (pathname === "/")
12867
13013
  pathname = "/index";
12868
- return import_path2.default.posix.join(entryDirectory, "_next/postponed/resume", pathname);
13014
+ return import_path3.default.posix.join(entryDirectory, "_next/postponed/resume", pathname);
12869
13015
  }
12870
13016
  function updateRouteSrc(route, index, manifestItems) {
12871
13017
  if (route.src) {
@@ -12877,7 +13023,7 @@ async function getPrivateOutputs(dir, entries) {
12877
13023
  const files = {};
12878
13024
  const routes = [];
12879
13025
  for (const [existingFile, outputFile] of Object.entries(entries)) {
12880
- const fsPath = import_path2.default.join(dir, existingFile);
13026
+ const fsPath = import_path3.default.join(dir, existingFile);
12881
13027
  try {
12882
13028
  const { mode, size } = await (0, import_fs_extra3.stat)(fsPath);
12883
13029
  if (size > 30 * 1024 * 1024) {
@@ -12997,21 +13143,21 @@ async function getNodeMiddleware({
12997
13143
  sourceFile,
12998
13144
  config
12999
13145
  });
13000
- const middlewareFile = import_path2.default.join(
13146
+ const middlewareFile = import_path3.default.join(
13001
13147
  entryPath,
13002
13148
  outputDirectory,
13003
13149
  "server",
13004
13150
  "middleware.js"
13005
13151
  );
13006
13152
  const middlewareTrace = `${middlewareFile}.nft.json`;
13007
- const middlewareTraceDir = import_path2.default.dirname(middlewareTrace);
13153
+ const middlewareTraceDir = import_path3.default.dirname(middlewareTrace);
13008
13154
  const { files } = JSON.parse(await import_fs_extra3.default.readFile(middlewareTrace, "utf8"));
13009
13155
  const fileList = [];
13010
- const normalizedBaseDir = `${baseDir}${baseDir.endsWith(import_path2.default.sep) ? "" : import_path2.default.sep}`;
13156
+ const normalizedBaseDir = `${baseDir}${baseDir.endsWith(import_path3.default.sep) ? "" : import_path3.default.sep}`;
13011
13157
  files.forEach((file) => {
13012
- const absolutePath = import_path2.default.join(middlewareTraceDir, file);
13158
+ const absolutePath = import_path3.default.join(middlewareTraceDir, file);
13013
13159
  if (absolutePath.startsWith(normalizedBaseDir)) {
13014
- fileList.push(import_path2.default.relative(baseDir, absolutePath));
13160
+ fileList.push(import_path3.default.relative(baseDir, absolutePath));
13015
13161
  } else {
13016
13162
  console.log("outside base dir", absolutePath);
13017
13163
  }
@@ -13024,25 +13170,25 @@ async function getNodeMiddleware({
13024
13170
  )
13025
13171
  )).filter((entry) => !!entry)
13026
13172
  );
13027
- const absoluteOutputDirectory = import_path2.default.posix.join(entryPath, outputDirectory);
13028
- const launcherData = (await import_fs_extra3.default.readFile(import_path2.default.join(__dirname, "middleware-launcher.js"), "utf8")).replace(
13173
+ const absoluteOutputDirectory = import_path3.default.posix.join(entryPath, outputDirectory);
13174
+ const launcherData = (await import_fs_extra3.default.readFile(import_path3.default.join(__dirname, "middleware-launcher.js"), "utf8")).replace(
13029
13175
  /(?:var|const) conf = __NEXT_CONFIG__/,
13030
13176
  `const conf = ${JSON.stringify({
13031
13177
  ...requiredServerFilesManifest.config,
13032
- distDir: import_path2.default.relative(projectDir, absoluteOutputDirectory)
13178
+ distDir: import_path3.default.relative(projectDir, absoluteOutputDirectory)
13033
13179
  })}`
13034
13180
  ).replace(
13035
13181
  "__NEXT_MIDDLEWARE_PATH__",
13036
- "./" + import_path2.default.posix.join(
13037
- import_path2.default.posix.relative(projectDir, absoluteOutputDirectory),
13182
+ "./" + import_path3.default.posix.join(
13183
+ import_path3.default.posix.relative(projectDir, absoluteOutputDirectory),
13038
13184
  `server/middleware.js`
13039
13185
  )
13040
13186
  );
13041
13187
  const lambda = new import_build_utils.NodejsLambda({
13042
13188
  ...vercelConfigOpts,
13043
13189
  runtime: nodeVersion,
13044
- handler: import_path2.default.join(
13045
- import_path2.default.relative(baseDir, projectDir),
13190
+ handler: import_path3.default.join(
13191
+ import_path3.default.relative(baseDir, projectDir),
13046
13192
  "___next_launcher.cjs"
13047
13193
  ),
13048
13194
  useWebApi: true,
@@ -13054,10 +13200,10 @@ async function getNodeMiddleware({
13054
13200
  },
13055
13201
  files: {
13056
13202
  ...tracedFiles,
13057
- [import_path2.default.relative(baseDir, middlewareFile)]: new import_build_utils.FileFsRef({
13203
+ [import_path3.default.relative(baseDir, middlewareFile)]: new import_build_utils.FileFsRef({
13058
13204
  fsPath: middlewareFile
13059
13205
  }),
13060
- [import_path2.default.join(import_path2.default.relative(baseDir, projectDir), "___next_launcher.cjs")]: new import_build_utils.FileBlob({ data: launcherData })
13206
+ [import_path3.default.join(import_path3.default.relative(baseDir, projectDir), "___next_launcher.cjs")]: new import_build_utils.FileBlob({ data: launcherData })
13061
13207
  }
13062
13208
  });
13063
13209
  return {
@@ -13113,7 +13259,7 @@ async function getMiddlewareBundle({
13113
13259
  i18n: routesManifest.i18n
13114
13260
  }
13115
13261
  },
13116
- import_path2.default.resolve(entryPath, outputDirectory),
13262
+ import_path3.default.resolve(entryPath, outputDirectory),
13117
13263
  edgeFunction.wasm
13118
13264
  );
13119
13265
  return {
@@ -13127,7 +13273,7 @@ async function getMiddlewareBundle({
13127
13273
  );
13128
13274
  const wasmFiles = (edgeFunction.wasm ?? []).reduce(
13129
13275
  (acc, { filePath, name }) => {
13130
- const fullFilePath = import_path2.default.join(
13276
+ const fullFilePath = import_path3.default.join(
13131
13277
  entryPath,
13132
13278
  outputDirectory,
13133
13279
  filePath
@@ -13143,7 +13289,7 @@ async function getMiddlewareBundle({
13143
13289
  );
13144
13290
  const assetFiles = (edgeFunction.assets ?? []).reduce(
13145
13291
  (acc, { filePath, name }) => {
13146
- const fullFilePath = import_path2.default.join(
13292
+ const fullFilePath = import_path3.default.join(
13147
13293
  entryPath,
13148
13294
  outputDirectory,
13149
13295
  filePath
@@ -13213,7 +13359,7 @@ async function getMiddlewareBundle({
13213
13359
  }
13214
13360
  if (routesManifest?.basePath) {
13215
13361
  const isAppPathRoute = !!appPathRoutesManifest[shortPath];
13216
- shortPath = import_path2.default.posix.join(
13362
+ shortPath = import_path3.default.posix.join(
13217
13363
  "./",
13218
13364
  routesManifest?.basePath,
13219
13365
  shortPath.replace(/^\//, "")
@@ -13262,7 +13408,7 @@ async function getMiddlewareBundle({
13262
13408
  };
13263
13409
  }
13264
13410
  async function getFunctionsConfigManifest(entryPath, outputDirectory) {
13265
- const functionConfigManifestPath = import_path2.default.join(
13411
+ const functionConfigManifestPath = import_path3.default.join(
13266
13412
  entryPath,
13267
13413
  outputDirectory,
13268
13414
  "./server/functions-config-manifest.json"
@@ -13277,7 +13423,7 @@ async function getFunctionsConfigManifest(entryPath, outputDirectory) {
13277
13423
  return manifest.version === 1 ? manifest : void 0;
13278
13424
  }
13279
13425
  async function getMiddlewareManifest(entryPath, outputDirectory) {
13280
- const middlewareManifestPath = import_path2.default.join(
13426
+ const middlewareManifestPath = import_path3.default.join(
13281
13427
  entryPath,
13282
13428
  outputDirectory,
13283
13429
  "./server/middleware-manifest.json"
@@ -13406,7 +13552,7 @@ function isApiPage(page) {
13406
13552
  return page.replace(/\\/g, "/").match(/(serverless|server)\/pages\/api(\/|\.js$)/);
13407
13553
  }
13408
13554
  async function getVariantsManifest(entryPath, outputDirectory) {
13409
- const pathVariantsManifest = import_path2.default.join(
13555
+ const pathVariantsManifest = import_path3.default.join(
13410
13556
  entryPath,
13411
13557
  outputDirectory,
13412
13558
  "variants-manifest.json"
@@ -13418,7 +13564,7 @@ async function getVariantsManifest(entryPath, outputDirectory) {
13418
13564
  return variantsManifest;
13419
13565
  }
13420
13566
  async function getServerlessPages(params) {
13421
- const appDir = import_path2.default.join(params.pagesDir, "../app");
13567
+ const appDir = import_path3.default.join(params.pagesDir, "../app");
13422
13568
  const [pages, appPaths, middlewareManifest] = await Promise.all([
13423
13569
  (0, import_build_utils.glob)("**/!(_middleware).js", params.pagesDir),
13424
13570
  params.appPathRoutesManifest ? Promise.all([
@@ -13433,11 +13579,11 @@ async function getServerlessPages(params) {
13433
13579
  for (const [entry, normalizedEntry] of Object.entries(
13434
13580
  params.appPathRoutesManifest
13435
13581
  )) {
13436
- const normalizedPath = `${import_path2.default.join(
13582
+ const normalizedPath = `${import_path3.default.join(
13437
13583
  ".",
13438
13584
  normalizedEntry === "/" ? "/index" : normalizedEntry
13439
13585
  )}.js`;
13440
- const globPath = `${import_path2.default.posix.join(".", entry)}.js`;
13586
+ const globPath = `${import_path3.default.posix.join(".", entry)}.js`;
13441
13587
  if (appPaths[globPath]) {
13442
13588
  normalizedAppPaths[normalizedPath] = appPaths[globPath];
13443
13589
  }
@@ -13473,7 +13619,7 @@ function getHTMLPostponedState({
13473
13619
  appDir,
13474
13620
  routeFileNoExt
13475
13621
  }) {
13476
- const metaPath = import_path2.default.join(appDir, `${routeFileNoExt}.meta`);
13622
+ const metaPath = import_path3.default.join(appDir, `${routeFileNoExt}.meta`);
13477
13623
  if (!import_fs_extra3.default.existsSync(metaPath)) {
13478
13624
  return null;
13479
13625
  }
@@ -13484,7 +13630,7 @@ function getHTMLPostponedState({
13484
13630
  return meta.postponed;
13485
13631
  }
13486
13632
  async function getServerActionMetaRoutes(distDir) {
13487
- const manifestPath = import_path2.default.join(
13633
+ const manifestPath = import_path3.default.join(
13488
13634
  distDir,
13489
13635
  "server",
13490
13636
  "server-reference-manifest.json"
@@ -13582,8 +13728,8 @@ async function createServerlessConfig(workPath, entryPath, nextVersion) {
13582
13728
  } catch (_ignored) {
13583
13729
  }
13584
13730
  }
13585
- const primaryConfigPath = import_path3.default.join(entryPath, "next.config.js");
13586
- const secondaryConfigPath = import_path3.default.join(workPath, "next.config.js");
13731
+ const primaryConfigPath = import_path4.default.join(entryPath, "next.config.js");
13732
+ const secondaryConfigPath = import_path4.default.join(workPath, "next.config.js");
13587
13733
  const backupConfigName = `next.config.__vercel_builder_backup__.js`;
13588
13734
  const hasPrimaryConfig = import_fs_extra4.default.existsSync(primaryConfigPath);
13589
13735
  const hasSecondaryConfig = import_fs_extra4.default.existsSync(secondaryConfigPath);
@@ -13591,13 +13737,13 @@ async function createServerlessConfig(workPath, entryPath, nextVersion) {
13591
13737
  let backupConfigPath;
13592
13738
  if (hasPrimaryConfig) {
13593
13739
  configPath = primaryConfigPath;
13594
- backupConfigPath = import_path3.default.join(entryPath, backupConfigName);
13740
+ backupConfigPath = import_path4.default.join(entryPath, backupConfigName);
13595
13741
  } else if (hasSecondaryConfig) {
13596
13742
  configPath = secondaryConfigPath;
13597
- backupConfigPath = import_path3.default.join(workPath, backupConfigName);
13743
+ backupConfigPath = import_path4.default.join(workPath, backupConfigName);
13598
13744
  } else {
13599
13745
  configPath = primaryConfigPath;
13600
- backupConfigPath = import_path3.default.join(entryPath, backupConfigName);
13746
+ backupConfigPath = import_path4.default.join(entryPath, backupConfigName);
13601
13747
  }
13602
13748
  if (import_fs_extra4.default.existsSync(configPath)) {
13603
13749
  await import_fs_extra4.default.rename(configPath, backupConfigPath);
@@ -13947,7 +14093,7 @@ var legacy_versions_default = [
13947
14093
  ];
13948
14094
 
13949
14095
  // src/server-build.ts
13950
- var import_path4 = __toESM(require("path"));
14096
+ var import_path5 = __toESM(require("path"));
13951
14097
  var import_semver3 = __toESM(require_semver());
13952
14098
  var import_async_sema2 = __toESM(require_lib());
13953
14099
  var import_build_utils2 = require("@vercel/build-utils");
@@ -13990,6 +14136,7 @@ async function serverBuild({
13990
14136
  config = {},
13991
14137
  functionsConfigManifest,
13992
14138
  privateOutputs,
14139
+ files,
13993
14140
  baseDir,
13994
14141
  workPath,
13995
14142
  entryPath,
@@ -14053,7 +14200,7 @@ async function serverBuild({
14053
14200
  nextVersion,
14054
14201
  EMPTY_ALLOW_QUERY_FOR_PRERENDERED_VERSION
14055
14202
  );
14056
- const projectDir = requiredServerFilesManifest.relativeAppDir ? import_path4.default.join(baseDir, requiredServerFilesManifest.relativeAppDir) : requiredServerFilesManifest.appDir || entryPath;
14203
+ const projectDir = requiredServerFilesManifest.relativeAppDir ? import_path5.default.join(baseDir, requiredServerFilesManifest.relativeAppDir) : requiredServerFilesManifest.appDir || entryPath;
14057
14204
  const inversedAppPathManifest = {};
14058
14205
  if (appPathRoutesManifest) {
14059
14206
  for (const ogRoute of Object.keys(appPathRoutesManifest)) {
@@ -14065,7 +14212,7 @@ async function serverBuild({
14065
14212
  let appDir = null;
14066
14213
  const rscHeader = routesManifest.rsc?.header?.toLowerCase() || "__rsc__";
14067
14214
  if (appPathRoutesManifest) {
14068
- appDir = import_path4.default.join(pagesDir, "../app");
14215
+ appDir = import_path5.default.join(pagesDir, "../app");
14069
14216
  appBuildTraces = await (0, import_build_utils2.glob)("**/*.js.nft.json", appDir);
14070
14217
  appRscPrefetches = isAppPPREnabled ? {} : await (0, import_build_utils2.glob)(`**/*${RSC_PREFETCH_SUFFIX}`, appDir);
14071
14218
  const rscContentTypeHeader = routesManifest?.rsc?.contentTypeHeader || RSC_CONTENT_TYPE;
@@ -14174,7 +14321,7 @@ async function serverBuild({
14174
14321
  CORRECT_MIDDLEWARE_ORDER_VERSION
14175
14322
  );
14176
14323
  const isCorrectManifests = !experimentalAllowBundling && import_semver3.default.gte(nextVersion, CORRECTED_MANIFESTS_VERSION);
14177
- let hasStatic500 = !!staticPages[import_path4.default.posix.join(entryDirectory, "500")];
14324
+ let hasStatic500 = !!staticPages[import_path5.default.posix.join(entryDirectory, "500")];
14178
14325
  if (lambdaPageKeys.length === 0) {
14179
14326
  throw new import_build_utils2.NowBuildError({
14180
14327
  code: "NEXT_NO_SERVER_PAGES",
@@ -14188,12 +14335,12 @@ async function serverBuild({
14188
14335
  };
14189
14336
  const { i18n } = routesManifest;
14190
14337
  const hasPages404 = routesManifest.pages404;
14191
- let static404Page = staticPages[import_path4.default.posix.join(entryDirectory, "404")] && hasPages404 ? import_path4.default.posix.join(entryDirectory, "404") : staticPages[import_path4.default.posix.join(entryDirectory, "_errors/404")] ? import_path4.default.posix.join(entryDirectory, "_errors/404") : void 0;
14192
- if (!static404Page && i18n && staticPages[import_path4.default.posix.join(entryDirectory, i18n.defaultLocale, "404")]) {
14193
- static404Page = import_path4.default.posix.join(entryDirectory, i18n.defaultLocale, "404");
14338
+ let static404Page = staticPages[import_path5.default.posix.join(entryDirectory, "404")] && hasPages404 ? import_path5.default.posix.join(entryDirectory, "404") : staticPages[import_path5.default.posix.join(entryDirectory, "_errors/404")] ? import_path5.default.posix.join(entryDirectory, "_errors/404") : void 0;
14339
+ if (!static404Page && i18n && staticPages[import_path5.default.posix.join(entryDirectory, i18n.defaultLocale, "404")]) {
14340
+ static404Page = import_path5.default.posix.join(entryDirectory, i18n.defaultLocale, "404");
14194
14341
  }
14195
14342
  if (!hasStatic500 && i18n) {
14196
- hasStatic500 = !!staticPages[import_path4.default.posix.join(entryDirectory, i18n.defaultLocale, "500")];
14343
+ hasStatic500 = !!staticPages[import_path5.default.posix.join(entryDirectory, i18n.defaultLocale, "500")];
14197
14344
  }
14198
14345
  const lstatSema = new import_async_sema2.Sema(25);
14199
14346
  const lstatResults = {};
@@ -14255,7 +14402,7 @@ async function serverBuild({
14255
14402
  try {
14256
14403
  nextServerBuildTrace = JSON.parse(
14257
14404
  await import_fs_extra5.default.readFile(
14258
- import_path4.default.join(
14405
+ import_path5.default.join(
14259
14406
  entryPath,
14260
14407
  outputDirectory,
14261
14408
  useBundledServer ? "next-minimal-server.js.nft.json" : "next-server.js.nft.json"
@@ -14268,7 +14415,7 @@ async function serverBuild({
14268
14415
  try {
14269
14416
  instrumentationHookBuildTrace = JSON.parse(
14270
14417
  await import_fs_extra5.default.readFile(
14271
- import_path4.default.join(
14418
+ import_path5.default.join(
14272
14419
  entryPath,
14273
14420
  outputDirectory,
14274
14421
  "server",
@@ -14281,9 +14428,9 @@ async function serverBuild({
14281
14428
  }
14282
14429
  if (nextServerBuildTrace) {
14283
14430
  initialFileList = nextServerBuildTrace.files.map((file) => {
14284
- return import_path4.default.relative(
14431
+ return import_path5.default.relative(
14285
14432
  baseDir,
14286
- import_path4.default.join(entryPath, outputDirectory, file)
14433
+ import_path5.default.join(entryPath, outputDirectory, file)
14287
14434
  );
14288
14435
  });
14289
14436
  initialFileReasons = /* @__PURE__ */ new Map();
@@ -14297,7 +14444,7 @@ async function serverBuild({
14297
14444
  processCwd: entryPath,
14298
14445
  ignore: [
14299
14446
  ...requiredServerFilesManifest.ignore.map(
14300
- (file) => import_path4.default.join(entryPath, file)
14447
+ (file) => import_path5.default.join(entryPath, file)
14301
14448
  ),
14302
14449
  "node_modules/next/dist/pages/**/*",
14303
14450
  `node_modules/${getNextServerPath(
@@ -14317,9 +14464,9 @@ async function serverBuild({
14317
14464
  if (instrumentationHookBuildTrace) {
14318
14465
  initialFileList = initialFileList.concat(
14319
14466
  instrumentationHookBuildTrace.files.map((file) => {
14320
- return import_path4.default.relative(
14467
+ return import_path5.default.relative(
14321
14468
  baseDir,
14322
- import_path4.default.join(entryPath, outputDirectory, "server", file)
14469
+ import_path5.default.join(entryPath, outputDirectory, "server", file)
14323
14470
  );
14324
14471
  })
14325
14472
  );
@@ -14372,21 +14519,21 @@ async function serverBuild({
14372
14519
  }
14373
14520
  });
14374
14521
  const requiredFiles = {};
14375
- requiredFiles[import_path4.default.relative(baseDir, nextServerFile)] = new import_build_utils2.FileFsRef({
14522
+ requiredFiles[import_path5.default.relative(baseDir, nextServerFile)] = new import_build_utils2.FileFsRef({
14376
14523
  mode: (await import_fs_extra5.default.lstat(nextServerFile)).mode,
14377
14524
  fsPath: nextServerFile
14378
14525
  });
14379
14526
  if (static404Pages.size > 0) {
14380
14527
  if (i18n) {
14381
14528
  for (const locale of i18n.locales) {
14382
- const static404Page2 = import_path4.default.posix.join(entryDirectory, locale, "404");
14529
+ const static404Page2 = import_path5.default.posix.join(entryDirectory, locale, "404");
14383
14530
  static404Pages.add(static404Page2);
14384
14531
  }
14385
14532
  }
14386
14533
  for (const static404Page2 of static404Pages) {
14387
14534
  let static404File = staticPages[static404Page2];
14388
14535
  if (!static404File) {
14389
- const static404FilePath = import_path4.default.join(
14536
+ const static404FilePath = import_path5.default.join(
14390
14537
  pagesDir,
14391
14538
  `${static404Page2}.html`
14392
14539
  );
@@ -14397,7 +14544,7 @@ async function serverBuild({
14397
14544
  }
14398
14545
  }
14399
14546
  if (static404File) {
14400
- requiredFiles[import_path4.default.relative(baseDir, static404File.fsPath)] = static404File;
14547
+ requiredFiles[import_path5.default.relative(baseDir, static404File.fsPath)] = static404File;
14401
14548
  }
14402
14549
  }
14403
14550
  }
@@ -14405,31 +14552,31 @@ async function serverBuild({
14405
14552
  for (const file of await import_fs_extra5.default.readdir(workPath)) {
14406
14553
  const isEnv = file === ".env" || file.startsWith(".env.");
14407
14554
  if (isEnv) {
14408
- const statResult = await import_fs_extra5.default.lstat(import_path4.default.join(workPath, file));
14555
+ const statResult = await import_fs_extra5.default.lstat(import_path5.default.join(workPath, file));
14409
14556
  if (statResult.isFile()) {
14410
14557
  envFiles.push(file);
14411
14558
  }
14412
14559
  }
14413
14560
  }
14414
14561
  for (const envFile of envFiles) {
14415
- requiredFiles[import_path4.default.join(import_path4.default.relative(baseDir, entryPath), envFile)] = new import_build_utils2.FileFsRef({
14416
- fsPath: import_path4.default.join(workPath, envFile)
14562
+ requiredFiles[import_path5.default.join(import_path5.default.relative(baseDir, entryPath), envFile)] = new import_build_utils2.FileFsRef({
14563
+ fsPath: import_path5.default.join(workPath, envFile)
14417
14564
  });
14418
14565
  }
14419
14566
  await Promise.all(
14420
14567
  requiredServerFilesManifest.files.map(async (file) => {
14421
14568
  await lstatSema.acquire();
14422
- let fsPath = import_path4.default.join(
14569
+ let fsPath = import_path5.default.join(
14423
14570
  entryPath,
14424
14571
  // remove last part of outputDirectory `.next` since this is already
14425
14572
  // included in the file path
14426
- import_path4.default.join(outputDirectory, ".."),
14573
+ import_path5.default.join(outputDirectory, ".."),
14427
14574
  file
14428
14575
  );
14429
14576
  if (projectDir) {
14430
- fsPath = import_path4.default.join(projectDir, file);
14577
+ fsPath = import_path5.default.join(projectDir, file);
14431
14578
  }
14432
- const relativePath = import_path4.default.relative(baseDir, fsPath);
14579
+ const relativePath = import_path5.default.relative(baseDir, fsPath);
14433
14580
  const { mode } = await import_fs_extra5.default.lstat(fsPath);
14434
14581
  lstatSema.release();
14435
14582
  requiredFiles[relativePath] = new import_build_utils2.FileFsRef({
@@ -14479,16 +14626,16 @@ async function serverBuild({
14479
14626
  });
14480
14627
  }
14481
14628
  const launcherData = await import_fs_extra5.default.readFile(
14482
- import_path4.default.join(__dirname, "server-launcher.js"),
14629
+ import_path5.default.join(__dirname, "server-launcher.js"),
14483
14630
  "utf8"
14484
14631
  );
14485
14632
  let launcher = launcherData.replace(
14486
14633
  /(?:var|const) conf = __NEXT_CONFIG__/,
14487
14634
  `const conf = ${JSON.stringify({
14488
14635
  ...requiredServerFilesManifest.config,
14489
- distDir: import_path4.default.relative(
14636
+ distDir: import_path5.default.relative(
14490
14637
  projectDir,
14491
- import_path4.default.join(entryPath, outputDirectory)
14638
+ import_path5.default.join(entryPath, outputDirectory)
14492
14639
  ),
14493
14640
  compress: false
14494
14641
  })}`
@@ -14500,10 +14647,10 @@ async function serverBuild({
14500
14647
  "// @preserve pre-next-server-target",
14501
14648
  `process.env.__NEXT_PRIVATE_PREBUNDLED_REACT = "${requiredServerFilesManifest.config?.experimental?.serverActions ? "experimental" : "next"}"`
14502
14649
  );
14503
- if (entryDirectory !== "." && import_path4.default.posix.join("/", entryDirectory) !== routesManifest.basePath) {
14650
+ if (entryDirectory !== "." && import_path5.default.posix.join("/", entryDirectory) !== routesManifest.basePath) {
14504
14651
  launcher = launcher.replace(
14505
14652
  "// @preserve entryDirectory handler",
14506
- `req.url = req.url.replace(/^${import_path4.default.posix.join("/", entryDirectory).replace(/\//g, "\\/")}/, '')`
14653
+ `req.url = req.url.replace(/^${import_path5.default.posix.join("/", entryDirectory).replace(/\//g, "\\/")}/, '')`
14507
14654
  );
14508
14655
  }
14509
14656
  const pageTraces = {};
@@ -14520,7 +14667,7 @@ async function serverBuild({
14520
14667
  let originalPagePath = page;
14521
14668
  if (appDir && lambdaAppPaths[page]) {
14522
14669
  const { fsPath } = lambdaAppPaths[page];
14523
- originalPagePath = import_path4.default.relative(appDir, fsPath);
14670
+ originalPagePath = import_path5.default.relative(appDir, fsPath);
14524
14671
  }
14525
14672
  return originalPagePath;
14526
14673
  };
@@ -14561,7 +14708,7 @@ ${JSON.stringify(
14561
14708
  let fileList = [];
14562
14709
  let reasons;
14563
14710
  if (pageBuildTrace) {
14564
- const { files } = JSON.parse(
14711
+ const { files: files2 } = JSON.parse(
14565
14712
  await import_fs_extra5.default.readFile(pageBuildTrace.fsPath, "utf8")
14566
14713
  );
14567
14714
  const isAppPath = appDir && lambdaAppPaths[page];
@@ -14570,9 +14717,9 @@ ${JSON.stringify(
14570
14717
  ".__sc_client__.js"
14571
14718
  ) : null;
14572
14719
  if (serverComponentFile && await import_fs_extra5.default.pathExists(serverComponentFile)) {
14573
- files.push(
14574
- import_path4.default.relative(
14575
- import_path4.default.dirname(pageBuildTrace.fsPath),
14720
+ files2.push(
14721
+ import_path5.default.relative(
14722
+ import_path5.default.dirname(pageBuildTrace.fsPath),
14576
14723
  serverComponentFile
14577
14724
  )
14578
14725
  );
@@ -14580,25 +14727,25 @@ ${JSON.stringify(
14580
14727
  const scTrace = JSON.parse(
14581
14728
  await import_fs_extra5.default.readFile(`${serverComponentFile}.nft.json`, "utf8")
14582
14729
  );
14583
- scTrace.files.forEach((file) => files.push(file));
14730
+ scTrace.files.forEach((file) => files2.push(file));
14584
14731
  } catch (err) {
14585
14732
  }
14586
14733
  }
14587
14734
  fileList = [];
14588
14735
  const curPagesDir = isAppPath && appDir ? appDir : pagesDir;
14589
- const pageDir = import_path4.default.dirname(import_path4.default.join(curPagesDir, originalPagePath));
14590
- const normalizedBaseDir = `${baseDir}${baseDir.endsWith(import_path4.default.sep) ? "" : import_path4.default.sep}`;
14591
- files.forEach((file) => {
14592
- const absolutePath = import_path4.default.join(pageDir, file);
14736
+ const pageDir = import_path5.default.dirname(import_path5.default.join(curPagesDir, originalPagePath));
14737
+ const normalizedBaseDir = `${baseDir}${baseDir.endsWith(import_path5.default.sep) ? "" : import_path5.default.sep}`;
14738
+ files2.forEach((file) => {
14739
+ const absolutePath = import_path5.default.join(pageDir, file);
14593
14740
  if (absolutePath.startsWith(normalizedBaseDir)) {
14594
- fileList.push(import_path4.default.relative(baseDir, absolutePath));
14741
+ fileList.push(import_path5.default.relative(baseDir, absolutePath));
14595
14742
  }
14596
14743
  });
14597
14744
  reasons = /* @__PURE__ */ new Map();
14598
14745
  } else {
14599
14746
  const lambdaPage = lambdaPages[page];
14600
14747
  fileList = Array.from(
14601
- parentFilesMap?.get(import_path4.default.relative(baseDir, lambdaPage.fsPath)) || []
14748
+ parentFilesMap?.get(import_path5.default.relative(baseDir, lambdaPage.fsPath)) || []
14602
14749
  );
14603
14750
  reasons = traceResult?.reasons || /* @__PURE__ */ new Map();
14604
14751
  }
@@ -14773,8 +14920,8 @@ ${JSON.stringify(
14773
14920
  ...internalPages,
14774
14921
  ...group.isAppRouter && appNotFoundTraces ? ["_not-found.js"] : []
14775
14922
  ]) {
14776
- const pageFileName = import_path4.default.normalize(
14777
- import_path4.default.relative(baseDir, lambdaPages[page].fsPath)
14923
+ const pageFileName = import_path5.default.normalize(
14924
+ import_path5.default.relative(baseDir, lambdaPages[page].fsPath)
14778
14925
  );
14779
14926
  groupPageFiles[pageFileName] = compressedPages[page];
14780
14927
  }
@@ -14785,8 +14932,8 @@ ${JSON.stringify(
14785
14932
  "server/pages-manifest.json",
14786
14933
  ...appPathRoutesManifest ? ["server/app-paths-manifest.json"] : []
14787
14934
  ]) {
14788
- const fsPath = import_path4.default.join(entryPath, outputDirectory, manifest);
14789
- const relativePath = import_path4.default.relative(baseDir, fsPath);
14935
+ const fsPath = import_path5.default.join(entryPath, outputDirectory, manifest);
14936
+ const relativePath = import_path5.default.relative(baseDir, fsPath);
14790
14937
  delete group.pseudoLayer[relativePath];
14791
14938
  const manifestData = await import_fs_extra5.default.readJSON(fsPath);
14792
14939
  const normalizedPages = new Set(
@@ -14837,7 +14984,7 @@ ${JSON.stringify(
14837
14984
  let launcherData2 = group.isAppRouter ? appLauncher : launcher;
14838
14985
  let preloadChunks = [];
14839
14986
  if (process.env.VERCEL_NEXT_PRELOAD_COMMON === "1") {
14840
- const nextPackageDir = import_path4.default.dirname(
14987
+ const nextPackageDir = import_path5.default.dirname(
14841
14988
  (0, import_resolve_from.default)(projectDir, "next/package.json")
14842
14989
  );
14843
14990
  if (group.isPages) {
@@ -14851,8 +14998,8 @@ ${JSON.stringify(
14851
14998
  }
14852
14999
  const normalizedPreloadChunks = [];
14853
15000
  for (const preloadChunk of preloadChunks) {
14854
- const absoluteChunk = preloadChunk.startsWith(".next") ? import_path4.default.join(projectDir, preloadChunk) : import_path4.default.join(nextPackageDir, "..", preloadChunk);
14855
- if (group.pseudoLayer[import_path4.default.join(".", import_path4.default.relative(baseDir, absoluteChunk))]) {
15001
+ const absoluteChunk = preloadChunk.startsWith(".next") ? import_path5.default.join(projectDir, preloadChunk) : import_path5.default.join(nextPackageDir, "..", preloadChunk);
15002
+ if (group.pseudoLayer[import_path5.default.join(".", import_path5.default.relative(baseDir, absoluteChunk))]) {
14856
15003
  normalizedPreloadChunks.push(
14857
15004
  // relative files need to be prefixed with ./ for require
14858
15005
  preloadChunk.startsWith(".next") ? `./${preloadChunk}` : preloadChunk
@@ -14867,7 +15014,7 @@ ${JSON.stringify(
14867
15014
  }
14868
15015
  }
14869
15016
  const launcherFiles = {
14870
- [import_path4.default.join(import_path4.default.relative(baseDir, projectDir), "___next_launcher.cjs")]: new import_build_utils2.FileBlob({ data: launcherData2 })
15017
+ [import_path5.default.join(import_path5.default.relative(baseDir, projectDir), "___next_launcher.cjs")]: new import_build_utils2.FileBlob({ data: launcherData2 })
14871
15018
  };
14872
15019
  const operationType = getOperationType({ group, prerenderManifest });
14873
15020
  const options = {
@@ -14876,8 +15023,8 @@ ${JSON.stringify(
14876
15023
  ...updatedManifestFiles
14877
15024
  },
14878
15025
  layers: [group.pseudoLayer, groupPageFiles],
14879
- handler: import_path4.default.join(
14880
- import_path4.default.relative(baseDir, projectDir),
15026
+ handler: import_path5.default.join(
15027
+ import_path5.default.relative(baseDir, projectDir),
14881
15028
  "___next_launcher.cjs"
14882
15029
  ),
14883
15030
  operationType,
@@ -14901,11 +15048,11 @@ ${JSON.stringify(
14901
15048
  if (!isPrerender && routesManifest?.i18n) {
14902
15049
  isPrerender = routesManifest.i18n.locales.some((locale) => {
14903
15050
  return prerenderRoutes.has(
14904
- import_path4.default.join("/", locale, pageName === "index" ? "" : pageName)
15051
+ import_path5.default.join("/", locale, pageName === "index" ? "" : pageName)
14905
15052
  );
14906
15053
  });
14907
15054
  }
14908
- let outputName = import_path4.default.posix.join(entryDirectory, pageName);
15055
+ let outputName = import_path5.default.posix.join(entryDirectory, pageName);
14909
15056
  if (group.isActionLambda) {
14910
15057
  outputName = `${outputName}.action`;
14911
15058
  }
@@ -14933,7 +15080,7 @@ ${JSON.stringify(
14933
15080
  continue;
14934
15081
  const output = getPostponeResumePathname(routePathname);
14935
15082
  lambdas[output] = lambda;
14936
- outputName = import_path4.default.posix.join(entryDirectory, routePathname);
15083
+ outputName = import_path5.default.posix.join(entryDirectory, routePathname);
14937
15084
  experimentalStreamingLambdaPaths.set(outputName, {
14938
15085
  pathname: getPostponeResumePathname(routePathname),
14939
15086
  output
@@ -14948,7 +15095,7 @@ ${JSON.stringify(
14948
15095
  if (i18n && !isPrerender && !group.isAppRouter && (!isCorrectLocaleAPIRoutes || !(pageName === "api" || pageName.startsWith("api/")))) {
14949
15096
  for (const locale of i18n.locales) {
14950
15097
  lambdas[normalizeIndexOutput(
14951
- import_path4.default.posix.join(
15098
+ import_path5.default.posix.join(
14952
15099
  entryDirectory,
14953
15100
  locale,
14954
15101
  pageName === "index" ? "" : pageName
@@ -14999,7 +15146,7 @@ ${JSON.stringify(
14999
15146
  if (appPathRoutesManifest) {
15000
15147
  const edgeFunctions = middleware.edgeFunctions;
15001
15148
  for (const page of Object.values(appPathRoutesManifest)) {
15002
- const pathname = import_path4.default.posix.join(
15149
+ const pathname = import_path5.default.posix.join(
15003
15150
  "./",
15004
15151
  entryDirectory,
15005
15152
  page === "/" ? "/index" : page
@@ -15024,12 +15171,12 @@ ${JSON.stringify(
15024
15171
  continue;
15025
15172
  if (route.sourcePage === route.page)
15026
15173
  continue;
15027
- const sourcePathname = import_path4.default.posix.join(
15174
+ const sourcePathname = import_path5.default.posix.join(
15028
15175
  "./",
15029
15176
  entryDirectory,
15030
15177
  route.sourcePage === "/" ? "/index" : route.sourcePage
15031
15178
  );
15032
- const pathname = import_path4.default.posix.join(
15179
+ const pathname = import_path5.default.posix.join(
15033
15180
  "./",
15034
15181
  entryDirectory,
15035
15182
  route.page === "/" ? "/index" : route.page
@@ -15067,7 +15214,8 @@ ${JSON.stringify(
15067
15214
  isEmptyAllowQueryForPrendered,
15068
15215
  isAppPPREnabled,
15069
15216
  isAppClientSegmentCacheEnabled,
15070
- isAppClientParamParsingEnabled
15217
+ isAppClientParamParsingEnabled,
15218
+ appPathnameFilesMap: getAppRouterPathnameFilesMap(files)
15071
15219
  });
15072
15220
  await Promise.all(
15073
15221
  Object.keys(prerenderManifest.staticRoutes).map(
@@ -15106,7 +15254,7 @@ ${JSON.stringify(
15106
15254
  return;
15107
15255
  }
15108
15256
  delete lambdas[normalizeIndexOutput(
15109
- import_path4.default.posix.join("./", entryDirectory, route === "/" ? "/index" : route),
15257
+ import_path5.default.posix.join("./", entryDirectory, route === "/" ? "/index" : route),
15110
15258
  true
15111
15259
  )];
15112
15260
  });
@@ -15141,7 +15289,7 @@ ${JSON.stringify(
15141
15289
  );
15142
15290
  const pagesPlaceholderRscEntries = {};
15143
15291
  if (appDir) {
15144
- const pagesManifest = import_path4.default.join(
15292
+ const pagesManifest = import_path5.default.join(
15145
15293
  entryPath,
15146
15294
  outputDirectory,
15147
15295
  `server/pages-manifest.json`
@@ -15165,14 +15313,14 @@ ${JSON.stringify(
15165
15313
  return isNextDataServerResolving ? [
15166
15314
  // strip _next/data prefix for resolving
15167
15315
  {
15168
- src: `^${import_path4.default.posix.join(
15316
+ src: `^${import_path5.default.posix.join(
15169
15317
  "/",
15170
15318
  entryDirectory,
15171
15319
  "/_next/data/",
15172
15320
  escapedBuildId,
15173
15321
  "/(.*).json"
15174
15322
  )}`,
15175
- dest: `${import_path4.default.posix.join(
15323
+ dest: `${import_path5.default.posix.join(
15176
15324
  "/",
15177
15325
  entryDirectory,
15178
15326
  "/$1",
@@ -15190,14 +15338,14 @@ ${JSON.stringify(
15190
15338
  // normalize "/index" from "/_next/data/index.json" to -> just "/"
15191
15339
  // as matches a rewrite sources will expect just "/"
15192
15340
  {
15193
- src: import_path4.default.posix.join("^/", entryDirectory, "/index(?:/)?"),
15341
+ src: import_path5.default.posix.join("^/", entryDirectory, "/index(?:/)?"),
15194
15342
  has: [
15195
15343
  {
15196
15344
  type: "header",
15197
15345
  key: "x-nextjs-data"
15198
15346
  }
15199
15347
  ],
15200
- dest: import_path4.default.posix.join(
15348
+ dest: import_path5.default.posix.join(
15201
15349
  "/",
15202
15350
  entryDirectory,
15203
15351
  trailingSlash ? "/" : ""
@@ -15210,7 +15358,7 @@ ${JSON.stringify(
15210
15358
  const denormalizeNextDataRoute = (isOverride = false) => {
15211
15359
  return isNextDataServerResolving ? [
15212
15360
  {
15213
- src: import_path4.default.posix.join(
15361
+ src: import_path5.default.posix.join(
15214
15362
  "^/",
15215
15363
  entryDirectory !== "." ? `${entryDirectory}${trailingSlash ? "/$" : "$"}` : "$"
15216
15364
  ),
@@ -15220,7 +15368,7 @@ ${JSON.stringify(
15220
15368
  key: "x-nextjs-data"
15221
15369
  }
15222
15370
  ],
15223
- dest: `${import_path4.default.posix.join(
15371
+ dest: `${import_path5.default.posix.join(
15224
15372
  "/",
15225
15373
  entryDirectory,
15226
15374
  "/_next/data/",
@@ -15231,7 +15379,7 @@ ${JSON.stringify(
15231
15379
  ...isOverride ? { override: true } : {}
15232
15380
  },
15233
15381
  {
15234
- src: import_path4.default.posix.join(
15382
+ src: import_path5.default.posix.join(
15235
15383
  "^/",
15236
15384
  entryDirectory,
15237
15385
  "((?!_next/)(?:.*[^/]|.*))/?$"
@@ -15242,7 +15390,7 @@ ${JSON.stringify(
15242
15390
  key: "x-nextjs-data"
15243
15391
  }
15244
15392
  ],
15245
- dest: `${import_path4.default.posix.join(
15393
+ dest: `${import_path5.default.posix.join(
15246
15394
  "/",
15247
15395
  entryDirectory,
15248
15396
  "/_next/data/",
@@ -15256,7 +15404,7 @@ ${JSON.stringify(
15256
15404
  };
15257
15405
  let nextDataCatchallOutput = void 0;
15258
15406
  if (isNextDataServerResolving) {
15259
- const catchallFsPath = import_path4.default.join(
15407
+ const catchallFsPath = import_path5.default.join(
15260
15408
  entryPath,
15261
15409
  outputDirectory,
15262
15410
  "__next_data_catchall.json"
@@ -15272,7 +15420,7 @@ ${JSON.stringify(
15272
15420
  const prefetchSegmentSuffix = routesManifest?.rsc?.prefetchSegmentSuffix;
15273
15421
  const rscPrefetchHeader = routesManifest.rsc?.prefetchHeader?.toLowerCase();
15274
15422
  const rscVaryHeader = routesManifest?.rsc?.varyHeader || "RSC, Next-Router-State-Tree, Next-Router-Prefetch";
15275
- const appNotFoundPath = import_path4.default.posix.join(".", entryDirectory, "_not-found");
15423
+ const appNotFoundPath = import_path5.default.posix.join(".", entryDirectory, "_not-found");
15276
15424
  if (isAppPPREnabled && !rscPrefetchHeader) {
15277
15425
  throw new Error("Invariant: cannot use PPR without 'rsc.prefetchHeader'");
15278
15426
  }
@@ -15305,7 +15453,7 @@ ${JSON.stringify(
15305
15453
  !shouldSkipPrefetchRSCHandling
15306
15454
  );
15307
15455
  const serverActionMetaRoutes = await getServerActionMetaRoutes(
15308
- import_path4.default.join(entryPath, outputDirectory)
15456
+ import_path5.default.join(entryPath, outputDirectory)
15309
15457
  );
15310
15458
  return {
15311
15459
  wildcard: wildcardConfig,
@@ -15333,7 +15481,7 @@ ${JSON.stringify(
15333
15481
  // server to return a plain text "Not Found". However, as we handle the "_next/static/"
15334
15482
  // routes in Vercel CLI, the Next.js behavior is overwritten. Therefore, create a
15335
15483
  // ".txt" file with "Not Found" content and rewrite any not found static assets to it.
15336
- [import_path4.default.posix.join(".", entryDirectory, "_next/static/not-found.txt")]: new import_build_utils2.FileBlob({
15484
+ [import_path5.default.posix.join(".", entryDirectory, "_next/static/not-found.txt")]: new import_build_utils2.FileBlob({
15337
15485
  data: "Not Found",
15338
15486
  contentType: "text/plain"
15339
15487
  })
@@ -15361,31 +15509,31 @@ ${JSON.stringify(
15361
15509
  // $wildcard
15362
15510
  // This is split into two rules to avoid matching the `/index` route as it causes issues with trailing slash redirect
15363
15511
  {
15364
- src: `^${import_path4.default.posix.join(
15512
+ src: `^${import_path5.default.posix.join(
15365
15513
  "/",
15366
15514
  entryDirectory,
15367
15515
  "/"
15368
15516
  )}(?!(?:_next/.*|${i18n.locales.map((locale) => (0, import_escape_string_regexp2.default)(locale)).join("|")})(?:/.*|$))$`,
15369
15517
  // we aren't able to ensure trailing slash mode here
15370
15518
  // so ensure this comes after the trailing slash redirect
15371
- dest: `${entryDirectory !== "." ? import_path4.default.posix.join("/", entryDirectory) : ""}$wildcard${trailingSlash ? "/" : ""}`,
15519
+ dest: `${entryDirectory !== "." ? import_path5.default.posix.join("/", entryDirectory) : ""}$wildcard${trailingSlash ? "/" : ""}`,
15372
15520
  continue: true
15373
15521
  },
15374
15522
  {
15375
- src: `^${import_path4.default.posix.join(
15523
+ src: `^${import_path5.default.posix.join(
15376
15524
  "/",
15377
15525
  entryDirectory,
15378
15526
  "/"
15379
15527
  )}(?!(?:_next/.*|${i18n.locales.map((locale) => (0, import_escape_string_regexp2.default)(locale)).join("|")})(?:/.*|$))(.*)$`,
15380
15528
  // we aren't able to ensure trailing slash mode here
15381
15529
  // so ensure this comes after the trailing slash redirect
15382
- dest: `${entryDirectory !== "." ? import_path4.default.posix.join("/", entryDirectory) : ""}$wildcard/$1`,
15530
+ dest: `${entryDirectory !== "." ? import_path5.default.posix.join("/", entryDirectory) : ""}$wildcard/$1`,
15383
15531
  continue: true
15384
15532
  },
15385
15533
  // Handle redirecting to locale specific domains
15386
15534
  ...i18n.domains && i18n.domains.length > 0 && i18n.localeDetection !== false ? [
15387
15535
  {
15388
- src: `^${import_path4.default.posix.join(
15536
+ src: `^${import_path5.default.posix.join(
15389
15537
  "/",
15390
15538
  entryDirectory
15391
15539
  )}/?(?:${i18n.locales.map((locale) => (0, import_escape_string_regexp2.default)(locale)).join("|")})?/?$`,
@@ -15433,8 +15581,8 @@ ${JSON.stringify(
15433
15581
  // and when localeDetection is enabled.
15434
15582
  ...!skipDefaultLocaleRewrite2 || i18n.localeDetection !== false ? [
15435
15583
  {
15436
- src: `^${import_path4.default.posix.join("/", entryDirectory)}$`,
15437
- dest: `${import_path4.default.posix.join(
15584
+ src: `^${import_path5.default.posix.join("/", entryDirectory)}$`,
15585
+ dest: `${import_path5.default.posix.join(
15438
15586
  "/",
15439
15587
  entryDirectory,
15440
15588
  i18n.defaultLocale
@@ -15447,12 +15595,12 @@ ${JSON.stringify(
15447
15595
  // e.g. for /de/posts/[slug] x-now-route-matches would have
15448
15596
  // 1=posts%2Fpost-1
15449
15597
  {
15450
- src: `^${import_path4.default.posix.join(
15598
+ src: `^${import_path5.default.posix.join(
15451
15599
  "/",
15452
15600
  entryDirectory,
15453
15601
  "/"
15454
15602
  )}(?!(?:_next/.*|${i18n.locales.map((locale) => (0, import_escape_string_regexp2.default)(locale)).join("|")})(?:/.*|$))(.*)$`,
15455
- dest: `${import_path4.default.posix.join(
15603
+ dest: `${import_path5.default.posix.join(
15456
15604
  "/",
15457
15605
  entryDirectory,
15458
15606
  i18n.defaultLocale
@@ -15473,7 +15621,7 @@ ${JSON.stringify(
15473
15621
  // Make sure to 404 for the /404 path itself
15474
15622
  ...i18n ? [
15475
15623
  {
15476
- src: `${import_path4.default.posix.join(
15624
+ src: `${import_path5.default.posix.join(
15477
15625
  "/",
15478
15626
  entryDirectory,
15479
15627
  "/"
@@ -15489,7 +15637,7 @@ ${JSON.stringify(
15489
15637
  }
15490
15638
  ] : [
15491
15639
  {
15492
- src: import_path4.default.posix.join("/", entryDirectory, "404/?"),
15640
+ src: import_path5.default.posix.join("/", entryDirectory, "404/?"),
15493
15641
  status: 404,
15494
15642
  continue: true,
15495
15643
  missing: [
@@ -15503,7 +15651,7 @@ ${JSON.stringify(
15503
15651
  // Make sure to 500 when visiting /500 directly for static 500
15504
15652
  ...!hasStatic500 ? [] : i18n ? [
15505
15653
  {
15506
- src: `${import_path4.default.posix.join(
15654
+ src: `${import_path5.default.posix.join(
15507
15655
  "/",
15508
15656
  entryDirectory,
15509
15657
  "/"
@@ -15513,7 +15661,7 @@ ${JSON.stringify(
15513
15661
  }
15514
15662
  ] : [
15515
15663
  {
15516
- src: import_path4.default.posix.join("/", entryDirectory, "500"),
15664
+ src: import_path5.default.posix.join("/", entryDirectory, "500"),
15517
15665
  status: 500,
15518
15666
  continue: true
15519
15667
  }
@@ -15527,8 +15675,8 @@ ${JSON.stringify(
15527
15675
  ...appDir ? [
15528
15676
  ...isAppClientSegmentCacheEnabled && rscPrefetchHeader && prefetchSegmentHeader && prefetchSegmentDirSuffix && prefetchSegmentSuffix ? [
15529
15677
  {
15530
- src: import_path4.default.posix.join("/", entryDirectory, "/(?<path>.+)$"),
15531
- dest: import_path4.default.posix.join(
15678
+ src: import_path5.default.posix.join("/", entryDirectory, "/(?<path>.+)$"),
15679
+ dest: import_path5.default.posix.join(
15532
15680
  "/",
15533
15681
  entryDirectory,
15534
15682
  `/$path${prefetchSegmentDirSuffix}/$segmentPath${prefetchSegmentSuffix}`
@@ -15554,8 +15702,8 @@ ${JSON.stringify(
15554
15702
  override: true
15555
15703
  },
15556
15704
  {
15557
- src: import_path4.default.posix.join("^/", entryDirectory, "$"),
15558
- dest: import_path4.default.posix.join(
15705
+ src: import_path5.default.posix.join("^/", entryDirectory, "$"),
15706
+ dest: import_path5.default.posix.join(
15559
15707
  "/",
15560
15708
  entryDirectory,
15561
15709
  `/index${prefetchSegmentDirSuffix}/$segmentPath${prefetchSegmentSuffix}`
@@ -15583,7 +15731,7 @@ ${JSON.stringify(
15583
15731
  ] : [],
15584
15732
  ...rscPrefetchHeader && isAppPPREnabled && !shouldSkipPrefetchRSCHandling ? [
15585
15733
  {
15586
- src: `^${import_path4.default.posix.join("/", entryDirectory, "/")}$`,
15734
+ src: `^${import_path5.default.posix.join("/", entryDirectory, "/")}$`,
15587
15735
  has: [
15588
15736
  {
15589
15737
  type: "header",
@@ -15591,7 +15739,7 @@ ${JSON.stringify(
15591
15739
  value: "1"
15592
15740
  }
15593
15741
  ],
15594
- dest: import_path4.default.posix.join(
15742
+ dest: import_path5.default.posix.join(
15595
15743
  "/",
15596
15744
  entryDirectory,
15597
15745
  `/__index${RSC_PREFETCH_SUFFIX}`
@@ -15601,7 +15749,7 @@ ${JSON.stringify(
15601
15749
  override: true
15602
15750
  },
15603
15751
  {
15604
- src: `^${import_path4.default.posix.join(
15752
+ src: `^${import_path5.default.posix.join(
15605
15753
  "/",
15606
15754
  entryDirectory,
15607
15755
  "/((?!.+\\.rsc).+?)(?:/)?$"
@@ -15613,7 +15761,7 @@ ${JSON.stringify(
15613
15761
  value: "1"
15614
15762
  }
15615
15763
  ],
15616
- dest: import_path4.default.posix.join(
15764
+ dest: import_path5.default.posix.join(
15617
15765
  "/",
15618
15766
  entryDirectory,
15619
15767
  `/$1${RSC_PREFETCH_SUFFIX}`
@@ -15624,7 +15772,7 @@ ${JSON.stringify(
15624
15772
  }
15625
15773
  ] : [],
15626
15774
  {
15627
- src: `^${import_path4.default.posix.join("/", entryDirectory, "/?")}`,
15775
+ src: `^${import_path5.default.posix.join("/", entryDirectory, "/?")}`,
15628
15776
  has: [
15629
15777
  {
15630
15778
  type: "header",
@@ -15632,13 +15780,13 @@ ${JSON.stringify(
15632
15780
  value: "1"
15633
15781
  }
15634
15782
  ],
15635
- dest: import_path4.default.posix.join("/", entryDirectory, "/index.rsc"),
15783
+ dest: import_path5.default.posix.join("/", entryDirectory, "/index.rsc"),
15636
15784
  headers: { vary: rscVaryHeader },
15637
15785
  continue: true,
15638
15786
  override: true
15639
15787
  },
15640
15788
  {
15641
- src: `^${import_path4.default.posix.join(
15789
+ src: `^${import_path5.default.posix.join(
15642
15790
  "/",
15643
15791
  entryDirectory,
15644
15792
  "/((?!.+\\.rsc).+?)(?:/)?$"
@@ -15650,7 +15798,7 @@ ${JSON.stringify(
15650
15798
  value: "1"
15651
15799
  }
15652
15800
  ],
15653
- dest: import_path4.default.posix.join("/", entryDirectory, "/$1.rsc"),
15801
+ dest: import_path5.default.posix.join("/", entryDirectory, "/$1.rsc"),
15654
15802
  headers: { vary: rscVaryHeader },
15655
15803
  continue: true,
15656
15804
  override: true
@@ -15663,7 +15811,7 @@ ${JSON.stringify(
15663
15811
  // _next/image path
15664
15812
  ...routesManifest?.basePath ? [
15665
15813
  {
15666
- src: import_path4.default.posix.join("/", entryDirectory, "_next/image/?"),
15814
+ src: import_path5.default.posix.join("/", entryDirectory, "_next/image/?"),
15667
15815
  dest: "/_next/image",
15668
15816
  check: true
15669
15817
  }
@@ -15674,8 +15822,8 @@ ${JSON.stringify(
15674
15822
  // No-op _next/data rewrite to trigger handle: 'rewrites' and then 404
15675
15823
  // if no match to prevent rewriting _next/data unexpectedly
15676
15824
  {
15677
- src: import_path4.default.posix.join("/", entryDirectory, "_next/data/(.*)"),
15678
- dest: import_path4.default.posix.join("/", entryDirectory, "_next/data/$1"),
15825
+ src: import_path5.default.posix.join("/", entryDirectory, "_next/data/(.*)"),
15826
+ dest: import_path5.default.posix.join("/", entryDirectory, "_next/data/$1"),
15679
15827
  check: true
15680
15828
  }
15681
15829
  ] : [],
@@ -15683,12 +15831,12 @@ ${JSON.stringify(
15683
15831
  // as these won't be properly normalized by `afterFilesRewrites` / `dynamicRoutes`
15684
15832
  ...appPathRoutesManifest ? [
15685
15833
  {
15686
- src: import_path4.default.posix.join(
15834
+ src: import_path5.default.posix.join(
15687
15835
  "/",
15688
15836
  entryDirectory,
15689
15837
  "/index(\\.action|\\.rsc)"
15690
15838
  ),
15691
- dest: import_path4.default.posix.join("/", entryDirectory),
15839
+ dest: import_path5.default.posix.join("/", entryDirectory),
15692
15840
  continue: true
15693
15841
  }
15694
15842
  ] : [],
@@ -15699,12 +15847,12 @@ ${JSON.stringify(
15699
15847
  ...appPathRoutesManifest ? [
15700
15848
  ...shouldSkipPrefetchRSCHandling ? [] : [
15701
15849
  {
15702
- src: import_path4.default.posix.join(
15850
+ src: import_path5.default.posix.join(
15703
15851
  "/",
15704
15852
  entryDirectory,
15705
15853
  "/\\.prefetch\\.rsc$"
15706
15854
  ),
15707
- dest: import_path4.default.posix.join(
15855
+ dest: import_path5.default.posix.join(
15708
15856
  "/",
15709
15857
  entryDirectory,
15710
15858
  `/__index${RSC_PREFETCH_SUFFIX}`
@@ -15712,12 +15860,12 @@ ${JSON.stringify(
15712
15860
  check: true
15713
15861
  },
15714
15862
  {
15715
- src: import_path4.default.posix.join(
15863
+ src: import_path5.default.posix.join(
15716
15864
  "/",
15717
15865
  entryDirectory,
15718
15866
  "(.+)/\\.prefetch\\.rsc$"
15719
15867
  ),
15720
- dest: import_path4.default.posix.join(
15868
+ dest: import_path5.default.posix.join(
15721
15869
  "/",
15722
15870
  entryDirectory,
15723
15871
  `$1${RSC_PREFETCH_SUFFIX}`
@@ -15726,13 +15874,13 @@ ${JSON.stringify(
15726
15874
  }
15727
15875
  ],
15728
15876
  {
15729
- src: import_path4.default.posix.join("/", entryDirectory, "/\\.rsc$"),
15730
- dest: import_path4.default.posix.join("/", entryDirectory, `/index.rsc`),
15877
+ src: import_path5.default.posix.join("/", entryDirectory, "/\\.rsc$"),
15878
+ dest: import_path5.default.posix.join("/", entryDirectory, `/index.rsc`),
15731
15879
  check: true
15732
15880
  },
15733
15881
  {
15734
- src: import_path4.default.posix.join("/", entryDirectory, "(.+)/\\.rsc$"),
15735
- dest: import_path4.default.posix.join("/", entryDirectory, "$1.rsc"),
15882
+ src: import_path5.default.posix.join("/", entryDirectory, "(.+)/\\.rsc$"),
15883
+ dest: import_path5.default.posix.join("/", entryDirectory, "$1.rsc"),
15736
15884
  check: true
15737
15885
  }
15738
15886
  ] : [],
@@ -15740,15 +15888,15 @@ ${JSON.stringify(
15740
15888
  ...fallbackRewrites,
15741
15889
  // make sure 404 page is used when a directory is matched without
15742
15890
  // an index page
15743
- { src: import_path4.default.posix.join("/", entryDirectory, ".*"), status: 404 },
15891
+ { src: import_path5.default.posix.join("/", entryDirectory, ".*"), status: 404 },
15744
15892
  { handle: "miss" },
15745
15893
  // We need to make sure to 404 for /_next after handle: miss since
15746
15894
  // handle: miss is called before rewrites and to prevent rewriting /_next
15747
15895
  {
15748
- src: import_path4.default.posix.join("/", entryDirectory, "_next/static/.+"),
15896
+ src: import_path5.default.posix.join("/", entryDirectory, "_next/static/.+"),
15749
15897
  status: 404,
15750
15898
  check: true,
15751
- dest: import_path4.default.posix.join(
15899
+ dest: import_path5.default.posix.join(
15752
15900
  "/",
15753
15901
  entryDirectory,
15754
15902
  "_next/static/not-found.txt"
@@ -15764,8 +15912,8 @@ ${JSON.stringify(
15764
15912
  // we only want to add the rewrite as the fallback case once routing is complete.
15765
15913
  ...skipDefaultLocaleRewrite2 && i18n.localeDetection === false ? [
15766
15914
  {
15767
- src: `^${import_path4.default.posix.join("/", entryDirectory)}$`,
15768
- dest: `${import_path4.default.posix.join(
15915
+ src: `^${import_path5.default.posix.join("/", entryDirectory)}$`,
15916
+ dest: `${import_path5.default.posix.join(
15769
15917
  "/",
15770
15918
  entryDirectory,
15771
15919
  i18n.defaultLocale
@@ -15778,12 +15926,12 @@ ${JSON.stringify(
15778
15926
  // e.g. for /de/posts/[slug] x-now-route-matches would have
15779
15927
  // 1=posts%2Fpost-1
15780
15928
  {
15781
- src: `^${import_path4.default.posix.join(
15929
+ src: `^${import_path5.default.posix.join(
15782
15930
  "/",
15783
15931
  entryDirectory,
15784
15932
  "/"
15785
15933
  )}(?!(?:_next/.*|${i18n.locales.map((locale) => (0, import_escape_string_regexp2.default)(locale)).join("|")})(?:/.*|$))(.*)$`,
15786
- dest: `${import_path4.default.posix.join(
15934
+ dest: `${import_path5.default.posix.join(
15787
15935
  "/",
15788
15936
  entryDirectory,
15789
15937
  i18n.defaultLocale
@@ -15792,7 +15940,7 @@ ${JSON.stringify(
15792
15940
  }
15793
15941
  ] : [],
15794
15942
  {
15795
- src: import_path4.default.posix.join(
15943
+ src: import_path5.default.posix.join(
15796
15944
  "/",
15797
15945
  entryDirectory,
15798
15946
  (0, import_escape_string_regexp2.default)(i18n.defaultLocale)
@@ -15801,8 +15949,8 @@ ${JSON.stringify(
15801
15949
  check: true
15802
15950
  },
15803
15951
  {
15804
- src: `^${import_path4.default.posix.join("/", entryDirectory)}/?(?:${i18n.locales.map((locale) => (0, import_escape_string_regexp2.default)(locale)).join("|")})/(.*)`,
15805
- dest: `${import_path4.default.posix.join("/", entryDirectory, "/")}$1`,
15952
+ src: `^${import_path5.default.posix.join("/", entryDirectory)}/?(?:${i18n.locales.map((locale) => (0, import_escape_string_regexp2.default)(locale)).join("|")})/(.*)`,
15953
+ dest: `${import_path5.default.posix.join("/", entryDirectory, "/")}$1`,
15806
15954
  check: true
15807
15955
  }
15808
15956
  ] : [],
@@ -15840,7 +15988,7 @@ ${JSON.stringify(
15840
15988
  "^"
15841
15989
  );
15842
15990
  }
15843
- route.src = import_path4.default.posix.join(
15991
+ route.src = import_path5.default.posix.join(
15844
15992
  "^/",
15845
15993
  entryDirectory,
15846
15994
  "_next/data/",
@@ -15850,14 +15998,14 @@ ${JSON.stringify(
15850
15998
  const parsedDestination = new URL(route.dest || "/", "http://n");
15851
15999
  let pathname = parsedDestination.pathname;
15852
16000
  const search = parsedDestination.search;
15853
- let isPrerender = !!prerenders[import_path4.default.join("./", pathname)];
16001
+ let isPrerender = !!prerenders[import_path5.default.join("./", pathname)];
15854
16002
  if (routesManifest.i18n) {
15855
16003
  for (const locale of routesManifest.i18n?.locales || []) {
15856
16004
  const prerenderPathname = pathname.replace(
15857
16005
  /\/\$nextLocale/,
15858
16006
  `/${locale}`
15859
16007
  );
15860
- if (prerenders[import_path4.default.join("./", prerenderPathname)]) {
16008
+ if (prerenders[import_path5.default.join("./", prerenderPathname)]) {
15861
16009
  isPrerender = true;
15862
16010
  break;
15863
16011
  }
@@ -15881,8 +16029,8 @@ ${JSON.stringify(
15881
16029
  // ensure we 404 for non-existent _next/data routes before
15882
16030
  // trying page dynamic routes
15883
16031
  {
15884
- src: import_path4.default.posix.join("/", entryDirectory, "_next/data/(.*)"),
15885
- dest: import_path4.default.posix.join("/", entryDirectory, "404"),
16032
+ src: import_path5.default.posix.join("/", entryDirectory, "_next/data/(.*)"),
16033
+ dest: import_path5.default.posix.join("/", entryDirectory, "404"),
15886
16034
  status: 404
15887
16035
  }
15888
16036
  ] : [],
@@ -15891,7 +16039,7 @@ ${JSON.stringify(
15891
16039
  ...dynamicRoutes,
15892
16040
  ...isNextDataServerResolving ? [
15893
16041
  {
15894
- src: `^${import_path4.default.posix.join(
16042
+ src: `^${import_path5.default.posix.join(
15895
16043
  "/",
15896
16044
  entryDirectory,
15897
16045
  "/_next/data/",
@@ -15907,7 +16055,7 @@ ${JSON.stringify(
15907
16055
  // add a catch-all data route so we don't 404 when getting
15908
16056
  // middleware effects
15909
16057
  {
15910
- src: `^${import_path4.default.posix.join(
16058
+ src: `^${import_path5.default.posix.join(
15911
16059
  "/",
15912
16060
  entryDirectory,
15913
16061
  "/_next/data/",
@@ -15923,7 +16071,7 @@ ${JSON.stringify(
15923
16071
  {
15924
16072
  // This ensures we only match known emitted-by-Next.js files and not
15925
16073
  // user-emitted files which may be missing a hash in their filename.
15926
- src: import_path4.default.posix.join(
16074
+ src: import_path5.default.posix.join(
15927
16075
  "/",
15928
16076
  entryDirectory,
15929
16077
  `_next/static/(?:[^/]+/pages|pages|chunks|runtime|css|image|media|${escapedBuildId})/.+`
@@ -15937,7 +16085,7 @@ ${JSON.stringify(
15937
16085
  important: true
15938
16086
  },
15939
16087
  {
15940
- src: import_path4.default.posix.join("/", entryDirectory, "/index(?:/)?"),
16088
+ src: import_path5.default.posix.join("/", entryDirectory, "/index(?:/)?"),
15941
16089
  headers: {
15942
16090
  "x-matched-path": "/"
15943
16091
  },
@@ -15945,7 +16093,7 @@ ${JSON.stringify(
15945
16093
  important: true
15946
16094
  },
15947
16095
  {
15948
- src: import_path4.default.posix.join("/", entryDirectory, `/((?!index$).*?)(?:/)?`),
16096
+ src: import_path5.default.posix.join("/", entryDirectory, `/((?!index$).*?)(?:/)?`),
15949
16097
  headers: {
15950
16098
  "x-matched-path": "/$1"
15951
16099
  },
@@ -15957,18 +16105,18 @@ ${JSON.stringify(
15957
16105
  // Custom Next.js 404 page
15958
16106
  ...i18n && (static404Page || hasIsr404Page || lambdaPages["404.js"]) ? [
15959
16107
  {
15960
- src: `${import_path4.default.posix.join(
16108
+ src: `${import_path5.default.posix.join(
15961
16109
  "/",
15962
16110
  entryDirectory,
15963
16111
  "/"
15964
16112
  )}(?<nextLocale>${i18n.locales.map((locale) => (0, import_escape_string_regexp2.default)(locale)).join("|")})(/.*|$)`,
15965
- dest: import_path4.default.posix.join("/", entryDirectory, "/$nextLocale/404"),
16113
+ dest: import_path5.default.posix.join("/", entryDirectory, "/$nextLocale/404"),
15966
16114
  status: 404,
15967
16115
  caseSensitive: true
15968
16116
  },
15969
16117
  {
15970
- src: import_path4.default.posix.join("/", entryDirectory, ".*"),
15971
- dest: import_path4.default.posix.join(
16118
+ src: import_path5.default.posix.join("/", entryDirectory, ".*"),
16119
+ dest: import_path5.default.posix.join(
15972
16120
  "/",
15973
16121
  entryDirectory,
15974
16122
  `/${i18n.defaultLocale}/404`
@@ -15977,7 +16125,7 @@ ${JSON.stringify(
15977
16125
  }
15978
16126
  ] : [
15979
16127
  {
15980
- src: import_path4.default.posix.join(
16128
+ src: import_path5.default.posix.join(
15981
16129
  "/",
15982
16130
  entryDirectory,
15983
16131
  // if entryDirectory is populated we need to
@@ -15985,10 +16133,10 @@ ${JSON.stringify(
15985
16133
  // that the entryDirectory (basePath) itself matches
15986
16134
  `${entryDirectory !== "." ? "?" : ""}.*`
15987
16135
  ),
15988
- dest: import_path4.default.posix.join(
16136
+ dest: import_path5.default.posix.join(
15989
16137
  "/",
15990
16138
  entryDirectory,
15991
- static404Page || hasIsr404Page || lambdas[import_path4.default.posix.join(entryDirectory, "404")] ? "/404" : appPathRoutesManifest && (middleware.edgeFunctions[appNotFoundPath] || lambdas[appNotFoundPath]) ? "/_not-found" : "/_error"
16139
+ static404Page || hasIsr404Page || lambdas[import_path5.default.posix.join(entryDirectory, "404")] ? "/404" : appPathRoutesManifest && (middleware.edgeFunctions[appNotFoundPath] || lambdas[appNotFoundPath]) ? "/_not-found" : "/_error"
15992
16140
  ),
15993
16141
  status: 404
15994
16142
  }
@@ -15996,18 +16144,18 @@ ${JSON.stringify(
15996
16144
  // custom 500 page if present
15997
16145
  ...i18n && (hasStatic500 || hasIsr500Page || lambdaPages["500.js"]) ? [
15998
16146
  {
15999
- src: `${import_path4.default.posix.join(
16147
+ src: `${import_path5.default.posix.join(
16000
16148
  "/",
16001
16149
  entryDirectory,
16002
16150
  "/"
16003
16151
  )}(?<nextLocale>${i18n.locales.map((locale) => (0, import_escape_string_regexp2.default)(locale)).join("|")})(/.*|$)`,
16004
- dest: import_path4.default.posix.join("/", entryDirectory, "/$nextLocale/500"),
16152
+ dest: import_path5.default.posix.join("/", entryDirectory, "/$nextLocale/500"),
16005
16153
  status: 500,
16006
16154
  caseSensitive: true
16007
16155
  },
16008
16156
  {
16009
- src: import_path4.default.posix.join("/", entryDirectory, ".*"),
16010
- dest: import_path4.default.posix.join(
16157
+ src: import_path5.default.posix.join("/", entryDirectory, ".*"),
16158
+ dest: import_path5.default.posix.join(
16011
16159
  "/",
16012
16160
  entryDirectory,
16013
16161
  `/${i18n.defaultLocale}/500`
@@ -16016,7 +16164,7 @@ ${JSON.stringify(
16016
16164
  }
16017
16165
  ] : [
16018
16166
  {
16019
- src: import_path4.default.posix.join(
16167
+ src: import_path5.default.posix.join(
16020
16168
  "/",
16021
16169
  entryDirectory,
16022
16170
  // if entryDirectory is populated we need to
@@ -16024,10 +16172,10 @@ ${JSON.stringify(
16024
16172
  // that the entryDirectory (basePath) itself matches
16025
16173
  `${entryDirectory !== "." ? "?" : ""}.*`
16026
16174
  ),
16027
- dest: import_path4.default.posix.join(
16175
+ dest: import_path5.default.posix.join(
16028
16176
  "/",
16029
16177
  entryDirectory,
16030
- hasStatic500 || hasIsr500Page || lambdas[import_path4.default.posix.join(entryDirectory, "500")] ? "/500" : "/_error"
16178
+ hasStatic500 || hasIsr500Page || lambdas[import_path5.default.posix.join(entryDirectory, "500")] ? "/500" : "/_error"
16031
16179
  ),
16032
16180
  status: 500
16033
16181
  }
@@ -16046,7 +16194,7 @@ var BEFORE_FILES_CONTINUE_NEXT_VERSION = "v10.2.3-canary.1";
16046
16194
  var REDIRECTS_NO_STATIC_NEXT_VERSION = "v11.0.2-canary.15";
16047
16195
  var MAX_AGE_ONE_YEAR = 31536e3;
16048
16196
  async function readPackageJson(entryPath) {
16049
- const packagePath = import_path5.default.join(entryPath, "package.json");
16197
+ const packagePath = import_path6.default.join(entryPath, "package.json");
16050
16198
  try {
16051
16199
  return JSON.parse(await (0, import_fs_extra6.readFile)(packagePath, "utf8"));
16052
16200
  } catch (err) {
@@ -16056,13 +16204,13 @@ async function readPackageJson(entryPath) {
16056
16204
  }
16057
16205
  async function writePackageJson(workPath, packageJson) {
16058
16206
  await (0, import_fs_extra6.writeFile)(
16059
- import_path5.default.join(workPath, "package.json"),
16207
+ import_path6.default.join(workPath, "package.json"),
16060
16208
  JSON.stringify(packageJson, null, 2)
16061
16209
  );
16062
16210
  }
16063
16211
  async function writeNpmRc(workPath, token) {
16064
16212
  await (0, import_fs_extra6.writeFile)(
16065
- import_path5.default.join(workPath, ".npmrc"),
16213
+ import_path6.default.join(workPath, ".npmrc"),
16066
16214
  `//registry.npmjs.org/:_authToken=${token}`
16067
16215
  );
16068
16216
  }
@@ -16115,14 +16263,14 @@ var build = async (buildOptions) => {
16115
16263
  buildCallback
16116
16264
  } = buildOptions;
16117
16265
  validateEntrypoint(entrypoint);
16118
- let entryDirectory = import_path5.default.dirname(entrypoint);
16119
- let entryPath = import_path5.default.join(workPath, entryDirectory);
16266
+ let entryDirectory = import_path6.default.dirname(entrypoint);
16267
+ let entryPath = import_path6.default.join(workPath, entryDirectory);
16120
16268
  if (config.rootDirectory) {
16121
16269
  repoRootPath = entryPath;
16122
- entryPath = import_path5.default.join(entryPath, config.rootDirectory);
16270
+ entryPath = import_path6.default.join(entryPath, config.rootDirectory);
16123
16271
  }
16124
- const outputDirectory = import_path5.default.join("./", config.outputDirectory || ".next");
16125
- const dotNextStatic = import_path5.default.join(entryPath, outputDirectory, "static");
16272
+ const outputDirectory = import_path6.default.join("./", config.outputDirectory || ".next");
16273
+ const dotNextStatic = import_path6.default.join(entryPath, outputDirectory, "static");
16126
16274
  const baseDir = repoRootPath || workPath;
16127
16275
  (0, import_build_utils3.debug)(
16128
16276
  JSON.stringify(
@@ -16147,7 +16295,7 @@ var build = async (buildOptions) => {
16147
16295
  }
16148
16296
  await (0, import_build_utils3.download)(files, workPath, meta);
16149
16297
  if (config.rootDirectory) {
16150
- workPath = import_path5.default.join(workPath, config.rootDirectory);
16298
+ workPath = import_path6.default.join(workPath, config.rootDirectory);
16151
16299
  }
16152
16300
  let pkg = await readPackageJson(entryPath);
16153
16301
  const nextVersionRange = await getNextVersionRange(entryPath);
@@ -16183,8 +16331,8 @@ var build = async (buildOptions) => {
16183
16331
  "WARNING: your application is being deployed in @vercel/next's legacy mode. http://err.sh/vercel/vercel/now-next-legacy-mode"
16184
16332
  );
16185
16333
  await Promise.all([
16186
- (0, import_fs_extra6.remove)(import_path5.default.join(entryPath, "yarn.lock")),
16187
- (0, import_fs_extra6.remove)(import_path5.default.join(entryPath, "package-lock.json"))
16334
+ (0, import_fs_extra6.remove)(import_path6.default.join(entryPath, "yarn.lock")),
16335
+ (0, import_fs_extra6.remove)(import_path6.default.join(entryPath, "package-lock.json"))
16188
16336
  ]);
16189
16337
  (0, import_build_utils3.debug)("Normalizing package.json");
16190
16338
  pkg = normalizePackageJson(pkg);
@@ -16295,7 +16443,7 @@ var build = async (buildOptions) => {
16295
16443
  if (Array.isArray(nowJsonData.routes) && nowJsonData.routes.length > 0) {
16296
16444
  hasLegacyRoutes = true;
16297
16445
  console.warn(
16298
- `WARNING: your application is being opted out of @vercel/next's optimized lambdas mode due to legacy routes in ${import_path5.default.basename(
16446
+ `WARNING: your application is being opted out of @vercel/next's optimized lambdas mode due to legacy routes in ${import_path6.default.basename(
16299
16447
  nowJsonPath
16300
16448
  )}. http://err.sh/vercel/vercel/next-legacy-routes-optimized-lambdas`
16301
16449
  );
@@ -16338,8 +16486,8 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16338
16486
  start: entryPath,
16339
16487
  base: repoRootPath
16340
16488
  });
16341
- const nodeBinPath = nodeBinPaths.join(import_path5.default.delimiter);
16342
- env.PATH = `${nodeBinPath}${import_path5.default.delimiter}${env.PATH}`;
16489
+ const nodeBinPath = nodeBinPaths.join(import_path6.default.delimiter);
16490
+ env.PATH = `${nodeBinPath}${import_path6.default.delimiter}${env.PATH}`;
16343
16491
  if (!env.YARN_NODE_LINKER) {
16344
16492
  env.YARN_NODE_LINKER = "node-modules";
16345
16493
  }
@@ -16374,18 +16522,18 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16374
16522
  let buildOutputVersion;
16375
16523
  try {
16376
16524
  const data = await (0, import_fs_extra6.readJSON)(
16377
- import_path5.default.join(outputDirectory, "output/config.json")
16525
+ import_path6.default.join(outputDirectory, "output/config.json")
16378
16526
  );
16379
16527
  buildOutputVersion = data.version;
16380
16528
  } catch (_) {
16381
16529
  }
16382
16530
  if (buildOutputVersion) {
16383
16531
  return {
16384
- buildOutputPath: import_path5.default.join(outputDirectory, "output"),
16532
+ buildOutputPath: import_path6.default.join(outputDirectory, "output"),
16385
16533
  buildOutputVersion
16386
16534
  };
16387
16535
  }
16388
- let appMountPrefixNoTrailingSlash = import_path5.default.posix.join("/", entryDirectory).replace(/\/+$/, "");
16536
+ let appMountPrefixNoTrailingSlash = import_path6.default.posix.join("/", entryDirectory).replace(/\/+$/, "");
16389
16537
  const requiredServerFilesManifest = isServerMode ? await getRequiredServerFilesManifest(entryPath, outputDirectory) : false;
16390
16538
  isServerMode = Boolean(requiredServerFilesManifest);
16391
16539
  const functionsConfigManifest = await getFunctionsConfigManifest(
@@ -16411,11 +16559,11 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16411
16559
  );
16412
16560
  const hasIsr404Page = typeof prerenderManifest.staticRoutes[routesManifest?.i18n ? (
16413
16561
  // eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain
16414
- import_path5.default.join("/", routesManifest?.i18n.defaultLocale, "/404")
16562
+ import_path6.default.join("/", routesManifest?.i18n.defaultLocale, "/404")
16415
16563
  ) : "/404"]?.initialRevalidate === "number";
16416
16564
  const hasIsr500Page = typeof prerenderManifest.staticRoutes[routesManifest?.i18n ? (
16417
16565
  // eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain
16418
- import_path5.default.join("/", routesManifest?.i18n.defaultLocale, "/500")
16566
+ import_path6.default.join("/", routesManifest?.i18n.defaultLocale, "/500")
16419
16567
  ) : "/500"]?.initialRevalidate === "number";
16420
16568
  const wildcardConfig = routesManifest?.i18n?.domains && routesManifest.i18n.domains.length > 0 ? routesManifest.i18n.domains.map((item) => {
16421
16569
  return {
@@ -16424,7 +16572,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16424
16572
  };
16425
16573
  }) : void 0;
16426
16574
  const privateOutputs = await getPrivateOutputs(
16427
- import_path5.default.join(entryPath, outputDirectory),
16575
+ import_path6.default.join(entryPath, outputDirectory),
16428
16576
  {
16429
16577
  "next-stats.json": "_next/__private/stats.json",
16430
16578
  trace: "_next/__private/trace"
@@ -16443,7 +16591,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16443
16591
  if (isLegacy || isSharedLambdas || isServerMode) {
16444
16592
  try {
16445
16593
  buildId = await (0, import_fs_extra6.readFile)(
16446
- import_path5.default.join(entryPath, outputDirectory, "BUILD_ID"),
16594
+ import_path6.default.join(entryPath, outputDirectory, "BUILD_ID"),
16447
16595
  "utf8"
16448
16596
  );
16449
16597
  escapedBuildId = (0, import_escape_string_regexp3.default)(buildId);
@@ -16541,8 +16689,8 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16541
16689
  link: "https://vercel.com/docs/platform/projects#project-settings"
16542
16690
  });
16543
16691
  }
16544
- entryDirectory = import_path5.default.join(entryDirectory, nextBasePath);
16545
- appMountPrefixNoTrailingSlash = import_path5.default.posix.join("/", entryDirectory).replace(/\/+$/, "");
16692
+ entryDirectory = import_path6.default.join(entryDirectory, nextBasePath);
16693
+ appMountPrefixNoTrailingSlash = import_path6.default.posix.join("/", entryDirectory).replace(/\/+$/, "");
16546
16694
  }
16547
16695
  if (routesManifest.pages404) {
16548
16696
  hasPages404 = true;
@@ -16557,7 +16705,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16557
16705
  }
16558
16706
  }
16559
16707
  }
16560
- let dynamicPrefix = import_path5.default.posix.join("/", entryDirectory);
16708
+ let dynamicPrefix = import_path6.default.posix.join("/", entryDirectory);
16561
16709
  dynamicPrefix = dynamicPrefix === "/" ? "" : dynamicPrefix;
16562
16710
  if (imagesManifest) {
16563
16711
  switch (imagesManifest.version) {
@@ -16672,7 +16820,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16672
16820
  ...beforeFilesRewrites,
16673
16821
  // Make sure to 404 for the /404 path itself
16674
16822
  {
16675
- src: import_path5.default.posix.join("/", entryDirectory, "404/?"),
16823
+ src: import_path6.default.posix.join("/", entryDirectory, "404/?"),
16676
16824
  status: 404,
16677
16825
  continue: true
16678
16826
  },
@@ -16683,7 +16831,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16683
16831
  // _next/image path
16684
16832
  ...routesManifest?.basePath ? [
16685
16833
  {
16686
- src: import_path5.default.posix.join("/", entryDirectory, "_next/image/?"),
16834
+ src: import_path6.default.posix.join("/", entryDirectory, "_next/image/?"),
16687
16835
  dest: "/_next/image",
16688
16836
  check: true
16689
16837
  }
@@ -16691,12 +16839,12 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16691
16839
  // No-op _next/data rewrite to trigger handle: 'rewrites' and then 404
16692
16840
  // if no match to prevent rewriting _next/data unexpectedly
16693
16841
  {
16694
- src: import_path5.default.posix.join("/", entryDirectory, "_next/data/(.*)"),
16695
- dest: import_path5.default.posix.join("/", entryDirectory, "_next/data/$1"),
16842
+ src: import_path6.default.posix.join("/", entryDirectory, "_next/data/(.*)"),
16843
+ dest: import_path6.default.posix.join("/", entryDirectory, "_next/data/$1"),
16696
16844
  check: true
16697
16845
  },
16698
16846
  {
16699
- src: import_path5.default.posix.join("/", entryDirectory, "_next/data/(.*)"),
16847
+ src: import_path6.default.posix.join("/", entryDirectory, "_next/data/(.*)"),
16700
16848
  status: 404
16701
16849
  },
16702
16850
  // These need to come before handle: miss or else they are grouped
@@ -16706,16 +16854,16 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16706
16854
  // an index page
16707
16855
  { handle: "resource" },
16708
16856
  ...fallbackRewrites,
16709
- { src: import_path5.default.posix.join("/", entryDirectory, ".*"), status: 404 },
16857
+ { src: import_path6.default.posix.join("/", entryDirectory, ".*"), status: 404 },
16710
16858
  // We need to make sure to 404 for /_next after handle: miss since
16711
16859
  // handle: miss is called before rewrites and to prevent rewriting
16712
16860
  // /_next
16713
16861
  { handle: "miss" },
16714
16862
  {
16715
- src: import_path5.default.posix.join("/", entryDirectory, "_next/static/.+"),
16863
+ src: import_path6.default.posix.join("/", entryDirectory, "_next/static/.+"),
16716
16864
  status: 404,
16717
16865
  check: true,
16718
- dest: import_path5.default.posix.join(
16866
+ dest: import_path6.default.posix.join(
16719
16867
  "/",
16720
16868
  entryDirectory,
16721
16869
  "_next/static/not-found.txt"
@@ -16733,7 +16881,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16733
16881
  {
16734
16882
  // This ensures we only match known emitted-by-Next.js files and not
16735
16883
  // user-emitted files which may be missing a hash in their filename.
16736
- src: import_path5.default.posix.join(
16884
+ src: import_path6.default.posix.join(
16737
16885
  "/",
16738
16886
  entryDirectory,
16739
16887
  `_next/static/(?:[^/]+/pages|pages|chunks|runtime|css|image|media|${escapedBuildId})/.+`
@@ -16747,12 +16895,12 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16747
16895
  important: true
16748
16896
  },
16749
16897
  // error handling
16750
- ...output[import_path5.default.posix.join("./", entryDirectory, "404")] || output[import_path5.default.posix.join("./", entryDirectory, "404/index")] ? [
16898
+ ...output[import_path6.default.posix.join("./", entryDirectory, "404")] || output[import_path6.default.posix.join("./", entryDirectory, "404/index")] ? [
16751
16899
  { handle: "error" },
16752
16900
  {
16753
16901
  status: 404,
16754
- src: import_path5.default.posix.join(entryDirectory, ".*"),
16755
- dest: import_path5.default.posix.join("/", entryDirectory, "404")
16902
+ src: import_path6.default.posix.join(entryDirectory, ".*"),
16903
+ dest: import_path6.default.posix.join("/", entryDirectory, "404")
16756
16904
  }
16757
16905
  ] : []
16758
16906
  ],
@@ -16771,7 +16919,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16771
16919
  );
16772
16920
  }
16773
16921
  if (process.env.NPM_AUTH_TOKEN) {
16774
- await (0, import_fs_extra6.remove)(import_path5.default.join(entryPath, ".npmrc"));
16922
+ await (0, import_fs_extra6.remove)(import_path6.default.join(entryPath, ".npmrc"));
16775
16923
  }
16776
16924
  const trailingSlashRedirects = [];
16777
16925
  let trailingSlash = false;
@@ -16819,7 +16967,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16819
16967
  if (filesAfterBuild["next.config.js"]) {
16820
16968
  nextFiles["next.config.js"] = filesAfterBuild["next.config.js"];
16821
16969
  }
16822
- const pagesDir = import_path5.default.join(
16970
+ const pagesDir = import_path6.default.join(
16823
16971
  entryPath,
16824
16972
  outputDirectory,
16825
16973
  "server",
@@ -16832,7 +16980,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16832
16980
  entryPath,
16833
16981
  outputDirectory
16834
16982
  });
16835
- const launcherPath = import_path5.default.join(__dirname, "legacy-launcher.js");
16983
+ const launcherPath = import_path6.default.join(__dirname, "legacy-launcher.js");
16836
16984
  const launcherData = await (0, import_fs_extra6.readFile)(launcherPath, "utf8");
16837
16985
  await Promise.all(
16838
16986
  Object.keys(pages).map(async (page) => {
@@ -16861,7 +17009,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16861
17009
  });
16862
17010
  }
16863
17011
  (0, import_build_utils3.debug)(`Creating serverless function for page: "${page}"...`);
16864
- lambdas[import_path5.default.posix.join(entryDirectory, pathname)] = new import_build_utils3.NodejsLambda({
17012
+ lambdas[import_path6.default.posix.join(entryDirectory, pathname)] = new import_build_utils3.NodejsLambda({
16865
17013
  files: {
16866
17014
  ...nextFiles,
16867
17015
  ...pageFiles,
@@ -16885,7 +17033,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16885
17033
  );
16886
17034
  } else {
16887
17035
  (0, import_build_utils3.debug)("Preparing serverless function files...");
16888
- const pagesDir = import_path5.default.join(
17036
+ const pagesDir = import_path6.default.join(
16889
17037
  entryPath,
16890
17038
  outputDirectory,
16891
17039
  isServerMode ? "server" : "serverless",
@@ -16893,10 +17041,10 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16893
17041
  );
16894
17042
  let appDir = null;
16895
17043
  const appPathRoutesManifest = await (0, import_fs_extra6.readJSON)(
16896
- import_path5.default.join(entryPath, outputDirectory, "app-path-routes-manifest.json")
17044
+ import_path6.default.join(entryPath, outputDirectory, "app-path-routes-manifest.json")
16897
17045
  ).catch(() => null);
16898
17046
  if (appPathRoutesManifest) {
16899
- appDir = import_path5.default.join(pagesDir, "../app");
17047
+ appDir = import_path6.default.join(pagesDir, "../app");
16900
17048
  }
16901
17049
  const { pages, appPaths: lambdaAppPaths } = await getServerlessPages({
16902
17050
  pagesDir,
@@ -16916,14 +17064,14 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16916
17064
  prerenderManifest,
16917
17065
  routesManifest
16918
17066
  );
16919
- hasStatic500 = !!staticPages[import_path5.default.posix.join(entryDirectory, "500")];
16920
- static404Page = staticPages[import_path5.default.posix.join(entryDirectory, "404")] && hasPages404 ? import_path5.default.posix.join(entryDirectory, "404") : staticPages[import_path5.default.posix.join(entryDirectory, "_errors/404")] ? import_path5.default.posix.join(entryDirectory, "_errors/404") : void 0;
17067
+ hasStatic500 = !!staticPages[import_path6.default.posix.join(entryDirectory, "500")];
17068
+ static404Page = staticPages[import_path6.default.posix.join(entryDirectory, "404")] && hasPages404 ? import_path6.default.posix.join(entryDirectory, "404") : staticPages[import_path6.default.posix.join(entryDirectory, "_errors/404")] ? import_path6.default.posix.join(entryDirectory, "_errors/404") : void 0;
16921
17069
  const { i18n: i18n2 } = routesManifest || {};
16922
17070
  if (!static404Page && i18n2) {
16923
- static404Page = staticPages[import_path5.default.posix.join(entryDirectory, i18n2.defaultLocale, "404")] ? import_path5.default.posix.join(entryDirectory, i18n2.defaultLocale, "404") : void 0;
17071
+ static404Page = staticPages[import_path6.default.posix.join(entryDirectory, i18n2.defaultLocale, "404")] ? import_path6.default.posix.join(entryDirectory, i18n2.defaultLocale, "404") : void 0;
16924
17072
  }
16925
17073
  if (!hasStatic500 && i18n2) {
16926
- hasStatic500 = !!staticPages[import_path5.default.posix.join(entryDirectory, i18n2.defaultLocale, "500")];
17074
+ hasStatic500 = !!staticPages[import_path6.default.posix.join(entryDirectory, i18n2.defaultLocale, "500")];
16927
17075
  }
16928
17076
  if (routesManifest) {
16929
17077
  switch (routesManifest.version) {
@@ -16940,7 +17088,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16940
17088
  }
16941
17089
  const route = {
16942
17090
  src: (dataRoute.namedDataRouteRegex || dataRoute.dataRouteRegex).replace(/^\^/, `^${appMountPrefixNoTrailingSlash}`),
16943
- dest: import_path5.default.posix.join(
17091
+ dest: import_path6.default.posix.join(
16944
17092
  "/",
16945
17093
  entryDirectory,
16946
17094
  // make sure to route SSG data route to the data prerender
@@ -17032,7 +17180,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17032
17180
  `A routes-manifest could not be located, please check your outputDirectory and try again.`
17033
17181
  );
17034
17182
  }
17035
- const localePrefixed404 = !!(routesManifest.i18n && originalStaticPages[import_path5.default.posix.join(".", routesManifest.i18n.defaultLocale, "404.html")]);
17183
+ const localePrefixed404 = !!(routesManifest.i18n && originalStaticPages[import_path6.default.posix.join(".", routesManifest.i18n.defaultLocale, "404.html")]);
17036
17184
  return serverBuild({
17037
17185
  config,
17038
17186
  functionsConfigManifest,
@@ -17078,7 +17226,8 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17078
17226
  isAppFullPPREnabled,
17079
17227
  isAppClientSegmentCacheEnabled,
17080
17228
  isAppClientParamParsingEnabled,
17081
- clientParamParsingOrigins
17229
+ clientParamParsingOrigins,
17230
+ files
17082
17231
  });
17083
17232
  }
17084
17233
  const pageKeys = Object.keys(pages);
@@ -17170,7 +17319,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17170
17319
  );
17171
17320
  for (const page of mergedPageKeys) {
17172
17321
  const fileList = parentFilesMap.get(
17173
- import_path5.default.relative(baseDir, pages[page].fsPath)
17322
+ import_path6.default.relative(baseDir, pages[page].fsPath)
17174
17323
  );
17175
17324
  if (!fileList) {
17176
17325
  throw new Error(
@@ -17206,7 +17355,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17206
17355
  } else {
17207
17356
  assets = await (0, import_build_utils3.glob)(
17208
17357
  "assets/**",
17209
- import_path5.default.join(entryPath, outputDirectory, "serverless")
17358
+ import_path6.default.join(entryPath, outputDirectory, "serverless")
17210
17359
  );
17211
17360
  const assetKeys = Object.keys(assets);
17212
17361
  if (assetKeys.length > 0) {
@@ -17219,7 +17368,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17219
17368
  );
17220
17369
  }
17221
17370
  }
17222
- const launcherPath = import_path5.default.join(__dirname, "templated-launcher.js");
17371
+ const launcherPath = import_path6.default.join(__dirname, "templated-launcher.js");
17223
17372
  const launcherData = await (0, import_fs_extra6.readFile)(launcherPath, "utf8");
17224
17373
  const allLambdasLabel = `All serverless functions created in`;
17225
17374
  if (hasLambdas) {
@@ -17298,8 +17447,8 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17298
17447
  if (page === "_error.js" && (static404Page && staticPages[static404Page] || hasPages404 && pages["404.js"])) {
17299
17448
  continue;
17300
17449
  }
17301
- const pageFileName = import_path5.default.normalize(
17302
- import_path5.default.relative(workPath, pages[page].fsPath)
17450
+ const pageFileName = import_path6.default.normalize(
17451
+ import_path6.default.relative(workPath, pages[page].fsPath)
17303
17452
  );
17304
17453
  const pathname = page.replace(/\.js$/, "");
17305
17454
  const routeIsDynamic = isDynamicRoute(pathname);
@@ -17310,7 +17459,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17310
17459
  if (nonLambdaSsgPages.has(`/${pathname}`)) {
17311
17460
  continue;
17312
17461
  }
17313
- const outputName = import_path5.default.join("/", entryDirectory, pathname);
17462
+ const outputName = import_path6.default.join("/", entryDirectory, pathname);
17314
17463
  const lambdaGroupIndex = routeIsApi ? apiLambdaGroupIndex : nonApiLambdaGroupIndex;
17315
17464
  const lambdaGroups = routeIsApi ? apiLambdaGroups : pageLambdaGroups;
17316
17465
  const lastLambdaGroup = lambdaGroups[lambdaGroupIndex];
@@ -17321,7 +17470,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17321
17470
  isApiLambda: !!routeIsApi,
17322
17471
  pseudoLayer: group.pseudoLayer,
17323
17472
  lambdaCombinedBytes: group.pseudoLayerBytes,
17324
- lambdaIdentifier: import_path5.default.join(
17473
+ lambdaIdentifier: import_path6.default.join(
17325
17474
  entryDirectory,
17326
17475
  `__NEXT_${routeIsApi ? "API" : "PAGE"}_LAMBDA_${lambdaGroupIndex}`
17327
17476
  )
@@ -17333,7 +17482,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17333
17482
  /\/index$/,
17334
17483
  "(/|/index|)"
17335
17484
  )}/?$`,
17336
- dest: `${import_path5.default.join("/", currentLambdaGroup.lambdaIdentifier)}`,
17485
+ dest: `${import_path6.default.join("/", currentLambdaGroup.lambdaIdentifier)}`,
17337
17486
  headers: {
17338
17487
  "x-nextjs-page": outputName
17339
17488
  },
@@ -17355,13 +17504,13 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17355
17504
  addPageLambdaRoute((0, import_escape_string_regexp3.default)(outputName));
17356
17505
  }
17357
17506
  if (page === "_error.js" || hasPages404 && page === "404.js") {
17358
- page404Path = import_path5.default.join("/", entryDirectory, pathname);
17507
+ page404Path = import_path6.default.join("/", entryDirectory, pathname);
17359
17508
  }
17360
17509
  currentLambdaGroup.pages[outputName] = {
17361
17510
  pageFileName,
17362
17511
  pageName: page
17363
17512
  };
17364
- currentLambdaGroup.pseudoLayer[import_path5.default.join(import_path5.default.relative(baseDir, entryPath), pageFileName)] = compressedPages[page];
17513
+ currentLambdaGroup.pseudoLayer[import_path6.default.join(import_path6.default.relative(baseDir, entryPath), pageFileName)] = compressedPages[page];
17365
17514
  lambdaGroups[lambdaGroupIndex] = currentLambdaGroup;
17366
17515
  }
17367
17516
  if (routeIsApi) {
@@ -17383,16 +17532,16 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17383
17532
  if (isDynamicRoute(pathname)) {
17384
17533
  dynamicPages.push(normalizePage(pathname));
17385
17534
  }
17386
- const pageFileName = import_path5.default.normalize(
17387
- import_path5.default.relative(entryPath, pages[page].fsPath)
17535
+ const pageFileName = import_path6.default.normalize(
17536
+ import_path6.default.relative(entryPath, pages[page].fsPath)
17388
17537
  );
17389
17538
  const launcher = launcherData.replace(
17390
17539
  /__LAUNCHER_PAGE_PATH__/g,
17391
17540
  JSON.stringify(requiresTracing ? `./${pageFileName}` : "./page")
17392
17541
  );
17393
17542
  const launcherFiles = {
17394
- [import_path5.default.join(
17395
- import_path5.default.relative(baseDir, entryPath),
17543
+ [import_path6.default.join(
17544
+ import_path6.default.relative(baseDir, entryPath),
17396
17545
  "___next_launcher.cjs"
17397
17546
  )]: new import_build_utils3.FileBlob({ data: launcher })
17398
17547
  };
@@ -17407,7 +17556,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17407
17556
  });
17408
17557
  }
17409
17558
  const outputName = normalizeIndexOutput(
17410
- import_path5.default.join(entryDirectory, pathname),
17559
+ import_path6.default.join(entryDirectory, pathname),
17411
17560
  isServerMode
17412
17561
  );
17413
17562
  if (requiresTracing) {
@@ -17419,11 +17568,11 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17419
17568
  return prev;
17420
17569
  }, {}),
17421
17570
  {
17422
- [import_path5.default.join(import_path5.default.relative(baseDir, entryPath), pageFileName)]: compressedPages[page]
17571
+ [import_path6.default.join(import_path6.default.relative(baseDir, entryPath), pageFileName)]: compressedPages[page]
17423
17572
  }
17424
17573
  ],
17425
- handler: import_path5.default.join(
17426
- import_path5.default.relative(baseDir, entryPath),
17574
+ handler: import_path6.default.join(
17575
+ import_path6.default.relative(baseDir, entryPath),
17427
17576
  "___next_launcher.cjs"
17428
17577
  ),
17429
17578
  operationType: getOperationType({
@@ -17442,11 +17591,11 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17442
17591
  },
17443
17592
  layers: [
17444
17593
  {
17445
- [import_path5.default.join(import_path5.default.relative(baseDir, entryPath), "page.js")]: compressedPages[page]
17594
+ [import_path6.default.join(import_path6.default.relative(baseDir, entryPath), "page.js")]: compressedPages[page]
17446
17595
  }
17447
17596
  ],
17448
- handler: import_path5.default.join(
17449
- import_path5.default.relative(baseDir, entryPath),
17597
+ handler: import_path6.default.join(
17598
+ import_path6.default.relative(baseDir, entryPath),
17450
17599
  "___next_launcher.cjs"
17451
17600
  ),
17452
17601
  operationType: getOperationType({ pageFileName }),
@@ -17486,7 +17635,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17486
17635
  )
17487
17636
  );
17488
17637
  if (isSharedLambdas) {
17489
- const launcherPath2 = import_path5.default.join(__dirname, "templated-launcher-shared.js");
17638
+ const launcherPath2 = import_path6.default.join(__dirname, "templated-launcher-shared.js");
17490
17639
  const launcherData2 = await (0, import_fs_extra6.readFile)(launcherPath2, "utf8");
17491
17640
  const completeDynamicRoutes = await getDynamicRoutes({
17492
17641
  entryPath,
@@ -17541,7 +17690,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17541
17690
  try {
17542
17691
  const pages = {
17543
17692
  ${groupPageKeys.map(
17544
- (page) => `'${page}': () => require('./${import_path5.default.join(
17693
+ (page) => `'${page}': () => require('./${import_path6.default.join(
17545
17694
  "./",
17546
17695
  group.pages[page].pageFileName
17547
17696
  )}')`
@@ -17631,8 +17780,8 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17631
17780
  `
17632
17781
  );
17633
17782
  const launcherFiles = {
17634
- [import_path5.default.join(
17635
- import_path5.default.relative(baseDir, entryPath),
17783
+ [import_path6.default.join(
17784
+ import_path6.default.relative(baseDir, entryPath),
17636
17785
  "___next_launcher.cjs"
17637
17786
  )]: new import_build_utils3.FileBlob({ data: launcher })
17638
17787
  };
@@ -17649,8 +17798,8 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17649
17798
  ...assets
17650
17799
  },
17651
17800
  layers: [group.pseudoLayer],
17652
- handler: import_path5.default.join(
17653
- import_path5.default.relative(baseDir, entryPath),
17801
+ handler: import_path6.default.join(
17802
+ import_path6.default.relative(baseDir, entryPath),
17654
17803
  "___next_launcher.cjs"
17655
17804
  ),
17656
17805
  operationType,
@@ -17683,7 +17832,8 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17683
17832
  // The following flags are not supported in this version of the builder.
17684
17833
  isAppPPREnabled: false,
17685
17834
  isAppClientSegmentCacheEnabled: false,
17686
- isAppClientParamParsingEnabled: false
17835
+ isAppClientParamParsingEnabled: false,
17836
+ appPathnameFilesMap: getAppRouterPathnameFilesMap(files)
17687
17837
  });
17688
17838
  await Promise.all(
17689
17839
  Object.keys(prerenderManifest.staticRoutes).map(
@@ -17730,7 +17880,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17730
17880
  `^${appMountPrefixNoTrailingSlash}`
17731
17881
  ),
17732
17882
  // Location of lambda in builder output
17733
- dest: import_path5.default.posix.join(entryDirectory, dataRoute),
17883
+ dest: import_path6.default.posix.join(entryDirectory, dataRoute),
17734
17884
  check: true
17735
17885
  });
17736
17886
  if (!prefetchDataRoute || !prefetchDataRouteRegex)
@@ -17740,7 +17890,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17740
17890
  /^\^/,
17741
17891
  `^${appMountPrefixNoTrailingSlash}`
17742
17892
  ),
17743
- dest: import_path5.default.posix.join(entryDirectory, prefetchDataRoute),
17893
+ dest: import_path6.default.posix.join(entryDirectory, prefetchDataRoute),
17744
17894
  check: true
17745
17895
  });
17746
17896
  }
@@ -17749,7 +17899,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17749
17899
  }
17750
17900
  if (!isSharedLambdas) {
17751
17901
  omittedPrerenderRoutes.forEach((routeKey) => {
17752
- const routeFileNoExt = import_path5.default.posix.join(
17902
+ const routeFileNoExt = import_path6.default.posix.join(
17753
17903
  entryDirectory,
17754
17904
  routeKey === "/" ? "/index" : routeKey
17755
17905
  );
@@ -17820,31 +17970,31 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17820
17970
  // $wildcard
17821
17971
  // This is split into two rules to avoid matching the `/index` route as it causes issues with trailing slash redirect
17822
17972
  {
17823
- src: `^${import_path5.default.posix.join(
17973
+ src: `^${import_path6.default.posix.join(
17824
17974
  "/",
17825
17975
  entryDirectory,
17826
17976
  "/"
17827
17977
  )}(?!(?:_next/.*|${i18n.locales.map((locale) => (0, import_escape_string_regexp3.default)(locale)).join("|")})(?:/.*|$))$`,
17828
17978
  // we aren't able to ensure trailing slash mode here
17829
17979
  // so ensure this comes after the trailing slash redirect
17830
- dest: `${entryDirectory !== "." ? import_path5.default.posix.join("/", entryDirectory) : ""}$wildcard${trailingSlash ? "/" : ""}`,
17980
+ dest: `${entryDirectory !== "." ? import_path6.default.posix.join("/", entryDirectory) : ""}$wildcard${trailingSlash ? "/" : ""}`,
17831
17981
  continue: true
17832
17982
  },
17833
17983
  {
17834
- src: `^${import_path5.default.join(
17984
+ src: `^${import_path6.default.join(
17835
17985
  "/",
17836
17986
  entryDirectory,
17837
17987
  "/"
17838
17988
  )}(?!(?:_next/.*|${i18n.locales.map((locale) => (0, import_escape_string_regexp3.default)(locale)).join("|")})(?:/.*|$))(.*)$`,
17839
17989
  // we aren't able to ensure trailing slash mode here
17840
17990
  // so ensure this comes after the trailing slash redirect
17841
- dest: `${entryDirectory !== "." ? import_path5.default.join("/", entryDirectory) : ""}$wildcard/$1`,
17991
+ dest: `${entryDirectory !== "." ? import_path6.default.join("/", entryDirectory) : ""}$wildcard/$1`,
17842
17992
  continue: true
17843
17993
  },
17844
17994
  // Handle redirecting to locale specific domains
17845
17995
  ...i18n.domains && i18n.domains.length > 0 && i18n.localeDetection !== false ? [
17846
17996
  {
17847
- src: `^${import_path5.default.join("/", entryDirectory)}/?(?:${i18n.locales.map((locale) => (0, import_escape_string_regexp3.default)(locale)).join("|")})?/?$`,
17997
+ src: `^${import_path6.default.join("/", entryDirectory)}/?(?:${i18n.locales.map((locale) => (0, import_escape_string_regexp3.default)(locale)).join("|")})?/?$`,
17848
17998
  locale: {
17849
17999
  redirect: i18n.domains.reduce(
17850
18000
  (prev, item) => {
@@ -17885,8 +18035,8 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17885
18035
  }
17886
18036
  ] : [],
17887
18037
  {
17888
- src: `^${import_path5.default.join("/", entryDirectory)}$`,
17889
- dest: `${import_path5.default.join("/", entryDirectory, i18n.defaultLocale)}`,
18038
+ src: `^${import_path6.default.join("/", entryDirectory)}$`,
18039
+ dest: `${import_path6.default.join("/", entryDirectory, i18n.defaultLocale)}`,
17890
18040
  continue: true
17891
18041
  },
17892
18042
  // Auto-prefix non-locale path with default locale
@@ -17895,12 +18045,12 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17895
18045
  // e.g. for /de/posts/[slug] x-now-route-matches would have
17896
18046
  // 1=posts%2Fpost-1
17897
18047
  {
17898
- src: `^${import_path5.default.join(
18048
+ src: `^${import_path6.default.join(
17899
18049
  "/",
17900
18050
  entryDirectory,
17901
18051
  "/"
17902
18052
  )}(?!(?:_next/.*|${i18n.locales.map((locale) => (0, import_escape_string_regexp3.default)(locale)).join("|")})(?:/.*|$))(.*)$`,
17903
- dest: `${import_path5.default.join("/", entryDirectory, i18n.defaultLocale)}/$1`,
18053
+ dest: `${import_path6.default.join("/", entryDirectory, i18n.defaultLocale)}/$1`,
17904
18054
  continue: true
17905
18055
  }
17906
18056
  ] : [],
@@ -17910,13 +18060,13 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17910
18060
  // Make sure to 404 for the /404 path itself
17911
18061
  ...i18n ? [
17912
18062
  {
17913
- src: `${import_path5.default.join("/", entryDirectory, "/")}(?:${i18n.locales.map((locale) => (0, import_escape_string_regexp3.default)(locale)).join("|")})?[/]?404/?`,
18063
+ src: `${import_path6.default.join("/", entryDirectory, "/")}(?:${i18n.locales.map((locale) => (0, import_escape_string_regexp3.default)(locale)).join("|")})?[/]?404/?`,
17914
18064
  status: 404,
17915
18065
  continue: true
17916
18066
  }
17917
18067
  ] : [
17918
18068
  {
17919
- src: import_path5.default.join("/", entryDirectory, "404/?"),
18069
+ src: import_path6.default.join("/", entryDirectory, "404/?"),
17920
18070
  status: 404,
17921
18071
  continue: true
17922
18072
  }
@@ -17924,13 +18074,13 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17924
18074
  // Make sure to 500 when visiting /500 directly for static 500
17925
18075
  ...!hasStatic500 ? [] : i18n ? [
17926
18076
  {
17927
- src: `${import_path5.default.join("/", entryDirectory, "/")}(?:${i18n.locales.map((locale) => (0, import_escape_string_regexp3.default)(locale)).join("|")})?[/]?500`,
18077
+ src: `${import_path6.default.join("/", entryDirectory, "/")}(?:${i18n.locales.map((locale) => (0, import_escape_string_regexp3.default)(locale)).join("|")})?[/]?500`,
17928
18078
  status: 500,
17929
18079
  continue: true
17930
18080
  }
17931
18081
  ] : [
17932
18082
  {
17933
- src: import_path5.default.join("/", entryDirectory, "500"),
18083
+ src: import_path6.default.join("/", entryDirectory, "500"),
17934
18084
  status: 500,
17935
18085
  continue: true
17936
18086
  }
@@ -17953,7 +18103,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17953
18103
  // _next/image path
17954
18104
  ...routesManifest?.basePath ? [
17955
18105
  {
17956
- src: import_path5.default.join("/", entryDirectory, "_next/image/?"),
18106
+ src: import_path6.default.join("/", entryDirectory, "_next/image/?"),
17957
18107
  dest: "/_next/image",
17958
18108
  check: true
17959
18109
  }
@@ -17961,8 +18111,8 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17961
18111
  // No-op _next/data rewrite to trigger handle: 'rewrites' and then 404
17962
18112
  // if no match to prevent rewriting _next/data unexpectedly
17963
18113
  {
17964
- src: import_path5.default.join("/", entryDirectory, "_next/data/(.*)"),
17965
- dest: import_path5.default.join("/", entryDirectory, "_next/data/$1"),
18114
+ src: import_path6.default.join("/", entryDirectory, "_next/data/(.*)"),
18115
+ dest: import_path6.default.join("/", entryDirectory, "_next/data/$1"),
17966
18116
  check: true
17967
18117
  },
17968
18118
  // These need to come before handle: miss or else they are grouped
@@ -17972,15 +18122,15 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17972
18122
  // an index page
17973
18123
  { handle: "resource" },
17974
18124
  ...fallbackRewrites,
17975
- { src: import_path5.default.join("/", entryDirectory, ".*"), status: 404 },
18125
+ { src: import_path6.default.join("/", entryDirectory, ".*"), status: 404 },
17976
18126
  // We need to make sure to 404 for /_next after handle: miss since
17977
18127
  // handle: miss is called before rewrites and to prevent rewriting /_next
17978
18128
  { handle: "miss" },
17979
18129
  {
17980
- src: import_path5.default.join("/", entryDirectory, "_next/static/.+"),
18130
+ src: import_path6.default.join("/", entryDirectory, "_next/static/.+"),
17981
18131
  status: 404,
17982
18132
  check: true,
17983
- dest: import_path5.default.join("/", entryDirectory, "_next/static/not-found.txt"),
18133
+ dest: import_path6.default.join("/", entryDirectory, "_next/static/not-found.txt"),
17984
18134
  headers: {
17985
18135
  "content-type": "text/plain; charset=utf-8"
17986
18136
  }
@@ -17988,8 +18138,8 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17988
18138
  // remove locale prefixes to check public files
17989
18139
  ...i18n ? [
17990
18140
  {
17991
- src: `^${import_path5.default.join("/", entryDirectory)}/?(?:${i18n.locales.map((locale) => (0, import_escape_string_regexp3.default)(locale)).join("|")})/(.*)`,
17992
- dest: `${import_path5.default.join("/", entryDirectory, "/")}$1`,
18141
+ src: `^${import_path6.default.join("/", entryDirectory)}/?(?:${i18n.locales.map((locale) => (0, import_escape_string_regexp3.default)(locale)).join("|")})/(.*)`,
18142
+ dest: `${import_path6.default.join("/", entryDirectory, "/")}$1`,
17993
18143
  check: true
17994
18144
  }
17995
18145
  ] : [],
@@ -17997,7 +18147,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17997
18147
  // to allow checking for lambda
17998
18148
  ...isSharedLambdas || !i18n ? [] : [
17999
18149
  {
18000
- src: `${import_path5.default.join("/", entryDirectory, "/")}(?:${i18n?.locales.map((locale) => (0, import_escape_string_regexp3.default)(locale)).join("|")})/(.*)`,
18150
+ src: `${import_path6.default.join("/", entryDirectory, "/")}(?:${i18n?.locales.map((locale) => (0, import_escape_string_regexp3.default)(locale)).join("|")})/(.*)`,
18001
18151
  dest: "/$1",
18002
18152
  check: true
18003
18153
  }
@@ -18010,8 +18160,8 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
18010
18160
  // ensure we 404 for non-existent _next/data routes before
18011
18161
  // trying page dynamic routes
18012
18162
  {
18013
- src: import_path5.default.join("/", entryDirectory, "_next/data/(.*)"),
18014
- dest: import_path5.default.join("/", entryDirectory, "404"),
18163
+ src: import_path6.default.join("/", entryDirectory, "_next/data/(.*)"),
18164
+ dest: import_path6.default.join("/", entryDirectory, "404"),
18015
18165
  status: 404,
18016
18166
  check: true
18017
18167
  },
@@ -18026,7 +18176,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
18026
18176
  {
18027
18177
  // This ensures we only match known emitted-by-Next.js files and not
18028
18178
  // user-emitted files which may be missing a hash in their filename.
18029
- src: import_path5.default.join(
18179
+ src: import_path6.default.join(
18030
18180
  "/",
18031
18181
  entryDirectory,
18032
18182
  `_next/static/(?:[^/]+/pages|pages|chunks|runtime|css|image|media|${escapedBuildId})/.+`
@@ -18045,7 +18195,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
18045
18195
  { handle: "error" },
18046
18196
  ...i18n && (static404Page || hasIsr404Page) ? [
18047
18197
  {
18048
- src: `${import_path5.default.join(
18198
+ src: `${import_path6.default.join(
18049
18199
  "/",
18050
18200
  entryDirectory,
18051
18201
  "/"
@@ -18055,16 +18205,16 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
18055
18205
  caseSensitive: true
18056
18206
  },
18057
18207
  {
18058
- src: import_path5.default.join("/", entryDirectory, ".*"),
18208
+ src: import_path6.default.join("/", entryDirectory, ".*"),
18059
18209
  dest: `/${i18n.defaultLocale}/404`,
18060
18210
  status: 404
18061
18211
  }
18062
18212
  ] : [
18063
18213
  isSharedLambdas ? {
18064
- src: import_path5.default.join("/", entryDirectory, ".*"),
18214
+ src: import_path6.default.join("/", entryDirectory, ".*"),
18065
18215
  // if static 404 is not present but we have pages/404.js
18066
18216
  // it is a lambda due to _app getInitialProps
18067
- dest: import_path5.default.join(
18217
+ dest: import_path6.default.join(
18068
18218
  "/",
18069
18219
  static404Page ? static404Page : pageLambdaMap[page404Path]
18070
18220
  ),
@@ -18075,13 +18225,13 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
18075
18225
  }
18076
18226
  }
18077
18227
  } : {
18078
- src: import_path5.default.join("/", entryDirectory, ".*"),
18228
+ src: import_path6.default.join("/", entryDirectory, ".*"),
18079
18229
  // if static 404 is not present but we have pages/404.js
18080
18230
  // it is a lambda due to _app getInitialProps
18081
- dest: static404Page ? import_path5.default.join("/", static404Page) : import_path5.default.join(
18231
+ dest: static404Page ? import_path6.default.join("/", static404Page) : import_path6.default.join(
18082
18232
  "/",
18083
18233
  entryDirectory,
18084
- hasPages404 && lambdas[import_path5.default.join("./", entryDirectory, "404")] ? "404" : "_error"
18234
+ hasPages404 && lambdas[import_path6.default.join("./", entryDirectory, "404")] ? "404" : "_error"
18085
18235
  ),
18086
18236
  status: 404
18087
18237
  }
@@ -18089,7 +18239,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
18089
18239
  // static 500 page if present
18090
18240
  ...!hasStatic500 ? [] : i18n ? [
18091
18241
  {
18092
- src: `${import_path5.default.join(
18242
+ src: `${import_path6.default.join(
18093
18243
  "/",
18094
18244
  entryDirectory,
18095
18245
  "/"
@@ -18098,14 +18248,14 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
18098
18248
  status: 500
18099
18249
  },
18100
18250
  {
18101
- src: import_path5.default.join("/", entryDirectory, ".*"),
18251
+ src: import_path6.default.join("/", entryDirectory, ".*"),
18102
18252
  dest: `/${i18n.defaultLocale}/500`,
18103
18253
  status: 500
18104
18254
  }
18105
18255
  ] : [
18106
18256
  {
18107
- src: import_path5.default.join("/", entryDirectory, ".*"),
18108
- dest: import_path5.default.join("/", entryDirectory, "/500"),
18257
+ src: import_path6.default.join("/", entryDirectory, ".*"),
18258
+ dest: import_path6.default.join("/", entryDirectory, "/500"),
18109
18259
  status: 500
18110
18260
  }
18111
18261
  ]
@@ -18120,11 +18270,11 @@ var diagnostics = async ({
18120
18270
  workPath,
18121
18271
  repoRootPath
18122
18272
  }) => {
18123
- const entryDirectory = import_path5.default.dirname(entrypoint);
18124
- const entryPath = import_path5.default.join(workPath, entryDirectory);
18125
- const outputDirectory = import_path5.default.join("./", config.outputDirectory || ".next");
18273
+ const entryDirectory = import_path6.default.dirname(entrypoint);
18274
+ const entryPath = import_path6.default.join(workPath, entryDirectory);
18275
+ const outputDirectory = import_path6.default.join("./", config.outputDirectory || ".next");
18126
18276
  const basePath = repoRootPath || workPath;
18127
- const diagnosticsEntrypoint = import_path5.default.relative(basePath, entryPath);
18277
+ const diagnosticsEntrypoint = import_path6.default.relative(basePath, entryPath);
18128
18278
  (0, import_build_utils3.debug)(
18129
18279
  `Reading diagnostics file in diagnosticsEntrypoint=${diagnosticsEntrypoint}`
18130
18280
  );
@@ -18132,17 +18282,17 @@ var diagnostics = async ({
18132
18282
  // Collect output in `.next/diagnostics`
18133
18283
  ...await (0, import_build_utils3.glob)(
18134
18284
  "*",
18135
- import_path5.default.join(basePath, diagnosticsEntrypoint, outputDirectory, "diagnostics")
18285
+ import_path6.default.join(basePath, diagnosticsEntrypoint, outputDirectory, "diagnostics")
18136
18286
  ),
18137
18287
  // Collect `.next/trace` file
18138
18288
  ...await (0, import_build_utils3.glob)(
18139
18289
  "trace",
18140
- import_path5.default.join(basePath, diagnosticsEntrypoint, outputDirectory)
18290
+ import_path6.default.join(basePath, diagnosticsEntrypoint, outputDirectory)
18141
18291
  ),
18142
18292
  // Collect `.next/turbopack` file
18143
18293
  ...await (0, import_build_utils3.glob)(
18144
18294
  "turbopack",
18145
- import_path5.default.join(basePath, diagnosticsEntrypoint, outputDirectory)
18295
+ import_path6.default.join(basePath, diagnosticsEntrypoint, outputDirectory)
18146
18296
  )
18147
18297
  };
18148
18298
  };
@@ -18153,9 +18303,9 @@ var prepareCache = async ({
18153
18303
  config = {}
18154
18304
  }) => {
18155
18305
  (0, import_build_utils3.debug)("Preparing cache...");
18156
- const entryDirectory = import_path5.default.dirname(entrypoint);
18157
- const entryPath = import_path5.default.join(workPath, entryDirectory);
18158
- const outputDirectory = import_path5.default.join("./", config.outputDirectory || ".next");
18306
+ const entryDirectory = import_path6.default.dirname(entrypoint);
18307
+ const entryPath = import_path6.default.join(workPath, entryDirectory);
18308
+ const outputDirectory = import_path6.default.join("./", config.outputDirectory || ".next");
18159
18309
  const nextVersionRange = await getNextVersionRange(entryPath);
18160
18310
  const isLegacy = nextVersionRange && isLegacyNext(nextVersionRange);
18161
18311
  if (isLegacy) {
@@ -18164,18 +18314,18 @@ var prepareCache = async ({
18164
18314
  (0, import_build_utils3.debug)("Producing cache file manifest...");
18165
18315
  const isMonorepo = repoRootPath && repoRootPath !== workPath;
18166
18316
  const cacheBasePath = repoRootPath || workPath;
18167
- const cacheEntrypoint = import_path5.default.relative(cacheBasePath, entryPath);
18317
+ const cacheEntrypoint = import_path6.default.relative(cacheBasePath, entryPath);
18168
18318
  const cache = {
18169
18319
  ...await (0, import_build_utils3.glob)(
18170
- isMonorepo ? "**/node_modules/**" : import_path5.default.join(cacheEntrypoint, "node_modules/**"),
18320
+ isMonorepo ? "**/node_modules/**" : import_path6.default.join(cacheEntrypoint, "node_modules/**"),
18171
18321
  cacheBasePath
18172
18322
  ),
18173
18323
  ...await (0, import_build_utils3.glob)(
18174
- import_path5.default.join(cacheEntrypoint, outputDirectory, "cache/**"),
18324
+ import_path6.default.join(cacheEntrypoint, outputDirectory, "cache/**"),
18175
18325
  cacheBasePath
18176
18326
  ),
18177
18327
  ...await (0, import_build_utils3.glob)(
18178
- isMonorepo ? "**/.yarn/cache/**" : import_path5.default.join(cacheEntrypoint, ".yarn/cache/**"),
18328
+ isMonorepo ? "**/.yarn/cache/**" : import_path6.default.join(cacheEntrypoint, ".yarn/cache/**"),
18179
18329
  cacheBasePath
18180
18330
  )
18181
18331
  };