@vercel/next 31.0.1 → 31.0.2-snapshot-62deef8da0a0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/adapter/index.js
CHANGED
|
@@ -11127,6 +11127,9 @@ async function isFile(file) {
|
|
|
11127
11127
|
}
|
|
11128
11128
|
|
|
11129
11129
|
// src/index.ts
|
|
11130
|
+
function prerenderBypassPoliciesEnabled() {
|
|
11131
|
+
return process.env.VERCEL_NEXT_ADAPTER_PRERENDER_BYPASS_POLICIES === "1";
|
|
11132
|
+
}
|
|
11130
11133
|
function getHtmlLimitedBotsPattern(config) {
|
|
11131
11134
|
const pattern = config.htmlLimitedBots;
|
|
11132
11135
|
return Buffer.byteLength(pattern, "utf8") <= 1024 ? pattern : void 0;
|
|
@@ -11134,9 +11137,10 @@ function getHtmlLimitedBotsPattern(config) {
|
|
|
11134
11137
|
var myAdapter = {
|
|
11135
11138
|
name: "Vercel",
|
|
11136
11139
|
getCapabilities({ config }) {
|
|
11140
|
+
const bypassPoliciesEnabled = prerenderBypassPoliciesEnabled();
|
|
11137
11141
|
return {
|
|
11138
|
-
supportsHtmlLimitedBotPrerenders: getHtmlLimitedBotsPattern(config) !== void 0,
|
|
11139
|
-
supportsPrerenderMethodBypass:
|
|
11142
|
+
supportsHtmlLimitedBotPrerenders: bypassPoliciesEnabled && getHtmlLimitedBotsPattern(config) !== void 0,
|
|
11143
|
+
supportsPrerenderMethodBypass: bypassPoliciesEnabled
|
|
11140
11144
|
};
|
|
11141
11145
|
},
|
|
11142
11146
|
async modifyConfig(config, ctx) {
|
|
@@ -11199,7 +11203,7 @@ var myAdapter = {
|
|
|
11199
11203
|
const hasPagesDir = outputs.pages.length > 0 || outputs.pagesApi.length > 0;
|
|
11200
11204
|
const shouldHandleMiddlewareDataResolving = routing.shouldNormalizeNextData;
|
|
11201
11205
|
const i18nConfig = config.i18n;
|
|
11202
|
-
const htmlLimitedBotsRegex = getHtmlLimitedBotsPattern(config);
|
|
11206
|
+
const htmlLimitedBotsRegex = prerenderBypassPoliciesEnabled() ? getHtmlLimitedBotsPattern(config) : void 0;
|
|
11203
11207
|
const vercelConfig2 = {
|
|
11204
11208
|
version: 3,
|
|
11205
11209
|
afterCacheBypass: config.cacheComponents && htmlLimitedBotsRegex !== void 0 ? [
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/next",
|
|
3
|
-
"version": "31.0.
|
|
3
|
+
"version": "31.0.2-snapshot-62deef8da0a0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@vercel/build-utils": "15.5.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@next-community/adapter-vercel": "0.1.0-beta.
|
|
22
|
+
"@next-community/adapter-vercel": "0.1.0-beta.40",
|
|
23
23
|
"@types/aws-lambda": "8.10.19",
|
|
24
24
|
"@types/buffer-crc32": "0.2.0",
|
|
25
25
|
"@types/bytes": "3.1.1",
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"vite": "6.4.3",
|
|
61
61
|
"vitest": "4.1.10",
|
|
62
62
|
"webpack-sources": "3.2.3",
|
|
63
|
-
"@vercel/build-utils": "15.5.0",
|
|
64
|
-
"@vercel/routing-utils": "6.6.1",
|
|
65
63
|
"@vercel/go": "30.0.0",
|
|
66
|
-
"@vercel-internals/ipc-proxy": "1.1.4"
|
|
64
|
+
"@vercel-internals/ipc-proxy": "1.1.4",
|
|
65
|
+
"@vercel/routing-utils": "6.6.1",
|
|
66
|
+
"@vercel/build-utils": "15.5.0"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"build": "node build.mjs",
|