mirror of
https://github.com/nestjs/nest.git
synced 2026-02-23 15:52:50 +00:00
Compare commits
268 Commits
v6.5.0
...
BrunnerLiv
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c1a6a2f97 | ||
|
|
09ce572d8f | ||
|
|
3671a1b359 | ||
|
|
e2e27aff62 | ||
|
|
86a03124db | ||
|
|
ba26e3adf6 | ||
|
|
4d60d51b8d | ||
|
|
13ca0cd62e | ||
|
|
f61f21848a | ||
|
|
89ae259bef | ||
|
|
f89220eaed | ||
|
|
a53abc92c6 | ||
|
|
7a2183238b | ||
|
|
12426621fe | ||
|
|
4cd5aef606 | ||
|
|
296e8fe58d | ||
|
|
f2f825eeca | ||
|
|
b1d5a1bb7d | ||
|
|
af152d18a4 | ||
|
|
851a860c79 | ||
|
|
5d243ad231 | ||
|
|
fa1515a3f2 | ||
|
|
bb06006c94 | ||
|
|
88ef07e21b | ||
|
|
9ff5180a81 | ||
|
|
6d6d0f953d | ||
|
|
cde2d2112a | ||
|
|
e2548f34b5 | ||
|
|
4b5245d984 | ||
|
|
cb08895ee0 | ||
|
|
b5729ce521 | ||
|
|
321337eb8a | ||
|
|
1b59a8e0b4 | ||
|
|
0c444c68bb | ||
|
|
1d34dbaa2e | ||
|
|
ecf2f18785 | ||
|
|
17eb1d989c | ||
|
|
baa20004fc | ||
|
|
53554b3636 | ||
|
|
d093655da8 | ||
|
|
614a1e5669 | ||
|
|
ec96ac30ab | ||
|
|
f8237bde81 | ||
|
|
3bd21ce20d | ||
|
|
738e00ebb0 | ||
|
|
9edd0444e5 | ||
|
|
b840b1974c | ||
|
|
63262c38f6 | ||
|
|
e76786b1b1 | ||
|
|
68721a2539 | ||
|
|
591f7c7f97 | ||
|
|
0c726ded81 | ||
|
|
e3204d6799 | ||
|
|
d790dcf5d8 | ||
|
|
29596af7f0 | ||
|
|
4966ab880e | ||
|
|
58e25644d1 | ||
|
|
f55f32de0e | ||
|
|
a42be64668 | ||
|
|
9e1895d5ae | ||
|
|
d561e28fa7 | ||
|
|
3ccab0b47e | ||
|
|
ac21698128 | ||
|
|
cc80ce5dfd | ||
|
|
15a6d8e5fe | ||
|
|
14b0769011 | ||
|
|
98322161fb | ||
|
|
50083ce836 | ||
|
|
b147bc38ad | ||
|
|
74c48b6490 | ||
|
|
64e07ffd95 | ||
|
|
d3df1ce269 | ||
|
|
e963ffe07c | ||
|
|
fb81ae054a | ||
|
|
9f9455246b | ||
|
|
b7b5f6bf35 | ||
|
|
81ccfa8a63 | ||
|
|
2d527059b5 | ||
|
|
98bc2da6c0 | ||
|
|
2ff8a6378f | ||
|
|
62492813d1 | ||
|
|
8f5adebd00 | ||
|
|
c81a5b19f8 | ||
|
|
04681fcba1 | ||
|
|
0771207d78 | ||
|
|
5667872a52 | ||
|
|
39c67db000 | ||
|
|
10b717300d | ||
|
|
5f63041637 | ||
|
|
c41545ad13 | ||
|
|
39e7845f73 | ||
|
|
06861628eb | ||
|
|
ef46fc435a | ||
|
|
dde610bc54 | ||
|
|
931c8eec1c | ||
|
|
202a572ea4 | ||
|
|
f7bcb9283a | ||
|
|
ae577d4c5a | ||
|
|
65f44cf019 | ||
|
|
01da02560f | ||
|
|
4b0441e691 | ||
|
|
33cd414123 | ||
|
|
c7a63f37bf | ||
|
|
a28a821d73 | ||
|
|
d5429a4c58 | ||
|
|
222d7c9f53 | ||
|
|
d5c3b0542a | ||
|
|
a11098fba6 | ||
|
|
73ae49d10c | ||
|
|
75e3de119f | ||
|
|
692d78056d | ||
|
|
be25bc0e28 | ||
|
|
8d3b2a98c8 | ||
|
|
a0a04a719c | ||
|
|
a92b82ef38 | ||
|
|
9c5deef5ec | ||
|
|
2038b45d04 | ||
|
|
27e8ca7c5e | ||
|
|
ef01ec7abc | ||
|
|
b9852f68d0 | ||
|
|
8ea7de969b | ||
|
|
ac3537b973 | ||
|
|
0b05561201 | ||
|
|
a873457a3d | ||
|
|
62c5ce66f3 | ||
|
|
5e77c94c81 | ||
|
|
72238a1e0d | ||
|
|
921f542e45 | ||
|
|
1e573f6228 | ||
|
|
9e0fec0880 | ||
|
|
b3dffe398f | ||
|
|
521533e81a | ||
|
|
305fb4a464 | ||
|
|
547dcf810f | ||
|
|
54d94f8e3e | ||
|
|
ced03a041d | ||
|
|
05efc140db | ||
|
|
f1f1ecc66b | ||
|
|
6bb2765d2f | ||
|
|
3b982aab48 | ||
|
|
3dda0a9cb5 | ||
|
|
75cbb373be | ||
|
|
8f7b56e9d5 | ||
|
|
186976f950 | ||
|
|
e9dae8a1a8 | ||
|
|
84a37fec81 | ||
|
|
17e9e4acc7 | ||
|
|
0c4efab305 | ||
|
|
97bc3c66bc | ||
|
|
b501fd6e7f | ||
|
|
8dbb01c398 | ||
|
|
ed6448ac23 | ||
|
|
c9cf78d421 | ||
|
|
88cb1495d3 | ||
|
|
69c0357f22 | ||
|
|
a665aa8f74 | ||
|
|
25db843b7f | ||
|
|
a0a51302ed | ||
|
|
b3edf20a2d | ||
|
|
855dc056b8 | ||
|
|
5287c51779 | ||
|
|
c5e54bf509 | ||
|
|
f288c2bfe3 | ||
|
|
c568d9d3b4 | ||
|
|
7cf343449b | ||
|
|
a15380864f | ||
|
|
e29fb08d45 | ||
|
|
2b2d5782b8 | ||
|
|
c6890e59e6 | ||
|
|
2b2c78a46b | ||
|
|
623555d018 | ||
|
|
72ca19b973 | ||
|
|
00adefad42 | ||
|
|
4585670b96 | ||
|
|
0dcd010bc9 | ||
|
|
865b0317fa | ||
|
|
ad549e7846 | ||
|
|
694360cdbd | ||
|
|
8838e814fb | ||
|
|
16b3fb7e1c | ||
|
|
3aa52d43c4 | ||
|
|
7e964b973e | ||
|
|
842d2617c7 | ||
|
|
1985ebb52c | ||
|
|
38d56c2c50 | ||
|
|
d3a1c3ff7e | ||
|
|
9cef5fa108 | ||
|
|
fa57cca223 | ||
|
|
eff133265e | ||
|
|
a0803904be | ||
|
|
e69d709f59 | ||
|
|
9db1c013ff | ||
|
|
a5ebf54618 | ||
|
|
fc6b35fe13 | ||
|
|
d613799453 | ||
|
|
0d29b63c07 | ||
|
|
54a2890946 | ||
|
|
404e2a4fb1 | ||
|
|
6195174748 | ||
|
|
3e121891dd | ||
|
|
4fceae6bec | ||
|
|
370d0f76af | ||
|
|
fc99ccdb30 | ||
|
|
c94322d094 | ||
|
|
dd19f15b89 | ||
|
|
bfe182d965 | ||
|
|
8ed4cce9f7 | ||
|
|
0db528e2aa | ||
|
|
32a8f90c71 | ||
|
|
c0f70fd769 | ||
|
|
d5b2bee830 | ||
|
|
525e642286 | ||
|
|
9df178f12a | ||
|
|
8660043776 | ||
|
|
6ff7a7f266 | ||
|
|
7eafc150f0 | ||
|
|
9eef47c4bf | ||
|
|
51987bb43b | ||
|
|
fdfe0ed02e | ||
|
|
c06bbbed97 | ||
|
|
e834118914 | ||
|
|
ef199730c1 | ||
|
|
6980da363b | ||
|
|
f899064410 | ||
|
|
7a50e50dbf | ||
|
|
7c8f9d901c | ||
|
|
9a8de91bb9 | ||
|
|
6c22219605 | ||
|
|
6a031f0d63 | ||
|
|
d5f86c5ba4 | ||
|
|
b55367646c | ||
|
|
b7986bcaf0 | ||
|
|
94781480ed | ||
|
|
aa1d192b6a | ||
|
|
4bc15d483c | ||
|
|
1b84dda4de | ||
|
|
db5bbece3a | ||
|
|
9fd16f7478 | ||
|
|
a0fd983ce1 | ||
|
|
445717cf15 | ||
|
|
f92892423f | ||
|
|
9830b0071c | ||
|
|
f582625bcf | ||
|
|
e0d2209a06 | ||
|
|
b89133c2e7 | ||
|
|
6bbfd7b54f | ||
|
|
5ed1edf262 | ||
|
|
64e69cd2b5 | ||
|
|
aabe0295c6 | ||
|
|
6a6c62d430 | ||
|
|
fded926042 | ||
|
|
fc3dd675fa | ||
|
|
744a070658 | ||
|
|
ef4ab89b0d | ||
|
|
3774fed640 | ||
|
|
6ff7859976 | ||
|
|
8718f4763e | ||
|
|
4cbebed909 | ||
|
|
b1388b136c | ||
|
|
499c94792a | ||
|
|
c93d7e4ab0 | ||
|
|
2ec291cf4c | ||
|
|
e25e3c1e92 | ||
|
|
2655d19aa5 | ||
|
|
da45d58982 | ||
|
|
2bd0535cf8 | ||
|
|
4a7bb39c94 | ||
|
|
fb7f79383d |
12
.travis.yml
12
.travis.yml
@@ -7,13 +7,6 @@ cache:
|
||||
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
|
||||
|
||||
@@ -56,3 +49,8 @@ jobs:
|
||||
script: npm run lint
|
||||
node_js: 12
|
||||
|
||||
- stage: "Test"
|
||||
name: "Build samples"
|
||||
script: npm run build:samples
|
||||
node_js: 12
|
||||
|
||||
|
||||
7
CONTRIBUTING.md
Normal file → Executable file
7
CONTRIBUTING.md
Normal file → Executable 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 gitter channel][gitter].
|
||||
If you would like to chat about the question in real-time, you can reach out via [our discord channel][discord].
|
||||
|
||||
## <a name="issue"></a> Found a Bug?
|
||||
|
||||
@@ -206,8 +206,7 @@ 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, see
|
||||
[DEVELOPER.md](docs/DEVELOPER.md#clang-format).
|
||||
**100 characters**. An automated formatter is available (`npm run format`).
|
||||
|
||||
## <a name="commit"></a> Commit Message Guidelines
|
||||
|
||||
@@ -320,7 +319,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
|
||||
[gitter]: https://gitter.im/nestjs/nestjs
|
||||
[discord]: https://discordapp.com/invite/G7Qnnhy
|
||||
[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
|
||||
|
||||
30
Readme.md
30
Readme.md
@@ -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, heavily inspired by <a href="https://angular.io" target="blank">Angular</a>.</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.</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>
|
||||
@@ -60,25 +60,23 @@ 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="125" valign="middle" /> </a> <a href="https://blueanchor.io/" target="_blank"><img src="https://nestjs.com/img/blueanchor.png" width="180" valign="middle" /></a>
|
||||
<a href="https://www.novologic.com/" target="_blank"><img src="https://nestjs.com/img/novologic.png" width="130" valign="middle" /></a>
|
||||
<a href="https://scal.io" target="_blank"><img src="https://nestjs.com/img/scalio-logo.svg" width="100" valign="middle" /></a> <a href="http://angularity.io" target="_blank"><img src="http://angularity.io/media/logo.svg" height="26" valign="middle" /></a> <!--<a href="https://keycdn.com"><img src="https://nestjs.com/img/keycdn.svg" height="30" /></a> --> <a href="https://hostpresto.com" target="_blank"><img src="https://nestjs.com/img/hostpresto.png" height="30" valign="middle" /></a>
|
||||
|
||||
<a href="https://genuinebee.com/" target="_blank"><img src="https://nestjs.com/img/genuinebee.svg" height="36" valign="middle" /></a> <a href="http://architectnow.net/" target="_blank"><img src="https://nestjs.com/img/architectnow.png" height="24" valign="middle" /></a> <a href="https://quander.io/" target="_blank"><img src="https://nestjs.com/img/quander.png" height="28" valign="middle" /></a> <a href="https://mantro.net/" target="_blank"><img src="https://nestjs.com/img/mantro-logo.svg" height="20" valign="middle" /></a> <a href="https://triplebyte.com/" target="_blank"><img src="https://nestjs.com/img/triplebyte.png" height="30" valign="middle" /></a>
|
||||
<a href="https://ever.co/" target="_blank"><img src="https://nestjs.com/img/ever-logo.png" height="20" valign="middle" /></a>
|
||||
<a href="https://buddy.works/" target="_blank"><img src="https://nestjs.com/img/buddy-logo.svg" height="35" valign="middle" /></a>
|
||||
<a href="https://blokt.com" target="_blank"><img src="https://nestjs.com/img/blokt-logo.png" height="31" valign="middle" /></a>
|
||||
<a href="https://reposit.co.uk/" target="_blank"><img src="https://nestjs.com/img/reposit-logo.png" height="28" valign="middle" /></a> <a href="https://yakaz.com/" target="_blank"><img src="https://nestjs.com/img/yakaz.png" width="80" valign="middle" /></a>
|
||||
<a href="https://nearpod.com/" target="_blank"><img src="https://nestjs.com/img/nearpod-logo.svg" width="120" valign="middle" /></a>
|
||||
<a href="https://clay.global/" target="_blank"><img src="https://nestjs.com/img/clay-logo.svg" width="90" valign="middle" /></a>
|
||||
<a href="https://firesticktricks.com" target="_blank"><img src="https://nestjs.com/img/firesticktricks-logo.png" width="145" valign="middle" /></a>
|
||||
<a href="http://xtremis.com/" target="_blank"><img src="https://nestjs.com/img/logo-xtremis.svg" width="145" valign="middle" /></a>
|
||||
|
||||
<a href="https://www.swingdev.io" target="_blank"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="110" valign="middle" /> </a> <a href="https://blueanchor.io/" target="_blank"><img src="https://nestjs.com/img/blueanchor.png" width="150" valign="middle" /></a>
|
||||
<a href="https://www.novologic.com/" target="_blank"><img src="https://nestjs.com/img/novologic.png" width="110" valign="middle" /></a>
|
||||
<a href="https://scal.io" target="_blank"><img src="https://nestjs.com/img/scalio-logo.svg" width="80" valign="middle" /></a> <a href="http://angularity.io" target="_blank"><img src="http://angularity.io/media/logo.svg" height="22" valign="middle" /></a> <!--<a href="https://keycdn.com"><img src="https://nestjs.com/img/keycdn.svg" height="30" /></a> --> <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>
|
||||
<a href="https://buddy.works/" target="_blank"><img src="https://nestjs.com/img/buddy-logo.svg" height="25" valign="middle" /></a>
|
||||
<a href="https://blokt.com" target="_blank"><img src="https://nestjs.com/img/blokt-logo.png" height="25" valign="middle" /></a> <a href="https://genuinebee.com/" target="_blank"><img src="https://nestjs.com/img/genuinebee.svg" height="24" valign="middle" /></a> <a href="http://architectnow.net/" target="_blank"><img src="https://nestjs.com/img/architectnow.png" height="20" valign="middle" /></a> <a href="https://quander.io/" target="_blank"><img src="https://nestjs.com/img/quander.png" height="22" valign="middle" /></a> <a href="https://mantro.net/" target="_blank"><img src="https://nestjs.com/img/mantro-logo.svg" height="19" valign="middle" /></a> <a href="https://triplebyte.com/" target="_blank"><img src="https://nestjs.com/img/triplebyte.png" height="20" valign="middle" /></a>
|
||||
<a href="https://reposit.co.uk/" target="_blank"><img src="https://nestjs.com/img/reposit-logo.png" height="18" valign="middle" /></a> <a href="https://yakaz.com/" target="_blank"><img src="https://nestjs.com/img/yakaz.png" width="70" valign="middle" /></a>
|
||||
<a href="https://nearpod.com/" target="_blank"><img src="https://nestjs.com/img/nearpod-logo.svg" width="100" valign="middle" /></a>
|
||||
<a href="https://clay.global/" target="_blank"><img src="https://nestjs.com/img/clay-logo.svg" width="75" valign="middle" /></a>
|
||||
<a href="https://firesticktricks.com" target="_blank"><img src="https://nestjs.com/img/firesticktricks-logo.png" width="120" valign="middle" /></a>
|
||||
<a href="https://www.codeguesser.co.uk" target="_blank"><img src="https://nestjs.com/img/codeguesser-logo.svg" width="120" valign="middle" /></a>
|
||||
<a href="https://tekhattan.com" target="_blank"><img src="https://nestjs.com/img/tekhattan-logo.png" width="110" valign="middle" /></a>
|
||||
|
||||
|
||||
## Backers
|
||||
|
||||
<a href="https://opencollective.com/nest" target="_blank"><img src="https://opencollective.com/nest/backers.svg?width=1600"></a>
|
||||
<a href="https://opencollective.com/nest" target="_blank"><img src="https://opencollective.com/nest/backers.svg?width=1000"></a>
|
||||
|
||||
## Stay in touch
|
||||
|
||||
|
||||
123
gulpfile.js
123
gulpfile.js
@@ -1,117 +1,16 @@
|
||||
const fs = require('fs');
|
||||
'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 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 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];
|
||||
const projectDir = __dirname;
|
||||
const tsconfigPath = path.join(projectDir, 'tools/gulp/tsconfig.json');
|
||||
|
||||
gulp.task('default', function() {
|
||||
modules.forEach(module => {
|
||||
gulp.watch(
|
||||
[`${source}/${module}/**/*.ts`, `${source}/${module}/*.ts`],
|
||||
[module],
|
||||
);
|
||||
});
|
||||
require('ts-node').register({
|
||||
project: tsconfigPath
|
||||
});
|
||||
|
||||
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;
|
||||
});
|
||||
require('./tools/gulp/gulpfile');
|
||||
@@ -23,7 +23,7 @@ services:
|
||||
- "9001:9001"
|
||||
restart: always
|
||||
mysql:
|
||||
image: mysql:5.7.26
|
||||
image: mysql:5.7.27
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: test
|
||||
|
||||
1658
integration/graphql/package-lock.json
generated
1658
integration/graphql/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -9,21 +9,21 @@
|
||||
"start:prod": "node dist/main.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "6.4.1",
|
||||
"@nestjs/core": "6.4.1",
|
||||
"@nestjs/graphql": "6.2.4",
|
||||
"apollo-server-express": "2.6.7",
|
||||
"graphql": "14.4.2",
|
||||
"@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",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.5.2",
|
||||
"subscriptions-transport-ws": "0.9.16",
|
||||
"typescript": "3.5.3",
|
||||
"ws": "7.1.0"
|
||||
"ws": "7.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.10.6",
|
||||
"@types/node": "7.10.7",
|
||||
"ts-node": "8.3.0",
|
||||
"tslint": "5.18.0"
|
||||
"tslint": "5.19.0"
|
||||
}
|
||||
}
|
||||
|
||||
116
integration/hello-world/package-lock.json
generated
116
integration/hello-world/package-lock.json
generated
@@ -5,9 +5,9 @@
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@nestjs/common": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.4.1.tgz",
|
||||
"integrity": "sha512-qgex1F+ag5/8rxgsBHyXjNIyNJhNGjB1UHcFhMjGYxbfaz/5TSiv5A07IN2ZkCyNPRe35YPEvM5tJjTDul6FIg==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
|
||||
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
|
||||
"requires": {
|
||||
"axios": "0.19.0",
|
||||
"cli-color": "1.4.0",
|
||||
@@ -15,9 +15,9 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/core": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.4.1.tgz",
|
||||
"integrity": "sha512-g11VtXwXtTO9i1o+is5JNhUsiUa/tNqmtW2GWxXZcmjxNbCLOOjkLd2FHsyCLpBnl7OVkYDqwL9Fcl9ydgQa3Q==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
|
||||
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
|
||||
"requires": {
|
||||
"@nuxtjs/opencollective": "0.2.2",
|
||||
"fast-safe-stringify": "2.0.6",
|
||||
@@ -28,9 +28,9 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/microservices": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.4.1.tgz",
|
||||
"integrity": "sha512-8LP+5aYbt56NzWZstGiWRI6Xpi8QSCkzoBo0l0RKWpsL33bDRngTK7SfBVR4YfjE2N2FyPYWUY5t8S+0BUS1lg==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.5.3.tgz",
|
||||
"integrity": "sha512-T9zZf61myahenI4c0qhcYnhnx49L+zL9+8W6fc+LPTarbt1HJDu6iyj6fh2BzewakwNLJRyGMJ9YCYlXhFuvlA==",
|
||||
"requires": {
|
||||
"iterare": "1.2.0",
|
||||
"json-socket": "0.3.0",
|
||||
@@ -38,17 +38,17 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/testing": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.4.1.tgz",
|
||||
"integrity": "sha512-TQxTGnlKRUwL081ZvQpcwthsZMcOBlH2hGq/lN+DSPCgraqx7puRyIdi4Z70zjjAKwfZ7KUYjK0/wOYd8XhsrQ==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.5.3.tgz",
|
||||
"integrity": "sha512-W8tPhkNVhmX+jaDu4R7WUOtIl0PK3ZDso434rEm/b1+S6ZRgAKwNVHWM/rwIuTi5+erPTEULtTsZgrXFrzC1sA==",
|
||||
"requires": {
|
||||
"optional": "0.1.4"
|
||||
}
|
||||
},
|
||||
"@nestjs/websockets": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.4.1.tgz",
|
||||
"integrity": "sha512-pj2itFnL2LN9HUL29YpHREHIBRisTd0U7n5FjTeKGElXyxPRX+aEa95EsQRqYAq0wKIu9EDa5rP/drGKLFah3w==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.5.3.tgz",
|
||||
"integrity": "sha512-YrCvmLHTW0OBusTiUOPrG0PNrw/3Gatty/bh3ro5cEoiovcaJxGSMsTC+JSVXqPwRJjEtoHMCr5Qje2rAepIzQ==",
|
||||
"requires": {
|
||||
"iterare": "1.2.0"
|
||||
}
|
||||
@@ -64,20 +64,25 @@
|
||||
}
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "7.10.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.6.tgz",
|
||||
"integrity": "sha512-d0BOAicT0tEdbdVQlLGOVul1kvg6YvbaADRCThGCz5NJ0e9r00SofcR1x69hmlCyrHuB6jd4cKzL9bMLjPnpAA==",
|
||||
"version": "7.10.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.7.tgz",
|
||||
"integrity": "sha512-4I7+hXKyq7e1deuzX9udu0hPIYqSSkdKXtjow6fMnQ3OR9qkxIErGHbGY08YrfZJrCS1ajK8lOuzd0k3n2WM4A==",
|
||||
"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.0",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz",
|
||||
"integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==",
|
||||
"version": "6.10.2",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz",
|
||||
"integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==",
|
||||
"requires": {
|
||||
"fast-deep-equal": "^2.0.1",
|
||||
"fast-json-stable-stringify": "^2.0.0",
|
||||
@@ -171,12 +176,13 @@
|
||||
"integrity": "sha512-qsP+0xoavpOlJHuYsQJsN58HXSl8Jvveo+T37rEvCEeRfMWoytAyR0Ua/YsFgpM6AZYZ/og2PJwArwzJl1aXtQ=="
|
||||
},
|
||||
"class-validator": {
|
||||
"version": "0.9.1",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.9.1.tgz",
|
||||
"integrity": "sha512-3wApflrd3ywVZyx4jaasGoFt8pmo4aGLPPAEKCKCsTRWVGPilahD88q3jQjRQwja50rl9a7rsP5LAxJYwGK8/Q==",
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.0.tgz",
|
||||
"integrity": "sha512-RvjxRlvoCvM/ojUq11j78ISpReGdBoMErdmDk1e27aQZK6ppSXq751UE6jB9JI7ayEnL6Nnmllzn/HXVSu3dmg==",
|
||||
"requires": {
|
||||
"@types/validator": "10.11.2",
|
||||
"google-libphonenumber": "^3.1.6",
|
||||
"validator": "10.4.0"
|
||||
"validator": "11.1.0"
|
||||
}
|
||||
},
|
||||
"cli-color": {
|
||||
@@ -255,9 +261,9 @@
|
||||
}
|
||||
},
|
||||
"deepmerge": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-3.3.0.tgz",
|
||||
"integrity": "sha512-GRQOafGHwMHpjPx9iCvTgpu9NojZ49q794EEL94JVEw6VaeA8XTUyBKvAkOOjBX9oJNiV6G3P+T+tihFjo2TqA=="
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.0.0.tgz",
|
||||
"integrity": "sha512-YZ1rOP5+kHor4hMAH+HRQnBQHg+wvS1un1hAOuIcxcBy0hzcUf6Jg2a1w65kpoOUnurOfZbERwjI1TfZxNjcww=="
|
||||
},
|
||||
"delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
@@ -347,12 +353,12 @@
|
||||
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
|
||||
},
|
||||
"fast-json-stringify": {
|
||||
"version": "1.15.3",
|
||||
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.15.3.tgz",
|
||||
"integrity": "sha512-p+ucnySTbrUQ9M7u8ygFIxrmpG8B+8O4/PvLDdh+RqMMgj/h6OoDb7U2lP+kqg3PDclQBFbSIArRhkorFwZLLg==",
|
||||
"version": "1.15.4",
|
||||
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.15.4.tgz",
|
||||
"integrity": "sha512-lsGTxL0OIGjGSUXgWUOdSgjCL/xMyMvMudfGN3D1zOLEv44fYZ1ZXmMyCON5XdpaiZN6nCXmU7GQg7fbXfPG4g==",
|
||||
"requires": {
|
||||
"ajv": "^6.8.1",
|
||||
"deepmerge": "^3.0.0"
|
||||
"deepmerge": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"fast-redact": {
|
||||
@@ -366,19 +372,19 @@
|
||||
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
|
||||
},
|
||||
"fastify": {
|
||||
"version": "2.6.0",
|
||||
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.6.0.tgz",
|
||||
"integrity": "sha512-3GxGV2P8731o2S5T6ng5NMJ9S7vFpZA4mk2mJEbMbhQ5aj1HhNGBOe39TYa2gWRrJVJuXxYYYIlY/5cFhiHpNg==",
|
||||
"version": "2.7.1",
|
||||
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.7.1.tgz",
|
||||
"integrity": "sha512-ScKPXD84lkdCgz7q0zjyBr1aLxKbXRt9HYL3XIt/L8ZD2f3fAcsLEyQ2/rHxLUzLGjPlEjIvprWUL3RZvlLRLw==",
|
||||
"requires": {
|
||||
"abstract-logging": "^1.0.0",
|
||||
"ajv": "^6.9.2",
|
||||
"ajv": "^6.10.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.2.0",
|
||||
"light-my-request": "^3.4.1",
|
||||
"middie": "^4.0.1",
|
||||
"pino": "^5.11.1",
|
||||
"pino": "^5.13.1",
|
||||
"proxy-addr": "^2.0.4",
|
||||
"readable-stream": "^3.1.1",
|
||||
"rfdc": "^1.1.2",
|
||||
@@ -440,9 +446,9 @@
|
||||
"integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
|
||||
},
|
||||
"google-libphonenumber": {
|
||||
"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=="
|
||||
"version": "3.2.3",
|
||||
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.3.tgz",
|
||||
"integrity": "sha512-8n4JyRptifaIRlHANKRlfqLR8fANm7+Q+1qvDuUsUeStSLtLGTVsZWe1llWDfgWTm1y07cEUyiRuNIv6cs2ovg=="
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
@@ -485,9 +491,9 @@
|
||||
"integrity": "sha512-jc8ZbUnYIWdxERFWQKVgwSLkGSe+kyzvmYxwNaRgx/c8NNyuHes4UHnPM3LUrAFXUx1BhNJ94n1h/KCRlbvV0g=="
|
||||
},
|
||||
"light-my-request": {
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-3.4.0.tgz",
|
||||
"integrity": "sha512-zIEl4lKwATE5uPmxEZkVIIAr/JGrHEngf9MDZ7a1TodLZ93kROYkKkoqSCmQIJ01FXrzyYMnmtemBO/b1HFt0Q==",
|
||||
"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==",
|
||||
"requires": {
|
||||
"ajv": "^6.8.1",
|
||||
"readable-stream": "^3.1.1"
|
||||
@@ -589,16 +595,16 @@
|
||||
"integrity": "sha512-ZOtfhPttCrqp2M1PBBH4X13XlvnfhIwD7yCLx+GoGoXRPQyxGOTdQMpIzPSPKXAJT/JQrdfFrgdJOyAzvgpQ9A=="
|
||||
},
|
||||
"pino": {
|
||||
"version": "5.12.6",
|
||||
"resolved": "https://registry.npmjs.org/pino/-/pino-5.12.6.tgz",
|
||||
"integrity": "sha512-LM5ug2b27uymIIkaBw54ncF+9DSf8S4z1uzw+Y5I94dRu3Z+lFuB13j0kg1InAeyxy+CsLGnWHKy9+zgTreFOg==",
|
||||
"version": "5.13.1",
|
||||
"resolved": "https://registry.npmjs.org/pino/-/pino-5.13.1.tgz",
|
||||
"integrity": "sha512-IxusG28L0g50uuf21kZELypdFOeNrJ/kRhktdi7LtdZQWCxLliMxG5iOrGUQ/ng7MiJ4XqXi/hfyXwZeKc1MxA==",
|
||||
"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.3"
|
||||
"sonic-boom": "^0.7.5"
|
||||
}
|
||||
},
|
||||
"pino-std-serializers": {
|
||||
@@ -699,11 +705,11 @@
|
||||
"integrity": "sha512-TcZvGMMy9vodEFSse30lWinkj+JgOBvPn8wRItpQRSayhc+4ssDs335uklkfvQQJgL/WvmHLVj4Ycv2s7QCQMg=="
|
||||
},
|
||||
"sonic-boom": {
|
||||
"version": "0.7.4",
|
||||
"resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.4.tgz",
|
||||
"integrity": "sha512-8JRAJg0RxZtFLQMxolwETvWd2JSlH3ZGo/Z4xPxMbpqF14xCgVYPVeFCFOR3zyr3pcfG82QDVj6537Sx5ZWdNw==",
|
||||
"version": "0.7.5",
|
||||
"resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.5.tgz",
|
||||
"integrity": "sha512-1pKrnAV6RfvntPnarY71tpthFTM3pWZWWQdghZY8ARjtDPGzG/inxqSuRwQY/7V1woUjfyxPb437zn4p5phgnQ==",
|
||||
"requires": {
|
||||
"flatstr": "^1.0.9"
|
||||
"flatstr": "^1.0.12"
|
||||
}
|
||||
},
|
||||
"source-map": {
|
||||
@@ -859,9 +865,9 @@
|
||||
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
|
||||
},
|
||||
"validator": {
|
||||
"version": "10.4.0",
|
||||
"resolved": "https://registry.npmjs.org/validator/-/validator-10.4.0.tgz",
|
||||
"integrity": "sha512-Q/wBy3LB1uOyssgNlXSRmaf22NxjvDNZM2MtIQ4jaEOAB61xsh1TQxsq1CgzUMBV1lDrVMogIh8GjG1DYW0zLg=="
|
||||
"version": "11.1.0",
|
||||
"resolved": "https://registry.npmjs.org/validator/-/validator-11.1.0.tgz",
|
||||
"integrity": "sha512-qiQ5ktdO7CD6C/5/mYV4jku/7qnqzjrxb3C/Q5wR3vGGinHTgJZN/TdFT3ZX4vXhX2R1PXx42fB1cn5W+uJ4lg=="
|
||||
},
|
||||
"yn": {
|
||||
"version": "3.1.0",
|
||||
|
||||
@@ -7,20 +7,20 @@
|
||||
"start": "ts-node src/main"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "6.4.1",
|
||||
"@nestjs/core": "6.4.1",
|
||||
"@nestjs/microservices": "6.4.1",
|
||||
"@nestjs/testing": "6.4.1",
|
||||
"@nestjs/websockets": "6.4.1",
|
||||
"@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",
|
||||
"class-transformer": "0.2.3",
|
||||
"class-validator": "0.9.1",
|
||||
"fastify": "2.6.0",
|
||||
"class-validator": "0.10.0",
|
||||
"fastify": "2.7.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.5.2",
|
||||
"typescript": "3.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.10.6",
|
||||
"@types/node": "7.10.7",
|
||||
"supertest": "4.0.2",
|
||||
"ts-node": "8.3.0"
|
||||
}
|
||||
|
||||
44
integration/hooks/package-lock.json
generated
44
integration/hooks/package-lock.json
generated
@@ -5,9 +5,9 @@
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@nestjs/common": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.4.1.tgz",
|
||||
"integrity": "sha512-qgex1F+ag5/8rxgsBHyXjNIyNJhNGjB1UHcFhMjGYxbfaz/5TSiv5A07IN2ZkCyNPRe35YPEvM5tJjTDul6FIg==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
|
||||
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
|
||||
"requires": {
|
||||
"axios": "0.19.0",
|
||||
"cli-color": "1.4.0",
|
||||
@@ -15,9 +15,9 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/core": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.4.1.tgz",
|
||||
"integrity": "sha512-g11VtXwXtTO9i1o+is5JNhUsiUa/tNqmtW2GWxXZcmjxNbCLOOjkLd2FHsyCLpBnl7OVkYDqwL9Fcl9ydgQa3Q==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
|
||||
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
|
||||
"requires": {
|
||||
"@nuxtjs/opencollective": "0.2.2",
|
||||
"fast-safe-stringify": "2.0.6",
|
||||
@@ -38,11 +38,16 @@
|
||||
}
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "7.10.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.6.tgz",
|
||||
"integrity": "sha512-d0BOAicT0tEdbdVQlLGOVul1kvg6YvbaADRCThGCz5NJ0e9r00SofcR1x69hmlCyrHuB6jd4cKzL9bMLjPnpAA==",
|
||||
"version": "7.10.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.7.tgz",
|
||||
"integrity": "sha512-4I7+hXKyq7e1deuzX9udu0hPIYqSSkdKXtjow6fMnQ3OR9qkxIErGHbGY08YrfZJrCS1ajK8lOuzd0k3n2WM4A==",
|
||||
"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",
|
||||
@@ -99,12 +104,13 @@
|
||||
"integrity": "sha512-qsP+0xoavpOlJHuYsQJsN58HXSl8Jvveo+T37rEvCEeRfMWoytAyR0Ua/YsFgpM6AZYZ/og2PJwArwzJl1aXtQ=="
|
||||
},
|
||||
"class-validator": {
|
||||
"version": "0.9.1",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.9.1.tgz",
|
||||
"integrity": "sha512-3wApflrd3ywVZyx4jaasGoFt8pmo4aGLPPAEKCKCsTRWVGPilahD88q3jQjRQwja50rl9a7rsP5LAxJYwGK8/Q==",
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.0.tgz",
|
||||
"integrity": "sha512-RvjxRlvoCvM/ojUq11j78ISpReGdBoMErdmDk1e27aQZK6ppSXq751UE6jB9JI7ayEnL6Nnmllzn/HXVSu3dmg==",
|
||||
"requires": {
|
||||
"@types/validator": "10.11.2",
|
||||
"google-libphonenumber": "^3.1.6",
|
||||
"validator": "10.4.0"
|
||||
"validator": "11.1.0"
|
||||
}
|
||||
},
|
||||
"cli-color": {
|
||||
@@ -301,9 +307,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"google-libphonenumber": {
|
||||
"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=="
|
||||
"version": "3.2.3",
|
||||
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.3.tgz",
|
||||
"integrity": "sha512-8n4JyRptifaIRlHANKRlfqLR8fANm7+Q+1qvDuUsUeStSLtLGTVsZWe1llWDfgWTm1y07cEUyiRuNIv6cs2ovg=="
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
@@ -577,9 +583,9 @@
|
||||
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
|
||||
},
|
||||
"validator": {
|
||||
"version": "10.4.0",
|
||||
"resolved": "https://registry.npmjs.org/validator/-/validator-10.4.0.tgz",
|
||||
"integrity": "sha512-Q/wBy3LB1uOyssgNlXSRmaf22NxjvDNZM2MtIQ4jaEOAB61xsh1TQxsq1CgzUMBV1lDrVMogIh8GjG1DYW0zLg=="
|
||||
"version": "11.1.0",
|
||||
"resolved": "https://registry.npmjs.org/validator/-/validator-11.1.0.tgz",
|
||||
"integrity": "sha512-qiQ5ktdO7CD6C/5/mYV4jku/7qnqzjrxb3C/Q5wR3vGGinHTgJZN/TdFT3ZX4vXhX2R1PXx42fB1cn5W+uJ4lg=="
|
||||
},
|
||||
"yn": {
|
||||
"version": "3.1.0",
|
||||
|
||||
@@ -7,16 +7,16 @@
|
||||
"start": "ts-node src/main"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "6.4.1",
|
||||
"@nestjs/core": "6.4.1",
|
||||
"@nestjs/common": "6.5.3",
|
||||
"@nestjs/core": "6.5.3",
|
||||
"class-transformer": "0.2.3",
|
||||
"class-validator": "0.9.1",
|
||||
"class-validator": "0.10.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.5.2",
|
||||
"typescript": "3.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.10.6",
|
||||
"@types/node": "7.10.7",
|
||||
"supertest": "4.0.2",
|
||||
"ts-node": "8.3.0"
|
||||
}
|
||||
|
||||
62
integration/injector/package-lock.json
generated
62
integration/injector/package-lock.json
generated
@@ -5,9 +5,9 @@
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@nestjs/common": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.4.1.tgz",
|
||||
"integrity": "sha512-qgex1F+ag5/8rxgsBHyXjNIyNJhNGjB1UHcFhMjGYxbfaz/5TSiv5A07IN2ZkCyNPRe35YPEvM5tJjTDul6FIg==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
|
||||
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
|
||||
"requires": {
|
||||
"axios": "0.19.0",
|
||||
"cli-color": "1.4.0",
|
||||
@@ -15,9 +15,9 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/core": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.4.1.tgz",
|
||||
"integrity": "sha512-g11VtXwXtTO9i1o+is5JNhUsiUa/tNqmtW2GWxXZcmjxNbCLOOjkLd2FHsyCLpBnl7OVkYDqwL9Fcl9ydgQa3Q==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
|
||||
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
|
||||
"requires": {
|
||||
"@nuxtjs/opencollective": "0.2.2",
|
||||
"fast-safe-stringify": "2.0.6",
|
||||
@@ -28,9 +28,9 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/microservices": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.4.1.tgz",
|
||||
"integrity": "sha512-8LP+5aYbt56NzWZstGiWRI6Xpi8QSCkzoBo0l0RKWpsL33bDRngTK7SfBVR4YfjE2N2FyPYWUY5t8S+0BUS1lg==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.5.3.tgz",
|
||||
"integrity": "sha512-T9zZf61myahenI4c0qhcYnhnx49L+zL9+8W6fc+LPTarbt1HJDu6iyj6fh2BzewakwNLJRyGMJ9YCYlXhFuvlA==",
|
||||
"requires": {
|
||||
"iterare": "1.2.0",
|
||||
"json-socket": "0.3.0",
|
||||
@@ -38,17 +38,17 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/testing": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.4.1.tgz",
|
||||
"integrity": "sha512-TQxTGnlKRUwL081ZvQpcwthsZMcOBlH2hGq/lN+DSPCgraqx7puRyIdi4Z70zjjAKwfZ7KUYjK0/wOYd8XhsrQ==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.5.3.tgz",
|
||||
"integrity": "sha512-W8tPhkNVhmX+jaDu4R7WUOtIl0PK3ZDso434rEm/b1+S6ZRgAKwNVHWM/rwIuTi5+erPTEULtTsZgrXFrzC1sA==",
|
||||
"requires": {
|
||||
"optional": "0.1.4"
|
||||
}
|
||||
},
|
||||
"@nestjs/websockets": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.4.1.tgz",
|
||||
"integrity": "sha512-pj2itFnL2LN9HUL29YpHREHIBRisTd0U7n5FjTeKGElXyxPRX+aEa95EsQRqYAq0wKIu9EDa5rP/drGKLFah3w==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.5.3.tgz",
|
||||
"integrity": "sha512-YrCvmLHTW0OBusTiUOPrG0PNrw/3Gatty/bh3ro5cEoiovcaJxGSMsTC+JSVXqPwRJjEtoHMCr5Qje2rAepIzQ==",
|
||||
"requires": {
|
||||
"iterare": "1.2.0"
|
||||
}
|
||||
@@ -64,11 +64,16 @@
|
||||
}
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "7.10.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.6.tgz",
|
||||
"integrity": "sha512-d0BOAicT0tEdbdVQlLGOVul1kvg6YvbaADRCThGCz5NJ0e9r00SofcR1x69hmlCyrHuB6jd4cKzL9bMLjPnpAA==",
|
||||
"version": "7.10.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.7.tgz",
|
||||
"integrity": "sha512-4I7+hXKyq7e1deuzX9udu0hPIYqSSkdKXtjow6fMnQ3OR9qkxIErGHbGY08YrfZJrCS1ajK8lOuzd0k3n2WM4A==",
|
||||
"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",
|
||||
@@ -125,12 +130,13 @@
|
||||
"integrity": "sha512-qsP+0xoavpOlJHuYsQJsN58HXSl8Jvveo+T37rEvCEeRfMWoytAyR0Ua/YsFgpM6AZYZ/og2PJwArwzJl1aXtQ=="
|
||||
},
|
||||
"class-validator": {
|
||||
"version": "0.9.1",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.9.1.tgz",
|
||||
"integrity": "sha512-3wApflrd3ywVZyx4jaasGoFt8pmo4aGLPPAEKCKCsTRWVGPilahD88q3jQjRQwja50rl9a7rsP5LAxJYwGK8/Q==",
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.0.tgz",
|
||||
"integrity": "sha512-RvjxRlvoCvM/ojUq11j78ISpReGdBoMErdmDk1e27aQZK6ppSXq751UE6jB9JI7ayEnL6Nnmllzn/HXVSu3dmg==",
|
||||
"requires": {
|
||||
"@types/validator": "10.11.2",
|
||||
"google-libphonenumber": "^3.1.6",
|
||||
"validator": "10.4.0"
|
||||
"validator": "11.1.0"
|
||||
}
|
||||
},
|
||||
"cli-color": {
|
||||
@@ -327,9 +333,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"google-libphonenumber": {
|
||||
"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=="
|
||||
"version": "3.2.3",
|
||||
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.3.tgz",
|
||||
"integrity": "sha512-8n4JyRptifaIRlHANKRlfqLR8fANm7+Q+1qvDuUsUeStSLtLGTVsZWe1llWDfgWTm1y07cEUyiRuNIv6cs2ovg=="
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
@@ -608,9 +614,9 @@
|
||||
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
|
||||
},
|
||||
"validator": {
|
||||
"version": "10.4.0",
|
||||
"resolved": "https://registry.npmjs.org/validator/-/validator-10.4.0.tgz",
|
||||
"integrity": "sha512-Q/wBy3LB1uOyssgNlXSRmaf22NxjvDNZM2MtIQ4jaEOAB61xsh1TQxsq1CgzUMBV1lDrVMogIh8GjG1DYW0zLg=="
|
||||
"version": "11.1.0",
|
||||
"resolved": "https://registry.npmjs.org/validator/-/validator-11.1.0.tgz",
|
||||
"integrity": "sha512-qiQ5ktdO7CD6C/5/mYV4jku/7qnqzjrxb3C/Q5wR3vGGinHTgJZN/TdFT3ZX4vXhX2R1PXx42fB1cn5W+uJ4lg=="
|
||||
},
|
||||
"yn": {
|
||||
"version": "3.1.0",
|
||||
|
||||
@@ -7,19 +7,19 @@
|
||||
"start": "ts-node src/main"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "6.4.1",
|
||||
"@nestjs/core": "6.4.1",
|
||||
"@nestjs/microservices": "6.4.1",
|
||||
"@nestjs/testing": "6.4.1",
|
||||
"@nestjs/websockets": "6.4.1",
|
||||
"@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",
|
||||
"class-transformer": "0.2.3",
|
||||
"class-validator": "0.9.1",
|
||||
"class-validator": "0.10.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.5.2",
|
||||
"typescript": "3.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.10.6",
|
||||
"@types/node": "7.10.7",
|
||||
"supertest": "4.0.2",
|
||||
"ts-node": "8.3.0"
|
||||
}
|
||||
|
||||
@@ -46,7 +46,8 @@ describe('MQTT transport', () => {
|
||||
.expect(200, '15');
|
||||
});
|
||||
|
||||
it(`/POST (concurrent)`, () => {
|
||||
it(`/POST (concurrent)`, function() {
|
||||
this.retries(10);
|
||||
return request(server)
|
||||
.post('/concurrent')
|
||||
.send([
|
||||
@@ -62,7 +63,7 @@ describe('MQTT transport', () => {
|
||||
Array.from({ length: 10 }, (v, k) => k + 91),
|
||||
])
|
||||
.expect(200, 'true');
|
||||
});
|
||||
}).timeout(5000);
|
||||
|
||||
it(`/POST (streaming)`, () => {
|
||||
return request(server)
|
||||
|
||||
@@ -46,7 +46,9 @@ describe('REDIS transport', () => {
|
||||
.expect(200, '15');
|
||||
});
|
||||
|
||||
it(`/POST (concurrent)`, () => {
|
||||
it(`/POST (concurrent)`, function() {
|
||||
this.retries(10);
|
||||
|
||||
return request(server)
|
||||
.post('/concurrent')
|
||||
.send([
|
||||
@@ -62,7 +64,7 @@ describe('REDIS transport', () => {
|
||||
Array.from({ length: 10 }, (v, k) => k + 91),
|
||||
])
|
||||
.expect(200, 'true');
|
||||
});
|
||||
}).timeout(5000);
|
||||
|
||||
it(`/POST (streaming)`, () => {
|
||||
return request(server)
|
||||
|
||||
82
integration/microservices/package-lock.json
generated
82
integration/microservices/package-lock.json
generated
@@ -5,9 +5,9 @@
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@nestjs/common": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.4.1.tgz",
|
||||
"integrity": "sha512-qgex1F+ag5/8rxgsBHyXjNIyNJhNGjB1UHcFhMjGYxbfaz/5TSiv5A07IN2ZkCyNPRe35YPEvM5tJjTDul6FIg==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
|
||||
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
|
||||
"requires": {
|
||||
"axios": "0.19.0",
|
||||
"cli-color": "1.4.0",
|
||||
@@ -15,9 +15,9 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/core": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.4.1.tgz",
|
||||
"integrity": "sha512-g11VtXwXtTO9i1o+is5JNhUsiUa/tNqmtW2GWxXZcmjxNbCLOOjkLd2FHsyCLpBnl7OVkYDqwL9Fcl9ydgQa3Q==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
|
||||
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
|
||||
"requires": {
|
||||
"@nuxtjs/opencollective": "0.2.2",
|
||||
"fast-safe-stringify": "2.0.6",
|
||||
@@ -28,9 +28,9 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/microservices": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.4.1.tgz",
|
||||
"integrity": "sha512-8LP+5aYbt56NzWZstGiWRI6Xpi8QSCkzoBo0l0RKWpsL33bDRngTK7SfBVR4YfjE2N2FyPYWUY5t8S+0BUS1lg==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.5.3.tgz",
|
||||
"integrity": "sha512-T9zZf61myahenI4c0qhcYnhnx49L+zL9+8W6fc+LPTarbt1HJDu6iyj6fh2BzewakwNLJRyGMJ9YCYlXhFuvlA==",
|
||||
"requires": {
|
||||
"iterare": "1.2.0",
|
||||
"json-socket": "0.3.0",
|
||||
@@ -38,28 +38,28 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/platform-express": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-6.4.1.tgz",
|
||||
"integrity": "sha512-i+wCYzYhj/ZlsQAdofyLDhHnMeu3rA3IYkXbRUEoNFmo4pWVRu85vXFoq8UfNWV1bv0U9VKnY7AZP4B4yXaYhw==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-6.5.3.tgz",
|
||||
"integrity": "sha512-c5n4XUbDDmF6MfBGYWM1jtsIDpVsOfOQtf3S0w3IeJNqm7dnmVAvO2Jk+RsYpt50tN4NAXntM3YTuTDqMb9uiA==",
|
||||
"requires": {
|
||||
"body-parser": "1.19.0",
|
||||
"cors": "2.8.5",
|
||||
"express": "4.17.1",
|
||||
"multer": "1.4.1"
|
||||
"multer": "1.4.2"
|
||||
}
|
||||
},
|
||||
"@nestjs/testing": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.4.1.tgz",
|
||||
"integrity": "sha512-TQxTGnlKRUwL081ZvQpcwthsZMcOBlH2hGq/lN+DSPCgraqx7puRyIdi4Z70zjjAKwfZ7KUYjK0/wOYd8XhsrQ==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.5.3.tgz",
|
||||
"integrity": "sha512-W8tPhkNVhmX+jaDu4R7WUOtIl0PK3ZDso434rEm/b1+S6ZRgAKwNVHWM/rwIuTi5+erPTEULtTsZgrXFrzC1sA==",
|
||||
"requires": {
|
||||
"optional": "0.1.4"
|
||||
}
|
||||
},
|
||||
"@nestjs/websockets": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.4.1.tgz",
|
||||
"integrity": "sha512-pj2itFnL2LN9HUL29YpHREHIBRisTd0U7n5FjTeKGElXyxPRX+aEa95EsQRqYAq0wKIu9EDa5rP/drGKLFah3w==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.5.3.tgz",
|
||||
"integrity": "sha512-YrCvmLHTW0OBusTiUOPrG0PNrw/3Gatty/bh3ro5cEoiovcaJxGSMsTC+JSVXqPwRJjEtoHMCr5Qje2rAepIzQ==",
|
||||
"requires": {
|
||||
"iterare": "1.2.0"
|
||||
}
|
||||
@@ -75,11 +75,16 @@
|
||||
}
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "7.10.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.6.tgz",
|
||||
"integrity": "sha512-d0BOAicT0tEdbdVQlLGOVul1kvg6YvbaADRCThGCz5NJ0e9r00SofcR1x69hmlCyrHuB6jd4cKzL9bMLjPnpAA==",
|
||||
"version": "7.10.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.7.tgz",
|
||||
"integrity": "sha512-4I7+hXKyq7e1deuzX9udu0hPIYqSSkdKXtjow6fMnQ3OR9qkxIErGHbGY08YrfZJrCS1ajK8lOuzd0k3n2WM4A==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/validator": {
|
||||
"version": "10.11.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.2.tgz",
|
||||
"integrity": "sha512-k/ju1RsdP5ACFUWebqsyEy0avP5uNJCs2p3pmTHzOZdd4gMSAJTq7iUEHFY3tt3emBrPTm6oGvfZ4SzcqOgLPQ=="
|
||||
},
|
||||
"accepts": {
|
||||
"version": "1.3.7",
|
||||
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
|
||||
@@ -228,12 +233,13 @@
|
||||
"integrity": "sha512-qsP+0xoavpOlJHuYsQJsN58HXSl8Jvveo+T37rEvCEeRfMWoytAyR0Ua/YsFgpM6AZYZ/og2PJwArwzJl1aXtQ=="
|
||||
},
|
||||
"class-validator": {
|
||||
"version": "0.9.1",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.9.1.tgz",
|
||||
"integrity": "sha512-3wApflrd3ywVZyx4jaasGoFt8pmo4aGLPPAEKCKCsTRWVGPilahD88q3jQjRQwja50rl9a7rsP5LAxJYwGK8/Q==",
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.0.tgz",
|
||||
"integrity": "sha512-RvjxRlvoCvM/ojUq11j78ISpReGdBoMErdmDk1e27aQZK6ppSXq751UE6jB9JI7ayEnL6Nnmllzn/HXVSu3dmg==",
|
||||
"requires": {
|
||||
"@types/validator": "10.11.2",
|
||||
"google-libphonenumber": "^3.1.6",
|
||||
"validator": "10.4.0"
|
||||
"validator": "11.1.0"
|
||||
}
|
||||
},
|
||||
"cli-color": {
|
||||
@@ -636,9 +642,9 @@
|
||||
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
|
||||
},
|
||||
"google-libphonenumber": {
|
||||
"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=="
|
||||
"version": "3.2.3",
|
||||
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.3.tgz",
|
||||
"integrity": "sha512-8n4JyRptifaIRlHANKRlfqLR8fANm7+Q+1qvDuUsUeStSLtLGTVsZWe1llWDfgWTm1y07cEUyiRuNIv6cs2ovg=="
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
@@ -784,9 +790,9 @@
|
||||
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
|
||||
},
|
||||
"multer": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/multer/-/multer-1.4.1.tgz",
|
||||
"integrity": "sha512-zzOLNRxzszwd+61JFuAo0fxdQfvku12aNJgnla0AQ+hHxFmfc/B7jBVuPr5Rmvu46Jze/iJrFpSOsD7afO8SDw==",
|
||||
"version": "1.4.2",
|
||||
"resolved": "https://registry.npmjs.org/multer/-/multer-1.4.2.tgz",
|
||||
"integrity": "sha512-xY8pX7V+ybyUpbYMxtjM9KAiD9ixtg5/JkeKUTD6xilfDv0vzzOFcCp4Ljb1UU3tSOM3VTZtKo63OmzOrGi3Cg==",
|
||||
"requires": {
|
||||
"append-field": "^1.0.0",
|
||||
"busboy": "^0.2.11",
|
||||
@@ -1170,9 +1176,9 @@
|
||||
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
|
||||
},
|
||||
"validator": {
|
||||
"version": "10.4.0",
|
||||
"resolved": "https://registry.npmjs.org/validator/-/validator-10.4.0.tgz",
|
||||
"integrity": "sha512-Q/wBy3LB1uOyssgNlXSRmaf22NxjvDNZM2MtIQ4jaEOAB61xsh1TQxsq1CgzUMBV1lDrVMogIh8GjG1DYW0zLg=="
|
||||
"version": "11.1.0",
|
||||
"resolved": "https://registry.npmjs.org/validator/-/validator-11.1.0.tgz",
|
||||
"integrity": "sha512-qiQ5ktdO7CD6C/5/mYV4jku/7qnqzjrxb3C/Q5wR3vGGinHTgJZN/TdFT3ZX4vXhX2R1PXx42fB1cn5W+uJ4lg=="
|
||||
},
|
||||
"vary": {
|
||||
"version": "1.1.2",
|
||||
@@ -1180,9 +1186,9 @@
|
||||
"integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
|
||||
},
|
||||
"xtend": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
|
||||
"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68="
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
||||
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
|
||||
},
|
||||
"yn": {
|
||||
"version": "3.1.0",
|
||||
|
||||
@@ -7,21 +7,21 @@
|
||||
"start": "ts-node src/main"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "6.4.1",
|
||||
"@nestjs/core": "6.4.1",
|
||||
"@nestjs/microservices": "6.4.1",
|
||||
"@nestjs/platform-express": "6.4.1",
|
||||
"@nestjs/testing": "6.4.1",
|
||||
"@nestjs/websockets": "6.4.1",
|
||||
"@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",
|
||||
"class-transformer": "0.2.3",
|
||||
"class-validator": "0.9.1",
|
||||
"class-validator": "0.10.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.5.2",
|
||||
"typescript": "3.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.10.6",
|
||||
"@types/node": "7.10.7",
|
||||
"supertest": "4.0.2",
|
||||
"ts-node": "8.3.0"
|
||||
}
|
||||
|
||||
72
integration/mongoose/package-lock.json
generated
72
integration/mongoose/package-lock.json
generated
@@ -5,18 +5,18 @@
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz",
|
||||
"integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==",
|
||||
"version": "7.5.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
|
||||
"integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/highlight": "^7.0.0"
|
||||
}
|
||||
},
|
||||
"@babel/highlight": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz",
|
||||
"integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==",
|
||||
"version": "7.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz",
|
||||
"integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chalk": "^2.0.0",
|
||||
@@ -25,9 +25,9 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/common": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.4.1.tgz",
|
||||
"integrity": "sha512-qgex1F+ag5/8rxgsBHyXjNIyNJhNGjB1UHcFhMjGYxbfaz/5TSiv5A07IN2ZkCyNPRe35YPEvM5tJjTDul6FIg==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
|
||||
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
|
||||
"requires": {
|
||||
"axios": "0.19.0",
|
||||
"cli-color": "1.4.0",
|
||||
@@ -35,9 +35,9 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/core": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.4.1.tgz",
|
||||
"integrity": "sha512-g11VtXwXtTO9i1o+is5JNhUsiUa/tNqmtW2GWxXZcmjxNbCLOOjkLd2FHsyCLpBnl7OVkYDqwL9Fcl9ydgQa3Q==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
|
||||
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
|
||||
"requires": {
|
||||
"@nuxtjs/opencollective": "0.2.2",
|
||||
"fast-safe-stringify": "2.0.6",
|
||||
@@ -72,9 +72,9 @@
|
||||
}
|
||||
},
|
||||
"@types/mongodb": {
|
||||
"version": "3.1.28",
|
||||
"resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.1.28.tgz",
|
||||
"integrity": "sha512-tG+QqJ/hir2p0069ee28t2O9tlGRJKDq1WFZC2QYMlU47LGdldLL8tepfTq6aFLvP58OpwSoxaJ/qjW93ob1NQ==",
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.3.0.tgz",
|
||||
"integrity": "sha512-YMrve0uBOqFDEiezQk3AfWV73g871/rQTAEb8Y2CSlbySnV/2OyerI1DAOUUJQaIqGEWWaYF6GMPO6wTErLUuw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/bson": "*",
|
||||
@@ -82,9 +82,9 @@
|
||||
}
|
||||
},
|
||||
"@types/mongoose": {
|
||||
"version": "5.5.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.5.7.tgz",
|
||||
"integrity": "sha512-bQTgH19lwY56T4YE6YTeobTtJ4EVTqP8ST5lFxjecPHC+/ebpHU8W01by4KEGSg5AeWFWVCePUi44wHuFzbxDQ==",
|
||||
"version": "5.5.13",
|
||||
"resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.5.13.tgz",
|
||||
"integrity": "sha512-k7Kxk5gugsZhkl7euWH1p6lmIdh9W8AsQgX0cO7kaihBie/P3ywU8LFMqo9ey6frdHBlGVaNICTeFZ/pZ6s5Lg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/mongodb": "*",
|
||||
@@ -92,9 +92,9 @@
|
||||
}
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "7.10.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.6.tgz",
|
||||
"integrity": "sha512-d0BOAicT0tEdbdVQlLGOVul1kvg6YvbaADRCThGCz5NJ0e9r00SofcR1x69hmlCyrHuB6jd4cKzL9bMLjPnpAA==",
|
||||
"version": "7.10.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.7.tgz",
|
||||
"integrity": "sha512-4I7+hXKyq7e1deuzX9udu0hPIYqSSkdKXtjow6fMnQ3OR9qkxIErGHbGY08YrfZJrCS1ajK8lOuzd0k3n2WM4A==",
|
||||
"dev": true
|
||||
},
|
||||
"ansi-regex": {
|
||||
@@ -315,9 +315,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"esutils": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
|
||||
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
|
||||
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
|
||||
"dev": true
|
||||
},
|
||||
"event-emitter": {
|
||||
@@ -420,9 +420,9 @@
|
||||
"integrity": "sha512-6hHxsp9e6zQU8nXsP+02HGWXwTkOEw6IROhF2ZA28cYbUk4eJ6QbtZvdqZOdD9YPKghG3apk5eOCvs+tLl3lRg=="
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.11",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
|
||||
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
|
||||
"version": "4.17.15",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
|
||||
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
|
||||
},
|
||||
"lru-queue": {
|
||||
"version": "0.1.0",
|
||||
@@ -504,9 +504,9 @@
|
||||
}
|
||||
},
|
||||
"mongoose": {
|
||||
"version": "5.6.4",
|
||||
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.6.4.tgz",
|
||||
"integrity": "sha512-mwMpa82uGvxSmkwTbxCmXb8/Nn9+2e+X61DiGFV9ZeenTsJKcdjc0QMGwDyDEkLcnYwQ5VrQbiB9548RZbFgVw==",
|
||||
"version": "5.6.10",
|
||||
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.6.10.tgz",
|
||||
"integrity": "sha512-lxWvF4Vl2118K2nZTj+QAEEmNBCbmUAcmF/roe8d+68Np4RXKEQvmpqm1c3aIlE9AVMp//eKB8IfXr38ZHe0Zw==",
|
||||
"requires": {
|
||||
"async": "2.6.2",
|
||||
"bson": "~1.1.1",
|
||||
@@ -611,9 +611,9 @@
|
||||
}
|
||||
},
|
||||
"resolve": {
|
||||
"version": "1.11.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz",
|
||||
"integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==",
|
||||
"version": "1.12.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz",
|
||||
"integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"path-parse": "^1.0.6"
|
||||
@@ -736,9 +736,9 @@
|
||||
"integrity": "sha512-avfPS28HmGLLc2o4elcc2EIq2FcH++Yo5YxpBZi9Yw93BCTGFthI4HPE4Rpep6vSYQaK8e69PelM44tPj+RaQg=="
|
||||
},
|
||||
"tslint": {
|
||||
"version": "5.18.0",
|
||||
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.18.0.tgz",
|
||||
"integrity": "sha512-Q3kXkuDEijQ37nXZZLKErssQVnwCV/+23gFEMROi8IlbaBG6tXqLPQJ5Wjcyt/yHPKBC+hD5SzuGaMora+ZS6w==",
|
||||
"version": "5.19.0",
|
||||
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.19.0.tgz",
|
||||
"integrity": "sha512-1LwwtBxfRJZnUvoS9c0uj8XQtAnyhWr9KlNvDIdB+oXyT+VpsOAaEhEgKi1HrZ8rq0ki/AAnbGSv4KM6/AfVZw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.0.0",
|
||||
|
||||
@@ -9,18 +9,18 @@
|
||||
"start:prod": "node dist/main.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "6.4.1",
|
||||
"@nestjs/core": "6.4.1",
|
||||
"@nestjs/common": "6.5.3",
|
||||
"@nestjs/core": "6.5.3",
|
||||
"@nestjs/mongoose": "6.1.2",
|
||||
"mongoose": "5.6.4",
|
||||
"mongoose": "5.6.10",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.5.2",
|
||||
"typescript": "3.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mongoose": "5.5.7",
|
||||
"@types/node": "7.10.6",
|
||||
"@types/mongoose": "5.5.13",
|
||||
"@types/node": "7.10.7",
|
||||
"ts-node": "8.3.0",
|
||||
"tslint": "5.18.0"
|
||||
"tslint": "5.19.0"
|
||||
}
|
||||
}
|
||||
|
||||
116
integration/scopes/package-lock.json
generated
116
integration/scopes/package-lock.json
generated
@@ -5,9 +5,9 @@
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@nestjs/common": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.4.1.tgz",
|
||||
"integrity": "sha512-qgex1F+ag5/8rxgsBHyXjNIyNJhNGjB1UHcFhMjGYxbfaz/5TSiv5A07IN2ZkCyNPRe35YPEvM5tJjTDul6FIg==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
|
||||
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
|
||||
"requires": {
|
||||
"axios": "0.19.0",
|
||||
"cli-color": "1.4.0",
|
||||
@@ -15,9 +15,9 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/core": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.4.1.tgz",
|
||||
"integrity": "sha512-g11VtXwXtTO9i1o+is5JNhUsiUa/tNqmtW2GWxXZcmjxNbCLOOjkLd2FHsyCLpBnl7OVkYDqwL9Fcl9ydgQa3Q==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
|
||||
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
|
||||
"requires": {
|
||||
"@nuxtjs/opencollective": "0.2.2",
|
||||
"fast-safe-stringify": "2.0.6",
|
||||
@@ -28,9 +28,9 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/microservices": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.4.1.tgz",
|
||||
"integrity": "sha512-8LP+5aYbt56NzWZstGiWRI6Xpi8QSCkzoBo0l0RKWpsL33bDRngTK7SfBVR4YfjE2N2FyPYWUY5t8S+0BUS1lg==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.5.3.tgz",
|
||||
"integrity": "sha512-T9zZf61myahenI4c0qhcYnhnx49L+zL9+8W6fc+LPTarbt1HJDu6iyj6fh2BzewakwNLJRyGMJ9YCYlXhFuvlA==",
|
||||
"requires": {
|
||||
"iterare": "1.2.0",
|
||||
"json-socket": "0.3.0",
|
||||
@@ -38,17 +38,17 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/testing": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.4.1.tgz",
|
||||
"integrity": "sha512-TQxTGnlKRUwL081ZvQpcwthsZMcOBlH2hGq/lN+DSPCgraqx7puRyIdi4Z70zjjAKwfZ7KUYjK0/wOYd8XhsrQ==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.5.3.tgz",
|
||||
"integrity": "sha512-W8tPhkNVhmX+jaDu4R7WUOtIl0PK3ZDso434rEm/b1+S6ZRgAKwNVHWM/rwIuTi5+erPTEULtTsZgrXFrzC1sA==",
|
||||
"requires": {
|
||||
"optional": "0.1.4"
|
||||
}
|
||||
},
|
||||
"@nestjs/websockets": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.4.1.tgz",
|
||||
"integrity": "sha512-pj2itFnL2LN9HUL29YpHREHIBRisTd0U7n5FjTeKGElXyxPRX+aEa95EsQRqYAq0wKIu9EDa5rP/drGKLFah3w==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.5.3.tgz",
|
||||
"integrity": "sha512-YrCvmLHTW0OBusTiUOPrG0PNrw/3Gatty/bh3ro5cEoiovcaJxGSMsTC+JSVXqPwRJjEtoHMCr5Qje2rAepIzQ==",
|
||||
"requires": {
|
||||
"iterare": "1.2.0"
|
||||
}
|
||||
@@ -64,20 +64,25 @@
|
||||
}
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "7.10.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.6.tgz",
|
||||
"integrity": "sha512-d0BOAicT0tEdbdVQlLGOVul1kvg6YvbaADRCThGCz5NJ0e9r00SofcR1x69hmlCyrHuB6jd4cKzL9bMLjPnpAA==",
|
||||
"version": "7.10.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.7.tgz",
|
||||
"integrity": "sha512-4I7+hXKyq7e1deuzX9udu0hPIYqSSkdKXtjow6fMnQ3OR9qkxIErGHbGY08YrfZJrCS1ajK8lOuzd0k3n2WM4A==",
|
||||
"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.0",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz",
|
||||
"integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==",
|
||||
"version": "6.10.2",
|
||||
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz",
|
||||
"integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==",
|
||||
"requires": {
|
||||
"fast-deep-equal": "^2.0.1",
|
||||
"fast-json-stable-stringify": "^2.0.0",
|
||||
@@ -171,12 +176,13 @@
|
||||
"integrity": "sha512-qsP+0xoavpOlJHuYsQJsN58HXSl8Jvveo+T37rEvCEeRfMWoytAyR0Ua/YsFgpM6AZYZ/og2PJwArwzJl1aXtQ=="
|
||||
},
|
||||
"class-validator": {
|
||||
"version": "0.9.1",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.9.1.tgz",
|
||||
"integrity": "sha512-3wApflrd3ywVZyx4jaasGoFt8pmo4aGLPPAEKCKCsTRWVGPilahD88q3jQjRQwja50rl9a7rsP5LAxJYwGK8/Q==",
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.0.tgz",
|
||||
"integrity": "sha512-RvjxRlvoCvM/ojUq11j78ISpReGdBoMErdmDk1e27aQZK6ppSXq751UE6jB9JI7ayEnL6Nnmllzn/HXVSu3dmg==",
|
||||
"requires": {
|
||||
"@types/validator": "10.11.2",
|
||||
"google-libphonenumber": "^3.1.6",
|
||||
"validator": "10.4.0"
|
||||
"validator": "11.1.0"
|
||||
}
|
||||
},
|
||||
"cli-color": {
|
||||
@@ -255,9 +261,9 @@
|
||||
}
|
||||
},
|
||||
"deepmerge": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-3.3.0.tgz",
|
||||
"integrity": "sha512-GRQOafGHwMHpjPx9iCvTgpu9NojZ49q794EEL94JVEw6VaeA8XTUyBKvAkOOjBX9oJNiV6G3P+T+tihFjo2TqA=="
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.0.0.tgz",
|
||||
"integrity": "sha512-YZ1rOP5+kHor4hMAH+HRQnBQHg+wvS1un1hAOuIcxcBy0hzcUf6Jg2a1w65kpoOUnurOfZbERwjI1TfZxNjcww=="
|
||||
},
|
||||
"delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
@@ -347,12 +353,12 @@
|
||||
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
|
||||
},
|
||||
"fast-json-stringify": {
|
||||
"version": "1.15.3",
|
||||
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.15.3.tgz",
|
||||
"integrity": "sha512-p+ucnySTbrUQ9M7u8ygFIxrmpG8B+8O4/PvLDdh+RqMMgj/h6OoDb7U2lP+kqg3PDclQBFbSIArRhkorFwZLLg==",
|
||||
"version": "1.15.4",
|
||||
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.15.4.tgz",
|
||||
"integrity": "sha512-lsGTxL0OIGjGSUXgWUOdSgjCL/xMyMvMudfGN3D1zOLEv44fYZ1ZXmMyCON5XdpaiZN6nCXmU7GQg7fbXfPG4g==",
|
||||
"requires": {
|
||||
"ajv": "^6.8.1",
|
||||
"deepmerge": "^3.0.0"
|
||||
"deepmerge": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"fast-redact": {
|
||||
@@ -366,19 +372,19 @@
|
||||
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
|
||||
},
|
||||
"fastify": {
|
||||
"version": "2.6.0",
|
||||
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.6.0.tgz",
|
||||
"integrity": "sha512-3GxGV2P8731o2S5T6ng5NMJ9S7vFpZA4mk2mJEbMbhQ5aj1HhNGBOe39TYa2gWRrJVJuXxYYYIlY/5cFhiHpNg==",
|
||||
"version": "2.7.1",
|
||||
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.7.1.tgz",
|
||||
"integrity": "sha512-ScKPXD84lkdCgz7q0zjyBr1aLxKbXRt9HYL3XIt/L8ZD2f3fAcsLEyQ2/rHxLUzLGjPlEjIvprWUL3RZvlLRLw==",
|
||||
"requires": {
|
||||
"abstract-logging": "^1.0.0",
|
||||
"ajv": "^6.9.2",
|
||||
"ajv": "^6.10.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.2.0",
|
||||
"light-my-request": "^3.4.1",
|
||||
"middie": "^4.0.1",
|
||||
"pino": "^5.11.1",
|
||||
"pino": "^5.13.1",
|
||||
"proxy-addr": "^2.0.4",
|
||||
"readable-stream": "^3.1.1",
|
||||
"rfdc": "^1.1.2",
|
||||
@@ -440,9 +446,9 @@
|
||||
"integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
|
||||
},
|
||||
"google-libphonenumber": {
|
||||
"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=="
|
||||
"version": "3.2.3",
|
||||
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.3.tgz",
|
||||
"integrity": "sha512-8n4JyRptifaIRlHANKRlfqLR8fANm7+Q+1qvDuUsUeStSLtLGTVsZWe1llWDfgWTm1y07cEUyiRuNIv6cs2ovg=="
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
@@ -485,9 +491,9 @@
|
||||
"integrity": "sha512-jc8ZbUnYIWdxERFWQKVgwSLkGSe+kyzvmYxwNaRgx/c8NNyuHes4UHnPM3LUrAFXUx1BhNJ94n1h/KCRlbvV0g=="
|
||||
},
|
||||
"light-my-request": {
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-3.4.0.tgz",
|
||||
"integrity": "sha512-zIEl4lKwATE5uPmxEZkVIIAr/JGrHEngf9MDZ7a1TodLZ93kROYkKkoqSCmQIJ01FXrzyYMnmtemBO/b1HFt0Q==",
|
||||
"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==",
|
||||
"requires": {
|
||||
"ajv": "^6.8.1",
|
||||
"readable-stream": "^3.1.1"
|
||||
@@ -589,16 +595,16 @@
|
||||
"integrity": "sha512-ZOtfhPttCrqp2M1PBBH4X13XlvnfhIwD7yCLx+GoGoXRPQyxGOTdQMpIzPSPKXAJT/JQrdfFrgdJOyAzvgpQ9A=="
|
||||
},
|
||||
"pino": {
|
||||
"version": "5.12.6",
|
||||
"resolved": "https://registry.npmjs.org/pino/-/pino-5.12.6.tgz",
|
||||
"integrity": "sha512-LM5ug2b27uymIIkaBw54ncF+9DSf8S4z1uzw+Y5I94dRu3Z+lFuB13j0kg1InAeyxy+CsLGnWHKy9+zgTreFOg==",
|
||||
"version": "5.13.1",
|
||||
"resolved": "https://registry.npmjs.org/pino/-/pino-5.13.1.tgz",
|
||||
"integrity": "sha512-IxusG28L0g50uuf21kZELypdFOeNrJ/kRhktdi7LtdZQWCxLliMxG5iOrGUQ/ng7MiJ4XqXi/hfyXwZeKc1MxA==",
|
||||
"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.3"
|
||||
"sonic-boom": "^0.7.5"
|
||||
}
|
||||
},
|
||||
"pino-std-serializers": {
|
||||
@@ -699,11 +705,11 @@
|
||||
"integrity": "sha512-TcZvGMMy9vodEFSse30lWinkj+JgOBvPn8wRItpQRSayhc+4ssDs335uklkfvQQJgL/WvmHLVj4Ycv2s7QCQMg=="
|
||||
},
|
||||
"sonic-boom": {
|
||||
"version": "0.7.4",
|
||||
"resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.4.tgz",
|
||||
"integrity": "sha512-8JRAJg0RxZtFLQMxolwETvWd2JSlH3ZGo/Z4xPxMbpqF14xCgVYPVeFCFOR3zyr3pcfG82QDVj6537Sx5ZWdNw==",
|
||||
"version": "0.7.5",
|
||||
"resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.5.tgz",
|
||||
"integrity": "sha512-1pKrnAV6RfvntPnarY71tpthFTM3pWZWWQdghZY8ARjtDPGzG/inxqSuRwQY/7V1woUjfyxPb437zn4p5phgnQ==",
|
||||
"requires": {
|
||||
"flatstr": "^1.0.9"
|
||||
"flatstr": "^1.0.12"
|
||||
}
|
||||
},
|
||||
"source-map": {
|
||||
@@ -859,9 +865,9 @@
|
||||
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
|
||||
},
|
||||
"validator": {
|
||||
"version": "10.4.0",
|
||||
"resolved": "https://registry.npmjs.org/validator/-/validator-10.4.0.tgz",
|
||||
"integrity": "sha512-Q/wBy3LB1uOyssgNlXSRmaf22NxjvDNZM2MtIQ4jaEOAB61xsh1TQxsq1CgzUMBV1lDrVMogIh8GjG1DYW0zLg=="
|
||||
"version": "11.1.0",
|
||||
"resolved": "https://registry.npmjs.org/validator/-/validator-11.1.0.tgz",
|
||||
"integrity": "sha512-qiQ5ktdO7CD6C/5/mYV4jku/7qnqzjrxb3C/Q5wR3vGGinHTgJZN/TdFT3ZX4vXhX2R1PXx42fB1cn5W+uJ4lg=="
|
||||
},
|
||||
"yn": {
|
||||
"version": "3.1.0",
|
||||
|
||||
@@ -7,20 +7,20 @@
|
||||
"start": "ts-node src/main"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "6.4.1",
|
||||
"@nestjs/core": "6.4.1",
|
||||
"@nestjs/microservices": "6.4.1",
|
||||
"@nestjs/testing": "6.4.1",
|
||||
"@nestjs/websockets": "6.4.1",
|
||||
"@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",
|
||||
"class-transformer": "0.2.3",
|
||||
"class-validator": "0.9.1",
|
||||
"fastify": "2.6.0",
|
||||
"class-validator": "0.10.0",
|
||||
"fastify": "2.7.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.5.2",
|
||||
"typescript": "3.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.10.6",
|
||||
"@types/node": "7.10.7",
|
||||
"supertest": "4.0.2",
|
||||
"ts-node": "8.3.0"
|
||||
}
|
||||
|
||||
1701
integration/typegraphql/package-lock.json
generated
1701
integration/typegraphql/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -9,24 +9,24 @@
|
||||
"start:prod": "node dist/main.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "6.4.1",
|
||||
"@nestjs/core": "6.4.1",
|
||||
"@nestjs/graphql": "6.2.4",
|
||||
"apollo-server-express": "2.6.7",
|
||||
"@nestjs/common": "6.5.3",
|
||||
"@nestjs/core": "6.5.3",
|
||||
"@nestjs/graphql": "6.4.2",
|
||||
"apollo-server-express": "2.8.1",
|
||||
"class-transformer": "0.2.3",
|
||||
"class-validator": "0.9.1",
|
||||
"graphql": "14.4.2",
|
||||
"class-validator": "0.10.0",
|
||||
"graphql": "14.5.0",
|
||||
"graphql-tools": "4.0.5",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.5.2",
|
||||
"subscriptions-transport-ws": "0.9.16",
|
||||
"type-graphql": "0.17.4",
|
||||
"type-graphql": "0.17.5",
|
||||
"typescript": "3.5.3",
|
||||
"ws": "7.1.0"
|
||||
"ws": "7.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.10.6",
|
||||
"@types/node": "7.10.7",
|
||||
"ts-node": "8.3.0",
|
||||
"tslint": "5.18.0"
|
||||
"tslint": "5.19.0"
|
||||
}
|
||||
}
|
||||
|
||||
54
integration/typeorm/package-lock.json
generated
54
integration/typeorm/package-lock.json
generated
@@ -5,18 +5,18 @@
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz",
|
||||
"integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==",
|
||||
"version": "7.5.5",
|
||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
|
||||
"integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/highlight": "^7.0.0"
|
||||
}
|
||||
},
|
||||
"@babel/highlight": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz",
|
||||
"integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==",
|
||||
"version": "7.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz",
|
||||
"integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chalk": "^2.0.0",
|
||||
@@ -25,9 +25,9 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/common": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.4.1.tgz",
|
||||
"integrity": "sha512-qgex1F+ag5/8rxgsBHyXjNIyNJhNGjB1UHcFhMjGYxbfaz/5TSiv5A07IN2ZkCyNPRe35YPEvM5tJjTDul6FIg==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
|
||||
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
|
||||
"requires": {
|
||||
"axios": "0.19.0",
|
||||
"cli-color": "1.4.0",
|
||||
@@ -35,9 +35,9 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/core": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.4.1.tgz",
|
||||
"integrity": "sha512-g11VtXwXtTO9i1o+is5JNhUsiUa/tNqmtW2GWxXZcmjxNbCLOOjkLd2FHsyCLpBnl7OVkYDqwL9Fcl9ydgQa3Q==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
|
||||
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
|
||||
"requires": {
|
||||
"@nuxtjs/opencollective": "0.2.2",
|
||||
"fast-safe-stringify": "2.0.6",
|
||||
@@ -48,9 +48,9 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/typeorm": {
|
||||
"version": "6.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/typeorm/-/typeorm-6.1.2.tgz",
|
||||
"integrity": "sha512-uNLvNTW72h4mypvscBgYgE2q8LHgvrhNzV6YqJgvf0VaGv5fi72hl0Zlfwmvh7h50ysW221mJCraX56yn+Uzxw==",
|
||||
"version": "6.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/typeorm/-/typeorm-6.1.3.tgz",
|
||||
"integrity": "sha512-860tNwms0d/pnuZNEBZCFl5FjzCGG67V8TYuPIVu66jFK/Hmq2WH/GxiC8L77rWPn/o2O5LSe51lgO95GPysGw==",
|
||||
"requires": {
|
||||
"uuid": "3.3.2"
|
||||
}
|
||||
@@ -78,9 +78,9 @@
|
||||
}
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "7.10.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.6.tgz",
|
||||
"integrity": "sha512-d0BOAicT0tEdbdVQlLGOVul1kvg6YvbaADRCThGCz5NJ0e9r00SofcR1x69hmlCyrHuB6jd4cKzL9bMLjPnpAA==",
|
||||
"version": "7.10.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.7.tgz",
|
||||
"integrity": "sha512-4I7+hXKyq7e1deuzX9udu0hPIYqSSkdKXtjow6fMnQ3OR9qkxIErGHbGY08YrfZJrCS1ajK8lOuzd0k3n2WM4A==",
|
||||
"dev": true
|
||||
},
|
||||
"ansi-regex": {
|
||||
@@ -374,9 +374,9 @@
|
||||
"integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw=="
|
||||
},
|
||||
"esutils": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
|
||||
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
|
||||
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
|
||||
"dev": true
|
||||
},
|
||||
"event-emitter": {
|
||||
@@ -856,9 +856,9 @@
|
||||
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="
|
||||
},
|
||||
"resolve": {
|
||||
"version": "1.11.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz",
|
||||
"integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==",
|
||||
"version": "1.12.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz",
|
||||
"integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"path-parse": "^1.0.6"
|
||||
@@ -1027,9 +1027,9 @@
|
||||
"integrity": "sha512-avfPS28HmGLLc2o4elcc2EIq2FcH++Yo5YxpBZi9Yw93BCTGFthI4HPE4Rpep6vSYQaK8e69PelM44tPj+RaQg=="
|
||||
},
|
||||
"tslint": {
|
||||
"version": "5.18.0",
|
||||
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.18.0.tgz",
|
||||
"integrity": "sha512-Q3kXkuDEijQ37nXZZLKErssQVnwCV/+23gFEMROi8IlbaBG6tXqLPQJ5Wjcyt/yHPKBC+hD5SzuGaMora+ZS6w==",
|
||||
"version": "5.19.0",
|
||||
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.19.0.tgz",
|
||||
"integrity": "sha512-1LwwtBxfRJZnUvoS9c0uj8XQtAnyhWr9KlNvDIdB+oXyT+VpsOAaEhEgKi1HrZ8rq0ki/AAnbGSv4KM6/AfVZw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.0.0",
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
"start:prod": "node dist/main.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "6.4.1",
|
||||
"@nestjs/core": "6.4.1",
|
||||
"@nestjs/typeorm": "6.1.2",
|
||||
"@nestjs/common": "6.5.3",
|
||||
"@nestjs/core": "6.5.3",
|
||||
"@nestjs/typeorm": "6.1.3",
|
||||
"mysql": "2.17.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.5.2",
|
||||
@@ -19,8 +19,8 @@
|
||||
"typescript": "3.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.10.6",
|
||||
"@types/node": "7.10.7",
|
||||
"ts-node": "8.3.0",
|
||||
"tslint": "5.18.0"
|
||||
"tslint": "5.19.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ async function createNestApp(...gateways): Promise<INestApplication> {
|
||||
}
|
||||
|
||||
describe('WebSocketGateway (WsAdapter)', () => {
|
||||
const event = 'push';
|
||||
let ws, ws2, app;
|
||||
|
||||
it(`should handle message (2nd port)`, async () => {
|
||||
@@ -66,7 +65,9 @@ describe('WebSocketGateway (WsAdapter)', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it(`should support 2 different gateways`, async () => {
|
||||
it(`should support 2 different gateways`, async function() {
|
||||
this.retries(10);
|
||||
|
||||
app = await createNestApp(ApplicationGateway, CoreGateway);
|
||||
await app.listenAsync(3000);
|
||||
|
||||
|
||||
62
integration/websockets/package-lock.json
generated
62
integration/websockets/package-lock.json
generated
@@ -5,9 +5,9 @@
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@nestjs/common": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.4.1.tgz",
|
||||
"integrity": "sha512-qgex1F+ag5/8rxgsBHyXjNIyNJhNGjB1UHcFhMjGYxbfaz/5TSiv5A07IN2ZkCyNPRe35YPEvM5tJjTDul6FIg==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
|
||||
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
|
||||
"requires": {
|
||||
"axios": "0.19.0",
|
||||
"cli-color": "1.4.0",
|
||||
@@ -15,9 +15,9 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/core": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.4.1.tgz",
|
||||
"integrity": "sha512-g11VtXwXtTO9i1o+is5JNhUsiUa/tNqmtW2GWxXZcmjxNbCLOOjkLd2FHsyCLpBnl7OVkYDqwL9Fcl9ydgQa3Q==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
|
||||
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
|
||||
"requires": {
|
||||
"@nuxtjs/opencollective": "0.2.2",
|
||||
"fast-safe-stringify": "2.0.6",
|
||||
@@ -28,9 +28,9 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/microservices": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.4.1.tgz",
|
||||
"integrity": "sha512-8LP+5aYbt56NzWZstGiWRI6Xpi8QSCkzoBo0l0RKWpsL33bDRngTK7SfBVR4YfjE2N2FyPYWUY5t8S+0BUS1lg==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.5.3.tgz",
|
||||
"integrity": "sha512-T9zZf61myahenI4c0qhcYnhnx49L+zL9+8W6fc+LPTarbt1HJDu6iyj6fh2BzewakwNLJRyGMJ9YCYlXhFuvlA==",
|
||||
"requires": {
|
||||
"iterare": "1.2.0",
|
||||
"json-socket": "0.3.0",
|
||||
@@ -38,17 +38,17 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/testing": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.4.1.tgz",
|
||||
"integrity": "sha512-TQxTGnlKRUwL081ZvQpcwthsZMcOBlH2hGq/lN+DSPCgraqx7puRyIdi4Z70zjjAKwfZ7KUYjK0/wOYd8XhsrQ==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.5.3.tgz",
|
||||
"integrity": "sha512-W8tPhkNVhmX+jaDu4R7WUOtIl0PK3ZDso434rEm/b1+S6ZRgAKwNVHWM/rwIuTi5+erPTEULtTsZgrXFrzC1sA==",
|
||||
"requires": {
|
||||
"optional": "0.1.4"
|
||||
}
|
||||
},
|
||||
"@nestjs/websockets": {
|
||||
"version": "6.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.4.1.tgz",
|
||||
"integrity": "sha512-pj2itFnL2LN9HUL29YpHREHIBRisTd0U7n5FjTeKGElXyxPRX+aEa95EsQRqYAq0wKIu9EDa5rP/drGKLFah3w==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.5.3.tgz",
|
||||
"integrity": "sha512-YrCvmLHTW0OBusTiUOPrG0PNrw/3Gatty/bh3ro5cEoiovcaJxGSMsTC+JSVXqPwRJjEtoHMCr5Qje2rAepIzQ==",
|
||||
"requires": {
|
||||
"iterare": "1.2.0"
|
||||
}
|
||||
@@ -64,11 +64,16 @@
|
||||
}
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "7.10.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.6.tgz",
|
||||
"integrity": "sha512-d0BOAicT0tEdbdVQlLGOVul1kvg6YvbaADRCThGCz5NJ0e9r00SofcR1x69hmlCyrHuB6jd4cKzL9bMLjPnpAA==",
|
||||
"version": "7.10.7",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.7.tgz",
|
||||
"integrity": "sha512-4I7+hXKyq7e1deuzX9udu0hPIYqSSkdKXtjow6fMnQ3OR9qkxIErGHbGY08YrfZJrCS1ajK8lOuzd0k3n2WM4A==",
|
||||
"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",
|
||||
@@ -125,12 +130,13 @@
|
||||
"integrity": "sha512-qsP+0xoavpOlJHuYsQJsN58HXSl8Jvveo+T37rEvCEeRfMWoytAyR0Ua/YsFgpM6AZYZ/og2PJwArwzJl1aXtQ=="
|
||||
},
|
||||
"class-validator": {
|
||||
"version": "0.9.1",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.9.1.tgz",
|
||||
"integrity": "sha512-3wApflrd3ywVZyx4jaasGoFt8pmo4aGLPPAEKCKCsTRWVGPilahD88q3jQjRQwja50rl9a7rsP5LAxJYwGK8/Q==",
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.0.tgz",
|
||||
"integrity": "sha512-RvjxRlvoCvM/ojUq11j78ISpReGdBoMErdmDk1e27aQZK6ppSXq751UE6jB9JI7ayEnL6Nnmllzn/HXVSu3dmg==",
|
||||
"requires": {
|
||||
"@types/validator": "10.11.2",
|
||||
"google-libphonenumber": "^3.1.6",
|
||||
"validator": "10.4.0"
|
||||
"validator": "11.1.0"
|
||||
}
|
||||
},
|
||||
"cli-color": {
|
||||
@@ -327,9 +333,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"google-libphonenumber": {
|
||||
"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=="
|
||||
"version": "3.2.3",
|
||||
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.3.tgz",
|
||||
"integrity": "sha512-8n4JyRptifaIRlHANKRlfqLR8fANm7+Q+1qvDuUsUeStSLtLGTVsZWe1llWDfgWTm1y07cEUyiRuNIv6cs2ovg=="
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
@@ -608,9 +614,9 @@
|
||||
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
|
||||
},
|
||||
"validator": {
|
||||
"version": "10.4.0",
|
||||
"resolved": "https://registry.npmjs.org/validator/-/validator-10.4.0.tgz",
|
||||
"integrity": "sha512-Q/wBy3LB1uOyssgNlXSRmaf22NxjvDNZM2MtIQ4jaEOAB61xsh1TQxsq1CgzUMBV1lDrVMogIh8GjG1DYW0zLg=="
|
||||
"version": "11.1.0",
|
||||
"resolved": "https://registry.npmjs.org/validator/-/validator-11.1.0.tgz",
|
||||
"integrity": "sha512-qiQ5ktdO7CD6C/5/mYV4jku/7qnqzjrxb3C/Q5wR3vGGinHTgJZN/TdFT3ZX4vXhX2R1PXx42fB1cn5W+uJ4lg=="
|
||||
},
|
||||
"yn": {
|
||||
"version": "3.1.0",
|
||||
|
||||
@@ -7,19 +7,19 @@
|
||||
"start": "ts-node src/main"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "6.4.1",
|
||||
"@nestjs/core": "6.4.1",
|
||||
"@nestjs/microservices": "6.4.1",
|
||||
"@nestjs/testing": "6.4.1",
|
||||
"@nestjs/websockets": "6.4.1",
|
||||
"@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",
|
||||
"class-transformer": "0.2.3",
|
||||
"class-validator": "0.9.1",
|
||||
"class-validator": "0.10.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.5.2",
|
||||
"typescript": "3.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.10.6",
|
||||
"@types/node": "7.10.7",
|
||||
"supertest": "4.0.2",
|
||||
"ts-node": "8.3.0"
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
"packages": [
|
||||
"packages/*"
|
||||
],
|
||||
"version": "6.5.0"
|
||||
"version": "6.5.3"
|
||||
}
|
||||
|
||||
1731
package-lock.json
generated
1731
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
57
package.json
57
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/core",
|
||||
"version": "6.5.0",
|
||||
"version": "6.5.3",
|
||||
"description": "Modern, fast, powerful node.js web framework",
|
||||
"scripts": {
|
||||
"coverage": "nyc report --reporter=text-lcov | coveralls",
|
||||
@@ -12,6 +12,7 @@
|
||||
"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\"",
|
||||
@@ -38,30 +39,30 @@
|
||||
"@nestjs/websockets": "6.1.1",
|
||||
"@nuxtjs/opencollective": "0.2.2",
|
||||
"amqp-connection-manager": "3.0.0",
|
||||
"amqplib": "0.5.3",
|
||||
"apollo-server-express": "2.6.7",
|
||||
"amqplib": "0.5.5",
|
||||
"apollo-server-express": "2.8.1",
|
||||
"axios": "0.19.0",
|
||||
"cache-manager": "2.9.1",
|
||||
"cache-manager": "2.10.0",
|
||||
"class-transformer": "0.2.3",
|
||||
"class-validator": "0.9.1",
|
||||
"class-validator": "0.10.0",
|
||||
"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.3",
|
||||
"fast-json-stringify": "1.15.4",
|
||||
"fast-safe-stringify": "2.0.6",
|
||||
"fastify": "2.6.0",
|
||||
"fastify": "2.7.1",
|
||||
"fastify-cors": "2.1.3",
|
||||
"fastify-formbody": "3.1.0",
|
||||
"fastify-multipart": "1.0.1",
|
||||
"graphql": "14.4.2",
|
||||
"grpc": "1.22.0",
|
||||
"fastify-multipart": "1.0.2",
|
||||
"graphql": "14.5.0",
|
||||
"grpc": "1.23.3",
|
||||
"http2": "3.3.7",
|
||||
"iterare": "1.2.0",
|
||||
"merge-graphql-schemas": "1.5.8",
|
||||
"merge-graphql-schemas": "1.7.0",
|
||||
"mqtt": "3.0.0",
|
||||
"multer": "1.4.1",
|
||||
"multer": "1.4.2",
|
||||
"nats": "1.3.0",
|
||||
"object-hash": "1.3.1",
|
||||
"optional": "0.1.4",
|
||||
@@ -72,37 +73,39 @@
|
||||
"rxjs": "6.5.2",
|
||||
"rxjs-compat": "6.5.2",
|
||||
"socket.io": "2.2.0",
|
||||
"ts-morph": "3.1.0",
|
||||
"uuid": "3.3.2"
|
||||
"ts-morph": "3.1.3",
|
||||
"uuid": "3.3.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/amqplib": "0.5.13",
|
||||
"@types/cache-manager": "1.2.8",
|
||||
"@types/chai": "4.1.7",
|
||||
"@types/chai-as-promised": "7.1.0",
|
||||
"@types/cors": "2.8.5",
|
||||
"@types/express": "4.17.0",
|
||||
"@types/chai": "4.2.0",
|
||||
"@types/chai-as-promised": "7.1.2",
|
||||
"@types/cors": "2.8.6",
|
||||
"@types/express": "4.17.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.12",
|
||||
"@types/node": "10.14.16",
|
||||
"@types/redis": "2.8.13",
|
||||
"@types/reflect-metadata": "0.0.5",
|
||||
"@types/sinon": "7.0.13",
|
||||
"@types/socket.io": "2.1.2",
|
||||
"@types/ws": "6.0.1",
|
||||
"@types/ws": "6.0.3",
|
||||
"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.1",
|
||||
"conventional-changelog": "3.1.8",
|
||||
"core-js": "3.1.4",
|
||||
"coveralls": "3.0.4",
|
||||
"concurrently": "4.1.2",
|
||||
"conventional-changelog": "3.1.10",
|
||||
"core-js": "3.2.1",
|
||||
"coveralls": "3.0.6",
|
||||
"csv-write-stream": "2.0.0",
|
||||
"delete-empty": "3.0.0",
|
||||
"fancy-log": "1.3.3",
|
||||
"fastify-static": "2.5.0",
|
||||
"gulp": "4.0.1",
|
||||
"gulp-clang-format": "1.0.27",
|
||||
@@ -114,17 +117,17 @@
|
||||
"imports-loader": "0.8.0",
|
||||
"json-loader": "0.5.7",
|
||||
"lerna": "2.11.0",
|
||||
"lint-staged": "9.1.0",
|
||||
"lint-staged": "9.2.3",
|
||||
"mocha": "3.5.3",
|
||||
"nodemon": "1.19.1",
|
||||
"nyc": "14.1.1",
|
||||
"prettier": "1.18.2",
|
||||
"sinon": "7.3.2",
|
||||
"sinon": "7.4.1",
|
||||
"sinon-chai": "3.3.0",
|
||||
"socket.io-client": "2.2.0",
|
||||
"supertest": "4.0.2",
|
||||
"ts-node": "8.3.0",
|
||||
"tslint": "5.18.0",
|
||||
"tslint": "5.19.0",
|
||||
"typescript": "3.5.3"
|
||||
},
|
||||
"collective": {
|
||||
|
||||
1
packages/common/PACKAGE.md
Normal file
1
packages/common/PACKAGE.md
Normal file
@@ -0,0 +1 @@
|
||||
The common package comes with decorators such as `@Controller()`, `@Injectable()` and so on.
|
||||
@@ -15,7 +15,6 @@
|
||||
<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>
|
||||
|
||||
@@ -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>(
|
||||
|
||||
@@ -2,17 +2,83 @@ 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);
|
||||
/**
|
||||
* Defines the controller. Controller can inject dependencies through constructor.
|
||||
* Those dependencies have to belong to the same module.
|
||||
* 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
|
||||
*/
|
||||
export function Controller(): ClassDecorator;
|
||||
export function Controller(prefix: string): ClassDecorator;
|
||||
export function Controller(options: ControllerOptions): ClassDecorator;
|
||||
export function Controller(
|
||||
prefixOrOptions?: string | ControllerOptions,
|
||||
): ClassDecorator {
|
||||
@@ -20,8 +86,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);
|
||||
|
||||
@@ -5,9 +5,81 @@ import {
|
||||
import { isFunction, isUndefined } from '../../utils/shared.utils';
|
||||
|
||||
/**
|
||||
* Injects provider which has to be available in the current injector (module) scope.
|
||||
* Providers are recognized by either types or tokens.
|
||||
* 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
|
||||
*/
|
||||
|
||||
export function Inject<T = any>(token?: T) {
|
||||
return (target: Object, key: string | symbol, index?: number) => {
|
||||
token = token || Reflect.getMetadata('design:type', target, key);
|
||||
|
||||
@@ -3,11 +3,110 @@ 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 {}
|
||||
|
||||
/**
|
||||
* Defines the injectable class. This class can inject dependencies through constructor.
|
||||
* Those dependencies have to belong to the same module.
|
||||
* 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
|
||||
*/
|
||||
export function Injectable(options?: InjectableOptions): ClassDecorator {
|
||||
return (target: object) => {
|
||||
|
||||
@@ -5,14 +5,38 @@ import { isFunction } from '../../utils/shared.utils';
|
||||
import { validateEach } from '../../utils/validate-each.util';
|
||||
|
||||
/**
|
||||
* Binds guards to the particular context.
|
||||
* When the `@UseGuards()` is used on the controller level:
|
||||
* - Guard will be register to each handler (every method)
|
||||
* Decorator that binds guards to the scope of the controller or method,
|
||||
* depending on its context.
|
||||
*
|
||||
* When the `@UseGuards()` is used on the handler level:
|
||||
* - Guard will be registered only to the specified method
|
||||
* When `@UseGuards` is used at the controller level, the guard will be
|
||||
* applied to every handler (method) in the controller.
|
||||
*
|
||||
* @param {} ...guards
|
||||
* 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
|
||||
*/
|
||||
export function UseGuards(...guards: (CanActivate | Function)[]) {
|
||||
return (target: any, key?: string, descriptor?: any) => {
|
||||
|
||||
@@ -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)[]
|
||||
|
||||
@@ -3,6 +3,12 @@ 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) => {
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
import { HTTP_CODE_METADATA } from '../../constants';
|
||||
|
||||
/**
|
||||
* Defines the HTTP response status code.
|
||||
* It overrides default status code for the given request method.
|
||||
* @publicApi
|
||||
*
|
||||
* @param {number} statusCode
|
||||
* @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)
|
||||
*/
|
||||
export function HttpCode(statusCode: number): MethodDecorator {
|
||||
return (target: object, key, descriptor) => {
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { REDIRECT_METADATA } from '../../constants';
|
||||
|
||||
/**
|
||||
* Redirects request.
|
||||
* Redirects request to the specified URL.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export function Redirect(url: string): MethodDecorator {
|
||||
return (target: object, key, descriptor) => {
|
||||
|
||||
@@ -2,6 +2,11 @@ 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) => {
|
||||
|
||||
@@ -31,41 +31,81 @@ 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);
|
||||
|
||||
@@ -76,6 +76,19 @@ 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);
|
||||
@@ -88,6 +101,17 @@ 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)[]
|
||||
@@ -106,6 +130,17 @@ 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)[]
|
||||
|
||||
@@ -1,8 +1,38 @@
|
||||
import { GLOBAL_MODULE_METADATA } from '../../constants';
|
||||
|
||||
/**
|
||||
* @publicApi
|
||||
*
|
||||
* @description
|
||||
*
|
||||
* Makes the module global-scoped.
|
||||
* Once imported will be available for all existing modules.
|
||||
* 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 {}
|
||||
* ```
|
||||
*/
|
||||
export function Global(): ClassDecorator {
|
||||
return (target: any) => {
|
||||
|
||||
@@ -21,12 +21,37 @@ const validateKeys = (keys: string[]) => {
|
||||
};
|
||||
|
||||
/**
|
||||
* 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 metadata {ModuleMetadata} Module metadata
|
||||
* 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
|
||||
*/
|
||||
export function Module(metadata: ModuleMetadata): ClassDecorator {
|
||||
const propsKeys = Object.keys(metadata);
|
||||
|
||||
@@ -43,6 +43,7 @@ export {
|
||||
WebSocketAdapter,
|
||||
WsExceptionFilter,
|
||||
WsMessageHandler,
|
||||
ScopeOptions,
|
||||
} from './interfaces';
|
||||
export * from './pipes';
|
||||
export * from './serializer';
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
/**
|
||||
* 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 = (
|
||||
@@ -6,13 +10,42 @@ 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;
|
||||
}
|
||||
|
||||
@@ -1,23 +1,74 @@
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,25 @@
|
||||
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>;
|
||||
|
||||
@@ -1,7 +1,22 @@
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,18 @@
|
||||
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>;
|
||||
}
|
||||
|
||||
@@ -4,12 +4,37 @@ 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>
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
import { LoggerService } from '../services/logger.service';
|
||||
|
||||
/**
|
||||
* @publicApi
|
||||
*/
|
||||
export class NestApplicationContextOptions {
|
||||
/**
|
||||
* specify the logger to use
|
||||
*/
|
||||
logger?: LoggerService | boolean;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,12 @@ import { LoggerService } from '../services/logger.service';
|
||||
import { Abstract } from './abstract.interface';
|
||||
import { Type } from './type.interface';
|
||||
|
||||
/**
|
||||
* @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.
|
||||
|
||||
@@ -1,9 +1,21 @@
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,12 @@ 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 {
|
||||
/**
|
||||
* A wrapper function around HTTP adapter method: `adapter.use()`.
|
||||
@@ -29,7 +35,7 @@ export interface INestApplication extends INestApplicationContext {
|
||||
* @param {number} port
|
||||
* @param {string} hostname
|
||||
* @param {Function} callback Optional callback
|
||||
* @returns {Promise}
|
||||
* @returns A Promise that, when resolved, is a reference to the underlying HttpServer.
|
||||
*/
|
||||
listen(port: number | string, callback?: () => void): Promise<any>;
|
||||
listen(
|
||||
@@ -48,16 +54,16 @@ export interface INestApplication extends INestApplicationContext {
|
||||
listenAsync(port: number | string, hostname?: string): Promise<any>;
|
||||
|
||||
/**
|
||||
* Registers the prefix for the every HTTP route path
|
||||
* Registers a prefix for every HTTP route path.
|
||||
*
|
||||
* @param {string} prefix The prefix for the every HTTP route path (for example `/v1/api`)
|
||||
* @param {string} prefix The prefix for 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}
|
||||
@@ -65,7 +71,8 @@ export interface INestApplication extends INestApplicationContext {
|
||||
useWebSocketAdapter(adapter: WebSocketAdapter): this;
|
||||
|
||||
/**
|
||||
* Connects microservice to the NestApplication instance. Transforms application to the hybrid instance.
|
||||
* Connects microservice to the NestApplication instance. Transforms application
|
||||
* to a hybrid instance.
|
||||
*
|
||||
* @param {MicroserviceOptions} options Microservice options object
|
||||
* @returns {INestMicroservice}
|
||||
@@ -80,21 +87,21 @@ export interface INestApplication extends INestApplicationContext {
|
||||
getMicroservices(): INestMicroservice[];
|
||||
|
||||
/**
|
||||
* Returns an underlying, native HTTP server.
|
||||
* Returns the underlying native HTTP server.
|
||||
*
|
||||
* @returns {http.Server}
|
||||
*/
|
||||
getHttpServer(): any;
|
||||
|
||||
/**
|
||||
* Returns an underlying HTTP adapter.
|
||||
* Returns the 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}
|
||||
@@ -102,42 +109,45 @@ 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 a global filters (will be used within every HTTP route handler)
|
||||
* Registers exception filters as global filters (will be used within
|
||||
* every HTTP route handler)
|
||||
*
|
||||
* @param {ExceptionFilter[]} ...filters
|
||||
*/
|
||||
useGlobalFilters(...filters: ExceptionFilter[]): this;
|
||||
|
||||
/**
|
||||
* Registers pipes as a global pipes (will be used within every HTTP route handler)
|
||||
* Registers pipes as global pipes (will be used within every HTTP route handler)
|
||||
*
|
||||
* @param {PipeTransform[]} ...pipes
|
||||
*/
|
||||
useGlobalPipes(...pipes: PipeTransform<any>[]): this;
|
||||
|
||||
/**
|
||||
* Registers interceptors as a global interceptors (will be used within every HTTP route handler)
|
||||
* Registers interceptors as global interceptors (will be used within
|
||||
* every HTTP route handler)
|
||||
*
|
||||
* @param {NestInterceptor[]} ...interceptors
|
||||
*/
|
||||
useGlobalInterceptors(...interceptors: NestInterceptor[]): this;
|
||||
|
||||
/**
|
||||
* Registers guards as a global guards (will be used within every HTTP route handler)
|
||||
* Registers guards as 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>}
|
||||
*/
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,31 @@
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/common",
|
||||
"version": "6.5.0",
|
||||
"version": "6.5.3",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@common)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"repository": {
|
||||
@@ -14,7 +14,7 @@
|
||||
"dependencies": {
|
||||
"axios": "0.19.0",
|
||||
"cli-color": "1.4.0",
|
||||
"uuid": "3.3.2"
|
||||
"uuid": "3.3.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"reflect-metadata": "^0.1.12",
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { expect } from 'chai';
|
||||
import * as sinon from 'sinon';
|
||||
import { ArgumentMetadata } from '../../interfaces';
|
||||
import { ParseUUIDPipe } from '../../pipes/parse-uuid.pipe';
|
||||
|
||||
@@ -56,7 +55,7 @@ describe('ParseUUIDPipe', () => {
|
||||
});
|
||||
|
||||
it('should throw an error - v5 ', async () => {
|
||||
target = new ParseUUIDPipe({ version: '4' });
|
||||
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;
|
||||
|
||||
1
packages/core/PACKAGE.md
Normal file
1
packages/core/PACKAGE.md
Normal file
@@ -0,0 +1 @@
|
||||
Implements Nest core functionalities, low-level services, and utilities.
|
||||
@@ -15,7 +15,6 @@
|
||||
<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>
|
||||
|
||||
@@ -3,6 +3,13 @@ import { RequestHandler } from '@nestjs/common/interfaces';
|
||||
import { CorsOptions } from '@nestjs/common/interfaces/external/cors-options.interface';
|
||||
import { NestApplicationOptions } from '@nestjs/common/interfaces/nest-application-options.interface';
|
||||
|
||||
/**
|
||||
* @publicApi
|
||||
*
|
||||
* @description
|
||||
*
|
||||
* This is the AbstractHttpAdapter
|
||||
*/
|
||||
export abstract class AbstractHttpAdapter<
|
||||
TServer = any,
|
||||
TRequest = any,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ForbiddenException, ParamData } from '@nestjs/common';
|
||||
import { CUSTOM_ROUTE_AGRS_METADATA } from '@nestjs/common/constants';
|
||||
import { Controller, Transform } from '@nestjs/common/interfaces';
|
||||
import { isFunction } from '@nestjs/common/utils/shared.utils';
|
||||
import { Controller, PipeTransform } from '@nestjs/common/interfaces';
|
||||
import { isEmpty, isFunction } from '@nestjs/common/utils/shared.utils';
|
||||
import { FORBIDDEN_MESSAGE } from '../guards/constants';
|
||||
import { GuardsConsumer } from '../guards/guards-consumer';
|
||||
import { GuardsContextCreator } from '../guards/guards-context-creator';
|
||||
@@ -292,7 +292,7 @@ export class ExternalContextCreator {
|
||||
}
|
||||
|
||||
public createPipesFn(
|
||||
pipes: any[],
|
||||
pipes: PipeTransform[],
|
||||
paramsOptions: (ParamProperties & { metatype?: any })[],
|
||||
) {
|
||||
const pipesFn = async (args: any[], ...params: any[]) => {
|
||||
@@ -322,13 +322,11 @@ export class ExternalContextCreator {
|
||||
public async getParamValue<T>(
|
||||
value: T,
|
||||
{ metatype, type, data }: { metatype: any; type: any; data: any },
|
||||
transforms: Transform<any>[],
|
||||
pipes: PipeTransform[],
|
||||
): Promise<any> {
|
||||
return this.pipesConsumer.apply(
|
||||
value,
|
||||
{ metatype, type, data },
|
||||
transforms,
|
||||
);
|
||||
return isEmpty(pipes)
|
||||
? value
|
||||
: this.pipesConsumer.apply(value, { metatype, type, data }, pipes);
|
||||
}
|
||||
|
||||
public async transformToResult(resultOrDeffered: any) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Controller } from '@nestjs/common/interfaces';
|
||||
import * as hash from 'object-hash';
|
||||
import { ContextId } from './../injector/instance-wrapper';
|
||||
import { ParamProperties } from './context-utils';
|
||||
|
||||
@@ -36,7 +37,7 @@ export class HandlerMetadataStorage<TValue = HandlerMetadata, TKey = any> {
|
||||
|
||||
private getMetadataKey(controller: Controller, methodName: string): string {
|
||||
const ctor = controller.constructor;
|
||||
const controllerKey = ctor && ctor.name;
|
||||
const controllerKey = ctor && hash(ctor);
|
||||
return controllerKey + methodName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
*
|
||||
* @param instance The instance which should be checked
|
||||
*/
|
||||
function hasOnAppBootstrapHook(
|
||||
function hasOnAppShutdownHook(
|
||||
instance: unknown,
|
||||
): instance is OnApplicationShutdown {
|
||||
return !isUndefined(
|
||||
@@ -30,7 +30,7 @@ function callOperator(
|
||||
): Promise<any>[] {
|
||||
return iterate(instances)
|
||||
.filter(instance => !isNil(instance))
|
||||
.filter(hasOnAppBootstrapHook)
|
||||
.filter(hasOnAppShutdownHook)
|
||||
.map(async instance =>
|
||||
((instance as any) as OnApplicationShutdown).onApplicationShutdown(
|
||||
signal,
|
||||
@@ -61,7 +61,7 @@ export async function callAppShutdownHook(
|
||||
await Promise.all(callOperator(transientInstances, signal));
|
||||
|
||||
// Call the instance itself
|
||||
if (moduleClassInstance && hasOnAppBootstrapHook(moduleClassInstance)) {
|
||||
if (moduleClassInstance && hasOnAppShutdownHook(moduleClassInstance)) {
|
||||
await (moduleClassInstance as OnApplicationShutdown).onApplicationShutdown(
|
||||
signal,
|
||||
);
|
||||
|
||||
@@ -248,6 +248,11 @@ export class MiddlewareModule {
|
||||
) {
|
||||
const prefix = this.config.getGlobalPrefix();
|
||||
const basePath = validatePath(prefix);
|
||||
if (basePath && path === '/*') {
|
||||
// strip slash when a wildcard is being used
|
||||
// and global prefix has been set
|
||||
path = '*';
|
||||
}
|
||||
router(basePath + path, proxy);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,9 @@ import { ContainerScanner } from './injector/container-scanner';
|
||||
import { Module } from './injector/module';
|
||||
import { ModuleTokenFactory } from './injector/module-token-factory';
|
||||
|
||||
/**
|
||||
* @publicApi
|
||||
*/
|
||||
export class NestApplicationContext implements INestApplicationContext {
|
||||
private readonly moduleTokenFactory = new ModuleTokenFactory();
|
||||
private readonly containerScanner: ContainerScanner;
|
||||
|
||||
@@ -32,6 +32,9 @@ const { SocketModule } =
|
||||
const { MicroservicesModule } =
|
||||
optional('@nestjs/microservices/microservices-module') || ({} as any);
|
||||
|
||||
/**
|
||||
* @publicApi
|
||||
*/
|
||||
export class NestApplication extends NestApplicationContext
|
||||
implements INestApplication {
|
||||
private readonly logger = new Logger(NestApplication.name, true);
|
||||
@@ -222,7 +225,7 @@ export class NestApplication extends NestApplicationContext
|
||||
|
||||
public async close(): Promise<any> {
|
||||
this.socketModule && (await this.socketModule.close());
|
||||
this.httpAdapter && this.httpAdapter.close();
|
||||
this.httpAdapter && (await this.httpAdapter.close());
|
||||
|
||||
await Promise.all(
|
||||
iterate(this.microservices).map(async microservice => {
|
||||
|
||||
@@ -23,16 +23,35 @@ import { NestApplication } from './nest-application';
|
||||
import { NestApplicationContext } from './nest-application-context';
|
||||
import { DependenciesScanner } from './scanner';
|
||||
|
||||
/**
|
||||
* @publicApi
|
||||
*/
|
||||
export class NestFactoryStatic {
|
||||
private readonly logger = new Logger('NestFactory', true);
|
||||
/**
|
||||
* Creates an instance of the NestApplication
|
||||
* @returns {Promise}
|
||||
* Creates an instance of NestApplication.
|
||||
*
|
||||
* @param module Entry (root) application module class
|
||||
* @param options List of options to initialize NestApplication
|
||||
*
|
||||
* @returns A promise that, when resolved,
|
||||
* contains a reference to the NestApplication instance.
|
||||
*/
|
||||
public async create<T extends INestApplication = INestApplication>(
|
||||
module: any,
|
||||
options?: NestApplicationOptions,
|
||||
): Promise<T>;
|
||||
/**
|
||||
* Creates an instance of NestApplication with the specified `httpAdapter`
|
||||
*
|
||||
* @param module Entry (root) application module class
|
||||
* @param httpAdapter Adapter to proxy the request/response cycle to
|
||||
* the underlying HTTP server
|
||||
* @param options List of options to initialize NestApplication
|
||||
*
|
||||
* @returns A promise that, when resolved,
|
||||
* contains a reference to the NestApplication instance.
|
||||
*/
|
||||
public async create<T extends INestApplication = INestApplication>(
|
||||
module: any,
|
||||
httpAdapter: AbstractHttpAdapter,
|
||||
@@ -65,11 +84,13 @@ export class NestFactoryStatic {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an instance of the NestMicroservice
|
||||
* Creates an instance of NestMicroservice
|
||||
*
|
||||
* @param {} module Entry (root) application module class
|
||||
* @param {NestMicroserviceOptions & MicroserviceOptions} options Optional microservice configuration
|
||||
* @returns {Promise}
|
||||
* @param module Entry (root) application module class
|
||||
* @param options Optional microservice configuration
|
||||
*
|
||||
* @returns A promise that, when resolved,
|
||||
* contains a reference to the NestMicroservice instance.
|
||||
*/
|
||||
public async createMicroservice(
|
||||
module: any,
|
||||
@@ -92,11 +113,13 @@ export class NestFactoryStatic {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an instance of the NestApplicationContext
|
||||
* Creates an instance of NestApplicationContext
|
||||
*
|
||||
* @param {} module Entry (root) application module class
|
||||
* @param {NestApplicationContextOptions} options Optional Nest application configuration
|
||||
* @returns {Promise}
|
||||
* @param module Entry (root) application module class
|
||||
* @param options Optional Nest application configuration
|
||||
*
|
||||
* @returns A promise that, when resolved,
|
||||
* contains a reference to the NestApplicationContext instance.
|
||||
*/
|
||||
public async createApplicationContext(
|
||||
module: any,
|
||||
@@ -213,4 +236,49 @@ export class NestFactoryStatic {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @publicApi
|
||||
*
|
||||
* @description
|
||||
*
|
||||
* Use NestFactory to create an application instance.
|
||||
*
|
||||
* @usageNotes
|
||||
*
|
||||
* ### [Any Application] Specifying an entry module
|
||||
* Pass the required *root module* for the application via the module parameter.
|
||||
* By convention, it is usually called `ApplicationModule`. Starting with this
|
||||
* module, Nest assembles the dependency graph and begins the process of
|
||||
* Dependency Injection and instantiates the classes needed to launch your
|
||||
* application.
|
||||
*
|
||||
* ```typescript
|
||||
* import { NestFactory } from '@nestjs/core';
|
||||
* import { ApplicationModule } from './app.module';
|
||||
*
|
||||
* async function bootstrap() {
|
||||
* const app = await NestFactory.create(ApplicationModule);
|
||||
* await app.listen(3000);
|
||||
* }
|
||||
* bootstrap();
|
||||
* ```
|
||||
*
|
||||
* ### [NestApplication only] Providing an httpAdapter object
|
||||
* In this example, we create a NestApplication that uses the `FastifyAdapter`.
|
||||
* Pass options to `Fastify` by passing an options object into the
|
||||
* `FastifyAdapter()` constructor. Note that if the `httpAdapter` is not
|
||||
* `Express`, the supporting package (e.g., `@nestjs/platform-fastify`) must be
|
||||
* installed.
|
||||
*
|
||||
* ```typescript
|
||||
* async function bootstrap() {
|
||||
* const app = await NestFactory.create<NestFastifyApplication>(
|
||||
* ApplicationModule,
|
||||
* new FastifyAdapter(),
|
||||
* );
|
||||
* await app.listen(3000);
|
||||
* }
|
||||
* bootstrap();
|
||||
* ```
|
||||
*/
|
||||
export const NestFactory = new NestFactoryStatic();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/core",
|
||||
"version": "6.5.0",
|
||||
"version": "6.5.3",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@core)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -27,7 +27,7 @@
|
||||
"iterare": "1.2.0",
|
||||
"object-hash": "1.3.1",
|
||||
"optional": "0.1.4",
|
||||
"uuid": "3.3.2"
|
||||
"uuid": "3.3.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^6.0.0",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RouteParamtypes } from '@nestjs/common/enums/route-paramtypes.enum';
|
||||
import { ArgumentMetadata, Transform } from '@nestjs/common/interfaces';
|
||||
import { ArgumentMetadata, PipeTransform } from '@nestjs/common/interfaces';
|
||||
import { ParamsTokenFactory } from './params-token-factory';
|
||||
|
||||
export class PipesConsumer {
|
||||
@@ -8,22 +8,22 @@ export class PipesConsumer {
|
||||
public async apply<TInput = any>(
|
||||
value: TInput,
|
||||
{ metatype, type, data }: ArgumentMetadata,
|
||||
transforms: Transform<any>[],
|
||||
pipes: PipeTransform[],
|
||||
) {
|
||||
const token = this.paramsTokenFactory.exchangeEnumForString(
|
||||
(type as any) as RouteParamtypes,
|
||||
);
|
||||
return this.applyPipes(value, { metatype, type: token, data }, transforms);
|
||||
return this.applyPipes(value, { metatype, type: token, data }, pipes);
|
||||
}
|
||||
|
||||
public async applyPipes<TInput = any>(
|
||||
value: TInput,
|
||||
{ metatype, type, data }: { metatype: any; type?: any; data?: any },
|
||||
transforms: Transform<any>[],
|
||||
transforms: PipeTransform[],
|
||||
) {
|
||||
return transforms.reduce(async (defferedValue, fn) => {
|
||||
return transforms.reduce(async (defferedValue, pipe) => {
|
||||
const val = await defferedValue;
|
||||
const result = fn(val, { metatype, type, data });
|
||||
const result = pipe.transform(val, { metatype, type, data });
|
||||
return result;
|
||||
}, Promise.resolve(value));
|
||||
}
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
import { PIPES_METADATA } from '@nestjs/common/constants';
|
||||
import {
|
||||
Controller,
|
||||
PipeTransform,
|
||||
Transform,
|
||||
} from '@nestjs/common/interfaces';
|
||||
import { Controller, PipeTransform } from '@nestjs/common/interfaces';
|
||||
import { isEmpty, isFunction } from '@nestjs/common/utils/shared.utils';
|
||||
import iterate from 'iterare';
|
||||
import { ApplicationConfig } from '../application-config';
|
||||
@@ -28,7 +24,7 @@ export class PipesContextCreator extends ContextCreator {
|
||||
module: string,
|
||||
contextId = STATIC_CONTEXT,
|
||||
inquirerId?: string,
|
||||
): Transform<any>[] {
|
||||
): PipeTransform[] {
|
||||
this.moduleContext = module;
|
||||
return this.createContext(
|
||||
instance,
|
||||
@@ -51,7 +47,6 @@ export class PipesContextCreator extends ContextCreator {
|
||||
.filter((pipe: any) => pipe && (pipe.name || pipe.transform))
|
||||
.map(pipe => this.getPipeInstance(pipe, contextId, inquirerId))
|
||||
.filter(pipe => pipe && pipe.transform && isFunction(pipe.transform))
|
||||
.map(pipe => pipe.transform.bind(pipe))
|
||||
.toArray() as R;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
} from '@nestjs/common/constants';
|
||||
import { RouteParamsMetadata } from '@nestjs/common/decorators';
|
||||
import { RouteParamtypes } from '@nestjs/common/enums/route-paramtypes.enum';
|
||||
import { Controller, Transform } from '@nestjs/common/interfaces';
|
||||
import { Controller } from '@nestjs/common/interfaces';
|
||||
import {
|
||||
isEmpty,
|
||||
isFunction,
|
||||
@@ -285,21 +285,22 @@ export class RouterExecutionContext {
|
||||
type,
|
||||
data,
|
||||
}: { metatype: any; type: RouteParamtypes; data: any },
|
||||
transforms: Transform<any>[],
|
||||
pipes: PipeTransform[],
|
||||
): Promise<any> {
|
||||
if (
|
||||
type === RouteParamtypes.BODY ||
|
||||
type === RouteParamtypes.QUERY ||
|
||||
type === RouteParamtypes.PARAM ||
|
||||
isString(type)
|
||||
(type === RouteParamtypes.BODY ||
|
||||
type === RouteParamtypes.QUERY ||
|
||||
type === RouteParamtypes.PARAM ||
|
||||
isString(type)) &&
|
||||
!isEmpty(pipes)
|
||||
) {
|
||||
return this.pipesConsumer.apply(
|
||||
value,
|
||||
{ metatype, type, data } as any,
|
||||
transforms,
|
||||
pipes,
|
||||
);
|
||||
}
|
||||
return Promise.resolve(value);
|
||||
return value;
|
||||
}
|
||||
|
||||
public createGuardsFn(
|
||||
@@ -322,7 +323,7 @@ export class RouterExecutionContext {
|
||||
}
|
||||
|
||||
public createPipesFn(
|
||||
pipes: any[],
|
||||
pipes: PipeTransform[],
|
||||
paramsOptions: (ParamProperties & { metatype?: any })[],
|
||||
) {
|
||||
const pipesFn = async <TRequest, TResponse>(
|
||||
|
||||
@@ -3,7 +3,6 @@ import { RouteParamtypes } from '@nestjs/common/enums/route-paramtypes.enum';
|
||||
import { expect } from 'chai';
|
||||
import { of } from 'rxjs';
|
||||
import * as sinon from 'sinon';
|
||||
import { ApplicationConfig } from '../../application-config';
|
||||
import { ExternalExceptionFilterContext } from '../../exceptions/external-exception-filter-context';
|
||||
import { GuardsConsumer } from '../../guards/guards-consumer';
|
||||
import { GuardsContextCreator } from '../../guards/guards-context-creator';
|
||||
@@ -42,9 +41,7 @@ describe('ExternalContextCreator', () => {
|
||||
new ModulesContainer(),
|
||||
new PipesContextCreator(new NestContainer()),
|
||||
consumer,
|
||||
new ExternalExceptionFilterContext(
|
||||
new NestContainer()
|
||||
),
|
||||
new ExternalExceptionFilterContext(new NestContainer()),
|
||||
);
|
||||
});
|
||||
describe('create', () => {
|
||||
@@ -218,7 +215,7 @@ describe('ExternalContextCreator', () => {
|
||||
let consumerApplySpy: sinon.SinonSpy;
|
||||
const value = 3,
|
||||
metatype = null,
|
||||
transforms = [];
|
||||
transforms = [{ transform: sinon.spy() }];
|
||||
|
||||
beforeEach(() => {
|
||||
consumerApplySpy = sinon.spy(consumer, 'apply');
|
||||
|
||||
@@ -81,6 +81,10 @@ describe('MiddlewareModule', () => {
|
||||
const useSpy = sinon.spy();
|
||||
const app = { use: useSpy };
|
||||
|
||||
const nestContainer = new NestContainer();
|
||||
// tslint:disable-next-line:no-string-literal
|
||||
middlewareModule['container'] = nestContainer;
|
||||
|
||||
expect(
|
||||
middlewareModule.registerRouteMiddleware(
|
||||
new MiddlewareContainer(),
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import * as sinon from 'sinon';
|
||||
import { expect } from 'chai';
|
||||
import { PipesConsumer } from '../../pipes/pipes-consumer';
|
||||
import * as sinon from 'sinon';
|
||||
import { RouteParamtypes } from '../../../common/enums/route-paramtypes.enum';
|
||||
import { PipesConsumer } from '../../pipes/pipes-consumer';
|
||||
|
||||
const createPipe = (transform: Function) => ({ transform });
|
||||
|
||||
describe('PipesConsumer', () => {
|
||||
let consumer: PipesConsumer;
|
||||
@@ -16,15 +18,19 @@ describe('PipesConsumer', () => {
|
||||
(metatype = {}), (type = RouteParamtypes.QUERY);
|
||||
stringifiedType = 'query';
|
||||
transforms = [
|
||||
sinon.stub().callsFake(val => val + 1),
|
||||
sinon.stub().callsFake(val => Promise.resolve(val + 1)),
|
||||
sinon.stub().callsFake(val => val + 1),
|
||||
createPipe(sinon.stub().callsFake(val => val + 1)),
|
||||
createPipe(sinon.stub().callsFake(val => Promise.resolve(val + 1))),
|
||||
createPipe(sinon.stub().callsFake(val => val + 1)),
|
||||
];
|
||||
});
|
||||
it('should call all transform functions', done => {
|
||||
consumer.apply(value, { metatype, type, data }, transforms).then(() => {
|
||||
expect(transforms.reduce((prev, next) => prev && next.called, true)).to
|
||||
.be.true;
|
||||
expect(
|
||||
transforms.reduce(
|
||||
(prev, next) => prev && next.transform.called,
|
||||
true,
|
||||
),
|
||||
).to.be.true;
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -91,7 +91,7 @@ describe('RouterExecutionContext', () => {
|
||||
let tryActivateStub;
|
||||
beforeEach(() => {
|
||||
instance = { foo: 'bar' };
|
||||
let canActivateFn = contextCreator.createGuardsFn([1], null, null);
|
||||
const canActivateFn = contextCreator.createGuardsFn([1], null, null);
|
||||
sinon.stub(contextCreator, 'createGuardsFn').returns(canActivateFn);
|
||||
tryActivateStub = sinon
|
||||
.stub(guardsConsumer, 'tryActivate')
|
||||
@@ -146,8 +146,7 @@ describe('RouterExecutionContext', () => {
|
||||
});
|
||||
});
|
||||
it('should apply expected context when "intercept" apply', () => {
|
||||
let interceptStub = sinon
|
||||
.stub(interceptorsConsumer, 'intercept');
|
||||
const interceptStub = sinon.stub(interceptorsConsumer, 'intercept');
|
||||
proxyContext(request, response, next).then(() => {
|
||||
expect(interceptStub.args[0][1][0]).to.equals(request);
|
||||
expect(interceptStub.args[0][1][1]).to.equals(response);
|
||||
@@ -212,7 +211,7 @@ describe('RouterExecutionContext', () => {
|
||||
let consumerApplySpy: sinon.SinonSpy;
|
||||
const value = 3,
|
||||
metatype = null,
|
||||
transforms = [];
|
||||
transforms = [{ transform: sinon.spy() }];
|
||||
|
||||
beforeEach(() => {
|
||||
consumerApplySpy = sinon.spy(consumer, 'apply');
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
<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>
|
||||
|
||||
@@ -37,7 +37,7 @@ export interface ClientOpts {
|
||||
url?: string;
|
||||
}
|
||||
|
||||
export interface RedisClient extends NodeJS.EventEmitter {
|
||||
export interface RedisClient {
|
||||
// event: connect
|
||||
// event: error
|
||||
// event: message
|
||||
@@ -82,18 +82,16 @@ export interface RedisClient extends NodeJS.EventEmitter {
|
||||
// Strings (http://redis.io/commands#strings)
|
||||
append(key: string, value: string, callback?: any): boolean;
|
||||
bitcount(key: string, callback?: any): boolean;
|
||||
bitcount(
|
||||
key: string,
|
||||
start: number,
|
||||
end: number,
|
||||
callback?: any,
|
||||
): boolean;
|
||||
bitcount(key: string, start: number, end: number, callback?: any): boolean;
|
||||
set(key: string, value: string, callback?: any): boolean;
|
||||
get(key: string, callback?: any): boolean;
|
||||
exists(key: string, value: string, callback?: any): boolean;
|
||||
|
||||
publish(channel: string, value: any): boolean;
|
||||
subscribe(channel: string): boolean;
|
||||
on(event: string, callback: Function): any;
|
||||
off(event: string, callback: Function): any;
|
||||
addListener(event: string, callback: Function): any;
|
||||
|
||||
/*
|
||||
commands = set_union([
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/microservices",
|
||||
"version": "6.5.0",
|
||||
"version": "6.5.3",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@microservices)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -11,12 +11,16 @@ class TestClientProxy extends ClientProxy {
|
||||
protected async dispatchEvent<T = any>(
|
||||
packet: ReadPacket<any>,
|
||||
): Promise<any> {}
|
||||
public async connect() {}
|
||||
public async connect() {
|
||||
return Promise.resolve();
|
||||
}
|
||||
public publish(pattern, callback): any {}
|
||||
public close() {}
|
||||
public async close() {}
|
||||
}
|
||||
|
||||
describe('ClientProxy', () => {
|
||||
describe('ClientProxy', function() {
|
||||
this.retries(10);
|
||||
|
||||
let client: TestClientProxy;
|
||||
beforeEach(() => {
|
||||
client = new TestClientProxy();
|
||||
@@ -106,7 +110,9 @@ describe('ClientProxy', () => {
|
||||
});
|
||||
describe('when is connected', () => {
|
||||
beforeEach(() => {
|
||||
sinon.stub(client, 'connect').callsFake(() => Promise.resolve());
|
||||
try {
|
||||
sinon.stub(client, 'connect').callsFake(() => Promise.resolve());
|
||||
} catch {}
|
||||
});
|
||||
it(`should call "publish"`, () => {
|
||||
const pattern = { test: 3 };
|
||||
|
||||
@@ -5,8 +5,10 @@ import * as sinon from 'sinon';
|
||||
import { ClientRMQ } from '../../client/client-rmq';
|
||||
// tslint:disable:no-string-literal
|
||||
|
||||
describe('ClientRQM', () => {
|
||||
const client = new ClientRMQ({});
|
||||
describe('ClientRMQ', function() {
|
||||
this.retries(10);
|
||||
|
||||
let client: ClientRMQ;
|
||||
|
||||
describe('connect', () => {
|
||||
let createClientStub: sinon.SinonStub;
|
||||
@@ -15,6 +17,7 @@ describe('ClientRQM', () => {
|
||||
let mergeDisconnectEvent: sinon.SinonStub;
|
||||
|
||||
beforeEach(async () => {
|
||||
client = new ClientRMQ({});
|
||||
createClientStub = sinon.stub(client, 'createClient').callsFake(() => ({
|
||||
addListener: () => ({}),
|
||||
removeListener: () => ({}),
|
||||
@@ -33,16 +36,12 @@ describe('ClientRQM', () => {
|
||||
.stub(client, 'mergeDisconnectEvent')
|
||||
.callsFake((_, source) => source);
|
||||
});
|
||||
afterEach(() => {
|
||||
createClientStub.restore();
|
||||
handleErrorsSpy.restore();
|
||||
connect$Stub.restore();
|
||||
mergeDisconnectEvent.restore();
|
||||
});
|
||||
describe('when is not connected', () => {
|
||||
beforeEach(async () => {
|
||||
client['client'] = null;
|
||||
await client.connect();
|
||||
try {
|
||||
client['client'] = null;
|
||||
await client.connect();
|
||||
} catch {}
|
||||
});
|
||||
it('should call "handleError" once', async () => {
|
||||
expect(handleErrorsSpy.called).to.be.true;
|
||||
|
||||
@@ -47,9 +47,9 @@ describe('transformPatternToRoute', () => {
|
||||
];
|
||||
|
||||
const expectedResults = [
|
||||
`{controller:app/use:getHello}`,
|
||||
`{controller:app/use:getHello}`,
|
||||
`{controller:app/id:150/service:one/use:getHello}`,
|
||||
JSON.stringify(testPatterns[0]),
|
||||
`{"controller":"app","use":"getHello"}`,
|
||||
`{"controller":"app","id":150,"service":"one","use":"getHello"}`,
|
||||
];
|
||||
|
||||
equalTest(testPatterns, expectedResults);
|
||||
@@ -60,7 +60,7 @@ describe('transformPatternToRoute', () => {
|
||||
const testPatterns = [
|
||||
{
|
||||
controller: 'app',
|
||||
use: { p1: 'path1', p2: 'path2' },
|
||||
use: { p1: 'path1', p2: 'path2', p3: 10 },
|
||||
},
|
||||
{
|
||||
use: { p1: 'path1', p2: 'path2' },
|
||||
@@ -74,9 +74,9 @@ describe('transformPatternToRoute', () => {
|
||||
];
|
||||
|
||||
const expectedResults = [
|
||||
`{controller:app/use:{p1:path1/p2:path2}}`,
|
||||
`{controller:app/use:{p1:path1/p2:path2}}`,
|
||||
`{controller:app/service:one/use:{id:160/p1:path1/p2:path2}}`,
|
||||
JSON.stringify(testPatterns[0]),
|
||||
`{"controller":"app","use":{"p1":"path1","p2":"path2"}}`,
|
||||
`{"controller":"app","service":"one","use":{"id":160,"p1":"path1","p2":"path2"}}`,
|
||||
];
|
||||
|
||||
equalTest(testPatterns, expectedResults);
|
||||
@@ -101,9 +101,9 @@ describe('transformPatternToRoute', () => {
|
||||
];
|
||||
|
||||
const expectedResults = [
|
||||
`{controller:app/use:{p1:path1/p2:{pp1:ppath1}}}`,
|
||||
`{controller:{p2:path2}/use:{p1:path1}}`,
|
||||
`{controller:{p1:{id:180/pp1:ppath1}}/service:one/use:{p1:path1/p2:{pp1:ppath1}}}`,
|
||||
JSON.stringify(testPatterns[0]),
|
||||
`{"controller":{"p2":"path2"},"use":{"p1":"path1"}}`,
|
||||
`{"controller":{"p1":{"id":180,"pp1":"ppath1"}},"service":"one","use":{"p1":"path1","p2":{"pp1":"ppath1"}}}`,
|
||||
];
|
||||
|
||||
equalTest(testPatterns, expectedResults);
|
||||
|
||||
@@ -26,10 +26,14 @@ export function transformPatternToRoute(pattern: MsPattern): string {
|
||||
);
|
||||
|
||||
// Creates the array of Pattern params from sorted keys and their corresponding values
|
||||
const sortedPatternParams = sortedKeys.map(
|
||||
key => `${key}:${transformPatternToRoute(pattern[key])}`,
|
||||
);
|
||||
const sortedPatternParams = sortedKeys.map(key => {
|
||||
let partialRoute = `"${key}":`;
|
||||
partialRoute += isString(pattern[key])
|
||||
? `"${transformPatternToRoute(pattern[key])}"`
|
||||
: transformPatternToRoute(pattern[key]);
|
||||
return partialRoute;
|
||||
});
|
||||
|
||||
const route = sortedPatternParams.join('/');
|
||||
const route = sortedPatternParams.join(',');
|
||||
return `{${route}}`;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
<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>
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
import { INestApplication } from '@nestjs/common';
|
||||
import { ServeStaticOptions } from './serve-static-options.interface';
|
||||
|
||||
/**
|
||||
* @publicApi
|
||||
*
|
||||
* @description
|
||||
* Interface describing methods on NestExpressApplication.
|
||||
*
|
||||
* @see [Platform](https://docs.nestjs.com/first-steps#platform)
|
||||
*/
|
||||
export interface NestExpressApplication extends INestApplication {
|
||||
/**
|
||||
* A wrapper function around native `express.set()` method.
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
/**
|
||||
* @see https://www.npmjs.com/package/@types/serve-static
|
||||
* @publicApi
|
||||
*
|
||||
* @description
|
||||
* Interface describing options for serving static assets.
|
||||
*
|
||||
* @see [Serving static files in Express](https://expressjs.com/en/starter/static-files.html)
|
||||
* @see [Model-View-Controller](https://docs.nestjs.com/techniques/mvc)
|
||||
*/
|
||||
export interface ServeStaticOptions {
|
||||
/**
|
||||
@@ -60,10 +66,10 @@ export interface ServeStaticOptions {
|
||||
|
||||
/**
|
||||
* Function to set custom headers on response. Alterations to the headers need to occur synchronously.
|
||||
* The function is called as fn(res, path, stat), where the arguments are:
|
||||
* res the response object
|
||||
* path the file path that is being sent
|
||||
* stat the stat object of the file that is being sent
|
||||
* The function is called as `fn(res, path, stat)`, where the arguments are:
|
||||
* `res` - the response object
|
||||
* `path` - the file path that is being sent
|
||||
* `stat` - the stat object of the file that is being sent
|
||||
*/
|
||||
setHeaders?: (res: any, path: string, stat: any) => any;
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
export * from './any-files.interceptor';
|
||||
export * from './file-fields.interceptor';
|
||||
export * from './file.interceptor';
|
||||
export * from './files.interceptor';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/platform-express",
|
||||
"version": "6.5.0",
|
||||
"version": "6.5.3",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@platform-express)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -15,7 +15,7 @@
|
||||
"body-parser": "1.19.0",
|
||||
"cors": "2.8.5",
|
||||
"express": "4.17.1",
|
||||
"multer": "1.4.1"
|
||||
"multer": "1.4.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^6.0.0",
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
<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>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/platform-fastify",
|
||||
"version": "6.5.0",
|
||||
"version": "6.5.3",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@platform-fastify)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -12,7 +12,7 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"fastify": "2.6.0",
|
||||
"fastify": "2.7.1",
|
||||
"fastify-cors": "2.1.3",
|
||||
"fastify-formbody": "3.1.0",
|
||||
"path-to-regexp": "3.0.0"
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
<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>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/platform-socket.io",
|
||||
"version": "6.5.0",
|
||||
"version": "6.5.3",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@platform-socket.io)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
<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>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user