Compare commits

...

268 Commits

Author SHA1 Message Date
Kamil Myśliwiec
3c1a6a2f97 refactor() add whitespace to gulp config 2019-08-24 19:24:18 +02:00
Kamil Myśliwiec
09ce572d8f refactor(docs) small docs, comments fixes 2019-08-24 19:23:54 +02:00
Kamil Myśliwiec
3671a1b359 Merge branch 'feature/api-docs' of https://github.com/BrunnerLivio/nest into BrunnerLivio-feature/api-docs 2019-08-24 10:50:50 +02:00
Kamil Myśliwiec
e2e27aff62 Merge branch 'master' of https://github.com/nestjs/nest 2019-08-23 22:08:44 +02:00
Kamil Myśliwiec
86a03124db fix(core) fix on app bootstrap typo (hooks) 2019-08-23 21:31:08 +02:00
Kamil Mysliwiec
ba26e3adf6 Merge pull request #2776 from nestjs/renovate/mongoose-5.x
fix(deps): update dependency mongoose to v5.6.10
2019-08-23 21:23:55 +02:00
Kamil Mysliwiec
4d60d51b8d Merge pull request #2774 from nestjs/renovate/grpc-1.x
fix(deps): update dependency grpc to v1.23.3
2019-08-23 21:23:43 +02:00
Kamil Mysliwiec
13ca0cd62e Merge pull request #2769 from nestjs/renovate/express-4.x
chore(deps): update dependency @types/express to v4.17.1
2019-08-23 21:23:32 +02:00
Kamil Mysliwiec
f61f21848a Merge pull request #2803 from nestjs/renovate/ws-6.x
chore(deps): update dependency @types/ws to v6.0.3
2019-08-23 21:23:18 +02:00
Renovate Bot
89ae259bef chore(deps): update dependency @types/ws to v6.0.3 2019-08-23 17:25:13 +00:00
Renovate Bot
f89220eaed fix(deps): update dependency grpc to v1.23.3 2019-08-23 17:20:17 +00:00
Kamil Mysliwiec
a53abc92c6 Merge pull request #2780 from nestjs/renovate/node-8.x
chore(deps): update dependency @types/node to v8.10.52
2019-08-23 17:16:00 +02:00
Renovate Bot
7a2183238b fix(deps): update dependency mongoose to v5.6.10 2019-08-23 15:01:48 +00:00
Renovate Bot
12426621fe chore(deps): update dependency @types/express to v4.17.1 2019-08-23 15:00:53 +00:00
Kamil Mysliwiec
4cd5aef606 Update Readme.md 2019-08-23 16:53:56 +02:00
Kamil Mysliwiec
296e8fe58d Merge pull request #2761 from nestjs/renovate/concurrently-4.x
chore(deps): update dependency concurrently to v4.1.2
2019-08-23 16:49:25 +02:00
Kamil Mysliwiec
f2f825eeca Merge pull request #2763 from nestjs/renovate/lint-staged-9.x
chore(deps): update dependency lint-staged to v9.2.3
2019-08-23 16:48:08 +02:00
Kamil Mysliwiec
b1d5a1bb7d Merge pull request #2773 from nestjs/renovate/uuid-3.x
fix(deps): update dependency uuid to v3.3.3
2019-08-23 16:46:40 +02:00
Kamil Mysliwiec
af152d18a4 Merge pull request #2779 from nestjs/renovate/node-10.x
chore(deps): update dependency @types/node to v10.14.16
2019-08-23 16:46:07 +02:00
Kamil Mysliwiec
851a860c79 Merge pull request #2781 from nestjs/renovate/tslint-5.x
chore(deps): update dependency tslint to v5.19.0
2019-08-23 16:45:31 +02:00
Kamil Mysliwiec
5d243ad231 Merge pull request #2768 from nestjs/renovate/cors-2.x
chore(deps): update dependency @types/cors to v2.8.6
2019-08-23 16:45:21 +02:00
Kamil Mysliwiec
fa1515a3f2 Merge pull request #2765 from nestjs/renovate/type-graphql-0.x
fix(deps): update dependency type-graphql to v0.17.5
2019-08-23 16:45:11 +02:00
Kamil Mysliwiec
bb06006c94 Merge pull request #2764 from nestjs/renovate/webpack-cli-3.x
chore(deps): update dependency webpack-cli to v3.3.7
2019-08-23 16:44:59 +02:00
Kamil Mysliwiec
88ef07e21b Merge pull request #2766 from nestjs/renovate/sequelize-5.x
fix(deps): update dependency sequelize to v5.16.0
2019-08-23 16:44:31 +02:00
Kamil Mysliwiec
9ff5180a81 Merge pull request #2755 from nestjs/renovate/rimraf-3.x
fix(deps): update dependency rimraf to v3
2019-08-23 16:43:59 +02:00
Kamil Mysliwiec
6d6d0f953d Merge pull request #2793 from nestjs/renovate/graphql-14.x
fix(deps): update dependency graphql to v14.5.0
2019-08-23 16:40:54 +02:00
Renovate Bot
cde2d2112a fix(deps): update dependency graphql to v14.5.0 2019-08-22 12:12:06 +00:00
Renovate Bot
e2548f34b5 fix(deps): update dependency sequelize to v5.16.0 2019-08-22 05:07:49 +00:00
Renovate Bot
4b5245d984 chore(deps): update dependency tslint to v5.19.0 2019-08-20 20:04:50 +00:00
Renovate Bot
cb08895ee0 chore(deps): update dependency @types/node to v8.10.52 2019-08-20 20:00:21 +00:00
Renovate Bot
b5729ce521 chore(deps): update dependency @types/node to v10.14.16 2019-08-20 18:46:50 +00:00
Renovate Bot
321337eb8a fix(deps): update dependency uuid to v3.3.3 2019-08-19 13:34:51 +00:00
Renovate Bot
1b59a8e0b4 chore(deps): update dependency @types/cors to v2.8.6 2019-08-19 00:58:56 +00:00
Renovate Bot
0c444c68bb fix(deps): update dependency type-graphql to v0.17.5 2019-08-18 11:13:37 +00:00
Renovate Bot
1d34dbaa2e chore(deps): update dependency webpack-cli to v3.3.7 2019-08-18 05:38:40 +00:00
Renovate Bot
ecf2f18785 chore(deps): update dependency lint-staged to v9.2.3 2019-08-17 17:26:09 +00:00
Renovate Bot
17eb1d989c chore(deps): update dependency concurrently to v4.1.2 2019-08-16 23:59:02 +00:00
Kamil Mysliwiec
baa20004fc Merge pull request #2742 from nestjs/renovate/webpack-4.x
chore(deps): update dependency webpack to v4.39.2
2019-08-16 09:57:57 +02:00
Kamil Mysliwiec
53554b3636 Merge pull request #2758 from nestjs/renovate/jest-monorepo
chore(deps): update dependency jest to v24.9.0
2019-08-16 09:12:19 +02:00
Renovate Bot
d093655da8 fix(deps): update dependency rimraf to v3 2019-08-16 07:06:21 +00:00
Renovate Bot
614a1e5669 chore(deps): update dependency webpack to v4.39.2 2019-08-16 06:55:57 +00:00
Kamil Mysliwiec
ec96ac30ab Merge pull request #2745 from nestjs/renovate/rimraf-2.x
fix(deps): update dependency rimraf to v2.7.1
2019-08-16 08:53:38 +02:00
Kamil Mysliwiec
f8237bde81 Merge pull request #2754 from nestjs/renovate/sequelize-5.x
fix(deps): update dependency sequelize to v5.15.0
2019-08-16 08:53:27 +02:00
Renovate Bot
3bd21ce20d chore(deps): update dependency jest to v24.9.0 2019-08-16 06:49:08 +00:00
Livio
738e00ebb0 lint(core): Remove trailing whitespace 2019-08-15 17:36:03 +02:00
John Biundo
9edd0444e5 feat(common): Add documentation for public API 2019-08-15 17:26:11 +02:00
John Biundo
b840b1974c feat(platform-express): Add documentation for public API 2019-08-15 17:25:27 +02:00
John Biundo
63262c38f6 feat(core): Add documentation for public API 2019-08-15 17:25:27 +02:00
Livio
e76786b1b1 feat(): Add package description files 2019-08-15 17:25:27 +02:00
Livio
68721a2539 feat(): Add ScopeOptions to public API
Mandatory so the public API parser
of docs.nestjs.com can compute this interface
2019-08-15 17:25:27 +02:00
Kamil Mysliwiec
591f7c7f97 Merge pull request #2756 from nestjs/renovate/node-12.x
chore(deps): update dependency @types/node to v12.7.2
2019-08-15 16:47:13 +02:00
Renovate Bot
0c726ded81 fix(deps): update dependency sequelize to v5.15.0 2019-08-15 14:31:02 +00:00
Renovate Bot
e3204d6799 fix(deps): update dependency rimraf to v2.7.1 2019-08-15 14:30:51 +00:00
Renovate Bot
d790dcf5d8 chore(deps): update dependency @types/node to v12.7.2 2019-08-15 14:24:21 +00:00
Kamil Myśliwiec
29596af7f0 ci(): update package-lock file 2019-08-15 16:06:45 +02:00
Livio Brunner
4966ab880e Merge pull request #2750 from rarkins/patch-1
chore(samples): fix docker compose duplicate key
2019-08-15 13:29:45 +02:00
Kamil Myśliwiec
58e25644d1 Merge branch 'master' of https://github.com/nestjs/nest 2019-08-14 15:01:06 +02:00
Kamil Myśliwiec
f55f32de0e ci(): add package-lock file 2019-08-14 15:00:55 +02:00
Rhys Arkins
a42be64668 chore: fix sample docker compose duplicate key 2019-08-14 11:16:31 +02:00
Kamil Mysliwiec
9e1895d5ae Merge pull request #2740 from nestjs/dependabot/npm_and_yarn/sample/01-cats-app/lodash-4.17.15
build(deps): bump lodash from 4.17.11 to 4.17.15 in /sample/01-cats-app
2019-08-13 11:24:00 +02:00
dependabot[bot]
d561e28fa7 build(deps): bump lodash from 4.17.11 to 4.17.15 in /sample/01-cats-app
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.15.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.15)

Signed-off-by: dependabot[bot] <support@github.com>
2019-08-13 09:22:21 +00:00
Kamil Mysliwiec
3ccab0b47e Merge pull request #2686 from nestjs/renovate/node-10.x
chore(deps): update dependency @types/node to v10.14.15
2019-08-13 11:20:54 +02:00
Kamil Mysliwiec
ac21698128 Merge pull request #2739 from nestjs/renovate/pin-dependencies
chore(deps): pin dependency @types/gulp to 4.0.6
2019-08-13 11:16:16 +02:00
Renovate Bot
cc80ce5dfd chore(deps): update dependency @types/node to v10.14.15 2019-08-13 09:16:13 +00:00
Renovate Bot
15a6d8e5fe chore(deps): pin dependency @types/gulp to 4.0.6 2019-08-13 09:15:35 +00:00
Kamil Myśliwiec
14b0769011 Merge branch 'BrunnerLivio-build/gulpfile-to-ts' 2019-08-13 11:14:04 +02:00
Kamil Myśliwiec
98322161fb resolve conflicts 2019-08-13 11:13:41 +02:00
Kamil Mysliwiec
50083ce836 Merge pull request #2696 from nestjs/renovate/chai-as-promised-7.x
chore(deps): update dependency @types/chai-as-promised to v7.1.2
2019-08-13 11:07:38 +02:00
Renovate Bot
b147bc38ad chore(deps): update dependency @types/chai-as-promised to v7.1.2 2019-08-13 09:07:12 +00:00
Kamil Mysliwiec
74c48b6490 Merge pull request #2730 from nestjs/renovate/class-validator-0.x
fix(deps): update dependency class-validator to v0.10.0
2019-08-13 11:06:24 +02:00
Kamil Mysliwiec
64e07ffd95 Merge pull request #2715 from nestjs/renovate/coveralls-3.x
chore(deps): update dependency coveralls to v3.0.6
2019-08-13 11:04:03 +02:00
Renovate Bot
d3df1ce269 fix(deps): update dependency class-validator to v0.10.0 2019-08-13 09:03:41 +00:00
Kamil Mysliwiec
e963ffe07c Merge pull request #2733 from nestjs/renovate/ws-7.x
fix(deps): update dependency ws to v7.1.2
2019-08-13 11:01:46 +02:00
Kamil Mysliwiec
fb81ae054a Merge pull request #2683 from nestjs/renovate/merge-graphql-schemas-1.x
fix(deps): update dependency merge-graphql-schemas to v1.7.0
2019-08-13 10:58:58 +02:00
Renovate Bot
9f9455246b chore(deps): update dependency coveralls to v3.0.6 2019-08-13 08:55:28 +00:00
Kamil Mysliwiec
b7b5f6bf35 Merge pull request #2685 from nestjs/renovate/sequelize-5.x
fix(deps): update dependency sequelize to v5.14.0
2019-08-13 10:53:55 +02:00
Kamil Mysliwiec
81ccfa8a63 Merge pull request #2681 from nestjs/renovate/fastify-2.x
fix(deps): update dependency fastify to v2.7.1
2019-08-13 10:53:44 +02:00
Kamil Mysliwiec
2d527059b5 Merge pull request #2691 from nestjs/renovate/fastify-multipart-1.x
fix(deps): update dependency fastify-multipart to v1.0.2
2019-08-13 10:52:32 +02:00
Kamil Mysliwiec
98bc2da6c0 Merge pull request #2697 from nestjs/renovate/node-12.x
chore(deps): update dependency @types/node to v12.7.1
2019-08-13 10:52:20 +02:00
Kamil Mysliwiec
2ff8a6378f Merge pull request #2699 from nestjs/renovate/mongoose-5.x
fix(deps): update dependency mongoose to v5.6.9
2019-08-13 10:51:20 +02:00
Kamil Mysliwiec
62492813d1 Merge pull request #2706 from nestjs/renovate/ws-6.x
chore(deps): update dependency @types/ws to v6.0.2
2019-08-13 10:50:45 +02:00
Kamil Mysliwiec
8f5adebd00 Merge pull request #2707 from nestjs/renovate/jest-24.x
chore(deps): update dependency @types/jest to v24.0.17
2019-08-13 10:50:34 +02:00
Kamil Mysliwiec
c81a5b19f8 Merge pull request #2709 from nestjs/renovate/sinon-7.x
chore(deps): update dependency sinon to v7.4.1
2019-08-13 10:50:25 +02:00
Kamil Mysliwiec
04681fcba1 Merge pull request #2721 from nestjs/renovate/chai-4.x
chore(deps): update dependency @types/chai to v4.2.0
2019-08-13 10:49:56 +02:00
Kamil Mysliwiec
0771207d78 Merge pull request #2724 from nestjs/renovate/core-js-3.x
chore(deps): update dependency core-js to v3.2.1
2019-08-13 10:49:40 +02:00
Renovate Bot
5667872a52 fix(deps): update dependency sequelize to v5.14.0 2019-08-13 06:44:32 +00:00
Renovate Bot
39c67db000 fix(deps): update dependency ws to v7.1.2 2019-08-12 15:53:48 +00:00
Renovate Bot
10b717300d chore(deps): update dependency core-js to v3.2.1 2019-08-12 12:30:50 +00:00
Renovate Bot
5f63041637 chore(deps): update dependency @types/chai to v4.2.0 2019-08-08 16:16:57 +00:00
Renovate Bot
c41545ad13 fix(deps): update dependency mongoose to v5.6.9 2019-08-07 23:47:44 +00:00
Renovate Bot
39e7845f73 chore(deps): update dependency @types/node to v12.7.1 2019-08-07 21:36:24 +00:00
Livio
06861628eb build(): Refactor Gulpfile to TS 2019-08-07 22:08:01 +02:00
Renovate Bot
ef46fc435a chore(deps): update dependency sinon to v7.4.1 2019-08-06 09:57:40 +00:00
Renovate Bot
dde610bc54 chore(deps): update dependency @types/jest to v24.0.17 2019-08-05 20:19:08 +00:00
Renovate Bot
931c8eec1c chore(deps): update dependency @types/ws to v6.0.2 2019-08-05 18:07:46 +00:00
Livio Brunner
202a572ea4 Merge pull request #2694 from nestjs/renovate/webpack-4.x
chore(deps): update dependency webpack to v4.39.1
2019-08-04 12:33:55 +02:00
Renovate Bot
f7bcb9283a chore(deps): update dependency webpack to v4.39.1 2019-08-02 12:41:54 +00:00
Renovate Bot
ae577d4c5a fix(deps): update dependency fastify-multipart to v1.0.2 2019-08-01 07:58:59 +00:00
Kamil Mysliwiec
65f44cf019 Merge pull request #2684 from nestjs/renovate/apollo-graphql-packages
fix(deps): update dependency apollo-server-express to v2.8.1
2019-07-31 14:25:09 +02:00
Renovate Bot
01da02560f fix(deps): update dependency apollo-server-express to v2.8.1 2019-07-31 12:09:45 +00:00
Kamil Myśliwiec
4b0441e691 Merge branch 'master' of https://github.com/nestjs/nest 2019-07-31 13:55:23 +02:00
Kamil Myśliwiec
33cd414123 tests(): attempt to try flaky unit tests 2019-07-31 13:55:09 +02:00
Renovate Bot
c7a63f37bf fix(deps): update dependency merge-graphql-schemas to v1.7.0 2019-07-31 10:00:42 +00:00
Kamil Mysliwiec
a28a821d73 Merge pull request #2680 from nestjs/renovate/fast-json-stringify-1.x
fix(deps): update dependency fast-json-stringify to v1.15.4
2019-07-31 11:39:40 +02:00
Renovate Bot
d5429a4c58 fix(deps): update dependency fastify to v2.7.1 2019-07-31 08:32:13 +00:00
Renovate Bot
222d7c9f53 fix(deps): update dependency fast-json-stringify to v1.15.4 2019-07-31 07:15:05 +00:00
Kamil Mysliwiec
d5c3b0542a Merge pull request #2668 from nestjs/renovate/amqplib-0.x
fix(deps): update dependency amqplib to v0.5.5
2019-07-30 22:35:30 +02:00
Kamil Mysliwiec
a11098fba6 Merge pull request #2675 from nestjs/renovate/sequelize-5.x
fix(deps): update dependency sequelize to v5.12.1
2019-07-30 22:35:18 +02:00
Renovate Bot
73ae49d10c fix(deps): update dependency sequelize to v5.12.1 2019-07-30 17:07:47 +00:00
Renovate Bot
75e3de119f fix(deps): update dependency amqplib to v0.5.5 2019-07-30 13:35:36 +00:00
Kamil Mysliwiec
692d78056d Merge pull request #2667 from nestjs/renovate/apollo-graphql-packages
fix(deps): update dependency apollo-server-express to v2.8.0
2019-07-30 15:30:20 +02:00
Kamil Mysliwiec
be25bc0e28 Merge pull request #2669 from nestjs/renovate/jest-24.x
chore(deps): update dependency @types/jest to v24.0.16
2019-07-30 15:30:02 +02:00
Kamil Mysliwiec
8d3b2a98c8 Merge pull request #2674 from nestjs/renovate/sequelize-5.x
fix(deps): update dependency sequelize to v5.12.0
2019-07-30 15:29:45 +02:00
Renovate Bot
a0a04a719c fix(deps): update dependency sequelize to v5.12.0 2019-07-30 13:10:28 +00:00
Kamil Myśliwiec
a92b82ef38 fix(core): use hash instead of controller name for metadata cache 2019-07-30 09:20:56 +02:00
Renovate Bot
9c5deef5ec chore(deps): update dependency @types/jest to v24.0.16 2019-07-30 07:12:18 +00:00
Kamil Myśliwiec
2038b45d04 test(): add retries to unit and integration tests 2019-07-30 09:10:13 +02:00
Renovate Bot
27e8ca7c5e fix(deps): update dependency apollo-server-express to v2.8.0 2019-07-29 17:18:37 +00:00
Kamil Myśliwiec
ef01ec7abc Merge branch 'master' of https://github.com/nestjs/nest 2019-07-29 15:13:39 +02:00
Kamil Myśliwiec
b9852f68d0 fix(): strip slash when a wildacrd is used 2019-07-29 15:13:32 +02:00
Kamil Mysliwiec
8ea7de969b Merge pull request #2633 from nestjs/renovate/sequelize-5.x
fix(deps): update dependency sequelize to v5.11.0
2019-07-29 11:11:48 +02:00
Kamil Mysliwiec
ac3537b973 Merge pull request #2656 from nestjs/renovate/apollo-graphql-packages
fix(deps): update dependency apollo-server-express to v2.7.2
2019-07-29 11:11:38 +02:00
Renovate Bot
0b05561201 fix(deps): update dependency sequelize to v5.11.0 2019-07-29 08:17:37 +00:00
Renovate Bot
a873457a3d fix(deps): update dependency apollo-server-express to v2.7.2 2019-07-29 08:17:26 +00:00
Kamil Mysliwiec
62c5ce66f3 Merge pull request #2627 from KonradLinkowski/19-auth-jwt-fix-test-cases
auth jwt sample Fix test cases
2019-07-29 10:16:08 +02:00
Kamil Mysliwiec
5e77c94c81 Update app.controller.spec.ts 2019-07-29 10:15:51 +02:00
Kamil Mysliwiec
72238a1e0d Merge pull request #2629 from nestjs/renovate/mongoose-5.x
fix(deps): update dependency mongoose to v5.6.7
2019-07-29 10:14:31 +02:00
Kamil Mysliwiec
921f542e45 Merge pull request #2652 from nestjs/renovate/webpack-4.x
chore(deps): update dependency webpack to v4.38.0
2019-07-29 10:12:18 +02:00
Kamil Mysliwiec
1e573f6228 Merge pull request #2658 from nestjs/renovate/fastify-2.x
fix(deps): update dependency fastify to v2.7.0
2019-07-29 10:12:07 +02:00
Kamil Mysliwiec
9e0fec0880 Merge pull request #2665 from nestjs/renovate/conventional-changelog-3.x
chore(deps): update dependency conventional-changelog to v3.1.10
2019-07-29 10:11:35 +02:00
Renovate Bot
b3dffe398f chore(deps): update dependency conventional-changelog to v3.1.10 2019-07-29 06:06:43 +00:00
Renovate Bot
521533e81a fix(deps): update dependency fastify to v2.7.0 2019-07-27 10:05:30 +00:00
Renovate Bot
305fb4a464 fix(deps): update dependency mongoose to v5.6.7 2019-07-26 19:32:37 +00:00
Renovate Bot
547dcf810f chore(deps): update dependency webpack to v4.38.0 2019-07-26 07:46:44 +00:00
Livio Brunner
54d94f8e3e chore(deps): pin dependency promise.series to 0.2.0 (#2646)
chore(deps): pin dependency promise.series to 0.2.0
2019-07-25 14:04:02 +02:00
Renovate Bot
ced03a041d chore(deps): pin dependency promise.series to 0.2.0 2019-07-25 11:27:01 +00:00
Kamil Mysliwiec
05efc140db Merge pull request #2635 from BrunnerLivio/build/sample-log-message
ci(): Try to fix flaky CI tests
2019-07-25 13:22:16 +02:00
Kamil Mysliwiec
f1f1ecc66b Merge pull request #2645 from nestjs/renovate/pin-dependencies
fix(deps): pin dependencies
2019-07-25 13:21:41 +02:00
Renovate Bot
6bb2765d2f fix(deps): pin dependencies 2019-07-25 11:11:30 +00:00
Kamil Mysliwiec
3b982aab48 Merge pull request #2641 from nestjs/renovate/lint-staged-9.x
chore(deps): update dependency lint-staged to v9.2.1
2019-07-25 13:08:36 +02:00
Kamil Mysliwiec
3dda0a9cb5 Merge pull request #2644 from nestjs/renovate/apollo-graphql-packages
fix(deps): update dependency apollo-server-express to v2.7.1
2019-07-25 13:08:26 +02:00
Kamil Mysliwiec
75cbb373be Merge pull request #2611 from beeman/beeman/serve-static-sample
docs(sample): add sample for @nestjs/serve-static
2019-07-25 13:08:04 +02:00
Renovate Bot
8f7b56e9d5 fix(deps): update dependency apollo-server-express to v2.7.1 2019-07-25 10:55:40 +00:00
Renovate Bot
186976f950 chore(deps): update dependency lint-staged to v9.2.1 2019-07-25 05:06:25 +00:00
Kamil Mysliwiec
e9dae8a1a8 Merge pull request #2631 from nestjs/renovate/docker-mysql-5.x
chore(deps): update mysql docker tag to v5.7.27
2019-07-24 22:22:50 +02:00
Kamil Mysliwiec
84a37fec81 Merge pull request #2634 from nestjs/renovate/webpack-4.x
chore(deps): update dependency webpack to v4.37.0
2019-07-24 22:21:46 +02:00
Livio
17e9e4acc7 ci(): Remove firefox addon 2019-07-24 18:33:31 +02:00
Livio
0c4efab305 test(): Change timeout of concurrent MQTT test 2019-07-24 18:33:27 +02:00
Livio
97bc3c66bc build(): Add log message once a sample has been installed 2019-07-24 18:03:59 +02:00
Renovate Bot
b501fd6e7f chore(deps): update dependency webpack to v4.37.0 2019-07-23 09:39:47 +00:00
Kamil Mysliwiec
8dbb01c398 Merge pull request #2628 from nestjs/renovate/sequelize-4.x
chore(deps): update dependency @types/sequelize to v4.28.4
2019-07-23 08:32:11 +02:00
Kamil Mysliwiec
ed6448ac23 Merge pull request #2630 from johnbiundo/fix-contributing-page
docs(CONTRIBUTING.md): fix links, clarify format
2019-07-23 08:12:04 +02:00
Renovate Bot
c9cf78d421 chore(deps): update mysql docker tag to v5.7.27 2019-07-22 23:06:15 +00:00
John Biundo
88cb1495d3 docs(CONTRIBUTING.md) fix links
- add discord
- remove gitter
- remove dead link to DEVELOPER.md
- fix description of format
2019-07-22 13:29:48 -07:00
Renovate Bot
69c0357f22 chore(deps): update dependency @types/sequelize to v4.28.4 2019-07-22 18:12:12 +00:00
Konrad Linkowski
a665aa8f74 auth jwt sample Fix test cases 2019-07-22 19:17:23 +02:00
John Biundo
25db843b7f Merge branch 'master' of https://github.com/nestjs/nest 2019-07-22 09:37:08 -07:00
Kamil Mysliwiec
a0a51302ed Merge pull request #2617 from nestjs/renovate/mongoose-5.x
chore(deps): update dependency @types/mongoose to v5.5.9
2019-07-22 08:19:27 +02:00
Kamil Mysliwiec
b3edf20a2d Merge pull request #2616 from nestjs/renovate/ws-7.x
fix(deps): update dependency ws to v7.1.1
2019-07-22 08:19:15 +02:00
Kamil Mysliwiec
855dc056b8 Merge pull request #2621 from nestjs/renovate/merge-graphql-schemas-1.x
fix(deps): update dependency merge-graphql-schemas to v1.6.1
2019-07-22 08:19:00 +02:00
Renovate Bot
5287c51779 fix(deps): update dependency merge-graphql-schemas to v1.6.1 2019-07-21 16:44:38 +00:00
John Biundo
c5e54bf509 Merge pull request #3 from nestjs/master
merge upstream
2019-07-20 08:25:15 -07:00
Renovate Bot
f288c2bfe3 chore(deps): update dependency @types/mongoose to v5.5.9 2019-07-19 17:24:35 +00:00
Renovate Bot
c568d9d3b4 fix(deps): update dependency ws to v7.1.1 2019-07-19 14:52:46 +00:00
Bram Borggreve
7cf343449b docs(sample): add sample for @nestjs/serve-static 2019-07-18 14:50:19 +02:00
Kamil Mysliwiec
a15380864f Merge pull request #2610 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo to v6.5.3
2019-07-18 11:07:21 +02:00
Renovate Bot
e29fb08d45 fix(deps): update nest monorepo to v6.5.3 2019-07-18 09:00:51 +00:00
Kamil Myśliwiec
2b2d5782b8 chore(@nestjs) publish v6.5.3 release 2019-07-18 10:52:37 +02:00
Kamil Myśliwiec
c6890e59e6 chore(): publish 6.5.3 release 2019-07-18 10:51:14 +02:00
Kamil Mysliwiec
2b2c78a46b Merge pull request #2548 from williamdclt/patch-1
bugfix(common): export AnyFilesInterceptor
2019-07-18 10:50:36 +02:00
Kamil Mysliwiec
623555d018 Merge pull request #2607 from nestjs/renovate/ts-morph-3.x
fix(deps): update dependency ts-morph to v3.1.3
2019-07-18 10:50:15 +02:00
Kamil Myśliwiec
72ca19b973 perf(): improve pipes performance (reduce overhead) 2019-07-18 10:49:56 +02:00
Renovate Bot
00adefad42 fix(deps): update dependency ts-morph to v3.1.3 2019-07-18 08:45:10 +00:00
Kamil Myśliwiec
4585670b96 Merge branch 'master' of https://github.com/nestjs/nest 2019-07-18 08:30:24 +02:00
Kamil Myśliwiec
0dcd010bc9 tests(): fix unit test, disable redis integration test 2019-07-18 08:30:07 +02:00
Kamil Mysliwiec
865b0317fa Merge pull request #2606 from nestjs/renovate/nestjs-graphql-6.x
fix(deps): update dependency @nestjs/graphql to v6.4.2
2019-07-17 23:06:38 +02:00
Renovate Bot
ad549e7846 fix(deps): update dependency @nestjs/graphql to v6.4.2 2019-07-17 21:04:17 +00:00
Kamil Mysliwiec
694360cdbd Merge pull request #2573 from nestjs/renovate/webpack-cli-3.x
chore(deps): update dependency webpack-cli to v3.3.6
2019-07-17 22:38:14 +02:00
Kamil Mysliwiec
8838e814fb Merge pull request #2592 from nestjs/renovate/nestjs-graphql-6.x
fix(deps): update dependency @nestjs/graphql to v6.4.1
2019-07-17 22:37:58 +02:00
Renovate Bot
16b3fb7e1c fix(deps): update dependency @nestjs/graphql to v6.4.1 2019-07-17 20:19:46 +00:00
Renovate Bot
3aa52d43c4 chore(deps): update dependency webpack-cli to v3.3.6 2019-07-17 20:18:56 +00:00
Kamil Mysliwiec
7e964b973e Merge pull request #2590 from nestjs/renovate/ts-morph-3.x
fix(deps): update dependency ts-morph to v3.1.2
2019-07-17 22:18:15 +02:00
Kamil Mysliwiec
842d2617c7 Merge pull request #2598 from nestjs/renovate/webpack-4.x
chore(deps): update dependency webpack to v4.36.1
2019-07-17 22:16:50 +02:00
Kamil Mysliwiec
1985ebb52c Merge pull request #2602 from nestjs/renovate/node-10.x
chore(deps): update dependency @types/node to v10.14.13
2019-07-17 22:16:37 +02:00
Kamil Mysliwiec
38d56c2c50 Merge pull request #2603 from nestjs/renovate/node-7.x
chore(deps): update dependency @types/node to v7.10.7
2019-07-17 22:16:26 +02:00
Kamil Mysliwiec
d3a1c3ff7e Merge pull request #2605 from nestjs/renovate/apollo-graphql-packages
fix(deps): update dependency apollo-server-express to v2.7.0
2019-07-17 22:15:54 +02:00
Kamil Mysliwiec
9cef5fa108 Merge pull request #2604 from nestjs/renovate/node-8.x
chore(deps): update dependency @types/node to v8.10.51
2019-07-17 22:15:45 +02:00
Renovate Bot
fa57cca223 fix(deps): update dependency ts-morph to v3.1.2 2019-07-17 20:11:18 +00:00
Renovate Bot
eff133265e fix(deps): update dependency apollo-server-express to v2.7.0 2019-07-17 20:09:11 +00:00
Renovate Bot
a0803904be chore(deps): update dependency webpack to v4.36.1 2019-07-17 20:05:03 +00:00
Renovate Bot
e69d709f59 chore(deps): update dependency @types/node to v8.10.51 2019-07-17 20:04:12 +00:00
Renovate Bot
9db1c013ff chore(deps): update dependency @types/node to v7.10.7 2019-07-17 20:03:46 +00:00
Renovate Bot
a5ebf54618 chore(deps): update dependency @types/node to v10.14.13 2019-07-17 20:02:48 +00:00
Kamil Myśliwiec
fc6b35fe13 resolve conflicts 2019-07-17 22:01:09 +02:00
Kamil Myśliwiec
d613799453 test(): increase the timeout for redis integration test 2019-07-17 21:58:42 +02:00
Kamil Mysliwiec
0d29b63c07 Merge pull request #2600 from nestjs/renovate/mongoose-5.x
fix(deps): update dependency mongoose to v5.6.5
2019-07-17 21:53:05 +02:00
Kamil Mysliwiec
54a2890946 Merge pull request #2588 from nestjs/renovate/node-12.x
chore(deps): update dependency @types/node to v12.6.8
2019-07-17 21:51:02 +02:00
Kamil Mysliwiec
404e2a4fb1 Merge pull request #2577 from nestjs/renovate/sequelize-5.x
fix(deps): update dependency sequelize to v5.10.1
2019-07-17 21:50:15 +02:00
Kamil Mysliwiec
6195174748 Merge pull request #2593 from nestjs/renovate/multer-1.x
fix(deps): update dependency multer to v1.4.2
2019-07-17 21:49:59 +02:00
Renovate Bot
3e121891dd chore(deps): update dependency @types/node to v12.6.8 2019-07-17 19:26:30 +00:00
Renovate Bot
4fceae6bec fix(deps): update dependency mongoose to v5.6.5 2019-07-17 17:13:29 +00:00
Renovate Bot
370d0f76af fix(deps): update dependency multer to v1.4.2 2019-07-16 10:20:44 +00:00
Kamil Mysliwiec
fc99ccdb30 Merge pull request #2583 from nestjs/renovate/nestjs-swagger-3.x
fix(deps): update dependency @nestjs/swagger to v3.1.0
2019-07-15 10:57:44 +02:00
Renovate Bot
c94322d094 fix(deps): update dependency @nestjs/swagger to v3.1.0 2019-07-15 08:33:30 +00:00
Renovate Bot
dd19f15b89 fix(deps): update dependency sequelize to v5.10.1 2019-07-14 17:51:09 +00:00
Kamil Mysliwiec
bfe182d965 Merge pull request #2564 from nestjs/renovate/nestjs-graphql-6.x
fix(deps): update dependency @nestjs/graphql to v6.4.0
2019-07-14 19:36:26 +02:00
Kamil Mysliwiec
8ed4cce9f7 Merge pull request #2574 from nestjs/renovate/nestjs-typeorm-6.x
fix(deps): update dependency @nestjs/typeorm to v6.1.3
2019-07-14 19:36:17 +02:00
Renovate Bot
0db528e2aa fix(deps): update dependency @nestjs/typeorm to v6.1.3 2019-07-14 13:57:57 +00:00
Renovate Bot
32a8f90c71 fix(deps): update dependency @nestjs/graphql to v6.4.0 2019-07-14 10:30:43 +00:00
Kamil Mysliwiec
c0f70fd769 Merge pull request #2568 from nestjs/renovate/ts-morph-3.x
fix(deps): update dependency ts-morph to v3.1.1
2019-07-14 09:33:30 +02:00
Renovate Bot
d5b2bee830 fix(deps): update dependency ts-morph to v3.1.1 2019-07-13 18:45:47 +00:00
Kamil Mysliwiec
525e642286 Merge pull request #2561 from nestjs/renovate/supertest-4.x
chore(deps): update dependency supertest to v4
2019-07-12 10:22:53 +02:00
Kamil Mysliwiec
9df178f12a Merge pull request #2556 from nestjs/renovate/typescript-3.x
chore(deps): update dependency typescript to v3.5.3
2019-07-12 10:19:05 +02:00
Renovate Bot
8660043776 chore(deps): update dependency supertest to v4 2019-07-12 08:13:30 +00:00
Renovate Bot
6ff7a7f266 chore(deps): update dependency typescript to v3.5.3 2019-07-12 08:13:18 +00:00
Kamil Mysliwiec
7eafc150f0 Merge pull request #2558 from nestjs/renovate/cache-manager-2.x
fix(deps): update dependency cache-manager to v2.10.0
2019-07-12 10:12:14 +02:00
Kamil Mysliwiec
9eef47c4bf Merge pull request #2559 from nestjs/renovate/coveralls-3.x
chore(deps): update dependency coveralls to v3.0.5
2019-07-12 10:12:05 +02:00
Kamil Mysliwiec
51987bb43b Merge pull request #2555 from nestjs/renovate/pin-dependencies
fix(deps): pin dependencies
2019-07-12 10:11:44 +02:00
Renovate Bot
fdfe0ed02e chore(deps): update dependency coveralls to v3.0.5 2019-07-12 02:31:38 +00:00
Renovate Bot
c06bbbed97 fix(deps): update dependency cache-manager to v2.10.0 2019-07-11 22:15:07 +00:00
Renovate Bot
e834118914 fix(deps): pin dependencies 2019-07-11 21:38:53 +00:00
Kamil Myśliwiec
ef199730c1 build(): fix samples 2019-07-11 23:02:44 +02:00
Kamil Myśliwiec
6980da363b sample(): remove old auth sample 2019-07-11 22:41:22 +02:00
Kamil Mysliwiec
f899064410 Merge pull request #2417 from johnbiundo/auth-example
sample(auth): matches new auth chapter
2019-07-11 22:39:37 +02:00
Kamil Mysliwiec
7a50e50dbf Update users.service.ts 2019-07-11 22:39:15 +02:00
Kamil Mysliwiec
7c8f9d901c Update app.controller.ts 2019-07-11 22:38:28 +02:00
Kamil Mysliwiec
9a8de91bb9 Merge pull request #2554 from nestjs/renovate/apollo-server-monorepo
fix(deps): update dependency apollo-server-express to v2.6.9
2019-07-11 22:11:49 +02:00
Kamil Mysliwiec
6c22219605 Merge pull request #2552 from ArrivalDistributionPlatform/close-fix-missing-await
bugfix(core): fix missing await in NestApplication.close()
2019-07-11 22:05:55 +02:00
Renovate Bot
6a031f0d63 fix(deps): update dependency apollo-server-express to v2.6.9 2019-07-11 18:36:01 +00:00
weekens
d5f86c5ba4 bugfix(core): fix missing await in NestApplication.close()
NestApplication.close() was not always closing the port after promise resolve, because of the missing `await` in implementation. This commit fixes the problem.
2019-07-11 17:23:24 +03:00
Kamil Mysliwiec
b55367646c Merge pull request #2550 from nestjs/renovate/sequelize-5.x
fix(deps): update dependency sequelize to v5.10.0
2019-07-11 14:41:11 +02:00
Kamil Mysliwiec
b7986bcaf0 Merge pull request #2543 from nestjs/renovate/grpc-1.x
fix(deps): update dependency grpc to v1.22.2
2019-07-11 14:21:18 +02:00
Renovate Bot
94781480ed fix(deps): update dependency sequelize to v5.10.0 2019-07-11 11:36:48 +00:00
Renovate Bot
aa1d192b6a fix(deps): update dependency grpc to v1.22.2 2019-07-11 11:36:38 +00:00
Kamil Mysliwiec
4bc15d483c Merge pull request #2541 from nestjs/renovate/nestjs-graphql-6.x
fix(deps): update dependency @nestjs/graphql to v6.2.5
2019-07-11 13:32:10 +02:00
Kamil Mysliwiec
1b84dda4de Merge pull request #2542 from nestjs/renovate/lint-staged-9.x
chore(deps): update dependency lint-staged to v9.2.0
2019-07-11 13:32:02 +02:00
Kamil Mysliwiec
db5bbece3a Merge pull request #2545 from nestjs/renovate/pin-dependencies
chore(deps): pin dependency fancy-log to 1.3.3
2019-07-11 13:31:53 +02:00
Kamil Mysliwiec
9fd16f7478 Merge pull request #2547 from nestjs/renovate/node-12.x
chore(deps): update dependency @types/node to v12.6.2
2019-07-11 13:31:45 +02:00
Kamil Mysliwiec
a0fd983ce1 Update Readme.md 2019-07-11 13:31:14 +02:00
Kamil Mysliwiec
445717cf15 Update Readme.md 2019-07-11 13:30:59 +02:00
Kamil Mysliwiec
f92892423f Update Readme.md 2019-07-11 13:30:02 +02:00
Kamil Mysliwiec
9830b0071c Update Readme.md 2019-07-11 13:29:35 +02:00
Duclot William
f582625bcf Platform-express: export AnyFilesInterceptor
This interceptor is referenced in the doc, it should be exported properly
2019-07-10 22:58:08 +01:00
Renovate Bot
e0d2209a06 chore(deps): update dependency @types/node to v12.6.2 2019-07-10 21:38:53 +00:00
Renovate Bot
b89133c2e7 chore(deps): pin dependency fancy-log to 1.3.3 2019-07-10 19:50:44 +00:00
Kamil Mysliwiec
6bbfd7b54f Merge pull request #2527 from BrunnerLivio/ci/build-samples
ci(): build samples in pipeline
2019-07-10 18:56:51 +02:00
Renovate Bot
5ed1edf262 chore(deps): update dependency lint-staged to v9.2.0 2019-07-10 16:32:28 +00:00
Livio
64e69cd2b5 ci(): Build samples with TravisCI 2019-07-10 17:59:39 +02:00
Livio
aabe0295c6 sample(): Fix samples build processes 2019-07-10 17:59:31 +02:00
Livio
6a6c62d430 build(): Add build:samples script 2019-07-10 15:51:33 +02:00
Renovate Bot
fded926042 fix(deps): update dependency @nestjs/graphql to v6.2.5 2019-07-10 10:44:59 +00:00
Kamil Mysliwiec
fc3dd675fa Merge pull request #2539 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo to v6.5.2
2019-07-10 12:30:14 +02:00
Renovate Bot
744a070658 fix(deps): update nest monorepo to v6.5.2 2019-07-10 09:54:52 +00:00
Kamil Myśliwiec
ef4ab89b0d chore(@nestjs) publish v6.5.2 release 2019-07-10 11:43:48 +02:00
Kamil Myśliwiec
3774fed640 bugfix(microservices): fix pattern regression 2019-07-10 11:42:18 +02:00
Kamil Myśliwiec
6ff7859976 chore(): publish 6.5.1 release 2019-07-10 09:37:15 +02:00
Kamil Myśliwiec
8718f4763e chore(@nestjs) publish v6.5.1 release 2019-07-10 09:35:51 +02:00
Kamil Myśliwiec
4cbebed909 Merge branch 'master' of https://github.com/nestjs/nest 2019-07-10 09:33:24 +02:00
Kamil Myśliwiec
b1388b136c fix(microservices): remove event emitter reference 2019-07-10 09:33:13 +02:00
Kamil Mysliwiec
499c94792a Merge pull request #2533 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo to v6.5.0
2019-07-10 08:40:13 +02:00
Renovate Bot
c93d7e4ab0 fix(deps): update nest monorepo to v6.5.0 2019-07-10 06:05:44 +00:00
Kamil Mysliwiec
2ec291cf4c Merge pull request #2537 from nestjs/renovate/mongoose-5.x
chore(deps): update dependency @types/mongoose to v5.5.8
2019-07-10 07:58:49 +02:00
Kamil Mysliwiec
e25e3c1e92 Merge pull request #2538 from nestjs/renovate/apollo-server-monorepo
fix(deps): update dependency apollo-server-express to v2.6.8
2019-07-10 07:58:39 +02:00
Renovate Bot
2655d19aa5 fix(deps): update dependency apollo-server-express to v2.6.8 2019-07-09 22:40:42 +00:00
Renovate Bot
da45d58982 chore(deps): update dependency @types/mongoose to v5.5.8 2019-07-09 20:06:07 +00:00
John Biundo
2bd0535cf8 Merge pull request #2 from nestjs/master
merge upstream
2019-06-28 09:22:18 -07:00
John Biundo
4a7bb39c94 sample(new auth sample): matches new auth chapter 2019-06-19 12:26:20 -07:00
John Biundo
fb7f79383d Merge pull request #1 from nestjs/master
merge upstream
2019-06-19 12:08:57 -07:00
202 changed files with 7302 additions and 6926 deletions

View File

@@ -7,13 +7,6 @@ cache:
git:
depth: 5
addons:
firefox: "latest"
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
before_install:
- npm i -g npm@latest
@@ -56,3 +49,8 @@ jobs:
script: npm run lint
node_js: 12
- stage: "Test"
name: "Build samples"
script: npm run build:samples
node_js: 12

7
CONTRIBUTING.md Normal file → Executable file
View File

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

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

@@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@nestjs/common": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.4.1.tgz",
"integrity": "sha512-qgex1F+ag5/8rxgsBHyXjNIyNJhNGjB1UHcFhMjGYxbfaz/5TSiv5A07IN2ZkCyNPRe35YPEvM5tJjTDul6FIg==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
"requires": {
"axios": "0.19.0",
"cli-color": "1.4.0",
@@ -15,9 +15,9 @@
}
},
"@nestjs/core": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.4.1.tgz",
"integrity": "sha512-g11VtXwXtTO9i1o+is5JNhUsiUa/tNqmtW2GWxXZcmjxNbCLOOjkLd2FHsyCLpBnl7OVkYDqwL9Fcl9ydgQa3Q==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
"requires": {
"@nuxtjs/opencollective": "0.2.2",
"fast-safe-stringify": "2.0.6",
@@ -28,9 +28,9 @@
}
},
"@nestjs/microservices": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.4.1.tgz",
"integrity": "sha512-8LP+5aYbt56NzWZstGiWRI6Xpi8QSCkzoBo0l0RKWpsL33bDRngTK7SfBVR4YfjE2N2FyPYWUY5t8S+0BUS1lg==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.5.3.tgz",
"integrity": "sha512-T9zZf61myahenI4c0qhcYnhnx49L+zL9+8W6fc+LPTarbt1HJDu6iyj6fh2BzewakwNLJRyGMJ9YCYlXhFuvlA==",
"requires": {
"iterare": "1.2.0",
"json-socket": "0.3.0",
@@ -38,17 +38,17 @@
}
},
"@nestjs/testing": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.4.1.tgz",
"integrity": "sha512-TQxTGnlKRUwL081ZvQpcwthsZMcOBlH2hGq/lN+DSPCgraqx7puRyIdi4Z70zjjAKwfZ7KUYjK0/wOYd8XhsrQ==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.5.3.tgz",
"integrity": "sha512-W8tPhkNVhmX+jaDu4R7WUOtIl0PK3ZDso434rEm/b1+S6ZRgAKwNVHWM/rwIuTi5+erPTEULtTsZgrXFrzC1sA==",
"requires": {
"optional": "0.1.4"
}
},
"@nestjs/websockets": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.4.1.tgz",
"integrity": "sha512-pj2itFnL2LN9HUL29YpHREHIBRisTd0U7n5FjTeKGElXyxPRX+aEa95EsQRqYAq0wKIu9EDa5rP/drGKLFah3w==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.5.3.tgz",
"integrity": "sha512-YrCvmLHTW0OBusTiUOPrG0PNrw/3Gatty/bh3ro5cEoiovcaJxGSMsTC+JSVXqPwRJjEtoHMCr5Qje2rAepIzQ==",
"requires": {
"iterare": "1.2.0"
}
@@ -64,20 +64,25 @@
}
},
"@types/node": {
"version": "7.10.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.6.tgz",
"integrity": "sha512-d0BOAicT0tEdbdVQlLGOVul1kvg6YvbaADRCThGCz5NJ0e9r00SofcR1x69hmlCyrHuB6jd4cKzL9bMLjPnpAA==",
"version": "7.10.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.7.tgz",
"integrity": "sha512-4I7+hXKyq7e1deuzX9udu0hPIYqSSkdKXtjow6fMnQ3OR9qkxIErGHbGY08YrfZJrCS1ajK8lOuzd0k3n2WM4A==",
"dev": true
},
"@types/validator": {
"version": "10.11.2",
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.2.tgz",
"integrity": "sha512-k/ju1RsdP5ACFUWebqsyEy0avP5uNJCs2p3pmTHzOZdd4gMSAJTq7iUEHFY3tt3emBrPTm6oGvfZ4SzcqOgLPQ=="
},
"abstract-logging": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/abstract-logging/-/abstract-logging-1.0.0.tgz",
"integrity": "sha1-i33q/TEFWbwo93ck3RuzAXcnjBs="
},
"ajv": {
"version": "6.10.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz",
"integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==",
"version": "6.10.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz",
"integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==",
"requires": {
"fast-deep-equal": "^2.0.1",
"fast-json-stable-stringify": "^2.0.0",
@@ -171,12 +176,13 @@
"integrity": "sha512-qsP+0xoavpOlJHuYsQJsN58HXSl8Jvveo+T37rEvCEeRfMWoytAyR0Ua/YsFgpM6AZYZ/og2PJwArwzJl1aXtQ=="
},
"class-validator": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.9.1.tgz",
"integrity": "sha512-3wApflrd3ywVZyx4jaasGoFt8pmo4aGLPPAEKCKCsTRWVGPilahD88q3jQjRQwja50rl9a7rsP5LAxJYwGK8/Q==",
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.0.tgz",
"integrity": "sha512-RvjxRlvoCvM/ojUq11j78ISpReGdBoMErdmDk1e27aQZK6ppSXq751UE6jB9JI7ayEnL6Nnmllzn/HXVSu3dmg==",
"requires": {
"@types/validator": "10.11.2",
"google-libphonenumber": "^3.1.6",
"validator": "10.4.0"
"validator": "11.1.0"
}
},
"cli-color": {
@@ -255,9 +261,9 @@
}
},
"deepmerge": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-3.3.0.tgz",
"integrity": "sha512-GRQOafGHwMHpjPx9iCvTgpu9NojZ49q794EEL94JVEw6VaeA8XTUyBKvAkOOjBX9oJNiV6G3P+T+tihFjo2TqA=="
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.0.0.tgz",
"integrity": "sha512-YZ1rOP5+kHor4hMAH+HRQnBQHg+wvS1un1hAOuIcxcBy0hzcUf6Jg2a1w65kpoOUnurOfZbERwjI1TfZxNjcww=="
},
"delayed-stream": {
"version": "1.0.0",
@@ -347,12 +353,12 @@
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
},
"fast-json-stringify": {
"version": "1.15.3",
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.15.3.tgz",
"integrity": "sha512-p+ucnySTbrUQ9M7u8ygFIxrmpG8B+8O4/PvLDdh+RqMMgj/h6OoDb7U2lP+kqg3PDclQBFbSIArRhkorFwZLLg==",
"version": "1.15.4",
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.15.4.tgz",
"integrity": "sha512-lsGTxL0OIGjGSUXgWUOdSgjCL/xMyMvMudfGN3D1zOLEv44fYZ1ZXmMyCON5XdpaiZN6nCXmU7GQg7fbXfPG4g==",
"requires": {
"ajv": "^6.8.1",
"deepmerge": "^3.0.0"
"deepmerge": "^4.0.0"
}
},
"fast-redact": {
@@ -366,19 +372,19 @@
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
},
"fastify": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.6.0.tgz",
"integrity": "sha512-3GxGV2P8731o2S5T6ng5NMJ9S7vFpZA4mk2mJEbMbhQ5aj1HhNGBOe39TYa2gWRrJVJuXxYYYIlY/5cFhiHpNg==",
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.7.1.tgz",
"integrity": "sha512-ScKPXD84lkdCgz7q0zjyBr1aLxKbXRt9HYL3XIt/L8ZD2f3fAcsLEyQ2/rHxLUzLGjPlEjIvprWUL3RZvlLRLw==",
"requires": {
"abstract-logging": "^1.0.0",
"ajv": "^6.9.2",
"ajv": "^6.10.2",
"avvio": "^6.1.1",
"fast-json-stringify": "^1.15.0",
"find-my-way": "^2.0.0",
"flatstr": "^1.0.12",
"light-my-request": "^3.2.0",
"light-my-request": "^3.4.1",
"middie": "^4.0.1",
"pino": "^5.11.1",
"pino": "^5.13.1",
"proxy-addr": "^2.0.4",
"readable-stream": "^3.1.1",
"rfdc": "^1.1.2",
@@ -440,9 +446,9 @@
"integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
},
"google-libphonenumber": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.2.tgz",
"integrity": "sha512-ubjGeosYPeusjYbUHy76lCniGTTI0k1rIFc+uKBX+jHQLDmWOSUtlFUxaeoLJ+Y+PAMM6dWp+C1HjHx5BI8kEw=="
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.3.tgz",
"integrity": "sha512-8n4JyRptifaIRlHANKRlfqLR8fANm7+Q+1qvDuUsUeStSLtLGTVsZWe1llWDfgWTm1y07cEUyiRuNIv6cs2ovg=="
},
"has-flag": {
"version": "3.0.0",
@@ -485,9 +491,9 @@
"integrity": "sha512-jc8ZbUnYIWdxERFWQKVgwSLkGSe+kyzvmYxwNaRgx/c8NNyuHes4UHnPM3LUrAFXUx1BhNJ94n1h/KCRlbvV0g=="
},
"light-my-request": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-3.4.0.tgz",
"integrity": "sha512-zIEl4lKwATE5uPmxEZkVIIAr/JGrHEngf9MDZ7a1TodLZ93kROYkKkoqSCmQIJ01FXrzyYMnmtemBO/b1HFt0Q==",
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-3.4.1.tgz",
"integrity": "sha512-E1zMvRWjqsaCS60dTkD7c//xKV1KOFD2zo92Ru3o3e95lCfQSDCC9aS8MZm1V+zXaA/SeKDwK9gvrfaCseTusg==",
"requires": {
"ajv": "^6.8.1",
"readable-stream": "^3.1.1"
@@ -589,16 +595,16 @@
"integrity": "sha512-ZOtfhPttCrqp2M1PBBH4X13XlvnfhIwD7yCLx+GoGoXRPQyxGOTdQMpIzPSPKXAJT/JQrdfFrgdJOyAzvgpQ9A=="
},
"pino": {
"version": "5.12.6",
"resolved": "https://registry.npmjs.org/pino/-/pino-5.12.6.tgz",
"integrity": "sha512-LM5ug2b27uymIIkaBw54ncF+9DSf8S4z1uzw+Y5I94dRu3Z+lFuB13j0kg1InAeyxy+CsLGnWHKy9+zgTreFOg==",
"version": "5.13.1",
"resolved": "https://registry.npmjs.org/pino/-/pino-5.13.1.tgz",
"integrity": "sha512-IxusG28L0g50uuf21kZELypdFOeNrJ/kRhktdi7LtdZQWCxLliMxG5iOrGUQ/ng7MiJ4XqXi/hfyXwZeKc1MxA==",
"requires": {
"fast-redact": "^1.4.4",
"fast-safe-stringify": "^2.0.6",
"flatstr": "^1.0.9",
"pino-std-serializers": "^2.3.0",
"quick-format-unescaped": "^3.0.2",
"sonic-boom": "^0.7.3"
"sonic-boom": "^0.7.5"
}
},
"pino-std-serializers": {
@@ -699,11 +705,11 @@
"integrity": "sha512-TcZvGMMy9vodEFSse30lWinkj+JgOBvPn8wRItpQRSayhc+4ssDs335uklkfvQQJgL/WvmHLVj4Ycv2s7QCQMg=="
},
"sonic-boom": {
"version": "0.7.4",
"resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.4.tgz",
"integrity": "sha512-8JRAJg0RxZtFLQMxolwETvWd2JSlH3ZGo/Z4xPxMbpqF14xCgVYPVeFCFOR3zyr3pcfG82QDVj6537Sx5ZWdNw==",
"version": "0.7.5",
"resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.5.tgz",
"integrity": "sha512-1pKrnAV6RfvntPnarY71tpthFTM3pWZWWQdghZY8ARjtDPGzG/inxqSuRwQY/7V1woUjfyxPb437zn4p5phgnQ==",
"requires": {
"flatstr": "^1.0.9"
"flatstr": "^1.0.12"
}
},
"source-map": {
@@ -859,9 +865,9 @@
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
},
"validator": {
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-10.4.0.tgz",
"integrity": "sha512-Q/wBy3LB1uOyssgNlXSRmaf22NxjvDNZM2MtIQ4jaEOAB61xsh1TQxsq1CgzUMBV1lDrVMogIh8GjG1DYW0zLg=="
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-11.1.0.tgz",
"integrity": "sha512-qiQ5ktdO7CD6C/5/mYV4jku/7qnqzjrxb3C/Q5wR3vGGinHTgJZN/TdFT3ZX4vXhX2R1PXx42fB1cn5W+uJ4lg=="
},
"yn": {
"version": "3.1.0",

View File

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

View File

@@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@nestjs/common": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.4.1.tgz",
"integrity": "sha512-qgex1F+ag5/8rxgsBHyXjNIyNJhNGjB1UHcFhMjGYxbfaz/5TSiv5A07IN2ZkCyNPRe35YPEvM5tJjTDul6FIg==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
"requires": {
"axios": "0.19.0",
"cli-color": "1.4.0",
@@ -15,9 +15,9 @@
}
},
"@nestjs/core": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.4.1.tgz",
"integrity": "sha512-g11VtXwXtTO9i1o+is5JNhUsiUa/tNqmtW2GWxXZcmjxNbCLOOjkLd2FHsyCLpBnl7OVkYDqwL9Fcl9ydgQa3Q==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
"requires": {
"@nuxtjs/opencollective": "0.2.2",
"fast-safe-stringify": "2.0.6",
@@ -38,11 +38,16 @@
}
},
"@types/node": {
"version": "7.10.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.6.tgz",
"integrity": "sha512-d0BOAicT0tEdbdVQlLGOVul1kvg6YvbaADRCThGCz5NJ0e9r00SofcR1x69hmlCyrHuB6jd4cKzL9bMLjPnpAA==",
"version": "7.10.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.7.tgz",
"integrity": "sha512-4I7+hXKyq7e1deuzX9udu0hPIYqSSkdKXtjow6fMnQ3OR9qkxIErGHbGY08YrfZJrCS1ajK8lOuzd0k3n2WM4A==",
"dev": true
},
"@types/validator": {
"version": "10.11.2",
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.2.tgz",
"integrity": "sha512-k/ju1RsdP5ACFUWebqsyEy0avP5uNJCs2p3pmTHzOZdd4gMSAJTq7iUEHFY3tt3emBrPTm6oGvfZ4SzcqOgLPQ=="
},
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
@@ -99,12 +104,13 @@
"integrity": "sha512-qsP+0xoavpOlJHuYsQJsN58HXSl8Jvveo+T37rEvCEeRfMWoytAyR0Ua/YsFgpM6AZYZ/og2PJwArwzJl1aXtQ=="
},
"class-validator": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.9.1.tgz",
"integrity": "sha512-3wApflrd3ywVZyx4jaasGoFt8pmo4aGLPPAEKCKCsTRWVGPilahD88q3jQjRQwja50rl9a7rsP5LAxJYwGK8/Q==",
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.0.tgz",
"integrity": "sha512-RvjxRlvoCvM/ojUq11j78ISpReGdBoMErdmDk1e27aQZK6ppSXq751UE6jB9JI7ayEnL6Nnmllzn/HXVSu3dmg==",
"requires": {
"@types/validator": "10.11.2",
"google-libphonenumber": "^3.1.6",
"validator": "10.4.0"
"validator": "11.1.0"
}
},
"cli-color": {
@@ -301,9 +307,9 @@
"dev": true
},
"google-libphonenumber": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.2.tgz",
"integrity": "sha512-ubjGeosYPeusjYbUHy76lCniGTTI0k1rIFc+uKBX+jHQLDmWOSUtlFUxaeoLJ+Y+PAMM6dWp+C1HjHx5BI8kEw=="
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.3.tgz",
"integrity": "sha512-8n4JyRptifaIRlHANKRlfqLR8fANm7+Q+1qvDuUsUeStSLtLGTVsZWe1llWDfgWTm1y07cEUyiRuNIv6cs2ovg=="
},
"has-flag": {
"version": "3.0.0",
@@ -577,9 +583,9 @@
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
},
"validator": {
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-10.4.0.tgz",
"integrity": "sha512-Q/wBy3LB1uOyssgNlXSRmaf22NxjvDNZM2MtIQ4jaEOAB61xsh1TQxsq1CgzUMBV1lDrVMogIh8GjG1DYW0zLg=="
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-11.1.0.tgz",
"integrity": "sha512-qiQ5ktdO7CD6C/5/mYV4jku/7qnqzjrxb3C/Q5wR3vGGinHTgJZN/TdFT3ZX4vXhX2R1PXx42fB1cn5W+uJ4lg=="
},
"yn": {
"version": "3.1.0",

View File

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

View File

@@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@nestjs/common": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.4.1.tgz",
"integrity": "sha512-qgex1F+ag5/8rxgsBHyXjNIyNJhNGjB1UHcFhMjGYxbfaz/5TSiv5A07IN2ZkCyNPRe35YPEvM5tJjTDul6FIg==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
"requires": {
"axios": "0.19.0",
"cli-color": "1.4.0",
@@ -15,9 +15,9 @@
}
},
"@nestjs/core": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.4.1.tgz",
"integrity": "sha512-g11VtXwXtTO9i1o+is5JNhUsiUa/tNqmtW2GWxXZcmjxNbCLOOjkLd2FHsyCLpBnl7OVkYDqwL9Fcl9ydgQa3Q==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
"requires": {
"@nuxtjs/opencollective": "0.2.2",
"fast-safe-stringify": "2.0.6",
@@ -28,9 +28,9 @@
}
},
"@nestjs/microservices": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.4.1.tgz",
"integrity": "sha512-8LP+5aYbt56NzWZstGiWRI6Xpi8QSCkzoBo0l0RKWpsL33bDRngTK7SfBVR4YfjE2N2FyPYWUY5t8S+0BUS1lg==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.5.3.tgz",
"integrity": "sha512-T9zZf61myahenI4c0qhcYnhnx49L+zL9+8W6fc+LPTarbt1HJDu6iyj6fh2BzewakwNLJRyGMJ9YCYlXhFuvlA==",
"requires": {
"iterare": "1.2.0",
"json-socket": "0.3.0",
@@ -38,17 +38,17 @@
}
},
"@nestjs/testing": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.4.1.tgz",
"integrity": "sha512-TQxTGnlKRUwL081ZvQpcwthsZMcOBlH2hGq/lN+DSPCgraqx7puRyIdi4Z70zjjAKwfZ7KUYjK0/wOYd8XhsrQ==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.5.3.tgz",
"integrity": "sha512-W8tPhkNVhmX+jaDu4R7WUOtIl0PK3ZDso434rEm/b1+S6ZRgAKwNVHWM/rwIuTi5+erPTEULtTsZgrXFrzC1sA==",
"requires": {
"optional": "0.1.4"
}
},
"@nestjs/websockets": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.4.1.tgz",
"integrity": "sha512-pj2itFnL2LN9HUL29YpHREHIBRisTd0U7n5FjTeKGElXyxPRX+aEa95EsQRqYAq0wKIu9EDa5rP/drGKLFah3w==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.5.3.tgz",
"integrity": "sha512-YrCvmLHTW0OBusTiUOPrG0PNrw/3Gatty/bh3ro5cEoiovcaJxGSMsTC+JSVXqPwRJjEtoHMCr5Qje2rAepIzQ==",
"requires": {
"iterare": "1.2.0"
}
@@ -64,11 +64,16 @@
}
},
"@types/node": {
"version": "7.10.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.6.tgz",
"integrity": "sha512-d0BOAicT0tEdbdVQlLGOVul1kvg6YvbaADRCThGCz5NJ0e9r00SofcR1x69hmlCyrHuB6jd4cKzL9bMLjPnpAA==",
"version": "7.10.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.7.tgz",
"integrity": "sha512-4I7+hXKyq7e1deuzX9udu0hPIYqSSkdKXtjow6fMnQ3OR9qkxIErGHbGY08YrfZJrCS1ajK8lOuzd0k3n2WM4A==",
"dev": true
},
"@types/validator": {
"version": "10.11.2",
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.2.tgz",
"integrity": "sha512-k/ju1RsdP5ACFUWebqsyEy0avP5uNJCs2p3pmTHzOZdd4gMSAJTq7iUEHFY3tt3emBrPTm6oGvfZ4SzcqOgLPQ=="
},
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
@@ -125,12 +130,13 @@
"integrity": "sha512-qsP+0xoavpOlJHuYsQJsN58HXSl8Jvveo+T37rEvCEeRfMWoytAyR0Ua/YsFgpM6AZYZ/og2PJwArwzJl1aXtQ=="
},
"class-validator": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.9.1.tgz",
"integrity": "sha512-3wApflrd3ywVZyx4jaasGoFt8pmo4aGLPPAEKCKCsTRWVGPilahD88q3jQjRQwja50rl9a7rsP5LAxJYwGK8/Q==",
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.0.tgz",
"integrity": "sha512-RvjxRlvoCvM/ojUq11j78ISpReGdBoMErdmDk1e27aQZK6ppSXq751UE6jB9JI7ayEnL6Nnmllzn/HXVSu3dmg==",
"requires": {
"@types/validator": "10.11.2",
"google-libphonenumber": "^3.1.6",
"validator": "10.4.0"
"validator": "11.1.0"
}
},
"cli-color": {
@@ -327,9 +333,9 @@
"dev": true
},
"google-libphonenumber": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.2.tgz",
"integrity": "sha512-ubjGeosYPeusjYbUHy76lCniGTTI0k1rIFc+uKBX+jHQLDmWOSUtlFUxaeoLJ+Y+PAMM6dWp+C1HjHx5BI8kEw=="
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.3.tgz",
"integrity": "sha512-8n4JyRptifaIRlHANKRlfqLR8fANm7+Q+1qvDuUsUeStSLtLGTVsZWe1llWDfgWTm1y07cEUyiRuNIv6cs2ovg=="
},
"has-flag": {
"version": "3.0.0",
@@ -608,9 +614,9 @@
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
},
"validator": {
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-10.4.0.tgz",
"integrity": "sha512-Q/wBy3LB1uOyssgNlXSRmaf22NxjvDNZM2MtIQ4jaEOAB61xsh1TQxsq1CgzUMBV1lDrVMogIh8GjG1DYW0zLg=="
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-11.1.0.tgz",
"integrity": "sha512-qiQ5ktdO7CD6C/5/mYV4jku/7qnqzjrxb3C/Q5wR3vGGinHTgJZN/TdFT3ZX4vXhX2R1PXx42fB1cn5W+uJ4lg=="
},
"yn": {
"version": "3.1.0",

View File

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

View File

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

View File

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

View File

@@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@nestjs/common": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.4.1.tgz",
"integrity": "sha512-qgex1F+ag5/8rxgsBHyXjNIyNJhNGjB1UHcFhMjGYxbfaz/5TSiv5A07IN2ZkCyNPRe35YPEvM5tJjTDul6FIg==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
"requires": {
"axios": "0.19.0",
"cli-color": "1.4.0",
@@ -15,9 +15,9 @@
}
},
"@nestjs/core": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.4.1.tgz",
"integrity": "sha512-g11VtXwXtTO9i1o+is5JNhUsiUa/tNqmtW2GWxXZcmjxNbCLOOjkLd2FHsyCLpBnl7OVkYDqwL9Fcl9ydgQa3Q==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
"requires": {
"@nuxtjs/opencollective": "0.2.2",
"fast-safe-stringify": "2.0.6",
@@ -28,9 +28,9 @@
}
},
"@nestjs/microservices": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.4.1.tgz",
"integrity": "sha512-8LP+5aYbt56NzWZstGiWRI6Xpi8QSCkzoBo0l0RKWpsL33bDRngTK7SfBVR4YfjE2N2FyPYWUY5t8S+0BUS1lg==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.5.3.tgz",
"integrity": "sha512-T9zZf61myahenI4c0qhcYnhnx49L+zL9+8W6fc+LPTarbt1HJDu6iyj6fh2BzewakwNLJRyGMJ9YCYlXhFuvlA==",
"requires": {
"iterare": "1.2.0",
"json-socket": "0.3.0",
@@ -38,28 +38,28 @@
}
},
"@nestjs/platform-express": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-6.4.1.tgz",
"integrity": "sha512-i+wCYzYhj/ZlsQAdofyLDhHnMeu3rA3IYkXbRUEoNFmo4pWVRu85vXFoq8UfNWV1bv0U9VKnY7AZP4B4yXaYhw==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-6.5.3.tgz",
"integrity": "sha512-c5n4XUbDDmF6MfBGYWM1jtsIDpVsOfOQtf3S0w3IeJNqm7dnmVAvO2Jk+RsYpt50tN4NAXntM3YTuTDqMb9uiA==",
"requires": {
"body-parser": "1.19.0",
"cors": "2.8.5",
"express": "4.17.1",
"multer": "1.4.1"
"multer": "1.4.2"
}
},
"@nestjs/testing": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.4.1.tgz",
"integrity": "sha512-TQxTGnlKRUwL081ZvQpcwthsZMcOBlH2hGq/lN+DSPCgraqx7puRyIdi4Z70zjjAKwfZ7KUYjK0/wOYd8XhsrQ==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.5.3.tgz",
"integrity": "sha512-W8tPhkNVhmX+jaDu4R7WUOtIl0PK3ZDso434rEm/b1+S6ZRgAKwNVHWM/rwIuTi5+erPTEULtTsZgrXFrzC1sA==",
"requires": {
"optional": "0.1.4"
}
},
"@nestjs/websockets": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.4.1.tgz",
"integrity": "sha512-pj2itFnL2LN9HUL29YpHREHIBRisTd0U7n5FjTeKGElXyxPRX+aEa95EsQRqYAq0wKIu9EDa5rP/drGKLFah3w==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.5.3.tgz",
"integrity": "sha512-YrCvmLHTW0OBusTiUOPrG0PNrw/3Gatty/bh3ro5cEoiovcaJxGSMsTC+JSVXqPwRJjEtoHMCr5Qje2rAepIzQ==",
"requires": {
"iterare": "1.2.0"
}
@@ -75,11 +75,16 @@
}
},
"@types/node": {
"version": "7.10.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.6.tgz",
"integrity": "sha512-d0BOAicT0tEdbdVQlLGOVul1kvg6YvbaADRCThGCz5NJ0e9r00SofcR1x69hmlCyrHuB6jd4cKzL9bMLjPnpAA==",
"version": "7.10.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.7.tgz",
"integrity": "sha512-4I7+hXKyq7e1deuzX9udu0hPIYqSSkdKXtjow6fMnQ3OR9qkxIErGHbGY08YrfZJrCS1ajK8lOuzd0k3n2WM4A==",
"dev": true
},
"@types/validator": {
"version": "10.11.2",
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.2.tgz",
"integrity": "sha512-k/ju1RsdP5ACFUWebqsyEy0avP5uNJCs2p3pmTHzOZdd4gMSAJTq7iUEHFY3tt3emBrPTm6oGvfZ4SzcqOgLPQ=="
},
"accepts": {
"version": "1.3.7",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
@@ -228,12 +233,13 @@
"integrity": "sha512-qsP+0xoavpOlJHuYsQJsN58HXSl8Jvveo+T37rEvCEeRfMWoytAyR0Ua/YsFgpM6AZYZ/og2PJwArwzJl1aXtQ=="
},
"class-validator": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.9.1.tgz",
"integrity": "sha512-3wApflrd3ywVZyx4jaasGoFt8pmo4aGLPPAEKCKCsTRWVGPilahD88q3jQjRQwja50rl9a7rsP5LAxJYwGK8/Q==",
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.0.tgz",
"integrity": "sha512-RvjxRlvoCvM/ojUq11j78ISpReGdBoMErdmDk1e27aQZK6ppSXq751UE6jB9JI7ayEnL6Nnmllzn/HXVSu3dmg==",
"requires": {
"@types/validator": "10.11.2",
"google-libphonenumber": "^3.1.6",
"validator": "10.4.0"
"validator": "11.1.0"
}
},
"cli-color": {
@@ -636,9 +642,9 @@
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
},
"google-libphonenumber": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.2.tgz",
"integrity": "sha512-ubjGeosYPeusjYbUHy76lCniGTTI0k1rIFc+uKBX+jHQLDmWOSUtlFUxaeoLJ+Y+PAMM6dWp+C1HjHx5BI8kEw=="
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.3.tgz",
"integrity": "sha512-8n4JyRptifaIRlHANKRlfqLR8fANm7+Q+1qvDuUsUeStSLtLGTVsZWe1llWDfgWTm1y07cEUyiRuNIv6cs2ovg=="
},
"has-flag": {
"version": "3.0.0",
@@ -784,9 +790,9 @@
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
},
"multer": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/multer/-/multer-1.4.1.tgz",
"integrity": "sha512-zzOLNRxzszwd+61JFuAo0fxdQfvku12aNJgnla0AQ+hHxFmfc/B7jBVuPr5Rmvu46Jze/iJrFpSOsD7afO8SDw==",
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/multer/-/multer-1.4.2.tgz",
"integrity": "sha512-xY8pX7V+ybyUpbYMxtjM9KAiD9ixtg5/JkeKUTD6xilfDv0vzzOFcCp4Ljb1UU3tSOM3VTZtKo63OmzOrGi3Cg==",
"requires": {
"append-field": "^1.0.0",
"busboy": "^0.2.11",
@@ -1170,9 +1176,9 @@
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
},
"validator": {
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-10.4.0.tgz",
"integrity": "sha512-Q/wBy3LB1uOyssgNlXSRmaf22NxjvDNZM2MtIQ4jaEOAB61xsh1TQxsq1CgzUMBV1lDrVMogIh8GjG1DYW0zLg=="
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-11.1.0.tgz",
"integrity": "sha512-qiQ5ktdO7CD6C/5/mYV4jku/7qnqzjrxb3C/Q5wR3vGGinHTgJZN/TdFT3ZX4vXhX2R1PXx42fB1cn5W+uJ4lg=="
},
"vary": {
"version": "1.1.2",
@@ -1180,9 +1186,9 @@
"integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
},
"xtend": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68="
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
},
"yn": {
"version": "3.1.0",

View File

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

View File

@@ -5,18 +5,18 @@
"requires": true,
"dependencies": {
"@babel/code-frame": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz",
"integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==",
"version": "7.5.5",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
"integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==",
"dev": true,
"requires": {
"@babel/highlight": "^7.0.0"
}
},
"@babel/highlight": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz",
"integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==",
"version": "7.5.0",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz",
"integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==",
"dev": true,
"requires": {
"chalk": "^2.0.0",
@@ -25,9 +25,9 @@
}
},
"@nestjs/common": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.4.1.tgz",
"integrity": "sha512-qgex1F+ag5/8rxgsBHyXjNIyNJhNGjB1UHcFhMjGYxbfaz/5TSiv5A07IN2ZkCyNPRe35YPEvM5tJjTDul6FIg==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
"requires": {
"axios": "0.19.0",
"cli-color": "1.4.0",
@@ -35,9 +35,9 @@
}
},
"@nestjs/core": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.4.1.tgz",
"integrity": "sha512-g11VtXwXtTO9i1o+is5JNhUsiUa/tNqmtW2GWxXZcmjxNbCLOOjkLd2FHsyCLpBnl7OVkYDqwL9Fcl9ydgQa3Q==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
"requires": {
"@nuxtjs/opencollective": "0.2.2",
"fast-safe-stringify": "2.0.6",
@@ -72,9 +72,9 @@
}
},
"@types/mongodb": {
"version": "3.1.28",
"resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.1.28.tgz",
"integrity": "sha512-tG+QqJ/hir2p0069ee28t2O9tlGRJKDq1WFZC2QYMlU47LGdldLL8tepfTq6aFLvP58OpwSoxaJ/qjW93ob1NQ==",
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.3.0.tgz",
"integrity": "sha512-YMrve0uBOqFDEiezQk3AfWV73g871/rQTAEb8Y2CSlbySnV/2OyerI1DAOUUJQaIqGEWWaYF6GMPO6wTErLUuw==",
"dev": true,
"requires": {
"@types/bson": "*",
@@ -82,9 +82,9 @@
}
},
"@types/mongoose": {
"version": "5.5.7",
"resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.5.7.tgz",
"integrity": "sha512-bQTgH19lwY56T4YE6YTeobTtJ4EVTqP8ST5lFxjecPHC+/ebpHU8W01by4KEGSg5AeWFWVCePUi44wHuFzbxDQ==",
"version": "5.5.13",
"resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.5.13.tgz",
"integrity": "sha512-k7Kxk5gugsZhkl7euWH1p6lmIdh9W8AsQgX0cO7kaihBie/P3ywU8LFMqo9ey6frdHBlGVaNICTeFZ/pZ6s5Lg==",
"dev": true,
"requires": {
"@types/mongodb": "*",
@@ -92,9 +92,9 @@
}
},
"@types/node": {
"version": "7.10.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.6.tgz",
"integrity": "sha512-d0BOAicT0tEdbdVQlLGOVul1kvg6YvbaADRCThGCz5NJ0e9r00SofcR1x69hmlCyrHuB6jd4cKzL9bMLjPnpAA==",
"version": "7.10.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.7.tgz",
"integrity": "sha512-4I7+hXKyq7e1deuzX9udu0hPIYqSSkdKXtjow6fMnQ3OR9qkxIErGHbGY08YrfZJrCS1ajK8lOuzd0k3n2WM4A==",
"dev": true
},
"ansi-regex": {
@@ -315,9 +315,9 @@
"dev": true
},
"esutils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
"dev": true
},
"event-emitter": {
@@ -420,9 +420,9 @@
"integrity": "sha512-6hHxsp9e6zQU8nXsP+02HGWXwTkOEw6IROhF2ZA28cYbUk4eJ6QbtZvdqZOdD9YPKghG3apk5eOCvs+tLl3lRg=="
},
"lodash": {
"version": "4.17.11",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
},
"lru-queue": {
"version": "0.1.0",
@@ -504,9 +504,9 @@
}
},
"mongoose": {
"version": "5.6.4",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.6.4.tgz",
"integrity": "sha512-mwMpa82uGvxSmkwTbxCmXb8/Nn9+2e+X61DiGFV9ZeenTsJKcdjc0QMGwDyDEkLcnYwQ5VrQbiB9548RZbFgVw==",
"version": "5.6.10",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.6.10.tgz",
"integrity": "sha512-lxWvF4Vl2118K2nZTj+QAEEmNBCbmUAcmF/roe8d+68Np4RXKEQvmpqm1c3aIlE9AVMp//eKB8IfXr38ZHe0Zw==",
"requires": {
"async": "2.6.2",
"bson": "~1.1.1",
@@ -611,9 +611,9 @@
}
},
"resolve": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz",
"integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==",
"version": "1.12.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz",
"integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==",
"dev": true,
"requires": {
"path-parse": "^1.0.6"
@@ -736,9 +736,9 @@
"integrity": "sha512-avfPS28HmGLLc2o4elcc2EIq2FcH++Yo5YxpBZi9Yw93BCTGFthI4HPE4Rpep6vSYQaK8e69PelM44tPj+RaQg=="
},
"tslint": {
"version": "5.18.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.18.0.tgz",
"integrity": "sha512-Q3kXkuDEijQ37nXZZLKErssQVnwCV/+23gFEMROi8IlbaBG6tXqLPQJ5Wjcyt/yHPKBC+hD5SzuGaMora+ZS6w==",
"version": "5.19.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.19.0.tgz",
"integrity": "sha512-1LwwtBxfRJZnUvoS9c0uj8XQtAnyhWr9KlNvDIdB+oXyT+VpsOAaEhEgKi1HrZ8rq0ki/AAnbGSv4KM6/AfVZw==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",

View File

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

View File

@@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@nestjs/common": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.4.1.tgz",
"integrity": "sha512-qgex1F+ag5/8rxgsBHyXjNIyNJhNGjB1UHcFhMjGYxbfaz/5TSiv5A07IN2ZkCyNPRe35YPEvM5tJjTDul6FIg==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
"requires": {
"axios": "0.19.0",
"cli-color": "1.4.0",
@@ -15,9 +15,9 @@
}
},
"@nestjs/core": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.4.1.tgz",
"integrity": "sha512-g11VtXwXtTO9i1o+is5JNhUsiUa/tNqmtW2GWxXZcmjxNbCLOOjkLd2FHsyCLpBnl7OVkYDqwL9Fcl9ydgQa3Q==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
"requires": {
"@nuxtjs/opencollective": "0.2.2",
"fast-safe-stringify": "2.0.6",
@@ -28,9 +28,9 @@
}
},
"@nestjs/microservices": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.4.1.tgz",
"integrity": "sha512-8LP+5aYbt56NzWZstGiWRI6Xpi8QSCkzoBo0l0RKWpsL33bDRngTK7SfBVR4YfjE2N2FyPYWUY5t8S+0BUS1lg==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.5.3.tgz",
"integrity": "sha512-T9zZf61myahenI4c0qhcYnhnx49L+zL9+8W6fc+LPTarbt1HJDu6iyj6fh2BzewakwNLJRyGMJ9YCYlXhFuvlA==",
"requires": {
"iterare": "1.2.0",
"json-socket": "0.3.0",
@@ -38,17 +38,17 @@
}
},
"@nestjs/testing": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.4.1.tgz",
"integrity": "sha512-TQxTGnlKRUwL081ZvQpcwthsZMcOBlH2hGq/lN+DSPCgraqx7puRyIdi4Z70zjjAKwfZ7KUYjK0/wOYd8XhsrQ==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.5.3.tgz",
"integrity": "sha512-W8tPhkNVhmX+jaDu4R7WUOtIl0PK3ZDso434rEm/b1+S6ZRgAKwNVHWM/rwIuTi5+erPTEULtTsZgrXFrzC1sA==",
"requires": {
"optional": "0.1.4"
}
},
"@nestjs/websockets": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.4.1.tgz",
"integrity": "sha512-pj2itFnL2LN9HUL29YpHREHIBRisTd0U7n5FjTeKGElXyxPRX+aEa95EsQRqYAq0wKIu9EDa5rP/drGKLFah3w==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.5.3.tgz",
"integrity": "sha512-YrCvmLHTW0OBusTiUOPrG0PNrw/3Gatty/bh3ro5cEoiovcaJxGSMsTC+JSVXqPwRJjEtoHMCr5Qje2rAepIzQ==",
"requires": {
"iterare": "1.2.0"
}
@@ -64,20 +64,25 @@
}
},
"@types/node": {
"version": "7.10.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.6.tgz",
"integrity": "sha512-d0BOAicT0tEdbdVQlLGOVul1kvg6YvbaADRCThGCz5NJ0e9r00SofcR1x69hmlCyrHuB6jd4cKzL9bMLjPnpAA==",
"version": "7.10.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.7.tgz",
"integrity": "sha512-4I7+hXKyq7e1deuzX9udu0hPIYqSSkdKXtjow6fMnQ3OR9qkxIErGHbGY08YrfZJrCS1ajK8lOuzd0k3n2WM4A==",
"dev": true
},
"@types/validator": {
"version": "10.11.2",
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.2.tgz",
"integrity": "sha512-k/ju1RsdP5ACFUWebqsyEy0avP5uNJCs2p3pmTHzOZdd4gMSAJTq7iUEHFY3tt3emBrPTm6oGvfZ4SzcqOgLPQ=="
},
"abstract-logging": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/abstract-logging/-/abstract-logging-1.0.0.tgz",
"integrity": "sha1-i33q/TEFWbwo93ck3RuzAXcnjBs="
},
"ajv": {
"version": "6.10.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz",
"integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==",
"version": "6.10.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz",
"integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==",
"requires": {
"fast-deep-equal": "^2.0.1",
"fast-json-stable-stringify": "^2.0.0",
@@ -171,12 +176,13 @@
"integrity": "sha512-qsP+0xoavpOlJHuYsQJsN58HXSl8Jvveo+T37rEvCEeRfMWoytAyR0Ua/YsFgpM6AZYZ/og2PJwArwzJl1aXtQ=="
},
"class-validator": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.9.1.tgz",
"integrity": "sha512-3wApflrd3ywVZyx4jaasGoFt8pmo4aGLPPAEKCKCsTRWVGPilahD88q3jQjRQwja50rl9a7rsP5LAxJYwGK8/Q==",
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.0.tgz",
"integrity": "sha512-RvjxRlvoCvM/ojUq11j78ISpReGdBoMErdmDk1e27aQZK6ppSXq751UE6jB9JI7ayEnL6Nnmllzn/HXVSu3dmg==",
"requires": {
"@types/validator": "10.11.2",
"google-libphonenumber": "^3.1.6",
"validator": "10.4.0"
"validator": "11.1.0"
}
},
"cli-color": {
@@ -255,9 +261,9 @@
}
},
"deepmerge": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-3.3.0.tgz",
"integrity": "sha512-GRQOafGHwMHpjPx9iCvTgpu9NojZ49q794EEL94JVEw6VaeA8XTUyBKvAkOOjBX9oJNiV6G3P+T+tihFjo2TqA=="
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.0.0.tgz",
"integrity": "sha512-YZ1rOP5+kHor4hMAH+HRQnBQHg+wvS1un1hAOuIcxcBy0hzcUf6Jg2a1w65kpoOUnurOfZbERwjI1TfZxNjcww=="
},
"delayed-stream": {
"version": "1.0.0",
@@ -347,12 +353,12 @@
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
},
"fast-json-stringify": {
"version": "1.15.3",
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.15.3.tgz",
"integrity": "sha512-p+ucnySTbrUQ9M7u8ygFIxrmpG8B+8O4/PvLDdh+RqMMgj/h6OoDb7U2lP+kqg3PDclQBFbSIArRhkorFwZLLg==",
"version": "1.15.4",
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.15.4.tgz",
"integrity": "sha512-lsGTxL0OIGjGSUXgWUOdSgjCL/xMyMvMudfGN3D1zOLEv44fYZ1ZXmMyCON5XdpaiZN6nCXmU7GQg7fbXfPG4g==",
"requires": {
"ajv": "^6.8.1",
"deepmerge": "^3.0.0"
"deepmerge": "^4.0.0"
}
},
"fast-redact": {
@@ -366,19 +372,19 @@
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
},
"fastify": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.6.0.tgz",
"integrity": "sha512-3GxGV2P8731o2S5T6ng5NMJ9S7vFpZA4mk2mJEbMbhQ5aj1HhNGBOe39TYa2gWRrJVJuXxYYYIlY/5cFhiHpNg==",
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.7.1.tgz",
"integrity": "sha512-ScKPXD84lkdCgz7q0zjyBr1aLxKbXRt9HYL3XIt/L8ZD2f3fAcsLEyQ2/rHxLUzLGjPlEjIvprWUL3RZvlLRLw==",
"requires": {
"abstract-logging": "^1.0.0",
"ajv": "^6.9.2",
"ajv": "^6.10.2",
"avvio": "^6.1.1",
"fast-json-stringify": "^1.15.0",
"find-my-way": "^2.0.0",
"flatstr": "^1.0.12",
"light-my-request": "^3.2.0",
"light-my-request": "^3.4.1",
"middie": "^4.0.1",
"pino": "^5.11.1",
"pino": "^5.13.1",
"proxy-addr": "^2.0.4",
"readable-stream": "^3.1.1",
"rfdc": "^1.1.2",
@@ -440,9 +446,9 @@
"integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
},
"google-libphonenumber": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.2.tgz",
"integrity": "sha512-ubjGeosYPeusjYbUHy76lCniGTTI0k1rIFc+uKBX+jHQLDmWOSUtlFUxaeoLJ+Y+PAMM6dWp+C1HjHx5BI8kEw=="
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.3.tgz",
"integrity": "sha512-8n4JyRptifaIRlHANKRlfqLR8fANm7+Q+1qvDuUsUeStSLtLGTVsZWe1llWDfgWTm1y07cEUyiRuNIv6cs2ovg=="
},
"has-flag": {
"version": "3.0.0",
@@ -485,9 +491,9 @@
"integrity": "sha512-jc8ZbUnYIWdxERFWQKVgwSLkGSe+kyzvmYxwNaRgx/c8NNyuHes4UHnPM3LUrAFXUx1BhNJ94n1h/KCRlbvV0g=="
},
"light-my-request": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-3.4.0.tgz",
"integrity": "sha512-zIEl4lKwATE5uPmxEZkVIIAr/JGrHEngf9MDZ7a1TodLZ93kROYkKkoqSCmQIJ01FXrzyYMnmtemBO/b1HFt0Q==",
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-3.4.1.tgz",
"integrity": "sha512-E1zMvRWjqsaCS60dTkD7c//xKV1KOFD2zo92Ru3o3e95lCfQSDCC9aS8MZm1V+zXaA/SeKDwK9gvrfaCseTusg==",
"requires": {
"ajv": "^6.8.1",
"readable-stream": "^3.1.1"
@@ -589,16 +595,16 @@
"integrity": "sha512-ZOtfhPttCrqp2M1PBBH4X13XlvnfhIwD7yCLx+GoGoXRPQyxGOTdQMpIzPSPKXAJT/JQrdfFrgdJOyAzvgpQ9A=="
},
"pino": {
"version": "5.12.6",
"resolved": "https://registry.npmjs.org/pino/-/pino-5.12.6.tgz",
"integrity": "sha512-LM5ug2b27uymIIkaBw54ncF+9DSf8S4z1uzw+Y5I94dRu3Z+lFuB13j0kg1InAeyxy+CsLGnWHKy9+zgTreFOg==",
"version": "5.13.1",
"resolved": "https://registry.npmjs.org/pino/-/pino-5.13.1.tgz",
"integrity": "sha512-IxusG28L0g50uuf21kZELypdFOeNrJ/kRhktdi7LtdZQWCxLliMxG5iOrGUQ/ng7MiJ4XqXi/hfyXwZeKc1MxA==",
"requires": {
"fast-redact": "^1.4.4",
"fast-safe-stringify": "^2.0.6",
"flatstr": "^1.0.9",
"pino-std-serializers": "^2.3.0",
"quick-format-unescaped": "^3.0.2",
"sonic-boom": "^0.7.3"
"sonic-boom": "^0.7.5"
}
},
"pino-std-serializers": {
@@ -699,11 +705,11 @@
"integrity": "sha512-TcZvGMMy9vodEFSse30lWinkj+JgOBvPn8wRItpQRSayhc+4ssDs335uklkfvQQJgL/WvmHLVj4Ycv2s7QCQMg=="
},
"sonic-boom": {
"version": "0.7.4",
"resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.4.tgz",
"integrity": "sha512-8JRAJg0RxZtFLQMxolwETvWd2JSlH3ZGo/Z4xPxMbpqF14xCgVYPVeFCFOR3zyr3pcfG82QDVj6537Sx5ZWdNw==",
"version": "0.7.5",
"resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.5.tgz",
"integrity": "sha512-1pKrnAV6RfvntPnarY71tpthFTM3pWZWWQdghZY8ARjtDPGzG/inxqSuRwQY/7V1woUjfyxPb437zn4p5phgnQ==",
"requires": {
"flatstr": "^1.0.9"
"flatstr": "^1.0.12"
}
},
"source-map": {
@@ -859,9 +865,9 @@
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
},
"validator": {
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-10.4.0.tgz",
"integrity": "sha512-Q/wBy3LB1uOyssgNlXSRmaf22NxjvDNZM2MtIQ4jaEOAB61xsh1TQxsq1CgzUMBV1lDrVMogIh8GjG1DYW0zLg=="
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-11.1.0.tgz",
"integrity": "sha512-qiQ5ktdO7CD6C/5/mYV4jku/7qnqzjrxb3C/Q5wR3vGGinHTgJZN/TdFT3ZX4vXhX2R1PXx42fB1cn5W+uJ4lg=="
},
"yn": {
"version": "3.1.0",

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

@@ -5,18 +5,18 @@
"requires": true,
"dependencies": {
"@babel/code-frame": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz",
"integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==",
"version": "7.5.5",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
"integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==",
"dev": true,
"requires": {
"@babel/highlight": "^7.0.0"
}
},
"@babel/highlight": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz",
"integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==",
"version": "7.5.0",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz",
"integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==",
"dev": true,
"requires": {
"chalk": "^2.0.0",
@@ -25,9 +25,9 @@
}
},
"@nestjs/common": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.4.1.tgz",
"integrity": "sha512-qgex1F+ag5/8rxgsBHyXjNIyNJhNGjB1UHcFhMjGYxbfaz/5TSiv5A07IN2ZkCyNPRe35YPEvM5tJjTDul6FIg==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
"requires": {
"axios": "0.19.0",
"cli-color": "1.4.0",
@@ -35,9 +35,9 @@
}
},
"@nestjs/core": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.4.1.tgz",
"integrity": "sha512-g11VtXwXtTO9i1o+is5JNhUsiUa/tNqmtW2GWxXZcmjxNbCLOOjkLd2FHsyCLpBnl7OVkYDqwL9Fcl9ydgQa3Q==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
"requires": {
"@nuxtjs/opencollective": "0.2.2",
"fast-safe-stringify": "2.0.6",
@@ -48,9 +48,9 @@
}
},
"@nestjs/typeorm": {
"version": "6.1.2",
"resolved": "https://registry.npmjs.org/@nestjs/typeorm/-/typeorm-6.1.2.tgz",
"integrity": "sha512-uNLvNTW72h4mypvscBgYgE2q8LHgvrhNzV6YqJgvf0VaGv5fi72hl0Zlfwmvh7h50ysW221mJCraX56yn+Uzxw==",
"version": "6.1.3",
"resolved": "https://registry.npmjs.org/@nestjs/typeorm/-/typeorm-6.1.3.tgz",
"integrity": "sha512-860tNwms0d/pnuZNEBZCFl5FjzCGG67V8TYuPIVu66jFK/Hmq2WH/GxiC8L77rWPn/o2O5LSe51lgO95GPysGw==",
"requires": {
"uuid": "3.3.2"
}
@@ -78,9 +78,9 @@
}
},
"@types/node": {
"version": "7.10.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.6.tgz",
"integrity": "sha512-d0BOAicT0tEdbdVQlLGOVul1kvg6YvbaADRCThGCz5NJ0e9r00SofcR1x69hmlCyrHuB6jd4cKzL9bMLjPnpAA==",
"version": "7.10.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.7.tgz",
"integrity": "sha512-4I7+hXKyq7e1deuzX9udu0hPIYqSSkdKXtjow6fMnQ3OR9qkxIErGHbGY08YrfZJrCS1ajK8lOuzd0k3n2WM4A==",
"dev": true
},
"ansi-regex": {
@@ -374,9 +374,9 @@
"integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw=="
},
"esutils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
"dev": true
},
"event-emitter": {
@@ -856,9 +856,9 @@
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="
},
"resolve": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz",
"integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==",
"version": "1.12.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz",
"integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==",
"dev": true,
"requires": {
"path-parse": "^1.0.6"
@@ -1027,9 +1027,9 @@
"integrity": "sha512-avfPS28HmGLLc2o4elcc2EIq2FcH++Yo5YxpBZi9Yw93BCTGFthI4HPE4Rpep6vSYQaK8e69PelM44tPj+RaQg=="
},
"tslint": {
"version": "5.18.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.18.0.tgz",
"integrity": "sha512-Q3kXkuDEijQ37nXZZLKErssQVnwCV/+23gFEMROi8IlbaBG6tXqLPQJ5Wjcyt/yHPKBC+hD5SzuGaMora+ZS6w==",
"version": "5.19.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.19.0.tgz",
"integrity": "sha512-1LwwtBxfRJZnUvoS9c0uj8XQtAnyhWr9KlNvDIdB+oXyT+VpsOAaEhEgKi1HrZ8rq0ki/AAnbGSv4KM6/AfVZw==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",

View File

@@ -9,9 +9,9 @@
"start:prod": "node dist/main.js"
},
"dependencies": {
"@nestjs/common": "6.4.1",
"@nestjs/core": "6.4.1",
"@nestjs/typeorm": "6.1.2",
"@nestjs/common": "6.5.3",
"@nestjs/core": "6.5.3",
"@nestjs/typeorm": "6.1.3",
"mysql": "2.17.1",
"reflect-metadata": "0.1.13",
"rxjs": "6.5.2",
@@ -19,8 +19,8 @@
"typescript": "3.5.3"
},
"devDependencies": {
"@types/node": "7.10.6",
"@types/node": "7.10.7",
"ts-node": "8.3.0",
"tslint": "5.18.0"
"tslint": "5.19.0"
}
}

View File

@@ -17,7 +17,6 @@ async function createNestApp(...gateways): Promise<INestApplication> {
}
describe('WebSocketGateway (WsAdapter)', () => {
const event = 'push';
let ws, ws2, app;
it(`should handle message (2nd port)`, async () => {
@@ -66,7 +65,9 @@ describe('WebSocketGateway (WsAdapter)', () => {
);
});
it(`should support 2 different gateways`, async () => {
it(`should support 2 different gateways`, async function() {
this.retries(10);
app = await createNestApp(ApplicationGateway, CoreGateway);
await app.listenAsync(3000);

View File

@@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@nestjs/common": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.4.1.tgz",
"integrity": "sha512-qgex1F+ag5/8rxgsBHyXjNIyNJhNGjB1UHcFhMjGYxbfaz/5TSiv5A07IN2ZkCyNPRe35YPEvM5tJjTDul6FIg==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
"requires": {
"axios": "0.19.0",
"cli-color": "1.4.0",
@@ -15,9 +15,9 @@
}
},
"@nestjs/core": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.4.1.tgz",
"integrity": "sha512-g11VtXwXtTO9i1o+is5JNhUsiUa/tNqmtW2GWxXZcmjxNbCLOOjkLd2FHsyCLpBnl7OVkYDqwL9Fcl9ydgQa3Q==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
"requires": {
"@nuxtjs/opencollective": "0.2.2",
"fast-safe-stringify": "2.0.6",
@@ -28,9 +28,9 @@
}
},
"@nestjs/microservices": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.4.1.tgz",
"integrity": "sha512-8LP+5aYbt56NzWZstGiWRI6Xpi8QSCkzoBo0l0RKWpsL33bDRngTK7SfBVR4YfjE2N2FyPYWUY5t8S+0BUS1lg==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.5.3.tgz",
"integrity": "sha512-T9zZf61myahenI4c0qhcYnhnx49L+zL9+8W6fc+LPTarbt1HJDu6iyj6fh2BzewakwNLJRyGMJ9YCYlXhFuvlA==",
"requires": {
"iterare": "1.2.0",
"json-socket": "0.3.0",
@@ -38,17 +38,17 @@
}
},
"@nestjs/testing": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.4.1.tgz",
"integrity": "sha512-TQxTGnlKRUwL081ZvQpcwthsZMcOBlH2hGq/lN+DSPCgraqx7puRyIdi4Z70zjjAKwfZ7KUYjK0/wOYd8XhsrQ==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.5.3.tgz",
"integrity": "sha512-W8tPhkNVhmX+jaDu4R7WUOtIl0PK3ZDso434rEm/b1+S6ZRgAKwNVHWM/rwIuTi5+erPTEULtTsZgrXFrzC1sA==",
"requires": {
"optional": "0.1.4"
}
},
"@nestjs/websockets": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.4.1.tgz",
"integrity": "sha512-pj2itFnL2LN9HUL29YpHREHIBRisTd0U7n5FjTeKGElXyxPRX+aEa95EsQRqYAq0wKIu9EDa5rP/drGKLFah3w==",
"version": "6.5.3",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.5.3.tgz",
"integrity": "sha512-YrCvmLHTW0OBusTiUOPrG0PNrw/3Gatty/bh3ro5cEoiovcaJxGSMsTC+JSVXqPwRJjEtoHMCr5Qje2rAepIzQ==",
"requires": {
"iterare": "1.2.0"
}
@@ -64,11 +64,16 @@
}
},
"@types/node": {
"version": "7.10.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.6.tgz",
"integrity": "sha512-d0BOAicT0tEdbdVQlLGOVul1kvg6YvbaADRCThGCz5NJ0e9r00SofcR1x69hmlCyrHuB6jd4cKzL9bMLjPnpAA==",
"version": "7.10.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-7.10.7.tgz",
"integrity": "sha512-4I7+hXKyq7e1deuzX9udu0hPIYqSSkdKXtjow6fMnQ3OR9qkxIErGHbGY08YrfZJrCS1ajK8lOuzd0k3n2WM4A==",
"dev": true
},
"@types/validator": {
"version": "10.11.2",
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.2.tgz",
"integrity": "sha512-k/ju1RsdP5ACFUWebqsyEy0avP5uNJCs2p3pmTHzOZdd4gMSAJTq7iUEHFY3tt3emBrPTm6oGvfZ4SzcqOgLPQ=="
},
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
@@ -125,12 +130,13 @@
"integrity": "sha512-qsP+0xoavpOlJHuYsQJsN58HXSl8Jvveo+T37rEvCEeRfMWoytAyR0Ua/YsFgpM6AZYZ/og2PJwArwzJl1aXtQ=="
},
"class-validator": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.9.1.tgz",
"integrity": "sha512-3wApflrd3ywVZyx4jaasGoFt8pmo4aGLPPAEKCKCsTRWVGPilahD88q3jQjRQwja50rl9a7rsP5LAxJYwGK8/Q==",
"version": "0.10.0",
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.0.tgz",
"integrity": "sha512-RvjxRlvoCvM/ojUq11j78ISpReGdBoMErdmDk1e27aQZK6ppSXq751UE6jB9JI7ayEnL6Nnmllzn/HXVSu3dmg==",
"requires": {
"@types/validator": "10.11.2",
"google-libphonenumber": "^3.1.6",
"validator": "10.4.0"
"validator": "11.1.0"
}
},
"cli-color": {
@@ -327,9 +333,9 @@
"dev": true
},
"google-libphonenumber": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.2.tgz",
"integrity": "sha512-ubjGeosYPeusjYbUHy76lCniGTTI0k1rIFc+uKBX+jHQLDmWOSUtlFUxaeoLJ+Y+PAMM6dWp+C1HjHx5BI8kEw=="
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.3.tgz",
"integrity": "sha512-8n4JyRptifaIRlHANKRlfqLR8fANm7+Q+1qvDuUsUeStSLtLGTVsZWe1llWDfgWTm1y07cEUyiRuNIv6cs2ovg=="
},
"has-flag": {
"version": "3.0.0",
@@ -608,9 +614,9 @@
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
},
"validator": {
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-10.4.0.tgz",
"integrity": "sha512-Q/wBy3LB1uOyssgNlXSRmaf22NxjvDNZM2MtIQ4jaEOAB61xsh1TQxsq1CgzUMBV1lDrVMogIh8GjG1DYW0zLg=="
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-11.1.0.tgz",
"integrity": "sha512-qiQ5ktdO7CD6C/5/mYV4jku/7qnqzjrxb3C/Q5wR3vGGinHTgJZN/TdFT3ZX4vXhX2R1PXx42fB1cn5W+uJ4lg=="
},
"yn": {
"version": "3.1.0",

View File

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

View File

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

1731
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/core",
"version": "6.5.0",
"version": "6.5.3",
"description": "Modern, fast, powerful node.js web framework",
"scripts": {
"coverage": "nyc report --reporter=text-lcov | coveralls",
@@ -12,6 +12,7 @@
"build": "npm run clean && gulp build",
"prebuild:dev": "rm -rf node_modules/@nestjs",
"build:dev": "gulp build --dist node_modules/@nestjs && gulp move",
"build:samples": "gulp install:samples && npm run build:dev && gulp build:samples",
"postinstall": "opencollective",
"prerelease": "gulp copy-misc && gulp build --dist node_modules/@nestjs",
"publish": "npm run prerelease && npm run build && ./node_modules/.bin/lerna publish --force-publish --access public --exact -m \"chore(@nestjs) publish %s release\"",
@@ -38,30 +39,30 @@
"@nestjs/websockets": "6.1.1",
"@nuxtjs/opencollective": "0.2.2",
"amqp-connection-manager": "3.0.0",
"amqplib": "0.5.3",
"apollo-server-express": "2.6.7",
"amqplib": "0.5.5",
"apollo-server-express": "2.8.1",
"axios": "0.19.0",
"cache-manager": "2.9.1",
"cache-manager": "2.10.0",
"class-transformer": "0.2.3",
"class-validator": "0.9.1",
"class-validator": "0.10.0",
"cli-color": "1.4.0",
"connect": "3.7.0",
"cors": "2.8.5",
"engine.io-client": "3.3.2",
"express": "4.17.1",
"fast-json-stringify": "1.15.3",
"fast-json-stringify": "1.15.4",
"fast-safe-stringify": "2.0.6",
"fastify": "2.6.0",
"fastify": "2.7.1",
"fastify-cors": "2.1.3",
"fastify-formbody": "3.1.0",
"fastify-multipart": "1.0.1",
"graphql": "14.4.2",
"grpc": "1.22.0",
"fastify-multipart": "1.0.2",
"graphql": "14.5.0",
"grpc": "1.23.3",
"http2": "3.3.7",
"iterare": "1.2.0",
"merge-graphql-schemas": "1.5.8",
"merge-graphql-schemas": "1.7.0",
"mqtt": "3.0.0",
"multer": "1.4.1",
"multer": "1.4.2",
"nats": "1.3.0",
"object-hash": "1.3.1",
"optional": "0.1.4",
@@ -72,37 +73,39 @@
"rxjs": "6.5.2",
"rxjs-compat": "6.5.2",
"socket.io": "2.2.0",
"ts-morph": "3.1.0",
"uuid": "3.3.2"
"ts-morph": "3.1.3",
"uuid": "3.3.3"
},
"devDependencies": {
"@types/amqplib": "0.5.13",
"@types/cache-manager": "1.2.8",
"@types/chai": "4.1.7",
"@types/chai-as-promised": "7.1.0",
"@types/cors": "2.8.5",
"@types/express": "4.17.0",
"@types/chai": "4.2.0",
"@types/chai-as-promised": "7.1.2",
"@types/cors": "2.8.6",
"@types/express": "4.17.1",
"@types/fastify-cors": "2.1.0",
"@types/gulp": "4.0.6",
"@types/kafka-node": "2.0.8",
"@types/mocha": "5.2.7",
"@types/node": "10.14.12",
"@types/node": "10.14.16",
"@types/redis": "2.8.13",
"@types/reflect-metadata": "0.0.5",
"@types/sinon": "7.0.13",
"@types/socket.io": "2.1.2",
"@types/ws": "6.0.1",
"@types/ws": "6.0.3",
"artillery": "1.6.0-28",
"awesome-typescript-loader": "5.2.1",
"body-parser": "1.19.0",
"chai": "4.2.0",
"chai-as-promised": "7.1.1",
"clang-format": "1.2.4",
"concurrently": "4.1.1",
"conventional-changelog": "3.1.8",
"core-js": "3.1.4",
"coveralls": "3.0.4",
"concurrently": "4.1.2",
"conventional-changelog": "3.1.10",
"core-js": "3.2.1",
"coveralls": "3.0.6",
"csv-write-stream": "2.0.0",
"delete-empty": "3.0.0",
"fancy-log": "1.3.3",
"fastify-static": "2.5.0",
"gulp": "4.0.1",
"gulp-clang-format": "1.0.27",
@@ -114,17 +117,17 @@
"imports-loader": "0.8.0",
"json-loader": "0.5.7",
"lerna": "2.11.0",
"lint-staged": "9.1.0",
"lint-staged": "9.2.3",
"mocha": "3.5.3",
"nodemon": "1.19.1",
"nyc": "14.1.1",
"prettier": "1.18.2",
"sinon": "7.3.2",
"sinon": "7.4.1",
"sinon-chai": "3.3.0",
"socket.io-client": "2.2.0",
"supertest": "4.0.2",
"ts-node": "8.3.0",
"tslint": "5.18.0",
"tslint": "5.19.0",
"typescript": "3.5.3"
},
"collective": {

View File

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

View File

@@ -15,7 +15,6 @@
<a href="https://travis-ci.org/nestjs/nest" target="_blank"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
<a href="https://travis-ci.org/nestjs/nest" target="_blank"><img src="https://img.shields.io/travis/nestjs/nest/master.svg?label=linux" alt="Linux" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge" target="_blank"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -3,6 +3,12 @@ import { LoggerService } from '../services/logger.service';
import { Abstract } from './abstract.interface';
import { Type } from './type.interface';
/**
* @publicApi
*
* @description
* Interface defining NestApplicationContext.
*/
export interface INestApplicationContext {
/**
* Allows navigating through the modules tree, for example, to pull out a specific instance from the selected module.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,4 @@
import { expect } from 'chai';
import * as sinon from 'sinon';
import { ArgumentMetadata } from '../../interfaces';
import { ParseUUIDPipe } from '../../pipes/parse-uuid.pipe';
@@ -56,7 +55,7 @@ describe('ParseUUIDPipe', () => {
});
it('should throw an error - v5 ', async () => {
target = new ParseUUIDPipe({ version: '4' });
target = new ParseUUIDPipe({ version: '5' });
expect(target.transform('123a', {} as ArgumentMetadata)).to.be.rejected;
expect(target.transform(v3, {} as ArgumentMetadata)).to.be.rejected;
expect(target.transform(v4, {} as ArgumentMetadata)).to.be.rejected;

1
packages/core/PACKAGE.md Normal file
View File

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

View File

@@ -15,7 +15,6 @@
<a href="https://travis-ci.org/nestjs/nest" target="_blank"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
<a href="https://travis-ci.org/nestjs/nest" target="_blank"><img src="https://img.shields.io/travis/nestjs/nest/master.svg?label=linux" alt="Linux" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge" target="_blank"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>

View File

@@ -3,6 +3,13 @@ import { RequestHandler } from '@nestjs/common/interfaces';
import { CorsOptions } from '@nestjs/common/interfaces/external/cors-options.interface';
import { NestApplicationOptions } from '@nestjs/common/interfaces/nest-application-options.interface';
/**
* @publicApi
*
* @description
*
* This is the AbstractHttpAdapter
*/
export abstract class AbstractHttpAdapter<
TServer = any,
TRequest = any,

View File

@@ -1,7 +1,7 @@
import { ForbiddenException, ParamData } from '@nestjs/common';
import { CUSTOM_ROUTE_AGRS_METADATA } from '@nestjs/common/constants';
import { Controller, Transform } from '@nestjs/common/interfaces';
import { isFunction } from '@nestjs/common/utils/shared.utils';
import { Controller, PipeTransform } from '@nestjs/common/interfaces';
import { isEmpty, isFunction } from '@nestjs/common/utils/shared.utils';
import { FORBIDDEN_MESSAGE } from '../guards/constants';
import { GuardsConsumer } from '../guards/guards-consumer';
import { GuardsContextCreator } from '../guards/guards-context-creator';
@@ -292,7 +292,7 @@ export class ExternalContextCreator {
}
public createPipesFn(
pipes: any[],
pipes: PipeTransform[],
paramsOptions: (ParamProperties & { metatype?: any })[],
) {
const pipesFn = async (args: any[], ...params: any[]) => {
@@ -322,13 +322,11 @@ export class ExternalContextCreator {
public async getParamValue<T>(
value: T,
{ metatype, type, data }: { metatype: any; type: any; data: any },
transforms: Transform<any>[],
pipes: PipeTransform[],
): Promise<any> {
return this.pipesConsumer.apply(
value,
{ metatype, type, data },
transforms,
);
return isEmpty(pipes)
? value
: this.pipesConsumer.apply(value, { metatype, type, data }, pipes);
}
public async transformToResult(resultOrDeffered: any) {

View File

@@ -1,4 +1,5 @@
import { Controller } from '@nestjs/common/interfaces';
import * as hash from 'object-hash';
import { ContextId } from './../injector/instance-wrapper';
import { ParamProperties } from './context-utils';
@@ -36,7 +37,7 @@ export class HandlerMetadataStorage<TValue = HandlerMetadata, TKey = any> {
private getMetadataKey(controller: Controller, methodName: string): string {
const ctor = controller.constructor;
const controllerKey = ctor && ctor.name;
const controllerKey = ctor && hash(ctor);
return controllerKey + methodName;
}
}

View File

@@ -13,7 +13,7 @@ import {
*
* @param instance The instance which should be checked
*/
function hasOnAppBootstrapHook(
function hasOnAppShutdownHook(
instance: unknown,
): instance is OnApplicationShutdown {
return !isUndefined(
@@ -30,7 +30,7 @@ function callOperator(
): Promise<any>[] {
return iterate(instances)
.filter(instance => !isNil(instance))
.filter(hasOnAppBootstrapHook)
.filter(hasOnAppShutdownHook)
.map(async instance =>
((instance as any) as OnApplicationShutdown).onApplicationShutdown(
signal,
@@ -61,7 +61,7 @@ export async function callAppShutdownHook(
await Promise.all(callOperator(transientInstances, signal));
// Call the instance itself
if (moduleClassInstance && hasOnAppBootstrapHook(moduleClassInstance)) {
if (moduleClassInstance && hasOnAppShutdownHook(moduleClassInstance)) {
await (moduleClassInstance as OnApplicationShutdown).onApplicationShutdown(
signal,
);

View File

@@ -248,6 +248,11 @@ export class MiddlewareModule {
) {
const prefix = this.config.getGlobalPrefix();
const basePath = validatePath(prefix);
if (basePath && path === '/*') {
// strip slash when a wildcard is being used
// and global prefix has been set
path = '*';
}
router(basePath + path, proxy);
}
}

View File

@@ -19,6 +19,9 @@ import { ContainerScanner } from './injector/container-scanner';
import { Module } from './injector/module';
import { ModuleTokenFactory } from './injector/module-token-factory';
/**
* @publicApi
*/
export class NestApplicationContext implements INestApplicationContext {
private readonly moduleTokenFactory = new ModuleTokenFactory();
private readonly containerScanner: ContainerScanner;

View File

@@ -32,6 +32,9 @@ const { SocketModule } =
const { MicroservicesModule } =
optional('@nestjs/microservices/microservices-module') || ({} as any);
/**
* @publicApi
*/
export class NestApplication extends NestApplicationContext
implements INestApplication {
private readonly logger = new Logger(NestApplication.name, true);
@@ -222,7 +225,7 @@ export class NestApplication extends NestApplicationContext
public async close(): Promise<any> {
this.socketModule && (await this.socketModule.close());
this.httpAdapter && this.httpAdapter.close();
this.httpAdapter && (await this.httpAdapter.close());
await Promise.all(
iterate(this.microservices).map(async microservice => {

View File

@@ -23,16 +23,35 @@ import { NestApplication } from './nest-application';
import { NestApplicationContext } from './nest-application-context';
import { DependenciesScanner } from './scanner';
/**
* @publicApi
*/
export class NestFactoryStatic {
private readonly logger = new Logger('NestFactory', true);
/**
* Creates an instance of the NestApplication
* @returns {Promise}
* Creates an instance of NestApplication.
*
* @param module Entry (root) application module class
* @param options List of options to initialize NestApplication
*
* @returns A promise that, when resolved,
* contains a reference to the NestApplication instance.
*/
public async create<T extends INestApplication = INestApplication>(
module: any,
options?: NestApplicationOptions,
): Promise<T>;
/**
* Creates an instance of NestApplication with the specified `httpAdapter`
*
* @param module Entry (root) application module class
* @param httpAdapter Adapter to proxy the request/response cycle to
* the underlying HTTP server
* @param options List of options to initialize NestApplication
*
* @returns A promise that, when resolved,
* contains a reference to the NestApplication instance.
*/
public async create<T extends INestApplication = INestApplication>(
module: any,
httpAdapter: AbstractHttpAdapter,
@@ -65,11 +84,13 @@ export class NestFactoryStatic {
}
/**
* Creates an instance of the NestMicroservice
* Creates an instance of NestMicroservice
*
* @param {} module Entry (root) application module class
* @param {NestMicroserviceOptions & MicroserviceOptions} options Optional microservice configuration
* @returns {Promise}
* @param module Entry (root) application module class
* @param options Optional microservice configuration
*
* @returns A promise that, when resolved,
* contains a reference to the NestMicroservice instance.
*/
public async createMicroservice(
module: any,
@@ -92,11 +113,13 @@ export class NestFactoryStatic {
}
/**
* Creates an instance of the NestApplicationContext
* Creates an instance of NestApplicationContext
*
* @param {} module Entry (root) application module class
* @param {NestApplicationContextOptions} options Optional Nest application configuration
* @returns {Promise}
* @param module Entry (root) application module class
* @param options Optional Nest application configuration
*
* @returns A promise that, when resolved,
* contains a reference to the NestApplicationContext instance.
*/
public async createApplicationContext(
module: any,
@@ -213,4 +236,49 @@ export class NestFactoryStatic {
}
}
/**
* @publicApi
*
* @description
*
* Use NestFactory to create an application instance.
*
* @usageNotes
*
* ### [Any Application] Specifying an entry module
* Pass the required *root module* for the application via the module parameter.
* By convention, it is usually called `ApplicationModule`. Starting with this
* module, Nest assembles the dependency graph and begins the process of
* Dependency Injection and instantiates the classes needed to launch your
* application.
*
* ```typescript
* import { NestFactory } from '@nestjs/core';
* import { ApplicationModule } from './app.module';
*
* async function bootstrap() {
* const app = await NestFactory.create(ApplicationModule);
* await app.listen(3000);
* }
* bootstrap();
* ```
*
* ### [NestApplication only] Providing an httpAdapter object
* In this example, we create a NestApplication that uses the `FastifyAdapter`.
* Pass options to `Fastify` by passing an options object into the
* `FastifyAdapter()` constructor. Note that if the `httpAdapter` is not
* `Express`, the supporting package (e.g., `@nestjs/platform-fastify`) must be
* installed.
*
* ```typescript
* async function bootstrap() {
* const app = await NestFactory.create<NestFastifyApplication>(
* ApplicationModule,
* new FastifyAdapter(),
* );
* await app.listen(3000);
* }
* bootstrap();
* ```
*/
export const NestFactory = new NestFactoryStatic();

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/core",
"version": "6.5.0",
"version": "6.5.3",
"description": "Nest - modern, fast, powerful node.js web framework (@core)",
"author": "Kamil Mysliwiec",
"license": "MIT",
@@ -27,7 +27,7 @@
"iterare": "1.2.0",
"object-hash": "1.3.1",
"optional": "0.1.4",
"uuid": "3.3.2"
"uuid": "3.3.3"
},
"peerDependencies": {
"@nestjs/common": "^6.0.0",

View File

@@ -1,5 +1,5 @@
import { RouteParamtypes } from '@nestjs/common/enums/route-paramtypes.enum';
import { ArgumentMetadata, Transform } from '@nestjs/common/interfaces';
import { ArgumentMetadata, PipeTransform } from '@nestjs/common/interfaces';
import { ParamsTokenFactory } from './params-token-factory';
export class PipesConsumer {
@@ -8,22 +8,22 @@ export class PipesConsumer {
public async apply<TInput = any>(
value: TInput,
{ metatype, type, data }: ArgumentMetadata,
transforms: Transform<any>[],
pipes: PipeTransform[],
) {
const token = this.paramsTokenFactory.exchangeEnumForString(
(type as any) as RouteParamtypes,
);
return this.applyPipes(value, { metatype, type: token, data }, transforms);
return this.applyPipes(value, { metatype, type: token, data }, pipes);
}
public async applyPipes<TInput = any>(
value: TInput,
{ metatype, type, data }: { metatype: any; type?: any; data?: any },
transforms: Transform<any>[],
transforms: PipeTransform[],
) {
return transforms.reduce(async (defferedValue, fn) => {
return transforms.reduce(async (defferedValue, pipe) => {
const val = await defferedValue;
const result = fn(val, { metatype, type, data });
const result = pipe.transform(val, { metatype, type, data });
return result;
}, Promise.resolve(value));
}

View File

@@ -1,9 +1,5 @@
import { PIPES_METADATA } from '@nestjs/common/constants';
import {
Controller,
PipeTransform,
Transform,
} from '@nestjs/common/interfaces';
import { Controller, PipeTransform } from '@nestjs/common/interfaces';
import { isEmpty, isFunction } from '@nestjs/common/utils/shared.utils';
import iterate from 'iterare';
import { ApplicationConfig } from '../application-config';
@@ -28,7 +24,7 @@ export class PipesContextCreator extends ContextCreator {
module: string,
contextId = STATIC_CONTEXT,
inquirerId?: string,
): Transform<any>[] {
): PipeTransform[] {
this.moduleContext = module;
return this.createContext(
instance,
@@ -51,7 +47,6 @@ export class PipesContextCreator extends ContextCreator {
.filter((pipe: any) => pipe && (pipe.name || pipe.transform))
.map(pipe => this.getPipeInstance(pipe, contextId, inquirerId))
.filter(pipe => pipe && pipe.transform && isFunction(pipe.transform))
.map(pipe => pipe.transform.bind(pipe))
.toArray() as R;
}

View File

@@ -14,7 +14,7 @@ import {
} from '@nestjs/common/constants';
import { RouteParamsMetadata } from '@nestjs/common/decorators';
import { RouteParamtypes } from '@nestjs/common/enums/route-paramtypes.enum';
import { Controller, Transform } from '@nestjs/common/interfaces';
import { Controller } from '@nestjs/common/interfaces';
import {
isEmpty,
isFunction,
@@ -285,21 +285,22 @@ export class RouterExecutionContext {
type,
data,
}: { metatype: any; type: RouteParamtypes; data: any },
transforms: Transform<any>[],
pipes: PipeTransform[],
): Promise<any> {
if (
type === RouteParamtypes.BODY ||
type === RouteParamtypes.QUERY ||
type === RouteParamtypes.PARAM ||
isString(type)
(type === RouteParamtypes.BODY ||
type === RouteParamtypes.QUERY ||
type === RouteParamtypes.PARAM ||
isString(type)) &&
!isEmpty(pipes)
) {
return this.pipesConsumer.apply(
value,
{ metatype, type, data } as any,
transforms,
pipes,
);
}
return Promise.resolve(value);
return value;
}
public createGuardsFn(
@@ -322,7 +323,7 @@ export class RouterExecutionContext {
}
public createPipesFn(
pipes: any[],
pipes: PipeTransform[],
paramsOptions: (ParamProperties & { metatype?: any })[],
) {
const pipesFn = async <TRequest, TResponse>(

View File

@@ -3,7 +3,6 @@ import { RouteParamtypes } from '@nestjs/common/enums/route-paramtypes.enum';
import { expect } from 'chai';
import { of } from 'rxjs';
import * as sinon from 'sinon';
import { ApplicationConfig } from '../../application-config';
import { ExternalExceptionFilterContext } from '../../exceptions/external-exception-filter-context';
import { GuardsConsumer } from '../../guards/guards-consumer';
import { GuardsContextCreator } from '../../guards/guards-context-creator';
@@ -42,9 +41,7 @@ describe('ExternalContextCreator', () => {
new ModulesContainer(),
new PipesContextCreator(new NestContainer()),
consumer,
new ExternalExceptionFilterContext(
new NestContainer()
),
new ExternalExceptionFilterContext(new NestContainer()),
);
});
describe('create', () => {
@@ -218,7 +215,7 @@ describe('ExternalContextCreator', () => {
let consumerApplySpy: sinon.SinonSpy;
const value = 3,
metatype = null,
transforms = [];
transforms = [{ transform: sinon.spy() }];
beforeEach(() => {
consumerApplySpy = sinon.spy(consumer, 'apply');

View File

@@ -81,6 +81,10 @@ describe('MiddlewareModule', () => {
const useSpy = sinon.spy();
const app = { use: useSpy };
const nestContainer = new NestContainer();
// tslint:disable-next-line:no-string-literal
middlewareModule['container'] = nestContainer;
expect(
middlewareModule.registerRouteMiddleware(
new MiddlewareContainer(),

View File

@@ -1,7 +1,9 @@
import * as sinon from 'sinon';
import { expect } from 'chai';
import { PipesConsumer } from '../../pipes/pipes-consumer';
import * as sinon from 'sinon';
import { RouteParamtypes } from '../../../common/enums/route-paramtypes.enum';
import { PipesConsumer } from '../../pipes/pipes-consumer';
const createPipe = (transform: Function) => ({ transform });
describe('PipesConsumer', () => {
let consumer: PipesConsumer;
@@ -16,15 +18,19 @@ describe('PipesConsumer', () => {
(metatype = {}), (type = RouteParamtypes.QUERY);
stringifiedType = 'query';
transforms = [
sinon.stub().callsFake(val => val + 1),
sinon.stub().callsFake(val => Promise.resolve(val + 1)),
sinon.stub().callsFake(val => val + 1),
createPipe(sinon.stub().callsFake(val => val + 1)),
createPipe(sinon.stub().callsFake(val => Promise.resolve(val + 1))),
createPipe(sinon.stub().callsFake(val => val + 1)),
];
});
it('should call all transform functions', done => {
consumer.apply(value, { metatype, type, data }, transforms).then(() => {
expect(transforms.reduce((prev, next) => prev && next.called, true)).to
.be.true;
expect(
transforms.reduce(
(prev, next) => prev && next.transform.called,
true,
),
).to.be.true;
done();
});
});

View File

@@ -91,7 +91,7 @@ describe('RouterExecutionContext', () => {
let tryActivateStub;
beforeEach(() => {
instance = { foo: 'bar' };
let canActivateFn = contextCreator.createGuardsFn([1], null, null);
const canActivateFn = contextCreator.createGuardsFn([1], null, null);
sinon.stub(contextCreator, 'createGuardsFn').returns(canActivateFn);
tryActivateStub = sinon
.stub(guardsConsumer, 'tryActivate')
@@ -146,8 +146,7 @@ describe('RouterExecutionContext', () => {
});
});
it('should apply expected context when "intercept" apply', () => {
let interceptStub = sinon
.stub(interceptorsConsumer, 'intercept');
const interceptStub = sinon.stub(interceptorsConsumer, 'intercept');
proxyContext(request, response, next).then(() => {
expect(interceptStub.args[0][1][0]).to.equals(request);
expect(interceptStub.args[0][1][1]).to.equals(response);
@@ -212,7 +211,7 @@ describe('RouterExecutionContext', () => {
let consumerApplySpy: sinon.SinonSpy;
const value = 3,
metatype = null,
transforms = [];
transforms = [{ transform: sinon.spy() }];
beforeEach(() => {
consumerApplySpy = sinon.spy(consumer, 'apply');

View File

@@ -15,7 +15,6 @@
<a href="https://travis-ci.org/nestjs/nest" target="_blank"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
<a href="https://travis-ci.org/nestjs/nest" target="_blank"><img src="https://img.shields.io/travis/nestjs/nest/master.svg?label=linux" alt="Linux" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge" target="_blank"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>

View File

@@ -37,7 +37,7 @@ export interface ClientOpts {
url?: string;
}
export interface RedisClient extends NodeJS.EventEmitter {
export interface RedisClient {
// event: connect
// event: error
// event: message
@@ -82,18 +82,16 @@ export interface RedisClient extends NodeJS.EventEmitter {
// Strings (http://redis.io/commands#strings)
append(key: string, value: string, callback?: any): boolean;
bitcount(key: string, callback?: any): boolean;
bitcount(
key: string,
start: number,
end: number,
callback?: any,
): boolean;
bitcount(key: string, start: number, end: number, callback?: any): boolean;
set(key: string, value: string, callback?: any): boolean;
get(key: string, callback?: any): boolean;
exists(key: string, value: string, callback?: any): boolean;
publish(channel: string, value: any): boolean;
subscribe(channel: string): boolean;
on(event: string, callback: Function): any;
off(event: string, callback: Function): any;
addListener(event: string, callback: Function): any;
/*
commands = set_union([

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/microservices",
"version": "6.5.0",
"version": "6.5.3",
"description": "Nest - modern, fast, powerful node.js web framework (@microservices)",
"author": "Kamil Mysliwiec",
"license": "MIT",

View File

@@ -11,12 +11,16 @@ class TestClientProxy extends ClientProxy {
protected async dispatchEvent<T = any>(
packet: ReadPacket<any>,
): Promise<any> {}
public async connect() {}
public async connect() {
return Promise.resolve();
}
public publish(pattern, callback): any {}
public close() {}
public async close() {}
}
describe('ClientProxy', () => {
describe('ClientProxy', function() {
this.retries(10);
let client: TestClientProxy;
beforeEach(() => {
client = new TestClientProxy();
@@ -106,7 +110,9 @@ describe('ClientProxy', () => {
});
describe('when is connected', () => {
beforeEach(() => {
sinon.stub(client, 'connect').callsFake(() => Promise.resolve());
try {
sinon.stub(client, 'connect').callsFake(() => Promise.resolve());
} catch {}
});
it(`should call "publish"`, () => {
const pattern = { test: 3 };

View File

@@ -5,8 +5,10 @@ import * as sinon from 'sinon';
import { ClientRMQ } from '../../client/client-rmq';
// tslint:disable:no-string-literal
describe('ClientRQM', () => {
const client = new ClientRMQ({});
describe('ClientRMQ', function() {
this.retries(10);
let client: ClientRMQ;
describe('connect', () => {
let createClientStub: sinon.SinonStub;
@@ -15,6 +17,7 @@ describe('ClientRQM', () => {
let mergeDisconnectEvent: sinon.SinonStub;
beforeEach(async () => {
client = new ClientRMQ({});
createClientStub = sinon.stub(client, 'createClient').callsFake(() => ({
addListener: () => ({}),
removeListener: () => ({}),
@@ -33,16 +36,12 @@ describe('ClientRQM', () => {
.stub(client, 'mergeDisconnectEvent')
.callsFake((_, source) => source);
});
afterEach(() => {
createClientStub.restore();
handleErrorsSpy.restore();
connect$Stub.restore();
mergeDisconnectEvent.restore();
});
describe('when is not connected', () => {
beforeEach(async () => {
client['client'] = null;
await client.connect();
try {
client['client'] = null;
await client.connect();
} catch {}
});
it('should call "handleError" once', async () => {
expect(handleErrorsSpy.called).to.be.true;

View File

@@ -47,9 +47,9 @@ describe('transformPatternToRoute', () => {
];
const expectedResults = [
`{controller:app/use:getHello}`,
`{controller:app/use:getHello}`,
`{controller:app/id:150/service:one/use:getHello}`,
JSON.stringify(testPatterns[0]),
`{"controller":"app","use":"getHello"}`,
`{"controller":"app","id":150,"service":"one","use":"getHello"}`,
];
equalTest(testPatterns, expectedResults);
@@ -60,7 +60,7 @@ describe('transformPatternToRoute', () => {
const testPatterns = [
{
controller: 'app',
use: { p1: 'path1', p2: 'path2' },
use: { p1: 'path1', p2: 'path2', p3: 10 },
},
{
use: { p1: 'path1', p2: 'path2' },
@@ -74,9 +74,9 @@ describe('transformPatternToRoute', () => {
];
const expectedResults = [
`{controller:app/use:{p1:path1/p2:path2}}`,
`{controller:app/use:{p1:path1/p2:path2}}`,
`{controller:app/service:one/use:{id:160/p1:path1/p2:path2}}`,
JSON.stringify(testPatterns[0]),
`{"controller":"app","use":{"p1":"path1","p2":"path2"}}`,
`{"controller":"app","service":"one","use":{"id":160,"p1":"path1","p2":"path2"}}`,
];
equalTest(testPatterns, expectedResults);
@@ -101,9 +101,9 @@ describe('transformPatternToRoute', () => {
];
const expectedResults = [
`{controller:app/use:{p1:path1/p2:{pp1:ppath1}}}`,
`{controller:{p2:path2}/use:{p1:path1}}`,
`{controller:{p1:{id:180/pp1:ppath1}}/service:one/use:{p1:path1/p2:{pp1:ppath1}}}`,
JSON.stringify(testPatterns[0]),
`{"controller":{"p2":"path2"},"use":{"p1":"path1"}}`,
`{"controller":{"p1":{"id":180,"pp1":"ppath1"}},"service":"one","use":{"p1":"path1","p2":{"pp1":"ppath1"}}}`,
];
equalTest(testPatterns, expectedResults);

View File

@@ -26,10 +26,14 @@ export function transformPatternToRoute(pattern: MsPattern): string {
);
// Creates the array of Pattern params from sorted keys and their corresponding values
const sortedPatternParams = sortedKeys.map(
key => `${key}:${transformPatternToRoute(pattern[key])}`,
);
const sortedPatternParams = sortedKeys.map(key => {
let partialRoute = `"${key}":`;
partialRoute += isString(pattern[key])
? `"${transformPatternToRoute(pattern[key])}"`
: transformPatternToRoute(pattern[key]);
return partialRoute;
});
const route = sortedPatternParams.join('/');
const route = sortedPatternParams.join(',');
return `{${route}}`;
}

View File

@@ -15,7 +15,6 @@
<a href="https://travis-ci.org/nestjs/nest" target="_blank"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
<a href="https://travis-ci.org/nestjs/nest" target="_blank"><img src="https://img.shields.io/travis/nestjs/nest/master.svg?label=linux" alt="Linux" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge" target="_blank"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>

View File

@@ -1,6 +1,14 @@
import { INestApplication } from '@nestjs/common';
import { ServeStaticOptions } from './serve-static-options.interface';
/**
* @publicApi
*
* @description
* Interface describing methods on NestExpressApplication.
*
* @see [Platform](https://docs.nestjs.com/first-steps#platform)
*/
export interface NestExpressApplication extends INestApplication {
/**
* A wrapper function around native `express.set()` method.

View File

@@ -1,5 +1,11 @@
/**
* @see https://www.npmjs.com/package/@types/serve-static
* @publicApi
*
* @description
* Interface describing options for serving static assets.
*
* @see [Serving static files in Express](https://expressjs.com/en/starter/static-files.html)
* @see [Model-View-Controller](https://docs.nestjs.com/techniques/mvc)
*/
export interface ServeStaticOptions {
/**
@@ -60,10 +66,10 @@ export interface ServeStaticOptions {
/**
* Function to set custom headers on response. Alterations to the headers need to occur synchronously.
* The function is called as fn(res, path, stat), where the arguments are:
* res the response object
* path the file path that is being sent
* stat the stat object of the file that is being sent
* The function is called as `fn(res, path, stat)`, where the arguments are:
* `res` - the response object
* `path` - the file path that is being sent
* `stat` - the stat object of the file that is being sent
*/
setHeaders?: (res: any, path: string, stat: any) => any;

View File

@@ -1,3 +1,4 @@
export * from './any-files.interceptor';
export * from './file-fields.interceptor';
export * from './file.interceptor';
export * from './files.interceptor';

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/platform-express",
"version": "6.5.0",
"version": "6.5.3",
"description": "Nest - modern, fast, powerful node.js web framework (@platform-express)",
"author": "Kamil Mysliwiec",
"license": "MIT",
@@ -15,7 +15,7 @@
"body-parser": "1.19.0",
"cors": "2.8.5",
"express": "4.17.1",
"multer": "1.4.1"
"multer": "1.4.2"
},
"peerDependencies": {
"@nestjs/common": "^6.0.0",

View File

@@ -15,7 +15,6 @@
<a href="https://travis-ci.org/nestjs/nest" target="_blank"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
<a href="https://travis-ci.org/nestjs/nest" target="_blank"><img src="https://img.shields.io/travis/nestjs/nest/master.svg?label=linux" alt="Linux" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge" target="_blank"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/platform-fastify",
"version": "6.5.0",
"version": "6.5.3",
"description": "Nest - modern, fast, powerful node.js web framework (@platform-fastify)",
"author": "Kamil Mysliwiec",
"license": "MIT",
@@ -12,7 +12,7 @@
"access": "public"
},
"dependencies": {
"fastify": "2.6.0",
"fastify": "2.7.1",
"fastify-cors": "2.1.3",
"fastify-formbody": "3.1.0",
"path-to-regexp": "3.0.0"

View File

@@ -15,7 +15,6 @@
<a href="https://travis-ci.org/nestjs/nest" target="_blank"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
<a href="https://travis-ci.org/nestjs/nest" target="_blank"><img src="https://img.shields.io/travis/nestjs/nest/master.svg?label=linux" alt="Linux" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge" target="_blank"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/platform-socket.io",
"version": "6.5.0",
"version": "6.5.3",
"description": "Nest - modern, fast, powerful node.js web framework (@platform-socket.io)",
"author": "Kamil Mysliwiec",
"license": "MIT",

View File

@@ -15,7 +15,6 @@
<a href="https://travis-ci.org/nestjs/nest" target="_blank"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
<a href="https://travis-ci.org/nestjs/nest" target="_blank"><img src="https://img.shields.io/travis/nestjs/nest/master.svg?label=linux" alt="Linux" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge" target="_blank"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>

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