@nestjs/platform-fastify 10.3.9 → 10.3.10

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
@@ -60,7 +60,9 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
60
60
  <table style="text-align:center;">
61
61
  <tr>
62
62
  <td><a href="https://trilon.io" target="_blank"><img src="https://nestjs.com/img/trilon.svg" width="200" valign="middle" /></a></td>
63
+ <td><a href="https://microsoft.com/" target="_blank"><img src="https://nestjs.com/img/logos/microsoft-logo.png" width="180" valign="middle" /></a></td>
63
64
  <td><a href="https://mojam.co" target="_blank"><img src="https://nestjs.com/img/logos/mojam-logo.png" width="80" valign="middle" /></a></td>
65
+ <td><a href="https://marblism.com?utm_source=nest" target="_blank"><img src="https://nestjs.com/img/logos/marblism-logo.png" width="180" valign="middle" /></a></td>
64
66
  <td><a href="https://valor-software.com/" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="170" valign="middle" /></a></td>
65
67
  <td><a href="https://amplication.com/" target="_blank"><img src="https://nestjs.com/img/logos/amplication-logo.svg" width="190" valign="middle" /></a></td>
66
68
  </tr>
@@ -89,8 +91,10 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
89
91
 
90
92
  <table style="text-align:center;">
91
93
  <tr>
92
- <td><a href="https://n.inc" target="_blank"><img src="https://nestjs.com/img/logos/n-inc-logo.svg" width="120" valign="middle" /></a></td>
94
+ <td><a href="https://n.inc" target="_blank"><img src="https://nestjs.com/img/logos/n-inc-logo.svg" width="90" valign="middle" /></a></td>
93
95
  <td><a href="https://twistag.com/" target="_blank"><img src="https://nestjs.com/img/logos/twistag-logo.png" width="120" valign="middle" /></a></td>
96
+ <td><a href="https://www.dinii.jp/" target="_blank"><img src="https://nestjs.com/img/logos/dinii-logo.png" width="75" valign="middle" /></a></td>
97
+ <td><a href="https://www.mercedes-benz.com/" target="_blank"><img src="https://nestjs.com/img/logos/mercedes-logo.png" width="110" valign="middle" /></a></td>
94
98
  </tr>
95
99
  </table>
96
100
 
@@ -125,6 +129,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
125
129
  <td align="center" valign="middle"><a href="https://julienferand.dev/" target="_blank"><img src="https://nestjs.com/img/logos/julienferand-logo.jpeg" width="65" valign="middle" /></a></td>
126
130
  <td align="center" valign="middle"><a href="https://www.tripoffice.com/" target="_blank"><img src="https://nestjs.com/img/logos/tripoffice-logo.png" width="140" valign="middle" /></a></td>
127
131
  <td align="center" valign="middle"><a href="https://solcellsforetag.se/" target="_blank"><img src="https://nestjs.com/img/logos/solcellsforetag-logo.svg" width="140" valign="middle" /></a></td>
132
+ <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="150" valign="middle" /></a></td>
128
133
  </tr>
129
134
  </table>
130
135
 
@@ -11,15 +11,18 @@ import * as https from 'https';
11
11
  import { InjectOptions, Chain as LightMyRequestChain, Response as LightMyRequestResponse } from 'light-my-request';
12
12
  import { NestFastifyBodyParserOptions } from '../interfaces';
13
13
  import { FastifyStaticOptions, FastifyViewOptions } from '../interfaces/external';
14
- type FastifyHttp2SecureOptions<Server extends http2.Http2SecureServer, Logger extends FastifyBaseLogger = FastifyBaseLogger> = FastifyServerOptions<Server, Logger> & {
14
+ type FastifyAdapterBaseOptions<Server extends RawServerBase = RawServerDefault, Logger extends FastifyBaseLogger = FastifyBaseLogger> = FastifyServerOptions<Server, Logger> & {
15
+ skipMiddie?: boolean;
16
+ };
17
+ type FastifyHttp2SecureOptions<Server extends http2.Http2SecureServer, Logger extends FastifyBaseLogger = FastifyBaseLogger> = FastifyAdapterBaseOptions<Server, Logger> & {
15
18
  http2: true;
16
19
  https: http2.SecureServerOptions;
17
20
  };
18
- type FastifyHttp2Options<Server extends http2.Http2Server, Logger extends FastifyBaseLogger = FastifyBaseLogger> = FastifyServerOptions<Server, Logger> & {
21
+ type FastifyHttp2Options<Server extends http2.Http2Server, Logger extends FastifyBaseLogger = FastifyBaseLogger> = FastifyAdapterBaseOptions<Server, Logger> & {
19
22
  http2: true;
20
23
  http2SessionTimeout?: number;
21
24
  };
22
- type FastifyHttpsOptions<Server extends https.Server, Logger extends FastifyBaseLogger = FastifyBaseLogger> = FastifyServerOptions<Server, Logger> & {
25
+ type FastifyHttpsOptions<Server extends https.Server, Logger extends FastifyBaseLogger = FastifyBaseLogger> = FastifyAdapterBaseOptions<Server, Logger> & {
23
26
  https: https.ServerOptions;
24
27
  };
25
28
  type VersionedRoute<TRequest, TResponse> = ((req: TRequest, res: TResponse, next: Function) => Function) & {
@@ -45,7 +48,7 @@ export declare class FastifyAdapter<TServer extends RawServerBase = RawServerDef
45
48
  private versioningOptions?;
46
49
  private readonly versionConstraint;
47
50
  get isParserRegistered(): boolean;
48
- constructor(instanceOrOptions?: TInstance | FastifyHttp2Options<any> | FastifyHttp2SecureOptions<any> | FastifyHttpsOptions<any> | FastifyServerOptions<TServer>);
51
+ constructor(instanceOrOptions?: TInstance | FastifyHttp2Options<any> | FastifyHttp2SecureOptions<any> | FastifyHttpsOptions<any> | FastifyAdapterBaseOptions<TServer>);
49
52
  init(): Promise<void>;
50
53
  listen(port: string | number, callback?: () => void): void;
51
54
  listen(port: string | number, hostname: string, callback?: () => void): void;
@@ -94,6 +94,9 @@ class FastifyAdapter extends http_adapter_1.AbstractHttpAdapter {
94
94
  ...instanceOrOptions,
95
95
  });
96
96
  this.setInstance(instance);
97
+ if (instanceOrOptions?.skipMiddie) {
98
+ this.isMiddieRegistered = true;
99
+ }
97
100
  }
98
101
  async init() {
99
102
  if (this.isMiddieRegistered) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/platform-fastify",
3
- "version": "10.3.9",
3
+ "version": "10.3.10",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@platform-fastify)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "license": "MIT",
@@ -21,10 +21,10 @@
21
21
  "@fastify/cors": "9.0.1",
22
22
  "@fastify/formbody": "7.4.0",
23
23
  "@fastify/middie": "8.3.1",
24
- "fastify": "4.27.0",
24
+ "fastify": "4.28.0",
25
25
  "light-my-request": "5.13.0",
26
26
  "path-to-regexp": "3.2.0",
27
- "tslib": "2.6.2"
27
+ "tslib": "2.6.3"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@fastify/static": "^6.0.0 || ^7.0.0",