zenweb 4.2.2 → 4.2.4

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.
Files changed (3) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +13 -13
  3. package/CHANGELOG.md +0 -254
package/dist/index.js CHANGED
@@ -69,10 +69,10 @@ function create(options) {
69
69
  core.setup((0, log_1.default)(options.log));
70
70
  if (options.router !== false)
71
71
  core.setup((0, router_1.default)());
72
- if (options.messagecode !== false)
73
- core.setup((0, messagecode_1.default)(options.messagecode));
74
72
  if (options.result !== false)
75
73
  core.setup((0, result_1.default)(options.result));
74
+ if (options.messagecode !== false)
75
+ core.setup((0, messagecode_1.default)(options.messagecode));
76
76
  if (options.helper !== false)
77
77
  core.setup((0, helper_1.default)(options.helper));
78
78
  if (options.body !== false)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zenweb",
3
- "version": "4.2.2",
3
+ "version": "4.2.4",
4
4
  "description": "Modular lightweight web framework based on Koa",
5
5
  "main": "dist/index.js",
6
6
  "typings": "./dist/index.d.ts",
@@ -28,21 +28,21 @@
28
28
  "license": "MIT",
29
29
  "homepage": "https://zenweb.node.ltd",
30
30
  "dependencies": {
31
- "@zenweb/body": "^4.0.0",
32
- "@zenweb/controller": "^3.14.0",
33
- "@zenweb/core": "^4.1.2",
34
- "@zenweb/helper": "^4.1.0",
35
- "@zenweb/inject": "^4.0.1",
36
- "@zenweb/log": "^4.1.0",
37
- "@zenweb/messagecode": "^3.6.0",
31
+ "@zenweb/body": "^4.0.5",
32
+ "@zenweb/controller": "^3.16.4",
33
+ "@zenweb/core": "^4.1.4",
34
+ "@zenweb/helper": "^4.1.5",
35
+ "@zenweb/inject": "^4.0.4",
36
+ "@zenweb/log": "^4.1.3",
37
+ "@zenweb/messagecode": "^3.6.3",
38
38
  "@zenweb/meta": "^2.6.3",
39
- "@zenweb/result": "^3.12.0",
40
- "@zenweb/router": "^3.3.0"
39
+ "@zenweb/result": "^3.12.4",
40
+ "@zenweb/router": "^3.3.3"
41
41
  },
42
42
  "devDependencies": {
43
43
  "cross-env": "^7.0.3",
44
- "rimraf": "^4.1.2",
45
- "ts-node": "^10.9.1",
46
- "typescript": "^5.1.6"
44
+ "rimraf": "^4.4.1",
45
+ "ts-node": "^10.9.2",
46
+ "typescript": "^5.3.3"
47
47
  }
48
48
  }
package/CHANGELOG.md DELETED
@@ -1,254 +0,0 @@
1
- # Changelog
2
-
3
- ## [4.2.2] - 2023-11-21
4
- - 更新 @zenweb/core@4.1.2 删除 console.log({ target }) 调试输出
5
-
6
- ## [4.2.1] - 2023-9-20
7
- - 导出 $core, $ctx
8
-
9
- ## [4.2.0] - 2023-8-25
10
- - result 模块不再内置 messagecode 支持
11
- - 更新 @zenweb/helper @zenweb/messagecode @zenweb/result
12
-
13
- ## [4.1.0] - 2023-8-3
14
- - 更新 @zenweb/core@4.1.1 callProxy
15
-
16
- ## [4.0.0] - 2023-8-3
17
- - core@v4 支持,全局应用实例,asyncLocalStorage 开启
18
-
19
- ## [3.33.0] - 2023-7-13
20
- - 更新: @zenweb/body: 3.10.0 新增 useBodyParser 方法,支持指定内容解析器
21
-
22
- ## [3.32.0] - 2023-7-10
23
- - 更新: @zenweb/result: 3.9.0 支持配置 exposeUnexpected 显示意外错误信息
24
-
25
- ## [3.31.3] - 2023-5-30
26
- - 导出: SetupHelper
27
- - 更新: @zenweb/log: 3.5.1
28
-
29
- ## [3.31.1] - 2023-5-29
30
- - 更新: @zenweb/meta: 2.6.2 trackId 头信息获取
31
-
32
- ## [3.31.0] - 2023-5-29
33
- - meta 模块新增 trackId 支持
34
- - 更新: @zenweb/meta: 2.6.1 trackId 支持
35
- - 更新: @zenweb/log: 3.5.0 记录 trackId
36
-
37
- ## [3.30.0] - 2023-5-25
38
- - 更新: @zenweb/result: 3.8.0 支持 Stream Buffer Promise 类型
39
-
40
- ## [3.29.0] - 2023-5-8
41
- - 更新: @zenweb/log: 3.4.0 @zenweb/meta: 2.5.0 统一 ctx.requestId
42
-
43
- ## [3.28.0] - 2023-5-8
44
- - 更新: @zenweb/log: 3.3.0 支持 writeLevel 和 x-request-id,Error 对象支持记录更多字段
45
-
46
- ## [3.27.1] - 2023-5-5
47
- - 更新: @zenweb/helper: 3.12.1 notNull message
48
-
49
- ## [3.27.0] - 2023-4-27
50
- - 更新: @zenweb/result: 3.7.1 外部 fail() 方法,去除 ctx.result,获取 success 数据请使用 ctx.successData 属性
51
-
52
- ## [3.26.1] - 2023-4-20
53
- - 更新: @zenweb/result: ^3.6.2 使用 ctx.result 可统一获取 success 或 fail 结果
54
-
55
- ## [3.26.0] - 2023-4-19
56
- - 更新: @zenweb/controller: ^3.14.0
57
- - 更新: @zenweb/result: ^3.6.1
58
- - 本次更新主要解决控制器方法返回结果无法被中间件获取问题
59
-
60
- ## [3.25.1] - 2023-4-11
61
- - 更新: @zenweb/helper@3.11.1
62
- fix: page 方法返回结果缺少输入选项
63
-
64
- ## [3.25.0] - 2023-4-11
65
- - 更新: @zenweb/helper@3.11.0 page 方法新增 `page` 和 `total` 参数,严格模式开关
66
-
67
- ## [3.24.0] - 2023-4-10
68
- - 更新: @zenweb/helper@3.10.0 page 方法返回结果包含 PageOption
69
-
70
- ## [3.23.1] - 2023-4-10
71
- - 更新: @zenweb/helper@3.9.1
72
-
73
- ## [3.23.0] - 2023-4-10
74
- - 更新: @zenweb/helper@3.9.0
75
- - 更新: @zenweb/body@3.9.0
76
- - 统一 HelperBase
77
-
78
- ## [3.22.0] - 2023-4-10
79
- - update: @zenweb/result@3.3.2 支持 failCodeHeader, failCodeMessage
80
-
81
- ## [3.21.3] - 2023-4-9
82
- - update: typecasts@3.0.5
83
-
84
- ## [3.21.2] - 2023-4-9
85
- - update: typecasts@3.0.4
86
-
87
- ## [3.21.1] - 2023-4-9
88
- - update: typecasts@3.0.3
89
-
90
- ## [3.21.0] - 2023-4-8
91
- - 更新: @zenweb/helper: ^3.8.0 增加 TypeCastHelper.page 方法
92
- - 更新: @zenweb/body: ^3.8.0 增加 BodyHelper.page 方法
93
-
94
- ## [3.20.0] - 2023-4-7
95
- - 更新: @zenweb/helper: ^3.7.0
96
- - 更新: @zenweb/inject: ^3.19.0
97
-
98
- ## [3.19.1] - 2023-4-1
99
- - 更新: @zenweb/helper: ^3.6.1
100
-
101
- ## [3.19.0] - 2023-4-1
102
- - 更新: typecasts: 3.0.0
103
- - 更新: @zenweb/body: ^3.7.0
104
- - 更新: @zenweb/helper: ^3.6.0
105
- ```ts
106
- export class DemoController {
107
- @mapping({ method: 'POST' })
108
- typecast(body: BodyHelper) {
109
- return body.get({
110
- kw: 'trim',
111
- news: {
112
- // 嵌套对象 news
113
- // 嵌套用法与 get({}) 用法一致,可以无限嵌套
114
- type: 'object',
115
- pick: {
116
- id: '!int',
117
- title: '!string',
118
- }
119
- }
120
- });
121
- }
122
- }
123
- ```
124
-
125
- ## [3.18.1] - 2023-4-1
126
- - 更新: typecasts: 2.8.0
127
- - 更新: @zenweb/body: ^3.6.2
128
- - 更新: @zenweb/helper: ^3.5.2
129
-
130
- ## [3.18.0] - 2023-3-30
131
- - 更新: @zenweb/result: ^3.2.1
132
- - 支持自定义结果渲染器
133
- - 支持 return 结果自动设置到 ctx.success 中
134
- - 更新: @zenweb/controller: ^3.13.0
135
- - 不再主动调用 ctx.success 方法,使用新的 @zenweb/result 来管理结果
136
- - 新增 ControllerRegister 管理控制器注册
137
-
138
- ## [3.17.1] - 2023-3-29
139
- - 更新: @zenweb/helper@3.5.1
140
-
141
- ## [3.17.0] - 2023-3-29
142
- - 更新: @zenweb/controller 新增 Core.controllerRegister
143
-
144
- ## [3.16.0] - 2023-3-28
145
- - 更新: @zenweb/helper@3.5.0 对象嵌套
146
- ```ts
147
- export class DemoController {
148
- @mapping({ method: 'POST' })
149
- typecast(body: BodyHelper) {
150
- return body.get({
151
- kw: 'trim',
152
- news: {
153
- // 嵌套对象 news
154
- // 嵌套用法与 get({}) 用法一致,可以无限嵌套
155
- type: {
156
- id: '!int',
157
- title: '!string',
158
- }
159
- }
160
- });
161
- }
162
- }
163
- ```
164
-
165
- 提交数据:
166
- ```json
167
- {
168
- "kw": "keyword",
169
- "news": {
170
- "id": "1234",
171
- "title": "news title"
172
- }
173
- }
174
- ```
175
-
176
- ## [3.15.3] - 2023-3-27
177
- - 新增 tsconfig-app.json, tsconfig-module.json 文件
178
-
179
- ## [3.15.2] - 2023-3-27
180
- - 新增 tsconfig-base.json 文件
181
-
182
- ## [3.15.1] - 2023-3-23
183
- - 更新: @zenweb/body@3.6.1 错误的使用了 node16 的包导入规则,导致低于 16 版本的 node 无法使用
184
- - 更新说明文档
185
-
186
- ## [3.15.0] - 2023-3-21
187
- - 更新: @zenweb/messagecode: ^3.4.0
188
- - number 类型支持,如果为 number 则直接获取不进行递归查找
189
- - 可以格式化不在配置项中的字符串
190
- - 增加 has 方法用于判断配置项是否存在
191
- - 更新: @zenweb/result: ^3.1.0
192
- - 使用 messagecode 统一处理错误代码消息
193
- - 更新: @zenweb/helper: ^3.4.0
194
- - 使用新的 result.fail 简化错误输出代码
195
- - 去除配置项中的 requiredErrorCode 和 validateErrorCode
196
- - 增加全局配置 page 选项
197
- - 更新: @zenweb/controller: ^3.10.0
198
- - discoverPaths 支持使用 "./" 开头的相对路径
199
- - 增加 debug 信息
200
-
201
- ## [3.14.0] - 2023-3-19
202
- - 更新: @zenweb/body: ^3.6.0
203
-
204
- ## [3.13.1] - 2023-3-18
205
- - 导出: RawBody, TextBody
206
-
207
- ## [3.13.0] - 2023-3-17
208
- - 更新: @zenweb/body: ^3.5.0
209
- - 重构数据流读取, 新增 RawBody 和 TextBody,可扩展的解析器
210
-
211
- ## [3.12.2] - 2023-3-15
212
- - 更新:@zenweb/body: ^3.2.2 xml 类型
213
-
214
- ## 3.12.1
215
- - 导出: ParamHelper
216
-
217
- ## 3.12.0
218
- - 更新: @zenweb/body: ^3.2.0 ObjectBody
219
-
220
- ## 3.11.1
221
- > null 大检查! 所有项目强制开启 TS strict 模式,不再忽略 null 检查
222
- - 更新:
223
- - @zenweb/body: ^3.1.1
224
- - @zenweb/controller: ^3.9.1
225
- - @zenweb/core: ^3.5.1
226
- - @zenweb/helper: ^3.3.1
227
- - @zenweb/log: ^3.2.1
228
- - @zenweb/messagecode: ^3.2.1
229
- - @zenweb/meta: ^2.4.1
230
- - @zenweb/result: ^3.0.1
231
-
232
- ## 3.11.0
233
- - @zenweb/helper: ^3.3.0
234
- - 去除 Helper
235
- - 新增 QueryHelper, ParamHelper, TypeCastHelper
236
- - @zenweb/body: ^3.1.0
237
- - 新增 BodyHelper 数据类型转换&校验
238
-
239
- ## 3.10.0
240
- - update:
241
- - @zenweb/core: ^3.5.0
242
- - 新增: Core.moduleExists
243
- - 新增: SetupHelper.assertModuleExists
244
- - 修改: Core.setup 方法增加 name 参数
245
- - 删除: SetupHelper.checkCoreProperty
246
- - 删除: SetupHelper.checkContextProperty
247
- - @zenweb/body: ^3.0.0
248
- - 使用依赖注入重构,去除 xml 和 文件上传表单支持,取消的这两个作为独立模块分离。
249
- - @zenweb/helper: ^3.1.0
250
- - 使用依赖注入重构,不再支持 ctx.helper 调用
251
- - @zenweb/router: ^3.3.0
252
- - @zenweb/controller: ^3.9.0
253
- - @zenweb/messagecode: ^3.2.0
254
- - @zenweb/inject: ^3.18.0