@vercel/next 4.3.18 → 4.3.19
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 +52 -38
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -11955,7 +11955,12 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
11955
11955
|
}
|
11956
11956
|
let chain;
|
11957
11957
|
let experimentalStreamingLambdaPath;
|
11958
|
-
if (renderingMode === "PARTIALLY_STATIC" /* PARTIALLY_STATIC */ &&
|
11958
|
+
if (renderingMode === "PARTIALLY_STATIC" /* PARTIALLY_STATIC */ && routesManifest?.ppr?.chain?.headers) {
|
11959
|
+
chain = {
|
11960
|
+
outputPath: pathnameToOutputName(entryDirectory, routeKey),
|
11961
|
+
headers: routesManifest.ppr.chain.headers
|
11962
|
+
};
|
11963
|
+
} else if (renderingMode === "PARTIALLY_STATIC" /* PARTIALLY_STATIC */ && experimentalStreamingLambdaPaths) {
|
11959
11964
|
let paths = experimentalStreamingLambdaPaths.get(
|
11960
11965
|
pathnameToOutputName(entryDirectory, routeKey)
|
11961
11966
|
);
|
@@ -11970,17 +11975,10 @@ var onPrerenderRoute = (prerenderRouteArgs) => async (routeKey, {
|
|
11970
11975
|
);
|
11971
11976
|
}
|
11972
11977
|
experimentalStreamingLambdaPath = paths.output;
|
11973
|
-
|
11974
|
-
|
11975
|
-
|
11976
|
-
|
11977
|
-
};
|
11978
|
-
} else {
|
11979
|
-
chain = {
|
11980
|
-
outputPath: paths.output,
|
11981
|
-
headers: { "x-matched-path": paths.pathname }
|
11982
|
-
};
|
11983
|
-
}
|
11978
|
+
chain = {
|
11979
|
+
outputPath: paths.output,
|
11980
|
+
headers: { "x-matched-path": paths.pathname }
|
11981
|
+
};
|
11984
11982
|
}
|
11985
11983
|
let htmlAllowQuery = allowQuery;
|
11986
11984
|
if (renderingMode === "PARTIALLY_STATIC" /* PARTIALLY_STATIC */ && isFallback) {
|
@@ -13963,31 +13961,33 @@ ${JSON.stringify(
|
|
13963
13961
|
throw new Error("Invariant: PPR lambda isn't streaming");
|
13964
13962
|
}
|
13965
13963
|
lambdas[outputName] = lambda;
|
13966
|
-
if (
|
13967
|
-
|
13968
|
-
|
13969
|
-
|
13970
|
-
|
13971
|
-
|
13972
|
-
|
13973
|
-
|
13974
|
-
|
13975
|
-
|
13976
|
-
|
13977
|
-
|
13978
|
-
|
13979
|
-
|
13980
|
-
|
13981
|
-
|
13982
|
-
|
13983
|
-
|
13984
|
-
|
13985
|
-
|
13986
|
-
|
13987
|
-
|
13988
|
-
|
13964
|
+
if (typeof routesManifest?.ppr?.chain?.headers === "undefined") {
|
13965
|
+
if (!omittedPrerenderRoutes.has(pagePathname)) {
|
13966
|
+
const output = getPostponeResumeOutput(entryDirectory, pageName);
|
13967
|
+
lambdas[output] = lambda;
|
13968
|
+
experimentalStreamingLambdaPaths.set(outputName, {
|
13969
|
+
pathname: getPostponeResumePathname(pageName),
|
13970
|
+
output
|
13971
|
+
});
|
13972
|
+
}
|
13973
|
+
for (const [
|
13974
|
+
routePathname,
|
13975
|
+
{ srcRoute, renderingMode }
|
13976
|
+
] of Object.entries(prerenderManifest.staticRoutes)) {
|
13977
|
+
if (srcRoute !== pagePathname || renderingMode !== "PARTIALLY_STATIC" /* PARTIALLY_STATIC */)
|
13978
|
+
continue;
|
13979
|
+
if (routePathname === pagePathname)
|
13980
|
+
continue;
|
13981
|
+
const output = getPostponeResumePathname(routePathname);
|
13982
|
+
lambdas[output] = lambda;
|
13983
|
+
outputName = import_path4.default.posix.join(entryDirectory, routePathname);
|
13984
|
+
experimentalStreamingLambdaPaths.set(outputName, {
|
13985
|
+
pathname: getPostponeResumePathname(routePathname),
|
13986
|
+
output
|
13987
|
+
});
|
13988
|
+
}
|
13989
|
+
continue;
|
13989
13990
|
}
|
13990
|
-
continue;
|
13991
13991
|
}
|
13992
13992
|
if (!group.isAppRouter && !group.isAppRouteHandler) {
|
13993
13993
|
outputName = normalizeIndexOutput(outputName, true);
|
@@ -14832,7 +14832,14 @@ ${JSON.stringify(
|
|
14832
14832
|
}
|
14833
14833
|
] : [
|
14834
14834
|
{
|
14835
|
-
src: import_path4.default.posix.join(
|
14835
|
+
src: import_path4.default.posix.join(
|
14836
|
+
"/",
|
14837
|
+
entryDirectory,
|
14838
|
+
// if entryDirectory is populated we need to
|
14839
|
+
// add optional handling for trailing slash so
|
14840
|
+
// that the entryDirectory (basePath) itself matches
|
14841
|
+
`${entryDirectory !== "." ? "?" : ""}.*`
|
14842
|
+
),
|
14836
14843
|
dest: import_path4.default.posix.join(
|
14837
14844
|
"/",
|
14838
14845
|
entryDirectory,
|
@@ -14864,7 +14871,14 @@ ${JSON.stringify(
|
|
14864
14871
|
}
|
14865
14872
|
] : [
|
14866
14873
|
{
|
14867
|
-
src: import_path4.default.posix.join(
|
14874
|
+
src: import_path4.default.posix.join(
|
14875
|
+
"/",
|
14876
|
+
entryDirectory,
|
14877
|
+
// if entryDirectory is populated we need to
|
14878
|
+
// add optional handling for trailing slash so
|
14879
|
+
// that the entryDirectory (basePath) itself matches
|
14880
|
+
`${entryDirectory !== "." ? "?" : ""}.*`
|
14881
|
+
),
|
14868
14882
|
dest: import_path4.default.posix.join(
|
14869
14883
|
"/",
|
14870
14884
|
entryDirectory,
|