koatty 3.5.12-1 → 3.5.14

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 (79) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/index.d.ts +17 -13
  3. package/dist/index.js +33 -43
  4. package/dist/index.mjs +33 -43
  5. package/dist/package.json +8 -8
  6. package/package.json +8 -8
  7. package/.commitlintrc.js +0 -3
  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.apiinput.code.md +0 -11
  15. package/docs/api/koatty.apiinput.data.md +0 -11
  16. package/docs/api/koatty.apiinput.md +0 -22
  17. package/docs/api/koatty.apiinput.message.md +0 -11
  18. package/docs/api/koatty.apioutput.code.md +0 -11
  19. package/docs/api/koatty.apioutput.data.md +0 -11
  20. package/docs/api/koatty.apioutput.md +0 -22
  21. package/docs/api/koatty.apioutput.message.md +0 -11
  22. package/docs/api/koatty.appreadyhookfunc.md +0 -11
  23. package/docs/api/koatty.basecontroller._constructor_.md +0 -20
  24. package/docs/api/koatty.basecontroller._options.md +0 -11
  25. package/docs/api/koatty.basecontroller.app.md +0 -11
  26. package/docs/api/koatty.basecontroller.ctx.md +0 -11
  27. package/docs/api/koatty.basecontroller.fail.md +0 -28
  28. package/docs/api/koatty.basecontroller.init.md +0 -19
  29. package/docs/api/koatty.basecontroller.md +0 -39
  30. package/docs/api/koatty.basecontroller.ok.md +0 -28
  31. package/docs/api/koatty.baseservice._constructor_.md +0 -20
  32. package/docs/api/koatty.baseservice._options.md +0 -11
  33. package/docs/api/koatty.baseservice.app.md +0 -11
  34. package/docs/api/koatty.baseservice.init.md +0 -25
  35. package/docs/api/koatty.baseservice.md +0 -36
  36. package/docs/api/koatty.bindappreadyhook.md +0 -26
  37. package/docs/api/koatty.bootstrap.md +0 -27
  38. package/docs/api/koatty.component.md +0 -27
  39. package/docs/api/koatty.componentscan.md +0 -27
  40. package/docs/api/koatty.configurationscan.md +0 -27
  41. package/docs/api/koatty.controller.md +0 -27
  42. package/docs/api/koatty.httpcontroller.body.md +0 -28
  43. package/docs/api/koatty.httpcontroller.deny.md +0 -26
  44. package/docs/api/koatty.httpcontroller.expires.md +0 -26
  45. package/docs/api/koatty.httpcontroller.fail.md +0 -28
  46. package/docs/api/koatty.httpcontroller.header.md +0 -27
  47. package/docs/api/koatty.httpcontroller.isget.md +0 -19
  48. package/docs/api/koatty.httpcontroller.ismethod.md +0 -26
  49. package/docs/api/koatty.httpcontroller.ispost.md +0 -19
  50. package/docs/api/koatty.httpcontroller.json.md +0 -26
  51. package/docs/api/koatty.httpcontroller.md +0 -35
  52. package/docs/api/koatty.httpcontroller.ok.md +0 -28
  53. package/docs/api/koatty.httpcontroller.param.md +0 -26
  54. package/docs/api/koatty.httpcontroller.redirect.md +0 -27
  55. package/docs/api/koatty.httpcontroller.type.md +0 -27
  56. package/docs/api/koatty.icontroller.__after.md +0 -11
  57. package/docs/api/koatty.icontroller.__befor.md +0 -11
  58. package/docs/api/koatty.icontroller.app.md +0 -11
  59. package/docs/api/koatty.icontroller.ctx.md +0 -11
  60. package/docs/api/koatty.icontroller.fail.md +0 -11
  61. package/docs/api/koatty.icontroller.md +0 -25
  62. package/docs/api/koatty.icontroller.ok.md +0 -11
  63. package/docs/api/koatty.imiddleware.md +0 -20
  64. package/docs/api/koatty.imiddleware.run.md +0 -11
  65. package/docs/api/koatty.iplugin.md +0 -20
  66. package/docs/api/koatty.iplugin.run.md +0 -11
  67. package/docs/api/koatty.iservice.app.md +0 -11
  68. package/docs/api/koatty.iservice.md +0 -20
  69. package/docs/api/koatty.logger.md +0 -11
  70. package/docs/api/koatty.md +0 -51
  71. package/docs/api/koatty.middleware.md +0 -27
  72. package/docs/api/koatty.plugin.md +0 -27
  73. package/docs/api/koatty.service.md +0 -27
  74. package/jest.config.js +0 -34
  75. package/jest_html_reporters.html +0 -60
  76. package/rollup.config.js +0 -63
  77. package/scripts/copyright.js +0 -28
  78. package/scripts/postBuild.js +0 -10
  79. 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
+ ### [3.5.14](https://github.com/thinkkoa/koatty/compare/v3.5.12...v3.5.14) (2022-01-17)
6
+
7
+ ### [3.5.12](https://github.com/thinkkoa/koatty/compare/v3.5.12-3...v3.5.12) (2021-12-23)
8
+
9
+ ### [3.5.12-3](https://github.com/thinkkoa/koatty/compare/v3.5.12-2...v3.5.12-3) (2021-12-23)
10
+
11
+ ### [3.5.12-2](https://github.com/thinkkoa/koatty/compare/v3.5.12-1...v3.5.12-2) (2021-12-21)
12
+
5
13
  ### [3.5.12-1](https://github.com/thinkkoa/koatty/compare/v3.5.12-0...v3.5.12-1) (2021-12-21)
6
14
 
7
15
  ### [3.5.12-0](https://github.com/thinkkoa/koatty/compare/v3.5.10...v3.5.12-0) (2021-12-21)
package/dist/index.d.ts CHANGED
@@ -1,16 +1,15 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2021-12-21 12:33:10
3
+ * @Date: 2022-01-17 10:38:50
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 { Helper } from 'koatty_lib';
9
- import Koa from 'koa';
10
9
  import { Koatty } from 'koatty_core';
11
10
  import { KoattyContext } from 'koatty_core';
11
+ import { KoattyNext } from 'koatty_core';
12
12
  import { Logger as Logger_2 } from 'koatty_logger';
13
- import { ObjectDefinitionOptions } from 'koatty_container';
14
13
 
15
14
  /**
16
15
  * Interface for Api input
@@ -40,7 +39,7 @@ export declare type AppReadyHookFunc = (app: Koatty) => Promise<any>;
40
39
  * @implements {IController}
41
40
  */
42
41
  export declare class BaseController implements IController {
43
- app: Koatty;
42
+ readonly app: Koatty;
44
43
  readonly ctx: KoattyContext;
45
44
  /**
46
45
  * instance of BaseController.
@@ -83,18 +82,18 @@ export declare class BaseController implements IController {
83
82
  * @class Base
84
83
  */
85
84
  export declare class BaseService implements IService {
86
- app: Koatty;
85
+ readonly app: Koatty;
87
86
  /**
88
- * instance of Base.
89
- * @param {...any[]} arg
90
- * @memberof Base
87
+ * instance of BaseController.
88
+ * @param {Koatty} app
89
+ * @param {KoattyContext} ctx
90
+ * @memberof BaseController
91
91
  */
92
92
  /**
93
93
  * init
94
94
  *
95
95
  * @protected
96
- * @param {...any[]} arg
97
- * @memberof Base
96
+ * @memberof BaseController
98
97
  */
99
98
  }
100
99
 
@@ -294,7 +293,7 @@ export declare class HttpController extends BaseController {
294
293
  * Interface for Controller
295
294
  */
296
295
  export declare interface IController {
297
- app: Koatty;
296
+ readonly app: Koatty;
298
297
  readonly ctx: KoattyContext;
299
298
  __befor?: () => Promise<any>;
300
299
  __after?: () => Promise<any>;
@@ -306,7 +305,7 @@ export declare interface IController {
306
305
  * Interface for Middleware
307
306
  */
308
307
  export declare interface IMiddleware {
309
- run: (options: any, app: Koatty) => Koa.Middleware;
308
+ run: (options: any, app: Koatty) => KoattyMiddleware;
310
309
  }
311
310
 
312
311
  /**
@@ -320,9 +319,14 @@ export declare interface IPlugin {
320
319
  * Interface for Service
321
320
  */
322
321
  export declare interface IService {
323
- app: Koatty;
322
+ readonly app: Koatty;
324
323
  }
325
324
 
325
+ /**
326
+ * Interface for Middleware
327
+ */
328
+ export declare type KoattyMiddleware = (ctx: KoattyContext, next: KoattyNext) => Promise<any>;
329
+
326
330
  export declare const Logger: Logger_2;
327
331
 
328
332
  /**
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2021-12-21 12:32:53
3
+ * @Date: 2022-01-17 10:38:33
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
@@ -136,9 +136,9 @@ class BaseController {
136
136
  * @param {KoattyContext} ctx
137
137
  * @memberof BaseController
138
138
  */
139
- constructor(ctx) {
139
+ constructor(ctx, ...arg) {
140
140
  this.ctx = ctx;
141
- this.init();
141
+ this.init(arg);
142
142
  }
143
143
  /**
144
144
  * init
@@ -146,10 +146,10 @@ class BaseController {
146
146
  * @protected
147
147
  * @memberof BaseController
148
148
  */
149
- init() {
149
+ init(...arg) {
150
150
  }
151
151
  // /**
152
- // * Class pre-execution method, executed before each class member methods (except constructor, init, __after) are executed.
152
+ // * Class pre-execution method (except constructor, init, __after).
153
153
  // *
154
154
  // * @returns {Promise<any>}
155
155
  // * @memberof BaseController
@@ -158,7 +158,7 @@ class BaseController {
158
158
  // return Promise.resolve();
159
159
  // }
160
160
  // /**
161
- // * Class after-execution method,after each class member methods (except constructor, init, __before) are executed.
161
+ // * Class after-execution method (except constructor, init, __before).
162
162
  // *
163
163
  // * @public
164
164
  // * @returns {*}
@@ -462,34 +462,6 @@ function SetLogger(config) {
462
462
  }
463
463
  }
464
464
 
465
- /**
466
- * Base class
467
- *
468
- * @export
469
- * @class Base
470
- */
471
- class BaseService {
472
- /**
473
- * instance of Base.
474
- * @param {...any[]} arg
475
- * @memberof Base
476
- */
477
- constructor(...arg) {
478
- this.init(arg);
479
- }
480
- /**
481
- * init
482
- *
483
- * @protected
484
- * @param {...any[]} arg
485
- * @memberof Base
486
- */
487
- init(...arg) {
488
- // todo
489
- // Logger.Debug(arg)
490
- }
491
- }
492
-
493
465
  /**
494
466
  * @ author: richen
495
467
  * @ copyright: Copyright (c) - <richenlin(at)gmail.com>
@@ -830,10 +802,6 @@ class Loader {
830
802
  Logger.Debug(`Load service: ${item.id}`);
831
803
  // registering to IOC
832
804
  koatty_container.IOCContainer.reg(item.id, item.target, { scope: "Singleton", type: "SERVICE", args: [] });
833
- const ctl = koatty_container.IOCContainer.getInsByClass(item.target);
834
- if (!(ctl instanceof BaseService)) {
835
- throw new Error(`class ${item.id} does not inherit from BaseService`);
836
- }
837
805
  }
838
806
  });
839
807
  }
@@ -851,8 +819,6 @@ class Loader {
851
819
  item.id = ((_a = item.id) !== null && _a !== void 0 ? _a : "").replace("COMPONENT:", "");
852
820
  if (item.id && !(item.id).endsWith("Plugin") && koatty_lib.Helper.isClass(item.target)) {
853
821
  Logger.Debug(`Load component: ${item.id}`);
854
- // inject schedule
855
- // injectSchedule(item.target, item.target.prototype, IOCContainer);
856
822
  // registering to IOC
857
823
  koatty_container.IOCContainer.reg(item.id, item.target, { scope: "Singleton", type: "COMPONENT", args: [] });
858
824
  }
@@ -877,7 +843,6 @@ class Loader {
877
843
  var _a;
878
844
  item.id = ((_a = item.id) !== null && _a !== void 0 ? _a : "").replace("COMPONENT:", "");
879
845
  if (item.id && (item.id).endsWith("Plugin") && koatty_lib.Helper.isClass(item.target)) {
880
- // Logger.Debug(`Load plugin: ${item.id}`);
881
846
  // registering to IOC
882
847
  koatty_container.IOCContainer.reg(item.id, item.target, { scope: "Singleton", type: "COMPONENT", args: [] });
883
848
  pluginList.push(item.id);
@@ -896,14 +861,13 @@ class Loader {
896
861
  if (pluginsConf.config[key] === false) {
897
862
  continue;
898
863
  }
899
- // Logger.Debug(`Execute plugin: ${key}`);
900
864
  // sync exec
901
865
  await handle.run((_a = pluginsConf.config[key]) !== null && _a !== void 0 ? _a : {}, app);
902
866
  }
903
867
  }
904
868
  }
905
869
 
906
- var version = "3.5.12-1";
870
+ var version = "3.5.14";
907
871
  var engines = {
908
872
  node: ">12.0.0"
909
873
  };
@@ -1211,6 +1175,32 @@ function Plugin(identifier) {
1211
1175
  };
1212
1176
  }
1213
1177
 
1178
+ /**
1179
+ * Base class
1180
+ *
1181
+ * @export
1182
+ * @class Base
1183
+ */
1184
+ class BaseService {
1185
+ /**
1186
+ * instance of BaseController.
1187
+ * @param {Koatty} app
1188
+ * @param {KoattyContext} ctx
1189
+ * @memberof BaseController
1190
+ */
1191
+ constructor(...arg) {
1192
+ this.init(arg);
1193
+ }
1194
+ /**
1195
+ * init
1196
+ *
1197
+ * @protected
1198
+ * @memberof BaseController
1199
+ */
1200
+ init(...arg) {
1201
+ }
1202
+ }
1203
+
1214
1204
  Object.defineProperty(exports, 'Helper', {
1215
1205
  enumerable: true,
1216
1206
  get: function () { return koatty_lib.Helper; }
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2021-12-21 12:32:53
3
+ * @Date: 2022-01-17 10:38:33
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
@@ -119,9 +119,9 @@ class BaseController {
119
119
  * @param {KoattyContext} ctx
120
120
  * @memberof BaseController
121
121
  */
122
- constructor(ctx) {
122
+ constructor(ctx, ...arg) {
123
123
  this.ctx = ctx;
124
- this.init();
124
+ this.init(arg);
125
125
  }
126
126
  /**
127
127
  * init
@@ -129,10 +129,10 @@ class BaseController {
129
129
  * @protected
130
130
  * @memberof BaseController
131
131
  */
132
- init() {
132
+ init(...arg) {
133
133
  }
134
134
  // /**
135
- // * Class pre-execution method, executed before each class member methods (except constructor, init, __after) are executed.
135
+ // * Class pre-execution method (except constructor, init, __after).
136
136
  // *
137
137
  // * @returns {Promise<any>}
138
138
  // * @memberof BaseController
@@ -141,7 +141,7 @@ class BaseController {
141
141
  // return Promise.resolve();
142
142
  // }
143
143
  // /**
144
- // * Class after-execution method,after each class member methods (except constructor, init, __before) are executed.
144
+ // * Class after-execution method (except constructor, init, __before).
145
145
  // *
146
146
  // * @public
147
147
  // * @returns {*}
@@ -445,34 +445,6 @@ function SetLogger(config) {
445
445
  }
446
446
  }
447
447
 
448
- /**
449
- * Base class
450
- *
451
- * @export
452
- * @class Base
453
- */
454
- class BaseService {
455
- /**
456
- * instance of Base.
457
- * @param {...any[]} arg
458
- * @memberof Base
459
- */
460
- constructor(...arg) {
461
- this.init(arg);
462
- }
463
- /**
464
- * init
465
- *
466
- * @protected
467
- * @param {...any[]} arg
468
- * @memberof Base
469
- */
470
- init(...arg) {
471
- // todo
472
- // Logger.Debug(arg)
473
- }
474
- }
475
-
476
448
  /**
477
449
  * @ author: richen
478
450
  * @ copyright: Copyright (c) - <richenlin(at)gmail.com>
@@ -813,10 +785,6 @@ class Loader {
813
785
  Logger.Debug(`Load service: ${item.id}`);
814
786
  // registering to IOC
815
787
  IOCContainer.reg(item.id, item.target, { scope: "Singleton", type: "SERVICE", args: [] });
816
- const ctl = IOCContainer.getInsByClass(item.target);
817
- if (!(ctl instanceof BaseService)) {
818
- throw new Error(`class ${item.id} does not inherit from BaseService`);
819
- }
820
788
  }
821
789
  });
822
790
  }
@@ -834,8 +802,6 @@ class Loader {
834
802
  item.id = ((_a = item.id) !== null && _a !== void 0 ? _a : "").replace("COMPONENT:", "");
835
803
  if (item.id && !(item.id).endsWith("Plugin") && Helper.isClass(item.target)) {
836
804
  Logger.Debug(`Load component: ${item.id}`);
837
- // inject schedule
838
- // injectSchedule(item.target, item.target.prototype, IOCContainer);
839
805
  // registering to IOC
840
806
  IOCContainer.reg(item.id, item.target, { scope: "Singleton", type: "COMPONENT", args: [] });
841
807
  }
@@ -860,7 +826,6 @@ class Loader {
860
826
  var _a;
861
827
  item.id = ((_a = item.id) !== null && _a !== void 0 ? _a : "").replace("COMPONENT:", "");
862
828
  if (item.id && (item.id).endsWith("Plugin") && Helper.isClass(item.target)) {
863
- // Logger.Debug(`Load plugin: ${item.id}`);
864
829
  // registering to IOC
865
830
  IOCContainer.reg(item.id, item.target, { scope: "Singleton", type: "COMPONENT", args: [] });
866
831
  pluginList.push(item.id);
@@ -879,14 +844,13 @@ class Loader {
879
844
  if (pluginsConf.config[key] === false) {
880
845
  continue;
881
846
  }
882
- // Logger.Debug(`Execute plugin: ${key}`);
883
847
  // sync exec
884
848
  await handle.run((_a = pluginsConf.config[key]) !== null && _a !== void 0 ? _a : {}, app);
885
849
  }
886
850
  }
887
851
  }
888
852
 
889
- var version = "3.5.12-1";
853
+ var version = "3.5.14";
890
854
  var engines = {
891
855
  node: ">12.0.0"
892
856
  };
@@ -1194,4 +1158,30 @@ function Plugin(identifier) {
1194
1158
  };
1195
1159
  }
1196
1160
 
1161
+ /**
1162
+ * Base class
1163
+ *
1164
+ * @export
1165
+ * @class Base
1166
+ */
1167
+ class BaseService {
1168
+ /**
1169
+ * instance of BaseController.
1170
+ * @param {Koatty} app
1171
+ * @param {KoattyContext} ctx
1172
+ * @memberof BaseController
1173
+ */
1174
+ constructor(...arg) {
1175
+ this.init(arg);
1176
+ }
1177
+ /**
1178
+ * init
1179
+ *
1180
+ * @protected
1181
+ * @memberof BaseController
1182
+ */
1183
+ init(...arg) {
1184
+ }
1185
+ }
1186
+
1197
1187
  export { BaseController, BaseService, BindAppReadyHook, Bootstrap, Component, ComponentScan, ConfigurationScan, Controller, HttpController, Logger, Middleware, Plugin, Service };
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koatty",
3
- "version": "3.5.12-1",
3
+ "version": "3.5.14",
4
4
  "description": "Koa2 + Typescript = koatty. Use Typescript's decorator implement auto injection.",
5
5
  "scripts": {
6
6
  "build": "npm run build:js && npm run build:dts && npm run build:doc && npm run build:cp",
@@ -22,8 +22,8 @@
22
22
  },
23
23
  "main": "./dist/index.js",
24
24
  "exports": {
25
- "require": "./index.js",
26
- "import": "./index.mjs"
25
+ "require": "./dist/index.js",
26
+ "import": "./dist/index.mjs"
27
27
  },
28
28
  "directories": {
29
29
  "doc": "docs"
@@ -82,16 +82,16 @@
82
82
  "dependencies": {
83
83
  "koa": "^2.13.4",
84
84
  "koatty_config": "^1.0.6",
85
- "koatty_container": "^1.6.12",
86
- "koatty_core": "^1.4.6",
85
+ "koatty_container": "^1.6.16",
86
+ "koatty_core": "^1.4.14",
87
87
  "koatty_exception": "^1.0.6",
88
88
  "koatty_lib": "^1.2.8",
89
89
  "koatty_loader": "^1.0.2",
90
90
  "koatty_logger": "^1.3.12",
91
91
  "koatty_payload": "^1.3.10",
92
- "koatty_router": "^1.6.2",
93
- "koatty_serve": "^1.4.2",
94
- "koatty_trace": "^1.5.0",
92
+ "koatty_router": "^1.6.4",
93
+ "koatty_serve": "^1.4.4",
94
+ "koatty_trace": "^1.5.2",
95
95
  "reflect-metadata": "^0.1.13",
96
96
  "tslib": "^2.3.1"
97
97
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koatty",
3
- "version": "3.5.12-1",
3
+ "version": "3.5.14",
4
4
  "description": "Koa2 + Typescript = koatty. Use Typescript's decorator implement auto injection.",
5
5
  "scripts": {
6
6
  "build": "npm run build:js && npm run build:dts && npm run build:doc && npm run build:cp",
@@ -22,8 +22,8 @@
22
22
  },
23
23
  "main": "./dist/index.js",
24
24
  "exports": {
25
- "require": "./index.js",
26
- "import": "./index.mjs"
25
+ "require": "./dist/index.js",
26
+ "import": "./dist/index.mjs"
27
27
  },
28
28
  "directories": {
29
29
  "doc": "docs"
@@ -82,16 +82,16 @@
82
82
  "dependencies": {
83
83
  "koa": "^2.13.4",
84
84
  "koatty_config": "^1.0.6",
85
- "koatty_container": "^1.6.12",
86
- "koatty_core": "^1.4.6",
85
+ "koatty_container": "^1.6.16",
86
+ "koatty_core": "^1.4.14",
87
87
  "koatty_exception": "^1.0.6",
88
88
  "koatty_lib": "^1.2.8",
89
89
  "koatty_loader": "^1.0.2",
90
90
  "koatty_logger": "^1.3.12",
91
91
  "koatty_payload": "^1.3.10",
92
- "koatty_router": "^1.6.2",
93
- "koatty_serve": "^1.4.2",
94
- "koatty_trace": "^1.5.0",
92
+ "koatty_router": "^1.6.4",
93
+ "koatty_serve": "^1.4.4",
94
+ "koatty_trace": "^1.5.2",
95
95
  "reflect-metadata": "^0.1.13",
96
96
  "tslib": "^2.3.1"
97
97
  }
package/.commitlintrc.js DELETED
@@ -1,3 +0,0 @@
1
- module.exports = {
2
- extends: ["gitmoji"],
3
- };
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
- };