Compare commits

...

776 Commits

Author SHA1 Message Date
Kamil Myśliwiec
16f4611d0c chore(@nestjs) publish v5.7.4 release 2019-03-09 14:37:51 +01:00
Kamil Myśliwiec
6d798d5c18 refactor(): adjust coding style 2019-03-09 14:35:18 +01:00
Kamil Myśliwiec
3fa6625be2 Merge branch 'ynunez-master' 2019-03-09 14:32:35 +01:00
Kamil Myśliwiec
4c22feb289 refactor(): adjust coding style 2019-03-09 14:32:12 +01:00
Kamil Myśliwiec
89e5a1de49 Merge branch 'master' of https://github.com/ynunez/nest into ynunez-master 2019-03-09 14:31:40 +01:00
Kamil Myśliwiec
251a8a2dc5 Merge branch 'sincraianul-fix-class-validator-response' 2019-03-09 14:29:29 +01:00
Kamil Myśliwiec
46d930f48a refactor(): adjust coding style 2019-03-09 14:28:01 +01:00
Kamil Myśliwiec
5f0829d5db Merge branch 'fix-class-validator-response' of https://github.com/sincraianul/nest into sincraianul-fix-class-validator-response 2019-03-09 14:26:00 +01:00
Kamil Myśliwiec
cec89d285d bugfix(): fix fastify adapter query parameters 2019-03-09 14:04:35 +01:00
Andrei Sîncrăian
d6b8e1f514 bugfix(common): prevent exception body override if message is an array 2019-03-08 16:22:49 +02:00
Kamil Mysliwiec
d8c7ba3285 Merge pull request #1569 from kibertoad/chore/update-test-dependencies
build(test/linting) update test/linting dependencies
2019-02-28 14:26:42 +01:00
Kamil Mysliwiec
611924c4b2 Merge pull request #1572 from MaxWithU/patch-1
sample(): update docker-compose.yml
2019-02-28 14:03:39 +01:00
Yoel Nunez
a03b4b1f55 Merge branch 'master' of github.com:ynunez/nest 2019-02-26 20:40:32 -06:00
Yoel Nunez
03377180a7 bugfix(core): fixed basePath issue with routes-resolver 2019-02-26 20:40:15 -06:00
Yoel Nunez
f54f123953 fixed basePath issue with routes-resolver# 2019-02-26 20:29:43 -06:00
Kamil Myśliwiec
20cbbaf296 chore(@nestjs) publish v5.7.3 release 2019-02-21 11:38:30 +01:00
Kamil Myśliwiec
f95b5ae6d1 Merge branch 'BrunnerLivio-fix/unknown-dependency-ex-symbol' 2019-02-21 11:10:15 +01:00
Kamil Myśliwiec
40fb55abae bugfix(core): add missing isSymbol check 2019-02-21 11:09:52 +01:00
Kamil Myśliwiec
b89651f5e6 Merge branch 'fix/unknown-dependency-ex-symbol' of https://github.com/BrunnerLivio/nest into BrunnerLivio-fix/unknown-dependency-ex-symbol 2019-02-21 11:07:38 +01:00
Kamil Mysliwiec
6cea5928de Merge pull request #1576 from nestjs/bugfix/client-rmq
bugfix(microservices): remove reply_queue in rabbitmq client
2019-02-20 23:42:16 +01:00
Kamil Myśliwiec
4a44d16211 bugfix(microservices): remove reply_queue in rabbitmq client (use direct one) 2019-02-20 19:57:53 +01:00
Max Chen
f58c5116f5 Update docker-compose.yml 2019-02-19 17:18:52 +08:00
Kamil Mysliwiec
4fcc3731e1 Merge pull request #1545 from zuohuadong/patch-2
chore(readme_zh): add qq groups
2019-02-19 09:41:21 +01:00
Max Chen
ff80e52501 Update docker-compose.yml
latest mysql image can't access login
2019-02-19 16:16:38 +08:00
Igor Savin
a9f38fab03 build(vulnerabilities) update additional entries in package-lock to fix 8 additional vulnerabilities 2019-02-18 15:02:02 +01:00
Igor Savin
be9793c160 build(test/linting) update test/linting dependencies. Use new husky configuration syntax 2019-02-18 14:49:01 +01:00
Kamil Mysliwiec
c32697b414 Merge pull request #1560 from kibertoad/chore/update-sinon
build(sinon): update sinon and related dependencies
2019-02-18 14:10:14 +01:00
Kamil Mysliwiec
5c011a6328 Merge pull request #1561 from kibertoad/chore/uptodate-node-versions
ci(node): fix compatibility with Node 11 and execute tests on it in CI
2019-02-18 14:07:23 +01:00
Kamil Mysliwiec
414925e2f0 Update CONTRIBUTING.md 2019-02-17 13:48:31 +01:00
Livio
3261bedb1a fix(@nestjs/core): Display Symbol in UnknownDependencyException
Fixes #1551
2019-02-16 15:51:00 +01:00
Igor Savin
4930974042 build(sinon) fix more TypeScript compilation errors 2019-02-14 17:38:53 +01:00
Igor Savin
72b84ec97c build(sinon) fix more TypeScript compilation errors 2019-02-14 17:29:53 +01:00
Igor Savin
82bb7eff71 build(sinon) fix more TypeScript compilation errors 2019-02-14 17:22:09 +01:00
Igor Savin
2e75680f3c build(sinon) fix more TypeScript compilation errors 2019-02-14 17:13:26 +01:00
Igor Savin
d153872640 build(sinon) fix more TypeScript compilation errors 2019-02-14 17:04:58 +01:00
Igor Savin
98b81598e6 ci(node) commit updated package-lock.json 2019-02-14 17:03:24 +01:00
Igor Savin
059eba49af ci(node) update package-lock.json 2019-02-14 16:58:55 +01:00
Igor Savin
f801ad8214 build(sinon) fix more TypeScript compilation errors 2019-02-14 16:57:07 +01:00
Igor Savin
8b32bc61e4 ci(node) use gRPC version compatible with Node 11 2019-02-14 16:53:26 +01:00
Igor Savin
bd8705790e build(sinon) fix TypeScript compilation 2019-02-14 16:49:49 +01:00
Igor Savin
27d1c0fa7d ci(node) remove changes from wrong branch 2019-02-14 16:43:05 +01:00
Igor Savin
df538d5025 build(sinon) fix TypeScript compilation 2019-02-14 16:39:02 +01:00
Igor Savin
fc85b32be6 ci(node) execute tests in CI with Node 11 instead of Node 9 2019-02-14 16:15:28 +01:00
Igor Savin
8c03d84793 build(sinon) update sinon and related dependencies 2019-02-14 16:09:16 +01:00
huadong zuo
69dfb3d03b chore(readme_zh) add qq group 2019-02-11 12:49:38 +08:00
Kamil Myśliwiec
1714b51375 feature(): improve error messages (missing @Controller() decorator) 2019-02-08 20:11:33 +01:00
Kamil Myśliwiec
0e788fd3db chore(): publish 5.7.2 release 2019-02-08 18:04:34 +01:00
Kamil Myśliwiec
bf26d311d6 chore(@nestjs) publish v5.7.2 release 2019-02-08 18:03:01 +01:00
Kamil Mysliwiec
a975293d2e Update Readme.md 2019-02-08 14:46:16 +01:00
Kamil Myśliwiec
6ce05e117c chore(): publish 5.7.1 patch release 2019-02-08 10:46:52 +01:00
Kamil Myśliwiec
3b681a8ff0 chore(@nestjs) publish v5.7.1 release 2019-02-08 10:45:56 +01:00
Kamil Myśliwiec
3ce50b7f90 Merge branch 'master' of https://github.com/nestjs/nest 2019-02-07 14:44:30 +01:00
Kamil Myśliwiec
3159c402a2 chore(): update gitignore 2019-02-07 14:44:22 +01:00
Kamil Myśliwiec
0518c3c215 chore(): publish 5.7.0 minor release 2019-02-05 14:11:53 +01:00
Kamil Myśliwiec
213be3645f chore(@nestjs) publish v5.7.0 release 2019-02-05 14:10:53 +01:00
Kamil Myśliwiec
b634e6182d Merge branch 'elyesbenabdelkader-feature/request-mapping-decorator' 2019-02-05 14:07:37 +01:00
Kamil Myśliwiec
36ce494f76 feature(): allow array in request mapping decorators 2019-02-05 14:00:49 +01:00
Kamil Myśliwiec
9bb6b15f42 Merge branch 'feature/request-mapping-decorator' of https://github.com/elyesbenabdelkader/nest into elyesbenabdelkader-feature/request-mapping-decorator 2019-02-05 13:50:12 +01:00
Kamil Myśliwiec
7c772b2fd2 Merge branch 'master' of https://github.com/nestjs/nest 2019-02-05 13:44:49 +01:00
Kamil Myśliwiec
7edf59841a Merge branch 'AlexDaSoul-bugfix/interceptors-stream' 2019-02-05 13:44:42 +01:00
Kamil Myśliwiec
0848eeb53f style(): remove redundant comment 2019-02-05 13:44:08 +01:00
Kamil Myśliwiec
7fa51c87e3 Merge branch 'bugfix/interceptors-stream' of https://github.com/AlexDaSoul/nest into AlexDaSoul-bugfix/interceptors-stream 2019-02-05 13:43:45 +01:00
Kamil Mysliwiec
bf04704e11 Merge pull request #1458 from flex/patch-1
bugfix(grpc): handle null value in the proto definition
2019-02-05 13:43:17 +01:00
Kamil Mysliwiec
b289daa83e Merge pull request #1514 from kiwikern/multiple-view-dirs
feature(core): allow for multiple view dirs in Express
2019-02-05 13:42:46 +01:00
Kamil Myśliwiec
843d16dfb8 test(integration): fix invalid expected response (gRPC) 2019-02-05 13:35:28 +01:00
Kamil Mysliwiec
233e7ad14f Merge pull request #1460 from apiel/master
enhancement(common): make logger output more customizable
2019-02-05 13:28:51 +01:00
Kim Kern
dbfa3a4caa feature(core): allow for multiple view dirs in Express
In Express, you can set a string or an array of string as
base view paths. The views are looked up in the order they occur in
the array. The ExpressAdapter only allowed for a single string, now it
accepts an array of strings as well.

closes #1513
2019-02-01 12:36:47 +01:00
Kamil Mysliwiec
93b3e0b313 Merge pull request #1494 from nestjs/renovate/nestjs-common-5.x
chore(): update dependency @nestjs/common to v5.6.2
2019-02-01 08:20:03 +01:00
Renovate Bot
7e93330162 Update dependency @nestjs/common to v5.6.2 2019-01-31 15:42:31 +00:00
Kamil Mysliwiec
8861f58bf5 Merge pull request #1491 from nestjs/renovate/configure
chore(): configure renovate
2019-01-31 16:22:42 +01:00
Renovate Bot
4edcaf87e8 Add renovate.json 2019-01-31 14:31:34 +00:00
Kamil Mysliwiec
7b96d2dbfb Update Readme.md 2019-01-31 13:04:38 +01:00
Kamil Mysliwiec
74a21208ff Update Readme.md 2019-01-31 13:04:03 +01:00
Alexandre Piel
8f66fd1321 make logger output more customizable 2019-01-21 09:28:47 +01:00
flex
40ce9e4a88 bugfix(grpc) Handle null value in proto definition 2019-01-19 02:00:45 +08:00
Kamil Myśliwiec
e019afa472 chore() publish 5.6.2 release 2019-01-16 23:36:04 +01:00
Kamil Myśliwiec
a32c7373cc chore() publish 5.6.2 release 2019-01-16 22:48:07 +01:00
Kamil Myśliwiec
79fc37f093 chore(@nestjs) publish v5.6.2 release 2019-01-16 22:45:26 +01:00
Kamil Myśliwiec
8eedff85bd chore() publish 5.6.1 release 2019-01-16 21:47:30 +01:00
Kamil Myśliwiec
159a947f1b chore(@nestjs) publish v5.6.1 release 2019-01-16 21:46:35 +01:00
Kamil Myśliwiec
5eee77ea20 Merge branch '5.6.0' 2019-01-16 21:39:08 +01:00
Kamil Myśliwiec
c90b8e3d07 chore() publish 5.6.0 release 2019-01-16 21:37:29 +01:00
Kamil Myśliwiec
acf97a2e1d chore(@nestjs) publish v5.6.0 release 2019-01-16 21:36:15 +01:00
Kamil Myśliwiec
84c156356b feature(websockets) support regexp in namespaces 2019-01-16 21:34:18 +01:00
Kamil Myśliwiec
9a3f760b6c bugfix(core) fix missing abstract type typing 2019-01-16 21:33:53 +01:00
Kamil Myśliwiec
d1ad94324b feature() support abstract classes in nest ctx 2019-01-16 21:15:29 +01:00
Kamil Myśliwiec
69fb434def Merge branch 'master' of https://github.com/nestjs/nest 2019-01-16 21:05:10 +01:00
Kamil Myśliwiec
c448e56611 chore() merge changes 2019-01-16 21:04:02 +01:00
Kamil Myśliwiec
b8e6553a06 Merge branch 'FionaLovett-validate-transform' into 5.6.0 2019-01-16 21:00:19 +01:00
Kamil Myśliwiec
6fc4826b30 Merge branch 'FionaLovett-validate-transform' 2019-01-16 20:59:29 +01:00
Kamil Myśliwiec
2f888d3abe refactor() adjust code style 2019-01-16 20:59:06 +01:00
Kamil Myśliwiec
0db05f62f1 Merge branch 'validate-transform' of https://github.com/FionaLovett/nest into FionaLovett-validate-transform 2019-01-16 20:55:36 +01:00
Kamil Mysliwiec
255ca7ef99 Merge pull request #1448 from caohuilin/patch-2
sample(mongoose) should await on create POST
2019-01-16 20:51:50 +01:00
Kamil Mysliwiec
6744a8648d Update Readme.md 2019-01-16 20:35:19 +01:00
Belinda Cao
7a0808ed5b Update cats.controller.ts 2019-01-15 09:57:06 +08:00
Kamil Mysliwiec
5940ec7d62 Merge pull request #1388 from hschiavone/grpc-server-max-received-and-send-message-length
feature(microservices) add server gRPC max received & message length options
2019-01-15 00:30:02 +01:00
Kamil Mysliwiec
535c881a95 Merge branch '5.6.0' into grpc-server-max-received-and-send-message-length 2019-01-15 00:29:17 +01:00
Kamil Mysliwiec
986ad4e746 Merge pull request #1424 from quaternion/master
bugfix(common) add missing axios provider in HttpModule.registerAsync
2019-01-15 00:26:41 +01:00
Kamil Myśliwiec
6204fe1a09 Merge branch 'anton-alation-feature/grpc-method-with-namespaces' into 5.6.0 2019-01-15 00:25:16 +01:00
Kamil Myśliwiec
3cb73111bf refactor() adjust code style 2019-01-15 00:23:18 +01:00
Kamil Mysliwiec
1b872d66b7 Update Readme.md 2019-01-15 00:12:24 +01:00
Kamil Myśliwiec
891de8eea8 Merge branch 'feature/grpc-method-with-namespaces' of https://github.com/anton-alation/nest into anton-alation-feature/grpc-method-with-namespaces 2019-01-15 00:03:29 +01:00
Kamil Mysliwiec
0f788efd0c Merge pull request #1441 from iblamefish/circular-dependency-message
bugfix(core) update URL for circular dependency in the error message
2019-01-14 23:17:34 +01:00
Kamil Mysliwiec
72491e7d62 Merge pull request #1410 from BrunnerLivio/feature/discord-badge
chore() add discord badge to README.md
2019-01-14 22:06:00 +01:00
Clinton Montague
4b74c275bd bugfix(core) update url for circular dependency in error message
Fixes the url in INVALID_MODULE_MESSAGE

This closes #1369
2019-01-13 17:50:03 +00:00
Livio
3939a67bd3 chore: add discord badge to README.md 2019-01-07 18:48:39 +01:00
Elyes BA
ea700d8bb2 feature(core): allow Array in request mapping decorator
This feature was requested in the issue #1343. When routing, besides using a single string, you can
now use an array of strings in the Post, Get, ... decorators.
2019-01-05 21:37:50 +01:00
Andrew Nikolaev
1212c6034a fix(common): add missing axios provider in HttpModule.registerAsync 2019-01-05 18:46:53 +03:00
Fiona Lovett
94679b2d79 feature(common): add transformOptions to ValidationPipeOptions
allows plainToClass to expose class properties to defined groups as per issue #1374
2019-01-02 20:52:29 +01:00
Fiona Lovett
83fc4c3bc4 feature(common): add transformOptions to ValidationPipeOptions
allows plainToClass to expose class properties to defined groups as per issue #1374
2019-01-02 20:07:50 +01:00
Fiona Lovett
69f2f3dd0b feature(common): add transformOptions to ValidationPipeOptions
allows plainToClass to expose class properties to defined groups as per issue #1374
2019-01-02 19:56:33 +01:00
Fiona Lovett
b49a9a1098 feature(common): add transformOptions to ValidationPipeOptions
allows plainToClass to expose class properties to defined groups as per issue #1374
2019-01-02 17:53:46 +01:00
Kamil Myśliwiec
2a5e22e2c6 scripts() fix prepare script (install all deps) 2018-12-29 10:21:18 +01:00
Hugo Schiavone
84e4bdef1e fix getOptionsProp method 2018-12-27 18:25:43 +01:00
Hugo Schiavone
da110d01dd use getOptionsProp method on grcp max_send_message_length & max_receive_message_length implementation 2018-12-27 12:24:38 +01:00
alexdasoul
d9434a2a9f bugfix(core) Interceptors toPromise is break Observable stream 2018-12-21 14:42:15 +03:00
Hugo Schiavone
bd3222ad62 implement server grpc max received & send message length option 2018-12-20 10:10:16 +01:00
Anton Repin
595bc988ec GRPC Server test stub updated to match getServiceNames new output 2018-12-12 15:50:10 -08:00
Anton Repin
ea26100ec3 GRPC server tests updated:
- Added package recursive search test for support of proto-namespaces
- Updated tests which were testing single level proto structure
2018-12-12 13:27:06 -08:00
Kamil Mysliwiec
ff2e310a18 Update cats.controller.ts 2018-12-12 14:24:41 +01:00
Anton Repin
8d41edadce GRPC Server namespaces support added for loaded proto descriptors
- Recursive scan of descriptors object
- Service names with namespaces concatenated with dot-syntax
2018-12-11 23:37:38 -08:00
Kamil Myśliwiec
ef2147d697 chore(@nestjs) publish v5.5.0 release 2018-12-09 14:16:11 +01:00
Kamil Myśliwiec
438e662352 bugfix(common) inconsistent microservice config #1352 2018-12-09 14:14:54 +01:00
Kamil Mysliwiec
17b0100c51 Merge pull request #1349 from nestjs/5.5.0
chore() 5.5.0 minor release
2018-12-09 14:13:25 +01:00
Kamil Mysliwiec
8bce796ad7 Merge pull request #1271 from grin0c/another-proto-loader
feature(microservices): added option for proto-loader (grpc)
2018-12-06 19:45:47 +01:00
Kamil Mysliwiec
6a54900df8 Merge pull request #1344 from nestjs/bugfix/1339-exceptions
bugfix(common): custom exception body #1339
2018-12-06 19:45:21 +01:00
Kamil Mysliwiec
63e3940c02 Merge pull request #1345 from nestjs/bugfix/1338-injection-scopes
bugfix(common) invalid metadata inheritance with custom providers
2018-12-06 19:45:10 +01:00
Kamil Mysliwiec
d25e6c713a Merge pull request #1346 from nestjs/bugfix/1285-throw-error
bugfix(ws/microservices): add catchError() to observables
2018-12-06 19:44:59 +01:00
Kamil Mysliwiec
ed37b9138d Merge pull request #1347 from nestjs/feature/1257-http-async
feature(common) add async support (HttpModule) and extraProviders
2018-12-06 19:44:39 +01:00
Kamil Mysliwiec
b632f60a9e Merge pull request #1348 from nestjs/feature/1267-validation-factory
feature(common) add validation error factory (ValidationPipe)
2018-12-06 19:44:24 +01:00
Kamil Myśliwiec
ee9d31671c feature(common) add validation error factory (ValidationPipe) 2018-12-06 18:33:22 +01:00
Kamil Myśliwiec
9fa12b43f2 fix(common) add missing interfaces reexport (http) 2018-12-06 14:16:39 +01:00
Kamil Myśliwiec
e66d72f904 feature(common) add async support (HttpModule) and extraProviders (cache/http) 2018-12-06 14:15:16 +01:00
Kamil Myśliwiec
efb367e65c bugfix(ws/microservices): add catchError() to observables 2018-12-06 11:47:14 +01:00
Kamil Myśliwiec
fe96bf67bc bugfix(common) invalid metadata inheritance with custom providers 2018-12-06 09:08:33 +01:00
Kamil Myśliwiec
411db0c3ff bugfix(common): custom exception body #1339 2018-12-05 23:31:13 +01:00
Kamil Mysliwiec
c6ec8878e0 Merge pull request #1206 from jbpionnier/refactor_simplified_if
refactor() simplified if (less checks)
2018-11-30 13:31:27 +01:00
Kamil Myśliwiec
db94dc54bf chore(): publish 5.4.1 release 2018-11-30 13:06:41 +01:00
Kamil Myśliwiec
72577136a7 chore(@nestjs) publish v5.4.1 release 2018-11-30 13:00:27 +01:00
Kamil Myśliwiec
6fac25bde0 chore(): update package.json 2018-11-30 12:59:16 +01:00
Kamil Myśliwiec
25bc5e8893 chore() format package.json 2018-11-30 12:10:43 +01:00
Kamil Myśliwiec
0a158798a9 tests(common) update file interceptors tests 2018-11-30 11:56:45 +01:00
Kamil Myśliwiec
42adbab0b5 Merge branch '5.4.1' of https://github.com/nestjs/nest into 5.4.1 2018-11-30 11:54:01 +01:00
Kamil Myśliwiec
df958c9e2b enhancement(common) make multer instance protected 2018-11-30 11:53:53 +01:00
Kamil Mysliwiec
bc9aa8cdec Merge pull request #1325 from nestjs/improvement/application-ref
improvement(core) use application ref host instead of http ref
2018-11-30 11:52:26 +01:00
Kamil Mysliwiec
6b97b11665 Merge pull request #1324 from nestjs/bugfix/928-direct-instance
bugfix(core) use direct class instance
2018-11-30 11:50:26 +01:00
Kamil Mysliwiec
58d7300098 Merge pull request #1248 from andrew-yustyk/issue/1246
fix(core/common): allow to use symbol token in the module exports
2018-11-30 11:49:20 +01:00
Kamil Myśliwiec
f71613a79f Merge branch 'master' of https://github.com/nestjs/nest 2018-11-29 23:25:44 +01:00
Kamil Myśliwiec
35053d093a refactor(): remove trailing commas 2018-11-29 23:24:25 +01:00
Kamil Myśliwiec
6f85ea4f12 improvement(core) use application ref host instead of http ref 2018-11-29 23:14:11 +01:00
Kamil Mysliwiec
dd882ac1a2 Merge pull request #1287 from dzzzzzy/patch-1
docs(readme) add communication groups for Chinese developers
2018-11-29 14:21:37 +01:00
Kamil Mysliwiec
4f8d9fe694 Merge pull request #1314 from rafalschmidt97/contributing-comments-fix
docs(contributing) fix comments issues in lists
2018-11-29 14:19:26 +01:00
Kamil Myśliwiec
5a6f64a51e bugfix(core) use direct class instance 2018-11-29 14:11:31 +01:00
Rafał Schmidt
7e07ef3abb docs(contributing) fix comments issues in lists 2018-11-25 18:15:10 +01:00
bingoyao
4a5ce3b04d Update readme_zh.md
Add more state about Chinese developer communication channel.
2018-11-21 12:03:45 +08:00
Jean-Baptiste Pionnier
3a297530d8 Merge branch 'master' of github.com:nestjs/nest into refactor_simplified_if 2018-11-16 11:41:22 +01:00
bingoyao
3a84bfb7e8 Add communication groups for Chinese developers
Chinese developers are growing, and in order to allow Chinese developers to communicate and share with each other, I have established a communication group.
2018-11-14 18:55:25 +08:00
Kamil Mysliwiec
385071ba6d Update Readme.md 2018-11-10 22:29:49 +01:00
Kamil Myśliwiec
bf1a97be36 test(nestjs) bump test coverage 2018-11-10 21:54:42 +01:00
Aleksey Tsvetkov
be40001511 fixed protoLoader option 2018-11-08 11:38:56 +03:00
Aleksey Tsvetkov
4b55261aeb feat(client-grpc): added protoLoader option for grpc client 2018-11-08 11:32:32 +03:00
Aleksey Tsvetkov
1bd70484e8 feat(grpc): added option for proto-loader 2018-11-07 14:01:36 +03:00
Kamil Myśliwiec
a95b3d6048 Merge branch 'master' of https://github.com/nestjs/nest 2018-11-03 17:02:57 +01:00
Kamil Myśliwiec
1f8c84d19b test(nestjs) increase test coverage 2018-11-03 17:00:55 +01:00
Kamil Mysliwiec
7c644d989e Update Readme.md 2018-11-03 12:29:38 +01:00
Kamil Mysliwiec
cebb6267f2 Update Readme.md 2018-11-03 12:28:17 +01:00
Andrew Yustyk
644b2c1745 fix(core/common): allow to use symbol token in the module exports
Symbol token can be used in the exports section as well as the string token.

Closes #1246
2018-10-31 13:26:48 +02:00
Jean-Baptiste Pionnier
0d29cd7f96 Merge branch 'master' of github.com:jbpionnier/nest into refactor_simplified_if 2018-10-22 07:49:40 +02:00
Kamil Myśliwiec
47f0fa0ab5 chore(@nestjs) publish v5.4.0 release 2018-10-19 14:21:48 +02:00
Kamil Myśliwiec
9be35b4c10 tests(microservices) fix server-rmq unit tests 2018-10-19 14:08:19 +02:00
Kamil Myśliwiec
dd38a49508 Merge pull request #1215 from nestjs/5.4.0
chore() 5.4.0 minor release
2018-10-19 14:07:32 +02:00
Kamil Myśliwiec
b55ee078b2 Merge branch 'master' into 5.4.0 2018-10-19 14:07:23 +02:00
Kamil Myśliwiec
6eec6016a4 Merge pull request #1143 from BrunnerLivio/feature/print-context-injection-error
feature(core) add module context name to UnknownDependenciesMessage
2018-10-19 13:55:22 +02:00
Kamil Myśliwiec
9b799ba3c1 Merge pull request #1170 from nestjs/AlariCode-feature/rmq-transport
feature(microservices) RabbitMQ support
2018-10-19 13:55:08 +02:00
Kamil Myśliwiec
a2ed524824 Merge pull request #1172 from nestjs/feature/property-injection
feature(core) property based injection (composition)
2018-10-19 13:54:17 +02:00
Kamil Myśliwiec
82bf25b707 Merge pull request #1175 from nestjs/feature/nats-queue
feature(microservices) add a few options to the nats strategy + general refactor
2018-10-19 13:54:04 +02:00
Kamil Myśliwiec
ffea148892 Merge pull request #1214 from nestjs/feature/update-axios
feature(common) update axios dependency
2018-10-19 13:53:45 +02:00
Kamil Myśliwiec
b0026d8cc1 style(microservices) remove lint issues 2018-10-19 13:38:12 +02:00
Kamil Myśliwiec
313e22632b feature(core) add dynamic properties resolution 2018-10-19 13:37:00 +02:00
Kamil Myśliwiec
a299b12ad5 feature(common) update axios dependency 2018-10-19 13:23:46 +02:00
Kamil Myśliwiec
6635d2cbe1 Merge branch '5.4.0' into feature/property-injection 2018-10-19 13:22:10 +02:00
Kamil Myśliwiec
9972649770 bugfix: fix package-lock.json file 2018-10-19 13:16:45 +02:00
Kamil Myśliwiec
92cd57a19b Merge pull request #1163 from nestjs/feature/dynamic-create
feature(core) instantiate class dynamically (ModuleRef)
2018-10-19 13:16:17 +02:00
Kamil Myśliwiec
6ac9968ec0 Merge branch 'feature/property-injection' into feature/dynamic-create 2018-10-19 13:16:06 +02:00
Kamil Myśliwiec
9210dc1318 Merge pull request #1208 from jbpionnier/feat/accept_export_abstract_class
bugfix(common) accept export abstract class
2018-10-19 13:12:41 +02:00
Kamil Myśliwiec
a850d5d322 bugfix(microservices) fix issues with deps resolution 2018-10-19 13:01:54 +02:00
Kamil Myśliwiec
b0e4383e6e merge: resolve conflicts 2018-10-19 11:39:15 +02:00
Kamil Myśliwiec
935aa704fc lint: update lint rules 2018-10-19 10:12:36 +02:00
Kamil Myśliwiec
f0512d2a26 chore(@nestjs) publish v5.3.15 release 2018-10-19 09:58:30 +02:00
Kamil Myśliwiec
6f9b242410 bugfix: fix incorrect dependencies, simplify relations 2018-10-19 09:55:50 +02:00
Jean-Baptiste Pionnier
e1a9643887 feat(common): accept export abstract class 2018-10-18 15:10:57 +02:00
Jean-Baptiste Pionnier
e1b8d3b411 refactor: simplified isString 2018-10-18 12:05:35 +02:00
Jean-Baptiste Pionnier
6db29c6e3d refactor: simplified isObject 2018-10-18 12:01:39 +02:00
Jean-Baptiste Pionnier
1f59ec3458 refactor: simplified validatePath 2018-10-18 11:58:49 +02:00
Jean-Baptiste Pionnier
ff3ef16d18 refactor: simplified isFunction 2018-10-18 11:55:11 +02:00
Jean-Baptiste Pionnier
41190d7546 refactor: simplified isEmpty 2018-10-18 11:52:12 +02:00
Kamil Myśliwiec
b03e36c692 chore(@nestjs) publish v5.3.14 release 2018-10-18 08:37:26 +02:00
Kamil Myśliwiec
2383cdb412 build: fix incorrect prepublish hook 2018-10-18 00:12:05 +02:00
Kamil Myśliwiec
e9433d0fb5 Merge branch 'master' of https://github.com/nestjs/nest 2018-10-18 00:05:15 +02:00
Kamil Myśliwiec
13d473fcba chore(@nestjs) publish v5.3.13 release 2018-10-18 00:04:49 +02:00
Kamil Myśliwiec
a78a31eff2 Merge pull request #1199 from jbpionnier/refactor/void_0_not_necessary
refactor: remove void 0 not necessary
2018-10-17 23:16:35 +02:00
Jean-Baptiste Pionnier
bd05652cbe refactor: remove void 0 not necessary 2018-10-17 23:05:24 +02:00
Kamil Myśliwiec
96b0a194af chore(@nestjs) publish v5.3.12 release 2018-10-17 22:37:02 +02:00
Kamil Myśliwiec
64555bf428 bugfix: fix WsAdapter close invokation issues #1156 2018-10-17 22:09:03 +02:00
Kamil Myśliwiec
6f18afc036 bugfix(core) support symbols in exports array #1177 2018-10-17 22:02:26 +02:00
Kamil Myśliwiec
21bdbac788 Merge branch 'master' of https://github.com/nestjs/nest 2018-10-17 21:42:54 +02:00
Kamil Myśliwiec
b6d059fc30 Merge branch 'spaiter-fix-ws-client-closing' 2018-10-17 21:42:43 +02:00
Kamil Myśliwiec
a6b001638f refactor: extract handle message from WsAdapter 2018-10-17 21:42:24 +02:00
Kamil Myśliwiec
3e9bfff04e Merge branch 'fix-ws-client-closing' of https://github.com/spaiter/nest into spaiter-fix-ws-client-closing 2018-10-17 21:37:33 +02:00
Kamil Myśliwiec
186f018d76 Merge pull request #1188 from andrew-yustyk/issue/1182
bugfix(core) change initial context arguments from null to undefined
2018-10-17 21:35:46 +02:00
Kamil Myśliwiec
6dda6c58c5 Merge branch 'jbpionnier-refactor_remove_reflect_metadata' 2018-10-17 21:35:14 +02:00
Kamil Myśliwiec
bf02e984ac Merge branch 'refactor_remove_reflect_metadata' of https://github.com/jbpionnier/nest into jbpionnier-refactor_remove_reflect_metadata 2018-10-17 21:33:41 +02:00
Kamil Myśliwiec
da8612b4d6 Merge pull request #1176 from nestjs/build/refactor
build: refactor packages structure, remove bundle
2018-10-17 21:31:32 +02:00
Kamil Myśliwiec
63ae5b16e2 build: fix missing script build:lib 2018-10-17 21:20:09 +02:00
Kamil Myśliwiec
e9e277c21c ci: update travis.yml file 2018-10-17 21:14:11 +02:00
Kamil Myśliwiec
ceabe7418a build: update CONTRIBUTION guide/scripts 2018-10-17 21:13:12 +02:00
Kamil Myśliwiec
84aa4dec09 build: update gulp/package.json scripts 2018-10-17 21:07:39 +02:00
Jean-Baptiste Pionnier
40e90516f0 Merge branch 'master' of github.com:nestjs/nest into refactor_remove_reflect_metadata 2018-10-16 09:34:40 +02:00
Andrew Yustyk
35cf1faa84 bugfix(core) change initial context arguments from null to undefined
fix nestjs/nest#1182
2018-10-13 03:58:53 +03:00
anonanonimus
72a8725b21 websockets(bug) send message to client only in open state
sending messages to ws client only if it in open state

no breaking changes
2018-10-11 11:44:02 +05:00
Kamil Myśliwiec
5d27183295 Merge pull request #1179 from jbpionnier/build/hide-package-lock
build: hide package lock during a PR
2018-10-09 09:57:46 +02:00
Jean-Baptiste Pionnier
3a0f461a56 build: hide package lock 2018-10-08 11:08:30 +02:00
Kamil Myśliwiec
72616cc0f1 tests(core) fix middleware utils unit tests 2018-10-06 16:26:17 +02:00
Kamil Myśliwiec
0e71949538 chore(build) share tsconfig, add 'clean' and npmignore 2018-10-06 16:14:35 +02:00
Kamil Myśliwiec
04fe22b44e chore(build) remove bundle directory 2018-10-06 15:30:20 +02:00
Kamil Myśliwiec
06d0f12169 feature(microservices) add a few options to the nats strategy 2018-10-06 15:02:55 +02:00
Kamil Myśliwiec
1eef51345f Merge branch 'master' of https://github.com/nestjs/nest 2018-10-06 14:31:29 +02:00
Kamil Myśliwiec
b2f3dfe0b3 refactor(microservices) move utils to decorators dir, use not stringified 2018-10-06 14:31:09 +02:00
Kamil Myśliwiec
d49a265686 tests(integration) update test suite (property injection) 2018-10-06 12:50:04 +02:00
Kamil Myśliwiec
51b93e5306 feature(core) property based injection (composition) 2018-10-06 12:45:44 +02:00
Kamil Myśliwiec
656ecf831c Merge pull request #1168 from jbpionnier/build/add_lint_travis_builds
chore(build) add lint for travis build
2018-10-05 23:11:17 +02:00
Kamil Myśliwiec
e6dfef8480 content(integration) fix typo in sum-rmq spec 2018-10-05 22:43:06 +02:00
Kamil Myśliwiec
096336c243 bugfix(microservices) fix rabbit mq transport, code refactor, add tests 2018-10-05 22:42:35 +02:00
Jean-Baptiste Pionnier
fb052ab971 refactor fix lint 2018-10-05 21:12:37 +02:00
Jean-Baptiste Pionnier
84df209740 build add lint for travis build 2018-10-05 15:28:48 +02:00
Jean-Baptiste Pionnier
457c57b9dc refactor remove multiple reflect metadata 2018-10-05 15:20:45 +02:00
Kamil Myśliwiec
098afe6b85 chore(@nestjs) publish v5.3.11 release 2018-10-05 15:07:19 +02:00
Kamil Myśliwiec
3e42f9b91d chore: fix package.json scripts 2018-10-05 15:04:27 +02:00
Kamil Myśliwiec
85d7384b5e Merge pull request #1155 from jbpionnier/refactor_clean_as_any
refactor(nestjs) code style, clean "as any"
2018-10-05 15:01:37 +02:00
Kamil Myśliwiec
3e851e5652 Merge branch 'master' of https://github.com/nestjs/nest 2018-10-05 14:56:52 +02:00
Kamil Myśliwiec
e391936e69 Merge branch 'BrunnerLivio-fix/circular-structures' 2018-10-05 14:56:39 +02:00
Kamil Myśliwiec
6c92bf72ef bugfix(core) add missing fast-json-stringify dep 2018-10-05 14:55:37 +02:00
Kamil Myśliwiec
81fe7124bc Merge pull request #1144 from spaiter/fix-ws-unexpected-close
bugfix(websockets) handle ws unexpected connection error
2018-10-05 14:43:15 +02:00
Kamil Myśliwiec
20a5e7e77a Merge pull request #1151 from nestjs/bugfix/1150-defaults
bugfix(core) make use of default assignments (DI)
2018-10-05 14:42:54 +02:00
Kamil Myśliwiec
eba4102b2a Merge pull request #1159 from nestjs/refactor/websockets
refactor(websockets) code cleanup, improvements, refactor
2018-10-05 14:42:43 +02:00
Kamil Myśliwiec
402d83ff9e Merge pull request #1166 from jbpionnier/refactor_remove_multiple_reflect_metadata
refactor(common) remove multiple reflect metadata
2018-10-05 14:42:20 +02:00
Jean-Baptiste Pionnier
227d4fba56 refactor(common) remove multiple reflect metadata 2018-10-05 12:31:53 +02:00
Kamil Myśliwiec
62e0283098 feature(core) instantiate class dynamically (ModuleRef) 2018-10-04 16:28:51 +02:00
Jean-Baptiste Pionnier
8a827ff9fc Merge branch 'master' of github.com:nestjs/nest into refactor_clean_as_any 2018-10-04 10:58:42 +02:00
Jean-Baptiste Pionnier
66ee3ebe72 refactor clean as any 2018-10-04 10:49:07 +02:00
Kamil Myśliwiec
91be484b83 refactor(microservices) partially fixed rabbitmq transport (+tests) 2018-10-03 23:26:52 +02:00
Kamil Myśliwiec
8ec7c5b31e chore: resolve conflicts (merge) 2018-10-03 22:31:25 +02:00
Kamil Myśliwiec
7c2143f889 refactor(websockets) code cleanup, improvements, refactor 2018-10-03 21:22:50 +02:00
Kamil Myśliwiec
89d84d214f Merge branch 'master' of https://github.com/nestjs/nest 2018-10-03 17:23:47 +02:00
Kamil Myśliwiec
f8ffc2d064 chore(nestjs) add scripts directory 2018-10-03 17:23:36 +02:00
Kamil Myśliwiec
d453e9bc65 Update CONTRIBUTING.md 2018-10-03 17:23:30 +02:00
Kamil Myśliwiec
3a74c790bf chore(nestjs) add scripts directory 2018-10-03 17:00:08 +02:00
Kamil Myśliwiec
0c8e6968bd bugfix(@nestjs/microservices) set flag to true 2018-10-03 15:25:43 +02:00
Jean-Baptiste Pionnier
4a8c8bc740 refactor Unnecessary 'await' 2018-10-03 15:25:43 +02:00
Jean-Baptiste Pionnier
47a17e85e4 refactor clean code 2018-10-03 15:25:43 +02:00
Jean-Baptiste Pionnier
f45021e7cb refactor(integration) resolve module path 2018-10-03 15:25:43 +02:00
Livio Brunner
958da96733 bugfix(core): Allow circular structures for dynamic module #678 2018-10-03 11:47:16 +02:00
Kamil Myśliwiec
1acae78302 Merge branch 'jbpionnier-refactor_module_path' 2018-10-02 22:41:11 +02:00
Kamil Myśliwiec
f01d60021c bugfix(@nestjs/microservices) set flag to true 2018-10-02 22:40:59 +02:00
Kamil Myśliwiec
945eff5274 Merge branch 'refactor_module_path' of https://github.com/jbpionnier/nest into jbpionnier-refactor_module_path 2018-10-02 22:35:34 +02:00
Kamil Myśliwiec
9e8eff09bf Merge branch 'master' of https://github.com/nestjs/nest 2018-10-02 22:25:20 +02:00
Kamil Myśliwiec
b90842048b bugfix(@nestjs/core) make use of default assignments when optional 2018-10-02 22:23:42 +02:00
Kamil Myśliwiec
cce8c45f6f feature(@nestjs/core) add typings to adapters 2018-10-02 22:23:00 +02:00
Kamil Myśliwiec
ac5a556a3c Merge pull request #1136 from cschroeter/master
sample(prisma) update graphql-prisma example
2018-10-02 22:22:16 +02:00
anonanonimus
bf945310b5 bugfix(websockets) need to handle ws unexpected connection error and log it
Fixed unhandled ws connection error in ws-adapter

No breaking changes
2018-10-02 16:44:24 +05:00
Livio Brunner
4e943dbaae feature(core): Add module context name to UnknownDependenciesMessage 2018-10-02 12:07:14 +02:00
Jean-Baptiste Pionnier
ac295e68f6 refactor Unnecessary 'await' 2018-09-30 22:14:35 +02:00
Jean-Baptiste Pionnier
31c2b87a6a refactor clean code 2018-09-30 22:13:58 +02:00
Jean-Baptiste Pionnier
6193f506c2 refactor(integration) resolve module path 2018-09-30 21:08:44 +02:00
Christian Schröter
34f72ce4a7 chore: Regenerate schemda.d.ts 2018-09-30 00:33:42 +02:00
Christian Schröter
63947cd3c0 fix: Do not use Prisma library to generate schema 2018-09-30 00:33:18 +02:00
Christian Schröter
14cc3edb10 chore: Bump deps 2018-09-30 00:32:27 +02:00
Kamil Myśliwiec
65bb7e7c34 Update Readme.md 2018-09-26 19:48:26 +02:00
Kamil Myśliwiec
8604f25a20 Update Readme.md 2018-09-26 19:47:50 +02:00
Kamil Myśliwiec
57faedcc98 Merge pull request #1121 from nartc/patch-1
chore(github) update README.md (add new bronze sponsor)
2018-09-26 19:45:05 +02:00
Chau Tran
515151660b Add AN 2018-09-25 17:57:43 -05:00
Kamil Myśliwiec
7f124f9d92 build(nestjs) fix travis builds 2018-09-24 15:23:41 +02:00
Kamil Myśliwiec
9ffbbad4e8 chore(@nestjs) publish v5.3.10 release 2018-09-24 15:20:30 +02:00
Kamil Myśliwiec
de9664831c chore(@nestjs) publish v5.3.9 release 2018-09-24 15:17:18 +02:00
Kamil Myśliwiec
26eeeb598e chore(nestjs) publish 5.3.8 release 2018-09-24 15:14:09 +02:00
Kamil Myśliwiec
49f97cf72c chore(@nestjs) publish v5.3.8 release 2018-09-24 15:07:47 +02:00
Kamil Myśliwiec
15a6d890a5 Merge branch 'master' of https://github.com/nestjs/nest 2018-09-24 15:06:29 +02:00
Kamil Myśliwiec
a3c1bdc061 chore: update bundle 2018-09-24 15:06:26 +02:00
Kamil Myśliwiec
b75460b34f Merge pull request #1102 from nestjs/bugfix/1098-multiple-http
bugfix: multiple HttpModule collision
2018-09-24 15:06:11 +02:00
Kamil Myśliwiec
25a3684dcf chore(@nestjs) publish v5.3.7-postinstall-next release 2018-09-24 15:04:16 +02:00
Kamil Myśliwiec
9e322c1ed1 refactor(nestjs) fix invalid imports, refactor messages 2018-09-21 10:29:18 +02:00
Kamil Myśliwiec
767ccd3e92 Merge pull request #1103 from jbpionnier/refactor/enable_strict_mode
refactor(nestjs) enable strict mode
2018-09-21 09:27:26 +02:00
Kamil Myśliwiec
0368d5267c merge: resolve conflicts 2018-09-21 09:22:26 +02:00
Kamil Myśliwiec
005d16f447 refactor(nestjs) remove uncessary map calls 2018-09-21 09:21:50 +02:00
Jean-Baptiste Pionnier
d37ec239c4 refactor: clean code 2018-09-20 14:41:15 +02:00
Jean-Baptiste Pionnier
558e33f25c refactor: enable strict mode 2018-09-20 11:24:39 +02:00
Kamil Myśliwiec
5172ef3c49 bugfix(common) fix multiple HttpModule collision 2018-09-19 13:58:47 +02:00
Kamil Myśliwiec
cdccb8ed97 Merge pull request #1094 from jbpionnier/refactor/replace_index_of_methods
refactor(nestjs) replace indexOf methods & improvements
2018-09-19 13:36:55 +02:00
Kamil Myśliwiec
4d407ab239 Merge pull request #1091 from cschroeter/master
sample(prisma) update Prisma example
2018-09-19 13:27:33 +02:00
Kamil Myśliwiec
58120783d5 sample(mongoose) update packages 2018-09-19 12:18:04 +02:00
Jean-Baptiste Pionnier
9732e8a0f4 refactor: code improvement 2018-09-18 11:25:32 +02:00
Jean-Baptiste Pionnier
dabf8a24c7 refactor: replace indexOf method 2018-09-18 10:40:15 +02:00
Christian Schröter
447372a485 refactor: Extract GraphQL related configuration in a dedicated GraphqlOptions class 2018-09-14 15:10:37 +02:00
Christian Schröter
4b042af629 chore: Update graphql.schema.d.ts 2018-09-14 15:09:52 +02:00
Christian Schröter
ff828b9e86 feat: Implement all supoorted queries and mutations 2018-09-14 15:09:35 +02:00
Christian Schröter
806f079c2c chore: Remove duplicate typings 2018-09-14 14:54:42 +02:00
Christian Schröter
a2880d02bd chore: Update dependencies 2018-09-14 14:53:56 +02:00
Kamil Myśliwiec
ce498e8615 bugfix(core) revert stringify instead of hash 2018-09-13 12:21:54 +02:00
Kamil Myśliwiec
14f737f770 Merge branch 'master' of https://github.com/nestjs/nest 2018-09-13 11:46:29 +02:00
Kamil Myśliwiec
a9922dab23 bugfix(core) fix incorrent hash generated by token factory 2018-09-13 11:46:22 +02:00
Kamil Myśliwiec
b1f7096432 Merge pull request #1074 from cschroeter/master
sample(graphql) add prisma integration example
2018-09-13 11:45:33 +02:00
Kamil Myśliwiec
d5dca175d7 Merge pull request #1041 from jbpionnier/refactor/delete_resolve_factory_instance_method
refactor(core) delete resolve factory instance method
2018-09-13 11:44:29 +02:00
Kamil Myśliwiec
66c0b8cf5c sample(grpc) update packages to latest patch versions 2018-09-13 10:43:56 +02:00
Kamil Myśliwiec
e3356cf19e chore(@nestjs) publish v5.3.7 release 2018-09-13 10:42:35 +02:00
Kamil Myśliwiec
4b6ca2a3e0 bugfix(microservices) fix client with loader settings 2018-09-13 10:41:28 +02:00
Kamil Myśliwiec
137e8fd408 Merge branch 'master' of https://github.com/nestjs/nest 2018-09-13 10:20:32 +02:00
Kamil Myśliwiec
03f2832a2d sample(graphql) update graphql sample (add validation) 2018-09-13 10:20:24 +02:00
Christian Schröter
d9a9e7df2f chore: Update graphql schema definitions 2018-09-10 18:20:48 +02:00
Christian Schröter
a3fe26babf chore: Use decorators 2018-09-10 18:20:22 +02:00
Christian Schröter
71cc0dea61 chore: Get rid off obsolete jest configuration 2018-09-10 18:07:55 +02:00
Christian Schröter
6198204b0b chore(Update deps): 2018-09-10 18:07:29 +02:00
Jean-Baptiste Pionnier
32953148df Merge branch 'master' of github.com:nestjs/nest into refactor/delete_resolve_factory_instance_method 2018-09-10 17:08:58 +02:00
Christian Schröter
603ed2de28 feat: Add GraphQL-Prisma example 2018-09-10 16:44:35 +02:00
Kamil Myśliwiec
b272ec313b Update Readme.md 2018-09-09 23:23:26 +02:00
Kamil Myśliwiec
25588d83d0 test(core) fix broken unit tests (container) 2018-09-09 23:15:33 +02:00
Kamil Myśliwiec
d4c0969f1a feature(core) show more descriptive errors on barrel file issues 2018-09-09 22:56:36 +02:00
Kamil Myśliwiec
2d942a8405 test(nestjs) fix broken unit tests (context creator) 2018-09-09 18:29:56 +02:00
Kamil Myśliwiec
e0f5e1d5ca performance(nestjs) context creator improvements 2018-09-09 18:24:54 +02:00
Kamil Myśliwiec
e8c815d8ec sample(nestjs) update packages (apollo sample) 2018-09-09 17:59:11 +02:00
Kamil Myśliwiec
149176ae6f benchmarks(nestjs) use dashes instead of dots 2018-09-09 13:49:28 +02:00
Kamil Myśliwiec
fa3ee7e2aa chore(nestjs) push latest bundle 2018-09-09 13:42:04 +02:00
Kamil Myśliwiec
d5880506df chore(@nestjs) publish v5.3.6 release 2018-09-09 12:23:03 +02:00
Kamil Myśliwiec
dfd0d17126 chore(@nestjs) publish v5.3.5 release 2018-09-09 12:22:16 +02:00
Kamil Myśliwiec
9638c18020 performance(core) add headers check 2018-09-09 11:38:23 +02:00
Anton
17c5044bae feature(microservices) added amqp-connection-manager 2018-09-09 09:44:51 +03:00
Kamil Myśliwiec
9ef356b30f refactor(nestjs) cleanup, get rid of needless condition (interceptors) 2018-09-08 09:24:44 +02:00
Kamil Myśliwiec
1a7ab4e5f9 refactor(nestjs) microservices improvements, reduce memory usage 2018-09-08 09:24:06 +02:00
Anton
6099f9ec1b Merge branch 'master' into feature/rmq-transport 2018-09-08 08:48:16 +03:00
Kamil Myśliwiec
c5da005d81 sample(nestjs) update sample http cache interceptor 2018-09-05 11:40:34 +02:00
Kamil Myśliwiec
76beabe686 sample(nestjs) update sample http cache interceptor 2018-09-05 10:07:50 +02:00
Kamil Myśliwiec
e766ea72ba chore(nestjs) publish 5.3.5 release 2018-09-05 10:04:54 +02:00
Kamil Myśliwiec
2f535c33ae chore(@nestjs) publish v5.3.5 release 2018-09-05 10:04:15 +02:00
Kamil Myśliwiec
20dd9fc8ca bugfix(common) remove useless parts of cache interceptor 2018-09-05 10:03:28 +02:00
Kamil Myśliwiec
6110526402 chore(@nestjs) publish v5.3.4 release 2018-09-05 09:38:05 +02:00
Kamil Myśliwiec
0a1f44ac4d bugfix(common) export CACHE_MANAGER, fix trackBy method 2018-09-05 09:37:33 +02:00
Kamil Myśliwiec
d048f23ff8 improvement(microservices) ensure that connection is shared across promises 2018-09-05 09:37:09 +02:00
Kamil Myśliwiec
f5f8255a37 bugfix(core) check bootstrap lifecycle hook 2018-09-05 09:36:23 +02:00
Kamil Myśliwiec
cc4d91fcb3 chore(@nestjs) publish v5.3.3 release 2018-09-04 11:48:10 +02:00
Jean-Baptiste Pionnier
b296cabd35 refactor: resolve module path 2018-09-03 21:34:15 +02:00
Jean-Baptiste Pionnier
b8a66efbba refactor: delete unnecessary resolveFactoryInstance method 2018-09-03 21:31:16 +02:00
Kamil Myśliwiec
89c76a682e chore(nestjs) publish 5.3.2 release 2018-09-03 18:05:35 +02:00
Kamil Myśliwiec
63577b9986 chore(@nestjs) publish v5.3.2 release 2018-09-03 18:01:18 +02:00
Kamil Myśliwiec
713e97f6c3 chore(nestjs) publish 5.3.1 release 2018-09-03 17:10:59 +02:00
Kamil Myśliwiec
c392da09a6 Merge branch 'master' of https://github.com/nestjs/nest 2018-09-03 17:10:16 +02:00
Kamil Myśliwiec
02d4841d05 chore(@nestjs) publish v5.3.1 release 2018-09-03 17:09:48 +02:00
Kamil Myśliwiec
cbe9ed4980 Merge pull request #1036 from cschroeter/master
sample(nestjs) update GraphQL example
2018-09-03 12:52:59 +02:00
Kamil Myśliwiec
d654e5e84f deps(nestjs) replace generate-safe-id with uuid 2018-09-03 12:52:25 +02:00
Christian Schröter
9d2bd82173 Enable subscriptions in GraphQLModule 2018-09-03 12:25:53 +02:00
Christian Schröter
02affa5677 Update and clean up dependencies 2018-09-03 12:25:07 +02:00
Kamil Myśliwiec
71a023ebae Merge branch 'master' of https://github.com/nestjs/nest 2018-09-02 22:47:57 +02:00
Kamil Myśliwiec
aa75b52255 build(nestjs) fix package-lock.json 2018-09-02 22:47:47 +02:00
Kamil Myśliwiec
6cf7cdc2a6 Merge pull request #1008 from jbpionnier/refactor/unnecessary_instanceof_promise
refactor(nestjs) unnecessary instanceOf Promise deletion
2018-09-02 22:43:37 +02:00
Kamil Myśliwiec
5b804f5a35 tests(microservices) fix broken options unit tests 2018-09-02 22:42:05 +02:00
Kamil Myśliwiec
b348920d25 build(nestjs) update bundle, add opencollective 2018-09-02 22:31:39 +02:00
Kamil Myśliwiec
b6fe9b06cc refactor(microservices) remove unecessary options object 2018-09-02 22:31:11 +02:00
Kamil Myśliwiec
fde2041f17 sample(nestjs) update framework to 5.3.0 in all samples 2018-08-31 16:30:03 +02:00
Kamil Myśliwiec
7a4b0e64ad Merge branch '5.3.0' 2018-08-31 13:18:21 +02:00
Kamil Myśliwiec
afe9c4b5f4 sample(@nestjs) update auth and graphql sample 2018-08-31 13:18:02 +02:00
Kamil Myśliwiec
5e6694cb8b Merge pull request #1024 from nestjs/5.3.0
chore(nestjs) publish minor release 5.3.0
2018-08-31 13:09:39 +02:00
Kamil Myśliwiec
d20f6bb653 chore(nestjs) publish 5.3.0 minor release 2018-08-31 12:47:11 +02:00
Kamil Myśliwiec
e8032f37fc chore(@nestjs) publish v5.3.0 release 2018-08-31 12:46:22 +02:00
Kamil Myśliwiec
cae159e77c sample(@nestjs) update gateways and graphql sample 2018-08-31 12:24:50 +02:00
Kamil Myśliwiec
47812f5822 refactor(@nestsjs) replace underlying http server (express) 2018-08-31 12:24:29 +02:00
Kamil Myśliwiec
afa9903882 refactor(@nestjs/common) rename class serializer 2018-08-31 12:23:51 +02:00
Kamil Myśliwiec
a7d465bfa1 enhancement(@nestjs/core) injector improvements (circular dependencies) 2018-08-31 12:23:22 +02:00
Kamil Myśliwiec
95dfd59e4e sample(@nestjs) add class serializer sample 2018-08-27 16:58:39 +02:00
Kamil Myśliwiec
08e6278a77 sample(common) add cache module sample 2018-08-27 16:58:24 +02:00
Kamil Myśliwiec
fbf47a2825 feature(common) add class serializer interceptor 2018-08-27 16:57:46 +02:00
Kamil Myśliwiec
643e84c49a feature(common) cache module 2018-08-27 16:57:12 +02:00
Kamil Myśliwiec
25c7e8909e enhancement(common) add default options to MulterModule 2018-08-27 16:56:41 +02:00
Kamil Myśliwiec
0d5972c66b build(@nestjs) force compilation (new bundle) 2018-08-27 16:55:46 +02:00
Kamil Myśliwiec
394d7f23bf refactor(common) move multer module spec files 2018-08-27 12:25:29 +02:00
Kamil Myśliwiec
09d9c6597f refactor(common) move file interceptors to files module 2018-08-27 08:59:40 +02:00
Kamil Myśliwiec
1d8c8ee264 refactor(@nestjs) update dependencies 2018-08-27 08:59:15 +02:00
Kamil Myśliwiec
5a9d6d6d14 sample(nestjs) update auth sample 2018-08-27 00:01:57 +02:00
Kamil Myśliwiec
4d13ee8100 feature(common) add MulterModule 2018-08-27 00:00:51 +02:00
Kamil Myśliwiec
6b0ae0602c feature(websockets) support ack in socketio, enhancements 2018-08-26 23:59:30 +02:00
Kamil Myśliwiec
d0bd2f7b20 Update CONTRIBUTING.md 2018-08-26 23:59:10 +02:00
Jean-Baptiste Pionnier
5f965cf174 refactor: unnecessary instanceOf Promise deletion 2018-08-26 21:05:14 +02:00
Kamil Myśliwiec
504a10ce5e Merge branch 'master' of https://github.com/nestjs/nest 2018-08-25 15:48:03 +02:00
Kamil Myśliwiec
a9abd1c2ea sample(@nestjs) update graphql example, add integration test 2018-08-25 15:47:46 +02:00
Kamil Myśliwiec
e7e859adce Merge pull request #989 from BrunnerLivio/feature/add-im-a-teapot-exception
feature(@nestjs/common) add im a teapot exception
2018-08-25 14:44:08 +02:00
Kamil Myśliwiec
0c98a65e79 chore(@nestjs) publish 5.2.2 release 2018-08-24 12:43:03 +02:00
Kamil Myśliwiec
cd30d7a4a5 chore(@nestjs) publish v5.2.2 release 2018-08-24 12:42:29 +02:00
Kamil Myśliwiec
a6d837e64a bugfix(@nestjs/common) fix custom decorators (data isnt always string) 2018-08-24 12:13:48 +02:00
Kamil Myśliwiec
0904b0ba56 Merge branch 'master' of https://github.com/nestjs/nest 2018-08-24 10:38:12 +02:00
Kamil Myśliwiec
150c81e397 feature(@nestjs/core) add prefix property to ServeStaticOptions 2018-08-24 10:35:04 +02:00
Kamil Myśliwiec
1717f35717 Merge pull request #997 from alerosa/fix-auth-sample-missing-dependency
example(@nestjs) add @nestjs/jwt to auth sample dependencies
2018-08-23 08:53:01 +02:00
alerosa
61b6b346da add @nestjs/jwt to auth sample dependencies 2018-08-23 00:55:19 +01:00
Kamil Myśliwiec
b02fb57d8f chore(@nestjs) publish 2.3.1 patch release 2018-08-22 22:00:42 +02:00
Kamil Myśliwiec
cb302e6719 chore(@nestjs) publish v5.2.1 release 2018-08-22 21:59:35 +02:00
Kamil Myśliwiec
1f9030c504 Merge branch 'master' of https://github.com/nestjs/nest 2018-08-22 21:58:18 +02:00
Kamil Myśliwiec
af5a4af675 chore(@nestjs) publish v5.2.1 release 2018-08-22 21:57:52 +02:00
Kamil Myśliwiec
664321465c Update Readme.md 2018-08-22 21:16:43 +02:00
Kamil Myśliwiec
f6d4b5e82a test(@nestjs/common) exclude load package 2018-08-22 20:21:55 +02:00
Kamil Myśliwiec
09c9f704e5 Merge pull request #909 from nestjs/5.2.0
chore(@nestjs) publish 5.2.0 minor release
2018-08-22 15:47:53 +02:00
Kamil Myśliwiec
8a8b780273 chore(@nestjs) publish 5.2.0 minor release 2018-08-22 15:44:30 +02:00
Kamil Myśliwiec
1f0de4923e chore(@nestjs) publish v5.2.0 release 2018-08-22 15:37:56 +02:00
Kamil Myśliwiec
d5833e3e4b feature(@nestjs/core) extract helpers to context utils class 2018-08-22 14:37:07 +02:00
Kamil Myśliwiec
deffcdcd84 example(@nestjs) update examples - auth, graphql 2018-08-22 14:36:43 +02:00
Livio Brunner
ba2eeeeac7 feature(@nestjs/common) add im a teapot exception
"It’s a reminder that the underlying
processes of computers
are still made by humans.
It'd be a real shame to see 418 go."
2018-08-21 13:43:50 +02:00
Kamil Myśliwiec
36b94b37d0 feature: add enhancers to custom decorator factory, fixes 2018-08-17 14:55:27 +02:00
Anton
c5a752c7da Merge branch 'master' into feature/rmq-transport 2018-08-16 18:14:10 +03:00
Kamil Myśliwiec
85b93260e2 refactor(@nestjs) resolve merge conflicts 2018-08-16 16:30:33 +02:00
Kamil Myśliwiec
94f74a485b packages(@nestjs/core) add path-to-regexp to dependencies 2018-08-16 16:29:53 +02:00
Kamil Myśliwiec
b4253525fe Merge pull request #977 from nestjs/feature/938-hierarchical-lifecycle
feature(@nestjs/core) add hierarchical lifecycle hooks #938
2018-08-16 16:23:25 +02:00
Kamil Myśliwiec
c38c91217c feature(@nestjs/core) add hierarchical lifecycle hooks #938 2018-08-16 16:11:18 +02:00
Kamil Myśliwiec
f024af4912 Merge pull request #975 from nestjs/bugfix/fastify-wildcard
bugfix(@nestjs/core) middleware wildcard is not working with fastify
2018-08-16 15:11:43 +02:00
Kamil Myśliwiec
6976ffe079 bugfix(@nestjs/core) middleware wildcard is not working with fastify 2018-08-16 15:08:50 +02:00
Kamil Myśliwiec
2812c3863d Merge pull request #895 from jbpionnier/feature/grpc-loader
feature(@nestjs/microservices) load proto with proto-loader
2018-08-16 14:13:52 +02:00
Kamil Myśliwiec
9ad7927c4c Merge pull request #974 from nestjs/bugfix/948-nats-wildcards
bugfix(@nestjs/microservices) fix nats wildcards
2018-08-16 14:13:32 +02:00
Kamil Myśliwiec
afae462b6e Merge pull request #955 from jbpionnier/refactor/use_some_method
refactor(@nestjs) use some() method (arrays)
2018-08-16 14:08:36 +02:00
Kamil Myśliwiec
62e733c018 test(@nestjs/microservices) fix failing unit tests 2018-08-16 14:07:37 +02:00
Kamil Myśliwiec
d446a56381 bugfix(@nestjs/microservices) fix nats wildcards 2018-08-16 13:50:56 +02:00
Anton
f3a80ab7c5 feature(@nestjs/microservices) fixed tests 2018-08-11 15:32:54 +03:00
Jean-Baptiste Pionnier
2bdf47a572 refactor: use some method 2018-08-09 08:27:39 +02:00
Jean-Baptiste Pionnier
caf99c6cf8 bugfix(@nestjs/microservice) fix invalid proto 2018-08-09 07:45:33 +02:00
Jean-Baptiste Pionnier
5415659fb9 feature(@nestjs/microservices) use grpc/proto-loader 2018-08-08 16:58:09 +02:00
Kamil Myśliwiec
e967ba15cf Merge pull request #936 from nestjs/bugfix/935-file-interceptor
bugfix(@nestjs/common) fix multiple file interceptors issue
2018-08-02 09:33:10 +02:00
Kamil Myśliwiec
0b191fbd17 bugfix(@nestjs/common) fix multiple file interceptors issue 2018-08-02 09:32:12 +02:00
Kamil Myśliwiec
2ea58acc70 sample(@nestjs) fix paths join usage 2018-08-01 22:38:47 +02:00
Kamil Myśliwiec
1f59a81c28 Merge branch 'master' into 5.2.0 2018-08-01 22:38:23 +02:00
Kamil Myśliwiec
fbcb18c978 Merge pull request #934 from nestjs/feature/926-use-logger
feature(@nestjs/core) add useLogger() to Nest context #926
2018-08-01 22:34:48 +02:00
Kamil Myśliwiec
dd7bb313f4 Merge pull request #933 from nestjs/feature/847-optional-decorator
feature(@nestjs/core) add @Optional() decorator #847
2018-08-01 22:34:16 +02:00
Kamil Myśliwiec
946ed2e339 feature(@nestjs/core) add useLogger() to Nest context #926 2018-08-01 22:33:02 +02:00
Kamil Myśliwiec
96da5bd9c5 feature(@nestjs/core) add @Optional() decorator #847 2018-08-01 22:31:39 +02:00
Kamil Myśliwiec
9f77d5f550 bugfix(@nestjs/common) revert @Catch() validation 2018-08-01 21:09:12 +02:00
Kamil Myśliwiec
9e6cf1f1aa Merge pull request #911 from Patrick-Remy/patch-1
sample(@nestjs) fix path.join arguments seperation
2018-08-01 20:34:32 +02:00
Kamil Myśliwiec
d92fa0dee1 Merge branch 'master' into 5.2.0 2018-08-01 20:10:53 +02:00
Kamil Myśliwiec
63109f5717 bugfix(@nestjs/common) fix pipes typing issue 2018-08-01 20:09:19 +02:00
Kamil Myśliwiec
dc33ea57ef Merge pull request #903 from nestjs/feature/module-ref
feature(@nestjs/core) expose container to ModuleRef, add close()
2018-08-01 20:08:49 +02:00
Kamil Myśliwiec
780bd9c0f9 Merge pull request #904 from nestjs/feature/846-axios
feature(@nestjs/common) add configurable dynamic module (HttpModule)
2018-08-01 20:08:06 +02:00
Kamil Myśliwiec
a79041d211 Merge pull request #908 from nestjs/feature/860-default-filter
feature(@nestjs) expose default exception filters #860
2018-08-01 19:55:16 +02:00
Kamil Myśliwiec
eda8e293c3 chore(@nestjs) add package-lock.json 2018-08-01 19:52:25 +02:00
Kamil Myśliwiec
fd797b1a69 chore(@nestjs) fix gulpfile 2018-08-01 19:47:33 +02:00
Kamil Myśliwiec
fd098fc3f7 chore(@nestjs) fix gulp scripts 2018-08-01 19:40:18 +02:00
Kamil Myśliwiec
1be2ccdb0b Update Readme.md 2018-07-31 13:43:07 +02:00
Anton
014a7c92af feature(@nestjs/microservices) Integration tests 2018-07-26 17:43:27 +03:00
Anton
4bfbb8b9dd feature(@nestjs/microservices) Fixed startAllMicroservicesAsync 2018-07-26 17:07:38 +03:00
Kamil Myśliwiec
cb46174bae Merge pull request #906 from nestjs/bugfix/892-custom-decorators
bugfix(@nestjs/common) data parameter is not required (custom decorators)
2018-07-26 15:04:14 +02:00
Kamil Myśliwiec
ac1578793f Merge pull request #902 from nestjs/feature/720-decorators-validation
enhancement(@nestjs/common) add validation to @catch() decorator
2018-07-26 14:55:11 +02:00
Kamil Myśliwiec
525922ee69 Merge pull request #907 from nestjs/bugfix/879-injectable-inheritance
bugfix(@nestjs/core) inherited metadata is not applied #879
2018-07-26 14:54:32 +02:00
Patrick-Remy
5327979745 Fix path.join arguments seperation 2018-07-26 10:40:50 +02:00
Kamil Myśliwiec
3a0e404832 Merge pull request #901 from nestjs/bugfix/854-mixing-testing
bugfix(@nestjs/common) fix mixin testing issue #854
2018-07-25 20:08:24 +02:00
Kamil Myśliwiec
55b1f1e08e Merge pull request #900 from nestjs/bugfix/671-dynamic-modules
bugfix(@nestjs/core) enable dynamic modules recursive imports #671
2018-07-25 20:03:40 +02:00
Kamil Myśliwiec
a05383c635 Merge pull request #644 from DanielRuf/chore/add-nodejs-10
chore(@nestjs): add Node.js 10 (travis)
2018-07-25 19:57:09 +02:00
Kamil Myśliwiec
86abc0001c Merge branch '5.2.0' into chore/add-nodejs-10 2018-07-25 19:56:49 +02:00
Kamil Myśliwiec
c4ff2e736a Merge pull request #642 from DanielRuf/chore/cache-node-modules
chore(@nestjs): cache node_modules
2018-07-25 19:54:42 +02:00
Kamil Myśliwiec
d00d5f2996 Merge branch '5.2.0' into chore/cache-node-modules 2018-07-25 19:54:28 +02:00
Kamil Myśliwiec
5f0f6e5b61 Merge pull request #878 from wbhob/npm6-scripts
chore(): rename prepublish commands to prepare
2018-07-25 19:53:40 +02:00
Kamil Myśliwiec
f39573007c Merge pull request #877 from wbhob/master
refactor(): reduce complexity of NestFactory.create signature
2018-07-25 19:49:50 +02:00
Kamil Myśliwiec
f7a367e895 Merge pull request #814 from BrunnerLivio/master
feature(@nestjs/core) display known dependency names in unknown dependency exception
2018-07-25 19:43:21 +02:00
Kamil Myśliwiec
dcba92190f feature(@nestjs) add barrel files 2018-07-25 18:49:24 +02:00
Kamil Myśliwiec
614d57f130 feature(@nestjs) expose default exception filters 2018-07-25 18:47:40 +02:00
Kamil Myśliwiec
9e170c4ae4 bugfix(@nestjs/core) inherited metadata is not applied #879 2018-07-25 13:57:45 +02:00
Kamil Myśliwiec
85070a5c9c refactor: cleanup 2018-07-25 13:17:29 +02:00
Kamil Myśliwiec
f86fc35fa7 refactor: cleanup 2018-07-25 13:16:58 +02:00
Kamil Myśliwiec
53184b8df0 bugfix(@nestjs/common) data parameter is not required (custom decorators) #892 2018-07-25 13:16:05 +02:00
Kamil Myśliwiec
f385d5c47d feature(@nestjs/common) add configurable dynamic module (HttpModule) 2018-07-24 22:32:10 +02:00
Kamil Myśliwiec
1527e12013 feature(@nestjs/core) expose container to ModuleRef, add close() to NestContext 2018-07-24 22:07:14 +02:00
Kamil Myśliwiec
58800f69b1 enhancement(@nestjs/common) add validation to @Catch() decorator 2018-07-24 20:18:10 +02:00
Kamil Myśliwiec
049da42d4a enhancement(@nestjs/common) add validation to @Catch() decorator 2018-07-24 20:17:54 +02:00
Kamil Myśliwiec
21f2e8a9f7 bugfix(@nestjs/common) fix mixin testing issue #854 2018-07-24 19:55:09 +02:00
Kamil Myśliwiec
432b777f2c bugfix(@nestjs/core) enable dynamic modules recursive imports #671 2018-07-24 16:47:53 +02:00
Kamil Myśliwiec
e39c9d920d bugfix(@nestjs/core) add circular dependency (related modules) check 2018-07-24 16:23:53 +02:00
Kamil Myśliwiec
b84c2b0884 bugfix(@nestjs/core) add circular dependency (related modules) check 2018-07-24 16:10:10 +02:00
Anton
e0d1364e45 feature(@nestjs/microservices) Added additional options and fixes 2018-07-20 18:01:21 +03:00
Anton
bb73598c4c Merge branch 'master' into feature/rmq-transport 2018-07-19 21:49:25 +03:00
Anton
76fea94965 Merge updates 2018-07-19 21:48:31 +03:00
Anton
75e16b40d0 Merge branch 'master' into feature/rmq-transport 2018-07-19 19:29:53 +03:00
Anton
adfa76981d Merge branch 'feature/rmq-transport' 2018-07-19 19:29:26 +03:00
Anton
e7e4bbdd57 feature(@nestjs/microservices) updated package-lock 2018-07-19 19:26:43 +03:00
Anton
6ce0e38951 feature(@nestjs/microservices) revert lock file to resolve conflicts 2018-07-19 19:20:20 +03:00
Anton
bcb6c5f69a feature(@nestjs/microservices) boost performance with correlationID 2018-07-18 12:37:06 +03:00
Anton
0ddc86ee88 test(@nestjs/microservices) tests for rqm transport 2018-07-17 18:52:49 +03:00
Livio Brunner
e4d0118e9d refactor(@nestjs/core) change any[] types to a custom interface 2018-07-16 10:45:33 +02:00
Wilson Hobbs
0bf98c46cb chore(): rename prepublish commands to prepare, to comply with https://docs.npmjs.com/misc/scripts#deprecation-note 2018-07-15 12:43:12 -04:00
Wilson Hobbs
442b08fdb9 refactor(): reduce complexity of NestFactory.create signature 2018-07-15 12:30:55 -04:00
Livio Brunner
9c2a9d76d2 refactor(@nestjs/core) rename args parameter to dependencies 2018-07-15 13:25:17 +02:00
Livio Brunner
a354741c31 fix(@nestjs/core) show token name in unk. dep. exception message 2018-07-09 17:49:32 +02:00
Anton
ffe4529018 Merge remote-tracking branch 'origin/feature/rmq-transport' into feature/rmq-transport 2018-07-08 08:31:24 +03:00
Anton
685dc33a56 feature(@nestjs/microservices) added rmq transport support 2018-07-08 08:30:55 +03:00
Anton
3da993e2df Added RMQ Client and Server 2018-07-07 23:33:18 +03:00
Kamil Myśliwiec
8d62307987 sample(@nestjs) update packages 2018-07-05 17:37:44 +02:00
Kamil Myśliwiec
e2de979081 build(@nestjs) fix README copy&move 2018-07-05 14:38:30 +02:00
Kamil Myśliwiec
0f62bcd41f chore(@nestjs) publish 5.1.0 release 2018-07-05 14:31:21 +02:00
Kamil Myśliwiec
d4c9644368 chore(@nestjs) publish v5.1.0 release 2018-07-05 14:28:27 +02:00
Kamil Myśliwiec
0c4fe26c21 sample(@nestjs) move public and views dirs outside of the src 2018-07-05 09:10:10 +02:00
Kamil Myśliwiec
3cf8607b20 enhancement(@nestjs/microservices) disable internal gRPC errors swallow 2018-07-04 23:17:02 +02:00
Kamil Myśliwiec
3d2d838bd1 bugfix(@nestjs/core) multi global providers issue #812 2018-07-04 19:36:29 +02:00
Kamil Myśliwiec
a9204cb399 bugfix(@nestjs/testing) await scan() operation 2018-07-04 18:30:08 +02:00
Kamil Myśliwiec
bd3b102c2f Merge branch 'master' of https://github.com/nestjs/nest 2018-07-04 17:46:44 +02:00
Kamil Myśliwiec
9cf27a35dd feature(@nestjs/core) add axiosRef to the HttpService #842 2018-07-04 17:46:14 +02:00
Kamil Myśliwiec
c1c5b15859 Merge pull request #839 from Y0hy0h/patch-1
refactor(@nestjs/core) rephrase error messages
2018-07-04 16:33:58 +02:00
Y0hy0h
3e55de545f refactor(core) rephrase error messages
Fixes typo, clarifies what actions are expected.
2018-07-03 17:11:33 +02:00
Kamil Myśliwiec
ced6729157 Update Readme.md 2018-06-29 20:44:34 +02:00
Kamil Myśliwiec
a57eb17640 Update Readme.md 2018-06-29 20:44:13 +02:00
Kamil Myśliwiec
6c2863d709 Merge pull request #823 from ZQun/patch-2
Update Chinese guide format
2018-06-29 18:39:26 +02:00
Kamil Myśliwiec
fc05b244a8 Merge pull request #822 from ZQun/patch-1
Update Chinese guide format
2018-06-29 18:38:58 +02:00
ZQun
c80fd77416 Update Chinese guide format
Update Chinese guide format
2018-06-28 11:10:02 +08:00
ZQun
e2d15db3f4 Update Chinese guide format
Update Chinese guide format
2018-06-28 11:02:39 +08:00
Livio Brunner
8057a5cf19 feature(@nestjs/core) display dependency names in unknown dependency ex
This feature displays the found dependency names when any unknown
dependency is getting injected. Before this feature the error message
gets displayed like (?, +). After this implementation, like this e.g.
(?, CatsService).
2018-06-26 10:49:16 +02:00
Kamil Myśliwiec
a6ab849df2 Merge pull request #808 from autaut03/autaut03-fix/forbiddenNotHttpException
bugfix(@nestjs/core): use ForbiddenException instead of HttpException
2018-06-25 13:41:09 +02:00
Alex_Wells
7143d3b8ac bugfix(@nestjs/core): use ForbiddenException instead of HttpException
Two modified files are the only places in the whole framework where HttpException specifically is used
and used to be used wrong. It's easier to handle and catch ForbiddenException (and other HttpException
child) rather than having to compare HttpStatus to catch it. As ForbiddenException extends HttpException
and provides same HttpStatus, old code catching HttpException still works.
2018-06-24 20:50:30 +03:00
Kamil Myśliwiec
be6d90ace2 feature(@nestjs/core) enable deffered dynamic modules 2018-06-24 13:26:55 +02:00
Kamil Myśliwiec
7023905b53 feature(@nestjs/core) FastifyAdapter matches URL and request method 2018-06-22 10:41:52 +02:00
Kamil Myśliwiec
f4817ee4eb feature(@nestjs/common) add error messages disabled mode (ValidationPipe) 2018-06-21 23:00:33 +02:00
Kamil Myśliwiec
a87eee0849 example(@nestjs) fix HttpExceptionFilter example (missing status) 2018-06-21 22:43:50 +02:00
Kamil Myśliwiec
a8803fd166 Merge branch 'master' of https://github.com/nestjs/nest 2018-06-21 22:19:43 +02:00
Kamil Myśliwiec
18f68d96b7 Merge branch 'thg303-feature/add-FileFieldsInterceptor' 2018-06-21 22:19:18 +02:00
Kamil Myśliwiec
ecd61e3777 feature(@nestjs/common) add field name to the @UploadedFile() decorator 2018-06-21 22:18:55 +02:00
Kamil Myśliwiec
10eeac9ae7 Merge branch 'feature/add-FileFieldsInterceptor' of https://github.com/thg303/nest into thg303-feature/add-FileFieldsInterceptor 2018-06-21 22:02:46 +02:00
Kamil Myśliwiec
59e6a3d262 Merge pull request #802 from nestjs/790-feature-middleware
feature(@nestjs/core) superior MiddlewareConsumer, add exclude
2018-06-21 21:59:08 +02:00
Kamil Myśliwiec
292fe2136c Merge branch 'micmro-feature/grpc-cancellation' 2018-06-21 21:53:43 +02:00
Kamil Myśliwiec
f80cd9edd1 refactor(@nestjs/microservices) extract magic strings into constants 2018-06-21 21:51:48 +02:00
Kamil Myśliwiec
adbfae2b71 Merge branch 'feature/grpc-cancellation' of https://github.com/micmro/nest into micmro-feature/grpc-cancellation 2018-06-21 21:23:40 +02:00
Kamil Myśliwiec
4cfda07b2a tests(@nestjs/core) fix failing unit tests 2018-06-21 21:22:14 +02:00
Kamil Myśliwiec
3ac7802315 Merge branch 'master' of https://github.com/nestjs/nest 2018-06-21 20:51:04 +02:00
Kamil Myśliwiec
1813e5a09c build(@nestjs) add copy README gulp script 2018-06-21 20:50:50 +02:00
Kamil Myśliwiec
c9184acee1 feature(@nestjs/core) superior MiddlewareConsumer, add exclude 2018-06-21 15:48:31 +02:00
Kamil Myśliwiec
1c98d6b18c Merge pull request #795 from nestjs/734-bugfix-validation
bugfix(@nestjs/common) ValidationPipe throws 500 error
2018-06-20 17:51:18 +02:00
Kamil
7172671dcc Merge branch 'master' of https://github.com/nestjs/nest 2018-06-20 17:49:14 +02:00
Kamil
294e269ede Merge branch 'RivaCode-message_pattern_string-key' 2018-06-20 17:48:54 +02:00
Kamil
00c98501ff enhancement(@nestjs/microservices) use isString helper instead 2018-06-20 17:47:17 +02:00
Kamil Myśliwiec
51d5be4e9d Merge pull request #794 from nestjs/772-bugfix-testing
bugfix(@nestjs/core) issue #772 testing - too restrictive typings
2018-06-20 17:37:59 +02:00
Kamil
f86c0e33c4 Merge branch 'message_pattern_string-key' of https://github.com/RivaCode/nest into RivaCode-message_pattern_string-key 2018-06-20 17:36:58 +02:00
Kamil
3888d8ee8b bugfix(@nestjs/common) ValidationPipe throws 500 error 2018-06-20 17:34:00 +02:00
Kamil
8029796193 bugfix(@nestjs/core) testing utilities typings are too restrictive 2018-06-20 17:33:13 +02:00
Kamil
f3c28f57ac refactor(@nestjs/common) reorganize imports in create route param 2018-06-20 17:21:56 +02:00
Kamil
03db0d357a improvement(@nestjs/common) add missing typings to custom param factory 2018-06-20 17:15:55 +02:00
Kamil
7ad6095e16 Merge branch 'master' of https://github.com/nestjs/nest 2018-06-20 17:13:10 +02:00
Kamil Myśliwiec
617bc70944 Merge pull request #788 from Defenderbass/bugfix/types_in_createParamDecorator
bugfix(@nestjs/common) changes the types of arguments in createParamD…
2018-06-20 17:12:49 +02:00
Kamil
f2d2d56111 bundle(@nestjs/core) remove needless middlewares directory 2018-06-20 17:11:08 +02:00
Kamil Myśliwiec
84d31f9449 Update Readme.md 2018-06-19 09:54:59 +02:00
Igor Katsuba
da3745f386 bugfix(@nestjs/common) changes the types of arguments in createParamDecorator 2018-06-18 10:39:27 +03:00
Stas Rivkin
7e47100d3e bugfix(@nestjs/microservices): messagePattern string key
stringify on a string key added an extra parentheses to the pattern
2018-06-17 14:32:15 +03:00
Michael
0c8e8fb4f7 chore(@nestjs/microservices) add tests to grpc clients disconnection 2018-06-10 23:38:21 +02:00
Michael Mrowetz
f337206785 chore(microservice) tests for grpc cancelling - server side 2018-06-09 17:25:58 +02:00
Michael Mrowetz
3984bc92f2 fix(tests) fix the grpc tests 2018-06-08 17:51:31 +02:00
Michael
89fe60a213 chore(@nestjs/microservices) improve ClientGrpcProxy.getService typing 2018-06-08 15:24:24 +02:00
Michael
3ebec419fe feature(@nestjs/microservices) allow grpc clients to disconnect
- when client cancels the server stream gets completed too
- client introduced disconnection does not throw errors on the client side
- release client's event listener on 'end'
2018-06-08 15:21:37 +02:00
Kamil Myśliwiec
fed2459677 Merge pull request #750 from ltciro/fix_typo_01catsapp_guard
sample(@nestjs) fix hasRole is not a function (01-cats-app)
2018-06-04 22:34:18 +02:00
Kamil Myśliwiec
33c7049d71 Merge pull request #760 from yingye/master
Update readme_zh.md
2018-06-04 21:43:14 +02:00
yingye
e44f51d647 update readme_zh.md 2018-06-04 18:52:04 +08:00
Laura Ciro
31aa2f09c5 sample(@nestjs) fix hasRole is not a function (01-cats-app) 2018-05-30 23:37:36 -05:00
Ali Ghanavatian
3fffc01890 feature(@nestjs/common) add file-fields interceptor
usage will be like:
```import {FileFieldsInterceptor} from '@nest/common';

@UseInterceptors(FileFieldsInterceptor([{name: 'avatar', maxCount: 1},
{name: 'passport', maxCount: 1}]))
```
2018-05-30 19:32:05 +04:30
Kamil Myśliwiec
e1abf80569 Update Readme.md 2018-05-28 09:44:41 +02:00
Kamil Myśliwiec
a7fde9b6cc Update Readme.md 2018-05-26 20:44:02 +02:00
Kamil Myśliwiec
92d3ed48db integration(@nestjs) add mongoose integration test 2018-05-26 14:51:10 +02:00
Kamil Myśliwiec
c5455de9d1 chore(@nestjs) publish v5.0.1 release 2018-05-25 13:26:37 +02:00
Kamil Myśliwiec
7b5b054818 integration(@nestjs) add typeorm integration test 2018-05-25 12:48:38 +02:00
Kamil Myśliwiec
17a609cd9c feature(@nestjs/microservices) grpc improvements (add root), cleanup 2018-05-25 12:44:18 +02:00
Kamil Myśliwiec
ae128f6e91 feature(@nestjs/testing) add error logs in the testing mode (#709, #713) 2018-05-20 15:06:03 +02:00
Kamil Myśliwiec
cb24ca9ee5 bugfix(@nestjs/websockets) handle invalid payloads (#683) 2018-05-20 15:04:04 +02:00
Kamil Myśliwiec
e37b9f7d81 bugfix(@nestjs/core) support circular deps in dynamic modules (#678) 2018-05-20 15:02:32 +02:00
Kamil Myśliwiec
55600edb2d docs(@nestjs) add PULL_REQUEST_TEMPLATE 2018-05-19 10:32:27 +02:00
Kamil Myśliwiec
033068b5d7 Update CONTRIBUTING.md 2018-05-19 10:30:09 +02:00
Kamil Myśliwiec
9ea7db9160 Merge branch 'master' of https://github.com/nestjs/nest 2018-05-19 10:25:54 +02:00
Kamil Myśliwiec
1801bf86b6 Update readme_zh.md 2018-05-19 10:25:32 +02:00
Kamil Myśliwiec
ba5c59bc34 Merge pull request #700 from zuohuadong/patch-1
chore(readme) upgrade chinese
2018-05-19 10:23:51 +02:00
Kamil Myśliwiec
bf30a304d8 Merge pull request #702 from alQlagin/patch-1
bugfix(@nestjs/common) incorrect aixos methods in HttpService
2018-05-19 10:23:25 +02:00
Alex Kulagin
310d530308 Fix: incorrect aixos methods in HttpService
HttpService.put and HttpService.patch use axios.post 
Changed to axios.put and axios.patch
2018-05-17 14:36:38 +05:00
huadong zuo
75775d6ea1 chore(readme) upgrade chinese
update 5.0
2018-05-17 13:16:06 +08:00
Kamil Myśliwiec
f9e02b60fa feature(@nestjs/core) add getInstance() to HTTP adapters 2018-05-16 15:17:30 +02:00
Kamil Myśliwiec
c5a3385156 ci(@nestjs) add package-lock.json 2018-05-13 14:01:23 +02:00
Kamil Myśliwiec
403a137847 ci: remove package-lock.json 2018-05-13 13:42:55 +02:00
Kamil Myśliwiec
c7bd1afc39 sample(@nestjs) update samples package.json 2018-05-13 13:30:10 +02:00
Kamil Myśliwiec
fcf24d32c9 chore(@nestjs) update README in bundle directory 2018-05-13 11:05:26 +02:00
Kamil Myśliwiec
53bcbefb63 chore(@nestjs) publish v5.0.0 release 2018-05-13 11:03:01 +02:00
Kamil Myśliwiec
e010ebd09e Merge branch 'master' of https://github.com/nestjs/nest 2018-05-13 10:24:42 +02:00
Kamil Myśliwiec
663ca6981e feature(@nestjs/microservices) more descriptive gRPC errors 2018-05-13 10:24:33 +02:00
Kamil Myśliwiec
e41c4d806f Update Readme.md 2018-05-13 10:23:49 +02:00
Kamil Myśliwiec
6ad5ae6a67 chore(release) publish v5.0.0-rc.4 2018-05-09 20:36:38 +02:00
Kamil Myśliwiec
0da348045f tests(@nestjs) fix broken stubs, flush out exceptions 2018-05-09 18:18:52 +02:00
Kamil Myśliwiec
64629cfb4d tests(@nestjs/common) fix broken promise rejection in ValidationPipe 2018-05-09 18:04:43 +02:00
Kamil Myśliwiec
4a589d52d5 tests(@nestjs/microservices) fix broken mqtt and redis client tests 2018-05-09 17:51:05 +02:00
Kamil Myśliwiec
8f30e6769b Merge branch 'master' of https://github.com/nestjs/nest 2018-05-09 17:21:34 +02:00
Kamil Myśliwiec
6016f8d175 feature(@nestjs/microservices) expose connect method, improvements & fixes 2018-05-09 17:21:21 +02:00
Kamil Myśliwiec
7b950ffa6e feature(@nestjs/common) make ValidationPipe properties protected 2018-05-09 17:19:38 +02:00
Kamil Myśliwiec
f037edad14 integration(@nestjs) add circular dependency integration test 2018-05-09 17:19:12 +02:00
Kamil Myśliwiec
9c404cddea bugfix: remove invalid MiddlewareConsumer typings 2018-05-09 17:18:06 +02:00
Kamil Myśliwiec
3900cadbd9 Update Readme.md 2018-05-07 13:31:39 +02:00
Kamil Myśliwiec
8b04584ca9 chore(release) publish v5.0.0-rc.3 2018-05-07 13:23:08 +02:00
Kamil Myśliwiec
c5e560d1cf samples(@nestjs) fix grpc client options, remove slash (swagger) 2018-05-07 13:18:48 +02:00
Kamil Myśliwiec
bae969c601 Merge branch 'master' of https://github.com/nestjs/nest 2018-05-07 13:18:07 +02:00
Kamil Myśliwiec
0fcdf4ee2c bugfix(@nestjs/common) add missing forward reference typing 2018-05-07 11:14:19 +02:00
Kamil Myśliwiec
4a744d1c1b Merge pull request #640 from DanielRuf/style/reformat-travis-ci-config
style: reformat Travis CI config
2018-05-07 11:08:48 +02:00
Daniel Ruf
c9daccda3a style: reformat Travis CI config 2018-05-06 23:59:01 +02:00
Kamil Myśliwiec
72aad1d90e bugfix(@nestjs/core) export FastifyAdapter at the root level #622 2018-05-06 22:41:06 +02:00
Kamil Myśliwiec
cb9896ed7f Merge branch 'master' of https://github.com/nestjs/nest 2018-05-06 22:34:24 +02:00
Kamil Myśliwiec
f81f14364a sample(@nestjs) fix invalid message property (16-gateways-ws) #635 2018-05-06 22:34:02 +02:00
Kamil Myśliwiec
8a77bfab55 Merge pull request #645 from DanielRuf/chore/upgrade-grpc
chore: upgrade grpc
2018-05-06 22:19:55 +02:00
Kamil Myśliwiec
04cd077426 Merge pull request #641 from DanielRuf/chore/clone-only-the-last-5-commits
ci: clone only the last 5 commits
2018-05-06 22:19:25 +02:00
Kamil Myśliwiec
e84979d04a Merge pull request #639 from DanielRuf/chore/use-npm-ci
chore: use npm ci instead of npm install (travis)
2018-05-06 22:17:36 +02:00
Daniel Ruf
f9cdb6168d chore: update lockfile 2018-05-06 18:43:30 +02:00
Daniel Ruf
bc1eab1b3d chore: upgrade grpc 2018-05-06 18:10:44 +02:00
Daniel Ruf
aba394f742 chore: migrate to gulp 4 2018-05-06 17:58:31 +02:00
Daniel Ruf
6a49b833ca chore: trigger new build 2018-05-06 16:51:48 +02:00
Daniel Ruf
2c9a07b64a chore: clone only the last 5 commits 2018-05-06 16:26:55 +02:00
Daniel Ruf
7e022be24a chore: cache node_modules 2018-05-06 16:23:14 +02:00
Daniel Ruf
8bf9cecd10 chore: use npm ci 2018-05-06 16:21:36 +02:00
Daniel Ruf
fb860c70e3 chore: add Node.js 10 2018-05-06 16:17:49 +02:00
Kamil Myśliwiec
eb639de347 chore(release) publish v5.0.0-rc.2 2018-05-02 23:30:42 +02:00
Kamil Myśliwiec
5bd3a83cb2 ci(@nestjs) remove platform (node 10) 2018-05-02 23:15:27 +02:00
Kamil Myśliwiec
382d99986b bugfix(@nestjs/websockets) lifecycle hooks multi execution 2018-05-02 23:07:53 +02:00
Kamil Myśliwiec
154b865d7b Merge pull request #621 from patrickhousley/bugfix/express-engine
fix(core): Fix express adapter
2018-05-02 15:21:10 +02:00
Patrick Housley
d001a2f34a fix(core): Fix express adapter 2018-05-01 18:33:48 -05:00
Kamil Myśliwiec
4cfdbe2220 chore(release) publish v5.0.0-rc.1 2018-04-30 23:40:59 +02:00
Kamil Myśliwiec
0266ffdb97 chore(release) publish v5.0.0-rc.1 2018-04-30 23:38:37 +02:00
Kamil Myśliwiec
1f7ae5ef3a chore(release) publish v5.0.0-beta.8 2018-04-30 13:05:50 +02:00
Kamil Myśliwiec
aeda614c5c test(@nestjs/common) fix broken unit tests 2018-04-30 13:04:36 +02:00
Kamil Myśliwiec
181d8c6585 feature(@nestjs/common) add package loader utility 2018-04-30 13:01:37 +02:00
Kamil Myśliwiec
195ae2726d chore(release) publish v5.0.0-beta.7 2018-04-29 16:13:44 +02:00
Kamil Myśliwiec
484a2eb4ec sample(@nestjs) update authentication example (passport) 2018-04-29 16:03:25 +02:00
Kamil Myśliwiec
6630313ece improvement(@nestjs/common) move class-validator and class-transformer 2018-04-29 15:58:44 +02:00
Kamil Myśliwiec
c7a8caacef Merge remote-tracking branch 'origin/master' 2018-04-28 18:10:33 +02:00
Kamil Myśliwiec
021b96eaa0 chore(release) publish v5.0.0-beta.6 2018-04-28 18:05:23 +02:00
Kamil Myśliwiec
fb53ba2b1a chore(release) publish v5.0.0-beta.6 2018-04-28 18:03:49 +02:00
Kamil Myśliwiec
bf2fcb7aa1 Update CHANGELOG.md 2018-04-28 15:27:00 +02:00
Kamil Myśliwiec
518ea8d33f chore(release) publish v5.0.0-beta.4 2018-04-28 15:24:39 +02:00
Kamil Myśliwiec
3ad570e62e bugfix(@nestjs/microservices) extract external typings #594 2018-04-28 15:23:03 +02:00
Kamil Myśliwiec
5cfb0bfc85 refactor(@nestjs) fix typos, extract module compiler, fix broken guards 2018-04-28 12:42:35 +02:00
Kamil Myśliwiec
59fb9c71e2 Merge branch 'master' of https://github.com/nestjs/nest 2018-04-27 13:52:24 +02:00
Kamil Myśliwiec
8e2c957833 sample(@nestjs) bump packages versions 2018-04-27 13:42:09 +02:00
Kamil Myśliwiec
944921f2e9 external(@nestjs) update to rxjs@6.0.0 2018-04-27 13:13:02 +02:00
Kamil Myśliwiec
59f5d68df5 feature(@nestjs/common) add @Header() decorator 2018-04-23 22:44:57 +02:00
Kamil Myśliwiec
91c879d922 Update CHANGELOG.md 2018-04-22 12:12:20 +02:00
Kamil Myśliwiec
f918e2b774 Update CHANGELOG.md 2018-04-22 12:08:13 +02:00
Kamil Myśliwiec
6cac4b7e1e chore(release) publish v5.0.0-beta.3 2018-04-22 11:45:33 +02:00
Kamil Myśliwiec
8117cfb10b chore(release) publish v5.0.0-beta.3 2018-04-22 11:42:26 +02:00
Kamil Myśliwiec
4b926da0d6 format(@nestjs) revert lint precommit hook 2018-04-21 16:03:16 +02:00
Kamil Myśliwiec
77d4ea7513 ci(@nestjs) fix unit tests, falling linux build 2018-04-21 16:01:59 +02:00
Kamil Myśliwiec
3160245145 refactor(@nestjs) fix tslint issues, format code 2018-04-21 14:22:24 +02:00
Kamil Myśliwiec
6e19f3554a Merge branch 'update/version-5' 2018-04-21 13:57:28 +02:00
Kamil Myśliwiec
ae6eb8fa7d format(@nestjs) add tslint precommit hook 2018-04-21 13:56:55 +02:00
Kamil Myśliwiec
5d28b98a8c feature(@nestjs/core) add async lifecycle hooks support 2018-04-21 13:55:58 +02:00
Kamil Myśliwiec
52acfe4ea2 tests(@nestjs) add dynamic modules & express instance integration tests 2018-04-21 00:04:18 +02:00
Kamil Myśliwiec
01a4f64a2e Merge pull request #577 from afurculita/patch-1
Update http.exception.ts
2018-04-20 15:54:17 +02:00
Alexandru Furculita ♻
b47a384621 Update http.exception.ts 2018-04-19 14:21:02 +03:00
Alexandru Furculita ♻
e842768bb1 Update http.exception.ts
Some remains from a git merge/rebase conflict
2018-04-19 14:20:22 +03:00
Kamil Myśliwiec
998a24d62f Update Readme.md 2018-04-18 23:25:03 +02:00
Kamil Myśliwiec
64d072d8bb Merge pull request #489 from nestjs/update/version-5
Update: release v5.0.0-beta
2018-04-18 12:50:06 +02:00
Kamil Myśliwiec
6835dd9819 chore(release) publish v5.0.0-beta.2 2018-04-18 12:31:45 +02:00
Kamil Myśliwiec
5f735b11c9 bugfix: deprecate missing @Pipe() decorator, fix HttpModule 2018-04-18 12:29:39 +02:00
Kamil Myśliwiec
4fad0ae2bc Merge branch 'master' into update/version-5 2018-04-17 18:55:09 +02:00
Kamil Myśliwiec
45da5db11b refactor(@nestjs) remove redundant lib directory 2018-04-17 18:51:56 +02:00
Kamil Myśliwiec
0b9baf8588 refactor(@nestjs) move reflect-metadata to internal dependencies 2018-04-17 18:49:03 +02:00
Kamil Myśliwiec
cef628f314 Update README.md 2018-04-17 18:44:46 +02:00
Kamil Myśliwiec
421c2f69f7 Update README.md 2018-04-17 18:39:29 +02:00
Kamil Myśliwiec
69cd3ab5f9 chore(release) publish v5.0.0-beta.1 2018-04-17 18:33:30 +02:00
Kamil Myśliwiec
b144dbef8c chore(release) publish v5.0.0-beta.0 2018-04-17 18:22:27 +02:00
Kamil Myśliwiec
eff9942466 v5.0.0-beta.0 2018-04-17 18:13:20 +02:00
Kamil Myśliwiec
525a5969bc Update Readme.md 2018-04-03 12:47:07 +02:00
Kamil Myśliwiec
b49366fd31 feature(@nestjs/core) context creator improvements (injection support) 2018-03-31 16:43:07 +02:00
Kamil Myśliwiec
354277ba6e feature(@nestjs/core) reduce injector complexity (remove scopes) 2018-03-29 11:40:12 +02:00
Kamil Myśliwiec
658391fe85 sample(@nestjs) update graphql and mongoose example 2018-03-29 11:39:36 +02:00
Kamil Myśliwiec
b574bb3f4c lib(@nestjs) update packages README 2018-03-28 19:18:33 +02:00
Kamil Myśliwiec
7b760c645f Merge remote-tracking branch 'origin' into update/version-5 2018-03-28 19:15:41 +02:00
Kamil Myśliwiec
32445dcf55 lib(@nestjs) fix incorrect dependencies (multer) 2018-03-28 19:09:19 +02:00
Kamil Myśliwiec
e45fd1aa12 lib(@nestjs) update packages README 2018-03-28 19:08:05 +02:00
Kamil Myśliwiec
3855b3a710 lib(@nestjs) update package.json files 2018-03-28 19:03:47 +02:00
Kamil Myśliwiec
1ca812abbf Update Readme.md 2018-03-28 13:00:52 +02:00
Kamil Myśliwiec
7470911bd7 Update Readme.md 2018-03-28 12:43:30 +02:00
Kamil Myśliwiec
adf72acf63 Update Readme.md 2018-03-28 12:42:53 +02:00
Kamil Myśliwiec
0e9f8f5e7e Update Readme.md 2018-03-28 12:38:47 +02:00
Kamil Myśliwiec
eb05d237af sample(@nestjs) add execution context app example 2018-03-27 13:26:50 +02:00
Kamil Myśliwiec
fa8b4ecef4 Update Readme.md 2018-03-27 12:20:30 +02:00
Kamil Myśliwiec
707b3efea4 tests(@nestjs/core) fix router execution context unit test (render) 2018-03-26 19:15:28 +02:00
Kamil Myśliwiec
5f37fadd24 Auto stash before merge of "master" and "origin/master" 2018-03-26 17:10:32 +02:00
Kamil Myśliwiec
eefbece0e1 Merge branch 'master' into update/version-5 2018-03-26 17:07:19 +02:00
Kamil Myśliwiec
a54102a660 Merge pull request #517 from pumano/master
chore(@nestjs/core) update debug dependency due to security flaw
2018-03-26 17:05:51 +02:00
Kamil Myśliwiec
b5de592eee format(@nestjs) run prettier 2018-03-26 17:04:55 +02:00
Kamil Myśliwiec
20493377af Update Readme.md 2018-03-26 16:49:11 +02:00
Kamil Myśliwiec
f91a16268f Update Readme.md 2018-03-26 15:38:32 +02:00
Kamil Myśliwiec
34b3e77d47 Update Readme.md 2018-03-26 15:32:53 +02:00
Kamil Myśliwiec
557009c11e Update Readme.md 2018-03-26 15:31:12 +02:00
Kamil Myśliwiec
32bf174b5c samples(@nestjs) update sample applications 2018-03-25 23:28:44 +02:00
Kamil Myśliwiec
6a6d3d4805 sample(@nestjs) partial webpack integration 2018-03-25 21:43:37 +02:00
Kamil Myśliwiec
91b4974d2c samples(@nestjs) update sample applications 2018-03-25 21:38:52 +02:00
Kamil Myśliwiec
e50ddf9cb9 tests(@nestjs) fix broken unit tests 2018-03-24 20:55:06 +01:00
Kamil Myśliwiec
fdbf364087 feature(@nestjs) enhance execution context, create host 2018-03-24 17:19:47 +01:00
Kamil Myśliwiec
0eb3354344 /version-5: Auto stash before merge of "update/version-5" and "origin/update/version-5" 2018-03-24 15:28:40 +01:00
Kamil Myśliwiec
a798714f21 Merge remote-tracking branch 'origin/update/version-5' into update/version-5 2018-03-24 15:28:26 +01:00
Kamil Myśliwiec
574830796f build(@nestjs) fix gulpfile configuration 2018-03-24 15:28:13 +01:00
Kamil Myśliwiec
fb26c4ab60 Delete .DS_Store 2018-03-24 15:22:23 +01:00
Kamil Myśliwiec
614de27310 refactor(@nestjs) rename directories, add script, fix tests 2018-03-24 15:11:48 +01:00
Kamil Myśliwiec
3b6981918a format(@nestjs) run prettier, format existing codebase 2018-03-22 19:05:38 +01:00
Kamil Myśliwiec
84f531ca34 feature: generalise interfaces, improve decorators 2018-03-22 18:48:43 +01:00
Kamil Myśliwiec
11b397a348 test(@nestjs) update unit tests 2018-03-22 10:32:43 +01:00
pumano
9fe8c98a42 chore(@nestjs/core) update debug dependency due to security flaw
According to node security project
534 - Regular Expression Denial of Service
Vulnerable: <= 2.6.8 || >= 3.0.0 <= 3.0.1 - Patched: >= 2.6.9 < 3.0.0 || >= 3.1.0 - Path: @nestjs/core@4.6.4 > body-parser@1.17.2 > debug@2.6.7

How to fix
Upgrade to version 2.6.9 or greater if you are on the 2.6.x series or 3.1.0 or greater.
2018-03-19 14:46:14 +03:00
Kamil Myśliwiec
852ce08bf3 feature(@nestjs/microservices) add grpc, mqtt, microservices refactor 2018-03-18 15:49:26 +01:00
Kamil Myśliwiec
a18e4c69ee tests(@nestjs) push basic integration tests 2018-03-17 15:01:17 +01:00
Kamil Myśliwiec
43da706a61 feature(@nestjs/microservices) add stan transport strategy 2018-03-17 14:56:55 +01:00
Kamil Myśliwiec
81691afb46 Merge remote-tracking branch 'origin/update/version-5' into update/version-5 2018-03-15 23:21:44 +01:00
Kamil Myśliwiec
9258229fdb feature(@netsjs/microservices) add nats transport strategy 2018-03-15 23:20:51 +01:00
Kamil Myśliwiec
e481a71b5c feature(@nestjs/core) better type checking for fastify adapter 2018-03-14 14:27:12 +01:00
Kamil Myśliwiec
fc092ae0b3 Merge branch 'update/version-5' of https://github.com/nestjs/nest into update/version-5 2018-03-14 12:08:19 +01:00
Kamil Myśliwiec
6c70f9c777 test(@nestjs/common) cover multer, FileInterceptor unit tests 2018-03-14 12:07:43 +01:00
Kamil Myśliwiec
15a8225ec1 bugfix(@nestjs/core) fix express adapter incompatibility 2018-03-13 18:53:18 +01:00
Kamil Myśliwiec
7bb35c0b38 Update Readme.md 2018-03-12 20:27:33 +01:00
Kamil Myśliwiec
cc8c3ddc95 Update Readme.md 2018-03-12 20:26:34 +01:00
Kamil Myśliwiec
10781a7a8e merge(@nestjs) resolve conflicts with master branch 2018-03-11 14:11:51 +01:00
Kamil Myśliwiec
2f26e3a1dc chore(release) publish v4.6.6 2018-03-11 13:50:47 +01:00
Kamil Myśliwiec
94eed51465 chore(release) publish v4.6.6 2018-03-11 13:47:30 +01:00
Kamil Myśliwiec
786c344cc8 Auto stash before merge of "master" and "origin/master" 2018-03-11 13:42:58 +01:00
Kamil Myśliwiec
6042e71a0e Update Readme.md 2018-03-11 13:38:18 +01:00
Kamil Myśliwiec
199180406d Update Readme.md 2018-03-11 13:33:02 +01:00
Kamil Myśliwiec
81c916734b Update Readme.md 2018-03-11 13:32:17 +01:00
Kamil Myśliwiec
23c54c68b8 ci(@nestjs) fix gulpfile issues 2018-03-11 12:49:19 +01:00
Kamil Myśliwiec
2aa4bb9c9a style(@nestjs) run prettier, update code style 2018-03-11 12:37:56 +01:00
Kamil Myśliwiec
2a1cb06201 feature(@nestjs/core) more meaningful exception (exports inconsistency) 2018-03-10 13:40:42 +01:00
Kamil Myśliwiec
8f300b8d85 Auto stash before merge of "master" and "origin/master" 2018-03-09 17:50:56 +01:00
Kamil Myśliwiec
e51f3e06d4 Merge pull request #470 from patrickhousley/bugfix/axios-interfaces
fix(common): removing duplicated axios interfaces
2018-03-09 17:48:58 +01:00
Kamil Myśliwiec
109b91863b Merge pull request #483 from vologab/patch-1
fix class-transformer related issues
2018-03-09 17:46:56 +01:00
Kamil Myśliwiec
7b35193639 Merge pull request #486 from vologab/feat/ability_to_use_npm_link
build(packaging): add an ability to build libs with sourcemaps and ts…
2018-03-09 17:46:10 +01:00
Kamil Myśliwiec
531b2fe018 update(@nestjs) upgrade reflect-metadata package 2018-03-09 15:59:26 +01:00
Kamil Myśliwiec
2ebfca2f07 fix(@nestjs) fix merge conflicts 2018-03-08 21:45:24 +01:00
Kamil Myśliwiec
1746fb452a test(@nestjs) build & fix unit tests 2018-03-08 18:14:30 +01:00
Kamil Myśliwiec
9d85f8a29a feature(@nestjs) extract http server, increase flexibility 2018-03-08 16:40:51 +01:00
Vladimir Bloshchitsyn
4d2260bca9 build(packaging): add an ability to build libs with sourcemaps and ts files
npm has command `npm ln` which allow using link to local lib,
in this case, if you want to use the ability to debug ts sources.
you can run `gulp build:dev -dist lib` and lib dirs will contain
ts & source maps which allow effectively debug external apps together
with nestJS framework
2018-03-08 15:38:33 +03:00
Vladimir Bloshchitsyn
ccd36c8844 fix class-transformer related issues
see https://github.com/typestack/class-transformer/issues/28
2018-03-08 03:01:21 +03:00
Kamil Myśliwiec
a66537a2ff bugfix(@nestjs/common) fix NestMiddleware interface 2018-03-07 16:50:06 +01:00
Kamil Myśliwiec
981104a91e Merge pull request #468 from patrickhousley/feature/http-generic
fix(common): making http service methods generic
2018-03-06 23:07:28 +01:00
Patrick Housley
21be3f8ca6 fix(common): removing duplicated axios interfaces
- Removed the deprecated package @types/axios.
- Removed the duplicated axios interfaces.
- Updated the HttpService to use the interfaces provided by axios.
2018-03-03 18:17:33 -06:00
Patrick Housley
b0b98b8683 fix(common): making http service methods generic 2018-03-03 17:18:23 -06:00
Kamil Myśliwiec
eda82afb8b Merge remote-tracking branch 'origin/master' 2018-03-02 15:03:49 +01:00
Kamil Myśliwiec
937405432f bugfix(@nestjs/common) File(s)Interceptor throws http status code 500 2018-03-02 15:03:44 +01:00
Kamil Myśliwiec
d2814b4829 Update Readme.md 2018-03-02 09:30:55 +01:00
Kamil Myśliwiec
6d5f70c13a Update Readme.md 2018-03-02 09:19:44 +01:00
Kamil Myśliwiec
68c1c92a1e Update Readme.md 2018-03-02 08:47:40 +01:00
Kamil Myśliwiec
51197993b6 Merge pull request #464 from nestcn/master
Add Chinese document
2018-03-02 08:40:55 +01:00
Zuohuadong
224f996d06 Fix translation problem 2018-03-02 11:54:16 +08:00
Zuohuadong
902c065e0b Add Chinese document 2018-03-02 11:42:33 +08:00
Kamil Myśliwiec
df9fe07d26 feature(@nestjs/core) add find() method to NestApplicationContext 2018-03-02 00:01:03 +01:00
Kamil Myśliwiec
e7a3ad1cdd chore(@nestjs) update package.json 2018-03-01 22:36:14 +01:00
Kamil Myśliwiec
5f3066ae4b Auto stash before merge of "master" and "origin/master" 2018-03-01 22:35:37 +01:00
Kamil Myśliwiec
b6a36d27f3 Merge remote-tracking branch 'origin/master' 2018-03-01 22:35:08 +01:00
Kamil Myśliwiec
945dde6dba chore(release) publish v4.6.5 2018-03-01 22:31:02 +01:00
Kamil Myśliwiec
ff10b07044 bugfix(@nestjs/core) use ApplicationConfig within ExternalContextCreator 2018-03-01 22:27:17 +01:00
Kamil Myśliwiec
deaf3a2dcb feature(@nestjs/core) make cors middleware customizable 2018-03-01 22:26:52 +01:00
Kamil Myśliwiec
7e1cd077c5 Merge pull request #455 from iamclaytonray/patch-1
Update 05-sql-typeorm/~/photo.service.ts
2018-02-28 23:00:22 +01:00
Kamil Myśliwiec
5b7b4c73f4 feature(@nestjs/microservices) allow applying multiple params in ctx creator 2018-02-28 12:20:39 +01:00
Kamil Myśliwiec
2264d9aded Update Readme.md 2018-02-27 22:53:34 +01:00
Kamil Myśliwiec
6f479eafdd Update Readme.md 2018-02-27 22:52:47 +01:00
Kamil Myśliwiec
aafb62ee02 Update Readme.md 2018-02-27 22:52:03 +01:00
Clayton Ray
fa4698e28e Update 05-sql-typeorm/~/photo.service.ts
`Inject` wasn't being used.
2018-02-25 12:16:28 -05:00
Kamil Myśliwiec
400bfb512a Merge remote-tracking branch 'origin/master' 2018-02-24 13:34:40 +01:00
Kamil Myśliwiec
1d9dd18522 bugfix(@nestjs/core) NestFactory.create() returns any 2018-02-24 13:34:33 +01:00
Kamil Myśliwiec
c262b7caf6 feature(@nestjs/microservices) sendMessage breaking change 2018-02-24 13:30:06 +01:00
Kamil Myśliwiec
75ff071142 Merge pull request #447 from dmitriyshmatov/patch-1
Remove unused code
2018-02-21 21:15:25 +01:00
Kamil Myśliwiec
8c12c3b4b8 chore(@nestjs) update CHANGELOG 2018-02-21 20:24:52 +01:00
Kamil Myśliwiec
bd3bd4a96c feature(@nestjs) WsException and RpcException extend Error 2018-02-21 20:23:47 +01:00
Kamil Myśliwiec
b20b3cbc6f bugfix(@nestjs/common) populate multer exceptions 2018-02-21 20:19:21 +01:00
Kamil Myśliwiec
9bfb941b56 feature(@nestjs/common) HttpException extends Error 2018-02-21 20:17:25 +01:00
Dmitriy Shmatov
3ac76188e4 Remove unused code 2018-02-20 21:59:34 +03:00
Kamil Myśliwiec
559e919636 feature(@nestjs/microservices) add TCP/Redis retrying strategy 2018-02-18 22:36:51 +01:00
Kamil Myśliwiec
5c7f9fa5a7 Merge branch 'master' into update/version-5 2018-02-18 13:38:57 +01:00
Kamil Myśliwiec
9b834871ea feature(@nestjs) improve typings, better type checking 2018-02-17 23:33:09 +01:00
Kamil Myśliwiec
23c46abd53 examples(@nestjs) update packages in examples 2018-02-16 13:39:42 +01:00
Kamil Myśliwiec
3029e3c65a update(@nestjs) update to latest version of rxjs lib (v5.5.6) 2018-02-16 11:38:01 +01:00
Kamil Myśliwiec
7e5d6a1f07 deprecate(@nestjs/common) deprecate modules and components property 2018-02-16 09:06:31 +01:00
Kamil Myśliwiec
d84f5adcad Merge pull request #328 from wbhob/deprecate-modules
[SEMVER-MAJOR] chore(): deprecate modules property
2018-02-16 01:13:12 +01:00
Kamil Myśliwiec
294bc5d053 Merge branch 'update/version-5' into deprecate-modules 2018-02-16 01:12:24 +01:00
Kamil Myśliwiec
f67c876c0d feature(@nestjs/common) add @Injectable() class, providers property integration 2018-02-16 01:10:15 +01:00
Wilson Hobbs
05c44f66b8 Merge branch 'master' into deprecate-modules 2018-01-29 22:53:00 -05:00
Wilson Hobbs
ad3f679c5a chore(): deprecate modules property 2017-12-23 14:40:16 -05:00
1756 changed files with 139425 additions and 24067 deletions

2
.gitattributes vendored Normal file
View File

@@ -0,0 +1,2 @@
package-lock.json -diff -merge
package-lock.json linguist-generated=true

41
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,41 @@
## PR Checklist
Please check if your PR fulfills the following requirements:
- [ ] The commit message follows our guidelines: https://github.com/nestjs/nest/blob/master/CONTRIBUTING.md
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
## PR Type
What kind of change does this PR introduce?
<!-- Please check the one that applies to this PR using "x". -->
```
[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:
```
## What is the current behavior?
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->
Issue Number: N/A
## What is the new behavior?
## Does this PR introduce a breaking change?
```
[ ] Yes
[ ] No
```
<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->
## Other information

18
.gitignore vendored
View File

@@ -1,19 +1,23 @@
# dependencies
node_modules/
package-lock.json
# IDE
/.idea
/.awcache
/.vscode
# bundle
packages/**/*.d.ts
packages/**/*.js
# misc
.DS_Store
lerna-debug.log
npm-debug.log
/src/common/npm-debug.log
/src/core/npm-debug.log
/src/testing/npm-debug.log
/src/microservices/npm-debug.log
/src/websockets/npm-debug.log
yarn-error.log
/**/npm-debug.log
/packages/**/.npmignore
/packages/**/LICENSE
# example
/quick-start
@@ -22,5 +26,7 @@ npm-debug.log
# tests
/test
/benchmarks/memory
/coverage
/.nyc_output
build/config\.gypi

13
.npmignore Normal file
View File

@@ -0,0 +1,13 @@
# source
**/*.ts
*.ts
# definitions
!**/*.d.ts
!*.d.ts
# configuration
package-lock.json
tslint.json
tsconfig.json
.prettierrc

2
.prettierignore Normal file
View File

@@ -0,0 +1,2 @@
packages/**/*.d.ts
packages/**/*.js

View File

@@ -1,14 +1,24 @@
language: node_js
node_js:
- "7"
- "8"
- "10"
- "11"
cache:
directories:
- "node_modules"
git:
depth: 5
addons:
firefox: "latest"
firefox: "latest"
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
before_install:
- npm i -g npm@latest
install:
- npm install
- gulp build
- npm ci
- npm run build:dev
script:
- npm test
- npm run lint
- npm test
after_success: npm run coverage

View File

@@ -1,349 +0,0 @@
## 4.6.4
### Bug Fixes
- **microservices**: can't select/get from context when using `NestFactory.createMicroservice` [#398](https://github.com/nestjs/nest/issues/398)
## 4.6.3
### Bug Fixes
- **core**: error thrown when connecting to microservice (hybrid applicaton) [#425](https://github.com/nestjs/nest/issues/425)
## 4.6.2
### Improvements
- **core**: simplify `NestFactory.create(...args)` signature
## 4.6.1
### Improvements
- **common**: create `ModuleMetadata` interface
- **core**: majority of methods (`INestApplication`, `INestMicroservice`, and `INestApplicationContext`) return `this` instead of `void`
- **core**: remove static dependencies & relationships inside `NestFactory`
### Features
- **core**: [feature] add `appOptions` property to `create[..]` methods of `NestFactory`
### Bug Fixes
- **common**: [bugfix] update `class-validator` [#417](https://github.com/nestjs/nest/issues/417)
- **core**: [bugfix] catch error thrown by `bodyParser` in exception filter [#422](https://github.com/nestjs/nest/issues/422)
## 4.6.0
### Features
- **common**: `ValidationPipe` improvements [#383](https://github.com/nestjs/nest/pull/383)
- **common**: `ParseIntPipe` improvements [#385](https://github.com/nestjs/nest/pull/385)
- **common**: add `FileInterceptor`, `FilesInterceptor`, `@UploadedFile()` and `@UploadedFiles()` (`multer` integration)
- **common**: add `HttpModule` that exposes `HttpService` (`axios` integration)
- **core**: add `app.disable()` and `app.enable()` wrappers around `express` app
- **core**: add ability to inject `express` reference (`EXPRESS_REF` token)
- **core**: enable possibility to extend metadata (inheritance support) [#228](https://github.com/nestjs/nest/issues/228)
- **core**: `NestFactory.create()` now accepts third argument `HttpsOptions`
- **core**: add `app.enableCors()` to `INestApplication` (`cors` integration)
- **core**: add `@Render()` decorator (MVC applications)
- **core**: provide `Logger.overrideLogger()` [#247](https://github.com/nestjs/nest/issues/247)
- **microservices**: add `listenAsync()` to `INestMicroservice` instance
### Bug Fixes
- **core**: simplify HTTPS protocol usage
- **core**: custom transport strategy - thrown exceptions issue [#290](https://github.com/nestjs/nest/issues/290)
- **core**: injector fails silently [#287](https://github.com/nestjs/nest/issues/287)
- **core**: secure websockets (`wss://`) [#384](https://github.com/nestjs/nest/issues/384)
- **core**: can't select/get from context when using `NestFactory.createMicroservice()` [#398](https://github.com/nestjs/nest/issues/398)
- **core**: interceptor `$stream` observable returns another observable instead of the response object [#376](https://github.com/nestjs/nest/issues/376)
- **core**: `Observable.throw` from controller results in unhandled rejection promise [#373](https://github.com/nestjs/nest/issues/373)
## 4.5.10
- **core**: [bugfix] #343
- **core**: [bugfix] #337
## 4.5.6
- **core**: [bugfix] dynamic modules `exports`
## 4.5.5
- **core**: [bugfix] add missing `app.engine()` wrapper
## 4.5.4
- **core**: [bugfix] dynamic modules recurrent imports fix
## 4.5.3
- **testing**: [bugfix] issue #326
## 4.5.2
- **common**: [feature] rename `modules` to `imports` (`@Module()` decorator)
- **core**: [feature] exception filters with empty `@Catch()` metadata handle each occurred exception
- **core**: [improvement] increase performance
## 4.5.1
- **common**: [feature] `INestAplication` provides a `getHttpServer()` method now
- **websockets**: [bugfix] `IoAdapter` bugfix
## 4.5.0
- **common**: bugfix #286
- **core**: dynamic modules feature
- **core**: global scope feature
- **core**: `ExternalContextCreator` & `ModulesContainer`
- **core**: merge `NestApplicationContext` with `NestApplication`
- **core**: `NotFoundException` is thrown when route is not available #298
- **core**: add `set()` wrapper around native express methods
- **core**: bugfix #281
- **websockets**: bugfix #271
- **microservices**: log RPC exceptions #303
- **microservices**: merge `NestApplicationContext` with `NestMicroservice`
- **microservices**: handle ECONNREFUSED #288
## 4.4.1
- **common**: `ValidationPipe` improvement
- **common**: custom route params decorators accepts pipes now
- **core**: bugfix #268
## 4.4.0
- **core**: possibility to create the `NestApplicationContext` using `NestFactory.createApplicationContext()` (Nest application without HTTP server / microservice in the background)
- **core**: create custom params decorators feature (`createRouteParamDecorator()`)
## 4.3.3
- **common**: `ParseIntPipe` is now available out-of-the-box (`@nestjs/common`)
- **common**: package contains a set of useful HTTP exceptions now, such as `ForbiddenException`, `UnauthorizedException`, `BadRequestException` etc
- **core**: `HttpException` was moved to `@nestjs/common`. This one from `core` packages is now DEPRECATED and will be removed in the next MAJOR release
## 4.3.0
- **common**: `ValidationPipe` is now available out-of-the-box (`@nestjs/common`)
- **core**: `json` and `urlencoded` (`body-parser`) middlewares are applied by default now, bugfix #252
- **core** more informative error message (injector) #223
example: `[ExceptionHandler] Nest can't resolve dependencies of the UsersService (+, +, ?, +, +, +). Please verify whether [2] argument is available in the current context.`
- **core**: bugfix #240 - middlewares container state
- **core**: bugifx #257 - `@Next()` issue
- **testing**: testing module is now independent from `@nestjs/microservices`
## 4.2.2
- **websockets**: bugfix #242
## 4.2.1
- **core**: IoAdapter bugfix
## 4.2.0
- **core**: log controller prefix #153
- **websockets**: gateway listen the same port as the app #126
## 4.1.4
- **common**: remove deprecated `@ExceptionFilters()` decorator
- **core**: update to latest **express* version (4.16.2)
- **core**: bugfix #187
- **core**: bugfix #185
- **all**: packages codependency refactor
- **all**: add *lerna* package
## 4.1.3
- **core**: forward reference bugfixes & security updates
## 4.1.1
- **common**: add `forwardRef()` util
- **core**: improve injector & dependencies scanner
## 4.1.0
- **common**: add `@Bind()` and `@Dependencies()` decorators to fix route parameters decorators (pure JavaScript compatibility issue)
- **core**: improve performance
## 4.0.1
- **core**: add possibility to setup global guards and global interceptors
- **common**: `INestApplication` has `useGlobalInterceptors()` and `useGlobalGuards()` now
- **microservices**: add possibility to setup global guards, interceptors, filters and pipes
- **core**: add timestamp to log output
- **core**: improve pipes performance
- **core**: add ability to omit param name when passing param-scoped pipe/s
- **websockets**: fix disconnect event issue (pass client instead of socket.io instance)
## 4.0.0
**@nestjs/core**
- Asynchronous `NestFactory` [read more](http://www.docs.nestjs.com/first-steps)
- New response handling approach [read more](http://www.docs.nestjs.com/controllers)
- Interceptors feature [read more](http://www.docs.nestjs.com/interceptors)
- `@Shared()` deprecated (modules are singletons by default) [read more](http://www.docs.nestjs.com/modules)
- `@SingleScope()` decorator [read more](http://www.docs.nestjs.com/modules)
- Modules re-exporting [read more](http://www.docs.nestjs.com/modules)
- Deffered & functional middlewares [read more](http://www.docs.nestjs.com/middlewares)
- Guards feature [read more](http://www.docs.nestjs.com/guards)
- Async components [read more](http://www.docs.nestjs.com/advanced/async-components)
- Hierarchical injector improvements [read more](http://www.docs.nestjs.com/advanced/hierarchical-injector)
- Mixin classes [read more](http://www.docs.nestjs.com/advanced/mixins)
- New `INestApplication` API
**@nestjs/microservices**
- Possibility to return Promise / Observable / plain value [read more](http://www.docs.nestjs.com/microservices/basics)
- Guards & Interceptors & Pipes & Exception Filters integration
**@nestjs/websockets**
- Possibility to return Promise / Observable / plain value [read more](http://www.docs.nestjs.com/websockets/gateways)
- Guards & Interceptors & Pipes & Exception Filters integration
- New `WebSocketAdapter` API
**@nestjs/testing**
- Completely rewritten testing package
## 3.0.1 (24.06.2017)
**@nestjs/core**
- Hierarchical injector bugfix,
- Middlewares `@UseFilters()` bugfix (#95).
**@nestjs/microservices**
- TCP server / client bugfix (#91)
## 3.0.0 (03.06.2017)
**@nestjs/common - BREAKING CHANGE**
- You should now pass objects into `@UseFilters()` decorator instead of metatypes,
- Exception Filters can't inject dependencies (they're not coupled with modules),
- `@ExceptionFilters()` is deprecated, use `@UseFilters()` instead.
- `INestApplication` has new methods - `useGlobalFilters()` and `useGlobalPipes()`,
- New lifecycle hook - `OnModuleDestroy` interface.
**@nestjs/core**
- `@Pipe()` feature (async & sync),
- Exception Filters can have global, controller and method scope.
**@nestjs/websockets - BREAKING CHANGE**
- Use `useWebSocketAdapter()` instead of `setIoAdapter()`,
- You can port any WS library - just implement `WebSocketAdapter` (@nestjs/common).
**@nestjs/microservices - BREAKING CHANGE**
- Now methods have to return `Observable`, and they receive only one argument `data`,
- Microservices can return multiple values, but after emitting `Observable` has to be COMPLETED!
- You can port any transport strategy instead of built-in Redis/TCP, just implement `CustomTransportStrategy`.
## 2.1.3 (27.05.2017)
**@nestjs/common**, **@nestjs/websockets**
- `INestApplication` and `INestMicroservice` has new method now - `setIoAdapter()`,
- Ability to use custom `IoAdapter`
## 2.1.1 (24.05.2017)
**@nestjs/common**, **@nestjs/websockets**, **@nestjs/microservices**
- `INestApplication` and `INestMicroservice` has new method now - `setIoAdapter()`,
- Ability to use custom `IoAdapter`
## 2.1.0 (22.05.2017)
**@nestjs/common**, **@nestjs/core**
- `INestApplication` has new methods now - `init()`, `setGlobalPrefix()`, `connectMicroservice()`, `close()`, `startAllMicroservices()`,
- `INestMicroservice` has new method - `close()`
## 2.0.3 (15.05.2017)
**@nestjs/common**
- `Req()` (`Request()`) and `Res()` (`Response()`) aliases to avoid conflicts with express typings
## 2.0.0 (14.05.2017)
- **Hierarchical injector** improvements
- `@Shared(token?: string)` decorator for **scoped**, shared Modules
- Modules **are not singletons** anymore
- Added `iterare` library for applying multiple transformations to a collection
- `Logger` service is public,
- Nest is now splitted into feature packages:
```typescript
@nestjs/core
@nestjs/common
@nestjs/microservices
@nestjs/testing
@nestjs/websockets
```
- `rxjs`, `redis` and `reflect-metadata` moved into `peerDependencies`
- `@Patch()` support
## 1.0.0 (Final - 01.05.2017)
- Added **Gateway Middlewares** support:
```
@WebSocketGateway({
port: 2000,
middlewares: [ChatMiddleware],
})
```
Gateway Middleware example:
```
@Middleware()
export class ChatMiddleware implements GatewayMiddleware {
public resolve(): (socket, next) => void {
return (socket, next) => {
console.log('Authorization...');
next();
};
}
}
```
- New Gateway lifecycle interfaces `OnGatewayInit`, `OnGatewayConnection`, `OnGatewayDisconnect`
- `@SubscribeMessage()` now accepts also plain strings:
```
@SubscribeMessage('event')
```
- `@Controller()` now accepts also plain strings:
```
@Controller('users')
```
- `HttpStatus` (`HttpStatus.OK` etc.) enumerator
- **Route params decorators** support
```
Request: () => ParameterDecorator
Response: () => ParameterDecorator
Next: () => ParameterDecorator
Query: (property?: string) => ParameterDecorator
Body: (property?: string) => ParameterDecorator
Param: (property?: string) => ParameterDecorator
Session: () => ParameterDecorator
Headers: (property?: string) => ParameterDecorator
```
- `MiddlewaresBuilder` -> `MiddlewaresConsumer`
- **Exception Filters** support
```
@ExceptionFilters(CustomExceptionFilter, NextExceptionFilter)
export class UsersController {}
```
Exception filter example:
```
export class CustomException {}
@Catch(CustomException)
export class CustomExceptionFilter implements ExceptionFilter {
public catch(exception, response) {
response.status(500).json({
message: 'Custom exception message.',
});
}
}
```
- Module injection support:
```
export class UsersController {
constructor(private module: UsersModule) {}
}
```
- `ModuleRef` support
## 1.0.0-RC7 (08.04.2017)
- MiddlewareBuilder: `use()` deprecated, use `apply()` instead
- MiddlewareBuilder: new `apply()` method
## 1.0.0-RC4 (08.04.2017)
- Support for `@Post`, `@Get`, `@Delete`, `@Put`, `@All` decorators
- Added ability to pass data to middleware metatypes
## 1.0.0-BETA-1 (23.03.2017)
- `@Inject` -> `@Dependencies`
- `@Inject` decorator for custom constructor parameters
- Custom providers support (useClass, useValue, useFactory)
## 1.0.0-ALPHA-23 (19.03.2017)
- Microservices support (TCP & Redis transports)
- NestRunner -> NestFactory
- Simplify application initialization & configuration
- Added abillity to pass custom express instance
- `@Inject` decorator for ES6+
- SocketGateway -> WebSocketGateway
- GatewayServer -> WebSocketServer

View File

@@ -3,14 +3,15 @@
We would love for you to contribute to Nest and help make it even better than it is
today! As a contributor, here are the guidelines we would like you to follow:
- [Code of Conduct](#coc)
- [Question or Problem?](#question)
- [Issues and Bugs](#issue)
- [Feature Requests](#feature)
- [Submission Guidelines](#submit)
- [Coding Rules](#rules)
- [Commit Message Guidelines](#commit)
<!-- - [Signing the CLA](#cla) -->
<!--* [Code of Conduct](#coc)-->
* [Question or Problem?](#question)
* [Issues and Bugs](#issue)
* [Feature Requests](#feature)
* [Submission Guidelines](#submit)
* [Development Setup](#development)
* [Coding Rules](#rules)
* [Commit Message Guidelines](#commit)
<!-- - [Signing the CLA](#cla) -->
<!-- ## <a name="coc"></a> Code of Conduct
Help us keep Nest open and inclusive. Please read and follow our [Code of Conduct][coc]. -->
@@ -22,27 +23,30 @@ Help us keep Nest open and inclusive. Please read and follow our [Code of Conduc
Stack Overflow is a much better place to ask questions since:
<!-- - there are thousands of people willing to help on Stack Overflow [maybe one day] -->
- questions and answers stay available for public viewing so your question / answer might help someone else
- Stack Overflow's voting system assures that the best answers are prominently visible.
* questions and answers stay available for public viewing so your question / answer might help someone else
* Stack Overflow's voting system assures that the best answers are prominently visible.
To save your and our time, we will systematically close all issues that are requests for general support and redirect people to Stack Overflow.
If you would like to chat about the question in real-time, you can reach out via [our gitter channel][gitter].
## <a name="issue"></a> Found a Bug?
If you find a bug in the source code, you can help us by
[submitting an issue](#submit-issue) to our [GitHub Repository][github]. Even better, you can
[submit a Pull Request](#submit-pr) with a fix.
## <a name="feature"></a> Missing a Feature?
You can *request* a new feature by [submitting an issue](#submit-issue) to our GitHub
Repository. If you would like to *implement* a new feature, please submit an issue with
You can _request_ a new feature by [submitting an issue](#submit-issue) to our GitHub
Repository. If you would like to _implement_ a new feature, please submit an issue with
a proposal for your work first, to be sure that we can use it.
Please consider what kind of change it is:
* For a **Major Feature**, first open an issue and outline your proposal so that it can be
discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
and help you to craft the change so that it is successfully accepted into the project. For your issue name, please prefix your proposal with `[discussion]`, for example "[discussion]: your feature idea".
discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
and help you to craft the change so that it is successfully accepted into the project. For your issue name, please prefix your proposal with `[discussion]`, for example "[discussion]: your feature idea".
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
## <a name="submit"></a> Submission Guidelines
@@ -53,9 +57,9 @@ Before you submit an issue, please search the issue tracker, maybe an issue for
We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs we will systematically ask you to provide a minimal reproduction scenario using a repository or [Gist](https://gist.github.com/). Having a live, reproducible scenario gives us wealth of important information without going back & forth to you with additional questions like:
- version of NestJS used
- 3rd-party libraries and their versions
- and most importantly - a use-case that fails
* version of NestJS used
* 3rd-party libraries and their versions
* and most importantly - a use-case that fails
<!--
// TODO we need to create a playground, similar to plunkr
@@ -68,42 +72,50 @@ Unfortunately, we are not able to investigate / fix bugs without a minimal repro
You can file new issues by filling out our [new issue form](https://github.com/nestjs/nest/issues/new).
### <a name="submit-pr"></a> Submitting a Pull Request (PR)
Before you submit your Pull Request (PR) consider the following guidelines:
<!--
To the first point
1. Please sign our [Contributor License Agreement (CLA)](#cla) before sending PRs.
We cannot accept code without this.
-->
1. Search [GitHub](https://github.com/nestjs/nest/pulls) for an open or closed PR
that relates to your submission. You don't want to duplicate effort.
<!-- 1. Please sign our [Contributor License Agreement (CLA)](#cla) before sending PRs.
We cannot accept code without this. -->
that relates to your submission. You don't want to duplicate effort.
1. Fork the nestjs/nest repo.
1. Make your changes in a new git branch:
```shell
git checkout -b my-fix-branch master
```
```shell
git checkout -b my-fix-branch master
```
1. Create your patch, **including appropriate test cases**.
1. Follow our [Coding Rules](#rules).
1. Run the full Nest test suite, as described in the [developer documentation][dev-doc],
and ensure that all tests pass.
1. Run the full Nest test suite (see [common scripts](#common-scripts)),
and ensure that all tests pass.
1. Commit your changes using a descriptive commit message that follows our
[commit message conventions](#commit). Adherence to these conventions
is necessary because release notes are automatically generated from these messages.
[commit message conventions](#commit). Adherence to these conventions
is necessary because release notes are automatically generated from these messages.
```shell
git commit -a
```
Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
```shell
git commit -a
```
Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
1. Push your branch to GitHub:
```shell
git push origin my-fix-branch
```
```shell
git push origin my-fix-branch
```
1. In GitHub, send a pull request to `nestjs:master`.
* If we suggest changes then:
* Make the required updates.
* Re-run the Nest test suites to ensure tests are still passing.
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
@@ -122,47 +134,90 @@ from the main (upstream) repository:
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
```shell
git push origin --delete my-fix-branch
```
```shell
git push origin --delete my-fix-branch
```
* Check out the master branch:
```shell
git checkout master -f
```
```shell
git checkout master -f
```
* Delete the local branch:
```shell
git branch -D my-fix-branch
```
```shell
git branch -D my-fix-branch
```
* Update your master with the latest upstream version:
```shell
git pull --ff upstream master
```
```shell
git pull --ff upstream master
```
## <a name="development"></a> Development Setup
You will need Node.js version 8.9.0+.
1. After cloning the repo, run:
```bash
$ npm i # (or yarn install)
```
2. In order to prepare your environment run `prepare.sh` shell script:
```bash
$ sh scripts/prepare.sh
```
That will compile fresh packages and afterward, move them to all `sample` directories as well as integration tests.
### <a name="common-scripts"></a>Commonly used NPM scripts
```bash
# build all packages and put them near to their source .ts files
$ npm run build
# build all packages and move to "sample" and "integration" directories
# if cross-packages breaking changes were performed you may face irrelevant errors
# in order to verify the build, you can run this command again then
$ npm run build:dev
# run the full unit tests suite
$ npm run test
# run integration tests
# docker is required(!)
$ sh scripts/run-integration.sh
# run linter
$ npm run lint
```
## <a name="rules"></a> Coding Rules
To ensure consistency throughout the source code, keep these rules in mind as you are working:
* All features or bug fixes **must be tested** by one or more specs (unit-tests).
<!--
// We're working on auto-documentation.
* All public API methods **must be documented**. (Details TBC). -->
* All features or bug fixes **must be tested** by one or more specs (unit-tests).
* We follow [Google's JavaScript Style Guide][js-style-guide], but wrap all code at
**100 characters**. An automated formatter is available, see
[DEVELOPER.md](docs/DEVELOPER.md#clang-format).
## <a name="commit"></a> Commit Message Guidelines
We have very precise rules over how our git commit messages can be formatted. This leads to **more
readable messages** that are easy to follow when looking through the **project history**. But also,
We have very precise rules over how our git commit messages can be formatted. This leads to **more
readable messages** that are easy to follow when looking through the **project history**. But also,
we use the git commit messages to **generate the Nest change log**.
### Commit Message Format
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
format that includes a **type**, a **scope** and a **subject**:
```
@@ -183,38 +238,37 @@ Footer should contain a [closing reference to an issue](https://help.github.com/
Samples: (even more [samples](https://github.com/nestjs/nest/commits/master))
```
docs(changelog): update change log to beta.5
```
```
fix(release): need to depend on latest rxjs and zone.js
The version in our package.json gets copied to the one we publish, and users need the latest of these.
docs(changelog) update change log to beta.5
bugfix(core) need to depend on latest rxjs and zone.js
```
### Revert
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
If the commit reverts a previous commit, it should begin with `revert:`, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
### Type
Must be one of the following:
* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
* **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
* **docs**: Documentation only changes
* **feat**: A new feature
* **fix**: A bug fix
* **feature**: A new feature
* **bugfix**: A bug fix
* **perf**: A code change that improves performance
* **refactor**: A code change that neither fixes a bug nor adds a feature
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
* **test**: Adding missing tests or correcting existing tests
### Scope
The scope should be the name of the npm package affected (as perceived by person reading changelog generated from commit messages.
The following is the list of supported scopes:
* **common**
* **core**
* **examples**
* **sample**
* **microservices**
* **testing**
* **websockets**
@@ -223,11 +277,12 @@ There are currently a few exceptions to the "use package name" rule:
* **packaging**: used for changes that change the npm package layout in all of our packages, e.g. public path changes, package.json changes done to all packages, d.ts file/format changes, changes to bundles, etc.
* **changelog**: used for updating the release notes in CHANGELOG.md
* **examples/#**: for the example apps directory, replacing # with the example app number
<!-- * **aio**: used for docs-app (angular.io) related changes within the /aio directory of the repo -->
* **sample/#**: for the example apps directory, replacing # with the example app number
* none/empty string: useful for `style`, `test` and `refactor` changes that are done across all packages (e.g. `style: add missing semicolons`)
<!-- * **aio**: used for docs-app (angular.io) related changes within the /aio directory of the repo -->
### Subject
The subject contains succinct description of the change:
* use the imperative, present tense: "change" not "changed" nor "changes"
@@ -235,10 +290,12 @@ The subject contains succinct description of the change:
* no dot (.) at the end
### Body
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
The body should include the motivation for the change and contrast this with previous behavior.
### Footer
The footer should contain any information about **Breaking Changes** and is also the place to
reference GitHub issues that this commit **Closes**.
@@ -255,9 +312,10 @@ changes to be accepted, the CLA must be signed. It's a quick process, we promise
* For corporations we'll need you to
[print, sign and one of scan+email, fax or mail the form][corporate-cla]. -->
<!-- [angular-group]: https://groups.google.com/forum/#!forum/angular -->
<!-- [coc]: https://github.com/angular/code-of-conduct/blob/master/CODE_OF_CONDUCT.md -->
[commit-message-format]: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#
[corporate-cla]: http://code.google.com/legal/corporate-cla-v1.0.html
[dev-doc]: https://github.com/nestjs/nest/blob/master/docs/DEVELOPER.md
@@ -268,4 +326,5 @@ changes to be accepted, the CLA must be signed. It's a quick process, we promise
[jsfiddle]: http://jsfiddle.net
[plunker]: http://plnkr.co/edit
[runnable]: http://runnable.com
<!-- [stackoverflow]: http://stackoverflow.com/questions/tagged/angular -->

View File

@@ -1,12 +1,12 @@
<p align="center">
<a href="http://nestjs.com/" target="blank"><img src="http://kamilmysliwiec.com/public/nest-logo.png#1" alt="Nest Logo" /></a>
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo_text.svg" width="320" alt="Nest Logo" /></a>
</p>
[travis-image]: https://api.travis-ci.org/nestjs/nest.svg?branch=master
[travis-url]: https://travis-ci.org/nestjs/nest
[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 href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
@@ -14,10 +14,13 @@
<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#5" alt="Coverage" /></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>
</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)-->
@@ -25,7 +28,8 @@
## 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>
<p>Under the hood, Nest makes use of <a href="https://expressjs.com/" target="_blank">Express</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
@@ -34,52 +38,45 @@
## Getting started
To check out the [guide](https://docs.nestjs.com), visit [docs.nestjs.com](https://docs.nestjs.com). :books:
* 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:
## Sponsors
## 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://opencollective.com/nest). Thanks! :heart_eyes:
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).
<a href="https://valor-software.com/"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="210" /></a> &nbsp; &nbsp; <a href="https://scal.io"><img src="https://nestjs.com/img/scalio-logo.png" width="160" /></a>
#### Principal Sponsor
## Backers
<a href="https://valor-software.com/"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="320" /></a>
<a href="https://opencollective.com/nest/backer/0/website" target="_blank"><img src="https://opencollective.com/nest/backer/0/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/1/website" target="_blank"><img src="https://opencollective.com/nest/backer/1/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/2/website" target="_blank"><img src="https://opencollective.com/nest/backer/2/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/3/website" target="_blank"><img src="https://opencollective.com/nest/backer/3/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/4/website" target="_blank"><img src="https://opencollective.com/nest/backer/4/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/5/website" target="_blank"><img src="https://opencollective.com/nest/backer/5/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/6/website" target="_blank"><img src="https://opencollective.com/nest/backer/6/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/7/website" target="_blank"><img src="https://opencollective.com/nest/backer/7/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/8/website" target="_blank"><img src="https://opencollective.com/nest/backer/8/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/9/website" target="_blank"><img src="https://opencollective.com/nest/backer/9/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/10/website" target="_blank"><img src="https://opencollective.com/nest/backer/10/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/11/website" target="_blank"><img src="https://opencollective.com/nest/backer/11/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/12/website" target="_blank"><img src="https://opencollective.com/nest/backer/12/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/13/website" target="_blank"><img src="https://opencollective.com/nest/backer/13/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/14/website" target="_blank"><img src="https://opencollective.com/nest/backer/14/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/15/website" target="_blank"><img src="https://opencollective.com/nest/backer/15/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/16/website" target="_blank"><img src="https://opencollective.com/nest/backer/16/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/17/website" target="_blank"><img src="https://opencollective.com/nest/backer/17/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/18/website" target="_blank"><img src="https://opencollective.com/nest/backer/18/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/19/website" target="_blank"><img src="https://opencollective.com/nest/backer/19/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/20/website" target="_blank"><img src="https://opencollective.com/nest/backer/20/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/21/website" target="_blank"><img src="https://opencollective.com/nest/backer/21/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/22/website" target="_blank"><img src="https://opencollective.com/nest/backer/22/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/23/website" target="_blank"><img src="https://opencollective.com/nest/backer/23/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/24/website" target="_blank"><img src="https://opencollective.com/nest/backer/24/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/25/website" target="_blank"><img src="https://opencollective.com/nest/backer/25/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/26/website" target="_blank"><img src="https://opencollective.com/nest/backer/26/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/27/website" target="_blank"><img src="https://opencollective.com/nest/backer/27/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/28/website" target="_blank"><img src="https://opencollective.com/nest/backer/28/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/29/website" target="_blank"><img src="https://opencollective.com/nest/backer/29/avatar.svg"></a>
#### Base Sponsor
## People
<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>
- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)
- Website - [https://nestjs.com](https://nestjs.com/)
#### 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>
#### 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://triplebyte.com/"><img src="https://nestjs.com/img/triplebyte.png" height="30" valign="middle" /></a>
## Backers
<a href="https://opencollective.com/nest"><img src="https://opencollective.com/nest/backers.svg?width=890"></a>
## Stay in touch
* Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)
* Website - [https://nestjs.com](https://nestjs.com/)
* Twitter - [@nestframework](https://twitter.com/nestframework)
## License
Nest is [MIT licensed](LICENSE).
Nest is [MIT licensed](LICENSE).

48
benchmarks/all_output.txt Normal file
View File

@@ -0,0 +1,48 @@
-----------------------
express
-----------------------
Running 10s test @ http://localhost:3000
8 threads and 1024 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 47.78ms 19.09ms 212.47ms 66.94%
Req/Sec 1.31k 268.90 2.07k 72.38%
104687 requests in 10.02s, 21.47MB read
Socket errors: connect 0, read 877, write 0, timeout 0
Requests/sec: 10444.24
Transfer/sec: 2.14MB
-----------------------
fastify
-----------------------
Running 10s test @ http://localhost:3000
8 threads and 1024 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 21.80ms 8.73ms 78.12ms 55.78%
Req/Sec 2.99k 0.92k 5.67k 68.88%
238550 requests in 10.02s, 31.17MB read
Socket errors: connect 0, read 862, write 0, timeout 0
Requests/sec: 23795.79
Transfer/sec: 3.11MB
-----------------------
nest
-----------------------
Running 10s test @ http://localhost:3000
8 threads and 1024 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 54.00ms 22.33ms 200.25ms 62.23%
Req/Sec 1.15k 338.60 1.88k 66.12%
91348 requests in 10.05s, 18.82MB read
Socket errors: connect 0, read 983, write 0, timeout 0
Requests/sec: 9093.64
Transfer/sec: 1.87MB
-----------------------
nest-fastify
-----------------------
Running 10s test @ http://localhost:3000
8 threads and 1024 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 29.31ms 11.71ms 101.96ms 70.03%
Req/Sec 2.17k 0.93k 4.12k 63.13%
173241 requests in 10.05s, 22.80MB read
Socket errors: connect 0, read 934, write 0, timeout 0
Requests/sec: 17233.87
Transfer/sec: 2.27MB

7
benchmarks/express.js Normal file
View File

@@ -0,0 +1,7 @@
'use strict';
const express = require('express');
const app = express();
app.get('/', async (req, res) => res.send('Hello world'));
app.listen(3000);

5
benchmarks/fastify.js Normal file
View File

@@ -0,0 +1,5 @@
'use strict';
const fastify = require('fastify')();
fastify.get('/', async (req, reply) => reply.send('Hello world'));
fastify.listen(3000);

View File

@@ -0,0 +1,9 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const core_1 = require('@nestjs/core');
const app_module_1 = require('./nest/app.module');
core_1.NestFactory.create(app_module_1.AppModule, new core_1.FastifyAdapter(), {
logger: false,
bodyParser: false,
}).then(app => app.listen(3000));
//# sourceMappingURL=main.js.map

9
benchmarks/nest.js Normal file
View File

@@ -0,0 +1,9 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const core_1 = require('@nestjs/core');
const app_module_1 = require('./nest/app.module');
core_1.NestFactory.create(app_module_1.AppModule, {
logger: false,
bodyParser: false,
}).then(app => app.listen(3000));
//# sourceMappingURL=main.js.map

3
benchmarks/nest/app.controller.d.ts vendored Normal file
View File

@@ -0,0 +1,3 @@
export declare class AppController {
root(): string;
}

View File

@@ -0,0 +1,28 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
const common_1 = require("@nestjs/common");
let AppController = class AppController {
root() {
return 'Hello world!';
}
};
__decorate([
common_1.Get(),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", String)
], AppController.prototype, "root", null);
AppController = __decorate([
common_1.Controller()
], AppController);
exports.AppController = AppController;
//# sourceMappingURL=app.controller.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../src/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2CAAiD;AAGjD,IAAa,aAAa,GAA1B,MAAa,aAAa;IAExB,IAAI;QACF,OAAO,cAAc,CAAA;IACvB,CAAC;CACF,CAAA;AAHC;IADC,YAAG,EAAE;;;;yCAGL;AAJU,aAAa;IADzB,mBAAU,EAAE;GACA,aAAa,CAKzB;AALY,sCAAa"}

1
benchmarks/nest/app.module.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
export declare class AppModule {}

View File

@@ -6,14 +6,15 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
const module_decorator_1 = require("../decorators/modules/module.decorator");
const http_service_1 = require("./http.service");
let HttpModule = class HttpModule {
const common_1 = require("@nestjs/common");
const app_controller_1 = require("./app.controller");
let AppModule = class AppModule {
};
HttpModule = __decorate([
module_decorator_1.Module({
components: [http_service_1.HttpService],
exports: [http_service_1.HttpService],
AppModule = __decorate([
common_1.Module({
imports: [],
controllers: [app_controller_1.AppController],
})
], HttpModule);
exports.HttpModule = HttpModule;
], AppModule);
exports.AppModule = AppModule;
//# sourceMappingURL=app.module.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;AAAA,2CAAwC;AACxC,qDAAiD;AAMjD,IAAa,SAAS,GAAtB,MAAa,SAAS;CAAG,CAAA;AAAZ,SAAS;IAJrB,eAAM,CAAC;QACN,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,CAAC,8BAAa,CAAC;KAC7B,CAAC;GACW,SAAS,CAAG;AAAZ,8BAAS"}

1
benchmarks/nest/main.d.ts vendored Normal file
View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1 @@
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;AAAA,uCAA2C;AAC3C,6CAAyC;AAEzC,KAAK,UAAU,SAAS;IACtB,MAAM,GAAG,GAAG,MAAM,kBAAW,CAAC,MAAM,CAAC,sBAAS,CAAC,CAAC;IAChD,MAAM,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AACD,SAAS,EAAE,CAAC"}

14
benchmarks/run.sh Normal file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/env bash
echo 'Library:' $1
node $1 &
pid=$!
sleep 2
wrk 'http://localhost:3000' \
-d 10 \
-c 1024 \
-t 8
kill $pid

23
benchmarks/run_all.sh Normal file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
: > all_output.txt
lib=(express fastify nest nest-fastify)
for item in ${lib[*]}
do
echo '-----------------------' >> all_output.txt
echo $item >> all_output.txt
echo '-----------------------' >> all_output.txt
node $item &
pid=$!
sleep 2
wrk 'http://localhost:3000' \
-d 10 \
-c 1024 \
-t 8 >> all_output.txt
kill $pid
done

View File

@@ -1,2 +0,0 @@
require('ts-node/register');
require('./src/main');

View File

@@ -1,16 +0,0 @@
import { Module, NestModule, MiddlewaresConsumer } from '@nestjs/common';
import { LoggerMiddleware } from './common/middlewares/logger.middleware';
import { CatsModule } from './cats/cats.module';
import { CatsController } from './cats/cats.controller';
@Module({
imports: [CatsModule],
})
export class ApplicationModule implements NestModule {
configure(consumer: MiddlewaresConsumer): void {
consumer
.apply(LoggerMiddleware)
.with('ApplicationModule')
.forRoutes(CatsController);
}
}

View File

@@ -1,8 +0,0 @@
import { HttpException } from '@nestjs/common';
import { HttpStatus } from '@nestjs/common';
export class ForbiddenException extends HttpException {
constructor() {
super('Forbidden', HttpStatus.FORBIDDEN);
}
}

View File

@@ -1,14 +0,0 @@
import { ExceptionFilter, Catch } from '@nestjs/common';
import { HttpException } from '@nestjs/common';
@Catch(HttpException)
export class HttpExceptionFilter implements ExceptionFilter {
catch(exception: HttpException, response) {
const status = exception.getStatus();
response.status(status).json({
statusCode: status,
message: `It's a message from the exception filter`,
});
}
}

View File

@@ -1,19 +0,0 @@
import { Interceptor, NestInterceptor, ExecutionContext } from '@nestjs/common';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/of';
@Interceptor()
export abstract class CacheInterceptor implements NestInterceptor {
protected abstract readonly isCached: () => boolean;
intercept(
dataOrRequest,
context: ExecutionContext,
stream$: Observable<any>,
): Observable<any> {
if (this.isCached()) {
return Observable.of([]);
}
return stream$;
}
}

View File

@@ -1,28 +0,0 @@
import {
Interceptor,
NestInterceptor,
ExecutionContext,
HttpStatus,
} from '@nestjs/common';
import { HttpException } from '@nestjs/common';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/catch';
import 'rxjs/add/observable/throw';
@Interceptor()
export class ExceptionInterceptor implements NestInterceptor {
intercept(
dataOrRequest,
context: ExecutionContext,
stream$: Observable<any>,
): Observable<any> {
return stream$.catch(err =>
Observable.throw(
new HttpException(
'Exception interceptor message',
HttpStatus.BAD_GATEWAY,
),
),
);
}
}

View File

@@ -1,17 +0,0 @@
import { Interceptor, NestInterceptor, ExecutionContext } from '@nestjs/common';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/do';
@Interceptor()
export class LoggingInterceptor implements NestInterceptor {
intercept(
dataOrRequest,
context: ExecutionContext,
stream$: Observable<any>,
): Observable<any> {
console.log('Before...');
const now = Date.now();
return stream$.do(() => console.log(`After... ${Date.now() - now}ms`));
}
}

View File

@@ -1,10 +0,0 @@
import { mixin } from '@nestjs/common';
import { CacheInterceptor } from './cache.interceptor';
export function mixinCacheInterceptor(isCached: () => boolean) {
return mixin(
class extends CacheInterceptor {
protected readonly isCached = isCached;
},
);
}

View File

@@ -1,14 +0,0 @@
import { Interceptor, NestInterceptor, ExecutionContext } from '@nestjs/common';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
@Interceptor()
export class TransformInterceptor implements NestInterceptor {
intercept(
dataOrRequest,
context: ExecutionContext,
stream$: Observable<any>,
): Observable<any> {
return stream$.map(data => ({ data }));
}
}

View File

@@ -1,11 +0,0 @@
import { Middleware, NestMiddleware, ExpressMiddleware } from '@nestjs/common';
@Middleware()
export class LoggerMiddleware implements NestMiddleware {
resolve(name: string): ExpressMiddleware {
return (req, res, next) => {
console.log(`[${name}] Request...`); // [ApplicationModule] Request...
next();
};
}
}

View File

@@ -1,18 +0,0 @@
import { HttpException } from '@nestjs/common';
import {
PipeTransform,
Pipe,
ArgumentMetadata,
HttpStatus,
} from '@nestjs/common';
@Pipe()
export class ParseIntPipe implements PipeTransform<string> {
async transform(value: string, metadata: ArgumentMetadata) {
const val = parseInt(value, 10);
if (isNaN(val)) {
throw new HttpException('Validation failed', HttpStatus.BAD_REQUEST);
}
return val;
}
}

View File

@@ -1,22 +0,0 @@
<html>
<head>
<script src="socket.io.js"></script>
<script>
const socket = io('http://localhost:3000');
socket.on('connect', function() {
console.log('Connected');
socket.emit('events', { test: 'test' });
});
socket.on('events', function(data) {
console.log('event', data);
});
socket.on('exception', function(data) {
console.log('event', data);
});
socket.on('disconnect', function() {
console.log('Disconnected');
});
</script>
</head>
<body></body>
</html>

View File

@@ -1,18 +0,0 @@
<html>
<head>
<script>
const socket = new WebSocket('ws://localhost:81');
socket.onopen = function() {
console.log('Connected');
socket.send(JSON.stringify({
type: 'events',
message: 'test',
}));
socket.onmessage = function(data) {
console.log(data);
}
};
</script>
</head>
<body></body>
</html>

View File

@@ -1,2 +0,0 @@
require('ts-node/register');
require('./src/main');

View File

@@ -1,45 +0,0 @@
import * as WebSocket from 'ws';
import { WebSocketAdapter } from '@nestjs/common';
import { MessageMappingProperties } from '@nestjs/websockets';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/fromEvent';
import 'rxjs/add/observable/empty';
import 'rxjs/add/operator/switchMap';
import 'rxjs/add/operator/filter';
export class WsAdapter implements WebSocketAdapter {
public create(port: number) {
return new WebSocket.Server({ port });
}
public bindClientConnect(server, callback: (...args: any[]) => void) {
server.on('connection', callback);
}
public bindMessageHandlers(
client: WebSocket,
handlers: MessageMappingProperties[],
process: (data: any) => Observable<any>,
) {
Observable.fromEvent(client, 'message')
.switchMap(buffer => this.bindMessageHandler(buffer, handlers, process))
.filter(result => !!result)
.subscribe(response => client.send(JSON.stringify(response)));
}
public bindMessageHandler(
buffer,
handlers: MessageMappingProperties[],
process: (data: any) => Observable<any>,
): Observable<any> {
const data = JSON.parse(buffer.data);
const messageHandler = handlers.find(
handler => handler.message === data.type,
);
if (!messageHandler) {
return Observable.empty();
}
const { callback } = messageHandler;
return process(callback(data));
}
}

View File

@@ -1,12 +0,0 @@
import { Catch, WsExceptionFilter } from '@nestjs/common';
import { WsException } from '@nestjs/websockets';
@Catch(WsException)
export class ExceptionFilter implements WsExceptionFilter {
catch(exception: WsException, client) {
client.emit('exception', {
status: 'error',
message: `It's a message from the exception filter`,
});
}
}

View File

@@ -1,21 +0,0 @@
import { Guard, CanActivate, ExecutionContext } from '@nestjs/common';
import { Observable } from 'rxjs/Observable';
import { Reflector } from '@nestjs/core';
@Guard()
export class RolesGuard implements CanActivate {
constructor(private readonly reflector: Reflector) {}
canActivate(data, context: ExecutionContext): boolean {
const { parent, handler } = context;
const roles = this.reflector.get<string[]>('roles', handler);
if (!roles) {
return true;
}
const user = data.user;
const hasRole = () =>
!!user.roles.find(role => !!roles.find(item => item === role));
return user && user.roles && hasRole();
}
}

View File

@@ -1,18 +0,0 @@
import { Interceptor, NestInterceptor, ExecutionContext } from '@nestjs/common';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/of';
@Interceptor()
export class CacheInterceptor implements NestInterceptor {
intercept(
dataOrRequest,
context: ExecutionContext,
stream$: Observable<any>,
): Observable<any> {
const isCached = true;
if (isCached) {
return Observable.of([]);
}
return stream$;
}
}

View File

@@ -1,17 +0,0 @@
import { Interceptor, NestInterceptor, ExecutionContext } from '@nestjs/common';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/do';
@Interceptor()
export class LoggingInterceptor implements NestInterceptor {
intercept(
dataOrRequest,
context: ExecutionContext,
stream$: Observable<any>,
): Observable<any> {
console.log('Before...');
const now = Date.now();
return stream$.do(() => console.log(`After... ${Date.now() - now}ms`));
}
}

View File

@@ -1,14 +0,0 @@
import { Interceptor, NestInterceptor, ExecutionContext } from '@nestjs/common';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
@Interceptor()
export class TransformInterceptor implements NestInterceptor {
intercept(
dataOrRequest,
context: ExecutionContext,
stream$: Observable<any>,
): Observable<any> {
return stream$.map(data => ({ data }));
}
}

View File

@@ -1,23 +0,0 @@
import {
WebSocketGateway,
SubscribeMessage,
WsResponse,
WebSocketServer,
WsException,
} from '@nestjs/websockets';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/from';
import 'rxjs/add/operator/map';
@WebSocketGateway()
export class EventsGateway {
@WebSocketServer() server;
@SubscribeMessage('events')
onEvent(client, data): Observable<WsResponse<number>> {
const event = 'events';
const response = [1, 2, 3];
return Observable.from(response).map(res => ({ event, data: res }));
}
}

View File

@@ -1,2 +0,0 @@
require('ts-node/register');
require('./src/main');

View File

@@ -1,44 +0,0 @@
import * as amqp from 'amqplib';
import { ClientProxy } from '@nestjs/microservices';
export class RabbitMQClient extends ClientProxy {
constructor(private readonly host: string, private readonly queue: string) {
super();
}
protected async sendSingleMessage(
messageObj,
callback: (err, result, disposed?: boolean) => void,
) {
const server = await amqp.connect(this.host);
const channel = await server.createChannel();
const { sub, pub } = this.getQueues();
channel.assertQueue(sub, { durable: false });
channel.assertQueue(pub, { durable: false });
channel.consume(
pub,
message => this.handleMessage(message, server, callback),
{ noAck: true },
);
channel.sendToQueue(sub, Buffer.from(JSON.stringify(messageObj)));
}
private handleMessage(
message,
server,
callback: (err, result, disposed?: boolean) => void,
) {
const { content } = message;
const { err, response, disposed } = JSON.parse(content.toString());
if (disposed) {
server.close();
}
callback(err, response, disposed);
}
private getQueues() {
return { pub: `${this.queue}_pub`, sub: `${this.queue}_sub` };
}
}

View File

@@ -1,53 +0,0 @@
import * as amqp from 'amqplib';
import { Server, CustomTransportStrategy } from '@nestjs/microservices';
import { Observable } from 'rxjs/Observable';
export class RabbitMQServer extends Server implements CustomTransportStrategy {
private server: amqp.Connection = null;
private channel: amqp.Channel = null;
constructor(private readonly host: string, private readonly queue: string) {
super();
}
public async listen(callback: () => void) {
await this.init();
this.channel.consume(`${this.queue}_sub`, this.handleMessage.bind(this), {
noAck: true,
});
}
public close() {
this.channel && this.channel.close();
this.server && this.server.close();
}
private async handleMessage(message) {
const { content } = message;
const messageObj = JSON.parse(content.toString());
const handlers = this.getHandlers();
const pattern = JSON.stringify(messageObj.pattern);
if (!this.messageHandlers[pattern]) {
return;
}
const handler = this.messageHandlers[pattern];
const response$ = this.transformToObservable(
await handler(messageObj.data),
) as Observable<any>;
response$ && this.send(response$, data => this.sendMessage(data));
}
private sendMessage(message) {
const buffer = Buffer.from(JSON.stringify(message));
this.channel.sendToQueue(`${this.queue}_pub`, buffer);
}
private async init() {
this.server = await amqp.connect(this.host);
this.channel = await this.server.createChannel();
this.channel.assertQueue(`${this.queue}_sub`, { durable: false });
this.channel.assertQueue(`${this.queue}_pub`, { durable: false });
}
}

View File

@@ -1,3 +0,0 @@
import { ReflectMetadata } from '@nestjs/common';
export const Roles = (...roles: string[]) => ReflectMetadata('roles', roles);

View File

@@ -1,21 +0,0 @@
import { Guard, CanActivate, ExecutionContext } from '@nestjs/common';
import { Observable } from 'rxjs/Observable';
import { Reflector } from '@nestjs/core';
@Guard()
export class RolesGuard implements CanActivate {
constructor(private readonly reflector: Reflector) {}
canActivate(data, context: ExecutionContext): boolean {
const { parent, handler } = context;
const roles = this.reflector.get<string[]>('roles', handler);
if (!roles) {
return true;
}
const user = data.user;
const hasRole = () =>
!!user.roles.find(role => !!roles.find(item => item === role));
return user && user.roles && hasRole();
}
}

View File

@@ -1,18 +0,0 @@
import { Interceptor, NestInterceptor, ExecutionContext } from '@nestjs/common';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/of';
@Interceptor()
export class CacheInterceptor implements NestInterceptor {
intercept(
dataOrRequest,
context: ExecutionContext,
stream$: Observable<any>,
): Observable<any> {
const isCached = true;
if (isCached) {
return Observable.of([]);
}
return stream$;
}
}

View File

@@ -1,17 +0,0 @@
import { Interceptor, NestInterceptor, ExecutionContext } from '@nestjs/common';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/do';
@Interceptor()
export class LoggingInterceptor implements NestInterceptor {
intercept(
dataOrRequest,
context: ExecutionContext,
stream$: Observable<any>,
): Observable<any> {
console.log('Before...');
const now = Date.now();
return stream$.do(() => console.log(`After... ${Date.now() - now}ms`));
}
}

View File

@@ -1,14 +0,0 @@
import { Interceptor, NestInterceptor, ExecutionContext } from '@nestjs/common';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
@Interceptor()
export class TransformInterceptor implements NestInterceptor {
intercept(
dataOrRequest,
context: ExecutionContext,
stream$: Observable<any>,
): Observable<any> {
return stream$.map(data => ({ data }));
}
}

View File

@@ -1,25 +0,0 @@
import { PipeTransform, Pipe, ArgumentMetadata } from '@nestjs/common';
import { validate } from 'class-validator';
import { plainToClass } from 'class-transformer';
import { RpcException } from '@nestjs/microservices';
@Pipe()
export class ValidationPipe implements PipeTransform<any> {
async transform(value, metadata: ArgumentMetadata) {
const { metatype } = metadata;
if (!metatype || !this.toValidate(metatype)) {
return value;
}
const object = plainToClass(metatype, value);
const errors = await validate(object);
if (errors.length > 0) {
throw new RpcException('Validation failed');
}
return value;
}
private toValidate(metatype): boolean {
const types = [String, Boolean, Number, Array, Object];
return !types.find(type => metatype === type);
}
}

View File

@@ -1,18 +0,0 @@
import { NestFactory } from '@nestjs/core';
import { Transport } from '@nestjs/microservices';
import { ApplicationModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.createMicroservice(ApplicationModule);
await app.listenAsync();
/** Hybrid application (HTTP + (n)Microservices)
const app = await NestFactory.create(ApplicationModule);
app.connectMicroservice({
transport: Transport.TCP,
});
await app.startAllMicroservicesAsync();
await app.listen(3001); */
}
bootstrap();

View File

@@ -1,2 +0,0 @@
require('ts-node/register');
require('./src/main');

View File

@@ -1,26 +0,0 @@
{
"name": "nest-typescript-starter",
"version": "1.0.0",
"description": "Nest TypeScript starter repository",
"license": "MIT",
"scripts": {
"start": "node index.js",
"prestart:prod": "tsc",
"start:prod": "node dist/main.js"
},
"dependencies": {
"@nestjs/common": "^4.3.0",
"@nestjs/core": "^4.3.0",
"@nestjs/microservices": "^4.3.0",
"@nestjs/testing": "^4.3.0",
"@nestjs/websockets": "^4.3.0",
"redis": "^2.7.1",
"reflect-metadata": "^0.1.10",
"rxjs": "^5.4.3",
"typescript": "^2.4.2"
},
"devDependencies": {
"@types/node": "^7.0.41",
"ts-node": "^3.3.0"
}
}

View File

@@ -1,8 +0,0 @@
import { Module } from '@nestjs/common';
import { CoreModule } from './core/core.module';
import { FeatureModule } from './feature/feature.module';
@Module({
imports: [FeatureModule],
})
export class ApplicationModule {}

View File

@@ -1,8 +0,0 @@
import { Module, SingleScope } from '@nestjs/common';
import { CommonService } from './common.service';
@Module({
components: [CommonService],
exports: [CommonService],
})
export class CommonModule {}

View File

@@ -1,9 +0,0 @@
import { Component } from '@nestjs/common';
import { CoreService } from '../core/core.service';
@Component()
export class CommonService {
constructor(private readonly coreService: CoreService) {
console.log('CommonService', coreService);
}
}

View File

@@ -1,10 +0,0 @@
import { Component } from '@nestjs/common';
import { CommonService } from '../common/common.service';
import { CoreService } from './core.service';
@Component()
export class ContextService {
constructor(private readonly commonService: CoreService) {
console.log('ContextService', commonService);
}
}

View File

@@ -1,12 +0,0 @@
import { Module } from '@nestjs/common';
import { CoreService } from './core.service';
import { CommonModule } from '../common/common.module';
import { ContextService } from './context.service';
import { FeatureModule } from '../feature/feature.module';
@Module({
imports: [CommonModule],
components: [CoreService, ContextService],
exports: [CommonModule],
})
export class CoreModule {}

View File

@@ -1,8 +0,0 @@
import { Component } from '@nestjs/common';
@Component()
export class CoreService {
constructor() {
console.log('CoreService');
}
}

View File

@@ -1,9 +0,0 @@
import { Module } from '@nestjs/common';
import { FeatureService } from './feature.service';
import { CoreModule } from '../core/core.module';
@Module({
imports: [CoreModule],
components: [FeatureService],
})
export class FeatureModule {}

View File

@@ -1,9 +0,0 @@
import { Component } from '@nestjs/common';
import { CommonService } from '../common/common.service';
@Component()
export class FeatureService {
constructor(private readonly commonService: CommonService) {
console.log('FeatureService', commonService);
}
}

View File

@@ -1,2 +0,0 @@
require('ts-node/register');
require('./src/main');

View File

@@ -1,26 +0,0 @@
{
"name": "nest-typescript-starter",
"version": "1.0.0",
"description": "Nest TypeScript starter repository",
"license": "MIT",
"scripts": {
"start": "node index.js",
"prestart:prod": "tsc",
"start:prod": "node dist/main.js"
},
"dependencies": {
"@nestjs/common": "^4.5.0",
"@nestjs/core": "^4.5.0",
"@nestjs/typeorm": "^2.0.0",
"mysql": "^2.14.1",
"redis": "^2.7.1",
"reflect-metadata": "^0.1.10",
"rxjs": "^5.4.3",
"typeorm": "0.1.0-alpha.40",
"typescript": "^2.4.2"
},
"devDependencies": {
"@types/node": "^7.0.41",
"ts-node": "^3.3.0"
}
}

View File

@@ -1,2 +0,0 @@
require('ts-node/register');
require('./src/main');

View File

@@ -1,28 +0,0 @@
{
"name": "nest-typescript-starter",
"version": "1.0.0",
"description": "Nest TypeScript starter repository",
"license": "MIT",
"scripts": {
"start": "node index.js",
"prestart:prod": "tsc",
"start:prod": "node dist/main.js"
},
"dependencies": {
"@nestjs/common": "^4.3.0",
"@nestjs/core": "^4.3.0",
"@nestjs/microservices": "^4.3.0",
"@nestjs/testing": "^4.3.0",
"@nestjs/websockets": "^4.3.0",
"mongoose": "^5.0.1",
"redis": "^2.7.1",
"reflect-metadata": "^0.1.10",
"rxjs": "^5.4.3",
"typescript": "^2.4.2"
},
"devDependencies": {
"@types/mongoose": "^4.7.23",
"@types/node": "^7.0.41",
"ts-node": "^3.3.0"
}
}

View File

@@ -1,8 +0,0 @@
import { Module } from '@nestjs/common';
import { databaseProviders } from './database.providers';
@Module({
components: [...databaseProviders],
exports: [...databaseProviders],
})
export class DatabaseModule {}

View File

@@ -1,2 +0,0 @@
require('ts-node/register');
require('./src/main');

View File

@@ -1,2 +0,0 @@
require('ts-node/register');
require('./src/main');

View File

@@ -1,30 +0,0 @@
{
"name": "nest-typescript-starter",
"version": "1.0.0",
"description": "Nest TypeScript starter repository",
"license": "MIT",
"scripts": {
"start": "node index.js",
"prestart:prod": "tsc",
"start:prod": "node dist/main.js"
},
"dependencies": {
"@nestjs/common": "^4.3.0",
"@nestjs/core": "^4.3.0",
"@nestjs/microservices": "^4.3.0",
"@nestjs/testing": "^4.3.0",
"@nestjs/websockets": "^4.3.0",
"@types/passport-jwt": "^2.0.24",
"jsonwebtoken": "^8.0.1",
"passport": "^0.4.0",
"passport-jwt": "^3.0.0",
"redis": "^2.7.1",
"reflect-metadata": "^0.1.10",
"rxjs": "^5.4.3",
"typescript": "^2.4.2"
},
"devDependencies": {
"@types/node": "^7.0.41",
"ts-node": "^3.3.0"
}
}

View File

@@ -1,18 +0,0 @@
import { Controller, Post, HttpStatus, HttpCode, Get } from '@nestjs/common';
import { AuthService } from './auth.service';
@Controller('auth')
export class AuthController {
constructor(private readonly authService: AuthService) {}
@Post('token')
@HttpCode(HttpStatus.OK)
public async getToken() {
return await this.authService.createToken();
}
@Get('authorized')
public async authorized() {
console.log('Authorized route...');
}
}

View File

@@ -1,22 +0,0 @@
import * as passport from 'passport';
import {
Module,
NestModule,
MiddlewaresConsumer,
RequestMethod,
} from '@nestjs/common';
import { AuthService } from './auth.service';
import { JwtStrategy } from './passport/jwt.strategy';
import { AuthController } from './auth.controller';
@Module({
components: [AuthService, JwtStrategy],
controllers: [AuthController],
})
export class AuthModule implements NestModule {
public configure(consumer: MiddlewaresConsumer) {
consumer
.apply(passport.authenticate('jwt', { session: false }))
.forRoutes({ path: '/auth/authorized', method: RequestMethod.ALL });
}
}

View File

@@ -1,22 +0,0 @@
import * as jwt from 'jsonwebtoken';
import { Component, Inject } from '@nestjs/common';
@Component()
export class AuthService {
async createToken() {
const expiresIn = 60 * 60,
secretOrKey = 'secret';
const user = { email: 'thisis@example.com' };
const token = jwt.sign(user, secretOrKey, { expiresIn });
return {
expires_in: expiresIn,
access_token: token,
};
}
async validateUser(signedUser): Promise<boolean> {
// put some validation logic here
// for example query user by id / email / username
return true;
}
}

View File

@@ -1,27 +0,0 @@
import * as passport from 'passport';
import { ExtractJwt, Strategy } from 'passport-jwt';
import { Component, Inject } from '@nestjs/common';
import { AuthService } from '../auth.service';
@Component()
export class JwtStrategy extends Strategy {
constructor(private readonly authService: AuthService) {
super(
{
jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),
passReqToCallback: true,
secretOrKey: 'secret',
},
async (req, payload, next) => await this.verify(req, payload, next),
);
passport.use(this);
}
public async verify(req, payload, done) {
const isValid = await this.authService.validateUser(payload);
if (!isValid) {
return done('Unauthorized', false);
}
done(null, payload);
}
}

View File

@@ -1,8 +0,0 @@
import { Module } from '@nestjs/common';
import { CatsModule } from './cats/cats.module';
import { CatsController } from './cats/cats.controller';
@Module({
imports: [CatsModule],
})
export class ApplicationModule {}

View File

@@ -1,44 +0,0 @@
import * as express from 'express';
import * as bodyParser from 'body-parser';
import * as request from 'supertest';
import { Test } from '@nestjs/testing';
import { CatsModule } from '../../src/cats/cats.module';
describe('Cats', () => {
const server = express();
server.use(bodyParser.json());
beforeAll(async () => {
const module = await Test.createTestingModule({
imports: [CatsModule],
}).compile();
const app = module.createNestApplication(server);
await app.init();
});
it(`/POST insert cat`, () => {
return request(server)
.post('/cats')
.send({
name: 'Tiger',
age: 2,
breed: 'Russian Blue',
})
.expect(201);
});
it(`/GET cats`, async done => {
const cats = await request(server)
.get('/cats')
.expect(200);
const [cat] = cats.body;
expect(cat.name).toBe('Tiger');
expect(cat.age).toBe(2);
expect(cat.breed).toBe('Russian Blue');
done();
});
});

View File

@@ -1,2 +0,0 @@
require('ts-node/register');
require('./src/main');

View File

@@ -1,35 +0,0 @@
{
"name": "nest-typescript-starter",
"version": "1.0.0",
"description": "Nest TypeScript starter repository",
"license": "MIT",
"scripts": {
"start": "node index.js",
"prestart:prod": "tsc",
"start:prod": "node dist/main.js",
"e2e": "jest --config=e2e/jest-e2e.json --forceExit",
"e2e:watch": "jest --watch --config=e2e/jest-e2e.json"
},
"dependencies": {
"@nestjs/common": "^4.3.0",
"@nestjs/core": "^4.3.0",
"@nestjs/microservices": "^4.3.0",
"@nestjs/testing": "^4.3.0",
"@nestjs/websockets": "^4.3.0",
"mongoose": "^4.11.13",
"redis": "^2.7.1",
"reflect-metadata": "^0.1.10",
"rxjs": "^5.4.3",
"typescript": "^2.4.2"
},
"devDependencies": {
"@types/mongoose": "^4.7.23",
"@types/jest": "^20.0.8",
"@types/node": "^7.0.41",
"mockgoose-fix": "^7.3.6",
"jest": "^20.0.4",
"supertest": "^3.0.0",
"ts-jest": "^20.0.14",
"ts-node": "^3.3.0"
}
}

View File

@@ -1,10 +0,0 @@
import * as mongoose from 'mongoose';
import { CatSchema } from './schemas/cat.schema';
export const catsProviders = [
{
provide: 'CatModelToken',
useFactory: mongoose => mongoose.connection.model('Cat', CatSchema),
inject: ['DbToken'],
},
];

View File

@@ -1,28 +0,0 @@
import * as mongoose from 'mongoose';
import { Mockgoose } from 'mockgoose-fix';
export const databaseProviders = [
{
provide: 'DbToken',
useFactory: async () => {
(mongoose as any).Promise = global.Promise;
if (process.env.NODE_ENV === 'test') {
const mockgoose = new Mockgoose(mongoose);
mockgoose.helper.setDbVersion('3.4.3');
mockgoose.prepareStorage().then(async () => {
await mongoose.connect('mongodb://example.com/TestingDB', {
useMongoClient: true,
});
});
} else {
await mongoose.connect('mongodb://localhost/nest', {
useMongoClient: true,
});
}
return mongoose;
},
},
];

View File

@@ -1,2 +0,0 @@
require('ts-node/register');
require('./src/main');

View File

@@ -1,8 +0,0 @@
import { Module, NestModule, MiddlewaresConsumer } from '@nestjs/common';
import { CatsModule } from './cats/cats.module';
import { CatsController } from './cats/cats.controller';
@Module({
imports: [CatsModule],
})
export class ApplicationModule {}

View File

@@ -1,2 +0,0 @@
require('ts-node/register');
require('./src/main');

View File

@@ -1,43 +0,0 @@
import {
Module,
MiddlewaresConsumer,
NestModule,
RequestMethod,
} from '@nestjs/common';
import { graphqlExpress, graphiqlExpress } from 'apollo-server-express';
import { GraphQLModule, GraphQLFactory } from '@nestjs/graphql';
import { CatsModule } from './cats/cats.module';
import { SubscriptionsModule } from './subscriptions/subscriptions.module';
@Module({
imports: [SubscriptionsModule.forRoot(), CatsModule, GraphQLModule],
})
export class ApplicationModule implements NestModule {
constructor(
private readonly subscriptionsModule: SubscriptionsModule,
private readonly graphQLFactory: GraphQLFactory,
) {}
configure(consumer: MiddlewaresConsumer) {
const schema = this.createSchema();
this.subscriptionsModule.createSubscriptionServer(schema);
consumer
.apply(
graphiqlExpress({
endpointURL: '/graphql',
subscriptionsEndpoint: `ws://localhost:3001/subscriptions`,
}),
)
.forRoutes({ path: '/graphiql', method: RequestMethod.GET })
.apply(graphqlExpress(req => ({ schema, rootValue: req })))
.forRoutes({ path: '/graphql', method: RequestMethod.ALL });
}
createSchema() {
const typeDefs = this.graphQLFactory.mergeTypesByPaths('./**/*.graphql');
const schema = this.graphQLFactory.createSchema({ typeDefs });
return schema;
}
}

View File

@@ -1,8 +0,0 @@
import { CanActivate, Guard, ExecutionContext } from '@nestjs/common';
@Guard()
export class CatsGuard implements CanActivate {
canActivate(request: any, context: ExecutionContext): boolean {
return true;
}
}

View File

@@ -1 +0,0 @@
export const SUBSCRIPTION_SERVER = 'SUBSCRIPTION_SERVER';

View File

@@ -1,15 +0,0 @@
import { createServer } from 'http';
import { SUBSCRIPTION_SERVER } from './subscription.constants';
export const createSubscriptionProviders = (port: number = 3001) => [
{
provide: SUBSCRIPTION_SERVER,
useFactory: () => {
const server = createServer();
return new Promise(resolve =>
server.listen(port, () => resolve(server)),
);
},
},
];

View File

@@ -1,49 +0,0 @@
import * as WebSocket from 'ws';
import { Module, DynamicModule, Inject, OnModuleDestroy } from '@nestjs/common';
import { SubscriptionServer, ServerOptions } from 'subscriptions-transport-ws';
import { execute, subscribe } from 'graphql';
import { createSubscriptionProviders } from './subscription.providers';
import { SUBSCRIPTION_SERVER } from './subscription.constants';
@Module({
exports: [SubscriptionsModule],
})
export class SubscriptionsModule implements OnModuleDestroy {
private subscriptionServer: SubscriptionServer;
constructor(@Inject(SUBSCRIPTION_SERVER) private readonly ws) {}
static forRoot(port: number = 3001): DynamicModule {
const providers = createSubscriptionProviders(port);
return {
module: SubscriptionsModule,
components: [...providers],
exports: [...providers],
};
}
createSubscriptionServer(
schema: any,
options: ServerOptions = {},
socketOptions: WebSocket.ServerOption = {},
) {
this.subscriptionServer = new SubscriptionServer(
{
execute,
subscribe,
schema,
...options,
},
{
server: this.ws,
path: '/subscriptions',
...socketOptions,
},
);
}
onModuleDestroy() {
this.ws.close();
}
}

View File

@@ -1,2 +0,0 @@
require('ts-node/register');
require('./src/main');

View File

@@ -1,2 +0,0 @@
require('ts-node/register');
require('./src/main');

View File

@@ -1,80 +0,0 @@
<p align="center">
<a href="http://nestjs.com/" target="blank"><img src="http://kamilmysliwiec.com/public/nest-logo.png#1" alt="Nest Logo" /></a>
</p>
[travis-image]: https://api.travis-ci.org/nestjs/nest.svg?branch=master
[travis-url]: https://travis-ci.org/nestjs/nest
[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 web applications. </p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/v/@nestjs/cqrs.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#2" 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://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>
</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
[Nest](https://github.com/nestjs/nest) framework **TypeScript** starter repository.
## Installation
```bash
$ npm install
```
## Start
```
$ npm run start
```
## People
- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)
- Website - [https://nestjs.com](https://nestjs.com/)
## Backers
I am on a mission to provide an architecture to create truly flexible, scalable and loosely coupled systems using the Node.js platform. It takes a lot of time, so if you want to support me, please [become a backer / sponsor]((https://opencollective.com/nest#backer)). I appreciate your help. Thanks! :heart_eyes:
<a href="https://opencollective.com/nest/backer/0/website" target="_blank"><img src="https://opencollective.com/nest/backer/0/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/1/website" target="_blank"><img src="https://opencollective.com/nest/backer/1/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/2/website" target="_blank"><img src="https://opencollective.com/nest/backer/2/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/3/website" target="_blank"><img src="https://opencollective.com/nest/backer/3/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/4/website" target="_blank"><img src="https://opencollective.com/nest/backer/4/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/5/website" target="_blank"><img src="https://opencollective.com/nest/backer/5/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/6/website" target="_blank"><img src="https://opencollective.com/nest/backer/6/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/7/website" target="_blank"><img src="https://opencollective.com/nest/backer/7/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/8/website" target="_blank"><img src="https://opencollective.com/nest/backer/8/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/9/website" target="_blank"><img src="https://opencollective.com/nest/backer/9/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/10/website" target="_blank"><img src="https://opencollective.com/nest/backer/10/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/11/website" target="_blank"><img src="https://opencollective.com/nest/backer/11/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/12/website" target="_blank"><img src="https://opencollective.com/nest/backer/12/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/13/website" target="_blank"><img src="https://opencollective.com/nest/backer/13/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/14/website" target="_blank"><img src="https://opencollective.com/nest/backer/14/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/15/website" target="_blank"><img src="https://opencollective.com/nest/backer/15/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/16/website" target="_blank"><img src="https://opencollective.com/nest/backer/16/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/17/website" target="_blank"><img src="https://opencollective.com/nest/backer/17/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/18/website" target="_blank"><img src="https://opencollective.com/nest/backer/18/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/19/website" target="_blank"><img src="https://opencollective.com/nest/backer/19/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/20/website" target="_blank"><img src="https://opencollective.com/nest/backer/20/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/21/website" target="_blank"><img src="https://opencollective.com/nest/backer/21/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/22/website" target="_blank"><img src="https://opencollective.com/nest/backer/22/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/23/website" target="_blank"><img src="https://opencollective.com/nest/backer/23/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/24/website" target="_blank"><img src="https://opencollective.com/nest/backer/24/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/25/website" target="_blank"><img src="https://opencollective.com/nest/backer/25/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/26/website" target="_blank"><img src="https://opencollective.com/nest/backer/26/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/27/website" target="_blank"><img src="https://opencollective.com/nest/backer/27/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/28/website" target="_blank"><img src="https://opencollective.com/nest/backer/28/avatar.svg"></a>
<a href="https://opencollective.com/nest/backer/29/website" target="_blank"><img src="https://opencollective.com/nest/backer/29/avatar.svg"></a>

View File

@@ -1,2 +0,0 @@
require('ts-node/register');
require('./src/main');

View File

@@ -1,4 +0,0 @@
html
head
body
p= message

View File

@@ -1,65 +1,100 @@
const fs = require('fs');
const path = require('path');
const gulp = require('gulp');
const ts = require('gulp-typescript');
const gulpSequence = require('gulp-sequence');
const sourcemaps = require('gulp-sourcemaps');
const clean = require('gulp-clean');
const deleteEmpty = require('delete-empty');
const packages = {
common: ts.createProject('src/common/tsconfig.json'),
core: ts.createProject('src/core/tsconfig.json'),
microservices: ts.createProject('src/microservices/tsconfig.json'),
websockets: ts.createProject('src/websockets/tsconfig.json'),
testing: ts.createProject('src/testing/tsconfig.json'),
common: ts.createProject('packages/common/tsconfig.json'),
core: ts.createProject('packages/core/tsconfig.json'),
microservices: ts.createProject('packages/microservices/tsconfig.json'),
websockets: ts.createProject('packages/websockets/tsconfig.json'),
testing: ts.createProject('packages/testing/tsconfig.json'),
};
const modules = Object.keys(packages);
const source = 'src';
const source = 'packages';
const distId = process.argv.indexOf('--dist');
const dist = distId < 0 ? 'node_modules/@nestjs' : process.argv[distId + 1];
const dist = distId < 0 ? source : process.argv[distId + 1];
gulp.task('default', function() {
modules.forEach(module => {
gulp.watch(
[`${source}/${module}/**/*.ts`, `${source}/${module}/*.ts`],
[module]
);
});
modules.forEach(module => {
gulp.watch(
[`${source}/${module}/**/*.ts`, `${source}/${module}/*.ts`],
[module],
);
});
});
gulp.task('copy-misc', function() {
return gulp
.src(['Readme.md', 'LICENSE', '.npmignore'])
.pipe(gulp.dest(`${source}/common`))
.pipe(gulp.dest(`${source}/core`))
.pipe(gulp.dest(`${source}/microservices`))
.pipe(gulp.dest(`${source}/websockets`))
.pipe(gulp.dest(`${source}/testing`));
});
gulp.task('clean:output', function() {
return gulp
.src([`${source}/**/*.js`, `${source}/**/*.d.ts`], {
read: false,
})
.pipe(clean());
});
gulp.task('clean:dirs', function(done) {
deleteEmpty.sync(`${source}/`);
done();
});
gulp.task('clean:bundle', gulp.series('clean:output', 'clean:dirs'));
modules.forEach(module => {
gulp.task(module, () => {
return packages[module]
.src()
.pipe(packages[module]())
.pipe(gulp.dest(`${dist}/${module}`));
});
});
modules.forEach(module => {
gulp.task(module, () => {
return packages[module]
.src()
.pipe(packages[module]())
.pipe(gulp.dest(`${dist}/${module}`));
});
gulp.task(module + ':dev', () => {
return packages[module]
.src()
.pipe(sourcemaps.init())
.pipe(packages[module]())
.pipe(
sourcemaps.mapSources(sourcePath => './' + sourcePath.split('/').pop()),
)
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest(`${dist}/${module}`));
});
});
gulp.task('build', function(cb) {
gulpSequence('common', modules.filter((module) => module !== 'common'), cb);
});
gulp.task('common:dev', gulp.series(modules.map(module => module + ':dev')));
gulp.task('build', gulp.series(modules));
gulp.task('build:dev', gulp.series('common:dev'));
function getFolders(dir) {
return fs.readdirSync(dir).filter(function(file) {
return fs.statSync(path.join(dir, file)).isDirectory();
});
}
gulp.task('move', function() {
gulp.src(['node_modules/@nestjs/**/*']).pipe(
gulp.dest('examples/01-cats-app/node_modules/@nestjs')
).pipe(
gulp.dest('examples/02-gateways/node_modules/@nestjs')
).pipe(
gulp.dest('examples/03-microservices/node_modules/@nestjs')
).pipe(
gulp.dest('examples/04-injector/node_modules/@nestjs')
).pipe(
gulp.dest('examples/05-sql-typeorm/node_modules/@nestjs')
).pipe(
gulp.dest('examples/06-mongoose/node_modules/@nestjs')
).pipe(
gulp.dest('examples/07-sequelize/node_modules/@nestjs')
).pipe(
gulp.dest('examples/08-passport/node_modules/@nestjs')
).pipe(
gulp.dest('examples/09-babel-example/node_modules/@nestjs')
).pipe(
gulp.dest('examples/11-swagger/node_modules/@nestjs')
).pipe(
gulp.dest('examples/12-graphql-apollo/node_modules/@nestjs')
).pipe(
gulp.dest('examples/15-mvc/node_modules/@nestjs')
);
const getDirs = base => getFolders(base).map(path => `${base}/${path}`);
const examplesDirs = getDirs('sample');
const integrationDirs = getDirs('integration');
const directories = examplesDirs.concat(integrationDirs);
let stream = gulp.src(['node_modules/@nestjs/**/*']);
directories.forEach(dir => {
stream = stream.pipe(gulp.dest(dir + '/node_modules/@nestjs'));
});
return stream;
});

View File

@@ -0,0 +1,46 @@
version: "3"
services:
redis:
container_name: test-redis
image: redis
ports:
- "6379:6379"
restart: always
nats:
container_name: test-nats
image: nats
ports:
- "8222:8222"
- "4222:4222"
- "6222:6222"
restart: always
mqtt:
container_name: test-mqtt
image: toke/mosquitto
ports:
- "1883:1883"
- "9001:9001"
restart: always
mysql:
image: mysql:5.7.22
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test
ports:
- "3306:3306"
restart: always
mongodb:
image: mongo:latest
environment:
- MONGODB_DATABASE="test"
ports:
- 27017:27017
rabbit:
hostname: rabbit
image: "rabbitmq:management"
ports:
- "15672:15672"
- "5672:5672"
tty: true

View File

@@ -0,0 +1,38 @@
import { INestApplication } from '@nestjs/common';
import { NestFactory } from '@nestjs/core';
import * as request from 'supertest';
import { AsyncClassApplicationModule } from '../src/async-options-class.module';
describe('GraphQL (async class)', () => {
let app: INestApplication;
beforeEach(async () => {
app = await NestFactory.create(AsyncClassApplicationModule, {
logger: false,
});
await app.init();
});
it(`should return query result`, () => {
return request(app.getHttpServer())
.post('/graphql')
.send({
operationName: null,
variables: {},
query: '{\n getCats {\n id\n }\n}\n',
})
.expect(200, {
data: {
getCats: [
{
id: 1,
},
],
},
});
});
afterEach(async () => {
await app.close();
});
});

View File

@@ -0,0 +1,38 @@
import { INestApplication } from '@nestjs/common';
import { NestFactory } from '@nestjs/core';
import * as request from 'supertest';
import { AsyncExistingApplicationModule } from '../src/async-options-existing.module';
describe('GraphQL (async existing)', () => {
let app: INestApplication;
beforeEach(async () => {
app = await NestFactory.create(AsyncExistingApplicationModule, {
logger: false,
});
await app.init();
});
it(`should return query result`, () => {
return request(app.getHttpServer())
.post('/graphql')
.send({
operationName: null,
variables: {},
query: '{\n getCats {\n id\n }\n}\n',
})
.expect(200, {
data: {
getCats: [
{
id: 1,
},
],
},
});
});
afterEach(async () => {
await app.close();
});
});

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