@nestjs/platform-fastify 10.3.0 → 10.3.2

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-2023 Kamil Mysliwiec <https://kamilmysliwiec.com>
3
+ Copyright (c) 2017-2024 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
@@ -76,7 +76,9 @@ export declare class FastifyAdapter<TServer extends RawServerBase = RawServerDef
76
76
  useStaticAssets(options: FastifyStaticOptions): FastifyInstance<TServer, TRawRequest, TRawResponse, FastifyBaseLogger, import("fastify").FastifyTypeProviderDefault> & PromiseLike<undefined>;
77
77
  setViewEngine(options: FastifyViewOptions | string): FastifyInstance<TServer, TRawRequest, TRawResponse, FastifyBaseLogger, import("fastify").FastifyTypeProviderDefault> & PromiseLike<undefined>;
78
78
  isHeadersSent(response: TReply): boolean;
79
+ getHeader?(response: any, name: string): any;
79
80
  setHeader(response: TReply, name: string, value: string): FastifyReply<TServer, TRawRequest, TRawResponse, import("fastify").RouteGenericInterface, unknown, import("fastify").FastifySchema, import("fastify").FastifyTypeProviderDefault, unknown>;
81
+ appendHeader?(response: any, name: string, value: string): void;
80
82
  getRequestHostname(request: TRequest): string;
81
83
  getRequestMethod(request: TRequest): string;
82
84
  getRequestUrl(request: TRequest): string;
@@ -253,9 +253,15 @@ class FastifyAdapter extends http_adapter_1.AbstractHttpAdapter {
253
253
  isHeadersSent(response) {
254
254
  return response.sent;
255
255
  }
256
+ getHeader(response, name) {
257
+ return response.getHeader(name);
258
+ }
256
259
  setHeader(response, name, value) {
257
260
  return response.header(name, value);
258
261
  }
262
+ appendHeader(response, name, value) {
263
+ response.header(name, value);
264
+ }
259
265
  getRequestHostname(request) {
260
266
  return request.hostname;
261
267
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/platform-fastify",
3
- "version": "10.3.0",
3
+ "version": "10.3.2",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@platform-fastify)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "license": "MIT",
@@ -18,16 +18,16 @@
18
18
  "access": "public"
19
19
  },
20
20
  "dependencies": {
21
- "@fastify/cors": "8.4.2",
21
+ "@fastify/cors": "9.0.1",
22
22
  "@fastify/formbody": "7.4.0",
23
23
  "@fastify/middie": "8.3.0",
24
- "fastify": "4.25.1",
24
+ "fastify": "4.26.0",
25
25
  "light-my-request": "5.11.0",
26
26
  "path-to-regexp": "3.2.0",
27
27
  "tslib": "2.6.2"
28
28
  },
29
29
  "peerDependencies": {
30
- "@fastify/static": "^6.0.0",
30
+ "@fastify/static": "^6.0.0 || ^7.0.0",
31
31
  "@fastify/view": "^7.0.0 || ^8.0.0",
32
32
  "@nestjs/common": "^10.0.0",
33
33
  "@nestjs/core": "^10.0.0"