nitro-nightly 3.0.1-20251118-175529-0316c6c6 → 3.0.1-20251124-125118-888e556d

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.
@@ -10,16 +10,18 @@ export const handler = awslambda.streamifyResponse(async (event, responseStream,
10
10
  statusCode: response.status,
11
11
  ...awsResponseHeaders(response)
12
12
  };
13
- if (response.body) {
14
- const writer = awslambda.HttpResponseStream.from(
15
- // @ts-expect-error TODO: IMPORTANT! It should be a Writable according to the aws-lambda types
16
- responseStream,
17
- httpResponseMetadata
18
- );
19
- const reader = response.body.getReader();
20
- await streamToNodeStream(reader, responseStream);
21
- writer.end();
22
- }
13
+ const body = response.body ?? new ReadableStream({ start(controller) {
14
+ controller.enqueue("");
15
+ controller.close();
16
+ } });
17
+ const writer = awslambda.HttpResponseStream.from(
18
+ // @ts-expect-error TODO: IMPORTANT! It should be a Writable according to the aws-lambda types
19
+ responseStream,
20
+ httpResponseMetadata
21
+ );
22
+ const reader = body.getReader();
23
+ await streamToNodeStream(reader, responseStream);
24
+ writer.end();
23
25
  });
24
26
  async function streamToNodeStream(reader, writer) {
25
27
  let readResult = await reader.read();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nitro-nightly",
3
- "version": "3.0.1-20251118-175529-0316c6c6",
3
+ "version": "3.0.1-20251124-125118-888e556d",
4
4
  "description": "Build and Deploy Universal JavaScript Servers",
5
5
  "homepage": "https://nitro.build",
6
6
  "repository": "nitrojs/nitro",