zenweb 3.15.0 → 3.15.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 CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.15.1] - 2023-3-23
4
+ - 更新: @zenweb/body@3.6.1 错误的使用了 node16 的包导入规则,导致低于 16 版本的 node 无法使用
5
+ - 更新说明文档
6
+
3
7
  ## [3.15.0] - 2023-3-21
4
8
  - 更新: @zenweb/messagecode: ^3.4.0
5
9
  - number 类型支持,如果为 number 则直接获取不进行递归查找
package/README.md CHANGED
@@ -3,7 +3,46 @@
3
3
  本框架全部由 typescript 编写
4
4
 
5
5
  ## 文档
6
- [ZenWeb 文档](https://zenweb.node.ltd)
6
+ [ZenWeb 文档](https://zenweb.vercel.app)
7
+
8
+ ## 演示
9
+
10
+ index.ts
11
+ ```ts
12
+ import { create } from 'zenweb';
13
+ create().start();
14
+ ```
15
+
16
+ service/hello.ts
17
+ ```ts
18
+ import { inject } from 'zenweb';
19
+
20
+ export class HelloService {
21
+ @inject ctx: Context;
22
+
23
+ getIp() {
24
+ return this.ctx.ip;
25
+ }
26
+ }
27
+ ```
28
+
29
+ controller/hello.ts
30
+ ```ts
31
+ import { mapping } from 'zenweb';
32
+ import { HelloService } from '../service/hello';
33
+
34
+ export class HelloController {
35
+ @mapping()
36
+ index(service: HelloService) {
37
+ const ip = service.getIp();
38
+ return `Hello ZenWeb! ${ip}`;
39
+ }
40
+ }
41
+ ```
42
+
43
+ ```bash
44
+ ts-node index
45
+ ```
7
46
 
8
47
  ## 内置模块
9
48
  - [meta](https://www.npmjs.com/package/@zenweb/meta) 运行基本信息,例如:请求耗时
@@ -31,7 +70,3 @@
31
70
  - [grid](https://www.npmjs.com/package/@zenweb/grid) 统一表格(多用于后台)
32
71
  - [upload](https://www.npmjs.com/package/@zenweb/upload) 文件上传支持
33
72
  - [xmlBody](https://www.npmjs.com/package/@zenweb/xml-body) XML Body 解析
34
-
35
-
36
- ## 废弃模块
37
- - [service](https://www.npmjs.com/package/@zenweb/service) 废弃,已被 3.0 注入技术替代
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zenweb",
3
- "version": "3.15.0",
3
+ "version": "3.15.1",
4
4
  "description": "Modular lightweight web framework based on Koa",
5
5
  "main": "dist/index.js",
6
6
  "typings": "./dist/index.d.ts",
@@ -32,7 +32,7 @@
32
32
  "url": "https://github.com/yefei/zenweb/issues"
33
33
  },
34
34
  "dependencies": {
35
- "@zenweb/body": "^3.6.0",
35
+ "@zenweb/body": "^3.6.1",
36
36
  "@zenweb/controller": "^3.10.0",
37
37
  "@zenweb/core": "^3.5.1",
38
38
  "@zenweb/helper": "^3.4.0",