@nestjs/platform-fastify 8.2.3 → 8.2.4

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
@@ -59,6 +59,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
59
59
  #### Principal Sponsors
60
60
  <table style="text-align:center;"><tr>
61
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><a href="https://www.redhat.com" target="_blank"><img src="https://nestjs.com/img/red-hat-logo.svg" width="200" valign="middle" /></a></td>
62
63
  <td>
63
64
  <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>
64
65
  <td>
@@ -80,7 +81,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
80
81
  <table style="text-align:center;"><tr><td>
81
82
  <a href="https://neoteric.eu/" target="_blank"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> </td><td>
82
83
  <a href="http://gojob.com" target="_blank"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" width="100" /></a> </td><td>
83
- <a href="http://www.leogistics.com" target="_blank"><img src="https://nestjs.com/img/leogistics-logo.jpeg" width="150" valign="middle" /></td><td>
84
+ <a href="https://www.myleodsc.com/" target="_blank"><img src="https://nestjs.com/img/myleo-logo.png" width="180" valign="middle" /></td><td>
84
85
  <a href="https://careers.meetdandy.com/?gh_src=063ba61e3us" target="_blank"><img src="https://nestjs.com/img/dandy-roles-logo.svg" width="150" valign="middle" /></td><td>
85
86
  <a href="https://www.castlecraft.in" target="_blank"><img src="https://nestjs.com/img/castlecraft-logo.png" width="150" valign="middle" /></td>
86
87
  <td><a href="https://www.tinystacks.com" target="_blank"><img src="https://nestjs.com/img/tinystacks-logo.png#1" width="140" valign="middle" /></td></tr></table>
@@ -4,6 +4,7 @@ exports.FastifyAdapter = void 0;
4
4
  const common_1 = require("@nestjs/common");
5
5
  const interfaces_1 = require("@nestjs/common/interfaces");
6
6
  const load_package_util_1 = require("@nestjs/common/utils/load-package.util");
7
+ const shared_utils_1 = require("@nestjs/common/utils/shared.utils");
7
8
  const http_adapter_1 = require("@nestjs/core/adapters/http-adapter");
8
9
  const fastify_1 = require("fastify");
9
10
  const Reply = require("fastify/lib/reply");
@@ -13,7 +14,7 @@ class FastifyAdapter extends http_adapter_1.AbstractHttpAdapter {
13
14
  this.versionConstraint = {
14
15
  name: 'version',
15
16
  validate(value) {
16
- if (typeof value !== 'string' && !Array.isArray(value)) {
17
+ if (!shared_utils_1.isString(value) && !Array.isArray(value)) {
17
18
  throw new Error('Version constraint should be a string or an array of strings.');
18
19
  }
19
20
  },
@@ -190,7 +191,7 @@ class FastifyAdapter extends http_adapter_1.AbstractHttpAdapter {
190
191
  return this.register(load_package_util_1.loadPackage('fastify-static', 'FastifyAdapter.useStaticAssets()', () => require('fastify-static')), options);
191
192
  }
192
193
  setViewEngine(options) {
193
- if (typeof options === 'string') {
194
+ if (shared_utils_1.isString(options)) {
194
195
  new common_1.Logger('FastifyAdapter').error("setViewEngine() doesn't support a string argument.");
195
196
  process.exit(1);
196
197
  }
@@ -249,7 +250,7 @@ class FastifyAdapter extends http_adapter_1.AbstractHttpAdapter {
249
250
  }
250
251
  injectConstraintsIfVersioned(routerMethodKey, ...args) {
251
252
  const handlerRef = args[args.length - 1];
252
- const isVersioned = typeof handlerRef.version !== 'undefined' &&
253
+ const isVersioned = !shared_utils_1.isUndefined(handlerRef.version) &&
253
254
  handlerRef.version !== interfaces_1.VERSION_NEUTRAL;
254
255
  if (isVersioned) {
255
256
  const isPathAndRouteTuple = args.length === 2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/platform-fastify",
3
- "version": "8.2.3",
3
+ "version": "8.2.4",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@platform-fastify)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "license": "MIT",
@@ -17,10 +17,10 @@
17
17
  "access": "public"
18
18
  },
19
19
  "dependencies": {
20
- "fastify": "3.24.0",
20
+ "fastify": "3.24.1",
21
21
  "fastify-cors": "6.0.2",
22
22
  "fastify-formbody": "5.2.0",
23
- "light-my-request": "4.6.0",
23
+ "light-my-request": "4.7.0",
24
24
  "middie": "5.3.0",
25
25
  "path-to-regexp": "3.2.0",
26
26
  "tslib": "2.3.1"