koatty 3.7.8 → 3.8.0-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 +21 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -3
- package/dist/index.mjs +12 -3
- package/dist/package.json +6 -8
- package/package.json +6 -8
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,27 @@
|
|
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.8.0-0](https://github.com/thinkkoa/koatty/compare/v3.7.9...v3.8.0-0) (2023-02-21)
|
6
|
+
|
7
|
+
|
8
|
+
### Features
|
9
|
+
|
10
|
+
* koatty_trace支持opentracing ([ae67ce0](https://github.com/thinkkoa/koatty/commit/ae67ce05c8e731a149d67b2b5e98edc88bef9861))
|
11
|
+
|
12
|
+
|
13
|
+
### Bug Fixes
|
14
|
+
|
15
|
+
* core模块app增加name及version ([e55db1a](https://github.com/thinkkoa/koatty/commit/e55db1aa78369181b54d0d11c6319b20f21d50f2))
|
16
|
+
* SetLogger读取配置变更 ([9765908](https://github.com/thinkkoa/koatty/commit/9765908a6b00486a510e8028cdbe5fc27ecadc88))
|
17
|
+
* 修改container关于 app及 ctx 接口定义 ([a7c318a](https://github.com/thinkkoa/koatty/commit/a7c318a649531acb5a7cfeb4f9b357fc9418cff7))
|
18
|
+
|
19
|
+
### [3.7.9](https://github.com/thinkkoa/koatty/compare/v3.7.8...v3.7.9) (2023-02-17)
|
20
|
+
|
21
|
+
|
22
|
+
### Bug Fixes
|
23
|
+
|
24
|
+
* 绑定参数类型转换 ([4fc5bc8](https://github.com/thinkkoa/koatty/commit/4fc5bc8927a5be9b51bd23f8b702bbf34c9b42c3))
|
25
|
+
|
5
26
|
### [3.7.8](https://github.com/thinkkoa/koatty/compare/v3.7.7...v3.7.8) (2023-02-17)
|
6
27
|
|
7
28
|
### [3.7.7](https://github.com/thinkkoa/koatty/compare/v3.7.6...v3.7.7) (2023-02-15)
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
2
|
* @Author: richen
|
3
|
-
* @Date: 2023-02-17
|
3
|
+
* @Date: 2023-02-21 17:45:28
|
4
4
|
* @License: BSD (3-Clause)
|
5
5
|
* @Copyright (c) - <richenlin(at)gmail.com>
|
6
6
|
* @HomePage: https://koatty.org/
|
@@ -298,6 +298,14 @@ class Loader {
|
|
298
298
|
koatty_lib.Helper.define(app, 'rootPath', rootPath);
|
299
299
|
koatty_lib.Helper.define(app, 'appPath', appPath);
|
300
300
|
koatty_lib.Helper.define(app, 'thinkPath', thinkPath);
|
301
|
+
//
|
302
|
+
if (app.name === "") {
|
303
|
+
const pkg = koatty_lib.Helper.safeRequire(`${appPath}/package.json`);
|
304
|
+
if (pkg.name) {
|
305
|
+
app.name = pkg.name;
|
306
|
+
app.version = app.version || pkg.version;
|
307
|
+
}
|
308
|
+
}
|
301
309
|
process.env.ROOT_PATH = rootPath;
|
302
310
|
process.env.APP_PATH = appPath;
|
303
311
|
process.env.THINK_PATH = thinkPath;
|
@@ -381,7 +389,8 @@ class Loader {
|
|
381
389
|
* @memberof Loader
|
382
390
|
*/
|
383
391
|
static SetLogger(app) {
|
384
|
-
const
|
392
|
+
const data = app.getMetaData('_configs') || [];
|
393
|
+
const configs = data[0] || {};
|
385
394
|
//Logger
|
386
395
|
if (configs.config) {
|
387
396
|
const opt = configs.config;
|
@@ -607,7 +616,7 @@ class Loader {
|
|
607
616
|
}
|
608
617
|
}
|
609
618
|
|
610
|
-
var version = "3.
|
619
|
+
var version = "3.8.0-0";
|
611
620
|
var engines = {
|
612
621
|
node: ">12.0.0"
|
613
622
|
};
|
package/dist/index.mjs
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/*!
|
2
2
|
* @Author: richen
|
3
|
-
* @Date: 2023-02-17
|
3
|
+
* @Date: 2023-02-21 17:45:28
|
4
4
|
* @License: BSD (3-Clause)
|
5
5
|
* @Copyright (c) - <richenlin(at)gmail.com>
|
6
6
|
* @HomePage: https://koatty.org/
|
@@ -284,6 +284,14 @@ class Loader {
|
|
284
284
|
Helper.define(app, 'rootPath', rootPath);
|
285
285
|
Helper.define(app, 'appPath', appPath);
|
286
286
|
Helper.define(app, 'thinkPath', thinkPath);
|
287
|
+
//
|
288
|
+
if (app.name === "") {
|
289
|
+
const pkg = Helper.safeRequire(`${appPath}/package.json`);
|
290
|
+
if (pkg.name) {
|
291
|
+
app.name = pkg.name;
|
292
|
+
app.version = app.version || pkg.version;
|
293
|
+
}
|
294
|
+
}
|
287
295
|
process.env.ROOT_PATH = rootPath;
|
288
296
|
process.env.APP_PATH = appPath;
|
289
297
|
process.env.THINK_PATH = thinkPath;
|
@@ -367,7 +375,8 @@ class Loader {
|
|
367
375
|
* @memberof Loader
|
368
376
|
*/
|
369
377
|
static SetLogger(app) {
|
370
|
-
const
|
378
|
+
const data = app.getMetaData('_configs') || [];
|
379
|
+
const configs = data[0] || {};
|
371
380
|
//Logger
|
372
381
|
if (configs.config) {
|
373
382
|
const opt = configs.config;
|
@@ -593,7 +602,7 @@ class Loader {
|
|
593
602
|
}
|
594
603
|
}
|
595
604
|
|
596
|
-
var version = "3.
|
605
|
+
var version = "3.8.0-0";
|
597
606
|
var engines = {
|
598
607
|
node: ">12.0.0"
|
599
608
|
};
|
package/dist/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "koatty",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.8.0-0",
|
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",
|
@@ -81,19 +81,17 @@
|
|
81
81
|
"dependencies": {
|
82
82
|
"koa": "^2.14.1",
|
83
83
|
"koatty_config": "^1.1.6",
|
84
|
-
"koatty_container": "^1.
|
85
|
-
"koatty_core": "^1.
|
84
|
+
"koatty_container": "^1.8.0",
|
85
|
+
"koatty_core": "^1.7.1",
|
86
86
|
"koatty_exception": "^1.2.8",
|
87
87
|
"koatty_lib": "^1.3.0",
|
88
88
|
"koatty_loader": "^1.1.0",
|
89
89
|
"koatty_logger": "^2.0.4",
|
90
90
|
"koatty_payload": "^1.4.0",
|
91
91
|
"koatty_proto": "^1.1.10",
|
92
|
-
"koatty_router": "^1.8.
|
92
|
+
"koatty_router": "^1.8.6",
|
93
93
|
"koatty_serve": "^1.5.5",
|
94
|
-
"koatty_trace": "^1.
|
95
|
-
"koatty_validation": "^1.2.
|
96
|
-
"reflect-metadata": "^0.1.13",
|
97
|
-
"tslib": "^2.4.1"
|
94
|
+
"koatty_trace": "^1.8.0",
|
95
|
+
"koatty_validation": "^1.2.8"
|
98
96
|
}
|
99
97
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "koatty",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.8.0-0",
|
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",
|
@@ -81,19 +81,17 @@
|
|
81
81
|
"dependencies": {
|
82
82
|
"koa": "^2.14.1",
|
83
83
|
"koatty_config": "^1.1.6",
|
84
|
-
"koatty_container": "^1.
|
85
|
-
"koatty_core": "^1.
|
84
|
+
"koatty_container": "^1.8.0",
|
85
|
+
"koatty_core": "^1.7.1",
|
86
86
|
"koatty_exception": "^1.2.8",
|
87
87
|
"koatty_lib": "^1.3.0",
|
88
88
|
"koatty_loader": "^1.1.0",
|
89
89
|
"koatty_logger": "^2.0.4",
|
90
90
|
"koatty_payload": "^1.4.0",
|
91
91
|
"koatty_proto": "^1.1.10",
|
92
|
-
"koatty_router": "^1.8.
|
92
|
+
"koatty_router": "^1.8.6",
|
93
93
|
"koatty_serve": "^1.5.5",
|
94
|
-
"koatty_trace": "^1.
|
95
|
-
"koatty_validation": "^1.2.
|
96
|
-
"reflect-metadata": "^0.1.13",
|
97
|
-
"tslib": "^2.4.1"
|
94
|
+
"koatty_trace": "^1.8.0",
|
95
|
+
"koatty_validation": "^1.2.8"
|
98
96
|
}
|
99
97
|
}
|