koatty 3.9.3 → 3.9.5

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,16 @@
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.9.5](https://github.com/thinkkoa/koatty/compare/v3.9.4...v3.9.5) (2023-09-12)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * import from exception ([beca23c](https://github.com/thinkkoa/koatty/commit/beca23c6b7059ad48997522feff19c716e9a084e))
11
+ * set process.env.LOGS_PATH ([ca38881](https://github.com/thinkkoa/koatty/commit/ca3888189fd5ed37c0d395f05cdb3672df95b7ff))
12
+
13
+ ### [3.9.4](https://github.com/thinkkoa/koatty/compare/v3.9.3...v3.9.4) (2023-08-30)
14
+
5
15
  ### [3.9.3](https://github.com/thinkkoa/koatty/compare/v3.9.2...v3.9.3) (2023-08-21)
6
16
 
7
17
  ### [3.9.2](https://github.com/thinkkoa/koatty/compare/v3.9.1...v3.9.2) (2023-08-21)
package/README.md CHANGED
@@ -32,7 +32,6 @@ npm i -g koatty_cli
32
32
  ```shell
33
33
  kt new projectName
34
34
 
35
- npm start
36
35
  ```
37
36
 
38
37
  ### 2. Install deps
package/dist/README.md CHANGED
@@ -32,7 +32,6 @@ npm i -g koatty_cli
32
32
  ```shell
33
33
  kt new projectName
34
34
 
35
- npm start
36
35
  ```
37
36
 
38
37
  ### 2. Install deps
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2023-08-21 16:18:54
3
+ * @Date: 2023-09-12 11:22:25
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
@@ -243,6 +243,7 @@ export { Value }
243
243
 
244
244
  export * from "koatty_container";
245
245
  export * from "koatty_core";
246
+ export * from "koatty_exception";
246
247
  export * from "koatty_serve";
247
248
  export * from "koatty_trace";
248
249
 
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2023-08-21 16:18:31
3
+ * @Date: 2023-09-12 11:22:03
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
@@ -12,10 +12,11 @@ var koatty_core = require('koatty_core');
12
12
  var path = require('path');
13
13
  var koatty_loader = require('koatty_loader');
14
14
  var koatty_config = require('koatty_config');
15
- var koatty_logger = require('koatty_logger');
16
- var koatty_trace = require('koatty_trace');
17
15
  var koatty_lib = require('koatty_lib');
16
+ var koatty_logger = require('koatty_logger');
17
+ var koatty_exception = require('koatty_exception');
18
18
  var koatty_container = require('koatty_container');
19
+ var koatty_trace = require('koatty_trace');
19
20
  var koatty_payload = require('koatty_payload');
20
21
  var koatty_serve = require('koatty_serve');
21
22
 
@@ -61,6 +62,8 @@ function SetLogger(app, config) {
61
62
  koatty_logger.DefaultLogger.setLevel(config.logLevel);
62
63
  }
63
64
  if (config.logFilePath && !app.silent) {
65
+ koatty_lib.Helper.define(app, "logsPath", config.logFilePath);
66
+ process.env.LOGS_PATH = config.logFilePath;
64
67
  koatty_logger.DefaultLogger.setLogFilePath(config.logFilePath);
65
68
  }
66
69
  if (config.sensFields) {
@@ -307,7 +310,7 @@ class Loader {
307
310
  process.env.APP_PATH = appPath;
308
311
  process.env.THINK_PATH = thinkPath;
309
312
  // Compatible with old version, will be deprecated
310
- koatty_lib.Helper.define(app, 'prevent', koatty_trace.prevent);
313
+ koatty_lib.Helper.define(app, 'prevent', koatty_exception.prevent);
311
314
  koatty_lib.Helper.define(app, 'root_path', rootPath);
312
315
  koatty_lib.Helper.define(app, 'app_path', appPath);
313
316
  koatty_lib.Helper.define(app, 'think_path', thinkPath);
@@ -613,7 +616,7 @@ class Loader {
613
616
  }
614
617
  }
615
618
 
616
- var version = "3.9.3";
619
+ var version = "3.9.5";
617
620
  var engines = {
618
621
  node: ">12.0.0"
619
622
  };
@@ -1007,10 +1010,10 @@ Object.keys(koatty_core).forEach(function (k) {
1007
1010
  get: function () { return koatty_core[k]; }
1008
1011
  });
1009
1012
  });
1010
- Object.keys(koatty_trace).forEach(function (k) {
1013
+ Object.keys(koatty_exception).forEach(function (k) {
1011
1014
  if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
1012
1015
  enumerable: true,
1013
- get: function () { return koatty_trace[k]; }
1016
+ get: function () { return koatty_exception[k]; }
1014
1017
  });
1015
1018
  });
1016
1019
  Object.keys(koatty_container).forEach(function (k) {
@@ -1019,6 +1022,12 @@ Object.keys(koatty_container).forEach(function (k) {
1019
1022
  get: function () { return koatty_container[k]; }
1020
1023
  });
1021
1024
  });
1025
+ Object.keys(koatty_trace).forEach(function (k) {
1026
+ if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
1027
+ enumerable: true,
1028
+ get: function () { return koatty_trace[k]; }
1029
+ });
1030
+ });
1022
1031
  Object.keys(koatty_serve).forEach(function (k) {
1023
1032
  if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, {
1024
1033
  enumerable: true,
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2023-08-21 16:18:31
3
+ * @Date: 2023-09-12 11:22:03
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
@@ -12,13 +12,15 @@ import * as path from 'path';
12
12
  import { Load } from 'koatty_loader';
13
13
  import { LoadConfigs } from 'koatty_config';
14
14
  export { Config, Value } from 'koatty_config';
15
- import { DefaultLogger } from 'koatty_logger';
16
- import { Trace, prevent } from 'koatty_trace';
17
- export * from 'koatty_trace';
18
15
  import { Helper } from 'koatty_lib';
19
16
  export { Helper } from 'koatty_lib';
17
+ import { DefaultLogger } from 'koatty_logger';
18
+ import { prevent } from 'koatty_exception';
19
+ export * from 'koatty_exception';
20
20
  import { IOCContainer, TAGGED_CLS } from 'koatty_container';
21
21
  export * from 'koatty_container';
22
+ import { Trace } from 'koatty_trace';
23
+ export * from 'koatty_trace';
22
24
  import { Payload } from 'koatty_payload';
23
25
  import { NewServe, NewRouter, BindProcessEvent, CONTROLLER_ROUTER } from 'koatty_serve';
24
26
  export * from 'koatty_serve';
@@ -46,6 +48,8 @@ function SetLogger(app, config) {
46
48
  DefaultLogger.setLevel(config.logLevel);
47
49
  }
48
50
  if (config.logFilePath && !app.silent) {
51
+ Helper.define(app, "logsPath", config.logFilePath);
52
+ process.env.LOGS_PATH = config.logFilePath;
49
53
  DefaultLogger.setLogFilePath(config.logFilePath);
50
54
  }
51
55
  if (config.sensFields) {
@@ -598,7 +602,7 @@ class Loader {
598
602
  }
599
603
  }
600
604
 
601
- var version = "3.9.3";
605
+ var version = "3.9.5";
602
606
  var engines = {
603
607
  node: ">12.0.0"
604
608
  };
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koatty",
3
- "version": "3.9.3",
3
+ "version": "3.9.5",
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,14 +81,14 @@
81
81
  "koa": "^2.14.2",
82
82
  "koatty_config": "^1.1.6",
83
83
  "koatty_container": "^1.8.1",
84
- "koatty_core": "^1.7.8",
84
+ "koatty_core": "^1.7.10",
85
+ "koatty_exception": "^1.2.8",
85
86
  "koatty_lib": "^1.3.4",
86
87
  "koatty_loader": "^1.1.0",
87
- "koatty_logger": "^2.1.1",
88
- "koatty_payload": "^1.4.5",
88
+ "koatty_logger": "^2.1.2",
89
+ "koatty_payload": "^1.4.6",
89
90
  "koatty_proto": "^1.1.12",
90
91
  "koatty_serve": "^2.0.4",
91
- "koatty_trace": "^1.9.4",
92
- "koatty_validation": "^1.2.8"
92
+ "koatty_trace": "^1.10.0"
93
93
  }
94
94
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koatty",
3
- "version": "3.9.3",
3
+ "version": "3.9.5",
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,14 +81,14 @@
81
81
  "koa": "^2.14.2",
82
82
  "koatty_config": "^1.1.6",
83
83
  "koatty_container": "^1.8.1",
84
- "koatty_core": "^1.7.8",
84
+ "koatty_core": "^1.7.10",
85
+ "koatty_exception": "^1.2.8",
85
86
  "koatty_lib": "^1.3.4",
86
87
  "koatty_loader": "^1.1.0",
87
- "koatty_logger": "^2.1.1",
88
- "koatty_payload": "^1.4.5",
88
+ "koatty_logger": "^2.1.2",
89
+ "koatty_payload": "^1.4.6",
89
90
  "koatty_proto": "^1.1.12",
90
91
  "koatty_serve": "^2.0.4",
91
- "koatty_trace": "^1.9.4",
92
- "koatty_validation": "^1.2.8"
92
+ "koatty_trace": "^1.10.0"
93
93
  }
94
94
  }