Compare commits

...

155 Commits

Author SHA1 Message Date
Kamil Myśliwiec
0712346adc feature(): use metadata cache for headers and status code 2019-04-10 12:52:40 +02:00
Kamil Myśliwiec
1dfc81459c Merge branch 'feature/change-http-code-interceptor' of https://github.com/ToonvanStrijp/nest into ToonvanStrijp-feature/change-http-code-interceptor 2019-04-10 12:39:15 +02:00
Kamil Myśliwiec
48137df07d test(): fix broken unit tests (tcp) 2019-04-10 11:56:04 +02:00
Kamil Myśliwiec
c687421c03 bugfix(platform-fastify): add missing constructor interfaces (http, http2) #1950 2019-04-10 11:40:08 +02:00
Kamil Myśliwiec
b04d2bbc91 bugfix(microservices): use host property in TcpServer 2019-04-10 11:35:09 +02:00
Kamil Myśliwiec
098eb3b4f6 Merge branch 'master' of https://github.com/nestjs/nest 2019-04-08 21:37:23 +02:00
Kamil Myśliwiec
c29144c5c0 tests(): hotfix (client proxy) createObserver issue 2019-04-08 21:32:47 +02:00
Toon van Strijp
21c22d5af3 change header interceptor in hello-world e2e to take multiple headers if needed. 2019-04-06 15:49:42 +02:00
Kamil Mysliwiec
1a64c893c7 Merge pull request #1941 from nestjs/renovate/fastify-2.x
fix(deps): update dependency fastify to v2.2.0
2019-04-06 09:57:26 +02:00
Kamil Mysliwiec
8ce7cfd677 Merge pull request #1946 from nestjs/renovate/core-js-3.x
chore(deps): update dependency core-js to v3.0.1
2019-04-06 09:57:15 +02:00
Kamil Mysliwiec
7d31f7a7ab Merge pull request #1944 from nestjs/renovate/ts-jest-24.x
chore(deps): update dependency ts-jest to v24.0.2
2019-04-06 09:57:05 +02:00
Kamil Mysliwiec
e444600f4d Merge pull request #1945 from nestjs/renovate/mongodb-3.x
fix(deps): update dependency mongodb to v3.2.3
2019-04-06 09:56:58 +02:00
Kamil Mysliwiec
24f67c911a Merge pull request #1943 from nestjs/renovate/typescript-3.x
fix(deps): update dependency typescript to v3.4.2
2019-04-06 09:56:45 +02:00
Kamil Mysliwiec
dba1bb8d86 Merge pull request #1929 from nestjs/renovate/fast-json-stringify-1.x
fix(deps): update dependency fast-json-stringify to v1.14.0
2019-04-06 09:56:38 +02:00
Kamil Mysliwiec
347d51d77f Merge pull request #1940 from nestjs/renovate/fastify-multipart-0.x
fix(deps): update dependency fastify-multipart to v0.8.0
2019-04-06 09:56:24 +02:00
Kamil Mysliwiec
59267796ec Merge pull request #1931 from nestjs/renovate/jest-monorepo
chore(deps): update dependency jest to v24.7.1
2019-04-06 09:56:04 +02:00
Kamil Mysliwiec
4152540051 Merge pull request #1934 from nestjs/renovate/mongoose-5.x
fix(deps): update dependency mongoose to v5.4.22
2019-04-06 09:55:57 +02:00
Kamil Mysliwiec
13d8b3e9fe Merge pull request #1928 from nestjs/renovate/sequelize-5.x
fix(deps): update dependency sequelize to v5.2.12
2019-04-06 09:55:40 +02:00
Renovate Bot
af0c2085bb chore(deps): update dependency core-js to v3.0.1 2019-04-06 07:33:47 +00:00
Renovate Bot
283de2ec40 fix(deps): update dependency mongodb to v3.2.3 2019-04-05 22:12:13 +00:00
Renovate Bot
bff7901078 chore(deps): update dependency ts-jest to v24.0.2 2019-04-05 22:12:02 +00:00
Renovate Bot
59304b0856 fix(deps): update dependency typescript to v3.4.2 2019-04-05 21:13:47 +00:00
Renovate Bot
253c959e88 fix(deps): update dependency fastify to v2.2.0 2019-04-05 19:35:50 +00:00
Renovate Bot
b056a80ead fix(deps): update dependency fastify-multipart to v0.8.0 2019-04-05 19:20:14 +00:00
Toon van Strijp
6618badc23 removed set header code before running interceptors. Added e2e test for testing header override. 2019-04-05 11:40:16 +02:00
Renovate Bot
422880f84e fix(deps): update dependency sequelize to v5.2.12 2019-04-04 15:57:16 +00:00
Renovate Bot
33f7e6f37b fix(deps): update dependency mongoose to v5.4.22 2019-04-04 15:12:18 +00:00
Renovate Bot
417b8a72cd fix(deps): update dependency fast-json-stringify to v1.14.0 2019-04-04 07:47:00 +00:00
Renovate Bot
e7c2a4e7b1 chore(deps): update dependency jest to v24.7.1 2019-04-04 02:05:32 +00:00
Kamil Mysliwiec
08ea60e620 Merge pull request #1909 from nestjs/renovate/amqp-connection-manager-2.x
fix(deps): update dependency amqp-connection-manager to v2.3.1
2019-04-03 12:36:36 +02:00
Kamil Mysliwiec
6be6f14d7c Merge pull request #1912 from nestjs/renovate/ts-morph-1.x
fix(deps): update dependency ts-morph to v1.3.3
2019-04-03 12:36:21 +02:00
Kamil Mysliwiec
85b166fc6d Merge pull request #1913 from nestjs/renovate/tslint-5.x
chore(deps): update dependency tslint to v5.15.0
2019-04-03 12:36:15 +02:00
Kamil Mysliwiec
8e6fb080f9 Merge pull request #1917 from nestjs/renovate/sequelize-5.x
fix(deps): update dependency sequelize to v5.2.10
2019-04-03 12:36:06 +02:00
Kamil Mysliwiec
00e121a702 Merge pull request #1918 from nestjs/renovate/nestjs-graphql-6.x
fix(deps): update dependency @nestjs/graphql to v6.0.5
2019-04-03 12:36:00 +02:00
Kamil Mysliwiec
8ebd26d586 Merge pull request #1902 from nestjs/renovate/fast-json-stringify-1.x
fix(deps): update dependency fast-json-stringify to v1.13.0
2019-04-03 12:34:50 +02:00
Kamil Mysliwiec
40769fcca1 Merge pull request #1911 from nestjs/renovate/jest-monorepo
chore(deps): update dependency jest to v24.7.0
2019-04-03 12:34:40 +02:00
Kamil Mysliwiec
9311abb33f Merge pull request #1921 from nestjs/renovate/graphql-subscriptions-1.x
fix(deps): update dependency graphql-subscriptions to v1.1.0
2019-04-03 12:34:22 +02:00
Kamil Mysliwiec
8a7bc79297 Merge pull request #1922 from nestjs/renovate/mongoose-5.x
fix(deps): update dependency mongoose to v5.4.21
2019-04-03 12:34:14 +02:00
Renovate Bot
9ff511d6cd fix(deps): update dependency sequelize to v5.2.10 2019-04-03 05:04:39 +00:00
Renovate Bot
cf01bd29ed chore(deps): update dependency jest to v24.7.0 2019-04-03 04:52:20 +00:00
Renovate Bot
74a5bb5d1d fix(deps): update dependency mongoose to v5.4.21 2019-04-02 16:59:35 +00:00
Renovate Bot
6168c34607 fix(deps): update dependency graphql-subscriptions to v1.1.0 2019-04-02 16:28:39 +00:00
Renovate Bot
54012efa82 fix(deps): update dependency @nestjs/graphql to v6.0.5 2019-04-02 10:13:50 +00:00
Renovate Bot
7050f78851 chore(deps): update dependency tslint to v5.15.0 2019-04-01 23:57:08 +00:00
Renovate Bot
a76e17c0ff fix(deps): update dependency ts-morph to v1.3.3 2019-04-01 22:56:07 +00:00
Renovate Bot
629224b8a3 fix(deps): update dependency amqp-connection-manager to v2.3.1 2019-04-01 20:06:41 +00:00
Toon van Strijp
152140085b reverted reply signature to have statusCode 2019-04-01 11:47:37 +02:00
Toon van Strijp
6415633097 fixed unit tests 2019-04-01 09:24:09 +02:00
Renovate Bot
3d6c0a4925 fix(deps): update dependency fast-json-stringify to v1.13.0 2019-04-01 07:23:39 +00:00
Toon van Strijp
922bbc3e57 set http status code before running interceptors
added unit test and integration test
changes http adapter to not send  http status in reply
2019-04-01 01:02:09 +02:00
Kamil Mysliwiec
d5fce7845e Merge pull request #1896 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo to v6.0.5
2019-03-31 22:00:45 +02:00
Kamil Myśliwiec
13f44328d1 chore(): publish 6.0.5 version 2019-03-31 21:06:16 +02:00
Renovate Bot
45e315741b fix(deps): update nest monorepo to v6.0.5 2019-03-31 19:05:47 +00:00
Kamil Myśliwiec
2e895033f7 chore(@nestjs) publish v6.0.5 release 2019-03-31 20:56:14 +02:00
Kamil Mysliwiec
00f7c5746b Merge pull request #1877 from nestjs/renovate/typescript-3.x
fix(deps): update dependency typescript to v3.4.1
2019-03-31 20:53:45 +02:00
Kamil Mysliwiec
be093f3f30 Merge branch 'master' into renovate/typescript-3.x 2019-03-31 20:53:38 +02:00
Kamil Mysliwiec
62004c1762 Merge pull request #1881 from blueway/master
bugfix(fastify): fix the fastify adapter cors options config
2019-03-31 20:49:36 +02:00
Kamil Mysliwiec
89b2f69a7e Merge pull request #1895 from nestjs/renovate/sequelize-typescript-0.x
fix(deps): update dependency sequelize-typescript to v0.6.9
2019-03-31 20:49:16 +02:00
Kamil Myśliwiec
5d3d2f449d bugfix(microservices): fix request scoped microservice calls #1886 2019-03-31 20:48:45 +02:00
Kamil Mysliwiec
8c354e76c9 Merge pull request #1894 from nestjs/renovate/graphql-14.x
fix(deps): update dependency graphql to v14.2.1
2019-03-31 16:02:08 +02:00
Renovate Bot
b3f69ed624 fix(deps): update dependency sequelize-typescript to v0.6.9 2019-03-31 13:36:32 +00:00
Renovate Bot
b1eac49ffc fix(deps): update dependency graphql to v14.2.1 2019-03-31 12:27:17 +00:00
Kamil Mysliwiec
df6c27c634 Merge pull request #1892 from nestjs/renovate/nestjs-graphql-6.x
fix(deps): update dependency @nestjs/graphql to v6.0.4
2019-03-31 12:10:30 +02:00
Renovate Bot
37fd2caa98 fix(deps): update dependency @nestjs/graphql to v6.0.4 2019-03-31 10:04:10 +00:00
Renovate Bot
12b11c38f1 fix(deps): update dependency typescript to v3.4.1 2019-03-31 09:39:30 +00:00
Kamil Mysliwiec
feeedb44ee Merge pull request #1880 from nestjs/renovate/sequelize-4.x
chore(deps): update dependency @types/sequelize to v4.27.46
2019-03-31 11:36:14 +02:00
Kamil Mysliwiec
3588f67bef Merge pull request #1887 from nestjs/renovate/ts-jest-24.x
chore(deps): update dependency ts-jest to v24.0.1
2019-03-31 11:31:08 +02:00
Kamil Mysliwiec
9497beb5cd Merge pull request #1871 from nestjs/renovate/nats-1.x
fix(deps): update dependency nats to v1.2.6
2019-03-31 11:31:01 +02:00
Renovate Bot
d0fca77744 chore(deps): update dependency ts-jest to v24.0.1 2019-03-31 09:30:51 +00:00
Kamil Mysliwiec
efacf4ad0f Merge pull request #1878 from nestjs/renovate/type-graphql-0.x
fix(deps): update dependency type-graphql to v0.17.1
2019-03-31 11:30:45 +02:00
Kamil Mysliwiec
5ff04e756e Merge pull request #1889 from nestjs/renovate/ts-morph-1.x
fix(deps): update dependency ts-morph to v1.3.2
2019-03-31 11:30:38 +02:00
Kamil Mysliwiec
ad07a26975 Merge pull request #1866 from nestjs/renovate/sequelize-5.x
fix(deps): update dependency sequelize to v5.2.8
2019-03-31 11:30:17 +02:00
Kamil Mysliwiec
4acf1b83af Merge pull request #1862 from nestjs/renovate/fastify-static-2.x
chore(deps): update dependency fastify-static to v2.4.0
2019-03-31 11:30:10 +02:00
Kamil Mysliwiec
e17594983b Merge pull request #1859 from nestjs/renovate/sinon-7.x
chore(deps): update dependency @types/sinon to v7.0.11
2019-03-31 11:29:35 +02:00
Kamil Mysliwiec
da252ca23d Merge pull request #1858 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo to v6.0.4
2019-03-31 11:29:23 +02:00
Renovate Bot
8293bfa519 fix(deps): update dependency sequelize to v5.2.8 2019-03-31 08:17:38 +00:00
Renovate Bot
482432d477 fix(deps): update dependency ts-morph to v1.3.2 2019-03-30 16:37:39 +00:00
Renovate Bot
041f0ca992 chore(deps): update dependency @types/sinon to v7.0.11 2019-03-30 05:13:16 +00:00
jackblues
66b13f42b9 style: trim the ts code 2019-03-30 12:41:10 +08:00
Renovate Bot
f51d331cc2 chore(deps): update dependency @types/sequelize to v4.27.46 2019-03-30 04:18:04 +00:00
weezway
24b0f5a583 fix(fastify-cors): fix the fastify adapter cors options config 2019-03-30 11:17:15 +08:00
Renovate Bot
156184ead7 fix(deps): update dependency nats to v1.2.6 2019-03-29 21:03:19 +00:00
Renovate Bot
0b0afac93c fix(deps): update dependency type-graphql to v0.17.1 2019-03-29 19:44:43 +00:00
Renovate Bot
d1828d9026 fix(deps): update nest monorepo to v6.0.4 2019-03-27 19:49:07 +00:00
Kamil Mysliwiec
20145b06e8 Merge pull request #1857 from nestjs/renovate/fast-json-stringify-1.x
fix(deps): update dependency fast-json-stringify to v1.12.0
2019-03-27 20:40:09 +01:00
Kamil Mysliwiec
fd2854d832 Merge pull request #1860 from nestjs/renovate/nestjs-graphql-6.x
fix(deps): update dependency @nestjs/graphql to v6.0.3
2019-03-27 20:39:55 +01:00
Renovate Bot
20bc124e3d chore(deps): update dependency fastify-static to v2.4.0 2019-03-27 14:52:10 +00:00
Renovate Bot
fd86e7e4a8 fix(deps): update dependency @nestjs/graphql to v6.0.3 2019-03-27 12:10:49 +00:00
Renovate Bot
ed0dd2188c fix(deps): update dependency fast-json-stringify to v1.12.0 2019-03-27 10:37:36 +00:00
Kamil Myśliwiec
497e5fe3c3 chore(@nestjs) publish v6.0.4 release 2019-03-27 10:48:45 +01:00
Kamil Mysliwiec
61df77daef Merge pull request #1852 from WonderPanda/samples_fixes
sample(): fix unit tests in sample-01
2019-03-27 10:45:01 +01:00
Kamil Mysliwiec
029082b11d Merge pull request #1854 from nestjs/renovate/redis-2.x
chore(deps): update dependency @types/redis to v2.8.12
2019-03-27 10:42:27 +01:00
Kamil Mysliwiec
5e45858c9c Merge pull request #1848 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo to v6.0.3
2019-03-27 10:41:46 +01:00
Kamil Mysliwiec
1988dc6bba Merge pull request #1846 from nestjs/renovate/sequelize-5.x
fix(deps): update dependency sequelize to v5.2.1
2019-03-27 10:41:38 +01:00
Kamil Mysliwiec
f0caa89f5d Merge pull request #1847 from nestjs/renovate/typeorm-0.x
fix(deps): update dependency typeorm to v0.2.16
2019-03-27 10:41:31 +01:00
Kamil Mysliwiec
0c511a8a42 Merge pull request #1853 from nestjs/renovate/graphql-14.x
fix(deps): update dependency graphql to v14.2.0
2019-03-27 10:40:46 +01:00
Kamil Mysliwiec
815b66121f Merge pull request #1855 from nestjs/renovate/prisma-binding-2.x
fix(deps): update dependency prisma-binding to v2.3.10
2019-03-27 10:40:40 +01:00
Kamil Mysliwiec
540abe91ac Merge pull request #1856 from nestjs/renovate/ws-6.x
fix(deps): update dependency ws to v6.2.1
2019-03-27 10:39:14 +01:00
Kamil Myśliwiec
2bf4577212 bugfix(core): injecting dependencies into middleware error #1834 2019-03-27 10:38:47 +01:00
Kamil Myśliwiec
ca62dc951d bugfix(common): http exceptions should have the same stacktrace as generic 2019-03-27 10:38:14 +01:00
Kamil Myśliwiec
1a3d16a7ea bugfix(common): registerAsync incorrectly sets Axios instance #1849 2019-03-27 10:37:22 +01:00
Renovate Bot
de446dacfa fix(deps): update dependency ws to v6.2.1 2019-03-27 09:01:31 +00:00
Renovate Bot
a6743f1078 fix(deps): update dependency prisma-binding to v2.3.10 2019-03-27 06:04:38 +00:00
Renovate Bot
0fbc8f2860 fix(deps): update dependency sequelize to v5.2.1 2019-03-27 05:20:24 +00:00
Renovate Bot
54d5592c09 chore(deps): update dependency @types/redis to v2.8.12 2019-03-26 22:03:51 +00:00
Renovate Bot
cf5e7ed3b1 fix(deps): update dependency graphql to v14.2.0 2019-03-26 19:28:33 +00:00
Jesse Carter
2eb2a037b8 test(sample/01) fix broken tests
- update jest configuration to remove warnings
- fix tests so that they run out of the box with correct types
- remove duplicate key from docker-compose
2019-03-26 12:56:04 -04:00
Renovate Bot
a37acf66c6 fix(deps): update nest monorepo to v6.0.3 2019-03-26 11:24:26 +00:00
Kamil Myśliwiec
ca110dfdb8 Update README files 2019-03-26 12:20:05 +01:00
Kamil Myśliwiec
cf7ff71694 chore(@nestjs) publish v6.0.3 release 2019-03-26 12:15:58 +01:00
Kamil Myśliwiec
70fa9f038b Merge branch 'ivibe-my-fix-branch' 2019-03-26 12:14:18 +01:00
Kamil Myśliwiec
802be5c8eb refactor(microservices): adjust to the general coding style 2019-03-26 12:13:45 +01:00
Kamil Myśliwiec
69ba249337 Merge branch 'my-fix-branch' of https://github.com/ivibe/nest into ivibe-my-fix-branch 2019-03-26 12:01:19 +01:00
Kamil Mysliwiec
48be3ef669 Merge pull request #1844 from nestjs/renovate/mongoose-5.x
fix(deps): update dependency mongoose to v5.4.20
2019-03-26 12:00:42 +01:00
Kamil Myśliwiec
0a28c16b67 bugfix(platform): execute callback passed into listen method #1820 2019-03-26 11:58:50 +01:00
Kamil Myśliwiec
a6c0d19b1d Merge branch 'master' of https://github.com/nestjs/nest 2019-03-26 11:48:05 +01:00
Kamil Myśliwiec
78777bfd03 bugfix(): fix incorrect message (middleware exception, resolve - use) 2019-03-26 11:47:58 +01:00
Kamil Mysliwiec
1f394247bf Merge pull request #1805 from zarv1k/fix-external-context-creator-usage-in-next-application-context
bugfix(): fix usage of ExternalContextCreator in NestApplicationConte…
2019-03-26 11:43:12 +01:00
Kamil Mysliwiec
2ce08651bb Merge pull request #1842 from nestjs/renovate/node-10.x
chore(deps): update dependency @types/node to v10.14.4
2019-03-26 11:31:47 +01:00
Kamil Myśliwiec
3886e23ac9 Merge branch 'master' of https://github.com/nestjs/nest 2019-03-26 11:29:40 +01:00
Kamil Myśliwiec
59827181cb Merge branch 'gperdomor-fix-tcp-client' 2019-03-26 11:29:16 +01:00
Kamil Myśliwiec
d9a28f2253 bugfix(): normalize TCP pattern (event) 2019-03-26 11:28:19 +01:00
Renovate Bot
cf8950fd94 fix(deps): update dependency typeorm to v0.2.16 2019-03-26 10:06:08 +00:00
Renovate Bot
146c3e1fbc fix(deps): update dependency mongoose to v5.4.20 2019-03-25 21:27:53 +00:00
Renovate Bot
dbcac33499 chore(deps): update dependency @types/node to v10.14.4 2019-03-25 21:07:18 +00:00
Kamil Mysliwiec
c378b25ce4 Merge pull request #1841 from nestjs/renovate/mongoose-5.x
chore(deps): update dependency @types/mongoose to v5.3.24
2019-03-25 21:54:53 +01:00
Renovate Bot
bf5eaed54c chore(deps): update dependency @types/mongoose to v5.3.24 2019-03-25 20:52:46 +00:00
Gustavo Perdomo
6d9f15a2a8 fix dispatchEvent 2019-03-25 15:11:22 -03:00
Kamil Mysliwiec
ab8ce64fe8 Update Readme.md 2019-03-25 14:06:10 +01:00
Kamil Mysliwiec
654b746d55 Update Readme.md 2019-03-25 14:03:07 +01:00
Kamil Mysliwiec
349b39fb01 Merge pull request #1790 from nestjs/renovate/sinon-7.x
chore(deps): update dependency sinon to v7.3.0
2019-03-24 11:20:28 +01:00
Kamil Mysliwiec
4cd4904b54 Merge pull request #1807 from nestjs/renovate/node-10.x
chore(deps): update dependency @types/node to v10.14.3
2019-03-24 11:20:17 +01:00
Kamil Mysliwiec
bf9d7c3ee1 Merge pull request #1806 from nestjs/renovate/mongodb-3.x
fix(deps): update dependency mongodb to v3.2.2
2019-03-24 11:20:07 +01:00
Kamil Mysliwiec
17fa9a4b9e Merge pull request #1810 from nestjs/renovate/fast-json-stringify-1.x
fix(deps): update dependency fast-json-stringify to v1.11.4
2019-03-24 11:19:57 +01:00
Kamil Mysliwiec
6489611725 Merge pull request #1816 from nestjs/renovate/node-8.x
chore(deps): update dependency @types/node to v8.10.45
2019-03-24 11:18:24 +01:00
Kamil Mysliwiec
3edc181150 Merge pull request #1823 from nestjs/renovate/sequelize-5.x
fix(deps): update dependency sequelize to v5.1.1
2019-03-24 11:18:13 +01:00
Kamil Myśliwiec
ee2dc91357 Merge branch 'master' of https://github.com/nestjs/nest 2019-03-24 10:41:11 +01:00
Kamil Myśliwiec
c1b8f54104 refactor(): add blank line (web socket adapter interface) 2019-03-24 10:40:55 +01:00
Renovate Bot
612a18bb0e fix(deps): update dependency sequelize to v5.1.1 2019-03-23 14:41:59 +00:00
Renovate Bot
c4b7b4c016 fix(deps): update dependency mongodb to v3.2.2 2019-03-22 21:38:57 +00:00
Renovate Bot
9e05feb8c2 chore(deps): update dependency @types/node to v8.10.45 2019-03-22 19:26:06 +00:00
Renovate Bot
ffd24db6d2 chore(deps): update dependency @types/node to v10.14.3 2019-03-22 19:25:45 +00:00
Renovate Bot
c0cfb16175 fix(deps): update dependency fast-json-stringify to v1.11.4 2019-03-22 07:37:28 +00:00
Dmitry Zarva
d8a39a74c3 bugfix(): fix usage of ExternalContextCreator in NextApplicationContext (when NestContainer.applicationConfig is undefined) 2019-03-21 18:37:23 +03:00
Kamil Mysliwiec
845c5df66f Merge pull request #1803 from nestjs/renovate/nestjs-swagger-3.x
fix(deps): update dependency @nestjs/swagger to v3.0.2
2019-03-21 13:25:47 +01:00
Renovate Bot
cd1d338d2c fix(deps): update dependency @nestjs/swagger to v3.0.2 2019-03-21 12:20:54 +00:00
Kamil Myśliwiec
a39821a624 Merge branch 'master' of https://github.com/nestjs/nest 2019-03-21 12:08:26 +01:00
Kamil Myśliwiec
4fa54ffcdd refactor(): remove useless async keywords (unit tests) 2019-03-21 12:03:40 +01:00
Ivan Vibe
9c3e15a902 bugfix(microservices): let use unicode characters in TCP Microservice messages
add own json-socket implementation

https://github.com/nestjs/nest/issues/1734
2019-03-21 02:49:23 +05:00
Kamil Mysliwiec
9f5f1159ae Merge pull request #1791 from nestjs/renovate/nestjs-graphql-6.x
fix(deps): update dependency @nestjs/graphql to v6.0.2
2019-03-20 14:38:58 +01:00
Renovate Bot
aefdee3983 fix(deps): update dependency @nestjs/graphql to v6.0.2 2019-03-20 13:33:53 +00:00
Renovate Bot
5f2a395158 chore(deps): update dependency sinon to v7.3.0 2019-03-20 13:32:35 +00:00
Kamil Mysliwiec
01b06f3848 Merge pull request #1789 from nestjs/renovate/nest-monorepo
fix(deps): update nest monorepo to v6.0.2
2019-03-20 13:53:38 +01:00
Kamil Myśliwiec
6d09f36cb0 chore(): publish 6.0.2 release 2019-03-20 13:50:02 +01:00
Renovate Bot
01dd813f5c fix(deps): update nest monorepo to v6.0.2 2019-03-20 12:43:53 +00:00
127 changed files with 9283 additions and 2194 deletions

View File

@@ -41,6 +41,10 @@ Nest is a framework for building efficient, scalable <a href="http://nodejs.org"
* To check out the [guide](https://docs.nestjs.com), visit [docs.nestjs.com](https://docs.nestjs.com). :books:
* 要查看中文 [指南](readme_zh.md), 请访问 [docs.nestjs.cn](https://docs.nestjs.cn). :books:
## Consulting
With official support, you can get expert help straight from Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://docs.nestjs.com/enterprise).
## Support
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
@@ -57,14 +61,17 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
#### Silver Sponsors
<a href="https://neoteric.eu/" target="_blank"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> &nbsp;
<a href="http://gojob.com" target="_blank"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" height="95" /></a> &nbsp; <a href="https://www.swingdev.io" target="_blank"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="150" valign="middle" /> </a> &nbsp; &nbsp;
<a href="https://yakaz.com/" target="_blank"><img src="https://nestjs.com/img/yakaz.png" width="100" valign="middle" /></a>
<a href="https://yakaz.com/" target="_blank"><img src="https://nestjs.com/img/yakaz.png" width="100" valign="middle" /></a> &nbsp;
<a href="https://trilon.io" target="_blank"><img src="https://nestjs.com/img/trilon.svg" width="150" valign="middle" /></a>
<a href="http://xtremis.com/" target="_blank"><img src="https://nestjs.com/img/logo-xtremis.svg" width="150" valign="middle" /></a>
#### Sponsors
<a href="https://scal.io" target="_blank"><img src="https://nestjs.com/img/scalio-logo.svg" width="110" valign="middle" /></a> &nbsp; <a href="http://angularity.io" target="_blank"><img src="http://angularity.io/media/logo.svg" height="30" 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="38" 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://scal.io" target="_blank"><img src="https://nestjs.com/img/scalio-logo.svg" width="110" 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>
<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>
## Backers

View File

@@ -24,7 +24,6 @@ services:
restart: always
mysql:
image: mysql:5.7.25
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test
@@ -43,4 +42,4 @@ services:
ports:
- "15672:15672"
- "5672:5672"
tty: true
tty: true

View File

@@ -36,9 +36,9 @@
}
},
"@nestjs/common": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.1.tgz",
"integrity": "sha512-+43nUxG9YSF2SnnFFT91/yTbvyfrGWI3a3cTI8jlSQUXOeKQILQhOXlA3N2GgDwYYH8GX8Xy8FXZ4GopJ7lT6A==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.5.tgz",
"integrity": "sha512-CbXtgBW/irevfUZF+rURDLFjhmT0Q6dmzbEYkuMg8bSjPmvgG6VzOBG6PwoPZbd+8PrPc2XLjN2A2Hg9mImp7A==",
"requires": {
"axios": "0.18.0",
"cli-color": "1.4.0",
@@ -46,9 +46,9 @@
}
},
"@nestjs/core": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.1.tgz",
"integrity": "sha512-1TbB19AE6opDPLoALaJO/ZZHCofKi8pJDJNInlPjRBIeP+Vfrh6LyCl7xw/RjXkrfZZIrMy+SVp0+qxlAZ7HnQ==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.5.tgz",
"integrity": "sha512-diLLr9qb9vGKyvfkt8JFGox21rpgj4YiToCRb3Tbdab0bvssLopznh/f7cdEBNmk5Adtl3IvXjtdVRj+XH7VCw==",
"requires": {
"@nuxtjs/opencollective": "0.2.1",
"fast-safe-stringify": "2.0.6",
@@ -59,18 +59,18 @@
}
},
"@nestjs/graphql": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/graphql/-/graphql-6.0.1.tgz",
"integrity": "sha512-AWo4f2L88WC+TKwST54Mz71VtH3nlQUmwMqyNwr6EzQHygXUXQfehROJmxe4K5xvcl2EAMjkYDrV/HIi2hP5ZA==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/graphql/-/graphql-6.0.5.tgz",
"integrity": "sha512-TxTPgb1uXkmIjx0pVkHDZ5QyPCiJUjZnTPdLe1l/KE6hNd0/8TXpWelh/dNylFUFrPCI2N3k96GEibcT4uT6+Q==",
"requires": {
"@types/graphql": "14.0.7",
"chokidar": "2.1.2",
"@types/graphql": "14.2.0",
"chokidar": "2.1.5",
"fast-glob": "2.2.6",
"graphql-tools": "4.0.4",
"lodash": "4.17.11",
"merge-graphql-schemas": "1.5.8",
"optional": "0.1.4",
"ts-morph": "1.3.1",
"ts-morph": "1.3.2",
"uuid": "3.3.2"
}
},
@@ -201,9 +201,9 @@
}
},
"@types/graphql": {
"version": "14.0.7",
"resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-14.0.7.tgz",
"integrity": "sha512-BoLDjdvLQsXPZLJux3lEZANwGr3Xag56Ngy0U3y8uoRSDdeLcn43H3oBcgZlnd++iOQElBpaRVDHPzEDekyvXQ=="
"version": "14.2.0",
"resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-14.2.0.tgz",
"integrity": "sha512-lELg5m6eBOmATWyCZl8qULEOvnPIUG6B443yXKj930glXIgwQirIBPp5rthP2amJW0YSzUg2s5sfgba4mRRCNw=="
},
"@types/long": {
"version": "4.0.0",
@@ -642,9 +642,9 @@
}
},
"binary-extensions": {
"version": "1.13.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.0.tgz",
"integrity": "sha512-EgmjVLMn22z7eGGv3kcnHwSnJXmFHjISTY9E/S5lIcTD3Oxw05QTcBLNkJFzcb3cNueUdF/IN4U+d78V0zO8Hw=="
"version": "1.13.1",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz",
"integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw=="
},
"body-parser": {
"version": "1.18.3",
@@ -800,9 +800,9 @@
}
},
"chokidar": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.2.tgz",
"integrity": "sha512-IwXUx0FXc5ibYmPC2XeEj5mpXoV66sR+t3jqu2NS2GYwCktt3KF1/Qqjws/NkegajBA4RbZ5+DDwlOiJsxDHEg==",
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.5.tgz",
"integrity": "sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A==",
"requires": {
"anymatch": "^2.0.0",
"async-each": "^1.0.1",
@@ -815,7 +815,7 @@
"normalize-path": "^3.0.0",
"path-is-absolute": "^1.0.0",
"readdirp": "^2.2.1",
"upath": "^1.1.0"
"upath": "^1.1.1"
}
},
"class-utils": {
@@ -896,9 +896,9 @@
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"consola": {
"version": "2.5.6",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.6.tgz",
"integrity": "sha512-DN0j6ewiNWkT09G3ZoyyzN3pSYrjxWcx49+mHu+oDI5dvW5vzmyuzYsqGS79+yQserH9ymJQbGzeqUejfssr8w=="
"version": "2.5.8",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.8.tgz",
"integrity": "sha512-fYv1M0rNJw4h0CZUx8PX02Px7xQhA+vNHpV8DBCGMoozp2Io/vrSXhhEothaRnSt7VMR0rj2pt9KKLXa5amrCw=="
},
"content-type": {
"version": "1.0.4",
@@ -1890,9 +1890,9 @@
"integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA=="
},
"graphql": {
"version": "14.1.1",
"resolved": "https://registry.npmjs.org/graphql/-/graphql-14.1.1.tgz",
"integrity": "sha512-C5zDzLqvfPAgTtP8AUPIt9keDabrdRAqSWjj2OPRKrKxI9Fb65I36s1uCs1UUBFnSWTdO7hyHi7z1ZbwKMKF6Q==",
"version": "14.2.1",
"resolved": "https://registry.npmjs.org/graphql/-/graphql-14.2.1.tgz",
"integrity": "sha512-2PL1UbvKeSjy/lUeJqHk+eR9CvuErXoCNwJI4jm3oNFEeY+9ELqHNKO1ZuSxAkasPkpWbmT/iMRMFxd3cEL3tQ==",
"requires": {
"iterall": "^1.2.2"
}
@@ -2176,9 +2176,9 @@
"integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI="
},
"is-glob": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz",
"integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=",
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
"integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
"requires": {
"is-extglob": "^2.1.1"
}
@@ -2283,9 +2283,9 @@
"dev": true
},
"js-yaml": {
"version": "3.12.2",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.2.tgz",
"integrity": "sha512-QHn/Lh/7HhZ/Twc7vJYQTkjuCa0kaCcDcjK5Zlk2rvnUpy7DxMJ23+Jc2dcyvltwQVg1nygAVlB2oRDFHoRS5Q==",
"version": "3.13.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz",
"integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==",
"dev": true,
"requires": {
"argparse": "^1.0.7",
@@ -2497,9 +2497,9 @@
}
},
"nan": {
"version": "2.13.1",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.13.1.tgz",
"integrity": "sha512-I6YB/YEuDeUZMmhscXKxGgZlFnhsn5y0hgOZBadkzfTRrZBtJDZeg6eQf7PYMIEclwmorTKK8GztsyOUSVBREA==",
"version": "2.13.2",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz",
"integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==",
"optional": true
},
"nanomatch": {
@@ -2843,9 +2843,9 @@
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"semver": {
"version": "5.6.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
"integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==",
"version": "5.7.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
"integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
"dev": true
},
"set-value": {
@@ -3185,9 +3185,9 @@
}
},
"ts-morph": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-1.3.1.tgz",
"integrity": "sha512-zWjy62PNOeX7LP6Q1h5UM7uBetEHKu9P2EoRQn0CZwqANxU/ZXvEiOtKeQJwKihRfslES+pLNCfIG7R0WS4ZbQ==",
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-1.3.2.tgz",
"integrity": "sha512-NaPUD0NY1nfRfdWnGaYMFsIAcQyuS0teCOjZ+v5nvBYziuKZaJ7z5JLkHkhrBkffqR9DLnn2Zx1vdW5Ub1doxg==",
"requires": {
"@dsherret/to-absolute-glob": "^2.0.2",
"code-block-writer": "7.2.2",
@@ -3197,7 +3197,14 @@
"is-negated-glob": "^1.0.0",
"multimatch": "^2.1.0",
"tslib": "^1.9.0",
"typescript": "^3.0.1"
"typescript": ">=3.0.1 <3.4.0"
},
"dependencies": {
"typescript": {
"version": "3.3.4000",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.4000.tgz",
"integrity": "sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA=="
}
}
},
"ts-node": {
@@ -3219,9 +3226,9 @@
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
},
"tslint": {
"version": "5.14.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.14.0.tgz",
"integrity": "sha512-IUla/ieHVnB8Le7LdQFRGlVJid2T/gaJe5VkjzRVSRR6pA2ODYrnfR1hmxi+5+au9l50jBwpbBL34txgv4NnTQ==",
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.15.0.tgz",
"integrity": "sha512-6bIEujKR21/3nyeoX2uBnE8s+tMXCQXhqMmaIPJpHmXJoBJPTLcI7/VHRtUwMhnLVdwLqqY3zmd8Dxqa5CVdJA==",
"dev": true,
"requires": {
"babel-code-frame": "^6.22.0",
@@ -3230,7 +3237,7 @@
"commander": "^2.12.1",
"diff": "^3.2.0",
"glob": "^7.1.1",
"js-yaml": "^3.7.0",
"js-yaml": "^3.13.0",
"minimatch": "^3.0.4",
"mkdirp": "^0.5.1",
"resolve": "^1.3.2",
@@ -3258,9 +3265,9 @@
}
},
"typescript": {
"version": "3.3.4000",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.4000.tgz",
"integrity": "sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA=="
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.2.tgz",
"integrity": "sha512-Og2Vn6Mk7JAuWA1hQdDQN/Ekm/SchX80VzLhjKN9ETYrIepBFAd8PkOdOTK2nKt0FCkmMZKBJvQ1dV1gIxPu/A=="
},
"unc-path-regex": {
"version": "0.1.2",
@@ -3390,9 +3397,9 @@
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"ws": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.0.tgz",
"integrity": "sha512-deZYUNlt2O4buFCa3t5bKLf8A7FPP/TVjwOeVNpw818Ma5nk4MLXls2eoEGS39o8119QIYxTrTDoPQ5B/gTD6w==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz",
"integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==",
"requires": {
"async-limiter": "~1.0.0"
}

View File

@@ -9,21 +9,21 @@
"start:prod": "node dist/main.js"
},
"dependencies": {
"@nestjs/common": "6.0.1",
"@nestjs/core": "6.0.1",
"@nestjs/graphql": "6.0.1",
"@nestjs/common": "6.0.5",
"@nestjs/core": "6.0.5",
"@nestjs/graphql": "6.0.5",
"apollo-server-express": "2.4.8",
"graphql": "14.1.1",
"graphql": "14.2.1",
"graphql-tools": "4.0.4",
"reflect-metadata": "0.1.13",
"rxjs": "6.4.0",
"subscriptions-transport-ws": "0.9.16",
"typescript": "3.3.4000",
"ws": "6.2.0"
"typescript": "3.4.2",
"ws": "6.2.1"
},
"devDependencies": {
"@types/node": "7.10.5",
"ts-node": "8.0.3",
"tslint": "5.14.0"
"tslint": "5.15.0"
}
}

View File

@@ -28,6 +28,34 @@ export class TransformInterceptor {
}
}
@Injectable()
export class StatusInterceptor {
constructor(private statusCode: number) {}
intercept(context: ExecutionContext, next: CallHandler) {
const ctx = context.switchToHttp();
const res = ctx.getResponse();
res.status(this.statusCode);
return next.handle().pipe(map(data => ({ data })));
}
}
@Injectable()
export class HeaderInterceptor {
constructor(private headers: object) {}
intercept(context: ExecutionContext, next: CallHandler) {
const ctx = context.switchToHttp();
const res = ctx.getResponse();
for (const key in this.headers) {
if (this.headers.hasOwnProperty(key)) {
res.header(key, this.headers[key]);
}
}
return next.handle().pipe(map(data => ({ data })));
}
}
function createTestModule(interceptor) {
return Test.createTestingModule({
imports: [ApplicationModule],
@@ -87,6 +115,33 @@ describe('Interceptors', () => {
.expect(200, { data: 'Hello world!' });
});
it(`should modify response status`, async () => {
app = (await createTestModule(
new StatusInterceptor(400),
)).createNestApplication();
await app.init();
return request(app.getHttpServer())
.get('/hello')
.expect(400, { data: 'Hello world!' });
});
it(`should modify Authorization header`, async () => {
const customHeaders = {
Authorization: 'jwt',
};
app = (await createTestModule(
new HeaderInterceptor(customHeaders),
)).createNestApplication();
await app.init();
return request(app.getHttpServer())
.get('/hello')
.expect(200)
.expect('Authorization', 'jwt');
});
afterEach(async () => {
await app.close();
});

View File

@@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@nestjs/common": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.1.tgz",
"integrity": "sha512-+43nUxG9YSF2SnnFFT91/yTbvyfrGWI3a3cTI8jlSQUXOeKQILQhOXlA3N2GgDwYYH8GX8Xy8FXZ4GopJ7lT6A==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.5.tgz",
"integrity": "sha512-CbXtgBW/irevfUZF+rURDLFjhmT0Q6dmzbEYkuMg8bSjPmvgG6VzOBG6PwoPZbd+8PrPc2XLjN2A2Hg9mImp7A==",
"requires": {
"axios": "0.18.0",
"cli-color": "1.4.0",
@@ -15,9 +15,9 @@
}
},
"@nestjs/core": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.1.tgz",
"integrity": "sha512-1TbB19AE6opDPLoALaJO/ZZHCofKi8pJDJNInlPjRBIeP+Vfrh6LyCl7xw/RjXkrfZZIrMy+SVp0+qxlAZ7HnQ==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.5.tgz",
"integrity": "sha512-diLLr9qb9vGKyvfkt8JFGox21rpgj4YiToCRb3Tbdab0bvssLopznh/f7cdEBNmk5Adtl3IvXjtdVRj+XH7VCw==",
"requires": {
"@nuxtjs/opencollective": "0.2.1",
"fast-safe-stringify": "2.0.6",
@@ -28,9 +28,9 @@
}
},
"@nestjs/microservices": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.0.1.tgz",
"integrity": "sha512-ETCDkRjkVuqzvmbQbRcL+lKVrGVWv6whedNNVL9g3sAnIrJL/9lX4JQIJstQ68C0Lo/CfpTqozzeYoMgUyP4Iw==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.0.5.tgz",
"integrity": "sha512-lUyxzYQ3E5U7aQaY4bKVnGxizTl2cE2Rrey0ylmeVE4ae9Y7/z/7mdsfB4DVnuMVuRpyClUJ+zrQ4tJAIvL/nQ==",
"requires": {
"iterare": "1.1.2",
"json-socket": "0.3.0",
@@ -38,17 +38,17 @@
}
},
"@nestjs/testing": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.0.1.tgz",
"integrity": "sha512-+sB913Rrxwa6p7YZhExQEV7NiF/Qly6a9FlVlpoWkZnI0ktIzjbdZqo910JFYSawBdeplfHjWtt2Z6LSX6Mfng==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.0.5.tgz",
"integrity": "sha512-LrPBckONn/ZalBC8GU5LxvgIS8DJNrdwZE4gMJz0ugodwl0c1IL3e2gIukBkUJtHYPtzN12nYevnaGYT/V1aDQ==",
"requires": {
"optional": "0.1.4"
}
},
"@nestjs/websockets": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.0.1.tgz",
"integrity": "sha512-ILSHGyRIgn0qURxmW1DIabFRtFjAIMZY/+rVeJpI2VyoIZgmX/bqqWSesPdQcebcEPDz1pqFNSuL3UgVbhcuNQ==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.0.5.tgz",
"integrity": "sha512-cA4Z6dM/Q8WqzgDyC6HiCdFvcDVAv7TyGkzthuuCn9xHDeLjtyzCL1koogkZ0FmLWhNmCskc/yJb2IjApGtzvQ==",
"requires": {
"iterare": "1.1.2"
}
@@ -116,9 +116,9 @@
"dev": true
},
"avvio": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/avvio/-/avvio-6.2.0.tgz",
"integrity": "sha512-zEd82xsl60/FkeQ5P3jqflS6Hh7NbzAVAgTIVbCeUbg82hdkO2SNKN/w15f6KjbEAbIzN+V9ji4O9+aEsKgrvA==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/avvio/-/avvio-6.2.1.tgz",
"integrity": "sha512-k+gTocL3yShwN1PtKEsSj7eFiApcZ4JZLAu/ecyzEb8jyx+Kmxb+7SXUsodB47g7fqhs/zkfsCdqq72a1ok5Ew==",
"requires": {
"archy": "^1.0.0",
"debug": "^4.0.0",
@@ -226,9 +226,9 @@
"dev": true
},
"consola": {
"version": "2.5.6",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.6.tgz",
"integrity": "sha512-DN0j6ewiNWkT09G3ZoyyzN3pSYrjxWcx49+mHu+oDI5dvW5vzmyuzYsqGS79+yQserH9ymJQbGzeqUejfssr8w=="
"version": "2.5.8",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.8.tgz",
"integrity": "sha512-fYv1M0rNJw4h0CZUx8PX02Px7xQhA+vNHpV8DBCGMoozp2Io/vrSXhhEothaRnSt7VMR0rj2pt9KKLXa5amrCw=="
},
"cookiejar": {
"version": "2.1.2",
@@ -352,18 +352,18 @@
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
},
"fast-json-stringify": {
"version": "1.11.3",
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.11.3.tgz",
"integrity": "sha512-Nx9oURoGD4XYFueNkNzaameSQIcBw2HQrnsnJaRb4PFrlW3/88zusG65pzHA0P7+g5Hn7hyawG3/nCKs3NUAhQ==",
"version": "1.14.0",
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.14.0.tgz",
"integrity": "sha512-3VSblXsVxIE46E/YzRYHapyIeM3/igeA/kyzdL5xfAIYNnCLd8Oy+scrURnqZIRXMmtx0hfyp+okN5+r4W+GMQ==",
"requires": {
"ajv": "^6.8.1",
"deepmerge": "^3.0.0"
}
},
"fast-redact": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-1.4.4.tgz",
"integrity": "sha512-QOQZ8sDDQPZMJ6x6zlm6hLZ2cjPDqfN3R/AYnAbM+yy8VNPvOnVXdUF/E/xbMv7g44c1krhWuzgjH2u0V5Vhsg=="
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-1.5.0.tgz",
"integrity": "sha512-Afo61CgUjkzdvOKDHn08qnZ0kwck38AOGcMlvSGzvJbIab6soAP5rdoQayecGCDsD69AiF9vJBXyq31eoEO2tQ=="
},
"fast-safe-stringify": {
"version": "2.0.6",
@@ -371,9 +371,9 @@
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
},
"fastify": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.1.0.tgz",
"integrity": "sha512-rktprBPTTt1aAsaiMjkbKVzmy/fhX5SGj1DkJY6wddBOzxHAKaQ7F3ia3n8tVPHw07JzNlTmJKtG4zHhnXEdlA==",
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.2.0.tgz",
"integrity": "sha512-U6W101N+8Hyz2uiN3XqdSdTiaWYiJ0lCJmC3tO42PNttjCZQp8EPIhZ0QkVQWLrrP0ijjgomwaYrj9eMzqWyDw==",
"requires": {
"abstract-logging": "^1.0.0",
"ajv": "^6.9.2",
@@ -389,26 +389,6 @@
"readable-stream": "^3.1.1",
"rfdc": "^1.1.2",
"tiny-lru": "^6.0.1"
},
"dependencies": {
"readable-stream": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.2.0.tgz",
"integrity": "sha512-RV20kLjdmpZuTF1INEb9IA3L68Nmi+Ri7ppZqo78wj//Pn62fCoJyV9zalccNzDD/OuJpMG4f+pfMl8+L6QdGw==",
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
}
},
"string_decoder": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz",
"integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==",
"requires": {
"safe-buffer": "~5.1.0"
}
}
}
},
"fastq": {
@@ -525,32 +505,12 @@
"integrity": "sha512-jc8ZbUnYIWdxERFWQKVgwSLkGSe+kyzvmYxwNaRgx/c8NNyuHes4UHnPM3LUrAFXUx1BhNJ94n1h/KCRlbvV0g=="
},
"light-my-request": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-3.2.0.tgz",
"integrity": "sha512-XpNvOFfoQRLPNIFLB6YFjwQj61DyAAW+N08C3KXf+SwbJjZjrZk7gh8IYR8gML96QBM4NAT2Mwhi3tHvrKxnMw==",
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-3.3.0.tgz",
"integrity": "sha512-dLtwhjzbuHJ+KMMUBSlVid6Iqxx+KKvULWLnBD06WMgPHxiPkEh1cVyj+Xc8HGU64hULlSw/sZVCdFsvjNQeNA==",
"requires": {
"ajv": "^6.8.1",
"readable-stream": "^3.1.1"
},
"dependencies": {
"readable-stream": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.2.0.tgz",
"integrity": "sha512-RV20kLjdmpZuTF1INEb9IA3L68Nmi+Ri7ppZqo78wj//Pn62fCoJyV9zalccNzDD/OuJpMG4f+pfMl8+L6QdGw==",
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
}
},
"string_decoder": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz",
"integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==",
"requires": {
"safe-buffer": "~5.1.0"
}
}
}
},
"lru-queue": {
@@ -595,13 +555,6 @@
"requires": {
"path-to-regexp": "^3.0.0",
"reusify": "^1.0.2"
},
"dependencies": {
"path-to-regexp": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.0.0.tgz",
"integrity": "sha512-ZOtfhPttCrqp2M1PBBH4X13XlvnfhIwD7yCLx+GoGoXRPQyxGOTdQMpIzPSPKXAJT/JQrdfFrgdJOyAzvgpQ9A=="
}
}
},
"mime": {
@@ -651,24 +604,22 @@
"resolved": "https://registry.npmjs.org/optional/-/optional-0.1.4.tgz",
"integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw=="
},
"path-to-regexp": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.0.0.tgz",
"integrity": "sha512-ZOtfhPttCrqp2M1PBBH4X13XlvnfhIwD7yCLx+GoGoXRPQyxGOTdQMpIzPSPKXAJT/JQrdfFrgdJOyAzvgpQ9A=="
},
"pino": {
"version": "5.11.1",
"resolved": "https://registry.npmjs.org/pino/-/pino-5.11.1.tgz",
"integrity": "sha512-NIua0mGb9Adknq35ONvQmvh93LCUVUjp2+1q1EcvIkJmpJnSd3E5rHVKlKNjzMXFl/z3fI+QA0xXCjPEKNiLvQ==",
"version": "5.12.2",
"resolved": "https://registry.npmjs.org/pino/-/pino-5.12.2.tgz",
"integrity": "sha512-EunVRDkw/eQzgAudJiZuqzEQ20hDezixLRLrdxUMBzavvt5ot3vep7K8swRvXSgj2bKtbOmoHnrRMtYzRjfITQ==",
"requires": {
"fast-redact": "^1.4.2",
"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.0",
"sonic-boom": "^0.7.1"
},
"dependencies": {
"fast-safe-stringify": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz",
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
}
"quick-format-unescaped": "^3.0.2",
"sonic-boom": "^0.7.3"
}
},
"pino-std-serializers": {
@@ -707,6 +658,16 @@
"resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-3.0.2.tgz",
"integrity": "sha512-FXTaCkwvpIlkdKeGDNgcq07SXWS383noQUuZjvdE1QcTt+eLuqof6/BDiEPqB59FWLie/l91+HtlJSw7iCViSA=="
},
"readable-stream": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
"integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
}
},
"reflect-metadata": {
"version": "0.1.13",
"resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz",
@@ -777,6 +738,14 @@
"source-map": "^0.6.0"
}
},
"string_decoder": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz",
"integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==",
"requires": {
"safe-buffer": "~5.1.0"
}
},
"superagent": {
"version": "3.8.3",
"resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.3.tgz",
@@ -878,9 +847,9 @@
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
},
"typescript": {
"version": "3.3.4000",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.4000.tgz",
"integrity": "sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA=="
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.2.tgz",
"integrity": "sha512-Og2Vn6Mk7JAuWA1hQdDQN/Ekm/SchX80VzLhjKN9ETYrIepBFAd8PkOdOTK2nKt0FCkmMZKBJvQ1dV1gIxPu/A=="
},
"uri-js": {
"version": "4.2.2",

View File

@@ -7,17 +7,17 @@
"start": "ts-node src/main"
},
"dependencies": {
"@nestjs/common": "6.0.1",
"@nestjs/core": "6.0.1",
"@nestjs/microservices": "6.0.1",
"@nestjs/testing": "6.0.1",
"@nestjs/websockets": "6.0.1",
"@nestjs/common": "6.0.5",
"@nestjs/core": "6.0.5",
"@nestjs/microservices": "6.0.5",
"@nestjs/testing": "6.0.5",
"@nestjs/websockets": "6.0.5",
"class-transformer": "0.2.0",
"class-validator": "0.9.1",
"fastify": "2.1.0",
"fastify": "2.2.0",
"reflect-metadata": "0.1.13",
"rxjs": "6.4.0",
"typescript": "3.3.4000"
"typescript": "3.4.2"
},
"devDependencies": {
"@types/node": "7.10.5",

View File

@@ -1,6 +1,6 @@
import { HelloService } from './hello.service';
import { Controller, Get, Header, Param } from '@nestjs/common';
import { Observable, of } from 'rxjs';
import { HelloService } from './hello.service';
import { UserByIdPipe } from './users/user-by-id.pipe';
@Controller('hello')

View File

@@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@nestjs/common": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.1.tgz",
"integrity": "sha512-+43nUxG9YSF2SnnFFT91/yTbvyfrGWI3a3cTI8jlSQUXOeKQILQhOXlA3N2GgDwYYH8GX8Xy8FXZ4GopJ7lT6A==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.5.tgz",
"integrity": "sha512-CbXtgBW/irevfUZF+rURDLFjhmT0Q6dmzbEYkuMg8bSjPmvgG6VzOBG6PwoPZbd+8PrPc2XLjN2A2Hg9mImp7A==",
"requires": {
"axios": "0.18.0",
"cli-color": "1.4.0",
@@ -15,9 +15,9 @@
}
},
"@nestjs/core": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.1.tgz",
"integrity": "sha512-1TbB19AE6opDPLoALaJO/ZZHCofKi8pJDJNInlPjRBIeP+Vfrh6LyCl7xw/RjXkrfZZIrMy+SVp0+qxlAZ7HnQ==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.5.tgz",
"integrity": "sha512-diLLr9qb9vGKyvfkt8JFGox21rpgj4YiToCRb3Tbdab0bvssLopznh/f7cdEBNmk5Adtl3IvXjtdVRj+XH7VCw==",
"requires": {
"@nuxtjs/opencollective": "0.2.1",
"fast-safe-stringify": "2.0.6",
@@ -149,9 +149,9 @@
"dev": true
},
"consola": {
"version": "2.5.6",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.6.tgz",
"integrity": "sha512-DN0j6ewiNWkT09G3ZoyyzN3pSYrjxWcx49+mHu+oDI5dvW5vzmyuzYsqGS79+yQserH9ymJQbGzeqUejfssr8w=="
"version": "2.5.8",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.8.tgz",
"integrity": "sha512-fYv1M0rNJw4h0CZUx8PX02Px7xQhA+vNHpV8DBCGMoozp2Io/vrSXhhEothaRnSt7VMR0rj2pt9KKLXa5amrCw=="
},
"cookiejar": {
"version": "2.1.2",
@@ -538,9 +538,9 @@
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
},
"typescript": {
"version": "3.3.4000",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.4000.tgz",
"integrity": "sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA=="
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.2.tgz",
"integrity": "sha512-Og2Vn6Mk7JAuWA1hQdDQN/Ekm/SchX80VzLhjKN9ETYrIepBFAd8PkOdOTK2nKt0FCkmMZKBJvQ1dV1gIxPu/A=="
},
"util-deprecate": {
"version": "1.0.2",

View File

@@ -7,13 +7,13 @@
"start": "ts-node src/main"
},
"dependencies": {
"@nestjs/common": "6.0.1",
"@nestjs/core": "6.0.1",
"@nestjs/common": "6.0.5",
"@nestjs/core": "6.0.5",
"class-transformer": "0.2.0",
"class-validator": "0.9.1",
"reflect-metadata": "0.1.13",
"rxjs": "6.4.0",
"typescript": "3.3.4000"
"typescript": "3.4.2"
},
"devDependencies": {
"@types/node": "7.10.5",

View File

@@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@nestjs/common": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.1.tgz",
"integrity": "sha512-+43nUxG9YSF2SnnFFT91/yTbvyfrGWI3a3cTI8jlSQUXOeKQILQhOXlA3N2GgDwYYH8GX8Xy8FXZ4GopJ7lT6A==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.5.tgz",
"integrity": "sha512-CbXtgBW/irevfUZF+rURDLFjhmT0Q6dmzbEYkuMg8bSjPmvgG6VzOBG6PwoPZbd+8PrPc2XLjN2A2Hg9mImp7A==",
"requires": {
"axios": "0.18.0",
"cli-color": "1.4.0",
@@ -15,9 +15,9 @@
}
},
"@nestjs/core": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.1.tgz",
"integrity": "sha512-1TbB19AE6opDPLoALaJO/ZZHCofKi8pJDJNInlPjRBIeP+Vfrh6LyCl7xw/RjXkrfZZIrMy+SVp0+qxlAZ7HnQ==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.5.tgz",
"integrity": "sha512-diLLr9qb9vGKyvfkt8JFGox21rpgj4YiToCRb3Tbdab0bvssLopznh/f7cdEBNmk5Adtl3IvXjtdVRj+XH7VCw==",
"requires": {
"@nuxtjs/opencollective": "0.2.1",
"fast-safe-stringify": "2.0.6",
@@ -28,9 +28,9 @@
}
},
"@nestjs/microservices": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.0.1.tgz",
"integrity": "sha512-ETCDkRjkVuqzvmbQbRcL+lKVrGVWv6whedNNVL9g3sAnIrJL/9lX4JQIJstQ68C0Lo/CfpTqozzeYoMgUyP4Iw==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.0.5.tgz",
"integrity": "sha512-lUyxzYQ3E5U7aQaY4bKVnGxizTl2cE2Rrey0ylmeVE4ae9Y7/z/7mdsfB4DVnuMVuRpyClUJ+zrQ4tJAIvL/nQ==",
"requires": {
"iterare": "1.1.2",
"json-socket": "0.3.0",
@@ -38,17 +38,17 @@
}
},
"@nestjs/testing": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.0.1.tgz",
"integrity": "sha512-+sB913Rrxwa6p7YZhExQEV7NiF/Qly6a9FlVlpoWkZnI0ktIzjbdZqo910JFYSawBdeplfHjWtt2Z6LSX6Mfng==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.0.5.tgz",
"integrity": "sha512-LrPBckONn/ZalBC8GU5LxvgIS8DJNrdwZE4gMJz0ugodwl0c1IL3e2gIukBkUJtHYPtzN12nYevnaGYT/V1aDQ==",
"requires": {
"optional": "0.1.4"
}
},
"@nestjs/websockets": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.0.1.tgz",
"integrity": "sha512-ILSHGyRIgn0qURxmW1DIabFRtFjAIMZY/+rVeJpI2VyoIZgmX/bqqWSesPdQcebcEPDz1pqFNSuL3UgVbhcuNQ==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.0.5.tgz",
"integrity": "sha512-cA4Z6dM/Q8WqzgDyC6HiCdFvcDVAv7TyGkzthuuCn9xHDeLjtyzCL1koogkZ0FmLWhNmCskc/yJb2IjApGtzvQ==",
"requires": {
"iterare": "1.1.2"
}
@@ -175,9 +175,9 @@
"dev": true
},
"consola": {
"version": "2.5.6",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.6.tgz",
"integrity": "sha512-DN0j6ewiNWkT09G3ZoyyzN3pSYrjxWcx49+mHu+oDI5dvW5vzmyuzYsqGS79+yQserH9ymJQbGzeqUejfssr8w=="
"version": "2.5.8",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.8.tgz",
"integrity": "sha512-fYv1M0rNJw4h0CZUx8PX02Px7xQhA+vNHpV8DBCGMoozp2Io/vrSXhhEothaRnSt7VMR0rj2pt9KKLXa5amrCw=="
},
"cookiejar": {
"version": "2.1.2",
@@ -569,9 +569,9 @@
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
},
"typescript": {
"version": "3.3.4000",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.4000.tgz",
"integrity": "sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA=="
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.2.tgz",
"integrity": "sha512-Og2Vn6Mk7JAuWA1hQdDQN/Ekm/SchX80VzLhjKN9ETYrIepBFAd8PkOdOTK2nKt0FCkmMZKBJvQ1dV1gIxPu/A=="
},
"util-deprecate": {
"version": "1.0.2",

View File

@@ -7,16 +7,16 @@
"start": "ts-node src/main"
},
"dependencies": {
"@nestjs/common": "6.0.1",
"@nestjs/core": "6.0.1",
"@nestjs/microservices": "6.0.1",
"@nestjs/testing": "6.0.1",
"@nestjs/websockets": "6.0.1",
"@nestjs/common": "6.0.5",
"@nestjs/core": "6.0.5",
"@nestjs/microservices": "6.0.5",
"@nestjs/testing": "6.0.5",
"@nestjs/websockets": "6.0.5",
"class-transformer": "0.2.0",
"class-validator": "0.9.1",
"reflect-metadata": "0.1.13",
"rxjs": "6.4.0",
"typescript": "3.3.4000"
"typescript": "3.4.2"
},
"devDependencies": {
"@types/node": "7.10.5",

View File

@@ -1,7 +1,9 @@
import { INestApplication } from '@nestjs/common';
import { Transport } from '@nestjs/microservices';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import * as request from 'supertest';
import { AppController } from '../src/app.controller';
import { ApplicationModule } from '../src/app.module';
describe('RPC transport', () => {
@@ -76,6 +78,18 @@ describe('RPC transport', () => {
.expect(500);
});
it(`/POST (event notification)`, done => {
request(server)
.post('/notify')
.send([1, 2, 3, 4, 5])
.end(() => {
setTimeout(() => {
expect(AppController.IS_NOTIFIED).to.be.true;
done();
}, 1000);
});
});
afterEach(async () => {
await app.close();
});

View File

@@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@nestjs/common": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.1.tgz",
"integrity": "sha512-+43nUxG9YSF2SnnFFT91/yTbvyfrGWI3a3cTI8jlSQUXOeKQILQhOXlA3N2GgDwYYH8GX8Xy8FXZ4GopJ7lT6A==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.5.tgz",
"integrity": "sha512-CbXtgBW/irevfUZF+rURDLFjhmT0Q6dmzbEYkuMg8bSjPmvgG6VzOBG6PwoPZbd+8PrPc2XLjN2A2Hg9mImp7A==",
"requires": {
"axios": "0.18.0",
"cli-color": "1.4.0",
@@ -15,9 +15,9 @@
}
},
"@nestjs/core": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.1.tgz",
"integrity": "sha512-1TbB19AE6opDPLoALaJO/ZZHCofKi8pJDJNInlPjRBIeP+Vfrh6LyCl7xw/RjXkrfZZIrMy+SVp0+qxlAZ7HnQ==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.5.tgz",
"integrity": "sha512-diLLr9qb9vGKyvfkt8JFGox21rpgj4YiToCRb3Tbdab0bvssLopznh/f7cdEBNmk5Adtl3IvXjtdVRj+XH7VCw==",
"requires": {
"@nuxtjs/opencollective": "0.2.1",
"fast-safe-stringify": "2.0.6",
@@ -28,9 +28,9 @@
}
},
"@nestjs/microservices": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.0.1.tgz",
"integrity": "sha512-ETCDkRjkVuqzvmbQbRcL+lKVrGVWv6whedNNVL9g3sAnIrJL/9lX4JQIJstQ68C0Lo/CfpTqozzeYoMgUyP4Iw==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.0.5.tgz",
"integrity": "sha512-lUyxzYQ3E5U7aQaY4bKVnGxizTl2cE2Rrey0ylmeVE4ae9Y7/z/7mdsfB4DVnuMVuRpyClUJ+zrQ4tJAIvL/nQ==",
"requires": {
"iterare": "1.1.2",
"json-socket": "0.3.0",
@@ -38,17 +38,17 @@
}
},
"@nestjs/testing": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.0.1.tgz",
"integrity": "sha512-+sB913Rrxwa6p7YZhExQEV7NiF/Qly6a9FlVlpoWkZnI0ktIzjbdZqo910JFYSawBdeplfHjWtt2Z6LSX6Mfng==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.0.5.tgz",
"integrity": "sha512-LrPBckONn/ZalBC8GU5LxvgIS8DJNrdwZE4gMJz0ugodwl0c1IL3e2gIukBkUJtHYPtzN12nYevnaGYT/V1aDQ==",
"requires": {
"optional": "0.1.4"
}
},
"@nestjs/websockets": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.0.1.tgz",
"integrity": "sha512-ILSHGyRIgn0qURxmW1DIabFRtFjAIMZY/+rVeJpI2VyoIZgmX/bqqWSesPdQcebcEPDz1pqFNSuL3UgVbhcuNQ==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.0.5.tgz",
"integrity": "sha512-cA4Z6dM/Q8WqzgDyC6HiCdFvcDVAv7TyGkzthuuCn9xHDeLjtyzCL1koogkZ0FmLWhNmCskc/yJb2IjApGtzvQ==",
"requires": {
"iterare": "1.1.2"
}
@@ -70,9 +70,9 @@
"dev": true
},
"amqp-connection-manager": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/amqp-connection-manager/-/amqp-connection-manager-2.3.0.tgz",
"integrity": "sha512-DvebklFknBkareuf3wxE9X1Eo7l0UK1MgeO9m4B2T/h0OvzLRYsXTtQ8OrkXfgkg98FgKRRR9Nyz9+86aJFEaQ==",
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/amqp-connection-manager/-/amqp-connection-manager-2.3.1.tgz",
"integrity": "sha512-5uld2vHfUZWfTjYhCsmWhrpNsESUxfq0K1RllUUavngULgwxLZcsm0PjhhwqNwEXRhkK1uDMS/rzjUGCZBVYaA==",
"requires": {
"promise-breaker": "^4.1.2"
}
@@ -183,9 +183,9 @@
"dev": true
},
"consola": {
"version": "2.5.6",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.6.tgz",
"integrity": "sha512-DN0j6ewiNWkT09G3ZoyyzN3pSYrjxWcx49+mHu+oDI5dvW5vzmyuzYsqGS79+yQserH9ymJQbGzeqUejfssr8w=="
"version": "2.5.8",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.8.tgz",
"integrity": "sha512-fYv1M0rNJw4h0CZUx8PX02Px7xQhA+vNHpV8DBCGMoozp2Io/vrSXhhEothaRnSt7VMR0rj2pt9KKLXa5amrCw=="
},
"cookiejar": {
"version": "2.1.2",
@@ -582,9 +582,9 @@
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
},
"typescript": {
"version": "3.3.4000",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.4000.tgz",
"integrity": "sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA=="
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.2.tgz",
"integrity": "sha512-Og2Vn6Mk7JAuWA1hQdDQN/Ekm/SchX80VzLhjKN9ETYrIepBFAd8PkOdOTK2nKt0FCkmMZKBJvQ1dV1gIxPu/A=="
},
"util-deprecate": {
"version": "1.0.2",

View File

@@ -7,17 +7,17 @@
"start": "ts-node src/main"
},
"dependencies": {
"@nestjs/common": "6.0.1",
"@nestjs/core": "6.0.1",
"@nestjs/microservices": "6.0.1",
"@nestjs/testing": "6.0.1",
"@nestjs/websockets": "6.0.1",
"amqp-connection-manager": "2.3.0",
"@nestjs/common": "6.0.5",
"@nestjs/core": "6.0.5",
"@nestjs/microservices": "6.0.5",
"@nestjs/testing": "6.0.5",
"@nestjs/websockets": "6.0.5",
"amqp-connection-manager": "2.3.1",
"class-transformer": "0.2.0",
"class-validator": "0.9.1",
"reflect-metadata": "0.1.13",
"rxjs": "6.4.0",
"typescript": "3.3.4000"
"typescript": "3.4.2"
},
"devDependencies": {
"@types/node": "7.10.5",

View File

@@ -1,15 +1,18 @@
import { Controller, Post, Body, Query, HttpCode } from '@nestjs/common';
import { Body, Controller, HttpCode, Post, Query } from '@nestjs/common';
import {
Client,
MessagePattern,
ClientProxy,
EventPattern,
MessagePattern,
Transport,
} from '@nestjs/microservices';
import { Observable, of, from } from 'rxjs';
import { from, Observable, of } from 'rxjs';
import { scan } from 'rxjs/operators';
@Controller()
export class AppController {
static IS_NOTIFIED = false;
@Client({ transport: Transport.TCP })
client: ClientProxy;
@@ -62,4 +65,14 @@ export class AppController {
streaming(data: number[]): Observable<number> {
return from(data);
}
@Post('notify')
async sendNotification(): Promise<any> {
return this.client.emit<number>('notification', true);
}
@EventPattern('notification')
eventHandler(data: boolean) {
AppController.IS_NOTIFIED = data;
}
}

View File

@@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@nestjs/common": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.1.tgz",
"integrity": "sha512-+43nUxG9YSF2SnnFFT91/yTbvyfrGWI3a3cTI8jlSQUXOeKQILQhOXlA3N2GgDwYYH8GX8Xy8FXZ4GopJ7lT6A==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.5.tgz",
"integrity": "sha512-CbXtgBW/irevfUZF+rURDLFjhmT0Q6dmzbEYkuMg8bSjPmvgG6VzOBG6PwoPZbd+8PrPc2XLjN2A2Hg9mImp7A==",
"requires": {
"axios": "0.18.0",
"cli-color": "1.4.0",
@@ -15,9 +15,9 @@
}
},
"@nestjs/core": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.1.tgz",
"integrity": "sha512-1TbB19AE6opDPLoALaJO/ZZHCofKi8pJDJNInlPjRBIeP+Vfrh6LyCl7xw/RjXkrfZZIrMy+SVp0+qxlAZ7HnQ==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.5.tgz",
"integrity": "sha512-diLLr9qb9vGKyvfkt8JFGox21rpgj4YiToCRb3Tbdab0bvssLopznh/f7cdEBNmk5Adtl3IvXjtdVRj+XH7VCw==",
"requires": {
"@nuxtjs/opencollective": "0.2.1",
"fast-safe-stringify": "2.0.6",
@@ -62,9 +62,9 @@
}
},
"@types/mongoose": {
"version": "5.3.23",
"resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.3.23.tgz",
"integrity": "sha512-UZJOkFe/ShSt3iYFBiadwwCu2Y8qm/RZyAoCQI2uf88wr3NfDBpbqqoIyrchBy1y2XtvAAyktEPzvvR7up6/TQ==",
"version": "5.3.24",
"resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.3.24.tgz",
"integrity": "sha512-Txa5C/veUJJG2o1sRbl8z1M7GhPjJz6J3JJQV76eYN0PyI9F2NO3gbVUj059ND5nlbvQjRhXuFLaqN6NH8nMNQ==",
"dev": true,
"requires": {
"@types/mongodb": "*",
@@ -111,13 +111,6 @@
"integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==",
"requires": {
"lodash": "^4.17.10"
},
"dependencies": {
"lodash": {
"version": "4.17.11",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
}
}
},
"axios": {
@@ -254,9 +247,9 @@
"dev": true
},
"consola": {
"version": "2.5.6",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.6.tgz",
"integrity": "sha512-DN0j6ewiNWkT09G3ZoyyzN3pSYrjxWcx49+mHu+oDI5dvW5vzmyuzYsqGS79+yQserH9ymJQbGzeqUejfssr8w=="
"version": "2.5.8",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.8.tgz",
"integrity": "sha512-fYv1M0rNJw4h0CZUx8PX02Px7xQhA+vNHpV8DBCGMoozp2Io/vrSXhhEothaRnSt7VMR0rj2pt9KKLXa5amrCw=="
},
"d": {
"version": "1.0.0",
@@ -272,13 +265,6 @@
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "^2.1.1"
},
"dependencies": {
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
}
}
},
"diff": {
@@ -438,9 +424,9 @@
"dev": true
},
"js-yaml": {
"version": "3.12.2",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.2.tgz",
"integrity": "sha512-QHn/Lh/7HhZ/Twc7vJYQTkjuCa0kaCcDcjK5Zlk2rvnUpy7DxMJ23+Jc2dcyvltwQVg1nygAVlB2oRDFHoRS5Q==",
"version": "3.13.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz",
"integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==",
"dev": true,
"requires": {
"argparse": "^1.0.7",
@@ -452,6 +438,11 @@
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.0.tgz",
"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=="
},
"lru-queue": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz",
@@ -532,9 +523,9 @@
}
},
"mongoose": {
"version": "5.4.19",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.4.19.tgz",
"integrity": "sha512-paRU3nbCrPIUVw1GAlxo11uIIqrYORctUx1kcLj7i2NhkxPQuy5OK2/FYj8+tglsaixycmONSyop2HQp1IUQSA==",
"version": "5.4.22",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.4.22.tgz",
"integrity": "sha512-rbtmFmXe5YJfBrVfOpSW2xeSAKFtnJ5RLQjl4ULzT1icmY/SUHtJ5b+mW4SMCEk7whm/w+2oHO9qMBr8UI1xIw==",
"requires": {
"async": "2.6.1",
"bson": "~1.1.0",
@@ -548,13 +539,6 @@
"regexp-clone": "0.0.1",
"safe-buffer": "5.1.2",
"sliced": "1.0.1"
},
"dependencies": {
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
}
}
},
"mongoose-legacy-pluralize": {
@@ -586,13 +570,18 @@
"requires": {
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
},
"next-tick": {
"version": "1.0.0",
@@ -776,9 +765,9 @@
"integrity": "sha512-avfPS28HmGLLc2o4elcc2EIq2FcH++Yo5YxpBZi9Yw93BCTGFthI4HPE4Rpep6vSYQaK8e69PelM44tPj+RaQg=="
},
"tslint": {
"version": "5.14.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.14.0.tgz",
"integrity": "sha512-IUla/ieHVnB8Le7LdQFRGlVJid2T/gaJe5VkjzRVSRR6pA2ODYrnfR1hmxi+5+au9l50jBwpbBL34txgv4NnTQ==",
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.15.0.tgz",
"integrity": "sha512-6bIEujKR21/3nyeoX2uBnE8s+tMXCQXhqMmaIPJpHmXJoBJPTLcI7/VHRtUwMhnLVdwLqqY3zmd8Dxqa5CVdJA==",
"dev": true,
"requires": {
"babel-code-frame": "^6.22.0",
@@ -787,7 +776,7 @@
"commander": "^2.12.1",
"diff": "^3.2.0",
"glob": "^7.1.1",
"js-yaml": "^3.7.0",
"js-yaml": "^3.13.0",
"minimatch": "^3.0.4",
"mkdirp": "^0.5.1",
"resolve": "^1.3.2",
@@ -806,9 +795,9 @@
}
},
"typescript": {
"version": "3.3.4000",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.4000.tgz",
"integrity": "sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA=="
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.2.tgz",
"integrity": "sha512-Og2Vn6Mk7JAuWA1hQdDQN/Ekm/SchX80VzLhjKN9ETYrIepBFAd8PkOdOTK2nKt0FCkmMZKBJvQ1dV1gIxPu/A=="
},
"uuid": {
"version": "3.3.2",

View File

@@ -9,18 +9,18 @@
"start:prod": "node dist/main.js"
},
"dependencies": {
"@nestjs/common": "6.0.1",
"@nestjs/core": "6.0.1",
"@nestjs/common": "6.0.5",
"@nestjs/core": "6.0.5",
"@nestjs/mongoose": "6.0.0",
"mongoose": "5.4.19",
"mongoose": "5.4.22",
"reflect-metadata": "0.1.13",
"rxjs": "6.4.0",
"typescript": "3.3.4000"
"typescript": "3.4.2"
},
"devDependencies": {
"@types/mongoose": "5.3.23",
"@types/mongoose": "5.3.24",
"@types/node": "7.10.5",
"ts-node": "8.0.3",
"tslint": "5.14.0"
"tslint": "5.15.0"
}
}

View File

@@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@nestjs/common": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.1.tgz",
"integrity": "sha512-+43nUxG9YSF2SnnFFT91/yTbvyfrGWI3a3cTI8jlSQUXOeKQILQhOXlA3N2GgDwYYH8GX8Xy8FXZ4GopJ7lT6A==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.5.tgz",
"integrity": "sha512-CbXtgBW/irevfUZF+rURDLFjhmT0Q6dmzbEYkuMg8bSjPmvgG6VzOBG6PwoPZbd+8PrPc2XLjN2A2Hg9mImp7A==",
"requires": {
"axios": "0.18.0",
"cli-color": "1.4.0",
@@ -15,9 +15,9 @@
}
},
"@nestjs/core": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.1.tgz",
"integrity": "sha512-1TbB19AE6opDPLoALaJO/ZZHCofKi8pJDJNInlPjRBIeP+Vfrh6LyCl7xw/RjXkrfZZIrMy+SVp0+qxlAZ7HnQ==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.5.tgz",
"integrity": "sha512-diLLr9qb9vGKyvfkt8JFGox21rpgj4YiToCRb3Tbdab0bvssLopznh/f7cdEBNmk5Adtl3IvXjtdVRj+XH7VCw==",
"requires": {
"@nuxtjs/opencollective": "0.2.1",
"fast-safe-stringify": "2.0.6",
@@ -28,9 +28,9 @@
}
},
"@nestjs/microservices": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.0.1.tgz",
"integrity": "sha512-ETCDkRjkVuqzvmbQbRcL+lKVrGVWv6whedNNVL9g3sAnIrJL/9lX4JQIJstQ68C0Lo/CfpTqozzeYoMgUyP4Iw==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.0.5.tgz",
"integrity": "sha512-lUyxzYQ3E5U7aQaY4bKVnGxizTl2cE2Rrey0ylmeVE4ae9Y7/z/7mdsfB4DVnuMVuRpyClUJ+zrQ4tJAIvL/nQ==",
"requires": {
"iterare": "1.1.2",
"json-socket": "0.3.0",
@@ -38,17 +38,17 @@
}
},
"@nestjs/testing": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.0.1.tgz",
"integrity": "sha512-+sB913Rrxwa6p7YZhExQEV7NiF/Qly6a9FlVlpoWkZnI0ktIzjbdZqo910JFYSawBdeplfHjWtt2Z6LSX6Mfng==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.0.5.tgz",
"integrity": "sha512-LrPBckONn/ZalBC8GU5LxvgIS8DJNrdwZE4gMJz0ugodwl0c1IL3e2gIukBkUJtHYPtzN12nYevnaGYT/V1aDQ==",
"requires": {
"optional": "0.1.4"
}
},
"@nestjs/websockets": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.0.1.tgz",
"integrity": "sha512-ILSHGyRIgn0qURxmW1DIabFRtFjAIMZY/+rVeJpI2VyoIZgmX/bqqWSesPdQcebcEPDz1pqFNSuL3UgVbhcuNQ==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.0.5.tgz",
"integrity": "sha512-cA4Z6dM/Q8WqzgDyC6HiCdFvcDVAv7TyGkzthuuCn9xHDeLjtyzCL1koogkZ0FmLWhNmCskc/yJb2IjApGtzvQ==",
"requires": {
"iterare": "1.1.2"
}
@@ -116,9 +116,9 @@
"dev": true
},
"avvio": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/avvio/-/avvio-6.2.0.tgz",
"integrity": "sha512-zEd82xsl60/FkeQ5P3jqflS6Hh7NbzAVAgTIVbCeUbg82hdkO2SNKN/w15f6KjbEAbIzN+V9ji4O9+aEsKgrvA==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/avvio/-/avvio-6.2.1.tgz",
"integrity": "sha512-k+gTocL3yShwN1PtKEsSj7eFiApcZ4JZLAu/ecyzEb8jyx+Kmxb+7SXUsodB47g7fqhs/zkfsCdqq72a1ok5Ew==",
"requires": {
"archy": "^1.0.0",
"debug": "^4.0.0",
@@ -226,9 +226,9 @@
"dev": true
},
"consola": {
"version": "2.5.6",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.6.tgz",
"integrity": "sha512-DN0j6ewiNWkT09G3ZoyyzN3pSYrjxWcx49+mHu+oDI5dvW5vzmyuzYsqGS79+yQserH9ymJQbGzeqUejfssr8w=="
"version": "2.5.8",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.8.tgz",
"integrity": "sha512-fYv1M0rNJw4h0CZUx8PX02Px7xQhA+vNHpV8DBCGMoozp2Io/vrSXhhEothaRnSt7VMR0rj2pt9KKLXa5amrCw=="
},
"cookiejar": {
"version": "2.1.2",
@@ -352,18 +352,18 @@
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
},
"fast-json-stringify": {
"version": "1.11.3",
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.11.3.tgz",
"integrity": "sha512-Nx9oURoGD4XYFueNkNzaameSQIcBw2HQrnsnJaRb4PFrlW3/88zusG65pzHA0P7+g5Hn7hyawG3/nCKs3NUAhQ==",
"version": "1.14.0",
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.14.0.tgz",
"integrity": "sha512-3VSblXsVxIE46E/YzRYHapyIeM3/igeA/kyzdL5xfAIYNnCLd8Oy+scrURnqZIRXMmtx0hfyp+okN5+r4W+GMQ==",
"requires": {
"ajv": "^6.8.1",
"deepmerge": "^3.0.0"
}
},
"fast-redact": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-1.4.4.tgz",
"integrity": "sha512-QOQZ8sDDQPZMJ6x6zlm6hLZ2cjPDqfN3R/AYnAbM+yy8VNPvOnVXdUF/E/xbMv7g44c1krhWuzgjH2u0V5Vhsg=="
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-1.5.0.tgz",
"integrity": "sha512-Afo61CgUjkzdvOKDHn08qnZ0kwck38AOGcMlvSGzvJbIab6soAP5rdoQayecGCDsD69AiF9vJBXyq31eoEO2tQ=="
},
"fast-safe-stringify": {
"version": "2.0.6",
@@ -371,9 +371,9 @@
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
},
"fastify": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.1.0.tgz",
"integrity": "sha512-rktprBPTTt1aAsaiMjkbKVzmy/fhX5SGj1DkJY6wddBOzxHAKaQ7F3ia3n8tVPHw07JzNlTmJKtG4zHhnXEdlA==",
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.2.0.tgz",
"integrity": "sha512-U6W101N+8Hyz2uiN3XqdSdTiaWYiJ0lCJmC3tO42PNttjCZQp8EPIhZ0QkVQWLrrP0ijjgomwaYrj9eMzqWyDw==",
"requires": {
"abstract-logging": "^1.0.0",
"ajv": "^6.9.2",
@@ -389,26 +389,6 @@
"readable-stream": "^3.1.1",
"rfdc": "^1.1.2",
"tiny-lru": "^6.0.1"
},
"dependencies": {
"readable-stream": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.2.0.tgz",
"integrity": "sha512-RV20kLjdmpZuTF1INEb9IA3L68Nmi+Ri7ppZqo78wj//Pn62fCoJyV9zalccNzDD/OuJpMG4f+pfMl8+L6QdGw==",
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
}
},
"string_decoder": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz",
"integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==",
"requires": {
"safe-buffer": "~5.1.0"
}
}
}
},
"fastq": {
@@ -525,32 +505,12 @@
"integrity": "sha512-jc8ZbUnYIWdxERFWQKVgwSLkGSe+kyzvmYxwNaRgx/c8NNyuHes4UHnPM3LUrAFXUx1BhNJ94n1h/KCRlbvV0g=="
},
"light-my-request": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-3.2.0.tgz",
"integrity": "sha512-XpNvOFfoQRLPNIFLB6YFjwQj61DyAAW+N08C3KXf+SwbJjZjrZk7gh8IYR8gML96QBM4NAT2Mwhi3tHvrKxnMw==",
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-3.3.0.tgz",
"integrity": "sha512-dLtwhjzbuHJ+KMMUBSlVid6Iqxx+KKvULWLnBD06WMgPHxiPkEh1cVyj+Xc8HGU64hULlSw/sZVCdFsvjNQeNA==",
"requires": {
"ajv": "^6.8.1",
"readable-stream": "^3.1.1"
},
"dependencies": {
"readable-stream": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.2.0.tgz",
"integrity": "sha512-RV20kLjdmpZuTF1INEb9IA3L68Nmi+Ri7ppZqo78wj//Pn62fCoJyV9zalccNzDD/OuJpMG4f+pfMl8+L6QdGw==",
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
}
},
"string_decoder": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz",
"integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==",
"requires": {
"safe-buffer": "~5.1.0"
}
}
}
},
"lru-queue": {
@@ -595,13 +555,6 @@
"requires": {
"path-to-regexp": "^3.0.0",
"reusify": "^1.0.2"
},
"dependencies": {
"path-to-regexp": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.0.0.tgz",
"integrity": "sha512-ZOtfhPttCrqp2M1PBBH4X13XlvnfhIwD7yCLx+GoGoXRPQyxGOTdQMpIzPSPKXAJT/JQrdfFrgdJOyAzvgpQ9A=="
}
}
},
"mime": {
@@ -651,24 +604,22 @@
"resolved": "https://registry.npmjs.org/optional/-/optional-0.1.4.tgz",
"integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw=="
},
"path-to-regexp": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.0.0.tgz",
"integrity": "sha512-ZOtfhPttCrqp2M1PBBH4X13XlvnfhIwD7yCLx+GoGoXRPQyxGOTdQMpIzPSPKXAJT/JQrdfFrgdJOyAzvgpQ9A=="
},
"pino": {
"version": "5.11.1",
"resolved": "https://registry.npmjs.org/pino/-/pino-5.11.1.tgz",
"integrity": "sha512-NIua0mGb9Adknq35ONvQmvh93LCUVUjp2+1q1EcvIkJmpJnSd3E5rHVKlKNjzMXFl/z3fI+QA0xXCjPEKNiLvQ==",
"version": "5.12.2",
"resolved": "https://registry.npmjs.org/pino/-/pino-5.12.2.tgz",
"integrity": "sha512-EunVRDkw/eQzgAudJiZuqzEQ20hDezixLRLrdxUMBzavvt5ot3vep7K8swRvXSgj2bKtbOmoHnrRMtYzRjfITQ==",
"requires": {
"fast-redact": "^1.4.2",
"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.0",
"sonic-boom": "^0.7.1"
},
"dependencies": {
"fast-safe-stringify": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz",
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
}
"quick-format-unescaped": "^3.0.2",
"sonic-boom": "^0.7.3"
}
},
"pino-std-serializers": {
@@ -707,6 +658,16 @@
"resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-3.0.2.tgz",
"integrity": "sha512-FXTaCkwvpIlkdKeGDNgcq07SXWS383noQUuZjvdE1QcTt+eLuqof6/BDiEPqB59FWLie/l91+HtlJSw7iCViSA=="
},
"readable-stream": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
"integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
}
},
"reflect-metadata": {
"version": "0.1.13",
"resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz",
@@ -777,6 +738,14 @@
"source-map": "^0.6.0"
}
},
"string_decoder": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz",
"integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==",
"requires": {
"safe-buffer": "~5.1.0"
}
},
"superagent": {
"version": "3.8.3",
"resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.3.tgz",
@@ -878,9 +847,9 @@
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
},
"typescript": {
"version": "3.3.4000",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.4000.tgz",
"integrity": "sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA=="
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.2.tgz",
"integrity": "sha512-Og2Vn6Mk7JAuWA1hQdDQN/Ekm/SchX80VzLhjKN9ETYrIepBFAd8PkOdOTK2nKt0FCkmMZKBJvQ1dV1gIxPu/A=="
},
"uri-js": {
"version": "4.2.2",

View File

@@ -7,17 +7,17 @@
"start": "ts-node src/main"
},
"dependencies": {
"@nestjs/common": "6.0.1",
"@nestjs/core": "6.0.1",
"@nestjs/microservices": "6.0.1",
"@nestjs/testing": "6.0.1",
"@nestjs/websockets": "6.0.1",
"@nestjs/common": "6.0.5",
"@nestjs/core": "6.0.5",
"@nestjs/microservices": "6.0.5",
"@nestjs/testing": "6.0.5",
"@nestjs/websockets": "6.0.5",
"class-transformer": "0.2.0",
"class-validator": "0.9.1",
"fastify": "2.1.0",
"fastify": "2.2.0",
"reflect-metadata": "0.1.13",
"rxjs": "6.4.0",
"typescript": "3.3.4000"
"typescript": "3.4.2"
},
"devDependencies": {
"@types/node": "7.10.5",

View File

@@ -32,24 +32,20 @@ describe('GraphQL - Pipes', () => {
extensions: {
code: 'INTERNAL_SERVER_ERROR',
exception: {
message: {
error: 'Bad Request',
message: [
{
children: [],
constraints: {
length:
'description must be longer than or equal to 30 characters',
},
property: 'description',
target: {
ingredients: [],
title: 'test',
},
message: [
{
children: [],
constraints: {
length:
'description must be longer than or equal to 30 characters',
},
],
statusCode: 400,
},
property: 'description',
target: {
ingredients: [],
title: 'test',
},
},
],
response: {
error: 'Bad Request',
message: [
@@ -77,24 +73,20 @@ describe('GraphQL - Pipes', () => {
line: 2,
},
],
message: {
error: 'Bad Request',
message: [
{
children: [],
constraints: {
length:
'description must be longer than or equal to 30 characters',
},
property: 'description',
target: {
ingredients: [],
title: 'test',
},
message: [
{
children: [],
constraints: {
length:
'description must be longer than or equal to 30 characters',
},
],
statusCode: 400,
},
property: 'description',
target: {
ingredients: [],
title: 'test',
},
},
],
path: ['addRecipe'],
},
],

View File

@@ -36,9 +36,9 @@
}
},
"@nestjs/common": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.1.tgz",
"integrity": "sha512-+43nUxG9YSF2SnnFFT91/yTbvyfrGWI3a3cTI8jlSQUXOeKQILQhOXlA3N2GgDwYYH8GX8Xy8FXZ4GopJ7lT6A==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.5.tgz",
"integrity": "sha512-CbXtgBW/irevfUZF+rURDLFjhmT0Q6dmzbEYkuMg8bSjPmvgG6VzOBG6PwoPZbd+8PrPc2XLjN2A2Hg9mImp7A==",
"requires": {
"axios": "0.18.0",
"cli-color": "1.4.0",
@@ -46,9 +46,9 @@
}
},
"@nestjs/core": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.1.tgz",
"integrity": "sha512-1TbB19AE6opDPLoALaJO/ZZHCofKi8pJDJNInlPjRBIeP+Vfrh6LyCl7xw/RjXkrfZZIrMy+SVp0+qxlAZ7HnQ==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.5.tgz",
"integrity": "sha512-diLLr9qb9vGKyvfkt8JFGox21rpgj4YiToCRb3Tbdab0bvssLopznh/f7cdEBNmk5Adtl3IvXjtdVRj+XH7VCw==",
"requires": {
"@nuxtjs/opencollective": "0.2.1",
"fast-safe-stringify": "2.0.6",
@@ -59,18 +59,18 @@
}
},
"@nestjs/graphql": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/graphql/-/graphql-6.0.1.tgz",
"integrity": "sha512-AWo4f2L88WC+TKwST54Mz71VtH3nlQUmwMqyNwr6EzQHygXUXQfehROJmxe4K5xvcl2EAMjkYDrV/HIi2hP5ZA==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/graphql/-/graphql-6.0.5.tgz",
"integrity": "sha512-TxTPgb1uXkmIjx0pVkHDZ5QyPCiJUjZnTPdLe1l/KE6hNd0/8TXpWelh/dNylFUFrPCI2N3k96GEibcT4uT6+Q==",
"requires": {
"@types/graphql": "14.0.7",
"chokidar": "2.1.2",
"@types/graphql": "14.2.0",
"chokidar": "2.1.5",
"fast-glob": "2.2.6",
"graphql-tools": "4.0.4",
"lodash": "4.17.11",
"merge-graphql-schemas": "1.5.8",
"optional": "0.1.4",
"ts-morph": "1.3.1",
"ts-morph": "1.3.2",
"uuid": "3.3.2"
}
},
@@ -211,9 +211,9 @@
}
},
"@types/graphql": {
"version": "14.0.7",
"resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-14.0.7.tgz",
"integrity": "sha512-BoLDjdvLQsXPZLJux3lEZANwGr3Xag56Ngy0U3y8uoRSDdeLcn43H3oBcgZlnd++iOQElBpaRVDHPzEDekyvXQ=="
"version": "14.2.0",
"resolved": "https://registry.npmjs.org/@types/graphql/-/graphql-14.2.0.tgz",
"integrity": "sha512-lELg5m6eBOmATWyCZl8qULEOvnPIUG6B443yXKj930glXIgwQirIBPp5rthP2amJW0YSzUg2s5sfgba4mRRCNw=="
},
"@types/long": {
"version": "4.0.0",
@@ -662,9 +662,9 @@
}
},
"binary-extensions": {
"version": "1.13.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.0.tgz",
"integrity": "sha512-EgmjVLMn22z7eGGv3kcnHwSnJXmFHjISTY9E/S5lIcTD3Oxw05QTcBLNkJFzcb3cNueUdF/IN4U+d78V0zO8Hw=="
"version": "1.13.1",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz",
"integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw=="
},
"body-parser": {
"version": "1.18.3",
@@ -820,9 +820,9 @@
}
},
"chokidar": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.2.tgz",
"integrity": "sha512-IwXUx0FXc5ibYmPC2XeEj5mpXoV66sR+t3jqu2NS2GYwCktt3KF1/Qqjws/NkegajBA4RbZ5+DDwlOiJsxDHEg==",
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.5.tgz",
"integrity": "sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A==",
"requires": {
"anymatch": "^2.0.0",
"async-each": "^1.0.1",
@@ -835,7 +835,7 @@
"normalize-path": "^3.0.0",
"path-is-absolute": "^1.0.0",
"readdirp": "^2.2.1",
"upath": "^1.1.0"
"upath": "^1.1.1"
}
},
"class-transformer": {
@@ -930,9 +930,9 @@
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"consola": {
"version": "2.5.6",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.6.tgz",
"integrity": "sha512-DN0j6ewiNWkT09G3ZoyyzN3pSYrjxWcx49+mHu+oDI5dvW5vzmyuzYsqGS79+yQserH9ymJQbGzeqUejfssr8w=="
"version": "2.5.8",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.8.tgz",
"integrity": "sha512-fYv1M0rNJw4h0CZUx8PX02Px7xQhA+vNHpV8DBCGMoozp2Io/vrSXhhEothaRnSt7VMR0rj2pt9KKLXa5amrCw=="
},
"content-type": {
"version": "1.0.4",
@@ -1929,9 +1929,9 @@
"integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA=="
},
"graphql": {
"version": "14.1.1",
"resolved": "https://registry.npmjs.org/graphql/-/graphql-14.1.1.tgz",
"integrity": "sha512-C5zDzLqvfPAgTtP8AUPIt9keDabrdRAqSWjj2OPRKrKxI9Fb65I36s1uCs1UUBFnSWTdO7hyHi7z1ZbwKMKF6Q==",
"version": "14.2.1",
"resolved": "https://registry.npmjs.org/graphql/-/graphql-14.2.1.tgz",
"integrity": "sha512-2PL1UbvKeSjy/lUeJqHk+eR9CvuErXoCNwJI4jm3oNFEeY+9ELqHNKO1ZuSxAkasPkpWbmT/iMRMFxd3cEL3tQ==",
"requires": {
"iterall": "^1.2.2"
}
@@ -2223,9 +2223,9 @@
"integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI="
},
"is-glob": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz",
"integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=",
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
"integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
"requires": {
"is-extglob": "^2.1.1"
}
@@ -2330,9 +2330,9 @@
"dev": true
},
"js-yaml": {
"version": "3.12.2",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.2.tgz",
"integrity": "sha512-QHn/Lh/7HhZ/Twc7vJYQTkjuCa0kaCcDcjK5Zlk2rvnUpy7DxMJ23+Jc2dcyvltwQVg1nygAVlB2oRDFHoRS5Q==",
"version": "3.13.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz",
"integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==",
"dev": true,
"requires": {
"argparse": "^1.0.7",
@@ -2549,9 +2549,9 @@
}
},
"nan": {
"version": "2.13.1",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.13.1.tgz",
"integrity": "sha512-I6YB/YEuDeUZMmhscXKxGgZlFnhsn5y0hgOZBadkzfTRrZBtJDZeg6eQf7PYMIEclwmorTKK8GztsyOUSVBREA==",
"version": "2.13.2",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz",
"integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==",
"optional": true
},
"nanomatch": {
@@ -2897,8 +2897,7 @@
"semver": {
"version": "5.6.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
"integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==",
"dev": true
"integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg=="
},
"set-value": {
"version": "2.0.0",
@@ -3237,9 +3236,9 @@
}
},
"ts-morph": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-1.3.1.tgz",
"integrity": "sha512-zWjy62PNOeX7LP6Q1h5UM7uBetEHKu9P2EoRQn0CZwqANxU/ZXvEiOtKeQJwKihRfslES+pLNCfIG7R0WS4ZbQ==",
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-1.3.2.tgz",
"integrity": "sha512-NaPUD0NY1nfRfdWnGaYMFsIAcQyuS0teCOjZ+v5nvBYziuKZaJ7z5JLkHkhrBkffqR9DLnn2Zx1vdW5Ub1doxg==",
"requires": {
"@dsherret/to-absolute-glob": "^2.0.2",
"code-block-writer": "7.2.2",
@@ -3249,7 +3248,14 @@
"is-negated-glob": "^1.0.0",
"multimatch": "^2.1.0",
"tslib": "^1.9.0",
"typescript": "^3.0.1"
"typescript": ">=3.0.1 <3.4.0"
},
"dependencies": {
"typescript": {
"version": "3.3.4000",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.4000.tgz",
"integrity": "sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA=="
}
}
},
"ts-node": {
@@ -3271,9 +3277,9 @@
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
},
"tslint": {
"version": "5.14.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.14.0.tgz",
"integrity": "sha512-IUla/ieHVnB8Le7LdQFRGlVJid2T/gaJe5VkjzRVSRR6pA2ODYrnfR1hmxi+5+au9l50jBwpbBL34txgv4NnTQ==",
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.15.0.tgz",
"integrity": "sha512-6bIEujKR21/3nyeoX2uBnE8s+tMXCQXhqMmaIPJpHmXJoBJPTLcI7/VHRtUwMhnLVdwLqqY3zmd8Dxqa5CVdJA==",
"dev": true,
"requires": {
"babel-code-frame": "^6.22.0",
@@ -3282,7 +3288,7 @@
"commander": "^2.12.1",
"diff": "^3.2.0",
"glob": "^7.1.1",
"js-yaml": "^3.7.0",
"js-yaml": "^3.13.0",
"minimatch": "^3.0.4",
"mkdirp": "^0.5.1",
"resolve": "^1.3.2",
@@ -3301,9 +3307,9 @@
}
},
"type-graphql": {
"version": "0.17.0",
"resolved": "https://registry.npmjs.org/type-graphql/-/type-graphql-0.17.0.tgz",
"integrity": "sha512-eUPH8l5bjR7dSs09mEmRHY4aoMint8PiT0WAZDmDgbqd9fsaoMh6OvHHv92vDOzHf2L91pjUbMyrEb8ejceMpg==",
"version": "0.17.1",
"resolved": "https://registry.npmjs.org/type-graphql/-/type-graphql-0.17.1.tgz",
"integrity": "sha512-IsO+mitgBgkAfD/S0zD0xdDeVZ3FI1I3ihyMEFaL//VHEn2WG+/PMmNlfNva/TGneTXrN7NpgR0941Ov51hppQ==",
"requires": {
"@types/glob": "^7.1.1",
"@types/node": "*",
@@ -3328,19 +3334,6 @@
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"graphql-subscriptions": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/graphql-subscriptions/-/graphql-subscriptions-1.0.0.tgz",
"integrity": "sha512-+ytmryoHF1LVf58NKEaNPRUzYyXplm120ntxfPcgOBC7TnK7Tv/4VRHeh4FAR9iL+O1bqhZs4nkibxQ+OA5cDQ==",
"requires": {
"iterall": "^1.2.1"
}
},
"semver": {
"version": "5.6.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
"integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg=="
}
}
},
@@ -3354,9 +3347,9 @@
}
},
"typescript": {
"version": "3.3.4000",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.4000.tgz",
"integrity": "sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA=="
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.2.tgz",
"integrity": "sha512-Og2Vn6Mk7JAuWA1hQdDQN/Ekm/SchX80VzLhjKN9ETYrIepBFAd8PkOdOTK2nKt0FCkmMZKBJvQ1dV1gIxPu/A=="
},
"unc-path-regex": {
"version": "0.1.2",
@@ -3491,9 +3484,9 @@
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"ws": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.0.tgz",
"integrity": "sha512-deZYUNlt2O4buFCa3t5bKLf8A7FPP/TVjwOeVNpw818Ma5nk4MLXls2eoEGS39o8119QIYxTrTDoPQ5B/gTD6w==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz",
"integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==",
"requires": {
"async-limiter": "~1.0.0"
}

View File

@@ -9,24 +9,24 @@
"start:prod": "node dist/main.js"
},
"dependencies": {
"@nestjs/common": "6.0.1",
"@nestjs/core": "6.0.1",
"@nestjs/graphql": "6.0.1",
"@nestjs/common": "6.0.5",
"@nestjs/core": "6.0.5",
"@nestjs/graphql": "6.0.5",
"apollo-server-express": "2.4.8",
"class-transformer": "0.2.0",
"class-validator": "0.9.1",
"graphql": "14.1.1",
"graphql": "14.2.1",
"graphql-tools": "4.0.4",
"reflect-metadata": "0.1.13",
"rxjs": "6.4.0",
"subscriptions-transport-ws": "0.9.16",
"type-graphql": "0.17.0",
"typescript": "3.3.4000",
"ws": "6.2.0"
"type-graphql": "0.17.1",
"typescript": "3.4.2",
"ws": "6.2.1"
},
"devDependencies": {
"@types/node": "7.10.5",
"ts-node": "8.0.3",
"tslint": "5.14.0"
"tslint": "5.15.0"
}
}

View File

@@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@nestjs/common": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.1.tgz",
"integrity": "sha512-+43nUxG9YSF2SnnFFT91/yTbvyfrGWI3a3cTI8jlSQUXOeKQILQhOXlA3N2GgDwYYH8GX8Xy8FXZ4GopJ7lT6A==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.5.tgz",
"integrity": "sha512-CbXtgBW/irevfUZF+rURDLFjhmT0Q6dmzbEYkuMg8bSjPmvgG6VzOBG6PwoPZbd+8PrPc2XLjN2A2Hg9mImp7A==",
"requires": {
"axios": "0.18.0",
"cli-color": "1.4.0",
@@ -15,9 +15,9 @@
}
},
"@nestjs/core": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.1.tgz",
"integrity": "sha512-1TbB19AE6opDPLoALaJO/ZZHCofKi8pJDJNInlPjRBIeP+Vfrh6LyCl7xw/RjXkrfZZIrMy+SVp0+qxlAZ7HnQ==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.5.tgz",
"integrity": "sha512-diLLr9qb9vGKyvfkt8JFGox21rpgj4YiToCRb3Tbdab0bvssLopznh/f7cdEBNmk5Adtl3IvXjtdVRj+XH7VCw==",
"requires": {
"@nuxtjs/opencollective": "0.2.1",
"fast-safe-stringify": "2.0.6",
@@ -82,9 +82,9 @@
"integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8="
},
"app-root-path": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-2.1.0.tgz",
"integrity": "sha1-mL9lmTJ+zqGZMJhm6BQDaP0uZGo="
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-2.2.1.tgz",
"integrity": "sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA=="
},
"arg": {
"version": "4.1.0",
@@ -243,9 +243,9 @@
}
},
"cli-highlight": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/cli-highlight/-/cli-highlight-2.0.0.tgz",
"integrity": "sha512-cW9HBA7Z7YETTwncdScUBUUDj8AnBU4rq6qQt6NbSXG2sFLcQ1LHEAGadRWydVtNXnH6StuN4GDCX5yddJDgew==",
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/cli-highlight/-/cli-highlight-2.1.0.tgz",
"integrity": "sha512-DxaFAFBGRaB+xueXP7jlJC5f867gZUZXz74RaxeZ9juEZM2Sm/s6ilzpz0uxKiT+Mj6TzHlibtXfG/dK5bSwDA==",
"requires": {
"chalk": "^2.3.0",
"highlight.js": "^9.6.0",
@@ -315,9 +315,9 @@
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"consola": {
"version": "2.5.6",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.6.tgz",
"integrity": "sha512-DN0j6ewiNWkT09G3ZoyyzN3pSYrjxWcx49+mHu+oDI5dvW5vzmyuzYsqGS79+yQserH9ymJQbGzeqUejfssr8w=="
"version": "2.5.8",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.8.tgz",
"integrity": "sha512-fYv1M0rNJw4h0CZUx8PX02Px7xQhA+vNHpV8DBCGMoozp2Io/vrSXhhEothaRnSt7VMR0rj2pt9KKLXa5amrCw=="
},
"core-util-is": {
"version": "1.0.2",
@@ -348,13 +348,6 @@
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"requires": {
"ms": "^2.1.1"
},
"dependencies": {
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
}
}
},
"decamelize": {
@@ -555,9 +548,9 @@
"integrity": "sha512-zozTAWM1D6sozHo8kqhfYgsac+B+q0PmsjXeyDrYIHHcBN0zTVT66+s2GW1GZv7DbyaROdLXKdabwS/WqPyIdQ=="
},
"ieee754": {
"version": "1.1.12",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz",
"integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA=="
"version": "1.1.13",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
"integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg=="
},
"inflight": {
"version": "1.0.6",
@@ -620,9 +613,9 @@
"dev": true
},
"js-yaml": {
"version": "3.11.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz",
"integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==",
"version": "3.13.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz",
"integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==",
"dev": true,
"requires": {
"argparse": "^1.0.7",
@@ -1093,9 +1086,9 @@
"integrity": "sha512-avfPS28HmGLLc2o4elcc2EIq2FcH++Yo5YxpBZi9Yw93BCTGFthI4HPE4Rpep6vSYQaK8e69PelM44tPj+RaQg=="
},
"tslint": {
"version": "5.14.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.14.0.tgz",
"integrity": "sha512-IUla/ieHVnB8Le7LdQFRGlVJid2T/gaJe5VkjzRVSRR6pA2ODYrnfR1hmxi+5+au9l50jBwpbBL34txgv4NnTQ==",
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.15.0.tgz",
"integrity": "sha512-6bIEujKR21/3nyeoX2uBnE8s+tMXCQXhqMmaIPJpHmXJoBJPTLcI7/VHRtUwMhnLVdwLqqY3zmd8Dxqa5CVdJA==",
"dev": true,
"requires": {
"babel-code-frame": "^6.22.0",
@@ -1104,7 +1097,7 @@
"commander": "^2.12.1",
"diff": "^3.2.0",
"glob": "^7.1.1",
"js-yaml": "^3.7.0",
"js-yaml": "^3.13.0",
"minimatch": "^3.0.4",
"mkdirp": "^0.5.1",
"resolve": "^1.3.2",
@@ -1123,9 +1116,9 @@
}
},
"typeorm": {
"version": "0.2.15",
"resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.2.15.tgz",
"integrity": "sha512-Gpl6fdgb7WLngtuSw2l7dOdOp4jrbVIjlSgpL3P6DX9GKvSzbXmjurmGQ9RRomn+us1Bg+tCYAiSv3j55riplQ==",
"version": "0.2.16",
"resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.2.16.tgz",
"integrity": "sha512-Ntx9Hjx2aJcPsbqTsqnhCZOG30bDQ8EalMa9J49CXMCatUuMbn9QTyreM9AuSQb2N91ENCRWPZIuzgRaSmC1Vw==",
"requires": {
"app-root-path": "^2.0.1",
"buffer": "^5.1.0",
@@ -1154,9 +1147,9 @@
}
},
"js-yaml": {
"version": "3.12.2",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.2.tgz",
"integrity": "sha512-QHn/Lh/7HhZ/Twc7vJYQTkjuCa0kaCcDcjK5Zlk2rvnUpy7DxMJ23+Jc2dcyvltwQVg1nygAVlB2oRDFHoRS5Q==",
"version": "3.13.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz",
"integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==",
"requires": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"
@@ -1165,9 +1158,9 @@
}
},
"typescript": {
"version": "3.3.4000",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.4000.tgz",
"integrity": "sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA=="
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.2.tgz",
"integrity": "sha512-Og2Vn6Mk7JAuWA1hQdDQN/Ekm/SchX80VzLhjKN9ETYrIepBFAd8PkOdOTK2nKt0FCkmMZKBJvQ1dV1gIxPu/A=="
},
"util-deprecate": {
"version": "1.0.2",
@@ -1449,9 +1442,9 @@
}
},
"p-try": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz",
"integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ=="
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.1.0.tgz",
"integrity": "sha512-H2RyIJ7+A3rjkwKC2l5GGtU4H1vkxKCAGsWasNVd0Set+6i4znxbWy6/j16YDPJDWxhsgZiKAstMEP8wCdSpjA=="
},
"require-main-filename": {
"version": "2.0.0",

View File

@@ -9,18 +9,18 @@
"start:prod": "node dist/main.js"
},
"dependencies": {
"@nestjs/common": "6.0.1",
"@nestjs/core": "6.0.1",
"@nestjs/common": "6.0.5",
"@nestjs/core": "6.0.5",
"@nestjs/typeorm": "6.0.0",
"mysql": "2.16.0",
"reflect-metadata": "0.1.13",
"rxjs": "6.4.0",
"typeorm": "0.2.15",
"typescript": "3.3.4000"
"typeorm": "0.2.16",
"typescript": "3.4.2"
},
"devDependencies": {
"@types/node": "7.10.5",
"ts-node": "8.0.3",
"tslint": "5.14.0"
"tslint": "5.15.0"
}
}

View File

@@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@nestjs/common": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.1.tgz",
"integrity": "sha512-+43nUxG9YSF2SnnFFT91/yTbvyfrGWI3a3cTI8jlSQUXOeKQILQhOXlA3N2GgDwYYH8GX8Xy8FXZ4GopJ7lT6A==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.5.tgz",
"integrity": "sha512-CbXtgBW/irevfUZF+rURDLFjhmT0Q6dmzbEYkuMg8bSjPmvgG6VzOBG6PwoPZbd+8PrPc2XLjN2A2Hg9mImp7A==",
"requires": {
"axios": "0.18.0",
"cli-color": "1.4.0",
@@ -15,9 +15,9 @@
}
},
"@nestjs/core": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.1.tgz",
"integrity": "sha512-1TbB19AE6opDPLoALaJO/ZZHCofKi8pJDJNInlPjRBIeP+Vfrh6LyCl7xw/RjXkrfZZIrMy+SVp0+qxlAZ7HnQ==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.5.tgz",
"integrity": "sha512-diLLr9qb9vGKyvfkt8JFGox21rpgj4YiToCRb3Tbdab0bvssLopznh/f7cdEBNmk5Adtl3IvXjtdVRj+XH7VCw==",
"requires": {
"@nuxtjs/opencollective": "0.2.1",
"fast-safe-stringify": "2.0.6",
@@ -28,9 +28,9 @@
}
},
"@nestjs/microservices": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.0.1.tgz",
"integrity": "sha512-ETCDkRjkVuqzvmbQbRcL+lKVrGVWv6whedNNVL9g3sAnIrJL/9lX4JQIJstQ68C0Lo/CfpTqozzeYoMgUyP4Iw==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.0.5.tgz",
"integrity": "sha512-lUyxzYQ3E5U7aQaY4bKVnGxizTl2cE2Rrey0ylmeVE4ae9Y7/z/7mdsfB4DVnuMVuRpyClUJ+zrQ4tJAIvL/nQ==",
"requires": {
"iterare": "1.1.2",
"json-socket": "0.3.0",
@@ -38,17 +38,17 @@
}
},
"@nestjs/testing": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.0.1.tgz",
"integrity": "sha512-+sB913Rrxwa6p7YZhExQEV7NiF/Qly6a9FlVlpoWkZnI0ktIzjbdZqo910JFYSawBdeplfHjWtt2Z6LSX6Mfng==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.0.5.tgz",
"integrity": "sha512-LrPBckONn/ZalBC8GU5LxvgIS8DJNrdwZE4gMJz0ugodwl0c1IL3e2gIukBkUJtHYPtzN12nYevnaGYT/V1aDQ==",
"requires": {
"optional": "0.1.4"
}
},
"@nestjs/websockets": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.0.1.tgz",
"integrity": "sha512-ILSHGyRIgn0qURxmW1DIabFRtFjAIMZY/+rVeJpI2VyoIZgmX/bqqWSesPdQcebcEPDz1pqFNSuL3UgVbhcuNQ==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.0.5.tgz",
"integrity": "sha512-cA4Z6dM/Q8WqzgDyC6HiCdFvcDVAv7TyGkzthuuCn9xHDeLjtyzCL1koogkZ0FmLWhNmCskc/yJb2IjApGtzvQ==",
"requires": {
"iterare": "1.1.2"
}
@@ -175,9 +175,9 @@
"dev": true
},
"consola": {
"version": "2.5.6",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.6.tgz",
"integrity": "sha512-DN0j6ewiNWkT09G3ZoyyzN3pSYrjxWcx49+mHu+oDI5dvW5vzmyuzYsqGS79+yQserH9ymJQbGzeqUejfssr8w=="
"version": "2.5.8",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.8.tgz",
"integrity": "sha512-fYv1M0rNJw4h0CZUx8PX02Px7xQhA+vNHpV8DBCGMoozp2Io/vrSXhhEothaRnSt7VMR0rj2pt9KKLXa5amrCw=="
},
"cookiejar": {
"version": "2.1.2",
@@ -569,9 +569,9 @@
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
},
"typescript": {
"version": "3.3.4000",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.4000.tgz",
"integrity": "sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA=="
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.2.tgz",
"integrity": "sha512-Og2Vn6Mk7JAuWA1hQdDQN/Ekm/SchX80VzLhjKN9ETYrIepBFAd8PkOdOTK2nKt0FCkmMZKBJvQ1dV1gIxPu/A=="
},
"util-deprecate": {
"version": "1.0.2",

View File

@@ -7,16 +7,16 @@
"start": "ts-node src/main"
},
"dependencies": {
"@nestjs/common": "6.0.1",
"@nestjs/core": "6.0.1",
"@nestjs/microservices": "6.0.1",
"@nestjs/testing": "6.0.1",
"@nestjs/websockets": "6.0.1",
"@nestjs/common": "6.0.5",
"@nestjs/core": "6.0.5",
"@nestjs/microservices": "6.0.5",
"@nestjs/testing": "6.0.5",
"@nestjs/websockets": "6.0.5",
"class-transformer": "0.2.0",
"class-validator": "0.9.1",
"reflect-metadata": "0.1.13",
"rxjs": "6.4.0",
"typescript": "3.3.4000"
"typescript": "3.4.2"
},
"devDependencies": {
"@types/node": "7.10.5",

View File

@@ -3,5 +3,5 @@
"packages": [
"packages/*"
],
"version": "6.0.2"
"version": "6.0.5"
}

202
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "nestjs",
"version": "6.0.0",
"version": "6.0.5",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -1267,9 +1267,9 @@
}
},
"@nestjs/common": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.1.tgz",
"integrity": "sha512-+43nUxG9YSF2SnnFFT91/yTbvyfrGWI3a3cTI8jlSQUXOeKQILQhOXlA3N2GgDwYYH8GX8Xy8FXZ4GopJ7lT6A==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.5.tgz",
"integrity": "sha512-CbXtgBW/irevfUZF+rURDLFjhmT0Q6dmzbEYkuMg8bSjPmvgG6VzOBG6PwoPZbd+8PrPc2XLjN2A2Hg9mImp7A==",
"requires": {
"axios": "0.18.0",
"cli-color": "1.4.0",
@@ -1277,9 +1277,9 @@
}
},
"@nestjs/core": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.1.tgz",
"integrity": "sha512-1TbB19AE6opDPLoALaJO/ZZHCofKi8pJDJNInlPjRBIeP+Vfrh6LyCl7xw/RjXkrfZZIrMy+SVp0+qxlAZ7HnQ==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.5.tgz",
"integrity": "sha512-diLLr9qb9vGKyvfkt8JFGox21rpgj4YiToCRb3Tbdab0bvssLopznh/f7cdEBNmk5Adtl3IvXjtdVRj+XH7VCw==",
"requires": {
"@nuxtjs/opencollective": "0.2.1",
"fast-safe-stringify": "2.0.6",
@@ -1290,9 +1290,9 @@
}
},
"@nestjs/microservices": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.0.1.tgz",
"integrity": "sha512-ETCDkRjkVuqzvmbQbRcL+lKVrGVWv6whedNNVL9g3sAnIrJL/9lX4JQIJstQ68C0Lo/CfpTqozzeYoMgUyP4Iw==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.0.5.tgz",
"integrity": "sha512-lUyxzYQ3E5U7aQaY4bKVnGxizTl2cE2Rrey0ylmeVE4ae9Y7/z/7mdsfB4DVnuMVuRpyClUJ+zrQ4tJAIvL/nQ==",
"requires": {
"iterare": "1.1.2",
"json-socket": "0.3.0",
@@ -1300,17 +1300,17 @@
}
},
"@nestjs/testing": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.0.1.tgz",
"integrity": "sha512-+sB913Rrxwa6p7YZhExQEV7NiF/Qly6a9FlVlpoWkZnI0ktIzjbdZqo910JFYSawBdeplfHjWtt2Z6LSX6Mfng==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.0.5.tgz",
"integrity": "sha512-LrPBckONn/ZalBC8GU5LxvgIS8DJNrdwZE4gMJz0ugodwl0c1IL3e2gIukBkUJtHYPtzN12nYevnaGYT/V1aDQ==",
"requires": {
"optional": "0.1.4"
}
},
"@nestjs/websockets": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.0.1.tgz",
"integrity": "sha512-ILSHGyRIgn0qURxmW1DIabFRtFjAIMZY/+rVeJpI2VyoIZgmX/bqqWSesPdQcebcEPDz1pqFNSuL3UgVbhcuNQ==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.0.5.tgz",
"integrity": "sha512-cA4Z6dM/Q8WqzgDyC6HiCdFvcDVAv7TyGkzthuuCn9xHDeLjtyzCL1koogkZ0FmLWhNmCskc/yJb2IjApGtzvQ==",
"requires": {
"iterare": "1.1.2"
}
@@ -1471,9 +1471,9 @@
}
},
"@sinonjs/samsam": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.0.tgz",
"integrity": "sha512-beHeJM/RRAaLLsMJhsCvHK31rIqZuobfPLa/80yGH5hnD8PV1hyh9xJBJNFfNmO7yWqm+zomijHsXpI6iTQJfQ==",
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.1.tgz",
"integrity": "sha512-wRSfmyd81swH0hA1bxJZJ57xr22kC07a1N4zuIL47yTS04bDk6AoCkczcqHEjcRPmJ+FruGJ9WBQiJwMtIElFw==",
"dev": true,
"requires": {
"@sinonjs/commons": "^1.0.2",
@@ -1621,9 +1621,9 @@
"dev": true
},
"@types/node": {
"version": "10.14.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.1.tgz",
"integrity": "sha512-Rymt08vh1GaW4vYB6QP61/5m/CFLGnFZP++bJpWbiNxceNa6RBipDmb413jvtSf/R1gg5a/jQVl2jY4XVRscEA=="
"version": "10.14.4",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.4.tgz",
"integrity": "sha512-DT25xX/YgyPKiHFOpNuANIQIVvYEwCWXgK2jYYwqgaMrYE6+tq+DtmMwlD3drl6DJbUwtlIDnn0d7tIn/EbXBg=="
},
"@types/range-parser": {
"version": "1.2.3",
@@ -1631,9 +1631,9 @@
"integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA=="
},
"@types/redis": {
"version": "2.8.11",
"resolved": "https://registry.npmjs.org/@types/redis/-/redis-2.8.11.tgz",
"integrity": "sha512-i0AqDzjX0FlO+npqkhl1etZw1fGnJc0IeHUHKAf/V7Drk+rDJI634GE9Lwh8aj/2ahuW6jHdWX4ZnyNofWXKrw==",
"version": "2.8.12",
"resolved": "https://registry.npmjs.org/@types/redis/-/redis-2.8.12.tgz",
"integrity": "sha512-eT5cGYr08OnF6OlAHdc2hVOBAKBpfQQNQHsWEvUwRPFiXRd+vv+hOHSSIo4xB7M5vZOZdjMT2OUlXYqo3YlIGQ==",
"dev": true,
"requires": {
"@types/node": "*"
@@ -1655,9 +1655,9 @@
}
},
"@types/sinon": {
"version": "7.0.10",
"resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.0.10.tgz",
"integrity": "sha512-4w7SvsiUOtd4mUfund9QROPSJ5At/GQskDpqd87pJIRI6ULWSJqHI3GIZE337wQuN3aznroJGr94+o8fwvL37Q==",
"version": "7.0.11",
"resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.0.11.tgz",
"integrity": "sha512-6ee09Ugx6GyEr0opUIakmxIWFNmqYPjkqa3/BuxCBokA0klsOLPgMD5K4q40lH7/yZVuJVzOfQpd7pipwjngkQ==",
"dev": true
},
"@types/socket.io": {
@@ -1756,9 +1756,9 @@
}
},
"amqp-connection-manager": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/amqp-connection-manager/-/amqp-connection-manager-2.3.0.tgz",
"integrity": "sha512-DvebklFknBkareuf3wxE9X1Eo7l0UK1MgeO9m4B2T/h0OvzLRYsXTtQ8OrkXfgkg98FgKRRR9Nyz9+86aJFEaQ==",
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/amqp-connection-manager/-/amqp-connection-manager-2.3.1.tgz",
"integrity": "sha512-5uld2vHfUZWfTjYhCsmWhrpNsESUxfq0K1RllUUavngULgwxLZcsm0PjhhwqNwEXRhkK1uDMS/rzjUGCZBVYaA==",
"requires": {
"promise-breaker": "^4.1.2"
}
@@ -2587,9 +2587,9 @@
"integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg=="
},
"avvio": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/avvio/-/avvio-6.2.0.tgz",
"integrity": "sha512-zEd82xsl60/FkeQ5P3jqflS6Hh7NbzAVAgTIVbCeUbg82hdkO2SNKN/w15f6KjbEAbIzN+V9ji4O9+aEsKgrvA==",
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/avvio/-/avvio-6.2.1.tgz",
"integrity": "sha512-k+gTocL3yShwN1PtKEsSj7eFiApcZ4JZLAu/ecyzEb8jyx+Kmxb+7SXUsodB47g7fqhs/zkfsCdqq72a1ok5Ew==",
"requires": {
"archy": "^1.0.0",
"debug": "^4.0.0",
@@ -4431,9 +4431,9 @@
}
},
"core-js": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.0.0.tgz",
"integrity": "sha512-WBmxlgH2122EzEJ6GH8o9L/FeoUKxxxZ6q6VUxoTlsE4EvbTWKJb447eyVxTEuq0LpXjlq/kCB2qgBvsYRkLvQ==",
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.0.1.tgz",
"integrity": "sha512-sco40rF+2KlE0ROMvydjkrVMMG1vYilP2ALoRXcYR4obqbYIuV3Bg+51GEDW+HF8n7NRA+iaA4qD0nD9lo9mew==",
"dev": true
},
"core-util-is": {
@@ -5824,9 +5824,9 @@
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
},
"fast-json-stringify": {
"version": "1.11.3",
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.11.3.tgz",
"integrity": "sha512-Nx9oURoGD4XYFueNkNzaameSQIcBw2HQrnsnJaRb4PFrlW3/88zusG65pzHA0P7+g5Hn7hyawG3/nCKs3NUAhQ==",
"version": "1.14.0",
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.14.0.tgz",
"integrity": "sha512-3VSblXsVxIE46E/YzRYHapyIeM3/igeA/kyzdL5xfAIYNnCLd8Oy+scrURnqZIRXMmtx0hfyp+okN5+r4W+GMQ==",
"requires": {
"ajv": "^6.8.1",
"deepmerge": "^3.0.0"
@@ -5839,9 +5839,9 @@
"dev": true
},
"fast-redact": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-1.4.4.tgz",
"integrity": "sha512-QOQZ8sDDQPZMJ6x6zlm6hLZ2cjPDqfN3R/AYnAbM+yy8VNPvOnVXdUF/E/xbMv7g44c1krhWuzgjH2u0V5Vhsg=="
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-1.5.0.tgz",
"integrity": "sha512-Afo61CgUjkzdvOKDHn08qnZ0kwck38AOGcMlvSGzvJbIab6soAP5rdoQayecGCDsD69AiF9vJBXyq31eoEO2tQ=="
},
"fast-safe-stringify": {
"version": "2.0.6",
@@ -5849,9 +5849,9 @@
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
},
"fastify": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.1.0.tgz",
"integrity": "sha512-rktprBPTTt1aAsaiMjkbKVzmy/fhX5SGj1DkJY6wddBOzxHAKaQ7F3ia3n8tVPHw07JzNlTmJKtG4zHhnXEdlA==",
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.2.0.tgz",
"integrity": "sha512-U6W101N+8Hyz2uiN3XqdSdTiaWYiJ0lCJmC3tO42PNttjCZQp8EPIhZ0QkVQWLrrP0ijjgomwaYrj9eMzqWyDw==",
"requires": {
"abstract-logging": "^1.0.0",
"ajv": "^6.9.2",
@@ -5870,9 +5870,9 @@
},
"dependencies": {
"readable-stream": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.2.0.tgz",
"integrity": "sha512-RV20kLjdmpZuTF1INEb9IA3L68Nmi+Ri7ppZqo78wj//Pn62fCoJyV9zalccNzDD/OuJpMG4f+pfMl8+L6QdGw==",
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
"integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
@@ -5908,9 +5908,9 @@
}
},
"fastify-multipart": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/fastify-multipart/-/fastify-multipart-0.7.0.tgz",
"integrity": "sha512-GTXVh/P6i8j88tCXN6GH6+lxVuMGbXYbz6aRmp1FlRdfn5yoaIdBrl7Se783EFg/xrmWlJa76uxOZ+icFsXIpg==",
"version": "0.8.0",
"resolved": "https://registry.npmjs.org/fastify-multipart/-/fastify-multipart-0.8.0.tgz",
"integrity": "sha512-JXgKD1fupPH/78TbzIzZaB6oQRZVtEaB30KXUOL5WN3bQz+Zx1hmiTJMomexUhxzgo++M56oyHU82lcykLRyzg==",
"requires": {
"busboy": "^0.3.0",
"deepmerge": "^3.0.0",
@@ -5945,9 +5945,9 @@
}
},
"fastify-static": {
"version": "2.3.4",
"resolved": "https://registry.npmjs.org/fastify-static/-/fastify-static-2.3.4.tgz",
"integrity": "sha512-lOdrX3j2FHGeeHrQ10xx3z1s3I7Aq0NS9dY1N9OBKIOX5O8bZd5QkBFEAXms4GhHxwcRIoOzV8fLcxuIdyzTdQ==",
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/fastify-static/-/fastify-static-2.4.0.tgz",
"integrity": "sha512-JgpxLsy6ask3UUXrHd76Vi0TvBZ6VtFgHaBIBV8hZ02Mn7YY5Vq0n2QOmcyJqSAF4RWc7UjubRE+wTSDXYUYQg==",
"dev": true,
"requires": {
"fastify-plugin": "^1.5.0",
@@ -7485,9 +7485,9 @@
"dev": true
},
"graphql": {
"version": "14.1.1",
"resolved": "https://registry.npmjs.org/graphql/-/graphql-14.1.1.tgz",
"integrity": "sha512-C5zDzLqvfPAgTtP8AUPIt9keDabrdRAqSWjj2OPRKrKxI9Fb65I36s1uCs1UUBFnSWTdO7hyHi7z1ZbwKMKF6Q==",
"version": "14.2.1",
"resolved": "https://registry.npmjs.org/graphql/-/graphql-14.2.1.tgz",
"integrity": "sha512-2PL1UbvKeSjy/lUeJqHk+eR9CvuErXoCNwJI4jm3oNFEeY+9ELqHNKO1ZuSxAkasPkpWbmT/iMRMFxd3cEL3tQ==",
"requires": {
"iterall": "^1.2.2"
}
@@ -10103,18 +10103,18 @@
}
},
"light-my-request": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-3.2.0.tgz",
"integrity": "sha512-XpNvOFfoQRLPNIFLB6YFjwQj61DyAAW+N08C3KXf+SwbJjZjrZk7gh8IYR8gML96QBM4NAT2Mwhi3tHvrKxnMw==",
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-3.3.0.tgz",
"integrity": "sha512-dLtwhjzbuHJ+KMMUBSlVid6Iqxx+KKvULWLnBD06WMgPHxiPkEh1cVyj+Xc8HGU64hULlSw/sZVCdFsvjNQeNA==",
"requires": {
"ajv": "^6.8.1",
"readable-stream": "^3.1.1"
},
"dependencies": {
"readable-stream": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.2.0.tgz",
"integrity": "sha512-RV20kLjdmpZuTF1INEb9IA3L68Nmi+Ri7ppZqo78wj//Pn62fCoJyV9zalccNzDD/OuJpMG4f+pfMl8+L6QdGw==",
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz",
"integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==",
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
@@ -11405,9 +11405,9 @@
"dev": true
},
"nats": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/nats/-/nats-1.2.2.tgz",
"integrity": "sha512-uGHVNvmXboHYYgxpF4ENLkjCgoUAIx33seYs3g+qiDQzxuM28qoi7xq5mnFwOYfYMNC7kGVGk9/WiXTItpOxPQ==",
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/nats/-/nats-1.2.6.tgz",
"integrity": "sha512-0HRboHf2imRMzqPzrJCkWMjC9tHPWeQzDxsKj06pdA9+eEjXJtxLt6rSngyQ+YWrb9562JX9U6RU3IRXs2MmzA==",
"requires": {
"nuid": "^1.0.0",
"ts-nkeys": "^1.0.8"
@@ -11765,9 +11765,9 @@
}
},
"nuid": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/nuid/-/nuid-1.0.0.tgz",
"integrity": "sha512-046ukkoG8NXjiJMpQYLpGhYJIXJlClt2rDlnubCXN1/pztO/YTD2WkhyBZsEADsUwVtVMv5UmC0B2QrT5sZiDQ=="
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/nuid/-/nuid-1.1.0.tgz",
"integrity": "sha512-C/JdZ6PtCqKsCEs4ni76nhBsdmuQgLAT/CTLNprkcLViDAnkk7qx5sSA8PVC2vmSsdBlSsFuGb52v6pwn1oaeg=="
},
"number-is-nan": {
"version": "1.0.1",
@@ -13695,16 +13695,16 @@
}
},
"pino": {
"version": "5.11.1",
"resolved": "https://registry.npmjs.org/pino/-/pino-5.11.1.tgz",
"integrity": "sha512-NIua0mGb9Adknq35ONvQmvh93LCUVUjp2+1q1EcvIkJmpJnSd3E5rHVKlKNjzMXFl/z3fI+QA0xXCjPEKNiLvQ==",
"version": "5.12.2",
"resolved": "https://registry.npmjs.org/pino/-/pino-5.12.2.tgz",
"integrity": "sha512-EunVRDkw/eQzgAudJiZuqzEQ20hDezixLRLrdxUMBzavvt5ot3vep7K8swRvXSgj2bKtbOmoHnrRMtYzRjfITQ==",
"requires": {
"fast-redact": "^1.4.2",
"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.0",
"sonic-boom": "^0.7.1"
"quick-format-unescaped": "^3.0.2",
"sonic-boom": "^0.7.3"
}
},
"pino-std-serializers": {
@@ -14846,14 +14846,14 @@
}
},
"sinon": {
"version": "7.2.7",
"resolved": "https://registry.npmjs.org/sinon/-/sinon-7.2.7.tgz",
"integrity": "sha512-rlrre9F80pIQr3M36gOdoCEWzFAMDgHYD8+tocqOw+Zw9OZ8F84a80Ds69eZfcjnzDqqG88ulFld0oin/6rG/g==",
"version": "7.3.1",
"resolved": "https://registry.npmjs.org/sinon/-/sinon-7.3.1.tgz",
"integrity": "sha512-eQKMaeWovtOtYe2xThEvaHmmxf870Di+bim10c3ZPrL5bZhLGtu8cz+rOBTFz0CwBV4Q/7dYwZiqZbGVLZ+vjQ==",
"dev": true,
"requires": {
"@sinonjs/commons": "^1.3.1",
"@sinonjs/commons": "^1.4.0",
"@sinonjs/formatio": "^3.2.1",
"@sinonjs/samsam": "^3.2.0",
"@sinonjs/samsam": "^3.3.1",
"diff": "^3.5.0",
"lolex": "^3.1.0",
"nise": "^1.4.10",
@@ -15980,9 +15980,9 @@
}
},
"ts-morph": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-1.3.1.tgz",
"integrity": "sha512-zWjy62PNOeX7LP6Q1h5UM7uBetEHKu9P2EoRQn0CZwqANxU/ZXvEiOtKeQJwKihRfslES+pLNCfIG7R0WS4ZbQ==",
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-1.3.3.tgz",
"integrity": "sha512-TO4xmC4yKSoOSjuIGBlYOkPSQhY4dC6/8ksEH+1jlt7XUk6fmLshn97wwchMQxz1ejSd2DSxEk+pC5cqDYlUzg==",
"requires": {
"@dsherret/to-absolute-glob": "^2.0.2",
"code-block-writer": "7.2.2",
@@ -15992,15 +15992,15 @@
"is-negated-glob": "^1.0.0",
"multimatch": "^2.1.0",
"tslib": "^1.9.0",
"typescript": "^3.0.1"
"typescript": ">=3.0.1 <3.5.0"
}
},
"ts-nkeys": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/ts-nkeys/-/ts-nkeys-1.0.10.tgz",
"integrity": "sha512-T5TPWXl8EzCIqnuauGluNNUZPZM1rfRL6oE97xFHPH44TSFDNMHPkaN4/c95MuiV+JeYyrC+edLzpHr+Gc+YEw==",
"version": "1.0.12",
"resolved": "https://registry.npmjs.org/ts-nkeys/-/ts-nkeys-1.0.12.tgz",
"integrity": "sha512-5TgA+wbfxTy/9pdSuAhvneuL65KKoI7phonzNQH2UhnorAQAWehUwHNLEuli596wu/Fxh0SAhMeKZVLNx4s7Ow==",
"requires": {
"tweetnacl": "^1.0.0"
"tweetnacl": "^1.0.1"
},
"dependencies": {
"tweetnacl": {
@@ -16037,9 +16037,9 @@
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
},
"tslint": {
"version": "5.14.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.14.0.tgz",
"integrity": "sha512-IUla/ieHVnB8Le7LdQFRGlVJid2T/gaJe5VkjzRVSRR6pA2ODYrnfR1hmxi+5+au9l50jBwpbBL34txgv4NnTQ==",
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.15.0.tgz",
"integrity": "sha512-6bIEujKR21/3nyeoX2uBnE8s+tMXCQXhqMmaIPJpHmXJoBJPTLcI7/VHRtUwMhnLVdwLqqY3zmd8Dxqa5CVdJA==",
"dev": true,
"requires": {
"babel-code-frame": "^6.22.0",
@@ -16048,7 +16048,7 @@
"commander": "^2.12.1",
"diff": "^3.2.0",
"glob": "^7.1.1",
"js-yaml": "^3.7.0",
"js-yaml": "^3.13.0",
"minimatch": "^3.0.4",
"mkdirp": "^0.5.1",
"resolve": "^1.3.2",
@@ -16068,6 +16068,16 @@
"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
"dev": true
},
"js-yaml": {
"version": "3.13.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz",
"integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==",
"dev": true,
"requires": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"
}
}
}
},
@@ -16125,9 +16135,9 @@
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
},
"typescript": {
"version": "3.3.4000",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.4000.tgz",
"integrity": "sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA=="
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.2.tgz",
"integrity": "sha512-Og2Vn6Mk7JAuWA1hQdDQN/Ekm/SchX80VzLhjKN9ETYrIepBFAd8PkOdOTK2nKt0FCkmMZKBJvQ1dV1gIxPu/A=="
},
"uglify-js": {
"version": "3.4.10",

View File

@@ -1,10 +1,10 @@
{
"name": "nestjs",
"version": "6.0.0",
"version": "6.0.5",
"description": "Modern, fast, powerful node.js web framework",
"scripts": {
"coverage": "nyc report --reporter=text-lcov | coveralls",
"test": "nyc --require ts-node/register mocha packages/**/*.spec.ts --reporter spec --require 'node_modules/reflect-metadata/Reflect.js'",
"test": "nyc --require ts-node/register mocha packages/**/*.spec.ts --reporter spec --retries 3 --require 'node_modules/reflect-metadata/Reflect.js'",
"integration-test": "mocha integration/**/*.spec.ts --reporter spec --require ts-node/register --require 'node_modules/reflect-metadata/Reflect.js'",
"lint": "tslint -p tsconfig.json -c tslint.json \"packages/**/*.ts\" -e \"*.spec.ts\"",
"format": "prettier **/**/*.ts --ignore-path ./.prettierignore --write && git status",
@@ -31,13 +31,13 @@
"license": "MIT",
"dependencies": {
"@grpc/proto-loader": "0.3.0",
"@nestjs/common": "6.0.1",
"@nestjs/core": "6.0.1",
"@nestjs/microservices": "6.0.1",
"@nestjs/testing": "6.0.1",
"@nestjs/websockets": "6.0.1",
"@nestjs/common": "6.0.5",
"@nestjs/core": "6.0.5",
"@nestjs/microservices": "6.0.5",
"@nestjs/testing": "6.0.5",
"@nestjs/websockets": "6.0.5",
"@nuxtjs/opencollective": "0.2.1",
"amqp-connection-manager": "2.3.0",
"amqp-connection-manager": "2.3.1",
"amqplib": "0.5.3",
"apollo-server-express": "2.4.8",
"axios": "0.18.0",
@@ -49,21 +49,20 @@
"cors": "2.8.5",
"engine.io-client": "3.3.2",
"express": "4.16.4",
"fast-json-stringify": "1.11.3",
"fast-json-stringify": "1.14.0",
"fast-safe-stringify": "2.0.6",
"fastify": "2.1.0",
"fastify": "2.2.0",
"fastify-cors": "2.1.2",
"fastify-formbody": "3.1.0",
"fastify-multipart": "0.7.0",
"graphql": "14.1.1",
"fastify-multipart": "0.8.0",
"graphql": "14.2.1",
"grpc": "1.19.0",
"http2": "3.3.7",
"iterare": "1.1.2",
"json-socket": "0.3.0",
"merge-graphql-schemas": "1.5.8",
"mqtt": "2.18.8",
"multer": "1.4.1",
"nats": "1.2.2",
"nats": "1.2.6",
"object-hash": "1.3.1",
"optional": "0.1.4",
"path-to-regexp": "3.0.0",
@@ -73,7 +72,7 @@
"rxjs": "6.4.0",
"rxjs-compat": "6.4.0",
"socket.io": "2.2.0",
"ts-morph": "1.3.1",
"ts-morph": "1.3.3",
"uuid": "3.3.2"
},
"devDependencies": {
@@ -86,10 +85,10 @@
"@types/fastify-cors": "2.1.0",
"@types/kafka-node": "2.0.8",
"@types/mocha": "5.2.6",
"@types/node": "10.14.1",
"@types/redis": "2.8.11",
"@types/node": "10.14.4",
"@types/redis": "2.8.12",
"@types/reflect-metadata": "0.0.5",
"@types/sinon": "7.0.10",
"@types/sinon": "7.0.11",
"@types/socket.io": "2.1.2",
"@types/ws": "6.0.1",
"artillery": "1.6.0-27",
@@ -100,11 +99,11 @@
"clang-format": "1.2.4",
"concurrently": "4.1.0",
"conventional-changelog": "3.0.6",
"core-js": "3.0.0",
"core-js": "3.0.1",
"coveralls": "3.0.3",
"csv-write-stream": "2.0.0",
"delete-empty": "2.0.0",
"fastify-static": "2.3.4",
"fastify-static": "2.4.0",
"gulp": "4.0.0",
"gulp-clang-format": "1.0.27",
"gulp-clean": "0.4.0",
@@ -121,13 +120,13 @@
"nodemon": "1.18.10",
"nyc": "13.3.0",
"prettier": "1.16.4",
"sinon": "7.2.7",
"sinon": "7.3.1",
"sinon-chai": "3.3.0",
"socket.io-client": "2.2.0",
"supertest": "4.0.2",
"ts-node": "8.0.3",
"tslint": "5.14.0",
"typescript": "3.3.4000"
"tslint": "5.15.0",
"typescript": "3.4.2"
},
"collective": {
"type": "opencollective",

View File

@@ -1,6 +1,6 @@
(The MIT License)
Copyright (c) 2017 Kamil Myśliwiec <http://kamilmysliwiec.com>
Copyright (c) 2017-2019 Kamil Myśliwiec <http://kamilmysliwiec.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

View File

@@ -7,29 +7,29 @@
[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, heavily inspired by <a href="https://angular.io" target="blank">Angular</a>.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
<a href="https://travis-ci.org/nestjs/nest"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
<a href="https://travis-ci.org/nestjs/nest"><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"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#8" alt="Coverage" /></a>
<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a>
<a href="https://discord.gg/G7Qnnhy"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
<a href="https://paypal.me/kamilmysliwiec"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://twitter.com/nestframework"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
<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>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
<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#8" 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>
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
</p>
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
## Description
<p>Nest is a framework for building efficient, scalable <a href="http://nodejs.org" target="_blank">Node.js</a> server-side applications. It uses modern JavaScript, is built with <a href="http://www.typescriptlang.org" target="_blank">TypeScript</a> (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).</p>
Nest is a framework for building efficient, scalable <a href="http://nodejs.org" target="_blank">Node.js</a> server-side applications. It uses modern JavaScript, is built with <a href="http://www.typescriptlang.org" target="_blank">TypeScript</a> (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).
<p>Under the hood, Nest makes use of <a href="https://expressjs.com/" target="_blank">Express</a>, but also, provides compatibility with a wide range of other libraries, like e.g. <a href="https://github.com/fastify/fastify" target="blank">Fastify</a>, allowing for easy use of the myriad third-party plugins which are available.</p>
<p>Under the hood, Nest makes use of <a href="https://expressjs.com/" target="_blank">Express</a>, but also, provides compatibility with a wide range of other libraries, like e.g. <a href="https://github.com/fastify/fastify" target="_blank">Fastify</a>, allowing for easy use of the myriad third-party plugins which are available.</p>
## Philosophy
@@ -41,35 +41,42 @@
* To check out the [guide](https://docs.nestjs.com), visit [docs.nestjs.com](https://docs.nestjs.com). :books:
* 要查看中文 [指南](readme_zh.md), 请访问 [docs.nestjs.cn](https://docs.nestjs.cn). :books:
## Consulting
With official support, you can get expert help straight from Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://docs.nestjs.com/enterprise).
## Support
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
#### Principal Sponsor
<a href="https://valor-software.com/"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="320" /></a>
<a href="https://valor-software.com/" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="320" /></a>
#### Base Sponsor
<a href="https://blueanchor.io/"><img src="https://nestjs.com/img/blueanchor.png" width="300" /></a> &nbsp;
<a href="https://www.novologic.com/"><img src="https://nestjs.com/img/novologic.png" width="200" /></a>
<a href="https://blueanchor.io/" target="_blank"><img src="https://nestjs.com/img/blueanchor.png" width="300" /></a> &nbsp;
<a href="https://www.novologic.com/" target="_blank"><img src="https://nestjs.com/img/novologic.png" width="200" /></a>
#### Silver Sponsors
<a href="https://neoteric.eu/"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> &nbsp;
<a href="http://gojob.com"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" height="95" /></a> &nbsp; <a href="https://www.swingdev.io"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="150" valign="middle" /> </a> &nbsp; &nbsp;
<a href="https://yakaz.com/"><img src="https://nestjs.com/img/yakaz.png" width="100" valign="middle" /></a>
<a href="http://xtremis.com/"><img src="https://nestjs.com/img/logo-xtremis.svg" width="150" valign="middle" /></a>
<a href="https://neoteric.eu/" target="_blank"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> &nbsp;
<a href="http://gojob.com" target="_blank"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" height="95" /></a> &nbsp; <a href="https://www.swingdev.io" target="_blank"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="150" valign="middle" /> </a> &nbsp; &nbsp;
<a href="https://yakaz.com/" target="_blank"><img src="https://nestjs.com/img/yakaz.png" width="100" valign="middle" /></a> &nbsp;
<a href="https://trilon.io" target="_blank"><img src="https://nestjs.com/img/trilon.svg" width="150" valign="middle" /></a>
<a href="http://xtremis.com/" target="_blank"><img src="https://nestjs.com/img/logo-xtremis.svg" width="150" valign="middle" /></a>
#### Sponsors
<a href="https://scal.io"><img src="https://nestjs.com/img/scalio-logo.svg" width="110" valign="middle" /></a> &nbsp; <a href="http://angularity.io"><img src="http://angularity.io/media/logo.svg" height="30" 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"><img src="https://nestjs.com/img/hostpresto.png" height="30" valign="middle" /></a> &nbsp; <a href="https://genuinebee.com/"><img src="https://nestjs.com/img/genuinebee.svg" height="38" valign="middle" /></a> &nbsp; <a href="http://architectnow.net/"><img src="https://nestjs.com/img/architectnow.png" height="24" valign="middle" /></a> &nbsp; <a href="https://quander.io/"><img src="https://nestjs.com/img/quander.png" height="28" valign="middle" /></a> &nbsp; <a href="https://mantro.net/"><img src="https://nestjs.com/img/mantro-logo.svg" height="20" valign="middle" /></a> &nbsp;
<a href="https://scal.io" target="_blank"><img src="https://nestjs.com/img/scalio-logo.svg" width="110" 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/"><img src="https://nestjs.com/img/triplebyte.png" height="30" valign="middle" /></a>
<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>
## Backers
<a href="https://opencollective.com/nest"><img src="https://opencollective.com/nest/backers.svg?width=890"></a>
<a href="https://opencollective.com/nest" target="_blank"><img src="https://opencollective.com/nest/backers.svg?width=890"></a>
## Stay in touch

View File

@@ -1,8 +1,10 @@
import { isObject } from '../utils/shared.utils';
export class HttpException extends Error {
public readonly message: any;
/**
* The base Nest Application exception, which is handled by the default Exceptions Handler.
* Base Nest application exception, which is handled by the default Exceptions Handler.
* If you throw an exception from your HTTP route handlers, Nest will map them to the appropriate HTTP response and send to the client.
*
* When `response` is an object:
@@ -20,7 +22,9 @@ export class HttpException extends Error {
private readonly status: number,
) {
super();
this.message = response;
this.message =
(isObject(response) && (response as { message?: string }).message) ||
response;
}
public getResponse(): string | object {

View File

@@ -56,11 +56,6 @@ export class HttpModule {
provide: HTTP_MODULE_ID,
useValue: randomStringGenerator(),
},
{
provide: AXIOS_INSTANCE_TOKEN,
useValue: (config: HttpModuleOptions) => Axios.create(config),
inject: [HTTP_MODULE_OPTIONS],
},
...(options.extraProviders || []),
],
};

View File

@@ -42,7 +42,8 @@ export interface HttpServer<TRequest = any, TResponse = any> {
options(path: string, handler: RequestHandler<TRequest, TResponse>): any;
listen(port: number | string, callback?: () => void): any;
listen(port: number | string, hostname: string, callback?: () => void): any;
reply(response: any, body: any, statusCode: number): any;
reply(response: any, body: any, statusCode?: number): any;
status(response: any, statusCode: number): any;
render(response: any, view: string, options: any): any;
setHeader(response: any, name: string, value: string): any;
setErrorHandler?(handler: Function): any;

View File

@@ -4,6 +4,7 @@ export interface WsMessageHandler<T = string> {
message: T;
callback: (...args: any[]) => Observable<any> | Promise<any>;
}
export interface WebSocketAdapter<
TServer = any,
TClient = any,

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/common",
"version": "6.0.2",
"version": "6.0.5",
"description": "Nest - modern, fast, powerful node.js web framework (@common)",
"author": "Kamil Mysliwiec",
"repository": {

View File

@@ -1,6 +1,6 @@
(The MIT License)
Copyright (c) 2017 Kamil Myśliwiec <http://kamilmysliwiec.com>
Copyright (c) 2017-2019 Kamil Myśliwiec <http://kamilmysliwiec.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

View File

@@ -7,29 +7,29 @@
[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, heavily inspired by <a href="https://angular.io" target="blank">Angular</a>.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
<a href="https://travis-ci.org/nestjs/nest"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
<a href="https://travis-ci.org/nestjs/nest"><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"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#8" alt="Coverage" /></a>
<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a>
<a href="https://discord.gg/G7Qnnhy"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
<a href="https://paypal.me/kamilmysliwiec"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://twitter.com/nestframework"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
<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>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
<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#8" 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>
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
</p>
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
## Description
<p>Nest is a framework for building efficient, scalable <a href="http://nodejs.org" target="_blank">Node.js</a> server-side applications. It uses modern JavaScript, is built with <a href="http://www.typescriptlang.org" target="_blank">TypeScript</a> (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).</p>
Nest is a framework for building efficient, scalable <a href="http://nodejs.org" target="_blank">Node.js</a> server-side applications. It uses modern JavaScript, is built with <a href="http://www.typescriptlang.org" target="_blank">TypeScript</a> (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).
<p>Under the hood, Nest makes use of <a href="https://expressjs.com/" target="_blank">Express</a>, but also, provides compatibility with a wide range of other libraries, like e.g. <a href="https://github.com/fastify/fastify" target="blank">Fastify</a>, allowing for easy use of the myriad third-party plugins which are available.</p>
<p>Under the hood, Nest makes use of <a href="https://expressjs.com/" target="_blank">Express</a>, but also, provides compatibility with a wide range of other libraries, like e.g. <a href="https://github.com/fastify/fastify" target="_blank">Fastify</a>, allowing for easy use of the myriad third-party plugins which are available.</p>
## Philosophy
@@ -41,35 +41,42 @@
* To check out the [guide](https://docs.nestjs.com), visit [docs.nestjs.com](https://docs.nestjs.com). :books:
* 要查看中文 [指南](readme_zh.md), 请访问 [docs.nestjs.cn](https://docs.nestjs.cn). :books:
## Consulting
With official support, you can get expert help straight from Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://docs.nestjs.com/enterprise).
## Support
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
#### Principal Sponsor
<a href="https://valor-software.com/"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="320" /></a>
<a href="https://valor-software.com/" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="320" /></a>
#### Base Sponsor
<a href="https://blueanchor.io/"><img src="https://nestjs.com/img/blueanchor.png" width="300" /></a> &nbsp;
<a href="https://www.novologic.com/"><img src="https://nestjs.com/img/novologic.png" width="200" /></a>
<a href="https://blueanchor.io/" target="_blank"><img src="https://nestjs.com/img/blueanchor.png" width="300" /></a> &nbsp;
<a href="https://www.novologic.com/" target="_blank"><img src="https://nestjs.com/img/novologic.png" width="200" /></a>
#### Silver Sponsors
<a href="https://neoteric.eu/"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> &nbsp;
<a href="http://gojob.com"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" height="95" /></a> &nbsp; <a href="https://www.swingdev.io"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="150" valign="middle" /> </a> &nbsp; &nbsp;
<a href="https://yakaz.com/"><img src="https://nestjs.com/img/yakaz.png" width="100" valign="middle" /></a>
<a href="http://xtremis.com/"><img src="https://nestjs.com/img/logo-xtremis.svg" width="150" valign="middle" /></a>
<a href="https://neoteric.eu/" target="_blank"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> &nbsp;
<a href="http://gojob.com" target="_blank"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" height="95" /></a> &nbsp; <a href="https://www.swingdev.io" target="_blank"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="150" valign="middle" /> </a> &nbsp; &nbsp;
<a href="https://yakaz.com/" target="_blank"><img src="https://nestjs.com/img/yakaz.png" width="100" valign="middle" /></a> &nbsp;
<a href="https://trilon.io" target="_blank"><img src="https://nestjs.com/img/trilon.svg" width="150" valign="middle" /></a>
<a href="http://xtremis.com/" target="_blank"><img src="https://nestjs.com/img/logo-xtremis.svg" width="150" valign="middle" /></a>
#### Sponsors
<a href="https://scal.io"><img src="https://nestjs.com/img/scalio-logo.svg" width="110" valign="middle" /></a> &nbsp; <a href="http://angularity.io"><img src="http://angularity.io/media/logo.svg" height="30" 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"><img src="https://nestjs.com/img/hostpresto.png" height="30" valign="middle" /></a> &nbsp; <a href="https://genuinebee.com/"><img src="https://nestjs.com/img/genuinebee.svg" height="38" valign="middle" /></a> &nbsp; <a href="http://architectnow.net/"><img src="https://nestjs.com/img/architectnow.png" height="24" valign="middle" /></a> &nbsp; <a href="https://quander.io/"><img src="https://nestjs.com/img/quander.png" height="28" valign="middle" /></a> &nbsp; <a href="https://mantro.net/"><img src="https://nestjs.com/img/mantro-logo.svg" height="20" valign="middle" /></a> &nbsp;
<a href="https://scal.io" target="_blank"><img src="https://nestjs.com/img/scalio-logo.svg" width="110" 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/"><img src="https://nestjs.com/img/triplebyte.png" height="30" valign="middle" /></a>
<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>
## Backers
<a href="https://opencollective.com/nest"><img src="https://opencollective.com/nest/backers.svg?width=890"></a>
<a href="https://opencollective.com/nest" target="_blank"><img src="https://opencollective.com/nest/backers.svg?width=890"></a>
## Stay in touch

View File

@@ -82,7 +82,8 @@ export abstract class AbstractHttpAdapter<
abstract setViewEngine(engine: string);
abstract getRequestMethod(request);
abstract getRequestUrl(request);
abstract reply(response, body: any, statusCode: number);
abstract status(response, statusCode: number);
abstract reply(response, body: any, statusCode?: number);
abstract render(response, view: string, options: any);
abstract setErrorHandler(handler: Function);
abstract setNotFoundHandler(handler: Function);

View File

@@ -64,7 +64,7 @@ export const UNKNOWN_DEPENDENCIES_MESSAGE = (
export const INVALID_MIDDLEWARE_MESSAGE = (
text: TemplateStringsArray,
name: string,
) => `The middleware doesn't provide the 'resolve' method (${name})`;
) => `The middleware doesn't provide the 'use' method (${name})`;
export const INVALID_MODULE_MESSAGE = (
text: TemplateStringsArray,

View File

@@ -11,7 +11,7 @@ import { ExternalExceptionsHandler } from './external-exceptions-handler';
export class ExternalExceptionFilterContext extends BaseExceptionFilterContext {
constructor(
container: NestContainer,
private readonly config: ApplicationConfig,
private readonly config?: ApplicationConfig,
) {
super(container);
}
@@ -41,6 +41,9 @@ export class ExternalExceptionFilterContext extends BaseExceptionFilterContext {
}
public getGlobalMetadata<T extends any[]>(): T {
if (!this.config) {
return [] as T;
}
return this.config.getGlobalFilters() as T;
}
}

View File

@@ -7,6 +7,9 @@ export const HANDLER_METADATA_SYMBOL = Symbol.for('handler_metadata:cache');
export interface HandlerMetadata {
argsLength: number;
paramtypes: any[];
httpStatusCode: number;
responseHeaders: any[];
hasCustomHeaders: boolean;
getParamsMetadata: (
moduleKey: string,
contextId?: ContextId,

View File

@@ -81,7 +81,7 @@ export class Injector {
const loadInstance = (instances: any[]) => {
targetWrapper.instance = targetWrapper.isDependencyTreeStatic()
? new metatype(...instances)
: Object.create(metatype);
: Object.create(metatype.prototype);
};
await this.resolveConstructorParams(
wrapper,

View File

@@ -30,6 +30,7 @@ export class MiddlewareContainer {
new InstanceWrapper({
scope: this.getClassScope(metatype),
metatype,
name: token,
}),
);
};

View File

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

View File

@@ -83,7 +83,11 @@ export class RouterExecutionContext {
fnHandleResponse,
paramtypes,
getParamsMetadata,
httpStatusCode,
responseHeaders,
hasCustomHeaders,
} = this.getMetadata(instance, callback, methodName, module, requestMethod);
const paramsOptions = this.contextUtils.mergeParamsMetatypes(
getParamsMetadata(module, contextId, inquirerId),
paramtypes,
@@ -131,6 +135,10 @@ export class RouterExecutionContext {
const args = this.contextUtils.createNullArray(argsLength);
fnCanActivate && (await fnCanActivate([req, res]));
this.responseController.setStatus(res, httpStatusCode);
hasCustomHeaders &&
this.responseController.setHeaders(res, responseHeaders);
const result = await this.interceptorsConsumer.intercept(
interceptors,
[req, res],
@@ -165,7 +173,6 @@ export class RouterExecutionContext {
instance,
methodName,
);
const httpCode = this.reflectHttpStatusCode(callback);
const getParamsMetadata = (
moduleKey: string,
contextId = STATIC_CONTEXT,
@@ -184,20 +191,28 @@ export class RouterExecutionContext {
({ type }) =>
type === RouteParamtypes.RESPONSE || type === RouteParamtypes.NEXT,
);
const httpStatusCode = httpCode
? httpCode
: this.responseController.getStatusByMethod(requestMethod);
const fnHandleResponse = this.createHandleResponseFn(
callback,
isResponseHandled,
httpStatusCode,
);
const httpCode = this.reflectHttpStatusCode(callback);
const httpStatusCode = httpCode
? httpCode
: this.responseController.getStatusByMethod(requestMethod);
const responseHeaders = this.reflectResponseHeaders(callback);
const hasCustomHeaders = !isEmpty(responseHeaders);
const handlerMetadata: HandlerMetadata = {
argsLength,
fnHandleResponse,
paramtypes,
getParamsMetadata,
httpStatusCode,
hasCustomHeaders,
responseHeaders,
};
this.handlerMetadataStorage.set(instance, methodName, handlerMetadata);
return handlerMetadata;
@@ -342,23 +357,16 @@ export class RouterExecutionContext {
public createHandleResponseFn(
callback: (...args: any[]) => any,
isResponseHandled: boolean,
httpStatusCode: number,
httpStatusCode?: number,
) {
const renderTemplate = this.reflectRenderTemplate(callback);
const responseHeaders = this.reflectResponseHeaders(callback);
const hasCustomHeaders = !isEmpty(responseHeaders);
if (renderTemplate) {
return async <TResult, TResponse>(result: TResult, res: TResponse) => {
hasCustomHeaders &&
this.responseController.setHeaders(res, responseHeaders);
await this.responseController.render(result, res, renderTemplate);
};
}
return async <TResult, TResponse>(result: TResult, res: TResponse) => {
hasCustomHeaders &&
this.responseController.setHeaders(res, responseHeaders);
result = await this.responseController.transformToResult(result);
!isResponseHandled &&
(await this.responseController.apply(result, res, httpStatusCode));

View File

@@ -12,7 +12,7 @@ export class RouterResponseController {
public async apply<TInput = any, TResponse = any>(
result: TInput,
response: TResponse,
httpStatusCode: number,
httpStatusCode?: number,
) {
return this.applicationRef.reply(response, result, httpStatusCode);
}
@@ -50,4 +50,8 @@ export class RouterResponseController {
this.applicationRef.setHeader(response, name, value),
);
}
public setStatus<TResponse = any>(response: TResponse, statusCode: number) {
this.applicationRef.status(response, statusCode);
}
}

View File

@@ -33,12 +33,14 @@ describe('ExceptionsHandler', () => {
beforeEach(() => {
sinon
.stub(adapter, 'reply')
.callsFake((responseRef: any, body: any, statusCode: number) => {
const res = responseRef.status(statusCode);
if (isNil(body)) {
return res.send();
.callsFake((responseRef: any, body: any, statusCode?: number) => {
if (statusCode) {
responseRef.status(statusCode);
}
return isObject(body) ? res.json(body) : res.send(String(body));
if (isNil(body)) {
return responseRef.send();
}
return isObject(body) ? responseRef.json(body) : responseRef.send(String(body));
});
});
it('should method send expected response status code and message when exception is unknown', () => {

View File

@@ -43,8 +43,7 @@ describe('ExternalContextCreator', () => {
new PipesContextCreator(new NestContainer()),
consumer,
new ExternalExceptionFilterContext(
new NestContainer(),
new ApplicationConfig(),
new NestContainer()
),
);
});

View File

@@ -281,7 +281,7 @@ describe('RouterExecutionContext', () => {
sinon.stub(contextCreator, 'reflectResponseHeaders').returns([]);
sinon.stub(contextCreator, 'reflectRenderTemplate').returns(template);
const handler = contextCreator.createHandleResponseFn(null, true, 100);
const handler = contextCreator.createHandleResponseFn(null, true, 200);
await handler(value, response);
expect(response.render.calledWith(template, value)).to.be.true;
@@ -295,7 +295,7 @@ describe('RouterExecutionContext', () => {
sinon.stub(contextCreator, 'reflectResponseHeaders').returns([]);
sinon.stub(contextCreator, 'reflectRenderTemplate').returns(undefined);
const handler = contextCreator.createHandleResponseFn(null, true, 100);
const handler = contextCreator.createHandleResponseFn(null, true, 200);
handler(result, response);
expect(response.render.called).to.be.false;

View File

@@ -22,19 +22,22 @@ describe('RouterResponseController', () => {
json: sinon.SinonSpy;
};
beforeEach(() => {
response = { send: sinon.spy(), json: sinon.spy() };
response.status = sinon.stub().returns(response);
response = { send: sinon.spy(), json: sinon.spy(), status: sinon.spy() };
});
describe('when result is', () => {
beforeEach(() => {
sinon
.stub(adapter, 'reply')
.callsFake((responseRef: any, body: any, statusCode: number) => {
const res = responseRef.status(statusCode);
if (isNil(body)) {
return res.send();
.callsFake((responseRef: any, body: any, statusCode?: number) => {
if (statusCode) {
responseRef.status(statusCode);
}
return isObject(body) ? res.json(body) : res.send(String(body));
if (isNil(body)) {
return responseRef.send();
}
return isObject(body)
? responseRef.json(body)
: responseRef.send(String(body));
});
});
describe('nil', () => {
@@ -149,4 +152,20 @@ describe('RouterResponseController', () => {
).to.be.true;
});
});
describe('status', () => {
let statusStub: sinon.SinonStub;
beforeEach(() => {
statusStub = sinon.stub(adapter, 'status').callsFake(() => ({}));
});
it('should set status', () => {
const response = {};
const statusCode = 400;
routerResponseController.setStatus(response, statusCode);
expect(statusStub.calledWith(response, statusCode)).to.be.true;
});
});
});

View File

@@ -11,7 +11,8 @@ export class NoopHttpAdapter extends AbstractHttpAdapter {
setViewEngine(engine: string): any {}
getRequestMethod(request: any): any {}
getRequestUrl(request: any): any {}
reply(response: any, body: any, statusCode: number): any {}
reply(response: any, body: any): any {}
status(response: any, statusCode: number): any {}
render(response: any, view: string, options: any): any {}
setErrorHandler(handler: Function): any {}
setNotFoundHandler(handler: Function): any {}

View File

@@ -1,6 +1,6 @@
(The MIT License)
Copyright (c) 2017 Kamil Myśliwiec <http://kamilmysliwiec.com>
Copyright (c) 2017-2019 Kamil Myśliwiec <http://kamilmysliwiec.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

View File

@@ -7,29 +7,29 @@
[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, heavily inspired by <a href="https://angular.io" target="blank">Angular</a>.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
<a href="https://travis-ci.org/nestjs/nest"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
<a href="https://travis-ci.org/nestjs/nest"><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"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#8" alt="Coverage" /></a>
<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a>
<a href="https://discord.gg/G7Qnnhy"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
<a href="https://paypal.me/kamilmysliwiec"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://twitter.com/nestframework"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
<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>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
<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#8" 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>
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
</p>
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
## Description
<p>Nest is a framework for building efficient, scalable <a href="http://nodejs.org" target="_blank">Node.js</a> server-side applications. It uses modern JavaScript, is built with <a href="http://www.typescriptlang.org" target="_blank">TypeScript</a> (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).</p>
Nest is a framework for building efficient, scalable <a href="http://nodejs.org" target="_blank">Node.js</a> server-side applications. It uses modern JavaScript, is built with <a href="http://www.typescriptlang.org" target="_blank">TypeScript</a> (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).
<p>Under the hood, Nest makes use of <a href="https://expressjs.com/" target="_blank">Express</a>, but also, provides compatibility with a wide range of other libraries, like e.g. <a href="https://github.com/fastify/fastify" target="blank">Fastify</a>, allowing for easy use of the myriad third-party plugins which are available.</p>
<p>Under the hood, Nest makes use of <a href="https://expressjs.com/" target="_blank">Express</a>, but also, provides compatibility with a wide range of other libraries, like e.g. <a href="https://github.com/fastify/fastify" target="_blank">Fastify</a>, allowing for easy use of the myriad third-party plugins which are available.</p>
## Philosophy
@@ -41,35 +41,42 @@
* To check out the [guide](https://docs.nestjs.com), visit [docs.nestjs.com](https://docs.nestjs.com). :books:
* 要查看中文 [指南](readme_zh.md), 请访问 [docs.nestjs.cn](https://docs.nestjs.cn). :books:
## Consulting
With official support, you can get expert help straight from Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://docs.nestjs.com/enterprise).
## Support
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
#### Principal Sponsor
<a href="https://valor-software.com/"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="320" /></a>
<a href="https://valor-software.com/" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="320" /></a>
#### Base Sponsor
<a href="https://blueanchor.io/"><img src="https://nestjs.com/img/blueanchor.png" width="300" /></a> &nbsp;
<a href="https://www.novologic.com/"><img src="https://nestjs.com/img/novologic.png" width="200" /></a>
<a href="https://blueanchor.io/" target="_blank"><img src="https://nestjs.com/img/blueanchor.png" width="300" /></a> &nbsp;
<a href="https://www.novologic.com/" target="_blank"><img src="https://nestjs.com/img/novologic.png" width="200" /></a>
#### Silver Sponsors
<a href="https://neoteric.eu/"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> &nbsp;
<a href="http://gojob.com"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" height="95" /></a> &nbsp; <a href="https://www.swingdev.io"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="150" valign="middle" /> </a> &nbsp; &nbsp;
<a href="https://yakaz.com/"><img src="https://nestjs.com/img/yakaz.png" width="100" valign="middle" /></a>
<a href="http://xtremis.com/"><img src="https://nestjs.com/img/logo-xtremis.svg" width="150" valign="middle" /></a>
<a href="https://neoteric.eu/" target="_blank"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> &nbsp;
<a href="http://gojob.com" target="_blank"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" height="95" /></a> &nbsp; <a href="https://www.swingdev.io" target="_blank"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="150" valign="middle" /> </a> &nbsp; &nbsp;
<a href="https://yakaz.com/" target="_blank"><img src="https://nestjs.com/img/yakaz.png" width="100" valign="middle" /></a> &nbsp;
<a href="https://trilon.io" target="_blank"><img src="https://nestjs.com/img/trilon.svg" width="150" valign="middle" /></a>
<a href="http://xtremis.com/" target="_blank"><img src="https://nestjs.com/img/logo-xtremis.svg" width="150" valign="middle" /></a>
#### Sponsors
<a href="https://scal.io"><img src="https://nestjs.com/img/scalio-logo.svg" width="110" valign="middle" /></a> &nbsp; <a href="http://angularity.io"><img src="http://angularity.io/media/logo.svg" height="30" 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"><img src="https://nestjs.com/img/hostpresto.png" height="30" valign="middle" /></a> &nbsp; <a href="https://genuinebee.com/"><img src="https://nestjs.com/img/genuinebee.svg" height="38" valign="middle" /></a> &nbsp; <a href="http://architectnow.net/"><img src="https://nestjs.com/img/architectnow.png" height="24" valign="middle" /></a> &nbsp; <a href="https://quander.io/"><img src="https://nestjs.com/img/quander.png" height="28" valign="middle" /></a> &nbsp; <a href="https://mantro.net/"><img src="https://nestjs.com/img/mantro-logo.svg" height="20" valign="middle" /></a> &nbsp;
<a href="https://scal.io" target="_blank"><img src="https://nestjs.com/img/scalio-logo.svg" width="110" 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/"><img src="https://nestjs.com/img/triplebyte.png" height="30" valign="middle" /></a>
<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>
## Backers
<a href="https://opencollective.com/nest"><img src="https://opencollective.com/nest/backers.svg?width=890"></a>
<a href="https://opencollective.com/nest" target="_blank"><img src="https://opencollective.com/nest/backers.svg?width=890"></a>
## Stay in touch

View File

@@ -1,5 +1,4 @@
import { Logger } from '@nestjs/common';
import * as JsonSocket from 'json-socket';
import * as net from 'net';
import { share, tap } from 'rxjs/operators';
import {
@@ -14,6 +13,7 @@ import {
ClientOptions,
TcpClientOptions,
} from '../interfaces/client-metadata.interface';
import { JsonSocket } from '../helpers/json-socket';
import { ClientProxy } from './client-proxy';
import { ECONNREFUSED } from './constants';
@@ -42,7 +42,7 @@ export class ClientTCP extends ClientProxy {
this.socket = this.createSocket();
this.bindEvents(this.socket);
const source$ = this.connect$(this.socket._socket).pipe(
const source$ = this.connect$(this.socket.netSocket).pipe(
tap(() => {
this.isConnected = true;
this.socket.on(MESSAGE_EVENT, (buffer: WritePacket & PacketId) =>
@@ -52,10 +52,7 @@ export class ClientTCP extends ClientProxy {
share(),
);
this.socket.connect(
this.port,
this.host,
);
this.socket.connect(this.port, this.host);
this.connection = source$.toPromise();
return this.connection;
}
@@ -122,7 +119,9 @@ export class ClientTCP extends ClientProxy {
}
protected async dispatchEvent(packet: ReadPacket): Promise<any> {
const pattern = this.normalizePattern(packet.pattern);
return this.socket.sendMessage(pattern);
return this.socket.sendMessage({
...packet,
pattern: this.normalizePattern(packet.pattern),
});
}
}

View File

@@ -9,6 +9,7 @@ export const RQM_DEFAULT_URL = 'amqp://localhost';
export const CONNECT_EVENT = 'connect';
export const DISCONNECT_EVENT = 'disconnect';
export const MESSAGE_EVENT = 'message';
export const DATA_EVENT = 'data';
export const ERROR_EVENT = 'error';
export const CLOSE_EVENT = 'close';
export const SUBSCRIBE = 'subscribe';

View File

@@ -0,0 +1,5 @@
export class CorruptedPacketLengthException extends Error {
constructor(rawContentLength: string) {
super(`Corrupted length value "${rawContentLength}" supplied in a packet`);
}
}

View File

@@ -0,0 +1,5 @@
export class InvalidJSONFormatException extends Error {
constructor(err: Error, data: string) {
super(`Could not parse JSON: ${err.message}\nRequest data: ${data}`);
}
}

View File

@@ -0,0 +1,5 @@
export class NetSocketClosedException extends Error {
constructor() {
super(`The net socket is closed.`);
}
}

View File

@@ -0,0 +1,130 @@
import { Socket } from 'net';
import { StringDecoder } from 'string_decoder';
import {
CLOSE_EVENT,
CONNECT_EVENT,
DATA_EVENT,
ERROR_EVENT,
MESSAGE_EVENT,
} from '../constants';
import { CorruptedPacketLengthException } from '../errors/corrupted-packet-length.exception';
import { InvalidJSONFormatException } from '../errors/invalid-json-format.exception';
import { NetSocketClosedException } from '../errors/net-socket-closed.exception';
export class JsonSocket {
private contentLength: number | null = null;
private isClosed = false;
private buffer = '';
private readonly stringDecoder = new StringDecoder();
private readonly delimeter = '#';
public get netSocket() {
return this.socket;
}
constructor(public readonly socket: Socket) {
this.socket.on(DATA_EVENT, this.onData.bind(this));
this.socket.on(CONNECT_EVENT, () => (this.isClosed = false));
this.socket.on(CLOSE_EVENT, () => (this.isClosed = true));
this.socket.on(ERROR_EVENT, () => (this.isClosed = true));
}
public connect(port: number, host: string) {
this.socket.connect(port, host);
return this;
}
public on(event: string, callback: (err?: any) => void) {
this.socket.on(event, callback);
return this;
}
public once(event: string, callback: (err?: any) => void) {
this.socket.once(event, callback);
return this;
}
public end() {
this.socket.end();
return this;
}
public sendMessage(message: any, callback?: (err?: any) => void) {
if (this.isClosed) {
callback && callback(new NetSocketClosedException());
return;
}
this.socket.write(this.formatMessageData(message), 'utf-8', callback);
}
private onData(dataRaw: Buffer | string) {
const data = Buffer.isBuffer(dataRaw)
? this.stringDecoder.write(dataRaw)
: dataRaw;
try {
this.handleData(data);
} catch (e) {
this.socket.emit(ERROR_EVENT, e.message);
this.socket.end();
}
}
private handleData(data: string) {
this.buffer += data;
if (this.contentLength == null) {
const i = this.buffer.indexOf(this.delimeter);
/**
* Check if the buffer has the delimeter (#),
* if not, the end of the buffer string might be in the middle of a content length string
*/
if (i !== -1) {
const rawContentLength = this.buffer.substring(0, i);
this.contentLength = parseInt(rawContentLength, 10);
if (isNaN(this.contentLength)) {
this.contentLength = null;
this.buffer = '';
throw new CorruptedPacketLengthException(rawContentLength);
}
this.buffer = this.buffer.substring(i + 1);
}
}
if (this.contentLength !== null) {
const length = this.buffer.length;
if (length === this.contentLength) {
this.handleMessage(this.buffer);
} else if (length > this.contentLength) {
const message = this.buffer.substring(0, this.contentLength);
const rest = this.buffer.substring(this.contentLength);
this.handleMessage(message);
this.onData(rest);
}
}
}
private handleMessage(data: string) {
this.contentLength = null;
this.buffer = '';
let message: Record<string, unknown>;
try {
message = JSON.parse(data);
} catch (e) {
throw new InvalidJSONFormatException(e, data);
}
message = message || {};
this.socket.emit(MESSAGE_EVENT, message);
}
private formatMessageData(message: any) {
const messageData = JSON.stringify(message);
const length = messageData.length;
const data = length + this.delimeter + messageData;
return data;
}
}

View File

@@ -48,9 +48,9 @@ export class ListenersController {
}
server.addHandler(
pattern,
data => {
async data => {
const contextId = createContextId();
const contextInstance = this.injector.loadPerContext(
const contextInstance = await this.injector.loadPerContext(
instance,
module,
collection,

View File

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

View File

@@ -1,15 +1,16 @@
import { isString, isUndefined } from '@nestjs/common/utils/shared.utils';
import * as JsonSocket from 'json-socket';
import * as net from 'net';
import { Server as NetSocket } from 'net';
import { Server as NetSocket, Socket } from 'net';
import { Observable } from 'rxjs';
import {
CLOSE_EVENT,
ERROR_EVENT,
MESSAGE_EVENT,
NO_MESSAGE_HANDLER,
TCP_DEFAULT_HOST,
TCP_DEFAULT_PORT,
} from '../constants';
import { JsonSocket } from '../helpers/json-socket';
import { CustomTransportStrategy, PacketId, ReadPacket } from '../interfaces';
import {
MicroserviceOptions,
@@ -19,6 +20,8 @@ import { Server } from './server';
export class ServerTCP extends Server implements CustomTransportStrategy {
private readonly port: number;
private readonly host: string;
private server: NetSocket;
private isExplicitlyTerminated = false;
private retryAttemptsCount = 0;
@@ -27,11 +30,14 @@ export class ServerTCP extends Server implements CustomTransportStrategy {
super();
this.port =
this.getOptionsProp<TcpOptions>(options, 'port') || TCP_DEFAULT_PORT;
this.host =
this.getOptionsProp<TcpOptions>(options, 'host') || TCP_DEFAULT_HOST;
this.init();
}
public listen(callback: () => void) {
this.server.listen(this.port, callback);
this.server.listen(this.port, this.host, callback);
}
public close() {
@@ -39,15 +45,16 @@ export class ServerTCP extends Server implements CustomTransportStrategy {
this.server.close();
}
public bindHandler<T extends Record<string, any>>(socket: T) {
public bindHandler(socket: Socket) {
const readSocket = this.getSocketInstance(socket);
readSocket.on(MESSAGE_EVENT, async (msg: ReadPacket & PacketId) =>
this.handleMessage(readSocket, msg),
);
readSocket.on(ERROR_EVENT, this.handleError.bind(this));
}
public async handleMessage<T extends Record<string, any>>(
socket: T,
public async handleMessage(
socket: JsonSocket,
packet: ReadPacket & PacketId,
) {
const pattern = !isString(packet.pattern)
@@ -98,7 +105,7 @@ export class ServerTCP extends Server implements CustomTransportStrategy {
this.server.on(CLOSE_EVENT, this.handleClose.bind(this));
}
private getSocketInstance<T>(socket: T): JsonSocket {
private getSocketInstance(socket: Socket): JsonSocket {
return new JsonSocket(socket);
}
}

View File

@@ -119,17 +119,9 @@ describe('ClientProxy', () => {
});
describe('createObserver', () => {
let testClient: TestClientProxy;
beforeEach(() => {
testClient = new TestClientProxy();
});
it(`should return function`, () => {
expect(typeof testClient['createObserver'](null)).to.be.eql('function');
});
describe('returned function calls', () => {
it(`"error" when first parameter is not null or undefined`, () => {
const testClient = new TestClientProxy();
const err = 'test';
const error = sinon.spy();
const next = sinon.spy();
@@ -146,6 +138,7 @@ describe('ClientProxy', () => {
});
it(`"next" when first parameter is null or undefined`, () => {
const testClient = new TestClientProxy();
const data = 'test';
const error = sinon.spy();
const next = sinon.spy();
@@ -162,6 +155,7 @@ describe('ClientProxy', () => {
});
it(`"complete" when third parameter is true`, () => {
const testClient = new TestClientProxy();
const data = 'test';
const error = sinon.spy();
const next = sinon.spy();

View File

@@ -128,7 +128,7 @@ describe('ClientRedis', () => {
};
describe('not completed', () => {
beforeEach(async () => {
beforeEach(() => {
callback = sinon.spy();
subscription = client.createResponseCallback();
@@ -172,7 +172,7 @@ describe('ClientRedis', () => {
});
});
describe('disposed and "id" is incorrect', () => {
beforeEach(async () => {
beforeEach(() => {
callback = sinon.spy();
subscription = client.createResponseCallback();
subscription('channel', new Buffer(JSON.stringify(responseMessage)));
@@ -218,7 +218,7 @@ describe('ClientRedis', () => {
let createClientSpy: sinon.SinonSpy;
let handleErrorsSpy: sinon.SinonSpy;
beforeEach(async () => {
beforeEach(() => {
createClientSpy = sinon.stub(client, 'createClient').callsFake(
() =>
({

View File

@@ -6,18 +6,7 @@ import { ERROR_EVENT } from '../../constants';
describe('ClientTCP', () => {
let client: ClientTCP;
let socket: {
connect: sinon.SinonStub;
publish: sinon.SinonSpy;
_socket: {
addListener: sinon.SinonStub;
removeListener: sinon.SinonSpy;
once: sinon.SinonStub;
};
on: sinon.SinonStub;
end: sinon.SinonSpy;
sendMessage: sinon.SinonSpy;
};
let socket;
let createSocketStub: sinon.SinonStub;
beforeEach(() => {
@@ -27,9 +16,8 @@ describe('ClientTCP', () => {
socket = {
connect: sinon.stub(),
publish: sinon.spy(),
on: sinon.stub().callsFake(onFakeCallback),
_socket: {
netSocket: {
addListener: sinon.stub().callsFake(onFakeCallback),
removeListener: sinon.spy(),
once: sinon.stub().callsFake(onFakeCallback),
@@ -134,7 +122,9 @@ describe('ClientTCP', () => {
toPromise: () => source,
pipe: () => source,
};
connect$Stub = sinon.stub(client, 'connect$' as any).callsFake(() => source);
connect$Stub = sinon
.stub(client, 'connect$' as any)
.callsFake(() => source);
await client.connect();
});
afterEach(() => {

View File

@@ -0,0 +1,215 @@
import { expect } from 'chai';
import { AddressInfo, createServer, Socket } from 'net';
import { CONNECT_EVENT, MESSAGE_EVENT } from '../../constants';
import { JsonSocket } from '../../helpers/json-socket';
import { longPayload } from './data/long-payload-with-special-chars';
import * as helpers from './helpers';
import { ip } from './helpers';
// tslint:disable:no-string-literal
describe('JsonSocket connection', () => {
it('should connect, send and receive message', done => {
helpers.createServerAndClient(
(error, server, clientSocket, serverSocket) => {
if (error) {
return done(error);
}
expect(clientSocket['isClosed']).to.be.false;
expect(serverSocket['isClosed']).to.be.false;
Promise.all([
new Promise(callback => {
clientSocket.sendMessage({ type: 'ping' }, callback);
}),
new Promise(callback => {
clientSocket.on(MESSAGE_EVENT, (message: string) => {
expect(message).to.deep.equal({ type: 'pong' });
callback();
});
}),
new Promise(callback => {
serverSocket.on(MESSAGE_EVENT, (message: string) => {
expect(message).to.deep.equal({ type: 'ping' });
serverSocket.sendMessage({ type: 'pong' }, callback);
});
}),
])
.then(() => {
expect(clientSocket['isClosed']).to.equal(false);
expect(serverSocket['isClosed']).to.equal(false);
clientSocket.end();
server.close(done);
})
.catch(e => done(e));
},
);
});
it('should send long messages with special characters without issues', done => {
helpers.createServerAndClient((err, server, clientSocket, serverSocket) => {
if (err) {
return done(err);
}
expect(clientSocket['isClosed']).to.equal(false);
expect(serverSocket['isClosed']).to.equal(false);
Promise.all([
new Promise(callback => {
clientSocket.sendMessage(longPayload, callback);
}),
new Promise(callback => {
clientSocket.on(MESSAGE_EVENT, (message: { type: 'pong' }) => {
expect(message).to.deep.equal({ type: 'pong' });
callback();
});
}),
new Promise(callback => {
serverSocket.on(MESSAGE_EVENT, (message: { type: 'pong' }) => {
expect(message).to.deep.equal(longPayload);
serverSocket.sendMessage({ type: 'pong' }, callback);
});
}),
])
.then(() => {
expect(clientSocket['isClosed']).to.equal(false);
expect(serverSocket['isClosed']).to.equal(false);
clientSocket.end();
server.close(done);
})
.catch(e => done(e));
});
});
it('should send multiple messages', done => {
helpers.createServerAndClient((err, server, clientSocket, serverSocket) => {
if (err) {
return done(err);
}
Promise.all([
new Promise(callback =>
Promise.all(
helpers
.range(1, 100)
.map(
i =>
new Promise(resolve =>
clientSocket.sendMessage({ number: i }, resolve),
),
),
).then(_ => callback()),
),
new Promise(callback => {
let lastNumber = 0;
serverSocket.on(MESSAGE_EVENT, (message: { number: number }) => {
expect(message.number).to.deep.equal(lastNumber + 1);
lastNumber = message.number;
if (lastNumber === 100) {
callback();
}
});
}),
])
.then(() => {
clientSocket.end();
server.close(done);
})
.catch(e => done(e));
});
});
it('should return true for "closed" when server disconnects', done => {
helpers.createServerAndClient((err, server, clientSocket, serverSocket) => {
if (err) {
return done(err);
}
new Promise(callback => {
serverSocket.end();
setTimeout(callback, 10);
})
.then(
() =>
new Promise(callback => {
expect(clientSocket['isClosed']).to.equal(true);
expect(serverSocket['isClosed']).to.equal(true);
callback();
}),
)
.then(() => {
clientSocket.end();
server.close(done);
})
.catch(e => done(e));
});
});
it('should return true for "closed" when client disconnects', done => {
helpers.createServerAndClient((err, server, clientSocket, serverSocket) => {
if (err) {
return done(err);
}
new Promise(callback => {
clientSocket.end();
setTimeout(callback, 10);
})
.then(
() =>
new Promise(callback => {
expect(clientSocket['isClosed']).to.equal(true);
expect(serverSocket['isClosed']).to.equal(true);
callback();
}),
)
.then(() => server.close(done))
.catch(e => done(e));
});
});
it('should return true for "closed" when client (re)connects', done => {
const server = createServer();
server.on('listening', () => {
const clientSocket = new JsonSocket(new Socket());
server.once('connection', socket => {
const serverSocket = new JsonSocket(socket);
serverSocket.once('end', () => {
setTimeout(() => {
expect(serverSocket['isClosed']).to.equal(true);
expect(clientSocket['isClosed']).to.equal(true);
clientSocket.on(CONNECT_EVENT, () => {
setTimeout(() => {
expect(clientSocket['isClosed']).to.equal(false);
clientSocket.end();
server.close(done);
}, 10);
});
const address2 = server.address();
if (!address2) {
throw new Error('server.address() returned null');
}
const port2 = (address2 as AddressInfo).port;
clientSocket.connect(port2, ip);
}, 10);
});
clientSocket.end();
});
const address1 = server.address();
if (!address1) {
throw new Error('server.address() returned null');
}
const port1 = (address1 as AddressInfo).port;
clientSocket.connect(port1, ip);
});
server.listen();
});
});

View File

@@ -0,0 +1,263 @@
export const longPayload = [
{
_id: '584f17147fce7ca0a8bacfd2',
index: 0,
guid: '1d127572-0369-45fb-aa2f-e3bb083ac2b2',
isActive: true,
balance: '$2,926.06',
picture: 'http://placehold.it/32x32',
age: 26,
eyeColor: 'green',
name:
'Wçêtson Aguilar [special characters in name that used to fail on long payloads]',
gender: 'male',
company: 'PROWASTE',
email: 'watsonaguilar@prowaste.com',
phone: '+1 (821) 517-2430',
address: '910 Robert Street, Bangor, Delaware, 4159',
about:
'Aliqua et irure id do id id non dolore ipsum sit in proident ipsum. Id elit incididunt occaecat do laboris sunt officia fugiat aliquip. Incididunt aute ad minim Lorem cupidatat aute labore enim elit nostrud amet. Tempor sint irure incididunt aliquip amet sunt mollit aliqua Lorem officia pariatur.\r\n',
registered: '2014-02-11T08:45:28 +05:00',
latitude: 73.891198,
longitude: 90.23414,
tags: ['veniam', 'nulla', 'cillum', 'tempor', 'sint', 'magna', 'nostrud'],
friends: [
{
id: 0,
name: 'Cecelia James'
},
{
id: 1,
name: 'Hilary Young'
},
{
id: 2,
name: 'Sharron Goodwin'
}
],
greeting: 'Hello, Watson Aguilar! You have 3 unread messages.',
favoriteFruit: 'banana'
},
{
_id: '584f1714b2e945fb30f73892',
index: 1,
guid: '3ffce1ee-a442-4dae-804f-40c59f19e7ee',
isActive: false,
balance: '$2,507.49',
picture: 'http://placehold.it/32x32',
age: 34,
eyeColor: 'brown',
name: 'Aguirre Salazar',
gender: 'male',
company: 'EZENTIA',
email: 'aguirresalazar@ezentia.com',
phone: '+1 (910) 443-3647',
address: '629 Burnett Street, Tyhee, West Virginia, 2905',
about:
'Labore laboris et deserunt aliquip. Occaecat esse officia est eiusmod. Officia tempor cupidatat commodo minim deserunt mollit qui ut culpa. Est occaecat laborum occaecat non mollit ad reprehenderit magna ad. Consequat culpa excepteur qui aliqua dolore occaecat aliqua sunt elit ea nisi. Officia consectetur dolor labore voluptate. Esse ad esse qui id incididunt.\r\n',
registered: '2015-01-28T06:47:34 +05:00',
latitude: -64.632254,
longitude: -116.659127,
tags: [
'sit',
'anim',
'quis',
'officia',
'minim',
'cupidatat',
'adipisicing'
],
friends: [
{
id: 0,
name: 'Olson Mccall'
},
{
id: 1,
name: 'Carolina Conway'
},
{
id: 2,
name: 'Carlson Pacheco'
}
],
greeting: 'Hello, Aguirre Salazar! You have 9 unread messages.',
favoriteFruit: 'apple'
},
{
_id: '584f17148282bb876fc4e9a2',
index: 2,
guid: '892ba80c-7149-4904-bd36-22f619d4df0a',
isActive: true,
balance: '$2,132.56',
picture: 'http://placehold.it/32x32',
age: 26,
eyeColor: 'green',
name: 'Hardin Grant',
gender: 'male',
company: 'CINASTER',
email: 'hardingrant@cinaster.com',
phone: '+1 (900) 437-2390',
address: '180 Ide Court, Gibsonia, Washington, 3027',
about:
'Ut aliquip officia adipisicing voluptate aliquip aute fugiat ad quis ad eu non consectetur. Laboris labore veniam officia qui eiusmod. Duis aliqua est quis do dolor excepteur ea dolore non. Nisi mollit laboris nostrud nostrud pariatur culpa laboris anim est irure id aute.\r\n',
registered: '2016-09-13T10:54:27 +04:00',
latitude: 8.651031,
longitude: -136.777747,
tags: ['consequat', 'deserunt', 'magna', 'enim', 'esse', 'minim', 'ipsum'],
friends: [
{
id: 0,
name: 'Lesley Velasquez'
},
{
id: 1,
name: 'Natasha Simmons'
},
{
id: 2,
name: 'Isabel Avery'
}
],
greeting: 'Hello, Hardin Grant! You have 7 unread messages.',
favoriteFruit: 'strawberry'
},
{
_id: '584f1714d90ff4b8914a69e7',
index: 3,
guid: '76f37726-1f73-4cf7-aabe-8dadf37d3ddd',
isActive: true,
balance: '$2,493.04',
picture: 'http://placehold.it/32x32',
age: 32,
eyeColor: 'blue',
name: 'Randall Roy',
gender: 'male',
company: 'ZAJ',
email: 'randallroy@zaj.com',
phone: '+1 (938) 562-2214',
address: '872 Rugby Road, Hoehne, Indiana, 9792',
about:
'Non laboris id et cupidatat velit ea ipsum ea mollit quis qui dolore nisi laboris. Enim sit irure enim dolor velit proident sunt pariatur proident consequat mollit enim minim. Laboris deserunt cupidatat nisi enim adipisicing officia dolore ex cupidatat anim. Cupidatat labore voluptate non magna est dolor. Occaecat occaecat magna anim laborum adipisicing esse excepteur cillum aute qui eu do excepteur eu. Nostrud consectetur consectetur aliquip deserunt velit culpa sint excepteur mollit nostrud sit ex. Est ex ut laboris pariatur.\r\n',
registered: '2016-05-05T05:24:56 +04:00',
latitude: 18.943281,
longitude: -110.942673,
tags: [
'eu',
'aliqua',
'reprehenderit',
'amet',
'nulla',
'consequat',
'nisi'
],
friends: [
{
id: 0,
name: 'Barron Maynard'
},
{
id: 1,
name: 'Lynn Shepard'
},
{
id: 2,
name: 'Robin Whitehead'
}
],
greeting: 'Hello, Randall Roy! You have 3 unread messages.',
favoriteFruit: 'strawberry'
},
{
_id: '584f17142a8f47cef0f5401a',
index: 4,
guid: '9b50ec22-3fbe-40ce-a5b8-b956f1340a77',
isActive: false,
balance: '$3,234.48',
picture: 'http://placehold.it/32x32',
age: 33,
eyeColor: 'green',
name: 'Chandler Vasquez',
gender: 'male',
company: 'ZILLACTIC',
email: 'chandlervasquez@zillactic.com',
phone: '+1 (830) 550-3428',
address: '610 Hunts Lane, Cazadero, Michigan, 3584',
about:
'Fugiat in anim adipisicing sint aliquip ea velit do proident eu ad amet. Nulla velit duis ullamco labore ea Lorem velit elit Lorem. Id laboris do mollit exercitation veniam do amet culpa est excepteur reprehenderit consectetur laborum.\r\n',
registered: '2014-04-20T05:23:32 +04:00',
latitude: -88.088841,
longitude: -163.602482,
tags: [
'sunt',
'excepteur',
'enim',
'incididunt',
'officia',
'amet',
'irure'
],
friends: [
{
id: 0,
name: 'Mckee Norton'
},
{
id: 1,
name: 'Durham Parrish'
},
{
id: 2,
name: 'Stewart Kramer'
}
],
greeting: 'Hello, Chandler Vasquez! You have 3 unread messages.',
favoriteFruit: 'strawberry'
},
{
_id: '584f171450a4e9dda687adc5',
index: 5,
guid: '68eeea45-ba6e-4740-b89b-10d690c37a02',
isActive: false,
balance: '$3,771.46',
picture: 'http://placehold.it/32x32',
age: 25,
eyeColor: 'blue',
name: 'Fernandez Caldwell',
gender: 'male',
company: 'SNIPS',
email: 'fernandezcaldwell@snips.com',
phone: '+1 (911) 544-3684',
address: '786 Newel Street, Elliston, Massachusetts, 6683',
about:
'Voluptate commodo labore aliqua excepteur irure aliquip officia. Incididunt excepteur elit quis reprehenderit voluptate aliqua ad voluptate duis nisi dolor dolor id dolor. Irure sit consequat amet ea magna laborum velit eu in. Sunt occaecat quis consectetur laboris. Duis est do eu consectetur dolore id incididunt incididunt ut esse magna est. Nostrud irure magna nulla fugiat deserunt deserunt enim mollit proident qui sint dolore incididunt. Incididunt incididunt do quis culpa sint ut aliqua id.\r\n',
registered: '2015-08-09T09:02:36 +04:00',
latitude: -46.941347,
longitude: -171.796168,
tags: [
'sit',
'irure',
'reprehenderit',
'ut',
'proident',
'aliquip',
'labore'
],
friends: [
{
id: 0,
name: 'Adela Preston'
},
{
id: 1,
name: 'Phillips Moses'
},
{
id: 2,
name: 'Neva Wise'
}
],
greeting: 'Hello, Fernandez Caldwell! You have 10 unread messages.',
favoriteFruit: 'apple'
}
];

View File

@@ -0,0 +1,82 @@
import {
AddressInfo,
createServer as netCreateServer,
Server,
Socket,
} from 'net';
import { ERROR_EVENT } from '../../constants';
import { JsonSocket } from '../../helpers/json-socket';
export const ip = '127.0.0.1';
export function createServer(callback: (err?: any, server?: Server) => void) {
const server = netCreateServer();
server.listen();
server.on('listening', () => {
callback(null, server);
});
server.on(ERROR_EVENT, (err: any) => {
callback(err);
});
}
export function createClient(
server: Server,
callback: (
err?: any,
clientSocket?: JsonSocket,
serverSocket?: JsonSocket,
) => void,
) {
const clientSocket = new JsonSocket(new Socket());
const address = server.address();
if (!address) {
throw new Error('server.address() returned null');
}
const port = (address as AddressInfo).port;
clientSocket.connect(port, ip);
clientSocket.on(ERROR_EVENT, (err: any) => {
callback(err);
});
server.once('connection', socket => {
const serverSocket = new JsonSocket(socket);
callback(null, clientSocket, serverSocket);
});
}
export function createServerAndClient(
callback: (
err?: any,
server?: Server,
clientSocket?: JsonSocket,
serverSocket?: JsonSocket,
) => void,
) {
createServer((serverErr, server) => {
if (serverErr) {
return callback(serverErr);
}
createClient(server, (clientErr, clientSocket, serverSocket) => {
if (clientErr) {
return callback(clientErr);
}
callback(null, server, clientSocket, serverSocket);
});
});
}
export function range(start: number, end: number) {
const r = [];
for (let i = start; i <= end; i++) {
r.push(i);
}
return r;
}

View File

@@ -0,0 +1,27 @@
import { CONNECT_EVENT, MESSAGE_EVENT } from '../../constants';
import { JsonSocket } from '../../helpers/json-socket';
import * as helpers from './helpers';
import { expect } from 'chai';
describe('JsonSocket chaining', () => {
it('should return the instance when subscribing to event', done => {
helpers.createServerAndClient((err, server, clientSocket, serverSocket) => {
if (err) {
return done(err);
}
expect(clientSocket.on(MESSAGE_EVENT, () => {})).to.be.instanceof(
JsonSocket,
);
expect(clientSocket.on(CONNECT_EVENT, () => {})).to.deep.equal(
clientSocket,
);
expect(
clientSocket.on(MESSAGE_EVENT, () => {}).on('end', () => {}),
).to.deep.equal(clientSocket);
clientSocket.end();
server.close(done);
});
});
});

View File

@@ -0,0 +1,186 @@
import { Socket } from 'net';
import * as sinon from 'sinon';
import { ERROR_EVENT, MESSAGE_EVENT } from '../../constants';
import { JsonSocket } from '../../helpers/json-socket';
import { expect } from 'chai';
// tslint:disable:no-string-literal
describe('JsonSocket message parsing', () => {
const socket = new JsonSocket(new Socket());
let messages: string[] = [];
socket.on(MESSAGE_EVENT, message => {
messages.push(message);
});
beforeEach(() => {
messages = [];
socket['contentLength'] = null;
socket['buffer'] = '';
});
it('should parse JSON strings', () => {
socket['handleData']('13#"Hello there"');
expect(messages.length).to.deep.equal(1);
expect(messages[0]).to.deep.equal('Hello there');
expect(socket['buffer']).to.deep.equal('');
});
it('should parse JSON numbers', () => {
socket['handleData']('5#12.34');
expect(messages.length).to.deep.equal(1);
expect(messages[0]).to.deep.equal(12.34);
expect(socket['buffer']).to.deep.equal('');
});
it('should parse JSON bools', () => {
socket['handleData']('4#true');
expect(messages.length).to.deep.equal(1);
expect(messages[0]).to.deep.equal(true);
expect(socket['buffer']).to.deep.equal('');
});
it('should parse JSON objects', () => {
socket['handleData']('17#{"a":"yes","b":9}');
expect(messages.length).to.deep.equal(1);
expect(messages[0]).to.deep.equal({ a: 'yes', b: 9 });
expect(socket['buffer']).to.deep.equal('');
});
it('should parse JSON arrays', () => {
socket['handleData']('9#["yes",9]');
expect(messages.length).to.deep.equal(1);
expect(messages[0]).to.deep.equal(['yes', 9]);
expect(socket['buffer']).to.deep.equal('');
});
it('should parse multiple messages in one packet', () => {
socket['handleData']('5#"hey"4#true');
expect(messages.length).to.deep.equal(2);
expect(messages[0]).to.deep.equal('hey');
expect(messages[1]).to.deep.equal(true);
expect(socket['buffer']).to.deep.equal('');
});
it('should parse chunked messages', () => {
socket['handleData']('13#"Hel');
socket['handleData']('lo there"');
expect(messages.length).to.deep.equal(1);
expect(messages[0]).to.deep.equal('Hello there');
expect(socket['buffer']).to.deep.equal('');
});
it('should parse chunked and multiple messages', () => {
socket['handleData']('13#"Hel');
socket['handleData']('lo there"4#true');
expect(messages.length).to.deep.equal(2);
expect(messages[0]).to.deep.equal('Hello there');
expect(messages[1]).to.deep.equal(true);
expect(socket['buffer']).to.deep.equal('');
});
it('should parse chunked messages with multi-byte characters', () => {
// 0x33 0x23 0xd8 0x22 0xa9 0x22 = 3#"ة" (U+00629)
socket['onData'](Buffer.from([0x33, 0x23, 0x22, 0xd8]));
socket['onData'](Buffer.from([0xa9, 0x22]));
expect(messages.length).to.deep.equal(1);
expect(messages[0]).to.deep.equal('ة');
});
it('should parse multiple messages with unicode correctly', () => {
socket['handleData']('41#"Diese Zeile enthält das Unicode-Zeichen"4#true');
expect(messages[0]).to.deep.equal(
'Diese Zeile enthält das Unicode-Zeichen',
);
expect(messages[1]).to.deep.equal(true);
expect(socket['buffer']).to.deep.equal('');
});
it('should parse multiple and chunked messages with unicode correctly', () => {
socket['handleData']('41#"Diese Zeile enthält ');
socket['handleData']('das Unicode-Zeichen"4#true');
expect(messages[0]).to.deep.equal(
'Diese Zeile enthält das Unicode-Zeichen',
);
expect(messages[1]).to.deep.equal(true);
expect(socket['buffer']).to.deep.equal('');
});
describe('Error handling', () => {
describe('JSON Error', () => {
const errorMsg = `Could not parse JSON: Unexpected end of JSON input\nRequest data: "Hel`;
const packetStrin = '4#"Hel';
const packet = Buffer.from(packetStrin);
it('should fail to parse invalid JSON', () => {
try {
socket['handleData']('4#"Hel');
} catch (err) {
expect(err.message).to.deep.equal(errorMsg);
}
expect(messages.length).to.deep.equal(0);
expect(socket['buffer']).to.deep.equal('');
});
it(`should emit ${ERROR_EVENT} event on socket`, () => {
const socketEmitSpy: sinon.SinonSpy<any, any> = sinon.spy(
socket['socket'],
'emit',
);
socket['onData'](packet);
expect(socketEmitSpy.calledOnceWithExactly(ERROR_EVENT, errorMsg)).to.be
.true;
socketEmitSpy.restore();
});
it(`should send a FIN packet`, () => {
const socketEndSpy = sinon.spy(socket['socket'], 'end');
socket['onData'](packet);
expect(socketEndSpy.calledOnce).to.be.true;
socketEndSpy.restore();
});
});
describe('Corrupted length value', () => {
const errorMsg = `Corrupted length value "wtf" supplied in a packet`;
const packetStrin = 'wtf#"Hello"';
const packet = Buffer.from(packetStrin);
it('should not accept invalid content length', () => {
try {
socket['handleData'](packetStrin);
} catch (err) {
expect(err.message).to.deep.equal(errorMsg);
}
expect(messages.length).to.deep.equal(0);
expect(socket['buffer']).to.deep.equal('');
});
it(`should emit ${ERROR_EVENT} event on socket`, () => {
const socketEmitSpy: sinon.SinonSpy<any, any> = sinon.spy(
socket['socket'],
'emit',
);
socket['onData'](packet);
expect(socketEmitSpy.calledOnceWithExactly(ERROR_EVENT, errorMsg)).to.be
.true;
socketEmitSpy.restore();
});
it(`should send a FIN packet`, () => {
const socketEndSpy = sinon.spy(socket['socket'], 'end');
socket['onData'](packet);
expect(socketEndSpy.calledOnce).to.be.true;
socketEndSpy.restore();
});
});
});
});

View File

@@ -21,9 +21,9 @@ describe('ServerTCP', () => {
.stub(server, 'getSocketInstance' as any)
.callsFake(() => socket);
});
it('should bind message event to handler', () => {
it('should bind message and error events to handler', () => {
server.bindHandler(null);
expect(socket.on.called).to.be.true;
expect(socket.on.calledTwice).to.be.true;
});
});
describe('close', () => {
@@ -44,8 +44,13 @@ describe('ServerTCP', () => {
it('should call native listen method with expected arguments', () => {
const callback = () => {};
server.listen(callback);
expect(serverMock.listen.calledWith((server as any).port, callback)).to.be
.true;
expect(
serverMock.listen.calledWith(
(server as any).port,
(server as any).host,
callback,
),
).to.be.true;
});
});
describe('handleMessage', () => {

View File

@@ -7,29 +7,29 @@
[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, heavily inspired by <a href="https://angular.io" target="blank">Angular</a>.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
<a href="https://travis-ci.org/nestjs/nest"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
<a href="https://travis-ci.org/nestjs/nest"><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"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#8" alt="Coverage" /></a>
<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a>
<a href="https://discord.gg/G7Qnnhy"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
<a href="https://paypal.me/kamilmysliwiec"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://twitter.com/nestframework"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
<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>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
<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#8" 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>
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
</p>
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
## Description
<p>Nest is a framework for building efficient, scalable <a href="http://nodejs.org" target="_blank">Node.js</a> server-side applications. It uses modern JavaScript, is built with <a href="http://www.typescriptlang.org" target="_blank">TypeScript</a> (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).</p>
Nest is a framework for building efficient, scalable <a href="http://nodejs.org" target="_blank">Node.js</a> server-side applications. It uses modern JavaScript, is built with <a href="http://www.typescriptlang.org" target="_blank">TypeScript</a> (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).
<p>Under the hood, Nest makes use of <a href="https://expressjs.com/" target="_blank">Express</a>, but also, provides compatibility with a wide range of other libraries, like e.g. <a href="https://github.com/fastify/fastify" target="blank">Fastify</a>, allowing for easy use of the myriad third-party plugins which are available.</p>
<p>Under the hood, Nest makes use of <a href="https://expressjs.com/" target="_blank">Express</a>, but also, provides compatibility with a wide range of other libraries, like e.g. <a href="https://github.com/fastify/fastify" target="_blank">Fastify</a>, allowing for easy use of the myriad third-party plugins which are available.</p>
## Philosophy
@@ -41,35 +41,42 @@
* To check out the [guide](https://docs.nestjs.com), visit [docs.nestjs.com](https://docs.nestjs.com). :books:
* 要查看中文 [指南](readme_zh.md), 请访问 [docs.nestjs.cn](https://docs.nestjs.cn). :books:
## Consulting
With official support, you can get expert help straight from Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://docs.nestjs.com/enterprise).
## Support
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
#### Principal Sponsor
<a href="https://valor-software.com/"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="320" /></a>
<a href="https://valor-software.com/" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="320" /></a>
#### Base Sponsor
<a href="https://blueanchor.io/"><img src="https://nestjs.com/img/blueanchor.png" width="300" /></a> &nbsp;
<a href="https://www.novologic.com/"><img src="https://nestjs.com/img/novologic.png" width="200" /></a>
<a href="https://blueanchor.io/" target="_blank"><img src="https://nestjs.com/img/blueanchor.png" width="300" /></a> &nbsp;
<a href="https://www.novologic.com/" target="_blank"><img src="https://nestjs.com/img/novologic.png" width="200" /></a>
#### Silver Sponsors
<a href="https://neoteric.eu/"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> &nbsp;
<a href="http://gojob.com"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" height="95" /></a> &nbsp; <a href="https://www.swingdev.io"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="150" valign="middle" /> </a> &nbsp; &nbsp;
<a href="https://yakaz.com/"><img src="https://nestjs.com/img/yakaz.png" width="100" valign="middle" /></a>
<a href="http://xtremis.com/"><img src="https://nestjs.com/img/logo-xtremis.svg" width="150" valign="middle" /></a>
<a href="https://neoteric.eu/" target="_blank"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> &nbsp;
<a href="http://gojob.com" target="_blank"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" height="95" /></a> &nbsp; <a href="https://www.swingdev.io" target="_blank"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="150" valign="middle" /> </a> &nbsp; &nbsp;
<a href="https://yakaz.com/" target="_blank"><img src="https://nestjs.com/img/yakaz.png" width="100" valign="middle" /></a> &nbsp;
<a href="https://trilon.io" target="_blank"><img src="https://nestjs.com/img/trilon.svg" width="150" valign="middle" /></a>
<a href="http://xtremis.com/" target="_blank"><img src="https://nestjs.com/img/logo-xtremis.svg" width="150" valign="middle" /></a>
#### Sponsors
<a href="https://scal.io"><img src="https://nestjs.com/img/scalio-logo.svg" width="110" valign="middle" /></a> &nbsp; <a href="http://angularity.io"><img src="http://angularity.io/media/logo.svg" height="30" 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"><img src="https://nestjs.com/img/hostpresto.png" height="30" valign="middle" /></a> &nbsp; <a href="https://genuinebee.com/"><img src="https://nestjs.com/img/genuinebee.svg" height="38" valign="middle" /></a> &nbsp; <a href="http://architectnow.net/"><img src="https://nestjs.com/img/architectnow.png" height="24" valign="middle" /></a> &nbsp; <a href="https://quander.io/"><img src="https://nestjs.com/img/quander.png" height="28" valign="middle" /></a> &nbsp; <a href="https://mantro.net/"><img src="https://nestjs.com/img/mantro-logo.svg" height="20" valign="middle" /></a> &nbsp;
<a href="https://scal.io" target="_blank"><img src="https://nestjs.com/img/scalio-logo.svg" width="110" 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/"><img src="https://nestjs.com/img/triplebyte.png" height="30" valign="middle" /></a>
<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>
## Backers
<a href="https://opencollective.com/nest"><img src="https://opencollective.com/nest/backers.svg?width=890"></a>
<a href="https://opencollective.com/nest" target="_blank"><img src="https://opencollective.com/nest/backers.svg?width=890"></a>
## Stay in touch

View File

@@ -18,12 +18,18 @@ export class ExpressAdapter extends AbstractHttpAdapter {
super(instance || express());
}
public reply(response, body: any, statusCode: number) {
const res = response.status(statusCode);
if (isNil(body)) {
return res.send();
public reply(response, body: any, statusCode?: number) {
if (statusCode) {
response.status(statusCode);
}
return isObject(body) ? res.json(body) : res.send(String(body));
if (isNil(body)) {
return response.send();
}
return isObject(body) ? response.json(body) : response.send(String(body));
}
public status(response: any, statusCode: number) {
return response.status(statusCode);
}
public render(response: any, view: string, options: any) {
@@ -44,8 +50,8 @@ export class ExpressAdapter extends AbstractHttpAdapter {
public listen(port: string | number, callback?: () => void);
public listen(port: string | number, hostname: string, callback?: () => void);
public listen(port: any, hostname?: any, callback?: any) {
return this.httpServer.listen(port, hostname, callback);
public listen(port: any, ...args: any[]) {
return this.httpServer.listen(port, ...args);
}
public close() {

View File

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

View File

@@ -7,29 +7,29 @@
[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, heavily inspired by <a href="https://angular.io" target="blank">Angular</a>.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
<a href="https://travis-ci.org/nestjs/nest"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
<a href="https://travis-ci.org/nestjs/nest"><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"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#8" alt="Coverage" /></a>
<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a>
<a href="https://discord.gg/G7Qnnhy"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
<a href="https://paypal.me/kamilmysliwiec"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://twitter.com/nestframework"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
<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>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
<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#8" 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>
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
</p>
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
## Description
<p>Nest is a framework for building efficient, scalable <a href="http://nodejs.org" target="_blank">Node.js</a> server-side applications. It uses modern JavaScript, is built with <a href="http://www.typescriptlang.org" target="_blank">TypeScript</a> (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).</p>
Nest is a framework for building efficient, scalable <a href="http://nodejs.org" target="_blank">Node.js</a> server-side applications. It uses modern JavaScript, is built with <a href="http://www.typescriptlang.org" target="_blank">TypeScript</a> (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).
<p>Under the hood, Nest makes use of <a href="https://expressjs.com/" target="_blank">Express</a>, but also, provides compatibility with a wide range of other libraries, like e.g. <a href="https://github.com/fastify/fastify" target="blank">Fastify</a>, allowing for easy use of the myriad third-party plugins which are available.</p>
<p>Under the hood, Nest makes use of <a href="https://expressjs.com/" target="_blank">Express</a>, but also, provides compatibility with a wide range of other libraries, like e.g. <a href="https://github.com/fastify/fastify" target="_blank">Fastify</a>, allowing for easy use of the myriad third-party plugins which are available.</p>
## Philosophy
@@ -41,35 +41,42 @@
* To check out the [guide](https://docs.nestjs.com), visit [docs.nestjs.com](https://docs.nestjs.com). :books:
* 要查看中文 [指南](readme_zh.md), 请访问 [docs.nestjs.cn](https://docs.nestjs.cn). :books:
## Consulting
With official support, you can get expert help straight from Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://docs.nestjs.com/enterprise).
## Support
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
#### Principal Sponsor
<a href="https://valor-software.com/"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="320" /></a>
<a href="https://valor-software.com/" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="320" /></a>
#### Base Sponsor
<a href="https://blueanchor.io/"><img src="https://nestjs.com/img/blueanchor.png" width="300" /></a> &nbsp;
<a href="https://www.novologic.com/"><img src="https://nestjs.com/img/novologic.png" width="200" /></a>
<a href="https://blueanchor.io/" target="_blank"><img src="https://nestjs.com/img/blueanchor.png" width="300" /></a> &nbsp;
<a href="https://www.novologic.com/" target="_blank"><img src="https://nestjs.com/img/novologic.png" width="200" /></a>
#### Silver Sponsors
<a href="https://neoteric.eu/"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> &nbsp;
<a href="http://gojob.com"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" height="95" /></a> &nbsp; <a href="https://www.swingdev.io"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="150" valign="middle" /> </a> &nbsp; &nbsp;
<a href="https://yakaz.com/"><img src="https://nestjs.com/img/yakaz.png" width="100" valign="middle" /></a>
<a href="http://xtremis.com/"><img src="https://nestjs.com/img/logo-xtremis.svg" width="150" valign="middle" /></a>
<a href="https://neoteric.eu/" target="_blank"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> &nbsp;
<a href="http://gojob.com" target="_blank"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" height="95" /></a> &nbsp; <a href="https://www.swingdev.io" target="_blank"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="150" valign="middle" /> </a> &nbsp; &nbsp;
<a href="https://yakaz.com/" target="_blank"><img src="https://nestjs.com/img/yakaz.png" width="100" valign="middle" /></a> &nbsp;
<a href="https://trilon.io" target="_blank"><img src="https://nestjs.com/img/trilon.svg" width="150" valign="middle" /></a>
<a href="http://xtremis.com/" target="_blank"><img src="https://nestjs.com/img/logo-xtremis.svg" width="150" valign="middle" /></a>
#### Sponsors
<a href="https://scal.io"><img src="https://nestjs.com/img/scalio-logo.svg" width="110" valign="middle" /></a> &nbsp; <a href="http://angularity.io"><img src="http://angularity.io/media/logo.svg" height="30" 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"><img src="https://nestjs.com/img/hostpresto.png" height="30" valign="middle" /></a> &nbsp; <a href="https://genuinebee.com/"><img src="https://nestjs.com/img/genuinebee.svg" height="38" valign="middle" /></a> &nbsp; <a href="http://architectnow.net/"><img src="https://nestjs.com/img/architectnow.png" height="24" valign="middle" /></a> &nbsp; <a href="https://quander.io/"><img src="https://nestjs.com/img/quander.png" height="28" valign="middle" /></a> &nbsp; <a href="https://mantro.net/"><img src="https://nestjs.com/img/mantro-logo.svg" height="20" valign="middle" /></a> &nbsp;
<a href="https://scal.io" target="_blank"><img src="https://nestjs.com/img/scalio-logo.svg" width="110" 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/"><img src="https://nestjs.com/img/triplebyte.png" height="30" valign="middle" /></a>
<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>
## Backers
<a href="https://opencollective.com/nest"><img src="https://opencollective.com/nest/backers.svg?width=890"></a>
<a href="https://opencollective.com/nest" target="_blank"><img src="https://opencollective.com/nest/backers.svg?width=890"></a>
## Stay in touch

View File

@@ -12,7 +12,12 @@ export class FastifyAdapter extends AbstractHttpAdapter {
constructor(
instanceOrOptions:
| fastify.FastifyInstance<any, any, any>
| fastify.ServerOptions = fastify(),
| fastify.ServerOptions
| fastify.ServerOptionsAsHttp
| fastify.ServerOptionsAsHttp2
| fastify.ServerOptionsAsSecure
| fastify.ServerOptionsAsSecureHttp
| fastify.ServerOptionsAsSecureHttp2 = fastify(),
) {
const instance =
instanceOrOptions &&
@@ -25,12 +30,19 @@ export class FastifyAdapter extends AbstractHttpAdapter {
public listen(port: string | number, callback?: () => void);
public listen(port: string | number, hostname: string, callback?: () => void);
public listen(port: any, hostname?: any, callback?: any) {
return this.instance.listen(port, hostname, callback);
public listen(port: any, ...args: any[]) {
return this.instance.listen(port, ...args);
}
public reply(response: any, body: any, statusCode: number) {
return response.code(statusCode).send(body);
public reply(response: any, body: any, statusCode?: number) {
if (statusCode) {
response.status(statusCode);
}
return response.send(body);
}
public status(response: any, statusCode: number) {
return response.code(statusCode);
}
public render(response: any, view: string, options: any) {
@@ -104,7 +116,7 @@ export class FastifyAdapter extends AbstractHttpAdapter {
}
public enableCors(options: CorsOptions) {
this.register(cors, { options });
this.register(cors, options);
}
public registerParserMiddleware() {

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/platform-fastify",
"version": "6.0.2",
"version": "6.0.5",
"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.1.0",
"fastify": "2.2.0",
"fastify-cors": "2.1.2",
"fastify-formbody": "3.1.0",
"path-to-regexp": "3.0.0"

View File

@@ -7,29 +7,29 @@
[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, heavily inspired by <a href="https://angular.io" target="blank">Angular</a>.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
<a href="https://travis-ci.org/nestjs/nest"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
<a href="https://travis-ci.org/nestjs/nest"><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"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#8" alt="Coverage" /></a>
<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a>
<a href="https://discord.gg/G7Qnnhy"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
<a href="https://paypal.me/kamilmysliwiec"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://twitter.com/nestframework"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
<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>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
<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#8" 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>
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
</p>
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
## Description
<p>Nest is a framework for building efficient, scalable <a href="http://nodejs.org" target="_blank">Node.js</a> server-side applications. It uses modern JavaScript, is built with <a href="http://www.typescriptlang.org" target="_blank">TypeScript</a> (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).</p>
Nest is a framework for building efficient, scalable <a href="http://nodejs.org" target="_blank">Node.js</a> server-side applications. It uses modern JavaScript, is built with <a href="http://www.typescriptlang.org" target="_blank">TypeScript</a> (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).
<p>Under the hood, Nest makes use of <a href="https://expressjs.com/" target="_blank">Express</a>, but also, provides compatibility with a wide range of other libraries, like e.g. <a href="https://github.com/fastify/fastify" target="blank">Fastify</a>, allowing for easy use of the myriad third-party plugins which are available.</p>
<p>Under the hood, Nest makes use of <a href="https://expressjs.com/" target="_blank">Express</a>, but also, provides compatibility with a wide range of other libraries, like e.g. <a href="https://github.com/fastify/fastify" target="_blank">Fastify</a>, allowing for easy use of the myriad third-party plugins which are available.</p>
## Philosophy
@@ -41,35 +41,42 @@
* To check out the [guide](https://docs.nestjs.com), visit [docs.nestjs.com](https://docs.nestjs.com). :books:
* 要查看中文 [指南](readme_zh.md), 请访问 [docs.nestjs.cn](https://docs.nestjs.cn). :books:
## Consulting
With official support, you can get expert help straight from Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://docs.nestjs.com/enterprise).
## Support
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
#### Principal Sponsor
<a href="https://valor-software.com/"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="320" /></a>
<a href="https://valor-software.com/" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="320" /></a>
#### Base Sponsor
<a href="https://blueanchor.io/"><img src="https://nestjs.com/img/blueanchor.png" width="300" /></a> &nbsp;
<a href="https://www.novologic.com/"><img src="https://nestjs.com/img/novologic.png" width="200" /></a>
<a href="https://blueanchor.io/" target="_blank"><img src="https://nestjs.com/img/blueanchor.png" width="300" /></a> &nbsp;
<a href="https://www.novologic.com/" target="_blank"><img src="https://nestjs.com/img/novologic.png" width="200" /></a>
#### Silver Sponsors
<a href="https://neoteric.eu/"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> &nbsp;
<a href="http://gojob.com"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" height="95" /></a> &nbsp; <a href="https://www.swingdev.io"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="150" valign="middle" /> </a> &nbsp; &nbsp;
<a href="https://yakaz.com/"><img src="https://nestjs.com/img/yakaz.png" width="100" valign="middle" /></a>
<a href="http://xtremis.com/"><img src="https://nestjs.com/img/logo-xtremis.svg" width="150" valign="middle" /></a>
<a href="https://neoteric.eu/" target="_blank"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> &nbsp;
<a href="http://gojob.com" target="_blank"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" height="95" /></a> &nbsp; <a href="https://www.swingdev.io" target="_blank"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="150" valign="middle" /> </a> &nbsp; &nbsp;
<a href="https://yakaz.com/" target="_blank"><img src="https://nestjs.com/img/yakaz.png" width="100" valign="middle" /></a> &nbsp;
<a href="https://trilon.io" target="_blank"><img src="https://nestjs.com/img/trilon.svg" width="150" valign="middle" /></a>
<a href="http://xtremis.com/" target="_blank"><img src="https://nestjs.com/img/logo-xtremis.svg" width="150" valign="middle" /></a>
#### Sponsors
<a href="https://scal.io"><img src="https://nestjs.com/img/scalio-logo.svg" width="110" valign="middle" /></a> &nbsp; <a href="http://angularity.io"><img src="http://angularity.io/media/logo.svg" height="30" 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"><img src="https://nestjs.com/img/hostpresto.png" height="30" valign="middle" /></a> &nbsp; <a href="https://genuinebee.com/"><img src="https://nestjs.com/img/genuinebee.svg" height="38" valign="middle" /></a> &nbsp; <a href="http://architectnow.net/"><img src="https://nestjs.com/img/architectnow.png" height="24" valign="middle" /></a> &nbsp; <a href="https://quander.io/"><img src="https://nestjs.com/img/quander.png" height="28" valign="middle" /></a> &nbsp; <a href="https://mantro.net/"><img src="https://nestjs.com/img/mantro-logo.svg" height="20" valign="middle" /></a> &nbsp;
<a href="https://scal.io" target="_blank"><img src="https://nestjs.com/img/scalio-logo.svg" width="110" 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/"><img src="https://nestjs.com/img/triplebyte.png" height="30" valign="middle" /></a>
<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>
## Backers
<a href="https://opencollective.com/nest"><img src="https://opencollective.com/nest/backers.svg?width=890"></a>
<a href="https://opencollective.com/nest" target="_blank"><img src="https://opencollective.com/nest/backers.svg?width=890"></a>
## Stay in touch

View File

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

View File

@@ -7,29 +7,29 @@
[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, heavily inspired by <a href="https://angular.io" target="blank">Angular</a>.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
<a href="https://travis-ci.org/nestjs/nest"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
<a href="https://travis-ci.org/nestjs/nest"><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"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#8" alt="Coverage" /></a>
<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a>
<a href="https://discord.gg/G7Qnnhy"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
<a href="https://paypal.me/kamilmysliwiec"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://twitter.com/nestframework"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
<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>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
<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#8" 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>
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
</p>
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
## Description
<p>Nest is a framework for building efficient, scalable <a href="http://nodejs.org" target="_blank">Node.js</a> server-side applications. It uses modern JavaScript, is built with <a href="http://www.typescriptlang.org" target="_blank">TypeScript</a> (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).</p>
Nest is a framework for building efficient, scalable <a href="http://nodejs.org" target="_blank">Node.js</a> server-side applications. It uses modern JavaScript, is built with <a href="http://www.typescriptlang.org" target="_blank">TypeScript</a> (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).
<p>Under the hood, Nest makes use of <a href="https://expressjs.com/" target="_blank">Express</a>, but also, provides compatibility with a wide range of other libraries, like e.g. <a href="https://github.com/fastify/fastify" target="blank">Fastify</a>, allowing for easy use of the myriad third-party plugins which are available.</p>
<p>Under the hood, Nest makes use of <a href="https://expressjs.com/" target="_blank">Express</a>, but also, provides compatibility with a wide range of other libraries, like e.g. <a href="https://github.com/fastify/fastify" target="_blank">Fastify</a>, allowing for easy use of the myriad third-party plugins which are available.</p>
## Philosophy
@@ -41,35 +41,42 @@
* To check out the [guide](https://docs.nestjs.com), visit [docs.nestjs.com](https://docs.nestjs.com). :books:
* 要查看中文 [指南](readme_zh.md), 请访问 [docs.nestjs.cn](https://docs.nestjs.cn). :books:
## Consulting
With official support, you can get expert help straight from Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://docs.nestjs.com/enterprise).
## Support
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
#### Principal Sponsor
<a href="https://valor-software.com/"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="320" /></a>
<a href="https://valor-software.com/" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="320" /></a>
#### Base Sponsor
<a href="https://blueanchor.io/"><img src="https://nestjs.com/img/blueanchor.png" width="300" /></a> &nbsp;
<a href="https://www.novologic.com/"><img src="https://nestjs.com/img/novologic.png" width="200" /></a>
<a href="https://blueanchor.io/" target="_blank"><img src="https://nestjs.com/img/blueanchor.png" width="300" /></a> &nbsp;
<a href="https://www.novologic.com/" target="_blank"><img src="https://nestjs.com/img/novologic.png" width="200" /></a>
#### Silver Sponsors
<a href="https://neoteric.eu/"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> &nbsp;
<a href="http://gojob.com"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" height="95" /></a> &nbsp; <a href="https://www.swingdev.io"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="150" valign="middle" /> </a> &nbsp; &nbsp;
<a href="https://yakaz.com/"><img src="https://nestjs.com/img/yakaz.png" width="100" valign="middle" /></a>
<a href="http://xtremis.com/"><img src="https://nestjs.com/img/logo-xtremis.svg" width="150" valign="middle" /></a>
<a href="https://neoteric.eu/" target="_blank"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> &nbsp;
<a href="http://gojob.com" target="_blank"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" height="95" /></a> &nbsp; <a href="https://www.swingdev.io" target="_blank"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="150" valign="middle" /> </a> &nbsp; &nbsp;
<a href="https://yakaz.com/" target="_blank"><img src="https://nestjs.com/img/yakaz.png" width="100" valign="middle" /></a> &nbsp;
<a href="https://trilon.io" target="_blank"><img src="https://nestjs.com/img/trilon.svg" width="150" valign="middle" /></a>
<a href="http://xtremis.com/" target="_blank"><img src="https://nestjs.com/img/logo-xtremis.svg" width="150" valign="middle" /></a>
#### Sponsors
<a href="https://scal.io"><img src="https://nestjs.com/img/scalio-logo.svg" width="110" valign="middle" /></a> &nbsp; <a href="http://angularity.io"><img src="http://angularity.io/media/logo.svg" height="30" 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"><img src="https://nestjs.com/img/hostpresto.png" height="30" valign="middle" /></a> &nbsp; <a href="https://genuinebee.com/"><img src="https://nestjs.com/img/genuinebee.svg" height="38" valign="middle" /></a> &nbsp; <a href="http://architectnow.net/"><img src="https://nestjs.com/img/architectnow.png" height="24" valign="middle" /></a> &nbsp; <a href="https://quander.io/"><img src="https://nestjs.com/img/quander.png" height="28" valign="middle" /></a> &nbsp; <a href="https://mantro.net/"><img src="https://nestjs.com/img/mantro-logo.svg" height="20" valign="middle" /></a> &nbsp;
<a href="https://scal.io" target="_blank"><img src="https://nestjs.com/img/scalio-logo.svg" width="110" 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/"><img src="https://nestjs.com/img/triplebyte.png" height="30" valign="middle" /></a>
<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>
## Backers
<a href="https://opencollective.com/nest"><img src="https://opencollective.com/nest/backers.svg?width=890"></a>
<a href="https://opencollective.com/nest" target="_blank"><img src="https://opencollective.com/nest/backers.svg?width=890"></a>
## Stay in touch

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/platform-ws",
"version": "6.0.2",
"version": "6.0.5",
"description": "Nest - modern, fast, powerful node.js web framework (@platform-ws)",
"author": "Kamil Mysliwiec",
"license": "MIT",
@@ -12,7 +12,7 @@
"access": "public"
},
"dependencies": {
"ws": "6.2.0"
"ws": "6.2.1"
},
"peerDependencies": {
"@nestjs/common": "^6.0.0",

View File

@@ -1,6 +1,6 @@
(The MIT License)
Copyright (c) 2017 Kamil Myśliwiec <http://kamilmysliwiec.com>
Copyright (c) 2017-2019 Kamil Myśliwiec <http://kamilmysliwiec.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

View File

@@ -7,29 +7,29 @@
[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, heavily inspired by <a href="https://angular.io" target="blank">Angular</a>.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
<a href="https://travis-ci.org/nestjs/nest"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
<a href="https://travis-ci.org/nestjs/nest"><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"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#8" alt="Coverage" /></a>
<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a>
<a href="https://discord.gg/G7Qnnhy"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
<a href="https://paypal.me/kamilmysliwiec"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://twitter.com/nestframework"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
<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>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
<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#8" 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>
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
</p>
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
## Description
<p>Nest is a framework for building efficient, scalable <a href="http://nodejs.org" target="_blank">Node.js</a> server-side applications. It uses modern JavaScript, is built with <a href="http://www.typescriptlang.org" target="_blank">TypeScript</a> (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).</p>
Nest is a framework for building efficient, scalable <a href="http://nodejs.org" target="_blank">Node.js</a> server-side applications. It uses modern JavaScript, is built with <a href="http://www.typescriptlang.org" target="_blank">TypeScript</a> (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).
<p>Under the hood, Nest makes use of <a href="https://expressjs.com/" target="_blank">Express</a>, but also, provides compatibility with a wide range of other libraries, like e.g. <a href="https://github.com/fastify/fastify" target="blank">Fastify</a>, allowing for easy use of the myriad third-party plugins which are available.</p>
<p>Under the hood, Nest makes use of <a href="https://expressjs.com/" target="_blank">Express</a>, but also, provides compatibility with a wide range of other libraries, like e.g. <a href="https://github.com/fastify/fastify" target="_blank">Fastify</a>, allowing for easy use of the myriad third-party plugins which are available.</p>
## Philosophy
@@ -41,35 +41,42 @@
* To check out the [guide](https://docs.nestjs.com), visit [docs.nestjs.com](https://docs.nestjs.com). :books:
* 要查看中文 [指南](readme_zh.md), 请访问 [docs.nestjs.cn](https://docs.nestjs.cn). :books:
## Consulting
With official support, you can get expert help straight from Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://docs.nestjs.com/enterprise).
## Support
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
#### Principal Sponsor
<a href="https://valor-software.com/"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="320" /></a>
<a href="https://valor-software.com/" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="320" /></a>
#### Base Sponsor
<a href="https://blueanchor.io/"><img src="https://nestjs.com/img/blueanchor.png" width="300" /></a> &nbsp;
<a href="https://www.novologic.com/"><img src="https://nestjs.com/img/novologic.png" width="200" /></a>
<a href="https://blueanchor.io/" target="_blank"><img src="https://nestjs.com/img/blueanchor.png" width="300" /></a> &nbsp;
<a href="https://www.novologic.com/" target="_blank"><img src="https://nestjs.com/img/novologic.png" width="200" /></a>
#### Silver Sponsors
<a href="https://neoteric.eu/"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> &nbsp;
<a href="http://gojob.com"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" height="95" /></a> &nbsp; <a href="https://www.swingdev.io"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="150" valign="middle" /> </a> &nbsp; &nbsp;
<a href="https://yakaz.com/"><img src="https://nestjs.com/img/yakaz.png" width="100" valign="middle" /></a>
<a href="http://xtremis.com/"><img src="https://nestjs.com/img/logo-xtremis.svg" width="150" valign="middle" /></a>
<a href="https://neoteric.eu/" target="_blank"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> &nbsp;
<a href="http://gojob.com" target="_blank"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" height="95" /></a> &nbsp; <a href="https://www.swingdev.io" target="_blank"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="150" valign="middle" /> </a> &nbsp; &nbsp;
<a href="https://yakaz.com/" target="_blank"><img src="https://nestjs.com/img/yakaz.png" width="100" valign="middle" /></a> &nbsp;
<a href="https://trilon.io" target="_blank"><img src="https://nestjs.com/img/trilon.svg" width="150" valign="middle" /></a>
<a href="http://xtremis.com/" target="_blank"><img src="https://nestjs.com/img/logo-xtremis.svg" width="150" valign="middle" /></a>
#### Sponsors
<a href="https://scal.io"><img src="https://nestjs.com/img/scalio-logo.svg" width="110" valign="middle" /></a> &nbsp; <a href="http://angularity.io"><img src="http://angularity.io/media/logo.svg" height="30" 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"><img src="https://nestjs.com/img/hostpresto.png" height="30" valign="middle" /></a> &nbsp; <a href="https://genuinebee.com/"><img src="https://nestjs.com/img/genuinebee.svg" height="38" valign="middle" /></a> &nbsp; <a href="http://architectnow.net/"><img src="https://nestjs.com/img/architectnow.png" height="24" valign="middle" /></a> &nbsp; <a href="https://quander.io/"><img src="https://nestjs.com/img/quander.png" height="28" valign="middle" /></a> &nbsp; <a href="https://mantro.net/"><img src="https://nestjs.com/img/mantro-logo.svg" height="20" valign="middle" /></a> &nbsp;
<a href="https://scal.io" target="_blank"><img src="https://nestjs.com/img/scalio-logo.svg" width="110" 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/"><img src="https://nestjs.com/img/triplebyte.png" height="30" valign="middle" /></a>
<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>
## Backers
<a href="https://opencollective.com/nest"><img src="https://opencollective.com/nest/backers.svg?width=890"></a>
<a href="https://opencollective.com/nest" target="_blank"><img src="https://opencollective.com/nest/backers.svg?width=890"></a>
## Stay in touch

View File

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

View File

@@ -1,6 +1,6 @@
(The MIT License)
Copyright (c) 2017 Kamil Myśliwiec <http://kamilmysliwiec.com>
Copyright (c) 2017-2019 Kamil Myśliwiec <http://kamilmysliwiec.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

View File

@@ -7,29 +7,29 @@
[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, heavily inspired by <a href="https://angular.io" target="blank">Angular</a>.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
<a href="https://travis-ci.org/nestjs/nest"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
<a href="https://travis-ci.org/nestjs/nest"><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"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#8" alt="Coverage" /></a>
<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a>
<a href="https://discord.gg/G7Qnnhy"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
<a href="https://paypal.me/kamilmysliwiec"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://twitter.com/nestframework"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
<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>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
<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#8" 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>
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
</p>
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
## Description
<p>Nest is a framework for building efficient, scalable <a href="http://nodejs.org" target="_blank">Node.js</a> server-side applications. It uses modern JavaScript, is built with <a href="http://www.typescriptlang.org" target="_blank">TypeScript</a> (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).</p>
Nest is a framework for building efficient, scalable <a href="http://nodejs.org" target="_blank">Node.js</a> server-side applications. It uses modern JavaScript, is built with <a href="http://www.typescriptlang.org" target="_blank">TypeScript</a> (preserves compatibility with pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).
<p>Under the hood, Nest makes use of <a href="https://expressjs.com/" target="_blank">Express</a>, but also, provides compatibility with a wide range of other libraries, like e.g. <a href="https://github.com/fastify/fastify" target="blank">Fastify</a>, allowing for easy use of the myriad third-party plugins which are available.</p>
<p>Under the hood, Nest makes use of <a href="https://expressjs.com/" target="_blank">Express</a>, but also, provides compatibility with a wide range of other libraries, like e.g. <a href="https://github.com/fastify/fastify" target="_blank">Fastify</a>, allowing for easy use of the myriad third-party plugins which are available.</p>
## Philosophy
@@ -41,35 +41,42 @@
* To check out the [guide](https://docs.nestjs.com), visit [docs.nestjs.com](https://docs.nestjs.com). :books:
* 要查看中文 [指南](readme_zh.md), 请访问 [docs.nestjs.cn](https://docs.nestjs.cn). :books:
## Consulting
With official support, you can get expert help straight from Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://docs.nestjs.com/enterprise).
## Support
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
#### Principal Sponsor
<a href="https://valor-software.com/"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="320" /></a>
<a href="https://valor-software.com/" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="320" /></a>
#### Base Sponsor
<a href="https://blueanchor.io/"><img src="https://nestjs.com/img/blueanchor.png" width="300" /></a> &nbsp;
<a href="https://www.novologic.com/"><img src="https://nestjs.com/img/novologic.png" width="200" /></a>
<a href="https://blueanchor.io/" target="_blank"><img src="https://nestjs.com/img/blueanchor.png" width="300" /></a> &nbsp;
<a href="https://www.novologic.com/" target="_blank"><img src="https://nestjs.com/img/novologic.png" width="200" /></a>
#### Silver Sponsors
<a href="https://neoteric.eu/"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> &nbsp;
<a href="http://gojob.com"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" height="95" /></a> &nbsp; <a href="https://www.swingdev.io"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="150" valign="middle" /> </a> &nbsp; &nbsp;
<a href="https://yakaz.com/"><img src="https://nestjs.com/img/yakaz.png" width="100" valign="middle" /></a>
<a href="http://xtremis.com/"><img src="https://nestjs.com/img/logo-xtremis.svg" width="150" valign="middle" /></a>
<a href="https://neoteric.eu/" target="_blank"><img src="https://nestjs.com/img/neoteric-cut.png" width="120" valign="middle" /></a> &nbsp;
<a href="http://gojob.com" target="_blank"><img src="http://nestjs.com/img/gojob-logo.png" valign="middle" height="95" /></a> &nbsp; <a href="https://www.swingdev.io" target="_blank"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="150" valign="middle" /> </a> &nbsp; &nbsp;
<a href="https://yakaz.com/" target="_blank"><img src="https://nestjs.com/img/yakaz.png" width="100" valign="middle" /></a> &nbsp;
<a href="https://trilon.io" target="_blank"><img src="https://nestjs.com/img/trilon.svg" width="150" valign="middle" /></a>
<a href="http://xtremis.com/" target="_blank"><img src="https://nestjs.com/img/logo-xtremis.svg" width="150" valign="middle" /></a>
#### Sponsors
<a href="https://scal.io"><img src="https://nestjs.com/img/scalio-logo.svg" width="110" valign="middle" /></a> &nbsp; <a href="http://angularity.io"><img src="http://angularity.io/media/logo.svg" height="30" 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"><img src="https://nestjs.com/img/hostpresto.png" height="30" valign="middle" /></a> &nbsp; <a href="https://genuinebee.com/"><img src="https://nestjs.com/img/genuinebee.svg" height="38" valign="middle" /></a> &nbsp; <a href="http://architectnow.net/"><img src="https://nestjs.com/img/architectnow.png" height="24" valign="middle" /></a> &nbsp; <a href="https://quander.io/"><img src="https://nestjs.com/img/quander.png" height="28" valign="middle" /></a> &nbsp; <a href="https://mantro.net/"><img src="https://nestjs.com/img/mantro-logo.svg" height="20" valign="middle" /></a> &nbsp;
<a href="https://scal.io" target="_blank"><img src="https://nestjs.com/img/scalio-logo.svg" width="110" 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/"><img src="https://nestjs.com/img/triplebyte.png" height="30" valign="middle" /></a>
<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>
## Backers
<a href="https://opencollective.com/nest"><img src="https://opencollective.com/nest/backers.svg?width=890"></a>
<a href="https://opencollective.com/nest" target="_blank"><img src="https://opencollective.com/nest/backers.svg?width=890"></a>
## Stay in touch

View File

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

View File

@@ -6,7 +6,7 @@
"json"
],
"transform": {
"^.+\\.tsx?$": "<rootDir>/../node_modules/ts-jest/preprocessor.js"
"^.+\\.tsx?$": "ts-jest"
},
"testRegex": "/e2e/.*\\.(e2e-test|e2e-spec).(ts|tsx|js)$",
"collectCoverageFrom" : ["src/**/*.{js,jsx,tsx,ts}", "!**/node_modules/**", "!**/vendor/**"],

View File

@@ -6,7 +6,7 @@
"json"
],
"transform": {
"^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest/preprocessor.js"
"^.+\\.tsx?$": "ts-jest"
},
"testRegex": "/src/.*\\.(test|spec).(ts|tsx|js)$",
"collectCoverageFrom" : ["src/**/*.{js,jsx,tsx,ts}", "!**/node_modules/**", "!**/vendor/**"],

6010
sample/01-cats-app/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -15,24 +15,24 @@
"e2e:watch": "jest --watch --config=e2e/jest-e2e.json"
},
"dependencies": {
"@nestjs/common": "6.0.1",
"@nestjs/core": "6.0.1",
"@nestjs/platform-express": "6.0.1",
"@nestjs/testing": "6.0.1",
"@nestjs/websockets": "6.0.1",
"@nestjs/common": "6.0.5",
"@nestjs/core": "6.0.5",
"@nestjs/platform-express": "6.0.5",
"@nestjs/testing": "6.0.5",
"@nestjs/websockets": "6.0.5",
"class-transformer": "0.2.0",
"class-validator": "0.9.1",
"reflect-metadata": "0.1.13",
"rxjs": "6.4.0",
"typescript": "3.3.4000"
"typescript": "3.4.2"
},
"devDependencies": {
"@types/jest": "24.0.11",
"@types/node": "10.14.1",
"jest": "24.5.0",
"@types/node": "10.14.4",
"jest": "24.7.1",
"supertest": "4.0.2",
"ts-jest": "24.0.0",
"ts-jest": "24.0.2",
"ts-node": "8.0.3",
"tslint": "5.14.0"
"tslint": "5.15.0"
}
}

View File

@@ -1,6 +1,7 @@
import { Test } from '@nestjs/testing';
import { CatsController } from './cats.controller';
import { CatsService } from './cats.service';
import { Cat } from './interfaces/cat.interface';
describe('CatsController', () => {
let catsController: CatsController;
@@ -18,7 +19,13 @@ describe('CatsController', () => {
describe('findAll', () => {
it('should return an array of cats', async () => {
const result = ['test'];
const result: Cat[] = [
{
age: 2,
breed: 'Bombay',
name: 'Pixel',
},
];
jest.spyOn(catsService, 'findAll').mockImplementation(() => result);
expect(await catsController.findAll()).toBe(result);

View File

@@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@nestjs/common": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.1.tgz",
"integrity": "sha512-+43nUxG9YSF2SnnFFT91/yTbvyfrGWI3a3cTI8jlSQUXOeKQILQhOXlA3N2GgDwYYH8GX8Xy8FXZ4GopJ7lT6A==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.5.tgz",
"integrity": "sha512-CbXtgBW/irevfUZF+rURDLFjhmT0Q6dmzbEYkuMg8bSjPmvgG6VzOBG6PwoPZbd+8PrPc2XLjN2A2Hg9mImp7A==",
"requires": {
"axios": "0.18.0",
"cli-color": "1.4.0",
@@ -15,9 +15,9 @@
}
},
"@nestjs/core": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.1.tgz",
"integrity": "sha512-1TbB19AE6opDPLoALaJO/ZZHCofKi8pJDJNInlPjRBIeP+Vfrh6LyCl7xw/RjXkrfZZIrMy+SVp0+qxlAZ7HnQ==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.5.tgz",
"integrity": "sha512-diLLr9qb9vGKyvfkt8JFGox21rpgj4YiToCRb3Tbdab0bvssLopznh/f7cdEBNmk5Adtl3IvXjtdVRj+XH7VCw==",
"requires": {
"@nuxtjs/opencollective": "0.2.1",
"fast-safe-stringify": "2.0.6",
@@ -28,132 +28,36 @@
}
},
"@nestjs/platform-express": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-6.0.1.tgz",
"integrity": "sha512-KFxK4t2eL0fZ3NpzTEJeWmiDkGwCAfPACadNCmjNGeXrkxK1Z2VJvfJeA2DDmYCNH3Ps8Ro25LO+a0oVYgdqoQ==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-6.0.5.tgz",
"integrity": "sha512-N3P0IcEN/tQlA4DkFmbKQSyCkwAG00uKDQ0ntkE+3FzMOunlI49+qKFCCUc0xlselTgJtVcZRg5eNot3vA1P/Q==",
"requires": {
"body-parser": "1.18.3",
"cors": "2.8.5",
"express": "4.16.4",
"multer": "1.4.1"
},
"dependencies": {
"append-field": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz",
"integrity": "sha1-HjRA6RXwsSA9I3SOeO3XubW0PlY="
},
"cors": {
"version": "2.8.5",
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
"requires": {
"object-assign": "^4",
"vary": "^1"
}
},
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"requires": {
"ms": "2.0.0"
}
},
"express": {
"version": "4.16.4",
"resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz",
"integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==",
"requires": {
"accepts": "~1.3.5",
"array-flatten": "1.1.1",
"body-parser": "1.18.3",
"content-disposition": "0.5.2",
"content-type": "~1.0.4",
"cookie": "0.3.1",
"cookie-signature": "1.0.6",
"debug": "2.6.9",
"depd": "~1.1.2",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
"finalhandler": "1.1.1",
"fresh": "0.5.2",
"merge-descriptors": "1.0.1",
"methods": "~1.1.2",
"on-finished": "~2.3.0",
"parseurl": "~1.3.2",
"path-to-regexp": "0.1.7",
"proxy-addr": "~2.0.4",
"qs": "6.5.2",
"range-parser": "~1.2.0",
"safe-buffer": "5.1.2",
"send": "0.16.2",
"serve-static": "1.13.2",
"setprototypeof": "1.1.0",
"statuses": "~1.4.0",
"type-is": "~1.6.16",
"utils-merge": "1.0.1",
"vary": "~1.1.2"
}
},
"multer": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/multer/-/multer-1.4.1.tgz",
"integrity": "sha512-zzOLNRxzszwd+61JFuAo0fxdQfvku12aNJgnla0AQ+hHxFmfc/B7jBVuPr5Rmvu46Jze/iJrFpSOsD7afO8SDw==",
"requires": {
"append-field": "^1.0.0",
"busboy": "^0.2.11",
"concat-stream": "^1.5.2",
"mkdirp": "^0.5.1",
"object-assign": "^4.1.1",
"on-finished": "^2.3.0",
"type-is": "^1.6.4",
"xtend": "^4.0.0"
}
},
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"path-to-regexp": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
"integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"statuses": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
"integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew=="
}
}
},
"@nestjs/platform-socket.io": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/platform-socket.io/-/platform-socket.io-6.0.1.tgz",
"integrity": "sha512-dKwl6/4/t7WvADn7lIovZY+yq82iQ7XkFTNmVgtSwG+R+doEco+h5s2hLYCzG7DPQCs4GZgBk0SfV1gIv7ptrw==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/platform-socket.io/-/platform-socket.io-6.0.5.tgz",
"integrity": "sha512-ymm6IIlsNbH8lq9jD3zxWE2/rCOiOiFRoepqw3wHIyYAKyyPWlP55b4KxJU04V57B1YZXY04MgvKYy72QQy33Q==",
"requires": {
"socket.io": "2.2.0"
}
},
"@nestjs/testing": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.0.1.tgz",
"integrity": "sha512-+sB913Rrxwa6p7YZhExQEV7NiF/Qly6a9FlVlpoWkZnI0ktIzjbdZqo910JFYSawBdeplfHjWtt2Z6LSX6Mfng==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.0.5.tgz",
"integrity": "sha512-LrPBckONn/ZalBC8GU5LxvgIS8DJNrdwZE4gMJz0ugodwl0c1IL3e2gIukBkUJtHYPtzN12nYevnaGYT/V1aDQ==",
"requires": {
"optional": "0.1.4"
}
},
"@nestjs/websockets": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.0.1.tgz",
"integrity": "sha512-ILSHGyRIgn0qURxmW1DIabFRtFjAIMZY/+rVeJpI2VyoIZgmX/bqqWSesPdQcebcEPDz1pqFNSuL3UgVbhcuNQ==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.0.5.tgz",
"integrity": "sha512-cA4Z6dM/Q8WqzgDyC6HiCdFvcDVAv7TyGkzthuuCn9xHDeLjtyzCL1koogkZ0FmLWhNmCskc/yJb2IjApGtzvQ==",
"requires": {
"iterare": "1.1.2"
}
@@ -226,6 +130,11 @@
"color-convert": "1.9.1"
}
},
"append-field": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz",
"integrity": "sha1-HjRA6RXwsSA9I3SOeO3XubW0PlY="
},
"arg": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz",
@@ -361,6 +270,11 @@
"requires": {
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
@@ -522,9 +436,9 @@
}
},
"consola": {
"version": "2.5.6",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.6.tgz",
"integrity": "sha512-DN0j6ewiNWkT09G3ZoyyzN3pSYrjxWcx49+mHu+oDI5dvW5vzmyuzYsqGS79+yQserH9ymJQbGzeqUejfssr8w=="
"version": "2.5.8",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.8.tgz",
"integrity": "sha512-fYv1M0rNJw4h0CZUx8PX02Px7xQhA+vNHpV8DBCGMoozp2Io/vrSXhhEothaRnSt7VMR0rj2pt9KKLXa5amrCw=="
},
"content-disposition": {
"version": "0.5.2",
@@ -551,6 +465,15 @@
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"cors": {
"version": "2.8.5",
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
"requires": {
"object-assign": "^4",
"vary": "^1"
}
},
"d": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
@@ -560,11 +483,11 @@
}
},
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "2.0.0"
"ms": "^2.1.1"
}
},
"depd": {
@@ -615,13 +538,18 @@
"ws": "~6.1.0"
},
"dependencies": {
"ws": {
"version": "6.1.3",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.1.3.tgz",
"integrity": "sha512-tbSxiT+qJI223AP4iLfQbkbxkwdFcneYinM2+x46Gx2wgvbaOMO36czfdfVUBRTHvzAMRhDd98sA5d/BuWbQdg==",
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"async-limiter": "~1.0.0"
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
@@ -643,13 +571,18 @@
"yeast": "0.1.2"
},
"dependencies": {
"ws": {
"version": "6.1.3",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.1.3.tgz",
"integrity": "sha512-tbSxiT+qJI223AP4iLfQbkbxkwdFcneYinM2+x46Gx2wgvbaOMO36czfdfVUBRTHvzAMRhDd98sA5d/BuWbQdg==",
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"async-limiter": "~1.0.0"
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
@@ -741,6 +674,63 @@
"es5-ext": "~0.10.14"
}
},
"express": {
"version": "4.16.4",
"resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz",
"integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==",
"requires": {
"accepts": "~1.3.5",
"array-flatten": "1.1.1",
"body-parser": "1.18.3",
"content-disposition": "0.5.2",
"content-type": "~1.0.4",
"cookie": "0.3.1",
"cookie-signature": "1.0.6",
"debug": "2.6.9",
"depd": "~1.1.2",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
"finalhandler": "1.1.1",
"fresh": "0.5.2",
"merge-descriptors": "1.0.1",
"methods": "~1.1.2",
"on-finished": "~2.3.0",
"parseurl": "~1.3.2",
"path-to-regexp": "0.1.7",
"proxy-addr": "~2.0.4",
"qs": "6.5.2",
"range-parser": "~1.2.0",
"safe-buffer": "5.1.2",
"send": "0.16.2",
"serve-static": "1.13.2",
"setprototypeof": "1.1.0",
"statuses": "~1.4.0",
"type-is": "~1.6.16",
"utils-merge": "1.0.1",
"vary": "~1.1.2"
},
"dependencies": {
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"requires": {
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"statuses": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
"integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew=="
}
}
},
"fast-safe-stringify": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz",
@@ -768,6 +758,11 @@
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"statuses": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
@@ -781,21 +776,6 @@
"integrity": "sha512-m/pZQy4Gj287eNy94nivy5wchN3Kp+Q5WgUPNy5lJSZ3sgkVKSYV/ZChMAQVIgx1SqfZ2zBZtPA2YlXIWxxJOQ==",
"requires": {
"debug": "^3.2.6"
},
"dependencies": {
"debug": {
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "^2.1.1"
}
},
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
}
}
},
"forwarded": {
@@ -938,9 +918,9 @@
"dev": true
},
"js-yaml": {
"version": "3.12.2",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.2.tgz",
"integrity": "sha512-QHn/Lh/7HhZ/Twc7vJYQTkjuCa0kaCcDcjK5Zlk2rvnUpy7DxMJ23+Jc2dcyvltwQVg1nygAVlB2oRDFHoRS5Q==",
"version": "3.13.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz",
"integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==",
"dev": true,
"requires": {
"argparse": "^1.0.7",
@@ -997,16 +977,16 @@
"integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ=="
},
"mime-db": {
"version": "1.37.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz",
"integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg=="
"version": "1.38.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz",
"integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg=="
},
"mime-types": {
"version": "2.1.21",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz",
"integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==",
"version": "2.1.22",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz",
"integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==",
"requires": {
"mime-db": "~1.37.0"
"mime-db": "~1.38.0"
}
},
"minimatch": {
@@ -1034,9 +1014,24 @@
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"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==",
"requires": {
"append-field": "^1.0.0",
"busboy": "^0.2.11",
"concat-stream": "^1.5.2",
"mkdirp": "^0.5.1",
"object-assign": "^4.1.1",
"on-finished": "^2.3.0",
"type-is": "^1.6.4",
"xtend": "^4.0.0"
}
},
"negotiator": {
"version": "0.6.1",
@@ -1053,6 +1048,11 @@
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.3.0.tgz",
"integrity": "sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA=="
},
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"object-component": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz",
@@ -1118,6 +1118,11 @@
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
"dev": true
},
"path-to-regexp": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
"integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
},
"process-nextick-args": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
@@ -1187,9 +1192,9 @@
}
},
"safe-buffer": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg=="
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"safer-buffer": {
"version": "2.1.2",
@@ -1197,9 +1202,9 @@
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"semver": {
"version": "5.6.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
"integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==",
"version": "5.7.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
"integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
"dev": true
},
"send": {
@@ -1230,6 +1235,11 @@
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"statuses": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
@@ -1273,11 +1283,6 @@
"requires": {
"ms": "^2.1.1"
}
},
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
}
}
},
@@ -1305,6 +1310,21 @@
"parseuri": "0.0.5",
"socket.io-parser": "~3.3.0",
"to-array": "0.1.4"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
"socket.io-parser": {
@@ -1317,10 +1337,23 @@
"isarray": "2.0.1"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"isarray": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
"integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4="
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
@@ -1411,9 +1444,9 @@
"integrity": "sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ=="
},
"tslint": {
"version": "5.14.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.14.0.tgz",
"integrity": "sha512-IUla/ieHVnB8Le7LdQFRGlVJid2T/gaJe5VkjzRVSRR6pA2ODYrnfR1hmxi+5+au9l50jBwpbBL34txgv4NnTQ==",
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.15.0.tgz",
"integrity": "sha512-6bIEujKR21/3nyeoX2uBnE8s+tMXCQXhqMmaIPJpHmXJoBJPTLcI7/VHRtUwMhnLVdwLqqY3zmd8Dxqa5CVdJA==",
"dev": true,
"requires": {
"babel-code-frame": "^6.22.0",
@@ -1422,7 +1455,7 @@
"commander": "^2.12.1",
"diff": "^3.2.0",
"glob": "^7.1.1",
"js-yaml": "^3.7.0",
"js-yaml": "^3.13.0",
"minimatch": "^3.0.4",
"mkdirp": "^0.5.1",
"resolve": "^1.3.2",
@@ -1455,9 +1488,9 @@
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
},
"typescript": {
"version": "3.3.4000",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.4000.tgz",
"integrity": "sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA=="
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.2.tgz",
"integrity": "sha512-Og2Vn6Mk7JAuWA1hQdDQN/Ekm/SchX80VzLhjKN9ETYrIepBFAd8PkOdOTK2nKt0FCkmMZKBJvQ1dV1gIxPu/A=="
},
"unpipe": {
"version": "1.0.0",
@@ -1495,6 +1528,14 @@
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true
},
"ws": {
"version": "6.1.4",
"resolved": "https://registry.npmjs.org/ws/-/ws-6.1.4.tgz",
"integrity": "sha512-eqZfL+NE/YQc1/ZynhojeV8q+H050oR8AZ2uIev7RU10svA9ZnJUddHcOUZTJLinZ9yEfdA2kSATS2qZK5fhJA==",
"requires": {
"async-limiter": "~1.0.0"
}
},
"xmlhttprequest-ssl": {
"version": "1.5.5",
"resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz",

View File

@@ -10,23 +10,23 @@
"start:prod": "node dist/main.js"
},
"dependencies": {
"@nestjs/common": "6.0.1",
"@nestjs/core": "6.0.1",
"@nestjs/platform-express": "6.0.1",
"@nestjs/platform-socket.io": "6.0.1",
"@nestjs/testing": "6.0.1",
"@nestjs/websockets": "6.0.1",
"@nestjs/common": "6.0.5",
"@nestjs/core": "6.0.5",
"@nestjs/platform-express": "6.0.5",
"@nestjs/platform-socket.io": "6.0.5",
"@nestjs/testing": "6.0.5",
"@nestjs/websockets": "6.0.5",
"class-transformer": "0.2.0",
"class-validator": "0.9.1",
"reflect-metadata": "0.1.13",
"rxjs": "6.4.0",
"typescript": "3.3.4000"
"typescript": "3.4.2"
},
"devDependencies": {
"@types/node": "7.10.5",
"@types/socket.io": "2.1.2",
"@types/ws": "6.0.1",
"ts-node": "8.0.3",
"tslint": "5.14.0"
"tslint": "5.15.0"
}
}

View File

@@ -10,21 +10,21 @@
"start:prod": "node dist/main.js"
},
"dependencies": {
"@nestjs/common": "6.0.1",
"@nestjs/core": "6.0.1",
"@nestjs/microservices": "6.0.1",
"@nestjs/platform-express": "6.0.1",
"@nestjs/testing": "6.0.1",
"@nestjs/common": "6.0.5",
"@nestjs/core": "6.0.5",
"@nestjs/microservices": "6.0.5",
"@nestjs/platform-express": "6.0.5",
"@nestjs/testing": "6.0.5",
"class-transformer": "0.2.0",
"class-validator": "0.9.1",
"reflect-metadata": "0.1.13",
"rxjs": "6.4.0",
"typescript": "3.3.4000"
"typescript": "3.4.2"
},
"devDependencies": {
"@types/amqplib": "0.5.11",
"@types/node": "10.14.1",
"@types/node": "10.14.4",
"ts-node": "8.0.3",
"tslint": "5.14.0"
"tslint": "5.15.0"
}
}

View File

@@ -41,9 +41,9 @@
}
},
"@nestjs/common": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.1.tgz",
"integrity": "sha512-+43nUxG9YSF2SnnFFT91/yTbvyfrGWI3a3cTI8jlSQUXOeKQILQhOXlA3N2GgDwYYH8GX8Xy8FXZ4GopJ7lT6A==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.5.tgz",
"integrity": "sha512-CbXtgBW/irevfUZF+rURDLFjhmT0Q6dmzbEYkuMg8bSjPmvgG6VzOBG6PwoPZbd+8PrPc2XLjN2A2Hg9mImp7A==",
"requires": {
"axios": "0.18.0",
"cli-color": "1.4.0",
@@ -51,9 +51,9 @@
}
},
"@nestjs/core": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.1.tgz",
"integrity": "sha512-1TbB19AE6opDPLoALaJO/ZZHCofKi8pJDJNInlPjRBIeP+Vfrh6LyCl7xw/RjXkrfZZIrMy+SVp0+qxlAZ7HnQ==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.5.tgz",
"integrity": "sha512-diLLr9qb9vGKyvfkt8JFGox21rpgj4YiToCRb3Tbdab0bvssLopznh/f7cdEBNmk5Adtl3IvXjtdVRj+XH7VCw==",
"requires": {
"@nuxtjs/opencollective": "0.2.1",
"fast-safe-stringify": "2.0.6",
@@ -64,9 +64,9 @@
}
},
"@nestjs/microservices": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.0.1.tgz",
"integrity": "sha512-ETCDkRjkVuqzvmbQbRcL+lKVrGVWv6whedNNVL9g3sAnIrJL/9lX4JQIJstQ68C0Lo/CfpTqozzeYoMgUyP4Iw==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.0.5.tgz",
"integrity": "sha512-lUyxzYQ3E5U7aQaY4bKVnGxizTl2cE2Rrey0ylmeVE4ae9Y7/z/7mdsfB4DVnuMVuRpyClUJ+zrQ4tJAIvL/nQ==",
"requires": {
"iterare": "1.1.2",
"json-socket": "0.3.0",
@@ -74,9 +74,9 @@
}
},
"@nestjs/testing": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.0.1.tgz",
"integrity": "sha512-+sB913Rrxwa6p7YZhExQEV7NiF/Qly6a9FlVlpoWkZnI0ktIzjbdZqo910JFYSawBdeplfHjWtt2Z6LSX6Mfng==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.0.5.tgz",
"integrity": "sha512-LrPBckONn/ZalBC8GU5LxvgIS8DJNrdwZE4gMJz0ugodwl0c1IL3e2gIukBkUJtHYPtzN12nYevnaGYT/V1aDQ==",
"requires": {
"optional": "0.1.4"
}
@@ -151,9 +151,9 @@
"integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q=="
},
"@types/node": {
"version": "10.14.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.1.tgz",
"integrity": "sha512-Rymt08vh1GaW4vYB6QP61/5m/CFLGnFZP++bJpWbiNxceNa6RBipDmb413jvtSf/R1gg5a/jQVl2jY4XVRscEA=="
"version": "10.14.4",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.14.4.tgz",
"integrity": "sha512-DT25xX/YgyPKiHFOpNuANIQIVvYEwCWXgK2jYYwqgaMrYE6+tq+DtmMwlD3drl6DJbUwtlIDnn0d7tIn/EbXBg=="
},
"ansi-regex": {
"version": "2.1.1",
@@ -360,9 +360,9 @@
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"consola": {
"version": "2.5.6",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.6.tgz",
"integrity": "sha512-DN0j6ewiNWkT09G3ZoyyzN3pSYrjxWcx49+mHu+oDI5dvW5vzmyuzYsqGS79+yQserH9ymJQbGzeqUejfssr8w=="
"version": "2.5.8",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.8.tgz",
"integrity": "sha512-fYv1M0rNJw4h0CZUx8PX02Px7xQhA+vNHpV8DBCGMoozp2Io/vrSXhhEothaRnSt7VMR0rj2pt9KKLXa5amrCw=="
},
"d": {
"version": "1.0.0",
@@ -973,9 +973,9 @@
"dev": true
},
"js-yaml": {
"version": "3.12.2",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.2.tgz",
"integrity": "sha512-QHn/Lh/7HhZ/Twc7vJYQTkjuCa0kaCcDcjK5Zlk2rvnUpy7DxMJ23+Jc2dcyvltwQVg1nygAVlB2oRDFHoRS5Q==",
"version": "3.13.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz",
"integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==",
"dev": true,
"requires": {
"argparse": "^1.0.7",
@@ -1047,6 +1047,12 @@
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true
},
"mkdirp": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
@@ -1054,14 +1060,6 @@
"dev": true,
"requires": {
"minimist": "0.0.8"
},
"dependencies": {
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true
}
}
},
"ms": {
@@ -1165,9 +1163,9 @@
}
},
"semver": {
"version": "5.6.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
"integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==",
"version": "5.7.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
"integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
"dev": true
},
"source-map": {
@@ -1246,9 +1244,9 @@
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
},
"tslint": {
"version": "5.14.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.14.0.tgz",
"integrity": "sha512-IUla/ieHVnB8Le7LdQFRGlVJid2T/gaJe5VkjzRVSRR6pA2ODYrnfR1hmxi+5+au9l50jBwpbBL34txgv4NnTQ==",
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.15.0.tgz",
"integrity": "sha512-6bIEujKR21/3nyeoX2uBnE8s+tMXCQXhqMmaIPJpHmXJoBJPTLcI7/VHRtUwMhnLVdwLqqY3zmd8Dxqa5CVdJA==",
"dev": true,
"requires": {
"babel-code-frame": "^6.22.0",
@@ -1257,7 +1255,7 @@
"commander": "^2.12.1",
"diff": "^3.2.0",
"glob": "^7.1.1",
"js-yaml": "^3.7.0",
"js-yaml": "^3.13.0",
"minimatch": "^3.0.4",
"mkdirp": "^0.5.1",
"resolve": "^1.3.2",
@@ -1276,9 +1274,9 @@
}
},
"typescript": {
"version": "3.3.4000",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.4000.tgz",
"integrity": "sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA=="
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.2.tgz",
"integrity": "sha512-Og2Vn6Mk7JAuWA1hQdDQN/Ekm/SchX80VzLhjKN9ETYrIepBFAd8PkOdOTK2nKt0FCkmMZKBJvQ1dV1gIxPu/A=="
},
"uuid": {
"version": "3.3.2",

View File

@@ -11,20 +11,20 @@
},
"dependencies": {
"@grpc/proto-loader": "0.4.0",
"@nestjs/common": "6.0.1",
"@nestjs/core": "6.0.1",
"@nestjs/microservices": "6.0.1",
"@nestjs/testing": "6.0.1",
"@nestjs/common": "6.0.5",
"@nestjs/core": "6.0.5",
"@nestjs/microservices": "6.0.5",
"@nestjs/testing": "6.0.5",
"class-transformer": "0.2.0",
"class-validator": "0.9.1",
"grpc": "1.19.0",
"reflect-metadata": "0.1.13",
"rxjs": "6.4.0",
"typescript": "3.3.4000"
"typescript": "3.4.2"
},
"devDependencies": {
"@types/node": "10.14.1",
"@types/node": "10.14.4",
"ts-node": "8.0.3",
"tslint": "5.14.0"
"tslint": "5.15.0"
}
}

View File

@@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@nestjs/common": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.1.tgz",
"integrity": "sha512-+43nUxG9YSF2SnnFFT91/yTbvyfrGWI3a3cTI8jlSQUXOeKQILQhOXlA3N2GgDwYYH8GX8Xy8FXZ4GopJ7lT6A==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.0.5.tgz",
"integrity": "sha512-CbXtgBW/irevfUZF+rURDLFjhmT0Q6dmzbEYkuMg8bSjPmvgG6VzOBG6PwoPZbd+8PrPc2XLjN2A2Hg9mImp7A==",
"requires": {
"axios": "0.18.0",
"cli-color": "1.4.0",
@@ -15,9 +15,9 @@
}
},
"@nestjs/core": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.1.tgz",
"integrity": "sha512-1TbB19AE6opDPLoALaJO/ZZHCofKi8pJDJNInlPjRBIeP+Vfrh6LyCl7xw/RjXkrfZZIrMy+SVp0+qxlAZ7HnQ==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.0.5.tgz",
"integrity": "sha512-diLLr9qb9vGKyvfkt8JFGox21rpgj4YiToCRb3Tbdab0bvssLopznh/f7cdEBNmk5Adtl3IvXjtdVRj+XH7VCw==",
"requires": {
"@nuxtjs/opencollective": "0.2.1",
"fast-safe-stringify": "2.0.6",
@@ -28,105 +28,14 @@
}
},
"@nestjs/platform-express": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-6.0.1.tgz",
"integrity": "sha512-KFxK4t2eL0fZ3NpzTEJeWmiDkGwCAfPACadNCmjNGeXrkxK1Z2VJvfJeA2DDmYCNH3Ps8Ro25LO+a0oVYgdqoQ==",
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-6.0.5.tgz",
"integrity": "sha512-N3P0IcEN/tQlA4DkFmbKQSyCkwAG00uKDQ0ntkE+3FzMOunlI49+qKFCCUc0xlselTgJtVcZRg5eNot3vA1P/Q==",
"requires": {
"body-parser": "1.18.3",
"cors": "2.8.5",
"express": "4.16.4",
"multer": "1.4.1"
},
"dependencies": {
"append-field": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz",
"integrity": "sha1-HjRA6RXwsSA9I3SOeO3XubW0PlY="
},
"cors": {
"version": "2.8.5",
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
"requires": {
"object-assign": "^4",
"vary": "^1"
}
},
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"requires": {
"ms": "2.0.0"
}
},
"express": {
"version": "4.16.4",
"resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz",
"integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==",
"requires": {
"accepts": "~1.3.5",
"array-flatten": "1.1.1",
"body-parser": "1.18.3",
"content-disposition": "0.5.2",
"content-type": "~1.0.4",
"cookie": "0.3.1",
"cookie-signature": "1.0.6",
"debug": "2.6.9",
"depd": "~1.1.2",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
"finalhandler": "1.1.1",
"fresh": "0.5.2",
"merge-descriptors": "1.0.1",
"methods": "~1.1.2",
"on-finished": "~2.3.0",
"parseurl": "~1.3.2",
"path-to-regexp": "0.1.7",
"proxy-addr": "~2.0.4",
"qs": "6.5.2",
"range-parser": "~1.2.0",
"safe-buffer": "5.1.2",
"send": "0.16.2",
"serve-static": "1.13.2",
"setprototypeof": "1.1.0",
"statuses": "~1.4.0",
"type-is": "~1.6.16",
"utils-merge": "1.0.1",
"vary": "~1.1.2"
}
},
"multer": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/multer/-/multer-1.4.1.tgz",
"integrity": "sha512-zzOLNRxzszwd+61JFuAo0fxdQfvku12aNJgnla0AQ+hHxFmfc/B7jBVuPr5Rmvu46Jze/iJrFpSOsD7afO8SDw==",
"requires": {
"append-field": "^1.0.0",
"busboy": "^0.2.11",
"concat-stream": "^1.5.2",
"mkdirp": "^0.5.1",
"object-assign": "^4.1.1",
"on-finished": "^2.3.0",
"type-is": "^1.6.4",
"xtend": "^4.0.0"
}
},
"path-to-regexp": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
"integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"statuses": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
"integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew=="
}
}
},
"@nestjs/typeorm": {
@@ -193,9 +102,14 @@
"integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8="
},
"app-root-path": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-2.1.0.tgz",
"integrity": "sha1-mL9lmTJ+zqGZMJhm6BQDaP0uZGo="
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-2.2.1.tgz",
"integrity": "sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA=="
},
"append-field": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz",
"integrity": "sha1-HjRA6RXwsSA9I3SOeO3XubW0PlY="
},
"arg": {
"version": "4.1.0",
@@ -317,6 +231,11 @@
"requires": {
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
@@ -356,29 +275,6 @@
"requires": {
"dicer": "0.2.5",
"readable-stream": "1.1.x"
},
"dependencies": {
"isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"readable-stream": {
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
"isarray": "0.0.1",
"string_decoder": "~0.10.x"
}
},
"string_decoder": {
"version": "0.10.31",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
},
"bytes": {
@@ -422,9 +318,9 @@
}
},
"cli-highlight": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/cli-highlight/-/cli-highlight-2.0.0.tgz",
"integrity": "sha512-cW9HBA7Z7YETTwncdScUBUUDj8AnBU4rq6qQt6NbSXG2sFLcQ1LHEAGadRWydVtNXnH6StuN4GDCX5yddJDgew==",
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/cli-highlight/-/cli-highlight-2.1.0.tgz",
"integrity": "sha512-DxaFAFBGRaB+xueXP7jlJC5f867gZUZXz74RaxeZ9juEZM2Sm/s6ilzpz0uxKiT+Mj6TzHlibtXfG/dK5bSwDA==",
"requires": {
"chalk": "^2.3.0",
"highlight.js": "^9.6.0",
@@ -502,12 +398,36 @@
"inherits": "^2.0.3",
"readable-stream": "^2.2.2",
"typedarray": "^0.0.6"
},
"dependencies": {
"readable-stream": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
}
}
}
},
"consola": {
"version": "2.5.6",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.6.tgz",
"integrity": "sha512-DN0j6ewiNWkT09G3ZoyyzN3pSYrjxWcx49+mHu+oDI5dvW5vzmyuzYsqGS79+yQserH9ymJQbGzeqUejfssr8w=="
"version": "2.5.8",
"resolved": "https://registry.npmjs.org/consola/-/consola-2.5.8.tgz",
"integrity": "sha512-fYv1M0rNJw4h0CZUx8PX02Px7xQhA+vNHpV8DBCGMoozp2Io/vrSXhhEothaRnSt7VMR0rj2pt9KKLXa5amrCw=="
},
"content-disposition": {
"version": "0.5.2",
@@ -534,6 +454,15 @@
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"cors": {
"version": "2.8.5",
"resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
"integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
"requires": {
"object-assign": "^4",
"vary": "^1"
}
},
"cross-spawn": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
@@ -558,13 +487,6 @@
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
"requires": {
"ms": "^2.1.1"
},
"dependencies": {
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
}
}
},
"decamelize": {
@@ -589,29 +511,6 @@
"requires": {
"readable-stream": "1.1.x",
"streamsearch": "0.1.2"
},
"dependencies": {
"isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
},
"readable-stream": {
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
"isarray": "0.0.1",
"string_decoder": "~0.10.x"
}
},
"string_decoder": {
"version": "0.10.31",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
}
}
},
"diff": {
@@ -737,6 +636,63 @@
"strip-eof": "^1.0.0"
}
},
"express": {
"version": "4.16.4",
"resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz",
"integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==",
"requires": {
"accepts": "~1.3.5",
"array-flatten": "1.1.1",
"body-parser": "1.18.3",
"content-disposition": "0.5.2",
"content-type": "~1.0.4",
"cookie": "0.3.1",
"cookie-signature": "1.0.6",
"debug": "2.6.9",
"depd": "~1.1.2",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
"finalhandler": "1.1.1",
"fresh": "0.5.2",
"merge-descriptors": "1.0.1",
"methods": "~1.1.2",
"on-finished": "~2.3.0",
"parseurl": "~1.3.2",
"path-to-regexp": "0.1.7",
"proxy-addr": "~2.0.4",
"qs": "6.5.2",
"range-parser": "~1.2.0",
"safe-buffer": "5.1.2",
"send": "0.16.2",
"serve-static": "1.13.2",
"setprototypeof": "1.1.0",
"statuses": "~1.4.0",
"type-is": "~1.6.16",
"utils-merge": "1.0.1",
"vary": "~1.1.2"
},
"dependencies": {
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"requires": {
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"statuses": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
"integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew=="
}
}
},
"fast-safe-stringify": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz",
@@ -769,6 +725,11 @@
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"statuses": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
@@ -799,11 +760,6 @@
"requires": {
"ms": "^2.1.1"
}
},
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
}
}
},
@@ -890,9 +846,9 @@
}
},
"ieee754": {
"version": "1.1.12",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz",
"integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA=="
"version": "1.1.13",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
"integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg=="
},
"inflight": {
"version": "1.0.6",
@@ -960,9 +916,9 @@
"dev": true
},
"js-yaml": {
"version": "3.11.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz",
"integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==",
"version": "3.13.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz",
"integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==",
"dev": true,
"requires": {
"argparse": "^1.0.7",
@@ -1061,16 +1017,16 @@
"integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ=="
},
"mime-db": {
"version": "1.37.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz",
"integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg=="
"version": "1.38.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz",
"integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg=="
},
"mime-types": {
"version": "2.1.21",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz",
"integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==",
"version": "2.1.22",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz",
"integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==",
"requires": {
"mime-db": "~1.37.0"
"mime-db": "~1.38.0"
}
},
"mimic-fn": {
@@ -1100,9 +1056,24 @@
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"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==",
"requires": {
"append-field": "^1.0.0",
"busboy": "^0.2.11",
"concat-stream": "^1.5.2",
"mkdirp": "^0.5.1",
"object-assign": "^4.1.1",
"on-finished": "^2.3.0",
"type-is": "^1.6.4",
"xtend": "^4.0.0"
}
},
"mysql": {
"version": "2.16.0",
@@ -1305,10 +1276,15 @@
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
"dev": true
},
"path-to-regexp": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
"integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
},
"process-nextick-args": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
"integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M="
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
},
"proxy-addr": {
"version": "2.0.4",
@@ -1355,17 +1331,21 @@
}
},
"readable-stream": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz",
"integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==",
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~1.0.6",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.0.3",
"util-deprecate": "~1.0.1"
"inherits": "~2.0.1",
"isarray": "0.0.1",
"string_decoder": "~0.10.x"
},
"dependencies": {
"isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
}
}
},
"reflect-metadata": {
@@ -1401,9 +1381,9 @@
}
},
"safe-buffer": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg=="
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"safer-buffer": {
"version": "2.1.2",
@@ -1448,6 +1428,11 @@
"ms": "2.0.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"statuses": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
@@ -1540,12 +1525,9 @@
}
},
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"requires": {
"safe-buffer": "~5.1.0"
}
"version": "0.10.31",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
},
"strip-ansi": {
"version": "4.0.0",
@@ -1612,9 +1594,9 @@
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
},
"tslint": {
"version": "5.14.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.14.0.tgz",
"integrity": "sha512-IUla/ieHVnB8Le7LdQFRGlVJid2T/gaJe5VkjzRVSRR6pA2ODYrnfR1hmxi+5+au9l50jBwpbBL34txgv4NnTQ==",
"version": "5.15.0",
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.15.0.tgz",
"integrity": "sha512-6bIEujKR21/3nyeoX2uBnE8s+tMXCQXhqMmaIPJpHmXJoBJPTLcI7/VHRtUwMhnLVdwLqqY3zmd8Dxqa5CVdJA==",
"dev": true,
"requires": {
"babel-code-frame": "^6.22.0",
@@ -1623,7 +1605,7 @@
"commander": "^2.12.1",
"diff": "^3.2.0",
"glob": "^7.1.1",
"js-yaml": "^3.7.0",
"js-yaml": "^3.13.0",
"minimatch": "^3.0.4",
"mkdirp": "^0.5.1",
"resolve": "^1.3.2",
@@ -1656,9 +1638,9 @@
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
},
"typeorm": {
"version": "0.2.15",
"resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.2.15.tgz",
"integrity": "sha512-Gpl6fdgb7WLngtuSw2l7dOdOp4jrbVIjlSgpL3P6DX9GKvSzbXmjurmGQ9RRomn+us1Bg+tCYAiSv3j55riplQ==",
"version": "0.2.16",
"resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.2.16.tgz",
"integrity": "sha512-Ntx9Hjx2aJcPsbqTsqnhCZOG30bDQ8EalMa9J49CXMCatUuMbn9QTyreM9AuSQb2N91ENCRWPZIuzgRaSmC1Vw==",
"requires": {
"app-root-path": "^2.0.1",
"buffer": "^5.1.0",
@@ -1687,9 +1669,9 @@
}
},
"js-yaml": {
"version": "3.12.2",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.2.tgz",
"integrity": "sha512-QHn/Lh/7HhZ/Twc7vJYQTkjuCa0kaCcDcjK5Zlk2rvnUpy7DxMJ23+Jc2dcyvltwQVg1nygAVlB2oRDFHoRS5Q==",
"version": "3.13.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz",
"integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==",
"requires": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"
@@ -1698,9 +1680,9 @@
}
},
"typescript": {
"version": "3.3.4000",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.4000.tgz",
"integrity": "sha512-jjOcCZvpkl2+z7JFn0yBOoLQyLoIkNZAs/fYJkUG6VKy6zLPHJGfQJYFHzibB6GJaF/8QrcECtlQ5cpvRHSMEA=="
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.2.tgz",
"integrity": "sha512-Og2Vn6Mk7JAuWA1hQdDQN/Ekm/SchX80VzLhjKN9ETYrIepBFAd8PkOdOTK2nKt0FCkmMZKBJvQ1dV1gIxPu/A=="
},
"unpipe": {
"version": "1.0.0",
@@ -2002,9 +1984,9 @@
}
},
"p-try": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz",
"integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ=="
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.1.0.tgz",
"integrity": "sha512-H2RyIJ7+A3rjkwKC2l5GGtU4H1vkxKCAGsWasNVd0Set+6i4znxbWy6/j16YDPJDWxhsgZiKAstMEP8wCdSpjA=="
},
"require-main-filename": {
"version": "2.0.0",

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