@modern-js/plugin-koa 2.3.0 → 2.4.1-beta.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/README.md +14 -18
- package/dist/js/treeshaking/context.js +1 -1
- package/dist/js/treeshaking/plugin.js +3 -3
- package/dist/js/treeshaking/utils.js +1 -1
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @modern-js/plugin-koa
|
|
2
2
|
|
|
3
|
+
## 2.4.1-beta.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [11c053b]
|
|
8
|
+
- @modern-js/utils@2.4.1-beta.0
|
|
9
|
+
- @modern-js/bff-core@2.4.1-beta.0
|
|
10
|
+
|
|
11
|
+
## 2.4.0
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [98a2733]
|
|
16
|
+
- Updated dependencies [8c2db5f]
|
|
17
|
+
- @modern-js/utils@2.4.0
|
|
18
|
+
- @modern-js/bff-core@2.4.0
|
|
19
|
+
- @modern-js/bff-runtime@2.4.0
|
|
20
|
+
- @modern-js/types@2.4.0
|
|
21
|
+
|
|
3
22
|
## 2.3.0
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,30 +1,26 @@
|
|
|
1
|
-
|
|
2
1
|
<p align="center">
|
|
3
2
|
<a href="https://modernjs.dev" target="blank"><img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png" width="300" alt="Modern.js Logo" /></a>
|
|
4
3
|
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">Modern.js</h1>
|
|
6
|
+
|
|
5
7
|
<p align="center">
|
|
6
|
-
|
|
7
|
-
<br/>
|
|
8
|
-
<a href="https://modernjs.dev" target="blank">
|
|
9
|
-
modernjs.dev
|
|
10
|
-
</a>
|
|
11
|
-
</p>
|
|
12
|
-
<p align="center">
|
|
13
|
-
The meta-framework suite designed from scratch for frontend-focused modern web development
|
|
8
|
+
A Progressive React Framework for modern web development.
|
|
14
9
|
</p>
|
|
15
10
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
> The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.
|
|
11
|
+
## Getting Started
|
|
19
12
|
|
|
20
|
-
|
|
13
|
+
Please follow [Quick Start](https://modernjs.dev/en/guides/get-started/quick-start) to get started with Modern.js.
|
|
21
14
|
|
|
22
|
-
##
|
|
15
|
+
## Documentation
|
|
23
16
|
|
|
24
|
-
- [
|
|
25
|
-
- [
|
|
26
|
-
- [API References](https://modernjs.dev/docs/apis)
|
|
17
|
+
- [English Documentation](https://modernjs.dev/en/)
|
|
18
|
+
- [中文文档](https://modernjs.dev)
|
|
27
19
|
|
|
28
20
|
## Contributing
|
|
29
21
|
|
|
30
|
-
|
|
22
|
+
Please read the [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md).
|
|
23
|
+
|
|
24
|
+
## License
|
|
25
|
+
|
|
26
|
+
Modern.js is [MIT licensed](https://github.com/modern-js-dev/modern.js/blob/main/LICENSE).
|
|
@@ -308,9 +308,9 @@ var plugin_default = function() {
|
|
|
308
308
|
},
|
|
309
309
|
prepareWebServer: function prepareWebServer(param, next) {
|
|
310
310
|
var config = param.config;
|
|
311
|
-
var
|
|
311
|
+
var _userConfig_server;
|
|
312
312
|
var userConfig = api.useConfigContext();
|
|
313
|
-
if (!(userConfig === null || userConfig === void 0 ? void 0 : (
|
|
313
|
+
if (!(userConfig === null || userConfig === void 0 ? void 0 : (_userConfig_server = userConfig.server) === null || _userConfig_server === void 0 ? void 0 : _userConfig_server.enableFrameworkExt)) {
|
|
314
314
|
return next();
|
|
315
315
|
}
|
|
316
316
|
var app = new Koa();
|
|
@@ -347,7 +347,7 @@ var plugin_default = function() {
|
|
|
347
347
|
initMiddlewares(middleware, app);
|
|
348
348
|
}
|
|
349
349
|
return function(ctx) {
|
|
350
|
-
var
|
|
350
|
+
var _ctx_source = ctx.source, req = _ctx_source.req, res = _ctx_source.res;
|
|
351
351
|
app.on("error", function(err) {
|
|
352
352
|
if (err) {
|
|
353
353
|
throw err;
|
|
@@ -204,7 +204,7 @@ var handleResponseMeta = function(ctx, handler) {
|
|
|
204
204
|
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
205
205
|
try {
|
|
206
206
|
for(var _iterator1 = Object.entries(metaValue)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
207
|
-
var
|
|
207
|
+
var _step_value = _slicedToArray(_step1.value, 2), key = _step_value[0], value = _step_value[1];
|
|
208
208
|
if (typeof value === "string") {
|
|
209
209
|
ctx.append(key, value);
|
|
210
210
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modern-js/plugin-koa",
|
|
3
|
-
"description": "
|
|
3
|
+
"description": "A Progressive React Framework for modern web development.",
|
|
4
4
|
"homepage": "https://modernjs.dev",
|
|
5
5
|
"bugs": "https://github.com/modern-js-dev/modern.js/issues",
|
|
6
6
|
"repository": "modern-js-dev/modern.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "2.
|
|
14
|
+
"version": "2.4.1-beta.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/
|
|
58
|
-
"@modern-js/utils": "2.
|
|
59
|
-
"@modern-js/bff-
|
|
60
|
-
"@modern-js/
|
|
57
|
+
"@modern-js/bff-core": "2.4.1-beta.0",
|
|
58
|
+
"@modern-js/utils": "2.4.1-beta.0",
|
|
59
|
+
"@modern-js/bff-runtime": "2.4.0",
|
|
60
|
+
"@modern-js/types": "2.4.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.
|
|
75
|
-
"@modern-js/server-core": "2.
|
|
76
|
-
"@modern-js/app-tools": "
|
|
77
|
-
"@scripts/jest-config": "2.
|
|
78
|
-
"@scripts/build": "2.
|
|
74
|
+
"@modern-js/core": "2.4.1-beta.0",
|
|
75
|
+
"@modern-js/server-core": "2.4.1-beta.0",
|
|
76
|
+
"@modern-js/app-tools": "3.0.0-beta.0",
|
|
77
|
+
"@scripts/jest-config": "2.4.0",
|
|
78
|
+
"@scripts/build": "2.4.0"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
81
|
"koa": "^2.13.3"
|