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.
@@ -37036,7 +37036,7 @@ var require_package = __commonJS({
37036
37036
  publishConfig: {
37037
37037
  access: "public"
37038
37038
  },
37039
- version: "0.7.14",
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
  }
@@ -37036,7 +37036,7 @@ var require_package = __commonJS({
37036
37036
  publishConfig: {
37037
37037
  access: "public"
37038
37038
  },
37039
- version: "0.7.14",
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/package.json CHANGED
@@ -85,7 +85,7 @@
85
85
  "publishConfig": {
86
86
  "access": "public"
87
87
  },
88
- "version": "0.7.14",
88
+ "version": "0.7.16",
89
89
  "jest": {
90
90
  "coverageProvider": "v8",
91
91
  "testPathIgnorePatterns": [