@nestjs/platform-fastify 8.4.0 → 8.4.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.
|
@@ -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 (!shared_utils_1.isString(value) && !Array.isArray(value)) {
|
|
17
|
+
if (!(0, 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
|
},
|
|
@@ -79,7 +79,7 @@ class FastifyAdapter extends http_adapter_1.AbstractHttpAdapter {
|
|
|
79
79
|
};
|
|
80
80
|
const instance = instanceOrOptions && instanceOrOptions.server
|
|
81
81
|
? instanceOrOptions
|
|
82
|
-
: fastify_1.fastify(Object.assign({ constraints: {
|
|
82
|
+
: (0, fastify_1.fastify)(Object.assign({ constraints: {
|
|
83
83
|
version: this.versionConstraint,
|
|
84
84
|
} }, instanceOrOptions));
|
|
85
85
|
this.setInstance(instance);
|
|
@@ -206,14 +206,14 @@ class FastifyAdapter extends http_adapter_1.AbstractHttpAdapter {
|
|
|
206
206
|
this.httpServer = this.instance.server;
|
|
207
207
|
}
|
|
208
208
|
useStaticAssets(options) {
|
|
209
|
-
return this.register(load_package_util_1.loadPackage('fastify-static', 'FastifyAdapter.useStaticAssets()', () => require('fastify-static')), options);
|
|
209
|
+
return this.register((0, load_package_util_1.loadPackage)('fastify-static', 'FastifyAdapter.useStaticAssets()', () => require('fastify-static')), options);
|
|
210
210
|
}
|
|
211
211
|
setViewEngine(options) {
|
|
212
|
-
if (shared_utils_1.isString(options)) {
|
|
212
|
+
if ((0, shared_utils_1.isString)(options)) {
|
|
213
213
|
new common_1.Logger('FastifyAdapter').error("setViewEngine() doesn't support a string argument.");
|
|
214
214
|
process.exit(1);
|
|
215
215
|
}
|
|
216
|
-
return this.register(load_package_util_1.loadPackage('point-of-view', 'FastifyAdapter.setViewEngine()', () => require('point-of-view')), options);
|
|
216
|
+
return this.register((0, load_package_util_1.loadPackage)('point-of-view', 'FastifyAdapter.setViewEngine()', () => require('point-of-view')), options);
|
|
217
217
|
}
|
|
218
218
|
setHeader(response, name, value) {
|
|
219
219
|
return response.header(name, value);
|
|
@@ -270,7 +270,7 @@ class FastifyAdapter extends http_adapter_1.AbstractHttpAdapter {
|
|
|
270
270
|
}
|
|
271
271
|
injectConstraintsIfVersioned(routerMethodKey, ...args) {
|
|
272
272
|
const handlerRef = args[args.length - 1];
|
|
273
|
-
const isVersioned = !shared_utils_1.isUndefined(handlerRef.version) &&
|
|
273
|
+
const isVersioned = !(0, shared_utils_1.isUndefined)(handlerRef.version) &&
|
|
274
274
|
handlerRef.version !== interfaces_1.VERSION_NEUTRAL;
|
|
275
275
|
if (isVersioned) {
|
|
276
276
|
const isPathAndRouteTuple = args.length === 2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestjs/platform-fastify",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.1",
|
|
4
4
|
"description": "Nest - modern, fast, powerful node.js web framework (@platform-fastify)",
|
|
5
5
|
"author": "Kamil Mysliwiec",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"fastify": "3.27.
|
|
20
|
+
"fastify": "3.27.4",
|
|
21
21
|
"fastify-cors": "6.0.3",
|
|
22
22
|
"fastify-formbody": "5.2.0",
|
|
23
23
|
"light-my-request": "4.8.0",
|