@vercel/next 4.15.27 → 4.15.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/adapter/index.js +41 -1
- package/dist/index.js +2 -2
- package/package.json +4 -4
package/dist/adapter/index.js
CHANGED
|
@@ -9711,6 +9711,37 @@ async function handleStaticOutputs(outputs, {
|
|
|
9711
9711
|
);
|
|
9712
9712
|
}
|
|
9713
9713
|
var vercelConfig = JSON.parse(process.env.NEXT_ADAPTER_VERCEL_CONFIG || "{}");
|
|
9714
|
+
function isGeneratedStep(routeName) {
|
|
9715
|
+
return routeName.includes(".well-known/workflow/v1/step") || routeName.includes("api/generated/steps");
|
|
9716
|
+
}
|
|
9717
|
+
function isGeneratedWorkflow(routeName) {
|
|
9718
|
+
return routeName.includes(".well-known/workflow/v1/flow") || routeName.includes("api/generated/workflows");
|
|
9719
|
+
}
|
|
9720
|
+
async function getGeneratedWorkflowLambdaOptions({
|
|
9721
|
+
projectDir,
|
|
9722
|
+
routeName,
|
|
9723
|
+
sourceFile
|
|
9724
|
+
}) {
|
|
9725
|
+
const generatedStep = isGeneratedStep(routeName);
|
|
9726
|
+
const generatedWorkflow = isGeneratedWorkflow(routeName);
|
|
9727
|
+
if (!generatedStep && !generatedWorkflow) {
|
|
9728
|
+
return;
|
|
9729
|
+
}
|
|
9730
|
+
const isAppRouterRoute = sourceFile.endsWith("/route.js") || sourceFile.endsWith("/route.ts");
|
|
9731
|
+
const configRelativePath = isAppRouterRoute ? "../config.json" : "./config.json";
|
|
9732
|
+
const generatedConfig = JSON.parse(
|
|
9733
|
+
await import_promises.default.readFile(
|
|
9734
|
+
import_node_path.default.join(projectDir, import_node_path.default.dirname(sourceFile), configRelativePath),
|
|
9735
|
+
"utf8"
|
|
9736
|
+
).catch(() => "{}")
|
|
9737
|
+
);
|
|
9738
|
+
if (generatedStep && generatedConfig.steps) {
|
|
9739
|
+
return generatedConfig.steps;
|
|
9740
|
+
}
|
|
9741
|
+
if (generatedWorkflow && generatedConfig.workflows) {
|
|
9742
|
+
return generatedConfig.workflows;
|
|
9743
|
+
}
|
|
9744
|
+
}
|
|
9714
9745
|
async function writeDeterministicRoutesManifest(distDir) {
|
|
9715
9746
|
const manifest = require(import_node_path.default.join(distDir, "routes-manifest.json"));
|
|
9716
9747
|
manifest.headers = [];
|
|
@@ -9810,6 +9841,15 @@ async function handleNodeOutputs(nodeOutputs, {
|
|
|
9810
9841
|
sourceFile,
|
|
9811
9842
|
config: vercelConfig
|
|
9812
9843
|
});
|
|
9844
|
+
const generatedConfigOpts = await getGeneratedWorkflowLambdaOptions({
|
|
9845
|
+
projectDir,
|
|
9846
|
+
routeName: output.pathname,
|
|
9847
|
+
sourceFile
|
|
9848
|
+
});
|
|
9849
|
+
if (generatedConfigOpts) {
|
|
9850
|
+
Object.assign(vercelConfigOpts, generatedConfigOpts);
|
|
9851
|
+
}
|
|
9852
|
+
const maxDuration = generatedConfigOpts?.maxDuration ?? output.config.maxDuration;
|
|
9813
9853
|
await writeIfNotExists(
|
|
9814
9854
|
import_node_path.default.join(functionDir, `.vc-config.json`),
|
|
9815
9855
|
JSON.stringify(
|
|
@@ -9827,7 +9867,7 @@ async function handleNodeOutputs(nodeOutputs, {
|
|
|
9827
9867
|
"___next_launcher.cjs"
|
|
9828
9868
|
),
|
|
9829
9869
|
runtime: nodeVersion.runtime,
|
|
9830
|
-
maxDuration
|
|
9870
|
+
maxDuration,
|
|
9831
9871
|
supportsResponseStreaming: true,
|
|
9832
9872
|
experimentalAllowBundling: true,
|
|
9833
9873
|
// middleware handler always expects Request/Response interface
|
package/dist/index.js
CHANGED
|
@@ -17462,8 +17462,8 @@ More info: http://err.sh/vercel/vercel/next-functions-config-optimized-lambdas`
|
|
|
17462
17462
|
continue;
|
|
17463
17463
|
experimentalPPRRoutes.add(route);
|
|
17464
17464
|
}
|
|
17465
|
-
const isAppPPREnabled = requiredServerFilesManifest ? requiredServerFilesManifest.config.experimental?.ppr === true || requiredServerFilesManifest.config.experimental?.ppr === "incremental" || requiredServerFilesManifest.config.experimental?.cacheComponents === true : false;
|
|
17466
|
-
const isAppFullPPREnabled = requiredServerFilesManifest ? requiredServerFilesManifest?.config.experimental?.ppr === true || requiredServerFilesManifest.config.experimental?.cacheComponents === true : false;
|
|
17465
|
+
const isAppPPREnabled = requiredServerFilesManifest ? requiredServerFilesManifest.config.experimental?.ppr === true || requiredServerFilesManifest.config.experimental?.ppr === "incremental" || requiredServerFilesManifest.config.experimental?.cacheComponents === true || requiredServerFilesManifest?.config?.cacheComponents === true : false;
|
|
17466
|
+
const isAppFullPPREnabled = requiredServerFilesManifest ? requiredServerFilesManifest?.config.experimental?.ppr === true || requiredServerFilesManifest.config.experimental?.cacheComponents === true || requiredServerFilesManifest?.config?.cacheComponents === true : false;
|
|
17467
17467
|
const isAppClientSegmentCacheEnabled = import_semver5.default.gte(nextVersion, IS_APP_CLIENT_SEGMENT_CACHE_ENABLED_VERSION) || (requiredServerFilesManifest ? requiredServerFilesManifest.config.experimental?.clientSegmentCache === true : false);
|
|
17468
17468
|
const isAppClientParamParsingEnabled = routesManifest?.rsc?.clientParamParsing ?? false;
|
|
17469
17469
|
const clientParamParsingOrigins = requiredServerFilesManifest ? requiredServerFilesManifest.config.experimental?.clientParamParsingOrigins : void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/next",
|
|
3
|
-
"version": "4.15.
|
|
3
|
+
"version": "4.15.29",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index",
|
|
6
6
|
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@vercel/nft": "1.1.1"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@next-community/adapter-vercel": "0.0.1-beta.
|
|
19
|
+
"@next-community/adapter-vercel": "0.0.1-beta.7",
|
|
20
20
|
"@types/aws-lambda": "8.10.19",
|
|
21
21
|
"@types/buffer-crc32": "0.2.0",
|
|
22
22
|
"@types/bytes": "3.1.1",
|
|
@@ -53,8 +53,8 @@
|
|
|
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.
|
|
57
|
-
"@vercel/routing-utils": "5.3.
|
|
56
|
+
"@vercel/build-utils": "13.4.1",
|
|
57
|
+
"@vercel/routing-utils": "5.3.3"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "node build.mjs",
|