mirror of
https://github.com/nestjs/nest.git
synced 2026-02-24 00:02:56 +00:00
Compare commits
151 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
087e2cbfa5 | ||
|
|
eea77b720a | ||
|
|
1ade11ede4 | ||
|
|
b93812978c | ||
|
|
306adfb751 | ||
|
|
0241aa0a68 | ||
|
|
9bbe4f11a1 | ||
|
|
7ecc6c7807 | ||
|
|
5dd7abb9fc | ||
|
|
ffb36a9309 | ||
|
|
44bbff494c | ||
|
|
04d76ff4b2 | ||
|
|
ea70f0348c | ||
|
|
3f52b32a75 | ||
|
|
54434e75c5 | ||
|
|
26f1ffa265 | ||
|
|
08d29be41d | ||
|
|
5cbe2404dc | ||
|
|
c4f94df2e7 | ||
|
|
b10b60a9b3 | ||
|
|
b9007dd93f | ||
|
|
9d5bc076ff | ||
|
|
50c709c4d5 | ||
|
|
2166af0eeb | ||
|
|
c91317e91c | ||
|
|
5ec7246c18 | ||
|
|
6df9595b35 | ||
|
|
7b5e05e082 | ||
|
|
c09028c60d | ||
|
|
b013847b42 | ||
|
|
fc37771375 | ||
|
|
a749e0c53e | ||
|
|
2625b8829d | ||
|
|
6eda39b8f4 | ||
|
|
4c816a7efd | ||
|
|
9ac0cf1457 | ||
|
|
645075750e | ||
|
|
f0e7597635 | ||
|
|
77e2f395e7 | ||
|
|
7a749add7c | ||
|
|
c420898cfa | ||
|
|
0006d31ffe | ||
|
|
752033edac | ||
|
|
63d0693360 | ||
|
|
443da3993b | ||
|
|
1e3b5f5f51 | ||
|
|
74f89a737f | ||
|
|
33912c8613 | ||
|
|
f6982aa2a3 | ||
|
|
c56b1ae778 | ||
|
|
c516135c9a | ||
|
|
aa93a69158 | ||
|
|
0a3a36377b | ||
|
|
1901a623ac | ||
|
|
046ff4ccb4 | ||
|
|
a794f27dd1 | ||
|
|
1796109481 | ||
|
|
936aae57e0 | ||
|
|
e4c7628e6b | ||
|
|
3c235176ed | ||
|
|
288b01a774 | ||
|
|
0fc2270092 | ||
|
|
61ab2053de | ||
|
|
9023429dce | ||
|
|
402b916d84 | ||
|
|
cbd3971c7d | ||
|
|
1b43bac548 | ||
|
|
5f2027dc1e | ||
|
|
a93d7d5d18 | ||
|
|
c23afcd643 | ||
|
|
91d5c6ec53 | ||
|
|
646fd79d67 | ||
|
|
c120503e46 | ||
|
|
ff86d1bd22 | ||
|
|
89d8592388 | ||
|
|
e277b3bc3a | ||
|
|
535755c925 | ||
|
|
fdd3da241a | ||
|
|
c3d2add2de | ||
|
|
85b0dc8495 | ||
|
|
f21ebbc346 | ||
|
|
b39cf9f210 | ||
|
|
be50e6d834 | ||
|
|
c2fec010dc | ||
|
|
a792e88989 | ||
|
|
9cc3b149f4 | ||
|
|
6f49c76f04 | ||
|
|
0f7f413931 | ||
|
|
c5b4e78a34 | ||
|
|
75545d132e | ||
|
|
e79941fae2 | ||
|
|
50a7d35f4c | ||
|
|
b9242f7283 | ||
|
|
4307da2f92 | ||
|
|
833f0f5532 | ||
|
|
c970b50291 | ||
|
|
9f80222fdc | ||
|
|
cbf2c3cf42 | ||
|
|
6cf9db941b | ||
|
|
5a8b7bc3a0 | ||
|
|
ee01e60a95 | ||
|
|
79ea8d2a79 | ||
|
|
9b54ccb229 | ||
|
|
ebe8255379 | ||
|
|
46db75dd79 | ||
|
|
070df5a52b | ||
|
|
445b296b76 | ||
|
|
408aa39c2e | ||
|
|
3a2ee4296a | ||
|
|
42a84cda48 | ||
|
|
6e84e2f425 | ||
|
|
58ca5771a1 | ||
|
|
4da3b5812a | ||
|
|
44c8555402 | ||
|
|
7e9fcc231d | ||
|
|
0fb9778dad | ||
|
|
c1467c5c16 | ||
|
|
77d9a9b9c4 | ||
|
|
0b91ce9da8 | ||
|
|
2af96b578e | ||
|
|
7fa5082fa6 | ||
|
|
75216f4794 | ||
|
|
614ed4ff2f | ||
|
|
71cc3c0f8f | ||
|
|
92eef778e6 | ||
|
|
8c59111764 | ||
|
|
668e7bc80f | ||
|
|
a839a07713 | ||
|
|
82021d876b | ||
|
|
02baf5eac9 | ||
|
|
42683d5008 | ||
|
|
7fbe1f2c3f | ||
|
|
d355bc8464 | ||
|
|
f11455d9c9 | ||
|
|
d233c2fb35 | ||
|
|
ac2827b090 | ||
|
|
f81d65af58 | ||
|
|
285b14e127 | ||
|
|
cc85f59869 | ||
|
|
3bc77d2c50 | ||
|
|
e158fbed4b | ||
|
|
0d2870aeb6 | ||
|
|
54863260c8 | ||
|
|
80b11f1cd8 | ||
|
|
e3adee8249 | ||
|
|
be20f8f1bc | ||
|
|
39e0024a96 | ||
|
|
a3cdf2ad05 | ||
|
|
52acdc5ae3 | ||
|
|
d071c99a9c | ||
|
|
5642ca7f5f |
54
.github/workflows/codeql-analysis.yml
vendored
Normal file
54
.github/workflows/codeql-analysis.yml
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [master]
|
||||
schedule:
|
||||
- cron: '0 17 * * 4'
|
||||
|
||||
jobs:
|
||||
analyse:
|
||||
name: Analyse
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
|
||||
# If this run was triggered by a pull request event, then checkout
|
||||
# the head of the pull request instead of the merge commit.
|
||||
- run: git checkout HEAD^2
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
# Override language selection by uncommenting this and choosing your languages
|
||||
# with:
|
||||
# languages: go, javascript, csharp, python, cpp, java
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
@@ -23,7 +23,7 @@ services:
|
||||
- "9001:9001"
|
||||
restart: always
|
||||
mysql:
|
||||
image: mysql:5.7.30
|
||||
image: mysql:5.7.31
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: test
|
||||
|
||||
@@ -3,7 +3,6 @@ import {
|
||||
NestFastifyApplication,
|
||||
} from '@nestjs/platform-fastify';
|
||||
import { Test } from '@nestjs/testing';
|
||||
import { fail } from 'assert';
|
||||
import { expect } from 'chai';
|
||||
import { ApplicationModule } from '../src/app.module';
|
||||
|
||||
@@ -54,19 +53,14 @@ describe('Hello world (fastify adapter)', () => {
|
||||
method: 'GET',
|
||||
url: '/host',
|
||||
})
|
||||
.then(
|
||||
({ payload }) => {
|
||||
fail(`Unexpected success: ${payload}`);
|
||||
},
|
||||
err => {
|
||||
expect(err.getResponse()).to.be.eql({
|
||||
error: 'Internal Server Error',
|
||||
message:
|
||||
'HTTP adapter does not support filtering on host: ":tenant.example.com"',
|
||||
statusCode: 500,
|
||||
});
|
||||
},
|
||||
);
|
||||
.then(({ payload }) => {
|
||||
expect(JSON.parse(payload)).to.be.eql({
|
||||
error: 'Internal Server Error',
|
||||
message:
|
||||
'HTTP adapter does not support filtering on host: ":tenant.example.com"',
|
||||
statusCode: 500,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
"packages": [
|
||||
"packages/*"
|
||||
],
|
||||
"version": "7.3.2"
|
||||
"version": "7.4.2"
|
||||
}
|
||||
|
||||
2475
package-lock.json
generated
2475
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
60
package.json
60
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/core",
|
||||
"version": "7.0.11",
|
||||
"version": "7.4.0",
|
||||
"description": "Modern, fast, powerful node.js web framework",
|
||||
"homepage": "https://nestjs.com",
|
||||
"repository": {
|
||||
@@ -53,12 +53,12 @@
|
||||
"dependencies": {
|
||||
"@nuxtjs/opencollective": "0.2.2",
|
||||
"axios": "0.19.2",
|
||||
"class-transformer": "0.2.3",
|
||||
"class-transformer": "0.3.1",
|
||||
"class-validator": "0.12.2",
|
||||
"cli-color": "2.0.0",
|
||||
"cors": "2.8.5",
|
||||
"express": "4.17.1",
|
||||
"fast-json-stringify": "2.2.1",
|
||||
"fast-json-stringify": "2.2.3",
|
||||
"fast-safe-stringify": "2.0.7",
|
||||
"iterare": "1.2.1",
|
||||
"object-hash": "2.0.3",
|
||||
@@ -66,39 +66,38 @@
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.6.0",
|
||||
"socket.io": "2.3.0",
|
||||
"uuid": "8.2.0",
|
||||
"uuid": "8.3.0",
|
||||
"tslib": "2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@codechecks/client": "0.1.10",
|
||||
"@commitlint/cli": "9.0.1",
|
||||
"@commitlint/config-angular": "9.0.1",
|
||||
"@grpc/proto-loader": "0.5.4",
|
||||
"@nestjs/graphql": "7.5.1",
|
||||
"@commitlint/cli": "9.1.1",
|
||||
"@commitlint/config-angular": "9.1.1",
|
||||
"@grpc/proto-loader": "0.5.5",
|
||||
"@nestjs/graphql": "7.6.0",
|
||||
"@nestjs/mongoose": "7.0.2",
|
||||
"@nestjs/typeorm": "7.1.0",
|
||||
"@types/amqplib": "0.5.13",
|
||||
"@types/bytes": "3.1.0",
|
||||
"@types/cache-manager": "2.10.3",
|
||||
"@types/chai": "4.2.11",
|
||||
"@types/chai": "4.2.12",
|
||||
"@types/chai-as-promised": "7.1.3",
|
||||
"@types/cors": "2.8.6",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/fastify-cors": "2.1.0",
|
||||
"@types/gulp": "4.0.6",
|
||||
"@types/mocha": "7.0.2",
|
||||
"@types/mongoose": "5.7.30",
|
||||
"@types/mocha": "8.0.0",
|
||||
"@types/mongoose": "5.7.34",
|
||||
"@types/node": "10.17.3",
|
||||
"@types/redis": "2.8.24",
|
||||
"@types/redis": "2.8.25",
|
||||
"@types/reflect-metadata": "0.0.5",
|
||||
"@types/sinon": "9.0.4",
|
||||
"@types/socket.io": "2.1.8",
|
||||
"@types/socket.io": "2.1.10",
|
||||
"@types/ws": "7.2.6",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"amqp-connection-manager": "3.2.0",
|
||||
"amqplib": "0.5.6",
|
||||
"apollo-server-express": "2.15.1",
|
||||
"amqplib": "0.6.0",
|
||||
"apollo-server-express": "2.16.1",
|
||||
"artillery": "1.6.1",
|
||||
"awesome-typescript-loader": "5.2.1",
|
||||
"body-parser": "1.19.0",
|
||||
@@ -114,17 +113,17 @@
|
||||
"coveralls": "3.1.0",
|
||||
"delete-empty": "3.0.0",
|
||||
"engine.io-client": "3.4.3",
|
||||
"eslint": "7.4.0",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"fancy-log": "1.3.3",
|
||||
"fastify": "2.15.1",
|
||||
"fastify-cors": "3.0.3",
|
||||
"fastify-formbody": "3.2.0",
|
||||
"fastify-multipart": "1.0.6",
|
||||
"fastify-static": "2.7.0",
|
||||
"fastify": "3.1.1",
|
||||
"fastify-cors": "4.1.0",
|
||||
"fastify-formbody": "4.0.3",
|
||||
"fastify-multipart": "2.0.3",
|
||||
"fastify-static": "3.2.0",
|
||||
"graphql": "15.3.0",
|
||||
"graphql-tools": "6.0.12",
|
||||
"graphql-tools": "6.0.15",
|
||||
"grpc": "1.24.3",
|
||||
"gulp": "4.0.2",
|
||||
"gulp-clang-format": "1.0.27",
|
||||
@@ -137,29 +136,32 @@
|
||||
"json-loader": "0.5.7",
|
||||
"kafkajs": "1.12.0",
|
||||
"lerna": "2.11.0",
|
||||
"light-my-request": "4.0.1",
|
||||
"lint-staged": "10.2.11",
|
||||
"markdown-table": "2.0.0",
|
||||
"merge-graphql-schemas": "1.7.8",
|
||||
"middie": "5.1.0",
|
||||
"mocha": "8.0.1",
|
||||
"mongoose": "5.9.22",
|
||||
"mongoose": "5.9.26",
|
||||
"mqtt": "4.1.0",
|
||||
"multer": "1.4.2",
|
||||
"mysql": "2.18.1",
|
||||
"nats": "1.4.9",
|
||||
"nodemon": "2.0.4",
|
||||
"nyc": "15.1.0",
|
||||
"point-of-view": "4.2.0",
|
||||
"prettier": "2.0.5",
|
||||
"redis": "3.0.2",
|
||||
"rxjs-compat": "6.6.0",
|
||||
"sinon": "9.0.2",
|
||||
"sinon-chai": "3.5.0",
|
||||
"socket.io-client": "2.3.0",
|
||||
"subscriptions-transport-ws": "0.9.16",
|
||||
"subscriptions-transport-ws": "0.9.17",
|
||||
"supertest": "4.0.2",
|
||||
"ts-morph": "7.1.2",
|
||||
"ts-morph": "7.1.3",
|
||||
"ts-node": "8.10.2",
|
||||
"typeorm": "0.2.25",
|
||||
"typescript": "3.9.6",
|
||||
"typescript": "3.9.7",
|
||||
"wrk": "1.2.0",
|
||||
"ws": "7.3.1"
|
||||
},
|
||||
|
||||
@@ -86,7 +86,11 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
|
||||
<a href="https://www.codeguesser.co.uk" target="_blank"><img src="https://nestjs.com/img/codeguesser-logo.svg" width="120" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://tekhattan.com" target="_blank"><img src="https://nestjs.com/img/tekhattan-logo.png" width="110" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://f-a.nz/" target="_blank"><img src="https://nestjs.com/img/franz.svg" width="80" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://sparkfabrik.com/" target="_blank"><img src="https://nestjs.com/img/sparkfabrik-logo.png" width="120" valign="middle" /></a></td><td align="center" valign="middle"><a href="https://www.thebigphonestore.co.uk/" target="_blank"><img src="https://nestjs.com/img/the-big-phone-store-logo.png" width="65" valign="middle" /></a></td></tr></table>
|
||||
<a href="https://sparkfabrik.com/" target="_blank"><img src="https://nestjs.com/img/sparkfabrik-logo.png" width="120" valign="middle" /></a></td><td align="center" valign="middle"><a href="https://www.thebigphonestore.co.uk/" target="_blank"><img src="https://nestjs.com/img/the-big-phone-store-logo.png" width="65" valign="middle" /></a></td>
|
||||
<td align="center" valign="middle">
|
||||
<a href="https://genuinebee.com/" target="_blank"><img src="https://nestjs.com/img/genuinebee.svg" width="97" valign="middle" /></a> </td></tr>
|
||||
<tr><td align="center" valign="middle"><a href="https://sanyodigital.com/" target="_blank"><img src="https://nestjs.com/img/sanyo-digital.png" width="130" valign="middle" /></a></td>
|
||||
</tr></table>
|
||||
|
||||
## Backers
|
||||
|
||||
|
||||
@@ -18,3 +18,4 @@ export * from './bad-gateway.exception';
|
||||
export * from './service-unavailable.exception';
|
||||
export * from './gateway-timeout.exception';
|
||||
export * from './im-a-teapot.exception';
|
||||
export * from './precondition-failed.exception';
|
||||
|
||||
49
packages/common/exceptions/precondition-failed.exception.ts
Normal file
49
packages/common/exceptions/precondition-failed.exception.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import { HttpStatus } from '../enums/http-status.enum';
|
||||
import { HttpException } from './http.exception';
|
||||
|
||||
/**
|
||||
* Defines an HTTP exception for *Precondition Failed* type errors.
|
||||
*
|
||||
* @see [Base Exceptions](https://docs.nestjs.com/exception-filters#base-exceptions)
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export class PreconditionFailedException extends HttpException {
|
||||
/**
|
||||
* Instantiate a `PreconditionFailedException` Exception.
|
||||
*
|
||||
* @example
|
||||
* `throw new PreconditionFailedException()`
|
||||
*
|
||||
* @usageNotes
|
||||
* The HTTP response status code will be 412.
|
||||
* - The `objectOrError` argument defines the JSON response body or the message string.
|
||||
* - The `description` argument contains a short description of the HTTP error.
|
||||
*
|
||||
* By default, the JSON response body contains two properties:
|
||||
* - `statusCode`: this will be the value 412.
|
||||
* - `message`: the string `'Precondition Failed'` by default; override this by supplying
|
||||
* a string in the `objectOrError` parameter.
|
||||
*
|
||||
* If the parameter `objectOrError` is a string, the response body will contain an
|
||||
* additional property, `error`, with a short description of the HTTP error. To override the
|
||||
* entire JSON response body, pass an object instead. Nest will serialize the object
|
||||
* and return it as the JSON response body.
|
||||
*
|
||||
* @param objectOrError string or object describing the error condition.
|
||||
* @param description a short description of the HTTP error.
|
||||
*/
|
||||
constructor(
|
||||
objectOrError?: string | object | any,
|
||||
description = 'Precondition Failed',
|
||||
) {
|
||||
super(
|
||||
HttpException.createBody(
|
||||
objectOrError,
|
||||
description,
|
||||
HttpStatus.PRECONDITION_FAILED,
|
||||
),
|
||||
HttpStatus.PRECONDITION_FAILED,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -54,7 +54,9 @@ export interface HttpServer<TRequest = any, TResponse = any> {
|
||||
setViewEngine?(engineOrOptions: any): this;
|
||||
createMiddlewareFactory(
|
||||
method: RequestMethod,
|
||||
): (path: string, callback: Function) => any;
|
||||
):
|
||||
| ((path: string, callback: Function) => any)
|
||||
| Promise<(path: string, callback: Function) => any>;
|
||||
getRequestHostname?(request: TRequest): string;
|
||||
getRequestMethod?(request: TRequest): string;
|
||||
getRequestUrl?(request: TResponse): string;
|
||||
@@ -65,4 +67,5 @@ export interface HttpServer<TRequest = any, TResponse = any> {
|
||||
initHttpServer(options: NestApplicationOptions): void;
|
||||
close(): any;
|
||||
getType(): string;
|
||||
init?(): Promise<void>;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/common",
|
||||
"version": "7.3.2",
|
||||
"version": "7.4.2",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@common)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"homepage": "https://nestjs.com",
|
||||
@@ -21,7 +21,7 @@
|
||||
"cli-color": "2.0.0",
|
||||
"iterare": "1.2.1",
|
||||
"tslib": "2.0.0",
|
||||
"uuid": "8.2.0"
|
||||
"uuid": "8.3.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"reflect-metadata": "^0.1.12",
|
||||
|
||||
@@ -6,6 +6,7 @@ import { ArgumentMetadata, ValidationError } from '../index';
|
||||
import { ClassTransformOptions } from '../interfaces/external/class-transform-options.interface';
|
||||
import { ValidatorOptions } from '../interfaces/external/validator-options.interface';
|
||||
import { PipeTransform } from '../interfaces/features/pipe-transform.interface';
|
||||
import { Type } from '../interfaces/type.interface';
|
||||
import {
|
||||
ErrorHttpStatusCode,
|
||||
HttpErrorByCode,
|
||||
@@ -20,6 +21,7 @@ export interface ValidationPipeOptions extends ValidatorOptions {
|
||||
errorHttpStatusCode?: ErrorHttpStatusCode;
|
||||
exceptionFactory?: (errors: ValidationError[]) => any;
|
||||
validateCustomDecorators?: boolean;
|
||||
expectedType?: Type<any>;
|
||||
}
|
||||
|
||||
let classValidator: any = {};
|
||||
@@ -32,6 +34,7 @@ export class ValidationPipe implements PipeTransform<any> {
|
||||
protected validatorOptions: ValidatorOptions;
|
||||
protected transformOptions: ClassTransformOptions;
|
||||
protected errorHttpStatusCode: ErrorHttpStatusCode;
|
||||
protected expectedType: Type<any>;
|
||||
protected exceptionFactory: (errors: ValidationError[]) => any;
|
||||
protected validateCustomDecorators: boolean;
|
||||
|
||||
@@ -41,6 +44,7 @@ export class ValidationPipe implements PipeTransform<any> {
|
||||
transform,
|
||||
disableErrorMessages,
|
||||
errorHttpStatusCode,
|
||||
expectedType,
|
||||
transformOptions,
|
||||
validateCustomDecorators,
|
||||
...validatorOptions
|
||||
@@ -52,6 +56,7 @@ export class ValidationPipe implements PipeTransform<any> {
|
||||
this.isDetailedOutputDisabled = disableErrorMessages;
|
||||
this.validateCustomDecorators = validateCustomDecorators || false;
|
||||
this.errorHttpStatusCode = errorHttpStatusCode || HttpStatus.BAD_REQUEST;
|
||||
this.expectedType = expectedType;
|
||||
this.exceptionFactory =
|
||||
options.exceptionFactory || this.createExceptionFactory();
|
||||
|
||||
@@ -64,7 +69,7 @@ export class ValidationPipe implements PipeTransform<any> {
|
||||
}
|
||||
|
||||
public async transform(value: any, metadata: ArgumentMetadata) {
|
||||
const { metatype } = metadata;
|
||||
const metatype = this.expectedType || metadata.metatype;
|
||||
if (!metatype || !this.toValidate(metadata)) {
|
||||
return this.isTransformEnabled
|
||||
? this.transformPrimitive(value, metadata)
|
||||
|
||||
@@ -396,4 +396,31 @@ describe('ValidationPipe', () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('option: "expectedType"', () => {
|
||||
class TestModel2 {
|
||||
@IsString()
|
||||
public prop1: string;
|
||||
|
||||
@IsBoolean()
|
||||
public prop2: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
public optionalProp: string;
|
||||
}
|
||||
|
||||
it('should validate against the expected type if presented', async () => {
|
||||
const m: ArgumentMetadata = {
|
||||
type: 'body',
|
||||
metatype: TestModel2,
|
||||
data: '',
|
||||
};
|
||||
|
||||
target = new ValidationPipe({ expectedType: TestModel });
|
||||
const testObj = { prop1: 'value1', prop2: 'value2' };
|
||||
|
||||
expect(await target.transform(testObj, m)).to.equal(testObj);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -13,6 +13,7 @@ import {
|
||||
NotFoundException,
|
||||
NotImplementedException,
|
||||
PayloadTooLargeException,
|
||||
PreconditionFailedException,
|
||||
RequestTimeoutException,
|
||||
ServiceUnavailableException,
|
||||
UnauthorizedException,
|
||||
@@ -35,6 +36,7 @@ export type ErrorHttpStatusCode =
|
||||
| HttpStatus.NOT_FOUND
|
||||
| HttpStatus.NOT_IMPLEMENTED
|
||||
| HttpStatus.PAYLOAD_TOO_LARGE
|
||||
| HttpStatus.PRECONDITION_FAILED
|
||||
| HttpStatus.REQUEST_TIMEOUT
|
||||
| HttpStatus.SERVICE_UNAVAILABLE
|
||||
| HttpStatus.UNAUTHORIZED
|
||||
@@ -55,6 +57,7 @@ export const HttpErrorByCode: Record<ErrorHttpStatusCode, Type<unknown>> = {
|
||||
[HttpStatus.NOT_FOUND]: NotFoundException,
|
||||
[HttpStatus.NOT_IMPLEMENTED]: NotImplementedException,
|
||||
[HttpStatus.PAYLOAD_TOO_LARGE]: PayloadTooLargeException,
|
||||
[HttpStatus.PRECONDITION_FAILED]: PreconditionFailedException,
|
||||
[HttpStatus.REQUEST_TIMEOUT]: RequestTimeoutException,
|
||||
[HttpStatus.SERVICE_UNAVAILABLE]: ServiceUnavailableException,
|
||||
[HttpStatus.UNAUTHORIZED]: UnauthorizedException,
|
||||
|
||||
@@ -86,7 +86,11 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
|
||||
<a href="https://www.codeguesser.co.uk" target="_blank"><img src="https://nestjs.com/img/codeguesser-logo.svg" width="120" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://tekhattan.com" target="_blank"><img src="https://nestjs.com/img/tekhattan-logo.png" width="110" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://f-a.nz/" target="_blank"><img src="https://nestjs.com/img/franz.svg" width="80" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://sparkfabrik.com/" target="_blank"><img src="https://nestjs.com/img/sparkfabrik-logo.png" width="120" valign="middle" /></a></td><td align="center" valign="middle"><a href="https://www.thebigphonestore.co.uk/" target="_blank"><img src="https://nestjs.com/img/the-big-phone-store-logo.png" width="65" valign="middle" /></a></td></tr></table>
|
||||
<a href="https://sparkfabrik.com/" target="_blank"><img src="https://nestjs.com/img/sparkfabrik-logo.png" width="120" valign="middle" /></a></td><td align="center" valign="middle"><a href="https://www.thebigphonestore.co.uk/" target="_blank"><img src="https://nestjs.com/img/the-big-phone-store-logo.png" width="65" valign="middle" /></a></td>
|
||||
<td align="center" valign="middle">
|
||||
<a href="https://genuinebee.com/" target="_blank"><img src="https://nestjs.com/img/genuinebee.svg" width="97" valign="middle" /></a> </td></tr>
|
||||
<tr><td align="center" valign="middle"><a href="https://sanyodigital.com/" target="_blank"><img src="https://nestjs.com/img/sanyo-digital.png" width="130" valign="middle" /></a></td>
|
||||
</tr></table>
|
||||
|
||||
## Backers
|
||||
|
||||
|
||||
@@ -15,6 +15,9 @@ export abstract class AbstractHttpAdapter<
|
||||
|
||||
constructor(protected readonly instance: any) {}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
public async init() {}
|
||||
|
||||
public use(...args: any[]) {
|
||||
return this.instance.use(...args);
|
||||
}
|
||||
@@ -97,6 +100,8 @@ export abstract class AbstractHttpAdapter<
|
||||
abstract enableCors(options: CorsOptions, prefix?: string);
|
||||
abstract createMiddlewareFactory(
|
||||
requestMethod: RequestMethod,
|
||||
): (path: string, callback: Function) => any;
|
||||
):
|
||||
| ((path: string, callback: Function) => any)
|
||||
| Promise<(path: string, callback: Function) => any>;
|
||||
abstract getType(): string;
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ export class NestContainer {
|
||||
}
|
||||
|
||||
public bindGlobalModuleToModule(target: Module, globalModule: Module) {
|
||||
if (target === globalModule) {
|
||||
if (target === globalModule || target === this.internalCoreModule) {
|
||||
return;
|
||||
}
|
||||
target.addRelatedModule(globalModule);
|
||||
@@ -205,7 +205,7 @@ export class NestContainer {
|
||||
public getDynamicMetadataByToken(
|
||||
token: string,
|
||||
metadataKey: keyof DynamicModule,
|
||||
): any[] {
|
||||
) {
|
||||
const metadata = this.dynamicModulesMetadata.get(token);
|
||||
if (metadata && metadata[metadataKey]) {
|
||||
return metadata[metadataKey] as any[];
|
||||
|
||||
@@ -196,7 +196,7 @@ export class MiddlewareModule {
|
||||
if (isUndefined(instance.use)) {
|
||||
throw new InvalidMiddlewareException(metatype.name);
|
||||
}
|
||||
const router = applicationRef.createMiddlewareFactory(method);
|
||||
const router = await applicationRef.createMiddlewareFactory(method);
|
||||
const isStatic = wrapper.isDependencyTreeStatic();
|
||||
if (isStatic) {
|
||||
const proxy = await this.createProxy(instance);
|
||||
|
||||
@@ -138,6 +138,7 @@ export class NestApplication extends NestApplicationContext
|
||||
|
||||
public async init(): Promise<this> {
|
||||
this.applyOptions();
|
||||
await this.httpAdapter?.init();
|
||||
|
||||
const useBodyParser =
|
||||
this.appOptions && this.appOptions.bodyParser !== false;
|
||||
|
||||
@@ -147,12 +147,15 @@ export class NestFactoryStatic {
|
||||
httpServer: HttpServer = null,
|
||||
) {
|
||||
const instanceLoader = new InstanceLoader(container);
|
||||
const metadataScanner = new MetadataScanner();
|
||||
const dependenciesScanner = new DependenciesScanner(
|
||||
container,
|
||||
new MetadataScanner(),
|
||||
metadataScanner,
|
||||
config,
|
||||
);
|
||||
container.setHttpAdapter(httpServer);
|
||||
|
||||
await httpServer?.init();
|
||||
try {
|
||||
this.logger.log(MESSAGES.APPLICATION_START);
|
||||
await ExceptionsZone.asyncRun(async () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/core",
|
||||
"version": "7.3.2",
|
||||
"version": "7.4.2",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@core)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -33,10 +33,10 @@
|
||||
"object-hash": "2.0.3",
|
||||
"path-to-regexp": "3.2.0",
|
||||
"tslib": "2.0.0",
|
||||
"uuid": "8.2.0"
|
||||
"uuid": "8.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/common": "7.3.2"
|
||||
"@nestjs/common": "7.4.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^7.0.0",
|
||||
|
||||
@@ -28,7 +28,7 @@ export class RouteParamsFactory implements IRouteParamsFactory {
|
||||
case RouteParamtypes.QUERY:
|
||||
return data ? req.query[data] : req.query;
|
||||
case RouteParamtypes.HEADERS:
|
||||
return data ? req.headers[data] : req.headers;
|
||||
return data ? req.headers[data.toLowerCase()] : req.headers;
|
||||
case RouteParamtypes.SESSION:
|
||||
return req.session;
|
||||
case RouteParamtypes.FILE:
|
||||
|
||||
@@ -86,7 +86,11 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
|
||||
<a href="https://www.codeguesser.co.uk" target="_blank"><img src="https://nestjs.com/img/codeguesser-logo.svg" width="120" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://tekhattan.com" target="_blank"><img src="https://nestjs.com/img/tekhattan-logo.png" width="110" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://f-a.nz/" target="_blank"><img src="https://nestjs.com/img/franz.svg" width="80" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://sparkfabrik.com/" target="_blank"><img src="https://nestjs.com/img/sparkfabrik-logo.png" width="120" valign="middle" /></a></td><td align="center" valign="middle"><a href="https://www.thebigphonestore.co.uk/" target="_blank"><img src="https://nestjs.com/img/the-big-phone-store-logo.png" width="65" valign="middle" /></a></td></tr></table>
|
||||
<a href="https://sparkfabrik.com/" target="_blank"><img src="https://nestjs.com/img/sparkfabrik-logo.png" width="120" valign="middle" /></a></td><td align="center" valign="middle"><a href="https://www.thebigphonestore.co.uk/" target="_blank"><img src="https://nestjs.com/img/the-big-phone-store-logo.png" width="65" valign="middle" /></a></td>
|
||||
<td align="center" valign="middle">
|
||||
<a href="https://genuinebee.com/" target="_blank"><img src="https://nestjs.com/img/genuinebee.svg" width="97" valign="middle" /></a> </td></tr>
|
||||
<tr><td align="center" valign="middle"><a href="https://sanyodigital.com/" target="_blank"><img src="https://nestjs.com/img/sanyo-digital.png" width="130" valign="middle" /></a></td>
|
||||
</tr></table>
|
||||
|
||||
## Backers
|
||||
|
||||
|
||||
@@ -43,13 +43,13 @@ export class ClientKafka extends ClientProxy {
|
||||
protected client: Kafka = null;
|
||||
protected consumer: Consumer = null;
|
||||
protected producer: Producer = null;
|
||||
protected readonly logger = new Logger(ClientKafka.name);
|
||||
protected readonly responsePatterns: string[] = [];
|
||||
protected logger = new Logger(ClientKafka.name);
|
||||
protected responsePatterns: string[] = [];
|
||||
protected consumerAssignments: { [key: string]: number[] } = {};
|
||||
|
||||
private readonly brokers: string[];
|
||||
private readonly clientId: string;
|
||||
private readonly groupId: string;
|
||||
protected brokers: string[];
|
||||
protected clientId: string;
|
||||
protected groupId: string;
|
||||
|
||||
constructor(protected readonly options: KafkaOptions['options']) {
|
||||
super();
|
||||
|
||||
@@ -2,7 +2,7 @@ import { ClientOptions } from '../../interfaces';
|
||||
import { Type, Provider, ModuleMetadata } from '@nestjs/common/interfaces';
|
||||
|
||||
export type ClientProviderOptions = ClientOptions & {
|
||||
name: string;
|
||||
name: string | symbol;
|
||||
};
|
||||
|
||||
export type ClientsModuleOptions = Array<ClientProviderOptions>;
|
||||
@@ -18,7 +18,7 @@ export interface ClientsProviderAsyncOptions
|
||||
useFactory?: (...args: any[]) => Promise<ClientOptions> | ClientOptions;
|
||||
inject?: any[];
|
||||
extraProviders?: Provider[];
|
||||
name: string;
|
||||
name: string | symbol;
|
||||
}
|
||||
|
||||
export type ClientsModuleAsyncOptions = Array<ClientsProviderAsyncOptions>;
|
||||
|
||||
@@ -115,14 +115,14 @@ export class NestMicroservice extends NestApplicationContext
|
||||
}
|
||||
|
||||
public listen(callback: () => void) {
|
||||
!this.isInitialized && this.registerModules();
|
||||
|
||||
this.logger.log(MESSAGES.MICROSERVICE_READY);
|
||||
this.server.listen(callback);
|
||||
this.listenAsync().then(callback);
|
||||
}
|
||||
|
||||
public async listenAsync(): Promise<any> {
|
||||
return new Promise(resolve => this.listen(resolve));
|
||||
!this.isInitialized && (await this.registerModules());
|
||||
|
||||
this.logger.log(MESSAGES.MICROSERVICE_READY);
|
||||
return new Promise(resolve => this.server.listen(resolve));
|
||||
}
|
||||
|
||||
public async close(): Promise<any> {
|
||||
@@ -151,4 +151,12 @@ export class NestMicroservice extends NestApplicationContext
|
||||
await super.close();
|
||||
this.setIsTerminated(true);
|
||||
}
|
||||
|
||||
protected async dispose(): Promise<void> {
|
||||
await this.server.close();
|
||||
if (this.isTerminated) {
|
||||
return;
|
||||
}
|
||||
this.socketModule && (await this.socketModule.close());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/microservices",
|
||||
"version": "7.3.2",
|
||||
"version": "7.4.2",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@microservices)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -22,8 +22,8 @@
|
||||
"tslib": "2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/common": "7.3.2",
|
||||
"@nestjs/core": "7.3.2"
|
||||
"@nestjs/common": "7.4.2",
|
||||
"@nestjs/core": "7.4.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^7.0.0",
|
||||
|
||||
@@ -33,13 +33,14 @@ let kafkaPackage: any = {};
|
||||
export class ServerKafka extends Server implements CustomTransportStrategy {
|
||||
public readonly transportId = Transport.KAFKA;
|
||||
|
||||
protected readonly logger = new Logger(ServerKafka.name);
|
||||
protected logger = new Logger(ServerKafka.name);
|
||||
protected client: Kafka = null;
|
||||
protected consumer: Consumer = null;
|
||||
protected producer: Producer = null;
|
||||
private readonly brokers: string[];
|
||||
private readonly clientId: string;
|
||||
private readonly groupId: string;
|
||||
|
||||
protected brokers: string[];
|
||||
protected clientId: string;
|
||||
protected groupId: string;
|
||||
|
||||
constructor(private readonly options: KafkaOptions['options']) {
|
||||
super();
|
||||
|
||||
@@ -86,7 +86,11 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
|
||||
<a href="https://www.codeguesser.co.uk" target="_blank"><img src="https://nestjs.com/img/codeguesser-logo.svg" width="120" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://tekhattan.com" target="_blank"><img src="https://nestjs.com/img/tekhattan-logo.png" width="110" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://f-a.nz/" target="_blank"><img src="https://nestjs.com/img/franz.svg" width="80" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://sparkfabrik.com/" target="_blank"><img src="https://nestjs.com/img/sparkfabrik-logo.png" width="120" valign="middle" /></a></td><td align="center" valign="middle"><a href="https://www.thebigphonestore.co.uk/" target="_blank"><img src="https://nestjs.com/img/the-big-phone-store-logo.png" width="65" valign="middle" /></a></td></tr></table>
|
||||
<a href="https://sparkfabrik.com/" target="_blank"><img src="https://nestjs.com/img/sparkfabrik-logo.png" width="120" valign="middle" /></a></td><td align="center" valign="middle"><a href="https://www.thebigphonestore.co.uk/" target="_blank"><img src="https://nestjs.com/img/the-big-phone-store-logo.png" width="65" valign="middle" /></a></td>
|
||||
<td align="center" valign="middle">
|
||||
<a href="https://genuinebee.com/" target="_blank"><img src="https://nestjs.com/img/genuinebee.svg" width="97" valign="middle" /></a> </td></tr>
|
||||
<tr><td align="center" valign="middle"><a href="https://sanyodigital.com/" target="_blank"><img src="https://nestjs.com/img/sanyo-digital.png" width="130" valign="middle" /></a></td>
|
||||
</tr></table>
|
||||
|
||||
## Backers
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/platform-express",
|
||||
"version": "7.3.2",
|
||||
"version": "7.4.2",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@platform-express)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -24,8 +24,8 @@
|
||||
"tslib": "2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/common": "7.3.2",
|
||||
"@nestjs/core": "7.3.2"
|
||||
"@nestjs/common": "7.4.2",
|
||||
"@nestjs/core": "7.4.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^7.0.0",
|
||||
|
||||
@@ -86,7 +86,11 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
|
||||
<a href="https://www.codeguesser.co.uk" target="_blank"><img src="https://nestjs.com/img/codeguesser-logo.svg" width="120" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://tekhattan.com" target="_blank"><img src="https://nestjs.com/img/tekhattan-logo.png" width="110" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://f-a.nz/" target="_blank"><img src="https://nestjs.com/img/franz.svg" width="80" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://sparkfabrik.com/" target="_blank"><img src="https://nestjs.com/img/sparkfabrik-logo.png" width="120" valign="middle" /></a></td><td align="center" valign="middle"><a href="https://www.thebigphonestore.co.uk/" target="_blank"><img src="https://nestjs.com/img/the-big-phone-store-logo.png" width="65" valign="middle" /></a></td></tr></table>
|
||||
<a href="https://sparkfabrik.com/" target="_blank"><img src="https://nestjs.com/img/sparkfabrik-logo.png" width="120" valign="middle" /></a></td><td align="center" valign="middle"><a href="https://www.thebigphonestore.co.uk/" target="_blank"><img src="https://nestjs.com/img/the-big-phone-store-logo.png" width="65" valign="middle" /></a></td>
|
||||
<td align="center" valign="middle">
|
||||
<a href="https://genuinebee.com/" target="_blank"><img src="https://nestjs.com/img/genuinebee.svg" width="97" valign="middle" /></a> </td></tr>
|
||||
<tr><td align="center" valign="middle"><a href="https://sanyodigital.com/" target="_blank"><img src="https://nestjs.com/img/sanyo-digital.png" width="130" valign="middle" /></a></td>
|
||||
</tr></table>
|
||||
|
||||
## Backers
|
||||
|
||||
|
||||
@@ -1,104 +1,194 @@
|
||||
import { HttpStatus, RequestMethod } from '@nestjs/common';
|
||||
import { HttpStatus, Logger, RequestMethod } from '@nestjs/common';
|
||||
import { CorsOptions } from '@nestjs/common/interfaces/external/cors-options.interface';
|
||||
import { NestApplicationOptions } from '@nestjs/common/interfaces/nest-application-options.interface';
|
||||
import { loadPackage } from '@nestjs/common/utils/load-package.util';
|
||||
import { AbstractHttpAdapter } from '@nestjs/core/adapters/http-adapter';
|
||||
import * as fastify from 'fastify';
|
||||
import * as cors from 'fastify-cors';
|
||||
import * as formBody from 'fastify-formbody';
|
||||
import * as Reply from 'fastify/lib/reply';
|
||||
import {
|
||||
fastify,
|
||||
FastifyInstance,
|
||||
FastifyLoggerInstance,
|
||||
FastifyPlugin,
|
||||
FastifyPluginOptions,
|
||||
FastifyRegisterOptions,
|
||||
FastifyReply,
|
||||
FastifyRequest,
|
||||
FastifyServerOptions,
|
||||
RawReplyDefaultExpression,
|
||||
RawRequestDefaultExpression,
|
||||
RawServerBase,
|
||||
RawServerDefault,
|
||||
RequestGenericInterface,
|
||||
} from 'fastify';
|
||||
import { Reply } from 'fastify/lib/reply';
|
||||
import * as http2 from 'http2';
|
||||
import * as https from 'https';
|
||||
import { InjectOptions } from 'light-my-request';
|
||||
import * as pathToRegexp from 'path-to-regexp';
|
||||
import {
|
||||
FastifyStaticOptions,
|
||||
PointOfViewOptions,
|
||||
} from '../interfaces/external';
|
||||
|
||||
type FastifyHttp2SecureOptions<
|
||||
Server extends http2.Http2SecureServer,
|
||||
Logger extends FastifyLoggerInstance = FastifyLoggerInstance
|
||||
> = FastifyServerOptions<Server, Logger> & {
|
||||
http2: true;
|
||||
https: http2.SecureServerOptions;
|
||||
};
|
||||
|
||||
type FastifyHttp2Options<
|
||||
Server extends http2.Http2Server,
|
||||
Logger extends FastifyLoggerInstance = FastifyLoggerInstance
|
||||
> = FastifyServerOptions<Server, Logger> & {
|
||||
http2: true;
|
||||
http2SessionTimeout?: number;
|
||||
};
|
||||
|
||||
type FastifyHttpsOptions<
|
||||
Server extends https.Server,
|
||||
Logger extends FastifyLoggerInstance = FastifyLoggerInstance
|
||||
> = FastifyServerOptions<Server, Logger> & {
|
||||
https: https.ServerOptions;
|
||||
};
|
||||
|
||||
export class FastifyAdapter<
|
||||
TServer extends RawServerBase = RawServerDefault,
|
||||
TRawRequest extends RawRequestDefaultExpression<
|
||||
TServer
|
||||
> = RawRequestDefaultExpression<TServer>,
|
||||
TRawResponse extends RawReplyDefaultExpression<
|
||||
TServer
|
||||
> = RawReplyDefaultExpression<TServer>
|
||||
> extends AbstractHttpAdapter<
|
||||
TServer,
|
||||
FastifyRequest<RequestGenericInterface, TServer, TRawRequest>,
|
||||
FastifyReply<TServer, TRawRequest, TRawResponse>
|
||||
> {
|
||||
protected readonly instance: FastifyInstance<
|
||||
TServer,
|
||||
TRawRequest,
|
||||
TRawResponse
|
||||
>;
|
||||
private isMiddieRegistered: boolean;
|
||||
|
||||
export class FastifyAdapter<TInstance = any> extends AbstractHttpAdapter {
|
||||
constructor(
|
||||
instanceOrOptions:
|
||||
| TInstance
|
||||
| fastify.ServerOptions
|
||||
| fastify.ServerOptionsAsHttp
|
||||
| fastify.ServerOptionsAsHttp2
|
||||
| fastify.ServerOptionsAsSecure
|
||||
| fastify.ServerOptionsAsSecureHttp
|
||||
| fastify.ServerOptionsAsSecureHttp2 = fastify() as any,
|
||||
| FastifyInstance<TServer>
|
||||
| FastifyHttp2Options<TServer>
|
||||
| FastifyHttp2SecureOptions<any>
|
||||
| FastifyHttpsOptions<any>
|
||||
| FastifyServerOptions<TServer> = fastify() as any,
|
||||
) {
|
||||
const instance =
|
||||
instanceOrOptions &&
|
||||
(instanceOrOptions as fastify.FastifyInstance<any, any, any>).server
|
||||
(instanceOrOptions as FastifyInstance<TServer>).server
|
||||
? instanceOrOptions
|
||||
: fastify((instanceOrOptions as any) as fastify.ServerOptions);
|
||||
: fastify(instanceOrOptions as FastifyServerOptions);
|
||||
|
||||
super(instance);
|
||||
}
|
||||
|
||||
public listen(port: string | number, callback?: () => void);
|
||||
public listen(port: string | number, hostname: string, callback?: () => void);
|
||||
public listen(port: any, ...args: any[]) {
|
||||
public async init() {
|
||||
if (this.isMiddieRegistered) {
|
||||
return;
|
||||
}
|
||||
await this.registerMiddie();
|
||||
}
|
||||
|
||||
public listen(port: string | number, callback?: () => void): void;
|
||||
public listen(
|
||||
port: string | number,
|
||||
hostname: string,
|
||||
callback?: () => void,
|
||||
): void;
|
||||
public listen(port: string | number, ...args: any[]): Promise<string> {
|
||||
if (typeof port === 'string') {
|
||||
port = parseInt(port);
|
||||
}
|
||||
return this.instance.listen(port, ...args);
|
||||
}
|
||||
|
||||
public reply(response: any, body: any, statusCode?: number) {
|
||||
const isNativeResponse = typeof response.status !== 'function';
|
||||
if (isNativeResponse) {
|
||||
const fastifyContext = {
|
||||
preSerialization: null,
|
||||
preValidation: [],
|
||||
preHandler: [],
|
||||
onSend: [],
|
||||
onError: [],
|
||||
};
|
||||
response = new Reply(response, fastifyContext, {});
|
||||
}
|
||||
public reply(
|
||||
response: TRawResponse | FastifyReply,
|
||||
body: any,
|
||||
statusCode?: number,
|
||||
) {
|
||||
const fastifyReply: FastifyReply = this.isNativeResponse(response)
|
||||
? new Reply(
|
||||
response,
|
||||
{
|
||||
preSerialization: null,
|
||||
preValidation: [],
|
||||
preHandler: [],
|
||||
onSend: [],
|
||||
onError: [],
|
||||
},
|
||||
{},
|
||||
)
|
||||
: response;
|
||||
|
||||
if (statusCode) {
|
||||
response.status(statusCode);
|
||||
fastifyReply.status(statusCode);
|
||||
}
|
||||
return response.send(body);
|
||||
return fastifyReply.send(body);
|
||||
}
|
||||
|
||||
public status(response: any, statusCode: number) {
|
||||
const isNativeResponse = typeof response.code !== 'function';
|
||||
if (isNativeResponse) {
|
||||
public status(response: TRawResponse | FastifyReply, statusCode: number) {
|
||||
if (this.isNativeResponse(response)) {
|
||||
response.statusCode = statusCode;
|
||||
return response;
|
||||
}
|
||||
return response.code(statusCode);
|
||||
}
|
||||
|
||||
public render(response: any, view: string, options: any) {
|
||||
return response.view(view, options);
|
||||
public render(
|
||||
response: FastifyReply & { view: Function },
|
||||
view: string,
|
||||
options: any,
|
||||
) {
|
||||
return response && response.view(view, options);
|
||||
}
|
||||
|
||||
public redirect(response: any, statusCode: number, url: string) {
|
||||
const code = statusCode ? statusCode : HttpStatus.FOUND;
|
||||
public redirect(response: FastifyReply, statusCode: number, url: string) {
|
||||
const code = statusCode ?? HttpStatus.FOUND;
|
||||
return response.status(code).redirect(url);
|
||||
}
|
||||
|
||||
public setErrorHandler(
|
||||
handler: Parameters<fastify.FastifyInstance['setErrorHandler']>[0],
|
||||
prefix?: string,
|
||||
handler: Parameters<
|
||||
FastifyInstance<TServer, TRawRequest, TRawResponse>['setErrorHandler']
|
||||
>[0],
|
||||
) {
|
||||
return this.instance.setErrorHandler(handler);
|
||||
}
|
||||
|
||||
public setNotFoundHandler(
|
||||
handler: Parameters<fastify.FastifyInstance['setNotFoundHandler']>[0],
|
||||
prefix?: string,
|
||||
handler: Parameters<
|
||||
FastifyInstance<TServer, TRawRequest, TRawResponse>['setNotFoundHandler']
|
||||
>[0],
|
||||
) {
|
||||
return this.instance.setNotFoundHandler(handler);
|
||||
}
|
||||
|
||||
public getHttpServer<TServer = any>(): TServer {
|
||||
return this.instance.server as TServer;
|
||||
public getHttpServer<T = TServer>(): T {
|
||||
return (this.instance.server as unknown) as T;
|
||||
}
|
||||
|
||||
public getInstance<TServer = any>(): TServer {
|
||||
return this.instance as TServer;
|
||||
public getInstance<
|
||||
T = FastifyInstance<TServer, TRawRequest, TRawResponse>
|
||||
>(): T {
|
||||
return (this.instance as unknown) as T;
|
||||
}
|
||||
|
||||
public register(...args: any[]) {
|
||||
return this.instance.register(...args);
|
||||
public register<Options extends FastifyPluginOptions>(
|
||||
plugin: FastifyPlugin<Options>,
|
||||
opts?: FastifyRegisterOptions<Options>,
|
||||
) {
|
||||
return this.instance.register(plugin, opts);
|
||||
}
|
||||
|
||||
public inject(...args: any[]) {
|
||||
return this.instance.inject(...args);
|
||||
public async inject(opts: InjectOptions | string) {
|
||||
return await this.instance.inject(opts);
|
||||
}
|
||||
|
||||
public async close() {
|
||||
@@ -113,59 +203,68 @@ export class FastifyAdapter<TInstance = any> extends AbstractHttpAdapter {
|
||||
}
|
||||
}
|
||||
|
||||
public initHttpServer(options: NestApplicationOptions) {
|
||||
public initHttpServer() {
|
||||
this.httpServer = this.instance.server;
|
||||
}
|
||||
|
||||
public useStaticAssets(options: {
|
||||
root: string;
|
||||
prefix?: string;
|
||||
setHeaders?: Function;
|
||||
send?: any;
|
||||
}) {
|
||||
public useStaticAssets(options: FastifyStaticOptions) {
|
||||
return this.register(
|
||||
loadPackage('fastify-static', 'FastifyAdapter.useStaticAssets()', () =>
|
||||
require('fastify-static'),
|
||||
),
|
||||
loadPackage('fastify-static', 'FastifyAdapter.useStaticAssets()'),
|
||||
options,
|
||||
);
|
||||
}
|
||||
|
||||
public setViewEngine(options: any) {
|
||||
public setViewEngine(options: PointOfViewOptions | string) {
|
||||
if (typeof options === 'string') {
|
||||
new Logger('FastifyAdapter').error(
|
||||
"setViewEngine() doesn't support a string argument.",
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
return this.register(
|
||||
loadPackage('point-of-view', 'FastifyAdapter.setViewEngine()'),
|
||||
options,
|
||||
() => require('point-of-view'),
|
||||
);
|
||||
}
|
||||
|
||||
public setHeader(response: any, name: string, value: string) {
|
||||
public setHeader(response: FastifyReply, name: string, value: string) {
|
||||
return response.header(name, value);
|
||||
}
|
||||
|
||||
public getRequestHostname(request: any): string {
|
||||
public getRequestHostname(request: FastifyRequest): string {
|
||||
return request.hostname;
|
||||
}
|
||||
|
||||
public getRequestMethod(request: any): string {
|
||||
public getRequestMethod(request: FastifyRequest): string {
|
||||
return request.raw ? request.raw.method : request.method;
|
||||
}
|
||||
|
||||
public getRequestUrl(request: any): string {
|
||||
public getRequestUrl(request: FastifyRequest): string {
|
||||
return request.raw ? request.raw.url : request.url;
|
||||
}
|
||||
|
||||
public enableCors(options: CorsOptions) {
|
||||
this.register(cors, options);
|
||||
this.register(
|
||||
loadPackage('fastify-cors', 'FastifyAdapter.enableCors()'),
|
||||
options,
|
||||
);
|
||||
}
|
||||
|
||||
public registerParserMiddleware() {
|
||||
this.register(formBody);
|
||||
this.register(
|
||||
loadPackage(
|
||||
'fastify-formbody',
|
||||
'FastifyAdapter.registerParserMiddleware()',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
public createMiddlewareFactory(
|
||||
public async createMiddlewareFactory(
|
||||
requestMethod: RequestMethod,
|
||||
): (path: string, callback: Function) => any {
|
||||
): Promise<(path: string, callback: Function) => any> {
|
||||
if (!this.isMiddieRegistered) {
|
||||
await this.registerMiddie();
|
||||
}
|
||||
return (path: string, callback: Function) => {
|
||||
const re = pathToRegexp(path);
|
||||
const normalizedPath = path === '/*' ? '' : path;
|
||||
@@ -198,10 +297,19 @@ export class FastifyAdapter<TInstance = any> extends AbstractHttpAdapter {
|
||||
return 'fastify';
|
||||
}
|
||||
|
||||
protected registerWithPrefix<T extends fastify.Plugin<any, any, any, any>>(
|
||||
factory: T,
|
||||
prefix = '/',
|
||||
): ReturnType<fastify.FastifyInstance['register']> {
|
||||
protected registerWithPrefix(factory: FastifyPlugin, prefix = '/') {
|
||||
return this.instance.register(factory, { prefix });
|
||||
}
|
||||
|
||||
private isNativeResponse(
|
||||
response: TRawResponse | FastifyReply,
|
||||
): response is TRawResponse {
|
||||
return !('status' in response);
|
||||
}
|
||||
|
||||
private async registerMiddie() {
|
||||
this.isMiddieRegistered = true;
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
await this.register(require('middie'));
|
||||
}
|
||||
}
|
||||
|
||||
48
packages/platform-fastify/interfaces/external/fastify-static-options.interface.ts
vendored
Normal file
48
packages/platform-fastify/interfaces/external/fastify-static-options.interface.ts
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
/**
|
||||
* "fastify-static" interfaces
|
||||
* @see https://github.com/fastify/fastify-static/blob/master/index.d.ts
|
||||
*/
|
||||
|
||||
interface ListDir {
|
||||
href: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
interface ListFile {
|
||||
href: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
interface ListRender {
|
||||
(dirs: ListDir[], files: ListFile[]): string;
|
||||
}
|
||||
|
||||
interface ListOptions {
|
||||
format: 'json' | 'html';
|
||||
names: string[];
|
||||
render: ListRender;
|
||||
}
|
||||
|
||||
export interface FastifyStaticOptions {
|
||||
root: string;
|
||||
prefix?: string;
|
||||
prefixAvoidTrailingSlash?: boolean;
|
||||
serve?: boolean;
|
||||
decorateReply?: boolean;
|
||||
schemaHide?: boolean;
|
||||
setHeaders?: (...args: any[]) => void;
|
||||
redirect?: boolean;
|
||||
wildcard?: boolean | string;
|
||||
list?: boolean | ListOptions;
|
||||
|
||||
// Passed on to `send`
|
||||
acceptRanges?: boolean;
|
||||
cacheControl?: boolean;
|
||||
dotfiles?: boolean;
|
||||
etag?: boolean;
|
||||
extensions?: string[];
|
||||
immutable?: boolean;
|
||||
index?: string[];
|
||||
lastModified?: boolean;
|
||||
maxAge?: string | number;
|
||||
}
|
||||
2
packages/platform-fastify/interfaces/external/index.ts
vendored
Normal file
2
packages/platform-fastify/interfaces/external/index.ts
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './fastify-static-options.interface';
|
||||
export * from './point-of-view-options.interface';
|
||||
26
packages/platform-fastify/interfaces/external/point-of-view-options.interface.ts
vendored
Normal file
26
packages/platform-fastify/interfaces/external/point-of-view-options.interface.ts
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* @see https://github.com/fastify/point-of-view/blob/master/index.d.ts
|
||||
*/
|
||||
|
||||
export interface PointOfViewOptions {
|
||||
engine: {
|
||||
ejs?: any;
|
||||
nunjucks?: any;
|
||||
pug?: any;
|
||||
handlebars?: any;
|
||||
marko?: any;
|
||||
mustache?: any;
|
||||
'art-template'?: any;
|
||||
twig?: any;
|
||||
};
|
||||
templates?: string;
|
||||
includeViewExtension?: boolean;
|
||||
options?: object;
|
||||
charset?: string;
|
||||
maxCache?: number;
|
||||
production?: boolean;
|
||||
defaultContext?: object;
|
||||
layout?: string;
|
||||
root?: string;
|
||||
viewExt?: string;
|
||||
}
|
||||
@@ -1,5 +1,14 @@
|
||||
import { INestApplication } from '@nestjs/common';
|
||||
import { HTTPInjectOptions, HTTPInjectResponse } from 'fastify';
|
||||
import {
|
||||
FastifyPlugin,
|
||||
FastifyPluginOptions,
|
||||
FastifyRegisterOptions,
|
||||
} from 'fastify';
|
||||
import {
|
||||
InjectOptions,
|
||||
Response as LightMyRequestResponse,
|
||||
} from 'light-my-request';
|
||||
import { FastifyStaticOptions, PointOfViewOptions } from './external';
|
||||
|
||||
export interface NestFastifyApplication extends INestApplication {
|
||||
/**
|
||||
@@ -8,7 +17,10 @@ export interface NestFastifyApplication extends INestApplication {
|
||||
*
|
||||
* @returns {this}
|
||||
*/
|
||||
register(...args: any[]): this;
|
||||
register<Options extends FastifyPluginOptions>(
|
||||
plugin: FastifyPlugin<Options>,
|
||||
opts?: FastifyRegisterOptions<Options>,
|
||||
): this;
|
||||
|
||||
/**
|
||||
* Sets a base directory for public assets.
|
||||
@@ -16,25 +28,21 @@ export interface NestFastifyApplication extends INestApplication {
|
||||
*
|
||||
* @returns {this}
|
||||
*/
|
||||
useStaticAssets(options: {
|
||||
root: string;
|
||||
prefix?: string;
|
||||
setHeaders?: Function;
|
||||
send?: any;
|
||||
}): this;
|
||||
useStaticAssets(options: FastifyStaticOptions): this;
|
||||
|
||||
/**
|
||||
* Sets a view engine for templates (views), for example: `pug`, `handlebars`, or `ejs`.
|
||||
*
|
||||
* Don't pass in a string. The string type in the argument is for compatibilility reason and will cause an exception.
|
||||
* @returns {this}
|
||||
*/
|
||||
setViewEngine(options: any): this;
|
||||
setViewEngine(options: PointOfViewOptions | string): this;
|
||||
|
||||
/**
|
||||
* A wrapper function around native `fastify.inject()` method.
|
||||
* @returns {void}
|
||||
*/
|
||||
inject(opts: HTTPInjectOptions | string): Promise<HTTPInjectResponse>;
|
||||
inject(opts: InjectOptions | string): Promise<LightMyRequestResponse>;
|
||||
|
||||
/**
|
||||
* Starts the application.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/platform-fastify",
|
||||
"version": "7.3.2",
|
||||
"version": "7.4.2",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@platform-fastify)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -17,9 +17,11 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"fastify": "2.15.1",
|
||||
"fastify-cors": "3.0.3",
|
||||
"fastify-formbody": "3.2.0",
|
||||
"fastify": "3.1.1",
|
||||
"fastify-cors": "4.1.0",
|
||||
"fastify-formbody": "4.0.3",
|
||||
"light-my-request": "4.0.1",
|
||||
"middie": "5.1.0",
|
||||
"path-to-regexp": "3.2.0",
|
||||
"tslib": "2.0.0"
|
||||
},
|
||||
|
||||
@@ -86,7 +86,11 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
|
||||
<a href="https://www.codeguesser.co.uk" target="_blank"><img src="https://nestjs.com/img/codeguesser-logo.svg" width="120" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://tekhattan.com" target="_blank"><img src="https://nestjs.com/img/tekhattan-logo.png" width="110" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://f-a.nz/" target="_blank"><img src="https://nestjs.com/img/franz.svg" width="80" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://sparkfabrik.com/" target="_blank"><img src="https://nestjs.com/img/sparkfabrik-logo.png" width="120" valign="middle" /></a></td><td align="center" valign="middle"><a href="https://www.thebigphonestore.co.uk/" target="_blank"><img src="https://nestjs.com/img/the-big-phone-store-logo.png" width="65" valign="middle" /></a></td></tr></table>
|
||||
<a href="https://sparkfabrik.com/" target="_blank"><img src="https://nestjs.com/img/sparkfabrik-logo.png" width="120" valign="middle" /></a></td><td align="center" valign="middle"><a href="https://www.thebigphonestore.co.uk/" target="_blank"><img src="https://nestjs.com/img/the-big-phone-store-logo.png" width="65" valign="middle" /></a></td>
|
||||
<td align="center" valign="middle">
|
||||
<a href="https://genuinebee.com/" target="_blank"><img src="https://nestjs.com/img/genuinebee.svg" width="97" valign="middle" /></a> </td></tr>
|
||||
<tr><td align="center" valign="middle"><a href="https://sanyodigital.com/" target="_blank"><img src="https://nestjs.com/img/sanyo-digital.png" width="130" valign="middle" /></a></td>
|
||||
</tr></table>
|
||||
|
||||
## Backers
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/platform-socket.io",
|
||||
"version": "7.3.2",
|
||||
"version": "7.4.2",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@platform-socket.io)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -86,7 +86,11 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
|
||||
<a href="https://www.codeguesser.co.uk" target="_blank"><img src="https://nestjs.com/img/codeguesser-logo.svg" width="120" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://tekhattan.com" target="_blank"><img src="https://nestjs.com/img/tekhattan-logo.png" width="110" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://f-a.nz/" target="_blank"><img src="https://nestjs.com/img/franz.svg" width="80" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://sparkfabrik.com/" target="_blank"><img src="https://nestjs.com/img/sparkfabrik-logo.png" width="120" valign="middle" /></a></td><td align="center" valign="middle"><a href="https://www.thebigphonestore.co.uk/" target="_blank"><img src="https://nestjs.com/img/the-big-phone-store-logo.png" width="65" valign="middle" /></a></td></tr></table>
|
||||
<a href="https://sparkfabrik.com/" target="_blank"><img src="https://nestjs.com/img/sparkfabrik-logo.png" width="120" valign="middle" /></a></td><td align="center" valign="middle"><a href="https://www.thebigphonestore.co.uk/" target="_blank"><img src="https://nestjs.com/img/the-big-phone-store-logo.png" width="65" valign="middle" /></a></td>
|
||||
<td align="center" valign="middle">
|
||||
<a href="https://genuinebee.com/" target="_blank"><img src="https://nestjs.com/img/genuinebee.svg" width="97" valign="middle" /></a> </td></tr>
|
||||
<tr><td align="center" valign="middle"><a href="https://sanyodigital.com/" target="_blank"><img src="https://nestjs.com/img/sanyo-digital.png" width="130" valign="middle" /></a></td>
|
||||
</tr></table>
|
||||
|
||||
## Backers
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/platform-ws",
|
||||
"version": "7.3.2",
|
||||
"version": "7.4.2",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@platform-ws)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -86,7 +86,11 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
|
||||
<a href="https://www.codeguesser.co.uk" target="_blank"><img src="https://nestjs.com/img/codeguesser-logo.svg" width="120" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://tekhattan.com" target="_blank"><img src="https://nestjs.com/img/tekhattan-logo.png" width="110" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://f-a.nz/" target="_blank"><img src="https://nestjs.com/img/franz.svg" width="80" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://sparkfabrik.com/" target="_blank"><img src="https://nestjs.com/img/sparkfabrik-logo.png" width="120" valign="middle" /></a></td><td align="center" valign="middle"><a href="https://www.thebigphonestore.co.uk/" target="_blank"><img src="https://nestjs.com/img/the-big-phone-store-logo.png" width="65" valign="middle" /></a></td></tr></table>
|
||||
<a href="https://sparkfabrik.com/" target="_blank"><img src="https://nestjs.com/img/sparkfabrik-logo.png" width="120" valign="middle" /></a></td><td align="center" valign="middle"><a href="https://www.thebigphonestore.co.uk/" target="_blank"><img src="https://nestjs.com/img/the-big-phone-store-logo.png" width="65" valign="middle" /></a></td>
|
||||
<td align="center" valign="middle">
|
||||
<a href="https://genuinebee.com/" target="_blank"><img src="https://nestjs.com/img/genuinebee.svg" width="97" valign="middle" /></a> </td></tr>
|
||||
<tr><td align="center" valign="middle"><a href="https://sanyodigital.com/" target="_blank"><img src="https://nestjs.com/img/sanyo-digital.png" width="130" valign="middle" /></a></td>
|
||||
</tr></table>
|
||||
|
||||
## Backers
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/testing",
|
||||
"version": "7.3.2",
|
||||
"version": "7.4.2",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@testing)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -86,7 +86,11 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
|
||||
<a href="https://www.codeguesser.co.uk" target="_blank"><img src="https://nestjs.com/img/codeguesser-logo.svg" width="120" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://tekhattan.com" target="_blank"><img src="https://nestjs.com/img/tekhattan-logo.png" width="110" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://f-a.nz/" target="_blank"><img src="https://nestjs.com/img/franz.svg" width="80" valign="middle" /></a> </td><td align="center" valign="middle">
|
||||
<a href="https://sparkfabrik.com/" target="_blank"><img src="https://nestjs.com/img/sparkfabrik-logo.png" width="120" valign="middle" /></a></td><td align="center" valign="middle"><a href="https://www.thebigphonestore.co.uk/" target="_blank"><img src="https://nestjs.com/img/the-big-phone-store-logo.png" width="65" valign="middle" /></a></td></tr></table>
|
||||
<a href="https://sparkfabrik.com/" target="_blank"><img src="https://nestjs.com/img/sparkfabrik-logo.png" width="120" valign="middle" /></a></td><td align="center" valign="middle"><a href="https://www.thebigphonestore.co.uk/" target="_blank"><img src="https://nestjs.com/img/the-big-phone-store-logo.png" width="65" valign="middle" /></a></td>
|
||||
<td align="center" valign="middle">
|
||||
<a href="https://genuinebee.com/" target="_blank"><img src="https://nestjs.com/img/genuinebee.svg" width="97" valign="middle" /></a> </td></tr>
|
||||
<tr><td align="center" valign="middle"><a href="https://sanyodigital.com/" target="_blank"><img src="https://nestjs.com/img/sanyo-digital.png" width="130" valign="middle" /></a></td>
|
||||
</tr></table>
|
||||
|
||||
## Backers
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/websockets",
|
||||
"version": "7.3.2",
|
||||
"version": "7.4.2",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@websockets)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -16,8 +16,8 @@
|
||||
"tslib": "2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/common": "7.3.2",
|
||||
"@nestjs/core": "7.3.2"
|
||||
"@nestjs/common": "7.4.2",
|
||||
"@nestjs/core": "7.4.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^7.0.0",
|
||||
|
||||
2803
sample/01-cats-app/package-lock.json
generated
2803
sample/01-cats-app/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,10 +19,10 @@
|
||||
"test:e2e": "jest --config ./e2e/jest-e2e.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/platform-express": "7.3.1",
|
||||
"class-transformer": "0.2.3",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/platform-express": "7.4.1",
|
||||
"class-transformer": "0.3.1",
|
||||
"class-validator": "0.12.2",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
@@ -31,24 +31,24 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/jest": "26.0.3",
|
||||
"@types/jest": "26.0.7",
|
||||
"@types/node": "10.17.3",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
|
||||
2561
sample/02-gateways/package-lock.json
generated
2561
sample/02-gateways/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,12 +19,12 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/platform-express": "7.3.1",
|
||||
"@nestjs/platform-socket.io": "7.3.1",
|
||||
"@nestjs/websockets": "7.3.1",
|
||||
"class-transformer": "0.2.3",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/platform-express": "7.4.1",
|
||||
"@nestjs/platform-socket.io": "7.4.1",
|
||||
"@nestjs/websockets": "7.4.1",
|
||||
"class-transformer": "0.3.1",
|
||||
"class-validator": "0.12.2",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
@@ -32,27 +32,27 @@
|
||||
"socket.io-redis": "5.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/socket.io": "2.1.8",
|
||||
"@types/socket.io": "2.1.10",
|
||||
"@types/socket.io-redis": "1.0.26",
|
||||
"@types/ws": "7.2.6",
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/node": "7.10.9",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
}
|
||||
}
|
||||
|
||||
2555
sample/03-microservices/package-lock.json
generated
2555
sample/03-microservices/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,11 +19,11 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/microservices": "7.3.1",
|
||||
"@nestjs/platform-express": "7.3.1",
|
||||
"class-transformer": "0.2.3",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/microservices": "7.4.1",
|
||||
"@nestjs/platform-express": "7.4.1",
|
||||
"class-transformer": "0.3.1",
|
||||
"class-validator": "0.12.2",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
@@ -32,23 +32,23 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/amqplib": "0.5.13",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/node": "12.12.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
}
|
||||
}
|
||||
|
||||
2569
sample/04-grpc/package-lock.json
generated
2569
sample/04-grpc/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,11 +19,11 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@grpc/proto-loader": "0.5.4",
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/microservices": "7.3.1",
|
||||
"class-transformer": "0.2.3",
|
||||
"@grpc/proto-loader": "0.5.5",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/microservices": "7.4.1",
|
||||
"class-transformer": "0.3.1",
|
||||
"class-validator": "0.12.2",
|
||||
"grpc": "1.24.3",
|
||||
"reflect-metadata": "0.1.13",
|
||||
@@ -33,23 +33,23 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/node": "10.17.3",
|
||||
"@types/supertest": "2.0.10",
|
||||
"@types/ws": "7.2.6",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
}
|
||||
}
|
||||
|
||||
2579
sample/05-sql-typeorm/package-lock.json
generated
2579
sample/05-sql-typeorm/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,9 +19,9 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/platform-express": "7.3.1",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/platform-express": "7.4.1",
|
||||
"@nestjs/typeorm": "7.1.0",
|
||||
"mysql": "2.18.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
@@ -32,23 +32,23 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/node": "7.10.9",
|
||||
"@types/supertest": "2.0.10",
|
||||
"@types/ws": "7.2.6",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
}
|
||||
}
|
||||
|
||||
2555
sample/06-mongoose/package-lock.json
generated
2555
sample/06-mongoose/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,36 +19,36 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/mongoose": "7.0.2",
|
||||
"@nestjs/platform-express": "7.3.1",
|
||||
"mongoose": "5.9.22",
|
||||
"@nestjs/platform-express": "7.4.1",
|
||||
"mongoose": "5.9.26",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mongoose": "5.7.30",
|
||||
"@types/mongoose": "5.7.34",
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/node": "12.12.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"@types/ws": "7.2.6",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
}
|
||||
}
|
||||
|
||||
2527
sample/07-sequelize/package-lock.json
generated
2527
sample/07-sequelize/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,9 +19,9 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/platform-express": "7.3.1",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/platform-express": "7.4.1",
|
||||
"@nestjs/sequelize": "0.1.0",
|
||||
"mysql2": "2.1.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
@@ -29,29 +29,29 @@
|
||||
"rxjs": "6.6.0",
|
||||
"sequelize": "5.22.3",
|
||||
"sequelize-typescript": "1.1.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/sequelize": "4.28.9",
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/node": "12.12.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"@types/ws": "7.2.6",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
}
|
||||
}
|
||||
|
||||
1351
sample/08-webpack/package-lock.json
generated
1351
sample/08-webpack/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -11,24 +11,24 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/platform-express": "7.3.1",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/platform-express": "7.4.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.6.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "12.12.31",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"start-server-webpack-plugin": "2.2.5",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"webpack": "4.43.0",
|
||||
"webpack": "4.44.1",
|
||||
"webpack-cli": "3.3.12",
|
||||
"webpack-node-externals": "1.7.2"
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ module.exports = function(options) {
|
||||
watch: true,
|
||||
externals: [
|
||||
nodeExternals({
|
||||
whitelist: ['webpack/hot/poll?100'],
|
||||
allowlist: ['webpack/hot/poll?100'],
|
||||
}),
|
||||
],
|
||||
plugins: [
|
||||
|
||||
1321
sample/09-babel-example/package-lock.json
generated
1321
sample/09-babel-example/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -13,25 +13,25 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/platform-express": "7.3.1",
|
||||
"@nestjs/microservices": "7.3.1",
|
||||
"@nestjs/websockets": "7.3.1",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/platform-express": "7.4.1",
|
||||
"@nestjs/microservices": "7.4.1",
|
||||
"@nestjs/websockets": "7.4.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "7.10.4",
|
||||
"@babel/core": "7.10.4",
|
||||
"@babel/node": "7.10.4",
|
||||
"@babel/plugin-proposal-decorators": "7.10.4",
|
||||
"@babel/plugin-transform-runtime": "7.10.4",
|
||||
"@babel/cli": "7.10.5",
|
||||
"@babel/core": "7.10.5",
|
||||
"@babel/node": "7.10.5",
|
||||
"@babel/plugin-proposal-decorators": "7.10.5",
|
||||
"@babel/plugin-transform-runtime": "7.10.5",
|
||||
"@babel/preset-env": "7.10.4",
|
||||
"@babel/register": "7.10.4",
|
||||
"@babel/runtime": "7.10.4",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"jest": "26.1.0",
|
||||
"@babel/register": "7.10.5",
|
||||
"@babel/runtime": "7.10.5",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"jest": "26.2.1",
|
||||
"nodemon": "2.0.4",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2"
|
||||
|
||||
2747
sample/10-fastify/package-lock.json
generated
2747
sample/10-fastify/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,10 +19,10 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/platform-fastify": "7.3.1",
|
||||
"class-transformer": "0.2.3",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/platform-fastify": "7.4.1",
|
||||
"class-transformer": "0.3.1",
|
||||
"class-validator": "0.12.2",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
@@ -31,23 +31,23 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/node": "12.12.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"@types/ws": "7.2.6",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
}
|
||||
}
|
||||
|
||||
2561
sample/11-swagger/package-lock.json
generated
2561
sample/11-swagger/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,11 +19,11 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/platform-express": "7.3.1",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/platform-express": "7.4.1",
|
||||
"@nestjs/swagger": "4.5.12",
|
||||
"class-transformer": "0.2.3",
|
||||
"class-transformer": "0.3.1",
|
||||
"class-validator": "0.12.2",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
@@ -33,22 +33,22 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/node": "10.17.3",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
}
|
||||
}
|
||||
|
||||
2127
sample/12-graphql-schema-first/package-lock.json
generated
2127
sample/12-graphql-schema-first/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,13 +19,13 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/graphql": "7.5.1",
|
||||
"@nestjs/platform-express": "7.3.1",
|
||||
"apollo-server": "2.15.1",
|
||||
"apollo-server-express": "2.15.1",
|
||||
"class-transformer": "0.2.3",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/graphql": "7.6.0",
|
||||
"@nestjs/platform-express": "7.4.1",
|
||||
"apollo-server": "2.16.1",
|
||||
"apollo-server-express": "2.16.1",
|
||||
"class-transformer": "0.3.1",
|
||||
"class-validator": "0.12.2",
|
||||
"graphql": "15.3.0",
|
||||
"graphql-subscriptions": "1.1.0",
|
||||
@@ -36,22 +36,22 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/node": "12.12.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
}
|
||||
}
|
||||
|
||||
2557
sample/13-mongo-typeorm/package-lock.json
generated
2557
sample/13-mongo-typeorm/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,9 +19,9 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/platform-express": "7.3.1",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/platform-express": "7.4.1",
|
||||
"@nestjs/typeorm": "7.1.0",
|
||||
"mongodb": "3.5.9",
|
||||
"reflect-metadata": "0.1.13",
|
||||
@@ -32,22 +32,22 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/node": "12.12.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
}
|
||||
}
|
||||
|
||||
2549
sample/14-mongoose-base/package-lock.json
generated
2549
sample/14-mongoose-base/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,10 +19,10 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/platform-express": "7.3.1",
|
||||
"mongoose": "5.9.22",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/platform-express": "7.4.1",
|
||||
"mongoose": "5.9.26",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.0"
|
||||
@@ -30,22 +30,22 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/node": "7.10.9",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
}
|
||||
}
|
||||
|
||||
3822
sample/15-mvc/package-lock.json
generated
3822
sample/15-mvc/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,9 +19,9 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/platform-express": "7.3.1",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/platform-express": "7.4.1",
|
||||
"hbs": "4.1.1",
|
||||
"pug": "3.0.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
@@ -31,22 +31,22 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/node": "8.10.58",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
}
|
||||
}
|
||||
|
||||
2562
sample/16-gateways-ws/package-lock.json
generated
2562
sample/16-gateways-ws/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,12 +19,12 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/platform-express": "7.3.1",
|
||||
"@nestjs/platform-ws": "7.3.1",
|
||||
"@nestjs/websockets": "7.3.1",
|
||||
"class-transformer": "0.2.3",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/platform-express": "7.4.1",
|
||||
"@nestjs/platform-ws": "7.4.1",
|
||||
"@nestjs/websockets": "7.4.1",
|
||||
"class-transformer": "0.3.1",
|
||||
"class-validator": "0.12.2",
|
||||
"rimraf": "3.0.2",
|
||||
"reflect-metadata": "0.1.13",
|
||||
@@ -35,22 +35,22 @@
|
||||
"@types/ws": "7.2.6",
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/node": "12.12.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
}
|
||||
}
|
||||
|
||||
3954
sample/17-mvc-fastify/package-lock.json
generated
3954
sample/17-mvc-fastify/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,37 +19,38 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/platform-fastify": "7.3.1",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/platform-fastify": "7.4.1",
|
||||
"fastify-static": "3.2.0",
|
||||
"handlebars": "4.7.6",
|
||||
"point-of-view": "3.8.0",
|
||||
"point-of-view": "4.2.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/socket.io": "2.1.8",
|
||||
"@types/socket.io": "2.1.10",
|
||||
"@types/socket.io-redis": "1.0.26",
|
||||
"@types/ws": "7.2.6",
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/node": "8.10.58",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
}
|
||||
}
|
||||
|
||||
2531
sample/18-context/package-lock.json
generated
2531
sample/18-context/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,8 +19,8 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.0"
|
||||
@@ -30,18 +30,18 @@
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@types/node": "12.12.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
}
|
||||
}
|
||||
|
||||
1664
sample/19-auth-jwt/package-lock.json
generated
1664
sample/19-auth-jwt/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -20,11 +20,11 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/jwt": "7.0.0",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/jwt": "7.1.0",
|
||||
"@nestjs/passport": "7.1.0",
|
||||
"@nestjs/platform-express": "7.3.1",
|
||||
"@nestjs/platform-express": "7.4.1",
|
||||
"passport": "0.4.1",
|
||||
"passport-jwt": "4.0.0",
|
||||
"passport-local": "1.0.0",
|
||||
@@ -35,24 +35,24 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/jest": "26.0.3",
|
||||
"@types/jest": "26.0.7",
|
||||
"@types/node": "12.12.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
|
||||
3544
sample/20-cache/package-lock.json
generated
3544
sample/20-cache/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,11 +19,11 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/platform-express": "7.3.1",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/platform-express": "7.4.1",
|
||||
"cache-manager-redis-store": "2.0.0",
|
||||
"class-transformer": "0.2.3",
|
||||
"class-transformer": "0.3.1",
|
||||
"class-validator": "0.12.2",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.6.0"
|
||||
@@ -31,22 +31,22 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/node": "12.12.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
}
|
||||
}
|
||||
|
||||
3544
sample/21-serializer/package-lock.json
generated
3544
sample/21-serializer/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,10 +19,10 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/platform-express": "7.3.1",
|
||||
"class-transformer": "0.2.3",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/platform-express": "7.4.1",
|
||||
"class-transformer": "0.3.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.0"
|
||||
@@ -30,22 +30,22 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/node": "12.12.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
}
|
||||
}
|
||||
|
||||
4325
sample/22-graphql-prisma/package-lock.json
generated
4325
sample/22-graphql-prisma/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,13 +19,13 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/graphql": "7.5.1",
|
||||
"@nestjs/platform-express": "7.3.1",
|
||||
"apollo-server-express": "2.15.1",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/graphql": "7.6.0",
|
||||
"@nestjs/platform-express": "7.4.1",
|
||||
"apollo-server-express": "2.16.1",
|
||||
"graphql": "15.3.0",
|
||||
"graphql-tools": "6.0.12",
|
||||
"graphql-tools": "6.0.15",
|
||||
"prisma-binding": "2.3.16",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
@@ -34,22 +34,22 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/node": "12.12.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
}
|
||||
}
|
||||
|
||||
3324
sample/23-graphql-code-first/package-lock.json
generated
3324
sample/23-graphql-code-first/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,13 +19,13 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/graphql": "7.5.1",
|
||||
"@nestjs/platform-express": "7.3.1",
|
||||
"apollo-server": "2.15.1",
|
||||
"apollo-server-express": "2.15.1",
|
||||
"class-transformer": "0.2.3",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/graphql": "7.6.0",
|
||||
"@nestjs/platform-express": "7.4.1",
|
||||
"apollo-server": "2.16.1",
|
||||
"apollo-server-express": "2.16.1",
|
||||
"class-transformer": "0.3.1",
|
||||
"class-validator": "0.12.2",
|
||||
"graphql": "15.3.0",
|
||||
"graphql-query-complexity": "0.6.0",
|
||||
@@ -36,22 +36,22 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/node": "10.17.3",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
}
|
||||
}
|
||||
|
||||
2549
sample/24-serve-static/package-lock.json
generated
2549
sample/24-serve-static/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,11 +19,11 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/serve-static": "2.1.3",
|
||||
"@nestjs/platform-express": "7.3.1",
|
||||
"class-transformer": "0.2.3",
|
||||
"@nestjs/platform-express": "7.4.1",
|
||||
"class-transformer": "0.3.1",
|
||||
"class-validator": "0.12.2",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
@@ -32,22 +32,22 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/node": "10.17.3",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
}
|
||||
}
|
||||
|
||||
2981
sample/25-dynamic-modules/package-lock.json
generated
2981
sample/25-dynamic-modules/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,9 +19,9 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/platform-express": "7.3.1",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/platform-express": "7.4.1",
|
||||
"dotenv": "8.2.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
@@ -31,24 +31,24 @@
|
||||
"@types/dotenv": "6.1.1",
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/jest": "26.0.3",
|
||||
"@types/jest": "26.0.7",
|
||||
"@types/node": "11.15.2",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
|
||||
3001
sample/26-queues/package-lock.json
generated
3001
sample/26-queues/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,11 +19,11 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/bull": "0.1.1",
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/platform-express": "7.3.1",
|
||||
"bull": "3.15.0",
|
||||
"@nestjs/bull": "0.1.2",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/platform-express": "7.4.1",
|
||||
"bull": "3.16.0",
|
||||
"dotenv": "8.2.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
@@ -32,26 +32,26 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/bull": "3.14.0",
|
||||
"@types/dotenv": "6.1.1",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/jest": "26.0.3",
|
||||
"@types/jest": "26.0.7",
|
||||
"@types/node": "11.15.2",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
|
||||
2981
sample/27-scheduling/package-lock.json
generated
2981
sample/27-scheduling/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,9 +19,9 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.3.1",
|
||||
"@nestjs/core": "7.3.1",
|
||||
"@nestjs/platform-express": "7.3.1",
|
||||
"@nestjs/common": "7.4.1",
|
||||
"@nestjs/core": "7.4.1",
|
||||
"@nestjs/platform-express": "7.4.1",
|
||||
"@nestjs/schedule": "0.4.0",
|
||||
"dotenv": "8.2.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
@@ -31,26 +31,26 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.4.1",
|
||||
"@nestjs/schematics": "7.0.1",
|
||||
"@nestjs/testing": "7.3.1",
|
||||
"@nestjs/testing": "7.4.1",
|
||||
"@types/bull": "3.14.0",
|
||||
"@types/dotenv": "6.1.1",
|
||||
"@types/express": "4.17.7",
|
||||
"@types/jest": "26.0.3",
|
||||
"@types/jest": "26.0.7",
|
||||
"@types/node": "11.15.2",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.1.0",
|
||||
"jest": "26.2.1",
|
||||
"prettier": "2.0.5",
|
||||
"supertest": "4.0.2",
|
||||
"ts-jest": "26.1.1",
|
||||
"ts-loader": "7.0.5",
|
||||
"ts-jest": "26.1.4",
|
||||
"ts-loader": "8.0.1",
|
||||
"ts-node": "8.10.2",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.6.0",
|
||||
"@typescript-eslint/parser": "3.6.0",
|
||||
"eslint": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "3.7.1",
|
||||
"@typescript-eslint/parser": "3.7.1",
|
||||
"eslint": "7.5.0",
|
||||
"eslint-config-prettier": "6.11.0",
|
||||
"eslint-plugin-import": "2.22.0",
|
||||
"typescript": "3.9.6"
|
||||
"typescript": "3.9.7"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
|
||||
Reference in New Issue
Block a user