zenweb 3.21.3 → 3.23.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 CHANGED
@@ -1,176 +1,184 @@
1
- # Changelog
2
-
3
- ## [3.21.3] - 2023-4-9
4
- - update: typecasts@3.0.5
5
-
6
- ## [3.21.2] - 2023-4-9
7
- - update: typecasts@3.0.4
8
-
9
- ## [3.21.1] - 2023-4-9
10
- - update: typecasts@3.0.3
11
-
12
- ## [3.21.0] - 2023-4-8
13
- - 更新: @zenweb/helper: ^3.8.0 增加 TypeCastHelper.page 方法
14
- - 更新: @zenweb/body: ^3.8.0 增加 BodyHelper.page 方法
15
-
16
- ## [3.20.0] - 2023-4-7
17
- - 更新: @zenweb/helper: ^3.7.0
18
- - 更新: @zenweb/inject: ^3.19.0
19
-
20
- ## [3.19.1] - 2023-4-1
21
- - 更新: @zenweb/helper: ^3.6.1
22
-
23
- ## [3.19.0] - 2023-4-1
24
- - 更新: typecasts: 3.0.0
25
- - 更新: @zenweb/body: ^3.7.0
26
- - 更新: @zenweb/helper: ^3.6.0
27
- ```ts
28
- export class DemoController {
29
- @mapping({ method: 'POST' })
30
- typecast(body: BodyHelper) {
31
- return body.get({
32
- kw: 'trim',
33
- news: {
34
- // 嵌套对象 news
35
- // 嵌套用法与 get({}) 用法一致,可以无限嵌套
36
- type: 'object',
37
- pick: {
38
- id: '!int',
39
- title: '!string',
40
- }
41
- }
42
- });
43
- }
44
- }
45
- ```
46
-
47
- ## [3.18.1] - 2023-4-1
48
- - 更新: typecasts: 2.8.0
49
- - 更新: @zenweb/body: ^3.6.2
50
- - 更新: @zenweb/helper: ^3.5.2
51
-
52
- ## [3.18.0] - 2023-3-30
53
- - 更新: @zenweb/result: ^3.2.1
54
- - 支持自定义结果渲染器
55
- - 支持 return 结果自动设置到 ctx.success 中
56
- - 更新: @zenweb/controller: ^3.13.0
57
- - 不再主动调用 ctx.success 方法,使用新的 @zenweb/result 来管理结果
58
- - 新增 ControllerRegister 管理控制器注册
59
-
60
- ## [3.17.1] - 2023-3-29
61
- - 更新: @zenweb/helper@3.5.1
62
-
63
- ## [3.17.0] - 2023-3-29
64
- - 更新: @zenweb/controller 新增 Core.controllerRegister
65
-
66
- ## [3.16.0] - 2023-3-28
67
- - 更新: @zenweb/helper@3.5.0 对象嵌套
68
- ```ts
69
- export class DemoController {
70
- @mapping({ method: 'POST' })
71
- typecast(body: BodyHelper) {
72
- return body.get({
73
- kw: 'trim',
74
- news: {
75
- // 嵌套对象 news
76
- // 嵌套用法与 get({}) 用法一致,可以无限嵌套
77
- type: {
78
- id: '!int',
79
- title: '!string',
80
- }
81
- }
82
- });
83
- }
84
- }
85
- ```
86
-
87
- 提交数据:
88
- ```json
89
- {
90
- "kw": "keyword",
91
- "news": {
92
- "id": "1234",
93
- "title": "news title"
94
- }
95
- }
96
- ```
97
-
98
- ## [3.15.3] - 2023-3-27
99
- - 新增 tsconfig-app.json, tsconfig-module.json 文件
100
-
101
- ## [3.15.2] - 2023-3-27
102
- - 新增 tsconfig-base.json 文件
103
-
104
- ## [3.15.1] - 2023-3-23
105
- - 更新: @zenweb/body@3.6.1 错误的使用了 node16 的包导入规则,导致低于 16 版本的 node 无法使用
106
- - 更新说明文档
107
-
108
- ## [3.15.0] - 2023-3-21
109
- - 更新: @zenweb/messagecode: ^3.4.0
110
- - number 类型支持,如果为 number 则直接获取不进行递归查找
111
- - 可以格式化不在配置项中的字符串
112
- - 增加 has 方法用于判断配置项是否存在
113
- - 更新: @zenweb/result: ^3.1.0
114
- - 使用 messagecode 统一处理错误代码消息
115
- - 更新: @zenweb/helper: ^3.4.0
116
- - 使用新的 result.fail 简化错误输出代码
117
- - 去除配置项中的 requiredErrorCode 和 validateErrorCode
118
- - 增加全局配置 page 选项
119
- - 更新: @zenweb/controller: ^3.10.0
120
- - discoverPaths 支持使用 "./" 开头的相对路径
121
- - 增加 debug 信息
122
-
123
- ## [3.14.0] - 2023-3-19
124
- - 更新: @zenweb/body: ^3.6.0
125
-
126
- ## [3.13.1] - 2023-3-18
127
- - 导出: RawBody, TextBody
128
-
129
- ## [3.13.0] - 2023-3-17
130
- - 更新: @zenweb/body: ^3.5.0
131
- - 重构数据流读取, 新增 RawBody 和 TextBody,可扩展的解析器
132
-
133
- ## [3.12.2] - 2023-3-15
134
- - 更新:@zenweb/body: ^3.2.2 xml 类型
135
-
136
- ## 3.12.1
137
- - 导出: ParamHelper
138
-
139
- ## 3.12.0
140
- - 更新: @zenweb/body: ^3.2.0 ObjectBody
141
-
142
- ## 3.11.1
143
- > null 大检查! 所有项目强制开启 TS strict 模式,不再忽略 null 检查
144
- - 更新:
145
- - @zenweb/body: ^3.1.1
146
- - @zenweb/controller: ^3.9.1
147
- - @zenweb/core: ^3.5.1
148
- - @zenweb/helper: ^3.3.1
149
- - @zenweb/log: ^3.2.1
150
- - @zenweb/messagecode: ^3.2.1
151
- - @zenweb/meta: ^2.4.1
152
- - @zenweb/result: ^3.0.1
153
-
154
- ## 3.11.0
155
- - @zenweb/helper: ^3.3.0
156
- - 去除 Helper
157
- - 新增 QueryHelper, ParamHelper, TypeCastHelper
158
- - @zenweb/body: ^3.1.0
159
- - 新增 BodyHelper 数据类型转换&校验
160
-
161
- ## 3.10.0
162
- - update:
163
- - @zenweb/core: ^3.5.0
164
- - 新增: Core.moduleExists
165
- - 新增: SetupHelper.assertModuleExists
166
- - 修改: Core.setup 方法增加 name 参数
167
- - 删除: SetupHelper.checkCoreProperty
168
- - 删除: SetupHelper.checkContextProperty
169
- - @zenweb/body: ^3.0.0
170
- - 使用依赖注入重构,去除 xml 和 文件上传表单支持,取消的这两个作为独立模块分离。
171
- - @zenweb/helper: ^3.1.0
172
- - 使用依赖注入重构,不再支持 ctx.helper 调用
173
- - @zenweb/router: ^3.3.0
174
- - @zenweb/controller: ^3.9.0
175
- - @zenweb/messagecode: ^3.2.0
176
- - @zenweb/inject: ^3.18.0
1
+ # Changelog
2
+
3
+ ## [3.23.0] - 2023-4-10
4
+ - 更新: @zenweb/helper@3.9.0
5
+ - 更新: @zenweb/body@3.9.0
6
+ - 统一 HelperBase
7
+
8
+ ## [3.22.0] - 2023-4-10
9
+ - update: @zenweb/result@3.3.2 支持 failCodeHeader, failCodeMessage
10
+
11
+ ## [3.21.3] - 2023-4-9
12
+ - update: typecasts@3.0.5
13
+
14
+ ## [3.21.2] - 2023-4-9
15
+ - update: typecasts@3.0.4
16
+
17
+ ## [3.21.1] - 2023-4-9
18
+ - update: typecasts@3.0.3
19
+
20
+ ## [3.21.0] - 2023-4-8
21
+ - 更新: @zenweb/helper: ^3.8.0 增加 TypeCastHelper.page 方法
22
+ - 更新: @zenweb/body: ^3.8.0 增加 BodyHelper.page 方法
23
+
24
+ ## [3.20.0] - 2023-4-7
25
+ - 更新: @zenweb/helper: ^3.7.0
26
+ - 更新: @zenweb/inject: ^3.19.0
27
+
28
+ ## [3.19.1] - 2023-4-1
29
+ - 更新: @zenweb/helper: ^3.6.1
30
+
31
+ ## [3.19.0] - 2023-4-1
32
+ - 更新: typecasts: 3.0.0
33
+ - 更新: @zenweb/body: ^3.7.0
34
+ - 更新: @zenweb/helper: ^3.6.0
35
+ ```ts
36
+ export class DemoController {
37
+ @mapping({ method: 'POST' })
38
+ typecast(body: BodyHelper) {
39
+ return body.get({
40
+ kw: 'trim',
41
+ news: {
42
+ // 嵌套对象 news
43
+ // 嵌套用法与 get({}) 用法一致,可以无限嵌套
44
+ type: 'object',
45
+ pick: {
46
+ id: '!int',
47
+ title: '!string',
48
+ }
49
+ }
50
+ });
51
+ }
52
+ }
53
+ ```
54
+
55
+ ## [3.18.1] - 2023-4-1
56
+ - 更新: typecasts: 2.8.0
57
+ - 更新: @zenweb/body: ^3.6.2
58
+ - 更新: @zenweb/helper: ^3.5.2
59
+
60
+ ## [3.18.0] - 2023-3-30
61
+ - 更新: @zenweb/result: ^3.2.1
62
+ - 支持自定义结果渲染器
63
+ - 支持 return 结果自动设置到 ctx.success
64
+ - 更新: @zenweb/controller: ^3.13.0
65
+ - 不再主动调用 ctx.success 方法,使用新的 @zenweb/result 来管理结果
66
+ - 新增 ControllerRegister 管理控制器注册
67
+
68
+ ## [3.17.1] - 2023-3-29
69
+ - 更新: @zenweb/helper@3.5.1
70
+
71
+ ## [3.17.0] - 2023-3-29
72
+ - 更新: @zenweb/controller 新增 Core.controllerRegister
73
+
74
+ ## [3.16.0] - 2023-3-28
75
+ - 更新: @zenweb/helper@3.5.0 对象嵌套
76
+ ```ts
77
+ export class DemoController {
78
+ @mapping({ method: 'POST' })
79
+ typecast(body: BodyHelper) {
80
+ return body.get({
81
+ kw: 'trim',
82
+ news: {
83
+ // 嵌套对象 news
84
+ // 嵌套用法与 get({}) 用法一致,可以无限嵌套
85
+ type: {
86
+ id: '!int',
87
+ title: '!string',
88
+ }
89
+ }
90
+ });
91
+ }
92
+ }
93
+ ```
94
+
95
+ 提交数据:
96
+ ```json
97
+ {
98
+ "kw": "keyword",
99
+ "news": {
100
+ "id": "1234",
101
+ "title": "news title"
102
+ }
103
+ }
104
+ ```
105
+
106
+ ## [3.15.3] - 2023-3-27
107
+ - 新增 tsconfig-app.json, tsconfig-module.json 文件
108
+
109
+ ## [3.15.2] - 2023-3-27
110
+ - 新增 tsconfig-base.json 文件
111
+
112
+ ## [3.15.1] - 2023-3-23
113
+ - 更新: @zenweb/body@3.6.1 错误的使用了 node16 的包导入规则,导致低于 16 版本的 node 无法使用
114
+ - 更新说明文档
115
+
116
+ ## [3.15.0] - 2023-3-21
117
+ - 更新: @zenweb/messagecode: ^3.4.0
118
+ - number 类型支持,如果为 number 则直接获取不进行递归查找
119
+ - 可以格式化不在配置项中的字符串
120
+ - 增加 has 方法用于判断配置项是否存在
121
+ - 更新: @zenweb/result: ^3.1.0
122
+ - 使用 messagecode 统一处理错误代码消息
123
+ - 更新: @zenweb/helper: ^3.4.0
124
+ - 使用新的 result.fail 简化错误输出代码
125
+ - 去除配置项中的 requiredErrorCode 和 validateErrorCode
126
+ - 增加全局配置 page 选项
127
+ - 更新: @zenweb/controller: ^3.10.0
128
+ - discoverPaths 支持使用 "./" 开头的相对路径
129
+ - 增加 debug 信息
130
+
131
+ ## [3.14.0] - 2023-3-19
132
+ - 更新: @zenweb/body: ^3.6.0
133
+
134
+ ## [3.13.1] - 2023-3-18
135
+ - 导出: RawBody, TextBody
136
+
137
+ ## [3.13.0] - 2023-3-17
138
+ - 更新: @zenweb/body: ^3.5.0
139
+ - 重构数据流读取, 新增 RawBody 和 TextBody,可扩展的解析器
140
+
141
+ ## [3.12.2] - 2023-3-15
142
+ - 更新:@zenweb/body: ^3.2.2 xml 类型
143
+
144
+ ## 3.12.1
145
+ - 导出: ParamHelper
146
+
147
+ ## 3.12.0
148
+ - 更新: @zenweb/body: ^3.2.0 ObjectBody
149
+
150
+ ## 3.11.1
151
+ > null 大检查! 所有项目强制开启 TS strict 模式,不再忽略 null 检查
152
+ - 更新:
153
+ - @zenweb/body: ^3.1.1
154
+ - @zenweb/controller: ^3.9.1
155
+ - @zenweb/core: ^3.5.1
156
+ - @zenweb/helper: ^3.3.1
157
+ - @zenweb/log: ^3.2.1
158
+ - @zenweb/messagecode: ^3.2.1
159
+ - @zenweb/meta: ^2.4.1
160
+ - @zenweb/result: ^3.0.1
161
+
162
+ ## 3.11.0
163
+ - @zenweb/helper: ^3.3.0
164
+ - 去除 Helper
165
+ - 新增 QueryHelper, ParamHelper, TypeCastHelper
166
+ - @zenweb/body: ^3.1.0
167
+ - 新增 BodyHelper 数据类型转换&校验
168
+
169
+ ## 3.10.0
170
+ - update:
171
+ - @zenweb/core: ^3.5.0
172
+ - 新增: Core.moduleExists
173
+ - 新增: SetupHelper.assertModuleExists
174
+ - 修改: Core.setup 方法增加 name 参数
175
+ - 删除: SetupHelper.checkCoreProperty
176
+ - 删除: SetupHelper.checkContextProperty
177
+ - @zenweb/body: ^3.0.0
178
+ - 使用依赖注入重构,去除 xml 和 文件上传表单支持,取消的这两个作为独立模块分离。
179
+ - @zenweb/helper: ^3.1.0
180
+ - 使用依赖注入重构,不再支持 ctx.helper 调用
181
+ - @zenweb/router: ^3.3.0
182
+ - @zenweb/controller: ^3.9.0
183
+ - @zenweb/messagecode: ^3.2.0
184
+ - @zenweb/inject: ^3.18.0
package/README.md CHANGED
@@ -1,119 +1,119 @@
1
- # ZenWeb
2
-
3
- Modular lightweight web framework based on Koa
4
-
5
- ## Document
6
-
7
- [ZenWeb 文档](https://zenweb.node.ltd)
8
-
9
- ## Install
10
-
11
- ```bash
12
- # for production
13
- npm install zenweb
14
-
15
- # for development
16
- npm install dotenv typescript rimraf tsc-watch --save-dev
17
- ```
18
-
19
- ## Project Code
20
-
21
- edit `package.json` file at `scripts`:
22
-
23
- ```json
24
- "scripts": {
25
- "start": "node --enable-source-maps app",
26
- "dev": "rimraf app && tsc-watch --onSuccess \"npm run dev-start\"",
27
- "dev-start": "node -r dotenv/config --enable-source-maps app",
28
- "build": "rimraf app && tsc"
29
- }
30
- ```
31
-
32
- create `tsconfig.json` file
33
-
34
- ```json
35
- {
36
- "extends": "zenweb/tsconfig-app",
37
- "compilerOptions": {
38
- "outDir": "./app"
39
- },
40
- "include": ["src/**/*"]
41
- }
42
- ```
43
-
44
- create `.env` file
45
-
46
- ```bash
47
- APP_NAME=myweb
48
- NODE_ENV=development
49
- DEBUG=*
50
- ```
51
-
52
- create `src/index.ts` file
53
-
54
- ```ts
55
- import { create } from 'zenweb';
56
- create().start();
57
- ```
58
-
59
- create `src/service/hello.ts` file
60
-
61
- ```ts
62
- import { inject } from 'zenweb';
63
-
64
- export class HelloService {
65
- @inject ctx!: Context;
66
-
67
- getIp() {
68
- return this.ctx.ip;
69
- }
70
- }
71
- ```
72
-
73
- create `src/controller/hello.ts` file
74
-
75
- ```ts
76
- import { mapping } from 'zenweb';
77
- import { HelloService } from '../service/hello';
78
-
79
- export class HelloController {
80
- @mapping()
81
- index(service: HelloService) {
82
- const ip = service.getIp();
83
- return `Hello ZenWeb! ${ip}`;
84
- }
85
- }
86
- ```
87
-
88
- start server:
89
-
90
- ```bash
91
- npm run dev
92
- ```
93
-
94
- ## 内置模块
95
- - [meta](https://www.npmjs.com/package/@zenweb/meta) 运行基本信息,例如:请求耗时
96
- - [log](https://www.npmjs.com/package/@zenweb/log) 日志支持
97
- - [router](https://www.npmjs.com/package/@zenweb/router) 路由支持
98
- - [messagecode](https://www.npmjs.com/package/@zenweb/messagecode) 统一错误消息格式化
99
- - [body](https://www.npmjs.com/package/@zenweb/body) 请求主体解析,JSON、Form
100
- - [result](https://www.npmjs.com/package/@zenweb/result) 统一结果返回,成功或失败
101
- - [helper](https://www.npmjs.com/package/@zenweb/helper) 输入数据验证
102
- - [inject](https://www.npmjs.com/package/@zenweb/inject) 注入支持
103
-
104
- 内置模块默认开启,可以通过设置配置项为 **false** 关闭
105
-
106
-
107
- ## 可选模块
108
- - [cors](https://www.npmjs.com/package/@zenweb/cors) 跨域支持
109
- - [sentry](https://www.npmjs.com/package/@zenweb/sentry) sentry 错误收集
110
- - [metric](https://www.npmjs.com/package/@zenweb/metric) 生产运行健康信息收集
111
- - [validation](https://www.npmjs.com/package/@zenweb/validation) JSONSchema 验证
112
- - [mysql](https://www.npmjs.com/package/@zenweb/mysql) MySQL 数据库支持
113
- - [orm](https://www.npmjs.com/package/@zenweb/orm) ORM 支持
114
- - [template](https://www.npmjs.com/package/@zenweb/template) 模版渲染
115
- - [schedule](https://www.npmjs.com/package/@zenweb/schedule) 定时任务
116
- - [form](https://www.npmjs.com/package/@zenweb/form) 统一表单(多用于后台)
117
- - [grid](https://www.npmjs.com/package/@zenweb/grid) 统一表格(多用于后台)
118
- - [upload](https://www.npmjs.com/package/@zenweb/upload) 文件上传支持
119
- - [xmlBody](https://www.npmjs.com/package/@zenweb/xml-body) XML Body 解析
1
+ # ZenWeb
2
+
3
+ Modular lightweight web framework based on Koa
4
+
5
+ ## Document
6
+
7
+ [ZenWeb 文档](https://zenweb.node.ltd)
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ # for production
13
+ npm install zenweb
14
+
15
+ # for development
16
+ npm install dotenv typescript rimraf tsc-watch --save-dev
17
+ ```
18
+
19
+ ## Project Code
20
+
21
+ edit `package.json` file at `scripts`:
22
+
23
+ ```json
24
+ "scripts": {
25
+ "start": "node --enable-source-maps app",
26
+ "dev": "rimraf app && tsc-watch --onSuccess \"npm run dev-start\"",
27
+ "dev-start": "node -r dotenv/config --enable-source-maps app",
28
+ "build": "rimraf app && tsc"
29
+ }
30
+ ```
31
+
32
+ create `tsconfig.json` file
33
+
34
+ ```json
35
+ {
36
+ "extends": "zenweb/tsconfig-app",
37
+ "compilerOptions": {
38
+ "outDir": "./app"
39
+ },
40
+ "include": ["src/**/*"]
41
+ }
42
+ ```
43
+
44
+ create `.env` file
45
+
46
+ ```bash
47
+ APP_NAME=myweb
48
+ NODE_ENV=development
49
+ DEBUG=*
50
+ ```
51
+
52
+ create `src/index.ts` file
53
+
54
+ ```ts
55
+ import { create } from 'zenweb';
56
+ create().start();
57
+ ```
58
+
59
+ create `src/service/hello.ts` file
60
+
61
+ ```ts
62
+ import { inject } from 'zenweb';
63
+
64
+ export class HelloService {
65
+ @inject ctx!: Context;
66
+
67
+ getIp() {
68
+ return this.ctx.ip;
69
+ }
70
+ }
71
+ ```
72
+
73
+ create `src/controller/hello.ts` file
74
+
75
+ ```ts
76
+ import { mapping } from 'zenweb';
77
+ import { HelloService } from '../service/hello';
78
+
79
+ export class HelloController {
80
+ @mapping()
81
+ index(service: HelloService) {
82
+ const ip = service.getIp();
83
+ return `Hello ZenWeb! ${ip}`;
84
+ }
85
+ }
86
+ ```
87
+
88
+ start server:
89
+
90
+ ```bash
91
+ npm run dev
92
+ ```
93
+
94
+ ## 内置模块
95
+ - [meta](https://www.npmjs.com/package/@zenweb/meta) 运行基本信息,例如:请求耗时
96
+ - [log](https://www.npmjs.com/package/@zenweb/log) 日志支持
97
+ - [router](https://www.npmjs.com/package/@zenweb/router) 路由支持
98
+ - [messagecode](https://www.npmjs.com/package/@zenweb/messagecode) 统一错误消息格式化
99
+ - [body](https://www.npmjs.com/package/@zenweb/body) 请求主体解析,JSON、Form
100
+ - [result](https://www.npmjs.com/package/@zenweb/result) 统一结果返回,成功或失败
101
+ - [helper](https://www.npmjs.com/package/@zenweb/helper) 输入数据验证
102
+ - [inject](https://www.npmjs.com/package/@zenweb/inject) 注入支持
103
+
104
+ 内置模块默认开启,可以通过设置配置项为 **false** 关闭
105
+
106
+
107
+ ## 可选模块
108
+ - [cors](https://www.npmjs.com/package/@zenweb/cors) 跨域支持
109
+ - [sentry](https://www.npmjs.com/package/@zenweb/sentry) sentry 错误收集
110
+ - [metric](https://www.npmjs.com/package/@zenweb/metric) 生产运行健康信息收集
111
+ - [validation](https://www.npmjs.com/package/@zenweb/validation) JSONSchema 验证
112
+ - [mysql](https://www.npmjs.com/package/@zenweb/mysql) MySQL 数据库支持
113
+ - [orm](https://www.npmjs.com/package/@zenweb/orm) ORM 支持
114
+ - [template](https://www.npmjs.com/package/@zenweb/template) 模版渲染
115
+ - [schedule](https://www.npmjs.com/package/@zenweb/schedule) 定时任务
116
+ - [form](https://www.npmjs.com/package/@zenweb/form) 统一表单(多用于后台)
117
+ - [grid](https://www.npmjs.com/package/@zenweb/grid) 统一表格(多用于后台)
118
+ - [upload](https://www.npmjs.com/package/@zenweb/upload) 文件上传支持
119
+ - [xmlBody](https://www.npmjs.com/package/@zenweb/xml-body) XML Body 解析
package/package.json CHANGED
@@ -1,48 +1,48 @@
1
- {
2
- "name": "zenweb",
3
- "version": "3.21.3",
4
- "description": "Modular lightweight web framework based on Koa",
5
- "main": "dist/index.js",
6
- "typings": "./dist/index.d.ts",
7
- "files": [
8
- "tsconfig-*.json",
9
- "dist"
10
- ],
11
- "scripts": {
12
- "build": "rimraf dist && tsc",
13
- "prepublishOnly": "npm run build",
14
- "dev": "cd example && cross-env APP_NAME=testapp DEBUG=* NODE_ENV=development ts-node src"
15
- },
16
- "author": {
17
- "name": "YeFei",
18
- "email": "316606233@qq.com"
19
- },
20
- "keywords": [
21
- "web",
22
- "webapp",
23
- "http",
24
- "framework",
25
- "koa",
26
- "zenweb"
27
- ],
28
- "license": "MIT",
29
- "homepage": "https://zenweb.node.ltd",
30
- "dependencies": {
31
- "@zenweb/body": "^3.8.0",
32
- "@zenweb/controller": "^3.13.0",
33
- "@zenweb/core": "^3.5.5",
34
- "@zenweb/helper": "^3.8.3",
35
- "@zenweb/inject": "^3.19.0",
36
- "@zenweb/log": "^3.2.1",
37
- "@zenweb/messagecode": "^3.4.0",
38
- "@zenweb/meta": "^2.4.1",
39
- "@zenweb/result": "^3.2.1",
40
- "@zenweb/router": "^3.3.0"
41
- },
42
- "devDependencies": {
43
- "cross-env": "^7.0.3",
44
- "rimraf": "^4.1.2",
45
- "ts-node": "^10.9.1",
46
- "typescript": "^5.0.3"
47
- }
48
- }
1
+ {
2
+ "name": "zenweb",
3
+ "version": "3.23.0",
4
+ "description": "Modular lightweight web framework based on Koa",
5
+ "main": "dist/index.js",
6
+ "typings": "./dist/index.d.ts",
7
+ "files": [
8
+ "tsconfig-*.json",
9
+ "dist"
10
+ ],
11
+ "scripts": {
12
+ "build": "rimraf dist && tsc",
13
+ "prepublishOnly": "npm run build",
14
+ "dev": "cd example && cross-env APP_NAME=testapp DEBUG=* NODE_ENV=development ts-node src"
15
+ },
16
+ "author": {
17
+ "name": "YeFei",
18
+ "email": "316606233@qq.com"
19
+ },
20
+ "keywords": [
21
+ "web",
22
+ "webapp",
23
+ "http",
24
+ "framework",
25
+ "koa",
26
+ "zenweb"
27
+ ],
28
+ "license": "MIT",
29
+ "homepage": "https://zenweb.node.ltd",
30
+ "dependencies": {
31
+ "@zenweb/body": "^3.9.0",
32
+ "@zenweb/controller": "^3.13.0",
33
+ "@zenweb/core": "^3.5.5",
34
+ "@zenweb/helper": "^3.9.0",
35
+ "@zenweb/inject": "^3.19.0",
36
+ "@zenweb/log": "^3.2.1",
37
+ "@zenweb/messagecode": "^3.4.0",
38
+ "@zenweb/meta": "^2.4.1",
39
+ "@zenweb/result": "^3.3.2",
40
+ "@zenweb/router": "^3.3.0"
41
+ },
42
+ "devDependencies": {
43
+ "cross-env": "^7.0.3",
44
+ "rimraf": "^4.1.2",
45
+ "ts-node": "^10.9.1",
46
+ "typescript": "^5.0.3"
47
+ }
48
+ }
package/tsconfig-app.json CHANGED
@@ -1,6 +1,6 @@
1
- {
2
- "extends": "./tsconfig-base",
3
- "compilerOptions": {
4
- "sourceMap": true
5
- }
1
+ {
2
+ "extends": "./tsconfig-base",
3
+ "compilerOptions": {
4
+ "sourceMap": true
5
+ }
6
6
  }
@@ -1,11 +1,11 @@
1
- {
2
- "compilerOptions": {
3
- "experimentalDecorators": true,
4
- "emitDecoratorMetadata": true,
5
- "target": "ES2019",
6
- "lib": [ "ES2019" ],
7
- "module": "commonjs",
8
- "strict": true,
9
- "newLine": "lf"
10
- }
1
+ {
2
+ "compilerOptions": {
3
+ "experimentalDecorators": true,
4
+ "emitDecoratorMetadata": true,
5
+ "target": "ES2019",
6
+ "lib": [ "ES2019" ],
7
+ "module": "commonjs",
8
+ "strict": true,
9
+ "newLine": "lf"
10
+ }
11
11
  }
@@ -1,6 +1,6 @@
1
- {
2
- "extends": "./tsconfig-base",
3
- "compilerOptions": {
4
- "declaration": true
5
- }
1
+ {
2
+ "extends": "./tsconfig-base",
3
+ "compilerOptions": {
4
+ "declaration": true
5
+ }
6
6
  }