diff --git a/package.json b/package.json index df6351a433..c4325f2c8e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "egg", - "version": "4.0.0-beta.14", + "version": "4.0.0-beta.15", "engines": { "node": ">= 18.19.0" }, @@ -21,10 +21,10 @@ "dependencies": { "@eggjs/cluster": "^3.0.0", "@eggjs/cookies": "^3.0.0", - "@eggjs/core": "^6.2.11", + "@eggjs/core": "^6.2.13", "@eggjs/schedule": "^5.0.2", - "@eggjs/utils": "^4.1.5", - "@eggjs/watcher": "^4.0.1", + "@eggjs/utils": "^4.2.4", + "@eggjs/watcher": "^4.0.3", "circular-json-for-egg": "^1.0.0", "cluster-client": "^3.7.0", "egg-development": "^3.0.0", diff --git a/src/lib/types.ts b/src/lib/types.ts index d16b55cf19..f4de59175a 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -7,6 +7,7 @@ import type { } from 'egg-logger'; import type { FileLoaderOptions, + EggAppConfig as EggCoreAppConfig, } from '@eggjs/core'; import type { EggApplicationCore, Context, @@ -16,7 +17,7 @@ import type { NotFoundMiddlewareOptions } from '../app/middleware/notfound.js'; import type { SiteFileMiddlewareOptions } from '../app/middleware/site_file.js'; // import @eggjs/watcher types -// import '@eggjs/watcher'; +import '@eggjs/watcher'; export type { EggAppInfo, @@ -61,7 +62,7 @@ export interface CustomLoaderConfig extends Omit; - onClientError?(err: Error, socket: Socket, app: EggApplicationCore): ClientErrorResponse | Promise; /** diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 597863c8d4..79bea5b1a7 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -1,4 +1,3 @@ - import path from 'node:path'; import { fileURLToPath } from 'node:url'; diff --git a/test/index.test-d.ts b/test/index.test-d.ts index d5f6e0fb83..052473eb5c 100644 --- a/test/index.test-d.ts +++ b/test/index.test-d.ts @@ -18,6 +18,10 @@ expectType(ctx); expectType(ctx.httpClient); expectType(ctx.request.body); +expectType(app.watcher); +expectType(app.config.watcher.type); +expectType(app.config.watcher.eventSources.default); + class AppBoot implements ILifecycleBoot { private readonly app: Application;