koatty 3.11.8 → 3.11.9

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
@@ -2,6 +2,8 @@
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.11.9](https://github.com/thinkkoa/koatty/compare/v3.11.8...v3.11.9) (2025-01-14)
6
+
5
7
  ### [3.11.8](https://github.com/thinkkoa/koatty/compare/v3.11.7...v3.11.8) (2025-01-14)
6
8
 
7
9
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2025-01-14 15:03:16
3
+ * @Date: 2025-01-14 16:20:30
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: 2025-01-14 15:02:55
3
+ * @Date: 2025-01-14 16:20:07
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
@@ -11,8 +11,8 @@ var koatty_config = require('koatty_config');
11
11
  var koatty_container = require('koatty_container');
12
12
  var koatty_core = require('koatty_core');
13
13
  var koatty_exception = require('koatty_exception');
14
- var koatty_router = require('koatty_router');
15
14
  var koatty_lib = require('koatty_lib');
15
+ var koatty_router = require('koatty_router');
16
16
  var koatty_logger = require('koatty_logger');
17
17
  var koatty_loader = require('koatty_loader');
18
18
  var koatty_serve = require('koatty_serve');
@@ -37,6 +37,11 @@ function _interopNamespaceDefault(e) {
37
37
 
38
38
  var path__namespace = /*#__PURE__*/_interopNamespaceDefault(path);
39
39
 
40
+ var version = "3.11.9";
41
+ var engines = {
42
+ node: ">12.0.0"
43
+ };
44
+
40
45
  /*
41
46
  * @Description: framework logger
42
47
  * @Usage:
@@ -72,63 +77,17 @@ function SetLogger(app, config) {
72
77
  }
73
78
  }
74
79
 
75
- var version = "3.11.8";
76
- var engines = {
77
- node: ">12.0.0"
78
- };
79
-
80
80
  /*
81
- * @Description: framework runtime checker
81
+ * @Description: framework helper
82
82
  * @Usage:
83
83
  * @Author: richen
84
84
  * @Date: 2023-12-09 21:56:32
85
- * @LastEditTime: 2023-12-09 23:01:22
85
+ * @LastEditTime: 2025-01-14 16:14:10
86
86
  * @License: BSD (3-Clause)
87
87
  * @Copyright (c): <richenlin(at)gmail.com>
88
88
  */
89
89
  const KOATTY_VERSION = version;
90
90
  const ENGINES_VERSION = engines.node.slice(1) || '12.0.0';
91
- /**
92
- * check node version
93
- * @return {void} []
94
- */
95
- function checkRuntime() {
96
- let nodeEngines = ENGINES_VERSION;
97
- nodeEngines = nodeEngines.slice(0, nodeEngines.lastIndexOf('.'));
98
- let nodeVersion = process.version;
99
- if (nodeVersion[0] === 'v') {
100
- nodeVersion = nodeVersion.slice(1);
101
- }
102
- nodeVersion = nodeVersion.slice(0, nodeVersion.lastIndexOf('.'));
103
- if (koatty_lib.Helper.toNumber(nodeEngines) > koatty_lib.Helper.toNumber(nodeVersion)) {
104
- Logger.Error(`Koatty need node version > ${nodeEngines}, current version is ${nodeVersion}, please upgrade it.`);
105
- process.exit(-1);
106
- }
107
- }
108
- /**
109
- * unittest running environment detection
110
- * only support jest
111
- * @returns {boolean}
112
- */
113
- const checkUTRuntime = () => {
114
- let isUTRuntime = false;
115
- // UT运行环境判断,暂时先只判断jest
116
- const argv = JSON.stringify(process.argv[1]);
117
- if (argv.indexOf('jest') > -1) {
118
- isUTRuntime = true;
119
- }
120
- return isUTRuntime;
121
- };
122
-
123
- /*
124
- * @Description: framework helper
125
- * @Usage:
126
- * @Author: richen
127
- * @Date: 2023-12-09 21:56:32
128
- * @LastEditTime: 2024-01-16 01:20:17
129
- * @License: BSD (3-Clause)
130
- * @Copyright (c): <richenlin(at)gmail.com>
131
- */
132
91
  /**
133
92
  * Check class file
134
93
  * name should be always the same as class name
@@ -165,6 +124,37 @@ function checkClass(fileName, xpath, target, exSet) {
165
124
  exSet.add(fileName);
166
125
  return;
167
126
  }
127
+ /**
128
+ * check node version
129
+ * @return {void} []
130
+ */
131
+ function checkRuntime() {
132
+ let nodeEngines = ENGINES_VERSION;
133
+ nodeEngines = nodeEngines.slice(0, nodeEngines.lastIndexOf('.'));
134
+ let nodeVersion = process.version;
135
+ if (nodeVersion[0] === 'v') {
136
+ nodeVersion = nodeVersion.slice(1);
137
+ }
138
+ nodeVersion = nodeVersion.slice(0, nodeVersion.lastIndexOf('.'));
139
+ if (koatty_lib.Helper.toNumber(nodeEngines) > koatty_lib.Helper.toNumber(nodeVersion)) {
140
+ Logger.Error(`Koatty need node version > ${nodeEngines}, current version is ${nodeVersion}, please upgrade it.`);
141
+ process.exit(-1);
142
+ }
143
+ }
144
+ /**
145
+ * unittest running environment detection
146
+ * only support jest
147
+ * @returns {boolean}
148
+ */
149
+ const checkUTRuntime = () => {
150
+ let isUTRuntime = false;
151
+ // UT运行环境判断,暂时先只判断jest
152
+ const argv = JSON.stringify(process.argv[1]);
153
+ if (argv.indexOf('jest') > -1) {
154
+ isUTRuntime = true;
155
+ }
156
+ return isUTRuntime;
157
+ };
168
158
 
169
159
  /*
170
160
  * @Description: framework constants
@@ -192,7 +182,7 @@ https://github.com/koatty
192
182
  * @Usage:
193
183
  * @Author: richen
194
184
  * @Date: 2023-12-09 22:55:49
195
- * @LastEditTime: 2025-01-14 14:21:56
185
+ * @LastEditTime: 2025-01-14 16:12:59
196
186
  * @License: BSD (3-Clause)
197
187
  * @Copyright (c): <richenlin(at)gmail.com>
198
188
  */
@@ -617,7 +607,7 @@ class Loader {
617
607
  * @Usage:
618
608
  * @Author: richen
619
609
  * @Date: 2021-12-09 21:56:32
620
- * @LastEditTime: 2024-11-29 18:13:06
610
+ * @LastEditTime: 2025-01-14 16:11:21
621
611
  * @License: BSD (3-Clause)
622
612
  * @Copyright (c): <richenlin(at)gmail.com>
623
613
  */
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2025-01-14 15:02:55
3
+ * @Date: 2025-01-14 16:20:07
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
@@ -12,15 +12,20 @@ export * from 'koatty_container';
12
12
  import { AppEventArr, implementsMiddlewareInterface, implementsControllerInterface, implementsServiceInterface, implementsPluginInterface, implementsAspectInterface, Koatty } from 'koatty_core';
13
13
  export * from 'koatty_core';
14
14
  export * from 'koatty_exception';
15
- import { NewRouter } from 'koatty_router';
16
- export * from 'koatty_router';
17
15
  import { Helper } from 'koatty_lib';
18
16
  export { Helper } from 'koatty_lib';
17
+ import { NewRouter } from 'koatty_router';
18
+ export * from 'koatty_router';
19
19
  import { DefaultLogger } from 'koatty_logger';
20
20
  import { Load } from 'koatty_loader';
21
21
  import { NewServe } from 'koatty_serve';
22
22
  import * as path from 'path';
23
23
 
24
+ var version = "3.11.9";
25
+ var engines = {
26
+ node: ">12.0.0"
27
+ };
28
+
24
29
  /*
25
30
  * @Description: framework logger
26
31
  * @Usage:
@@ -56,63 +61,17 @@ function SetLogger(app, config) {
56
61
  }
57
62
  }
58
63
 
59
- var version = "3.11.8";
60
- var engines = {
61
- node: ">12.0.0"
62
- };
63
-
64
64
  /*
65
- * @Description: framework runtime checker
65
+ * @Description: framework helper
66
66
  * @Usage:
67
67
  * @Author: richen
68
68
  * @Date: 2023-12-09 21:56:32
69
- * @LastEditTime: 2023-12-09 23:01:22
69
+ * @LastEditTime: 2025-01-14 16:14:10
70
70
  * @License: BSD (3-Clause)
71
71
  * @Copyright (c): <richenlin(at)gmail.com>
72
72
  */
73
73
  const KOATTY_VERSION = version;
74
74
  const ENGINES_VERSION = engines.node.slice(1) || '12.0.0';
75
- /**
76
- * check node version
77
- * @return {void} []
78
- */
79
- function checkRuntime() {
80
- let nodeEngines = ENGINES_VERSION;
81
- nodeEngines = nodeEngines.slice(0, nodeEngines.lastIndexOf('.'));
82
- let nodeVersion = process.version;
83
- if (nodeVersion[0] === 'v') {
84
- nodeVersion = nodeVersion.slice(1);
85
- }
86
- nodeVersion = nodeVersion.slice(0, nodeVersion.lastIndexOf('.'));
87
- if (Helper.toNumber(nodeEngines) > Helper.toNumber(nodeVersion)) {
88
- Logger.Error(`Koatty need node version > ${nodeEngines}, current version is ${nodeVersion}, please upgrade it.`);
89
- process.exit(-1);
90
- }
91
- }
92
- /**
93
- * unittest running environment detection
94
- * only support jest
95
- * @returns {boolean}
96
- */
97
- const checkUTRuntime = () => {
98
- let isUTRuntime = false;
99
- // UT运行环境判断,暂时先只判断jest
100
- const argv = JSON.stringify(process.argv[1]);
101
- if (argv.indexOf('jest') > -1) {
102
- isUTRuntime = true;
103
- }
104
- return isUTRuntime;
105
- };
106
-
107
- /*
108
- * @Description: framework helper
109
- * @Usage:
110
- * @Author: richen
111
- * @Date: 2023-12-09 21:56:32
112
- * @LastEditTime: 2024-01-16 01:20:17
113
- * @License: BSD (3-Clause)
114
- * @Copyright (c): <richenlin(at)gmail.com>
115
- */
116
75
  /**
117
76
  * Check class file
118
77
  * name should be always the same as class name
@@ -149,6 +108,37 @@ function checkClass(fileName, xpath, target, exSet) {
149
108
  exSet.add(fileName);
150
109
  return;
151
110
  }
111
+ /**
112
+ * check node version
113
+ * @return {void} []
114
+ */
115
+ function checkRuntime() {
116
+ let nodeEngines = ENGINES_VERSION;
117
+ nodeEngines = nodeEngines.slice(0, nodeEngines.lastIndexOf('.'));
118
+ let nodeVersion = process.version;
119
+ if (nodeVersion[0] === 'v') {
120
+ nodeVersion = nodeVersion.slice(1);
121
+ }
122
+ nodeVersion = nodeVersion.slice(0, nodeVersion.lastIndexOf('.'));
123
+ if (Helper.toNumber(nodeEngines) > Helper.toNumber(nodeVersion)) {
124
+ Logger.Error(`Koatty need node version > ${nodeEngines}, current version is ${nodeVersion}, please upgrade it.`);
125
+ process.exit(-1);
126
+ }
127
+ }
128
+ /**
129
+ * unittest running environment detection
130
+ * only support jest
131
+ * @returns {boolean}
132
+ */
133
+ const checkUTRuntime = () => {
134
+ let isUTRuntime = false;
135
+ // UT运行环境判断,暂时先只判断jest
136
+ const argv = JSON.stringify(process.argv[1]);
137
+ if (argv.indexOf('jest') > -1) {
138
+ isUTRuntime = true;
139
+ }
140
+ return isUTRuntime;
141
+ };
152
142
 
153
143
  /*
154
144
  * @Description: framework constants
@@ -176,7 +166,7 @@ https://github.com/koatty
176
166
  * @Usage:
177
167
  * @Author: richen
178
168
  * @Date: 2023-12-09 22:55:49
179
- * @LastEditTime: 2025-01-14 14:21:56
169
+ * @LastEditTime: 2025-01-14 16:12:59
180
170
  * @License: BSD (3-Clause)
181
171
  * @Copyright (c): <richenlin(at)gmail.com>
182
172
  */
@@ -601,7 +591,7 @@ class Loader {
601
591
  * @Usage:
602
592
  * @Author: richen
603
593
  * @Date: 2021-12-09 21:56:32
604
- * @LastEditTime: 2024-11-29 18:13:06
594
+ * @LastEditTime: 2025-01-14 16:11:21
605
595
  * @License: BSD (3-Clause)
606
596
  * @Copyright (c): <richenlin(at)gmail.com>
607
597
  */
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koatty",
3
- "version": "3.11.8",
3
+ "version": "3.11.9",
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",
@@ -94,7 +94,7 @@
94
94
  "koa": "~2.15.3",
95
95
  "koatty_config": "~1.2.0",
96
96
  "koatty_container": "~1.9.4",
97
- "koatty_core": "~1.11.4",
97
+ "koatty_core": "~1.11.5",
98
98
  "koatty_exception": "~1.5.3",
99
99
  "koatty_lib": "~1.4.0",
100
100
  "koatty_loader": "~1.1.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koatty",
3
- "version": "3.11.8",
3
+ "version": "3.11.9",
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",
@@ -94,7 +94,7 @@
94
94
  "koa": "~2.15.3",
95
95
  "koatty_config": "~1.2.0",
96
96
  "koatty_container": "~1.9.4",
97
- "koatty_core": "~1.11.4",
97
+ "koatty_core": "~1.11.5",
98
98
  "koatty_exception": "~1.5.3",
99
99
  "koatty_lib": "~1.4.0",
100
100
  "koatty_loader": "~1.1.0",