@vercel/next 3.1.28 → 3.1.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -45498,6 +45498,21 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
45498
45498
  fsPath: catchallFsPath,
45499
45499
  });
45500
45500
  }
45501
+ if (appPathRoutesManifest) {
45502
+ // create .rsc variant for app lambdas and edge functions
45503
+ // to match prerenders so we can route the same when the
45504
+ // __flight__ header is present
45505
+ const edgeFunctions = middleware.edgeFunctions;
45506
+ for (let route of Object.values(appPathRoutesManifest)) {
45507
+ route = path_1.default.posix.join('./', route === '/' ? '/index' : route);
45508
+ if (lambdas[route]) {
45509
+ lambdas[`${route}.rsc`] = lambdas[route];
45510
+ }
45511
+ else if (edgeFunctions[route]) {
45512
+ edgeFunctions[`${route}.rsc`] = edgeFunctions[route];
45513
+ }
45514
+ }
45515
+ }
45501
45516
  return {
45502
45517
  wildcard: wildcardConfig,
45503
45518
  images: imagesManifest?.images?.loader === 'default'
@@ -45678,6 +45693,21 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
45678
45693
  // handle: 'filesystem' we maintain this for older versions
45679
45694
  // to prevent a local/deploy mismatch
45680
45695
  ...(!isCorrectMiddlewareOrder ? middleware.staticRoutes : []),
45696
+ ...(appDir
45697
+ ? [
45698
+ {
45699
+ src: `^${path_1.default.posix.join('/', entryDirectory, '/(.*)$')}`,
45700
+ has: [
45701
+ {
45702
+ type: 'header',
45703
+ key: '__flight__',
45704
+ },
45705
+ ],
45706
+ dest: path_1.default.posix.join('/', entryDirectory, '/$1.rsc'),
45707
+ check: true,
45708
+ },
45709
+ ]
45710
+ : []),
45681
45711
  // Next.js page lambdas, `static/` folder, reserved assets, and `public/`
45682
45712
  // folder
45683
45713
  { handle: 'filesystem' },
@@ -649,6 +649,21 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
649
649
  fsPath: catchallFsPath,
650
650
  });
651
651
  }
652
+ if (appPathRoutesManifest) {
653
+ // create .rsc variant for app lambdas and edge functions
654
+ // to match prerenders so we can route the same when the
655
+ // __flight__ header is present
656
+ const edgeFunctions = middleware.edgeFunctions;
657
+ for (let route of Object.values(appPathRoutesManifest)) {
658
+ route = path_1.default.posix.join('./', route === '/' ? '/index' : route);
659
+ if (lambdas[route]) {
660
+ lambdas[`${route}.rsc`] = lambdas[route];
661
+ }
662
+ else if (edgeFunctions[route]) {
663
+ edgeFunctions[`${route}.rsc`] = edgeFunctions[route];
664
+ }
665
+ }
666
+ }
652
667
  return {
653
668
  wildcard: wildcardConfig,
654
669
  images: imagesManifest?.images?.loader === 'default'
@@ -829,6 +844,21 @@ async function serverBuild({ dynamicPages, pagesDir, config = {}, privateOutputs
829
844
  // handle: 'filesystem' we maintain this for older versions
830
845
  // to prevent a local/deploy mismatch
831
846
  ...(!isCorrectMiddlewareOrder ? middleware.staticRoutes : []),
847
+ ...(appDir
848
+ ? [
849
+ {
850
+ src: `^${path_1.default.posix.join('/', entryDirectory, '/(.*)$')}`,
851
+ has: [
852
+ {
853
+ type: 'header',
854
+ key: '__flight__',
855
+ },
856
+ ],
857
+ dest: path_1.default.posix.join('/', entryDirectory, '/$1.rsc'),
858
+ check: true,
859
+ },
860
+ ]
861
+ : []),
832
862
  // Next.js page lambdas, `static/` folder, reserved assets, and `public/`
833
863
  // folder
834
864
  { handle: 'filesystem' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/next",
3
- "version": "3.1.28",
3
+ "version": "3.1.29",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
@@ -44,7 +44,7 @@
44
44
  "@types/semver": "6.0.0",
45
45
  "@types/text-table": "0.2.1",
46
46
  "@types/webpack-sources": "3.2.0",
47
- "@vercel/build-utils": "5.4.4",
47
+ "@vercel/build-utils": "5.5.0",
48
48
  "@vercel/nft": "0.22.1",
49
49
  "@vercel/routing-utils": "2.0.2",
50
50
  "async-sema": "3.0.1",
@@ -69,5 +69,5 @@
69
69
  "typescript": "4.5.2",
70
70
  "webpack-sources": "3.2.3"
71
71
  },
72
- "gitHead": "51d968314f5914138defa2a9fe724324d53efdd1"
72
+ "gitHead": "a825bc95409aa1403e062e45afebe194c8197061"
73
73
  }