diff --git a/build.config.ts b/build.config.ts index fa4a5e3cc7..993eddc1ac 100644 --- a/build.config.ts +++ b/build.config.ts @@ -15,7 +15,6 @@ const tracePkgs = [ "defu", // used by open-api runtime "destr", // used by node-server and deno-server "get-port-please", // used by dev server - "hookable", // used by app.ts "rendu", // used by HTML renderer template "scule", // used by runtime config "source-map", // used by dev error runtime diff --git a/docs/1.docs/50.plugins.md b/docs/1.docs/50.plugins.md index 5b568167e4..4ae6c79cd4 100644 --- a/docs/1.docs/50.plugins.md +++ b/docs/1.docs/50.plugins.md @@ -54,9 +54,10 @@ export default definePlugin((nitro) => { ### Available hooks +- `"close", () => {}` - `"request", (event) => {}` - `"error", (error, { event? }) => {}` -- `"response", (event, { body }) => {}` +- `"response", (res, event) => {}` ## Examples diff --git a/package.json b/package.json index cb146f9fe9..458176f419 100644 --- a/package.json +++ b/package.json @@ -71,6 +71,7 @@ "crossws": "^0.4.4", "db0": "^0.3.4", "h3": "^2.0.1-rc.14", + "hookable": "^6.0.1", "nf3": "^0.3.10", "ofetch": "^2.0.0-alpha.3", "ohash": "^2.0.11", @@ -127,7 +128,6 @@ "get-port-please": "^3.2.0", "giget": "^3.1.2", "gzip-size": "^7.0.0", - "hookable": "^6.0.1", "httpxy": "^0.1.7", "klona": "^2.0.6", "knitwork": "^1.3.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 243e2f4837..bfd79600a0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,6 +27,9 @@ importers: h3: specifier: ^2.0.1-rc.14 version: 2.0.1-rc.14(crossws@0.4.4(srvx@0.11.2)) + hookable: + specifier: ^6.0.1 + version: 6.0.1 jiti: specifier: ^2.6.1 version: 2.6.1 @@ -193,9 +196,6 @@ importers: gzip-size: specifier: ^7.0.0 version: 7.0.0 - hookable: - specifier: ^6.0.1 - version: 6.0.1 httpxy: specifier: ^0.1.7 version: 0.1.7