@vercel/next 4.15.23 → 4.15.25

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 +14 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -14305,6 +14305,7 @@ async function serverBuild({
14305
14305
  afterFilesRewrites,
14306
14306
  fallbackRewrites,
14307
14307
  headers,
14308
+ onMatchHeaders,
14308
14309
  dataRoutes,
14309
14310
  hasIsr404Page,
14310
14311
  hasIsr500Page,
@@ -16307,6 +16308,7 @@ ${JSON.stringify(
16307
16308
  continue: true,
16308
16309
  important: true
16309
16310
  },
16311
+ ...onMatchHeaders,
16310
16312
  {
16311
16313
  src: import_path5.default.posix.join("/", entryDirectory, "/index(?:/)?"),
16312
16314
  headers: {
@@ -16434,6 +16436,7 @@ var SERVER_BUILD_MINIMUM_NEXT_VERSION = "v10.0.9-canary.4";
16434
16436
  var BEFORE_FILES_CONTINUE_NEXT_VERSION = "v10.2.3-canary.1";
16435
16437
  var REDIRECTS_NO_STATIC_NEXT_VERSION = "v11.0.2-canary.15";
16436
16438
  var IS_APP_CLIENT_SEGMENT_CACHE_ENABLED_VERSION = "v16.0.0";
16439
+ var MINIMUM_NEXT_ADAPTER_VERSION = "v16.2.0-canary.28";
16437
16440
  var MAX_AGE_ONE_YEAR = 31536e3;
16438
16441
  async function readPackageJson(entryPath) {
16439
16442
  const packagePath = import_path6.default.join(entryPath, "package.json");
@@ -16713,7 +16716,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16713
16716
  }
16714
16717
  if (
16715
16718
  // integration tests expect outputs object
16716
- !process.env.NEXT_BUILDER_INTEGRATION && process.env.NEXT_ENABLE_ADAPTER
16719
+ !process.env.NEXT_BUILDER_INTEGRATION && process.env.NEXT_ENABLE_ADAPTER === "1" && import_semver5.default.gte(nextVersion, MINIMUM_NEXT_ADAPTER_VERSION)
16717
16720
  ) {
16718
16721
  env.NEXT_ADAPTER_PATH = import_path6.default.join(__dirname, "adapter/index.js");
16719
16722
  env.NEXT_ADAPTER_VERCEL_CONFIG = JSON.stringify(config);
@@ -16852,6 +16855,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16852
16855
  }
16853
16856
  );
16854
16857
  const headers = [];
16858
+ const onMatchHeaders = [];
16855
16859
  const beforeFilesRewrites = [];
16856
16860
  const afterFilesRewrites = [];
16857
16861
  const fallbackRewrites = [];
@@ -16916,6 +16920,9 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16916
16920
  if (routesManifest.headers) {
16917
16921
  headers.push(...(0, import_superstatic.convertHeaders)(routesManifest.headers));
16918
16922
  }
16923
+ if (routesManifest.onMatchHeaders) {
16924
+ onMatchHeaders.push(...(0, import_superstatic.convertHeaders)(routesManifest.onMatchHeaders));
16925
+ }
16919
16926
  if (import_semver5.default.gte(nextVersion, REDIRECTS_NO_STATIC_NEXT_VERSION)) {
16920
16927
  redirects.forEach(
16921
16928
  (r, i) => updateRouteSrc(r, i, routesManifest.redirects)
@@ -16944,6 +16951,9 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
16944
16951
  headers.forEach(
16945
16952
  (r, i) => updateRouteSrc(r, i, routesManifest.headers || [])
16946
16953
  );
16954
+ onMatchHeaders.forEach(
16955
+ (r, i) => updateRouteSrc(r, i, routesManifest.onMatchHeaders || [])
16956
+ );
16947
16957
  }
16948
16958
  if (routesManifest.basePath && routesManifest.basePath !== "/") {
16949
16959
  const nextBasePath = routesManifest.basePath;
@@ -17171,6 +17181,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17171
17181
  continue: true,
17172
17182
  important: true
17173
17183
  },
17184
+ ...onMatchHeaders,
17174
17185
  // error handling
17175
17186
  ...output[import_path6.default.posix.join("./", entryDirectory, "404")] || output[import_path6.default.posix.join("./", entryDirectory, "404/index")] ? [
17176
17187
  { handle: "error" },
@@ -17478,6 +17489,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
17478
17489
  isCorrectLocaleAPIRoutes,
17479
17490
  pagesDir,
17480
17491
  headers,
17492
+ onMatchHeaders,
17481
17493
  beforeFilesRewrites,
17482
17494
  afterFilesRewrites,
17483
17495
  fallbackRewrites,
@@ -18474,6 +18486,7 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
18474
18486
  continue: true,
18475
18487
  important: true
18476
18488
  },
18489
+ ...onMatchHeaders,
18477
18490
  // error handling
18478
18491
  ...isLegacy ? [] : [
18479
18492
  // Custom Next.js 404 page
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/next",
3
- "version": "4.15.23",
3
+ "version": "4.15.25",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index",
6
6
  "homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
@@ -53,7 +53,7 @@
53
53
  "test-listen": "1.1.0",
54
54
  "text-table": "0.2.0",
55
55
  "webpack-sources": "3.2.3",
56
- "@vercel/build-utils": "13.3.1",
56
+ "@vercel/build-utils": "13.3.2",
57
57
  "@vercel/routing-utils": "5.3.2"
58
58
  },
59
59
  "scripts": {