nitropack-nightly 2.11.11-20250428-102536.dd3d5d07 → 2.11.12-20250512-220511.5ac63720

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.
@@ -1,4 +1,4 @@
1
- const version = "2.11.11-20250428-102536.dd3d5d07";
1
+ const version = "2.11.12-20250512-220511.5ac63720";
2
2
 
3
3
  const compatibilityChanges = [
4
4
  {
@@ -38,24 +38,28 @@ export const handler = awslambda.streamifyResponse(
38
38
  "Transfer-Encoding": "chunked"
39
39
  }
40
40
  };
41
- if (r.body) {
42
- const writer = awslambda.HttpResponseStream.from(
43
- // @ts-expect-error TODO: IMPORTANT! It should be a Writable according to the aws-lambda types
44
- responseStream,
45
- httpResponseMetadata
46
- );
47
- if (!r.body.getReader) {
48
- writer.write(
49
- r.body
50
- /* TODO */
51
- );
52
- writer.end();
53
- return;
41
+ const body = r.body ?? new ReadableStream({
42
+ start(controller) {
43
+ controller.enqueue("");
44
+ controller.close();
54
45
  }
55
- const reader = r.body.getReader();
56
- await streamToNodeStream(reader, responseStream);
46
+ });
47
+ const writer = awslambda.HttpResponseStream.from(
48
+ // @ts-expect-error TODO: IMPORTANT! It should be a Writable according to the aws-lambda types
49
+ responseStream,
50
+ httpResponseMetadata
51
+ );
52
+ if (!body.getReader) {
53
+ writer.write(
54
+ r.body
55
+ /* TODO */
56
+ );
57
57
  writer.end();
58
+ return;
58
59
  }
60
+ const reader = body.getReader();
61
+ await streamToNodeStream(reader, responseStream);
62
+ writer.end();
59
63
  }
60
64
  );
61
65
  async function streamToNodeStream(reader, writer) {
@@ -154,7 +154,7 @@ export const connectionConfigs = {
154
154
 
155
155
  const PLUGIN_NAME = "dynamic-require";
156
156
  const HELPER_DYNAMIC = `\0${PLUGIN_NAME}.mjs`;
157
- const DYNAMIC_REQUIRE_RE = /import\("\.\/" ?\+(.*)\).then/g;
157
+ const DYNAMIC_REQUIRE_RE = /import\((?:.*\+\s*)?"\.\/" ?\+(.*)\).then/g;
158
158
  function dynamicRequire({ dir, ignore, inline }) {
159
159
  return {
160
160
  name: PLUGIN_NAME,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nitropack-nightly",
3
- "version": "2.11.11-20250428-102536.dd3d5d07",
3
+ "version": "2.11.12-20250512-220511.5ac63720",
4
4
  "description": "Build and Deploy Universal JavaScript Servers",
5
5
  "repository": "nitrojs/nitro",
6
6
  "license": "MIT",