Compare commits

...

429 Commits

Author SHA1 Message Date
Kamil Myśliwiec
34cb6001c3 chore(@nestjs) publish v9.0.1 release 2022-07-08 11:07:53 +02:00
Kamil Myśliwiec
a3ecb1b1d8 fix(platform-fastify): bump fastify/static version 2022-07-08 11:06:55 +02:00
Kamil Myśliwiec
1c380bac57 chore(): update package json version 2022-07-08 09:59:21 +02:00
Kamil Myśliwiec
308bec4ac5 chore(@nestjs) publish v9.0.0 release 2022-07-08 09:08:31 +02:00
Kamil Myśliwiec
03acfbbd7c chore(): update package.json files 2022-07-08 09:05:41 +02:00
Kamil Myśliwiec
d74f3d9335 chore(): update readme 2022-07-08 09:01:57 +02:00
Kamil Mysliwiec
3fdd39e945 Merge pull request #9885 from nestjs/dependabot/npm_and_yarn/fastify/static-6.4.0
chore(deps-dev): bump @fastify/static from 5.0.0 to 6.4.0
2022-07-08 08:43:09 +02:00
dependabot[bot]
4b6af10a92 chore(deps-dev): bump @fastify/static from 5.0.0 to 6.4.0
Bumps [@fastify/static](https://github.com/fastify/fastify-static) from 5.0.0 to 6.4.0.
- [Release notes](https://github.com/fastify/fastify-static/releases)
- [Commits](https://github.com/fastify/fastify-static/compare/v5.0.0...v6.4.0)

---
updated-dependencies:
- dependency-name: "@fastify/static"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-08 06:40:27 +00:00
Kamil Mysliwiec
fb72b281e1 Update renovate.json 2022-07-08 08:38:43 +02:00
Kamil Mysliwiec
a590c43353 Merge pull request #9883 from nestjs/dependabot/npm_and_yarn/ioredis-5.1.0
chore(deps-dev): bump ioredis from 5.0.4 to 5.1.0
2022-07-08 08:35:56 +02:00
Kamil Mysliwiec
be7e301282 Merge pull request #9884 from nestjs/dependabot/npm_and_yarn/nodemon-2.0.19
chore(deps-dev): bump nodemon from 2.0.18 to 2.0.19
2022-07-08 08:35:51 +02:00
Kamil Mysliwiec
0c932678e0 Merge pull request #9886 from nestjs/dependabot/npm_and_yarn/supertest-6.2.4
chore(deps-dev): bump supertest from 6.2.3 to 6.2.4
2022-07-08 08:35:44 +02:00
Kamil Mysliwiec
7d7aa9ed60 Merge pull request #9888 from nestjs/dependabot/npm_and_yarn/types/cache-manager-4.0.1
chore(deps-dev): bump @types/cache-manager from 4.0.0 to 4.0.1
2022-07-08 08:35:36 +02:00
Kamil Mysliwiec
265748f7fa Merge pull request #9889 from nestjs/dependabot/npm_and_yarn/cli-color-2.0.3
chore(deps): bump cli-color from 2.0.2 to 2.0.3
2022-07-08 08:35:32 +02:00
Kamil Mysliwiec
9bbee5a184 Merge pull request #9890 from nestjs/dependabot/npm_and_yarn/types/node-18.0.3
chore(deps-dev): bump @types/node from 18.0.0 to 18.0.3
2022-07-08 08:35:28 +02:00
Kamil Mysliwiec
3650907d32 Merge pull request #9882 from nestjs/dependabot/npm_and_yarn/fastify/multipart-7.1.0
chore(deps-dev): bump @fastify/multipart from 6.0.0 to 7.1.0
2022-07-08 08:35:00 +02:00
Kamil Mysliwiec
b8370e97d6 Merge pull request #9881 from yevgeniypak/websockets-max-http-buffer-size-default-value
docs(websockets): update GatewayMetadata maxHttpBufferSize default value to 1 MB
2022-07-08 08:21:09 +02:00
dependabot[bot]
33059ccfb6 chore(deps-dev): bump @types/node from 18.0.0 to 18.0.3
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.0.0 to 18.0.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-08 00:18:38 +00:00
dependabot[bot]
5337051a3d chore(deps): bump cli-color from 2.0.2 to 2.0.3
Bumps [cli-color](https://github.com/medikoo/cli-color) from 2.0.2 to 2.0.3.
- [Release notes](https://github.com/medikoo/cli-color/releases)
- [Changelog](https://github.com/medikoo/cli-color/blob/main/CHANGELOG.md)
- [Commits](https://github.com/medikoo/cli-color/compare/v2.0.2...v2.0.3)

---
updated-dependencies:
- dependency-name: cli-color
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-08 00:17:12 +00:00
dependabot[bot]
7e2afbe583 chore(deps-dev): bump @types/cache-manager from 4.0.0 to 4.0.1
Bumps [@types/cache-manager](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/cache-manager) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/cache-manager)

---
updated-dependencies:
- dependency-name: "@types/cache-manager"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-08 00:15:59 +00:00
dependabot[bot]
db9adedcf5 chore(deps-dev): bump supertest from 6.2.3 to 6.2.4
Bumps [supertest](https://github.com/visionmedia/supertest) from 6.2.3 to 6.2.4.
- [Release notes](https://github.com/visionmedia/supertest/releases)
- [Commits](https://github.com/visionmedia/supertest/compare/v6.2.3...v6.2.4)

---
updated-dependencies:
- dependency-name: supertest
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-08 00:10:04 +00:00
dependabot[bot]
a9d12cb2bd chore(deps-dev): bump nodemon from 2.0.18 to 2.0.19
Bumps [nodemon](https://github.com/remy/nodemon) from 2.0.18 to 2.0.19.
- [Release notes](https://github.com/remy/nodemon/releases)
- [Commits](https://github.com/remy/nodemon/compare/v2.0.18...v2.0.19)

---
updated-dependencies:
- dependency-name: nodemon
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-08 00:06:26 +00:00
dependabot[bot]
5c05cddf11 chore(deps-dev): bump ioredis from 5.0.4 to 5.1.0
Bumps [ioredis](https://github.com/luin/ioredis) from 5.0.4 to 5.1.0.
- [Release notes](https://github.com/luin/ioredis/releases)
- [Changelog](https://github.com/luin/ioredis/blob/main/CHANGELOG.md)
- [Commits](https://github.com/luin/ioredis/compare/v5.0.4...v5.1.0)

---
updated-dependencies:
- dependency-name: ioredis
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-08 00:05:28 +00:00
dependabot[bot]
2c9c90f479 chore(deps-dev): bump @fastify/multipart from 6.0.0 to 7.1.0
Bumps [@fastify/multipart](https://github.com/fastify/fastify-multipart) from 6.0.0 to 7.1.0.
- [Release notes](https://github.com/fastify/fastify-multipart/releases)
- [Commits](https://github.com/fastify/fastify-multipart/compare/v6.0.0...v7.1.0)

---
updated-dependencies:
- dependency-name: "@fastify/multipart"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-08 00:03:55 +00:00
“Yevgeniy”
673d04098d docs(websockets): update GatewayMetadata maxHttpBufferSize default value to 1 MB 2022-07-08 00:43:34 +06:00
Kamil Myśliwiec
c2d73f91d7 chore(): resolve conflicts 2022-07-07 12:23:39 +02:00
Kamil Myśliwiec
50e457817d deps(): upgrade ts-node to 10.8.2 2022-07-07 12:22:45 +02:00
Kamil Mysliwiec
52950aa095 Merge pull request #9869 from nestjs/dependabot/npm_and_yarn/fast-json-stringify-5.0.6
chore(deps): bump fast-json-stringify from 5.0.1 to 5.0.6
2022-07-07 11:23:33 +02:00
Kamil Myśliwiec
2c52ec5a31 Merge branch 'master' of https://github.com/nestjs/nest 2022-07-07 11:23:20 +02:00
Kamil Myśliwiec
987d48ceee sample(): add test script to 08-webpack sample 2022-07-07 11:23:17 +02:00
Kamil Mysliwiec
5ac821c4d4 Merge pull request #9851 from nestjs/dependabot/npm_and_yarn/kafkajs-2.1.0
chore(deps-dev): bump kafkajs from 2.0.2 to 2.1.0
2022-07-07 11:22:11 +02:00
dependabot[bot]
3508ea99b0 chore(deps): bump fast-json-stringify from 5.0.1 to 5.0.6
Bumps [fast-json-stringify](https://github.com/fastify/fast-json-stringify) from 5.0.1 to 5.0.6.
- [Release notes](https://github.com/fastify/fast-json-stringify/releases)
- [Commits](https://github.com/fastify/fast-json-stringify/compare/v5.0.1...v5.0.6)

---
updated-dependencies:
- dependency-name: fast-json-stringify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-07 09:17:07 +00:00
Kamil Mysliwiec
1d1b369f39 Merge pull request #9848 from nestjs/dependabot/npm_and_yarn/graphql-tools-8.3.0
chore(deps-dev): bump graphql-tools from 8.2.13 to 8.3.0
2022-07-07 11:15:31 +02:00
Kamil Mysliwiec
c2f738375b Merge pull request #9837 from nestjs/dependabot/npm_and_yarn/commitlint/config-angular-17.0.3
chore(deps-dev): bump @commitlint/config-angular from 17.0.0 to 17.0.3
2022-07-07 11:15:20 +02:00
Kamil Mysliwiec
902bfe5d15 Merge pull request #9871 from nestjs/dependabot/npm_and_yarn/redis-4.2.0
chore(deps-dev): bump redis from 3.1.2 to 4.2.0
2022-07-07 11:15:07 +02:00
dependabot[bot]
bc87794b1f chore(deps-dev): bump graphql-tools from 8.2.13 to 8.3.0
Bumps [graphql-tools](https://github.com/ardatan/graphql-tools/tree/HEAD/packages/graphql-tools) from 8.2.13 to 8.3.0.
- [Release notes](https://github.com/ardatan/graphql-tools/releases)
- [Changelog](https://github.com/ardatan/graphql-tools/blob/master/packages/graphql-tools/CHANGELOG.md)
- [Commits](https://github.com/ardatan/graphql-tools/commits/graphql-tools@8.3.0/packages/graphql-tools)

---
updated-dependencies:
- dependency-name: graphql-tools
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-07 09:14:41 +00:00
Kamil Mysliwiec
0f7ce9a9bd Merge pull request #9853 from nestjs/dependabot/npm_and_yarn/fastify-4.2.0
chore(deps): bump fastify from 3.29.0 to 4.2.0
2022-07-07 11:11:38 +02:00
Kamil Myśliwiec
3a9aa7522b chore(fastify): explicitly cast plugin imports 2022-07-07 11:11:11 +02:00
dependabot[bot]
7bb359c325 chore(deps-dev): bump redis from 3.1.2 to 4.2.0
Bumps [redis](https://github.com/redis/node-redis) from 3.1.2 to 4.2.0.
- [Release notes](https://github.com/redis/node-redis/releases)
- [Changelog](https://github.com/redis/node-redis/blob/master/CHANGELOG.md)
- [Commits](https://github.com/redis/node-redis/compare/v3.1.2...redis@4.2.0)

---
updated-dependencies:
- dependency-name: redis
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-07 09:10:08 +00:00
Kamil Mysliwiec
21800378ed Merge pull request #9870 from nestjs/dependabot/npm_and_yarn/mongoose-6.4.3
chore(deps-dev): bump mongoose from 6.4.0 to 6.4.3
2022-07-07 11:07:18 +02:00
Kamil Mysliwiec
97862d49db Merge pull request #9852 from nestjs/dependabot/npm_and_yarn/types/sinon-10.0.12
chore(deps-dev): bump @types/sinon from 10.0.11 to 10.0.12
2022-07-07 11:07:13 +02:00
Kamil Mysliwiec
2d7b7ec20c Merge pull request #9766 from nestjs/dependabot/npm_and_yarn/middie-7.1.0
chore(deps): bump middie from 6.1.0 to 7.1.0
2022-07-07 11:07:06 +02:00
dependabot[bot]
740f567fcf chore(deps): bump middie from 6.1.0 to 7.1.0
Bumps [middie](https://github.com/fastify/middie) from 6.1.0 to 7.1.0.
- [Release notes](https://github.com/fastify/middie/releases)
- [Commits](https://github.com/fastify/middie/commits)

---
updated-dependencies:
- dependency-name: middie
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-07 09:01:09 +00:00
dependabot[bot]
4db51ac3a4 chore(deps): bump fastify from 3.29.0 to 4.2.0
Bumps [fastify](https://github.com/fastify/fastify) from 3.29.0 to 4.2.0.
- [Release notes](https://github.com/fastify/fastify/releases)
- [Commits](https://github.com/fastify/fastify/compare/v3.29.0...v4.2.0)

---
updated-dependencies:
- dependency-name: fastify
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-07 09:01:03 +00:00
dependabot[bot]
b5b1ce7f06 chore(deps-dev): bump mongoose from 6.4.0 to 6.4.3
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.4.0 to 6.4.3.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/6.4.0...6.4.3)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-07 09:00:57 +00:00
dependabot[bot]
05b9e651d1 chore(deps-dev): bump @types/sinon from 10.0.11 to 10.0.12
Bumps [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) from 10.0.11 to 10.0.12.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/sinon)

---
updated-dependencies:
- dependency-name: "@types/sinon"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-07 09:00:44 +00:00
dependabot[bot]
f6e3831057 chore(deps-dev): bump kafkajs from 2.0.2 to 2.1.0
Bumps [kafkajs](https://github.com/tulios/kafkajs) from 2.0.2 to 2.1.0.
- [Release notes](https://github.com/tulios/kafkajs/releases)
- [Changelog](https://github.com/tulios/kafkajs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tulios/kafkajs/compare/v2.0.2...v2.1.0)

---
updated-dependencies:
- dependency-name: kafkajs
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-07 09:00:43 +00:00
Kamil Mysliwiec
69c520560a Merge pull request #9872 from Wojciechowski-Marcin/update-kafka-external-interface
fix(microservices): Update LogEntry in external kafka interface
2022-07-07 10:58:57 +02:00
Kamil Mysliwiec
4605f35dfa Merge pull request #9876 from nestjs/dependabot/npm_and_yarn/sample/07-sequelize/moment-2.29.4
chore(deps): bump moment from 2.29.2 to 2.29.4 in /sample/07-sequelize
2022-07-07 10:57:27 +02:00
Kamil Mysliwiec
5233b47dc6 Merge pull request #9875 from nestjs/dependabot/npm_and_yarn/sample/26-queues/moment-2.29.4
chore(deps): bump moment from 2.29.2 to 2.29.4 in /sample/26-queues
2022-07-07 10:57:20 +02:00
Kamil Mysliwiec
504e1bd9ac Merge pull request #9877 from nestjs/dependabot/npm_and_yarn/sample/27-scheduling/moment-2.29.4
chore(deps): bump moment from 2.29.2 to 2.29.4 in /sample/27-scheduling
2022-07-07 10:57:12 +02:00
Kamil Mysliwiec
e32d0aa6f5 Merge pull request #9878 from nestjs/dependabot/npm_and_yarn/moment-2.29.4
chore(deps): bump moment from 2.29.2 to 2.29.4
2022-07-07 10:57:03 +02:00
Kamil Myśliwiec
578ddb5996 ci(): use node v16 for samples, lint, test cov 2022-07-07 10:55:37 +02:00
Kamil Myśliwiec
8504690856 ci(): bump codechecks node version 2022-07-07 10:45:42 +02:00
Kamil Myśliwiec
d44a647969 ci(codechecks): add logs to the benchmark pipeline 2022-07-07 10:37:02 +02:00
Kamil Myśliwiec
cf0a3d2eec style(fastify): let to const, address lint error 2022-07-07 10:27:38 +02:00
Kamil Myśliwiec
836484d47c ci(): update benchmarks job 2022-07-07 10:19:10 +02:00
Kamil Myśliwiec
05d0fda6eb fix(fastify): address deprecation warning 2022-07-07 10:18:53 +02:00
dependabot[bot]
8d56d3b3b4 chore(deps-dev): bump @commitlint/config-angular from 17.0.0 to 17.0.3
Bumps [@commitlint/config-angular](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/config-angular) from 17.0.0 to 17.0.3.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/config-angular/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/commits/v17.0.3/@commitlint/config-angular)

---
updated-dependencies:
- dependency-name: "@commitlint/config-angular"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-07 07:30:18 +00:00
dependabot[bot]
fc11b58f6d chore(deps): bump moment from 2.29.2 to 2.29.4
Bumps [moment](https://github.com/moment/moment) from 2.29.2 to 2.29.4.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.2...2.29.4)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-07 07:28:29 +00:00
dependabot[bot]
1fc51dcbde chore(deps): bump moment from 2.29.2 to 2.29.4 in /sample/27-scheduling
Bumps [moment](https://github.com/moment/moment) from 2.29.2 to 2.29.4.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.2...2.29.4)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-07 07:27:41 +00:00
dependabot[bot]
8803812dc9 chore(deps): bump moment from 2.29.2 to 2.29.4 in /sample/07-sequelize
Bumps [moment](https://github.com/moment/moment) from 2.29.2 to 2.29.4.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.2...2.29.4)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-07 07:27:34 +00:00
dependabot[bot]
be803609e9 chore(deps): bump moment from 2.29.2 to 2.29.4 in /sample/26-queues
Bumps [moment](https://github.com/moment/moment) from 2.29.2 to 2.29.4.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.2...2.29.4)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-07 07:27:33 +00:00
Kamil Mysliwiec
21bd8c3736 Merge pull request #9588 from nestjs/9.0.0
chore(): v9.0.0 release (wip)
2022-07-07 09:26:26 +02:00
Kamil Myśliwiec
569916117c Merge branch '9.0.0' of https://github.com/nestjs/nest into 9.0.0 2022-07-07 09:25:53 +02:00
Kamil Myśliwiec
c728ecf9b4 chore(): resolve conflicts 2022-07-07 09:25:38 +02:00
Wojciechowski Marcin
0b73d04f06 fix(microservices): Update LogEntry in external kafka interface 2022-07-06 16:56:23 +02:00
Kamil Mysliwiec
9108e4166c Update Readme.md 2022-07-05 09:40:28 +02:00
Kamil Mysliwiec
349fb280b9 Merge pull request #9832 from thiagomini/feature/file-mime-type-pipe
feat(common): file type validator
2022-06-27 14:57:45 +02:00
Kamil Mysliwiec
d5b6e48920 Merge pull request #9838 from nestjs/dependabot/npm_and_yarn/core-js-3.23.3
chore(deps-dev): bump core-js from 3.23.2 to 3.23.3
2022-06-27 09:34:27 +02:00
Kamil Mysliwiec
2c2187806f Merge pull request #9839 from nestjs/dependabot/npm_and_yarn/commitlint/cli-17.0.3
chore(deps-dev): bump @commitlint/cli from 17.0.2 to 17.0.3
2022-06-27 09:34:23 +02:00
Kamil Mysliwiec
e32d83b15d Merge pull request #9841 from nestjs/dependabot/npm_and_yarn/lint-staged-13.0.3
chore(deps-dev): bump lint-staged from 13.0.2 to 13.0.3
2022-06-27 09:34:16 +02:00
Kamil Myśliwiec
018c0d24d6 test(cors): skip fastify cors integration tests 2022-06-27 09:32:56 +02:00
Kamil Mysliwiec
650b7bcb7e Update packages/platform-fastify/package.json
Co-authored-by: Manuel Spigolon <behemoth89@gmail.com>
2022-06-27 08:55:49 +02:00
Kamil Mysliwiec
060130c1a0 Merge pull request #9831 from thiagomini/fix/test-script
chore(): fix test script
2022-06-27 08:47:12 +02:00
dependabot[bot]
9c4b09146a chore(deps-dev): bump lint-staged from 13.0.2 to 13.0.3
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 13.0.2 to 13.0.3.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v13.0.2...v13.0.3)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-27 01:04:49 +00:00
dependabot[bot]
ac41bb9ecc chore(deps-dev): bump @commitlint/cli from 17.0.2 to 17.0.3
Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/cli) from 17.0.2 to 17.0.3.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/cli/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/commits/v17.0.3/@commitlint/cli)

---
updated-dependencies:
- dependency-name: "@commitlint/cli"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-27 00:56:36 +00:00
dependabot[bot]
2e0b6069f2 chore(deps-dev): bump core-js from 3.23.2 to 3.23.3
Bumps [core-js](https://github.com/zloirock/core-js) from 3.23.2 to 3.23.3.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/compare/v3.23.2...v3.23.3)

---
updated-dependencies:
- dependency-name: core-js
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-27 00:44:45 +00:00
Thiago Martins
231b9f6b3e feat(common): file type validator
add regex support when checking a file mime-type
2022-06-24 18:26:44 -03:00
Thiago Martins
c3f27f54d1 chore(): fix test script
fix package.json test script to previous version
2022-06-24 16:27:32 -03:00
Kamil Mysliwiec
709ea327d7 Merge pull request #9830 from nestjs/dependabot/npm_and_yarn/nodemon-2.0.18
chore(deps-dev): bump nodemon from 2.0.16 to 2.0.18
2022-06-24 13:55:48 +02:00
Kamil Mysliwiec
f6e3465927 Merge pull request #9828 from nestjs/dependabot/npm_and_yarn/fast-json-stringify-5.0.1
chore(deps): bump fast-json-stringify from 4.2.0 to 5.0.1
2022-06-24 13:55:43 +02:00
Kamil Mysliwiec
b2a4633a8a Merge pull request #9827 from nestjs/dependabot/npm_and_yarn/graphql-tools-8.2.13
chore(deps-dev): bump graphql-tools from 8.2.12 to 8.2.13
2022-06-24 13:55:35 +02:00
Kamil Mysliwiec
901cf3ff88 Merge pull request #9825 from nestjs/renovate/npm-got-vulnerability
chore(deps): update dependency got to 11.8.5 [security]
2022-06-24 13:55:24 +02:00
Kamil Myśliwiec
55b95c794e Merge branch 'micalevisk-feat/testing-module-options' into 9.0.0 2022-06-24 10:19:34 +02:00
Kamil Myśliwiec
21a0aeeea5 chore(): fix lockfile 2022-06-24 10:19:23 +02:00
Kamil Myśliwiec
8293aac2fb Merge branch 'feat/testing-module-options' of github.com:micalevisk/nest into micalevisk-feat/testing-module-options 2022-06-24 10:17:28 +02:00
Kamil Mysliwiec
69377a61bf Merge pull request #9829 from micalevisk/update-error-messages
docs(common): replace 'v8' by 'v9' on error message
2022-06-24 09:20:58 +02:00
renovate[bot]
55a6434b36 chore(deps): update dependency got to 11.8.5 [security] 2022-06-24 07:03:59 +00:00
dependabot[bot]
8ac2c25112 chore(deps-dev): bump nodemon from 2.0.16 to 2.0.18
Bumps [nodemon](https://github.com/remy/nodemon) from 2.0.16 to 2.0.18.
- [Release notes](https://github.com/remy/nodemon/releases)
- [Commits](https://github.com/remy/nodemon/compare/v2.0.16...v2.0.18)

---
updated-dependencies:
- dependency-name: nodemon
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-24 00:08:01 +00:00
Micael Levi L. Cavalcante
70b142d45a docs(common): replace 'v8' by 'v9' on error message 2022-06-23 20:05:32 -04:00
dependabot[bot]
f1b4caa0c4 chore(deps): bump fast-json-stringify from 4.2.0 to 5.0.1
Bumps [fast-json-stringify](https://github.com/fastify/fast-json-stringify) from 4.2.0 to 5.0.1.
- [Release notes](https://github.com/fastify/fast-json-stringify/releases)
- [Commits](https://github.com/fastify/fast-json-stringify/commits)

---
updated-dependencies:
- dependency-name: fast-json-stringify
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-24 00:04:48 +00:00
dependabot[bot]
19fe5b802d chore(deps-dev): bump graphql-tools from 8.2.12 to 8.2.13
Bumps [graphql-tools](https://github.com/ardatan/graphql-tools/tree/HEAD/packages/graphql-tools) from 8.2.12 to 8.2.13.
- [Release notes](https://github.com/ardatan/graphql-tools/releases)
- [Changelog](https://github.com/ardatan/graphql-tools/blob/master/packages/graphql-tools/CHANGELOG.md)
- [Commits](https://github.com/ardatan/graphql-tools/commits/graphql-tools@8.2.13/packages/graphql-tools)

---
updated-dependencies:
- dependency-name: graphql-tools
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-24 00:03:50 +00:00
Micael Levi (@micalevisk)
04beaf939c chore(deps): upgrade @fastify/cors to v8.0.0 2022-06-23 19:41:20 -04:00
Micael Levi (@micalevisk)
5e8c61985b test(integration): drop the first arg of createNestApplication 2022-06-23 19:21:43 -04:00
Micael Levi (@micalevisk)
eadb5857db feat(testing): allow omitting httpAdapter arg on createNestApplication 2022-06-23 19:21:43 -04:00
Kamil Myśliwiec
772ed954b7 test(core): fix injector unit tests 2022-06-23 13:49:55 +02:00
Kamil Myśliwiec
8ca45b3163 fix(core): injector should rethrow nested exception for scoped providers 2022-06-23 13:27:56 +02:00
Kamil Myśliwiec
6cb2717772 fix(fastify): fix listen method 2022-06-23 13:15:35 +02:00
Kamil Myśliwiec
56404cfd71 fix(fastify): hotfix listen method 2022-06-21 13:20:55 +02:00
Kamil Myśliwiec
522b9912ba chore(fastify): remove the use of deprecated listen method 2022-06-21 12:53:38 +02:00
Kamil Myśliwiec
fa4c899255 chore(core): rename child context id info to host component info 2022-06-21 10:59:18 +02:00
Kamil Mysliwiec
6274e39ccf Merge pull request #9815 from nestjs/dependabot/npm_and_yarn/core-js-3.23.2
chore(deps-dev): bump core-js from 3.23.1 to 3.23.2
2022-06-21 10:10:14 +02:00
Kamil Mysliwiec
a70a5aaf2d Merge pull request #9814 from micalevisk/test/integration-repl
fix(integration,core): register native function aliases on repl feature
2022-06-21 09:37:57 +02:00
dependabot[bot]
a18f9c881e chore(deps-dev): bump core-js from 3.23.1 to 3.23.2
Bumps [core-js](https://github.com/zloirock/core-js) from 3.23.1 to 3.23.2.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/compare/v3.23.1...v3.23.2)

---
updated-dependencies:
- dependency-name: core-js
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-21 00:05:42 +00:00
Micael Levi (@micalevisk)
4a975f48eb fix(core): when native repl functions has aliases to register 2022-06-20 12:16:31 -04:00
Micael Levi (@micalevisk)
6df03b83eb test(integration): add missing test for get function alias on repl 2022-06-20 11:53:44 -04:00
Kamil Mysliwiec
e091cd5c07 Merge pull request #8802 from wSedlacek/fix/interceptor-check-headers-sent
fix: only send exception responses if header is not already sent
2022-06-20 15:00:38 +02:00
Kamil Mysliwiec
95cea896c7 Merge pull request #9718 from thiagomini/feature/4752-file-validators-pipe
Feature/4752 file validators pipe
2022-06-20 14:59:48 +02:00
Kamil Mysliwiec
61b11ad315 Merge pull request #9796 from nestjs/dependabot/npm_and_yarn/prettier-2.7.1
chore(deps-dev): bump prettier from 2.7.0 to 2.7.1
2022-06-20 08:49:59 +02:00
Kamil Mysliwiec
ff46a1c250 Merge pull request #9806 from chunghha/fix_typos
chore: typo fix
2022-06-20 08:49:48 +02:00
Kamil Mysliwiec
f3060a02a2 Merge pull request #9807 from nestjs/dependabot/npm_and_yarn/mongoose-6.4.0
chore(deps-dev): bump mongoose from 6.3.8 to 6.4.0
2022-06-20 08:49:13 +02:00
Kamil Mysliwiec
3df2932315 Merge pull request #9795 from ZanMinKian/refactor-relector
perf(core): use find instead of filter
2022-06-20 08:38:45 +02:00
Kamil Mysliwiec
63a8161b69 Merge pull request #9808 from nestjs/dependabot/npm_and_yarn/typescript-4.7.4
chore(deps-dev): bump typescript from 4.7.3 to 4.7.4
2022-06-20 08:37:10 +02:00
dependabot[bot]
9f27cf7600 chore(deps-dev): bump typescript from 4.7.3 to 4.7.4
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.7.3 to 4.7.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.7.3...v4.7.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-20 00:19:43 +00:00
dependabot[bot]
e845ffdf63 chore(deps-dev): bump mongoose from 6.3.8 to 6.4.0
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.3.8 to 6.4.0.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/6.3.8...6.4.0)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-20 00:15:43 +00:00
Chris Ha
bf7376803c chore: typo fix 2022-06-19 10:36:22 -05:00
Thiago Martins
2e8426b2b3 test(sample): add file upload e2e test
add test using file parse pipe
2022-06-17 16:33:44 -03:00
Thiago Martins
ad0d1bcb17 refactor(common): file type validator
add partial mimetype check
2022-06-17 16:33:06 -03:00
Thiago Martins
bdd939749f refactor(common): parse file pipe
add async validation feature
2022-06-17 14:56:18 -03:00
Kamil Myśliwiec
f41ee3d471 chore(deps): bump fastify/formbody package 2022-06-17 14:21:46 +02:00
dependabot[bot]
71e2ee556e chore(deps-dev): bump prettier from 2.7.0 to 2.7.1
Bumps [prettier](https://github.com/prettier/prettier) from 2.7.0 to 2.7.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.7.0...2.7.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-17 12:21:04 +00:00
Kamil Mysliwiec
83098e2d4c Merge pull request #9791 from nestjs/dependabot/npm_and_yarn/apollo-server-core-3.9.0
chore(deps-dev): bump apollo-server-core from 3.8.2 to 3.9.0
2022-06-17 14:15:43 +02:00
Kamil Mysliwiec
1a4ce9696a Merge pull request #9790 from nestjs/dependabot/npm_and_yarn/nestjs/apollo-10.0.16
chore(deps-dev): bump @nestjs/apollo from 10.0.14 to 10.0.16
2022-06-17 14:15:24 +02:00
dependabot[bot]
f462fc4fb1 chore(deps-dev): bump @nestjs/apollo from 10.0.14 to 10.0.16
Bumps [@nestjs/apollo](https://github.com/nestjs/graphql) from 10.0.14 to 10.0.16.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.14...v10.0.16)

---
updated-dependencies:
- dependency-name: "@nestjs/apollo"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-17 11:59:51 +00:00
dependabot[bot]
42738260fd chore(deps-dev): bump apollo-server-core from 3.8.2 to 3.9.0
Bumps [apollo-server-core](https://github.com/apollographql/apollo-server/tree/HEAD/packages/apollo-server-core) from 3.8.2 to 3.9.0.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Changelog](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-server/commits/apollo-server-core@3.9.0/packages/apollo-server-core)

---
updated-dependencies:
- dependency-name: apollo-server-core
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-17 11:59:37 +00:00
Kamil Mysliwiec
454df7fcf0 Merge pull request #9787 from nestjs/dependabot/npm_and_yarn/apollo-server-express-3.9.0
chore(deps-dev): bump apollo-server-express from 3.8.2 to 3.9.0
2022-06-17 13:57:16 +02:00
Kamil Mysliwiec
43358d4e63 Merge pull request #9788 from nestjs/dependabot/npm_and_yarn/types/node-18.0.0
chore(deps-dev): bump @types/node from 17.0.43 to 18.0.0
2022-06-17 13:57:10 +02:00
Kamil Mysliwiec
49c956e65f Merge pull request #9792 from nestjs/dependabot/npm_and_yarn/nestjs/graphql-10.0.16
chore(deps-dev): bump @nestjs/graphql from 10.0.15 to 10.0.16
2022-06-17 13:57:06 +02:00
Kamil Mysliwiec
f8f6d78887 Merge pull request #9794 from nestjs/dependabot/npm_and_yarn/lint-staged-13.0.2
chore(deps-dev): bump lint-staged from 13.0.1 to 13.0.2
2022-06-17 13:56:51 +02:00
曾明健
91879d5bc0 perf(core): use find instead of filter 2022-06-17 09:13:40 +00:00
dependabot[bot]
0e632b4518 chore(deps-dev): bump lint-staged from 13.0.1 to 13.0.2
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 13.0.1 to 13.0.2.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v13.0.1...v13.0.2)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-17 00:07:08 +00:00
dependabot[bot]
ba58557421 chore(deps-dev): bump @nestjs/graphql from 10.0.15 to 10.0.16
Bumps [@nestjs/graphql](https://github.com/nestjs/graphql) from 10.0.15 to 10.0.16.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.15...v10.0.16)

---
updated-dependencies:
- dependency-name: "@nestjs/graphql"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-16 00:23:01 +00:00
dependabot[bot]
ad35b88d9b chore(deps-dev): bump @types/node from 17.0.43 to 18.0.0
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.43 to 18.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-16 00:10:08 +00:00
dependabot[bot]
854df635c0 chore(deps-dev): bump apollo-server-express from 3.8.2 to 3.9.0
Bumps [apollo-server-express](https://github.com/apollographql/apollo-server/tree/HEAD/packages/apollo-server-express) from 3.8.2 to 3.9.0.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Changelog](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-server/commits/apollo-server-express@3.9.0/packages/apollo-server-express)

---
updated-dependencies:
- dependency-name: apollo-server-express
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-16 00:08:36 +00:00
Kamil Myśliwiec
71fb83bc87 Merge branch '9.0.0' of https://github.com/nestjs/nest into 9.0.0 2022-06-15 11:54:47 +02:00
Kamil Myśliwiec
907b8601a2 chore(platform-fastify): upgrade to fastify v4 2022-06-15 11:54:39 +02:00
Kamil Mysliwiec
29b2ffa32d Merge pull request #9705 from vinnymac/feature/error-chaining
feat(common): Add error chaining support to http exception
2022-06-15 11:49:31 +02:00
Kamil Myśliwiec
7501e3f700 chore(): resolve conflicts 2022-06-15 11:47:23 +02:00
Kamil Mysliwiec
e3ddfafcbf Merge pull request #9681 from micalevisk/fix-issue-9677
fix(microservices): allow `postfixId` on `KafkaOptions` to be an empty string
2022-06-15 11:43:28 +02:00
Kamil Mysliwiec
42a538e7b8 Merge pull request #9674 from dkonasov/message-handler-type
fix(microservices): Fixed typings for MessageHandler
2022-06-15 11:42:56 +02:00
Kamil Mysliwiec
b29d88fec5 Merge pull request #9684 from nestjs/feat/repl
feat(core): read–eval–print loop feature
2022-06-15 11:41:05 +02:00
Kamil Mysliwiec
36eda246c9 Merge pull request #9779 from nestjs/dependabot/npm_and_yarn/concurrently-7.2.2
chore(deps-dev): bump concurrently from 7.2.1 to 7.2.2
2022-06-15 10:05:17 +02:00
dependabot[bot]
c539fbd2d6 chore(deps-dev): bump concurrently from 7.2.1 to 7.2.2
Bumps [concurrently](https://github.com/open-cli-tools/concurrently) from 7.2.1 to 7.2.2.
- [Release notes](https://github.com/open-cli-tools/concurrently/releases)
- [Commits](https://github.com/open-cli-tools/concurrently/compare/v7.2.1...v7.2.2)

---
updated-dependencies:
- dependency-name: concurrently
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-15 07:16:06 +00:00
Kamil Mysliwiec
6843117558 Merge pull request #9720 from micalevisk/feat/repl-fix-injections
fix(core): prevent renaming global providers and modules in the repl
2022-06-15 09:12:42 +02:00
Kamil Mysliwiec
4e37670df3 Merge pull request #9780 from nestjs/dependabot/npm_and_yarn/types/node-17.0.43
chore(deps-dev): bump @types/node from 17.0.42 to 17.0.43
2022-06-15 09:12:14 +02:00
Kamil Mysliwiec
f88758bfa9 Merge pull request #9781 from nestjs/dependabot/npm_and_yarn/core-js-3.23.1
chore(deps-dev): bump core-js from 3.23.0 to 3.23.1
2022-06-15 09:12:09 +02:00
Kamil Mysliwiec
c72589161a Merge pull request #9782 from nestjs/dependabot/npm_and_yarn/nestjs/mongoose-9.1.1
chore(deps-dev): bump @nestjs/mongoose from 9.1.0 to 9.1.1
2022-06-15 09:12:03 +02:00
dependabot[bot]
8a5bc3c1b0 chore(deps-dev): bump @nestjs/mongoose from 9.1.0 to 9.1.1
Bumps [@nestjs/mongoose](https://github.com/nestjs/mongoose) from 9.1.0 to 9.1.1.
- [Release notes](https://github.com/nestjs/mongoose/releases)
- [Changelog](https://github.com/nestjs/mongoose/blob/master/.release-it.json)
- [Commits](https://github.com/nestjs/mongoose/compare/9.1.0...9.1.1)

---
updated-dependencies:
- dependency-name: "@nestjs/mongoose"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-15 00:11:56 +00:00
dependabot[bot]
5592aa96f9 chore(deps-dev): bump core-js from 3.23.0 to 3.23.1
Bumps [core-js](https://github.com/zloirock/core-js) from 3.23.0 to 3.23.1.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/compare/v3.23.0...v3.23.1)

---
updated-dependencies:
- dependency-name: core-js
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-15 00:09:14 +00:00
dependabot[bot]
cbd89b5da6 chore(deps-dev): bump @types/node from 17.0.42 to 17.0.43
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.42 to 17.0.43.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-15 00:06:00 +00:00
Micael Levi (@micalevisk)
1cc12acaf6 refactor(repl): extract utility from repl main file 2022-06-14 08:48:35 -04:00
Kamil Mysliwiec
0f8beee711 Merge pull request #9772 from nestjs/dependabot/npm_and_yarn/prettier-2.7.0
chore(deps-dev): bump prettier from 2.6.2 to 2.7.0
2022-06-14 09:29:51 +02:00
dependabot[bot]
e2d1205103 chore(deps-dev): bump prettier from 2.6.2 to 2.7.0
Bumps [prettier](https://github.com/prettier/prettier) from 2.6.2 to 2.7.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.6.2...2.7.0)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-14 07:28:38 +00:00
Kamil Mysliwiec
0fcfa92a79 Merge pull request #9734 from nestjs/dependabot/npm_and_yarn/ts-node-10.8.1
chore(deps-dev): bump ts-node from 10.8.0 to 10.8.1
2022-06-14 09:28:16 +02:00
Kamil Mysliwiec
b72aaa6537 Merge pull request #9761 from nestjs/dependabot/npm_and_yarn/fast-json-stringify-4.2.0
chore(deps): bump fast-json-stringify from 4.1.0 to 4.2.0
2022-06-14 09:27:56 +02:00
Kamil Mysliwiec
fce8d676d9 Merge pull request #9770 from nestjs/dependabot/npm_and_yarn/ws-8.8.0
chore(deps): bump ws from 8.7.0 to 8.8.0
2022-06-14 09:27:51 +02:00
Kamil Mysliwiec
3f84e55cb3 Merge pull request #9771 from nestjs/dependabot/npm_and_yarn/core-js-3.23.0
chore(deps-dev): bump core-js from 3.22.8 to 3.23.0
2022-06-14 09:27:47 +02:00
Kamil Mysliwiec
7810b006cd Merge pull request #9773 from nestjs/dependabot/npm_and_yarn/types/cache-manager-4.0.0
chore(deps-dev): bump @types/cache-manager from 3.4.3 to 4.0.0
2022-06-14 09:27:36 +02:00
Kamil Myśliwiec
465b883c2e chore(): update readme 2022-06-14 09:26:38 +02:00
Kamil Myśliwiec
f383352eae chore(@nestjs) publish v8.4.7 release 2022-06-14 09:25:23 +02:00
dependabot[bot]
6e8cf08e37 chore(deps-dev): bump @types/cache-manager from 3.4.3 to 4.0.0
Bumps [@types/cache-manager](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/cache-manager) from 3.4.3 to 4.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/cache-manager)

---
updated-dependencies:
- dependency-name: "@types/cache-manager"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-14 06:55:11 +00:00
dependabot[bot]
33f4d5be04 chore(deps): bump fast-json-stringify from 4.1.0 to 4.2.0
Bumps [fast-json-stringify](https://github.com/fastify/fast-json-stringify) from 4.1.0 to 4.2.0.
- [Release notes](https://github.com/fastify/fast-json-stringify/releases)
- [Commits](https://github.com/fastify/fast-json-stringify/compare/v4.1.0...v4.2.0)

---
updated-dependencies:
- dependency-name: fast-json-stringify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-14 06:51:57 +00:00
dependabot[bot]
42f5536e4b chore(deps-dev): bump core-js from 3.22.8 to 3.23.0
Bumps [core-js](https://github.com/zloirock/core-js) from 3.22.8 to 3.23.0.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/compare/v3.22.8...v3.23.0)

---
updated-dependencies:
- dependency-name: core-js
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-14 06:51:15 +00:00
Kamil Mysliwiec
11c32dfada Merge pull request #9731 from nestjs/dependabot/npm_and_yarn/apollo-server-core-3.8.2
chore(deps-dev): bump apollo-server-core from 3.8.1 to 3.8.2
2022-06-14 08:50:20 +02:00
Kamil Mysliwiec
995b516176 Merge pull request #9719 from delucca-workspaces/feat/export-base-rpc-context
feat(microservices): exposes base context on the main package
2022-06-14 08:49:13 +02:00
dependabot[bot]
547a5ca8c1 chore(deps): bump ws from 8.7.0 to 8.8.0
Bumps [ws](https://github.com/websockets/ws) from 8.7.0 to 8.8.0.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.7.0...8.8.0)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-14 06:49:08 +00:00
Kamil Mysliwiec
552313966c Merge pull request #9686 from sushant9096/master
chore(express): bump multer 1.4.4 to 1.4.4-lts.1 to fix "CVE-2022-24434"
2022-06-14 08:48:53 +02:00
Kamil Mysliwiec
279f6faeba Merge pull request #9751 from delucca-workspaces/fix/server-transport-connection-hanging
fix(microservices): adds feedback message when RabbitMQ server connection hangs
2022-06-14 08:48:24 +02:00
Kamil Mysliwiec
52cf0b7ba3 Merge pull request #9762 from nestjs/dependabot/npm_and_yarn/lint-staged-13.0.1
chore(deps-dev): bump lint-staged from 13.0.0 to 13.0.1
2022-06-14 08:46:55 +02:00
Kamil Mysliwiec
bc3b431258 Merge pull request #9764 from nestjs/dependabot/npm_and_yarn/graphql-tools-8.2.12
chore(deps-dev): bump graphql-tools from 8.2.11 to 8.2.12
2022-06-14 08:46:51 +02:00
Kamil Mysliwiec
ba971a71b6 Merge pull request #9765 from nestjs/dependabot/npm_and_yarn/point-of-view-6.3.0
chore(deps-dev): bump point-of-view from 6.2.1 to 6.3.0
2022-06-14 08:46:47 +02:00
Kamil Mysliwiec
6e7cf524c5 Merge pull request #9769 from nestjs/dependabot/npm_and_yarn/mongoose-6.3.8
chore(deps-dev): bump mongoose from 6.3.5 to 6.3.8
2022-06-14 08:46:26 +02:00
dependabot[bot]
92fc598713 chore(deps-dev): bump mongoose from 6.3.5 to 6.3.8
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.3.5 to 6.3.8.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/6.3.5...6.3.8)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-14 00:07:46 +00:00
dependabot[bot]
4e18c85b38 chore(deps-dev): bump point-of-view from 6.2.1 to 6.3.0
Bumps [point-of-view](https://github.com/fastify/point-of-view) from 6.2.1 to 6.3.0.
- [Release notes](https://github.com/fastify/point-of-view/releases)
- [Commits](https://github.com/fastify/point-of-view/commits)

---
updated-dependencies:
- dependency-name: point-of-view
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 13:01:00 +00:00
dependabot[bot]
f13e86de06 chore(deps-dev): bump graphql-tools from 8.2.11 to 8.2.12
Bumps [graphql-tools](https://github.com/ardatan/graphql-tools/tree/HEAD/packages/graphql-tools) from 8.2.11 to 8.2.12.
- [Release notes](https://github.com/ardatan/graphql-tools/releases)
- [Changelog](https://github.com/ardatan/graphql-tools/blob/master/packages/graphql-tools/CHANGELOG.md)
- [Commits](https://github.com/ardatan/graphql-tools/commits/graphql-tools@8.2.12/packages/graphql-tools)

---
updated-dependencies:
- dependency-name: graphql-tools
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 13:00:06 +00:00
dependabot[bot]
11a91fbec0 chore(deps-dev): bump lint-staged from 13.0.0 to 13.0.1
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 13.0.0 to 13.0.1.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v13.0.0...v13.0.1)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 12:57:28 +00:00
dependabot[bot]
3f72bde13f chore(deps-dev): bump ts-node from 10.8.0 to 10.8.1
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.8.0 to 10.8.1.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v10.8.0...v10.8.1)

---
updated-dependencies:
- dependency-name: ts-node
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 12:53:57 +00:00
dependabot[bot]
1ff80f8e8d chore(deps-dev): bump apollo-server-core from 3.8.1 to 3.8.2
Bumps [apollo-server-core](https://github.com/apollographql/apollo-server/tree/HEAD/packages/apollo-server-core) from 3.8.1 to 3.8.2.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Changelog](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-server/commits/apollo-server-core@3.8.2/packages/apollo-server-core)

---
updated-dependencies:
- dependency-name: apollo-server-core
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 12:53:53 +00:00
Kamil Mysliwiec
4c6fe8250f Merge pull request #9729 from nestjs/dependabot/npm_and_yarn/cache-manager-4.0.1
chore(deps-dev): bump cache-manager from 4.0.0 to 4.0.1
2022-06-13 14:51:31 +02:00
Kamil Mysliwiec
697d2b6570 Merge pull request #9730 from nestjs/dependabot/npm_and_yarn/typescript-4.7.3
chore(deps-dev): bump typescript from 4.7.2 to 4.7.3
2022-06-13 14:51:26 +02:00
Kamil Mysliwiec
75758a2dfd Merge pull request #9732 from nestjs/dependabot/npm_and_yarn/apollo-server-express-3.8.2
chore(deps-dev): bump apollo-server-express from 3.8.1 to 3.8.2
2022-06-13 14:51:19 +02:00
Kamil Mysliwiec
a9c4ef65a7 Merge pull request #9735 from nestjs/dependabot/npm_and_yarn/ts-morph-15.1.0
chore(deps-dev): bump ts-morph from 15.0.0 to 15.1.0
2022-06-13 14:51:14 +02:00
Kamil Mysliwiec
67c2c2b4fe Merge pull request #9740 from nestjs/dependabot/npm_and_yarn/grpc/proto-loader-0.6.13
chore(deps-dev): bump @grpc/proto-loader from 0.6.12 to 0.6.13
2022-06-13 14:51:10 +02:00
Kamil Mysliwiec
8065913faa Merge pull request #9755 from bovatitar/sample(05-sql-typeorm)-update-types-for-findOne
sample(sample/5): sample(sample/5): change types for id param in findone
2022-06-13 14:50:47 +02:00
Kamil Mysliwiec
1769c28cf5 Merge pull request #9756 from nestjs/dependabot/npm_and_yarn/types/node-17.0.42
chore(deps-dev): bump @types/node from 17.0.38 to 17.0.42
2022-06-13 14:49:42 +02:00
Kamil Mysliwiec
610a4eca74 Merge pull request #9757 from nestjs/dependabot/npm_and_yarn/fast-json-stringify-4.1.0
chore(deps): bump fast-json-stringify from 3.2.0 to 4.1.0
2022-06-13 14:49:35 +02:00
Kamil Mysliwiec
ade844e467 Merge pull request #9742 from mjgp2/stripProtoKeys-performance
Improve stripProtoKeys performance, especially for TypedArray
2022-06-13 14:49:26 +02:00
dependabot[bot]
f824853c38 chore(deps): bump fast-json-stringify from 3.2.0 to 4.1.0
Bumps [fast-json-stringify](https://github.com/fastify/fast-json-stringify) from 3.2.0 to 4.1.0.
- [Release notes](https://github.com/fastify/fast-json-stringify/releases)
- [Commits](https://github.com/fastify/fast-json-stringify/compare/v3.2.0...v4.1.0)

---
updated-dependencies:
- dependency-name: fast-json-stringify
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 00:30:26 +00:00
dependabot[bot]
69038416e7 chore(deps-dev): bump @types/node from 17.0.38 to 17.0.42
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.38 to 17.0.42.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 00:26:20 +00:00
Volodymyr Tytarenko
ec5de679b0 sample(sample/5): sample(sample/5): update unit test 2022-06-12 20:21:00 +02:00
Volodymyr Tytarenko
a444f94a0a sample(sample/5): sample(sample/5): update unit test 2022-06-12 20:18:03 +02:00
Volodymyr Tytarenko
149756e56f sample(sample/5): sample(sample/5): change types for id param in findone 2022-06-12 16:42:37 +02:00
delucca
c9f5f01e69 fix(microservices): adds unit test to rmq server 2022-06-10 16:39:17 -04:00
delucca
a3258d5fbb fix(microservices): adds logging to failed rmq connection 2022-06-10 16:21:14 -04:00
mjgp2
f445f237bd fix(core): Fix stripProtoKeys performance 2022-06-10 08:33:12 +01:00
dependabot[bot]
8962d5263c chore(deps-dev): bump @grpc/proto-loader from 0.6.12 to 0.6.13
Bumps [@grpc/proto-loader](https://github.com/grpc/grpc-node) from 0.6.12 to 0.6.13.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/proto-loader@0.6.12...@grpc/proto-loader@0.6.13)

---
updated-dependencies:
- dependency-name: "@grpc/proto-loader"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-07 00:06:05 +00:00
dependabot[bot]
75e264392e chore(deps-dev): bump ts-morph from 15.0.0 to 15.1.0
Bumps [ts-morph](https://github.com/dsherret/ts-morph) from 15.0.0 to 15.1.0.
- [Release notes](https://github.com/dsherret/ts-morph/releases)
- [Commits](https://github.com/dsherret/ts-morph/compare/15.0.0...15.1.0)

---
updated-dependencies:
- dependency-name: ts-morph
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 00:24:38 +00:00
dependabot[bot]
69605e11b5 chore(deps-dev): bump apollo-server-express from 3.8.1 to 3.8.2
Bumps [apollo-server-express](https://github.com/apollographql/apollo-server/tree/HEAD/packages/apollo-server-express) from 3.8.1 to 3.8.2.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Changelog](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-server/commits/apollo-server-express@3.8.2/packages/apollo-server-express)

---
updated-dependencies:
- dependency-name: apollo-server-express
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 00:17:49 +00:00
dependabot[bot]
eacc02e521 chore(deps-dev): bump typescript from 4.7.2 to 4.7.3
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.7.2 to 4.7.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.7.2...v4.7.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 00:10:23 +00:00
dependabot[bot]
c829256764 chore(deps-dev): bump cache-manager from 4.0.0 to 4.0.1
Bumps [cache-manager](https://github.com/BryanDonovan/node-cache-manager) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/BryanDonovan/node-cache-manager/releases)
- [Changelog](https://github.com/BryanDonovan/node-cache-manager/blob/master/History.md)
- [Commits](https://github.com/BryanDonovan/node-cache-manager/compare/4.0.0...4.0.1)

---
updated-dependencies:
- dependency-name: cache-manager
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 00:06:52 +00:00
Micael Levi (@micalevisk)
2c4aa9f0b4 refactor(core): fix typo on spec files name 2022-06-04 18:56:17 -04:00
Micael Levi (@micalevisk)
30618bf703 feat(core): drop globalThis usage from ReplContext 2022-06-04 18:56:12 -04:00
Kamil Mysliwiec
ad39c3cfd7 Update Readme.md 2022-06-04 21:22:34 +02:00
Kamil Mysliwiec
e326e5dc4d Merge pull request #9711 from nestjs/dependabot/npm_and_yarn/nestjs/apollo-10.0.14
chore(deps-dev): bump @nestjs/apollo from 10.0.13 to 10.0.14
2022-06-03 10:48:02 +02:00
dependabot[bot]
9cfdd57cf0 chore(deps-dev): bump @nestjs/apollo from 10.0.13 to 10.0.14
Bumps [@nestjs/apollo](https://github.com/nestjs/graphql) from 10.0.13 to 10.0.14.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.13...v10.0.14)

---
updated-dependencies:
- dependency-name: "@nestjs/apollo"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-03 08:14:47 +00:00
Kamil Mysliwiec
f4b29d3b6d Merge pull request #9712 from nestjs/dependabot/npm_and_yarn/lint-staged-13.0.0
chore(deps-dev): bump lint-staged from 12.5.0 to 13.0.0
2022-06-03 10:08:46 +02:00
Kamil Mysliwiec
f52e6b07bb Merge pull request #9710 from nestjs/dependabot/npm_and_yarn/cache-manager-4.0.0
chore(deps-dev): bump cache-manager from 3.6.3 to 4.0.0
2022-06-03 10:08:40 +02:00
Kamil Mysliwiec
a4ada398a1 Merge pull request #9709 from nestjs/dependabot/npm_and_yarn/commitlint/cli-17.0.2
chore(deps-dev): bump @commitlint/cli from 17.0.1 to 17.0.2
2022-06-03 10:08:35 +02:00
Kamil Mysliwiec
0e6f826765 Merge pull request #9713 from nestjs/dependabot/npm_and_yarn/core-js-3.22.8
chore(deps-dev): bump core-js from 3.22.7 to 3.22.8
2022-06-03 10:06:53 +02:00
Kamil Mysliwiec
19bcebacd2 Merge pull request #9723 from nestjs/dependabot/npm_and_yarn/nestjs/graphql-10.0.15
chore(deps-dev): bump @nestjs/graphql from 10.0.13 to 10.0.15
2022-06-03 10:01:16 +02:00
Kamil Mysliwiec
2e54c7bce3 Merge pull request #9722 from nestjs/dependabot/npm_and_yarn/protobufjs-6.11.3
chore(deps): bump protobufjs from 6.11.2 to 6.11.3
2022-06-03 10:01:11 +02:00
Kamil Mysliwiec
e7379e90d7 Merge pull request #9721 from nestjs/dependabot/npm_and_yarn/sample/04-grpc/protobufjs-6.11.3
chore(deps): bump protobufjs from 6.11.2 to 6.11.3 in /sample/04-grpc
2022-06-03 10:01:06 +02:00
Kamil Mysliwiec
4e90019dbc Merge pull request #9724 from nestjs/dependabot/npm_and_yarn/amqplib-0.10.0
chore(deps-dev): bump amqplib from 0.9.1 to 0.10.0
2022-06-03 09:49:28 +02:00
dependabot[bot]
b07078ac57 chore(deps-dev): bump amqplib from 0.9.1 to 0.10.0
Bumps [amqplib](https://github.com/amqp-node/amqplib) from 0.9.1 to 0.10.0.
- [Release notes](https://github.com/amqp-node/amqplib/releases)
- [Changelog](https://github.com/amqp-node/amqplib/blob/main/CHANGELOG.md)
- [Commits](https://github.com/amqp-node/amqplib/commits/v0.10.0)

---
updated-dependencies:
- dependency-name: amqplib
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-03 03:08:47 +00:00
dependabot[bot]
ece7873d77 chore(deps-dev): bump @nestjs/graphql from 10.0.13 to 10.0.15
Bumps [@nestjs/graphql](https://github.com/nestjs/graphql) from 10.0.13 to 10.0.15.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.13...v10.0.15)

---
updated-dependencies:
- dependency-name: "@nestjs/graphql"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-03 03:06:57 +00:00
dependabot[bot]
a6d9d5a4a3 chore(deps): bump protobufjs from 6.11.2 to 6.11.3
Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 6.11.2 to 6.11.3.
- [Release notes](https://github.com/protobufjs/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/v6.11.3/CHANGELOG.md)
- [Commits](https://github.com/protobufjs/protobuf.js/compare/v6.11.2...v6.11.3)

---
updated-dependencies:
- dependency-name: protobufjs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-03 00:51:15 +00:00
dependabot[bot]
dd046d1da8 chore(deps): bump protobufjs from 6.11.2 to 6.11.3 in /sample/04-grpc
Bumps [protobufjs](https://github.com/protobufjs/protobuf.js) from 6.11.2 to 6.11.3.
- [Release notes](https://github.com/protobufjs/protobuf.js/releases)
- [Changelog](https://github.com/protobufjs/protobuf.js/blob/v6.11.3/CHANGELOG.md)
- [Commits](https://github.com/protobufjs/protobuf.js/compare/v6.11.2...v6.11.3)

---
updated-dependencies:
- dependency-name: protobufjs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-03 00:17:34 +00:00
Micael Levi (@micalevisk)
a2732a4f10 fix(core): prevents renaming global providers and modules
by marking them as a read-only properties of `globalThis` obj
2022-06-02 20:13:44 -04:00
delucca
dd3d85ae8a feat(microservices): exposes base context on the main package 2022-06-02 16:57:12 -04:00
Thiago Martins
2ad86480c5 docs(common): add validators docs 2022-06-02 14:41:44 -03:00
Thiago Martins
d62d96bd65 test(common): add builder tests
add tests for parse file pipe builder and refactor associated classes
2022-06-02 14:41:34 -03:00
Thiago Martins
b178eb5bce refactor(common): add braces
add curly braces to if statement for consistency
2022-06-02 14:41:31 -03:00
Thiago Martins
c43dbd8624 test(common): fix import to relative path
fix import to relative path, the alias was causing cyclic references
2022-06-02 14:41:28 -03:00
Thiago Martins
b277f958a5 fix(test): remove multer types 2022-06-02 14:41:23 -03:00
Thiago Martins
466abf66a8 test(common): add test for parse file pipe 2022-06-02 14:41:20 -03:00
Thiago Martins
e9d311a39d feat(common): add parse file pipe 2022-06-02 14:41:13 -03:00
Kamil Mysliwiec
018fd6bb5b Merge pull request #9715 from micalevisk/feat/repl-fix-coloring
fix(core): prompt respects `NO_COLOR` config
2022-06-02 09:35:23 +02:00
Kamil Mysliwiec
f3b8662620 Merge pull request #9706 from Tony133/sample/update-version-typeorm
sample(05-sql-typeorm): update version typeorm
2022-06-02 09:32:04 +02:00
Micael Levi (@micalevisk)
d8c8e67148 fix(core): prompt indicador respect NO_COLOR config 2022-06-01 22:35:37 -04:00
dependabot[bot]
9c2078905c chore(deps-dev): bump core-js from 3.22.7 to 3.22.8
Bumps [core-js](https://github.com/zloirock/core-js) from 3.22.7 to 3.22.8.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/compare/v3.22.7...v3.22.8)

---
updated-dependencies:
- dependency-name: core-js
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-02 00:10:49 +00:00
dependabot[bot]
c734a77d2e chore(deps-dev): bump lint-staged from 12.5.0 to 13.0.0
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.5.0 to 13.0.0.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v12.5.0...v13.0.0)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-02 00:09:48 +00:00
dependabot[bot]
b9b0e8a021 chore(deps-dev): bump cache-manager from 3.6.3 to 4.0.0
Bumps [cache-manager](https://github.com/BryanDonovan/node-cache-manager) from 3.6.3 to 4.0.0.
- [Release notes](https://github.com/BryanDonovan/node-cache-manager/releases)
- [Changelog](https://github.com/BryanDonovan/node-cache-manager/blob/master/History.md)
- [Commits](https://github.com/BryanDonovan/node-cache-manager/compare/3.6.3...4.0.0)

---
updated-dependencies:
- dependency-name: cache-manager
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-02 00:05:09 +00:00
dependabot[bot]
00a0c1321f chore(deps-dev): bump @commitlint/cli from 17.0.1 to 17.0.2
Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/cli) from 17.0.1 to 17.0.2.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/cli/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/commits/v17.0.2/@commitlint/cli)

---
updated-dependencies:
- dependency-name: "@commitlint/cli"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-02 00:04:12 +00:00
Vincent Taverna
727b239515 Add public cause attribute 2022-06-01 15:04:29 -04:00
Tony133
edf9b62239 sample(05-sql-typeorm): update unit test 2022-06-01 18:10:21 +02:00
Tony133
ea7d2ac1eb sample(05-sql-typeorm): update version typeorm 2022-06-01 18:09:01 +02:00
Kamil Mysliwiec
1ba99cc6d0 Update Readme.md 2022-06-01 12:58:25 +02:00
Kamil Mysliwiec
c97257c9cf Merge pull request #9700 from nestjs/dependabot/npm_and_yarn/kafkajs-2.0.2
chore(deps-dev): bump kafkajs from 2.0.1 to 2.0.2
2022-06-01 12:34:47 +02:00
Kamil Mysliwiec
3e4ae03a2f Merge pull request #9701 from nestjs/dependabot/npm_and_yarn/types/node-17.0.38
chore(deps-dev): bump @types/node from 17.0.36 to 17.0.38
2022-06-01 12:34:07 +02:00
Kamil Mysliwiec
b042e15df8 Merge pull request #9702 from nestjs/dependabot/npm_and_yarn/point-of-view-6.2.1
chore(deps-dev): bump point-of-view from 5.3.0 to 6.2.1
2022-06-01 12:34:02 +02:00
Kamil Mysliwiec
3f8b20ceb8 Merge pull request #9703 from nestjs/dependabot/npm_and_yarn/lint-staged-12.5.0
chore(deps-dev): bump lint-staged from 12.4.3 to 12.5.0
2022-06-01 12:33:53 +02:00
Kamil Mysliwiec
9fd45a9e93 Merge pull request #9695 from micalevisk/feat/repl-improvements-v2
feat(core,common): add help messages to REPL built-in functions
2022-06-01 12:33:38 +02:00
Kamil Mysliwiec
09d6c4b857 Update packages/core/test/repl/native-functions/help-relp-fn.spec.ts 2022-06-01 12:01:22 +02:00
Kamil Mysliwiec
b8e48632e8 Update packages/core/test/repl/native-functions/help-relp-fn.spec.ts 2022-06-01 12:01:16 +02:00
Kamil Mysliwiec
c18f4b9f36 Update packages/core/test/repl/native-functions/help-relp-fn.spec.ts 2022-06-01 12:01:09 +02:00
Kamil Mysliwiec
99c6c628a4 Update packages/core/repl/native-functions/resolve-repl-fn.ts 2022-06-01 11:54:26 +02:00
Kamil Mysliwiec
160b521ef7 Update packages/core/repl/native-functions/methods-repl-fn.ts 2022-06-01 11:54:07 +02:00
Kamil Mysliwiec
89b39f946a Update packages/core/repl/native-functions/debug-repl-fn.ts 2022-06-01 11:53:45 +02:00
Kamil Mysliwiec
53fc03a821 Update packages/core/repl/native-functions/debug-repl-fn.ts 2022-06-01 11:52:47 +02:00
Micael Levi (@micalevisk)
833d16e21c test(core): add few missing tests for repl scope 2022-05-31 22:48:17 -04:00
dependabot[bot]
b9967462be chore(deps-dev): bump lint-staged from 12.4.3 to 12.5.0
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.4.3 to 12.5.0.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v12.4.3...v12.5.0)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 00:15:49 +00:00
dependabot[bot]
f407a204fb chore(deps-dev): bump point-of-view from 5.3.0 to 6.2.1
Bumps [point-of-view](https://github.com/fastify/point-of-view) from 5.3.0 to 6.2.1.
- [Release notes](https://github.com/fastify/point-of-view/releases)
- [Commits](https://github.com/fastify/point-of-view/compare/v5.3.0...v6.2.1)

---
updated-dependencies:
- dependency-name: point-of-view
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 00:14:11 +00:00
dependabot[bot]
663eeb85b6 chore(deps-dev): bump @types/node from 17.0.36 to 17.0.38
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.36 to 17.0.38.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 00:12:54 +00:00
dependabot[bot]
50bceb0b2b chore(deps-dev): bump kafkajs from 2.0.1 to 2.0.2
Bumps [kafkajs](https://github.com/tulios/kafkajs) from 2.0.1 to 2.0.2.
- [Release notes](https://github.com/tulios/kafkajs/releases)
- [Changelog](https://github.com/tulios/kafkajs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tulios/kafkajs/compare/v2.0.1...v2.0.2)

---
updated-dependencies:
- dependency-name: kafkajs
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-01 00:09:48 +00:00
Micael Levi (@micalevisk)
5ab8800bcb fix(core): add missing return to GetReplFn#action 2022-05-31 11:06:15 -04:00
Micael Levi (@micalevisk)
59965cf631 test(core,integration): fix repl test suite for the new api 2022-05-31 11:00:18 -04:00
Micael Levi (@micalevisk)
32c0a744fd feat(core): add description to debug native repl function 2022-05-31 08:19:29 -04:00
Micael Levi (@micalevisk)
092f350eb8 refactor(core): replace array by map for nativeFunctions field 2022-05-31 07:52:41 -04:00
Micael Levi (@micalevisk)
fbc0ab81b2 refactor(core): clean-up ReplContext fields 2022-05-31 06:58:41 -04:00
Micael Levi (@micalevisk)
d38a4e6a4c refactor(core): extract loadNativeFunctionsIntoContext from repl.ts 2022-05-31 06:42:40 -04:00
Micael Levi (@micalevisk)
964d02df6f refactor(core): rename ReplContext#initialize to initializeContext 2022-05-31 06:40:54 -04:00
Micael Levi (@micalevisk)
8282d8f48f refactor(core): move each repl function to their own file 2022-05-31 06:39:34 -04:00
Kamil Myśliwiec
9407ec90b3 chore(@nestjs) publish v8.4.6 release 2022-05-31 12:10:58 +02:00
Kamil Myśliwiec
ac1c066827 feat(core): make context id factory getter configurable 2022-05-31 12:07:02 +02:00
Kamil Myśliwiec
d0bb082db2 chore(): revert lerna to v2 2022-05-31 12:04:13 +02:00
Kamil Myśliwiec
cdb3043af3 chore(): revert lerna to v2 2022-05-31 11:56:37 +02:00
Kamil Myśliwiec
a287020ba9 Merge branch '9.0.0' of https://github.com/nestjs/nest into 9.0.0 2022-05-31 11:47:34 +02:00
Kamil Myśliwiec
2b10ff60c6 chore(): resolve conflicts 2022-05-31 11:47:17 +02:00
Kamil Mysliwiec
6cb1fbad32 Merge pull request #9697 from nestjs/feat/durable-providers
feat(core): add durable providers feature
2022-05-31 11:45:01 +02:00
Kamil Myśliwiec
ac5df55945 test(): uncomment context id factory strategy revert 2022-05-31 11:32:39 +02:00
Kamil Mysliwiec
404efbb75c Merge pull request #9597 from yiminghe/fix-number
fix(sample): id param is string type
2022-05-31 11:05:27 +02:00
Kamil Myśliwiec
b8652f8770 feat(core): add durable providers feature 2022-05-31 11:03:47 +02:00
Sushant Zope
457139098d fix(express): vulnerability "CVE-2022-24434"
Signed-off-by: Sushant Zope <sushantzope9096@gmail.com>
2022-05-31 14:18:09 +05:30
Kamil Mysliwiec
6b38ce1b77 Merge pull request #9665 from Tony133/chore/removed-types-socket-io
chore(): removed types for socket.io
2022-05-31 09:31:43 +02:00
Kamil Mysliwiec
7ec5537687 Merge pull request #9693 from nestjs/dependabot/npm_and_yarn/mongoose-6.3.5
chore(deps-dev): bump mongoose from 6.3.4 to 6.3.5
2022-05-31 08:40:08 +02:00
Kamil Mysliwiec
692f8f94ad Merge pull request #9688 from nestjs/dependabot/npm_and_yarn/nestjs/apollo-10.0.13
chore(deps-dev): bump @nestjs/apollo from 10.0.12 to 10.0.13
2022-05-31 08:38:55 +02:00
Kamil Mysliwiec
bf058c64ee Merge pull request #9694 from nestjs/dependabot/npm_and_yarn/lint-staged-12.4.3
chore(deps-dev): bump lint-staged from 12.4.2 to 12.4.3
2022-05-31 08:38:29 +02:00
Micael Levi (@micalevisk)
1b95a46a62 feat(core): add help native function to repl 2022-05-31 02:07:07 -04:00
Micael Levi (@micalevisk)
f37e5d5cf8 feat(core): add help messages to built-in repl functions 2022-05-31 02:05:44 -04:00
Micael Levi (@micalevisk)
a5ecaebda1 feat(common): add bold coloring to cli colors utils 2022-05-31 02:04:47 -04:00
dependabot[bot]
8d5a76db6f chore(deps-dev): bump lint-staged from 12.4.2 to 12.4.3
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.4.2 to 12.4.3.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v12.4.2...v12.4.3)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-31 00:06:35 +00:00
dependabot[bot]
e65053cdaf chore(deps-dev): bump mongoose from 6.3.4 to 6.3.5
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.3.4 to 6.3.5.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/6.3.4...6.3.5)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-31 00:04:22 +00:00
Tony133
6f48b2840d chore(): removed types for socket.io 2022-05-30 09:30:05 +02:00
dependabot[bot]
b5c33d99b5 chore(deps-dev): bump @nestjs/apollo from 10.0.12 to 10.0.13
Bumps [@nestjs/apollo](https://github.com/nestjs/graphql) from 10.0.12 to 10.0.13.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.12...v10.0.13)

---
updated-dependencies:
- dependency-name: "@nestjs/apollo"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 06:25:28 +00:00
Kamil Mysliwiec
d0449dadb4 Merge pull request #9682 from TheKhanj/master
Fix typo in docs
2022-05-30 08:22:23 +02:00
Kamil Mysliwiec
d7ac0f1ce3 Merge pull request #9687 from nestjs/dependabot/npm_and_yarn/ws-8.7.0
chore(deps): bump ws from 8.6.0 to 8.7.0
2022-05-30 08:22:06 +02:00
Kamil Mysliwiec
bfac2c332d Merge pull request #9689 from nestjs/dependabot/npm_and_yarn/nats-2.7.1
chore(deps-dev): bump nats from 2.7.0 to 2.7.1
2022-05-30 08:20:02 +02:00
Kamil Mysliwiec
4bcdce98c3 Merge pull request #9690 from nestjs/dependabot/npm_and_yarn/types/node-17.0.36
chore(deps-dev): bump @types/node from 17.0.35 to 17.0.36
2022-05-30 08:19:39 +02:00
Kamil Mysliwiec
e1fde6f168 Merge pull request #9691 from nestjs/dependabot/npm_and_yarn/nestjs/graphql-10.0.13
chore(deps-dev): bump @nestjs/graphql from 10.0.12 to 10.0.13
2022-05-30 08:19:15 +02:00
dependabot[bot]
b39fa69f2f chore(deps-dev): bump @nestjs/graphql from 10.0.12 to 10.0.13
Bumps [@nestjs/graphql](https://github.com/nestjs/graphql) from 10.0.12 to 10.0.13.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.12...v10.0.13)

---
updated-dependencies:
- dependency-name: "@nestjs/graphql"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 00:21:28 +00:00
dependabot[bot]
c27e3c4615 chore(deps-dev): bump @types/node from 17.0.35 to 17.0.36
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.35 to 17.0.36.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 00:19:12 +00:00
dependabot[bot]
d9e6090643 chore(deps-dev): bump nats from 2.7.0 to 2.7.1
Bumps [nats](https://github.com/nats-io/nats.js) from 2.7.0 to 2.7.1.
- [Release notes](https://github.com/nats-io/nats.js/releases)
- [Commits](https://github.com/nats-io/nats.js/compare/v2.7.0...v2.7.1)

---
updated-dependencies:
- dependency-name: nats
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 00:17:15 +00:00
dependabot[bot]
9a776f16b1 chore(deps): bump ws from 8.6.0 to 8.7.0
Bumps [ws](https://github.com/websockets/ws) from 8.6.0 to 8.7.0.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.6.0...8.7.0)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-30 00:10:50 +00:00
Kamil Myśliwiec
21d6dd1376 lint(core): address linter errors 2022-05-29 16:23:46 +02:00
Kamil Myśliwiec
bae30b23ce test(): remove unnecessary files 2022-05-29 16:20:59 +02:00
Kamil Myśliwiec
245ccd1249 feat(core): repl 2022-05-29 16:08:15 +02:00
Pooyan Khanjankhani
0cbde57766 Fix typo in docs 2022-05-28 14:54:23 +04:30
Micael Levi (@micalevisk)
1e5f548c11 docs(microservices): clarify what is the default value of postfixId 2022-05-27 23:50:53 -04:00
Micael Levi (@micalevisk)
0359fa4666 fix(microservices): when postfixId is an empty string on kafka 2022-05-27 23:35:38 -04:00
Kamil Mysliwiec
2e3727b786 Merge pull request #9676 from micalevisk/patch-2
chore: cover `integration` dir on lint-staged config
2022-05-27 10:17:43 +02:00
Micael Levi L. Cavalcante
66387721f3 chore: fix mismatch between lint-staged config and format 2022-05-27 00:20:01 -04:00
Konasov Dmitriy
e8e22acb39 fix(microservices): Fixed typings for MessageHandler 2022-05-26 20:43:33 +03:00
Kamil Mysliwiec
f765e2c8c9 Merge pull request #9669 from nestjs/dependabot/npm_and_yarn/commitlint/cli-17.0.1
chore(deps-dev): bump @commitlint/cli from 17.0.0 to 17.0.1
2022-05-26 09:03:01 +02:00
dependabot[bot]
8de876e082 chore(deps-dev): bump @commitlint/cli from 17.0.0 to 17.0.1
Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/cli) from 17.0.0 to 17.0.1.
- [Release notes](https://github.com/conventional-changelog/commitlint/releases)
- [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/cli/CHANGELOG.md)
- [Commits](https://github.com/conventional-changelog/commitlint/commits/v17.0.1/@commitlint/cli)

---
updated-dependencies:
- dependency-name: "@commitlint/cli"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-26 00:52:45 +00:00
Vincent Taverna
32d1e9617b feat(common): Add error chaining support to http exception
Adds the ability to configure the cause of an error when passing an error object to http exception.
- https://nodejs.org/en/blog/release/v16.9.0/#error-cause
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/Error#rethrowing_an_error_with_a_cause
- https://github.com/microsoft/TypeScript/issues/45167
2022-05-25 10:34:53 -04:00
Kamil Mysliwiec
e322564fd8 Merge pull request #9658 from nestjs/dependabot/npm_and_yarn/apollo-server-core-3.8.1
chore(deps-dev): bump apollo-server-core from 3.7.0 to 3.8.1
2022-05-25 11:53:10 +02:00
dependabot[bot]
233725075c chore(deps-dev): bump apollo-server-core from 3.7.0 to 3.8.1
Bumps [apollo-server-core](https://github.com/apollographql/apollo-server/tree/HEAD/packages/apollo-server-core) from 3.7.0 to 3.8.1.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Changelog](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-server/commits/apollo-server-core@3.8.1/packages/apollo-server-core)

---
updated-dependencies:
- dependency-name: apollo-server-core
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-25 08:19:22 +00:00
Kamil Mysliwiec
d83edc32dd Merge pull request #9631 from micalevisk/refactoring-applyVersioning-express
refactor(express): improve `applyVersioning` handler selector code
2022-05-25 10:17:24 +02:00
Kamil Mysliwiec
943b70a7ce Merge pull request #9659 from nestjs/dependabot/npm_and_yarn/apollo-server-express-3.8.1
chore(deps-dev): bump apollo-server-express from 3.7.0 to 3.8.1
2022-05-25 10:16:42 +02:00
Kamil Mysliwiec
bf6869afe0 Merge pull request #9660 from nestjs/dependabot/npm_and_yarn/ts-morph-15.0.0
chore(deps-dev): bump ts-morph from 14.0.0 to 15.0.0
2022-05-25 10:16:38 +02:00
Kamil Mysliwiec
1e57108a7c Merge pull request #9661 from nestjs/dependabot/npm_and_yarn/lint-staged-12.4.2
chore(deps-dev): bump lint-staged from 12.4.1 to 12.4.2
2022-05-25 10:16:34 +02:00
Kamil Mysliwiec
6582ed412e Merge pull request #9662 from nestjs/dependabot/npm_and_yarn/core-js-3.22.7
chore(deps-dev): bump core-js from 3.22.6 to 3.22.7
2022-05-25 10:16:26 +02:00
Kamil Mysliwiec
9b129f14b8 Merge pull request #9663 from nestjs/dependabot/npm_and_yarn/typescript-4.7.2
chore(deps-dev): bump typescript from 4.6.4 to 4.7.2
2022-05-25 10:16:21 +02:00
Kamil Mysliwiec
ca59ee5bf4 Merge pull request #9657 from Tony133/test/rename-app-module
test(integration): rename app module in test e2e
2022-05-25 08:54:36 +02:00
dependabot[bot]
ef93fb7844 chore(deps-dev): bump typescript from 4.6.4 to 4.7.2
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.6.4 to 4.7.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.6.4...v4.7.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-25 00:40:47 +00:00
dependabot[bot]
eb32940d2e chore(deps-dev): bump core-js from 3.22.6 to 3.22.7
Bumps [core-js](https://github.com/zloirock/core-js) from 3.22.6 to 3.22.7.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/compare/v3.22.6...v3.22.7)

---
updated-dependencies:
- dependency-name: core-js
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-25 00:37:18 +00:00
dependabot[bot]
05d74b549d chore(deps-dev): bump lint-staged from 12.4.1 to 12.4.2
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.4.1 to 12.4.2.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v12.4.1...v12.4.2)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-25 00:34:38 +00:00
dependabot[bot]
8d834e0454 chore(deps-dev): bump ts-morph from 14.0.0 to 15.0.0
Bumps [ts-morph](https://github.com/dsherret/ts-morph) from 14.0.0 to 15.0.0.
- [Release notes](https://github.com/dsherret/ts-morph/releases)
- [Commits](https://github.com/dsherret/ts-morph/compare/14.0.0...15.0.0)

---
updated-dependencies:
- dependency-name: ts-morph
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-25 00:33:16 +00:00
dependabot[bot]
6f46d8e47d chore(deps-dev): bump apollo-server-express from 3.7.0 to 3.8.1
Bumps [apollo-server-express](https://github.com/apollographql/apollo-server/tree/HEAD/packages/apollo-server-express) from 3.7.0 to 3.8.1.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Changelog](https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-server/commits/apollo-server-express@3.8.1/packages/apollo-server-express)

---
updated-dependencies:
- dependency-name: apollo-server-express
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-25 00:31:52 +00:00
Tony133
c9e619e74a test(integration): rename app module in test e2e 2022-05-24 21:28:34 +02:00
Kamil Mysliwiec
3dfdfe4b41 Merge pull request #9653 from tolgap/fix/9652-fastify-raw-body-specs
fix(testing): raw body spec not using fastify adapter
2022-05-24 11:30:22 +02:00
Tolga Paksoy
9db43f6f66 fix(testing): raw body spec not using fastify adapter 2022-05-24 10:17:50 +02:00
Kamil Mysliwiec
7b112ddb30 Merge pull request #9646 from nestjs/dependabot/npm_and_yarn/kafkajs-2.0.1
chore(deps-dev): bump kafkajs from 2.0.0 to 2.0.1
2022-05-23 13:23:43 +02:00
Kamil Mysliwiec
eadebe41eb Merge pull request #9645 from nestjs/dependabot/npm_and_yarn/core-js-3.22.6
chore(deps-dev): bump core-js from 3.22.5 to 3.22.6
2022-05-23 13:23:37 +02:00
Kamil Mysliwiec
e6cd980de6 Merge pull request #9639 from nestjs/dependabot/npm_and_yarn/nestjs/graphql-10.0.12
chore(deps-dev): bump @nestjs/graphql from 10.0.8 to 10.0.12
2022-05-23 13:23:03 +02:00
Micael Levi (@micalevisk)
dca949ae32 refactor(express): improve applyVersioning handler selector code 2022-05-23 06:23:02 -04:00
dependabot[bot]
f57a2d1956 chore(deps-dev): bump @nestjs/graphql from 10.0.8 to 10.0.12
Bumps [@nestjs/graphql](https://github.com/nestjs/graphql) from 10.0.8 to 10.0.12.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.8...v10.0.12)

---
updated-dependencies:
- dependency-name: "@nestjs/graphql"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-23 07:46:56 +00:00
dependabot[bot]
008766a999 chore(deps-dev): bump kafkajs from 2.0.0 to 2.0.1
Bumps [kafkajs](https://github.com/tulios/kafkajs) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/tulios/kafkajs/releases)
- [Changelog](https://github.com/tulios/kafkajs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tulios/kafkajs/compare/v2.0.0...v2.0.1)

---
updated-dependencies:
- dependency-name: kafkajs
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-23 07:46:46 +00:00
dependabot[bot]
18727a47e3 chore(deps-dev): bump core-js from 3.22.5 to 3.22.6
Bumps [core-js](https://github.com/zloirock/core-js) from 3.22.5 to 3.22.6.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/compare/v3.22.5...v3.22.6)

---
updated-dependencies:
- dependency-name: core-js
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-23 07:46:24 +00:00
Kamil Mysliwiec
ad8b5fbe5b Merge pull request #9637 from nestjs/dependabot/npm_and_yarn/nestjs/mongoose-9.1.0
chore(deps-dev): bump @nestjs/mongoose from 9.0.3 to 9.1.0
2022-05-23 09:44:06 +02:00
dependabot[bot]
798851d70d chore(deps-dev): bump @nestjs/mongoose from 9.0.3 to 9.1.0
Bumps [@nestjs/mongoose](https://github.com/nestjs/mongoose) from 9.0.3 to 9.1.0.
- [Release notes](https://github.com/nestjs/mongoose/releases)
- [Changelog](https://github.com/nestjs/mongoose/blob/master/.release-it.json)
- [Commits](https://github.com/nestjs/mongoose/compare/9.0.3...9.1.0)

---
updated-dependencies:
- dependency-name: "@nestjs/mongoose"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-23 07:40:24 +00:00
Kamil Mysliwiec
4836fbe80e Merge pull request #9641 from nestjs/dependabot/npm_and_yarn/graphql-tools-8.2.11
chore(deps-dev): bump graphql-tools from 8.2.9 to 8.2.11
2022-05-23 09:39:09 +02:00
Kamil Mysliwiec
d964f23b24 Merge pull request #9640 from nestjs/dependabot/npm_and_yarn/concurrently-7.2.1
chore(deps-dev): bump concurrently from 7.2.0 to 7.2.1
2022-05-23 09:38:57 +02:00
Kamil Mysliwiec
85c5207640 Merge pull request #9642 from nestjs/dependabot/npm_and_yarn/ts-node-10.8.0
chore(deps-dev): bump ts-node from 10.7.0 to 10.8.0
2022-05-23 09:35:50 +02:00
Kamil Mysliwiec
f5827cf569 Merge pull request #9643 from nestjs/dependabot/npm_and_yarn/nestjs/apollo-10.0.12
chore(deps-dev): bump @nestjs/apollo from 10.0.11 to 10.0.12
2022-05-23 09:35:45 +02:00
Kamil Mysliwiec
e9cfc1176b Merge pull request #9638 from nestjs/dependabot/npm_and_yarn/amqplib-0.9.1
chore(deps-dev): bump amqplib from 0.9.0 to 0.9.1
2022-05-23 09:35:37 +02:00
Kamil Mysliwiec
7d5622870a Merge pull request #9636 from nestjs/dependabot/npm_and_yarn/nestjs/typeorm-8.0.4
chore(deps-dev): bump @nestjs/typeorm from 8.0.3 to 8.0.4
2022-05-23 09:35:24 +02:00
Kamil Mysliwiec
9e1c98d9e4 Merge pull request #9635 from nestjs/dependabot/npm_and_yarn/cache-manager-3.6.3
chore(deps-dev): bump cache-manager from 3.6.2 to 3.6.3
2022-05-23 09:35:17 +02:00
Kamil Mysliwiec
b76dd0ddad Merge pull request #9630 from micalevisk/fix-testing-logger-disabling
fix(testing): disable logs when `logger` is `false` on `TestingModule`
2022-05-23 09:13:23 +02:00
dependabot[bot]
bb73fee218 chore(deps-dev): bump concurrently from 7.2.0 to 7.2.1
Bumps [concurrently](https://github.com/open-cli-tools/concurrently) from 7.2.0 to 7.2.1.
- [Release notes](https://github.com/open-cli-tools/concurrently/releases)
- [Commits](https://github.com/open-cli-tools/concurrently/compare/v7.2.0...v7.2.1)

---
updated-dependencies:
- dependency-name: concurrently
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-23 06:51:01 +00:00
Kamil Mysliwiec
29208cada8 Merge pull request #9628 from micalevisk/development-improvements
chore: keep only one eslint config file & fix linter and tsc for dev
2022-05-23 08:48:19 +02:00
Kamil Mysliwiec
895becf82b Merge pull request #9627 from micalevisk/patch-1
docs: add more commit scopes on contributing guide
2022-05-23 08:38:41 +02:00
Kamil Mysliwiec
3f8a6c96d8 Update packages/platform-fastify/adapters/fastify-adapter.ts
Co-authored-by: Micael Levi L. Cavalcante <mllc@icomp.ufam.edu.br>
2022-05-23 08:36:43 +02:00
dependabot[bot]
77ce066b47 chore(deps-dev): bump @nestjs/apollo from 10.0.11 to 10.0.12
Bumps [@nestjs/apollo](https://github.com/nestjs/graphql) from 10.0.11 to 10.0.12.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.11...v10.0.12)

---
updated-dependencies:
- dependency-name: "@nestjs/apollo"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-23 00:27:44 +00:00
dependabot[bot]
fae2267179 chore(deps-dev): bump ts-node from 10.7.0 to 10.8.0
Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.7.0 to 10.8.0.
- [Release notes](https://github.com/TypeStrong/ts-node/releases)
- [Commits](https://github.com/TypeStrong/ts-node/compare/v10.7.0...v10.8.0)

---
updated-dependencies:
- dependency-name: ts-node
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-23 00:25:05 +00:00
dependabot[bot]
1fe3d2be42 chore(deps-dev): bump graphql-tools from 8.2.9 to 8.2.11
Bumps [graphql-tools](https://github.com/ardatan/graphql-tools/tree/HEAD/packages/graphql-tools) from 8.2.9 to 8.2.11.
- [Release notes](https://github.com/ardatan/graphql-tools/releases)
- [Changelog](https://github.com/ardatan/graphql-tools/blob/master/packages/graphql-tools/CHANGELOG.md)
- [Commits](https://github.com/ardatan/graphql-tools/commits/graphql-tools@8.2.11/packages/graphql-tools)

---
updated-dependencies:
- dependency-name: graphql-tools
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-23 00:23:25 +00:00
dependabot[bot]
876a6ba582 chore(deps-dev): bump amqplib from 0.9.0 to 0.9.1
Bumps [amqplib](https://github.com/amqp-node/amqplib) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/amqp-node/amqplib/releases)
- [Changelog](https://github.com/amqp-node/amqplib/blob/main/CHANGELOG.md)
- [Commits](https://github.com/amqp-node/amqplib/commits)

---
updated-dependencies:
- dependency-name: amqplib
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-23 00:17:52 +00:00
dependabot[bot]
0b8034bbc8 chore(deps-dev): bump @nestjs/typeorm from 8.0.3 to 8.0.4
Bumps [@nestjs/typeorm](https://github.com/nestjs/typeorm) from 8.0.3 to 8.0.4.
- [Release notes](https://github.com/nestjs/typeorm/releases)
- [Changelog](https://github.com/nestjs/typeorm/blob/master/.release-it.json)
- [Commits](https://github.com/nestjs/typeorm/compare/8.0.3...8.0.4)

---
updated-dependencies:
- dependency-name: "@nestjs/typeorm"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-23 00:11:49 +00:00
dependabot[bot]
a0a4bfd007 chore(deps-dev): bump cache-manager from 3.6.2 to 3.6.3
Bumps [cache-manager](https://github.com/BryanDonovan/node-cache-manager) from 3.6.2 to 3.6.3.
- [Release notes](https://github.com/BryanDonovan/node-cache-manager/releases)
- [Changelog](https://github.com/BryanDonovan/node-cache-manager/blob/master/History.md)
- [Commits](https://github.com/BryanDonovan/node-cache-manager/compare/3.6.2...3.6.3)

---
updated-dependencies:
- dependency-name: cache-manager
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-23 00:09:48 +00:00
Micael Levi (@micalevisk)
935a3d645d fix(testing): disable logs when logger is false on TestingModule 2022-05-21 23:46:05 -04:00
Micael Levi (@micalevisk)
d59700c939 chore: add tsconfig file for test directories
This file was added to circumvent a VSC limitation where the IDE can't
detect the right tsconfig to use for a given file.
More on this issue here: https://github.com/microsoft/vscode/issues/3772
2022-05-21 19:43:59 -04:00
Micael Levi (@micalevisk)
2ce994dbd0 chore: keep only one eslint config file for dev 2022-05-21 19:43:55 -04:00
Micael Levi (@micalevisk)
6a2dc6fab5 chore: add allowed scopes to commitlint config 2022-05-21 18:31:13 -04:00
Micael Levi (@micalevisk)
e6db2b40f6 docs: add more commit scopes on contributing guide 2022-05-21 18:31:03 -04:00
Kamil Mysliwiec
6aeb3258ac Merge pull request #9623 from nestjs/dependabot/npm_and_yarn/light-my-request-5.0.0
chore(deps): bump light-my-request from 4.10.1 to 5.0.0
2022-05-20 11:02:24 +02:00
Kamil Mysliwiec
cabb6a698d Merge pull request #9624 from nestjs/dependabot/npm_and_yarn/cache-manager-3.6.2
chore(deps-dev): bump cache-manager from 3.6.1 to 3.6.2
2022-05-20 11:02:15 +02:00
Kamil Mysliwiec
6fb1cf9ad1 Merge pull request #9625 from nestjs/dependabot/npm_and_yarn/types/node-17.0.35
chore(deps-dev): bump @types/node from 17.0.34 to 17.0.35
2022-05-20 11:02:10 +02:00
Kamil Mysliwiec
1a93f53da1 Merge pull request #9626 from nestjs/dependabot/npm_and_yarn/mongoose-6.3.4
chore(deps-dev): bump mongoose from 6.3.3 to 6.3.4
2022-05-20 11:01:50 +02:00
dependabot[bot]
41b9872c5a chore(deps-dev): bump mongoose from 6.3.3 to 6.3.4
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.3.3 to 6.3.4.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/6.3.3...6.3.4)

---
updated-dependencies:
- dependency-name: mongoose
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-20 00:15:55 +00:00
dependabot[bot]
981b9750d0 chore(deps-dev): bump @types/node from 17.0.34 to 17.0.35
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.34 to 17.0.35.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-20 00:14:07 +00:00
dependabot[bot]
c002c99f9d chore(deps-dev): bump cache-manager from 3.6.1 to 3.6.2
Bumps [cache-manager](https://github.com/BryanDonovan/node-cache-manager) from 3.6.1 to 3.6.2.
- [Release notes](https://github.com/BryanDonovan/node-cache-manager/releases)
- [Changelog](https://github.com/BryanDonovan/node-cache-manager/blob/master/History.md)
- [Commits](https://github.com/BryanDonovan/node-cache-manager/compare/3.6.1...3.6.2)

---
updated-dependencies:
- dependency-name: cache-manager
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-20 00:10:55 +00:00
dependabot[bot]
89a7017bbd chore(deps): bump light-my-request from 4.10.1 to 5.0.0
Bumps [light-my-request](https://github.com/fastify/light-my-request) from 4.10.1 to 5.0.0.
- [Release notes](https://github.com/fastify/light-my-request/releases)
- [Commits](https://github.com/fastify/light-my-request/compare/v4.10.1...v5.0.0)

---
updated-dependencies:
- dependency-name: light-my-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-20 00:04:29 +00:00
Kamil Myśliwiec
5de7913f9b chore(deps): remove axios dependency 2022-05-19 10:21:25 +02:00
Kamil Mysliwiec
76d123d1c4 Merge pull request #9618 from micalevisk/drop-json-socket-dep
chore(microservices,testing): drop `json-socket` and `optional` hard dependencies
2022-05-19 10:21:09 +02:00
Kamil Mysliwiec
ebc432f3c4 Merge pull request #9619 from nestjs/dependabot/npm_and_yarn/nats-2.7.0
chore(deps-dev): bump nats from 2.6.1 to 2.7.0
2022-05-19 10:17:15 +02:00
dependabot[bot]
585312ad50 chore(deps-dev): bump nats from 2.6.1 to 2.7.0
Bumps [nats](https://github.com/nats-io/nats.js) from 2.6.1 to 2.7.0.
- [Release notes](https://github.com/nats-io/nats.js/releases)
- [Commits](https://github.com/nats-io/nats.js/compare/v2.6.1...v2.7.0)

---
updated-dependencies:
- dependency-name: nats
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-19 00:09:43 +00:00
Micael Levi (@micalevisk)
c38f025fb2 chore(testing): drop useless optional hard dependency 2022-05-18 18:22:53 -04:00
Micael Levi (@micalevisk)
19acae5e73 chore(microservices): drop useless json-socket hard dependency
The commit 9c3e15a902 added our own
version of the package `json-socket` (which looks abandoned)
2022-05-18 18:07:54 -04:00
yiminghe
477303b058 fix(sample): id param is string type 2022-05-18 22:55:09 +08:00
Kamil Mysliwiec
a4294e485b Merge pull request #9604 from micalevisk/drop-deprecated-functions
refactor(common,core,microservices)!: drop all deprecated methods
2022-05-18 14:26:59 +02:00
Kamil Mysliwiec
ea44da521a Merge pull request #9601 from nestjs/dependabot/npm_and_yarn/sample/07-sequelize/node-fetch-2.6.7
chore(deps): bump node-fetch from 2.6.6 to 2.6.7 in /sample/07-sequelize
2022-05-18 13:59:51 +02:00
Kamil Mysliwiec
c08f0a0347 Merge pull request #9607 from nestjs/dependabot/npm_and_yarn/sample/12-graphql-schema-first/node-fetch-2.6.7
chore(deps): bump node-fetch from 2.6.1 to 2.6.7 in /sample/12-graphql-schema-first
2022-05-18 13:59:47 +02:00
dependabot[bot]
797fd34c12 chore(deps): bump node-fetch from 2.6.6 to 2.6.7 in /sample/07-sequelize
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.6 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 11:59:42 +00:00
Kamil Mysliwiec
0f4502763d Merge pull request #9609 from nestjs/dependabot/npm_and_yarn/sample/14-mongoose-base/path-parse-1.0.7
chore(deps): bump path-parse from 1.0.6 to 1.0.7 in /sample/14-mongoose-base
2022-05-18 13:59:39 +02:00
dependabot[bot]
709309f613 chore(deps): bump path-parse in /sample/14-mongoose-base
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 11:59:35 +00:00
dependabot[bot]
73b3295987 chore(deps): bump node-fetch in /sample/12-graphql-schema-first
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 11:59:21 +00:00
Kamil Mysliwiec
5cc14c425c Merge pull request #9599 from nestjs/dependabot/npm_and_yarn/sample/09-babel-example/path-parse-1.0.7
chore(deps): bump path-parse from 1.0.6 to 1.0.7 in /sample/09-babel-example
2022-05-18 13:59:13 +02:00
Kamil Mysliwiec
a3cd6f1d0e Merge pull request #9600 from nestjs/dependabot/npm_and_yarn/sample/08-webpack/node-fetch-2.6.7
chore(deps): bump node-fetch from 2.6.6 to 2.6.7 in /sample/08-webpack
2022-05-18 13:59:09 +02:00
Kamil Mysliwiec
7e51d0a383 Merge pull request #9602 from nestjs/dependabot/npm_and_yarn/sample/09-babel-example/lodash-4.17.21
chore(deps): bump lodash from 4.17.20 to 4.17.21 in /sample/09-babel-example
2022-05-18 13:59:05 +02:00
Kamil Mysliwiec
46fa788925 Merge pull request #9603 from nestjs/dependabot/npm_and_yarn/sample/06-mongoose/node-fetch-2.6.7
chore(deps): bump node-fetch from 2.6.6 to 2.6.7 in /sample/06-mongoose
2022-05-18 13:59:01 +02:00
Kamil Mysliwiec
967b11740c Merge pull request #9605 from nestjs/dependabot/npm_and_yarn/sample/15-mvc/lodash-4.17.21
chore(deps): bump lodash from 4.17.20 to 4.17.21 in /sample/15-mvc
2022-05-18 13:58:57 +02:00
Kamil Mysliwiec
ab4f7e28ca Merge pull request #9606 from nestjs/dependabot/npm_and_yarn/sample/15-mvc/path-parse-1.0.7
chore(deps): bump path-parse from 1.0.6 to 1.0.7 in /sample/15-mvc
2022-05-18 13:58:51 +02:00
Kamil Mysliwiec
3b77c17744 Merge pull request #9608 from nestjs/dependabot/npm_and_yarn/sample/14-mongoose-base/node-fetch-2.6.7
chore(deps): bump node-fetch from 2.6.6 to 2.6.7 in /sample/14-mongoose-base
2022-05-18 13:58:44 +02:00
Kamil Mysliwiec
8f2220fdb3 Merge pull request #9610 from nestjs/dependabot/npm_and_yarn/sample/14-mongoose-base/lodash-4.17.21
chore(deps): bump lodash from 4.17.20 to 4.17.21 in /sample/14-mongoose-base
2022-05-18 13:58:36 +02:00
dependabot[bot]
88d1defc5a chore(deps): bump lodash from 4.17.20 to 4.17.21 in /sample/15-mvc
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

---
updated-dependencies:
- dependency-name: lodash
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 11:56:37 +00:00
dependabot[bot]
88a467c30a chore(deps): bump lodash in /sample/09-babel-example
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

---
updated-dependencies:
- dependency-name: lodash
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 11:56:36 +00:00
dependabot[bot]
94a8317307 chore(deps): bump node-fetch in /sample/14-mongoose-base
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.6 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 11:56:36 +00:00
dependabot[bot]
bab39b0b4c chore(deps): bump node-fetch from 2.6.6 to 2.6.7 in /sample/06-mongoose
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.6 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 11:56:35 +00:00
dependabot[bot]
9787fab63a chore(deps): bump path-parse from 1.0.6 to 1.0.7 in /sample/15-mvc
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 11:56:28 +00:00
dependabot[bot]
78c2630e70 chore(deps): bump lodash in /sample/14-mongoose-base
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

---
updated-dependencies:
- dependency-name: lodash
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 11:56:28 +00:00
dependabot[bot]
68f56fafd2 chore(deps): bump path-parse in /sample/09-babel-example
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 11:56:24 +00:00
dependabot[bot]
c91ec71600 chore(deps): bump node-fetch from 2.6.6 to 2.6.7 in /sample/08-webpack
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.6 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 11:56:20 +00:00
Kamil Mysliwiec
9c26865103 Merge pull request #9611 from nestjs/dependabot/npm_and_yarn/sample/11-swagger/node-fetch-2.6.7
chore(deps): bump node-fetch from 2.6.6 to 2.6.7 in /sample/11-swagger
2022-05-18 13:55:56 +02:00
Kamil Mysliwiec
3bb69c3e40 Merge pull request #9612 from nestjs/dependabot/npm_and_yarn/sample/11-swagger/path-parse-1.0.7
chore(deps): bump path-parse from 1.0.6 to 1.0.7 in /sample/11-swagger
2022-05-18 13:55:49 +02:00
Kamil Mysliwiec
2fbad9ecaf Merge pull request #9613 from nestjs/dependabot/npm_and_yarn/sample/11-swagger/lodash-4.17.21
chore(deps): bump lodash from 4.17.20 to 4.17.21 in /sample/11-swagger
2022-05-18 13:55:45 +02:00
Kamil Mysliwiec
7283ca9e64 Merge pull request #9614 from nestjs/dependabot/npm_and_yarn/sample/10-fastify/lodash-4.17.21
chore(deps): bump lodash from 4.17.20 to 4.17.21 in /sample/10-fastify
2022-05-18 13:55:40 +02:00
Kamil Mysliwiec
51405ee9fc Merge pull request #9615 from nestjs/dependabot/npm_and_yarn/sample/09-babel-example/node-fetch-2.6.7
chore(deps): bump node-fetch from 2.6.6 to 2.6.7 in /sample/09-babel-example
2022-05-18 13:55:36 +02:00
Kamil Mysliwiec
7eb767297e Merge pull request #9598 from nestjs/dependabot/npm_and_yarn/sample/08-webpack/path-parse-1.0.7
chore(deps): bump path-parse from 1.0.6 to 1.0.7 in /sample/08-webpack
2022-05-18 13:55:29 +02:00
dependabot[bot]
9d82204378 chore(deps): bump node-fetch in /sample/09-babel-example
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.6 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 11:44:33 +00:00
dependabot[bot]
825b8d49fe chore(deps): bump lodash from 4.17.20 to 4.17.21 in /sample/10-fastify
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

---
updated-dependencies:
- dependency-name: lodash
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 11:44:32 +00:00
dependabot[bot]
6250010091 chore(deps): bump lodash from 4.17.20 to 4.17.21 in /sample/11-swagger
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

---
updated-dependencies:
- dependency-name: lodash
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 11:44:26 +00:00
dependabot[bot]
2a9250f2cf chore(deps): bump path-parse from 1.0.6 to 1.0.7 in /sample/11-swagger
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 11:44:24 +00:00
dependabot[bot]
4f85cf842c chore(deps): bump node-fetch from 2.6.6 to 2.6.7 in /sample/11-swagger
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.6 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.6...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 11:44:22 +00:00
dependabot[bot]
dd3b97b491 chore(deps): bump path-parse from 1.0.6 to 1.0.7 in /sample/08-webpack
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 11:41:41 +00:00
Micael Levi (@micalevisk)
6d3cab8c99 refactor(common,core,microservices): drop all deprecated methods 2022-05-18 07:40:54 -04:00
Micael Levi (@micalevisk)
2f6bbaffe1 feat(common): remove deprecated shared utility validatePath 2022-05-18 07:32:52 -04:00
Kamil Mysliwiec
cb2101990a Merge pull request #9592 from nestjs/dependabot/npm_and_yarn/socket.io-4.5.1
chore(deps): bump socket.io from 4.5.0 to 4.5.1
2022-05-18 09:30:10 +02:00
Kamil Mysliwiec
c8185137f8 Merge pull request #9594 from nestjs/dependabot/npm_and_yarn/imports-loader-4.0.0
chore(deps-dev): bump imports-loader from 3.1.1 to 4.0.0
2022-05-18 09:30:02 +02:00
Kamil Mysliwiec
b463d71166 Merge pull request #9595 from nestjs/dependabot/npm_and_yarn/socket.io-client-4.5.1
chore(deps-dev): bump socket.io-client from 4.5.0 to 4.5.1
2022-05-18 09:29:51 +02:00
Kamil Mysliwiec
34d09c0494 Merge pull request #9591 from micalevisk/make-applyVersionFilter-mandatory
feat(common,core)!: make `HttpServer#applyVersionFilter` mandatory
2022-05-18 09:29:41 +02:00
Kamil Mysliwiec
c5dbdaf57e Merge pull request #9596 from micalevisk/replace-warn-with-error
feat(core)!: throw an exception instead of logging due to module import misusage
2022-05-18 09:28:52 +02:00
Kamil Myśliwiec
1ee52b1157 Merge branch 'Tony133-chore/remove-http-module' into 9.0.0 2022-05-18 09:25:09 +02:00
Micael Levi (@micalevisk)
2d87a5addb feat(core): throw an exception instead of logging due to module misusage 2022-05-17 23:08:21 -04:00
Micael Levi (@micalevisk)
696672e7e6 refactor(core): remove temp variable on applyVersionFilter 2022-05-17 20:16:15 -04:00
Micael Levi (@micalevisk)
0e337d0e3a feat(common,core): make HttpServer#applyVersionFilter mandatory 2022-05-17 20:16:12 -04:00
dependabot[bot]
052f439683 chore(deps-dev): bump socket.io-client from 4.5.0 to 4.5.1
Bumps [socket.io-client](https://github.com/socketio/socket.io-client) from 4.5.0 to 4.5.1.
- [Release notes](https://github.com/socketio/socket.io-client/releases)
- [Changelog](https://github.com/socketio/socket.io-client/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-client/compare/4.5.0...4.5.1)

---
updated-dependencies:
- dependency-name: socket.io-client
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 00:12:14 +00:00
dependabot[bot]
f4b3123c93 chore(deps-dev): bump imports-loader from 3.1.1 to 4.0.0
Bumps [imports-loader](https://github.com/webpack-contrib/imports-loader) from 3.1.1 to 4.0.0.
- [Release notes](https://github.com/webpack-contrib/imports-loader/releases)
- [Changelog](https://github.com/webpack-contrib/imports-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/imports-loader/compare/v3.1.1...v4.0.0)

---
updated-dependencies:
- dependency-name: imports-loader
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 00:11:01 +00:00
dependabot[bot]
afbb24f03d chore(deps): bump socket.io from 4.5.0 to 4.5.1
Bumps [socket.io](https://github.com/socketio/socket.io) from 4.5.0 to 4.5.1.
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/4.5.0...4.5.1)

---
updated-dependencies:
- dependency-name: socket.io
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-18 00:03:48 +00:00
Kamil Mysliwiec
5e127fc673 Update packages/platform-express/adapters/express-adapter.ts
Co-authored-by: Micael Levi L. Cavalcante <mllc@icomp.ufam.edu.br>
2022-05-13 12:46:22 +02:00
wSedlacek
a03db87146 fix(core): end without message when a response has already sent a header 2021-12-17 00:36:36 -08:00
wSedlacek
fefa7528fa feat(core): header sent abstraction 2021-12-17 00:36:32 -08:00
wSedlacek
1b684bcc0a feat(core): end abstraction 2021-12-17 00:36:22 -08:00
wSedlacek
95bba80ecb feat(common): header sent abstraction 2021-12-06 22:32:29 -08:00
wSedlacek
26c21fb201 feat(common): end abstraction 2021-12-06 22:32:29 -08:00
wSedlacek
b8fb518e61 feat(platform-fastify): header sent abstraction 2021-12-06 22:32:28 -08:00
wSedlacek
24ee43b254 feat(platform-fastify): end abstraction 2021-12-06 22:32:28 -08:00
wSedlacek
0e05de58e4 feat(platform-express): header sent abstraction 2021-12-06 22:32:28 -08:00
wSedlacek
226f344f2c feat(platform-express): end abstraction 2021-12-06 22:32:28 -08:00
202 changed files with 10404 additions and 10076 deletions

View File

@@ -50,9 +50,19 @@ jobs:
command: npm run build
test_node_12:
working_directory: ~/nest
<<: *unit-tests-template
docker:
- image: circleci/node:12
test_node_14:
<<: *unit-tests-template
docker:
- image: circleci/node:14
test_node_16:
working_directory: ~/nest
docker:
- image: circleci/node:16
steps:
- checkout
- *restore-cache
@@ -65,20 +75,10 @@ jobs:
- store_artifacts:
path: coverage
test_node_14:
<<: *unit-tests-template
docker:
- image: circleci/node:14
test_node_16:
<<: *unit-tests-template
docker:
- image: circleci/node:16
lint:
working_directory: ~/nest
docker:
- image: circleci/node:12
- image: circleci/node:16
steps:
- checkout
- *restore-cache
@@ -128,7 +128,7 @@ jobs:
codechecks_benchmarks:
working_directory: ~/nest
docker:
- image: circleci/node:12
- image: circleci/node:16
steps:
- checkout
- *restore-cache
@@ -144,7 +144,7 @@ jobs:
samples:
working_directory: ~/nest
docker:
- image: circleci/node:12
- image: circleci/node:16
environment:
- DISABLE_OPENCOLLECTIVE: true
steps:

View File

@@ -23,6 +23,22 @@
"test",
"sample"
]
],
"scope-enum": [
1,
"always",
[
"common",
"core",
"sample",
"microservices",
"express",
"fastify",
"socket.io",
"ws",
"testing",
"websockets"
]
]
}
}

View File

@@ -1,8 +1,7 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
root: true,
env: {
node: true,
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
@@ -10,16 +9,39 @@ module.exports = {
'plugin:@typescript-eslint/recommended',
'prettier',
],
root: true,
env: {
node: true,
},
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/ban-types': 'off',
},
overrides: [
{
files: ['**/*.ts'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/ban-types': 'off',
},
},
{
files: ['**/*.spec.ts', 'integration/**/*.ts'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.spec.json',
sourceType: 'module',
},
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-empty-function': 'off',
},
}
]
};

View File

@@ -1,13 +0,0 @@
const baseConfig = require('./.eslintrc');
module.exports = {
...baseConfig,
parserOptions: {
project: 'tsconfig.spec.json',
sourceType: 'module',
},
rules: {
...baseConfig.rules,
'@typescript-eslint/no-empty-function': 'off',
},
};

View File

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

View File

@@ -19,7 +19,7 @@ Help us keep Nest open and inclusive. Please read and follow our [Code of Conduc
## <a name="question"></a> Got a Question or Problem?
**Do not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests.** You've got much better chances of getting your question answered on [Stack Overflow](https://stackoverflow.com/questions/tagged/nestjs) where the questions should be tagged with tag `nestjs`.
**Do not open issues for general support questions as we want to keep GitHub issues for bug reports and feature requests.** You've got much better chances of getting your question answered on [Stack Overflow][stackoverflow] where the questions should be tagged with tag `nestjs`.
Stack Overflow is a much better place to ask questions since:
@@ -71,7 +71,7 @@ A minimal reproduce scenario using a repository or Gist allows us to quickly con
Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you we are going to close an issue that doesn't have enough info to be reproduced.
You can file new issues by filling out our [new issue form](https://github.com/nestjs/nest/issues/new).
You can file new issues by filling out our [new issue form][new_issue].
### <a name="submit-pr"></a> Submitting a Pull Request (PR)
@@ -84,9 +84,9 @@ To the first point
We cannot accept code without this.
-->
1. Search [GitHub](https://github.com/nestjs/nest/pulls) for an open or closed PR
1. Search [GitHub Pull Requests][gh_prs] for an open or closed PR
that relates to your submission. You don't want to duplicate effort.
1. Fork the nestjs/nest repo.
1. Fork this repository.
1. Make your changes in a new git branch:
```shell
@@ -159,12 +159,12 @@ from the main (upstream) repository:
## <a name="development"></a> Development Setup
You will need Node.js version 8.9.0+.
You will need [Node.js](https://nodejs.org) version >= 10.13.0 (except for v13).
1. After cloning the repo, run:
```bash
$ npm i # (or yarn install)
$ npm ci # (or yarn install)
```
2. In order to prepare your environment run `prepare.sh` shell script:
@@ -233,7 +233,7 @@ to read on GitHub as well as in various git tools.
Footer should contain a [closing reference to an issue](https://help.github.com/articles/closing-issues-via-commit-messages/) if any.
Samples: (even more [samples](https://github.com/nestjs/nest/commits/master))
Samples: (even more [samples][commits_samples])
```
docs(changelog): update change log to beta.5
@@ -262,16 +262,22 @@ Must be one of the following:
### Scope
The scope should be the name of the npm package affected (as perceived by person reading changelog generated from commit messages.
The scope should have 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**
- **sample**
- **microservices**
- **testing**
- **websockets**
- **common**: for changes made on `packages/common` directory
- **core**: for changes made on `packages/core` directory
- **sample**: for changes made on `packages/sample` directory
- **microservices**: for changes made on `packages/microservices` directory
- **express**: for changes made on `packages/platform-express` directory
- **fastify**: for changes made on `packages/platform-fastify` directory
- **socket.io**: for changes made on `packages/platform-socket.io` directory
- **ws**: for changes made on `packages/platform-ws` directory
- **testing**: for changes made on `packages/testing` directory
- **websockets**: for changes made on `packages/websockets` directory
If your change affect more than one package, separate the scopes with a comma (e.g. `common,core`).
There are currently a few exceptions to the "use package name" rule:
@@ -279,7 +285,6 @@ There are currently a few exceptions to the "use package name" rule:
- **changelog**: used for updating the release notes in CHANGELOG.md
- **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
@@ -317,14 +322,13 @@ changes to be accepted, the CLA must be signed. It's a quick process, we promise
<!-- [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
<!-- [individual-cla]: http://code.google.com/legal/individual-cla-v1.0.html -->
<!-- [corporate-cla]: http://code.google.com/legal/corporate-cla-v1.0.html -->
[dev-doc]: https://github.com/nestjs/nest/blob/master/docs/DEVELOPER.md
[github]: https://github.com/nestjs/nest
[stackoverflow]: https://stackoverflow.com/questions/tagged/nestjs
[discord]: https://discordapp.com/invite/G7Qnnhy
[individual-cla]: http://code.google.com/legal/individual-cla-v1.0.html
[js-style-guide]: https://google.github.io/styleguide/jsguide.html
[jsfiddle]: http://jsfiddle.net
[plunker]: http://plnkr.co/edit
[runnable]: http://runnable.com
<!-- [stackoverflow]: http://stackoverflow.com/questions/tagged/angular -->
[new_issue]: https://github.com/nestjs/nest/issues/new
[gh_prs]: https://github.com/nestjs/nest/pulls
[commits_samples]: https://github.com/nestjs/nest/commits/master

View File

@@ -65,19 +65,20 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td>
<a href="https://nx.dev" target="_blank"><img src="https://nestjs.com/img/nx-logo.png" height="45" valign="middle" /></a></td>
<td>
<a href="https://valor-software.com/" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="170" valign="middle" /></a></td>
<a href="https://valor-software.com/" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="170" valign="middle" /></a></td><td>
<a href="https://amplication.com/" target="_blank"><img src="https://nestjs.com/img/amplication-logo.svg" width="190" valign="middle" /></a></td>
</tr></table>
#### Gold Sponsors
<table style="text-align:center;"><tr><td>
<a href="https://careers.labster.com/departments/platform" target="_blank"><img src="https://nestjs.com/img/labster-logo.png" width="170" valign="middle" /></a></td><td>
<a href="https://weld.app/" target="_blank"><img src="https://nestjs.com/img/weld-logo.svg" width="140" valign="middle" /></a></td>
<td>
<a href="https://intrinsic.ventures/" target="_blank"><img src="https://nestjs.com/img/intrinisic-logo.png" width="210" valign="middle" /></a></td>
<td>
<a href="https://jetbrains.com/" target="_blank"><img src="https://nestjs.com/img/jetbrains-logo.svg" width="110" valign="middle" /></a></td><td>
<a href="https://snyk.co/nestjs" target="_blank"><img src="https://nestjs.com/img/snyk-logo-black.png" width="185" valign="middle" /></a></td></</tr></table>
<a href="https://snyk.co/nestjs" target="_blank"><img src="https://nestjs.com/img/snyk-logo-black.png" width="185" valign="middle" /></a></td><td>
<a href="https://fuseautotech.com/" target="_blank"><img src="https://nestjs.com/img/fuse-logo.svg" width="105" valign="middle" /></a></td></</tr></table>
#### Silver Sponsors
@@ -127,6 +128,8 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td align="center" valign="middle"><a href="https://polygon-software.ch/" target="_blank"><img src="https://nestjs.com/img/polygon-logo.svg" width="120" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://mobilereality.pl/" target="_blank"><img src="https://nestjs.com/img/mobile-reality-logo.png" width="45" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://boringowl.io/" target="_blank"><img src="https://nestjs.com/img/boringowl-logo.svg" width="120" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://www.mobilefactory.jp/" target="_blank"><img src="https://nestjs.com/img/mobilefactory-logo.png" width="100" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://db.nordbot.app/" target="_blank"><img src="https://nestjs.com/img/nord-logo.png" width="50" valign="middle" /></a></td>
</tr></table>
## Backers

View File

@@ -2,4 +2,6 @@
const fastify = require('fastify')();
fastify.get('/', async (req, reply) => reply.send('Hello world'));
fastify.listen(3000);
fastify.listen({
port: 3000
});

View File

@@ -1,10 +1,10 @@
import { NestFastifyApplication } from '@nestjs/platform-fastify';
import { NestExpressApplication } from '@nestjs/platform-express';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import { AppModule } from '../src/app.module';
describe('Express Cors', () => {
let app: NestFastifyApplication;
let app: NestExpressApplication;
const configs = [
{
origin: 'example.com',
@@ -30,7 +30,7 @@ describe('Express Cors', () => {
imports: [AppModule],
}).compile();
app = module.createNestApplication<NestFastifyApplication>();
app = module.createNestApplication<NestExpressApplication>();
let requestId = 0;
const configDelegation = function (req, cb) {
@@ -84,7 +84,7 @@ describe('Express Cors', () => {
cb(null, config);
};
app = module.createNestApplication<NestFastifyApplication>(null, {
app = module.createNestApplication<NestExpressApplication>({
cors: configDelegation,
});
@@ -126,7 +126,7 @@ describe('Express Cors', () => {
imports: [AppModule],
}).compile();
app = module.createNestApplication<NestFastifyApplication>();
app = module.createNestApplication<NestExpressApplication>();
app.enableCors(configs[0]);
await app.init();
@@ -153,7 +153,7 @@ describe('Express Cors', () => {
imports: [AppModule],
}).compile();
app = module.createNestApplication<NestFastifyApplication>(null, {
app = module.createNestApplication<NestExpressApplication>({
cors: configs[0],
});
await app.init();

View File

@@ -1,9 +1,12 @@
import { NestFastifyApplication } from '@nestjs/platform-fastify';
import {
FastifyAdapter,
NestFastifyApplication,
} from '@nestjs/platform-fastify';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import { AppModule } from '../src/app.module';
describe('Fastify Cors', () => {
describe.skip('Fastify Cors', () => {
let app: NestFastifyApplication;
const configs = [
{
@@ -30,7 +33,9 @@ describe('Fastify Cors', () => {
imports: [AppModule],
}).compile();
app = module.createNestApplication<NestFastifyApplication>();
app = module.createNestApplication<NestFastifyApplication>(
new FastifyAdapter(),
);
let requestId = 0;
const configDelegation = function (req, cb) {
@@ -84,9 +89,12 @@ describe('Fastify Cors', () => {
cb(null, config);
};
app = module.createNestApplication<NestFastifyApplication>(null, {
cors: configDelegation,
});
app = module.createNestApplication<NestFastifyApplication>(
new FastifyAdapter(),
{
cors: configDelegation,
},
);
await app.init();
});
@@ -127,7 +135,9 @@ describe('Fastify Cors', () => {
imports: [AppModule],
}).compile();
app = module.createNestApplication<NestFastifyApplication>();
app = module.createNestApplication<NestFastifyApplication>(
new FastifyAdapter(),
);
app.enableCors(configs[0]);
await app.init();
@@ -147,16 +157,19 @@ describe('Fastify Cors', () => {
after(async () => {
await app.close();
});
describe('Application Options', () => {
before(async () => {
const module = await Test.createTestingModule({
imports: [AppModule],
}).compile();
app = module.createNestApplication<NestFastifyApplication>(null, {
cors: configs[0],
});
app = module.createNestApplication<NestFastifyApplication>(
new FastifyAdapter(),
{
cors: configs[0],
},
);
await app.init();
});

View File

@@ -1,14 +1,14 @@
import { INestApplication } from '@nestjs/common';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import { ApplicationModule } from '../src/app.module';
import { AppModule } from '../src/app.module';
describe('GraphQL - Code-first', () => {
let app: INestApplication;
beforeEach(async () => {
const module = await Test.createTestingModule({
imports: [ApplicationModule],
imports: [AppModule],
}).compile();
app = module.createNestApplication();

View File

@@ -1,14 +1,14 @@
import { INestApplication } from '@nestjs/common';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import { ApplicationModule } from '../src/app.module';
import { AppModule } from '../src/app.module';
describe('GraphQL - Guards', () => {
let app: INestApplication;
beforeEach(async () => {
const module = await Test.createTestingModule({
imports: [ApplicationModule],
imports: [AppModule],
}).compile();
app = module.createNestApplication();

View File

@@ -1,14 +1,14 @@
import { INestApplication, ValidationPipe } from '@nestjs/common';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import { ApplicationModule } from '../src/app.module';
import { AppModule } from '../src/app.module';
describe('GraphQL Pipes', () => {
let app: INestApplication;
beforeEach(async () => {
const module = await Test.createTestingModule({
imports: [ApplicationModule],
imports: [AppModule],
}).compile();
app = module.createNestApplication();

View File

@@ -18,4 +18,4 @@ import { RecipesModule } from './recipes/recipes.module';
}),
],
})
export class ApplicationModule {}
export class AppModule {}

View File

@@ -1,14 +1,14 @@
import { INestApplication } from '@nestjs/common';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import { ApplicationModule } from '../src/app.module';
import { AppModule } from '../src/app.module';
describe('GraphQL', () => {
let app: INestApplication;
beforeEach(async () => {
const module = await Test.createTestingModule({
imports: [ApplicationModule],
imports: [AppModule],
}).compile();
app = module.createNestApplication();

View File

@@ -13,4 +13,4 @@ import { CatsModule } from './cats/cats.module';
}),
],
})
export class ApplicationModule {}
export class AppModule {}

View File

@@ -13,7 +13,7 @@ import {
} from '@nestjs/platform-fastify';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import { ApplicationModule } from '../src/app.module';
import { AppModule } from '../src/app.module';
const RETURN_VALUE = 'test';
const MIDDLEWARE_VALUE = 'middleware';
@@ -57,7 +57,7 @@ class TestController {
}
@Module({
imports: [ApplicationModule],
imports: [AppModule],
controllers: [TestController],
})
class TestModule {

View File

@@ -9,7 +9,7 @@ import {
} from '@nestjs/common';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import { ApplicationModule } from '../src/app.module';
import { AppModule } from '../src/app.module';
const RETURN_VALUE = 'test';
const MIDDLEWARE_VALUE = 'middleware';
@@ -48,7 +48,7 @@ class TestController {
}
@Module({
imports: [ApplicationModule],
imports: [AppModule],
controllers: [TestController],
})
class TestModule {

View File

@@ -3,7 +3,7 @@ import { ExpressAdapter } from '@nestjs/platform-express';
import { Test } from '@nestjs/testing';
import * as express from 'express';
import * as request from 'supertest';
import { ApplicationModule } from '../src/app.module';
import { AppModule } from '../src/app.module';
describe('Hello world (express instance)', () => {
let server;
@@ -11,7 +11,7 @@ describe('Hello world (express instance)', () => {
beforeEach(async () => {
const module = await Test.createTestingModule({
imports: [ApplicationModule],
imports: [AppModule],
}).compile();
app = module.createNestApplication(new ExpressAdapter(express()));

View File

@@ -3,7 +3,7 @@ import { ExpressAdapter } from '@nestjs/platform-express';
import { Test } from '@nestjs/testing';
import * as express from 'express';
import * as request from 'supertest';
import { ApplicationModule } from '../src/app.module';
import { AppModule } from '../src/app.module';
describe('Hello world (express instance with multiple applications)', () => {
let server;
@@ -11,10 +11,10 @@ describe('Hello world (express instance with multiple applications)', () => {
beforeEach(async () => {
const module1 = await Test.createTestingModule({
imports: [ApplicationModule],
imports: [AppModule],
}).compile();
const module2 = await Test.createTestingModule({
imports: [ApplicationModule],
imports: [AppModule],
}).compile();
const adapter = new ExpressAdapter(express());

View File

@@ -4,14 +4,14 @@ import {
} from '@nestjs/platform-fastify';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import { ApplicationModule } from '../src/app.module';
import { AppModule } from '../src/app.module';
describe('Hello world (fastify adapter)', () => {
let app: NestFastifyApplication;
beforeEach(async () => {
const module = await Test.createTestingModule({
imports: [ApplicationModule],
imports: [AppModule],
}).compile();
app = module.createNestApplication<NestFastifyApplication>(

View File

@@ -6,7 +6,7 @@ import {
import { APP_GUARD } from '@nestjs/core';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import { ApplicationModule } from '../src/app.module';
import { AppModule } from '../src/app.module';
@Injectable()
export class AuthGuard {
@@ -20,7 +20,7 @@ export class AuthGuard {
function createTestModule(guard) {
return Test.createTestingModule({
imports: [ApplicationModule],
imports: [AppModule],
providers: [
{
provide: APP_GUARD,

View File

@@ -1,7 +1,7 @@
import * as request from 'supertest';
import { Test } from '@nestjs/testing';
import { INestApplication } from '@nestjs/common';
import { ApplicationModule } from '../src/app.module';
import { AppModule } from '../src/app.module';
describe('Hello world (default adapter)', () => {
let server;
@@ -9,7 +9,7 @@ describe('Hello world (default adapter)', () => {
beforeEach(async () => {
const module = await Test.createTestingModule({
imports: [ApplicationModule],
imports: [AppModule],
}).compile();
app = module.createNestApplication();

View File

@@ -10,7 +10,7 @@ import { Test } from '@nestjs/testing';
import { of } from 'rxjs';
import { map } from 'rxjs/operators';
import * as request from 'supertest';
import { ApplicationModule } from '../src/app.module';
import { AppModule } from '../src/app.module';
const RETURN_VALUE = 'test';
@@ -58,7 +58,7 @@ export class HeaderInterceptor {
function createTestModule(interceptor) {
return Test.createTestingModule({
imports: [ApplicationModule],
imports: [AppModule],
providers: [
{
provide: APP_INTERCEPTOR,

View File

@@ -1,7 +1,7 @@
import { INestApplication } from '@nestjs/common';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import { ApplicationModule } from '../src/app.module';
import { AppModule } from '../src/app.module';
describe('Hello world (default adapter)', () => {
let server;
@@ -9,7 +9,7 @@ describe('Hello world (default adapter)', () => {
beforeEach(async () => {
const module = await Test.createTestingModule({
imports: [ApplicationModule],
imports: [AppModule],
}).compile();
app = module.createNestApplication();

View File

@@ -9,7 +9,7 @@ import {
} from '@nestjs/common';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import { ApplicationModule } from '../src/app.module';
import { AppModule } from '../src/app.module';
import { Response } from 'express';
const INCLUDED_VALUE = 'test_included';
@@ -32,7 +32,7 @@ class TestController {
}
@Module({
imports: [ApplicationModule],
imports: [AppModule],
controllers: [TestController],
})
class TestModule {

View File

@@ -12,7 +12,7 @@ import {
} from '@nestjs/platform-fastify';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import { ApplicationModule } from '../src/app.module';
import { AppModule } from '../src/app.module';
const INCLUDED_VALUE = 'test_included';
const QUERY_VALUE = 'test_query';
@@ -58,7 +58,7 @@ class TestQueryController {
}
@Module({
imports: [ApplicationModule],
imports: [AppModule],
controllers: [TestController, TestQueryController],
})
class TestModule {

View File

@@ -7,7 +7,7 @@ import {
} from '@nestjs/common';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import { ApplicationModule } from '../src/app.module';
import { AppModule } from '../src/app.module';
const RETURN_VALUE = 'test';
const SCOPED_VALUE = 'test_scoped';
@@ -27,7 +27,7 @@ class TestController {
}
@Module({
imports: [ApplicationModule],
imports: [AppModule],
controllers: [TestController],
})
class TestModule {

View File

@@ -8,7 +8,7 @@ import {
import { RouterModule } from '@nestjs/core';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import { ApplicationModule } from '../src/app.module';
import { AppModule } from '../src/app.module';
const RETURN_VALUE = 'test';
const SCOPED_VALUE = 'test_scoped';
@@ -27,7 +27,7 @@ class TestController {
}
@Module({
imports: [ApplicationModule],
imports: [AppModule],
controllers: [TestController],
})
class TestModule {

View File

@@ -6,4 +6,4 @@ import { HostModule } from './host/host.module';
@Module({
imports: [HelloModule, HostModule, HostArrayModule],
})
export class ApplicationModule {}
export class AppModule {}

View File

@@ -4,7 +4,7 @@ import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import * as request from 'supertest';
import { AppController } from '../src/app.controller';
import { ApplicationModule } from '../src/app.module';
import { AppModule } from '../src/app.module';
describe('RPC transport', () => {
let server;
@@ -12,7 +12,7 @@ describe('RPC transport', () => {
beforeEach(async () => {
const module = await Test.createTestingModule({
imports: [ApplicationModule],
imports: [AppModule],
}).compile();
app = module.createNestApplication();

View File

@@ -72,4 +72,4 @@ class ClientOptionService implements ClientsModuleOptionsFactory {
],
controllers: [AppController],
})
export class ApplicationModule {}
export class AppModule {}

View File

@@ -13,10 +13,9 @@ describe('Raw body (Express Application)', () => {
imports: [ExpressModule],
}).compile();
app = moduleFixture.createNestApplication<NestExpressApplication>(
undefined,
{ rawBody: true },
);
app = moduleFixture.createNestApplication<NestExpressApplication>({
rawBody: true,
});
});
it('should return exact post body', async () => {

View File

@@ -1,7 +1,9 @@
import { NestFastifyApplication } from '@nestjs/platform-fastify';
import {
NestFastifyApplication,
FastifyAdapter,
} from '@nestjs/platform-fastify';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import * as request from 'supertest';
import { FastifyModule } from '../src/fastify.module';
describe('Raw body (Fastify Application)', () => {
@@ -13,21 +15,24 @@ describe('Raw body (Fastify Application)', () => {
imports: [FastifyModule],
}).compile();
app = moduleFixture.createNestApplication<NestFastifyApplication>(null, {
rawBody: true,
});
app = moduleFixture.createNestApplication<NestFastifyApplication>(
new FastifyAdapter(),
{
rawBody: true,
},
);
});
it('should return exact post body', async () => {
await app.init();
const response = await request(app.getHttpServer())
.post('/')
.set('Content-Type', 'application/json')
.set('Accept', 'application/json')
.send(body)
.expect(201);
const response = await app.inject({
method: 'POST',
url: '/',
headers: { 'content-type': 'application/json' },
payload: body,
});
expect(response.body).to.eql({
expect(JSON.parse(response.body)).to.eql({
parsed: {
amount: 0,
},
@@ -35,12 +40,21 @@ describe('Raw body (Fastify Application)', () => {
});
});
it('should work if post body is empty', async () => {
it('should fail if post body is empty', async () => {
await app.init();
await request(app.getHttpServer())
.post('/')
.set('Content-Type', 'application/json')
.expect(201);
const response = await app.inject({
method: 'POST',
url: '/',
headers: {
'content-type': 'application/json',
accept: 'application/json',
},
});
// Unlike Express, when you send a POST request without a body
// with Fastify, Fastify will throw an error because it isn't valid
// JSON. See fastify/fastify#297.
expect(response.statusCode).to.equal(400);
});
afterEach(async () => {

View File

@@ -0,0 +1,262 @@
import { clc } from '@nestjs/common/utils/cli-colors.util';
import { repl } from '@nestjs/core';
import { ReplContext } from '@nestjs/core/repl/repl-context';
import {
HelpReplFn,
GetReplFn,
ResolveReplFn,
SelectReplFn,
DebugReplFn,
MethodsReplFn,
} from '@nestjs/core/repl/native-functions';
import { expect } from 'chai';
import * as sinon from 'sinon';
import { AppModule } from '../src/app.module';
const PROMPT = '\u001b[1G\u001b[0J> \u001b[3G';
describe('REPL', () => {
beforeEach(() => {
// To avoid coloring the output:
sinon.stub(clc, 'bold').callsFake(text => text);
sinon.stub(clc, 'green').callsFake(text => text);
sinon.stub(clc, 'yellow').callsFake(text => text);
sinon.stub(clc, 'red').callsFake(text => text);
sinon.stub(clc, 'magentaBright').callsFake(text => text);
sinon.stub(clc, 'cyanBright').callsFake(text => text);
});
afterEach(() => {
sinon.restore();
});
it('get()', async () => {
const server = await repl(AppModule);
server.context;
let outputText = '';
sinon.stub(process.stdout, 'write').callsFake(text => {
outputText += text;
return true;
});
server.emit('line', 'get(UsersService)');
expect(outputText).to.equal(
`UsersService { usersRepository: UsersRepository {} }
${PROMPT}`,
);
outputText = '';
server.emit('line', 'get(UsersService).findAll()');
expect(outputText).to
.equal(`\u001b[32m'This action returns all users'\u001b[39m
${PROMPT}`);
outputText = '';
server.emit('line', 'get(UsersRepository)');
expect(outputText).to.equal(`UsersRepository {}
${PROMPT}`);
});
it('$()', async () => {
const server = await repl(AppModule);
server.context;
let outputText = '';
sinon.stub(process.stdout, 'write').callsFake(text => {
outputText += text;
return true;
});
server.emit('line', '$(UsersService)');
expect(outputText).to.equal(
`UsersService { usersRepository: UsersRepository {} }
${PROMPT}`,
);
outputText = '';
server.emit('line', '$(UsersService).findAll()');
expect(outputText).to
.equal(`\u001b[32m'This action returns all users'\u001b[39m
${PROMPT}`);
outputText = '';
server.emit('line', '$(UsersRepository)');
expect(outputText).to.equal(`UsersRepository {}
${PROMPT}`);
});
it('debug()', async () => {
const server = await repl(AppModule);
let outputText = '';
sinon.stub(process.stdout, 'write').callsFake(text => {
outputText += text;
return true;
});
server.emit('line', 'debug(UsersModule)');
expect(outputText).to.equal(
`
UsersModule:
- controllers:
◻ UsersController
- providers:
◻ UsersService
◻ UsersRepository
${PROMPT}`,
);
});
it('methods()', async () => {
const server = await repl(AppModule);
let outputText = '';
sinon.stub(process.stdout, 'write').callsFake(text => {
outputText += text;
return true;
});
server.emit('line', 'methods(UsersRepository)');
expect(outputText).to.equal(
`
Methods:
◻ find
${PROMPT}`,
);
outputText = '';
server.emit('line', 'methods(UsersService)');
expect(outputText).to.equal(
`
Methods:
◻ create
◻ findAll
◻ findOne
◻ update
◻ remove
${PROMPT}`,
);
});
describe('<native_function>.help', () => {
it(`Typing "help.help" should print function's description and interface`, async () => {
const replServer = await repl(AppModule);
const { description, signature } = new HelpReplFn(
sinon.stub() as unknown as ReplContext,
).fnDefinition;
let outputText = '';
sinon.stub(process.stdout, 'write').callsFake(text => {
outputText += text;
return true;
});
replServer.emit('line', 'help.help');
expect(outputText).to.equal(`${description}
Interface: help${signature}
${PROMPT}`);
});
it(`Typing "get.help" should print function's description and interface`, async () => {
const replServer = await repl(AppModule);
const { description, signature } = new GetReplFn(
sinon.stub() as unknown as ReplContext,
).fnDefinition;
let outputText = '';
sinon.stub(process.stdout, 'write').callsFake(text => {
outputText += text;
return true;
});
replServer.emit('line', 'get.help');
expect(outputText).to.equal(`${description}
Interface: get${signature}
${PROMPT}`);
});
it(`Typing "resolve.help" should print function's description and interface`, async () => {
const replServer = await repl(AppModule);
const { description, signature } = new ResolveReplFn(
sinon.stub() as unknown as ReplContext,
).fnDefinition;
let outputText = '';
sinon.stub(process.stdout, 'write').callsFake(text => {
outputText += text;
return true;
});
replServer.emit('line', 'resolve.help');
expect(outputText).to.equal(`${description}
Interface: resolve${signature}
${PROMPT}`);
});
it(`Typing "select.help" should print function's description and interface`, async () => {
const replServer = await repl(AppModule);
const { description, signature } = new SelectReplFn(
sinon.stub() as unknown as ReplContext,
).fnDefinition;
let outputText = '';
sinon.stub(process.stdout, 'write').callsFake(text => {
outputText += text;
return true;
});
replServer.emit('line', 'select.help');
expect(outputText).to.equal(`${description}
Interface: select${signature}
${PROMPT}`);
});
it(`Typing "debug.help" should print function's description and interface`, async () => {
const replServer = await repl(AppModule);
const { description, signature } = new DebugReplFn(
sinon.stub() as unknown as ReplContext,
).fnDefinition;
let outputText = '';
sinon.stub(process.stdout, 'write').callsFake(text => {
outputText += text;
return true;
});
replServer.emit('line', 'debug.help');
expect(outputText).to.equal(`${description}
Interface: debug${signature}
${PROMPT}`);
});
it(`Typing "methods.help" should print function's description and interface`, async () => {
const replServer = await repl(AppModule);
const { description, signature } = new MethodsReplFn(
sinon.stub() as unknown as ReplContext,
).fnDefinition;
let outputText = '';
sinon.stub(process.stdout, 'write').callsFake(text => {
outputText += text;
return true;
});
replServer.emit('line', 'methods.help');
expect(outputText).to.equal(`${description}
Interface: methods${signature}
${PROMPT}`);
});
});
});

View File

@@ -0,0 +1,7 @@
import { Module } from '@nestjs/common';
import { UsersModule } from './users/users.module';
@Module({
imports: [UsersModule],
})
export class AppModule {}

View File

@@ -0,0 +1 @@
export class CreateUserDto {}

View File

@@ -0,0 +1,4 @@
import { PartialType } from '@nestjs/mapped-types';
import { CreateUserDto } from './create-user.dto';
export class UpdateUserDto extends PartialType(CreateUserDto) {}

View File

@@ -0,0 +1 @@
export class User {}

View File

@@ -0,0 +1,34 @@
import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { UsersService } from './users.service';
import { CreateUserDto } from './dto/create-user.dto';
import { UpdateUserDto } from './dto/update-user.dto';
@Controller('users')
export class UsersController {
constructor(private readonly usersService: UsersService) {}
@Post()
create(@Body() createUserDto: CreateUserDto) {
return this.usersService.create(createUserDto);
}
@Get()
findAll() {
return this.usersService.findAll();
}
@Get(':id')
findOne(@Param('id') id: string) {
return this.usersService.findOne(+id);
}
@Patch(':id')
update(@Param('id') id: string, @Body() updateUserDto: UpdateUserDto) {
return this.usersService.update(+id, updateUserDto);
}
@Delete(':id')
remove(@Param('id') id: string) {
return this.usersService.remove(+id);
}
}

View File

@@ -0,0 +1,16 @@
import { Module } from '@nestjs/common';
import { UsersController } from './users.controller';
import { UsersRepository } from './users.repository';
import { UsersService } from './users.service';
@Module({
controllers: [UsersController],
providers: [
UsersService,
{
provide: UsersRepository.name,
useValue: new UsersRepository(),
},
],
})
export class UsersModule {}

View File

@@ -0,0 +1,8 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class UsersRepository {
async find() {
return [{ id: 1, email: 'test@nestjs.com' }];
}
}

View File

@@ -0,0 +1,32 @@
import { Inject, Injectable } from '@nestjs/common';
import { CreateUserDto } from './dto/create-user.dto';
import { UpdateUserDto } from './dto/update-user.dto';
import { UsersRepository } from './users.repository';
@Injectable()
export class UsersService {
constructor(
@Inject('UsersRepository')
private readonly usersRepository: UsersRepository,
) {}
create(createUserDto: CreateUserDto) {
return 'This action adds a new user';
}
findAll() {
return `This action returns all users`;
}
findOne(id: number) {
return `This action returns a #${id} user`;
}
update(id: number, updateUserDto: UpdateUserDto) {
return `This action updates a #${id} user`;
}
remove(id: number) {
return `This action removes a #${id} user`;
}
}

View File

@@ -0,0 +1,22 @@
{
"compilerOptions": {
"module": "commonjs",
"declaration": false,
"noImplicitAny": false,
"removeComments": true,
"noLib": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es6",
"sourceMap": true,
"allowJs": true,
"outDir": "./dist"
},
"include": [
"src/**/*"
],
"exclude": [
"node_modules",
"**/*.spec.ts"
]
}

View File

@@ -0,0 +1,76 @@
import { INestApplication } from '@nestjs/common';
import { ContextIdFactory } from '@nestjs/core';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import * as request from 'supertest';
import { DurableContextIdStrategy } from '../src/durable/durable-context-id.strategy';
import { DurableModule } from '../src/durable/durable.module';
describe('Durable providers', () => {
let server: any;
let app: INestApplication;
before(async () => {
const moduleRef = await Test.createTestingModule({
imports: [DurableModule],
}).compile();
app = moduleRef.createNestApplication();
server = app.getHttpServer();
await app.init();
ContextIdFactory.apply(new DurableContextIdStrategy());
});
describe('when service is durable', () => {
const performHttpCall = (tenantId: number, end: (err?: any) => void) =>
request(server)
.get('/durable')
.set({ ['x-tenant-id']: tenantId })
.end((err, res) => {
if (err) return end(err);
end(res);
});
it(`should share durable providers per tenant`, async () => {
let result: request.Response;
result = await new Promise<request.Response>(resolve =>
performHttpCall(1, resolve),
);
expect(result.text).equal('Hello world! Counter: 1');
result = await new Promise<request.Response>(resolve =>
performHttpCall(1, resolve),
);
expect(result.text).equal('Hello world! Counter: 2');
result = await new Promise<request.Response>(resolve =>
performHttpCall(1, resolve),
);
expect(result.text).equal('Hello world! Counter: 3');
});
it(`should create per-tenant DI sub-tree`, async () => {
let result: request.Response;
result = await new Promise<request.Response>(resolve =>
performHttpCall(4, resolve),
);
expect(result.text).equal('Hello world! Counter: 1');
result = await new Promise<request.Response>(resolve =>
performHttpCall(5, resolve),
);
expect(result.text).equal('Hello world! Counter: 1');
result = await new Promise<request.Response>(resolve =>
performHttpCall(6, resolve),
);
expect(result.text).equal('Hello world! Counter: 1');
});
});
after(async () => {
ContextIdFactory['strategy'] = undefined;
await app.close();
});
});

View File

@@ -0,0 +1,21 @@
import { ContextId, ContextIdStrategy, HostComponentInfo } from '@nestjs/core';
import { Request } from 'express';
const tenants = new Map<string, ContextId>();
export class DurableContextIdStrategy implements ContextIdStrategy {
attach(contextId: ContextId, request: Request) {
const tenantId = request.headers['x-tenant-id'] as string;
let tenantSubTreeId: ContextId;
if (tenants.has(tenantId)) {
tenantSubTreeId = tenants.get(tenantId);
} else {
tenantSubTreeId = { id: +tenantId } as ContextId;
tenants.set(tenantId, tenantSubTreeId);
}
return (info: HostComponentInfo) =>
info.isTreeDurable ? tenantSubTreeId : contextId;
}
}

View File

@@ -0,0 +1,12 @@
import { Controller, Get } from '@nestjs/common';
import { DurableService } from './durable.service';
@Controller('durable')
export class DurableController {
constructor(private readonly durableService: DurableService) {}
@Get()
greeting(): string {
return this.durableService.greeting();
}
}

View File

@@ -0,0 +1,9 @@
import { Module } from '@nestjs/common';
import { DurableController } from './durable.controller';
import { DurableService } from './durable.service';
@Module({
controllers: [DurableController],
providers: [DurableService],
})
export class DurableModule {}

View File

@@ -0,0 +1,11 @@
import { Injectable, Scope } from '@nestjs/common';
@Injectable({ scope: Scope.REQUEST, durable: true })
export class DurableService {
public instanceCounter = 0;
greeting() {
++this.instanceCounter;
return `Hello world! Counter: ${this.instanceCounter}`;
}
}

View File

@@ -1,7 +1,7 @@
import { INestApplication } from '@nestjs/common';
import { Test } from '@nestjs/testing';
import * as request from 'supertest';
import { ApplicationModule } from '../src/app.module';
import { AppModule } from '../src/app.module';
describe('TypeOrm', () => {
let server;
@@ -9,7 +9,7 @@ describe('TypeOrm', () => {
beforeEach(async () => {
const module = await Test.createTestingModule({
imports: [ApplicationModule],
imports: [AppModule],
}).compile();
app = module.createNestApplication();

View File

@@ -21,4 +21,4 @@ import { PhotoModule } from './photo/photo.module';
PhotoModule,
],
})
export class ApplicationModule {}
export class AppModule {}

View File

@@ -72,7 +72,7 @@ describe('WebSocketGateway (WsAdapter)', () => {
it(`should handle message on a different path`, async () => {
app = await createNestApp(WsPathGateway);
await app.listenAsync(3000);
await app.listen(3000);
try {
ws = new WebSocket('ws://localhost:3000/ws-path');
await new Promise((resolve, reject) => {
@@ -104,7 +104,7 @@ describe('WebSocketGateway (WsAdapter)', () => {
this.retries(10);
app = await createNestApp(ExamplePathGateway, WsPathGateway2);
await app.listenAsync(3000);
await app.listen(3000);
// open websockets delay
await new Promise(resolve => setTimeout(resolve, 1000));

View File

@@ -3,5 +3,5 @@
"packages": [
"packages/*"
],
"version": "8.4.5"
"version": "9.0.1"
}

4378
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/core",
"version": "8.4.4",
"version": "9.0.0",
"description": "Modern, fast, powerful node.js web framework",
"homepage": "https://nestjs.com",
"repository": {
@@ -23,7 +23,7 @@
"clean": "gulp clean:bundle",
"codechecks:benchmarks": "codechecks ./tools/benchmarks/check-benchmarks.ts",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"format": "prettier \"**/*.ts\" --ignore-path ./.prettierignore --write && git status",
"format": "prettier \"**/*.ts\" \"packages/**/*.json\" --ignore-path ./.prettierignore --write && git status",
"postinstall": "opencollective",
"test": "nyc mocha packages/**/*.spec.ts --reporter spec",
"test:integration": "mocha \"integration/*/{,!(node_modules)/**/}/*.spec.ts\" --reporter spec",
@@ -31,9 +31,9 @@
"test:docker:down": "docker-compose -f integration/docker-compose.yml down",
"lint": "concurrently 'npm run lint:packages' 'npm run lint:integration' 'npm run lint:spec'",
"lint:fix": "concurrently 'npm run lint:packages -- --fix' 'npm run lint:integration -- --fix' 'npm run lint:spec -- --fix'",
"lint:integration": "eslint 'integration/*/{,!(node_modules)/**/}/*.ts' -c '.eslintrc.spec.js'",
"lint:integration": "eslint 'integration/*/{,!(node_modules)/**/}/*.ts'",
"lint:packages": "eslint 'packages/**/**.ts' --ignore-pattern 'packages/**/*.spec.ts'",
"lint:spec": "eslint 'packages/**/**.spec.ts' -c '.eslintrc.spec.js'",
"lint:spec": "eslint 'packages/**/**.spec.ts'",
"prerelease": "gulp copy-misc && gulp build --dist node_modules/@nestjs",
"publish": "npm run prerelease && npm run build:prod && ./node_modules/.bin/lerna publish --force-publish --access public --exact -m \"chore(@nestjs) publish %s release\"",
"prepublishOnly": "npm run changelog | pbcopy",
@@ -44,19 +44,21 @@
"prepare": "husky install"
},
"lint-staged": {
"packages/**/*.{ts,json}": [
"**/*.ts": [
"prettier --ignore-path ./.prettierignore --write"
],
"packages/**/*.json": [
"prettier --ignore-path ./.prettierignore --write"
]
},
"dependencies": {
"@nuxtjs/opencollective": "0.3.2",
"axios": "0.27.2",
"class-transformer": "0.5.1",
"class-validator": "0.13.2",
"cli-color": "2.0.2",
"cli-color": "2.0.3",
"cors": "2.8.5",
"express": "4.18.1",
"fast-json-stringify": "3.2.0",
"fast-json-stringify": "5.0.6",
"fast-safe-stringify": "2.1.1",
"graphql-subscriptions": "2.0.0",
"iterare": "1.2.1",
@@ -64,27 +66,28 @@
"path-to-regexp": "3.2.0",
"reflect-metadata": "0.1.13",
"rxjs": "7.5.5",
"socket.io": "4.5.0",
"socket.io": "4.5.1",
"tslib": "2.4.0",
"uuid": "8.3.2"
},
"devDependencies": {
"@codechecks/client": "0.1.12",
"@commitlint/cli": "17.0.0",
"@commitlint/config-angular": "17.0.0",
"@fastify/cors": "7.0.0",
"@fastify/formbody": "6.0.0",
"@fastify/multipart": "6.0.0",
"@fastify/static": "5.0.0",
"@commitlint/cli": "17.0.3",
"@commitlint/config-angular": "17.0.3",
"@fastify/cors": "^8.0.0",
"@fastify/formbody": "7.0.1",
"@fastify/middie": "8.0.0",
"@fastify/multipart": "7.1.0",
"@fastify/static": "6.4.0",
"@grpc/grpc-js": "1.6.7",
"@grpc/proto-loader": "0.6.12",
"@nestjs/apollo": "10.0.11",
"@nestjs/graphql": "10.0.8",
"@nestjs/mongoose": "9.0.3",
"@nestjs/typeorm": "8.0.3",
"@grpc/proto-loader": "0.6.13",
"@nestjs/apollo": "10.0.16",
"@nestjs/graphql": "10.0.16",
"@nestjs/mongoose": "9.1.1",
"@nestjs/typeorm": "8.0.4",
"@types/amqplib": "0.8.2",
"@types/bytes": "3.1.1",
"@types/cache-manager": "3.4.3",
"@types/cache-manager": "4.0.1",
"@types/chai": "4.3.1",
"@types/chai-as-promised": "7.1.5",
"@types/cors": "2.8.12",
@@ -92,30 +95,30 @@
"@types/gulp": "4.0.9",
"@types/http-errors": "1.8.2",
"@types/mocha": "9.1.1",
"@types/node": "17.0.34",
"@types/node": "18.0.3",
"@types/redis": "4.0.11",
"@types/reflect-metadata": "0.1.0",
"@types/sinon": "10.0.11",
"@types/socket.io": "3.0.2",
"@types/sinon": "10.0.12",
"@types/supertest": "2.0.12",
"@types/ws": "8.5.3",
"@typescript-eslint/eslint-plugin": "4.33.0",
"@typescript-eslint/parser": "4.33.0",
"amqp-connection-manager": "4.1.3",
"amqplib": "0.9.0",
"apollo-server-core": "3.7.0",
"apollo-server-express": "3.7.0",
"amqplib": "0.10.0",
"apollo-server-core": "3.9.0",
"apollo-server-express": "3.9.0",
"artillery": "1.7.9",
"body-parser": "1.20.0",
"bytes": "3.1.2",
"cache-manager": "3.6.1",
"cache-manager": "4.0.1",
"cache-manager-redis-store": "2.0.0",
"chai": "4.3.6",
"chai-as-promised": "7.1.1",
"clang-format": "1.8.0",
"commitlint-circle": "1.0.0",
"concurrently": "7.2.0",
"concurrently": "7.2.2",
"conventional-changelog": "3.1.25",
"core-js": "3.22.5",
"core-js": "3.23.3",
"coveralls": "3.1.1",
"delete-empty": "3.0.0",
"engine.io-client": "6.2.2",
@@ -124,9 +127,9 @@
"eslint-plugin-import": "2.26.0",
"eventsource": "2.0.2",
"fancy-log": "2.0.0",
"fastify": "3.29.0",
"fastify": "4.2.0",
"graphql": "15.8.0",
"graphql-tools": "8.2.9",
"graphql-tools": "8.3.0",
"gulp": "4.0.2",
"gulp-clang-format": "1.0.27",
"gulp-clean": "0.4.0",
@@ -135,39 +138,40 @@
"gulp-watch": "5.0.1",
"http-errors": "2.0.0",
"husky": "8.0.1",
"imports-loader": "3.1.1",
"ioredis": "5.0.4",
"imports-loader": "4.0.0",
"ioredis": "5.1.0",
"json-loader": "0.5.7",
"kafkajs": "2.0.0",
"lerna": "3.0.0",
"kafkajs": "2.1.0",
"lerna": "2.11.0",
"lerna-changelog": "2.2.0",
"light-my-request": "4.10.1",
"lint-staged": "12.4.1",
"light-my-request": "5.0.0",
"lint-staged": "13.0.3",
"markdown-table": "2.0.0",
"merge-graphql-schemas": "1.7.8",
"middie": "6.1.0",
"middie": "7.1.0",
"mocha": "10.0.0",
"mongoose": "6.3.3",
"mongoose": "6.4.3",
"mqtt": "4.3.7",
"multer": "1.4.4",
"mysql2": "2.3.3",
"nats": "2.6.1",
"nodemon": "2.0.16",
"nats": "2.7.1",
"nodemon": "2.0.19",
"nyc": "15.1.0",
"point-of-view": "5.3.0",
"prettier": "2.6.2",
"point-of-view": "6.3.0",
"prettier": "2.7.1",
"redis": "4.2.0",
"rxjs-compat": "6.6.7",
"sinon": "14.0.0",
"sinon-chai": "3.7.0",
"socket.io-client": "4.5.0",
"socket.io-client": "4.5.1",
"subscriptions-transport-ws": "0.11.0",
"supertest": "6.2.3",
"ts-morph": "14.0.0",
"ts-node": "10.7.0",
"supertest": "6.2.4",
"ts-morph": "15.1.0",
"ts-node": "10.8.2",
"typeorm": "0.2.45",
"typescript": "4.6.4",
"typescript": "4.7.4",
"wrk": "1.2.1",
"ws": "8.6.0"
"ws": "8.8.0"
},
"engines": {
"node": ">= 12.9.0"

View File

@@ -65,19 +65,20 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td>
<a href="https://nx.dev" target="_blank"><img src="https://nestjs.com/img/nx-logo.png" height="45" valign="middle" /></a></td>
<td>
<a href="https://valor-software.com/" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="170" valign="middle" /></a></td>
<a href="https://valor-software.com/" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="170" valign="middle" /></a></td><td>
<a href="https://amplication.com/" target="_blank"><img src="https://nestjs.com/img/amplication-logo.svg" width="190" valign="middle" /></a></td>
</tr></table>
#### Gold Sponsors
<table style="text-align:center;"><tr><td>
<a href="https://careers.labster.com/departments/platform" target="_blank"><img src="https://nestjs.com/img/labster-logo.png" width="170" valign="middle" /></a></td><td>
<a href="https://weld.app/" target="_blank"><img src="https://nestjs.com/img/weld-logo.svg" width="140" valign="middle" /></a></td>
<td>
<a href="https://intrinsic.ventures/" target="_blank"><img src="https://nestjs.com/img/intrinisic-logo.png" width="210" valign="middle" /></a></td>
<td>
<a href="https://jetbrains.com/" target="_blank"><img src="https://nestjs.com/img/jetbrains-logo.svg" width="110" valign="middle" /></a></td><td>
<a href="https://snyk.co/nestjs" target="_blank"><img src="https://nestjs.com/img/snyk-logo-black.png" width="185" valign="middle" /></a></td></</tr></table>
<a href="https://snyk.co/nestjs" target="_blank"><img src="https://nestjs.com/img/snyk-logo-black.png" width="185" valign="middle" /></a></td><td>
<a href="https://fuseautotech.com/" target="_blank"><img src="https://nestjs.com/img/fuse-logo.svg" width="105" valign="middle" /></a></td></</tr></table>
#### Silver Sponsors
@@ -127,6 +128,8 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td align="center" valign="middle"><a href="https://polygon-software.ch/" target="_blank"><img src="https://nestjs.com/img/polygon-logo.svg" width="120" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://mobilereality.pl/" target="_blank"><img src="https://nestjs.com/img/mobile-reality-logo.png" width="45" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://boringowl.io/" target="_blank"><img src="https://nestjs.com/img/boringowl-logo.svg" width="120" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://www.mobilefactory.jp/" target="_blank"><img src="https://nestjs.com/img/mobilefactory-logo.png" width="100" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://db.nordbot.app/" target="_blank"><img src="https://nestjs.com/img/nord-logo.png" width="50" valign="middle" /></a></td>
</tr></table>
## Backers

View File

@@ -5,7 +5,7 @@ import { CacheManagerOptions } from './cache-manager.interface';
export type CacheModuleOptions<
StoreConfig extends Record<any, any> = Record<string, any>,
> =
// Store-specfic configuration takes precedence over cache module options due
// Store-specific configuration takes precedence over cache module options due
// to how `createCacheManager` is implemented.
CacheManagerOptions &
StoreConfig & {

View File

@@ -163,7 +163,7 @@ export function Controller(
: [
prefixOrOptions.path || defaultPath,
prefixOrOptions.host,
{ scope: prefixOrOptions.scope },
{ scope: prefixOrOptions.scope, durable: prefixOrOptions.durable },
Array.isArray(prefixOrOptions.version)
? Array.from(new Set(prefixOrOptions.version))
: prefixOrOptions.version,

View File

@@ -41,6 +41,22 @@ export class HttpException extends Error {
super();
this.initMessage();
this.initName();
this.initCause();
}
public cause: Error | undefined;
/**
* Configures error chaining support
*
* See:
* - https://nodejs.org/en/blog/release/v16.9.0/#error-cause
* - https://github.com/microsoft/TypeScript/issues/45167
*/
public initCause() {
if (this.response instanceof Error) {
this.cause = this.response;
}
}
public initMessage() {

View File

@@ -50,8 +50,10 @@ export interface HttpServer<TRequest = any, TResponse = any> {
listen(port: number | string, hostname: string, callback?: () => void): any;
reply(response: any, body: any, statusCode?: number): any;
status(response: any, statusCode: number): any;
end(response: any, message?: string): any;
render(response: any, view: string, options: any): any;
redirect(response: any, statusCode: number, url: string): any;
isHeadersSent(response: any): boolean;
setHeader(response: any, name: string, value: string): any;
setErrorHandler?(handler: Function, prefix?: string): any;
setNotFoundHandler?(handler: Function, prefix?: string): any;
@@ -74,13 +76,9 @@ export interface HttpServer<TRequest = any, TResponse = any> {
close(): any;
getType(): string;
init?(): Promise<void>;
applyVersionFilter?(
applyVersionFilter(
handler: Function,
version: VersionValue,
versioningOptions: VersioningOptions,
): <TRequest extends Record<string, any> = any, TResponse = any>(
req: TRequest,
res: TResponse,
next: () => void,
) => any;
): (req: TRequest, res: TResponse, next: () => void) => Function;
}

View File

@@ -52,6 +52,13 @@ export interface ClassProvider<T = any> {
* @see [Use factory](https://docs.nestjs.com/fundamentals/custom-providers#factory-providers-usefactory)
*/
inject?: never;
/**
* Flags provider as durable. This flag can be used in combination with custom context id
* factory strategy to construct lazy DI subtrees.
*
* This flag can be used only in conjunction with scope = Scope.REQUEST.
*/
durable?: boolean;
}
/**
@@ -123,6 +130,13 @@ export interface FactoryProvider<T = any> {
* Optional enum defining lifetime of the provider that is returned by the Factory function.
*/
scope?: Scope;
/**
* Flags provider as durable. This flag can be used in combination with custom context id
* factory strategy to construct lazy DI subtrees.
*
* This flag can be used only in conjunction with scope = Scope.REQUEST.
*/
durable?: boolean;
}
/**

View File

@@ -72,7 +72,7 @@ export interface INestApplicationContext {
enableShutdownHooks(signals?: ShutdownSignal[] | string[]): this;
/**
* Initalizes the Nest application.
* Initializes the Nest application.
* Calls the Nest lifecycle events.
* It isn't mandatory to call this method directly.
*

View File

@@ -61,16 +61,6 @@ export interface INestApplication extends INestApplicationContext {
callback?: () => void,
): Promise<any>;
/**
* Starts the application (can be awaited).
* @deprecated use "listen" instead.
*
* @param {number|string} port
* @param {string} [hostname]
* @returns {Promise}
*/
listenAsync(port: number | string, hostname?: string): Promise<any>;
/**
* Returns the url the application is listening at, based on OS and IP version. Returns as an IP value either in IPv6 or IPv4
*
@@ -138,14 +128,6 @@ export interface INestApplication extends INestApplicationContext {
*/
startAllMicroservices(): Promise<this>;
/**
* Starts all connected microservices and can be awaited.
* @deprecated use "startAllMicroservices" instead.
*
* @returns {Promise}
*/
startAllMicroservicesAsync(): Promise<this>;
/**
* Registers exception filters as global filters (will be used within
* every HTTP route handler)

View File

@@ -18,14 +18,6 @@ export interface INestMicroservice extends INestApplicationContext {
*/
listen(): Promise<any>;
/**
* Starts the microservice (can be awaited).
* @deprecated use "listen" instead.
*
* @returns {Promise}
*/
listenAsync(): Promise<any>;
/**
* Register Ws Adapter which will be used inside Gateways.
* Use when you want to override default `socket.io` library.

View File

@@ -28,4 +28,11 @@ export interface ScopeOptions {
* Specifies the lifetime of an injected Provider or Controller.
*/
scope?: Scope;
/**
* Flags provider as durable. This flag can be used in combination with custom context id
* factory strategy to construct lazy DI subtrees.
*
* This flag can be used only in conjunction with scope = Scope.REQUEST.
*/
durable?: boolean;
}

View File

@@ -18,7 +18,7 @@ export type VersionValue =
export interface VersionOptions {
/**
* Specifies an optional API Version. When configured, methods
* withing the controller will only be routed if the request version
* within the controller will only be routed if the request version
* matches the specified value.
*
* Supported only by HTTP-based applications (does not apply to non-HTTP microservices).

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/common",
"version": "8.4.5",
"version": "9.0.1",
"description": "Nest - modern, fast, powerful node.js web framework (@common)",
"author": "Kamil Mysliwiec",
"homepage": "https://nestjs.com",
@@ -17,7 +17,6 @@
},
"license": "MIT",
"dependencies": {
"axios": "0.27.2",
"iterare": "1.2.1",
"tslib": "2.4.0",
"uuid": "8.3.2"

View File

@@ -0,0 +1,36 @@
import { FileValidator } from './file-validator.interface';
export type FileTypeValidatorOptions = {
fileType: string | RegExp;
};
/**
* Defines the built-in FileType File Validator. It validates incoming files mime-type
* matching a string or a regular expression. Note that this validator uses a naive strategy
* to check the mime-type and could be fooled if the client provided a file with renamed extension.
* (for instance, renaming a 'malicious.bat' to 'malicious.jpeg'). To handle such security issues
* with more reliability, consider checking against the file's [magic-numbers](https://en.wikipedia.org/wiki/Magic_number_%28programming%29)
*
* @see [File Validators](https://docs.nestjs.com/techniques/file-upload#validators)
*
* @publicApi
*/
export class FileTypeValidator extends FileValidator<FileTypeValidatorOptions> {
buildErrorMessage(): string {
return `Validation failed (expected type is ${this.validationOptions.fileType})`;
}
isValid(file: any): boolean {
if (!this.validationOptions) {
return true;
}
if (!file.mimetype) {
return false;
}
return Boolean(
(file.mimetype as string).match(this.validationOptions.fileType),
);
}
}

View File

@@ -0,0 +1,18 @@
/**
* Interface describing FileValidators, which can be added to a {@link ParseFilePipe}.
*/
export abstract class FileValidator<TValidationOptions = Record<string, any>> {
constructor(protected readonly validationOptions: TValidationOptions) {}
/**
* Indicates if this file should be considered valid, according to the options passed in the constructor.
* @param file the file from the request object
*/
abstract isValid(file?: any): boolean | Promise<boolean>;
/**
* Builds an error message in case the validation fails.
* @param file the file from the request object
*/
abstract buildErrorMessage(file: any): string;
}

View File

@@ -0,0 +1,6 @@
export * from './file-type.validator';
export * from './file-validator.interface';
export * from './max-file-size.validator';
export * from './parse-file-options.interface';
export * from './parse-file.pipe';
export * from './parse-file-pipe.builder';

View File

@@ -0,0 +1,26 @@
import { FileValidator } from './file-validator.interface';
export type MaxFileSizeValidatorOptions = {
maxSize: number;
};
/**
* Defines the built-in MaxSize File Validator
*
* @see [File Validators](https://docs.nestjs.com/techniques/file-upload#validators)
*
* @publicApi
*/
export class MaxFileSizeValidator extends FileValidator<MaxFileSizeValidatorOptions> {
buildErrorMessage(): string {
return `Validation failed (expected size is less than ${this.validationOptions.maxSize})`;
}
public isValid(file: any): boolean {
if (!this.validationOptions) {
return true;
}
return file.size < this.validationOptions.maxSize;
}
}

View File

@@ -0,0 +1,8 @@
import { ErrorHttpStatusCode } from '../../utils/http-error-by-code.util';
import { FileValidator } from './file-validator.interface';
export interface ParseFileOptions {
validators?: FileValidator[];
errorHttpStatusCode?: ErrorHttpStatusCode;
exceptionFactory?: (error: string) => any;
}

View File

@@ -0,0 +1,37 @@
import {
FileTypeValidator,
FileTypeValidatorOptions,
} from './file-type.validator';
import { FileValidator } from './file-validator.interface';
import {
MaxFileSizeValidator,
MaxFileSizeValidatorOptions,
} from './max-file-size.validator';
import { ParseFileOptions } from './parse-file-options.interface';
import { ParseFilePipe } from './parse-file.pipe';
export class ParseFilePipeBuilder {
private validators: FileValidator[] = [];
addMaxSizeValidator(options: MaxFileSizeValidatorOptions) {
this.validators.push(new MaxFileSizeValidator(options));
return this;
}
addFileTypeValidator(options: FileTypeValidatorOptions) {
this.validators.push(new FileTypeValidator(options));
return this;
}
build(
additionalOptions?: Omit<ParseFileOptions, 'validators'>,
): ParseFilePipe {
const parseFilePipe = new ParseFilePipe({
...additionalOptions,
validators: this.validators,
});
this.validators = [];
return parseFilePipe;
}
}

View File

@@ -0,0 +1,68 @@
import { Injectable, Optional } from '../../decorators/core';
import { HttpStatus } from '../../enums';
import { HttpErrorByCode } from '../../utils/http-error-by-code.util';
import { PipeTransform } from '../../interfaces/features/pipe-transform.interface';
import { ParseFileOptions } from './parse-file-options.interface';
import { FileValidator } from './file-validator.interface';
import { throws } from 'assert';
/**
* Defines the built-in ParseFile Pipe. This pipe can be used to validate incoming files
* with `@UploadedFile()` decorator. You can use either other specific built-in validators
* or provide one of your own, simply implementing it through {@link FileValidator}
* interface and adding it to ParseFilePipe's constructor.
*
* @see [Built-in Pipes](https://docs.nestjs.com/pipes#built-in-pipes)
*
* @publicApi
*/
@Injectable()
export class ParseFilePipe implements PipeTransform<any> {
protected exceptionFactory: (error: string) => any;
private readonly validators: FileValidator[];
constructor(@Optional() options: ParseFileOptions = {}) {
const {
exceptionFactory,
errorHttpStatusCode = HttpStatus.BAD_REQUEST,
validators = [],
} = options;
this.exceptionFactory =
exceptionFactory ||
(error => new HttpErrorByCode[errorHttpStatusCode](error));
this.validators = validators;
}
async transform(value: any): Promise<any> {
if (this.validators.length) {
await this.validate(value);
}
return value;
}
protected async validate(file: any): Promise<any> {
for (const validator of this.validators) {
await this.validateOrThrow(file, validator);
}
return file;
}
private async validateOrThrow(file: any, validator: FileValidator) {
const isValid = await validator.isValid(file);
if (!isValid) {
const errorMessage = validator.buildErrorMessage(file);
throw this.exceptionFactory(errorMessage);
}
}
/**
* @returns list of validators used in this pipe.
*/
getValidators() {
return this.validators;
}
}

View File

@@ -6,3 +6,4 @@ export * from './parse-float.pipe';
export * from './parse-enum.pipe';
export * from './parse-uuid.pipe';
export * from './validation.pipe';
export * from './file';

View File

@@ -1,4 +1,5 @@
import { iterate } from 'iterare';
import { types } from 'util';
import { Optional } from '../decorators';
import { Injectable } from '../decorators/core';
import { HttpStatus } from '../enums/http-status.enum';
@@ -190,12 +191,24 @@ export class ValidationPipe implements PipeTransform<any> {
return isNil(value) ? {} : value;
}
protected stripProtoKeys(value: Record<string, any>) {
protected stripProtoKeys(value: any) {
if (
value == null ||
typeof value !== 'object' ||
types.isTypedArray(value)
) {
return;
}
if (Array.isArray(value)) {
for (const v of value) {
this.stripProtoKeys(v);
}
return;
}
delete value.__proto__;
const keys = Object.keys(value);
iterate(keys)
.filter(key => isObject(value[key]) && value[key])
.forEach(key => this.stripProtoKeys(value[key]));
for (const key in value) {
this.stripProtoKeys(value[key]);
}
}
protected isPrimitive(value: unknown): boolean {

View File

@@ -188,7 +188,7 @@ export class ConsoleLogger implements LoggerService {
const contextMessage = context ? yellow(`[${context}] `) : '';
const timestampDiff = this.updateAndGetTimestampDiff();
const formattedLogLevel = logLevel.toUpperCase().padStart(7, ' ');
const formatedMessage = this.formatMessage(
const formattedMessage = this.formatMessage(
logLevel,
message,
pidMessage,
@@ -197,7 +197,7 @@ export class ConsoleLogger implements LoggerService {
timestampDiff,
);
process[writeStreamType ?? 'stdout'].write(formatedMessage);
process[writeStreamType ?? 'stdout'].write(formattedMessage);
});
}

View File

@@ -270,7 +270,7 @@ export class Logger implements LoggerService {
}
if (isObject(logger)) {
if (logger instanceof Logger && logger.constructor !== Logger) {
const errorMessage = `Using the "extends Logger" instruction is not allowed in Nest v8. Please, use "extends ConsoleLogger" instead.`;
const errorMessage = `Using the "extends Logger" instruction is not allowed in Nest v9. Please, use "extends ConsoleLogger" instead.`;
this.staticInstanceRef.error(errorMessage);
throw new Error(errorMessage);
}

View File

@@ -129,4 +129,15 @@ describe('HttpException', () => {
});
});
});
describe('initCause', () => {
it('configures a cause when message is an instance of error', () => {
const message = new Error('Some Error');
const error = new HttpException(message, 400);
expect(`${error}`).to.be.eql(`HttpException: ${message.message}`);
const { cause } = error;
expect(cause).to.be.eql(message);
});
});
});

View File

@@ -4,14 +4,14 @@ import { StreamableFile } from '../../file-stream';
describe('StreamableFile', () => {
describe('when input is a readable stream', () => {
it('should assing it to a stream class property', () => {
it('should assign it to a stream class property', () => {
const stream = new Readable();
const streamableFile = new StreamableFile(stream);
expect(streamableFile.getStream()).to.equal(stream);
});
});
describe('when input is an object with "pipe" method', () => {
it('should assing it to a stream class property', () => {
it('should assign it to a stream class property', () => {
const stream = { pipe: () => {} };
const streamableFile = new StreamableFile(stream as any);
expect(streamableFile.getStream()).to.equal(stream);

View File

@@ -0,0 +1,89 @@
import { FileTypeValidator } from '../../../pipes';
import { expect } from 'chai';
describe('FileTypeValidator', () => {
describe('isValid', () => {
it('should return true when the file mimetype is the same as the specified', () => {
const fileTypeValidator = new FileTypeValidator({
fileType: 'image/jpeg',
});
const requestFile = {
mimetype: 'image/jpeg',
};
expect(fileTypeValidator.isValid(requestFile)).to.equal(true);
});
it('should return true when the file mimetype ends with the specified option type', () => {
const fileTypeValidator = new FileTypeValidator({
fileType: 'jpeg',
});
const requestFile = {
mimetype: 'image/jpeg',
};
expect(fileTypeValidator.isValid(requestFile)).to.equal(true);
});
it('should return true when the file mimetype matches the specified regexp', () => {
const fileTypeValidator = new FileTypeValidator({
fileType: /word/,
});
const requestFile = {
mimetype: 'application/msword',
};
expect(fileTypeValidator.isValid(requestFile)).to.equal(true);
});
it('should return false when the file mimetype is different from the specified', () => {
const fileTypeValidator = new FileTypeValidator({
fileType: 'image/jpeg',
});
const requestFile = {
mimetype: 'image/png',
};
expect(fileTypeValidator.isValid(requestFile)).to.equal(false);
});
it('should return false when the file mimetype does not match the provided regexp', () => {
const fileTypeValidator = new FileTypeValidator({
fileType: /mp4/,
});
const requestFile = {
mimetype: 'image/png',
};
expect(fileTypeValidator.isValid(requestFile)).to.equal(false);
});
it('should return false when the file mimetype was not provided', () => {
const fileTypeValidator = new FileTypeValidator({
fileType: 'image/jpeg',
});
const requestFile = {};
expect(fileTypeValidator.isValid(requestFile)).to.equal(false);
});
});
describe('buildErrorMessage', () => {
it('should return a string with the format "Validation failed (expected type is #fileType)"', () => {
const fileType = 'image/jpeg';
const fileTypeValidator = new FileTypeValidator({
fileType,
});
expect(fileTypeValidator.buildErrorMessage()).to.equal(
`Validation failed (expected type is ${fileType})`,
);
});
});
});

View File

@@ -0,0 +1,56 @@
import { expect } from 'chai';
import { MaxFileSizeValidator } from '../../../pipes';
describe('MaxFileSizeValidator', () => {
const oneKb = 1024;
describe('isValid', () => {
it('should return true when the file size is less than the maximum size', () => {
const maxFileSizeValidator = new MaxFileSizeValidator({
maxSize: oneKb,
});
const requestFile = {
size: 100,
};
expect(maxFileSizeValidator.isValid(requestFile)).to.equal(true);
});
it('should return false when the file size is greater than the maximum size', () => {
const maxFileSizeValidator = new MaxFileSizeValidator({
maxSize: oneKb,
});
const requestFile = {
size: oneKb + 1,
};
expect(maxFileSizeValidator.isValid(requestFile)).to.equal(false);
});
it('should return false when the file size is equal to the maximum size', () => {
const maxFileSizeValidator = new MaxFileSizeValidator({
maxSize: oneKb,
});
const requestFile = {
size: oneKb,
};
expect(maxFileSizeValidator.isValid(requestFile)).to.equal(false);
});
});
describe('buildErrorMessage', () => {
it('should return a string with the format "Validation failed (expected size is less than #maxSize")', () => {
const maxFileSizeValidator = new MaxFileSizeValidator({
maxSize: oneKb,
});
expect(maxFileSizeValidator.buildErrorMessage()).to.equal(
`Validation failed (expected size is less than ${oneKb})`,
);
});
});
});

View File

@@ -0,0 +1,77 @@
import { expect } from 'chai';
import {
FileTypeValidator,
MaxFileSizeValidator,
ParseFilePipeBuilder,
} from '../../../pipes';
describe('ParseFilePipeBuilder', () => {
let parseFilePipeBuilder: ParseFilePipeBuilder;
beforeEach(() => {
parseFilePipeBuilder = new ParseFilePipeBuilder();
});
describe('build', () => {
describe('when no validator was passed', () => {
it('should return a ParseFilePipe with no validators', () => {
const parseFilePipe = parseFilePipeBuilder.build();
expect(parseFilePipe.getValidators()).to.be.empty;
});
});
describe('when addMaxSizeValidator was chained', () => {
it('should return a ParseFilePipe with MaxSizeValidator and given options', () => {
const options = {
maxSize: 1000,
};
const parseFilePipe = parseFilePipeBuilder
.addMaxSizeValidator(options)
.build();
expect(parseFilePipe.getValidators()).to.deep.include(
new MaxFileSizeValidator(options),
);
});
});
describe('when addFileTypeValidator was chained', () => {
it('should return a ParseFilePipe with FileTypeValidator and given options', () => {
const options = {
fileType: 'image/jpeg',
};
const parseFilePipe = parseFilePipeBuilder
.addFileTypeValidator(options)
.build();
expect(parseFilePipe.getValidators()).to.deep.include(
new FileTypeValidator(options),
);
});
});
describe('when it is called twice with different validators', () => {
it('should not reuse validators', () => {
const maxSizeValidatorOptions = {
maxSize: 1000,
};
const pipeWithMaxSizeValidator = parseFilePipeBuilder
.addMaxSizeValidator(maxSizeValidatorOptions)
.build();
const fileTypeValidatorOptions = {
fileType: 'image/jpeg',
};
const pipeWithFileTypeValidator = parseFilePipeBuilder
.addFileTypeValidator(fileTypeValidatorOptions)
.build();
expect(pipeWithFileTypeValidator.getValidators()).not.to.deep.equal(
pipeWithMaxSizeValidator.getValidators(),
);
});
});
});
});

View File

@@ -0,0 +1,120 @@
import { HttpStatus } from '../../../enums';
import { BadRequestException, ConflictException } from '../../../exceptions';
import { FileValidator, ParseFilePipe } from '../../../pipes';
import { expect } from 'chai';
class AlwaysValidValidator extends FileValidator {
isValid(): boolean {
return true;
}
buildErrorMessage(): string {
return '';
}
}
const customErrorMessage = 'Error!';
class AlwaysInvalidValidator extends FileValidator {
isValid(): boolean {
return false;
}
buildErrorMessage(): string {
return customErrorMessage;
}
}
describe('ParseFilePipe', () => {
let parseFilePipe: ParseFilePipe;
describe('transform', () => {
describe('when there are no validators (explicit)', () => {
beforeEach(() => {
parseFilePipe = new ParseFilePipe({
validators: [],
});
});
it('should return the file object', async () => {
const requestFile = {
path: 'some-path',
};
await expect(parseFilePipe.transform(requestFile)).to.eventually.eql(
requestFile,
);
});
});
describe('when there are no validators (by default constructor)', () => {
beforeEach(() => {
parseFilePipe = new ParseFilePipe();
});
it('should return the file object', async () => {
const requestFile = {
path: 'some-path',
};
await expect(parseFilePipe.transform(requestFile)).to.eventually.eql(
requestFile,
);
});
});
describe('when all the validators validate the file', () => {
beforeEach(() => {
parseFilePipe = new ParseFilePipe({
validators: [new AlwaysValidValidator({})],
});
});
it('should return the file object', async () => {
const requestFile = {
path: 'some-path',
};
await expect(parseFilePipe.transform(requestFile)).to.eventually.eql(
requestFile,
);
});
});
describe('when some validator invalidates the file', () => {
describe('and the pipe has the default error', () => {
beforeEach(() => {
parseFilePipe = new ParseFilePipe({
validators: [new AlwaysInvalidValidator({})],
});
});
it('should throw a BadRequestException', async () => {
const requestFile = {
path: 'some-path',
};
await expect(parseFilePipe.transform(requestFile)).to.be.rejectedWith(
BadRequestException,
);
});
});
describe('and the pipe has a custom error code', () => {
beforeEach(() => {
parseFilePipe = new ParseFilePipe({
validators: [new AlwaysInvalidValidator({})],
errorHttpStatusCode: HttpStatus.CONFLICT,
});
});
it('should throw this custom Error', async () => {
const requestFile = {
path: 'some-path',
};
await expect(parseFilePipe.transform(requestFile)).to.be.rejectedWith(
ConflictException,
);
});
});
});
});
});

View File

@@ -0,0 +1,3 @@
{
"extends": "../../../tsconfig.spec.json"
}

View File

@@ -5,6 +5,7 @@ const colorIfAllowed = (colorFn: ColorTextFn) => (text: string) =>
isColorAllowed() ? colorFn(text) : text;
export const clc = {
bold: colorIfAllowed((text: string) => `\x1B[1m${text}\x1B[0m`),
green: colorIfAllowed((text: string) => `\x1B[32m${text}\x1B[39m`),
yellow: colorIfAllowed((text: string) => `\x1B[33m${text}\x1B[39m`),
red: colorIfAllowed((text: string) => `\x1B[31m${text}\x1B[39m`),

View File

@@ -31,12 +31,6 @@ export const addLeadingSlash = (path?: string): string =>
: path
: '';
/**
* Deprecated. Use the "addLeadingSlash" function instead.
* @deprecated
*/
export const validatePath = addLeadingSlash;
export const normalizePath = (path?: string): string =>
path
? path.startsWith('/')

View File

@@ -65,19 +65,20 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td>
<a href="https://nx.dev" target="_blank"><img src="https://nestjs.com/img/nx-logo.png" height="45" valign="middle" /></a></td>
<td>
<a href="https://valor-software.com/" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="170" valign="middle" /></a></td>
<a href="https://valor-software.com/" target="_blank"><img src="https://docs.nestjs.com/assets/sponsors/valor-software.png" width="170" valign="middle" /></a></td><td>
<a href="https://amplication.com/" target="_blank"><img src="https://nestjs.com/img/amplication-logo.svg" width="190" valign="middle" /></a></td>
</tr></table>
#### Gold Sponsors
<table style="text-align:center;"><tr><td>
<a href="https://careers.labster.com/departments/platform" target="_blank"><img src="https://nestjs.com/img/labster-logo.png" width="170" valign="middle" /></a></td><td>
<a href="https://weld.app/" target="_blank"><img src="https://nestjs.com/img/weld-logo.svg" width="140" valign="middle" /></a></td>
<td>
<a href="https://intrinsic.ventures/" target="_blank"><img src="https://nestjs.com/img/intrinisic-logo.png" width="210" valign="middle" /></a></td>
<td>
<a href="https://jetbrains.com/" target="_blank"><img src="https://nestjs.com/img/jetbrains-logo.svg" width="110" valign="middle" /></a></td><td>
<a href="https://snyk.co/nestjs" target="_blank"><img src="https://nestjs.com/img/snyk-logo-black.png" width="185" valign="middle" /></a></td></</tr></table>
<a href="https://snyk.co/nestjs" target="_blank"><img src="https://nestjs.com/img/snyk-logo-black.png" width="185" valign="middle" /></a></td><td>
<a href="https://fuseautotech.com/" target="_blank"><img src="https://nestjs.com/img/fuse-logo.svg" width="105" valign="middle" /></a></td></</tr></table>
#### Silver Sponsors
@@ -127,6 +128,8 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td align="center" valign="middle"><a href="https://polygon-software.ch/" target="_blank"><img src="https://nestjs.com/img/polygon-logo.svg" width="120" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://mobilereality.pl/" target="_blank"><img src="https://nestjs.com/img/mobile-reality-logo.png" width="45" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://boringowl.io/" target="_blank"><img src="https://nestjs.com/img/boringowl-logo.svg" width="120" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://www.mobilefactory.jp/" target="_blank"><img src="https://nestjs.com/img/mobilefactory-logo.png" width="100" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://db.nordbot.app/" target="_blank"><img src="https://nestjs.com/img/nord-logo.png" width="50" valign="middle" /></a></td>
</tr></table>
## Backers

View File

@@ -1,5 +1,5 @@
import { HttpServer, RequestMethod } from '@nestjs/common';
import { RequestHandler } from '@nestjs/common/interfaces';
import { HttpServer, RequestMethod, VersioningOptions } from '@nestjs/common';
import { RequestHandler, VersionValue } from '@nestjs/common/interfaces';
import {
CorsOptions,
CorsOptionsDelegate,
@@ -105,10 +105,12 @@ export abstract class AbstractHttpAdapter<
abstract getRequestUrl(request);
abstract status(response, statusCode: number);
abstract reply(response, body: any, statusCode?: number);
abstract end(response, message?: string);
abstract render(response, view: string, options: any);
abstract redirect(response, statusCode: number, url: string);
abstract setErrorHandler(handler: Function, prefix?: string);
abstract setNotFoundHandler(handler: Function, prefix?: string);
abstract isHeadersSent(response);
abstract setHeader(response, name: string, value: string);
abstract registerParserMiddleware(prefix?: string, rawBody?: boolean);
abstract enableCors(
@@ -121,4 +123,9 @@ export abstract class AbstractHttpAdapter<
| ((path: string, callback: Function) => any)
| Promise<(path: string, callback: Function) => any>;
abstract getType(): string;
abstract applyVersionFilter(
handler: Function,
version: VersionValue,
versioningOptions: VersioningOptions,
): (req: TRequest, res: TResponse, next: () => void) => Function;
}

View File

@@ -121,11 +121,11 @@ export const USING_INVALID_CLASS_AS_A_MODULE_MESSAGE = (
metatypeUsedAsAModule: Type | ForwardReference,
scope: any[],
) => {
const metatypeName = getInstanceName(metatypeUsedAsAModule) || 'found';
const metatypeNameQuote =
`"${getInstanceName(metatypeUsedAsAModule)}"` || 'that class';
// TODO(v9): Edit the message below:
return `In the next major version, Nest will not allow classes annotated with @Injectable(), @Catch(), and @Controller() decorators to appear in the "imports" array of a module.
Please remove "${metatypeName}" (including forwarded occurrences, if any) from all of the "imports" arrays.
return `Classes annotated with @Injectable(), @Catch(), and @Controller() decorators must not appear in the "imports" array of a module.
Please remove ${metatypeNameQuote} (including forwarded occurrences, if any) from all of the "imports" arrays.
Scope [${stringifyScope(scope)}]
`;

View File

@@ -38,7 +38,12 @@ export class BaseExceptionFilter<T = any> implements ExceptionFilter<T> {
message: res,
};
applicationRef.reply(host.getArgByIndex(1), message, exception.getStatus());
const response = host.getArgByIndex(1);
if (!applicationRef.isHeadersSent(response)) {
applicationRef.reply(response, message, exception.getStatus());
} else {
applicationRef.end(response);
}
}
public handleUnknownError(
@@ -55,7 +60,14 @@ export class BaseExceptionFilter<T = any> implements ExceptionFilter<T> {
statusCode: HttpStatus.INTERNAL_SERVER_ERROR,
message: MESSAGES.UNKNOWN_EXCEPTION_MESSAGE,
};
applicationRef.reply(host.getArgByIndex(1), body, body.statusCode);
const response = host.getArgByIndex(1);
if (!applicationRef.isHeadersSent(response)) {
applicationRef.reply(response, body, body.statusCode);
} else {
applicationRef.end(response);
}
if (this.isExceptionObject(exception)) {
return BaseExceptionFilter.logger.error(
exception.message,

View File

@@ -1,4 +1,4 @@
import { ContextId } from '../injector/instance-wrapper';
import { ContextId, HostComponentInfo } from '../injector/instance-wrapper';
import { REQUEST_CONTEXT_ID } from '../router/request/request-constants';
export function createContextId(): ContextId {
@@ -13,7 +13,23 @@ export function createContextId(): ContextId {
return { id: Math.random() };
}
export interface ContextIdStrategy<T = any> {
/**
* Allows to attach a parent context id to the existing child context id.
* This lets you construct durable DI sub-trees that can be shared between contexts.
* @param contextId auto-generated child context id
* @param request request object
* @returns a context id resolver function
*/
attach(
contextId: ContextId,
request: T,
): ((info: HostComponentInfo) => ContextId) | undefined;
}
export class ContextIdFactory {
private static strategy?: ContextIdStrategy;
/**
* Generates a context identifier based on the request object.
*/
@@ -27,16 +43,33 @@ export class ContextIdFactory {
*/
public static getByRequest<T extends Record<any, any> = any>(
request: T,
propsToInspect: string[] = ['raw'],
): ContextId {
if (!request) {
return createContextId();
return ContextIdFactory.create();
}
if (request[REQUEST_CONTEXT_ID as any]) {
return request[REQUEST_CONTEXT_ID as any];
}
if (request.raw && request.raw[REQUEST_CONTEXT_ID]) {
return request.raw[REQUEST_CONTEXT_ID];
for (const key of propsToInspect) {
if (request[key]?.[REQUEST_CONTEXT_ID]) {
return request[key][REQUEST_CONTEXT_ID];
}
}
return createContextId();
if (!this.strategy) {
return ContextIdFactory.create();
}
const contextId = createContextId();
contextId.getParent = this.strategy.attach(contextId, request);
return contextId;
}
/**
* Registers a custom context id strategy that lets you attach
* a parent context id to the existing context id object.
* @param strategy strategy instance
*/
public static apply(strategy: ContextIdStrategy) {
this.strategy = strategy;
}
}

View File

@@ -0,0 +1,7 @@
import { SCOPE_OPTIONS_METADATA } from '@nestjs/common/constants';
import { Type } from '@nestjs/common/interfaces/type.interface';
export function isDurable(provider: Type<unknown>): boolean | undefined {
const metadata = Reflect.getMetadata(SCOPE_OPTIONS_METADATA, provider);
return metadata && metadata.durable;
}

View File

@@ -18,5 +18,6 @@ export * from './middleware';
export * from './nest-application';
export * from './nest-application-context';
export { NestFactory } from './nest-factory';
export * from './repl';
export * from './router';
export * from './services';

View File

@@ -1,6 +1,6 @@
export * from './container';
export * from './inquirer';
export { ContextId } from './instance-wrapper';
export { ContextId, HostComponentInfo } from './instance-wrapper';
export * from './lazy-module-loader';
export * from './module-ref';
export * from './modules-container';

View File

@@ -106,9 +106,16 @@ export class Injector {
inquirer?: InstanceWrapper,
) {
const inquirerId = this.getInquirerId(inquirer);
const instanceHost = wrapper.getInstanceByContextId(contextId, inquirerId);
const instanceHost = wrapper.getInstanceByContextId(
this.getContextId(contextId, wrapper),
inquirerId,
);
if (instanceHost.isPending) {
return instanceHost.donePromise;
return instanceHost.donePromise.then((err?: unknown) => {
if (err) {
throw err;
}
});
}
const done = this.applyDoneHook(instanceHost);
const token = wrapper.token || wrapper.name;
@@ -121,34 +128,39 @@ export class Injector {
if (instanceHost.isResolved) {
return done();
}
const callback = async (instances: unknown[]) => {
const properties = await this.resolveProperties(
try {
const callback = async (instances: unknown[]) => {
const properties = await this.resolveProperties(
wrapper,
moduleRef,
inject as InjectionToken[],
contextId,
wrapper,
inquirer,
);
const instance = await this.instantiateClass(
instances,
wrapper,
targetWrapper,
contextId,
inquirer,
);
this.applyProperties(instance, properties);
done();
};
await this.resolveConstructorParams<T>(
wrapper,
moduleRef,
inject as InjectionToken[],
callback,
contextId,
wrapper,
inquirer,
);
const instance = await this.instantiateClass(
instances,
wrapper,
targetWrapper,
contextId,
inquirer,
);
this.applyProperties(instance, properties);
done();
};
await this.resolveConstructorParams<T>(
wrapper,
moduleRef,
inject as InjectionToken[],
callback,
contextId,
wrapper,
inquirer,
);
} catch (err) {
done(err);
throw err;
}
}
public async loadMiddleware(
@@ -222,9 +234,11 @@ export class Injector {
await this.loadEnhancersPerContext(wrapper, contextId, wrapper);
}
public applyDoneHook<T>(wrapper: InstancePerContext<T>): () => void {
let done: () => void;
wrapper.donePromise = new Promise<void>((resolve, reject) => {
public applyDoneHook<T>(
wrapper: InstancePerContext<T>,
): (err?: unknown) => void {
let done: (err?: unknown) => void;
wrapper.donePromise = new Promise<unknown>((resolve, reject) => {
done = resolve;
});
wrapper.isPending = true;
@@ -278,7 +292,7 @@ export class Injector {
index,
);
const instanceHost = paramWrapper.getInstanceByContextId(
contextId,
this.getContextId(contextId, paramWrapper),
inquirerId,
);
if (!instanceHost.isResolved && !paramWrapper.forwardRef) {
@@ -434,7 +448,7 @@ export class Injector {
): Promise<InstanceWrapper> {
const inquirerId = this.getInquirerId(inquirer);
const instanceHost = instanceWrapper.getInstanceByContextId(
contextId,
this.getContextId(contextId, instanceWrapper),
inquirerId,
);
if (!instanceHost.isResolved && !instanceWrapper.forwardRef) {
@@ -463,7 +477,7 @@ export class Injector {
}
if (instanceWrapper.async) {
const host = instanceWrapper.getInstanceByContextId(
contextId,
this.getContextId(contextId, instanceWrapper),
inquirerId,
);
host.instance = await host.instance;
@@ -584,7 +598,7 @@ export class Injector {
const inquirerId = this.getInquirerId(inquirer);
const instanceHost = instanceWrapperRef.getInstanceByContextId(
contextId,
this.getContextId(contextId, instanceWrapperRef),
inquirerId,
);
if (!instanceHost.isResolved && !instanceWrapperRef.forwardRef) {
@@ -640,7 +654,7 @@ export class Injector {
}
const inquirerId = this.getInquirerId(inquirer);
const instanceHost = paramWrapper.getInstanceByContextId(
contextId,
this.getContextId(contextId, paramWrapper),
inquirerId,
);
return instanceHost.instance;
@@ -692,7 +706,7 @@ export class Injector {
const { metatype, inject } = wrapper;
const inquirerId = this.getInquirerId(inquirer);
const instanceHost = targetMetatype.getInstanceByContextId(
contextId,
this.getContextId(contextId, targetMetatype),
inquirerId,
);
const isInContext =
@@ -732,7 +746,10 @@ export class Injector {
await this.loadInstance(wrapper, collection, moduleRef, ctx, wrapper);
await this.loadEnhancersPerContext(wrapper, ctx, wrapper);
const host = wrapper.getInstanceByContextId(ctx, wrapper.id);
const host = wrapper.getInstanceByContextId(
this.getContextId(ctx, wrapper),
wrapper.id,
);
return host && (host.instance as T);
}
@@ -773,7 +790,11 @@ export class Injector {
);
const inquirerId = this.getInquirerId(inquirer);
return hosts.map(
item => item.getInstanceByContextId(contextId, inquirerId).instance,
item =>
item.getInstanceByContextId(
this.getContextId(contextId, item),
inquirerId,
).instance,
);
}
@@ -797,7 +818,10 @@ export class Injector {
return dependenciesHosts.map(({ key, host }) => ({
key,
name: key,
instance: host.getInstanceByContextId(contextId, inquirerId).instance,
instance: host.getInstanceByContextId(
this.getContextId(contextId, host),
inquirerId,
).instance,
}));
}
@@ -899,4 +923,16 @@ export class Injector {
private isDebugMode(): boolean {
return !!process.env.NEST_DEBUG;
}
private getContextId(
contextId: ContextId,
instanceWrapper: InstanceWrapper,
): ContextId {
return contextId.getParent
? contextId.getParent({
token: instanceWrapper.token,
isTreeDurable: instanceWrapper.isDependencyTreeDurable(),
})
: contextId;
}
}

View File

@@ -1,11 +1,16 @@
import { Provider, Scope, Type } from '@nestjs/common';
import { Logger, LoggerService, Provider, Scope, Type } from '@nestjs/common';
import {
ClassProvider,
FactoryProvider,
ValueProvider,
} from '@nestjs/common/interfaces';
import { clc } from '@nestjs/common/utils/cli-colors.util';
import { randomStringGenerator } from '@nestjs/common/utils/random-string-generator.util';
import { isNil, isUndefined } from '@nestjs/common/utils/shared.utils';
import {
isNil,
isString,
isUndefined,
} from '@nestjs/common/utils/shared.utils';
import { iterate } from 'iterare';
import { STATIC_CONTEXT } from './constants';
import { InstanceToken, Module } from './module';
@@ -13,16 +18,29 @@ import { InstanceToken, Module } from './module';
export const INSTANCE_METADATA_SYMBOL = Symbol.for('instance_metadata:cache');
export const INSTANCE_ID_SYMBOL = Symbol.for('instance_metadata:id');
export interface HostComponentInfo {
/**
* Injection token (or class reference)
*/
token: InstanceToken;
/**
* Flag that indicates whether DI subtree is durable
*/
isTreeDurable: boolean;
}
export interface ContextId {
readonly id: number;
getParent?(info: HostComponentInfo): ContextId;
}
export interface InstancePerContext<T> {
instance: T;
isResolved?: boolean;
isPending?: boolean;
donePromise?: Promise<void>;
donePromise?: Promise<unknown>;
}
export interface PropertyMetadata {
key: symbol | string;
wrapper: InstanceWrapper;
@@ -45,6 +63,9 @@ export class InstanceWrapper<T = any> {
public metatype: Type<T> | Function;
public inject?: FactoryProvider['inject'];
public forwardRef?: boolean;
public durable?: boolean;
private static logger: LoggerService = new Logger(InstanceWrapper.name);
private readonly values = new WeakMap<ContextId, InstancePerContext<T>>();
private readonly [INSTANCE_METADATA_SYMBOL]: InstanceMetadataStore = {};
@@ -53,6 +74,7 @@ export class InstanceWrapper<T = any> {
| Map<string, WeakMap<ContextId, InstancePerContext<T>>>
| undefined;
private isTreeStatic: boolean | undefined;
private isTreeDurable: boolean | undefined;
constructor(
metadata: Partial<InstanceWrapper<T>> & Partial<InstancePerContext<T>> = {},
@@ -171,14 +193,40 @@ export class InstanceWrapper<T = any> {
return this[INSTANCE_METADATA_SYMBOL].enhancers;
}
public isDependencyTreeStatic(lookupRegistry: string[] = []): boolean {
if (!isUndefined(this.isTreeStatic)) {
return this.isTreeStatic;
public isDependencyTreeDurable(lookupRegistry: string[] = []): boolean {
if (!isUndefined(this.isTreeDurable)) {
return this.isTreeDurable;
}
if (this.scope === Scope.REQUEST) {
this.isTreeStatic = false;
return this.isTreeStatic;
if (this.durable === true) {
this.isTreeDurable = true;
this.printIntrospectedAsDurable();
return this.isTreeDurable;
}
const isStatic = this.isDependencyTreeStatic();
if (isStatic) {
return false;
}
const isTreeNonDurable = this.introspectDepsAttribute(
(collection, registry) =>
collection.every(
(item: InstanceWrapper) => !item.isDependencyTreeDurable(registry),
),
lookupRegistry,
);
this.isTreeDurable = !isTreeNonDurable && this.durable !== false;
if (this.isTreeDurable) {
this.printIntrospectedAsDurable();
}
return this.isTreeDurable;
}
public introspectDepsAttribute(
callback: (
collection: InstanceWrapper[],
lookupRegistry: string[],
) => boolean,
lookupRegistry: string[] = [],
): boolean {
if (lookupRegistry.includes(this[INSTANCE_ID_SYMBOL])) {
return true;
}
@@ -186,23 +234,41 @@ export class InstanceWrapper<T = any> {
const { dependencies, properties, enhancers } =
this[INSTANCE_METADATA_SYMBOL];
let isStatic =
(dependencies &&
this.isWrapperListStatic(dependencies, lookupRegistry)) ||
!dependencies;
if (!isStatic || !(properties || enhancers)) {
this.isTreeStatic = isStatic;
return this.isTreeStatic;
let introspectionResult =
(dependencies && callback(dependencies, lookupRegistry)) || !dependencies;
if (!introspectionResult || !(properties || enhancers)) {
return introspectionResult;
}
const propertiesHosts = (properties || []).map(item => item.wrapper);
isStatic =
isStatic && this.isWrapperListStatic(propertiesHosts, lookupRegistry);
if (!isStatic || !enhancers) {
this.isTreeStatic = isStatic;
introspectionResult =
introspectionResult && callback(propertiesHosts, lookupRegistry);
if (!introspectionResult || !enhancers) {
return introspectionResult;
}
return callback(enhancers, lookupRegistry);
}
public isDependencyTreeStatic(lookupRegistry: string[] = []): boolean {
if (!isUndefined(this.isTreeStatic)) {
return this.isTreeStatic;
}
this.isTreeStatic = this.isWrapperListStatic(enhancers, lookupRegistry);
if (this.scope === Scope.REQUEST) {
this.isTreeStatic = false;
this.printIntrospectedAsRequestScoped();
return this.isTreeStatic;
}
this.isTreeStatic = this.introspectDepsAttribute(
(collection, registry) =>
collection.every((item: InstanceWrapper) =>
item.isDependencyTreeStatic(registry),
),
lookupRegistry,
);
if (!this.isTreeStatic) {
this.printIntrospectedAsRequestScoped();
}
return this.isTreeStatic;
}
@@ -341,15 +407,6 @@ export class InstanceWrapper<T = any> {
return isNil(this.inject) && this.metatype && this.metatype.prototype;
}
private isWrapperListStatic(
tree: InstanceWrapper[],
lookupRegistry: string[],
): boolean {
return tree.every((item: InstanceWrapper) =>
item.isDependencyTreeStatic(lookupRegistry),
);
}
private initialize(
metadata: Partial<InstanceWrapper<T>> & Partial<InstancePerContext<T>>,
) {
@@ -362,4 +419,34 @@ export class InstanceWrapper<T = any> {
});
this.scope === Scope.TRANSIENT && (this.transientMap = new Map());
}
private printIntrospectedAsRequestScoped() {
if (!this.isDebugMode() || this.name === 'REQUEST') {
return;
}
if (isString(this.name)) {
InstanceWrapper.logger.log(
`${clc.cyanBright(this.name)}${clc.green(
' introspected as ',
)}${clc.magentaBright('request-scoped')}`,
);
}
}
private printIntrospectedAsDurable() {
if (!this.isDebugMode()) {
return;
}
if (isString(this.name)) {
InstanceWrapper.logger.log(
`${clc.cyanBright(this.name)}${clc.green(
' introspected as ',
)}${clc.magentaBright('durable')}`,
);
}
}
private isDebugMode(): boolean {
return !!process.env.NEST_DEBUG;
}
}

View File

@@ -26,7 +26,7 @@ export class LazyModuleLoader {
);
if (moduleInstances.length === 0) {
// The module has been loaded already. In this case, we must
// retrieve a module reference from the exising container.
// retrieve a module reference from the existing container.
const { token } = await this.moduleCompiler.compile(
moduleClassOrDynamicDefinition,
);

View File

@@ -2,6 +2,7 @@ import { IntrospectionResult, Scope, Type } from '@nestjs/common';
import { InvalidClassScopeException } from '../errors/exceptions/invalid-class-scope.exception';
import { UnknownElementException } from '../errors/exceptions/unknown-element.exception';
import { getClassScope } from '../helpers/get-class-scope';
import { isDurable } from '../helpers/is-durable';
import { NestContainer } from './container';
import { Injector } from './injector';
import { InstanceLinksHost } from './instance-links-host';
@@ -107,6 +108,7 @@ export abstract class ModuleRef {
metatype: type,
isResolved: false,
scope: getClassScope(type),
durable: isDurable(type),
host: moduleRef,
});
return new Promise<T>(async (resolve, reject) => {

View File

@@ -26,6 +26,7 @@ import { RuntimeException } from '../errors/exceptions/runtime.exception';
import { UnknownExportException } from '../errors/exceptions/unknown-export.exception';
import { createContextId } from '../helpers/context-id-factory';
import { getClassScope } from '../helpers/get-class-scope';
import { isDurable } from '../helpers/is-durable';
import { CONTROLLER_ID_KEY } from './constants';
import { NestContainer } from './container';
import { InstanceWrapper } from './instance-wrapper';
@@ -209,6 +210,7 @@ export class Module {
instance: null,
isResolved: false,
scope: getClassScope(injectable),
durable: isDurable(injectable),
host: this,
});
this._injectables.set(injectable, instanceWrapper);
@@ -233,6 +235,7 @@ export class Module {
instance: null,
isResolved: false,
scope: getClassScope(provider),
durable: isDurable(provider),
host: this,
}),
);
@@ -301,12 +304,15 @@ export class Module {
provider: ClassProvider,
collection: Map<InstanceToken, InstanceWrapper>,
) {
let { scope } = provider;
let { scope, durable } = provider;
const { useClass } = provider;
if (isUndefined(scope)) {
scope = getClassScope(useClass);
}
if (isUndefined(durable)) {
durable = isDurable(useClass);
}
collection.set(
provider.provide,
new InstanceWrapper({
@@ -316,6 +322,7 @@ export class Module {
instance: null,
isResolved: false,
scope,
durable,
host: this,
}),
);
@@ -348,6 +355,7 @@ export class Module {
useFactory: factory,
inject,
scope,
durable,
provide: providerToken,
} = provider;
@@ -361,6 +369,7 @@ export class Module {
isResolved: false,
inject: inject || [],
scope,
durable,
host: this,
}),
);
@@ -445,6 +454,7 @@ export class Module {
instance: null,
isResolved: false,
scope: getClassScope(controller),
durable: isDurable(controller),
host: this,
}),
);

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