@nestjs/platform-fastify 10.4.3 → 10.4.5

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.
package/Readme.md CHANGED
@@ -96,6 +96,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
96
96
  <td><a href="https://bloodycase.com/?promocode=NEST" target="_blank"><img src="https://nestjs.com/img/logos/bloodycase-logo.png" width="65" valign="middle" /></a></td>
97
97
  <td><a href="https://handsontable.com/docs/react-data-grid/?utm_source=NestJS_GH&utm_medium=sponsorship&utm_campaign=library_sponsorship_2024" target="_blank"><img src="https://nestjs.com/img/logos/handsontable-logo.svg" width="150" valign="middle" /></a></td>
98
98
  <td align="center" valign="middle"><a href="https://www.itflashcards.com/" target="_blank"><img src="https://nestjs.com/img/logos/it_flashcards-logo.png" width="170" valign="middle" /></a></td>
99
+ <td align="center" valign="middle"><a href="https://arcjet.com/?ref=nestjs" target="_blank"><img src="https://nestjs.com/img/logos/arcjet-logo.svg" width="170" valign="middle" /></a></td>
99
100
  </tr>
100
101
  </table>
101
102
 
@@ -126,28 +126,28 @@ class FastifyAdapter extends http_adapter_1.AbstractHttpAdapter {
126
126
  return this.instance.listen(options, callback);
127
127
  }
128
128
  get(...args) {
129
- return this.injectRouteOptions('get', ...args);
129
+ return this.injectRouteOptions('GET', ...args);
130
130
  }
131
131
  post(...args) {
132
- return this.injectRouteOptions('post', ...args);
132
+ return this.injectRouteOptions('POST', ...args);
133
133
  }
134
134
  head(...args) {
135
- return this.injectRouteOptions('head', ...args);
135
+ return this.injectRouteOptions('HEAD', ...args);
136
136
  }
137
137
  delete(...args) {
138
- return this.injectRouteOptions('delete', ...args);
138
+ return this.injectRouteOptions('DELETE', ...args);
139
139
  }
140
140
  put(...args) {
141
- return this.injectRouteOptions('put', ...args);
141
+ return this.injectRouteOptions('PUT', ...args);
142
142
  }
143
143
  patch(...args) {
144
- return this.injectRouteOptions('patch', ...args);
144
+ return this.injectRouteOptions('PATCH', ...args);
145
145
  }
146
146
  options(...args) {
147
- return this.injectRouteOptions('options', ...args);
147
+ return this.injectRouteOptions('OPTIONS', ...args);
148
148
  }
149
149
  search(...args) {
150
- return this.injectRouteOptions('search', ...args);
150
+ return this.injectRouteOptions('SEARCH', ...args);
151
151
  }
152
152
  applyVersionFilter(handler, version, versioningOptions) {
153
153
  if (!this.versioningOptions) {
@@ -1,5 +1,5 @@
1
1
  import { INestApplication, HttpServer } from '@nestjs/common';
2
- import { FastifyBodyParser, FastifyInstance, FastifyPluginAsync, FastifyPluginCallback, FastifyPluginOptions, FastifyRegisterOptions, FastifyRequest, FastifyReply, RawServerBase, RawServerDefault } from 'fastify';
2
+ import { FastifyBodyParser, FastifyInstance, FastifyListenOptions, FastifyPluginAsync, FastifyPluginCallback, FastifyPluginOptions, FastifyRegisterOptions, FastifyRequest, FastifyReply, RawServerBase, RawServerDefault } from 'fastify';
3
3
  import { Chain as LightMyRequestChain, InjectOptions, Response as LightMyRequestResponse } from 'light-my-request';
4
4
  import { FastifyStaticOptions, FastifyViewOptions } from './external';
5
5
  import { NestFastifyBodyParserOptions } from './nest-fastify-body-parser-options.interface';
@@ -62,7 +62,22 @@ export interface NestFastifyApplication<TServer extends RawServerBase = RawServe
62
62
  * Starts the application.
63
63
  * @returns A Promise that, when resolved, is a reference to the underlying HttpServer.
64
64
  */
65
- listen(port: number | string, callback?: (err: Error, address: string) => void): Promise<TServer>;
66
- listen(port: number | string, address: string, callback?: (err: Error, address: string) => void): Promise<TServer>;
67
- listen(port: number | string, address: string, backlog: number, callback?: (err: Error, address: string) => void): Promise<TServer>;
65
+ listen(opts: FastifyListenOptions, callback?: (err: Error | null, address: string) => void): Promise<TServer>;
66
+ listen(opts?: FastifyListenOptions): Promise<TServer>;
67
+ listen(callback?: (err: Error | null, address: string) => void): Promise<TServer>;
68
+ /**
69
+ * @deprecated Variadic listen method is deprecated. Please use `.listen(optionsObject, callback)` instead. The variadic signature will be removed in `fastify@5`
70
+ * @see https://github.com/fastify/fastify/pull/3712
71
+ */
72
+ listen(port: number | string, callback?: (err: Error | null, address: string) => void): Promise<TServer>;
73
+ /**
74
+ * @deprecated Variadic listen method is deprecated. Please use `.listen(optionsObject, callback)` instead. The variadic signature will be removed in `fastify@5`
75
+ * @see https://github.com/fastify/fastify/pull/3712
76
+ */
77
+ listen(port: number | string, address: string, callback?: (err: Error | null, address: string) => void): Promise<TServer>;
78
+ /**
79
+ * @deprecated Variadic listen method is deprecated. Please use `.listen(optionsObject, callback)` instead. The variadic signature will be removed in `fastify@5`
80
+ * @see https://github.com/fastify/fastify/pull/3712
81
+ */
82
+ listen(port: number | string, address: string, backlog: number, callback?: (err: Error | null, address: string) => void): Promise<TServer>;
68
83
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/platform-fastify",
3
- "version": "10.4.3",
3
+ "version": "10.4.5",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@platform-fastify)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "license": "MIT",
@@ -22,7 +22,7 @@
22
22
  "@fastify/formbody": "7.4.0",
23
23
  "@fastify/middie": "8.3.3",
24
24
  "fastify": "4.28.1",
25
- "light-my-request": "6.0.0",
25
+ "light-my-request": "6.1.0",
26
26
  "path-to-regexp": "3.3.0",
27
27
  "tslib": "2.7.0"
28
28
  },