mirror of
https://github.com/nestjs/nest.git
synced 2026-02-22 07:21:39 +00:00
Compare commits
215 Commits
andrewda-h
...
v7.6.13
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e4a2b06205 | ||
|
|
7cb7b1dc8a | ||
|
|
e7fa96022e | ||
|
|
de4a90cc65 | ||
|
|
dfb03e17ef | ||
|
|
87b6951143 | ||
|
|
1e644bd95b | ||
|
|
29cc923de8 | ||
|
|
d570a79a3b | ||
|
|
7ad0f61bf4 | ||
|
|
513d2c91aa | ||
|
|
c19f6267d4 | ||
|
|
c1c7f00f85 | ||
|
|
6ac26cba50 | ||
|
|
a9d16961af | ||
|
|
49e2c4dc7d | ||
|
|
9518f6448f | ||
|
|
2882764a45 | ||
|
|
38cfd1b445 | ||
|
|
aa47eb99be | ||
|
|
ffa1ead4a2 | ||
|
|
5385337dfc | ||
|
|
89c454b996 | ||
|
|
f95d37f542 | ||
|
|
a47c2d8ddc | ||
|
|
e86a66c794 | ||
|
|
b39ae98514 | ||
|
|
3d40ae3f3c | ||
|
|
6b4f830e30 | ||
|
|
7809ec8d45 | ||
|
|
2eff8bb355 | ||
|
|
9a12e7bf35 | ||
|
|
bbf9e693b6 | ||
|
|
47b2ed07ed | ||
|
|
59319e93d9 | ||
|
|
45866e26ab | ||
|
|
544633f4ad | ||
|
|
c8de663f40 | ||
|
|
801dd7a882 | ||
|
|
14a2415070 | ||
|
|
c429576c07 | ||
|
|
0a287c8817 | ||
|
|
cc445332a3 | ||
|
|
fcb31ab7bb | ||
|
|
bc6dda9992 | ||
|
|
99059148d4 | ||
|
|
1848755d21 | ||
|
|
d450111f06 | ||
|
|
db73a25a1d | ||
|
|
e20758036e | ||
|
|
9922cae666 | ||
|
|
8f270c4129 | ||
|
|
147cd417b5 | ||
|
|
cbbc01fe43 | ||
|
|
a5a05fa5b0 | ||
|
|
23001620eb | ||
|
|
55d113c250 | ||
|
|
45345cfb6a | ||
|
|
97d0aee4e1 | ||
|
|
5cd3c3c0c9 | ||
|
|
4fa1564288 | ||
|
|
a5a8bc80c3 | ||
|
|
50b7c7103e | ||
|
|
c25abbfda4 | ||
|
|
60bae3d5f0 | ||
|
|
14969285ea | ||
|
|
e9e2f8e884 | ||
|
|
151562673a | ||
|
|
36027564bd | ||
|
|
78fe4989ca | ||
|
|
517df3ce9e | ||
|
|
f26163df3e | ||
|
|
4e19e959f2 | ||
|
|
ceb5de6479 | ||
|
|
e6772683ce | ||
|
|
60aafc591b | ||
|
|
78fa9b4e64 | ||
|
|
40b1a7c106 | ||
|
|
af420c44e9 | ||
|
|
e95c6e7456 | ||
|
|
fac59d5530 | ||
|
|
f7d0e94a0e | ||
|
|
00995d0ff3 | ||
|
|
c3806a557a | ||
|
|
b3e0568245 | ||
|
|
5fe60d707b | ||
|
|
6c44abedc8 | ||
|
|
6d625b91b4 | ||
|
|
51c091e8eb | ||
|
|
597b6c514a | ||
|
|
8be6777d6b | ||
|
|
4b73018de0 | ||
|
|
b4907b36ae | ||
|
|
2dc8b572a1 | ||
|
|
1e916fbc6a | ||
|
|
59c917e30a | ||
|
|
6421d6b04a | ||
|
|
0257245554 | ||
|
|
47525d26d8 | ||
|
|
954fbb693f | ||
|
|
fbe04f2db4 | ||
|
|
e088e113b7 | ||
|
|
d478e22723 | ||
|
|
d513fdf408 | ||
|
|
a7df4d6d55 | ||
|
|
b32817aeed | ||
|
|
c349d92bea | ||
|
|
f4a8f493bc | ||
|
|
a60491d9bc | ||
|
|
80edd1002b | ||
|
|
527f8ccfbb | ||
|
|
7a7ccb7c45 | ||
|
|
8e999a7665 | ||
|
|
1a8eefebfd | ||
|
|
cf5cd331ec | ||
|
|
b8078d7d05 | ||
|
|
34adb6d90b | ||
|
|
bff8609b98 | ||
|
|
29847d265c | ||
|
|
38a2b106c4 | ||
|
|
0a8eb9cbbe | ||
|
|
40ec0aee09 | ||
|
|
5fcda32a88 | ||
|
|
c4778047ca | ||
|
|
10164b6770 | ||
|
|
0312224383 | ||
|
|
a8e19c0514 | ||
|
|
ccfb512992 | ||
|
|
fa3b744e46 | ||
|
|
86870636a2 | ||
|
|
b9d39b973d | ||
|
|
5b07b2432f | ||
|
|
2ceddd61c0 | ||
|
|
1ac11d1b06 | ||
|
|
8503d62e4e | ||
|
|
6e8547bd94 | ||
|
|
7009884378 | ||
|
|
170f574bef | ||
|
|
124afbbdc7 | ||
|
|
bee7ab584f | ||
|
|
97fe2dde38 | ||
|
|
52483414d6 | ||
|
|
3323283a1d | ||
|
|
4b3f1a43ae | ||
|
|
b5006c958f | ||
|
|
36757d4056 | ||
|
|
989a66a2ec | ||
|
|
38baa94eee | ||
|
|
b4bad009d9 | ||
|
|
6aa9c131ac | ||
|
|
58cdb78acc | ||
|
|
fd7286476b | ||
|
|
d5c51c144b | ||
|
|
6c65300078 | ||
|
|
3e196c1376 | ||
|
|
462da30ecd | ||
|
|
ddcd840fb8 | ||
|
|
025689f022 | ||
|
|
d449a70a49 | ||
|
|
fd094c19c9 | ||
|
|
28d1ab655e | ||
|
|
4feca70016 | ||
|
|
59476d8aa5 | ||
|
|
8f6ee6ec82 | ||
|
|
7a224d6ce9 | ||
|
|
5657412a55 | ||
|
|
e4d6695c15 | ||
|
|
ee92aecddf | ||
|
|
2deced39c8 | ||
|
|
095bce2687 | ||
|
|
c190ccb5cd | ||
|
|
71fb7c68b2 | ||
|
|
0e16450a64 | ||
|
|
2ee0e7f840 | ||
|
|
b365aa5fba | ||
|
|
a423ca8c31 | ||
|
|
e0816c91a1 | ||
|
|
8cd06e9bb5 | ||
|
|
b21af5ef47 | ||
|
|
7b95db1a5b | ||
|
|
1823b46607 | ||
|
|
f6715dae15 | ||
|
|
da2935cc0f | ||
|
|
65e1cca493 | ||
|
|
6bf271aa10 | ||
|
|
e22c6019e9 | ||
|
|
054bae48a1 | ||
|
|
0ba2658ab4 | ||
|
|
dcf8788262 | ||
|
|
c8f739ced0 | ||
|
|
eb233d9fb3 | ||
|
|
b8e552b229 | ||
|
|
a96b08465e | ||
|
|
c47c45b6ff | ||
|
|
93b5598a33 | ||
|
|
29497d61af | ||
|
|
f37e23c5ea | ||
|
|
07cab6a468 | ||
|
|
fa0e011b03 | ||
|
|
d034e62ff0 | ||
|
|
396fe779e6 | ||
|
|
5728578e10 | ||
|
|
0db1b041ef | ||
|
|
821574cee9 | ||
|
|
4f96cadb7e | ||
|
|
90d64d085d | ||
|
|
6db30813de | ||
|
|
b336fd172c | ||
|
|
3123ad3f19 | ||
|
|
fc5f3c91af | ||
|
|
e51ab047d2 | ||
|
|
2ba2b99325 | ||
|
|
ba37eee5b0 | ||
|
|
a11d167130 | ||
|
|
91be6a6a55 |
@@ -99,7 +99,9 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
|
||||
<td align="center" valign="middle"><a href="https://filmen.nu/" target="_blank"><img src="https://nestjs.com/img/filmen-logo.png" width="120" valign="middle" /></a></td></tr><tr>
|
||||
<td align="center" valign="middle"><a href="https://meercode.io/" target="_blank"><img src="https://nestjs.com/img/meercode-logo.png" width="60" valign="middle" /></a></td>
|
||||
<td align="center" valign="middle"><a href="https://www.najlepszeplatformyforex.pl/blog/broker-xtb/" target="_blank"><img src="https://nestjs.com/img/npf-logo.jpg" width="200" valign="middle" /></a></td>
|
||||
<td align="center" valign="middle"><a href="https://thestandarddaily.com/" target="_blank"><img src="https://nestjs.com/img/the-standard-daily-logo.png" width="180" valign="middle" /></a></td>
|
||||
<td align="center" valign="middle"><a href="https://thestandarddaily.com/" target="_blank"><img src="https://nestjs.com/img/the-standard-daily-logo.png" width="180" valign="middle" /></a></td>
|
||||
<td align="center" valign="middle"><a href="https://houseofangular.io/" target="_blank"><img src="https://nestjs.com/img/house-of-angular.png" width="100" valign="middle" /></a></td>
|
||||
<td align="center" valign="middle"><a href="https://rocketech.it/cases/?utm_source=google&utm_medium=badge&utm_campaign=nestjs" target="_blank"><img src="https://nestjs.com/img/rocketech-logo.svg" width="110" valign="middle" /></a></td>
|
||||
</tr></table>
|
||||
|
||||
## Backers
|
||||
|
||||
@@ -2,47 +2,87 @@
|
||||
express
|
||||
-----------------------
|
||||
Running 10s test @ http://localhost:3000
|
||||
8 threads and 1024 connections
|
||||
Thread Stats Avg Stdev Max +/- Stdev
|
||||
Latency 47.78ms 19.09ms 212.47ms 66.94%
|
||||
Req/Sec 1.31k 268.90 2.07k 72.38%
|
||||
104687 requests in 10.02s, 21.47MB read
|
||||
Socket errors: connect 0, read 877, write 0, timeout 0
|
||||
Requests/sec: 10444.24
|
||||
Transfer/sec: 2.14MB
|
||||
1024 connections
|
||||
|
||||
┌─────────┬───────┬───────┬───────┬────────┬──────────┬──────────┬────────┐
|
||||
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
|
||||
├─────────┼───────┼───────┼───────┼────────┼──────────┼──────────┼────────┤
|
||||
│ Latency │ 55 ms │ 58 ms │ 91 ms │ 138 ms │ 61.88 ms │ 23.95 ms │ 747 ms │
|
||||
└─────────┴───────┴───────┴───────┴────────┴──────────┴──────────┴────────┘
|
||||
┌───────────┬─────────┬─────────┬─────────┬─────────┬──────────┬─────────┬─────────┐
|
||||
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
|
||||
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
|
||||
│ Req/Sec │ 8407 │ 8407 │ 17407 │ 17743 │ 16454.41 │ 2716.94 │ 8402 │
|
||||
├───────────┼─────────┼─────────┼─────────┼─────────┼──────────┼─────────┼─────────┤
|
||||
│ Bytes/Sec │ 1.81 MB │ 1.81 MB │ 3.74 MB │ 3.81 MB │ 3.54 MB │ 584 kB │ 1.81 MB │
|
||||
└───────────┴─────────┴─────────┴─────────┴─────────┴──────────┴─────────┴─────────┘
|
||||
|
||||
Req/Bytes counts sampled once per second.
|
||||
|
||||
165k requests in 10.17s, 35.4 MB read
|
||||
-----------------------
|
||||
nest (with "@nestjs/platform-express")
|
||||
-----------------------
|
||||
Running 10s test @ http://localhost:3000
|
||||
1024 connections
|
||||
|
||||
┌─────────┬───────┬───────┬───────┬───────┬──────────┬──────────┬────────┐
|
||||
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
|
||||
├─────────┼───────┼───────┼───────┼───────┼──────────┼──────────┼────────┤
|
||||
│ Latency │ 61 ms │ 64 ms │ 71 ms │ 94 ms │ 65.44 ms │ 17.35 ms │ 325 ms │
|
||||
└─────────┴───────┴───────┴───────┴───────┴──────────┴──────────┴────────┘
|
||||
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬────────┬─────────┐
|
||||
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
|
||||
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
|
||||
│ Req/Sec │ 14183 │ 14183 │ 15767 │ 15991 │ 15640 │ 501.13 │ 14182 │
|
||||
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼────────┼─────────┤
|
||||
│ Bytes/Sec │ 3.06 MB │ 3.06 MB │ 3.41 MB │ 3.45 MB │ 3.38 MB │ 108 kB │ 3.06 MB │
|
||||
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴────────┴─────────┘
|
||||
|
||||
Req/Bytes counts sampled once per second.
|
||||
|
||||
156k requests in 10.24s, 33.8 MB read
|
||||
-----------------------
|
||||
fastify
|
||||
-----------------------
|
||||
Running 10s test @ http://localhost:3000
|
||||
8 threads and 1024 connections
|
||||
Thread Stats Avg Stdev Max +/- Stdev
|
||||
Latency 21.80ms 8.73ms 78.12ms 55.78%
|
||||
Req/Sec 2.99k 0.92k 5.67k 68.88%
|
||||
238550 requests in 10.02s, 31.17MB read
|
||||
Socket errors: connect 0, read 862, write 0, timeout 0
|
||||
Requests/sec: 23795.79
|
||||
Transfer/sec: 3.11MB
|
||||
1024 connections
|
||||
|
||||
┌─────────┬───────┬───────┬───────┬───────┬──────────┬──────────┬─────────┐
|
||||
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
|
||||
├─────────┼───────┼───────┼───────┼───────┼──────────┼──────────┼─────────┤
|
||||
│ Latency │ 27 ms │ 30 ms │ 39 ms │ 78 ms │ 31.62 ms │ 26.59 ms │ 1232 ms │
|
||||
└─────────┴───────┴───────┴───────┴───────┴──────────┴──────────┴─────────┘
|
||||
┌───────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐
|
||||
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
|
||||
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ Req/Sec │ 19935 │ 19935 │ 33247 │ 34111 │ 32030.4 │ 4103.84 │ 19931 │
|
||||
├───────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ Bytes/Sec │ 3.03 MB │ 3.03 MB │ 5.05 MB │ 5.19 MB │ 4.87 MB │ 624 kB │ 3.03 MB │
|
||||
└───────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┴─────────┘
|
||||
|
||||
Req/Bytes counts sampled once per second.
|
||||
|
||||
320k requests in 10.18s, 48.7 MB read
|
||||
-----------------------
|
||||
nest
|
||||
nest (with "@nestjs/platform-fastify")
|
||||
-----------------------
|
||||
Running 10s test @ http://localhost:3000
|
||||
8 threads and 1024 connections
|
||||
Thread Stats Avg Stdev Max +/- Stdev
|
||||
Latency 54.00ms 22.33ms 200.25ms 62.23%
|
||||
Req/Sec 1.15k 338.60 1.88k 66.12%
|
||||
91348 requests in 10.05s, 18.82MB read
|
||||
Socket errors: connect 0, read 983, write 0, timeout 0
|
||||
Requests/sec: 9093.64
|
||||
Transfer/sec: 1.87MB
|
||||
-----------------------
|
||||
nest-fastify
|
||||
-----------------------
|
||||
Running 10s test @ http://localhost:3000
|
||||
8 threads and 1024 connections
|
||||
Thread Stats Avg Stdev Max +/- Stdev
|
||||
Latency 29.31ms 11.71ms 101.96ms 70.03%
|
||||
Req/Sec 2.17k 0.93k 4.12k 63.13%
|
||||
173241 requests in 10.05s, 22.80MB read
|
||||
Socket errors: connect 0, read 934, write 0, timeout 0
|
||||
Requests/sec: 17233.87
|
||||
Transfer/sec: 2.27MB
|
||||
1024 connections
|
||||
|
||||
┌─────────┬───────┬───────┬───────┬───────┬──────────┬──────────┬────────┐
|
||||
│ Stat │ 2.5% │ 50% │ 97.5% │ 99% │ Avg │ Stdev │ Max │
|
||||
├─────────┼───────┼───────┼───────┼───────┼──────────┼──────────┼────────┤
|
||||
│ Latency │ 31 ms │ 33 ms │ 38 ms │ 52 ms │ 34.41 ms │ 11.73 ms │ 245 ms │
|
||||
└─────────┴───────┴───────┴───────┴───────┴──────────┴──────────┴────────┘
|
||||
┌───────────┬─────────┬─────────┬────────┬─────────┬─────────┬─────────┬─────────┐
|
||||
│ Stat │ 1% │ 2.5% │ 50% │ 97.5% │ Avg │ Stdev │ Min │
|
||||
├───────────┼─────────┼─────────┼────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ Req/Sec │ 24911 │ 24911 │ 30031 │ 30335 │ 29470.4 │ 1564.48 │ 24907 │
|
||||
├───────────┼─────────┼─────────┼────────┼─────────┼─────────┼─────────┼─────────┤
|
||||
│ Bytes/Sec │ 3.81 MB │ 3.81 MB │ 4.6 MB │ 4.64 MB │ 4.51 MB │ 239 kB │ 3.81 MB │
|
||||
└───────────┴─────────┴─────────┴────────┴─────────┴─────────┴─────────┴─────────┘
|
||||
|
||||
Req/Bytes counts sampled once per second.
|
||||
|
||||
295k requests in 10.17s, 45.1 MB read
|
||||
@@ -113,6 +113,5 @@ describe('GRPC transport', () => {
|
||||
|
||||
after(async () => {
|
||||
await app.close();
|
||||
client.close();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
"packages": [
|
||||
"packages/*"
|
||||
],
|
||||
"version": "7.6.8"
|
||||
"version": "7.6.13"
|
||||
}
|
||||
|
||||
38107
package-lock.json
generated
38107
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
60
package.json
60
package.json
@@ -54,12 +54,12 @@
|
||||
"dependencies": {
|
||||
"@nuxtjs/opencollective": "0.3.2",
|
||||
"axios": "0.21.1",
|
||||
"class-transformer": "0.3.2",
|
||||
"class-transformer": "0.4.0",
|
||||
"class-validator": "0.13.1",
|
||||
"cli-color": "2.0.0",
|
||||
"cors": "2.8.5",
|
||||
"express": "4.17.1",
|
||||
"fast-json-stringify": "2.4.1",
|
||||
"fast-json-stringify": "2.4.2",
|
||||
"fast-safe-stringify": "2.0.7",
|
||||
"iterare": "1.2.1",
|
||||
"object-hash": "2.1.1",
|
||||
@@ -75,83 +75,83 @@
|
||||
"@commitlint/cli": "11.0.0",
|
||||
"@commitlint/config-angular": "11.0.0",
|
||||
"@grpc/proto-loader": "0.5.6",
|
||||
"@nestjs/graphql": "7.9.8",
|
||||
"@nestjs/mongoose": "7.2.2",
|
||||
"@nestjs/graphql": "7.9.9",
|
||||
"@nestjs/mongoose": "7.2.3",
|
||||
"@nestjs/typeorm": "7.1.5",
|
||||
"@types/amqplib": "0.5.17",
|
||||
"@types/bytes": "3.1.0",
|
||||
"@types/cache-manager": "3.4.0",
|
||||
"@types/chai": "4.2.14",
|
||||
"@types/chai": "4.2.15",
|
||||
"@types/chai-as-promised": "7.1.3",
|
||||
"@types/cors": "2.8.9",
|
||||
"@types/cors": "2.8.10",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/gulp": "4.0.8",
|
||||
"@types/mocha": "8.2.0",
|
||||
"@types/mocha": "8.2.1",
|
||||
"@types/mongoose": "5.10.3",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/redis": "2.8.28",
|
||||
"@types/reflect-metadata": "0.1.0",
|
||||
"@types/sinon": "9.0.10",
|
||||
"@types/socket.io": "2.1.13",
|
||||
"@types/ws": "7.4.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"amqp-connection-manager": "3.2.1",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"amqp-connection-manager": "3.2.2",
|
||||
"amqplib": "0.6.0",
|
||||
"apollo-server-express": "2.19.2",
|
||||
"apollo-server-express": "2.21.0",
|
||||
"artillery": "1.6.1",
|
||||
"awesome-typescript-loader": "5.2.1",
|
||||
"body-parser": "1.19.0",
|
||||
"bytes": "3.1.0",
|
||||
"cache-manager": "3.4.0",
|
||||
"chai": "4.2.0",
|
||||
"chai": "4.3.0",
|
||||
"chai-as-promised": "7.1.1",
|
||||
"clang-format": "1.5.0",
|
||||
"commitlint-circle": "1.0.0",
|
||||
"concurrently": "5.3.0",
|
||||
"concurrently": "6.0.0",
|
||||
"conventional-changelog": "3.1.24",
|
||||
"core-js": "3.8.3",
|
||||
"core-js": "3.9.0",
|
||||
"coveralls": "3.1.0",
|
||||
"delete-empty": "3.0.0",
|
||||
"engine.io-client": "4.1.0",
|
||||
"eslint": "7.19.0",
|
||||
"engine.io-client": "4.1.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"eventsource": "1.0.7",
|
||||
"fancy-log": "1.3.3",
|
||||
"fastify": "3.11.0",
|
||||
"fastify": "3.12.0",
|
||||
"fastify-cors": "5.2.0",
|
||||
"fastify-formbody": "5.0.0",
|
||||
"fastify-multipart": "3.3.1",
|
||||
"fastify-static": "3.4.0",
|
||||
"fastify-multipart": "4.0.0",
|
||||
"fastify-static": "4.0.0",
|
||||
"graphql": "15.5.0",
|
||||
"graphql-tools": "7.0.2",
|
||||
"grpc": "1.24.4",
|
||||
"graphql-tools": "7.0.4",
|
||||
"grpc": "1.24.5",
|
||||
"gulp": "4.0.2",
|
||||
"gulp-clang-format": "1.0.27",
|
||||
"gulp-clean": "0.4.0",
|
||||
"gulp-sourcemaps": "3.0.0",
|
||||
"gulp-typescript": "5.0.1",
|
||||
"gulp-watch": "5.0.1",
|
||||
"husky": "4.3.8",
|
||||
"husky": "5.1.0",
|
||||
"imports-loader": "2.0.0",
|
||||
"json-loader": "0.5.7",
|
||||
"kafkajs": "1.15.0",
|
||||
"lerna": "2.11.0",
|
||||
"light-my-request": "4.4.1",
|
||||
"lint-staged": "10.5.3",
|
||||
"lint-staged": "10.5.4",
|
||||
"markdown-table": "2.0.0",
|
||||
"merge-graphql-schemas": "1.7.8",
|
||||
"middie": "5.2.0",
|
||||
"mocha": "8.2.1",
|
||||
"mongoose": "5.11.14",
|
||||
"mocha": "8.3.0",
|
||||
"mongoose": "5.11.17",
|
||||
"mqtt": "4.2.6",
|
||||
"multer": "1.4.2",
|
||||
"mysql": "2.18.1",
|
||||
"nats": "1.4.12",
|
||||
"nodemon": "2.0.7",
|
||||
"nyc": "15.1.0",
|
||||
"point-of-view": "4.11.0",
|
||||
"point-of-view": "4.13.0",
|
||||
"prettier": "2.2.1",
|
||||
"redis": "3.0.2",
|
||||
"rxjs-compat": "6.6.3",
|
||||
@@ -162,10 +162,10 @@
|
||||
"supertest": "6.1.3",
|
||||
"ts-morph": "9.1.0",
|
||||
"ts-node": "9.1.1",
|
||||
"typeorm": "0.2.30",
|
||||
"typescript": "4.1.3",
|
||||
"typeorm": "0.2.31",
|
||||
"typescript": "4.1.5",
|
||||
"wrk": "1.2.1",
|
||||
"ws": "7.4.2"
|
||||
"ws": "7.4.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10.13.0"
|
||||
|
||||
@@ -167,7 +167,7 @@ export const Session: () => ParameterDecorator = createRouteParamDecorator(
|
||||
* Route handler parameter decorator. Extracts the `file` object
|
||||
* and populates the decorated parameter with the value of `file`.
|
||||
* Used in conjunction with
|
||||
* [multer middleware](https://github.com/expressjs/multer).
|
||||
* [multer middleware](https://github.com/expressjs/multer) for Express-based applications.
|
||||
*
|
||||
* For example:
|
||||
* ```typescript
|
||||
@@ -179,15 +179,78 @@ export const Session: () => ParameterDecorator = createRouteParamDecorator(
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export const UploadedFile: (
|
||||
export function UploadedFile(): ParameterDecorator;
|
||||
/**
|
||||
* Route handler parameter decorator. Extracts the `file` object
|
||||
* and populates the decorated parameter with the value of `file`.
|
||||
* Used in conjunction with
|
||||
* [multer middleware](https://github.com/expressjs/multer) for Express-based applications.
|
||||
*
|
||||
* For example:
|
||||
* ```typescript
|
||||
* uploadFile(@UploadedFile() file) {
|
||||
* console.log(file);
|
||||
* }
|
||||
* ```
|
||||
* @see [Request object](https://docs.nestjs.com/techniques/file-upload)
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export function UploadedFile(
|
||||
...pipes: (Type<PipeTransform> | PipeTransform)[]
|
||||
): ParameterDecorator;
|
||||
|
||||
/**
|
||||
* Route handler parameter decorator. Extracts the `file` object
|
||||
* and populates the decorated parameter with the value of `file`.
|
||||
* Used in conjunction with
|
||||
* [multer middleware](https://github.com/expressjs/multer) for Express-based applications.
|
||||
*
|
||||
* For example:
|
||||
* ```typescript
|
||||
* uploadFile(@UploadedFile() file) {
|
||||
* console.log(file);
|
||||
* }
|
||||
* ```
|
||||
* @see [Request object](https://docs.nestjs.com/techniques/file-upload)
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export function UploadedFile(
|
||||
fileKey?: string,
|
||||
) => ParameterDecorator = createRouteParamDecorator(RouteParamtypes.FILE);
|
||||
...pipes: (Type<PipeTransform> | PipeTransform)[]
|
||||
): ParameterDecorator;
|
||||
/**
|
||||
* Route handler parameter decorator. Extracts the `file` object
|
||||
* and populates the decorated parameter with the value of `file`.
|
||||
* Used in conjunction with
|
||||
* [multer middleware](https://github.com/expressjs/multer) for Express-based applications.
|
||||
*
|
||||
* For example:
|
||||
* ```typescript
|
||||
* uploadFile(@UploadedFile() file) {
|
||||
* console.log(file);
|
||||
* }
|
||||
* ```
|
||||
* @see [Request object](https://docs.nestjs.com/techniques/file-upload)
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export function UploadedFile(
|
||||
fileKey?: string | (Type<PipeTransform> | PipeTransform),
|
||||
...pipes: (Type<PipeTransform> | PipeTransform)[]
|
||||
): ParameterDecorator {
|
||||
return createPipesRouteParamDecorator(RouteParamtypes.FILE)(
|
||||
fileKey,
|
||||
...pipes,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Route handler parameter decorator. Extracts the `files` object
|
||||
* and populates the decorated parameter with the value of `files`.
|
||||
* Used in conjunction with
|
||||
* [multer middleware](https://github.com/expressjs/multer).
|
||||
* [multer middleware](https://github.com/expressjs/multer) for Express-based applications.
|
||||
*
|
||||
* For example:
|
||||
* ```typescript
|
||||
@@ -199,9 +262,51 @@ export const UploadedFile: (
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export const UploadedFiles: () => ParameterDecorator = createRouteParamDecorator(
|
||||
RouteParamtypes.FILES,
|
||||
);
|
||||
export function UploadedFiles(): ParameterDecorator;
|
||||
/**
|
||||
* Route handler parameter decorator. Extracts the `files` object
|
||||
* and populates the decorated parameter with the value of `files`.
|
||||
* Used in conjunction with
|
||||
* [multer middleware](https://github.com/expressjs/multer) for Express-based applications.
|
||||
*
|
||||
* For example:
|
||||
* ```typescript
|
||||
* uploadFile(@UploadedFiles() files) {
|
||||
* console.log(files);
|
||||
* }
|
||||
* ```
|
||||
* @see [Request object](https://docs.nestjs.com/techniques/file-upload)
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export function UploadedFiles(
|
||||
...pipes: (Type<PipeTransform> | PipeTransform)[]
|
||||
): ParameterDecorator;
|
||||
/**
|
||||
* Route handler parameter decorator. Extracts the `files` object
|
||||
* and populates the decorated parameter with the value of `files`.
|
||||
* Used in conjunction with
|
||||
* [multer middleware](https://github.com/expressjs/multer) for Express-based applications.
|
||||
*
|
||||
* For example:
|
||||
* ```typescript
|
||||
* uploadFile(@UploadedFiles() files) {
|
||||
* console.log(files);
|
||||
* }
|
||||
* ```
|
||||
* @see [Request object](https://docs.nestjs.com/techniques/file-upload)
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export function UploadedFiles(
|
||||
...pipes: (Type<PipeTransform> | PipeTransform)[]
|
||||
): ParameterDecorator {
|
||||
return createPipesRouteParamDecorator(RouteParamtypes.FILES)(
|
||||
undefined,
|
||||
...pipes,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Route handler parameter decorator. Extracts the `headers`
|
||||
* property from the `req` object and populates the decorated
|
||||
|
||||
@@ -62,7 +62,7 @@ export interface HttpServer<TRequest = any, TResponse = any> {
|
||||
| Promise<(path: string, callback: Function) => any>;
|
||||
getRequestHostname?(request: TRequest): string;
|
||||
getRequestMethod?(request: TRequest): string;
|
||||
getRequestUrl?(request: TResponse): string;
|
||||
getRequestUrl?(request: TRequest): string;
|
||||
getInstance(): any;
|
||||
registerParserMiddleware(): any;
|
||||
enableCors(options: CorsOptions | CorsOptionsDelegate<TRequest>): any;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/common",
|
||||
"version": "7.6.8",
|
||||
"version": "7.6.13",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@common)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"homepage": "https://nestjs.com",
|
||||
|
||||
@@ -86,7 +86,39 @@ export class ParseArrayPipe implements PipeTransform {
|
||||
} catch {}
|
||||
return this.validationPipe.transform(item, validationMetadata);
|
||||
};
|
||||
value = await Promise.all(value.map(toClassInstance));
|
||||
if (this.options.stopAtFirstError === false) {
|
||||
// strict compare to "false" to make sure
|
||||
// that this option is disabled by default
|
||||
let errors = [];
|
||||
|
||||
const targetArray = value as Array<unknown>;
|
||||
for (let i = 0; i < targetArray.length; i++) {
|
||||
try {
|
||||
targetArray[i] = await toClassInstance(targetArray[i]);
|
||||
} catch (err) {
|
||||
let message: string[] | unknown;
|
||||
if (err.getResponse) {
|
||||
const response = err.getResponse();
|
||||
if (Array.isArray(response.message)) {
|
||||
message = response.message.map(
|
||||
(item: string) => `[${i}] ${item}`,
|
||||
);
|
||||
} else {
|
||||
message = `[${i}] ${response.message}`;
|
||||
}
|
||||
} else {
|
||||
message = err;
|
||||
}
|
||||
errors = errors.concat(message);
|
||||
}
|
||||
}
|
||||
if (errors.length > 0) {
|
||||
throw this.exceptionFactory(errors as any);
|
||||
}
|
||||
return targetArray;
|
||||
} else {
|
||||
value = await Promise.all(value.map(toClassInstance));
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,19 @@
|
||||
import * as chai from 'chai';
|
||||
import { expect } from 'chai';
|
||||
import * as chaiAsPromised from 'chai-as-promised';
|
||||
import { Type } from 'class-transformer';
|
||||
import {
|
||||
IsBoolean,
|
||||
IsDate,
|
||||
IsDefined,
|
||||
IsNumber,
|
||||
IsString,
|
||||
ValidateNested,
|
||||
} from 'class-validator';
|
||||
import { BadRequestException } from '../../exceptions';
|
||||
import { ArgumentMetadata } from '../../interfaces/features/pipe-transform.interface';
|
||||
import { ParseArrayPipe } from '../../pipes/parse-array.pipe';
|
||||
chai.use(chaiAsPromised);
|
||||
|
||||
describe('ParseArrayPipe', () => {
|
||||
let target: ParseArrayPipe;
|
||||
@@ -102,6 +114,153 @@ describe('ParseArrayPipe', () => {
|
||||
expect(item).to.be.instanceOf(ArrItem);
|
||||
});
|
||||
});
|
||||
describe('when "stopAtFirstError" is explicitly turned off', () => {
|
||||
it('should validate each item and concat errors', async () => {
|
||||
class ArrItemWithProp {
|
||||
@IsNumber()
|
||||
number: number;
|
||||
}
|
||||
const pipe = new ParseArrayPipe({
|
||||
items: ArrItemWithProp,
|
||||
stopAtFirstError: false,
|
||||
});
|
||||
try {
|
||||
await pipe.transform(
|
||||
[
|
||||
{ number: '1' },
|
||||
{ number: '1' },
|
||||
{ number: 1 },
|
||||
] as ArrItemWithProp[],
|
||||
{} as ArgumentMetadata,
|
||||
);
|
||||
} catch (err) {
|
||||
expect(err).to.be.instanceOf(BadRequestException);
|
||||
expect(err.getResponse().message).to.deep.equal([
|
||||
'[0] number must be a number conforming to the specified constraints',
|
||||
'[1] number must be a number conforming to the specified constraints',
|
||||
]);
|
||||
}
|
||||
});
|
||||
|
||||
it('should validate each nested object and concat errors', async () => {
|
||||
class RandomObject {
|
||||
@IsDefined()
|
||||
@IsBoolean()
|
||||
isEnabled: boolean;
|
||||
|
||||
@IsString()
|
||||
title: string;
|
||||
|
||||
@IsDate()
|
||||
createdAt: Date;
|
||||
|
||||
constructor(partial: Partial<any>) {
|
||||
Object.assign(this, partial);
|
||||
}
|
||||
}
|
||||
class ArrItemObject {
|
||||
@ValidateNested()
|
||||
random: RandomObject;
|
||||
}
|
||||
const pipe = new ParseArrayPipe({
|
||||
items: ArrItemObject,
|
||||
stopAtFirstError: false,
|
||||
});
|
||||
try {
|
||||
await pipe.transform(
|
||||
[
|
||||
{
|
||||
random: new RandomObject({
|
||||
isEnabled: true,
|
||||
title: true,
|
||||
createdAt: new Date(),
|
||||
}),
|
||||
},
|
||||
{
|
||||
random: new RandomObject({
|
||||
title: 'ok',
|
||||
createdAt: false,
|
||||
}),
|
||||
},
|
||||
] as any[],
|
||||
{} as ArgumentMetadata,
|
||||
);
|
||||
} catch (err) {
|
||||
expect(err).to.be.instanceOf(BadRequestException);
|
||||
expect(err.getResponse().message).to.deep.equal([
|
||||
'[0] random.title must be a string',
|
||||
'[1] random.isEnabled should not be null or undefined',
|
||||
'[1] random.isEnabled must be a boolean value',
|
||||
'[1] random.createdAt must be a Date instance',
|
||||
]);
|
||||
}
|
||||
});
|
||||
|
||||
it('should validate each nested array and concat errors', async () => {
|
||||
class RandomObject {
|
||||
@IsDefined()
|
||||
@IsBoolean()
|
||||
isEnabled: boolean;
|
||||
|
||||
@IsString()
|
||||
title: string;
|
||||
|
||||
@IsDate()
|
||||
createdAt: Date;
|
||||
|
||||
constructor(partial: Partial<any>) {
|
||||
Object.assign(this, partial);
|
||||
}
|
||||
}
|
||||
class ArrItemObject {
|
||||
@Type(() => RandomObject)
|
||||
@ValidateNested({ each: true })
|
||||
random: RandomObject[];
|
||||
}
|
||||
const pipe = new ParseArrayPipe({
|
||||
items: ArrItemObject,
|
||||
stopAtFirstError: false,
|
||||
});
|
||||
try {
|
||||
await pipe.transform(
|
||||
[
|
||||
{
|
||||
random: [
|
||||
new RandomObject({
|
||||
isEnabled: true,
|
||||
title: true,
|
||||
createdAt: new Date(),
|
||||
}),
|
||||
new RandomObject({
|
||||
isEnabled: true,
|
||||
title: true,
|
||||
createdAt: new Date(),
|
||||
}),
|
||||
],
|
||||
},
|
||||
{
|
||||
random: [
|
||||
new RandomObject({
|
||||
title: 'ok',
|
||||
createdAt: false,
|
||||
}),
|
||||
],
|
||||
},
|
||||
] as any[],
|
||||
{} as ArgumentMetadata,
|
||||
);
|
||||
} catch (err) {
|
||||
expect(err).to.be.instanceOf(BadRequestException);
|
||||
expect(err.getResponse().message).to.deep.equal([
|
||||
'[0] random.0.title must be a string',
|
||||
'[0] random.1.title must be a string',
|
||||
'[1] random.0.isEnabled should not be null or undefined',
|
||||
'[1] random.0.isEnabled must be a boolean value',
|
||||
'[1] random.0.createdAt must be a Date instance',
|
||||
]);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Type } from '@nestjs/common';
|
||||
import { ForwardReference, Type } from '@nestjs/common';
|
||||
import { isNil, isSymbol } from '@nestjs/common/utils/shared.utils';
|
||||
import {
|
||||
InjectorDependency,
|
||||
@@ -10,8 +10,12 @@ import { Module } from '../injector/module';
|
||||
* Returns the name of an instance
|
||||
* @param instance The instance which should get the name from
|
||||
*/
|
||||
const getInstanceName = (instance: unknown): string =>
|
||||
instance && (instance as Type<any>).name;
|
||||
const getInstanceName = (instance: unknown): string => {
|
||||
if ((instance as ForwardReference)?.forwardRef) {
|
||||
return (instance as ForwardReference).forwardRef()?.name;
|
||||
}
|
||||
return (instance as Type<any>)?.name;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns the name of the dependency
|
||||
|
||||
@@ -28,8 +28,11 @@ export class RoutesMapper {
|
||||
},
|
||||
];
|
||||
}
|
||||
const routePath: string = Reflect.getMetadata(PATH_METADATA, route);
|
||||
if (this.isRouteInfo(routePath, route)) {
|
||||
const routePathOrPaths: string | string[] = Reflect.getMetadata(
|
||||
PATH_METADATA,
|
||||
route,
|
||||
);
|
||||
if (this.isRouteInfo(routePathOrPaths, route)) {
|
||||
return [
|
||||
{
|
||||
path: this.validateRoutePath(route.path),
|
||||
@@ -43,21 +46,28 @@ export class RoutesMapper {
|
||||
);
|
||||
const concatPaths = <T>(acc: T[], currentValue: T[]) =>
|
||||
acc.concat(currentValue);
|
||||
return paths
|
||||
.map(
|
||||
item =>
|
||||
item.path &&
|
||||
item.path.map(p => ({
|
||||
path:
|
||||
this.validateGlobalPath(routePath) + this.validateRoutePath(p),
|
||||
method: item.requestMethod,
|
||||
})),
|
||||
|
||||
return []
|
||||
.concat(routePathOrPaths)
|
||||
.map(routePath =>
|
||||
paths
|
||||
.map(
|
||||
item =>
|
||||
item.path &&
|
||||
item.path.map(p => ({
|
||||
path:
|
||||
this.validateGlobalPath(routePath) +
|
||||
this.validateRoutePath(p),
|
||||
method: item.requestMethod,
|
||||
})),
|
||||
)
|
||||
.reduce(concatPaths, []),
|
||||
)
|
||||
.reduce(concatPaths, []);
|
||||
}
|
||||
|
||||
private isRouteInfo(
|
||||
path: string | undefined,
|
||||
path: string | string[] | undefined,
|
||||
objectOrClass: Function | RouteInfo,
|
||||
): objectOrClass is RouteInfo {
|
||||
return isUndefined(path);
|
||||
|
||||
@@ -79,6 +79,7 @@ export class NestApplication
|
||||
|
||||
protected async dispose(): Promise<void> {
|
||||
this.socketModule && (await this.socketModule.close());
|
||||
this.microservicesModule && (await this.microservicesModule.close());
|
||||
this.httpAdapter && (await this.httpAdapter.close());
|
||||
|
||||
await Promise.all(
|
||||
|
||||
@@ -248,14 +248,29 @@ export class NestFactoryStatic {
|
||||
}
|
||||
|
||||
private createAdapterProxy<T>(app: NestApplication, adapter: HttpServer): T {
|
||||
return (new Proxy(app, {
|
||||
const proxy = new Proxy(app, {
|
||||
get: (receiver: Record<string, any>, prop: string) => {
|
||||
if (!(prop in receiver) && prop in adapter) {
|
||||
return this.createExceptionZone(adapter, prop);
|
||||
return (...args: unknown[]) => {
|
||||
this.createExceptionZone(adapter, prop)(...args);
|
||||
return proxy;
|
||||
};
|
||||
}
|
||||
if (isFunction(receiver[prop])) {
|
||||
const mapToProxy = (result: unknown) =>
|
||||
result instanceof NestApplication ? proxy : result;
|
||||
|
||||
return (...args: unknown[]) => {
|
||||
const result = receiver[prop](...args);
|
||||
return result instanceof Promise
|
||||
? result.then(mapToProxy)
|
||||
: mapToProxy(result);
|
||||
};
|
||||
}
|
||||
return receiver[prop];
|
||||
},
|
||||
}) as unknown) as T;
|
||||
});
|
||||
return (proxy as unknown) as T;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/core",
|
||||
"version": "7.6.8",
|
||||
"version": "7.6.13",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@core)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -36,7 +36,7 @@
|
||||
"uuid": "8.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/common": "7.6.8"
|
||||
"@nestjs/common": "7.6.13"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^7.0.0",
|
||||
|
||||
@@ -413,7 +413,11 @@ export class RouterExecutionContext {
|
||||
const renderTemplate = this.reflectRenderTemplate(callback);
|
||||
if (renderTemplate) {
|
||||
return async <TResult, TResponse>(result: TResult, res: TResponse) => {
|
||||
await this.responseController.render(result, res, renderTemplate);
|
||||
return await this.responseController.render(
|
||||
result,
|
||||
res,
|
||||
renderTemplate,
|
||||
);
|
||||
};
|
||||
}
|
||||
if (redirectResponse && typeof redirectResponse.url === 'string') {
|
||||
|
||||
@@ -48,7 +48,7 @@ export class RouterResponseController {
|
||||
template: string,
|
||||
) {
|
||||
const result = await this.transformToResult(resultOrDeferred);
|
||||
this.applicationRef.render(response, template, result);
|
||||
return this.applicationRef.render(response, template, result);
|
||||
}
|
||||
|
||||
public async transformToResult(resultOrDeferred: any) {
|
||||
|
||||
@@ -34,4 +34,32 @@ describe('RoutesMapper', () => {
|
||||
{ path: '/test/another', method: RequestMethod.DELETE },
|
||||
]);
|
||||
});
|
||||
@Controller(['test', 'test2'])
|
||||
class TestRouteWithMultiplePaths {
|
||||
@RequestMapping({ path: 'test' })
|
||||
public getTest() {}
|
||||
|
||||
@RequestMapping({ path: 'another', method: RequestMethod.DELETE })
|
||||
public getAnother() {}
|
||||
}
|
||||
|
||||
it('should map a controller with multiple paths to "ControllerMetadata" in forRoutes', () => {
|
||||
const config = {
|
||||
middleware: 'Test',
|
||||
forRoutes: [
|
||||
{ path: 'test', method: RequestMethod.GET },
|
||||
TestRouteWithMultiplePaths,
|
||||
],
|
||||
};
|
||||
|
||||
expect(mapper.mapRouteToRouteInfo(config.forRoutes[0])).to.deep.equal([
|
||||
{ path: '/test', method: RequestMethod.GET },
|
||||
]);
|
||||
expect(mapper.mapRouteToRouteInfo(config.forRoutes[1])).to.deep.equal([
|
||||
{ path: '/test/test', method: RequestMethod.GET },
|
||||
{ path: '/test/another', method: RequestMethod.DELETE },
|
||||
{ path: '/test2/test', method: RequestMethod.GET },
|
||||
{ path: '/test2/another', method: RequestMethod.DELETE },
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -305,7 +305,9 @@ export class ClientGrpcProxy extends ClientProxy implements ClientGrpc {
|
||||
}
|
||||
|
||||
public close() {
|
||||
this.grpcClients.forEach(client => client.close());
|
||||
this.grpcClients
|
||||
.filter(client => client && isFunction(client.close))
|
||||
.forEach(client => client.close());
|
||||
this.grpcClients = [];
|
||||
}
|
||||
|
||||
|
||||
@@ -39,11 +39,13 @@ export class MicroservicesModule {
|
||||
new InterceptorsContextCreator(container, config),
|
||||
new InterceptorsConsumer(),
|
||||
);
|
||||
|
||||
const injector = new Injector();
|
||||
this.listenersController = new ListenersController(
|
||||
this.clientsContainer,
|
||||
contextCreator,
|
||||
container,
|
||||
new Injector(),
|
||||
injector,
|
||||
ClientProxyFactory,
|
||||
exceptionFiltersContext,
|
||||
);
|
||||
@@ -90,9 +92,9 @@ export class MicroservicesModule {
|
||||
});
|
||||
}
|
||||
|
||||
public close() {
|
||||
public async close() {
|
||||
const clients = this.clientsContainer.getAllClients();
|
||||
clients.forEach(client => client.close());
|
||||
await Promise.all(clients.map(client => client.close()));
|
||||
this.clientsContainer.clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
import { DynamicModule, Module, Provider } from '@nestjs/common';
|
||||
import { ClientProxyFactory } from '../client';
|
||||
import {
|
||||
DynamicModule,
|
||||
Module,
|
||||
OnApplicationShutdown,
|
||||
Provider,
|
||||
} from '@nestjs/common';
|
||||
import { ClientProxy, ClientProxyFactory } from '../client';
|
||||
import { Closeable } from '../interfaces';
|
||||
import {
|
||||
ClientsModuleAsyncOptions,
|
||||
ClientsModuleOptions,
|
||||
@@ -12,7 +18,7 @@ export class ClientsModule {
|
||||
static register(options: ClientsModuleOptions): DynamicModule {
|
||||
const clients = (options || []).map(item => ({
|
||||
provide: item.name,
|
||||
useValue: ClientProxyFactory.create(item),
|
||||
useValue: this.assignOnAppShutdownHook(ClientProxyFactory.create(item)),
|
||||
}));
|
||||
return {
|
||||
module: ClientsModule,
|
||||
@@ -84,7 +90,14 @@ export class ClientsModule {
|
||||
) {
|
||||
return async (...args: any[]) => {
|
||||
const clientOptions = await useFactory(...args);
|
||||
return ClientProxyFactory.create(clientOptions);
|
||||
const clientProxyRef = ClientProxyFactory.create(clientOptions);
|
||||
return this.assignOnAppShutdownHook(clientProxyRef);
|
||||
};
|
||||
}
|
||||
|
||||
private static assignOnAppShutdownHook(client: ClientProxy & Closeable) {
|
||||
((client as unknown) as OnApplicationShutdown).onApplicationShutdown =
|
||||
client.close;
|
||||
return client;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,6 +149,8 @@ export class NestMicroservice
|
||||
|
||||
protected async closeApplication(): Promise<any> {
|
||||
this.socketModule && (await this.socketModule.close());
|
||||
this.microservicesModule && (await this.microservicesModule.close());
|
||||
|
||||
await super.close();
|
||||
this.setIsTerminated(true);
|
||||
}
|
||||
@@ -159,5 +161,6 @@ export class NestMicroservice
|
||||
return;
|
||||
}
|
||||
this.socketModule && (await this.socketModule.close());
|
||||
this.microservicesModule && (await this.microservicesModule.close());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/microservices",
|
||||
"version": "7.6.8",
|
||||
"version": "7.6.13",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@microservices)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -22,8 +22,8 @@
|
||||
"tslib": "2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8"
|
||||
"@nestjs/common": "7.6.13",
|
||||
"@nestjs/core": "7.6.13"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^7.0.0",
|
||||
|
||||
@@ -124,7 +124,7 @@ describe('ClientMqtt', () => {
|
||||
subscription = client.createResponseCallback();
|
||||
|
||||
client['routingMap'].set(responseMessage.id, callback);
|
||||
subscription('channel', new Buffer(JSON.stringify(responseMessage)));
|
||||
subscription('channel', Buffer.from(JSON.stringify(responseMessage)));
|
||||
});
|
||||
it('should call callback with expected arguments', () => {
|
||||
expect(
|
||||
@@ -143,7 +143,7 @@ describe('ClientMqtt', () => {
|
||||
client['routingMap'].set(responseMessage.id, callback);
|
||||
subscription(
|
||||
'channel',
|
||||
new Buffer(
|
||||
Buffer.from(
|
||||
JSON.stringify({
|
||||
...responseMessage,
|
||||
isDisposed: true,
|
||||
@@ -169,7 +169,7 @@ describe('ClientMqtt', () => {
|
||||
subscription = client.createResponseCallback();
|
||||
|
||||
client['routingMap'].set('3', callback);
|
||||
subscription('channel', new Buffer(JSON.stringify(responseMessage)));
|
||||
subscription('channel', Buffer.from(JSON.stringify(responseMessage)));
|
||||
});
|
||||
|
||||
it('should not call callback', () => {
|
||||
|
||||
@@ -128,7 +128,7 @@ describe('ClientRedis', () => {
|
||||
|
||||
subscription = client.createResponseCallback();
|
||||
client['routingMap'].set(responseMessage.id, callback);
|
||||
subscription('channel', new Buffer(JSON.stringify(responseMessage)));
|
||||
subscription('channel', Buffer.from(JSON.stringify(responseMessage)));
|
||||
});
|
||||
it('should call callback with expected arguments', () => {
|
||||
expect(
|
||||
@@ -146,7 +146,7 @@ describe('ClientRedis', () => {
|
||||
client['routingMap'].set(responseMessage.id, callback);
|
||||
subscription(
|
||||
'channel',
|
||||
new Buffer(
|
||||
Buffer.from(
|
||||
JSON.stringify({
|
||||
...responseMessage,
|
||||
isDisposed: responseMessage.response,
|
||||
@@ -170,7 +170,7 @@ describe('ClientRedis', () => {
|
||||
beforeEach(() => {
|
||||
callback = sinon.spy();
|
||||
subscription = client.createResponseCallback();
|
||||
subscription('channel', new Buffer(JSON.stringify(responseMessage)));
|
||||
subscription('channel', Buffer.from(JSON.stringify(responseMessage)));
|
||||
});
|
||||
|
||||
it('should not call callback', () => {
|
||||
@@ -336,4 +336,4 @@ describe('ClientRedis', () => {
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -2,9 +2,9 @@ import { DynamicModule, FactoryProvider, Injectable } from '@nestjs/common';
|
||||
import { expect } from 'chai';
|
||||
import * as sinon from 'sinon';
|
||||
import { ClientProxyFactory } from '../../client';
|
||||
import { ClientsModule, ClientsModuleOptionsFactory } from '../../module';
|
||||
import { ClientOptions } from '../../interfaces';
|
||||
import { Transport } from '../../enums';
|
||||
import { ClientOptions } from '../../interfaces';
|
||||
import { ClientsModule, ClientsModuleOptionsFactory } from '../../module';
|
||||
|
||||
describe('ClientsModule', () => {
|
||||
let dynamicModule: DynamicModule;
|
||||
@@ -24,7 +24,9 @@ describe('ClientsModule', () => {
|
||||
expect(dynamicModule.providers).to.be.deep.eq([
|
||||
{
|
||||
provide: 'test',
|
||||
useValue: ClientProxyFactory.create({}),
|
||||
useValue: ClientsModule['assignOnAppShutdownHook'](
|
||||
ClientProxyFactory.create({}),
|
||||
),
|
||||
},
|
||||
]);
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/platform-express",
|
||||
"version": "7.6.8",
|
||||
"version": "7.6.13",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@platform-express)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -24,8 +24,8 @@
|
||||
"tslib": "2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8"
|
||||
"@nestjs/common": "7.6.13",
|
||||
"@nestjs/core": "7.6.13"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^7.0.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/platform-fastify",
|
||||
"version": "7.6.8",
|
||||
"version": "7.6.13",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@platform-fastify)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -17,7 +17,7 @@
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"fastify": "3.11.0",
|
||||
"fastify": "3.12.0",
|
||||
"fastify-cors": "5.2.0",
|
||||
"fastify-formbody": "5.0.0",
|
||||
"light-my-request": "4.4.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/platform-socket.io",
|
||||
"version": "7.6.8",
|
||||
"version": "7.6.13",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@platform-socket.io)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -32,6 +32,13 @@ export class WsAdapter extends AbstractWsAdapter {
|
||||
options?: any & { namespace?: string; server?: any },
|
||||
): any {
|
||||
const { server, ...wsOptions } = options;
|
||||
if (wsOptions?.namespace) {
|
||||
const error = new Error(
|
||||
'"WsAdapter" does not support namespaces. If you need namespaces in your project, consider using the "@nestjs/platform-socket.io" package instead.',
|
||||
);
|
||||
this.logger.error(error);
|
||||
throw error;
|
||||
}
|
||||
if (port === 0 && this.httpServer) {
|
||||
return this.bindErrorHandler(
|
||||
new wsPackage.Server({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/platform-ws",
|
||||
"version": "7.6.8",
|
||||
"version": "7.6.13",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@platform-ws)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -18,7 +18,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"tslib": "2.1.0",
|
||||
"ws": "7.4.2"
|
||||
"ws": "7.4.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^7.0.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/testing",
|
||||
"version": "7.6.8",
|
||||
"version": "7.6.13",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@testing)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nestjs/websockets",
|
||||
"version": "7.6.8",
|
||||
"version": "7.6.13",
|
||||
"description": "Nest - modern, fast, powerful node.js web framework (@websockets)",
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
@@ -16,8 +16,8 @@
|
||||
"tslib": "2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8"
|
||||
"@nestjs/common": "7.6.13",
|
||||
"@nestjs/core": "7.6.13"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@nestjs/common": "^7.0.0",
|
||||
|
||||
@@ -46,20 +46,20 @@ export class SocketModule<HttpServer = any> {
|
||||
);
|
||||
const modules = container.getModules();
|
||||
modules.forEach(({ providers }, moduleName: string) =>
|
||||
this.combineAllGateways(providers, moduleName),
|
||||
this.connectAllGateways(providers, moduleName),
|
||||
);
|
||||
}
|
||||
|
||||
public combineAllGateways(
|
||||
public connectAllGateways(
|
||||
providers: Map<string, InstanceWrapper<Injectable>>,
|
||||
moduleName: string,
|
||||
) {
|
||||
iterate(providers.values())
|
||||
.filter(wrapper => wrapper && !wrapper.isNotMetatype)
|
||||
.forEach(wrapper => this.combineGatewayAndServer(wrapper, moduleName));
|
||||
.forEach(wrapper => this.connectGatewayToServer(wrapper, moduleName));
|
||||
}
|
||||
|
||||
public combineGatewayAndServer(
|
||||
public connectGatewayToServer(
|
||||
wrapper: InstanceWrapper<Injectable>,
|
||||
moduleName: string,
|
||||
) {
|
||||
@@ -71,7 +71,7 @@ export class SocketModule<HttpServer = any> {
|
||||
if (!this.isAdapterInitialized) {
|
||||
this.initializeAdapter();
|
||||
}
|
||||
this.webSocketsController.mergeGatewayAndServer(
|
||||
this.webSocketsController.connectGatewayToServer(
|
||||
instance as NestGateway,
|
||||
metatype,
|
||||
moduleName,
|
||||
|
||||
@@ -50,7 +50,7 @@ describe('WebSocketsController', () => {
|
||||
contextCreator as any,
|
||||
);
|
||||
});
|
||||
describe('mergeGatewayAndServer', () => {
|
||||
describe('connectGatewayToServer', () => {
|
||||
let subscribeToServerEvents: sinon.SinonSpy;
|
||||
|
||||
@WebSocketGateway('test' as any)
|
||||
@@ -66,7 +66,7 @@ describe('WebSocketsController', () => {
|
||||
it('should throws "InvalidSocketPortException" when port is not a number', () => {
|
||||
Reflect.defineMetadata(PORT_METADATA, 'test', InvalidGateway);
|
||||
expect(() =>
|
||||
instance.mergeGatewayAndServer(
|
||||
instance.connectGatewayToServer(
|
||||
new InvalidGateway(),
|
||||
InvalidGateway,
|
||||
'',
|
||||
@@ -75,12 +75,12 @@ describe('WebSocketsController', () => {
|
||||
});
|
||||
it('should call "subscribeToServerEvents" with default values when metadata is empty', () => {
|
||||
const gateway = new DefaultGateway();
|
||||
instance.mergeGatewayAndServer(gateway, DefaultGateway, '');
|
||||
instance.connectGatewayToServer(gateway, DefaultGateway, '');
|
||||
expect(subscribeToServerEvents.calledWith(gateway, {}, 0, '')).to.be.true;
|
||||
});
|
||||
it('should call "subscribeToServerEvents" when metadata is valid', () => {
|
||||
const gateway = new Test();
|
||||
instance.mergeGatewayAndServer(gateway, Test, '');
|
||||
instance.connectGatewayToServer(gateway, Test, '');
|
||||
expect(
|
||||
subscribeToServerEvents.calledWith(gateway, { namespace }, port, ''),
|
||||
).to.be.true;
|
||||
@@ -370,4 +370,4 @@ describe('WebSocketsController', () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -28,7 +28,7 @@ export class WebSocketsController {
|
||||
private readonly contextCreator: WsContextCreator,
|
||||
) {}
|
||||
|
||||
public mergeGatewayAndServer(
|
||||
public connectGatewayToServer(
|
||||
instance: NestGateway,
|
||||
metatype: Type<unknown> | Function,
|
||||
moduleKey: string,
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
{
|
||||
"extends": [
|
||||
"config:base"
|
||||
],
|
||||
"labels": ["dependencies"],
|
||||
"packageRules": [
|
||||
{
|
||||
"matchDepTypes": ["devDependencies"],
|
||||
"automerge": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
11711
sample/01-cats-app/package-lock.json
generated
11711
sample/01-cats-app/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,36 +19,36 @@
|
||||
"test:e2e": "jest --config ./e2e/jest-e2e.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"class-transformer": "0.3.2",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"class-transformer": "0.4.0",
|
||||
"class-validator": "0.13.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/jest": "26.0.20",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export interface Cat {
|
||||
readonly name: string;
|
||||
readonly age: number;
|
||||
readonly breed: string;
|
||||
name: string;
|
||||
age: number;
|
||||
breed: string;
|
||||
}
|
||||
|
||||
12137
sample/02-gateways/package-lock.json
generated
12137
sample/02-gateways/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,12 +19,12 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/platform-socket.io": "7.6.8",
|
||||
"@nestjs/websockets": "7.6.8",
|
||||
"class-transformer": "0.3.2",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"@nestjs/platform-socket.io": "7.6.12",
|
||||
"@nestjs/websockets": "7.6.12",
|
||||
"class-transformer": "0.4.0",
|
||||
"class-validator": "0.13.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
@@ -33,26 +33,26 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/socket.io": "2.1.13",
|
||||
"@types/socket.io-redis": "1.0.26",
|
||||
"@types/socket.io-redis": "1.0.27",
|
||||
"@types/ws": "7.4.0",
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
}
|
||||
}
|
||||
|
||||
11742
sample/03-microservices/package-lock.json
generated
11742
sample/03-microservices/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,36 +19,36 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/microservices": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"class-transformer": "0.3.2",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/microservices": "7.6.12",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"class-transformer": "0.4.0",
|
||||
"class-validator": "0.13.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/amqplib": "0.5.17",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
}
|
||||
}
|
||||
|
||||
12062
sample/04-grpc/package-lock.json
generated
12062
sample/04-grpc/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -20,36 +20,36 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@grpc/proto-loader": "0.5.6",
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/microservices": "7.6.8",
|
||||
"class-transformer": "0.3.2",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/microservices": "7.6.12",
|
||||
"class-transformer": "0.4.0",
|
||||
"class-validator": "0.13.1",
|
||||
"grpc": "1.24.4",
|
||||
"grpc": "1.24.5",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"@types/ws": "7.4.0",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
}
|
||||
}
|
||||
|
||||
12738
sample/05-sql-typeorm/package-lock.json
generated
12738
sample/05-sql-typeorm/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,36 +19,36 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"@nestjs/typeorm": "7.1.5",
|
||||
"mysql": "2.18.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3",
|
||||
"typeorm": "0.2.30"
|
||||
"typeorm": "0.2.31"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"@types/ws": "7.4.0",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
}
|
||||
}
|
||||
|
||||
12199
sample/06-mongoose/package-lock.json
generated
12199
sample/06-mongoose/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,36 +19,36 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/mongoose": "7.2.2",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"mongoose": "5.11.14",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/mongoose": "7.2.3",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"mongoose": "5.11.17",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mongoose": "5.10.3",
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"@types/ws": "7.4.0",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
}
|
||||
}
|
||||
|
||||
11959
sample/07-sequelize/package-lock.json
generated
11959
sample/07-sequelize/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,39 +19,39 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"@nestjs/sequelize": "0.2.0",
|
||||
"mysql2": "2.2.5",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3",
|
||||
"sequelize": "6.5.0",
|
||||
"sequelize-typescript": "2.0.0",
|
||||
"typescript": "4.1.3"
|
||||
"sequelize-typescript": "2.1.0",
|
||||
"typescript": "4.1.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/sequelize": "4.28.9",
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"@types/ws": "7.4.0",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
}
|
||||
}
|
||||
|
||||
7706
sample/08-webpack/package-lock.json
generated
7706
sample/08-webpack/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -11,27 +11,27 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.6.3",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@types/node": "14.14.22",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@types/node": "14.14.31",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"start-server-webpack-plugin": "2.2.5",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"webpack": "5.19.0",
|
||||
"webpack-cli": "4.4.0",
|
||||
"webpack": "5.23.0",
|
||||
"webpack-cli": "4.5.0",
|
||||
"webpack-node-externals": "2.5.2"
|
||||
}
|
||||
}
|
||||
|
||||
15416
sample/09-babel-example/package-lock.json
generated
15416
sample/09-babel-example/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -13,24 +13,24 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/microservices": "7.6.8",
|
||||
"@nestjs/websockets": "7.6.8",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"@nestjs/microservices": "7.6.12",
|
||||
"@nestjs/websockets": "7.6.12",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "7.12.10",
|
||||
"@babel/core": "7.12.10",
|
||||
"@babel/node": "7.12.10",
|
||||
"@babel/plugin-proposal-decorators": "7.12.12",
|
||||
"@babel/plugin-transform-runtime": "7.12.10",
|
||||
"@babel/preset-env": "7.12.11",
|
||||
"@babel/register": "7.12.10",
|
||||
"@babel/runtime": "7.12.5",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@babel/cli": "7.12.17",
|
||||
"@babel/core": "7.12.17",
|
||||
"@babel/node": "7.12.17",
|
||||
"@babel/plugin-proposal-decorators": "7.12.13",
|
||||
"@babel/plugin-transform-runtime": "7.12.17",
|
||||
"@babel/preset-env": "7.12.17",
|
||||
"@babel/register": "7.12.13",
|
||||
"@babel/runtime": "7.12.18",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"jest": "26.6.3",
|
||||
"nodemon": "2.0.7",
|
||||
"prettier": "2.2.1",
|
||||
|
||||
11235
sample/10-fastify/package-lock.json
generated
11235
sample/10-fastify/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,35 +19,35 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-fastify": "7.6.8",
|
||||
"class-transformer": "0.3.2",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/platform-fastify": "7.6.12",
|
||||
"class-transformer": "0.4.0",
|
||||
"class-validator": "0.13.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"@types/ws": "7.4.0",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
}
|
||||
}
|
||||
|
||||
11699
sample/11-swagger/package-lock.json
generated
11699
sample/11-swagger/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,11 +19,11 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/swagger": "4.7.12",
|
||||
"class-transformer": "0.3.2",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"@nestjs/swagger": "4.7.13",
|
||||
"class-transformer": "0.4.0",
|
||||
"class-validator": "0.13.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
@@ -31,24 +31,24 @@
|
||||
"swagger-ui-express": "4.1.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
}
|
||||
}
|
||||
|
||||
14441
sample/12-graphql-schema-first/package-lock.json
generated
14441
sample/12-graphql-schema-first/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,39 +19,39 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/graphql": "7.9.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"apollo-server": "2.19.2",
|
||||
"apollo-server-express": "2.19.2",
|
||||
"class-transformer": "0.3.2",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/graphql": "7.9.9",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"apollo-server": "2.21.0",
|
||||
"apollo-server-express": "2.21.0",
|
||||
"class-transformer": "0.4.0",
|
||||
"class-validator": "0.13.1",
|
||||
"graphql": "15.4.0",
|
||||
"graphql-subscriptions": "1.1.0",
|
||||
"graphql": "15.5.0",
|
||||
"graphql-subscriptions": "1.2.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
}
|
||||
}
|
||||
|
||||
12384
sample/13-mongo-typeorm/package-lock.json
generated
12384
sample/13-mongo-typeorm/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,35 +19,35 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"@nestjs/typeorm": "7.1.5",
|
||||
"mongodb": "3.6.3",
|
||||
"mongodb": "3.6.4",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3",
|
||||
"typeorm": "0.2.30"
|
||||
"typeorm": "0.2.31"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
}
|
||||
}
|
||||
|
||||
12117
sample/14-mongoose-base/package-lock.json
generated
12117
sample/14-mongoose-base/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,33 +19,33 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"mongoose": "5.11.14",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"mongoose": "5.11.17",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
}
|
||||
}
|
||||
|
||||
12776
sample/15-mvc/package-lock.json
generated
12776
sample/15-mvc/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,9 +19,9 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"hbs": "4.1.1",
|
||||
"pug": "3.0.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
@@ -29,24 +29,24 @@
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
}
|
||||
}
|
||||
|
||||
11723
sample/16-gateways-ws/package-lock.json
generated
11723
sample/16-gateways-ws/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,38 +19,38 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/platform-ws": "7.6.8",
|
||||
"@nestjs/websockets": "7.6.8",
|
||||
"class-transformer": "0.3.2",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"@nestjs/platform-ws": "7.6.12",
|
||||
"@nestjs/websockets": "7.6.12",
|
||||
"class-transformer": "0.4.0",
|
||||
"class-validator": "0.13.1",
|
||||
"rimraf": "3.0.2",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.6.3",
|
||||
"ws": "7.4.2"
|
||||
"ws": "7.4.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/ws": "7.4.0",
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
}
|
||||
}
|
||||
|
||||
12151
sample/17-mvc-fastify/package-lock.json
generated
12151
sample/17-mvc-fastify/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,38 +19,38 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-fastify": "7.6.8",
|
||||
"fastify-static": "3.4.0",
|
||||
"handlebars": "4.7.6",
|
||||
"point-of-view": "4.11.0",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/platform-fastify": "7.6.12",
|
||||
"fastify-static": "4.0.0",
|
||||
"handlebars": "4.7.7",
|
||||
"point-of-view": "4.13.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/socket.io": "2.1.13",
|
||||
"@types/socket.io-redis": "1.0.26",
|
||||
"@types/socket.io-redis": "1.0.27",
|
||||
"@types/ws": "7.4.0",
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
}
|
||||
}
|
||||
|
||||
10793
sample/18-context/package-lock.json
generated
10793
sample/18-context/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,29 +19,29 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
}
|
||||
}
|
||||
|
||||
11750
sample/19-auth-jwt/package-lock.json
generated
11750
sample/19-auth-jwt/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -20,11 +20,11 @@
|
||||
"test:e2e": "jest --config ./e2e/jest-e2e.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/jwt": "7.2.0",
|
||||
"@nestjs/passport": "7.1.5",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"passport": "0.4.1",
|
||||
"passport-jwt": "4.0.0",
|
||||
"passport-local": "1.0.0",
|
||||
@@ -33,26 +33,26 @@
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/jest": "26.0.20",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
|
||||
@@ -30,3 +30,58 @@ describe('AuthService', () => {
|
||||
expect(service).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe('validateUser', () => {
|
||||
let service: AuthService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const moduleRef: TestingModule = await Test.createTestingModule({
|
||||
imports: [
|
||||
UsersModule,
|
||||
PassportModule,
|
||||
JwtModule.register({
|
||||
secret: jwtConstants.secret,
|
||||
signOptions: { expiresIn: '60s' },
|
||||
}),
|
||||
],
|
||||
providers: [AuthService, LocalStrategy, JwtStrategy],
|
||||
}).compile();
|
||||
|
||||
service = moduleRef.get<AuthService>(AuthService);
|
||||
});
|
||||
|
||||
it('should return a user object when credentials are valid', async () => {
|
||||
const res = await service.validateUser('maria', 'guess');
|
||||
expect(res.userId).toEqual(3);
|
||||
});
|
||||
|
||||
it('should return null when credentials are invalid', async () => {
|
||||
const res = await service.validateUser('xxx', 'xxx');
|
||||
expect(res).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe('validateLogin', () => {
|
||||
let service: AuthService;
|
||||
|
||||
beforeEach(async () => {
|
||||
const moduleRef: TestingModule = await Test.createTestingModule({
|
||||
imports: [
|
||||
UsersModule,
|
||||
PassportModule,
|
||||
JwtModule.register({
|
||||
secret: jwtConstants.secret,
|
||||
signOptions: { expiresIn: '60s' },
|
||||
}),
|
||||
],
|
||||
providers: [AuthService, LocalStrategy, JwtStrategy],
|
||||
}).compile();
|
||||
|
||||
service = moduleRef.get<AuthService>(AuthService);
|
||||
});
|
||||
|
||||
it('should return JWT object when credentials are valid', async () => {
|
||||
const res = await service.login({ username: 'maria', userId: 3 });
|
||||
expect(res.access_token).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
11677
sample/20-cache/package-lock.json
generated
11677
sample/20-cache/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,34 +19,34 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"cache-manager-redis-store": "2.0.0",
|
||||
"class-transformer": "0.3.2",
|
||||
"class-transformer": "0.4.0",
|
||||
"class-validator": "0.13.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
}
|
||||
}
|
||||
|
||||
11573
sample/21-serializer/package-lock.json
generated
11573
sample/21-serializer/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,33 +19,33 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"class-transformer": "0.3.2",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"class-transformer": "0.4.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
}
|
||||
}
|
||||
|
||||
19800
sample/22-graphql-prisma/package-lock.json
generated
19800
sample/22-graphql-prisma/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,37 +19,37 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/graphql": "7.9.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"apollo-server-express": "2.19.2",
|
||||
"graphql": "15.4.0",
|
||||
"graphql-tools": "7.0.2",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/graphql": "7.9.9",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"apollo-server-express": "2.21.0",
|
||||
"graphql": "15.5.0",
|
||||
"graphql-tools": "7.0.4",
|
||||
"prisma-binding": "2.3.16",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
}
|
||||
}
|
||||
|
||||
14572
sample/23-graphql-code-first/package-lock.json
generated
14572
sample/23-graphql-code-first/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,39 +19,39 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/graphql": "7.9.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"apollo-server": "2.19.2",
|
||||
"apollo-server-express": "2.19.2",
|
||||
"class-transformer": "0.3.2",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/graphql": "7.9.9",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"apollo-server": "2.21.0",
|
||||
"apollo-server-express": "2.21.0",
|
||||
"class-transformer": "0.4.0",
|
||||
"class-validator": "0.13.1",
|
||||
"graphql": "15.4.0",
|
||||
"graphql": "15.5.0",
|
||||
"graphql-query-complexity": "0.7.2",
|
||||
"graphql-subscriptions": "1.1.0",
|
||||
"graphql-subscriptions": "1.2.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
}
|
||||
}
|
||||
|
||||
11668
sample/24-serve-static/package-lock.json
generated
11668
sample/24-serve-static/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,35 +19,35 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/serve-static": "2.1.4",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"class-transformer": "0.3.2",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"class-transformer": "0.4.0",
|
||||
"class-validator": "0.13.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
}
|
||||
}
|
||||
|
||||
11576
sample/25-dynamic-modules/package-lock.json
generated
11576
sample/25-dynamic-modules/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,9 +19,9 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"dotenv": "8.2.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
@@ -29,26 +29,26 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/dotenv": "8.2.0",
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/jest": "26.0.20",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
|
||||
12278
sample/26-queues/package-lock.json
generated
12278
sample/26-queues/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -20,38 +20,38 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/bull": "0.3.1",
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"bull": "3.20.0",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"bull": "3.20.1",
|
||||
"dotenv": "8.2.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/bull": "3.15.0",
|
||||
"@types/dotenv": "8.2.0",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/jest": "26.0.20",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
|
||||
11618
sample/27-scheduling/package-lock.json
generated
11618
sample/27-scheduling/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,9 +19,9 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"@nestjs/schedule": "0.4.2",
|
||||
"dotenv": "8.2.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
@@ -29,28 +29,28 @@
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/bull": "3.15.0",
|
||||
"@types/dotenv": "8.2.0",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/jest": "26.0.20",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
|
||||
11515
sample/28-sse/package-lock.json
generated
11515
sample/28-sse/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,35 +19,35 @@
|
||||
"test:e2e": "echo 'No e2e tests implemented yet.'"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/dotenv": "8.2.0",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/jest": "26.0.20",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
|
||||
11721
sample/29-file-upload/package-lock.json
generated
11721
sample/29-file-upload/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -19,37 +19,37 @@
|
||||
"test:e2e": "jest --config ./e2e/jest-e2e.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "7.6.8",
|
||||
"@nestjs/core": "7.6.8",
|
||||
"@nestjs/platform-express": "7.6.8",
|
||||
"class-transformer": "0.3.2",
|
||||
"@nestjs/common": "7.6.12",
|
||||
"@nestjs/core": "7.6.12",
|
||||
"@nestjs/platform-express": "7.6.12",
|
||||
"class-transformer": "0.4.0",
|
||||
"class-validator": "0.13.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rimraf": "3.0.2",
|
||||
"rxjs": "6.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nestjs/cli": "7.5.4",
|
||||
"@nestjs/cli": "7.5.5",
|
||||
"@nestjs/schematics": "7.2.7",
|
||||
"@nestjs/testing": "7.6.8",
|
||||
"@nestjs/testing": "7.6.12",
|
||||
"@types/express": "4.17.11",
|
||||
"@types/jest": "26.0.20",
|
||||
"@types/multer": "1.4.5",
|
||||
"@types/node": "14.14.22",
|
||||
"@types/node": "14.14.31",
|
||||
"@types/supertest": "2.0.10",
|
||||
"jest": "26.6.3",
|
||||
"prettier": "2.2.1",
|
||||
"supertest": "6.1.3",
|
||||
"ts-jest": "26.5.0",
|
||||
"ts-loader": "8.0.14",
|
||||
"ts-jest": "26.5.1",
|
||||
"ts-loader": "8.0.17",
|
||||
"ts-node": "9.1.1",
|
||||
"tsconfig-paths": "3.9.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.14.2",
|
||||
"@typescript-eslint/parser": "4.14.2",
|
||||
"eslint": "7.19.0",
|
||||
"@typescript-eslint/eslint-plugin": "4.15.1",
|
||||
"@typescript-eslint/parser": "4.15.1",
|
||||
"eslint": "7.20.0",
|
||||
"eslint-config-prettier": "7.2.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"typescript": "4.1.3"
|
||||
"typescript": "4.1.5"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
|
||||
25
sample/30-event-emitter/.eslintrc.js
Normal file
25
sample/30-event-emitter/.eslintrc.js
Normal file
@@ -0,0 +1,25 @@
|
||||
module.exports = {
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
project: 'tsconfig.json',
|
||||
sourceType: 'module',
|
||||
},
|
||||
plugins: ['@typescript-eslint/eslint-plugin'],
|
||||
extends: [
|
||||
'plugin:@typescript-eslint/eslint-recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'prettier',
|
||||
'prettier/@typescript-eslint',
|
||||
],
|
||||
root: true,
|
||||
env: {
|
||||
node: true,
|
||||
jest: true,
|
||||
},
|
||||
rules: {
|
||||
'@typescript-eslint/interface-name-prefix': 'off',
|
||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
},
|
||||
};
|
||||
34
sample/30-event-emitter/.gitignore
vendored
Normal file
34
sample/30-event-emitter/.gitignore
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
# compiled output
|
||||
/dist
|
||||
/node_modules
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
|
||||
# OS
|
||||
.DS_Store
|
||||
|
||||
# Tests
|
||||
/coverage
|
||||
/.nyc_output
|
||||
|
||||
# IDEs and editors
|
||||
/.idea
|
||||
.project
|
||||
.classpath
|
||||
.c9/
|
||||
*.launch
|
||||
.settings/
|
||||
*.sublime-workspace
|
||||
|
||||
# IDE - VSCode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user