Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ fastify hook preValidation|Add an instance fastify preValidation hook|ffprevalid
fastify hook preHandler|Add an instance fastify preHandler hook|ffprehandler, hookprehandler
fastify hook preSerialization|Add an instance fastify preSerialization hook|ffpreserialization, hookpreserialization
fastify hook onError|Add an instance fastify onError hook|ffonerror, hookonerror
fastify hook onRequestAbort|Add an instance fastify onRequestAbort hook|ffonrequestabort, hookonrequestabort
fastify hook onSend|Add an instance fastify onSend hook|ffonsend, hookonsend
fastify hook onResponse|Add an instance fastify onResponse hook|ffonresponse, hookonresponse
fastify hook onTimeout|Add an instance fastify onTimeout hook|ffontimeout, hookontimeout
Expand Down Expand Up @@ -53,3 +54,4 @@ First, you must be added into the [Fastify publisher](https://marketplace.visual
- Manually bump the version in the `package.json`
- Run `npm run vscode:pack`
- Run `npm run vscode:publish`
- Commit&Push the new version to the `main` branch
14 changes: 14 additions & 0 deletions snippets/snippets-js.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,20 @@
],
"description": "Add an instance fastify onError hook"
},
"fastify hook onRequestAbort": {
"scope": "javascript,typescript",
"prefix": [
"ffonrequestabort",
"hookonrequestabort"
],
"body": [
"app.addHook('onRequestAbort', function hook (request, reply, done) {",
" // Notice: run when a client closes the connection before. Therefore, you will not be able to send data to the client.",
" done()",
"})"
],
"description": "Add an instance fastify onRequestAbort hook"
},
"fastify hook onSend": {
"scope": "javascript,typescript",
"prefix": [
Expand Down