koatty 3.10.2-0 → 3.10.2-1

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,13 @@
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.10.2-1](https://github.com/thinkkoa/koatty/compare/v3.10.2-0...v3.10.2-1) (2023-11-10)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * ctl.ok返回类型 ([5d76b80](https://github.com/thinkkoa/koatty/commit/5d76b800fa3a59c5685fba3bf5adca04ce27afe2))
11
+
5
12
  ### [3.10.2-0](https://github.com/thinkkoa/koatty/compare/v3.10.1...v3.10.2-0) (2023-11-10)
6
13
 
7
14
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2023-11-10 17:39:37
3
+ * @Date: 2023-11-10 17:54:48
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
@@ -64,7 +64,7 @@ export declare class BaseController implements IController {
64
64
  * @returns {*}
65
65
  * @memberof BaseController
66
66
  */
67
- ok(msg: string | ApiInput, data?: any, code?: number): ApiOutput;
67
+ ok(msg: string | ApiInput, data?: any, code?: number): Promise<ApiOutput>;
68
68
  /**
69
69
  * Response to normalize json format content for fail
70
70
  *
@@ -183,7 +183,7 @@ export declare interface IController {
183
183
  readonly app: Koatty;
184
184
  readonly ctx: KoattyContext;
185
185
  init(...arg: any[]): void;
186
- ok(msg: string | ApiInput, data?: any, code?: number): ApiOutput;
186
+ ok(msg: string | ApiInput, data?: any, code?: number): Promise<ApiOutput>;
187
187
  fail(msg: Error | string | ApiInput, data?: any, code?: number): void;
188
188
  }
189
189
 
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2023-11-10 17:39:23
3
+ * @Date: 2023-11-10 17:54:34
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
@@ -198,7 +198,7 @@ class BaseController {
198
198
  */
199
199
  ok(msg, data, code = 0) {
200
200
  const obj = formatApiData(msg, data, code);
201
- return obj;
201
+ return Promise.resolve(obj);
202
202
  }
203
203
  /**
204
204
  * Response to normalize json format content for fail
@@ -646,7 +646,7 @@ class Loader {
646
646
  }
647
647
  }
648
648
 
649
- var version = "3.10.2-0";
649
+ var version = "3.10.2-1";
650
650
  var engines = {
651
651
  node: ">12.0.0"
652
652
  };
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * @Author: richen
3
- * @Date: 2023-11-10 17:39:23
3
+ * @Date: 2023-11-10 17:54:34
4
4
  * @License: BSD (3-Clause)
5
5
  * @Copyright (c) - <richenlin(at)gmail.com>
6
6
  * @HomePage: https://koatty.org/
@@ -184,7 +184,7 @@ class BaseController {
184
184
  */
185
185
  ok(msg, data, code = 0) {
186
186
  const obj = formatApiData(msg, data, code);
187
- return obj;
187
+ return Promise.resolve(obj);
188
188
  }
189
189
  /**
190
190
  * Response to normalize json format content for fail
@@ -632,7 +632,7 @@ class Loader {
632
632
  }
633
633
  }
634
634
 
635
- var version = "3.10.2-0";
635
+ var version = "3.10.2-1";
636
636
  var engines = {
637
637
  node: ">12.0.0"
638
638
  };
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koatty",
3
- "version": "3.10.2-0",
3
+ "version": "3.10.2-1",
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koatty",
3
- "version": "3.10.2-0",
3
+ "version": "3.10.2-1",
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",