@modern-js/plugin-koa 2.0.0-beta.7 → 2.0.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.
- package/CHANGELOG.md +19 -0
- package/dist/js/modern/plugin.js +1 -1
- package/dist/js/node/plugin.js +1 -1
- package/dist/js/treeshaking/plugin.js +1 -1
- package/dist/types/utils.d.ts +1 -1
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @modern-js/plugin-koa
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- dda38c9c3e: chore: v2
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [edd1cfb1af]
|
|
12
|
+
- Updated dependencies [6bda14ed71]
|
|
13
|
+
- Updated dependencies [dda38c9c3e]
|
|
14
|
+
- Updated dependencies [8b8e1bb571]
|
|
15
|
+
- Updated dependencies [ffb2ed4]
|
|
16
|
+
- Updated dependencies [bbe4c4ab64]
|
|
17
|
+
- @modern-js/utils@2.0.0
|
|
18
|
+
- @modern-js/types@2.0.0
|
|
19
|
+
- @modern-js/bff-core@2.0.0
|
|
20
|
+
- @modern-js/bff-runtime@2.0.0
|
|
21
|
+
|
|
3
22
|
## 2.0.0-beta.7
|
|
4
23
|
|
|
5
24
|
### Major Changes
|
package/dist/js/modern/plugin.js
CHANGED
|
@@ -96,7 +96,7 @@ var plugin_default = () => ({
|
|
|
96
96
|
prepareWebServer({ config }, next) {
|
|
97
97
|
var _a2;
|
|
98
98
|
const userConfig = api.useConfigContext();
|
|
99
|
-
if ((_a2 = userConfig == null ? void 0 : userConfig.server) == null ? void 0 : _a2.
|
|
99
|
+
if (!((_a2 = userConfig == null ? void 0 : userConfig.server) == null ? void 0 : _a2.enableFrameworkExt)) {
|
|
100
100
|
return next();
|
|
101
101
|
}
|
|
102
102
|
const app = new Koa();
|
package/dist/js/node/plugin.js
CHANGED
|
@@ -124,7 +124,7 @@ var plugin_default = () => ({
|
|
|
124
124
|
prepareWebServer({ config }, next) {
|
|
125
125
|
var _a2;
|
|
126
126
|
const userConfig = api.useConfigContext();
|
|
127
|
-
if ((_a2 = userConfig == null ? void 0 : userConfig.server) == null ? void 0 : _a2.
|
|
127
|
+
if (!((_a2 = userConfig == null ? void 0 : userConfig.server) == null ? void 0 : _a2.enableFrameworkExt)) {
|
|
128
128
|
return next();
|
|
129
129
|
}
|
|
130
130
|
const app = new import_koa.default();
|
|
@@ -310,7 +310,7 @@ var plugin_default = function() {
|
|
|
310
310
|
var config = param.config;
|
|
311
311
|
var ref;
|
|
312
312
|
var userConfig = api.useConfigContext();
|
|
313
|
-
if (userConfig === null || userConfig === void 0 ? void 0 : (ref = userConfig.server) === null || ref === void 0 ? void 0 : ref.
|
|
313
|
+
if (!(userConfig === null || userConfig === void 0 ? void 0 : (ref = userConfig.server) === null || ref === void 0 ? void 0 : ref.enableFrameworkExt)) {
|
|
314
314
|
return next();
|
|
315
315
|
}
|
|
316
316
|
var app = new Koa();
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpMethod, APIHandlerInfo } from '@modern-js/bff-core';
|
|
2
2
|
import { Context } from 'koa';
|
|
3
|
-
|
|
3
|
+
type Handler = APIHandlerInfo['handler'];
|
|
4
4
|
export declare const createRouteHandler: (handler: Handler) => (ctx: Context) => Promise<{
|
|
5
5
|
code: any;
|
|
6
6
|
message: string;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "2.0.0
|
|
14
|
+
"version": "2.0.0",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/cli/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/cli/index.js",
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
"koa-body": "^4.2.0",
|
|
55
55
|
"koa-router": "^10.0.0",
|
|
56
56
|
"type-is": "^1.6.18",
|
|
57
|
-
"@modern-js/bff-
|
|
58
|
-
"@modern-js/
|
|
59
|
-
"@modern-js/
|
|
60
|
-
"@modern-js/
|
|
57
|
+
"@modern-js/bff-core": "2.0.0",
|
|
58
|
+
"@modern-js/bff-runtime": "2.0.0",
|
|
59
|
+
"@modern-js/utils": "2.0.0",
|
|
60
|
+
"@modern-js/types": "2.0.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@types/jest": "^27",
|
|
@@ -71,11 +71,11 @@
|
|
|
71
71
|
"supertest": "^6.1.6",
|
|
72
72
|
"typescript": "^4",
|
|
73
73
|
"zod": "^3.17.3",
|
|
74
|
-
"@modern-js/core": "2.0.0
|
|
75
|
-
"@modern-js/server-core": "2.0.0
|
|
76
|
-
"@modern-js/app-tools": "2.0.0
|
|
77
|
-
"@scripts/
|
|
78
|
-
"@scripts/
|
|
74
|
+
"@modern-js/core": "2.0.0",
|
|
75
|
+
"@modern-js/server-core": "2.0.0",
|
|
76
|
+
"@modern-js/app-tools": "2.0.0",
|
|
77
|
+
"@scripts/build": "2.0.0",
|
|
78
|
+
"@scripts/jest-config": "2.0.0"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"koa": "^2.13.3"
|