dinegg 3.8.1 → 3.8.2

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.
Files changed (2) hide show
  1. package/index.d.ts +6 -6
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -30,7 +30,7 @@ import AppCache from "./lib/core/AppCache";
30
30
  // ts 这里可以理解成导入一个类。并将这个类的类型提取给ts作为自定义type。然后这个type就可以放在interface上,或者提供给其他interface等。
31
31
  // context扩展声明,需先自定义type
32
32
  // type ExtendContextType = typeof ExtendContext;
33
- interface ExtendContextType {}
33
+ interface ExtendContextType { }
34
34
 
35
35
  import { AbstractPermissionAccessControl } from "./decorator";
36
36
  import DineggAPIClient from "./lib/core/ClusterClient/DineggAPIClient";
@@ -143,7 +143,7 @@ declare module "egg" {
143
143
  * @return {*} {IResponseBodyData}
144
144
  * @memberof Controller
145
145
  */
146
- send<T extends any>(data: T, status?: number, msg?: string, errDetails?: string[]): IResponseBodyData<T>;
146
+ protected send<T extends any>(data: T, status?: number, msg?: string, errDetails?: string[]): IResponseBodyData<T>;
147
147
  /**
148
148
  *ctx发送成功的响应
149
149
  * - 不能在router中直接调用
@@ -151,7 +151,7 @@ declare module "egg" {
151
151
  * @param {*} data
152
152
  * @memberof Controller
153
153
  */
154
- success<T extends any>(data: T): IResponseBodyData<T>;
154
+ protected success<T extends any>(data: T): IResponseBodyData<T>;
155
155
 
156
156
  /**
157
157
  *发送警告的响应,主体响应仍然是成功的,但是将携带一个弃用或变更之类的警告,提醒caller,该api将发生变化
@@ -161,7 +161,7 @@ declare module "egg" {
161
161
  * @return {*} {IResponseBodyData}
162
162
  * @memberof Controller
163
163
  */
164
- warning<T extends any>(data: T, msg?: string): IResponseBodyData<T>;
164
+ protected warning<T extends any>(data: T, msg?: string): IResponseBodyData<T>;
165
165
  /**
166
166
  *
167
167
  *ctx发送错误的响应
@@ -176,7 +176,7 @@ declare module "egg" {
176
176
  * @return {*} {IResponseBodyData}
177
177
  * @memberof Controller
178
178
  */
179
- error(msg: string, code?: number, errDetails?: stirng[]): IResponseBodyData<null>;
179
+ protected error(msg: string, code?: number, errDetails?: stirng[]): IResponseBodyData<null>;
180
180
  /**
181
181
  *
182
182
  *ctx发送错误的响应 设置响应码400,对浏览器前端更友好
@@ -191,7 +191,7 @@ declare module "egg" {
191
191
  * @return {*} {IResponseBodyData}
192
192
  * @memberof Controller
193
193
  */
194
- errorBy400(msg: string, code?: number, errDetails?: stirng[]): IResponseBodyData;
194
+ protected errorBy400(msg: string, code?: number, errDetails?: stirng[]): IResponseBodyData;
195
195
  }
196
196
 
197
197
  /** json 响应body规范 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dinegg",
3
- "version": "3.8.1",
3
+ "version": "3.8.2",
4
4
  "description": "egg framework dinegg.",
5
5
  "dependencies": {
6
6
  "cluster-client": "^3.6.0",