@modern-js/server-core 2.63.7 → 2.64.1

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.
@@ -61,6 +61,7 @@ function log(fn, prefix, method, path, status = 0, elapsed) {
61
61
  }
62
62
  function logHandler() {
63
63
  return async function logger(c, next) {
64
+ var _c_env_node_res, _c_env_node, _c_env;
64
65
  const { method } = c.req;
65
66
  const monitors = c.get("monitors");
66
67
  if (!monitors) {
@@ -72,7 +73,8 @@ function logHandler() {
72
73
  log(logFn, "<--", method, path);
73
74
  const start = Date.now();
74
75
  await next();
75
- log(logFn, "-->", method, path, c.res.status, time(start));
76
+ var _c_env_node_res_statusCode;
77
+ log(logFn, "-->", method, path, (_c_env_node_res_statusCode = c === null || c === void 0 ? void 0 : (_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.statusCode) !== null && _c_env_node_res_statusCode !== void 0 ? _c_env_node_res_statusCode : c.res.status, time(start));
76
78
  };
77
79
  }
78
80
  const logPlugin = () => ({
@@ -41,7 +41,7 @@ function log(fn, prefix, method, path) {
41
41
  function logHandler() {
42
42
  return function() {
43
43
  var _logger = _async_to_generator(function(c, next) {
44
- var method, monitors, path, logFn, start;
44
+ var _c_env_node_res, _c_env_node, _c_env, method, monitors, path, logFn, start, _c_env_node_res_statusCode;
45
45
  return _ts_generator(this, function(_state) {
46
46
  switch (_state.label) {
47
47
  case 0:
@@ -72,7 +72,7 @@ function logHandler() {
72
72
  ];
73
73
  case 3:
74
74
  _state.sent();
75
- log(logFn, "-->", method, path, c.res.status, time(start));
75
+ log(logFn, "-->", method, path, (_c_env_node_res_statusCode = c === null || c === void 0 ? void 0 : (_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.statusCode) !== null && _c_env_node_res_statusCode !== void 0 ? _c_env_node_res_statusCode : c.res.status, time(start));
76
76
  return [
77
77
  2
78
78
  ];
@@ -38,6 +38,7 @@ function log(fn, prefix, method, path, status = 0, elapsed) {
38
38
  }
39
39
  function logHandler() {
40
40
  return async function logger(c, next) {
41
+ var _c_env_node_res, _c_env_node, _c_env;
41
42
  const { method } = c.req;
42
43
  const monitors = c.get("monitors");
43
44
  if (!monitors) {
@@ -49,7 +50,8 @@ function logHandler() {
49
50
  log(logFn, "<--", method, path);
50
51
  const start = Date.now();
51
52
  await next();
52
- log(logFn, "-->", method, path, c.res.status, time(start));
53
+ var _c_env_node_res_statusCode;
54
+ log(logFn, "-->", method, path, (_c_env_node_res_statusCode = c === null || c === void 0 ? void 0 : (_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.statusCode) !== null && _c_env_node_res_statusCode !== void 0 ? _c_env_node_res_statusCode : c.res.status, time(start));
53
55
  };
54
56
  }
55
57
  const logPlugin = () => ({
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.63.7",
18
+ "version": "2.64.1",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -53,9 +53,9 @@
53
53
  "flatted": "^3.2.9",
54
54
  "hono": "^3.12.2",
55
55
  "ts-deepmerge": "7.0.2",
56
- "@modern-js/plugin": "2.63.7",
57
- "@modern-js/runtime-utils": "2.63.7",
58
- "@modern-js/utils": "2.63.7"
56
+ "@modern-js/plugin": "2.64.1",
57
+ "@modern-js/runtime-utils": "2.64.1",
58
+ "@modern-js/utils": "2.64.1"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@types/jest": "^29",
@@ -65,9 +65,9 @@
65
65
  "jest": "^29",
66
66
  "ts-jest": "^29.1.0",
67
67
  "typescript": "^5",
68
- "@modern-js/types": "2.63.7",
69
- "@scripts/build": "2.63.7",
70
- "@scripts/jest-config": "2.63.7"
68
+ "@modern-js/types": "2.64.1",
69
+ "@scripts/build": "2.64.1",
70
+ "@scripts/jest-config": "2.64.1"
71
71
  },
72
72
  "sideEffects": false,
73
73
  "publishConfig": {