@netlify/plugin-nextjs 5.8.1 → 5.9.0
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/README.md +3 -2
- package/dist/build/advanced-api-routes.js +4 -136
- package/dist/build/cache.js +4 -25
- package/dist/build/content/prerendered.js +11 -290
- package/dist/build/content/server.js +11 -219
- package/dist/build/content/static.js +14 -103
- package/dist/build/functions/edge.js +7 -534
- package/dist/build/functions/server.js +11 -130
- package/dist/build/image-cdn.js +3 -1599
- package/dist/build/plugin-context.js +6 -292
- package/dist/build/templates/handler-monorepo.tmpl.js +1 -1
- package/dist/build/templates/handler.tmpl.js +1 -1
- package/dist/build/verification.js +9 -104
- package/dist/esm-chunks/chunk-72ZI2IVI.js +36 -0
- package/dist/esm-chunks/chunk-AMY4NOT5.js +1610 -0
- package/dist/esm-chunks/chunk-BEIUVQZK.js +212 -0
- package/dist/esm-chunks/chunk-BFYMHE3E.js +548 -0
- package/dist/esm-chunks/chunk-BVYZSEV6.js +306 -0
- package/dist/esm-chunks/chunk-DLVROEVU.js +144 -0
- package/dist/esm-chunks/chunk-GFYWJNQR.js +305 -0
- package/dist/esm-chunks/chunk-HWMLYAVP.js +122 -0
- package/dist/esm-chunks/chunk-IJZEDP6B.js +235 -0
- package/dist/esm-chunks/chunk-K4RDUZYO.js +609 -0
- package/dist/esm-chunks/chunk-KBX7SJLC.js +73 -0
- package/dist/esm-chunks/chunk-NDSDIXRD.js +122 -0
- package/dist/esm-chunks/chunk-TYCYFZ22.js +25 -0
- package/dist/esm-chunks/chunk-UYKENJEU.js +19 -0
- package/dist/esm-chunks/chunk-XS27YRA5.js +34 -0
- package/dist/esm-chunks/chunk-ZENB67PD.js +148 -0
- package/dist/esm-chunks/chunk-ZSVHJNNY.js +120 -0
- package/dist/esm-chunks/next-4L47PQSM.js +569 -0
- package/dist/esm-chunks/{package-AOKLDA5E.js → package-LCNINN36.js} +5 -5
- package/dist/index.js +39 -18
- package/dist/run/config.js +4 -1
- package/dist/run/constants.js +5 -7
- package/dist/run/handlers/cache.cjs +1618 -31
- package/dist/run/handlers/request-context.cjs +6 -2
- package/dist/run/handlers/server.js +40 -20
- package/dist/run/handlers/tracer.cjs +83 -2
- package/dist/run/handlers/tracing.js +4 -2
- package/dist/run/handlers/wait-until.cjs +122 -0
- package/dist/run/headers.js +9 -194
- package/dist/run/next.cjs +1597 -15
- package/dist/run/revalidate.js +3 -24
- package/dist/shared/blobkey.js +3 -15
- package/package.json +4 -4
package/dist/run/revalidate.js
CHANGED
|
@@ -4,31 +4,10 @@
|
|
|
4
4
|
return createRequire(import.meta.url);
|
|
5
5
|
})();
|
|
6
6
|
|
|
7
|
+
import {
|
|
8
|
+
nextResponseProxy
|
|
9
|
+
} from "../esm-chunks/chunk-XS27YRA5.js";
|
|
7
10
|
import "../esm-chunks/chunk-OEQOKJGE.js";
|
|
8
|
-
|
|
9
|
-
// src/run/revalidate.ts
|
|
10
|
-
import { isPromise } from "node:util/types";
|
|
11
|
-
function isRevalidateMethod(key, nextResponseField) {
|
|
12
|
-
return key === "revalidate" && typeof nextResponseField === "function";
|
|
13
|
-
}
|
|
14
|
-
var nextResponseProxy = (res, requestContext) => {
|
|
15
|
-
return new Proxy(res, {
|
|
16
|
-
get(target, key) {
|
|
17
|
-
const originalValue = Reflect.get(target, key);
|
|
18
|
-
if (isRevalidateMethod(key, originalValue)) {
|
|
19
|
-
return function newRevalidate(...args) {
|
|
20
|
-
requestContext.didPagesRouterOnDemandRevalidate = true;
|
|
21
|
-
const result = originalValue.apply(target, args);
|
|
22
|
-
if (result && isPromise(result)) {
|
|
23
|
-
requestContext.trackBackgroundWork(result);
|
|
24
|
-
}
|
|
25
|
-
return result;
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
return originalValue;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
11
|
export {
|
|
33
12
|
nextResponseProxy
|
|
34
13
|
};
|
package/dist/shared/blobkey.js
CHANGED
|
@@ -4,22 +4,10 @@
|
|
|
4
4
|
return createRequire(import.meta.url);
|
|
5
5
|
})();
|
|
6
6
|
|
|
7
|
+
import {
|
|
8
|
+
encodeBlobKey
|
|
9
|
+
} from "../esm-chunks/chunk-TYCYFZ22.js";
|
|
7
10
|
import "../esm-chunks/chunk-OEQOKJGE.js";
|
|
8
|
-
|
|
9
|
-
// src/shared/blobkey.ts
|
|
10
|
-
import { Buffer } from "node:buffer";
|
|
11
|
-
import { webcrypto as crypto } from "node:crypto";
|
|
12
|
-
var maxLength = 180;
|
|
13
|
-
async function encodeBlobKey(key) {
|
|
14
|
-
const buffer = Buffer.from(key);
|
|
15
|
-
const base64 = buffer.toString("base64url");
|
|
16
|
-
if (base64.length <= maxLength) {
|
|
17
|
-
return base64;
|
|
18
|
-
}
|
|
19
|
-
const digest = await crypto.subtle.digest("SHA-256", buffer);
|
|
20
|
-
const hash = Buffer.from(digest).toString("base64url");
|
|
21
|
-
return `${base64.slice(0, maxLength - hash.length - 1)}-${hash}`;
|
|
22
|
-
}
|
|
23
11
|
export {
|
|
24
12
|
encodeBlobKey
|
|
25
13
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/plugin-nextjs",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.9.0",
|
|
4
4
|
"description": "Run Next.js seamlessly on Netlify",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
17
|
-
"url": "git+https://github.com/
|
|
17
|
+
"url": "git+https://github.com/opennextjs/opennextjs-netlify.git"
|
|
18
18
|
},
|
|
19
19
|
"keywords": [
|
|
20
20
|
"nextjs",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"bugs": {
|
|
27
|
-
"url": "https://github.com/
|
|
27
|
+
"url": "https://github.com/opennextjs/opennextjs-netlify/issues"
|
|
28
28
|
},
|
|
29
|
-
"homepage": "https://
|
|
29
|
+
"homepage": "https://opennext.js.org/netlify"
|
|
30
30
|
}
|