koatty_router 1.6.2 → 1.6.6

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 (77) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.js +35 -26
  4. package/dist/index.mjs +37 -28
  5. package/dist/package.json +13 -6
  6. package/package.json +13 -6
  7. package/.commitlintrc.js +0 -10
  8. package/.eslintignore +0 -11
  9. package/.eslintrc.js +0 -43
  10. package/.huskyrc +0 -5
  11. package/.versionrc.js +0 -16
  12. package/api-extractor.json +0 -345
  13. package/docs/api/index.md +0 -12
  14. package/docs/api/koatty_router.controller_router.md +0 -11
  15. package/docs/api/koatty_router.deletemapping.md +0 -15
  16. package/docs/api/koatty_router.file.md +0 -26
  17. package/docs/api/koatty_router.get.md +0 -26
  18. package/docs/api/koatty_router.getmapping.md +0 -15
  19. package/docs/api/koatty_router.grpcrouter._constructor_.md +0 -21
  20. package/docs/api/koatty_router.grpcrouter.app.md +0 -11
  21. package/docs/api/koatty_router.grpcrouter.listrouter.md +0 -19
  22. package/docs/api/koatty_router.grpcrouter.loadrouter.md +0 -26
  23. package/docs/api/koatty_router.grpcrouter.md +0 -35
  24. package/docs/api/koatty_router.grpcrouter.options.md +0 -11
  25. package/docs/api/koatty_router.grpcrouter.router.md +0 -11
  26. package/docs/api/koatty_router.grpcrouter.setrouter.md +0 -28
  27. package/docs/api/koatty_router.grpcrouteroptions.md +0 -23
  28. package/docs/api/koatty_router.grpcrouteroptions.protofile.md +0 -11
  29. package/docs/api/koatty_router.header.md +0 -26
  30. package/docs/api/koatty_router.headmapping.md +0 -15
  31. package/docs/api/koatty_router.httprouter._constructor_.md +0 -21
  32. package/docs/api/koatty_router.httprouter.app.md +0 -11
  33. package/docs/api/koatty_router.httprouter.loadrouter.md +0 -22
  34. package/docs/api/koatty_router.httprouter.md +0 -36
  35. package/docs/api/koatty_router.httprouter.options.md +0 -11
  36. package/docs/api/koatty_router.httprouter.router.md +0 -11
  37. package/docs/api/koatty_router.httprouter.setrouter.md +0 -26
  38. package/docs/api/koatty_router.implementation.md +0 -15
  39. package/docs/api/koatty_router.md +0 -65
  40. package/docs/api/koatty_router.newrouter.md +0 -29
  41. package/docs/api/koatty_router.optionsmapping.md +0 -15
  42. package/docs/api/koatty_router.param_key.md +0 -11
  43. package/docs/api/koatty_router.patchmapping.md +0 -15
  44. package/docs/api/koatty_router.pathvariable.md +0 -26
  45. package/docs/api/koatty_router.post.md +0 -26
  46. package/docs/api/koatty_router.postmapping.md +0 -15
  47. package/docs/api/koatty_router.putmapping.md +0 -15
  48. package/docs/api/koatty_router.requestbody.md +0 -19
  49. package/docs/api/koatty_router.requestmapping.md +0 -15
  50. package/docs/api/koatty_router.requestmethod.md +0 -29
  51. package/docs/api/koatty_router.requestparam.md +0 -27
  52. package/docs/api/koatty_router.router_key.md +0 -11
  53. package/docs/api/koatty_router.routeroption.md +0 -25
  54. package/docs/api/koatty_router.routeroption.method.md +0 -11
  55. package/docs/api/koatty_router.routeroption.path.md +0 -11
  56. package/docs/api/koatty_router.routeroption.requestmethod.md +0 -11
  57. package/docs/api/koatty_router.routeroption.routername.md +0 -11
  58. package/docs/api/koatty_router.serviceimplementation.implementation.md +0 -11
  59. package/docs/api/koatty_router.serviceimplementation.md +0 -23
  60. package/docs/api/koatty_router.serviceimplementation.service.md +0 -11
  61. package/docs/api/koatty_router.websocketrouter._constructor_.md +0 -21
  62. package/docs/api/koatty_router.websocketrouter.app.md +0 -11
  63. package/docs/api/koatty_router.websocketrouter.listrouter.md +0 -17
  64. package/docs/api/koatty_router.websocketrouter.loadrouter.md +0 -22
  65. package/docs/api/koatty_router.websocketrouter.md +0 -35
  66. package/docs/api/koatty_router.websocketrouter.options.md +0 -11
  67. package/docs/api/koatty_router.websocketrouter.router.md +0 -11
  68. package/docs/api/koatty_router.websocketrouter.setrouter.md +0 -25
  69. package/docs/api/koatty_router.websocketrouteroptions.md +0 -23
  70. package/docs/api/koatty_router.websocketrouteroptions.prefix.md +0 -11
  71. package/docs/api/koatty_router.wsimplementation.md +0 -11
  72. package/jest.config.js +0 -34
  73. package/jest_html_reporters.html +0 -60
  74. package/rollup.config.js +0 -63
  75. package/scripts/copyright.js +0 -28
  76. package/scripts/postBuild.js +0 -10
  77. package/tsconfig.json +0 -69
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.6.6](https://github.com/koatty/koatty_router/compare/v1.6.4...v1.6.6) (2022-02-16)
6
+
7
+ ### [1.6.4](https://github.com/koatty/koatty_router/compare/v1.6.4-1...v1.6.4) (2021-12-23)
8
+
9
+ ### [1.6.4-1](https://github.com/koatty/koatty_router/compare/v1.6.4-0...v1.6.4-1) (2021-12-22)
10
+
11
+ ### [1.6.4-0](https://github.com/koatty/koatty_router/compare/v1.6.2...v1.6.4-0) (2021-12-21)
12
+
5
13
  ### [1.6.2](https://github.com/koatty/koatty_router/compare/v1.6.0...v1.6.2) (2021-12-20)
6
14
 
7
15
  ## [1.6.0](https://github.com/koatty/koatty_router/compare/v1.5.16...v1.6.0) (2021-12-19)
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2021-12-21 00:00:59
3
+ * @Date: 2022-02-16 15:29:32
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2021-12-21 00:00:46
3
+ * @Date: 2022-02-16 15:29:10
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
@@ -47,7 +47,7 @@ var KoaRouter__default = /*#__PURE__*/_interopDefaultLegacy(KoaRouter);
47
47
  * @Usage:
48
48
  * @Author: richen
49
49
  * @Date: 2021-11-24 23:21:26
50
- * @LastEditTime: 2021-12-20 23:54:10
50
+ * @LastEditTime: 2021-12-22 01:03:57
51
51
  */
52
52
  /**
53
53
  * Parameter binding assignment.
@@ -57,12 +57,9 @@ var KoaRouter__default = /*#__PURE__*/_interopDefaultLegacy(KoaRouter);
57
57
  * @param {any[]} params
58
58
  * @returns
59
59
  */
60
- async function getParamter(app, ctx, ctlParams = {}) {
61
- var _a, _b;
60
+ async function getParamter(app, ctx, params) {
62
61
  //convert type
63
- const params = (_a = ctlParams.data) !== null && _a !== void 0 ? _a : [];
64
- const validRules = (_b = ctlParams.valids) !== null && _b !== void 0 ? _b : {};
65
- const dtoCheck = ctlParams.dtoCheck || false;
62
+ params = params || [];
66
63
  const props = params.map(async (v, k) => {
67
64
  let value = null;
68
65
  if (v.fn && Helper__namespace.isFunction(v.fn)) {
@@ -73,8 +70,10 @@ async function getParamter(app, ctx, ctlParams = {}) {
73
70
  index: k,
74
71
  isDto: v.isDto,
75
72
  type: v.type,
76
- validRules,
77
- dtoCheck,
73
+ validRules: v.rule,
74
+ dtoCheck: v.dtoCheck,
75
+ dtoRule: v.dtoRule,
76
+ clazz: v.clazz,
78
77
  });
79
78
  });
80
79
  return Promise.all(props);
@@ -92,14 +91,14 @@ async function getParamter(app, ctx, ctlParams = {}) {
92
91
  async function checkParams(app, value, opt) {
93
92
  if (opt.isDto) {
94
93
  // DTO class
95
- const clazz = koatty_container.IOCContainer.getClass(opt.type, "COMPONENT");
96
- if (clazz) {
97
- if (opt.dtoCheck) {
98
- value = await koatty_validation.ClassValidator.valid(clazz, value, true);
99
- }
100
- else {
101
- value = koatty_validation.plainToClass(clazz, value, true);
102
- }
94
+ if (!opt.clazz) {
95
+ opt.clazz = koatty_container.IOCContainer.getClass(opt.type, "COMPONENT");
96
+ }
97
+ if (opt.dtoCheck) {
98
+ value = await koatty_validation.ClassValidator.valid(opt.clazz, value, true);
99
+ }
100
+ else {
101
+ value = koatty_validation.plainToClass(opt.clazz, value, true);
103
102
  }
104
103
  }
105
104
  else {
@@ -120,7 +119,7 @@ async function checkParams(app, value, opt) {
120
119
  * @Usage:
121
120
  * @Author: richen
122
121
  * @Date: 2021-11-10 16:58:57
123
- * @LastEditTime: 2021-12-17 16:39:29
122
+ * @LastEditTime: 2021-12-23 00:43:51
124
123
  */
125
124
  /**
126
125
  * Inject ParameterDecorator
@@ -173,7 +172,9 @@ async function Handler(app, ctx, ctl, method, ctlParams) {
173
172
  if (!ctx || !ctl) {
174
173
  return ctx.throw(404, `Controller not found.`);
175
174
  }
176
- ctl.ctx = ctx;
175
+ if (!ctl.ctx) {
176
+ ctl.ctx = ctx;
177
+ }
177
178
  // inject param
178
179
  let args = [];
179
180
  if (ctlParams) {
@@ -237,22 +238,30 @@ function injectParam(app, target, instance) {
237
238
  // cover to obj
238
239
  const data = ((_a = metaDatas[meta]) !== null && _a !== void 0 ? _a : []).sort((a, b) => a.index - b.index);
239
240
  const validData = (_b = validMetaDatas[meta]) !== null && _b !== void 0 ? _b : [];
240
- const validMetaObj = {};
241
241
  data.forEach((v) => {
242
+ v.rule = {};
242
243
  validData.forEach((it) => {
243
244
  if (v.index === it.index) {
244
- validMetaObj[v.index] = it;
245
+ v.rule = it;
245
246
  }
246
247
  });
247
248
  if (v.type) {
248
249
  v.type = v.isDto ? v.type : (v.type).toLowerCase();
249
250
  }
251
+ v.dtoCheck = (validatedMetaDatas[meta] && validatedMetaDatas[meta].dtoCheck) ? true : false;
252
+ if (v.isDto) {
253
+ v.clazz = koatty_container.IOCContainer.getClass(v.type, "COMPONENT");
254
+ if (v.dtoCheck) {
255
+ v.dtoRule = {};
256
+ const originMap = koatty_container.getOriginMetadata(koatty_validation.PARAM_TYPE_KEY, v.clazz);
257
+ for (const [key, type] of originMap) {
258
+ v.dtoRule[key] = type;
259
+ }
260
+ v.clazz.prototype["_typeDef"] = v.dtoRule;
261
+ }
262
+ }
250
263
  });
251
- argsMetaObj[meta] = {
252
- valids: validMetaObj,
253
- data,
254
- dtoCheck: (validatedMetaDatas[meta] && validatedMetaDatas[meta].dtoCheck) ? true : false
255
- };
264
+ argsMetaObj[meta] = data;
256
265
  }
257
266
  }
258
267
  return argsMetaObj;
package/dist/index.mjs CHANGED
@@ -1,16 +1,16 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2021-12-21 00:00:46
3
+ * @Date: 2022-02-16 15:29:10
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
7
7
  */
8
8
  import koaCompose from 'koa-compose';
9
9
  import * as Helper from 'koatty_lib';
10
- import { IOCContainer, RecursiveGetMetadata } from 'koatty_container';
10
+ import { IOCContainer, RecursiveGetMetadata, getOriginMetadata } from 'koatty_container';
11
11
  import { LoadProto, ListServices } from 'koatty_proto';
12
12
  import { DefaultLogger } from 'koatty_logger';
13
- import { ClassValidator, plainToClass, convertParamsType, ValidatorFuncs, paramterTypes, PARAM_RULE_KEY, PARAM_CHECK_KEY } from 'koatty_validation';
13
+ import { ClassValidator, plainToClass, convertParamsType, ValidatorFuncs, paramterTypes, PARAM_RULE_KEY, PARAM_CHECK_KEY, PARAM_TYPE_KEY } from 'koatty_validation';
14
14
  import KoaRouter from '@koa/router';
15
15
  import 'reflect-metadata';
16
16
 
@@ -19,7 +19,7 @@ import 'reflect-metadata';
19
19
  * @Usage:
20
20
  * @Author: richen
21
21
  * @Date: 2021-11-24 23:21:26
22
- * @LastEditTime: 2021-12-20 23:54:10
22
+ * @LastEditTime: 2021-12-22 01:03:57
23
23
  */
24
24
  /**
25
25
  * Parameter binding assignment.
@@ -29,12 +29,9 @@ import 'reflect-metadata';
29
29
  * @param {any[]} params
30
30
  * @returns
31
31
  */
32
- async function getParamter(app, ctx, ctlParams = {}) {
33
- var _a, _b;
32
+ async function getParamter(app, ctx, params) {
34
33
  //convert type
35
- const params = (_a = ctlParams.data) !== null && _a !== void 0 ? _a : [];
36
- const validRules = (_b = ctlParams.valids) !== null && _b !== void 0 ? _b : {};
37
- const dtoCheck = ctlParams.dtoCheck || false;
34
+ params = params || [];
38
35
  const props = params.map(async (v, k) => {
39
36
  let value = null;
40
37
  if (v.fn && Helper.isFunction(v.fn)) {
@@ -45,8 +42,10 @@ async function getParamter(app, ctx, ctlParams = {}) {
45
42
  index: k,
46
43
  isDto: v.isDto,
47
44
  type: v.type,
48
- validRules,
49
- dtoCheck,
45
+ validRules: v.rule,
46
+ dtoCheck: v.dtoCheck,
47
+ dtoRule: v.dtoRule,
48
+ clazz: v.clazz,
50
49
  });
51
50
  });
52
51
  return Promise.all(props);
@@ -64,14 +63,14 @@ async function getParamter(app, ctx, ctlParams = {}) {
64
63
  async function checkParams(app, value, opt) {
65
64
  if (opt.isDto) {
66
65
  // DTO class
67
- const clazz = IOCContainer.getClass(opt.type, "COMPONENT");
68
- if (clazz) {
69
- if (opt.dtoCheck) {
70
- value = await ClassValidator.valid(clazz, value, true);
71
- }
72
- else {
73
- value = plainToClass(clazz, value, true);
74
- }
66
+ if (!opt.clazz) {
67
+ opt.clazz = IOCContainer.getClass(opt.type, "COMPONENT");
68
+ }
69
+ if (opt.dtoCheck) {
70
+ value = await ClassValidator.valid(opt.clazz, value, true);
71
+ }
72
+ else {
73
+ value = plainToClass(opt.clazz, value, true);
75
74
  }
76
75
  }
77
76
  else {
@@ -92,7 +91,7 @@ async function checkParams(app, value, opt) {
92
91
  * @Usage:
93
92
  * @Author: richen
94
93
  * @Date: 2021-11-10 16:58:57
95
- * @LastEditTime: 2021-12-17 16:39:29
94
+ * @LastEditTime: 2021-12-23 00:43:51
96
95
  */
97
96
  /**
98
97
  * Inject ParameterDecorator
@@ -145,7 +144,9 @@ async function Handler(app, ctx, ctl, method, ctlParams) {
145
144
  if (!ctx || !ctl) {
146
145
  return ctx.throw(404, `Controller not found.`);
147
146
  }
148
- ctl.ctx = ctx;
147
+ if (!ctl.ctx) {
148
+ ctl.ctx = ctx;
149
+ }
149
150
  // inject param
150
151
  let args = [];
151
152
  if (ctlParams) {
@@ -209,22 +210,30 @@ function injectParam(app, target, instance) {
209
210
  // cover to obj
210
211
  const data = ((_a = metaDatas[meta]) !== null && _a !== void 0 ? _a : []).sort((a, b) => a.index - b.index);
211
212
  const validData = (_b = validMetaDatas[meta]) !== null && _b !== void 0 ? _b : [];
212
- const validMetaObj = {};
213
213
  data.forEach((v) => {
214
+ v.rule = {};
214
215
  validData.forEach((it) => {
215
216
  if (v.index === it.index) {
216
- validMetaObj[v.index] = it;
217
+ v.rule = it;
217
218
  }
218
219
  });
219
220
  if (v.type) {
220
221
  v.type = v.isDto ? v.type : (v.type).toLowerCase();
221
222
  }
223
+ v.dtoCheck = (validatedMetaDatas[meta] && validatedMetaDatas[meta].dtoCheck) ? true : false;
224
+ if (v.isDto) {
225
+ v.clazz = IOCContainer.getClass(v.type, "COMPONENT");
226
+ if (v.dtoCheck) {
227
+ v.dtoRule = {};
228
+ const originMap = getOriginMetadata(PARAM_TYPE_KEY, v.clazz);
229
+ for (const [key, type] of originMap) {
230
+ v.dtoRule[key] = type;
231
+ }
232
+ v.clazz.prototype["_typeDef"] = v.dtoRule;
233
+ }
234
+ }
222
235
  });
223
- argsMetaObj[meta] = {
224
- valids: validMetaObj,
225
- data,
226
- dtoCheck: (validatedMetaDatas[meta] && validatedMetaDatas[meta].dtoCheck) ? true : false
227
- };
236
+ argsMetaObj[meta] = data;
228
237
  }
229
238
  }
230
239
  return argsMetaObj;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koatty_router",
3
- "version": "1.6.2",
3
+ "version": "1.6.6",
4
4
  "description": "Koatty routing component, adapt to http1/2, websocket, gRPC.",
5
5
  "scripts": {
6
6
  "build": "npm run build:js && npm run build:dts && npm run build:doc && npm run build:cp",
@@ -21,6 +21,10 @@
21
21
  "version": "conventional-changelog -p angular -i CHANGELOG.md -s"
22
22
  },
23
23
  "main": "./dist/index.js",
24
+ "exports": {
25
+ "require": "./dist/index.js",
26
+ "import": "./dist/index.mjs"
27
+ },
24
28
  "repository": {
25
29
  "type": "git",
26
30
  "url": "git+https://github.com/koatty/koatty_router.git"
@@ -60,7 +64,7 @@
60
64
  "typescript": "^4.x.x"
61
65
  },
62
66
  "dependencies": {
63
- "@grpc/grpc-js": "^1.4.4",
67
+ "@grpc/grpc-js": "^1.5.5",
64
68
  "@koa/router": "^10.1.1",
65
69
  "koa-compose": "^4.1.0",
66
70
  "koatty_container": "^1.x.x",
@@ -71,9 +75,12 @@
71
75
  "koatty_validation": "^1.x.x",
72
76
  "tslib": "^2.3.1"
73
77
  },
74
- "husky": {
75
- "hooks": {
76
- "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
77
- }
78
+ "peerDependencies": {
79
+ "koatty_container": "^1.x.x",
80
+ "koatty_core": "^1.x.x",
81
+ "koatty_lib": "^1.x.x",
82
+ "koatty_logger": "^1.x.x",
83
+ "koatty_proto": "^1.x.x",
84
+ "koatty_validation": "^1.x.x"
78
85
  }
79
86
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koatty_router",
3
- "version": "1.6.2",
3
+ "version": "1.6.6",
4
4
  "description": "Koatty routing component, adapt to http1/2, websocket, gRPC.",
5
5
  "scripts": {
6
6
  "build": "npm run build:js && npm run build:dts && npm run build:doc && npm run build:cp",
@@ -21,6 +21,10 @@
21
21
  "version": "conventional-changelog -p angular -i CHANGELOG.md -s"
22
22
  },
23
23
  "main": "./dist/index.js",
24
+ "exports": {
25
+ "require": "./dist/index.js",
26
+ "import": "./dist/index.mjs"
27
+ },
24
28
  "repository": {
25
29
  "type": "git",
26
30
  "url": "git+https://github.com/koatty/koatty_router.git"
@@ -60,7 +64,7 @@
60
64
  "typescript": "^4.x.x"
61
65
  },
62
66
  "dependencies": {
63
- "@grpc/grpc-js": "^1.4.4",
67
+ "@grpc/grpc-js": "^1.5.5",
64
68
  "@koa/router": "^10.1.1",
65
69
  "koa-compose": "^4.1.0",
66
70
  "koatty_container": "^1.x.x",
@@ -71,9 +75,12 @@
71
75
  "koatty_validation": "^1.x.x",
72
76
  "tslib": "^2.3.1"
73
77
  },
74
- "husky": {
75
- "hooks": {
76
- "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
77
- }
78
+ "peerDependencies": {
79
+ "koatty_container": "^1.x.x",
80
+ "koatty_core": "^1.x.x",
81
+ "koatty_lib": "^1.x.x",
82
+ "koatty_logger": "^1.x.x",
83
+ "koatty_proto": "^1.x.x",
84
+ "koatty_validation": "^1.x.x"
78
85
  }
79
86
  }
package/.commitlintrc.js DELETED
@@ -1,10 +0,0 @@
1
- /*
2
- * @Description:
3
- * @Usage:
4
- * @Author: richen
5
- * @Date: 2021-12-18 20:53:46
6
- * @LastEditTime: 2021-12-18 20:53:47
7
- */
8
- module.exports = {
9
- extends: ["gitmoji"],
10
- };
package/.eslintignore DELETED
@@ -1,11 +0,0 @@
1
- node_modules
2
- .eslintrc.js
3
- **/package-lock.json
4
- **/yarn.lock
5
- **/*.config.js
6
- dist
7
- temp
8
- scripts
9
- coverage
10
- test
11
- demo
package/.eslintrc.js DELETED
@@ -1,43 +0,0 @@
1
- /**
2
- *
3
- */
4
- module.exports = {
5
- root: true,
6
- parser: '@typescript-eslint/parser',
7
- extends: [
8
- 'plugin:@typescript-eslint/recommended', // 使用@typescript-eslint/eslint-plugin的推荐规则
9
- 'plugin:jest/recommended',
10
- ],
11
- plugins: [
12
- '@typescript-eslint',
13
- 'jest',
14
- ],
15
- parserOptions: {
16
- project: './tsconfig.json',
17
- },
18
- env: {
19
- node: true,
20
- mongo: true,
21
- jest: true,
22
- },
23
- rules: {
24
- "@typescript-eslint/no-explicit-any": "off",
25
- // "@typescript-eslint/no-require-imports": "off",
26
- "@typescript-eslint/no-var-requires": "off",
27
- "@typescript-eslint/member-ordering": "off",
28
- "@typescript-eslint/consistent-type-assertions": "off",
29
- "@typescript-eslint/no-param-reassign": "off",
30
- "@typescript-eslint/no-empty-function": "off",
31
- "@typescript-eslint/no-empty-interface": "off",
32
- "@typescript-eslint/explicit-module-boundary-types": "off",
33
- "@typescript-eslint/ban-types": ["error",
34
- {
35
- "types": {
36
- "Object": false,
37
- "Function": false,
38
- },
39
- "extendDefaults": true
40
- }
41
- ],
42
- },
43
- };
package/.huskyrc DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "hooks": {
3
- "commit-msg": "commitlint -e $HUSKY_GIT_PARAMS"
4
- }
5
- }
package/.versionrc.js DELETED
@@ -1,16 +0,0 @@
1
- module.exports = {
2
- // skip: {
3
- // tag: true,
4
- // },
5
- //server-version自动commit的模板
6
- releaseCommitMessageFormat:
7
- "🔧 build: v{{currentTag}}",
8
- //需要server-version更新版本号的文件
9
- bumpFiles: [
10
- {
11
- filename: "package.json",
12
- // The `json` updater assumes the version is available under a `version` key in the provided JSON document.
13
- type: "json",
14
- },
15
- ],
16
- };