@modern-js/plugin-express 2.58.3 → 2.60.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.
Files changed (2) hide show
  1. package/dist/esm/utils.js +3 -2
  2. package/package.json +11 -11
package/dist/esm/utils.js CHANGED
@@ -3,6 +3,7 @@ import { _ as _instanceof } from "@swc/helpers/_/_instanceof";
3
3
  import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
4
4
  import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
5
5
  import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
6
+ import { _ as _type_of } from "@swc/helpers/_/_type_of";
6
7
  import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
7
8
  import "reflect-metadata";
8
9
  import { HttpMetadata, ResponseMetaType, ValidationError, httpMethods, isInputParamsDeciderHandler, isWithMetaHandler } from "@modern-js/bff-core";
@@ -105,7 +106,7 @@ var createRouteHandler = function(handler) {
105
106
  ];
106
107
  case 3:
107
108
  result = _state.sent();
108
- if (result && typeof result === "object") {
109
+ if (result && (typeof result === "undefined" ? "undefined" : _type_of(result)) === "object") {
109
110
  return [
110
111
  2,
111
112
  res.json(result)
@@ -187,7 +188,7 @@ var createRouteHandler = function(handler) {
187
188
  case 10:
188
189
  body = _state.sent();
189
190
  if (typeof body !== "undefined") {
190
- if (typeof body === "object") {
191
+ if ((typeof body === "undefined" ? "undefined" : _type_of(body)) === "object") {
191
192
  return [
192
193
  2,
193
194
  res.json(body)
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.58.3",
18
+ "version": "2.60.0",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/cli/index.d.ts",
21
21
  "main": "./dist/cjs/cli/index.js",
@@ -45,17 +45,17 @@
45
45
  }
46
46
  },
47
47
  "dependencies": {
48
- "@swc/helpers": "0.5.3",
48
+ "@swc/helpers": "0.5.13",
49
49
  "cookie-parser": "^1.4.5",
50
50
  "finalhandler": "^1.1.2",
51
51
  "formidable": "^1.2.2",
52
52
  "reflect-metadata": "^0.1.13",
53
53
  "type-is": "^1.6.18",
54
- "@modern-js/bff-core": "2.58.3",
55
- "@modern-js/server-core": "2.58.3",
56
- "@modern-js/bff-runtime": "2.58.3",
57
- "@modern-js/types": "2.58.3",
58
- "@modern-js/utils": "2.58.3"
54
+ "@modern-js/bff-core": "2.60.0",
55
+ "@modern-js/bff-runtime": "2.60.0",
56
+ "@modern-js/server-core": "2.60.0",
57
+ "@modern-js/types": "2.60.0",
58
+ "@modern-js/utils": "2.60.0"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@types/cookie-parser": "^1.4.2",
@@ -71,10 +71,10 @@
71
71
  "supertest": "^6.1.6",
72
72
  "typescript": "^5",
73
73
  "zod": "^3.22.3",
74
- "@modern-js/app-tools": "2.58.3",
75
- "@modern-js/core": "2.58.3",
76
- "@scripts/jest-config": "2.58.3",
77
- "@scripts/build": "2.58.3"
74
+ "@modern-js/app-tools": "2.60.0",
75
+ "@modern-js/core": "2.60.0",
76
+ "@scripts/build": "2.60.0",
77
+ "@scripts/jest-config": "2.60.0"
78
78
  },
79
79
  "peerDependencies": {
80
80
  "express": "^4.17.1"