egg 4.0.7 → 4.0.8
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/dist/commonjs/app/extend/context.d.ts +8 -0
- package/dist/commonjs/lib/types.d.ts +4 -0
- package/dist/esm/app/extend/context.d.ts +8 -0
- package/dist/esm/lib/types.d.ts +4 -0
- package/dist/package.json +1 -1
- package/package.json +1 -1
- package/src/app/extend/context.ts +8 -0
- package/src/lib/types.ts +4 -0
|
@@ -179,6 +179,14 @@ export default class Context extends EggCoreContext {
|
|
|
179
179
|
}
|
|
180
180
|
declare module '@eggjs/core' {
|
|
181
181
|
interface Context {
|
|
182
|
+
proxy: any;
|
|
183
|
+
performanceStarttime: number;
|
|
184
|
+
starttime: number;
|
|
185
|
+
runInBackground(scope: (ctx: Context) => Promise<void>, taskName?: string): void;
|
|
186
|
+
_runInBackground(scope: (ctx: Context) => Promise<void>, taskName: string): void;
|
|
187
|
+
get acceptJSON(): boolean;
|
|
188
|
+
get query(): Record<string, string>;
|
|
189
|
+
get queries(): Record<string, string[]>;
|
|
182
190
|
curl(url: HttpClientRequestURL, options?: HttpClientRequestOptions): ReturnType<HttpClient['request']>;
|
|
183
191
|
get router(): Router;
|
|
184
192
|
set router(val: Router);
|
|
@@ -63,6 +63,10 @@ export interface HttpClientConfig {
|
|
|
63
63
|
* @deprecated keep compatible with egg 3.x, no more used
|
|
64
64
|
*/
|
|
65
65
|
useHttpClientNext?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Allow http2
|
|
68
|
+
*/
|
|
69
|
+
allowH2?: boolean;
|
|
66
70
|
}
|
|
67
71
|
/**
|
|
68
72
|
* Powerful Partial, Support adding ? modifier to a mapped property in deep level
|
|
@@ -179,6 +179,14 @@ export default class Context extends EggCoreContext {
|
|
|
179
179
|
}
|
|
180
180
|
declare module '@eggjs/core' {
|
|
181
181
|
interface Context {
|
|
182
|
+
proxy: any;
|
|
183
|
+
performanceStarttime: number;
|
|
184
|
+
starttime: number;
|
|
185
|
+
runInBackground(scope: (ctx: Context) => Promise<void>, taskName?: string): void;
|
|
186
|
+
_runInBackground(scope: (ctx: Context) => Promise<void>, taskName: string): void;
|
|
187
|
+
get acceptJSON(): boolean;
|
|
188
|
+
get query(): Record<string, string>;
|
|
189
|
+
get queries(): Record<string, string[]>;
|
|
182
190
|
curl(url: HttpClientRequestURL, options?: HttpClientRequestOptions): ReturnType<HttpClient['request']>;
|
|
183
191
|
get router(): Router;
|
|
184
192
|
set router(val: Router);
|
package/dist/esm/lib/types.d.ts
CHANGED
|
@@ -63,6 +63,10 @@ export interface HttpClientConfig {
|
|
|
63
63
|
* @deprecated keep compatible with egg 3.x, no more used
|
|
64
64
|
*/
|
|
65
65
|
useHttpClientNext?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Allow http2
|
|
68
|
+
*/
|
|
69
|
+
allowH2?: boolean;
|
|
66
70
|
}
|
|
67
71
|
/**
|
|
68
72
|
* Powerful Partial, Support adding ? modifier to a mapped property in deep level
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -308,6 +308,14 @@ export default class Context extends EggCoreContext {
|
|
|
308
308
|
declare module '@eggjs/core' {
|
|
309
309
|
// add Context overrides types
|
|
310
310
|
interface Context {
|
|
311
|
+
proxy: any;
|
|
312
|
+
performanceStarttime: number;
|
|
313
|
+
starttime: number;
|
|
314
|
+
runInBackground(scope: (ctx: Context) => Promise<void>, taskName?: string): void;
|
|
315
|
+
_runInBackground(scope: (ctx: Context) => Promise<void>, taskName: string): void;
|
|
316
|
+
get acceptJSON(): boolean;
|
|
317
|
+
get query(): Record<string, string>;
|
|
318
|
+
get queries(): Record<string, string[]>;
|
|
311
319
|
curl(url: HttpClientRequestURL, options?: HttpClientRequestOptions): ReturnType<HttpClient['request']>;
|
|
312
320
|
get router(): Router;
|
|
313
321
|
set router(val: Router);
|