egg 4.1.0-beta.16 → 4.1.0-beta.18
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.
|
@@ -56,16 +56,5 @@ declare class Application extends EggApplicationCore {
|
|
|
56
56
|
*/
|
|
57
57
|
toAsyncFunction(fn: (...args: any[]) => any): (...args: any[]) => any;
|
|
58
58
|
}
|
|
59
|
-
declare module '@eggjs/core' {
|
|
60
|
-
interface EggCore {
|
|
61
|
-
onClientError(err: any, socket: Socket): void;
|
|
62
|
-
onServer(server: http.Server): void;
|
|
63
|
-
locals: Record<string, any>;
|
|
64
|
-
runInBackground(scope: (ctx: Context) => Promise<void>, req?: unknown): void;
|
|
65
|
-
toAsyncFunction(fn: (...args: any[]) => any): (...args: any[]) => any;
|
|
66
|
-
dumpConfig(): void;
|
|
67
|
-
get keys(): string[];
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
59
|
//#endregion
|
|
71
60
|
export { Application };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Application } from "../application.js";
|
|
1
2
|
import Context$1 from "../../app/extend/context.js";
|
|
2
|
-
import { EggApplicationCore } from "../egg.js";
|
|
3
3
|
import { BaseContextLogger } from "./base_context_logger.js";
|
|
4
4
|
import { BaseContextClass as BaseContextClass$1 } from "@eggjs/core";
|
|
5
5
|
|
|
@@ -15,7 +15,7 @@ declare class BaseContextClass extends BaseContextClass$1 {
|
|
|
15
15
|
[key: string | symbol]: any;
|
|
16
16
|
ctx: Context$1;
|
|
17
17
|
pathName?: string;
|
|
18
|
-
app:
|
|
18
|
+
app: Application;
|
|
19
19
|
service: BaseContextClass;
|
|
20
20
|
get logger(): BaseContextLogger;
|
|
21
21
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { Application } from "../application.js";
|
|
1
2
|
import { HttpClientRequestOptions, HttpClientRequestURL } from "./httpclient.js";
|
|
2
3
|
import Context from "../../app/extend/context.js";
|
|
3
|
-
import { EggApplicationCore } from "../egg.js";
|
|
4
4
|
import * as node_modules_urllib_dist_esm_Response_js0 from "node_modules/urllib/dist/esm/Response.js";
|
|
5
5
|
|
|
6
6
|
//#region src/lib/core/context_httpclient.d.ts
|
|
7
7
|
declare class ContextHttpClient {
|
|
8
8
|
ctx: Context;
|
|
9
|
-
app:
|
|
9
|
+
app: Application;
|
|
10
10
|
constructor(ctx: Context);
|
|
11
11
|
/**
|
|
12
12
|
* http request helper base on {@link HttpClient}, it will auto save httpclient log.
|
package/dist/lib/egg.d.ts
CHANGED
|
@@ -275,24 +275,5 @@ declare class EggApplicationCore extends EggCore {
|
|
|
275
275
|
*/
|
|
276
276
|
createContext(req: IncomingMessage, res: ServerResponse): Context;
|
|
277
277
|
}
|
|
278
|
-
declare module '@eggjs/core' {
|
|
279
|
-
interface EggCore {
|
|
280
|
-
inspect(): any;
|
|
281
|
-
get currentContext(): EggContext | undefined;
|
|
282
|
-
ctxStorage: AsyncLocalStorage<EggContext>;
|
|
283
|
-
getLogger(name: string): EggLogger;
|
|
284
|
-
get loggers(): EggLoggers;
|
|
285
|
-
createHttpClient(options?: HttpClientOptions): HttpClient;
|
|
286
|
-
HttpClient: typeof HttpClient;
|
|
287
|
-
get httpClient(): HttpClient;
|
|
288
|
-
curl<T = any>(url: HttpClientRequestURL, options?: HttpClientRequestOptions): Promise<HttpClientResponse<T>>;
|
|
289
|
-
createAnonymousContext(req?: any): EggContext;
|
|
290
|
-
runInAnonymousContextScope(scope: (ctx: Context) => Promise<void>, req?: unknown): Promise<void>;
|
|
291
|
-
readonly messenger: IMessenger;
|
|
292
|
-
Subscription: typeof BaseContextClass$1;
|
|
293
|
-
BaseHookClass: typeof BaseHookClass;
|
|
294
|
-
Boot: typeof BaseHookClass;
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
278
|
//#endregion
|
|
298
279
|
export { Context, EggApplicationCore, EggApplicationCoreOptions, EggContext, type ILifecycleBoot as IBoot, type ILifecycleBoot, MiddlewareFunc, type Next, Request, Response, Router };
|
package/dist/lib/types.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { Application } from "./application.js";
|
|
1
2
|
import Context$1 from "../app/extend/context.js";
|
|
2
3
|
import { MetaMiddlewareOptions } from "../app/middleware/meta.js";
|
|
3
4
|
import { NotFoundMiddlewareOptions } from "../app/middleware/notfound.js";
|
|
4
5
|
import { SiteFileMiddlewareOptions } from "../app/middleware/site_file.js";
|
|
5
|
-
import { EggApplicationCore } from "./egg.js";
|
|
6
6
|
import { EggAppConfig as EggAppConfig$1, EggAppInfo, FileLoaderOptions } from "@eggjs/core";
|
|
7
7
|
import { EggLoggerOptions, EggLoggersOptions } from "egg-logger";
|
|
8
8
|
import { RequestOptions } from "urllib";
|
|
@@ -228,7 +228,7 @@ interface EggAppConfig extends EggAppConfig$1 {
|
|
|
228
228
|
enable: boolean;
|
|
229
229
|
allowedMethods: string[];
|
|
230
230
|
};
|
|
231
|
-
onClientError?(err: Error, socket: Socket, app:
|
|
231
|
+
onClientError?(err: Error, socket: Socket, app: Application): ClientErrorResponse | Promise<ClientErrorResponse>;
|
|
232
232
|
/**
|
|
233
233
|
* server timeout in milliseconds, default to 0 (no timeout).
|
|
234
234
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "egg",
|
|
3
|
-
"version": "4.1.0-beta.
|
|
3
|
+
"version": "4.1.0-beta.18",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=22.18.0"
|
|
6
6
|
},
|
|
@@ -86,23 +86,23 @@
|
|
|
86
86
|
"type-fest": "^5.0.1",
|
|
87
87
|
"urllib": "^4.8.2",
|
|
88
88
|
"utility": "^2.5.0",
|
|
89
|
-
"@eggjs/cluster": "4.0.0-beta.
|
|
90
|
-
"@eggjs/cookies": "4.0.0-beta.
|
|
91
|
-
"@eggjs/
|
|
92
|
-
"@eggjs/
|
|
93
|
-
"@eggjs/extend2": "5.0.0-beta.
|
|
94
|
-
"@eggjs/
|
|
95
|
-
"@eggjs/
|
|
96
|
-
"@eggjs/
|
|
97
|
-
"@eggjs/onerror": "4.0.0-beta.
|
|
98
|
-
"@eggjs/multipart": "5.0.0-beta.
|
|
99
|
-
"@eggjs/schedule": "6.0.0-beta.
|
|
100
|
-
"@eggjs/security": "5.0.0-beta.
|
|
101
|
-
"@eggjs/session": "5.0.0-beta.
|
|
102
|
-
"@eggjs/
|
|
103
|
-
"@eggjs/
|
|
104
|
-
"@eggjs/
|
|
105
|
-
"@eggjs/view": "4.0.0-beta.
|
|
89
|
+
"@eggjs/cluster": "4.0.0-beta.18",
|
|
90
|
+
"@eggjs/cookies": "4.0.0-beta.18",
|
|
91
|
+
"@eggjs/core": "7.0.0-beta.18",
|
|
92
|
+
"@eggjs/development": "5.0.0-beta.18",
|
|
93
|
+
"@eggjs/extend2": "5.0.0-beta.18",
|
|
94
|
+
"@eggjs/logrotator": "5.0.0-beta.18",
|
|
95
|
+
"@eggjs/i18n": "4.0.0-beta.18",
|
|
96
|
+
"@eggjs/jsonp": "4.0.0-beta.18",
|
|
97
|
+
"@eggjs/onerror": "4.0.0-beta.18",
|
|
98
|
+
"@eggjs/multipart": "5.0.0-beta.18",
|
|
99
|
+
"@eggjs/schedule": "6.0.0-beta.18",
|
|
100
|
+
"@eggjs/security": "5.0.0-beta.18",
|
|
101
|
+
"@eggjs/session": "5.0.0-beta.18",
|
|
102
|
+
"@eggjs/utils": "5.0.0-beta.18",
|
|
103
|
+
"@eggjs/watcher": "5.0.0-beta.18",
|
|
104
|
+
"@eggjs/static": "4.0.0-beta.18",
|
|
105
|
+
"@eggjs/view": "4.0.0-beta.18"
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
108
|
"@types/koa-bodyparser": "^4.3.12",
|
|
@@ -110,7 +110,6 @@
|
|
|
110
110
|
"assert-file": "1",
|
|
111
111
|
"coffee": "5",
|
|
112
112
|
"egg-plugin-puml": "^2.4.0",
|
|
113
|
-
"egg-tracer": "^2.1.0",
|
|
114
113
|
"egg-view-nunjucks": "^2.3.0",
|
|
115
114
|
"formstream": "^1.5.1",
|
|
116
115
|
"koa-static": "^5.0.0",
|
|
@@ -121,9 +120,10 @@
|
|
|
121
120
|
"tsd": "^0.33.0",
|
|
122
121
|
"tsdown": "^0.15.4",
|
|
123
122
|
"typescript": "5.9.2",
|
|
124
|
-
"@eggjs/koa": "3.1.0-beta.
|
|
125
|
-
"@eggjs/mock": "7.0.0-beta.
|
|
126
|
-
"@eggjs/supertest": "9.0.0-beta.
|
|
123
|
+
"@eggjs/koa": "3.1.0-beta.18",
|
|
124
|
+
"@eggjs/mock": "7.0.0-beta.18",
|
|
125
|
+
"@eggjs/supertest": "9.0.0-beta.18",
|
|
126
|
+
"@eggjs/tracer": "4.0.0-beta.18"
|
|
127
127
|
},
|
|
128
128
|
"repository": {
|
|
129
129
|
"type": "git",
|