@nestjs/platform-fastify 8.1.2 → 8.2.3

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/CHANGELOG.md ADDED
@@ -0,0 +1,18 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ <a name="8.2.0"></a>
7
+ # [8.2.0](https://github.com/nestjs/nest/compare/v8.1.2...v8.2.0) (2021-11-08)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * **deps:** update dependency fastify to v3.23.1 ([63113d8](https://github.com/nestjs/nest/commit/63113d8))
13
+ * **platform-fastify:** fix streamable file processing ([365c40b](https://github.com/nestjs/nest/commit/365c40b))
14
+
15
+
16
+ ### Features
17
+
18
+ * **common:** add the ability to set some extra metadata about returned files ([5100573](https://github.com/nestjs/nest/commit/5100573))
package/Readme.md CHANGED
@@ -57,10 +57,12 @@ With official support, you can get expert help straight from Nest core team. We
57
57
  Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
58
58
 
59
59
  #### Principal Sponsors
60
- <table style="text-align:center;"><tr><td>
60
+ <table style="text-align:center;"><tr>
61
+ <td><a href="https://trilon.io" target="_blank"><img src="https://nestjs.com/img/trilon.svg" width="200" valign="middle" /></a></td>
62
+ <td>
61
63
  <a href="https://github.com/Sanofi-IADC" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/sanofi.png" width="180" valign="middle" /></a></td>
62
64
  <td>
63
- <a href="https://trilon.io" target="_blank"><img src="https://nestjs.com/img/trilon.svg" width="200" valign="middle" /></a></td>
65
+ <a href="https://nx.dev" target="_blank"><img src="https://nestjs.com/img/nx-logo.png" height="45" valign="middle" /></a></td>
64
66
  </tr></table>
65
67
 
66
68
  #### Gold Sponsors
@@ -113,6 +115,8 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
113
115
  <td align="center" valign="middle"><a href="https://studyclerk.com/pay-for-research-paper" target="_blank"><img src="https://nestjs.com/img/studyclerk-logo.png" width="125" valign="middle" /></a></td><td align="center" valign="middle"><a href="https://xyndata.com" target="_blank"><img src="https://nestjs.com/img/xyndata-logo.png" width="125" valign="middle" /></a></td></tr><tr>
114
116
  <td align="center" valign="middle"><a href="https://www.anonymistic.com/" target="_blank"><img src="https://nestjs.com/img/anonymistic-logo.png" width="125" valign="middle" /></a></td>
115
117
  <td align="center" valign="middle"><a href="https://www.naologic.com/" target="_blank"><img src="https://nestjs.com/img/naologic-logo.svg" width="125" valign="middle" /></a></td>
118
+ <td align="center" valign="middle"><a href="https://messaged.com/" target="_blank"><img src="https://nestjs.com/img/messaged-logo.png" width="50" valign="middle" /></a></td>
119
+ <td align="center" valign="middle"><a href="https://triplecore.io" target="_blank"><img src="https://nestjs.com/img/triplecore-logo.svg" width="50" valign="middle" /></a></td>
116
120
  </tr></table>
117
121
 
118
122
  ## Backers
@@ -128,6 +128,13 @@ class FastifyAdapter extends http_adapter_1.AbstractHttpAdapter {
128
128
  fastifyReply.status(statusCode);
129
129
  }
130
130
  if (body instanceof common_1.StreamableFile) {
131
+ const streamHeaders = body.getHeaders();
132
+ if (fastifyReply.getHeader('Content-Type') === undefined) {
133
+ fastifyReply.header('Content-Type', streamHeaders.type);
134
+ }
135
+ if (fastifyReply.getHeader('Content-Disposition') === undefined) {
136
+ fastifyReply.header('Content-Disposition', streamHeaders.disposition);
137
+ }
131
138
  body = body.getStream();
132
139
  }
133
140
  return fastifyReply.send(body);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/platform-fastify",
3
- "version": "8.1.2",
3
+ "version": "8.2.3",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@platform-fastify)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "license": "MIT",
@@ -17,9 +17,9 @@
17
17
  "access": "public"
18
18
  },
19
19
  "dependencies": {
20
- "fastify": "3.22.0",
20
+ "fastify": "3.24.0",
21
21
  "fastify-cors": "6.0.2",
22
- "fastify-formbody": "5.1.0",
22
+ "fastify-formbody": "5.2.0",
23
23
  "light-my-request": "4.6.0",
24
24
  "middie": "5.3.0",
25
25
  "path-to-regexp": "3.2.0",