koatty 3.6.5 → 3.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.
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.6.6](https://github.com/thinkkoa/koatty/compare/v3.6.5...v3.6.6) (2022-03-02)
6
+
5
7
  ### [3.6.5](https://github.com/thinkkoa/koatty/compare/v3.6.4...v3.6.5) (2022-03-02)
6
8
 
7
9
  ### [3.6.4](https://github.com/thinkkoa/koatty/compare/v3.6.3...v3.6.4) (2022-02-25)
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2022-03-02 15:39:00
3
+ * @Date: 2022-03-02 19:03:06
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: 2022-03-02 15:38:40
3
+ * @Date: 2022-03-02 19:02:51
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
@@ -195,6 +195,7 @@ class BaseController {
195
195
  */
196
196
  fail(msg, data, code = 1) {
197
197
  const obj = formatApiData(msg, data, code);
198
+ this.ctx.body = obj.data;
198
199
  this.ctx.throw(obj.message, obj.code, 200);
199
200
  }
200
201
  }
@@ -837,7 +838,7 @@ class Loader {
837
838
  }
838
839
  }
839
840
 
840
- var version = "3.6.5";
841
+ var version = "3.6.6";
841
842
  var engines = {
842
843
  node: ">12.0.0"
843
844
  };
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2022-03-02 15:38:40
3
+ * @Date: 2022-03-02 19:02:51
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
@@ -175,6 +175,7 @@ class BaseController {
175
175
  */
176
176
  fail(msg, data, code = 1) {
177
177
  const obj = formatApiData(msg, data, code);
178
+ this.ctx.body = obj.data;
178
179
  this.ctx.throw(obj.message, obj.code, 200);
179
180
  }
180
181
  }
@@ -817,7 +818,7 @@ class Loader {
817
818
  }
818
819
  }
819
820
 
820
- var version = "3.6.5";
821
+ var version = "3.6.6";
821
822
  var engines = {
822
823
  node: ">12.0.0"
823
824
  };
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koatty",
3
- "version": "3.6.5",
3
+ "version": "3.6.6",
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",
@@ -82,7 +82,7 @@
82
82
  "koatty_config": "1.1.2",
83
83
  "koatty_container": "1.7.7",
84
84
  "koatty_core": "1.6.1",
85
- "koatty_exception": "1.2.4",
85
+ "koatty_exception": "1.2.6",
86
86
  "koatty_lib": "1.2.10",
87
87
  "koatty_loader": "1.0.2",
88
88
  "koatty_logger": "1.3.12",
@@ -90,7 +90,7 @@
90
90
  "koatty_proto": "1.1.6",
91
91
  "koatty_router": "1.7.2",
92
92
  "koatty_serve": "1.4.8",
93
- "koatty_trace": "1.6.4",
93
+ "koatty_trace": "1.6.6",
94
94
  "koatty_validation": "1.2.2",
95
95
  "reflect-metadata": "0.1.13",
96
96
  "tslib": "2.3.1"
@@ -1 +1 @@
1
- window.jest_html_reporters_callback__({"numFailedTestSuites":0,"numFailedTests":0,"numPassedTestSuites":0,"numPassedTests":0,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTodoTests":0,"numTotalTestSuites":0,"numTotalTests":0,"startTime":1646206717841,"success":false,"testResults":[],"wasInterrupted":false,"config":{"bail":0,"changedFilesWithAncestor":false,"collectCoverage":true,"collectCoverageFrom":[],"coverageDirectory":"coverage","coverageProvider":"babel","coverageReporters":["html","lcov","json","text","clover","text-summary"],"detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"expand":false,"findRelatedTests":false,"forceExit":false,"json":false,"lastCommit":false,"listTests":false,"logHeapUsage":false,"maxConcurrency":5,"maxWorkers":7,"noStackTrace":false,"nonFlagArgs":[],"notify":false,"notifyMode":"failure-change","onlyChanged":false,"onlyFailures":false,"passWithNoTests":true,"projects":[],"reporters":[["default",{}],["/Users/richen/Workspace/nodejs/koatty/node_modules/jest-html-reporters/index.js",{}]],"rootDir":"/Users/richen/Workspace/nodejs/koatty","runTestsByPath":false,"skipFilter":false,"testFailureExitCode":1,"testPathPattern":"","testSequencer":"/Users/richen/Workspace/nodejs/koatty/node_modules/@jest/test-sequencer/build/index.js","updateSnapshot":"new","useStderr":false,"watch":false,"watchAll":false,"watchman":true},"endTime":1646206718115,"_reporterOptions":{"publicPath":"/Users/richen/Workspace/nodejs/koatty","filename":"jest_html_reporters.html","expand":false,"pageTitle":"","hideIcon":false,"testCommand":"npx jest","openReport":false,"failureMessageOnly":false,"enableMergeData":false,"dataMergeLevel":1},"attachInfos":{}})
1
+ window.jest_html_reporters_callback__({"numFailedTestSuites":0,"numFailedTests":0,"numPassedTestSuites":0,"numPassedTests":0,"numPendingTestSuites":0,"numPendingTests":0,"numRuntimeErrorTestSuites":0,"numTodoTests":0,"numTotalTestSuites":0,"numTotalTests":0,"startTime":1646218969089,"success":false,"testResults":[],"wasInterrupted":false,"config":{"bail":0,"changedFilesWithAncestor":false,"collectCoverage":true,"collectCoverageFrom":[],"coverageDirectory":"coverage","coverageProvider":"babel","coverageReporters":["html","lcov","json","text","clover","text-summary"],"detectLeaks":false,"detectOpenHandles":false,"errorOnDeprecated":false,"expand":false,"findRelatedTests":false,"forceExit":false,"json":false,"lastCommit":false,"listTests":false,"logHeapUsage":false,"maxConcurrency":5,"maxWorkers":7,"noStackTrace":false,"nonFlagArgs":[],"notify":false,"notifyMode":"failure-change","onlyChanged":false,"onlyFailures":false,"passWithNoTests":true,"projects":[],"reporters":[["default",{}],["/Users/richen/Workspace/nodejs/koatty/node_modules/jest-html-reporters/index.js",{}]],"rootDir":"/Users/richen/Workspace/nodejs/koatty","runTestsByPath":false,"skipFilter":false,"testFailureExitCode":1,"testPathPattern":"","testSequencer":"/Users/richen/Workspace/nodejs/koatty/node_modules/@jest/test-sequencer/build/index.js","updateSnapshot":"new","useStderr":false,"watch":false,"watchAll":false,"watchman":true},"endTime":1646218969142,"_reporterOptions":{"publicPath":"/Users/richen/Workspace/nodejs/koatty","filename":"jest_html_reporters.html","expand":false,"pageTitle":"","hideIcon":false,"testCommand":"npx jest","openReport":false,"failureMessageOnly":false,"enableMergeData":false,"dataMergeLevel":1},"attachInfos":{}})
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koatty",
3
- "version": "3.6.5",
3
+ "version": "3.6.6",
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",
@@ -82,7 +82,7 @@
82
82
  "koatty_config": "1.1.2",
83
83
  "koatty_container": "1.7.7",
84
84
  "koatty_core": "1.6.1",
85
- "koatty_exception": "1.2.4",
85
+ "koatty_exception": "1.2.6",
86
86
  "koatty_lib": "1.2.10",
87
87
  "koatty_loader": "1.0.2",
88
88
  "koatty_logger": "1.3.12",
@@ -90,7 +90,7 @@
90
90
  "koatty_proto": "1.1.6",
91
91
  "koatty_router": "1.7.2",
92
92
  "koatty_serve": "1.4.8",
93
- "koatty_trace": "1.6.4",
93
+ "koatty_trace": "1.6.6",
94
94
  "koatty_validation": "1.2.2",
95
95
  "reflect-metadata": "0.1.13",
96
96
  "tslib": "2.3.1"