cdk-nextjs 0.7.14 → 0.7.16
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/.jsii +2 -2
- package/docs/nextjs-private-apis.md +1 -1
- package/lib/adapter/adapter.mjs +1 -1
- package/lib/nextjs-api.js +1 -1
- package/lib/nextjs-build/nextjs-build.js +1 -1
- package/lib/nextjs-cache.js +1 -1
- package/lib/nextjs-compute/nextjs-containers.js +1 -1
- package/lib/nextjs-compute/nextjs-functions.js +1 -1
- package/lib/nextjs-distribution.js +1 -1
- package/lib/nextjs-post-deploy.js +1 -1
- package/lib/nextjs-static-assets.js +1 -1
- package/lib/root-constructs/nextjs-base-construct.js +1 -1
- package/lib/root-constructs/nextjs-global-containers.js +1 -1
- package/lib/root-constructs/nextjs-global-functions.js +1 -1
- package/lib/root-constructs/nextjs-regional-containers.js +1 -1
- package/lib/root-constructs/nextjs-regional-functions.js +1 -1
- package/lib/runtime/core.js +6 -6
- package/lib/runtime/http/response.d.ts +6 -6
- package/lib/runtime/http/response.js +7 -7
- package/lib/runtime/http/response.test.js +11 -1
- package/lib/runtime/http/sink.js +10 -6
- package/lib/runtime/http/sink.test.js +46 -13
- package/lib/runtime/lambda.mjs +9 -10
- package/lib/runtime/server.mjs +9 -10
- package/package.json +1 -1
package/lib/runtime/lambda.mjs
CHANGED
|
@@ -37036,7 +37036,7 @@ var require_package = __commonJS({
|
|
|
37036
37036
|
publishConfig: {
|
|
37037
37037
|
access: "public"
|
|
37038
37038
|
},
|
|
37039
|
-
version: "0.7.
|
|
37039
|
+
version: "0.7.16",
|
|
37040
37040
|
packageManager: "pnpm@10.32.1",
|
|
37041
37041
|
jest: {
|
|
37042
37042
|
coverageProvider: "v8",
|
|
@@ -38009,12 +38009,6 @@ var ShimServerResponse = class extends Transform {
|
|
|
38009
38009
|
useChunkedEncodingByDefault = false;
|
|
38010
38010
|
/** Set by Next.js in a few places; never read by us. */
|
|
38011
38011
|
req;
|
|
38012
|
-
/**
|
|
38013
|
-
* Installed by the runtime core when it inserts gzip, so that Next.js's
|
|
38014
|
-
* per-chunk `if ("flush" in res) res.flush()` actually reaches the
|
|
38015
|
-
* compressor. Without it, streamed HTML sits in zlib's buffer.
|
|
38016
|
-
*/
|
|
38017
|
-
flush;
|
|
38018
38012
|
/** Lowercased name → original casing + value, mirroring Node's own store. */
|
|
38019
38013
|
headerStore = /* @__PURE__ */ new Map();
|
|
38020
38014
|
constructor() {
|
|
@@ -38141,6 +38135,13 @@ var ShimServerResponse = class extends Transform {
|
|
|
38141
38135
|
this.flushHeaders();
|
|
38142
38136
|
callback();
|
|
38143
38137
|
}
|
|
38138
|
+
/**
|
|
38139
|
+
* What the `compression` middleware adds under `next start`, kept for app
|
|
38140
|
+
* code that calls it, such as `res.write(event); res.flush()` in a Pages API
|
|
38141
|
+
* route. A no-op: the sink's gzip stage already sync-flushes every chunk.
|
|
38142
|
+
*/
|
|
38143
|
+
flush() {
|
|
38144
|
+
}
|
|
38144
38145
|
// --- the rest of the ServerResponse surface -------------------------------
|
|
38145
38146
|
addTrailers() {
|
|
38146
38147
|
return unsupported("addTrailers");
|
|
@@ -38186,8 +38187,7 @@ function pipeToSink(req, res, sink, options) {
|
|
|
38186
38187
|
const stages = [];
|
|
38187
38188
|
const gzip = shouldGzip(req, res, head, options);
|
|
38188
38189
|
if (gzip) {
|
|
38189
|
-
const compressor = createGzip();
|
|
38190
|
-
res.flush = () => compressor.flush(constants.Z_SYNC_FLUSH);
|
|
38190
|
+
const compressor = createGzip({ flush: constants.Z_SYNC_FLUSH });
|
|
38191
38191
|
stages.push(compressor);
|
|
38192
38192
|
}
|
|
38193
38193
|
if (sink.padEmptyBody) {
|
|
@@ -39821,7 +39821,6 @@ async function sendWebResponse(res, response) {
|
|
|
39821
39821
|
return;
|
|
39822
39822
|
}
|
|
39823
39823
|
const accepted = res.write(chunk);
|
|
39824
|
-
res.flush?.();
|
|
39825
39824
|
if (!accepted && !await drained(res)) {
|
|
39826
39825
|
return;
|
|
39827
39826
|
}
|
package/lib/runtime/server.mjs
CHANGED
|
@@ -37036,7 +37036,7 @@ var require_package = __commonJS({
|
|
|
37036
37036
|
publishConfig: {
|
|
37037
37037
|
access: "public"
|
|
37038
37038
|
},
|
|
37039
|
-
version: "0.7.
|
|
37039
|
+
version: "0.7.16",
|
|
37040
37040
|
packageManager: "pnpm@10.32.1",
|
|
37041
37041
|
jest: {
|
|
37042
37042
|
coverageProvider: "v8",
|
|
@@ -38009,12 +38009,6 @@ var ShimServerResponse = class extends Transform {
|
|
|
38009
38009
|
useChunkedEncodingByDefault = false;
|
|
38010
38010
|
/** Set by Next.js in a few places; never read by us. */
|
|
38011
38011
|
req;
|
|
38012
|
-
/**
|
|
38013
|
-
* Installed by the runtime core when it inserts gzip, so that Next.js's
|
|
38014
|
-
* per-chunk `if ("flush" in res) res.flush()` actually reaches the
|
|
38015
|
-
* compressor. Without it, streamed HTML sits in zlib's buffer.
|
|
38016
|
-
*/
|
|
38017
|
-
flush;
|
|
38018
38012
|
/** Lowercased name → original casing + value, mirroring Node's own store. */
|
|
38019
38013
|
headerStore = /* @__PURE__ */ new Map();
|
|
38020
38014
|
constructor() {
|
|
@@ -38141,6 +38135,13 @@ var ShimServerResponse = class extends Transform {
|
|
|
38141
38135
|
this.flushHeaders();
|
|
38142
38136
|
callback();
|
|
38143
38137
|
}
|
|
38138
|
+
/**
|
|
38139
|
+
* What the `compression` middleware adds under `next start`, kept for app
|
|
38140
|
+
* code that calls it, such as `res.write(event); res.flush()` in a Pages API
|
|
38141
|
+
* route. A no-op: the sink's gzip stage already sync-flushes every chunk.
|
|
38142
|
+
*/
|
|
38143
|
+
flush() {
|
|
38144
|
+
}
|
|
38144
38145
|
// --- the rest of the ServerResponse surface -------------------------------
|
|
38145
38146
|
addTrailers() {
|
|
38146
38147
|
return unsupported("addTrailers");
|
|
@@ -38186,8 +38187,7 @@ function pipeToSink(req, res, sink, options) {
|
|
|
38186
38187
|
const stages = [];
|
|
38187
38188
|
const gzip = shouldGzip(req, res, head, options);
|
|
38188
38189
|
if (gzip) {
|
|
38189
|
-
const compressor = createGzip();
|
|
38190
|
-
res.flush = () => compressor.flush(constants.Z_SYNC_FLUSH);
|
|
38190
|
+
const compressor = createGzip({ flush: constants.Z_SYNC_FLUSH });
|
|
38191
38191
|
stages.push(compressor);
|
|
38192
38192
|
}
|
|
38193
38193
|
if (sink.padEmptyBody) {
|
|
@@ -39821,7 +39821,6 @@ async function sendWebResponse(res, response) {
|
|
|
39821
39821
|
return;
|
|
39822
39822
|
}
|
|
39823
39823
|
const accepted = res.write(chunk);
|
|
39824
|
-
res.flush?.();
|
|
39825
39824
|
if (!accepted && !await drained(res)) {
|
|
39826
39825
|
return;
|
|
39827
39826
|
}
|