@netlify/plugin-nextjs 5.12.0 → 5.12.1

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.
@@ -109,6 +109,9 @@ var copyNextServerCode = async (ctx) => {
109
109
  }
110
110
  return;
111
111
  }
112
+ if (path === "server/functions-config-manifest.json") {
113
+ await verifyFunctionsConfigManifest(join(srcDir, path));
114
+ }
112
115
  await cp(srcPath, destPath, { recursive: true, force: true });
113
116
  })
114
117
  );
@@ -246,6 +249,15 @@ var replaceMiddlewareManifest = async (sourcePath, destPath) => {
246
249
  const newData = JSON.stringify(newManifest);
247
250
  await writeFile(destPath, newData);
248
251
  };
252
+ var verifyFunctionsConfigManifest = async (sourcePath) => {
253
+ const data = await readFile(sourcePath, "utf8");
254
+ const manifest = JSON.parse(data);
255
+ if (manifest.functions["/_middleware"]) {
256
+ throw new Error(
257
+ "Node.js middleware is not yet supported.\n\nFuture @netlify/plugin-nextjs release will support node middleware with following limitations:\n - usage of C++ Addons (https://nodejs.org/api/addons.html) not supported (for example `bcrypt` npm module will not be supported, but `bcryptjs` will be supported),\n - usage of Filesystem (https://nodejs.org/api/fs.html) not supported."
258
+ );
259
+ }
260
+ };
249
261
  var verifyHandlerDirStructure = async (ctx) => {
250
262
  const { nextConfig } = JSON.parse(
251
263
  await readFile(join(ctx.serverHandlerDir, RUN_CONFIG_FILE), "utf-8")
@@ -92,6 +92,7 @@ var require_constants = __commonJS({
92
92
  REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
93
93
  // Replace globs with equivalent patterns to reduce parsing time.
94
94
  REPLACEMENTS: {
95
+ __proto__: null,
95
96
  "***": "*",
96
97
  "**/**": "**",
97
98
  "**/**/**": "**"
@@ -86,7 +86,7 @@ var pipeline = (0, import_util.promisify)(import_stream.pipeline);
86
86
 
87
87
  // package.json
88
88
  var name = "@netlify/plugin-nextjs";
89
- var version = "5.12.0";
89
+ var version = "5.12.1";
90
90
 
91
91
  // src/run/handlers/tags-handler.cts
92
92
  var import_storage = require("../storage/storage.cjs");
@@ -0,0 +1,5 @@
1
+ {
2
+ "modules": {
3
+ "https://deno.land/std@0.175.0/node/internal_binding/_timingSafeEqual.ts": {}
4
+ }
5
+ }
@@ -14,3 +14,11 @@ import 'https://deno.land/x/path_to_regexp@v6.2.1/index.ts'
14
14
  import 'https://deno.land/x/htmlrewriter@v1.0.0/src/index.ts'
15
15
 
16
16
  import 'https://v1-7-0--edge-utils.netlify.app/logger/mod.ts'
17
+
18
+ // Types
19
+ import 'https://deno.land/std@0.175.0/node/_global.d.ts'
20
+ import 'https://deno.land/std@0.175.0/node/_events.d.ts'
21
+ import 'https://deno.land/std@0.175.0/node/_stream.d.ts'
22
+ import 'https://deno.land/std@0.175.0/node/internal/buffer.d.ts'
23
+ import 'https://deno.land/std@0.175.0/types.d.ts'
24
+ import 'https://deno.land/x/htmlrewriter@v1.0.0/src/types.d.ts'
package/package.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "name": "@netlify/plugin-nextjs",
3
- "version": "5.12.0",
3
+ "version": "5.12.1",
4
4
  "description": "Run Next.js seamlessly on Netlify",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",
7
7
  "files": [
8
8
  "dist",
9
9
  "edge-runtime",
10
+ "!edge-runtime/deno.json",
11
+ "!edge-runtime/deno.lock",
10
12
  "manifest.yml"
11
13
  ],
12
14
  "engines": {
@@ -1,6 +0,0 @@
1
- {
2
- "imports": {
3
- "https://deno.land/": "./deno.land/",
4
- "https://v1-7-0--edge-utils.netlify.app/": "./v1-7-0--edge-utils.netlify.app/"
5
- }
6
- }