egg 4.1.0-beta.17 → 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: EggApplicationCore;
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: EggApplicationCore;
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 };
@@ -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: EggApplicationCore): ClientErrorResponse | Promise<ClientErrorResponse>;
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.17",
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.17",
90
- "@eggjs/cookies": "4.0.0-beta.17",
91
- "@eggjs/core": "7.0.0-beta.17",
92
- "@eggjs/extend2": "5.0.0-beta.17",
93
- "@eggjs/development": "5.0.0-beta.17",
94
- "@eggjs/jsonp": "4.0.0-beta.17",
95
- "@eggjs/logrotator": "5.0.0-beta.17",
96
- "@eggjs/multipart": "5.0.0-beta.17",
97
- "@eggjs/onerror": "4.0.0-beta.17",
98
- "@eggjs/i18n": "4.0.0-beta.17",
99
- "@eggjs/schedule": "6.0.0-beta.17",
100
- "@eggjs/security": "5.0.0-beta.17",
101
- "@eggjs/session": "5.0.0-beta.17",
102
- "@eggjs/utils": "5.0.0-beta.17",
103
- "@eggjs/static": "4.0.0-beta.17",
104
- "@eggjs/view": "4.0.0-beta.17",
105
- "@eggjs/watcher": "5.0.0-beta.17"
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",
@@ -120,10 +120,10 @@
120
120
  "tsd": "^0.33.0",
121
121
  "tsdown": "^0.15.4",
122
122
  "typescript": "5.9.2",
123
- "@eggjs/mock": "7.0.0-beta.17",
124
- "@eggjs/koa": "3.1.0-beta.17",
125
- "@eggjs/tracer": "4.0.0-beta.17",
126
- "@eggjs/supertest": "9.0.0-beta.17"
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",