@modern-js/plugin-express 2.21.1 → 2.22.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.
- package/CHANGELOG.md +27 -0
- package/dist/cjs/cli/index.js +3 -1
- package/dist/cjs/context.js +6 -2
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/plugin.js +4 -2
- package/dist/cjs/registerRoutes.js +3 -1
- package/dist/cjs/runtime/hook.js +3 -1
- package/dist/cjs/runtime/index.js +6 -2
- package/dist/cjs/runtime/operators.js +6 -2
- package/dist/cjs/utils.js +6 -2
- package/dist/esm/plugin.js +1 -1
- package/dist/esm-node/plugin.js +1 -1
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @modern-js/plugin-express
|
|
2
2
|
|
|
3
|
+
## 2.22.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1f02cd2: chore: fix some eslint issues
|
|
8
|
+
|
|
9
|
+
chore: 修复一些 eslint issues
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [25b490a]
|
|
12
|
+
- Updated dependencies [e2848a2]
|
|
13
|
+
- Updated dependencies [d4045ed]
|
|
14
|
+
- @modern-js/types@2.22.1
|
|
15
|
+
- @modern-js/utils@2.22.1
|
|
16
|
+
- @modern-js/bff-core@2.22.1
|
|
17
|
+
- @modern-js/bff-runtime@2.22.1
|
|
18
|
+
|
|
19
|
+
## 2.22.0
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [3d48836]
|
|
24
|
+
- Updated dependencies [5050e8e]
|
|
25
|
+
- @modern-js/utils@2.22.0
|
|
26
|
+
- @modern-js/bff-core@2.22.0
|
|
27
|
+
- @modern-js/bff-runtime@2.22.0
|
|
28
|
+
- @modern-js/types@2.22.0
|
|
29
|
+
|
|
3
30
|
## 2.21.1
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
package/dist/cjs/cli/index.js
CHANGED
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
10
12
|
const _path = /* @__PURE__ */ _interop_require_wildcard._(require("path"));
|
package/dist/cjs/context.js
CHANGED
|
@@ -10,8 +10,12 @@ function _export(target, all) {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
run: ()
|
|
14
|
-
|
|
13
|
+
run: function() {
|
|
14
|
+
return run;
|
|
15
|
+
},
|
|
16
|
+
useContext: function() {
|
|
17
|
+
return useContext;
|
|
18
|
+
}
|
|
15
19
|
});
|
|
16
20
|
const _bffcore = require("@modern-js/bff-core");
|
|
17
21
|
const { run, useContext } = (0, _bffcore.createStorage)();
|
package/dist/cjs/index.js
CHANGED
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
const _export_star = require("@swc/helpers/_/_export_star");
|
|
10
12
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return _default;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
10
12
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
@@ -80,7 +82,7 @@ const _default = () => {
|
|
|
80
82
|
const appModule = await findAppModule(apiDir);
|
|
81
83
|
app = appModule[0];
|
|
82
84
|
const hooks = appModule[1];
|
|
83
|
-
if (!app ||
|
|
85
|
+
if (!(app === null || app === void 0 ? void 0 : app.use)) {
|
|
84
86
|
app = (0, _express.default)();
|
|
85
87
|
}
|
|
86
88
|
initApp(app);
|
package/dist/cjs/runtime/hook.js
CHANGED
|
@@ -10,8 +10,12 @@ function _export(target, all) {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
useContext: ()
|
|
14
|
-
|
|
13
|
+
useContext: function() {
|
|
14
|
+
return _context.useContext;
|
|
15
|
+
},
|
|
16
|
+
hook: function() {
|
|
17
|
+
return _hook.hook;
|
|
18
|
+
}
|
|
15
19
|
});
|
|
16
20
|
const _export_star = require("@swc/helpers/_/_export_star");
|
|
17
21
|
_export_star._(require("@modern-js/bff-core"), exports);
|
|
@@ -10,8 +10,12 @@ function _export(target, all) {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
Pipe: ()
|
|
14
|
-
|
|
13
|
+
Pipe: function() {
|
|
14
|
+
return Pipe;
|
|
15
|
+
},
|
|
16
|
+
Middleware: function() {
|
|
17
|
+
return Middleware;
|
|
18
|
+
}
|
|
15
19
|
});
|
|
16
20
|
const _context = require("../context");
|
|
17
21
|
const Pipe = (func) => {
|
package/dist/cjs/utils.js
CHANGED
|
@@ -10,8 +10,12 @@ function _export(target, all) {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
createRouteHandler: ()
|
|
14
|
-
|
|
13
|
+
createRouteHandler: function() {
|
|
14
|
+
return createRouteHandler;
|
|
15
|
+
},
|
|
16
|
+
isNormalMethod: function() {
|
|
17
|
+
return isNormalMethod;
|
|
18
|
+
}
|
|
15
19
|
});
|
|
16
20
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
17
21
|
require("reflect-metadata");
|
package/dist/esm/plugin.js
CHANGED
package/dist/esm-node/plugin.js
CHANGED
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.22.1",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/cli/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/cli/index.js",
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
"reflect-metadata": "^0.1.13",
|
|
50
50
|
"type-is": "^1.6.18",
|
|
51
51
|
"@swc/helpers": "0.5.1",
|
|
52
|
-
"@modern-js/bff-core": "2.
|
|
53
|
-
"@modern-js/bff-runtime": "2.
|
|
54
|
-
"@modern-js/types": "2.
|
|
55
|
-
"@modern-js/utils": "2.
|
|
52
|
+
"@modern-js/bff-core": "2.22.1",
|
|
53
|
+
"@modern-js/bff-runtime": "2.22.1",
|
|
54
|
+
"@modern-js/types": "2.22.1",
|
|
55
|
+
"@modern-js/utils": "2.22.1"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/cookie-parser": "^1.4.2",
|
|
@@ -68,11 +68,11 @@
|
|
|
68
68
|
"supertest": "^6.1.6",
|
|
69
69
|
"typescript": "^5",
|
|
70
70
|
"zod": "^3.17.3",
|
|
71
|
-
"@modern-js/core": "2.
|
|
72
|
-
"@modern-js/app-tools": "2.
|
|
73
|
-
"@modern-js/server-core": "2.
|
|
74
|
-
"@scripts/
|
|
75
|
-
"@scripts/
|
|
71
|
+
"@modern-js/core": "2.22.1",
|
|
72
|
+
"@modern-js/app-tools": "2.22.1",
|
|
73
|
+
"@modern-js/server-core": "2.22.1",
|
|
74
|
+
"@scripts/build": "2.22.1",
|
|
75
|
+
"@scripts/jest-config": "2.22.1"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"express": "^4.17.1"
|