@modern-js/server-core 2.50.0 → 2.51.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.
|
@@ -105,7 +105,7 @@ class CustomServer {
|
|
|
105
105
|
return getUnstableMiddlewares(serverMiddleware);
|
|
106
106
|
}
|
|
107
107
|
return async (c, next) => {
|
|
108
|
-
var _c_env;
|
|
108
|
+
var _c_env_node_res, _c_env_node, _c_env;
|
|
109
109
|
const reporter = c.get("reporter");
|
|
110
110
|
const locals = {};
|
|
111
111
|
const resArgs = {
|
|
@@ -120,7 +120,7 @@ class CustomServer {
|
|
|
120
120
|
if (isRedirect(resArgs.headers, resArgs.status)) {
|
|
121
121
|
return c.redirect(resArgs.headers.get("Location") || "", resArgs.status || 302);
|
|
122
122
|
}
|
|
123
|
-
if ((_c_env = c.env) === null || _c_env === void 0 ? void 0 : _c_env.node.res.headersSent) {
|
|
123
|
+
if ((_c_env = c.env) === null || _c_env === void 0 ? void 0 : (_c_env_node = _c_env.node) === null || _c_env_node === void 0 ? void 0 : (_c_env_node_res = _c_env_node.res) === null || _c_env_node_res === void 0 ? void 0 : _c_env_node_res.headersSent) {
|
|
124
124
|
return void 0;
|
|
125
125
|
}
|
|
126
126
|
if (!c.finalized) {
|
|
@@ -187,7 +187,7 @@ var CustomServer = /* @__PURE__ */ function() {
|
|
|
187
187
|
2,
|
|
188
188
|
function() {
|
|
189
189
|
var _ref = _async_to_generator(function(c, next) {
|
|
190
|
-
var _c_env, reporter, locals, resArgs, customMiddlewareCtx, getCost, cost;
|
|
190
|
+
var _c_env_node_res, _c_env_node, _c_env, reporter, locals, resArgs, customMiddlewareCtx, getCost, cost;
|
|
191
191
|
return _ts_generator(this, function(_state2) {
|
|
192
192
|
switch (_state2.label) {
|
|
193
193
|
case 0:
|
|
@@ -213,7 +213,7 @@ var CustomServer = /* @__PURE__ */ function() {
|
|
|
213
213
|
c.redirect(resArgs.headers.get("Location") || "", resArgs.status || 302)
|
|
214
214
|
];
|
|
215
215
|
}
|
|
216
|
-
if ((_c_env = c.env) === null || _c_env === void 0 ? void 0 : _c_env.node.res.headersSent) {
|
|
216
|
+
if ((_c_env = c.env) === null || _c_env === void 0 ? void 0 : (_c_env_node = _c_env.node) === null || _c_env_node === void 0 ? void 0 : (_c_env_node_res = _c_env_node.res) === null || _c_env_node_res === void 0 ? void 0 : _c_env_node_res.headersSent) {
|
|
217
217
|
return [
|
|
218
218
|
2,
|
|
219
219
|
void 0
|
|
@@ -81,7 +81,7 @@ class CustomServer {
|
|
|
81
81
|
return getUnstableMiddlewares(serverMiddleware);
|
|
82
82
|
}
|
|
83
83
|
return async (c, next) => {
|
|
84
|
-
var _c_env;
|
|
84
|
+
var _c_env_node_res, _c_env_node, _c_env;
|
|
85
85
|
const reporter = c.get("reporter");
|
|
86
86
|
const locals = {};
|
|
87
87
|
const resArgs = {
|
|
@@ -96,7 +96,7 @@ class CustomServer {
|
|
|
96
96
|
if (isRedirect(resArgs.headers, resArgs.status)) {
|
|
97
97
|
return c.redirect(resArgs.headers.get("Location") || "", resArgs.status || 302);
|
|
98
98
|
}
|
|
99
|
-
if ((_c_env = c.env) === null || _c_env === void 0 ? void 0 : _c_env.node.res.headersSent) {
|
|
99
|
+
if ((_c_env = c.env) === null || _c_env === void 0 ? void 0 : (_c_env_node = _c_env.node) === null || _c_env_node === void 0 ? void 0 : (_c_env_node_res = _c_env_node.res) === null || _c_env_node_res === void 0 ? void 0 : _c_env_node_res.headersSent) {
|
|
100
100
|
return void 0;
|
|
101
101
|
}
|
|
102
102
|
if (!c.finalized) {
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.51.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/
|
|
73
|
-
"@modern-js/
|
|
74
|
-
"@modern-js/utils": "2.
|
|
72
|
+
"@modern-js/plugin": "2.51.0",
|
|
73
|
+
"@modern-js/runtime-utils": "2.51.0",
|
|
74
|
+
"@modern-js/utils": "2.51.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
|
-
"@modern-js/types": "2.
|
|
85
|
-
"@scripts/build": "2.
|
|
86
|
-
"@scripts/jest-config": "2.
|
|
84
|
+
"@modern-js/types": "2.51.0",
|
|
85
|
+
"@scripts/build": "2.51.0",
|
|
86
|
+
"@scripts/jest-config": "2.51.0"
|
|
87
87
|
},
|
|
88
88
|
"sideEffects": false,
|
|
89
89
|
"publishConfig": {
|