@netlify/plugin-nextjs 5.0.0-rc.1 → 5.0.0-rc.3
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/build/content/prerendered.js +1 -1
- package/dist/build/content/server.js +3 -1
- package/dist/build/content/static.js +1 -1
- package/dist/build/functions/edge.js +1 -1
- package/dist/build/functions/server.js +2 -2
- package/dist/esm-chunks/{chunk-GAZUUVZW.js → chunk-A6CMEU53.js} +36 -9
- package/dist/esm-chunks/{chunk-ZZOGIP2V.js → chunk-ATFMKC2X.js} +26 -33
- package/dist/esm-chunks/{chunk-4J4A5OE2.js → chunk-GFISNHVP.js} +53 -6
- package/dist/esm-chunks/chunk-GQ6KIYPX.js +1658 -0
- package/dist/esm-chunks/{chunk-67EWAGDQ.js → chunk-LWQKZVSS.js} +16 -6
- package/dist/esm-chunks/{chunk-WQIG4U66.js → chunk-MPZEWLBG.js} +2 -2
- package/dist/esm-chunks/{package-QW5XSFQ4.js → package-N25EXX4H.js} +7 -4
- package/dist/index.js +5 -5
- package/dist/run/handlers/cache.cjs +774 -1652
- package/dist/run/handlers/server.js +7 -5
- package/dist/run/handlers/tracing.js +4537 -3699
- package/dist/run/next.cjs +762 -1650
- package/package.json +1 -1
- package/dist/esm-chunks/chunk-VDDK7MXY.js +0 -1661
|
@@ -37,12 +37,19 @@ var buildPagesCacheValue = async (path) => ({
|
|
|
37
37
|
headers: void 0,
|
|
38
38
|
status: void 0
|
|
39
39
|
});
|
|
40
|
-
var buildAppCacheValue = async (path) =>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
40
|
+
var buildAppCacheValue = async (path) => {
|
|
41
|
+
const meta = JSON.parse(await readFile(`${path}.meta`, "utf-8"));
|
|
42
|
+
const rsc = await readFile(`${path}.rsc`, "utf-8");
|
|
43
|
+
if (!meta.status && rsc.includes("NEXT_NOT_FOUND")) {
|
|
44
|
+
meta.status = 404;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
kind: "PAGE",
|
|
48
|
+
html: await readFile(`${path}.html`, "utf-8"),
|
|
49
|
+
pageData: rsc,
|
|
50
|
+
...meta
|
|
51
|
+
};
|
|
52
|
+
};
|
|
46
53
|
var buildRouteCacheValue = async (path) => ({
|
|
47
54
|
kind: "ROUTE",
|
|
48
55
|
body: await readFile(`${path}.body`, "base64"),
|
|
@@ -64,6 +71,9 @@ var copyPrerenderedContent = async (ctx) => {
|
|
|
64
71
|
case (meta.dataRoute?.endsWith("/default.rsc") && !existsSync(join(ctx.publishDir, "server/app", `${key}.html`))):
|
|
65
72
|
return;
|
|
66
73
|
case meta.dataRoute?.endsWith(".json"):
|
|
74
|
+
if (manifest.notFoundRoutes.includes(route)) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
67
77
|
value = await buildPagesCacheValue(join(ctx.publishDir, "server/pages", key));
|
|
68
78
|
break;
|
|
69
79
|
case meta.dataRoute?.endsWith(".rsc"):
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
var import_fast_glob = __toESM(require_out(), 1);
|
|
19
19
|
import { existsSync } from "node:fs";
|
|
20
20
|
import { cp, mkdir, rename, rm } from "node:fs/promises";
|
|
21
|
-
import { join } from "node:path";
|
|
21
|
+
import { basename, join } from "node:path";
|
|
22
22
|
var copyStaticContent = async (ctx) => {
|
|
23
23
|
const srcDir = join(ctx.publishDir, "server/pages");
|
|
24
24
|
const destDir = ctx.blobDir;
|
|
@@ -58,7 +58,7 @@ var copyStaticAssets = async (ctx) => {
|
|
|
58
58
|
var publishStaticDir = async (ctx) => {
|
|
59
59
|
try {
|
|
60
60
|
await rm(ctx.tempPublishDir, { recursive: true, force: true });
|
|
61
|
-
await mkdir(ctx.tempPublishDir, { recursive: true });
|
|
61
|
+
await mkdir(basename(ctx.tempPublishDir), { recursive: true });
|
|
62
62
|
await rename(ctx.publishDir, ctx.tempPublishDir);
|
|
63
63
|
await rename(ctx.staticDir, ctx.publishDir);
|
|
64
64
|
} catch (error) {
|
|
@@ -8,7 +8,7 @@ import "./chunk-5JVNISGM.js";
|
|
|
8
8
|
|
|
9
9
|
// package.json
|
|
10
10
|
var name = "@netlify/plugin-nextjs";
|
|
11
|
-
var version = "5.0.0-rc.
|
|
11
|
+
var version = "5.0.0-rc.3";
|
|
12
12
|
var description = "Run Next.js seamlessly on Netlify";
|
|
13
13
|
var main = "./dist/index.js";
|
|
14
14
|
var type = "module";
|
|
@@ -27,6 +27,8 @@ var scripts = {
|
|
|
27
27
|
build: "node ./tools/build.js",
|
|
28
28
|
"build:watch": "node ./tools/build.js --watch",
|
|
29
29
|
lint: "eslint --cache --format=codeframe --max-warnings=0 --ext .ts,.cts,.js src",
|
|
30
|
+
"format:fix": "prettier --write .",
|
|
31
|
+
"format:check": "prettier --check .",
|
|
30
32
|
test: "vitest",
|
|
31
33
|
"test:ci": "vitest run --reporter=default --retry=3",
|
|
32
34
|
typecheck: "tsc --noEmit",
|
|
@@ -57,11 +59,11 @@ var devDependencies = {
|
|
|
57
59
|
"@netlify/eslint-config-node": "^7.0.1",
|
|
58
60
|
"@netlify/functions": "^2.5.1",
|
|
59
61
|
"@netlify/serverless-functions-api": "^1.10.1",
|
|
60
|
-
"@netlify/zip-it-and-ship-it": "^9.
|
|
62
|
+
"@netlify/zip-it-and-ship-it": "^9.30.0",
|
|
61
63
|
"@opentelemetry/api": "^1.7.0",
|
|
62
|
-
"@opentelemetry/exporter-trace-otlp-http": "^0.
|
|
64
|
+
"@opentelemetry/exporter-trace-otlp-http": "^0.49.0",
|
|
63
65
|
"@opentelemetry/resources": "^1.21.0",
|
|
64
|
-
"@opentelemetry/sdk-node": "^0.
|
|
66
|
+
"@opentelemetry/sdk-node": "^0.49.0",
|
|
65
67
|
"@opentelemetry/sdk-trace-node": "^1.21.0",
|
|
66
68
|
"@opentelemetry/semantic-conventions": "^1.21.0",
|
|
67
69
|
"@playwright/test": "^1.40.0",
|
|
@@ -86,6 +88,7 @@ var devDependencies = {
|
|
|
86
88
|
"p-limit": "^4.0.0",
|
|
87
89
|
"path-to-regexp": "^6.2.1",
|
|
88
90
|
picomatch: "^3.0.1",
|
|
91
|
+
prettier: "^3.2.5",
|
|
89
92
|
"regexp-tree": "^0.1.27",
|
|
90
93
|
typescript: "^5.1.6",
|
|
91
94
|
unionfs: "^4.5.1",
|
package/dist/index.js
CHANGED
|
@@ -6,20 +6,20 @@
|
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
8
|
copyPrerenderedContent
|
|
9
|
-
} from "./esm-chunks/chunk-
|
|
9
|
+
} from "./esm-chunks/chunk-LWQKZVSS.js";
|
|
10
10
|
import {
|
|
11
11
|
copyStaticAssets,
|
|
12
12
|
copyStaticContent,
|
|
13
13
|
publishStaticDir,
|
|
14
14
|
unpublishStaticDir
|
|
15
|
-
} from "./esm-chunks/chunk-
|
|
15
|
+
} from "./esm-chunks/chunk-MPZEWLBG.js";
|
|
16
16
|
import {
|
|
17
17
|
createEdgeHandlers
|
|
18
|
-
} from "./esm-chunks/chunk-
|
|
18
|
+
} from "./esm-chunks/chunk-ATFMKC2X.js";
|
|
19
19
|
import {
|
|
20
20
|
createServerHandler
|
|
21
|
-
} from "./esm-chunks/chunk-
|
|
22
|
-
import "./esm-chunks/chunk-
|
|
21
|
+
} from "./esm-chunks/chunk-A6CMEU53.js";
|
|
22
|
+
import "./esm-chunks/chunk-GFISNHVP.js";
|
|
23
23
|
import "./esm-chunks/chunk-VZNKO4OO.js";
|
|
24
24
|
import {
|
|
25
25
|
restoreBuildCache,
|