@nestjs/platform-fastify 8.3.0 → 8.3.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/Readme.md CHANGED
@@ -123,6 +123,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
123
123
  <td align="center" valign="middle"><a href="https://thecasinowizard.com/bonuses/no-deposit-bonuses/" target="_blank"><img src="https://nestjs.com/img/casinowizard-logo.png" width="120" valign="middle" /></a></td></tr><tr>
124
124
  <td align="center" valign="middle"><a href="https://polygon-software.ch/" target="_blank"><img src="https://nestjs.com/img/polygon-logo.svg" width="120" valign="middle" /></a></td>
125
125
  <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>
126
+ <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>
126
127
  </tr></table>
127
128
 
128
129
  ## Backers
@@ -14,7 +14,7 @@ class FastifyAdapter extends http_adapter_1.AbstractHttpAdapter {
14
14
  this.versionConstraint = {
15
15
  name: 'version',
16
16
  validate(value) {
17
- if (!(0, shared_utils_1.isString)(value) && !Array.isArray(value)) {
17
+ if (!shared_utils_1.isString(value) && !Array.isArray(value)) {
18
18
  throw new Error('Version constraint should be a string or an array of strings.');
19
19
  }
20
20
  },
@@ -67,7 +67,7 @@ class FastifyAdapter extends http_adapter_1.AbstractHttpAdapter {
67
67
  };
68
68
  const instance = instanceOrOptions && instanceOrOptions.server
69
69
  ? instanceOrOptions
70
- : (0, fastify_1.fastify)(Object.assign({ constraints: {
70
+ : fastify_1.fastify(Object.assign({ constraints: {
71
71
  version: this.versionConstraint,
72
72
  } }, instanceOrOptions));
73
73
  this.setInstance(instance);
@@ -188,14 +188,14 @@ class FastifyAdapter extends http_adapter_1.AbstractHttpAdapter {
188
188
  this.httpServer = this.instance.server;
189
189
  }
190
190
  useStaticAssets(options) {
191
- return this.register((0, load_package_util_1.loadPackage)('fastify-static', 'FastifyAdapter.useStaticAssets()', () => require('fastify-static')), options);
191
+ return this.register(load_package_util_1.loadPackage('fastify-static', 'FastifyAdapter.useStaticAssets()', () => require('fastify-static')), options);
192
192
  }
193
193
  setViewEngine(options) {
194
- if ((0, shared_utils_1.isString)(options)) {
194
+ if (shared_utils_1.isString(options)) {
195
195
  new common_1.Logger('FastifyAdapter').error("setViewEngine() doesn't support a string argument.");
196
196
  process.exit(1);
197
197
  }
198
- return this.register((0, load_package_util_1.loadPackage)('point-of-view', 'FastifyAdapter.setViewEngine()', () => require('point-of-view')), options);
198
+ return this.register(load_package_util_1.loadPackage('point-of-view', 'FastifyAdapter.setViewEngine()', () => require('point-of-view')), options);
199
199
  }
200
200
  setHeader(response, name, value) {
201
201
  return response.header(name, value);
@@ -252,7 +252,7 @@ class FastifyAdapter extends http_adapter_1.AbstractHttpAdapter {
252
252
  }
253
253
  injectConstraintsIfVersioned(routerMethodKey, ...args) {
254
254
  const handlerRef = args[args.length - 1];
255
- const isVersioned = !(0, shared_utils_1.isUndefined)(handlerRef.version) &&
255
+ const isVersioned = !shared_utils_1.isUndefined(handlerRef.version) &&
256
256
  handlerRef.version !== interfaces_1.VERSION_NEUTRAL;
257
257
  if (isVersioned) {
258
258
  const isPathAndRouteTuple = args.length === 2;
package/adapters/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./fastify-adapter"), exports);
4
+ tslib_1.__exportStar(require("./fastify-adapter"), exports);
package/index.js CHANGED
@@ -7,5 +7,5 @@
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  const tslib_1 = require("tslib");
10
- (0, tslib_1.__exportStar)(require("./adapters"), exports);
11
- (0, tslib_1.__exportStar)(require("./interfaces"), exports);
10
+ tslib_1.__exportStar(require("./adapters"), exports);
11
+ tslib_1.__exportStar(require("./interfaces"), exports);
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./fastify-static-options.interface"), exports);
5
- (0, tslib_1.__exportStar)(require("./point-of-view-options.interface"), exports);
4
+ tslib_1.__exportStar(require("./fastify-static-options.interface"), exports);
5
+ tslib_1.__exportStar(require("./point-of-view-options.interface"), exports);
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./nest-fastify-application.interface"), exports);
4
+ tslib_1.__exportStar(require("./nest-fastify-application.interface"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/platform-fastify",
3
- "version": "8.3.0",
3
+ "version": "8.3.1",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@platform-fastify)",
5
5
  "author": "Kamil Mysliwiec",
6
6
  "license": "MIT",