mirror of
https://github.com/nestjs/nest.git
synced 2026-02-22 15:31:40 +00:00
Compare commits
108 Commits
andrewda-h
...
v7.6.12
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c349d92bea | ||
|
|
f4a8f493bc | ||
|
|
a60491d9bc | ||
|
|
80edd1002b | ||
|
|
527f8ccfbb | ||
|
|
7a7ccb7c45 | ||
|
|
8e999a7665 | ||
|
|
1a8eefebfd | ||
|
|
cf5cd331ec | ||
|
|
b8078d7d05 | ||
|
|
34adb6d90b | ||
|
|
bff8609b98 | ||
|
|
29847d265c | ||
|
|
38a2b106c4 | ||
|
|
0a8eb9cbbe | ||
|
|
40ec0aee09 | ||
|
|
5fcda32a88 | ||
|
|
c4778047ca | ||
|
|
10164b6770 | ||
|
|
0312224383 | ||
|
|
a8e19c0514 | ||
|
|
ccfb512992 | ||
|
|
fa3b744e46 | ||
|
|
86870636a2 | ||
|
|
b9d39b973d | ||
|
|
5b07b2432f | ||
|
|
2ceddd61c0 | ||
|
|
1ac11d1b06 | ||
|
|
8503d62e4e | ||
|
|
6e8547bd94 | ||
|
|
7009884378 | ||
|
|
170f574bef | ||
|
|
124afbbdc7 | ||
|
|
bee7ab584f | ||
|
|
97fe2dde38 | ||
|
|
52483414d6 | ||
|
|
3323283a1d | ||
|
|
4b3f1a43ae | ||
|
|
b5006c958f | ||
|
|
36757d4056 | ||
|
|
989a66a2ec | ||
|
|
38baa94eee | ||
|
|
b4bad009d9 | ||
|
|
6aa9c131ac | ||
|
|
58cdb78acc | ||
|
|
fd7286476b | ||
|
|
d5c51c144b | ||
|
|
6c65300078 | ||
|
|
3e196c1376 | ||
|
|
462da30ecd | ||
|
|
ddcd840fb8 | ||
|
|
025689f022 | ||
|
|
d449a70a49 | ||
|
|
fd094c19c9 | ||
|
|
28d1ab655e | ||
|
|
4feca70016 | ||
|
|
59476d8aa5 | ||
|
|
8f6ee6ec82 | ||
|
|
7a224d6ce9 | ||
|
|
5657412a55 | ||
|
|
e4d6695c15 | ||
|
|
ee92aecddf | ||
|
|
2deced39c8 | ||
|
|
095bce2687 | ||
|
|
c190ccb5cd | ||
|
|
71fb7c68b2 | ||
|
|
0e16450a64 | ||
|
|
2ee0e7f840 | ||
|
|
b365aa5fba | ||
|
|
a423ca8c31 | ||
|
|
e0816c91a1 | ||
|
|
8cd06e9bb5 | ||
|
|
b21af5ef47 | ||
|
|
7b95db1a5b | ||
|
|
1823b46607 | ||
|
|
f6715dae15 | ||
|
|
da2935cc0f | ||
|
|
65e1cca493 | ||
|
|
6bf271aa10 | ||
|
|
e22c6019e9 | ||
|
|
054bae48a1 | ||
|
|
0ba2658ab4 | ||
|
|
dcf8788262 | ||
|
|
c8f739ced0 | ||
|
|
eb233d9fb3 | ||
|
|
b8e552b229 | ||
|
|
a96b08465e | ||
|
|
c47c45b6ff | ||
|
|
93b5598a33 | ||
|
|
29497d61af | ||
|
|
f37e23c5ea | ||
|
|
07cab6a468 | ||
|
|
fa0e011b03 | ||
|
|
d034e62ff0 | ||
|
|
396fe779e6 | ||
|
|
5728578e10 | ||
|
|
0db1b041ef | ||
|
|
821574cee9 | ||
|
|
4f96cadb7e | ||
|
|
90d64d085d | ||
|
|
6db30813de | ||
|
|
b336fd172c | ||
|
|
3123ad3f19 | ||
|
|
fc5f3c91af | ||
|
|
e51ab047d2 | ||
|
|
2ba2b99325 | ||
|
|
ba37eee5b0 | ||
|
|
a11d167130 |
@@ -113,6 +113,5 @@ describe('GRPC transport', () => {
|
||||
|
||||
after(async () => {
|
||||
await app.close();
|
||||
client.close();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
"packages": [
|
||||
"packages/*"
|
||||
],
|
||||
"version": "7.6.8"
|
||||
"version": "7.6.12"
|
||||
}
|
||||
|
||||
34098
package-lock.json
generated
34098
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
34
package.json
34
package.json
@@ -76,7 +76,7 @@
|
||||
"@commitlint/config-angular": "11.0.0",
|
||||
"@grpc/proto-loader": "0.5.6",
|
||||
"@nestjs/graphql": "7.9.8",
|
||||
"@nestjs/mongoose": "7.2.2",
|
||||
"@nestjs/mongoose": "7.2.3",
|
||||
"@nestjs/typeorm": "7.1.5",
|
||||
"@types/amqplib": "0.5.17",
|
||||
"@types/bytes": "3.1.0",
|
||||
@@ -88,23 +88,23 @@
|
||||
"@types/gulp": "4.0.8",
|
||||
"@types/mocha": "8.2.0",
|
||||
"@types/mongoose": "5.10.3",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/redis": "2.8.28",
|
||||
"@types/reflect-metadata": "0.1.0",
|
||||
"@types/sinon": "9.0.10",
|
||||
"@types/socket.io": "2.1.13",
|
||||
"@types/ws": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"amqp-connection-manager": "3.2.1",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"amqp-connection-manager": "3.2.2",
|
||||
"amqplib": "0.6.0",
|
||||
"apollo-server-express": "2.19.2",
|
||||
"apollo-server-express": "2.20.0",
|
||||
"artillery": "1.6.1",
|
||||
"awesome-typescript-loader": "5.2.1",
|
||||
"body-parser": "1.19.0",
|
||||
"bytes": "3.1.0",
|
||||
"cache-manager": "3.4.0",
|
||||
"chai": "4.2.0",
|
||||
"chai": "4.3.0",
|
||||
"chai-as-promised": "7.1.1",
|
||||
"clang-format": "1.5.0",
|
||||
"commitlint-circle": "1.0.0",
|
||||
@@ -113,7 +113,7 @@
|
||||
"core-js": "3.8.3",
|
||||
"coveralls": "3.1.0",
|
||||
"delete-empty": "3.0.0",
|
||||
"engine.io-client": "4.1.0",
|
||||
"engine.io-client": "4.1.1",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
@@ -122,36 +122,36 @@
|
||||
"fastify": "3.11.0",
|
||||
"fastify-cors": "5.2.0",
|
||||
"fastify-formbody": "5.0.0",
|
||||
"fastify-multipart": "3.3.1",
|
||||
"fastify-multipart": "4.0.0",
|
||||
"fastify-static": "3.4.0",
|
||||
"graphql": "15.5.0",
|
||||
"graphql-tools": "7.0.2",
|
||||
"grpc": "1.24.4",
|
||||
"grpc": "1.24.5",
|
||||
"gulp": "4.0.2",
|
||||
"gulp-clang-format": "1.0.27",
|
||||
"gulp-clean": "0.4.0",
|
||||
"gulp-sourcemaps": "3.0.0",
|
||||
"gulp-typescript": "5.0.1",
|
||||
"gulp-watch": "5.0.1",
|
||||
"husky": "4.3.8",
|
||||
"husky": "5.0.9",
|
||||
"imports-loader": "2.0.0",
|
||||
"json-loader": "0.5.7",
|
||||
"kafkajs": "1.15.0",
|
||||
"lerna": "2.11.0",
|
||||
"light-my-request": "4.4.1",
|
||||
"lint-staged": "10.5.3",
|
||||
"lint-staged": "10.5.4",
|
||||
"markdown-table": "2.0.0",
|
||||
"merge-graphql-schemas": "1.7.8",
|
||||
"middie": "5.2.0",
|
||||
"mocha": "8.2.1",
|
||||
"mongoose": "5.11.14",
|
||||
"mongoose": "5.11.15",
|
||||
"mqtt": "4.2.6",
|
||||
"multer": "1.4.2",
|
||||
"mysql": "2.18.1",
|
||||
"nats": "1.4.12",
|
||||
"nodemon": "2.0.7",
|
||||
"nyc": "15.1.0",
|
||||
"point-of-view": "4.11.0",
|
||||
"point-of-view": "4.12.0",
|
||||
"prettier": "2.2.1",
|
||||
"redis": "3.0.2",
|
||||
"rxjs-compat": "6.6.3",
|
||||
@@ -162,10 +162,10 @@
|
||||
"supertest": "6.1.3",
|
||||
"ts-morph": "9.1.0",
|
||||
"ts-node": "9.1.1",
|
||||
"typeorm": "0.2.30",
|
||||
"typescript": "4.1.3",
|
||||
"typeorm": "0.2.31",
|
||||
"typescript": "4.1.4",
|
||||
"wrk": "1.2.1",
|
||||
"ws": "7.4.2"
|
||||
"ws": "7.4.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10.13.0"
|
||||
|
||||
@@ -167,7 +167,7 @@ export const Session: () => ParameterDecorator = createRouteParamDecorator(
|
||||
* Route handler parameter decorator. Extracts the `file` object
|
||||
* and populates the decorated parameter with the value of `file`.
|
||||
* Used in conjunction with
|
||||
* [multer middleware](https://github.com/expressjs/multer).
|
||||
* [multer middleware](https://github.com/expressjs/multer) for Express-based applications.
|
||||
*
|
||||
* For example:
|
||||
* ```typescript
|
||||
@@ -179,15 +179,78 @@ export const Session: () => ParameterDecorator = createRouteParamDecorator(
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export const UploadedFile: (
|
||||
export function UploadedFile(): ParameterDecorator;
|
||||
/**
|
||||
* Route handler parameter decorator. Extracts the `file` object
|
||||
* and populates the decorated parameter with the value of `file`.
|
||||
* Used in conjunction with
|
||||
* [multer middleware](https://github.com/expressjs/multer) for Express-based applications.
|
||||
*
|
||||
* For example:
|
||||
* ```typescript
|
||||
* uploadFile(@UploadedFile() file) {
|
||||
* console.log(file);
|
||||
* }
|
||||
* ```
|
||||
* @see [Request object](https://docs.nestjs.com/techniques/file-upload)
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export function UploadedFile(
|
||||
...pipes: (Type<PipeTransform> | PipeTransform)[]
|
||||
): ParameterDecorator;
|
||||
|
||||
/**
|
||||
* Route handler parameter decorator. Extracts the `file` object
|
||||
* and populates the decorated parameter with the value of `file`.
|
||||
* Used in conjunction with
|
||||
* [multer middleware](https://github.com/expressjs/multer) for Express-based applications.
|
||||
*
|
||||
* For example:
|
||||
* ```typescript
|
||||
* uploadFile(@UploadedFile() file) {
|
||||
* console.log(file);
|
||||
* }
|
||||
* ```
|
||||
* @see [Request object](https://docs.nestjs.com/techniques/file-upload)
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export function UploadedFile(
|
||||
fileKey?: string,
|
||||
) => ParameterDecorator = createRouteParamDecorator(RouteParamtypes.FILE);
|
||||
...pipes: (Type<PipeTransform> | PipeTransform)[]
|
||||
): ParameterDecorator;
|
||||
/**
|
||||
* Route handler parameter decorator. Extracts the `file` object
|
||||
* and populates the decorated parameter with the value of `file`.
|
||||
* Used in conjunction with
|
||||
* [multer middleware](https://github.com/expressjs/multer) for Express-based applications.
|
||||
*
|
||||
* For example:
|
||||
* ```typescript
|
||||
* uploadFile(@UploadedFile() file) {
|
||||
* console.log(file);
|
||||
* }
|
||||
* ```
|
||||
* @see [Request object](https://docs.nestjs.com/techniques/file-upload)
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export function UploadedFile(
|
||||
fileKey?: string | (Type<PipeTransform> | PipeTransform),
|
||||
...pipes: (Type<PipeTransform> | PipeTransform)[]
|
||||
): ParameterDecorator {
|
||||
return createPipesRouteParamDecorator(RouteParamtypes.FILE)(
|
||||
fileKey,
|
||||
...pipes,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Route handler parameter decorator. Extracts the `files` object
|
||||
* and populates the decorated parameter with the value of `files`.
|
||||
* Used in conjunction with
|
||||
* [multer middleware](https://github.com/expressjs/multer).
|
||||
* [multer middleware](https://github.com/expressjs/multer) for Express-based applications.
|
||||
*
|
||||
* For example:
|
||||
* ```typescript
|
||||
@@ -199,9 +262,51 @@ export const UploadedFile: (
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export const UploadedFiles: () => ParameterDecorator = createRouteParamDecorator(
|
||||
RouteParamtypes.FILES,
|
||||
);
|
||||
export function UploadedFiles(): ParameterDecorator;
|
||||
/**
|
||||
* Route handler parameter decorator. Extracts the `files` object
|
||||
* and populates the decorated parameter with the value of `files`.
|
||||
* Used in conjunction with
|
||||
* [multer middleware](https://github.com/expressjs/multer) for Express-based applications.
|
||||
*
|
||||
* For example:
|
||||
* ```typescript
|
||||
* uploadFile(@UploadedFiles() files) {
|
||||
* console.log(files);
|
||||
* }
|
||||
* ```
|
||||
* @see [Request object](https://docs.nestjs.com/techniques/file-upload)
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export function UploadedFiles(
|
||||
...pipes: (Type<PipeTransform> | PipeTransform)[]
|
||||
): ParameterDecorator;
|
||||
/**
|
||||
* Route handler parameter decorator. Extracts the `files` object
|
||||
* and populates the decorated parameter with the value of `files`.
|
||||
* Used in conjunction with
|
||||
* [multer middleware](https://github.com/expressjs/multer) for Express-based applications.
|
||||
*
|
||||
* For example:
|
||||
* ```typescript
|
||||
* uploadFile(@UploadedFiles() files) {
|
||||
* console.log(files);
|
||||
* }
|
||||
* ```
|
||||
* @see [Request object](https://docs.nestjs.com/techniques/file-upload)
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export function UploadedFiles(
|
||||
...pipes: (Type<PipeTransform> | PipeTransform)[]
|
||||
): ParameterDecorator {
|
||||
return createPipesRouteParamDecorator(RouteParamtypes.FILES)(
|
||||
undefined,
|
||||
...pipes,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Route handler parameter decorator. Extracts the `headers`
|
||||
* property from the `req` object and populates the decorated
|
||||
|
||||
@@ -62,7 +62,7 @@ export interface HttpServer<TRequest = any, TResponse = any> {
|
||||
| Promise<(path: string, callback: Function) => any>;
|
||||
getRequestHostname?(request: TRequest): string;
|
||||
getRequestMethod?(request: TRequest): string;
|
||||
getRequestUrl?(request: TResponse): string;
|
||||
getRequestUrl?(request: TRequest): string;
|
||||
getInstance(): any;
|
||||
registerParserMiddleware(): any;
|
||||
enableCors(options: CorsOptions | CorsOptionsDelegate<TRequest>): any;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/common",
|
||||
"version": "7.6.8",
|
||||
"version": "7.6.12",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@common)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"homepage": "https://nestjs.com",
|
||||
|
||||
@@ -86,7 +86,39 @@ export class ParseArrayPipe implements PipeTransform {
|
||||
} catch {}
|
||||
return this.validationPipe.transform(item, validationMetadata);
|
||||
};
|
||||
value = await Promise.all(value.map(toClassInstance));
|
||||
if (this.options.stopAtFirstError === false) {
|
||||
// strict compare to "false" to make sure
|
||||
// that this option is disabled by default
|
||||
let errors = [];
|
||||
|
||||
const targetArray = value as Array<unknown>;
|
||||
for (let i = 0; i < targetArray.length; i++) {
|
||||
try {
|
||||
targetArray[i] = await toClassInstance(targetArray[i]);
|
||||
} catch (err) {
|
||||
let message: string[] | unknown;
|
||||
if (err.getResponse) {
|
||||
const response = err.getResponse();
|
||||
if (Array.isArray(response.message)) {
|
||||
message = response.message.map(
|
||||
(item: string) => `[${i}] ${item}`,
|
||||
);
|
||||
} else {
|
||||
message = `[${i}] ${response.message}`;
|
||||
}
|
||||
} else {
|
||||
message = err;
|
||||
}
|
||||
errors = errors.concat(message);
|
||||
}
|
||||
}
|
||||
if (errors.length > 0) {
|
||||
throw this.exceptionFactory(errors as any);
|
||||
}
|
||||
return targetArray;
|
||||
} else {
|
||||
value = await Promise.all(value.map(toClassInstance));
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
import * as chai from 'chai';
|
||||
import { expect } from 'chai';
|
||||
import * as chaiAsPromised from 'chai-as-promised';
|
||||
import { Type } from 'class-transformer';
|
||||
import {
|
||||
IsBoolean,
|
||||
IsDate,
|
||||
IsDefined,
|
||||
IsNumber,
|
||||
IsString,
|
||||
ValidateNested,
|
||||
} from 'class-validator';
|
||||
import { BadRequestException } from '../../exceptions';
|
||||
import { ArgumentMetadata } from '../../interfaces/features/pipe-transform.interface';
|
||||
import { ParseArrayPipe } from '../../pipes/parse-array.pipe';
|
||||
chai.use(chaiAsPromised);
|
||||
|
||||
describe('ParseArrayPipe', () => {
|
||||
let target: ParseArrayPipe;
|
||||
@@ -102,6 +114,153 @@ describe('ParseArrayPipe', () => {
|
||||
expect(item).to.be.instanceOf(ArrItem);
|
||||
});
|
||||
});
|
||||
describe('when "stopAtFirstError" is explicitly turned off', () => {
|
||||
it('should validate each item and concat errors', async () => {
|
||||
class ArrItemWithProp {
|
||||
@IsNumber()
|
||||
number: number;
|
||||
}
|
||||
const pipe = new ParseArrayPipe({
|
||||
items: ArrItemWithProp,
|
||||
stopAtFirstError: false,
|
||||
});
|
||||
try {
|
||||
await pipe.transform(
|
||||
[
|
||||
{ number: '1' },
|
||||
{ number: '1' },
|
||||
{ number: 1 },
|
||||
] as ArrItemWithProp[],
|
||||
{} as ArgumentMetadata,
|
||||
);
|
||||
} catch (err) {
|
||||
expect(err).to.be.instanceOf(BadRequestException);
|
||||
expect(err.getResponse().message).to.deep.equal([
|
||||
'[0] number must be a number conforming to the specified constraints',
|
||||
'[1] number must be a number conforming to the specified constraints',
|
||||
]);
|
||||
}
|
||||
});
|
||||
|
||||
it('should validate each nested object and concat errors', async () => {
|
||||
class RandomObject {
|
||||
@IsDefined()
|
||||
@IsBoolean()
|
||||
isEnabled: boolean;
|
||||
|
||||
@IsString()
|
||||
title: string;
|
||||
|
||||
@IsDate()
|
||||
createdAt: Date;
|
||||
|
||||
constructor(partial: Partial<any>) {
|
||||
Object.assign(this, partial);
|
||||
}
|
||||
}
|
||||
class ArrItemObject {
|
||||
@ValidateNested()
|
||||
random: RandomObject;
|
||||
}
|
||||
const pipe = new ParseArrayPipe({
|
||||
items: ArrItemObject,
|
||||
stopAtFirstError: false,
|
||||
});
|
||||
try {
|
||||
await pipe.transform(
|
||||
[
|
||||
{
|
||||
random: new RandomObject({
|
||||
isEnabled: true,
|
||||
title: true,
|
||||
createdAt: new Date(),
|
||||
}),
|
||||
},
|
||||
{
|
||||
random: new RandomObject({
|
||||
title: 'ok',
|
||||
createdAt: false,
|
||||
}),
|
||||
},
|
||||
] as any[],
|
||||
{} as ArgumentMetadata,
|
||||
);
|
||||
} catch (err) {
|
||||
expect(err).to.be.instanceOf(BadRequestException);
|
||||
expect(err.getResponse().message).to.deep.equal([
|
||||
'[0] random.title must be a string',
|
||||
'[1] random.isEnabled should not be null or undefined',
|
||||
'[1] random.isEnabled must be a boolean value',
|
||||
'[1] random.createdAt must be a Date instance',
|
||||
]);
|
||||
}
|
||||
});
|
||||
|
||||
it('should validate each nested array and concat errors', async () => {
|
||||
class RandomObject {
|
||||
@IsDefined()
|
||||
@IsBoolean()
|
||||
isEnabled: boolean;
|
||||
|
||||
@IsString()
|
||||
title: string;
|
||||
|
||||
@IsDate()
|
||||
createdAt: Date;
|
||||
|
||||
constructor(partial: Partial<any>) {
|
||||
Object.assign(this, partial);
|
||||
}
|
||||
}
|
||||
class ArrItemObject {
|
||||
@Type(() => RandomObject)
|
||||
@ValidateNested({ each: true })
|
||||
random: RandomObject[];
|
||||
}
|
||||
const pipe = new ParseArrayPipe({
|
||||
items: ArrItemObject,
|
||||
stopAtFirstError: false,
|
||||
});
|
||||
try {
|
||||
await pipe.transform(
|
||||
[
|
||||
{
|
||||
random: [
|
||||
new RandomObject({
|
||||
isEnabled: true,
|
||||
title: true,
|
||||
createdAt: new Date(),
|
||||
}),
|
||||
new RandomObject({
|
||||
isEnabled: true,
|
||||
title: true,
|
||||
createdAt: new Date(),
|
||||
}),
|
||||
],
|
||||
},
|
||||
{
|
||||
random: [
|
||||
new RandomObject({
|
||||
title: 'ok',
|
||||
createdAt: false,
|
||||
}),
|
||||
],
|
||||
},
|
||||
] as any[],
|
||||
{} as ArgumentMetadata,
|
||||
);
|
||||
} catch (err) {
|
||||
expect(err).to.be.instanceOf(BadRequestException);
|
||||
expect(err.getResponse().message).to.deep.equal([
|
||||
'[0] random.0.title must be a string',
|
||||
'[0] random.1.title must be a string',
|
||||
'[1] random.0.isEnabled should not be null or undefined',
|
||||
'[1] random.0.isEnabled must be a boolean value',
|
||||
'[1] random.0.createdAt must be a Date instance',
|
||||
]);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Type } from '@nestjs/common';
|
||||
import { ForwardReference, Type } from '@nestjs/common';
|
||||
import { isNil, isSymbol } from '@nestjs/common/utils/shared.utils';
|
||||
import {
|
||||
InjectorDependency,
|
||||
@@ -10,8 +10,12 @@ import { Module } from '../injector/module';
|
||||
* Returns the name of an instance
|
||||
* @param instance The instance which should get the name from
|
||||
*/
|
||||
const getInstanceName = (instance: unknown): string =>
|
||||
instance && (instance as Type<any>).name;
|
||||
const getInstanceName = (instance: unknown): string => {
|
||||
if ((instance as ForwardReference)?.forwardRef) {
|
||||
return (instance as ForwardReference).forwardRef()?.name;
|
||||
}
|
||||
return (instance as Type<any>)?.name;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the name of the dependency
|
||||
|
||||
@@ -79,6 +79,7 @@ export class NestApplication
|
||||
|
||||
protected async dispose(): Promise<void> {
|
||||
this.socketModule && (await this.socketModule.close());
|
||||
this.microservicesModule && (await this.microservicesModule.close());
|
||||
this.httpAdapter && (await this.httpAdapter.close());
|
||||
|
||||
await Promise.all(
|
||||
|
||||
@@ -248,14 +248,29 @@ export class NestFactoryStatic {
|
||||
}
|
||||
|
||||
private createAdapterProxy<T>(app: NestApplication, adapter: HttpServer): T {
|
||||
return (new Proxy(app, {
|
||||
const proxy = new Proxy(app, {
|
||||
get: (receiver: Record<string, any>, prop: string) => {
|
||||
if (!(prop in receiver) && prop in adapter) {
|
||||
return this.createExceptionZone(adapter, prop);
|
||||
return (...args: unknown[]) => {
|
||||
this.createExceptionZone(adapter, prop)(...args);
|
||||
return proxy;
|
||||
};
|
||||
}
|
||||
if (isFunction(receiver[prop])) {
|
||||
const mapToProxy = (result: unknown) =>
|
||||
result instanceof NestApplication ? proxy : result;
|
||||
|
||||
return (...args: unknown[]) => {
|
||||
const result = receiver[prop](...args);
|
||||
return result instanceof Promise
|
||||
? result.then(mapToProxy)
|
||||
: mapToProxy(result);
|
||||
};
|
||||
}
|
||||
return receiver[prop];
|
||||
},
|
||||
}) as unknown) as T;
|
||||
});
|
||||
return (proxy as unknown) as T;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/core",
|
||||
"version": "7.6.8",
|
||||
"version": "7.6.12",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@core)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -36,7 +36,7 @@
|
||||
"uuid": "8.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/common": "7.6.8"
|
||||
"@nestjs/common": "7.6.12"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^7.0.0",
|
||||
|
||||
@@ -413,7 +413,11 @@ export class RouterExecutionContext {
|
||||
const renderTemplate = this.reflectRenderTemplate(callback);
|
||||
if (renderTemplate) {
|
||||
return async <TResult, TResponse>(result: TResult, res: TResponse) => {
|
||||
await this.responseController.render(result, res, renderTemplate);
|
||||
return await this.responseController.render(
|
||||
result,
|
||||
res,
|
||||
renderTemplate,
|
||||
);
|
||||
};
|
||||
}
|
||||
if (redirectResponse && typeof redirectResponse.url === 'string') {
|
||||
|
||||
@@ -48,7 +48,7 @@ export class RouterResponseController {
|
||||
template: string,
|
||||
) {
|
||||
const result = await this.transformToResult(resultOrDeferred);
|
||||
this.applicationRef.render(response, template, result);
|
||||
return this.applicationRef.render(response, template, result);
|
||||
}
|
||||
|
||||
public async transformToResult(resultOrDeferred: any) {
|
||||
|
||||
@@ -305,7 +305,9 @@ export class ClientGrpcProxy extends ClientProxy implements ClientGrpc {
|
||||
}
|
||||
|
||||
public close() {
|
||||
this.grpcClients.forEach(client => client.close());
|
||||
this.grpcClients
|
||||
.filter(client => client && isFunction(client.close))
|
||||
.forEach(client => client.close());
|
||||
this.grpcClients = [];
|
||||
}
|
||||
|
||||
|
||||
@@ -39,11 +39,13 @@ export class MicroservicesModule {
|
||||
new InterceptorsContextCreator(container, config),
|
||||
new InterceptorsConsumer(),
|
||||
);
|
||||
|
||||
const injector = new Injector();
|
||||
this.listenersController = new ListenersController(
|
||||
this.clientsContainer,
|
||||
contextCreator,
|
||||
container,
|
||||
new Injector(),
|
||||
injector,
|
||||
ClientProxyFactory,
|
||||
exceptionFiltersContext,
|
||||
);
|
||||
@@ -90,9 +92,9 @@ export class MicroservicesModule {
|
||||
});
|
||||
}
|
||||
|
||||
public close() {
|
||||
public async close() {
|
||||
const clients = this.clientsContainer.getAllClients();
|
||||
clients.forEach(client => client.close());
|
||||
await Promise.all(clients.map(client => client.close()));
|
||||
this.clientsContainer.clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
import { DynamicModule, Module, Provider } from '@nestjs/common';
|
||||
import { ClientProxyFactory } from '../client';
|
||||
import {
|
||||
DynamicModule,
|
||||
Module,
|
||||
OnApplicationShutdown,
|
||||
Provider,
|
||||
} from '@nestjs/common';
|
||||
import { ClientProxy, ClientProxyFactory } from '../client';
|
||||
import { Closeable } from '../interfaces';
|
||||
import {
|
||||
ClientsModuleAsyncOptions,
|
||||
ClientsModuleOptions,
|
||||
@@ -12,7 +18,7 @@ export class ClientsModule {
|
||||
static register(options: ClientsModuleOptions): DynamicModule {
|
||||
const clients = (options || []).map(item => ({
|
||||
provide: item.name,
|
||||
useValue: ClientProxyFactory.create(item),
|
||||
useValue: this.assignOnAppShutdownHook(ClientProxyFactory.create(item)),
|
||||
}));
|
||||
return {
|
||||
module: ClientsModule,
|
||||
@@ -84,7 +90,14 @@ export class ClientsModule {
|
||||
) {
|
||||
return async (...args: any[]) => {
|
||||
const clientOptions = await useFactory(...args);
|
||||
return ClientProxyFactory.create(clientOptions);
|
||||
const clientProxyRef = ClientProxyFactory.create(clientOptions);
|
||||
return this.assignOnAppShutdownHook(clientProxyRef);
|
||||
};
|
||||
}
|
||||
|
||||
private static assignOnAppShutdownHook(client: ClientProxy & Closeable) {
|
||||
((client as unknown) as OnApplicationShutdown).onApplicationShutdown =
|
||||
client.close;
|
||||
return client;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,6 +149,8 @@ export class NestMicroservice
|
||||
|
||||
protected async closeApplication(): Promise<any> {
|
||||
this.socketModule && (await this.socketModule.close());
|
||||
this.microservicesModule && (await this.microservicesModule.close());
|
||||
|
||||
await super.close();
|
||||
this.setIsTerminated(true);
|
||||
}
|
||||
@@ -159,5 +161,6 @@ export class NestMicroservice
|
||||
return;
|
||||
}
|
||||
this.socketModule && (await this.socketModule.close());
|
||||
this.microservicesModule && (await this.microservicesModule.close());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/microservices",
|
||||
"version": "7.6.8",
|
||||
"version": "7.6.12",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@microservices)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -22,8 +22,8 @@
|
||||
"tslib": "2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8"
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^7.0.0",
|
||||
|
||||
@@ -124,7 +124,7 @@ describe('ClientMqtt', () => {
|
||||
subscription = client.createResponseCallback();
|
||||
|
||||
client['routingMap'].set(responseMessage.id, callback);
|
||||
subscription('channel', new Buffer(JSON.stringify(responseMessage)));
|
||||
subscription('channel', Buffer.from(JSON.stringify(responseMessage)));
|
||||
});
|
||||
it('should call callback with expected arguments', () => {
|
||||
expect(
|
||||
@@ -143,7 +143,7 @@ describe('ClientMqtt', () => {
|
||||
client['routingMap'].set(responseMessage.id, callback);
|
||||
subscription(
|
||||
'channel',
|
||||
new Buffer(
|
||||
Buffer.from(
|
||||
JSON.stringify({
|
||||
...responseMessage,
|
||||
isDisposed: true,
|
||||
@@ -169,7 +169,7 @@ describe('ClientMqtt', () => {
|
||||
subscription = client.createResponseCallback();
|
||||
|
||||
client['routingMap'].set('3', callback);
|
||||
subscription('channel', new Buffer(JSON.stringify(responseMessage)));
|
||||
subscription('channel', Buffer.from(JSON.stringify(responseMessage)));
|
||||
});
|
||||
|
||||
it('should not call callback', () => {
|
||||
|
||||
@@ -128,7 +128,7 @@ describe('ClientRedis', () => {
|
||||
|
||||
subscription = client.createResponseCallback();
|
||||
client['routingMap'].set(responseMessage.id, callback);
|
||||
subscription('channel', new Buffer(JSON.stringify(responseMessage)));
|
||||
subscription('channel', Buffer.from(JSON.stringify(responseMessage)));
|
||||
});
|
||||
it('should call callback with expected arguments', () => {
|
||||
expect(
|
||||
@@ -146,7 +146,7 @@ describe('ClientRedis', () => {
|
||||
client['routingMap'].set(responseMessage.id, callback);
|
||||
subscription(
|
||||
'channel',
|
||||
new Buffer(
|
||||
Buffer.from(
|
||||
JSON.stringify({
|
||||
...responseMessage,
|
||||
isDisposed: responseMessage.response,
|
||||
@@ -170,7 +170,7 @@ describe('ClientRedis', () => {
|
||||
beforeEach(() => {
|
||||
callback = sinon.spy();
|
||||
subscription = client.createResponseCallback();
|
||||
subscription('channel', new Buffer(JSON.stringify(responseMessage)));
|
||||
subscription('channel', Buffer.from(JSON.stringify(responseMessage)));
|
||||
});
|
||||
|
||||
it('should not call callback', () => {
|
||||
@@ -336,4 +336,4 @@ describe('ClientRedis', () => {
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -2,9 +2,9 @@ import { DynamicModule, FactoryProvider, Injectable } from '@nestjs/common';
|
||||
import { expect } from 'chai';
|
||||
import * as sinon from 'sinon';
|
||||
import { ClientProxyFactory } from '../../client';
|
||||
import { ClientsModule, ClientsModuleOptionsFactory } from '../../module';
|
||||
import { ClientOptions } from '../../interfaces';
|
||||
import { Transport } from '../../enums';
|
||||
import { ClientOptions } from '../../interfaces';
|
||||
import { ClientsModule, ClientsModuleOptionsFactory } from '../../module';
|
||||
|
||||
describe('ClientsModule', () => {
|
||||
let dynamicModule: DynamicModule;
|
||||
@@ -24,7 +24,9 @@ describe('ClientsModule', () => {
|
||||
expect(dynamicModule.providers).to.be.deep.eq([
|
||||
{
|
||||
provide: 'test',
|
||||
useValue: ClientProxyFactory.create({}),
|
||||
useValue: ClientsModule['assignOnAppShutdownHook'](
|
||||
ClientProxyFactory.create({}),
|
||||
),
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/platform-express",
|
||||
"version": "7.6.8",
|
||||
"version": "7.6.12",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@platform-express)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -24,8 +24,8 @@
|
||||
"tslib": "2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8"
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^7.0.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/platform-fastify",
|
||||
"version": "7.6.8",
|
||||
"version": "7.6.12",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@platform-fastify)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/platform-socket.io",
|
||||
"version": "7.6.8",
|
||||
"version": "7.6.12",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@platform-socket.io)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -32,6 +32,13 @@ export class WsAdapter extends AbstractWsAdapter {
|
||||
options?: any & { namespace?: string; server?: any },
|
||||
): any {
|
||||
const { server, ...wsOptions } = options;
|
||||
if (wsOptions?.namespace) {
|
||||
const error = new Error(
|
||||
'"WsAdapter" does not support namespaces. If you need namespaces in your project, consider using the "@nestjs/platform-socket.io" package instead.',
|
||||
);
|
||||
this.logger.error(error);
|
||||
throw error;
|
||||
}
|
||||
if (port === 0 && this.httpServer) {
|
||||
return this.bindErrorHandler(
|
||||
new wsPackage.Server({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/platform-ws",
|
||||
"version": "7.6.8",
|
||||
"version": "7.6.12",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@platform-ws)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -18,7 +18,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "2.1.0",
|
||||
"ws": "7.4.2"
|
||||
"ws": "7.4.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^7.0.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/testing",
|
||||
"version": "7.6.8",
|
||||
"version": "7.6.12",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@testing)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/websockets",
|
||||
"version": "7.6.8",
|
||||
"version": "7.6.12",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@websockets)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -16,8 +16,8 @@
|
||||
"tslib": "2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8"
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^7.0.0",
|
||||
|
||||
@@ -46,20 +46,20 @@ export class SocketModule<HttpServer = any> {
|
||||
);
|
||||
const modules = container.getModules();
|
||||
modules.forEach(({ providers }, moduleName: string) =>
|
||||
this.combineAllGateways(providers, moduleName),
|
||||
this.connectAllGateways(providers, moduleName),
|
||||
);
|
||||
}
|
||||
|
||||
public combineAllGateways(
|
||||
public connectAllGateways(
|
||||
providers: Map<string, InstanceWrapper<Injectable>>,
|
||||
moduleName: string,
|
||||
) {
|
||||
iterate(providers.values())
|
||||
.filter(wrapper => wrapper && !wrapper.isNotMetatype)
|
||||
.forEach(wrapper => this.combineGatewayAndServer(wrapper, moduleName));
|
||||
.forEach(wrapper => this.connectGatewayToServer(wrapper, moduleName));
|
||||
}
|
||||
|
||||
public combineGatewayAndServer(
|
||||
public connectGatewayToServer(
|
||||
wrapper: InstanceWrapper<Injectable>,
|
||||
moduleName: string,
|
||||
) {
|
||||
@@ -71,7 +71,7 @@ export class SocketModule<HttpServer = any> {
|
||||
if (!this.isAdapterInitialized) {
|
||||
this.initializeAdapter();
|
||||
}
|
||||
this.webSocketsController.mergeGatewayAndServer(
|
||||
this.webSocketsController.connectGatewayToServer(
|
||||
instance as NestGateway,
|
||||
metatype,
|
||||
moduleName,
|
||||
|
||||
@@ -50,7 +50,7 @@ describe('WebSocketsController', () => {
|
||||
contextCreator as any,
|
||||
);
|
||||
});
|
||||
describe('mergeGatewayAndServer', () => {
|
||||
describe('connectGatewayToServer', () => {
|
||||
let subscribeToServerEvents: sinon.SinonSpy;
|
||||
|
||||
@WebSocketGateway('test' as any)
|
||||
@@ -66,7 +66,7 @@ describe('WebSocketsController', () => {
|
||||
it('should throws "InvalidSocketPortException" when port is not a number', () => {
|
||||
Reflect.defineMetadata(PORT_METADATA, 'test', InvalidGateway);
|
||||
expect(() =>
|
||||
instance.mergeGatewayAndServer(
|
||||
instance.connectGatewayToServer(
|
||||
new InvalidGateway(),
|
||||
InvalidGateway,
|
||||
'',
|
||||
@@ -75,12 +75,12 @@ describe('WebSocketsController', () => {
|
||||
});
|
||||
it('should call "subscribeToServerEvents" with default values when metadata is empty', () => {
|
||||
const gateway = new DefaultGateway();
|
||||
instance.mergeGatewayAndServer(gateway, DefaultGateway, '');
|
||||
instance.connectGatewayToServer(gateway, DefaultGateway, '');
|
||||
expect(subscribeToServerEvents.calledWith(gateway, {}, 0, '')).to.be.true;
|
||||
});
|
||||
it('should call "subscribeToServerEvents" when metadata is valid', () => {
|
||||
const gateway = new Test();
|
||||
instance.mergeGatewayAndServer(gateway, Test, '');
|
||||
instance.connectGatewayToServer(gateway, Test, '');
|
||||
expect(
|
||||
subscribeToServerEvents.calledWith(gateway, { namespace }, port, ''),
|
||||
).to.be.true;
|
||||
@@ -370,4 +370,4 @@ describe('WebSocketsController', () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -28,7 +28,7 @@ export class WebSocketsController {
|
||||
private readonly contextCreator: WsContextCreator,
|
||||
) {}
|
||||
|
||||
public mergeGatewayAndServer(
|
||||
public connectGatewayToServer(
|
||||
instance: NestGateway,
|
||||
metatype: Type<unknown> | Function,
|
||||
moduleKey: string,
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
{
|
||||
"extends": [
|
||||
"config:base"
|
||||
],
|
||||
"labels": ["dependencies"],
|
||||
"packageRules": [
|
||||
{
|
||||
"matchDepTypes": ["devDependencies"],
|
||||
"automerge": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
11118
sample/01-cats-app/package-lock.json
generated
11118
sample/01-cats-app/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,9 +19,9 @@
|
||||
"test:e2e": "jest --config ./e2e/jest-e2e.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"class-transformer": "0.3.2",
|
||||
"class-validator": "0.13.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
@@ -31,24 +31,24 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/jest": "26.0.20",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
|
||||
11528
sample/02-gateways/package-lock.json
generated
11528
sample/02-gateways/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.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/platform-socket.io": "7.6.8",
|
||||
"@nestjs/websockets": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"@nestjs/platform-socket.io": "7.6.11",
|
||||
"@nestjs/websockets": "7.6.11",
|
||||
"class-transformer": "0.3.2",
|
||||
"class-validator": "0.13.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
@@ -37,22 +37,22 @@
|
||||
"@types/ws": "7.4.0",
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
}
|
||||
}
|
||||
|
||||
11149
sample/03-microservices/package-lock.json
generated
11149
sample/03-microservices/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.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/microservices": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/microservices": "7.6.11",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"class-transformer": "0.3.2",
|
||||
"class-validator": "0.13.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
@@ -32,23 +32,23 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/amqplib": "0.5.17",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
}
|
||||
}
|
||||
|
||||
11471
sample/04-grpc/package-lock.json
generated
11471
sample/04-grpc/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -20,12 +20,12 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@grpc/proto-loader": "0.5.6",
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/microservices": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/microservices": "7.6.11",
|
||||
"class-transformer": "0.3.2",
|
||||
"class-validator": "0.13.1",
|
||||
"grpc": "1.24.4",
|
||||
"grpc": "1.24.5",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3"
|
||||
@@ -33,23 +33,23 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"@types/ws": "7.4.0",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
}
|
||||
}
|
||||
|
||||
12157
sample/05-sql-typeorm/package-lock.json
generated
12157
sample/05-sql-typeorm/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.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"@nestjs/typeorm": "7.1.5",
|
||||
"mysql": "2.18.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3",
|
||||
"typeorm": "0.2.30"
|
||||
"typeorm": "0.2.31"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"@types/ws": "7.4.0",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
}
|
||||
}
|
||||
|
||||
11545
sample/06-mongoose/package-lock.json
generated
11545
sample/06-mongoose/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.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/mongoose": "7.2.2",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"mongoose": "5.11.14",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/mongoose": "7.2.3",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"mongoose": "5.11.15",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3"
|
||||
@@ -32,23 +32,23 @@
|
||||
"@types/mongoose": "5.10.3",
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"@types/ws": "7.4.0",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
}
|
||||
}
|
||||
|
||||
11334
sample/07-sequelize/package-lock.json
generated
11334
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.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"@nestjs/sequelize": "0.2.0",
|
||||
"mysql2": "2.2.5",
|
||||
"reflect-metadata": "0.1.13",
|
||||
@@ -29,29 +29,29 @@
|
||||
"rxjs": "6.6.3",
|
||||
"sequelize": "6.5.0",
|
||||
"sequelize-typescript": "2.0.0",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/sequelize": "4.28.9",
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"@types/ws": "7.4.0",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
}
|
||||
}
|
||||
|
||||
7161
sample/08-webpack/package-lock.json
generated
7161
sample/08-webpack/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -11,27 +11,27 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.6.3",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@types/node": "14.14.22",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@types/node": "14.14.25",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"start-server-webpack-plugin": "2.2.5",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"webpack": "5.19.0",
|
||||
"webpack-cli": "4.4.0",
|
||||
"webpack": "5.21.2",
|
||||
"webpack-cli": "4.5.0",
|
||||
"webpack-node-externals": "2.5.2"
|
||||
}
|
||||
}
|
||||
|
||||
3974
sample/09-babel-example/package-lock.json
generated
3974
sample/09-babel-example/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -13,24 +13,24 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/microservices": "7.6.8",
|
||||
"@nestjs/websockets": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"@nestjs/microservices": "7.6.11",
|
||||
"@nestjs/websockets": "7.6.11",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "7.12.10",
|
||||
"@babel/core": "7.12.10",
|
||||
"@babel/node": "7.12.10",
|
||||
"@babel/plugin-proposal-decorators": "7.12.12",
|
||||
"@babel/plugin-transform-runtime": "7.12.10",
|
||||
"@babel/preset-env": "7.12.11",
|
||||
"@babel/register": "7.12.10",
|
||||
"@babel/runtime": "7.12.5",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@babel/cli": "7.12.13",
|
||||
"@babel/core": "7.12.13",
|
||||
"@babel/node": "7.12.13",
|
||||
"@babel/plugin-proposal-decorators": "7.12.13",
|
||||
"@babel/plugin-transform-runtime": "7.12.15",
|
||||
"@babel/preset-env": "7.12.13",
|
||||
"@babel/register": "7.12.13",
|
||||
"@babel/runtime": "7.12.13",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"jest": "26.6.3",
|
||||
"nodemon": "2.0.7",
|
||||
"prettier": "2.2.1",
|
||||
|
||||
10630
sample/10-fastify/package-lock.json
generated
10630
sample/10-fastify/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.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-fastify": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/platform-fastify": "7.6.11",
|
||||
"class-transformer": "0.3.2",
|
||||
"class-validator": "0.13.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
@@ -31,23 +31,23 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"@types/ws": "7.4.0",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
}
|
||||
}
|
||||
|
||||
11100
sample/11-swagger/package-lock.json
generated
11100
sample/11-swagger/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.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"@nestjs/swagger": "4.7.12",
|
||||
"class-transformer": "0.3.2",
|
||||
"class-validator": "0.13.1",
|
||||
@@ -33,22 +33,22 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
}
|
||||
}
|
||||
|
||||
13426
sample/12-graphql-schema-first/package-lock.json
generated
13426
sample/12-graphql-schema-first/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,16 +19,16 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/graphql": "7.9.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"apollo-server": "2.19.2",
|
||||
"apollo-server-express": "2.19.2",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"apollo-server": "2.20.0",
|
||||
"apollo-server-express": "2.20.0",
|
||||
"class-transformer": "0.3.2",
|
||||
"class-validator": "0.13.1",
|
||||
"graphql": "15.4.0",
|
||||
"graphql-subscriptions": "1.1.0",
|
||||
"graphql": "15.5.0",
|
||||
"graphql-subscriptions": "1.2.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3"
|
||||
@@ -36,22 +36,22 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
}
|
||||
}
|
||||
|
||||
11754
sample/13-mongo-typeorm/package-lock.json
generated
11754
sample/13-mongo-typeorm/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,35 +19,35 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"@nestjs/typeorm": "7.1.5",
|
||||
"mongodb": "3.6.3",
|
||||
"mongodb": "3.6.4",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3",
|
||||
"typeorm": "0.2.30"
|
||||
"typeorm": "0.2.31"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
}
|
||||
}
|
||||
|
||||
11457
sample/14-mongoose-base/package-lock.json
generated
11457
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.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"mongoose": "5.11.14",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"mongoose": "5.11.15",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3"
|
||||
@@ -30,22 +30,22 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
}
|
||||
}
|
||||
|
||||
12189
sample/15-mvc/package-lock.json
generated
12189
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.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"hbs": "4.1.1",
|
||||
"pug": "3.0.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
@@ -31,22 +31,22 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
}
|
||||
}
|
||||
|
||||
11130
sample/16-gateways-ws/package-lock.json
generated
11130
sample/16-gateways-ws/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,38 +19,38 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/platform-ws": "7.6.8",
|
||||
"@nestjs/websockets": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"@nestjs/platform-ws": "7.6.11",
|
||||
"@nestjs/websockets": "7.6.11",
|
||||
"class-transformer": "0.3.2",
|
||||
"class-validator": "0.13.1",
|
||||
"rimraf": "3.0.2",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.6.3",
|
||||
"ws": "7.4.2"
|
||||
"ws": "7.4.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/ws": "7.4.0",
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
}
|
||||
}
|
||||
|
||||
11470
sample/17-mvc-fastify/package-lock.json
generated
11470
sample/17-mvc-fastify/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.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-fastify": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/platform-fastify": "7.6.11",
|
||||
"fastify-static": "3.4.0",
|
||||
"handlebars": "4.7.6",
|
||||
"point-of-view": "4.11.0",
|
||||
"point-of-view": "4.12.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3"
|
||||
@@ -35,22 +35,22 @@
|
||||
"@types/ws": "7.4.0",
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
}
|
||||
}
|
||||
|
||||
10206
sample/18-context/package-lock.json
generated
10206
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.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3"
|
||||
@@ -28,20 +28,20 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
}
|
||||
}
|
||||
|
||||
11163
sample/19-auth-jwt/package-lock.json
generated
11163
sample/19-auth-jwt/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -20,11 +20,11 @@
|
||||
"test:e2e": "jest --config ./e2e/jest-e2e.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/jwt": "7.2.0",
|
||||
"@nestjs/passport": "7.1.5",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"passport": "0.4.1",
|
||||
"passport-jwt": "4.0.0",
|
||||
"passport-local": "1.0.0",
|
||||
@@ -35,24 +35,24 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/jest": "26.0.20",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
|
||||
@@ -30,3 +30,58 @@ describe('AuthService', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe('validateUser', () => {
|
||||
let service: AuthService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const moduleRef: TestingModule = await Test.createTestingModule({
|
||||
imports: [
|
||||
UsersModule,
|
||||
PassportModule,
|
||||
JwtModule.register({
|
||||
secret: jwtConstants.secret,
|
||||
signOptions: { expiresIn: '60s' },
|
||||
}),
|
||||
],
|
||||
providers: [AuthService, LocalStrategy, JwtStrategy],
|
||||
}).compile();
|
||||
|
||||
service = moduleRef.get<AuthService>(AuthService);
|
||||
});
|
||||
|
||||
it('should return a user object when credentials are valid', async () => {
|
||||
const res = await service.validateUser('maria', 'guess');
|
||||
expect(res.userId).toEqual(3);
|
||||
});
|
||||
|
||||
it('should return null when credentials are invalid', async () => {
|
||||
const res = await service.validateUser('xxx', 'xxx');
|
||||
expect(res).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe('validateLogin', () => {
|
||||
let service: AuthService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const moduleRef: TestingModule = await Test.createTestingModule({
|
||||
imports: [
|
||||
UsersModule,
|
||||
PassportModule,
|
||||
JwtModule.register({
|
||||
secret: jwtConstants.secret,
|
||||
signOptions: { expiresIn: '60s' },
|
||||
}),
|
||||
],
|
||||
providers: [AuthService, LocalStrategy, JwtStrategy],
|
||||
}).compile();
|
||||
|
||||
service = moduleRef.get<AuthService>(AuthService);
|
||||
});
|
||||
|
||||
it('should return JWT object when credentials are valid', async () => {
|
||||
const res = await service.login({ username: 'maria', userId: 3 });
|
||||
expect(res.access_token).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
11084
sample/20-cache/package-lock.json
generated
11084
sample/20-cache/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.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"cache-manager-redis-store": "2.0.0",
|
||||
"class-transformer": "0.3.2",
|
||||
"class-validator": "0.13.1",
|
||||
@@ -31,22 +31,22 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
}
|
||||
}
|
||||
|
||||
10980
sample/21-serializer/package-lock.json
generated
10980
sample/21-serializer/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.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"class-transformer": "0.3.2",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
@@ -30,22 +30,22 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
}
|
||||
}
|
||||
|
||||
16771
sample/22-graphql-prisma/package-lock.json
generated
16771
sample/22-graphql-prisma/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.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/graphql": "7.9.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"apollo-server-express": "2.19.2",
|
||||
"graphql": "15.4.0",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"apollo-server-express": "2.20.0",
|
||||
"graphql": "15.5.0",
|
||||
"graphql-tools": "7.0.2",
|
||||
"prisma-binding": "2.3.16",
|
||||
"reflect-metadata": "0.1.13",
|
||||
@@ -34,22 +34,22 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
}
|
||||
}
|
||||
|
||||
13490
sample/23-graphql-code-first/package-lock.json
generated
13490
sample/23-graphql-code-first/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,39 +19,39 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/graphql": "7.9.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"apollo-server": "2.19.2",
|
||||
"apollo-server-express": "2.19.2",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"apollo-server": "2.20.0",
|
||||
"apollo-server-express": "2.20.0",
|
||||
"class-transformer": "0.3.2",
|
||||
"class-validator": "0.13.1",
|
||||
"graphql": "15.4.0",
|
||||
"graphql": "15.5.0",
|
||||
"graphql-query-complexity": "0.7.2",
|
||||
"graphql-subscriptions": "1.1.0",
|
||||
"graphql-subscriptions": "1.2.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
}
|
||||
}
|
||||
|
||||
11075
sample/24-serve-static/package-lock.json
generated
11075
sample/24-serve-static/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.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/serve-static": "2.1.4",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"class-transformer": "0.3.2",
|
||||
"class-validator": "0.13.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
@@ -32,22 +32,22 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
}
|
||||
}
|
||||
|
||||
10989
sample/25-dynamic-modules/package-lock.json
generated
10989
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.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"dotenv": "8.2.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
@@ -31,24 +31,24 @@
|
||||
"@types/dotenv": "8.2.0",
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/jest": "26.0.20",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
|
||||
11691
sample/26-queues/package-lock.json
generated
11691
sample/26-queues/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -20,10 +20,10 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/bull": "0.3.1",
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"bull": "3.20.0",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"bull": "3.20.1",
|
||||
"dotenv": "8.2.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
@@ -32,26 +32,26 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/bull": "3.15.0",
|
||||
"@types/dotenv": "8.2.0",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/jest": "26.0.20",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
|
||||
11031
sample/27-scheduling/package-lock.json
generated
11031
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.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"@nestjs/schedule": "0.4.2",
|
||||
"dotenv": "8.2.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
@@ -31,26 +31,26 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/bull": "3.15.0",
|
||||
"@types/dotenv": "8.2.0",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/jest": "26.0.20",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
|
||||
10940
sample/28-sse/package-lock.json
generated
10940
sample/28-sse/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.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3"
|
||||
@@ -29,25 +29,25 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/dotenv": "8.2.0",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/jest": "26.0.20",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
|
||||
11128
sample/29-file-upload/package-lock.json
generated
11128
sample/29-file-upload/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,9 +19,9 @@
|
||||
"test:e2e": "jest --config ./e2e/jest-e2e.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/common": "7.6.11",
|
||||
"@nestjs/core": "7.6.11",
|
||||
"@nestjs/platform-express": "7.6.11",
|
||||
"class-transformer": "0.3.2",
|
||||
"class-validator": "0.13.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
@@ -31,25 +31,25 @@
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.11",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/jest": "26.0.20",
|
||||
"@types/multer": "1.4.5",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.25",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.16",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.0",
|
||||
"@typescript-eslint/parser": "4.15.0",
|
||||
"eslint": "7.19.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.4"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
|
||||
Reference in New Issue
Block a user