@nestjs/platform-fastify 9.2.1 → 9.3.0-beta.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.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2017-2022 Kamil Mysliwiec <https://kamilmysliwiec.com>
3
+ Copyright (c) 2017-2023 Kamil Mysliwiec <https://kamilmysliwiec.com>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
package/Readme.md CHANGED
@@ -80,7 +80,8 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
80
80
  <a href="https://snyk.co/nestjs" target="_blank"><img src="https://nestjs.com/img/snyk-logo-black.png" width="185" valign="middle" /></a></td><td>
81
81
  <a href="https://fuseautotech.com/" target="_blank"><img src="https://nestjs.com/img/fuse-logo.svg" width="105" valign="middle" /></a></td>
82
82
  <td>
83
- <a href="https://ridicorp.com/career/" target="_blank"><img src="https://nestjs.com/img/ridi-logo.svg" width="105" valign="middle" /></a></td></</tr></table>
83
+ <a href="https://ridicorp.com/career/" target="_blank"><img src="https://nestjs.com/img/ridi-logo.svg" width="105" valign="middle" /></a></td><td>
84
+ <a href="https://www.movavi.com/imovie-for-windows.html" target="_blank"><img src="https://nestjs.com/img/movavi-logo.svg" width="105" valign="middle" /></a></td></</tr></table>
84
85
 
85
86
  #### Silver Sponsors
86
87
 
@@ -93,7 +94,8 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
93
94
  <td><a href="https://www.tinystacks.com" target="_blank"><img src="https://nestjs.com/img/tinystacks-logo.png#1" width="140" valign="middle" /></td>
94
95
  <td><a href="https://n.inc" target="_blank"><img src="https://nestjs.com/img/n-inc-logo.svg" width="120" valign="middle" /></td></tr><tr>
95
96
  <td><a href="https://bilberrry.com/" target="_blank"><img src="https://nestjs.com/img/bilberrry-logo.svg" width="180" valign="middle" /></td>
96
- <td><a href="https://ipinfo.ai/" target="_blank"><img src="https://nestjs.com/img/ipinfo-logo.png" width="130" valign="middle" /></td></tr>
97
+ <td><a href="https://ipinfo.ai/" target="_blank"><img src="https://nestjs.com/img/ipinfo-logo.png" width="130" valign="middle" /></td>
98
+ <td><a href="https://chax.at" target="_blank"><img src="https://nestjs.com/img/chaxat-logo.png" width="100" valign="middle" /></td></tr>
97
99
  </table>
98
100
 
99
101
  #### Sponsors
@@ -134,7 +136,8 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
134
136
  <td align="center" valign="middle"><a href="https://mobilereality.pl/" target="_blank"><img src="https://nestjs.com/img/mobile-reality-logo.png" width="45" valign="middle" /></a></td>
135
137
  <td align="center" valign="middle"><a href="https://boringowl.io/" target="_blank"><img src="https://nestjs.com/img/boringowl-logo.svg" width="120" valign="middle" /></a></td>
136
138
  <td align="center" valign="middle"><a href="https://www.mobilefactory.jp/" target="_blank"><img src="https://nestjs.com/img/mobilefactory-logo.png" width="100" valign="middle" /></a></td>
137
- <td align="center" valign="middle"><a href="https://db.nordbot.app/" target="_blank"><img src="https://nestjs.com/img/nord-logo.png" width="50" valign="middle" /></a></td>
139
+ <td align="center" valign="middle"><a href="https://nordbot.app/" target="_blank"><img src="https://nestjs.com/img/nordbot-logo.png" width="120" valign="middle" /></a></td>
140
+ <td align="center" valign="middle"><a href="https://doppio.sh/" target="_blank"><img src="https://nestjs.com/img/dopiosh-logo.png" width="50" valign="middle" /></a></td>
138
141
  </tr></table>
139
142
 
140
143
  ## Backers
@@ -8,7 +8,7 @@ import { FastifyInstance, FastifyLoggerInstance, FastifyPluginAsync, FastifyPlug
8
8
  import * as http2 from 'http2';
9
9
  import * as https from 'https';
10
10
  import { Chain as LightMyRequestChain, InjectOptions, Response as LightMyRequestResponse } from 'light-my-request';
11
- import { FastifyStaticOptions, PointOfViewOptions } from '../interfaces/external';
11
+ import { FastifyStaticOptions, FastifyViewOptions } from '../interfaces/external';
12
12
  declare type FastifyHttp2SecureOptions<Server extends http2.Http2SecureServer, Logger extends FastifyLoggerInstance = FastifyLoggerInstance> = FastifyServerOptions<Server, Logger> & {
13
13
  http2: true;
14
14
  https: http2.SecureServerOptions;
@@ -69,7 +69,7 @@ export declare class FastifyAdapter<TServer extends RawServerBase = RawServerDef
69
69
  close(): Promise<undefined>;
70
70
  initHttpServer(): void;
71
71
  useStaticAssets(options: FastifyStaticOptions): FastifyInstance<TServer, TRawRequest, TRawResponse, import("fastify").FastifyBaseLogger, import("fastify").FastifyTypeProviderDefault> & PromiseLike<undefined>;
72
- setViewEngine(options: PointOfViewOptions | string): FastifyInstance<TServer, TRawRequest, TRawResponse, import("fastify").FastifyBaseLogger, import("fastify").FastifyTypeProviderDefault> & PromiseLike<undefined>;
72
+ setViewEngine(options: FastifyViewOptions | string): FastifyInstance<TServer, TRawRequest, TRawResponse, import("fastify").FastifyBaseLogger, import("fastify").FastifyTypeProviderDefault> & PromiseLike<undefined>;
73
73
  isHeadersSent(response: TReply): boolean;
74
74
  setHeader(response: TReply, name: string, value: string): FastifyReply<TServer, TRawRequest, TRawResponse, import("fastify").RouteGenericInterface, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
75
75
  getRequestHostname(request: TRequest): string;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  /**
3
3
  * "fastify-static" interfaces
4
- * @see https://github.com/fastify/fastify-static/blob/master/index.d.ts
4
+ * @see https://github.com/fastify/fastify-static/blob/master/types/index.d.ts
5
5
  */
6
6
  import { Stats } from 'fs';
7
7
  interface ExtendedInformation {
@@ -43,6 +43,7 @@ interface SendOptions {
43
43
  index?: string[] | false;
44
44
  lastModified?: boolean;
45
45
  maxAge?: string | number;
46
+ serveDotFiles?: boolean;
46
47
  }
47
48
  export interface FastifyStaticOptions extends SendOptions {
48
49
  root: string | string[];
@@ -0,0 +1,29 @@
1
+ /**
2
+ * "fastify/view" interfaces
3
+ * @see https://github.com/fastify/point-of-view/blob/master/types/index.d.ts
4
+ */
5
+ export interface FastifyViewOptions {
6
+ engine: {
7
+ ejs?: any;
8
+ eta?: any;
9
+ nunjucks?: any;
10
+ pug?: any;
11
+ handlebars?: any;
12
+ mustache?: any;
13
+ 'art-template'?: any;
14
+ twig?: any;
15
+ liquid?: any;
16
+ dot?: any;
17
+ };
18
+ templates?: string;
19
+ includeViewExtension?: boolean;
20
+ options?: object;
21
+ charset?: string;
22
+ maxCache?: number;
23
+ production?: boolean;
24
+ defaultContext?: object;
25
+ layout?: string;
26
+ root?: string;
27
+ viewExt?: string;
28
+ propertyName?: string;
29
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,2 @@
1
1
  export * from './fastify-static-options.interface';
2
- export * from './point-of-view-options.interface';
2
+ export * from './fastify-view-options.interface';
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./fastify-static-options.interface"), exports);
5
- tslib_1.__exportStar(require("./point-of-view-options.interface"), exports);
5
+ tslib_1.__exportStar(require("./fastify-view-options.interface"), exports);
@@ -1,7 +1,7 @@
1
1
  import { INestApplication } from '@nestjs/common';
2
2
  import { FastifyInstance, FastifyPluginAsync, FastifyPluginCallback, FastifyPluginOptions, FastifyRegisterOptions } from 'fastify';
3
3
  import { Chain as LightMyRequestChain, InjectOptions, Response as LightMyRequestResponse } from 'light-my-request';
4
- import { FastifyStaticOptions, PointOfViewOptions } from './external';
4
+ import { FastifyStaticOptions, FastifyViewOptions } from './external';
5
5
  export interface NestFastifyApplication extends INestApplication {
6
6
  /**
7
7
  * A wrapper function around native `fastify.register()` method.
@@ -25,7 +25,7 @@ export interface NestFastifyApplication extends INestApplication {
25
25
  * Don't pass in a string. The string type in the argument is for compatibilility reason and will cause an exception.
26
26
  * @returns {this}
27
27
  */
28
- setViewEngine(options: PointOfViewOptions | string): this;
28
+ setViewEngine(options: FastifyViewOptions | string): this;
29
29
  /**
30
30
  * A wrapper function around native `fastify.inject()` method.
31
31
  * @returns {void}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/platform-fastify",
3
- "version": "9.2.1",
3
+ "version": "9.3.0-beta.1",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@platform-fastify)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "license": "MIT",
@@ -18,10 +18,10 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@fastify/cors": "8.2.0",
21
- "@fastify/formbody": "7.3.0",
22
- "@fastify/middie": "8.0.0",
23
- "fastify": "4.10.2",
24
- "light-my-request": "5.6.1",
21
+ "@fastify/formbody": "7.4.0",
22
+ "@fastify/middie": "8.1.0",
23
+ "fastify": "4.11.0",
24
+ "light-my-request": "5.8.0",
25
25
  "path-to-regexp": "3.2.0",
26
26
  "tslib": "2.4.1"
27
27
  },