@opennextjs/aws 4.1.12 → 4.1.14
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/adapters/cache.d.ts +21 -1
- package/dist/adapters/cache.js +138 -30
- package/dist/adapters/config/index.js +14 -4
- package/dist/adapters/config/util.d.ts +19 -0
- package/dist/adapters/config/util.js +21 -0
- package/dist/adapters/image-optimization-adapter.js +8 -2
- package/dist/build/createAssets.d.ts +3 -0
- package/dist/build/createAssets.js +11 -8
- package/dist/build/createImageOptimizationBundle.js +0 -1
- package/dist/build/helper.js +1 -1
- package/dist/build/installDeps.js +6 -7
- package/dist/build/patch/patches/patchNextServer.d.ts +25 -0
- package/dist/build/patch/patches/patchNextServer.js +48 -0
- package/dist/build/patch/testUtils.d.ts +49 -0
- package/dist/build/patch/testUtils.js +78 -0
- package/dist/core/requestHandler.js +5 -0
- package/dist/core/resolve.d.ts +8 -1
- package/dist/core/revalidate.d.ts +68 -0
- package/dist/core/revalidate.js +143 -0
- package/dist/core/util.js +5 -0
- package/dist/overrides/cdnInvalidation/cloudfront.js +2 -1
- package/dist/overrides/wrappers/aws-lambda-compressed.js +2 -4
- package/dist/overrides/wrappers/aws-lambda-streaming.js +4 -0
- package/dist/plugins/edge.js +3 -2
- package/dist/types/cache.d.ts +12 -4
- package/dist/types/global.d.ts +7 -0
- package/dist/types/open-next.d.ts +4 -1
- package/dist/types/overrides.d.ts +47 -0
- package/dist/utils/cache.js +1 -1
- package/dist/utils/compression.d.ts +8 -0
- package/dist/utils/compression.js +16 -0
- package/package.json +8 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Brotli quality used by the compressing wrappers.
|
|
3
|
+
*
|
|
4
|
+
* It can be set with the `BROTLI_QUALITY` environment variable (0 to 11) and defaults to 6.
|
|
5
|
+
* Quality 10 and 11 cost an order of magnitude more CPU than 6 for a few percent smaller output,
|
|
6
|
+
* which delays every streamed response.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getBrotliQuality(): number;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import zlib from "node:zlib";
|
|
2
|
+
const DEFAULT_BROTLI_QUALITY = 6;
|
|
3
|
+
/**
|
|
4
|
+
* Brotli quality used by the compressing wrappers.
|
|
5
|
+
*
|
|
6
|
+
* It can be set with the `BROTLI_QUALITY` environment variable (0 to 11) and defaults to 6.
|
|
7
|
+
* Quality 10 and 11 cost an order of magnitude more CPU than 6 for a few percent smaller output,
|
|
8
|
+
* which delays every streamed response.
|
|
9
|
+
*/
|
|
10
|
+
export function getBrotliQuality() {
|
|
11
|
+
const quality = Number.parseInt(process.env.BROTLI_QUALITY ?? "", 10);
|
|
12
|
+
return quality >= zlib.constants.BROTLI_MIN_QUALITY &&
|
|
13
|
+
quality <= zlib.constants.BROTLI_MAX_QUALITY
|
|
14
|
+
? quality
|
|
15
|
+
: DEFAULT_BROTLI_QUALITY;
|
|
16
|
+
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"access": "public"
|
|
4
4
|
},
|
|
5
5
|
"name": "@opennextjs/aws",
|
|
6
|
-
"version": "4.1.
|
|
6
|
+
"version": "4.1.14",
|
|
7
7
|
"bin": {
|
|
8
8
|
"open-next": "./dist/index.js"
|
|
9
9
|
},
|
|
@@ -56,13 +56,20 @@
|
|
|
56
56
|
"@types/express": "5.0.6",
|
|
57
57
|
"@types/node": "20.17.6",
|
|
58
58
|
"concurrently": "^9.2.4",
|
|
59
|
+
"diff": "^9.0.0",
|
|
59
60
|
"next": "16.4.1",
|
|
60
61
|
"tsc-alias": "^1.9.7",
|
|
61
62
|
"typescript": "5.9.3"
|
|
62
63
|
},
|
|
63
64
|
"peerDependencies": {
|
|
65
|
+
"diff": "^9.0.0",
|
|
64
66
|
"next": ">=15.5.28 <16 || >=16.4.1"
|
|
65
67
|
},
|
|
68
|
+
"peerDependenciesMeta": {
|
|
69
|
+
"diff": {
|
|
70
|
+
"optional": true
|
|
71
|
+
}
|
|
72
|
+
},
|
|
66
73
|
"bugs": {
|
|
67
74
|
"url": "https://github.com/opennextjs/opennextjs-aws/issues"
|
|
68
75
|
},
|