@nestjs/platform-fastify 7.5.0 → 7.5.1

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.
@@ -35,7 +35,7 @@ export declare class FastifyAdapter<TServer extends RawServerBase = RawServerDef
35
35
  setNotFoundHandler(handler: Parameters<FastifyInstance<TServer, TRawRequest, TRawResponse>['setNotFoundHandler']>[0]): FastifyInstance<TServer, TRawRequest, TRawResponse, FastifyLoggerInstance>;
36
36
  getHttpServer<T = TServer>(): T;
37
37
  getInstance<T = FastifyInstance<TServer, TRawRequest, TRawResponse>>(): T;
38
- register<Options extends FastifyPluginOptions>(plugin: FastifyPluginCallback<Options> | FastifyPluginAsync<Options> | Promise<{
38
+ register<Options extends FastifyPluginOptions = any>(plugin: FastifyPluginCallback<Options> | FastifyPluginAsync<Options> | Promise<{
39
39
  default: FastifyPluginCallback<Options>;
40
40
  }> | Promise<{
41
41
  default: FastifyPluginAsync<Options>;
@@ -1,19 +1,21 @@
1
1
  import { INestApplication } from '@nestjs/common';
2
- import { FastifyPlugin, FastifyPluginOptions, FastifyRegisterOptions } from 'fastify';
3
- import { InjectOptions, Response as LightMyRequestResponse, Chain as LightMyRequestChain } from 'light-my-request';
2
+ import { FastifyInstance, FastifyPluginAsync, FastifyPluginCallback, FastifyPluginOptions, FastifyRegisterOptions } from 'fastify';
3
+ import { Chain as LightMyRequestChain, InjectOptions, Response as LightMyRequestResponse } from 'light-my-request';
4
4
  import { FastifyStaticOptions, PointOfViewOptions } from './external';
5
5
  export interface NestFastifyApplication extends INestApplication {
6
6
  /**
7
7
  * A wrapper function around native `fastify.register()` method.
8
- * Example `app.register(require('fastify-formbody'))`
9
- *
10
- * @returns {this}
8
+ * Example `app.register(require('fastify-formbody'))
9
+ * @returns {Promise<FastifyInstance>}
11
10
  */
12
- register<Options extends FastifyPluginOptions>(plugin: FastifyPlugin<Options>, opts?: FastifyRegisterOptions<Options>): this;
11
+ register<Options extends FastifyPluginOptions = any>(plugin: FastifyPluginCallback<Options> | FastifyPluginAsync<Options> | Promise<{
12
+ default: FastifyPluginCallback<Options>;
13
+ }> | Promise<{
14
+ default: FastifyPluginAsync<Options>;
15
+ }>, opts?: FastifyRegisterOptions<Options>): Promise<FastifyInstance>;
13
16
  /**
14
17
  * Sets a base directory for public assets.
15
18
  * Example `app.useStaticAssets({ root: 'public' })`
16
- *
17
19
  * @returns {this}
18
20
  */
19
21
  useStaticAssets(options: FastifyStaticOptions): this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/platform-fastify",
3
- "version": "7.5.0",
3
+ "version": "7.5.1",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@platform-fastify)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "license": "MIT",