@modern-js/server-core 2.52.0 → 2.53.0

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.
@@ -30,6 +30,9 @@ const httpCallBack2HonoMid = (handler) => {
30
30
  req.__serverManifest = context.get("serverManifest") || {};
31
31
  await handler(req, res);
32
32
  await new Promise((resolve) => setTimeout(resolve, 0));
33
+ delete req.__honoRequest;
34
+ delete req.__templates;
35
+ delete req.__serverManifest;
33
36
  if (res.headersSent) {
34
37
  context.finalized = true;
35
38
  } else {
@@ -33,8 +33,8 @@ const AGGRED_DIR = {
33
33
  };
34
34
  const REPLACE_REG = {
35
35
  before: {
36
- head: "<head[^>]*>",
37
- body: "<body[^>]*>"
36
+ head: "<head\\b[^>]*>",
37
+ body: "<body\\b[^>]*>"
38
38
  },
39
39
  after: {
40
40
  head: "</head>",
@@ -25,6 +25,9 @@ var httpCallBack2HonoMid = function(handler) {
25
25
  ];
26
26
  case 2:
27
27
  _state.sent();
28
+ delete req.__honoRequest;
29
+ delete req.__templates;
30
+ delete req.__serverManifest;
28
31
  if (!res.headersSent)
29
32
  return [
30
33
  3,
@@ -7,8 +7,8 @@ var AGGRED_DIR = {
7
7
  };
8
8
  var REPLACE_REG = {
9
9
  before: {
10
- head: "<head[^>]*>",
11
- body: "<body[^>]*>"
10
+ head: "<head\\b[^>]*>",
11
+ body: "<body\\b[^>]*>"
12
12
  },
13
13
  after: {
14
14
  head: "</head>",
@@ -6,6 +6,9 @@ const httpCallBack2HonoMid = (handler) => {
6
6
  req.__serverManifest = context.get("serverManifest") || {};
7
7
  await handler(req, res);
8
8
  await new Promise((resolve) => setTimeout(resolve, 0));
9
+ delete req.__honoRequest;
10
+ delete req.__templates;
11
+ delete req.__serverManifest;
9
12
  if (res.headersSent) {
10
13
  context.finalized = true;
11
14
  } else {
@@ -7,8 +7,8 @@ const AGGRED_DIR = {
7
7
  };
8
8
  const REPLACE_REG = {
9
9
  before: {
10
- head: "<head[^>]*>",
11
- body: "<body[^>]*>"
10
+ head: "<head\\b[^>]*>",
11
+ body: "<body\\b[^>]*>"
12
12
  },
13
13
  after: {
14
14
  head: "</head>",
@@ -3,9 +3,9 @@ import { Context, HonoRequest, ServerEnv, Middleware, Next, ServerManifest } fro
3
3
  type NodeBindings = {
4
4
  node: {
5
5
  req: NodeRequest & {
6
- __honoRequest: HonoRequest;
7
- __templates: Record<string, string>;
8
- __serverManifest: ServerManifest;
6
+ __honoRequest?: HonoRequest;
7
+ __templates?: Record<string, string>;
8
+ __serverManifest?: ServerManifest;
9
9
  };
10
10
  res: NodeResponse;
11
11
  };
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.52.0",
18
+ "version": "2.53.0",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -69,9 +69,9 @@
69
69
  "hono": "^3.12.2",
70
70
  "isbot": "3.8.0",
71
71
  "merge-deep": "^3.0.3",
72
- "@modern-js/plugin": "2.52.0",
73
- "@modern-js/runtime-utils": "2.52.0",
74
- "@modern-js/utils": "2.52.0"
72
+ "@modern-js/plugin": "2.53.0",
73
+ "@modern-js/runtime-utils": "2.53.0",
74
+ "@modern-js/utils": "2.53.0"
75
75
  },
76
76
  "devDependencies": {
77
77
  "@types/jest": "^29",
@@ -81,9 +81,9 @@
81
81
  "jest": "^29",
82
82
  "ts-jest": "^29.1.0",
83
83
  "typescript": "^5",
84
- "@scripts/build": "2.52.0",
85
- "@modern-js/types": "2.52.0",
86
- "@scripts/jest-config": "2.52.0"
84
+ "@scripts/build": "2.53.0",
85
+ "@modern-js/types": "2.53.0",
86
+ "@scripts/jest-config": "2.53.0"
87
87
  },
88
88
  "sideEffects": false,
89
89
  "publishConfig": {