Compare commits

..

6 Commits

Author SHA1 Message Date
Kamil Myśliwiec
1b6cefd845 fix(microservices): wrap handle message methods with try..catch 2019-05-30 13:40:49 +02:00
Kamil Myśliwiec
941c311395 refactor(tests): update var names in integration tests (grpc) 2019-05-30 13:09:52 +02:00
Kamil Myśliwiec
decbbba900 Merge branch 'master' into 6.3.0 2019-05-30 13:07:59 +02:00
Kamil Myśliwiec
f6db1fc9b9 Merge branch 'master' to 6.3.0 2019-05-30 11:47:17 +02:00
Kamil Myśliwiec
9b7eec326e Merge branch 'master' into 6.3.0 2019-05-30 11:45:09 +02:00
Kamil Myśliwiec
651b464939 Merge branch 'anton-alation-grpc-stream-duplex-decorator' into 6.3.0 2019-05-30 11:44:21 +02:00
313 changed files with 13348 additions and 14452 deletions

2
.github/FUNDING.yml vendored
View File

@@ -1,3 +1,3 @@
# These are supported funding model platforms
open_collective: nest
open_collective: nestjs

View File

@@ -1,56 +1,24 @@
language: node_js
node_js:
- "8"
- "10"
- "11"
cache:
directories:
- "node_modules"
git:
depth: 5
addons:
firefox: "latest"
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
before_install:
- npm i -g npm@latest
install:
- npm ci
- npm run build:dev
jobs:
include:
- state: "Test"
name: "Unit Test Node v12"
script: npm test
node_js: 12
after_success: npm run coverage
- state: "Test"
name: "Unit Test Node v10"
script: npm test
node_js: 10
- state: "Test"
name: "Unit Test Node v8"
script: npm test
node_js: 8
- state: "Test"
name: "Integration Test"
install: skip
before_install: skip
before_script: skip
addons: skip
script:
sudo service mysql stop &&
bash ./scripts/prepare.sh &&
npm run integration-test
node_js: 12
- stage: "Test"
name: "Lint"
script: npm run lint
node_js: 12
- stage: "Test"
name: "Build samples"
script: npm run build:samples
node_js: 12
script:
- npm run lint
- npm test
after_success: npm run coverage

7
CONTRIBUTING.md Executable file → Normal file
View File

@@ -29,7 +29,7 @@ Stack Overflow is a much better place to ask questions since:
To save your and our time, we will systematically close all issues that are requests for general support and redirect people to Stack Overflow.
If you would like to chat about the question in real-time, you can reach out via [our discord channel][discord].
If you would like to chat about the question in real-time, you can reach out via [our gitter channel][gitter].
## <a name="issue"></a> Found a Bug?
@@ -206,7 +206,8 @@ To ensure consistency throughout the source code, keep these rules in mind as yo
* All features or bug fixes **must be tested** by one or more specs (unit-tests).
* We follow [Google's JavaScript Style Guide][js-style-guide], but wrap all code at
**100 characters**. An automated formatter is available (`npm run format`).
**100 characters**. An automated formatter is available, see
[DEVELOPER.md](docs/DEVELOPER.md#clang-format).
## <a name="commit"></a> Commit Message Guidelines
@@ -319,7 +320,7 @@ changes to be accepted, the CLA must be signed. It's a quick process, we promise
[corporate-cla]: http://code.google.com/legal/corporate-cla-v1.0.html
[dev-doc]: https://github.com/nestjs/nest/blob/master/docs/DEVELOPER.md
[github]: https://github.com/nestjs/nest
[discord]: https://discordapp.com/invite/G7Qnnhy
[gitter]: https://gitter.im/nestjs/nestjs
[individual-cla]: http://code.google.com/legal/individual-cla-v1.0.html
[js-style-guide]: https://google.github.io/styleguide/jsguide.html
[jsfiddle]: http://jsfiddle.net

View File

@@ -7,7 +7,7 @@
[linux-image]: https://img.shields.io/travis/nestjs/nest/master.svg?label=linux
[linux-url]: https://travis-ci.org/nestjs/nest
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications, heavily inspired by <a href="https://angular.io" target="blank">Angular</a>.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
@@ -15,6 +15,7 @@
<a href="https://travis-ci.org/nestjs/nest" target="_blank"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
<a href="https://travis-ci.org/nestjs/nest" target="_blank"><img src="https://img.shields.io/travis/nestjs/nest/master.svg?label=linux" alt="Linux" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge" target="_blank"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
@@ -60,23 +61,24 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
#### Sponsors
<a href="https://www.swingdev.io" target="_blank"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="110" valign="middle" /> </a> &nbsp; <a href="https://blueanchor.io/" target="_blank"><img src="https://nestjs.com/img/blueanchor.png" width="150" valign="middle" /></a> &nbsp;
<a href="https://www.novologic.com/" target="_blank"><img src="https://nestjs.com/img/novologic.png" width="110" valign="middle" /></a> &nbsp;
<a href="https://scal.io" target="_blank"><img src="https://nestjs.com/img/scalio-logo.svg" width="80" valign="middle" /></a> &nbsp; <a href="http://angularity.io" target="_blank"><img src="http://angularity.io/media/logo.svg" height="22" valign="middle" /></a> &nbsp; <!--<a href="https://keycdn.com"><img src="https://nestjs.com/img/keycdn.svg" height="30" /></a> &nbsp;--> <a href="https://hostpresto.com" target="_blank"><img src="https://nestjs.com/img/hostpresto.png" height="24" valign="middle" /></a>
<a href="https://ever.co/" target="_blank"><img src="https://nestjs.com/img/ever-logo.png" height="14" valign="middle" /></a> &nbsp;
<a href="https://buddy.works/" target="_blank"><img src="https://nestjs.com/img/buddy-logo.svg" height="25" valign="middle" /></a> &nbsp;
<a href="https://blokt.com" target="_blank"><img src="https://nestjs.com/img/blokt-logo.png" height="25" valign="middle" /></a> &nbsp; <a href="https://genuinebee.com/" target="_blank"><img src="https://nestjs.com/img/genuinebee.svg" height="24" valign="middle" /></a> &nbsp; <a href="http://architectnow.net/" target="_blank"><img src="https://nestjs.com/img/architectnow.png" height="20" valign="middle" /></a> &nbsp; <a href="https://quander.io/" target="_blank"><img src="https://nestjs.com/img/quander.png" height="22" valign="middle" /></a> &nbsp; <a href="https://mantro.net/" target="_blank"><img src="https://nestjs.com/img/mantro-logo.svg" height="19" valign="middle" /></a> &nbsp; <a href="https://triplebyte.com/" target="_blank"><img src="https://nestjs.com/img/triplebyte.png" height="20" valign="middle" /></a> &nbsp;
<a href="https://reposit.co.uk/" target="_blank"><img src="https://nestjs.com/img/reposit-logo.png" height="18" valign="middle" /></a> &nbsp; &nbsp; <a href="https://yakaz.com/" target="_blank"><img src="https://nestjs.com/img/yakaz.png" width="70" valign="middle" /></a> &nbsp;
<a href="https://nearpod.com/" target="_blank"><img src="https://nestjs.com/img/nearpod-logo.svg" width="100" valign="middle" /></a> &nbsp;
<a href="https://clay.global/" target="_blank"><img src="https://nestjs.com/img/clay-logo.svg" width="75" valign="middle" /></a> &nbsp;
<a href="https://firesticktricks.com" target="_blank"><img src="https://nestjs.com/img/firesticktricks-logo.png" width="120" valign="middle" /></a> &nbsp;
<a href="https://www.codeguesser.co.uk" target="_blank"><img src="https://nestjs.com/img/codeguesser-logo.svg" width="120" valign="middle" /></a> &nbsp;
<a href="https://tekhattan.com" target="_blank"><img src="https://nestjs.com/img/tekhattan-logo.png" width="110" valign="middle" /></a>
<a href="https://www.swingdev.io" target="_blank"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="125" valign="middle" /> </a> &nbsp; <a href="https://blueanchor.io/" target="_blank"><img src="https://nestjs.com/img/blueanchor.png" width="180" valign="middle" /></a> &nbsp;
<a href="https://www.novologic.com/" target="_blank"><img src="https://nestjs.com/img/novologic.png" width="130" valign="middle" /></a> &nbsp;
<a href="https://scal.io" target="_blank"><img src="https://nestjs.com/img/scalio-logo.svg" width="100" valign="middle" /></a> &nbsp; <a href="http://angularity.io" target="_blank"><img src="http://angularity.io/media/logo.svg" height="26" valign="middle" /></a> &nbsp; <!--<a href="https://keycdn.com"><img src="https://nestjs.com/img/keycdn.svg" height="30" /></a> &nbsp;--> <a href="https://hostpresto.com" target="_blank"><img src="https://nestjs.com/img/hostpresto.png" height="30" valign="middle" /></a>
&nbsp; <a href="https://genuinebee.com/" target="_blank"><img src="https://nestjs.com/img/genuinebee.svg" height="36" valign="middle" /></a> &nbsp; <a href="http://architectnow.net/" target="_blank"><img src="https://nestjs.com/img/architectnow.png" height="24" valign="middle" /></a> &nbsp; <a href="https://quander.io/" target="_blank"><img src="https://nestjs.com/img/quander.png" height="28" valign="middle" /></a> &nbsp; <a href="https://mantro.net/" target="_blank"><img src="https://nestjs.com/img/mantro-logo.svg" height="20" valign="middle" /></a> &nbsp; <a href="https://triplebyte.com/" target="_blank"><img src="https://nestjs.com/img/triplebyte.png" height="30" valign="middle" /></a> &nbsp;
<a href="https://ever.co/" target="_blank"><img src="https://nestjs.com/img/ever-logo.png" height="20" valign="middle" /></a> &nbsp;
<a href="https://buddy.works/" target="_blank"><img src="https://nestjs.com/img/buddy-logo.svg" height="35" valign="middle" /></a> &nbsp;
<a href="https://blokt.com" target="_blank"><img src="https://nestjs.com/img/blokt-logo.png" height="31" valign="middle" /></a> &nbsp;
<a href="https://reposit.co.uk/" target="_blank"><img src="https://nestjs.com/img/reposit-logo.png" height="28" valign="middle" /></a> &nbsp; &nbsp; <a href="https://yakaz.com/" target="_blank"><img src="https://nestjs.com/img/yakaz.png" width="80" valign="middle" /></a> &nbsp;
<a href="https://nearpod.com/" target="_blank"><img src="https://nestjs.com/img/nearpod-logo.svg" width="120" valign="middle" /></a> &nbsp;
<a href="https://clay.global/" target="_blank"><img src="https://nestjs.com/img/clay-logo.svg" width="90" valign="middle" /></a> &nbsp;
<a href="http://xtremis.com/" target="_blank"><img src="https://nestjs.com/img/logo-xtremis.svg" width="145" valign="middle" /></a>
## Backers
<a href="https://opencollective.com/nest" target="_blank"><img src="https://opencollective.com/nest/backers.svg?width=1000"></a>
<a href="https://opencollective.com/nest" target="_blank"><img src="https://opencollective.com/nest/backers.svg?width=1600"></a>
## Stay in touch

View File

@@ -1,16 +1,117 @@
'use strict';
/**
* Load the TypeScript compiler, then load the TypeScript gulpfile which simply loads all
* the tasks. The tasks are really inside tools/gulp/tasks.
*/
const fs = require('fs');
const path = require('path');
const gulp = require('gulp');
const ts = require('gulp-typescript');
const sourcemaps = require('gulp-sourcemaps');
const clean = require('gulp-clean');
const deleteEmpty = require('delete-empty');
const projectDir = __dirname;
const tsconfigPath = path.join(projectDir, 'tools/gulp/tsconfig.json');
const packages = {
common: ts.createProject('packages/common/tsconfig.json'),
core: ts.createProject('packages/core/tsconfig.json'),
microservices: ts.createProject('packages/microservices/tsconfig.json'),
websockets: ts.createProject('packages/websockets/tsconfig.json'),
testing: ts.createProject('packages/testing/tsconfig.json'),
'platform-express': ts.createProject(
'packages/platform-express/tsconfig.json',
),
'platform-fastify': ts.createProject(
'packages/platform-fastify/tsconfig.json',
),
'platform-socket.io': ts.createProject(
'packages/platform-socket.io/tsconfig.json',
),
'platform-ws': ts.createProject('packages/platform-ws/tsconfig.json'),
};
const modules = Object.keys(packages);
const source = 'packages';
const distId = process.argv.indexOf('--dist');
const dist = distId < 0 ? source : process.argv[distId + 1];
require('ts-node').register({
project: tsconfigPath
gulp.task('default', function() {
modules.forEach(module => {
gulp.watch(
[`${source}/${module}/**/*.ts`, `${source}/${module}/*.ts`],
[module],
);
});
});
require('./tools/gulp/gulpfile');
gulp.task('copy-misc', function() {
return gulp
.src(['Readme.md', 'LICENSE', '.npmignore'])
.pipe(gulp.dest(`${source}/common`))
.pipe(gulp.dest(`${source}/core`))
.pipe(gulp.dest(`${source}/microservices`))
.pipe(gulp.dest(`${source}/websockets`))
.pipe(gulp.dest(`${source}/testing`))
.pipe(gulp.dest(`${source}/platform-fastify`))
.pipe(gulp.dest(`${source}/platform-express`))
.pipe(gulp.dest(`${source}/platform-ws`))
.pipe(gulp.dest(`${source}/platform-socket.io`));
});
gulp.task('clean:output', function() {
return gulp
.src(
[`${source}/**/*.js`, `${source}/**/*.d.ts`, `${source}/**/*.js.map`],
{
read: false,
},
)
.pipe(clean());
});
gulp.task('clean:dirs', function(done) {
deleteEmpty.sync(`${source}/`);
done();
});
gulp.task('clean:bundle', gulp.series('clean:output', 'clean:dirs'));
modules.forEach(module => {
gulp.task(module, () => {
return packages[module]
.src()
.pipe(packages[module]())
.pipe(gulp.dest(`${dist}/${module}`));
});
});
modules.forEach(module => {
gulp.task(module + ':dev', () => {
return packages[module]
.src()
.pipe(sourcemaps.init())
.pipe(packages[module]())
.pipe(
sourcemaps.mapSources(sourcePath => './' + sourcePath.split('/').pop()),
)
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest(`${dist}/${module}`));
});
});
gulp.task('common:dev', gulp.series(modules.map(module => module + ':dev')));
gulp.task('build', gulp.series(modules));
gulp.task('build:dev', gulp.series('common:dev'));
function getFolders(dir) {
return fs.readdirSync(dir).filter(function(file) {
return fs.statSync(path.join(dir, file)).isDirectory();
});
}
gulp.task('move', function() {
const getDirs = base => getFolders(base).map(path => `${base}/${path}`);
const examplesDirs = getDirs('sample');
const integrationDirs = getDirs('integration');
const directories = examplesDirs.concat(integrationDirs);
let stream = gulp.src(['node_modules/@nestjs/**/*']);
directories.forEach(dir => {
stream = stream.pipe(gulp.dest(dir + '/node_modules/@nestjs'));
});
return stream;
});

View File

@@ -23,7 +23,7 @@ services:
- "9001:9001"
restart: always
mysql:
image: mysql:5.7.27
image: mysql:5.7.26
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test

File diff suppressed because it is too large Load Diff

View File

@@ -9,21 +9,21 @@
"start:prod": "node dist/main.js"
},
"dependencies": {
"@nestjs/common": "6.5.3",
"@nestjs/core": "6.5.3",
"@nestjs/graphql": "6.4.2",
"apollo-server-express": "2.8.1",
"graphql": "14.5.0",
"graphql-tools": "4.0.5",
"@nestjs/common": "6.2.4",
"@nestjs/core": "6.2.4",
"@nestjs/graphql": "6.2.1",
"apollo-server-express": "2.5.0",
"graphql": "14.3.1",
"graphql-tools": "4.0.4",
"reflect-metadata": "0.1.13",
"rxjs": "6.5.2",
"subscriptions-transport-ws": "0.9.16",
"typescript": "3.5.3",
"ws": "7.1.2"
"typescript": "3.5.1",
"ws": "7.0.0"
},
"devDependencies": {
"@types/node": "7.10.7",
"ts-node": "8.3.0",
"tslint": "5.19.0"
"@types/node": "7.10.6",
"ts-node": "8.2.0",
"tslint": "5.16.0"
}
}

View File

@@ -10,8 +10,7 @@
"target": "es6",
"sourceMap": true,
"allowJs": true,
"outDir": "./dist",
"skipLibCheck": true
"outDir": "./dist"
},
"include": [
"src/**/*"

View File

@@ -5,58 +5,58 @@
"requires": true,
"dependencies": {
"@nestjs/common": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.2.4.tgz",
"integrity": "sha512-YZvJ6/S7yVQZK+9rupCzMCg4tpbc9DyVvLoTx0NBDqExTCUNcNEcCtn0AZrO/hLqbeYODnJwGE2NxkH1R/qw+w==",
"requires": {
"axios": "0.19.0",
"axios": "0.18.0",
"cli-color": "1.4.0",
"uuid": "3.3.2"
}
},
"@nestjs/core": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.2.4.tgz",
"integrity": "sha512-aYKi3QGKmpxF6w32STAcobIqOHFqSUXrU8nF+Y9dOlStRkXFBTuVchsoJk94sY+3y4SJAlHH4Q/8R4yFaixrug==",
"requires": {
"@nuxtjs/opencollective": "0.2.2",
"@nuxtjs/opencollective": "0.2.1",
"fast-safe-stringify": "2.0.6",
"iterare": "1.2.0",
"iterare": "1.1.2",
"object-hash": "1.3.1",
"optional": "0.1.4",
"uuid": "3.3.2"
}
},
"@nestjs/microservices": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.5.3.tgz",
"integrity": "sha512-T9zZf61myahenI4c0qhcYnhnx49L+zL9+8W6fc+LPTarbt1HJDu6iyj6fh2BzewakwNLJRyGMJ9YCYlXhFuvlA==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.2.4.tgz",
"integrity": "sha512-aVXLPPTL2nUf4EVBcuqbCRFN62BDhFjxSy49BIpMTDqbaSOZPgfhfwyotDI6sAG0cJq4zWvU/OCC2/NkLq9Ryg==",
"requires": {
"iterare": "1.2.0",
"iterare": "1.1.2",
"json-socket": "0.3.0",
"optional": "0.1.4"
}
},
"@nestjs/testing": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.5.3.tgz",
"integrity": "sha512-W8tPhkNVhmX+jaDu4R7WUOtIl0PK3ZDso434rEm/b1+S6ZRgAKwNVHWM/rwIuTi5+erPTEULtTsZgrXFrzC1sA==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.2.4.tgz",
"integrity": "sha512-l5uxeNz+CksHaVcHxSlpo0vyJxvZP7BM1vS6BKuqtn/lNlIITAkdWmCVfBldN8Okayj3B2yhc04Zq6imU3aX9w==",
"requires": {
"optional": "0.1.4"
}
},
"@nestjs/websockets": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.5.3.tgz",
"integrity": "sha512-YrCvmLHTW0OBusTiUOPrG0PNrw/3Gatty/bh3ro5cEoiovcaJxGSMsTC+JSVXqPwRJjEtoHMCr5Qje2rAepIzQ==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.2.4.tgz",
"integrity": "sha512-3cpEZz/uTTHiMXX6d+lXH9Wg7Rtla36Oc3JTmQtuGc1KlAIs3wzJRO/qU/LfLuYrNeqAAFVq8EHW3DkjPFxXjg==",
"requires": {
"iterare": "1.2.0"
"iterare": "1.1.2"
}
},
"@nuxtjs/opencollective": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.2.2.tgz",
"integrity": "sha512-69gFVDs7mJfNjv9Zs5DFVD+pvBW+k1TaHSOqUWqAyTTfLcKI/EMYQgvEvziRd+zAFtUOoye6MfWh0qvinGISPw==",
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.2.1.tgz",
"integrity": "sha512-pzSib8NKquaTt/ns5Cc2G0BGRVJXaD+p1qfF6q7vNIMvRysorn/VF3y7gAuQpcxfF7wBbGE+dXjhIieWOUsWSw==",
"requires": {
"chalk": "^2.4.1",
"consola": "^2.3.0",
@@ -64,25 +64,20 @@
}
},
"@types/node": {
"version": "7.10.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.7.tgz",
"integrity": "sha512-4I7+hXKyq7e1deuzX9udu0hPIYqSSkdKXtjow6fMnQ3OR9qkxIErGHbGY08YrfZJrCS1ajK8lOuzd0k3n2WM4A==",
"version": "7.10.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.6.tgz",
"integrity": "sha512-d0BOAicT0tEdbdVQlLGOVul1kvg6YvbaADRCThGCz5NJ0e9r00SofcR1x69hmlCyrHuB6jd4cKzL9bMLjPnpAA==",
"dev": true
},
"@types/validator": {
"version": "10.11.2",
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.2.tgz",
"integrity": "sha512-k/ju1RsdP5ACFUWebqsyEy0avP5uNJCs2p3pmTHzOZdd4gMSAJTq7iUEHFY3tt3emBrPTm6oGvfZ4SzcqOgLPQ=="
},
"abstract-logging": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/abstract-logging/-/abstract-logging-1.0.0.tgz",
"integrity": "sha1-i33q/TEFWbwo93ck3RuzAXcnjBs="
},
"ajv": {
"version": "6.10.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz",
"integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==",
"version": "6.10.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz",
"integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==",
"requires": {
"fast-deep-equal": "^2.0.1",
"fast-json-stable-stringify": "^2.0.0",
@@ -139,19 +134,19 @@
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
}
}
},
"axios": {
"version": "0.19.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz",
"integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==",
"version": "0.18.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz",
"integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=",
"requires": {
"follow-redirects": "1.5.10",
"is-buffer": "^2.0.2"
"follow-redirects": "^1.3.0",
"is-buffer": "^1.1.5"
}
},
"buffer-from": {
@@ -176,13 +171,12 @@
"integrity": "sha512-qsP+0xoavpOlJHuYsQJsN58HXSl8Jvveo+T37rEvCEeRfMWoytAyR0Ua/YsFgpM6AZYZ/og2PJwArwzJl1aXtQ=="
},
"class-validator": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.0.tgz",
"integrity": "sha512-RvjxRlvoCvM/ojUq11j78ISpReGdBoMErdmDk1e27aQZK6ppSXq751UE6jB9JI7ayEnL6Nnmllzn/HXVSu3dmg==",
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.9.1.tgz",
"integrity": "sha512-3wApflrd3ywVZyx4jaasGoFt8pmo4aGLPPAEKCKCsTRWVGPilahD88q3jQjRQwja50rl9a7rsP5LAxJYwGK8/Q==",
"requires": {
"@types/validator": "10.11.2",
"google-libphonenumber": "^3.1.6",
"validator": "11.1.0"
"validator": "10.4.0"
}
},
"cli-color": {
@@ -227,9 +221,9 @@
"dev": true
},
"consola": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.9.0.tgz",
"integrity": "sha512-34Iue+LRcWbndFIfZc5boNizWlsrRjqIBJZTe591vImgbnq7nx2EzlrLtANj9TH2Fxm7puFJBJAOk5BhvZOddQ=="
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.6.2.tgz",
"integrity": "sha512-GNJhwvF4bJ8eiAlyB8r4WNM8kBqkl+y4DvMehMbyywoJiv37N0M6/xrKqrrZw/5maZA+UagQV8UZ+XBeuGMzUg=="
},
"cookiejar": {
"version": "2.1.2",
@@ -244,26 +238,26 @@
"dev": true
},
"d": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
"integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
"integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
"requires": {
"es5-ext": "^0.10.50",
"type": "^1.0.1"
"es5-ext": "^0.10.9"
}
},
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
},
"deepmerge": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.0.0.tgz",
"integrity": "sha512-YZ1rOP5+kHor4hMAH+HRQnBQHg+wvS1un1hAOuIcxcBy0hzcUf6Jg2a1w65kpoOUnurOfZbERwjI1TfZxNjcww=="
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-3.2.0.tgz",
"integrity": "sha512-6+LuZGU7QCNUnAJyX8cIrlzoEgggTM6B7mm+znKOX4t5ltluT9KLjN6g61ECMS0LTsLW7yDpNoxhix5FZcrIow=="
},
"delayed-stream": {
"version": "1.0.0",
@@ -307,13 +301,13 @@
}
},
"es6-weak-map": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz",
"integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==",
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz",
"integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=",
"requires": {
"d": "1",
"es5-ext": "^0.10.46",
"es6-iterator": "^2.0.3",
"es5-ext": "^0.10.14",
"es6-iterator": "^2.0.1",
"es6-symbol": "^3.1.1"
}
},
@@ -353,12 +347,12 @@
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
},
"fast-json-stringify": {
"version": "1.15.4",
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.15.4.tgz",
"integrity": "sha512-lsGTxL0OIGjGSUXgWUOdSgjCL/xMyMvMudfGN3D1zOLEv44fYZ1ZXmMyCON5XdpaiZN6nCXmU7GQg7fbXfPG4g==",
"version": "1.15.2",
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.15.2.tgz",
"integrity": "sha512-iKo79rW7J2LRexme54j33BZBmFmGtqwYL6fmAxnU5VOZEJCUFir5g5iCmt5HXtxUXvI2hnmpGku+cduJpMCvwQ==",
"requires": {
"ajv": "^6.8.1",
"deepmerge": "^4.0.0"
"deepmerge": "^3.0.0"
}
},
"fast-redact": {
@@ -372,19 +366,19 @@
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
},
"fastify": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.7.1.tgz",
"integrity": "sha512-ScKPXD84lkdCgz7q0zjyBr1aLxKbXRt9HYL3XIt/L8ZD2f3fAcsLEyQ2/rHxLUzLGjPlEjIvprWUL3RZvlLRLw==",
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.4.1.tgz",
"integrity": "sha512-AVzNO8/gg6og8T/s7M3UUQjvI4AIJNm8CSHm+kf3S0mGoJfWpfRuTD1pRTQ5tM+0pJpybyT5nDVTy97/oTD1+w==",
"requires": {
"abstract-logging": "^1.0.0",
"ajv": "^6.10.2",
"ajv": "^6.9.2",
"avvio": "^6.1.1",
"fast-json-stringify": "^1.15.0",
"find-my-way": "^2.0.0",
"flatstr": "^1.0.12",
"light-my-request": "^3.4.1",
"light-my-request": "^3.2.0",
"middie": "^4.0.1",
"pino": "^5.13.1",
"pino": "^5.11.1",
"proxy-addr": "^2.0.4",
"readable-stream": "^3.1.1",
"rfdc": "^1.1.2",
@@ -401,9 +395,9 @@
}
},
"find-my-way": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-2.1.0.tgz",
"integrity": "sha512-Hdx6ctcrzkZH5y9EREHtXryXAgc5Bc8z5Cvoa61y9kaoYj2KU4yXD6h8b6u0NUkYPVmQQeRdf0AtG1kQxQ+ukQ==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-2.0.1.tgz",
"integrity": "sha512-c+YnWk4LKcWSNu743wfoqNOZTYQ6kZ/kzZCjALGblLpzbEAv3INakGMZ1K/by+Wmf/NP3+3LpOQMOFw6/q52wQ==",
"requires": {
"fast-decode-uri-component": "^1.0.0",
"safe-regex2": "^2.0.0",
@@ -416,11 +410,26 @@
"integrity": "sha512-4zPxDyhCyiN2wIAtSLI6gc82/EjqZc1onI4Mz/l0pWrAlsSfYH/2ZIcU+e3oA2wDwbzIWNKwa23F8rh6+DRWkw=="
},
"follow-redirects": {
"version": "1.5.10",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
"integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz",
"integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==",
"requires": {
"debug": "=3.1.0"
"debug": "^3.2.6"
},
"dependencies": {
"debug": {
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "^2.1.1"
}
},
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
}
}
},
"form-data": {
@@ -446,9 +455,9 @@
"integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
},
"google-libphonenumber": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.3.tgz",
"integrity": "sha512-8n4JyRptifaIRlHANKRlfqLR8fANm7+Q+1qvDuUsUeStSLtLGTVsZWe1llWDfgWTm1y07cEUyiRuNIv6cs2ovg=="
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.2.tgz",
"integrity": "sha512-ubjGeosYPeusjYbUHy76lCniGTTI0k1rIFc+uKBX+jHQLDmWOSUtlFUxaeoLJ+Y+PAMM6dWp+C1HjHx5BI8kEw=="
},
"has-flag": {
"version": "3.0.0",
@@ -466,9 +475,9 @@
"integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA=="
},
"is-buffer": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
"integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw=="
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
},
"is-promise": {
"version": "2.1.0",
@@ -476,9 +485,9 @@
"integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o="
},
"iterare": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.0.tgz",
"integrity": "sha512-RxMV9p/UzdK0Iplnd8mVgRvNdXlsTOiuDrqMRnDi3wIhbT+JP4xDquAX9ay13R3CH72NBzQ91KWe0+C168QAyQ=="
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/iterare/-/iterare-1.1.2.tgz",
"integrity": "sha512-25rVYmj/dDvTR6zOa9jY1Ihd6USLa0J508Ub2iy7Aga+xu9JMbjDds2Uh03ReDGbva/YN3s3Ybi+Do0nOX6wAg=="
},
"json-schema-traverse": {
"version": "0.4.1",
@@ -491,9 +500,9 @@
"integrity": "sha512-jc8ZbUnYIWdxERFWQKVgwSLkGSe+kyzvmYxwNaRgx/c8NNyuHes4UHnPM3LUrAFXUx1BhNJ94n1h/KCRlbvV0g=="
},
"light-my-request": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-3.4.1.tgz",
"integrity": "sha512-E1zMvRWjqsaCS60dTkD7c//xKV1KOFD2zo92Ru3o3e95lCfQSDCC9aS8MZm1V+zXaA/SeKDwK9gvrfaCseTusg==",
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-3.3.0.tgz",
"integrity": "sha512-dLtwhjzbuHJ+KMMUBSlVid6Iqxx+KKvULWLnBD06WMgPHxiPkEh1cVyj+Xc8HGU64hULlSw/sZVCdFsvjNQeNA==",
"requires": {
"ajv": "^6.8.1",
"readable-stream": "^3.1.1"
@@ -567,7 +576,8 @@
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"dev": true
},
"next-tick": {
"version": "1.0.0",
@@ -595,22 +605,22 @@
"integrity": "sha512-ZOtfhPttCrqp2M1PBBH4X13XlvnfhIwD7yCLx+GoGoXRPQyxGOTdQMpIzPSPKXAJT/JQrdfFrgdJOyAzvgpQ9A=="
},
"pino": {
"version": "5.13.1",
"resolved": "https://registry.npmjs.org/pino/-/pino-5.13.1.tgz",
"integrity": "sha512-IxusG28L0g50uuf21kZELypdFOeNrJ/kRhktdi7LtdZQWCxLliMxG5iOrGUQ/ng7MiJ4XqXi/hfyXwZeKc1MxA==",
"version": "5.12.5",
"resolved": "https://registry.npmjs.org/pino/-/pino-5.12.5.tgz",
"integrity": "sha512-Y493vt9ci7Jez3WZ/aUArijTQZXbHgWvDB3TMZlTu731p2kan/qyJk5k46aveEmYFnTlEommc+PSncUcuiMrBg==",
"requires": {
"fast-redact": "^1.4.4",
"fast-safe-stringify": "^2.0.6",
"flatstr": "^1.0.9",
"pino-std-serializers": "^2.3.0",
"quick-format-unescaped": "^3.0.2",
"sonic-boom": "^0.7.5"
"sonic-boom": "^0.7.3"
}
},
"pino-std-serializers": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-2.4.2.tgz",
"integrity": "sha512-WaL504dO8eGs+vrK+j4BuQQq6GLKeCCcHaMB2ItygzVURcL1CycwNEUHTD/lHFHs/NL5qAz2UKrjYWXKSf4aMQ=="
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-2.4.1.tgz",
"integrity": "sha512-v/JglhO0aFcvkMV9VUxhgyuJo8K1si857Ww86Tx8H2cjC/kp0ndzzcF6Vbxr4RgKFYJdHfLVpEuD55znMZuxnw=="
},
"process-nextick-args": {
"version": "2.0.0",
@@ -644,9 +654,9 @@
"integrity": "sha512-FXTaCkwvpIlkdKeGDNgcq07SXWS383noQUuZjvdE1QcTt+eLuqof6/BDiEPqB59FWLie/l91+HtlJSw7iCViSA=="
},
"readable-stream": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz",
"integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==",
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
"integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
@@ -705,11 +715,11 @@
"integrity": "sha512-TcZvGMMy9vodEFSse30lWinkj+JgOBvPn8wRItpQRSayhc+4ssDs335uklkfvQQJgL/WvmHLVj4Ycv2s7QCQMg=="
},
"sonic-boom": {
"version": "0.7.5",
"resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.5.tgz",
"integrity": "sha512-1pKrnAV6RfvntPnarY71tpthFTM3pWZWWQdghZY8ARjtDPGzG/inxqSuRwQY/7V1woUjfyxPb437zn4p5phgnQ==",
"version": "0.7.4",
"resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.4.tgz",
"integrity": "sha512-8JRAJg0RxZtFLQMxolwETvWd2JSlH3ZGo/Z4xPxMbpqF14xCgVYPVeFCFOR3zyr3pcfG82QDVj6537Sx5ZWdNw==",
"requires": {
"flatstr": "^1.0.12"
"flatstr": "^1.0.9"
}
},
"source-map": {
@@ -819,9 +829,9 @@
"integrity": "sha512-k/vdHz+bFALjmik0URLWBYNuO0hCABTL5dullbZBXvFDdlL8RrKaeLR6YuHfX+6ZXOLkHw+HpNLCUA7DtLMQmg=="
},
"ts-node": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz",
"integrity": "sha512-dyNS/RqyVTDcmNM4NIBAeDMpsAdaQ+ojdf0GOLqE6nwJOgzEkdRNzJywhDfwnuvB10oa6NLVG1rUJQCpRN7qoQ==",
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.2.0.tgz",
"integrity": "sha512-m8XQwUurkbYqXrKqr3WHCW310utRNvV5OnRVeISeea7LoCWVcdfeB/Ntl8JYWFh+WRoUAdBgESrzKochQt7sMw==",
"dev": true,
"requires": {
"arg": "^4.1.0",
@@ -836,15 +846,10 @@
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
},
"type": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/type/-/type-1.0.1.tgz",
"integrity": "sha512-MAM5dBMJCJNKs9E7JXo4CXRAansRfG0nlJxW7Wf6GZzSOvH31zClSaHdIMWLehe/EGMBkqeC55rrkaOr5Oo7Nw=="
},
"typescript": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz",
"integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g=="
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.1.tgz",
"integrity": "sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw=="
},
"uri-js": {
"version": "4.2.2",
@@ -865,9 +870,9 @@
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
},
"validator": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-11.1.0.tgz",
"integrity": "sha512-qiQ5ktdO7CD6C/5/mYV4jku/7qnqzjrxb3C/Q5wR3vGGinHTgJZN/TdFT3ZX4vXhX2R1PXx42fB1cn5W+uJ4lg=="
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-10.4.0.tgz",
"integrity": "sha512-Q/wBy3LB1uOyssgNlXSRmaf22NxjvDNZM2MtIQ4jaEOAB61xsh1TQxsq1CgzUMBV1lDrVMogIh8GjG1DYW0zLg=="
},
"yn": {
"version": "3.1.0",

View File

@@ -7,21 +7,21 @@
"start": "ts-node src/main"
},
"dependencies": {
"@nestjs/common": "6.5.3",
"@nestjs/core": "6.5.3",
"@nestjs/microservices": "6.5.3",
"@nestjs/testing": "6.5.3",
"@nestjs/websockets": "6.5.3",
"@nestjs/common": "6.2.4",
"@nestjs/core": "6.2.4",
"@nestjs/microservices": "6.2.4",
"@nestjs/testing": "6.2.4",
"@nestjs/websockets": "6.2.4",
"class-transformer": "0.2.3",
"class-validator": "0.10.0",
"fastify": "2.7.1",
"class-validator": "0.9.1",
"fastify": "2.4.1",
"reflect-metadata": "0.1.13",
"rxjs": "6.5.2",
"typescript": "3.5.3"
"typescript": "3.5.1"
},
"devDependencies": {
"@types/node": "7.10.7",
"@types/node": "7.10.6",
"supertest": "4.0.2",
"ts-node": "8.3.0"
"ts-node": "8.2.0"
}
}

View File

@@ -1,9 +1,9 @@
import { Injectable, OnApplicationShutdown } from '@nestjs/common';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import { spawnSync } from 'child_process';
import { join } from 'path';
import * as Sinon from 'sinon';
import { Injectable, OnApplicationShutdown, ShutdownSignal } from '@nestjs/common';
import { spawn, spawnSync } from 'child_process';
import { join } from 'path';
@Injectable()
class TestInjectable implements OnApplicationShutdown {
@@ -23,41 +23,26 @@ describe('OnApplicationShutdown', () => {
});
it('should call onApplicationShutdown if any shutdown signal gets invoked', done => {
const result = spawnSync('ts-node', [
join(__dirname, '../src/main.ts'),
'SIGHUP',
]);
expect(result.stdout.toString().trim() === 'Signal SIGHUP').to.be.true;
const result = spawnSync('ts-node', [join(__dirname, '../src/main.ts'), 'SIGHUP']);
expect(result.stdout.toString().trim()).to.be.eq('Signal SIGHUP');
done();
}).timeout(5000);
});
it('should call onApplicationShutdown if a specific shutdown signal gets invoked', done => {
const result = spawnSync('ts-node', [
join(__dirname, '../src/main.ts'),
'SIGINT',
'SIGINT',
]);
const result = spawnSync('ts-node', [join(__dirname, '../src/main.ts'), 'SIGINT', 'SIGINT']);
expect(result.stdout.toString().trim()).to.be.eq('Signal SIGINT');
done();
}).timeout(5000);
});
it('should ignore system signals which are not specified', done => {
const result = spawnSync('ts-node', [
join(__dirname, '../src/main.ts'),
'SIGINT',
'SIGHUP',
]);
const result = spawnSync('ts-node', [join(__dirname, '../src/main.ts'), 'SIGINT', 'SIGHUP']);
expect(result.stdout.toString().trim()).to.be.eq('');
done();
}).timeout(5000);
});
it('should ignore system signals if "enableShutdownHooks" was not called', done => {
const result = spawnSync('ts-node', [
join(__dirname, '../src/main.ts'),
'SIGINT',
'NONE',
]);
const result = spawnSync('ts-node', [join(__dirname, '../src/main.ts'), 'SIGINT', 'NONE']);
expect(result.stdout.toString().trim()).to.be.eq('');
done();
}).timeout(5000);
});
});

View File

@@ -5,32 +5,32 @@
"requires": true,
"dependencies": {
"@nestjs/common": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.2.4.tgz",
"integrity": "sha512-YZvJ6/S7yVQZK+9rupCzMCg4tpbc9DyVvLoTx0NBDqExTCUNcNEcCtn0AZrO/hLqbeYODnJwGE2NxkH1R/qw+w==",
"requires": {
"axios": "0.19.0",
"axios": "0.18.0",
"cli-color": "1.4.0",
"uuid": "3.3.2"
}
},
"@nestjs/core": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.2.4.tgz",
"integrity": "sha512-aYKi3QGKmpxF6w32STAcobIqOHFqSUXrU8nF+Y9dOlStRkXFBTuVchsoJk94sY+3y4SJAlHH4Q/8R4yFaixrug==",
"requires": {
"@nuxtjs/opencollective": "0.2.2",
"@nuxtjs/opencollective": "0.2.1",
"fast-safe-stringify": "2.0.6",
"iterare": "1.2.0",
"iterare": "1.1.2",
"object-hash": "1.3.1",
"optional": "0.1.4",
"uuid": "3.3.2"
}
},
"@nuxtjs/opencollective": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.2.2.tgz",
"integrity": "sha512-69gFVDs7mJfNjv9Zs5DFVD+pvBW+k1TaHSOqUWqAyTTfLcKI/EMYQgvEvziRd+zAFtUOoye6MfWh0qvinGISPw==",
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.2.1.tgz",
"integrity": "sha512-pzSib8NKquaTt/ns5Cc2G0BGRVJXaD+p1qfF6q7vNIMvRysorn/VF3y7gAuQpcxfF7wBbGE+dXjhIieWOUsWSw==",
"requires": {
"chalk": "^2.4.1",
"consola": "^2.3.0",
@@ -38,16 +38,11 @@
}
},
"@types/node": {
"version": "7.10.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.7.tgz",
"integrity": "sha512-4I7+hXKyq7e1deuzX9udu0hPIYqSSkdKXtjow6fMnQ3OR9qkxIErGHbGY08YrfZJrCS1ajK8lOuzd0k3n2WM4A==",
"version": "7.10.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.6.tgz",
"integrity": "sha512-d0BOAicT0tEdbdVQlLGOVul1kvg6YvbaADRCThGCz5NJ0e9r00SofcR1x69hmlCyrHuB6jd4cKzL9bMLjPnpAA==",
"dev": true
},
"@types/validator": {
"version": "10.11.2",
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.2.tgz",
"integrity": "sha512-k/ju1RsdP5ACFUWebqsyEy0avP5uNJCs2p3pmTHzOZdd4gMSAJTq7iUEHFY3tt3emBrPTm6oGvfZ4SzcqOgLPQ=="
},
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
@@ -74,12 +69,12 @@
"dev": true
},
"axios": {
"version": "0.19.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz",
"integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==",
"version": "0.18.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz",
"integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=",
"requires": {
"follow-redirects": "1.5.10",
"is-buffer": "^2.0.2"
"follow-redirects": "^1.3.0",
"is-buffer": "^1.1.5"
}
},
"buffer-from": {
@@ -104,13 +99,12 @@
"integrity": "sha512-qsP+0xoavpOlJHuYsQJsN58HXSl8Jvveo+T37rEvCEeRfMWoytAyR0Ua/YsFgpM6AZYZ/og2PJwArwzJl1aXtQ=="
},
"class-validator": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.0.tgz",
"integrity": "sha512-RvjxRlvoCvM/ojUq11j78ISpReGdBoMErdmDk1e27aQZK6ppSXq751UE6jB9JI7ayEnL6Nnmllzn/HXVSu3dmg==",
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.9.1.tgz",
"integrity": "sha512-3wApflrd3ywVZyx4jaasGoFt8pmo4aGLPPAEKCKCsTRWVGPilahD88q3jQjRQwja50rl9a7rsP5LAxJYwGK8/Q==",
"requires": {
"@types/validator": "10.11.2",
"google-libphonenumber": "^3.1.6",
"validator": "11.1.0"
"validator": "10.4.0"
}
},
"cli-color": {
@@ -155,9 +149,9 @@
"dev": true
},
"consola": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.9.0.tgz",
"integrity": "sha512-34Iue+LRcWbndFIfZc5boNizWlsrRjqIBJZTe591vImgbnq7nx2EzlrLtANj9TH2Fxm7puFJBJAOk5BhvZOddQ=="
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.6.2.tgz",
"integrity": "sha512-GNJhwvF4bJ8eiAlyB8r4WNM8kBqkl+y4DvMehMbyywoJiv37N0M6/xrKqrrZw/5maZA+UagQV8UZ+XBeuGMzUg=="
},
"cookiejar": {
"version": "2.1.2",
@@ -172,19 +166,17 @@
"dev": true
},
"d": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
"integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
"integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
"requires": {
"es5-ext": "^0.10.50",
"type": "^1.0.1"
"es5-ext": "^0.10.9"
}
},
"debug": {
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"dev": true,
"requires": {
"ms": "^2.1.1"
}
@@ -231,13 +223,13 @@
}
},
"es6-weak-map": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz",
"integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==",
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz",
"integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=",
"requires": {
"d": "1",
"es5-ext": "^0.10.46",
"es6-iterator": "^2.0.3",
"es5-ext": "^0.10.14",
"es6-iterator": "^2.0.1",
"es6-symbol": "^3.1.1"
}
},
@@ -267,26 +259,11 @@
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
},
"follow-redirects": {
"version": "1.5.10",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
"integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz",
"integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==",
"requires": {
"debug": "=3.1.0"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
"debug": "^3.2.6"
}
},
"form-data": {
@@ -307,9 +284,9 @@
"dev": true
},
"google-libphonenumber": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.3.tgz",
"integrity": "sha512-8n4JyRptifaIRlHANKRlfqLR8fANm7+Q+1qvDuUsUeStSLtLGTVsZWe1llWDfgWTm1y07cEUyiRuNIv6cs2ovg=="
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.2.tgz",
"integrity": "sha512-ubjGeosYPeusjYbUHy76lCniGTTI0k1rIFc+uKBX+jHQLDmWOSUtlFUxaeoLJ+Y+PAMM6dWp+C1HjHx5BI8kEw=="
},
"has-flag": {
"version": "3.0.0",
@@ -323,9 +300,9 @@
"dev": true
},
"is-buffer": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
"integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw=="
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
},
"is-promise": {
"version": "2.1.0",
@@ -333,9 +310,9 @@
"integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o="
},
"iterare": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.0.tgz",
"integrity": "sha512-RxMV9p/UzdK0Iplnd8mVgRvNdXlsTOiuDrqMRnDi3wIhbT+JP4xDquAX9ay13R3CH72NBzQ91KWe0+C168QAyQ=="
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/iterare/-/iterare-1.1.2.tgz",
"integrity": "sha512-25rVYmj/dDvTR6zOa9jY1Ihd6USLa0J508Ub2iy7Aga+xu9JMbjDds2Uh03ReDGbva/YN3s3Ybi+Do0nOX6wAg=="
},
"lru-queue": {
"version": "0.1.0",
@@ -396,8 +373,7 @@
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
"dev": true
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
},
"next-tick": {
"version": "1.0.0",
@@ -544,9 +520,9 @@
}
},
"ts-node": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz",
"integrity": "sha512-dyNS/RqyVTDcmNM4NIBAeDMpsAdaQ+ojdf0GOLqE6nwJOgzEkdRNzJywhDfwnuvB10oa6NLVG1rUJQCpRN7qoQ==",
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.2.0.tgz",
"integrity": "sha512-m8XQwUurkbYqXrKqr3WHCW310utRNvV5OnRVeISeea7LoCWVcdfeB/Ntl8JYWFh+WRoUAdBgESrzKochQt7sMw==",
"dev": true,
"requires": {
"arg": "^4.1.0",
@@ -561,15 +537,10 @@
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
},
"type": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/type/-/type-1.0.1.tgz",
"integrity": "sha512-MAM5dBMJCJNKs9E7JXo4CXRAansRfG0nlJxW7Wf6GZzSOvH31zClSaHdIMWLehe/EGMBkqeC55rrkaOr5Oo7Nw=="
},
"typescript": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz",
"integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g=="
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.1.tgz",
"integrity": "sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw=="
},
"util-deprecate": {
"version": "1.0.2",
@@ -583,9 +554,9 @@
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
},
"validator": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-11.1.0.tgz",
"integrity": "sha512-qiQ5ktdO7CD6C/5/mYV4jku/7qnqzjrxb3C/Q5wR3vGGinHTgJZN/TdFT3ZX4vXhX2R1PXx42fB1cn5W+uJ4lg=="
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-10.4.0.tgz",
"integrity": "sha512-Q/wBy3LB1uOyssgNlXSRmaf22NxjvDNZM2MtIQ4jaEOAB61xsh1TQxsq1CgzUMBV1lDrVMogIh8GjG1DYW0zLg=="
},
"yn": {
"version": "3.1.0",

View File

@@ -7,17 +7,17 @@
"start": "ts-node src/main"
},
"dependencies": {
"@nestjs/common": "6.5.3",
"@nestjs/core": "6.5.3",
"@nestjs/common": "6.2.4",
"@nestjs/core": "6.2.4",
"class-transformer": "0.2.3",
"class-validator": "0.10.0",
"class-validator": "0.9.1",
"reflect-metadata": "0.1.13",
"rxjs": "6.5.2",
"typescript": "3.5.3"
"typescript": "3.5.1"
},
"devDependencies": {
"@types/node": "7.10.7",
"@types/node": "7.10.6",
"supertest": "4.0.2",
"ts-node": "8.3.0"
"ts-node": "8.2.0"
}
}

View File

@@ -1,37 +0,0 @@
import { Test, TestingModule } from '@nestjs/testing';
import { expect } from 'chai';
import { CoreInjectablesModule } from '../src/core-injectables/core-injectables.module';
import { ApplicationConfig, ModuleRef } from '@nestjs/core';
describe('Core Injectables', () => {
let testingModule: TestingModule;
beforeEach(async () => {
const builder = Test.createTestingModule({
imports: [CoreInjectablesModule],
});
testingModule = await builder.compile();
});
it('should provide ApplicationConfig as core injectable', () => {
const applicationConfig = testingModule.get<ApplicationConfig>(
ApplicationConfig,
);
applicationConfig.setGlobalPrefix('/api');
expect(applicationConfig).to.not.be.undefined;
expect(applicationConfig.getGlobalPrefix()).to.be.eq('/api');
});
it('should provide ModuleRef as core injectable', () => {
const moduleRef = testingModule.get<ModuleRef>(ModuleRef);
expect(moduleRef).to.not.be.undefined;
});
it('should provide the current Module as provider', () => {
const module = testingModule.get<CoreInjectablesModule>(CoreInjectablesModule);
expect(module).to.not.be.undefined;
expect(module.constructor.name).to.be.eq('CoreInjectablesModule');
});
});

View File

@@ -5,58 +5,58 @@
"requires": true,
"dependencies": {
"@nestjs/common": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.2.4.tgz",
"integrity": "sha512-YZvJ6/S7yVQZK+9rupCzMCg4tpbc9DyVvLoTx0NBDqExTCUNcNEcCtn0AZrO/hLqbeYODnJwGE2NxkH1R/qw+w==",
"requires": {
"axios": "0.19.0",
"axios": "0.18.0",
"cli-color": "1.4.0",
"uuid": "3.3.2"
}
},
"@nestjs/core": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.2.4.tgz",
"integrity": "sha512-aYKi3QGKmpxF6w32STAcobIqOHFqSUXrU8nF+Y9dOlStRkXFBTuVchsoJk94sY+3y4SJAlHH4Q/8R4yFaixrug==",
"requires": {
"@nuxtjs/opencollective": "0.2.2",
"@nuxtjs/opencollective": "0.2.1",
"fast-safe-stringify": "2.0.6",
"iterare": "1.2.0",
"iterare": "1.1.2",
"object-hash": "1.3.1",
"optional": "0.1.4",
"uuid": "3.3.2"
}
},
"@nestjs/microservices": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.5.3.tgz",
"integrity": "sha512-T9zZf61myahenI4c0qhcYnhnx49L+zL9+8W6fc+LPTarbt1HJDu6iyj6fh2BzewakwNLJRyGMJ9YCYlXhFuvlA==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.2.4.tgz",
"integrity": "sha512-aVXLPPTL2nUf4EVBcuqbCRFN62BDhFjxSy49BIpMTDqbaSOZPgfhfwyotDI6sAG0cJq4zWvU/OCC2/NkLq9Ryg==",
"requires": {
"iterare": "1.2.0",
"iterare": "1.1.2",
"json-socket": "0.3.0",
"optional": "0.1.4"
}
},
"@nestjs/testing": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.5.3.tgz",
"integrity": "sha512-W8tPhkNVhmX+jaDu4R7WUOtIl0PK3ZDso434rEm/b1+S6ZRgAKwNVHWM/rwIuTi5+erPTEULtTsZgrXFrzC1sA==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.2.4.tgz",
"integrity": "sha512-l5uxeNz+CksHaVcHxSlpo0vyJxvZP7BM1vS6BKuqtn/lNlIITAkdWmCVfBldN8Okayj3B2yhc04Zq6imU3aX9w==",
"requires": {
"optional": "0.1.4"
}
},
"@nestjs/websockets": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.5.3.tgz",
"integrity": "sha512-YrCvmLHTW0OBusTiUOPrG0PNrw/3Gatty/bh3ro5cEoiovcaJxGSMsTC+JSVXqPwRJjEtoHMCr5Qje2rAepIzQ==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.2.4.tgz",
"integrity": "sha512-3cpEZz/uTTHiMXX6d+lXH9Wg7Rtla36Oc3JTmQtuGc1KlAIs3wzJRO/qU/LfLuYrNeqAAFVq8EHW3DkjPFxXjg==",
"requires": {
"iterare": "1.2.0"
"iterare": "1.1.2"
}
},
"@nuxtjs/opencollective": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.2.2.tgz",
"integrity": "sha512-69gFVDs7mJfNjv9Zs5DFVD+pvBW+k1TaHSOqUWqAyTTfLcKI/EMYQgvEvziRd+zAFtUOoye6MfWh0qvinGISPw==",
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.2.1.tgz",
"integrity": "sha512-pzSib8NKquaTt/ns5Cc2G0BGRVJXaD+p1qfF6q7vNIMvRysorn/VF3y7gAuQpcxfF7wBbGE+dXjhIieWOUsWSw==",
"requires": {
"chalk": "^2.4.1",
"consola": "^2.3.0",
@@ -64,16 +64,11 @@
}
},
"@types/node": {
"version": "7.10.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.7.tgz",
"integrity": "sha512-4I7+hXKyq7e1deuzX9udu0hPIYqSSkdKXtjow6fMnQ3OR9qkxIErGHbGY08YrfZJrCS1ajK8lOuzd0k3n2WM4A==",
"version": "7.10.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.6.tgz",
"integrity": "sha512-d0BOAicT0tEdbdVQlLGOVul1kvg6YvbaADRCThGCz5NJ0e9r00SofcR1x69hmlCyrHuB6jd4cKzL9bMLjPnpAA==",
"dev": true
},
"@types/validator": {
"version": "10.11.2",
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.2.tgz",
"integrity": "sha512-k/ju1RsdP5ACFUWebqsyEy0avP5uNJCs2p3pmTHzOZdd4gMSAJTq7iUEHFY3tt3emBrPTm6oGvfZ4SzcqOgLPQ=="
},
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
@@ -100,12 +95,12 @@
"dev": true
},
"axios": {
"version": "0.19.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz",
"integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==",
"version": "0.18.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz",
"integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=",
"requires": {
"follow-redirects": "1.5.10",
"is-buffer": "^2.0.2"
"follow-redirects": "^1.3.0",
"is-buffer": "^1.1.5"
}
},
"buffer-from": {
@@ -130,13 +125,12 @@
"integrity": "sha512-qsP+0xoavpOlJHuYsQJsN58HXSl8Jvveo+T37rEvCEeRfMWoytAyR0Ua/YsFgpM6AZYZ/og2PJwArwzJl1aXtQ=="
},
"class-validator": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.0.tgz",
"integrity": "sha512-RvjxRlvoCvM/ojUq11j78ISpReGdBoMErdmDk1e27aQZK6ppSXq751UE6jB9JI7ayEnL6Nnmllzn/HXVSu3dmg==",
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.9.1.tgz",
"integrity": "sha512-3wApflrd3ywVZyx4jaasGoFt8pmo4aGLPPAEKCKCsTRWVGPilahD88q3jQjRQwja50rl9a7rsP5LAxJYwGK8/Q==",
"requires": {
"@types/validator": "10.11.2",
"google-libphonenumber": "^3.1.6",
"validator": "11.1.0"
"validator": "10.4.0"
}
},
"cli-color": {
@@ -181,9 +175,9 @@
"dev": true
},
"consola": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.9.0.tgz",
"integrity": "sha512-34Iue+LRcWbndFIfZc5boNizWlsrRjqIBJZTe591vImgbnq7nx2EzlrLtANj9TH2Fxm7puFJBJAOk5BhvZOddQ=="
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.6.2.tgz",
"integrity": "sha512-GNJhwvF4bJ8eiAlyB8r4WNM8kBqkl+y4DvMehMbyywoJiv37N0M6/xrKqrrZw/5maZA+UagQV8UZ+XBeuGMzUg=="
},
"cookiejar": {
"version": "2.1.2",
@@ -198,19 +192,17 @@
"dev": true
},
"d": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
"integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
"integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
"requires": {
"es5-ext": "^0.10.50",
"type": "^1.0.1"
"es5-ext": "^0.10.9"
}
},
"debug": {
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"dev": true,
"requires": {
"ms": "^2.1.1"
}
@@ -257,13 +249,13 @@
}
},
"es6-weak-map": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz",
"integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==",
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz",
"integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=",
"requires": {
"d": "1",
"es5-ext": "^0.10.46",
"es6-iterator": "^2.0.3",
"es5-ext": "^0.10.14",
"es6-iterator": "^2.0.1",
"es6-symbol": "^3.1.1"
}
},
@@ -293,26 +285,11 @@
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
},
"follow-redirects": {
"version": "1.5.10",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
"integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz",
"integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==",
"requires": {
"debug": "=3.1.0"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
"debug": "^3.2.6"
}
},
"form-data": {
@@ -333,9 +310,9 @@
"dev": true
},
"google-libphonenumber": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.3.tgz",
"integrity": "sha512-8n4JyRptifaIRlHANKRlfqLR8fANm7+Q+1qvDuUsUeStSLtLGTVsZWe1llWDfgWTm1y07cEUyiRuNIv6cs2ovg=="
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.2.tgz",
"integrity": "sha512-ubjGeosYPeusjYbUHy76lCniGTTI0k1rIFc+uKBX+jHQLDmWOSUtlFUxaeoLJ+Y+PAMM6dWp+C1HjHx5BI8kEw=="
},
"has-flag": {
"version": "3.0.0",
@@ -349,9 +326,9 @@
"dev": true
},
"is-buffer": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
"integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw=="
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
},
"is-promise": {
"version": "2.1.0",
@@ -359,9 +336,9 @@
"integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o="
},
"iterare": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.0.tgz",
"integrity": "sha512-RxMV9p/UzdK0Iplnd8mVgRvNdXlsTOiuDrqMRnDi3wIhbT+JP4xDquAX9ay13R3CH72NBzQ91KWe0+C168QAyQ=="
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/iterare/-/iterare-1.1.2.tgz",
"integrity": "sha512-25rVYmj/dDvTR6zOa9jY1Ihd6USLa0J508Ub2iy7Aga+xu9JMbjDds2Uh03ReDGbva/YN3s3Ybi+Do0nOX6wAg=="
},
"json-socket": {
"version": "0.3.0",
@@ -427,8 +404,7 @@
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
"dev": true
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
},
"next-tick": {
"version": "1.0.0",
@@ -575,9 +551,9 @@
}
},
"ts-node": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz",
"integrity": "sha512-dyNS/RqyVTDcmNM4NIBAeDMpsAdaQ+ojdf0GOLqE6nwJOgzEkdRNzJywhDfwnuvB10oa6NLVG1rUJQCpRN7qoQ==",
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.2.0.tgz",
"integrity": "sha512-m8XQwUurkbYqXrKqr3WHCW310utRNvV5OnRVeISeea7LoCWVcdfeB/Ntl8JYWFh+WRoUAdBgESrzKochQt7sMw==",
"dev": true,
"requires": {
"arg": "^4.1.0",
@@ -592,15 +568,10 @@
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
},
"type": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/type/-/type-1.0.1.tgz",
"integrity": "sha512-MAM5dBMJCJNKs9E7JXo4CXRAansRfG0nlJxW7Wf6GZzSOvH31zClSaHdIMWLehe/EGMBkqeC55rrkaOr5Oo7Nw=="
},
"typescript": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz",
"integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g=="
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.1.tgz",
"integrity": "sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw=="
},
"util-deprecate": {
"version": "1.0.2",
@@ -614,9 +585,9 @@
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
},
"validator": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-11.1.0.tgz",
"integrity": "sha512-qiQ5ktdO7CD6C/5/mYV4jku/7qnqzjrxb3C/Q5wR3vGGinHTgJZN/TdFT3ZX4vXhX2R1PXx42fB1cn5W+uJ4lg=="
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-10.4.0.tgz",
"integrity": "sha512-Q/wBy3LB1uOyssgNlXSRmaf22NxjvDNZM2MtIQ4jaEOAB61xsh1TQxsq1CgzUMBV1lDrVMogIh8GjG1DYW0zLg=="
},
"yn": {
"version": "3.1.0",

View File

@@ -7,20 +7,20 @@
"start": "ts-node src/main"
},
"dependencies": {
"@nestjs/common": "6.5.3",
"@nestjs/core": "6.5.3",
"@nestjs/microservices": "6.5.3",
"@nestjs/testing": "6.5.3",
"@nestjs/websockets": "6.5.3",
"@nestjs/common": "6.2.4",
"@nestjs/core": "6.2.4",
"@nestjs/microservices": "6.2.4",
"@nestjs/testing": "6.2.4",
"@nestjs/websockets": "6.2.4",
"class-transformer": "0.2.3",
"class-validator": "0.10.0",
"class-validator": "0.9.1",
"reflect-metadata": "0.1.13",
"rxjs": "6.5.2",
"typescript": "3.5.3"
"typescript": "3.5.1"
},
"devDependencies": {
"@types/node": "7.10.7",
"@types/node": "7.10.6",
"supertest": "4.0.2",
"ts-node": "8.3.0"
"ts-node": "8.2.0"
}
}

View File

@@ -1,4 +0,0 @@
import { Module } from '@nestjs/common';
@Module({})
export class CoreInjectablesModule {}

View File

@@ -46,8 +46,7 @@ describe('MQTT transport', () => {
.expect(200, '15');
});
it(`/POST (concurrent)`, function() {
this.retries(10);
it(`/POST (concurrent)`, () => {
return request(server)
.post('/concurrent')
.send([
@@ -63,7 +62,7 @@ describe('MQTT transport', () => {
Array.from({ length: 10 }, (v, k) => k + 91),
])
.expect(200, 'true');
}).timeout(5000);
});
it(`/POST (streaming)`, () => {
return request(server)

View File

@@ -46,9 +46,7 @@ describe('REDIS transport', () => {
.expect(200, '15');
});
it(`/POST (concurrent)`, function() {
this.retries(10);
it(`/POST (concurrent)`, () => {
return request(server)
.post('/concurrent')
.send([
@@ -64,7 +62,7 @@ describe('REDIS transport', () => {
Array.from({ length: 10 }, (v, k) => k + 91),
])
.expect(200, 'true');
}).timeout(5000);
});
it(`/POST (streaming)`, () => {
return request(server)

File diff suppressed because it is too large Load Diff

View File

@@ -7,22 +7,22 @@
"start": "ts-node src/main"
},
"dependencies": {
"@nestjs/common": "6.5.3",
"@nestjs/core": "6.5.3",
"@nestjs/microservices": "6.5.3",
"@nestjs/platform-express": "6.5.3",
"@nestjs/testing": "6.5.3",
"@nestjs/websockets": "6.5.3",
"amqp-connection-manager": "3.0.0",
"@nestjs/common": "6.2.4",
"@nestjs/core": "6.2.4",
"@nestjs/microservices": "6.2.4",
"@nestjs/platform-express": "6.2.4",
"@nestjs/testing": "6.2.4",
"@nestjs/websockets": "6.2.4",
"amqp-connection-manager": "2.3.2",
"class-transformer": "0.2.3",
"class-validator": "0.10.0",
"class-validator": "0.9.1",
"reflect-metadata": "0.1.13",
"rxjs": "6.5.2",
"typescript": "3.5.3"
"typescript": "3.5.1"
},
"devDependencies": {
"@types/node": "7.10.7",
"@types/node": "7.10.6",
"supertest": "4.0.2",
"ts-node": "8.3.0"
"ts-node": "8.2.0"
}
}

View File

@@ -16,17 +16,16 @@ export class DisconnectedClientController {
const client = ClientProxyFactory.create(options);
return client.send<number, number[]>({ cmd: 'none' }, [1, 2, 3]).pipe(
/*tap(
console.log.bind(console, 'data'),
console.error.bind(console, 'error'),
),*/
catchError(error => {
const { code } = error || { code: 'CONN_ERR' };
return throwError(
console.log.bind(console, 'data'),
console.error.bind(console, 'error'),
),*/
catchError(({ code }) =>
throwError(
code === 'ECONNREFUSED' || code === 'CONN_ERR'
? new RequestTimeoutException('ECONNREFUSED')
: new InternalServerErrorException(),
);
}),
),
),
);
}
}

View File

@@ -63,10 +63,9 @@ export class AdvancedGrpcController {
*/
@GrpcStreamMethod('orders.OrderService')
async sync(messages: Observable<any>): Promise<any> {
const s = new Subject();
const o = s.asObservable();
const subject = new Subject();
messages.subscribe(msg => {
s.next({
subject.next({
id: 1,
itemTypes: [1],
shipmentType: {
@@ -76,7 +75,7 @@ export class AdvancedGrpcController {
},
});
});
return o;
return subject.asObservable();
}
/**

View File

@@ -5,18 +5,18 @@
"requires": true,
"dependencies": {
"@babel/code-frame": {
"version": "7.5.5",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
"integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==",
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz",
"integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==",
"dev": true,
"requires": {
"@babel/highlight": "^7.0.0"
}
},
"@babel/highlight": {
"version": "7.5.0",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz",
"integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==",
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz",
"integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==",
"dev": true,
"requires": {
"chalk": "^2.0.0",
@@ -25,23 +25,23 @@
}
},
"@nestjs/common": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.2.4.tgz",
"integrity": "sha512-YZvJ6/S7yVQZK+9rupCzMCg4tpbc9DyVvLoTx0NBDqExTCUNcNEcCtn0AZrO/hLqbeYODnJwGE2NxkH1R/qw+w==",
"requires": {
"axios": "0.19.0",
"axios": "0.18.0",
"cli-color": "1.4.0",
"uuid": "3.3.2"
}
},
"@nestjs/core": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.2.4.tgz",
"integrity": "sha512-aYKi3QGKmpxF6w32STAcobIqOHFqSUXrU8nF+Y9dOlStRkXFBTuVchsoJk94sY+3y4SJAlHH4Q/8R4yFaixrug==",
"requires": {
"@nuxtjs/opencollective": "0.2.2",
"@nuxtjs/opencollective": "0.2.1",
"fast-safe-stringify": "2.0.6",
"iterare": "1.2.0",
"iterare": "1.1.2",
"object-hash": "1.3.1",
"optional": "0.1.4",
"uuid": "3.3.2"
@@ -53,9 +53,9 @@
"integrity": "sha512-BkbkguvaPPGbL/41lK6P22DaQodBC9Yv9rUAmNlQVShChtwss7/cGj68AKC3jEoidrx75wCyDO3P8Tp6pggE4w=="
},
"@nuxtjs/opencollective": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.2.2.tgz",
"integrity": "sha512-69gFVDs7mJfNjv9Zs5DFVD+pvBW+k1TaHSOqUWqAyTTfLcKI/EMYQgvEvziRd+zAFtUOoye6MfWh0qvinGISPw==",
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.2.1.tgz",
"integrity": "sha512-pzSib8NKquaTt/ns5Cc2G0BGRVJXaD+p1qfF6q7vNIMvRysorn/VF3y7gAuQpcxfF7wBbGE+dXjhIieWOUsWSw==",
"requires": {
"chalk": "^2.4.1",
"consola": "^2.3.0",
@@ -72,9 +72,9 @@
}
},
"@types/mongodb": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.3.0.tgz",
"integrity": "sha512-YMrve0uBOqFDEiezQk3AfWV73g871/rQTAEb8Y2CSlbySnV/2OyerI1DAOUUJQaIqGEWWaYF6GMPO6wTErLUuw==",
"version": "3.1.27",
"resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.1.27.tgz",
"integrity": "sha512-DZMG/4iEh771XHw84PWFOb2JuMCKN+czroK3wFz95sGetOQPs8zqa6wjL0hswqH5XYMt0X/ekV6t2sAmSsaafg==",
"dev": true,
"requires": {
"@types/bson": "*",
@@ -82,9 +82,9 @@
}
},
"@types/mongoose": {
"version": "5.5.13",
"resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.5.13.tgz",
"integrity": "sha512-k7Kxk5gugsZhkl7euWH1p6lmIdh9W8AsQgX0cO7kaihBie/P3ywU8LFMqo9ey6frdHBlGVaNICTeFZ/pZ6s5Lg==",
"version": "5.5.3",
"resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.5.3.tgz",
"integrity": "sha512-HTHlGl81+LcG9b9Bgyn2Jjl8MO8Tx4FZLRVSf3+SpVl7kRF2iUY/C8vZH5Vj7UvLQGSrUGkt+fJUBrmsD1HucQ==",
"dev": true,
"requires": {
"@types/mongodb": "*",
@@ -92,9 +92,9 @@
}
},
"@types/node": {
"version": "7.10.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.7.tgz",
"integrity": "sha512-4I7+hXKyq7e1deuzX9udu0hPIYqSSkdKXtjow6fMnQ3OR9qkxIErGHbGY08YrfZJrCS1ajK8lOuzd0k3n2WM4A==",
"version": "7.10.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.6.tgz",
"integrity": "sha512-d0BOAicT0tEdbdVQlLGOVul1kvg6YvbaADRCThGCz5NJ0e9r00SofcR1x69hmlCyrHuB6jd4cKzL9bMLjPnpAA==",
"dev": true
},
"ansi-regex": {
@@ -134,12 +134,12 @@
}
},
"axios": {
"version": "0.19.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz",
"integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==",
"version": "0.18.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz",
"integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=",
"requires": {
"follow-redirects": "1.5.10",
"is-buffer": "^2.0.2"
"follow-redirects": "^1.3.0",
"is-buffer": "^1.1.5"
}
},
"balanced-match": {
@@ -229,32 +229,24 @@
"dev": true
},
"consola": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.9.0.tgz",
"integrity": "sha512-34Iue+LRcWbndFIfZc5boNizWlsrRjqIBJZTe591vImgbnq7nx2EzlrLtANj9TH2Fxm7puFJBJAOk5BhvZOddQ=="
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.6.2.tgz",
"integrity": "sha512-GNJhwvF4bJ8eiAlyB8r4WNM8kBqkl+y4DvMehMbyywoJiv37N0M6/xrKqrrZw/5maZA+UagQV8UZ+XBeuGMzUg=="
},
"d": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
"integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
"integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
"requires": {
"es5-ext": "^0.10.50",
"type": "^1.0.1"
"es5-ext": "^0.10.9"
}
},
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "2.0.0"
},
"dependencies": {
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
"ms": "^2.1.1"
}
},
"diff": {
@@ -293,13 +285,13 @@
}
},
"es6-weak-map": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz",
"integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==",
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz",
"integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=",
"requires": {
"d": "1",
"es5-ext": "^0.10.46",
"es6-iterator": "^2.0.3",
"es5-ext": "^0.10.14",
"es6-iterator": "^2.0.1",
"es6-symbol": "^3.1.1"
}
},
@@ -315,9 +307,9 @@
"dev": true
},
"esutils": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
"dev": true
},
"event-emitter": {
@@ -335,11 +327,11 @@
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
},
"follow-redirects": {
"version": "1.5.10",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
"integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz",
"integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==",
"requires": {
"debug": "=3.1.0"
"debug": "^3.2.6"
}
},
"fs.realpath": {
@@ -349,9 +341,9 @@
"dev": true
},
"glob": {
"version": "7.1.4",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
"integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
@@ -378,15 +370,15 @@
}
},
"inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"dev": true
},
"is-buffer": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
"integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw=="
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
},
"is-promise": {
"version": "2.1.0",
@@ -394,9 +386,9 @@
"integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o="
},
"iterare": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.0.tgz",
"integrity": "sha512-RxMV9p/UzdK0Iplnd8mVgRvNdXlsTOiuDrqMRnDi3wIhbT+JP4xDquAX9ay13R3CH72NBzQ91KWe0+C168QAyQ=="
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/iterare/-/iterare-1.1.2.tgz",
"integrity": "sha512-25rVYmj/dDvTR6zOa9jY1Ihd6USLa0J508Ub2iy7Aga+xu9JMbjDds2Uh03ReDGbva/YN3s3Ybi+Do0nOX6wAg=="
},
"js-tokens": {
"version": "4.0.0",
@@ -420,9 +412,9 @@
"integrity": "sha512-6hHxsp9e6zQU8nXsP+02HGWXwTkOEw6IROhF2ZA28cYbUk4eJ6QbtZvdqZOdD9YPKghG3apk5eOCvs+tLl3lRg=="
},
"lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
"version": "4.17.11",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
},
"lru-queue": {
"version": "0.1.0",
@@ -484,18 +476,18 @@
}
},
"mongodb": {
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.2.7.tgz",
"integrity": "sha512-2YdWrdf1PJgxcCrT1tWoL6nHuk6hCxhddAAaEh8QJL231ci4+P9FLyqopbTm2Z2sAU6mhCri+wd9r1hOcHdoMw==",
"version": "3.2.5",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.2.5.tgz",
"integrity": "sha512-VEu2nsfFMwWA6q6JVnlJ2kNVwjluU4op2J/YiG1LeI14t9HotLXbg8w3I794BvezC4ZCZ/wBTTdby01txalwwQ==",
"requires": {
"mongodb-core": "3.2.7",
"mongodb-core": "3.2.5",
"safe-buffer": "^5.1.2"
}
},
"mongodb-core": {
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-3.2.7.tgz",
"integrity": "sha512-WypKdLxFNPOH/Jy6i9z47IjG2wIldA54iDZBmHMINcgKOUcWJh8og+Wix76oGd7EyYkHJKssQ2FAOw5Su/n4XQ==",
"version": "3.2.5",
"resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-3.2.5.tgz",
"integrity": "sha512-czmFd/7Cy+PxItL5KewYgkKTJGb2JyC1PdIdLBVGHER4Vsgu/A+fXDDNO+PLuyHNdh7qbH2XyLP4HHAifgBBoQ==",
"requires": {
"bson": "^1.1.1",
"require_optional": "^1.0.1",
@@ -504,20 +496,20 @@
}
},
"mongoose": {
"version": "5.6.10",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.6.10.tgz",
"integrity": "sha512-lxWvF4Vl2118K2nZTj+QAEEmNBCbmUAcmF/roe8d+68Np4RXKEQvmpqm1c3aIlE9AVMp//eKB8IfXr38ZHe0Zw==",
"version": "5.5.11",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.5.11.tgz",
"integrity": "sha512-jLYPk4jYe1N5CNwBcj48tQwQZ5Dc8VsnAjdMiqaKh5+CwU9EqEfuEtYMkFhJLu/LaTA4LN7crFzydGHdlAZtmg==",
"requires": {
"async": "2.6.2",
"bson": "~1.1.1",
"kareem": "2.3.0",
"mongodb": "3.2.7",
"mongodb-core": "3.2.7",
"mongodb": "3.2.5",
"mongodb-core": "3.2.5",
"mongoose-legacy-pluralize": "1.0.2",
"mpath": "0.6.0",
"mquery": "3.2.1",
"ms": "2.1.2",
"regexp-clone": "1.0.0",
"mquery": "3.2.0",
"ms": "2.1.1",
"regexp-clone": "0.0.1",
"safe-buffer": "5.1.2",
"sift": "7.0.1",
"sliced": "1.0.1"
@@ -534,21 +526,36 @@
"integrity": "sha512-i75qh79MJ5Xo/sbhxrDrPSEG0H/mr1kcZXJ8dH6URU5jD/knFxCVqVC/gVSW7GIXL/9hHWlT9haLbCXWOll3qw=="
},
"mquery": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.1.tgz",
"integrity": "sha512-kY/K8QToZWTTocm0U+r8rqcJCp5PRl6e8tPmoDs5OeSO3DInZE2rAL6AYH+V406JTo8305LdASOQcxRDqHojyw==",
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.0.tgz",
"integrity": "sha512-qPJcdK/yqcbQiKoemAt62Y0BAc0fTEKo1IThodBD+O5meQRJT/2HSe5QpBNwaa4CjskoGrYWsEyjkqgiE0qjhg==",
"requires": {
"bluebird": "3.5.1",
"debug": "3.1.0",
"regexp-clone": "^1.0.0",
"regexp-clone": "0.0.1",
"safe-buffer": "5.1.2",
"sliced": "1.0.1"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
},
"next-tick": {
"version": "1.0.0",
@@ -597,9 +604,9 @@
"integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg=="
},
"regexp-clone": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz",
"integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw=="
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-0.0.1.tgz",
"integrity": "sha1-p8LgmJH9vzj7sQ03b7cwA+aKxYk="
},
"require_optional": {
"version": "1.0.1",
@@ -611,9 +618,9 @@
}
},
"resolve": {
"version": "1.12.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz",
"integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==",
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz",
"integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==",
"dev": true,
"requires": {
"path-parse": "^1.0.6"
@@ -710,9 +717,9 @@
}
},
"ts-node": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz",
"integrity": "sha512-dyNS/RqyVTDcmNM4NIBAeDMpsAdaQ+ojdf0GOLqE6nwJOgzEkdRNzJywhDfwnuvB10oa6NLVG1rUJQCpRN7qoQ==",
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.2.0.tgz",
"integrity": "sha512-m8XQwUurkbYqXrKqr3WHCW310utRNvV5OnRVeISeea7LoCWVcdfeB/Ntl8JYWFh+WRoUAdBgESrzKochQt7sMw==",
"dev": true,
"requires": {
"arg": "^4.1.0",
@@ -736,9 +743,9 @@
"integrity": "sha512-avfPS28HmGLLc2o4elcc2EIq2FcH++Yo5YxpBZi9Yw93BCTGFthI4HPE4Rpep6vSYQaK8e69PelM44tPj+RaQg=="
},
"tslint": {
"version": "5.19.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.19.0.tgz",
"integrity": "sha512-1LwwtBxfRJZnUvoS9c0uj8XQtAnyhWr9KlNvDIdB+oXyT+VpsOAaEhEgKi1HrZ8rq0ki/AAnbGSv4KM6/AfVZw==",
"version": "5.16.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.16.0.tgz",
"integrity": "sha512-UxG2yNxJ5pgGwmMzPMYh/CCnCnh0HfPgtlVRDs1ykZklufFBL1ZoTlWFRz2NQjcoEiDoRp+JyT0lhBbbH/obyA==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@@ -747,7 +754,7 @@
"commander": "^2.12.1",
"diff": "^3.2.0",
"glob": "^7.1.1",
"js-yaml": "^3.13.1",
"js-yaml": "^3.13.0",
"minimatch": "^3.0.4",
"mkdirp": "^0.5.1",
"resolve": "^1.3.2",
@@ -765,15 +772,10 @@
"tslib": "^1.8.1"
}
},
"type": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/type/-/type-1.0.1.tgz",
"integrity": "sha512-MAM5dBMJCJNKs9E7JXo4CXRAansRfG0nlJxW7Wf6GZzSOvH31zClSaHdIMWLehe/EGMBkqeC55rrkaOr5Oo7Nw=="
},
"typescript": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz",
"integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g=="
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.1.tgz",
"integrity": "sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw=="
},
"uuid": {
"version": "3.3.2",

View File

@@ -9,18 +9,18 @@
"start:prod": "node dist/main.js"
},
"dependencies": {
"@nestjs/common": "6.5.3",
"@nestjs/core": "6.5.3",
"@nestjs/common": "6.2.4",
"@nestjs/core": "6.2.4",
"@nestjs/mongoose": "6.1.2",
"mongoose": "5.6.10",
"mongoose": "5.5.11",
"reflect-metadata": "0.1.13",
"rxjs": "6.5.2",
"typescript": "3.5.3"
"typescript": "3.5.1"
},
"devDependencies": {
"@types/mongoose": "5.5.13",
"@types/node": "7.10.7",
"ts-node": "8.3.0",
"tslint": "5.19.0"
"@types/mongoose": "5.5.3",
"@types/node": "7.10.6",
"ts-node": "8.2.0",
"tslint": "5.16.0"
}
}

View File

@@ -1,81 +0,0 @@
import { INestApplication } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import * as request from 'supertest';
import { Guard } from '../src/msvc/guards/request-scoped.guard';
import { HelloController } from '../src/msvc/hello.controller';
import { HelloModule } from '../src/msvc/hello.module';
import { Interceptor } from '../src/msvc/interceptors/logging.interceptor';
import { UsersService } from '../src/msvc/users/users.service';
class Meta {
static COUNTER = 0;
constructor() {
Meta.COUNTER++;
}
}
describe('Request scope (microservices)', () => {
let server;
let app: INestApplication;
before(async () => {
const module = await Test.createTestingModule({
imports: [
HelloModule.forRoot({
provide: 'META',
useClass: Meta,
}),
],
}).compile();
app = module.createNestApplication();
app.connectMicroservice({ transport: Transport.TCP });
server = app.getHttpServer();
await app.init();
await app.startAllMicroservicesAsync();
});
describe('when one service is request scoped', () => {
before(async () => {
const performHttpCall = end =>
request(server)
.get('/hello')
.end((err, res) => {
if (err) return end(err);
end();
});
await new Promise(resolve => performHttpCall(resolve));
await new Promise(resolve => performHttpCall(resolve));
await new Promise(resolve => performHttpCall(resolve));
});
it(`should create controller for each request`, async () => {
expect(HelloController.COUNTER).to.be.eql(3);
});
it(`should create service for each request`, async () => {
expect(UsersService.COUNTER).to.be.eql(3);
});
it(`should share static provider across requests`, async () => {
expect(Meta.COUNTER).to.be.eql(1);
});
it(`should create request scoped interceptor for each request`, async () => {
expect(Interceptor.COUNTER).to.be.eql(3);
expect(Interceptor.REQUEST_SCOPED_DATA).to.deep.equal([1, 1, 1]);
});
it(`should create request scoped guard for each request`, async () => {
expect(Guard.COUNTER).to.be.eql(3);
expect(Guard.REQUEST_SCOPED_DATA).to.deep.equal([1, 1, 1]);
});
});
after(async () => {
await app.close();
});
});

View File

@@ -63,17 +63,14 @@ describe('Request scope', () => {
it(`should create request scoped pipe for each request`, async () => {
expect(UserByIdPipe.COUNTER).to.be.eql(3);
expect(UserByIdPipe.REQUEST_SCOPED_DATA).to.deep.equal([1, 1, 1]);
});
it(`should create request scoped interceptor for each request`, async () => {
expect(Interceptor.COUNTER).to.be.eql(3);
expect(Interceptor.REQUEST_SCOPED_DATA).to.deep.equal([1, 1, 1]);
});
it(`should create request scoped guard for each request`, async () => {
expect(Guard.COUNTER).to.be.eql(3);
expect(Guard.REQUEST_SCOPED_DATA).to.deep.equal([1, 1, 1]);
});
});

View File

@@ -5,58 +5,58 @@
"requires": true,
"dependencies": {
"@nestjs/common": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.2.4.tgz",
"integrity": "sha512-YZvJ6/S7yVQZK+9rupCzMCg4tpbc9DyVvLoTx0NBDqExTCUNcNEcCtn0AZrO/hLqbeYODnJwGE2NxkH1R/qw+w==",
"requires": {
"axios": "0.19.0",
"axios": "0.18.0",
"cli-color": "1.4.0",
"uuid": "3.3.2"
}
},
"@nestjs/core": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.2.4.tgz",
"integrity": "sha512-aYKi3QGKmpxF6w32STAcobIqOHFqSUXrU8nF+Y9dOlStRkXFBTuVchsoJk94sY+3y4SJAlHH4Q/8R4yFaixrug==",
"requires": {
"@nuxtjs/opencollective": "0.2.2",
"@nuxtjs/opencollective": "0.2.1",
"fast-safe-stringify": "2.0.6",
"iterare": "1.2.0",
"iterare": "1.1.2",
"object-hash": "1.3.1",
"optional": "0.1.4",
"uuid": "3.3.2"
}
},
"@nestjs/microservices": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.5.3.tgz",
"integrity": "sha512-T9zZf61myahenI4c0qhcYnhnx49L+zL9+8W6fc+LPTarbt1HJDu6iyj6fh2BzewakwNLJRyGMJ9YCYlXhFuvlA==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.2.4.tgz",
"integrity": "sha512-aVXLPPTL2nUf4EVBcuqbCRFN62BDhFjxSy49BIpMTDqbaSOZPgfhfwyotDI6sAG0cJq4zWvU/OCC2/NkLq9Ryg==",
"requires": {
"iterare": "1.2.0",
"iterare": "1.1.2",
"json-socket": "0.3.0",
"optional": "0.1.4"
}
},
"@nestjs/testing": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.5.3.tgz",
"integrity": "sha512-W8tPhkNVhmX+jaDu4R7WUOtIl0PK3ZDso434rEm/b1+S6ZRgAKwNVHWM/rwIuTi5+erPTEULtTsZgrXFrzC1sA==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.2.4.tgz",
"integrity": "sha512-l5uxeNz+CksHaVcHxSlpo0vyJxvZP7BM1vS6BKuqtn/lNlIITAkdWmCVfBldN8Okayj3B2yhc04Zq6imU3aX9w==",
"requires": {
"optional": "0.1.4"
}
},
"@nestjs/websockets": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.5.3.tgz",
"integrity": "sha512-YrCvmLHTW0OBusTiUOPrG0PNrw/3Gatty/bh3ro5cEoiovcaJxGSMsTC+JSVXqPwRJjEtoHMCr5Qje2rAepIzQ==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.2.4.tgz",
"integrity": "sha512-3cpEZz/uTTHiMXX6d+lXH9Wg7Rtla36Oc3JTmQtuGc1KlAIs3wzJRO/qU/LfLuYrNeqAAFVq8EHW3DkjPFxXjg==",
"requires": {
"iterare": "1.2.0"
"iterare": "1.1.2"
}
},
"@nuxtjs/opencollective": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.2.2.tgz",
"integrity": "sha512-69gFVDs7mJfNjv9Zs5DFVD+pvBW+k1TaHSOqUWqAyTTfLcKI/EMYQgvEvziRd+zAFtUOoye6MfWh0qvinGISPw==",
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.2.1.tgz",
"integrity": "sha512-pzSib8NKquaTt/ns5Cc2G0BGRVJXaD+p1qfF6q7vNIMvRysorn/VF3y7gAuQpcxfF7wBbGE+dXjhIieWOUsWSw==",
"requires": {
"chalk": "^2.4.1",
"consola": "^2.3.0",
@@ -64,25 +64,20 @@
}
},
"@types/node": {
"version": "7.10.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.7.tgz",
"integrity": "sha512-4I7+hXKyq7e1deuzX9udu0hPIYqSSkdKXtjow6fMnQ3OR9qkxIErGHbGY08YrfZJrCS1ajK8lOuzd0k3n2WM4A==",
"version": "7.10.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.6.tgz",
"integrity": "sha512-d0BOAicT0tEdbdVQlLGOVul1kvg6YvbaADRCThGCz5NJ0e9r00SofcR1x69hmlCyrHuB6jd4cKzL9bMLjPnpAA==",
"dev": true
},
"@types/validator": {
"version": "10.11.2",
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.2.tgz",
"integrity": "sha512-k/ju1RsdP5ACFUWebqsyEy0avP5uNJCs2p3pmTHzOZdd4gMSAJTq7iUEHFY3tt3emBrPTm6oGvfZ4SzcqOgLPQ=="
},
"abstract-logging": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/abstract-logging/-/abstract-logging-1.0.0.tgz",
"integrity": "sha1-i33q/TEFWbwo93ck3RuzAXcnjBs="
},
"ajv": {
"version": "6.10.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz",
"integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==",
"version": "6.10.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz",
"integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==",
"requires": {
"fast-deep-equal": "^2.0.1",
"fast-json-stable-stringify": "^2.0.0",
@@ -139,19 +134,19 @@
}
},
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
}
}
},
"axios": {
"version": "0.19.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz",
"integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==",
"version": "0.18.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz",
"integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=",
"requires": {
"follow-redirects": "1.5.10",
"is-buffer": "^2.0.2"
"follow-redirects": "^1.3.0",
"is-buffer": "^1.1.5"
}
},
"buffer-from": {
@@ -176,13 +171,12 @@
"integrity": "sha512-qsP+0xoavpOlJHuYsQJsN58HXSl8Jvveo+T37rEvCEeRfMWoytAyR0Ua/YsFgpM6AZYZ/og2PJwArwzJl1aXtQ=="
},
"class-validator": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.0.tgz",
"integrity": "sha512-RvjxRlvoCvM/ojUq11j78ISpReGdBoMErdmDk1e27aQZK6ppSXq751UE6jB9JI7ayEnL6Nnmllzn/HXVSu3dmg==",
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.9.1.tgz",
"integrity": "sha512-3wApflrd3ywVZyx4jaasGoFt8pmo4aGLPPAEKCKCsTRWVGPilahD88q3jQjRQwja50rl9a7rsP5LAxJYwGK8/Q==",
"requires": {
"@types/validator": "10.11.2",
"google-libphonenumber": "^3.1.6",
"validator": "11.1.0"
"validator": "10.4.0"
}
},
"cli-color": {
@@ -227,9 +221,9 @@
"dev": true
},
"consola": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.9.0.tgz",
"integrity": "sha512-34Iue+LRcWbndFIfZc5boNizWlsrRjqIBJZTe591vImgbnq7nx2EzlrLtANj9TH2Fxm7puFJBJAOk5BhvZOddQ=="
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.6.2.tgz",
"integrity": "sha512-GNJhwvF4bJ8eiAlyB8r4WNM8kBqkl+y4DvMehMbyywoJiv37N0M6/xrKqrrZw/5maZA+UagQV8UZ+XBeuGMzUg=="
},
"cookiejar": {
"version": "2.1.2",
@@ -244,26 +238,26 @@
"dev": true
},
"d": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
"integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
"integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
"requires": {
"es5-ext": "^0.10.50",
"type": "^1.0.1"
"es5-ext": "^0.10.9"
}
},
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
},
"deepmerge": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.0.0.tgz",
"integrity": "sha512-YZ1rOP5+kHor4hMAH+HRQnBQHg+wvS1un1hAOuIcxcBy0hzcUf6Jg2a1w65kpoOUnurOfZbERwjI1TfZxNjcww=="
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-3.2.0.tgz",
"integrity": "sha512-6+LuZGU7QCNUnAJyX8cIrlzoEgggTM6B7mm+znKOX4t5ltluT9KLjN6g61ECMS0LTsLW7yDpNoxhix5FZcrIow=="
},
"delayed-stream": {
"version": "1.0.0",
@@ -307,13 +301,13 @@
}
},
"es6-weak-map": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz",
"integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==",
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz",
"integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=",
"requires": {
"d": "1",
"es5-ext": "^0.10.46",
"es6-iterator": "^2.0.3",
"es5-ext": "^0.10.14",
"es6-iterator": "^2.0.1",
"es6-symbol": "^3.1.1"
}
},
@@ -353,12 +347,12 @@
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
},
"fast-json-stringify": {
"version": "1.15.4",
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.15.4.tgz",
"integrity": "sha512-lsGTxL0OIGjGSUXgWUOdSgjCL/xMyMvMudfGN3D1zOLEv44fYZ1ZXmMyCON5XdpaiZN6nCXmU7GQg7fbXfPG4g==",
"version": "1.15.2",
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.15.2.tgz",
"integrity": "sha512-iKo79rW7J2LRexme54j33BZBmFmGtqwYL6fmAxnU5VOZEJCUFir5g5iCmt5HXtxUXvI2hnmpGku+cduJpMCvwQ==",
"requires": {
"ajv": "^6.8.1",
"deepmerge": "^4.0.0"
"deepmerge": "^3.0.0"
}
},
"fast-redact": {
@@ -372,19 +366,19 @@
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
},
"fastify": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.7.1.tgz",
"integrity": "sha512-ScKPXD84lkdCgz7q0zjyBr1aLxKbXRt9HYL3XIt/L8ZD2f3fAcsLEyQ2/rHxLUzLGjPlEjIvprWUL3RZvlLRLw==",
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.4.1.tgz",
"integrity": "sha512-AVzNO8/gg6og8T/s7M3UUQjvI4AIJNm8CSHm+kf3S0mGoJfWpfRuTD1pRTQ5tM+0pJpybyT5nDVTy97/oTD1+w==",
"requires": {
"abstract-logging": "^1.0.0",
"ajv": "^6.10.2",
"ajv": "^6.9.2",
"avvio": "^6.1.1",
"fast-json-stringify": "^1.15.0",
"find-my-way": "^2.0.0",
"flatstr": "^1.0.12",
"light-my-request": "^3.4.1",
"light-my-request": "^3.2.0",
"middie": "^4.0.1",
"pino": "^5.13.1",
"pino": "^5.11.1",
"proxy-addr": "^2.0.4",
"readable-stream": "^3.1.1",
"rfdc": "^1.1.2",
@@ -401,9 +395,9 @@
}
},
"find-my-way": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-2.1.0.tgz",
"integrity": "sha512-Hdx6ctcrzkZH5y9EREHtXryXAgc5Bc8z5Cvoa61y9kaoYj2KU4yXD6h8b6u0NUkYPVmQQeRdf0AtG1kQxQ+ukQ==",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-2.0.1.tgz",
"integrity": "sha512-c+YnWk4LKcWSNu743wfoqNOZTYQ6kZ/kzZCjALGblLpzbEAv3INakGMZ1K/by+Wmf/NP3+3LpOQMOFw6/q52wQ==",
"requires": {
"fast-decode-uri-component": "^1.0.0",
"safe-regex2": "^2.0.0",
@@ -416,11 +410,26 @@
"integrity": "sha512-4zPxDyhCyiN2wIAtSLI6gc82/EjqZc1onI4Mz/l0pWrAlsSfYH/2ZIcU+e3oA2wDwbzIWNKwa23F8rh6+DRWkw=="
},
"follow-redirects": {
"version": "1.5.10",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
"integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz",
"integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==",
"requires": {
"debug": "=3.1.0"
"debug": "^3.2.6"
},
"dependencies": {
"debug": {
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "^2.1.1"
}
},
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
}
}
},
"form-data": {
@@ -446,9 +455,9 @@
"integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
},
"google-libphonenumber": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.3.tgz",
"integrity": "sha512-8n4JyRptifaIRlHANKRlfqLR8fANm7+Q+1qvDuUsUeStSLtLGTVsZWe1llWDfgWTm1y07cEUyiRuNIv6cs2ovg=="
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.2.tgz",
"integrity": "sha512-ubjGeosYPeusjYbUHy76lCniGTTI0k1rIFc+uKBX+jHQLDmWOSUtlFUxaeoLJ+Y+PAMM6dWp+C1HjHx5BI8kEw=="
},
"has-flag": {
"version": "3.0.0",
@@ -466,9 +475,9 @@
"integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA=="
},
"is-buffer": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
"integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw=="
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
},
"is-promise": {
"version": "2.1.0",
@@ -476,9 +485,9 @@
"integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o="
},
"iterare": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.0.tgz",
"integrity": "sha512-RxMV9p/UzdK0Iplnd8mVgRvNdXlsTOiuDrqMRnDi3wIhbT+JP4xDquAX9ay13R3CH72NBzQ91KWe0+C168QAyQ=="
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/iterare/-/iterare-1.1.2.tgz",
"integrity": "sha512-25rVYmj/dDvTR6zOa9jY1Ihd6USLa0J508Ub2iy7Aga+xu9JMbjDds2Uh03ReDGbva/YN3s3Ybi+Do0nOX6wAg=="
},
"json-schema-traverse": {
"version": "0.4.1",
@@ -491,9 +500,9 @@
"integrity": "sha512-jc8ZbUnYIWdxERFWQKVgwSLkGSe+kyzvmYxwNaRgx/c8NNyuHes4UHnPM3LUrAFXUx1BhNJ94n1h/KCRlbvV0g=="
},
"light-my-request": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-3.4.1.tgz",
"integrity": "sha512-E1zMvRWjqsaCS60dTkD7c//xKV1KOFD2zo92Ru3o3e95lCfQSDCC9aS8MZm1V+zXaA/SeKDwK9gvrfaCseTusg==",
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-3.3.0.tgz",
"integrity": "sha512-dLtwhjzbuHJ+KMMUBSlVid6Iqxx+KKvULWLnBD06WMgPHxiPkEh1cVyj+Xc8HGU64hULlSw/sZVCdFsvjNQeNA==",
"requires": {
"ajv": "^6.8.1",
"readable-stream": "^3.1.1"
@@ -567,7 +576,8 @@
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"dev": true
},
"next-tick": {
"version": "1.0.0",
@@ -595,22 +605,22 @@
"integrity": "sha512-ZOtfhPttCrqp2M1PBBH4X13XlvnfhIwD7yCLx+GoGoXRPQyxGOTdQMpIzPSPKXAJT/JQrdfFrgdJOyAzvgpQ9A=="
},
"pino": {
"version": "5.13.1",
"resolved": "https://registry.npmjs.org/pino/-/pino-5.13.1.tgz",
"integrity": "sha512-IxusG28L0g50uuf21kZELypdFOeNrJ/kRhktdi7LtdZQWCxLliMxG5iOrGUQ/ng7MiJ4XqXi/hfyXwZeKc1MxA==",
"version": "5.12.5",
"resolved": "https://registry.npmjs.org/pino/-/pino-5.12.5.tgz",
"integrity": "sha512-Y493vt9ci7Jez3WZ/aUArijTQZXbHgWvDB3TMZlTu731p2kan/qyJk5k46aveEmYFnTlEommc+PSncUcuiMrBg==",
"requires": {
"fast-redact": "^1.4.4",
"fast-safe-stringify": "^2.0.6",
"flatstr": "^1.0.9",
"pino-std-serializers": "^2.3.0",
"quick-format-unescaped": "^3.0.2",
"sonic-boom": "^0.7.5"
"sonic-boom": "^0.7.3"
}
},
"pino-std-serializers": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-2.4.2.tgz",
"integrity": "sha512-WaL504dO8eGs+vrK+j4BuQQq6GLKeCCcHaMB2ItygzVURcL1CycwNEUHTD/lHFHs/NL5qAz2UKrjYWXKSf4aMQ=="
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-2.4.1.tgz",
"integrity": "sha512-v/JglhO0aFcvkMV9VUxhgyuJo8K1si857Ww86Tx8H2cjC/kp0ndzzcF6Vbxr4RgKFYJdHfLVpEuD55znMZuxnw=="
},
"process-nextick-args": {
"version": "2.0.0",
@@ -644,9 +654,9 @@
"integrity": "sha512-FXTaCkwvpIlkdKeGDNgcq07SXWS383noQUuZjvdE1QcTt+eLuqof6/BDiEPqB59FWLie/l91+HtlJSw7iCViSA=="
},
"readable-stream": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz",
"integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==",
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
"integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
@@ -705,11 +715,11 @@
"integrity": "sha512-TcZvGMMy9vodEFSse30lWinkj+JgOBvPn8wRItpQRSayhc+4ssDs335uklkfvQQJgL/WvmHLVj4Ycv2s7QCQMg=="
},
"sonic-boom": {
"version": "0.7.5",
"resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.5.tgz",
"integrity": "sha512-1pKrnAV6RfvntPnarY71tpthFTM3pWZWWQdghZY8ARjtDPGzG/inxqSuRwQY/7V1woUjfyxPb437zn4p5phgnQ==",
"version": "0.7.4",
"resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.4.tgz",
"integrity": "sha512-8JRAJg0RxZtFLQMxolwETvWd2JSlH3ZGo/Z4xPxMbpqF14xCgVYPVeFCFOR3zyr3pcfG82QDVj6537Sx5ZWdNw==",
"requires": {
"flatstr": "^1.0.12"
"flatstr": "^1.0.9"
}
},
"source-map": {
@@ -819,9 +829,9 @@
"integrity": "sha512-k/vdHz+bFALjmik0URLWBYNuO0hCABTL5dullbZBXvFDdlL8RrKaeLR6YuHfX+6ZXOLkHw+HpNLCUA7DtLMQmg=="
},
"ts-node": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz",
"integrity": "sha512-dyNS/RqyVTDcmNM4NIBAeDMpsAdaQ+ojdf0GOLqE6nwJOgzEkdRNzJywhDfwnuvB10oa6NLVG1rUJQCpRN7qoQ==",
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.2.0.tgz",
"integrity": "sha512-m8XQwUurkbYqXrKqr3WHCW310utRNvV5OnRVeISeea7LoCWVcdfeB/Ntl8JYWFh+WRoUAdBgESrzKochQt7sMw==",
"dev": true,
"requires": {
"arg": "^4.1.0",
@@ -836,15 +846,10 @@
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
},
"type": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/type/-/type-1.0.1.tgz",
"integrity": "sha512-MAM5dBMJCJNKs9E7JXo4CXRAansRfG0nlJxW7Wf6GZzSOvH31zClSaHdIMWLehe/EGMBkqeC55rrkaOr5Oo7Nw=="
},
"typescript": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz",
"integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g=="
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.1.tgz",
"integrity": "sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw=="
},
"uri-js": {
"version": "4.2.2",
@@ -865,9 +870,9 @@
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
},
"validator": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-11.1.0.tgz",
"integrity": "sha512-qiQ5ktdO7CD6C/5/mYV4jku/7qnqzjrxb3C/Q5wR3vGGinHTgJZN/TdFT3ZX4vXhX2R1PXx42fB1cn5W+uJ4lg=="
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-10.4.0.tgz",
"integrity": "sha512-Q/wBy3LB1uOyssgNlXSRmaf22NxjvDNZM2MtIQ4jaEOAB61xsh1TQxsq1CgzUMBV1lDrVMogIh8GjG1DYW0zLg=="
},
"yn": {
"version": "3.1.0",

View File

@@ -7,21 +7,21 @@
"start": "ts-node src/main"
},
"dependencies": {
"@nestjs/common": "6.5.3",
"@nestjs/core": "6.5.3",
"@nestjs/microservices": "6.5.3",
"@nestjs/testing": "6.5.3",
"@nestjs/websockets": "6.5.3",
"@nestjs/common": "6.2.4",
"@nestjs/core": "6.2.4",
"@nestjs/microservices": "6.2.4",
"@nestjs/testing": "6.2.4",
"@nestjs/websockets": "6.2.4",
"class-transformer": "0.2.3",
"class-validator": "0.10.0",
"fastify": "2.7.1",
"class-validator": "0.9.1",
"fastify": "2.4.1",
"reflect-metadata": "0.1.13",
"rxjs": "6.5.2",
"typescript": "3.5.3"
"typescript": "3.5.1"
},
"devDependencies": {
"@types/node": "7.10.7",
"@types/node": "7.10.6",
"supertest": "4.0.2",
"ts-node": "8.3.0"
"ts-node": "8.2.0"
}
}

View File

@@ -1,7 +1,6 @@
import {
CanActivate,
ExecutionContext,
Inject,
Injectable,
Scope,
} from '@nestjs/common';
@@ -10,16 +9,13 @@ import { Observable } from 'rxjs';
@Injectable({ scope: Scope.REQUEST })
export class Guard implements CanActivate {
static COUNTER = 0;
static REQUEST_SCOPED_DATA = [];
constructor(@Inject('REQUEST_ID') private requestId: number) {
constructor() {
Guard.COUNTER++;
}
canActivate(
context: ExecutionContext,
): boolean | Promise<boolean> | Observable<boolean> {
Guard.REQUEST_SCOPED_DATA.push(this.requestId);
return true;
}
}

View File

@@ -1,19 +1,11 @@
import { DynamicModule, Inject, Module, Provider, Scope } from '@nestjs/common';
import { DynamicModule, Inject, Module, Provider } from '@nestjs/common';
import { HelloController } from './hello.controller';
import { HelloService } from './hello.service';
import { UsersService } from './users/users.service';
@Module({
controllers: [HelloController],
providers: [
HelloService,
UsersService,
{
provide: 'REQUEST_ID',
useFactory: () => 1,
scope: Scope.REQUEST,
},
],
providers: [HelloService, UsersService],
})
export class HelloModule {
constructor(@Inject('META') private readonly meta) {}

View File

@@ -1,7 +1,6 @@
import {
CallHandler,
ExecutionContext,
Inject,
Injectable,
NestInterceptor,
Scope,
@@ -11,14 +10,10 @@ import { Observable } from 'rxjs';
@Injectable({ scope: Scope.REQUEST })
export class Interceptor implements NestInterceptor {
static COUNTER = 0;
static REQUEST_SCOPED_DATA = [];
constructor(@Inject('REQUEST_ID') private requestId: number) {
constructor() {
Interceptor.COUNTER++;
}
intercept(context: ExecutionContext, call: CallHandler): Observable<any> {
Interceptor.REQUEST_SCOPED_DATA.push(this.requestId);
return call.handle();
}
}

View File

@@ -1,25 +1,14 @@
import {
ArgumentMetadata,
Inject,
Injectable,
PipeTransform,
} from '@nestjs/common';
import { ArgumentMetadata, Injectable, PipeTransform } from '@nestjs/common';
import { UsersService } from './users.service';
@Injectable()
export class UserByIdPipe implements PipeTransform<string> {
static COUNTER = 0;
static REQUEST_SCOPED_DATA = [];
constructor(
@Inject('REQUEST_ID') private requestId: number,
private readonly usersService: UsersService,
) {
constructor(private readonly usersService: UsersService) {
UserByIdPipe.COUNTER++;
}
transform(value: string, metadata: ArgumentMetadata) {
UserByIdPipe.REQUEST_SCOPED_DATA.push(this.requestId);
return this.usersService.findById(value);
}
}

View File

@@ -1,10 +0,0 @@
import { IsString, IsNotEmpty, IsNumber } from 'class-validator';
export class TestDto {
@IsString()
@IsNotEmpty()
string: string;
@IsNumber()
number: number;
}

View File

@@ -1,25 +0,0 @@
import {
CanActivate,
ExecutionContext,
Inject,
Injectable,
Scope,
} from '@nestjs/common';
import { Observable } from 'rxjs';
@Injectable({ scope: Scope.REQUEST })
export class Guard implements CanActivate {
static COUNTER = 0;
static REQUEST_SCOPED_DATA = [];
constructor(@Inject('REQUEST_ID') private requestId: number) {
Guard.COUNTER++;
}
canActivate(
context: ExecutionContext,
): boolean | Promise<boolean> | Observable<boolean> {
Guard.REQUEST_SCOPED_DATA.push(this.requestId);
return true;
}
}

View File

@@ -1,24 +0,0 @@
import { Controller, UseGuards, UseInterceptors } from '@nestjs/common';
import { MessagePattern } from '@nestjs/microservices';
import { Guard } from './guards/request-scoped.guard';
import { HelloService } from './hello.service';
import { Interceptor } from './interceptors/logging.interceptor';
import { UsersService } from './users/users.service';
@Controller()
export class HelloController {
static COUNTER = 0;
constructor(
private readonly helloService: HelloService,
private readonly usersService: UsersService,
) {
HelloController.COUNTER++;
}
@UseGuards(Guard)
@UseInterceptors(Interceptor)
@MessagePattern('test')
greeting(): string {
return this.helloService.greeting();
}
}

View File

@@ -1,28 +0,0 @@
import { DynamicModule, Inject, Module, Provider, Scope } from '@nestjs/common';
import { HelloController } from './hello.controller';
import { HelloService } from './hello.service';
import { HttpController } from './http.controller';
import { UsersService } from './users/users.service';
@Module({
controllers: [HelloController, HttpController],
providers: [
HelloService,
UsersService,
{
provide: 'REQUEST_ID',
useFactory: () => 1,
scope: Scope.REQUEST,
},
],
})
export class HelloModule {
constructor(@Inject('META') private readonly meta) {}
static forRoot(meta: Provider): DynamicModule {
return {
module: HelloModule,
providers: [meta],
};
}
}

View File

@@ -1,10 +0,0 @@
import { Inject, Injectable, Scope } from '@nestjs/common';
@Injectable({ scope: Scope.REQUEST })
export class HelloService {
constructor(@Inject('META') private readonly meta) {}
greeting(): string {
return 'Hello world!';
}
}

View File

@@ -1,13 +0,0 @@
import { Controller, Get } from '@nestjs/common';
import { ClientProxyFactory, Transport } from '@nestjs/microservices';
@Controller()
export class HttpController {
@Get('hello')
testMsvc() {
const client = ClientProxyFactory.create({
transport: Transport.TCP,
});
return client.send('test', { test: true });
}
}

View File

@@ -1,24 +0,0 @@
import {
CallHandler,
ExecutionContext,
Inject,
Injectable,
NestInterceptor,
Scope,
} from '@nestjs/common';
import { Observable } from 'rxjs';
@Injectable({ scope: Scope.REQUEST })
export class Interceptor implements NestInterceptor {
static COUNTER = 0;
static REQUEST_SCOPED_DATA = [];
constructor(@Inject('REQUEST_ID') private requestId: number) {
Interceptor.COUNTER++;
}
intercept(context: ExecutionContext, call: CallHandler): Observable<any> {
Interceptor.REQUEST_SCOPED_DATA.push(this.requestId);
return call.handle();
}
}

View File

@@ -1,13 +0,0 @@
import { Inject, Injectable, Scope } from '@nestjs/common';
@Injectable({ scope: Scope.REQUEST })
export class UsersService {
static COUNTER = 0;
constructor(@Inject('META') private readonly meta) {
UsersService.COUNTER++;
}
findById(id: string) {
return { id };
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -9,24 +9,24 @@
"start:prod": "node dist/main.js"
},
"dependencies": {
"@nestjs/common": "6.5.3",
"@nestjs/core": "6.5.3",
"@nestjs/graphql": "6.4.2",
"apollo-server-express": "2.8.1",
"@nestjs/common": "6.2.4",
"@nestjs/core": "6.2.4",
"@nestjs/graphql": "6.2.1",
"apollo-server-express": "2.5.0",
"class-transformer": "0.2.3",
"class-validator": "0.10.0",
"graphql": "14.5.0",
"graphql-tools": "4.0.5",
"class-validator": "0.9.1",
"graphql": "14.3.1",
"graphql-tools": "4.0.4",
"reflect-metadata": "0.1.13",
"rxjs": "6.5.2",
"subscriptions-transport-ws": "0.9.16",
"type-graphql": "0.17.5",
"typescript": "3.5.3",
"ws": "7.1.2"
"type-graphql": "0.17.4",
"typescript": "3.5.1",
"ws": "7.0.0"
},
"devDependencies": {
"@types/node": "7.10.7",
"ts-node": "8.3.0",
"tslint": "5.19.0"
"@types/node": "7.10.6",
"ts-node": "8.2.0",
"tslint": "5.16.0"
}
}

View File

@@ -5,18 +5,18 @@
"requires": true,
"dependencies": {
"@babel/code-frame": {
"version": "7.5.5",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
"integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==",
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz",
"integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==",
"dev": true,
"requires": {
"@babel/highlight": "^7.0.0"
}
},
"@babel/highlight": {
"version": "7.5.0",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz",
"integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==",
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz",
"integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==",
"dev": true,
"requires": {
"chalk": "^2.0.0",
@@ -25,40 +25,40 @@
}
},
"@nestjs/common": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.2.4.tgz",
"integrity": "sha512-YZvJ6/S7yVQZK+9rupCzMCg4tpbc9DyVvLoTx0NBDqExTCUNcNEcCtn0AZrO/hLqbeYODnJwGE2NxkH1R/qw+w==",
"requires": {
"axios": "0.19.0",
"axios": "0.18.0",
"cli-color": "1.4.0",
"uuid": "3.3.2"
}
},
"@nestjs/core": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.2.4.tgz",
"integrity": "sha512-aYKi3QGKmpxF6w32STAcobIqOHFqSUXrU8nF+Y9dOlStRkXFBTuVchsoJk94sY+3y4SJAlHH4Q/8R4yFaixrug==",
"requires": {
"@nuxtjs/opencollective": "0.2.2",
"@nuxtjs/opencollective": "0.2.1",
"fast-safe-stringify": "2.0.6",
"iterare": "1.2.0",
"iterare": "1.1.2",
"object-hash": "1.3.1",
"optional": "0.1.4",
"uuid": "3.3.2"
}
},
"@nestjs/typeorm": {
"version": "6.1.3",
"resolved": "https://registry.npmjs.org/@nestjs/typeorm/-/typeorm-6.1.3.tgz",
"integrity": "sha512-860tNwms0d/pnuZNEBZCFl5FjzCGG67V8TYuPIVu66jFK/Hmq2WH/GxiC8L77rWPn/o2O5LSe51lgO95GPysGw==",
"version": "6.1.1",
"resolved": "https://registry.npmjs.org/@nestjs/typeorm/-/typeorm-6.1.1.tgz",
"integrity": "sha512-KCtRYiftUfvU4QE0mlhNUHEVfo9LmFHZ7QPcSxgmV00Tf62lGX0P2vJ0Ee6zHrgPuT4TzUn+SkX70ZdeQxio3Q==",
"requires": {
"uuid": "3.3.2"
}
},
"@nuxtjs/opencollective": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.2.2.tgz",
"integrity": "sha512-69gFVDs7mJfNjv9Zs5DFVD+pvBW+k1TaHSOqUWqAyTTfLcKI/EMYQgvEvziRd+zAFtUOoye6MfWh0qvinGISPw==",
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.2.1.tgz",
"integrity": "sha512-pzSib8NKquaTt/ns5Cc2G0BGRVJXaD+p1qfF6q7vNIMvRysorn/VF3y7gAuQpcxfF7wBbGE+dXjhIieWOUsWSw==",
"requires": {
"chalk": "^2.4.1",
"consola": "^2.3.0",
@@ -78,15 +78,15 @@
}
},
"@types/node": {
"version": "7.10.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.7.tgz",
"integrity": "sha512-4I7+hXKyq7e1deuzX9udu0hPIYqSSkdKXtjow6fMnQ3OR9qkxIErGHbGY08YrfZJrCS1ajK8lOuzd0k3n2WM4A==",
"version": "7.10.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.6.tgz",
"integrity": "sha512-d0BOAicT0tEdbdVQlLGOVul1kvg6YvbaADRCThGCz5NJ0e9r00SofcR1x69hmlCyrHuB6jd4cKzL9bMLjPnpAA==",
"dev": true
},
"ansi-regex": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
},
"ansi-styles": {
"version": "3.2.1",
@@ -121,12 +121,12 @@
}
},
"axios": {
"version": "0.19.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz",
"integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==",
"version": "0.18.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz",
"integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=",
"requires": {
"follow-redirects": "1.5.10",
"is-buffer": "^2.0.2"
"follow-redirects": "^1.3.0",
"is-buffer": "^1.1.5"
}
},
"balanced-match": {
@@ -175,9 +175,9 @@
"dev": true
},
"camelcase": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
"integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0="
},
"chalk": {
"version": "2.3.2",
@@ -210,27 +210,53 @@
}
},
"cli-highlight": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/cli-highlight/-/cli-highlight-2.1.1.tgz",
"integrity": "sha512-0y0VlNmdD99GXZHYnvrQcmHxP8Bi6T00qucGgBgGv4kJ0RyDthNnnFPupHV7PYv/OXSVk+azFbOeaW6+vGmx9A==",
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/cli-highlight/-/cli-highlight-2.1.0.tgz",
"integrity": "sha512-DxaFAFBGRaB+xueXP7jlJC5f867gZUZXz74RaxeZ9juEZM2Sm/s6ilzpz0uxKiT+Mj6TzHlibtXfG/dK5bSwDA==",
"requires": {
"chalk": "^2.3.0",
"highlight.js": "^9.6.0",
"mz": "^2.4.0",
"parse5": "^4.0.0",
"yargs": "^13.0.0"
"yargs": "^11.0.0"
},
"dependencies": {
"yargs": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz",
"integrity": "sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A==",
"requires": {
"cliui": "^4.0.0",
"decamelize": "^1.1.1",
"find-up": "^2.1.0",
"get-caller-file": "^1.0.1",
"os-locale": "^2.0.0",
"require-directory": "^2.1.1",
"require-main-filename": "^1.0.1",
"set-blocking": "^2.0.0",
"string-width": "^2.0.0",
"which-module": "^2.0.0",
"y18n": "^3.2.1",
"yargs-parser": "^9.0.2"
}
}
}
},
"cliui": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
"integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz",
"integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==",
"requires": {
"string-width": "^3.1.0",
"strip-ansi": "^5.2.0",
"wrap-ansi": "^5.1.0"
"string-width": "^2.1.1",
"strip-ansi": "^4.0.0",
"wrap-ansi": "^2.0.0"
}
},
"code-point-at": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
},
"color-convert": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz",
@@ -256,9 +282,9 @@
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"consola": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.9.0.tgz",
"integrity": "sha512-34Iue+LRcWbndFIfZc5boNizWlsrRjqIBJZTe591vImgbnq7nx2EzlrLtANj9TH2Fxm7puFJBJAOk5BhvZOddQ=="
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.6.2.tgz",
"integrity": "sha512-GNJhwvF4bJ8eiAlyB8r4WNM8kBqkl+y4DvMehMbyywoJiv37N0M6/xrKqrrZw/5maZA+UagQV8UZ+XBeuGMzUg=="
},
"core-util-is": {
"version": "1.0.2",
@@ -266,24 +292,21 @@
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"cross-spawn": {
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
"integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
"requires": {
"nice-try": "^1.0.4",
"path-key": "^2.0.1",
"semver": "^5.5.0",
"lru-cache": "^4.0.1",
"shebang-command": "^1.2.0",
"which": "^1.2.9"
}
},
"d": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
"integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
"integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
"requires": {
"es5-ext": "^0.10.50",
"type": "^1.0.1"
"es5-ext": "^0.10.9"
}
},
"debug": {
@@ -353,13 +376,13 @@
}
},
"es6-weak-map": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz",
"integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==",
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz",
"integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=",
"requires": {
"d": "1",
"es5-ext": "^0.10.46",
"es6-iterator": "^2.0.3",
"es5-ext": "^0.10.14",
"es6-iterator": "^2.0.1",
"es6-symbol": "^3.1.1"
}
},
@@ -374,9 +397,9 @@
"integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw=="
},
"esutils": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
"dev": true
},
"event-emitter": {
@@ -389,12 +412,12 @@
}
},
"execa": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
"integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz",
"integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=",
"requires": {
"cross-spawn": "^6.0.0",
"get-stream": "^4.0.0",
"cross-spawn": "^5.0.1",
"get-stream": "^3.0.0",
"is-stream": "^1.1.0",
"npm-run-path": "^2.0.0",
"p-finally": "^1.0.0",
@@ -408,38 +431,33 @@
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
},
"figlet": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/figlet/-/figlet-1.2.3.tgz",
"integrity": "sha512-+F5zdvZ66j77b8x2KCPvWUHC0UCKUMWrewxmewgPlagp3wmDpcrHMbyv/ygq/6xoxBPGQA+UJU3SMoBzKoROQQ=="
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/figlet/-/figlet-1.2.1.tgz",
"integrity": "sha512-qc8gycfnnfOmfvPl7Fi3JeTbcvdmbZkckyUVGGAM02je7Ookvu+bBfKy1I4FKqTsQHCs3ARJ76ip/k98r+OQuQ=="
},
"find-up": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
"integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
"requires": {
"locate-path": "^3.0.0"
"locate-path": "^2.0.0"
}
},
"follow-redirects": {
"version": "1.5.10",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
"integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz",
"integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==",
"requires": {
"debug": "=3.1.0"
"debug": "^3.2.6"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "2.0.0"
"ms": "^2.1.1"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
@@ -449,17 +467,14 @@
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
"integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w=="
},
"get-stream": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
"integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
"requires": {
"pump": "^3.0.0"
}
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
"integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
},
"glob": {
"version": "7.1.2",
@@ -495,9 +510,9 @@
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"highlight.js": {
"version": "9.15.8",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.15.8.tgz",
"integrity": "sha512-RrapkKQWwE+wKdF73VsOa2RQdIoO3mxwJ4P8mhbI6KYJUraUHRKM5w5zQQKXNk0xNL4UVRdulV9SBJcmzJNzVA=="
"version": "9.15.6",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.15.6.tgz",
"integrity": "sha512-zozTAWM1D6sozHo8kqhfYgsac+B+q0PmsjXeyDrYIHHcBN0zTVT66+s2GW1GZv7DbyaROdLXKdabwS/WqPyIdQ=="
},
"ieee754": {
"version": "1.1.13",
@@ -519,14 +534,14 @@
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"invert-kv": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz",
"integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA=="
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
"integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY="
},
"is-buffer": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
"integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw=="
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
},
"is-fullwidth-code-point": {
"version": "2.0.0",
@@ -554,9 +569,9 @@
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
},
"iterare": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.0.tgz",
"integrity": "sha512-RxMV9p/UzdK0Iplnd8mVgRvNdXlsTOiuDrqMRnDi3wIhbT+JP4xDquAX9ay13R3CH72NBzQ91KWe0+C168QAyQ=="
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/iterare/-/iterare-1.1.2.tgz",
"integrity": "sha512-25rVYmj/dDvTR6zOa9jY1Ihd6USLa0J508Ub2iy7Aga+xu9JMbjDds2Uh03ReDGbva/YN3s3Ybi+Do0nOX6wAg=="
},
"js-tokens": {
"version": "4.0.0",
@@ -574,22 +589,31 @@
}
},
"lcid": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz",
"integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==",
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
"integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
"requires": {
"invert-kv": "^2.0.0"
"invert-kv": "^1.0.0"
}
},
"locate-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
"integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
"integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
"requires": {
"p-locate": "^3.0.0",
"p-locate": "^2.0.0",
"path-exists": "^3.0.0"
}
},
"lru-cache": {
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz",
"integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==",
"requires": {
"pseudomap": "^1.0.2",
"yallist": "^2.1.2"
}
},
"lru-queue": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz",
@@ -613,13 +637,11 @@
}
},
"mem": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz",
"integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==",
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz",
"integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=",
"requires": {
"map-age-cleaner": "^0.1.1",
"mimic-fn": "^2.0.0",
"p-is-promise": "^2.0.0"
"mimic-fn": "^1.0.0"
}
},
"memoizee": {
@@ -638,9 +660,9 @@
}
},
"mimic-fn": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
"integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
"integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ=="
},
"minimatch": {
"version": "3.0.4",
@@ -712,6 +734,11 @@
"path-key": "^2.0.0"
}
},
"number-is-nan": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
},
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
@@ -736,13 +763,13 @@
"integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw=="
},
"os-locale": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz",
"integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==",
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz",
"integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==",
"requires": {
"execa": "^1.0.0",
"lcid": "^2.0.0",
"mem": "^4.0.0"
"execa": "^0.7.0",
"lcid": "^1.0.0",
"mem": "^1.1.0"
}
},
"p-defer": {
@@ -761,25 +788,25 @@
"integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg=="
},
"p-limit": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz",
"integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==",
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
"integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
"requires": {
"p-try": "^2.0.0"
"p-try": "^1.0.0"
}
},
"p-locate": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
"integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
"integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
"requires": {
"p-limit": "^2.0.0"
"p-limit": "^1.1.0"
}
},
"p-try": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
"integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M="
},
"parent-require": {
"version": "1.0.0",
@@ -817,6 +844,11 @@
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
},
"pseudomap": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
},
"pump": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
@@ -851,14 +883,14 @@
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
},
"require-main-filename": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
"integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE="
},
"resolve": {
"version": "1.12.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz",
"integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==",
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz",
"integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==",
"dev": true,
"requires": {
"path-parse": "^1.0.6"
@@ -937,13 +969,12 @@
"integrity": "sha1-R1OT/56RR5rqYtyvDKPRSYOn+0A="
},
"string-width": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
"requires": {
"emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^5.1.0"
"strip-ansi": "^4.0.0"
}
},
"string_decoder": {
@@ -955,11 +986,11 @@
}
},
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
"requires": {
"ansi-regex": "^4.1.0"
"ansi-regex": "^3.0.0"
}
},
"strip-eof": {
@@ -1001,9 +1032,9 @@
}
},
"ts-node": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz",
"integrity": "sha512-dyNS/RqyVTDcmNM4NIBAeDMpsAdaQ+ojdf0GOLqE6nwJOgzEkdRNzJywhDfwnuvB10oa6NLVG1rUJQCpRN7qoQ==",
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.2.0.tgz",
"integrity": "sha512-m8XQwUurkbYqXrKqr3WHCW310utRNvV5OnRVeISeea7LoCWVcdfeB/Ntl8JYWFh+WRoUAdBgESrzKochQt7sMw==",
"dev": true,
"requires": {
"arg": "^4.1.0",
@@ -1027,9 +1058,9 @@
"integrity": "sha512-avfPS28HmGLLc2o4elcc2EIq2FcH++Yo5YxpBZi9Yw93BCTGFthI4HPE4Rpep6vSYQaK8e69PelM44tPj+RaQg=="
},
"tslint": {
"version": "5.19.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.19.0.tgz",
"integrity": "sha512-1LwwtBxfRJZnUvoS9c0uj8XQtAnyhWr9KlNvDIdB+oXyT+VpsOAaEhEgKi1HrZ8rq0ki/AAnbGSv4KM6/AfVZw==",
"version": "5.16.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.16.0.tgz",
"integrity": "sha512-UxG2yNxJ5pgGwmMzPMYh/CCnCnh0HfPgtlVRDs1ykZklufFBL1ZoTlWFRz2NQjcoEiDoRp+JyT0lhBbbH/obyA==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@@ -1038,7 +1069,7 @@
"commander": "^2.12.1",
"diff": "^3.2.0",
"glob": "^7.1.1",
"js-yaml": "^3.13.1",
"js-yaml": "^3.13.0",
"minimatch": "^3.0.4",
"mkdirp": "^0.5.1",
"resolve": "^1.3.2",
@@ -1056,15 +1087,10 @@
"tslib": "^1.8.1"
}
},
"type": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/type/-/type-1.0.1.tgz",
"integrity": "sha512-MAM5dBMJCJNKs9E7JXo4CXRAansRfG0nlJxW7Wf6GZzSOvH31zClSaHdIMWLehe/EGMBkqeC55rrkaOr5Oo7Nw=="
},
"typeorm": {
"version": "0.2.18",
"resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.2.18.tgz",
"integrity": "sha512-S553GwtG5ab268+VmaLCN7gKDqFPIzUw0eGMTobJ9yr0Np62Ojfx8j1Oa9bIeh5p7Pz1/kmGabAHoP1MYK05pA==",
"version": "0.2.17",
"resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.2.17.tgz",
"integrity": "sha512-a2Yi6aG7qcSQNyYHjAZtRwhuMKt/ZPmNQg8PvpgF52Z3AgJ4LL4T5mtpfTzKgNzM4o4wP0JQcZNoGGlaRovKpw==",
"requires": {
"app-root-path": "^2.0.1",
"buffer": "^5.1.0",
@@ -1095,9 +1121,9 @@
}
},
"typescript": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz",
"integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g=="
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.1.tgz",
"integrity": "sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw=="
},
"util-deprecate": {
"version": "1.0.2",
@@ -1123,13 +1149,45 @@
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
},
"wrap-ansi": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
"integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
"integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
"requires": {
"ansi-styles": "^3.2.0",
"string-width": "^3.0.0",
"strip-ansi": "^5.0.0"
"string-width": "^1.0.1",
"strip-ansi": "^3.0.1"
},
"dependencies": {
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
},
"is-fullwidth-code-point": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"requires": {
"number-is-nan": "^1.0.0"
}
},
"string-width": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
"strip-ansi": "^3.0.0"
}
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"requires": {
"ansi-regex": "^2.0.0"
}
}
}
},
"wrappy": {
@@ -1152,9 +1210,14 @@
"integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0="
},
"y18n": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w=="
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
"integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE="
},
"yallist": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
"integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
},
"yargonaut": {
"version": "1.1.4",
@@ -1204,11 +1267,11 @@
}
},
"yargs": {
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.4.tgz",
"integrity": "sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg==",
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.2.tgz",
"integrity": "sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA==",
"requires": {
"cliui": "^5.0.0",
"cliui": "^4.0.0",
"find-up": "^3.0.0",
"get-caller-file": "^2.0.1",
"os-locale": "^3.1.0",
@@ -1218,16 +1281,179 @@
"string-width": "^3.0.0",
"which-module": "^2.0.0",
"y18n": "^4.0.0",
"yargs-parser": "^13.1.0"
"yargs-parser": "^13.0.0"
},
"dependencies": {
"ansi-regex": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
},
"camelcase": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="
},
"cross-spawn": {
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
"requires": {
"nice-try": "^1.0.4",
"path-key": "^2.0.1",
"semver": "^5.5.0",
"shebang-command": "^1.2.0",
"which": "^1.2.9"
}
},
"execa": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
"integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
"requires": {
"cross-spawn": "^6.0.0",
"get-stream": "^4.0.0",
"is-stream": "^1.1.0",
"npm-run-path": "^2.0.0",
"p-finally": "^1.0.0",
"signal-exit": "^3.0.0",
"strip-eof": "^1.0.0"
}
},
"find-up": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
"requires": {
"locate-path": "^3.0.0"
}
},
"get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
},
"get-stream": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
"integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
"requires": {
"pump": "^3.0.0"
}
},
"invert-kv": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz",
"integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA=="
},
"lcid": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz",
"integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==",
"requires": {
"invert-kv": "^2.0.0"
}
},
"locate-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
"integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
"requires": {
"p-locate": "^3.0.0",
"path-exists": "^3.0.0"
}
},
"mem": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz",
"integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==",
"requires": {
"map-age-cleaner": "^0.1.1",
"mimic-fn": "^2.0.0",
"p-is-promise": "^2.0.0"
}
},
"mimic-fn": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
"integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="
},
"os-locale": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz",
"integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==",
"requires": {
"execa": "^1.0.0",
"lcid": "^2.0.0",
"mem": "^4.0.0"
}
},
"p-limit": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz",
"integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==",
"requires": {
"p-try": "^2.0.0"
}
},
"p-locate": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
"integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
"requires": {
"p-limit": "^2.0.0"
}
},
"p-try": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
},
"require-main-filename": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="
},
"string-width": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"requires": {
"emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^5.1.0"
}
},
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"requires": {
"ansi-regex": "^4.1.0"
}
},
"y18n": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w=="
},
"yargs-parser": {
"version": "13.0.0",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.0.0.tgz",
"integrity": "sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw==",
"requires": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
}
}
}
},
"yargs-parser": {
"version": "13.1.0",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.0.tgz",
"integrity": "sha512-Yq+32PrijHRri0vVKQEm+ys8mbqWjLiwQkMFNXEENutzLPP0bE4Lcd4iA3OQY5HF+GD3xXxf0MEHb8E4/SA3AA==",
"version": "9.0.2",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz",
"integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=",
"requires": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
"camelcase": "^4.1.0"
}
},
"yn": {

View File

@@ -9,18 +9,18 @@
"start:prod": "node dist/main.js"
},
"dependencies": {
"@nestjs/common": "6.5.3",
"@nestjs/core": "6.5.3",
"@nestjs/typeorm": "6.1.3",
"@nestjs/common": "6.2.4",
"@nestjs/core": "6.2.4",
"@nestjs/typeorm": "6.1.1",
"mysql": "2.17.1",
"reflect-metadata": "0.1.13",
"rxjs": "6.5.2",
"typeorm": "0.2.18",
"typescript": "3.5.3"
"typeorm": "0.2.17",
"typescript": "3.5.1"
},
"devDependencies": {
"@types/node": "7.10.7",
"ts-node": "8.3.0",
"tslint": "5.19.0"
"@types/node": "7.10.6",
"ts-node": "8.2.0",
"tslint": "5.16.0"
}
}

View File

@@ -12,11 +12,12 @@ async function createNestApp(...gateways): Promise<INestApplication> {
providers: gateways,
}).compile();
const app = await testingModule.createNestApplication();
app.useWebSocketAdapter(new WsAdapter(app) as any);
app.useWebSocketAdapter(new WsAdapter(app));
return app;
}
describe('WebSocketGateway (WsAdapter)', () => {
const event = 'push';
let ws, ws2, app;
it(`should handle message (2nd port)`, async () => {
@@ -65,15 +66,10 @@ describe('WebSocketGateway (WsAdapter)', () => {
);
});
it(`should support 2 different gateways`, async function() {
this.retries(10);
it(`should support 2 different gateways`, async () => {
app = await createNestApp(ApplicationGateway, CoreGateway);
await app.listenAsync(3000);
// open websockets delay
await new Promise(resolve => setTimeout(resolve, 1000));
ws = new WebSocket('ws://localhost:8080');
ws2 = new WebSocket('ws://localhost:8090');

View File

@@ -5,58 +5,58 @@
"requires": true,
"dependencies": {
"@nestjs/common": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.2.4.tgz",
"integrity": "sha512-YZvJ6/S7yVQZK+9rupCzMCg4tpbc9DyVvLoTx0NBDqExTCUNcNEcCtn0AZrO/hLqbeYODnJwGE2NxkH1R/qw+w==",
"requires": {
"axios": "0.19.0",
"axios": "0.18.0",
"cli-color": "1.4.0",
"uuid": "3.3.2"
}
},
"@nestjs/core": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.2.4.tgz",
"integrity": "sha512-aYKi3QGKmpxF6w32STAcobIqOHFqSUXrU8nF+Y9dOlStRkXFBTuVchsoJk94sY+3y4SJAlHH4Q/8R4yFaixrug==",
"requires": {
"@nuxtjs/opencollective": "0.2.2",
"@nuxtjs/opencollective": "0.2.1",
"fast-safe-stringify": "2.0.6",
"iterare": "1.2.0",
"iterare": "1.1.2",
"object-hash": "1.3.1",
"optional": "0.1.4",
"uuid": "3.3.2"
}
},
"@nestjs/microservices": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.5.3.tgz",
"integrity": "sha512-T9zZf61myahenI4c0qhcYnhnx49L+zL9+8W6fc+LPTarbt1HJDu6iyj6fh2BzewakwNLJRyGMJ9YCYlXhFuvlA==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.2.4.tgz",
"integrity": "sha512-aVXLPPTL2nUf4EVBcuqbCRFN62BDhFjxSy49BIpMTDqbaSOZPgfhfwyotDI6sAG0cJq4zWvU/OCC2/NkLq9Ryg==",
"requires": {
"iterare": "1.2.0",
"iterare": "1.1.2",
"json-socket": "0.3.0",
"optional": "0.1.4"
}
},
"@nestjs/testing": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.5.3.tgz",
"integrity": "sha512-W8tPhkNVhmX+jaDu4R7WUOtIl0PK3ZDso434rEm/b1+S6ZRgAKwNVHWM/rwIuTi5+erPTEULtTsZgrXFrzC1sA==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.2.4.tgz",
"integrity": "sha512-l5uxeNz+CksHaVcHxSlpo0vyJxvZP7BM1vS6BKuqtn/lNlIITAkdWmCVfBldN8Okayj3B2yhc04Zq6imU3aX9w==",
"requires": {
"optional": "0.1.4"
}
},
"@nestjs/websockets": {
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.5.3.tgz",
"integrity": "sha512-YrCvmLHTW0OBusTiUOPrG0PNrw/3Gatty/bh3ro5cEoiovcaJxGSMsTC+JSVXqPwRJjEtoHMCr5Qje2rAepIzQ==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.2.4.tgz",
"integrity": "sha512-3cpEZz/uTTHiMXX6d+lXH9Wg7Rtla36Oc3JTmQtuGc1KlAIs3wzJRO/qU/LfLuYrNeqAAFVq8EHW3DkjPFxXjg==",
"requires": {
"iterare": "1.2.0"
"iterare": "1.1.2"
}
},
"@nuxtjs/opencollective": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.2.2.tgz",
"integrity": "sha512-69gFVDs7mJfNjv9Zs5DFVD+pvBW+k1TaHSOqUWqAyTTfLcKI/EMYQgvEvziRd+zAFtUOoye6MfWh0qvinGISPw==",
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.2.1.tgz",
"integrity": "sha512-pzSib8NKquaTt/ns5Cc2G0BGRVJXaD+p1qfF6q7vNIMvRysorn/VF3y7gAuQpcxfF7wBbGE+dXjhIieWOUsWSw==",
"requires": {
"chalk": "^2.4.1",
"consola": "^2.3.0",
@@ -64,16 +64,11 @@
}
},
"@types/node": {
"version": "7.10.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.7.tgz",
"integrity": "sha512-4I7+hXKyq7e1deuzX9udu0hPIYqSSkdKXtjow6fMnQ3OR9qkxIErGHbGY08YrfZJrCS1ajK8lOuzd0k3n2WM4A==",
"version": "7.10.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.6.tgz",
"integrity": "sha512-d0BOAicT0tEdbdVQlLGOVul1kvg6YvbaADRCThGCz5NJ0e9r00SofcR1x69hmlCyrHuB6jd4cKzL9bMLjPnpAA==",
"dev": true
},
"@types/validator": {
"version": "10.11.2",
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.2.tgz",
"integrity": "sha512-k/ju1RsdP5ACFUWebqsyEy0avP5uNJCs2p3pmTHzOZdd4gMSAJTq7iUEHFY3tt3emBrPTm6oGvfZ4SzcqOgLPQ=="
},
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
@@ -100,12 +95,12 @@
"dev": true
},
"axios": {
"version": "0.19.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz",
"integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==",
"version": "0.18.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz",
"integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=",
"requires": {
"follow-redirects": "1.5.10",
"is-buffer": "^2.0.2"
"follow-redirects": "^1.3.0",
"is-buffer": "^1.1.5"
}
},
"buffer-from": {
@@ -130,13 +125,12 @@
"integrity": "sha512-qsP+0xoavpOlJHuYsQJsN58HXSl8Jvveo+T37rEvCEeRfMWoytAyR0Ua/YsFgpM6AZYZ/og2PJwArwzJl1aXtQ=="
},
"class-validator": {
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.0.tgz",
"integrity": "sha512-RvjxRlvoCvM/ojUq11j78ISpReGdBoMErdmDk1e27aQZK6ppSXq751UE6jB9JI7ayEnL6Nnmllzn/HXVSu3dmg==",
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.9.1.tgz",
"integrity": "sha512-3wApflrd3ywVZyx4jaasGoFt8pmo4aGLPPAEKCKCsTRWVGPilahD88q3jQjRQwja50rl9a7rsP5LAxJYwGK8/Q==",
"requires": {
"@types/validator": "10.11.2",
"google-libphonenumber": "^3.1.6",
"validator": "11.1.0"
"validator": "10.4.0"
}
},
"cli-color": {
@@ -181,9 +175,9 @@
"dev": true
},
"consola": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.9.0.tgz",
"integrity": "sha512-34Iue+LRcWbndFIfZc5boNizWlsrRjqIBJZTe591vImgbnq7nx2EzlrLtANj9TH2Fxm7puFJBJAOk5BhvZOddQ=="
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.6.2.tgz",
"integrity": "sha512-GNJhwvF4bJ8eiAlyB8r4WNM8kBqkl+y4DvMehMbyywoJiv37N0M6/xrKqrrZw/5maZA+UagQV8UZ+XBeuGMzUg=="
},
"cookiejar": {
"version": "2.1.2",
@@ -198,19 +192,17 @@
"dev": true
},
"d": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
"integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
"integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
"requires": {
"es5-ext": "^0.10.50",
"type": "^1.0.1"
"es5-ext": "^0.10.9"
}
},
"debug": {
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"dev": true,
"requires": {
"ms": "^2.1.1"
}
@@ -257,13 +249,13 @@
}
},
"es6-weak-map": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz",
"integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==",
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz",
"integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=",
"requires": {
"d": "1",
"es5-ext": "^0.10.46",
"es6-iterator": "^2.0.3",
"es5-ext": "^0.10.14",
"es6-iterator": "^2.0.1",
"es6-symbol": "^3.1.1"
}
},
@@ -293,26 +285,11 @@
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
},
"follow-redirects": {
"version": "1.5.10",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
"integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.7.0.tgz",
"integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==",
"requires": {
"debug": "=3.1.0"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
"debug": "^3.2.6"
}
},
"form-data": {
@@ -333,9 +310,9 @@
"dev": true
},
"google-libphonenumber": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.3.tgz",
"integrity": "sha512-8n4JyRptifaIRlHANKRlfqLR8fANm7+Q+1qvDuUsUeStSLtLGTVsZWe1llWDfgWTm1y07cEUyiRuNIv6cs2ovg=="
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.2.tgz",
"integrity": "sha512-ubjGeosYPeusjYbUHy76lCniGTTI0k1rIFc+uKBX+jHQLDmWOSUtlFUxaeoLJ+Y+PAMM6dWp+C1HjHx5BI8kEw=="
},
"has-flag": {
"version": "3.0.0",
@@ -349,9 +326,9 @@
"dev": true
},
"is-buffer": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
"integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw=="
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
},
"is-promise": {
"version": "2.1.0",
@@ -359,9 +336,9 @@
"integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o="
},
"iterare": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.0.tgz",
"integrity": "sha512-RxMV9p/UzdK0Iplnd8mVgRvNdXlsTOiuDrqMRnDi3wIhbT+JP4xDquAX9ay13R3CH72NBzQ91KWe0+C168QAyQ=="
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/iterare/-/iterare-1.1.2.tgz",
"integrity": "sha512-25rVYmj/dDvTR6zOa9jY1Ihd6USLa0J508Ub2iy7Aga+xu9JMbjDds2Uh03ReDGbva/YN3s3Ybi+Do0nOX6wAg=="
},
"json-socket": {
"version": "0.3.0",
@@ -427,8 +404,7 @@
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
"dev": true
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
},
"next-tick": {
"version": "1.0.0",
@@ -575,9 +551,9 @@
}
},
"ts-node": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz",
"integrity": "sha512-dyNS/RqyVTDcmNM4NIBAeDMpsAdaQ+ojdf0GOLqE6nwJOgzEkdRNzJywhDfwnuvB10oa6NLVG1rUJQCpRN7qoQ==",
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.2.0.tgz",
"integrity": "sha512-m8XQwUurkbYqXrKqr3WHCW310utRNvV5OnRVeISeea7LoCWVcdfeB/Ntl8JYWFh+WRoUAdBgESrzKochQt7sMw==",
"dev": true,
"requires": {
"arg": "^4.1.0",
@@ -592,15 +568,10 @@
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
},
"type": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/type/-/type-1.0.1.tgz",
"integrity": "sha512-MAM5dBMJCJNKs9E7JXo4CXRAansRfG0nlJxW7Wf6GZzSOvH31zClSaHdIMWLehe/EGMBkqeC55rrkaOr5Oo7Nw=="
},
"typescript": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz",
"integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g=="
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.1.tgz",
"integrity": "sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw=="
},
"util-deprecate": {
"version": "1.0.2",
@@ -614,9 +585,9 @@
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
},
"validator": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-11.1.0.tgz",
"integrity": "sha512-qiQ5ktdO7CD6C/5/mYV4jku/7qnqzjrxb3C/Q5wR3vGGinHTgJZN/TdFT3ZX4vXhX2R1PXx42fB1cn5W+uJ4lg=="
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-10.4.0.tgz",
"integrity": "sha512-Q/wBy3LB1uOyssgNlXSRmaf22NxjvDNZM2MtIQ4jaEOAB61xsh1TQxsq1CgzUMBV1lDrVMogIh8GjG1DYW0zLg=="
},
"yn": {
"version": "3.1.0",

View File

@@ -7,20 +7,20 @@
"start": "ts-node src/main"
},
"dependencies": {
"@nestjs/common": "6.5.3",
"@nestjs/core": "6.5.3",
"@nestjs/microservices": "6.5.3",
"@nestjs/testing": "6.5.3",
"@nestjs/websockets": "6.5.3",
"@nestjs/common": "6.2.4",
"@nestjs/core": "6.2.4",
"@nestjs/microservices": "6.2.4",
"@nestjs/testing": "6.2.4",
"@nestjs/websockets": "6.2.4",
"class-transformer": "0.2.3",
"class-validator": "0.10.0",
"class-validator": "0.9.1",
"reflect-metadata": "0.1.13",
"rxjs": "6.5.2",
"typescript": "3.5.3"
"typescript": "3.5.1"
},
"devDependencies": {
"@types/node": "7.10.7",
"@types/node": "7.10.6",
"supertest": "4.0.2",
"ts-node": "8.3.0"
"ts-node": "8.2.0"
}
}

View File

@@ -3,5 +3,5 @@
"packages": [
"packages/*"
],
"version": "6.5.3"
"version": "6.2.4"
}

6084
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,18 +1,18 @@
{
"name": "@nestjs/core",
"version": "6.5.3",
"name": "nestjs-monorepo",
"version": "6.2.4",
"private": true,
"description": "Modern, fast, powerful node.js web framework",
"scripts": {
"coverage": "nyc report --reporter=text-lcov | coveralls",
"test": "nyc --require ts-node/register mocha packages/**/*.spec.ts --reporter spec --retries 3 --require 'node_modules/reflect-metadata/Reflect.js'",
"integration-test": "mocha \"integration/*/{,!(node_modules)/**/}/*.spec.ts\" --reporter spec --require ts-node/register --require 'node_modules/reflect-metadata/Reflect.js'",
"integration-test": "mocha integration/**/*.spec.ts --reporter spec --require ts-node/register --require 'node_modules/reflect-metadata/Reflect.js'",
"lint": "tslint -p tsconfig.json -c tslint.json \"packages/**/*.ts\" -e \"*.spec.ts\"",
"format": "prettier **/**/*.ts --ignore-path ./.prettierignore --write && git status",
"clean": "gulp clean:bundle",
"build": "npm run clean && gulp build",
"prebuild:dev": "rm -rf node_modules/@nestjs",
"build:dev": "gulp build --dist node_modules/@nestjs && gulp move",
"build:samples": "gulp install:samples && npm run build:dev && gulp build:samples",
"postinstall": "opencollective",
"prerelease": "gulp copy-misc && gulp build --dist node_modules/@nestjs",
"publish": "npm run prerelease && npm run build && ./node_modules/.bin/lerna publish --force-publish --access public --exact -m \"chore(@nestjs) publish %s release\"",
@@ -31,39 +31,39 @@
"author": "Kamil Mysliwiec",
"license": "MIT",
"dependencies": {
"@grpc/proto-loader": "0.5.1",
"@grpc/proto-loader": "0.3.0",
"@nestjs/common": "6.1.1",
"@nestjs/core": "6.1.1",
"@nestjs/microservices": "6.1.1",
"@nestjs/testing": "6.1.1",
"@nestjs/websockets": "6.1.1",
"@nuxtjs/opencollective": "0.2.2",
"amqp-connection-manager": "3.0.0",
"amqplib": "0.5.5",
"apollo-server-express": "2.8.1",
"axios": "0.19.0",
"cache-manager": "2.10.0",
"@nuxtjs/opencollective": "0.2.1",
"amqp-connection-manager": "2.3.2",
"amqplib": "0.5.3",
"apollo-server-express": "2.5.0",
"axios": "0.18.0",
"cache-manager": "2.9.1",
"class-transformer": "0.2.3",
"class-validator": "0.10.0",
"class-validator": "0.9.1",
"cli-color": "1.4.0",
"connect": "3.7.0",
"cors": "2.8.5",
"engine.io-client": "3.3.2",
"express": "4.17.1",
"fast-json-stringify": "1.15.4",
"fast-json-stringify": "1.15.3",
"fast-safe-stringify": "2.0.6",
"fastify": "2.7.1",
"fastify": "2.4.1",
"fastify-cors": "2.1.3",
"fastify-formbody": "3.1.0",
"fastify-multipart": "1.0.2",
"graphql": "14.5.0",
"grpc": "1.23.3",
"fastify-multipart": "1.0.0",
"graphql": "14.3.1",
"grpc": "1.21.1",
"http2": "3.3.7",
"iterare": "1.2.0",
"merge-graphql-schemas": "1.7.0",
"iterare": "1.1.2",
"merge-graphql-schemas": "1.5.8",
"mqtt": "3.0.0",
"multer": "1.4.2",
"nats": "1.3.0",
"multer": "1.4.1",
"nats": "1.2.10",
"object-hash": "1.3.1",
"optional": "0.1.4",
"path-to-regexp": "3.0.0",
@@ -73,40 +73,38 @@
"rxjs": "6.5.2",
"rxjs-compat": "6.5.2",
"socket.io": "2.2.0",
"ts-morph": "3.1.3",
"uuid": "3.3.3"
"ts-morph": "2.0.1",
"uuid": "3.3.2"
},
"devDependencies": {
"@types/amqplib": "0.5.13",
"@types/cache-manager": "1.2.8",
"@types/chai": "4.2.0",
"@types/chai-as-promised": "7.1.2",
"@types/cors": "2.8.6",
"@types/express": "4.17.1",
"@types/amqplib": "0.5.12",
"@types/cache-manager": "1.2.7",
"@types/chai": "4.1.7",
"@types/chai-as-promised": "7.1.0",
"@types/cors": "2.8.5",
"@types/express": "4.16.1",
"@types/fastify-cors": "2.1.0",
"@types/gulp": "4.0.6",
"@types/kafka-node": "2.0.8",
"@types/mocha": "5.2.7",
"@types/node": "10.14.16",
"@types/mocha": "5.2.6",
"@types/node": "10.14.7",
"@types/redis": "2.8.13",
"@types/reflect-metadata": "0.0.5",
"@types/sinon": "7.0.13",
"@types/sinon": "7.0.12",
"@types/socket.io": "2.1.2",
"@types/ws": "6.0.3",
"@types/ws": "6.0.1",
"artillery": "1.6.0-28",
"awesome-typescript-loader": "5.2.1",
"body-parser": "1.19.0",
"chai": "4.2.0",
"chai-as-promised": "7.1.1",
"clang-format": "1.2.4",
"concurrently": "4.1.2",
"conventional-changelog": "3.1.10",
"core-js": "3.2.1",
"coveralls": "3.0.6",
"concurrently": "4.1.0",
"conventional-changelog": "3.1.8",
"core-js": "3.1.3",
"coveralls": "3.0.3",
"csv-write-stream": "2.0.0",
"delete-empty": "3.0.0",
"fancy-log": "1.3.3",
"fastify-static": "2.5.0",
"delete-empty": "2.0.0",
"fastify-static": "2.4.0",
"gulp": "4.0.1",
"gulp-clang-format": "1.0.27",
"gulp-clean": "0.4.0",
@@ -116,19 +114,20 @@
"husky": "1.3.1",
"imports-loader": "0.8.0",
"json-loader": "0.5.7",
"lerna": "2.11.0",
"lint-staged": "9.2.3",
"lerna": "3.14.1",
"lint-staged": "8.1.7",
"memory-usage": "1.2.1",
"mocha": "3.5.3",
"nodemon": "1.19.1",
"nyc": "14.1.1",
"prettier": "1.18.2",
"sinon": "7.4.1",
"prettier": "1.17.1",
"sinon": "7.3.2",
"sinon-chai": "3.3.0",
"socket.io-client": "2.2.0",
"supertest": "4.0.2",
"ts-node": "8.3.0",
"tslint": "5.19.0",
"typescript": "3.5.3"
"ts-node": "8.2.0",
"tslint": "5.16.0",
"typescript": "3.5.1"
},
"collective": {
"type": "opencollective",

View File

@@ -1 +0,0 @@
The common package comes with decorators such as `@Controller()`, `@Injectable()` and so on.

View File

@@ -15,6 +15,7 @@
<a href="https://travis-ci.org/nestjs/nest" target="_blank"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
<a href="https://travis-ci.org/nestjs/nest" target="_blank"><img src="https://img.shields.io/travis/nestjs/nest/master.svg?label=linux" alt="Linux" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge" target="_blank"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
@@ -71,7 +72,6 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<a href="https://reposit.co.uk/" target="_blank"><img src="https://nestjs.com/img/reposit-logo.png" height="28" valign="middle" /></a> &nbsp; &nbsp; <a href="https://yakaz.com/" target="_blank"><img src="https://nestjs.com/img/yakaz.png" width="80" valign="middle" /></a> &nbsp;
<a href="https://nearpod.com/" target="_blank"><img src="https://nestjs.com/img/nearpod-logo.svg" width="120" valign="middle" /></a> &nbsp;
<a href="https://clay.global/" target="_blank"><img src="https://nestjs.com/img/clay-logo.svg" width="90" valign="middle" /></a> &nbsp;
<a href="https://firesticktricks.com" target="_blank"><img src="https://nestjs.com/img/firesticktricks-logo.png" width="145" valign="middle" /></a> &nbsp;
<a href="http://xtremis.com/" target="_blank"><img src="https://nestjs.com/img/logo-xtremis.svg" width="145" valign="middle" /></a>

View File

@@ -1,7 +1,7 @@
/**
* Binds parameter decorators to the method
* Useful when the language doesn't provide a 'Parameter Decorators' feature (vanilla JavaScript)
* @param ...decorators
* @param {} ...decorators
*/
export function Bind(...decorators: any[]): MethodDecorator {
return <T>(

View File

@@ -2,83 +2,17 @@ import { PATH_METADATA, SCOPE_OPTIONS_METADATA } from '../../constants';
import { isString, isUndefined } from '../../utils/shared.utils';
import { ScopeOptions } from './../../interfaces/scope-options.interface';
/**
*
* Interface defining options that can be passed to `@Controller()` decorator
* @publicApi
*/
export interface ControllerOptions extends ScopeOptions {
/**
* Specifies an optional route path prefix. When specified, the route path
* for a handler is determined by concatenating the prefix with any path
*
* @see [Routing](https://docs.nestjs.com/controllers#routing)
*/
path?: string;
}
export function Controller();
export function Controller(prefix: string);
export function Controller(options: ControllerOptions);
/**
* Decorator that marks a class as a Nest controller that can receive inbound
* requests and produce responses.
*
* HTTP Controllers optionally accept configuration
* metadata that determines route paths that route handlers in the class
* respond to, and lifetime [scope](https://docs.nestjs.com/fundamentals/injection-scopes#usage).
*
* An HTTP Controller responds to inbound HTTP Requests and produces HTTP Responses.
* It defines a class that provides the context for one or more related route
* handlers that correspond to HTTP request methods and associated routes
* (e.g., `GET /api/profile`, `POST /user/resume`).
*
* A Microservice Controller responds to Requests and Responses, as well as events,
* running over a variety of transports [(read more here)](https://docs.nestjs.com/microservices/basics). It defines
* a class that provides a context for one or more message or event handlers.
*
* @see [Controllers](https://docs.nestjs.com/controllers)
* @see [Microservices](https://docs.nestjs.com/microservices/basics#request-response)
*
* @usageNotes
*
* ### Setting controller options
* The controller decorator takes an optional options object in plain JSON format.
* This object can take properties `path` and `scope`.
*
* ### Setting the default route path prefix
* The following example sets `cats` as the default route path prefix for all route
* handlers in this controller. When simply passing a route prefix, you can pass
* it as a string as shown in the example below.
*
* ```typescript
* @Controller('cats')
* export class CatsController {
* @Get()
* findall(): string {
* return 'This action returns all cats';
* }
* }
* ```
* This route handler will respond to the request
* `GET /cats`
*
* ### Setting the injection scope
* The following example sets the scope for all requests in the controller
* to request-scoped. Each request will cause Nest to create a new instance of
* the controller.
* ```typescript
* @Controller({
* path: 'cats',
* scope: Scope.REQUEST,
* })
* export class CatsController { ... }
* ```
*
* [Read more about scopes here.](https://docs.nestjs.com/fundamentals/injection-scopes)
*
* @publicApi
* Defines the controller. Controller can inject dependencies through constructor.
* Those dependencies have to belong to the same module.
*/
export function Controller(): ClassDecorator;
export function Controller(prefix: string): ClassDecorator;
export function Controller(options: ControllerOptions): ClassDecorator;
export function Controller(
prefixOrOptions?: string | ControllerOptions,
): ClassDecorator {
@@ -86,8 +20,8 @@ export function Controller(
const [path, scopeOptions] = isUndefined(prefixOrOptions)
? [defaultPath, undefined]
: isString(prefixOrOptions)
? [prefixOrOptions, undefined]
: [prefixOrOptions.path || defaultPath, { scope: prefixOrOptions.scope }];
? [prefixOrOptions, undefined]
: [prefixOrOptions.path || defaultPath, { scope: prefixOrOptions.scope }];
return (target: object) => {
Reflect.defineMetadata(PATH_METADATA, path, target);

View File

@@ -5,81 +5,9 @@ import {
import { isFunction, isUndefined } from '../../utils/shared.utils';
/**
* Decorator that marks a constructor parameter as a target for
* [Dependency Injection (DI)](https://docs.nestjs.com/providers#dependency-injection). Takes a single
* required parameter which is the
* [injection token](https://docs.nestjs.com/fundamentals/custom-providers). The injection token serves
* as the lookup key for the [provider](https://docs.nestjs.com/providers) that will be injected
* (assigned to the constructor parameter).
*
* Injection tokens can be types (class names), strings or symbols. This depends
* on how the provider with which it is associated was defined. Providers
* defined with the `@Injectable()` decorator use the class name. Custom
* Providers may use strings or symbols as the injection token.
*
* Any injected provider must be visible within the module scope (loosely
* speaking, the containing module) of the class it is being injected into. This
* can be done by:
*
* - defining the provider in the same module scope
* - exporting the provider from one module scope and importing that module into the
* module scope of the class being injected into
* - exporting the provider from a module that is marked as global using the
* `@Global()` decorator
*
* @see [Providers](https://docs.nestjs.com/providers)
* @see [Custom Providers](https://docs.nestjs.com/fundamentals/custom-providers)
* @see [Injection Scopes](https://docs.nestjs.com/fundamentals/injection-scopes)
*
* @usageNotes
*
* #### Injecting with a type (class name)
*
* ```typescript
* import { Inject } from '@nestjs/common';
* import { ConfigService } from './config.service';
*
* export class CatsService {
* constructor(@Inject(ConfigService) private readonly configService) {}
* }
* ```
*
* The above is equivalent to the conventional constructor injection syntax:
* ```typescript
* import { ConfigService } from './config.service';
*
* export class CatsService {
* constructor(private readonly configService: ConfigService) {}
* }
* ```
* #### Injecting with a string
*
* Assume we've registered a provider with the string `'CONNECTION'` as follows:
*
* ```typescript
* import { connection } from './connection';
* const connectionProvider = {
* provide: 'CONNECTION',
* useValue: connection,
* };
*
* @Module({
* providers: [connectionProvider],
* })
* export class ApplicationModule {}
* ```
* As a result, we now have a provider bound to the DI container using the
* injection token `'CONNECTION'`. This provider can be injected as follows:
*
* ```typescript
* @Injectable()
* export class CatsRepository {
* constructor(@Inject('CONNECTION') connection: Connection) {}
* }
* ```
* @publicApi
* Injects provider which has to be available in the current injector (module) scope.
* Providers are recognized by either types or tokens.
*/
export function Inject<T = any>(token?: T) {
return (target: Object, key: string | symbol, index?: number) => {
token = token || Reflect.getMetadata('design:type', target, key);

View File

@@ -3,110 +3,11 @@ import { ScopeOptions } from '../../interfaces/scope-options.interface';
import { SCOPE_OPTIONS_METADATA } from './../../constants';
import { Type } from './../../interfaces/type.interface';
/**
* Defines the injection scope.
*
* @see [Injection Scopes](https://docs.nestjs.com/fundamentals/injection-scopes)
*
* @publicApi
*/
export interface InjectableOptions extends ScopeOptions {}
/**
* Decorator that marks a class as a [provider](https://docs.nestjs.com/providers). Providers can be
* injected into other classes via constructor parameter injection using Nest's
* built-in [Dependency Injection (DI)](https://docs.nestjs.com/providers#dependency-injection) system.
*
* When injecting a provider, it must be visible within the module scope (loosely
* speaking, the containing module) of the class it is being injected into. This
* can be done by:
*
* - defining the provider in the same module scope
* - exporting the provider from one module scope and importing that module into the
* module scope of the class being injected into
* - exporting the provider from a module that is marked as global using the
* `@Global()` decorator
*
* Providers can also be defined in a more explicit and imperative form using
* various [custom provider](https://docs.nestjs.com/fundamentals/custom-providers) techniques that expose
* more capabilities of the DI system.
*
* @see [Providers](https://docs.nestjs.com/providers)
* @see [Custom Providers](https://docs.nestjs.com/fundamentals/custom-providers)
* @see [Injection Scopes](https://docs.nestjs.com/fundamentals/injection-scopes)
*
* @usageNotes
*
* #### Setting provider scope
*
* The `@Injector()` decorator takes an optional options object in plain JSON format.
* This object has one property: `scope`.
*
* Following is an example of setting a provider's scope to per-request. See more
* about [injection scopes here](https://docs.nestjs.com/fundamentals/injection-scopes).
*
* ```typescript
* import { Injectable, Scope } from '@nestjs/common';
*
* @Injectable({ scope: Scope.REQUEST })
* export class CatsService {}
* ```
*
* #### Declaring providers
*
* Providers are declared using the `@Injectable()` decorator and a standard
* JavaScript class.
*
* ```typescript
* import { Injectable } from '@nestjs/common';
* import { Cat } from './interfaces/cat.interface';
*
* @Injectable()
* export class CatsService {
* private readonly cats: Cat[] = [];
*
* create(cat: Cat) {
* this.cats.push(cat);
* }
*
* findAll(): Cat[] {
* return this.cats;
* }
* }
* ```
*
* #### Using providers
*
* Providers created using the `@Injectable()` decorator use an
* [injection token](https://docs.nestjs.com/fundamentals/custom-providers) that is the class type.
*
* For example to inject the provider declared above using constructor injection,
* use the following syntax. In this example, `CatsService` is the name of
* the provider class declared earlier, and is used as the injection token in
* the constructor.
*
* ```typescript
* import { Controller, Get, Post, Body } from '@nestjs/common';
* import { CreateCatDto } from './dto/create-cat.dto';
* import { CatsService } from './cats.service';
* import { Cat } from './interfaces/cat.interface';
*
* @Controller('cats')
* export class CatsController {
* constructor(private readonly catsService: CatsService) {}
*
* @Post()
* async create(@Body() createCatDto: CreateCatDto) {
* this.catsService.create(createCatDto);
* }
*
* @Get()
* async findAll(): Promise<Cat[]> {
* return this.catsService.findAll();
* }
* }
* ```
* @publicApi
* Defines the injectable class. This class can inject dependencies through constructor.
* Those dependencies have to belong to the same module.
*/
export function Injectable(options?: InjectableOptions): ClassDecorator {
return (target: object) => {

View File

@@ -5,38 +5,14 @@ import { isFunction } from '../../utils/shared.utils';
import { validateEach } from '../../utils/validate-each.util';
/**
* Decorator that binds guards to the scope of the controller or method,
* depending on its context.
* Binds guards to the particular context.
* When the `@UseGuards()` is used on the controller level:
* - Guard will be register to each handler (every method)
*
* When `@UseGuards` is used at the controller level, the guard will be
* applied to every handler (method) in the controller.
* When the `@UseGuards()` is used on the handler level:
* - Guard will be registered only to the specified method
*
* When `@UseGuards` is used at the individual handler level, the guard
* will apply only to that specific method.
*
* @see [Guards](https://docs.nestjs.com/guards)
*
* @usageNotes
*
* ### Passing a guard by type
* In this example, we pass a guard type, which will delegate instantiating
* the guard to the Nest framework, and will allow Dependency Injection.
*
* ```typescript
* @Controller('cats')
* @UseGuards(RolesGuard)
* export class CatsController {}
* ```
*
* ### Passing a guard instance
* It's also possible to pass an instance of a guard directly to the decorator.
*
* ```typescript
* @Controller('cats')
* @UseGuards(new RolesGuard())
* export class CatsController {}
* ```
* @publicApi
* @param {} ...guards
*/
export function UseGuards(...guards: (CanActivate | Function)[]) {
return (target: any, key?: string, descriptor?: any) => {

View File

@@ -12,7 +12,7 @@ import { validateEach } from '../../utils/validate-each.util';
* When the `@UseInterceptors()` is used on the handle level:
* - Interceptor will be registered only to the specified method
*
* @param ...interceptors
* @param {} ...interceptors
*/
export function UseInterceptors(
...interceptors: (NestInterceptor | Function)[]

View File

@@ -48,8 +48,7 @@ export function createParamDecorator(
const isPipe = (pipe: any) =>
pipe &&
((isFunction(pipe) && pipe.prototype && isFunction(pipe.prototype.transform)) ||
isFunction(pipe.transform));
((isFunction(pipe) && pipe.prototype) || isFunction(pipe.transform));
const hasParamData = isNil(data) || !isPipe(data);
const paramData = hasParamData ? data : undefined;

View File

@@ -3,12 +3,6 @@ import { extendArrayMetadata } from '../../utils/extend-metadata.util';
/**
* Sets a response header.
*
* Example: `@Header('Cache-Control', 'none')`
*
* @see [Headers](https://docs.nestjs.com/controllers#headers)
*
* @publicApi
*/
export function Header(name: string, value: string): MethodDecorator {
return (target: object, key, descriptor) => {

View File

@@ -1,13 +1,10 @@
import { HTTP_CODE_METADATA } from '../../constants';
/**
* @publicApi
* Defines the HTTP response status code.
* It overrides default status code for the given request method.
*
* @description
* Defines the HTTP response status code. Overrides default status code for
* the decorated request method.
*
* @see [Http Status Codes](https://docs.nestjs.com/controllers#status-code)
* @param {number} statusCode
*/
export function HttpCode(statusCode: number): MethodDecorator {
return (target: object, key, descriptor) => {

View File

@@ -1,9 +1,7 @@
import { REDIRECT_METADATA } from '../../constants';
/**
* Redirects request to the specified URL.
*
* @publicApi
* Redirects request.
*/
export function Redirect(url: string): MethodDecorator {
return (target: object, key, descriptor) => {

View File

@@ -2,11 +2,6 @@ import { RENDER_METADATA } from '../../constants';
/**
* Defines a template to be rendered by the controller.
*
* Example: `@Render('index)`
*
* @see [Example](https://github.com/nestjs/nest/blob/master/sample/15-mvc/src/app.controller.ts)
* @publicApi
*/
export function Render(template: string): MethodDecorator {
return (target: object, key, descriptor) => {

View File

@@ -31,81 +31,41 @@ const createMappingDecorator = (method: RequestMethod) => (
};
/**
* @publicApi
*
* @description
* Routes HTTP POST requests to the specified path.
*
* @see [Routing](https://docs.nestjs.com/controllers#routing)
*/
export const Post = createMappingDecorator(RequestMethod.POST);
/**
* @publicApi
*
* @description
* Routes HTTP GET requests to the specified path.
*
* @see [Routing](https://docs.nestjs.com/controllers#routing)
*/
export const Get = createMappingDecorator(RequestMethod.GET);
/**
* @publicApi
*
* @description
* Routes HTTP DELETE requests to the specified path.
*
* @see [Routing](https://docs.nestjs.com/controllers#routing)
*/
export const Delete = createMappingDecorator(RequestMethod.DELETE);
/**
* @publicApi
*
* @description
* Routes HTTP PUT requests to the specified path.
*
* @see [Routing](https://docs.nestjs.com/controllers#routing)
*/
export const Put = createMappingDecorator(RequestMethod.PUT);
/**
* @publicApi
*
* @description
* Routes HTTP PATCH requests to the specified path.
*
* @see [Routing](https://docs.nestjs.com/controllers#routing)
*/
export const Patch = createMappingDecorator(RequestMethod.PATCH);
/**
* @publicApi
*
* @description
* Routes HTTP OPTIONS requests to the specified path.
*
* @see [Routing](https://docs.nestjs.com/controllers#routing)
*/
export const Options = createMappingDecorator(RequestMethod.OPTIONS);
/**
* @publicApi
*
* @description
* Routes HTTP HEAD requests to the specified path.
*
* @see [Routing](https://docs.nestjs.com/controllers#routing)
*/
export const Head = createMappingDecorator(RequestMethod.HEAD);
/**
* @publicApi
*
* @description
* Routes all HTTP requests to the specified path.
*
* @see [Routing](https://docs.nestjs.com/controllers#routing)
*/
export const All = createMappingDecorator(RequestMethod.ALL);

View File

@@ -76,19 +76,6 @@ export const UploadedFile: (
export const UploadedFiles: () => ParameterDecorator = createRouteParamDecorator(
RouteParamtypes.FILES,
);
/**
* Route handler parameter decorator. Extracts the `headers`
* property from the `req` object and populates the decorated
* parameter with the value of `headers`.
*
* `property` - optional name of single header property to extract.
*
* Example: `async update(@Headers() headers)`
*
* @see [Request object](https://docs.nestjs.com/controllers#request-object)
*
* @publicApi
*/
export const Headers: (
property?: string,
) => ParameterDecorator = createRouteParamDecorator(RouteParamtypes.HEADERS);
@@ -101,17 +88,6 @@ export function Query(
property: string,
...pipes: (Type<PipeTransform> | PipeTransform)[]
): ParameterDecorator;
/**
* Route handler parameter decorator. Extracts the `query`
* property from the `req` object and populates the decorated
* parameter with the value of `query`.
*
* Example: `async find(@Query() query: string)`
*
* @see [Request object](https://docs.nestjs.com/controllers#request-object)
*
* @publicApi
*/
export function Query(
property?: string | (Type<PipeTransform> | PipeTransform),
...pipes: (Type<PipeTransform> | PipeTransform)[]
@@ -130,17 +106,6 @@ export function Body(
property: string,
...pipes: (Type<PipeTransform> | PipeTransform)[]
): ParameterDecorator;
/**
* Route handler parameter decorator. Extracts the `body`
* property from the `req` object and populates the decorated
* parameter with the value of `body`.
*
* Example: `async create(@Body() createCatDto: CreateCatDto)`
*
* @see [Request object](https://docs.nestjs.com/controllers#request-object)
*
* @publicApi
*/
export function Body(
property?: string | (Type<PipeTransform> | PipeTransform),
...pipes: (Type<PipeTransform> | PipeTransform)[]

View File

@@ -1,38 +1,8 @@
import { GLOBAL_MODULE_METADATA } from '../../constants';
/**
* @publicApi
*
* @description
*
* Makes the module global-scoped.
* Once imported into any module, the global-scoped module will be visible
* in all modules.
*
* @see [Global modules](https://docs.nestjs.com/modules#global-modules)
*
* @usageNotes
*
* `@Global()` makes the `CatsModule` global-scoped. The CatsService provider
* will be ubiquitous, and modules that wish to inject the service will not need to import the CatsModule in their imports array.
*
* Note that the `imports` array is generally the preferred way to make a module's
* API available to consumers.
*
* ```typescript
* import { Module, Global } from '@nestjs/common';
* import { CatsController } from './cats.controller';
* import { CatsService } from './cats.service';
*
* @Global()
* @Module({
* controllers: [CatsController],
* providers: [CatsService],
* exports: [CatsService],
* })
*
* export class CatsModule {}
* ```
* Once imported will be available for all existing modules.
*/
export function Global(): ClassDecorator {
return (target: any) => {

View File

@@ -10,9 +10,11 @@ const metadataKeys = [
];
const validateKeys = (keys: string[]) => {
const isKeyInvalid = (key: string) =>
metadataKeys.findIndex(k => k === key) < 0;
const validateKey = (key: string) => {
if (metadataKeys.includes(key)) {
if (!isKeyInvalid(key)) {
return;
}
throw new InvalidModuleConfigException(key);
@@ -21,37 +23,12 @@ const validateKeys = (keys: string[]) => {
};
/**
* Decorator that marks a class as a [module](https://docs.nestjs.com/modules). Modules are used by
* Nest to organize the application structure into scopes. Controllers and
* Providers are scoped by the module they are declared in. Modules and their
* classes (Controllers and Providers) form a graph that determines how Nest
* performs [Dependency Injection (DI)](https://docs.nestjs.com/providers#dependency-injection).
*
* @see [Modules](https://docs.nestjs.com/modules)
*
* @usageNotes
* The following example:
* - declares `CatsController` as a controller to be instantiated when the
* `CatsModule` is bootstrapped
* - declares `CatsService` as a provider that can be injected within the
* module scope of the `CatsModule`
* - exports `CatsService` so that any module that imports `CatsModule`
* may inject `CatsService`
*
* ```typescript
* import { Module } from '@nestjs/common';
* import { CatsController } from './cats.controller';
* import { CatsService } from './cats.service';
*
* @Module({
* controllers: [CatsController],
* providers: [CatsService],
* exports: [CatsService]
* })
* export class CatsModule {}
* ```
*
* @publicApi
* Defines the module
* - `imports` - the set of the 'imported' modules
* - `controllers` - the list of controllers (e.g. HTTP controllers)
* - `providers` - the list of providers that belong to this module. They can be injected between themselves.
* - `exports` - the set of components, which should be available for modules, which imports this module
* @param options {ModuleMetadata} Module metadata
*/
export function Module(metadata: ModuleMetadata): ClassDecorator {
const propsKeys = Object.keys(metadata);

View File

@@ -1,5 +1,3 @@
import { isString } from '../utils/shared.utils';
export class HttpException extends Error {
public readonly message: any;
@@ -32,13 +30,4 @@ export class HttpException extends Error {
public getStatus(): number {
return this.status;
}
public toString(): string {
const message = this.getErrorString(this.message);
return `Error: ${message}`;
}
private getErrorString(target: string | object): string {
return isString(target) ? target : JSON.stringify(target);
}
}

View File

@@ -43,7 +43,6 @@ export {
WebSocketAdapter,
WsExceptionFilter,
WsMessageHandler,
ScopeOptions,
} from './interfaces';
export * from './pipes';
export * from './serializer';

View File

@@ -0,0 +1,7 @@
import { NestInterceptor } from './features/nest-interceptor.interface';
import { CanActivate } from './features/can-activate.interface';
export interface ConfigurationProvider {
getGlobalInterceptors(): NestInterceptor[];
getGlobalGuards(): CanActivate[];
}

View File

@@ -38,8 +38,4 @@ export interface ClassTransformOptions {
* This option is useful when you know for sure that your types might have a circular dependency.
*/
enableCircularCheck?: boolean;
/**
* If set to true class-transformer will attempt conversion based on TS reflected type
*/
enableImplicitConversion?: boolean;
}

View File

@@ -1,8 +1,4 @@
/**
* Set origin to a function implementing some custom logic. The function takes the
* request origin as the first parameter and a callback (which expects the signature
* err [object], allow [bool]) as the second.
*
* @see https://github.com/expressjs/cors
*/
export type CustomOrigin = (
@@ -10,42 +6,13 @@ export type CustomOrigin = (
callback: (err: Error | null, allow?: boolean) => void,
) => void;
/**
* @publicApi
*
* @see https://github.com/expressjs/cors
*/
export interface CorsOptions {
/**
* Configures the `Access-Control-Allow-Origins` CORS header. See [here for more detail.](https://github.com/expressjs/cors#configuration-options)
*/
origin?: boolean | string | RegExp | (string | RegExp)[] | CustomOrigin;
/**
* Configures the Access-Control-Allow-Methods CORS header
*/
methods?: string | string[];
/**
* Configures the Access-Control-Allow-Headers CORS header.
*/
allowedHeaders?: string | string[];
/**
* Configures the Access-Control-Expose-Headers CORS header.
*/
exposedHeaders?: string | string[];
/**
* Configures the Access-Control-Allow-Credentials CORS header.
*/
credentials?: boolean;
/**
* Configures the Access-Control-Max-Age CORS header.
*/
maxAge?: number;
/**
* Whether to pass the CORS preflight response to the next handler?
*/
preflightContinue?: boolean;
/**
* Provides a status code to use for successful OPTIONS requests.
*/
optionsSuccessStatus?: number;
}

View File

@@ -1,74 +1,22 @@
/**
* Methods to obtain request and response objects.
*/
export interface HttpArgumentsHost {
/**
* Returns the in-flight `request` object.
*/
getRequest<T = any>(): T;
/**
* Returns the in-flight `response` object.
*/
getResponse<T = any>(): T;
getNext<T = any>(): T;
}
/**
* Methods to obtain WebSocket data and client objects.
*/
export interface WsArgumentsHost {
/**
* Returns the data object.
*/
getData<T = any>(): T;
/**
* Returns the client object.
*/
getClient<T = any>(): T;
}
/**
* Methods to obtain RPC data object.
*/
export interface RpcArgumentsHost {
/**
* Returns the data object.
*/
getData<T = any>(): T;
}
/**
* @publicApi
*
* @description
* Provides methods for retrieving the arguments being passed to a handler.
* Allows choosing the appropriate execution context (e.g., HTTP, RPC, or
* WebSockets) to retrieve the arguments from.
*
*/
export interface ArgumentsHost {
/**
* Returns the array of arguments being passed to the handler.
*/
getArgs<T extends Array<any> = any[]>(): T;
/**
* Returns a particular argument by index.
* @param index
*/
getArgByIndex<T = any>(index: number): T;
/**
* Switch context to RPC
* @returns interface with methods to retrieve RPC arguments
*/
switchToRpc(): RpcArgumentsHost;
/**
* Switch context to HTTP
* @returns interface with methods to retrieve HTTP arguments
*/
switchToHttp(): HttpArgumentsHost;
/**
* Switch context to WebSockets
* @returns interface with methods to retrieve WebSockets arguments
*/
switchToWs(): WsArgumentsHost;
}
}

View File

@@ -1,25 +1,7 @@
import { Observable } from 'rxjs';
import { ExecutionContext } from './execution-context.interface';
/**
* @publicApi
*
* @description
* Interface defining the `canActivate()` function that must be implemented
* by a guard. Return value indicates whether or not the current request is
* allowed to proceed. Return can be either synchronous (`boolean`)
* or asynchronous (`Promise` or `Observable`).
*
* @see [Guards](https://docs.nestjs.com/guards)
*/
export interface CanActivate {
/**
* @param context Current execution context. Provides access to details about
* the current request pipeline.
*
* @returns Value indicating whether or not the current request is allowed to
* proceed.
*/
canActivate(
context: ExecutionContext,
): boolean | Promise<boolean> | Observable<boolean>;

View File

@@ -1,22 +1,7 @@
import { Type } from '../index';
import { ArgumentsHost } from './arguments-host.interface';
/**
* @publicApi
*
* @description
* Details about the current request pipeline.
*
* @see [Execution Context](https://docs.nestjs.com/guards#execution-context)
*/
export interface ExecutionContext extends ArgumentsHost {
/**
* Returns the *type* of the controller class which the current handler belongs to.
*/
getClass<T = any>(): Type<T>;
/**
* Returns a reference to the handler (method) that will be invoked next in the
* request pipeline.
*/
getHandler(): Function;
}

View File

@@ -72,7 +72,6 @@ export interface NatsOptions {
options?: {
url?: string;
name?: string;
user?: string;
pass?: string;
maxReconnectAttempts?: number;
reconnectTimeWait?: number;

View File

@@ -1,18 +1,6 @@
import { ModuleMetadata } from './module-metadata.interface';
import { Type } from '../type.interface';
/**
* @publicApi
*
* @description
*
* Interface defining a Dynamic Module.
*
* @see [Dynamic Modules](https://docs.nestjs.com/modules#dynamic-modules)
*/
export interface DynamicModule extends ModuleMetadata {
/**
* A module
*/
module: Type<any>;
}

View File

@@ -4,37 +4,12 @@ import { DynamicModule } from './dynamic-module.interface';
import { ForwardReference } from './forward-reference.interface';
import { Provider } from './provider.interface';
/**
* @publicApi
*
* @description
*
* Interface defining the property object that describes the module.
*
* @see [Modules](https://docs.nestjs.com/modules)
*/
export interface ModuleMetadata {
/**
* Optional list of imported modules that export the providers which are
* required in this module.
*/
imports?: Array<
Type<any> | DynamicModule | Promise<DynamicModule> | ForwardReference
>;
/**
* Optional list of controllers defined in this module which have to be
* instantiated.
*/
controllers?: Type<any>[];
/**
* Optional list of providers that will be instantiated by the Nest injector
* and that may be shared at least across this module.
*/
providers?: Provider[];
/**
* Optional list of the subset of providers that are provided by this module
* and should be available in other modules which import this module.
*/
exports?: Array<
| DynamicModule
| Promise<DynamicModule>

View File

@@ -1,13 +1,3 @@
/**
* @publicApi
*
* @description
* Interface defining method called just before Nest destroys the host module
* (`app.close()` method has been evaluated). Use to perform cleanup on
* resources (e.g., Database connections).
*
* @see [Lifecycle Events](https://docs.nestjs.com/fundamentals/lifecycle-events)
*/
export interface OnModuleDestroy {
onModuleDestroy(): any;
}

View File

@@ -1,11 +1,3 @@
/**
* @publicApi
*
* @description
* Interface defining method called once the host module has been initialized.
*
* @see [Lifecycle Events](https://docs.nestjs.com/fundamentals/lifecycle-events)
*/
export interface OnModuleInit {
onModuleInit(): any;
}

View File

@@ -6,8 +6,7 @@ export type Provider<T = any> =
| Type<any>
| ClassProvider<T>
| ValueProvider<T>
| FactoryProvider<T>
| ExistingProvider<T>;
| FactoryProvider<T>;
export interface ClassProvider<T = any> {
provide: string | symbol | Type<any> | Abstract<any> | Function;
@@ -23,11 +22,6 @@ export interface ValueProvider<T = any> {
export interface FactoryProvider<T = any> {
provide: string | symbol | Type<any> | Abstract<any> | Function;
useFactory: (...args: any[]) => T;
inject?: Array<Type<any> | string | symbol | Abstract<any> | Function>;
inject?: Array<Type<any> | string | any>;
scope?: Scope;
}
export interface ExistingProvider<T = any> {
provide: string | symbol | Type<any> | Abstract<any> | Function;
useExisting: any;
}

View File

@@ -1,11 +1,5 @@
import { LoggerService } from '../services/logger.service';
/**
* @publicApi
*/
export class NestApplicationContextOptions {
/**
* specify the logger to use
*/
logger?: LoggerService | boolean;
}

View File

@@ -1,14 +1,8 @@
import { ShutdownSignal } from '../enums/shutdown-signal.enum';
import { LoggerService } from '../services/logger.service';
import { Abstract } from './abstract.interface';
import { Type } from './type.interface';
import { ShutdownSignal } from '../enums/shutdown-signal.enum';
/**
* @publicApi
*
* @description
* Interface defining NestApplicationContext.
*/
export interface INestApplicationContext {
/**
* Allows navigating through the modules tree, for example, to pull out a specific instance from the selected module.
@@ -45,13 +39,4 @@ export interface INestApplicationContext {
* @returns {this} The Nest application context instance
*/
enableShutdownHooks(signals?: ShutdownSignal[] | string[]): this;
/**
* Initalizes the Nest application.
* Calls the Nest lifecycle events.
* It isn't mandatory to call this method directly.
*
* @returns {Promise<this>} The NestApplicationContext instance as Promise
*/
init(): Promise<this>;
}

View File

@@ -1,21 +1,9 @@
import { CorsOptions } from './external/cors-options.interface';
import { HttpsOptions } from './external/https-options.interface';
import { NestApplicationContextOptions } from './nest-application-context-options.interface';
import { CorsOptions } from './external/cors-options.interface';
/**
* @publicApi
*/
export interface NestApplicationOptions extends NestApplicationContextOptions {
/**
* CORS options from [CORS package](https://github.com/expressjs/cors#configuration-options)
*/
cors?: boolean | CorsOptions;
/**
* Whether to use underlying platform body parser.
*/
bodyParser?: boolean;
/**
* Set of configurable HTTPS options
*/
httpsOptions?: HttpsOptions;
}

View File

@@ -7,13 +7,14 @@ import { MicroserviceOptions } from './microservices/microservice-configuration.
import { INestApplicationContext } from './nest-application-context.interface';
import { WebSocketAdapter } from './websockets/web-socket-adapter.interface';
/**
* @publicApi
*
* @description
* Interface defining the core NestApplication object.
*/
export interface INestApplication extends INestApplicationContext {
/**
* Initializes application. It is not mandatory to call this method directly.
*
* @returns {Promise}
*/
init(): Promise<this>;
/**
* A wrapper function around HTTP adapter method: `adapter.use()`.
* Example `app.use(cors())`
@@ -35,7 +36,7 @@ export interface INestApplication extends INestApplicationContext {
* @param {number} port
* @param {string} hostname
* @param {Function} callback Optional callback
* @returns A Promise that, when resolved, is a reference to the underlying HttpServer.
* @returns {Promise}
*/
listen(port: number | string, callback?: () => void): Promise<any>;
listen(
@@ -54,16 +55,16 @@ export interface INestApplication extends INestApplicationContext {
listenAsync(port: number | string, hostname?: string): Promise<any>;
/**
* Registers a prefix for every HTTP route path.
* Registers the prefix for the every HTTP route path
*
* @param {string} prefix The prefix for every HTTP route path (for example `/v1/api`)
* @param {string} prefix The prefix for the every HTTP route path (for example `/v1/api`)
* @returns {void}
*/
setGlobalPrefix(prefix: string): this;
/**
* Setup Ws Adapter which will be used inside Gateways.
* Use when you want to override default `socket.io` library.
* Use, when you want to override default `socket.io` library.
*
* @param {WebSocketAdapter} adapter
* @returns {void}
@@ -71,8 +72,7 @@ export interface INestApplication extends INestApplicationContext {
useWebSocketAdapter(adapter: WebSocketAdapter): this;
/**
* Connects microservice to the NestApplication instance. Transforms application
* to a hybrid instance.
* Connects microservice to the NestApplication instance. Transforms application to the hybrid instance.
*
* @param {MicroserviceOptions} options Microservice options object
* @returns {INestMicroservice}
@@ -87,21 +87,21 @@ export interface INestApplication extends INestApplicationContext {
getMicroservices(): INestMicroservice[];
/**
* Returns the underlying native HTTP server.
* Returns an underlying, native HTTP server.
*
* @returns {http.Server}
*/
getHttpServer(): any;
/**
* Returns the underlying HTTP adapter.
* Returns an underlying HTTP adapter.
*
* @returns {HttpServer}
*/
getHttpAdapter(): HttpServer;
/**
* Starts all connected microservices asynchronously.
* Starts all connected microservices asynchronously
*
* @param {Function} callback Optional callback function
* @returns {void}
@@ -109,45 +109,42 @@ export interface INestApplication extends INestApplicationContext {
startAllMicroservices(callback?: () => void): this;
/**
* Starts all connected microservices and can be awaited.
* Starts all connected microservices and can be awaited
*
* @returns {Promise}
*/
startAllMicroservicesAsync(): Promise<void>;
/**
* Registers exception filters as global filters (will be used within
* every HTTP route handler)
* Registers exception filters as a global filters (will be used within every HTTP route handler)
*
* @param {ExceptionFilter[]} ...filters
*/
useGlobalFilters(...filters: ExceptionFilter[]): this;
/**
* Registers pipes as global pipes (will be used within every HTTP route handler)
* Registers pipes as a global pipes (will be used within every HTTP route handler)
*
* @param {PipeTransform[]} ...pipes
*/
useGlobalPipes(...pipes: PipeTransform<any>[]): this;
/**
* Registers interceptors as global interceptors (will be used within
* every HTTP route handler)
* Registers interceptors as a global interceptors (will be used within every HTTP route handler)
*
* @param {NestInterceptor[]} ...interceptors
*/
useGlobalInterceptors(...interceptors: NestInterceptor[]): this;
/**
* Registers guards as global guards (will be used within every HTTP route handler)
* Registers guards as a global guards (will be used within every HTTP route handler)
*
* @param {CanActivate[]} ...guards
*/
useGlobalGuards(...guards: CanActivate[]): this;
/**
* Terminates the application (including NestApplication, Gateways, and each connected
* microservice)
* Terminates the application (including NestApplication, Gateways, and each connected microservice)
*
* @returns {Promise<void>}
*/

View File

@@ -1,12 +1,3 @@
/**
* @publicApi
*
* @description
* Interface defining method called once the application has fully started and
* is bootstrapped.
*
* @see [Lifecycle Events](https://docs.nestjs.com/fundamentals/lifecycle-events)
*/
export interface OnApplicationBootstrap {
onApplicationBootstrap(): any;
}

View File

@@ -1,12 +1,3 @@
/**
* @publicApi
*
* @description
* Interface defining method to respond to system signals (when application gets
* shutdown by, e.g., SIGTERM)
*
* @see [Lifecycle Events](https://docs.nestjs.com/fundamentals/lifecycle-events)
*/
export interface OnApplicationShutdown {
onApplicationShutdown(signal?: string): any;
}

View File

@@ -1,31 +1,9 @@
/**
* @publicApi
*/
export enum Scope {
/**
* The provider can be shared across multiple classes. The provider lifetime
* is strictly tied to the application lifecycle. Once the application has
* bootstrapped, all providers have been instantiated.
*/
DEFAULT,
/**
* A new private instance of the provider is instantiated for every use
*/
TRANSIENT,
/**
* A new instance is instantiated for each request processing pipeline
*/
REQUEST,
}
/**
* @publicApi
*
* @see [Injection Scopes](https://docs.nestjs.com/fundamentals/injection-scopes)
*/
export interface ScopeOptions {
/**
* Specifies the lifetime of an injected Provider or Controller.
*/
scope?: Scope;
}

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/common",
"version": "6.5.3",
"version": "6.2.4",
"description": "Nest - modern, fast, powerful node.js web framework (@common)",
"author": "Kamil Mysliwiec",
"repository": {
@@ -12,9 +12,9 @@
},
"license": "MIT",
"dependencies": {
"axios": "0.19.0",
"axios": "0.18.0",
"cli-color": "1.4.0",
"uuid": "3.3.3"
"uuid": "3.3.2"
},
"peerDependencies": {
"reflect-metadata": "^0.1.12",

View File

@@ -1,3 +1,2 @@
export * from './parse-int.pipe';
export * from './parse-uuid.pipe';
export * from './validation.pipe';

View File

@@ -1,31 +0,0 @@
import { Optional } from '../decorators';
import { ArgumentMetadata, BadRequestException, Injectable } from '../index';
import { PipeTransform } from '../interfaces/features/pipe-transform.interface';
import { isUUID } from '../utils/is-uuid';
export interface ParseUUIDPipeOptions {
version?: '3' | '4' | '5';
exceptionFactory?: (errors: string) => any;
}
@Injectable()
export class ParseUUIDPipe implements PipeTransform<string> {
private readonly version: '3' | '4' | '5';
protected exceptionFactory: (errors: string) => any;
constructor(@Optional() options?: ParseUUIDPipeOptions) {
options = options || {};
this.version = options.version;
this.exceptionFactory =
options.exceptionFactory || (error => new BadRequestException(error));
}
async transform(value: string, metadata: ArgumentMetadata): Promise<string> {
if (!isUUID(value, this.version)) {
throw this.exceptionFactory(
`Validation failed (uuid v${this.version} is expected)`,
);
}
return value;
}
}

View File

@@ -16,7 +16,6 @@ export interface ValidationPipeOptions extends ValidatorOptions {
disableErrorMessages?: boolean;
transformOptions?: ClassTransformOptions;
exceptionFactory?: (errors: ValidationError[]) => any;
validateCustomDecorators?: boolean;
}
let classValidator: any = {};
@@ -29,7 +28,6 @@ export class ValidationPipe implements PipeTransform<any> {
protected validatorOptions: ValidatorOptions;
protected transformOptions: ClassTransformOptions;
protected exceptionFactory: (errors: ValidationError[]) => any;
protected validateCustomDecorators: boolean;
constructor(@Optional() options?: ValidationPipeOptions) {
options = options || {};
@@ -37,14 +35,12 @@ export class ValidationPipe implements PipeTransform<any> {
transform,
disableErrorMessages,
transformOptions,
validateCustomDecorators,
...validatorOptions
} = options;
this.isTransformEnabled = !!transform;
this.validatorOptions = validatorOptions;
this.transformOptions = transformOptions;
this.isDetailedOutputDisabled = disableErrorMessages;
this.validateCustomDecorators = validateCustomDecorators || false;
this.exceptionFactory =
options.exceptionFactory ||
(errors =>
@@ -86,7 +82,7 @@ export class ValidationPipe implements PipeTransform<any> {
private toValidate(metadata: ArgumentMetadata): boolean {
const { metatype, type } = metadata;
if (type === 'custom' && !this.validateCustomDecorators) {
if (type === 'custom') {
return false;
}
const types = [String, Boolean, Number, Array, Object];

View File

@@ -88,24 +88,5 @@ describe('createParamDecorator', () => {
});
});
});
describe('when class type passed as data', () => {
class Data { }
class Test {
public test(
@Decorator(Data) prop,
) { }
}
it('should return class type as data parameter', () => {
const metadata = Reflect.getMetadata(
ROUTE_ARGS_METADATA,
Test,
'test',
);
const key = Object.keys(metadata)[0];
expect(metadata[key].data).to.equal(Data);
});
});
});
});

View File

@@ -44,29 +44,4 @@ describe('HttpException', () => {
statusCode: 404,
});
});
it('should inherit from error', () => {
const error = new HttpException('', 400);
expect(error instanceof Error).to.be.true;
});
it('should be serializable', () => {
const message = 'Some Error';
const error = new HttpException(message, 400);
expect(`${error}`).to.be.eql(`Error: ${message}`);
});
describe('when "message" is an object', () => {
it('should serialize an object', () => {
const obj = { foo: 'bar' };
const error = new HttpException(obj, 400);
expect(`${error}`).to.be.eql(`Error: ${JSON.stringify(obj)}`);
expect(`${error}`.includes('[object Object]')).to.not.be.true;
});
it('should serialize sub errors', () => {
const error = new NotFoundException();
expect(`${error}`.includes('Not Found')).to.be.true;
});
});
});

View File

@@ -1,65 +0,0 @@
import { expect } from 'chai';
import { ArgumentMetadata } from '../../interfaces';
import { ParseUUIDPipe } from '../../pipes/parse-uuid.pipe';
describe('ParseUUIDPipe', () => {
let target: ParseUUIDPipe;
describe('transform', () => {
const v3 = 'e8b5a51d-11c8-3310-a6ab-367563f20686';
const v4 = '10ba038e-48da-487b-96e8-8d3b99b6d18a';
const v5 = '630eb68f-e0fa-5ecc-887a-7c7a62614681';
describe('when validation passes', () => {
it('should return string if value is uuid v3, v4 or v5', async () => {
target = new ParseUUIDPipe();
expect(await target.transform(v3, {} as ArgumentMetadata)).to.equal(v3);
expect(await target.transform(v4, {} as ArgumentMetadata)).to.equal(v4);
expect(await target.transform(v5, {} as ArgumentMetadata)).to.equal(v5);
});
it('should return string if value is uuid v3', async () => {
target = new ParseUUIDPipe({ version: '3' });
expect(await target.transform(v3, {} as ArgumentMetadata)).to.equal(v3);
});
it('should return string if value is uuid v4', async () => {
target = new ParseUUIDPipe({ version: '4' });
expect(await target.transform(v4, {} as ArgumentMetadata)).to.equal(v4);
});
it('should return string if value is uuid v5', async () => {
target = new ParseUUIDPipe({ version: '5' });
expect(await target.transform(v5, {} as ArgumentMetadata)).to.equal(v5);
});
});
describe('when validation fails', () => {
it('should throw an error', async () => {
target = new ParseUUIDPipe();
expect(target.transform('123a', {} as ArgumentMetadata)).to.be.rejected;
});
it('should throw an error - v3', async () => {
target = new ParseUUIDPipe({ version: '3' });
expect(target.transform('123a', {} as ArgumentMetadata)).to.be.rejected;
expect(target.transform(v4, {} as ArgumentMetadata)).to.be.rejected;
expect(target.transform(v5, {} as ArgumentMetadata)).to.be.rejected;
});
it('should throw an error - v4', async () => {
target = new ParseUUIDPipe({ version: '4' });
expect(target.transform('123a', {} as ArgumentMetadata)).to.be.rejected;
expect(target.transform(v3, {} as ArgumentMetadata)).to.be.rejected;
expect(target.transform(v5, {} as ArgumentMetadata)).to.be.rejected;
});
it('should throw an error - v5 ', async () => {
target = new ParseUUIDPipe({ version: '5' });
expect(target.transform('123a', {} as ArgumentMetadata)).to.be.rejected;
expect(target.transform(v3, {} as ArgumentMetadata)).to.be.rejected;
expect(target.transform(v4, {} as ArgumentMetadata)).to.be.rejected;
});
});
});
});

View File

@@ -1,16 +0,0 @@
import { BadRequestException } from '../exceptions';
const uuid = {
3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,
4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
5: /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,
all: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,
};
export function isUUID(str: any, version = 'all') {
if (typeof str !== 'string') {
throw new BadRequestException('The value passed as UUID is not a string');
}
const pattern = uuid[version];
return pattern && pattern.test(str);
}

View File

@@ -7,7 +7,6 @@ export const validatePath = (path?: string): string =>
export const isFunction = (fn: any): boolean => typeof fn === 'function';
export const isString = (fn: any): fn is string => typeof fn === 'string';
export const isConstructor = (fn: any): boolean => fn === 'constructor';
export const isNil = (obj: any): obj is null | undefined =>
isUndefined(obj) || obj === null;
export const isNil = (obj: any): boolean => isUndefined(obj) || obj === null;
export const isEmpty = (array: any): boolean => !(array && array.length > 0);
export const isSymbol = (fn: any): fn is symbol => typeof fn === 'symbol';

View File

@@ -1 +0,0 @@
Implements Nest core functionalities, low-level services, and utilities.

Some files were not shown because too many files have changed in this diff Show More