Compare commits

...

106 Commits

Author SHA1 Message Date
Kamil Myśliwiec
e5612e0197 chore: merge 10.0.0 2023-06-12 10:58:30 +02:00
Kamil Myśliwiec
6c54448bf7 fix(fastify): validate middleware paths 2023-06-12 10:51:02 +02:00
Kamil Myśliwiec
5bba7e9d26 chore(@nestjs) publish v9.4.2 release 2023-05-23 10:42:48 +02:00
Kamil Mysliwiec
9004a4a624 Merge pull request #11642 from ryoctrl/nack_when_no_matching_handler
fix(microservices): to nack when there is no matching handler
2023-05-23 10:40:34 +02:00
Kamil Mysliwiec
4f45a7019f Update packages/microservices/constants.ts 2023-05-23 10:33:48 +02:00
Kamil Mysliwiec
4bb43f0c47 Merge pull request #11437 from julien-sarazin/fix/issue-11429
fix(microservices): grpc-server handle async interceptors
2023-05-23 10:31:10 +02:00
Kamil Mysliwiec
fe2cd7ffb0 Update Readme.md 2023-05-22 09:15:06 +02:00
Kamil Mysliwiec
3be74404d2 Merge pull request #11644 from nestjs/dependabot/npm_and_yarn/mongoose-7.2.0
chore(deps-dev): bump mongoose from 7.1.1 to 7.2.0
2023-05-22 08:51:16 +02:00
Kamil Mysliwiec
71e83b048d Merge pull request #11645 from nestjs/dependabot/npm_and_yarn/graphql-tools-9.0.0
chore(deps-dev): bump graphql-tools from 8.3.20 to 9.0.0
2023-05-22 08:50:59 +02:00
Kamil Mysliwiec
ed44a0a910 Merge pull request #11646 from nestjs/dependabot/npm_and_yarn/types/node-20.2.3
chore(deps-dev): bump @types/node from 20.2.1 to 20.2.3
2023-05-22 08:50:52 +02:00
dependabot[bot]
6a59e7ae4e chore(deps-dev): bump @types/node from 20.2.1 to 20.2.3
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.2.1 to 20.2.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>
2023-05-22 01:18:45 +00:00
dependabot[bot]
29f84b21ed chore(deps-dev): bump graphql-tools from 8.3.20 to 9.0.0
Bumps [graphql-tools](https://github.com/ardatan/graphql-tools/tree/HEAD/packages/graphql-tools) from 8.3.20 to 9.0.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@9.0.0/packages/graphql-tools)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 01:10:01 +00:00
dependabot[bot]
b23f21067f chore(deps-dev): bump mongoose from 7.1.1 to 7.2.0
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.1.1 to 7.2.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/7.1.1...7.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 01:02:44 +00:00
ryoctrl
674bfc5e83 fix(microservices): to nack when there is no matching handler 2023-05-20 04:56:51 +09:00
Kamil Mysliwiec
d352e6f138 Merge pull request #11638 from nestjs/dependabot/npm_and_yarn/types/node-20.2.1
chore(deps-dev): bump @types/node from 20.2.0 to 20.2.1
2023-05-19 12:30:47 +02:00
Kamil Mysliwiec
9dcbb6b14c Merge pull request #11639 from nestjs/dependabot/npm_and_yarn/sinon-15.1.0
chore(deps-dev): bump sinon from 15.0.4 to 15.1.0
2023-05-19 12:30:34 +02:00
Kamil Mysliwiec
9a1faf150c Merge pull request #11640 from nestjs/dependabot/npm_and_yarn/tslib-2.5.2
chore(deps): bump tslib from 2.5.1 to 2.5.2
2023-05-19 12:30:05 +02:00
dependabot[bot]
242718dbaf chore(deps): bump tslib from 2.5.1 to 2.5.2
Bumps [tslib](https://github.com/Microsoft/tslib) from 2.5.1 to 2.5.2.
- [Release notes](https://github.com/Microsoft/tslib/releases)
- [Commits](https://github.com/Microsoft/tslib/compare/2.5.1...2.5.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-19 01:07:55 +00:00
dependabot[bot]
6be56d0013 chore(deps-dev): bump sinon from 15.0.4 to 15.1.0
Bumps [sinon](https://github.com/sinonjs/sinon) from 15.0.4 to 15.1.0.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v15.0.4...v15.1.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-19 01:05:30 +00:00
dependabot[bot]
11d4a2cec8 chore(deps-dev): bump @types/node from 20.2.0 to 20.2.1
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.2.0 to 20.2.1.
- [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>
2023-05-19 01:03:04 +00:00
Kamil Mysliwiec
c769951dcd Merge pull request #11636 from nestjs/dependabot/npm_and_yarn/tslib-2.5.1
chore(deps): bump tslib from 2.5.0 to 2.5.1
2023-05-18 08:56:04 +02:00
Kamil Mysliwiec
929174b8ad Merge pull request #11637 from nestjs/dependabot/npm_and_yarn/types/node-20.2.0
chore(deps-dev): bump @types/node from 20.1.7 to 20.2.0
2023-05-18 08:55:55 +02:00
dependabot[bot]
fb442a2e91 chore(deps-dev): bump @types/node from 20.1.7 to 20.2.0
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.1.7 to 20.2.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-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-18 01:01:58 +00:00
dependabot[bot]
fe6868d7e3 chore(deps): bump tslib from 2.5.0 to 2.5.1
Bumps [tslib](https://github.com/Microsoft/tslib) from 2.5.0 to 2.5.1.
- [Release notes](https://github.com/Microsoft/tslib/releases)
- [Commits](https://github.com/Microsoft/tslib/compare/2.5.0...2.5.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-18 01:00:45 +00:00
Kamil Mysliwiec
fa0a085d57 Merge pull request #11631 from nestjs/dependabot/npm_and_yarn/types/node-20.1.7
chore(deps-dev): bump @types/node from 20.1.5 to 20.1.7
2023-05-17 09:17:38 +02:00
dependabot[bot]
b03d8702d7 chore(deps-dev): bump @types/node from 20.1.5 to 20.1.7
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.1.5 to 20.1.7.
- [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>
2023-05-17 01:00:37 +00:00
Kamil Myśliwiec
60542ea1b5 chore: update readme 2023-05-16 09:36:03 +02:00
Kamil Myśliwiec
468c179e18 chore(@nestjs) publish v9.4.1 release 2023-05-16 09:32:38 +02:00
Kamil Mysliwiec
fabbd09906 Merge pull request #11600 from matt1097/issue-11586
fix(core): Only update module distance if greater
2023-05-16 09:28:14 +02:00
Kamil Mysliwiec
7cebc3b1eb Merge pull request #11622 from nestjs/dependabot/npm_and_yarn/commitlint/config-angular-17.6.3
chore(deps-dev): bump @commitlint/config-angular from 17.6.1 to 17.6.3
2023-05-16 09:15:42 +02:00
Kamil Mysliwiec
aacea0e07c Merge pull request #11541 from kuronijin/master
feat(microservices): Add isGlobal option to the ClientsModule
2023-05-16 09:15:25 +02:00
Kamil Mysliwiec
927525e082 Merge pull request #11549 from dammy001/patch-1
chore(validation): add ability to pass custom message in file size validator
2023-05-16 09:14:39 +02:00
Kamil Mysliwiec
37f332c2c7 Merge pull request #11621 from nestjs/dependabot/npm_and_yarn/types/sinon-10.0.15
chore(deps-dev): bump @types/sinon from 10.0.14 to 10.0.15
2023-05-16 09:14:14 +02:00
dependabot[bot]
11ebf30c53 chore(deps-dev): bump @types/sinon from 10.0.14 to 10.0.15
Bumps [@types/sinon](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/sinon) from 10.0.14 to 10.0.15.
- [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>
2023-05-16 07:11:16 +00:00
dependabot[bot]
0697076e1f chore(deps-dev): bump @commitlint/config-angular from 17.6.1 to 17.6.3
Bumps [@commitlint/config-angular](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/config-angular) from 17.6.1 to 17.6.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.6.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>
2023-05-16 07:09:56 +00:00
Kamil Mysliwiec
6302f75996 Merge pull request #11623 from nestjs/dependabot/npm_and_yarn/typeorm-0.3.16
chore(deps-dev): bump typeorm from 0.3.15 to 0.3.16
2023-05-16 09:06:20 +02:00
Kamil Mysliwiec
3a0a3d1df4 Merge pull request #11625 from nestjs/dependabot/npm_and_yarn/fastify/middie-8.3.0
chore(deps): bump @fastify/middie from 8.1.0 to 8.3.0
2023-05-16 09:06:08 +02:00
Kamil Mysliwiec
742c92e7e0 Merge pull request #11626 from nestjs/dependabot/npm_and_yarn/types/node-20.1.5
chore(deps-dev): bump @types/node from 20.1.4 to 20.1.5
2023-05-16 09:06:01 +02:00
Kamil Mysliwiec
608af53693 Merge pull request #11627 from nestjs/dependabot/npm_and_yarn/mysql2-3.3.1
chore(deps-dev): bump mysql2 from 3.2.4 to 3.3.1
2023-05-16 09:05:56 +02:00
Kamil Mysliwiec
7df1d07bd2 Merge pull request #11628 from nestjs/dependabot/npm_and_yarn/commitlint/cli-17.6.3
chore(deps-dev): bump @commitlint/cli from 17.6.1 to 17.6.3
2023-05-16 09:05:52 +02:00
Kamil Mysliwiec
c3d8247859 Merge pull request #11629 from nestjs/dependabot/npm_and_yarn/core-js-3.30.2
chore(deps-dev): bump core-js from 3.30.1 to 3.30.2
2023-05-16 09:05:47 +02:00
Kamil Mysliwiec
b2a35f231a Merge pull request #11571 from TP-O/fix-error-log
fix(common): `ConsoleLogger` doesn't log stacktrace
2023-05-16 09:04:56 +02:00
dependabot[bot]
d224961d61 chore(deps-dev): bump core-js from 3.30.1 to 3.30.2
Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.30.1 to 3.30.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/commits/v3.30.2/packages/core-js)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-16 01:13:13 +00:00
dependabot[bot]
da6b39ffbd chore(deps-dev): bump @commitlint/cli from 17.6.1 to 17.6.3
Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/cli) from 17.6.1 to 17.6.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.6.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>
2023-05-16 01:12:20 +00:00
dependabot[bot]
d97196c2dc chore(deps-dev): bump mysql2 from 3.2.4 to 3.3.1
Bumps [mysql2](https://github.com/sidorares/node-mysql2) from 3.2.4 to 3.3.1.
- [Release notes](https://github.com/sidorares/node-mysql2/releases)
- [Changelog](https://github.com/sidorares/node-mysql2/blob/master/Changelog.md)
- [Commits](https://github.com/sidorares/node-mysql2/compare/v3.2.4...v3.3.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-16 01:11:08 +00:00
dependabot[bot]
2110c8727e chore(deps-dev): bump @types/node from 20.1.4 to 20.1.5
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.1.4 to 20.1.5.
- [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>
2023-05-16 01:10:15 +00:00
dependabot[bot]
cfd2a30b35 chore(deps): bump @fastify/middie from 8.1.0 to 8.3.0
Bumps [@fastify/middie](https://github.com/fastify/middie) from 8.1.0 to 8.3.0.
- [Release notes](https://github.com/fastify/middie/releases)
- [Commits](https://github.com/fastify/middie/compare/v8.1.0...v8.3.0)

---
updated-dependencies:
- dependency-name: "@fastify/middie"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-16 01:09:10 +00:00
dependabot[bot]
866787996a chore(deps-dev): bump typeorm from 0.3.15 to 0.3.16
Bumps [typeorm](https://github.com/typeorm/typeorm) from 0.3.15 to 0.3.16.
- [Release notes](https://github.com/typeorm/typeorm/releases)
- [Changelog](https://github.com/typeorm/typeorm/blob/master/CHANGELOG.md)
- [Commits](https://github.com/typeorm/typeorm/compare/0.3.15...0.3.16)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-16 01:01:59 +00:00
Kamil Mysliwiec
760a40e4ce Merge pull request #11620 from nestjs/dependabot/npm_and_yarn/set-value-and-union-value-2.0.1
chore(deps): bump set-value and union-value
2023-05-15 10:57:03 +02:00
Kamil Mysliwiec
fcf1cad484 Merge pull request #11568 from nestjs/dependabot/npm_and_yarn/lint-staged-13.2.2
chore(deps-dev): bump lint-staged from 13.2.1 to 13.2.2
2023-05-15 10:56:44 +02:00
Kamil Mysliwiec
88880f9a21 Merge pull request #11570 from nestjs/dependabot/npm_and_yarn/rxjs-7.8.1
chore(deps): bump rxjs from 7.8.0 to 7.8.1
2023-05-15 10:56:39 +02:00
dependabot[bot]
f92f029505 chore(deps): bump set-value and union-value
Bumps [set-value](https://github.com/jonschlinkert/set-value) and [union-value](https://github.com/jonschlinkert/union-value). These dependencies needed to be updated together.

Updates `set-value` from 0.4.3 to 2.0.1
- [Commits](https://github.com/jonschlinkert/set-value/compare/0.4.3...2.0.1)

Updates `union-value` from 1.0.0 to 1.0.1
- [Release notes](https://github.com/jonschlinkert/union-value/releases)
- [Commits](https://github.com/jonschlinkert/union-value/compare/1.0.0...1.0.1)

---
updated-dependencies:
- dependency-name: set-value
  dependency-type: indirect
- dependency-name: union-value
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-15 08:56:32 +00:00
Kamil Mysliwiec
0c4ee5e190 Merge pull request #11575 from nestjs/dependabot/npm_and_yarn/fastify-4.17.0
chore(deps): bump fastify from 4.16.0 to 4.17.0
2023-05-15 10:56:19 +02:00
Kamil Mysliwiec
88ef0d33b7 Merge pull request #11576 from nestjs/dependabot/npm_and_yarn/redis-4.6.6
chore(deps-dev): bump redis from 4.6.5 to 4.6.6
2023-05-15 10:56:12 +02:00
Kamil Mysliwiec
bcb1f204bd Merge pull request #11583 from nestjs/dependabot/npm_and_yarn/types/chai-4.3.5
chore(deps-dev): bump @types/chai from 4.3.4 to 4.3.5
2023-05-15 10:56:06 +02:00
Kamil Mysliwiec
1b47dc6ae0 Merge pull request #11588 from nestjs/dependabot/npm_and_yarn/apollo/server-4.7.1
chore(deps-dev): bump @apollo/server from 4.7.0 to 4.7.1
2023-05-15 10:54:40 +02:00
Kamil Mysliwiec
95d3a92eb7 Merge pull request #11589 from nestjs/dependabot/npm_and_yarn/amqp-connection-manager-4.1.13
chore(deps-dev): bump amqp-connection-manager from 4.1.12 to 4.1.13
2023-05-15 10:54:27 +02:00
Kamil Mysliwiec
308e143fa3 Merge pull request #11592 from nestjs/dependabot/npm_and_yarn/grpc/proto-loader-0.7.7
chore(deps-dev): bump @grpc/proto-loader from 0.7.6 to 0.7.7
2023-05-15 10:54:20 +02:00
Kamil Mysliwiec
b5f8da18ce Merge pull request #11593 from nestjs/dependabot/npm_and_yarn/engine.io-6.4.2
chore(deps): bump engine.io from 6.4.1 to 6.4.2
2023-05-15 10:54:13 +02:00
Kamil Mysliwiec
41d52dae60 Merge pull request #11594 from nestjs/dependabot/npm_and_yarn/sample/02-gateways/engine.io-6.4.2
chore(deps): bump engine.io from 6.4.1 to 6.4.2 in /sample/02-gateways
2023-05-15 10:54:00 +02:00
Kamil Mysliwiec
74135867ef Merge pull request #11612 from nestjs/dependabot/npm_and_yarn/mongoose-7.1.1
chore(deps-dev): bump mongoose from 7.0.5 to 7.1.1
2023-05-15 10:53:05 +02:00
Kamil Mysliwiec
362e4d8fa8 Merge pull request #11617 from nestjs/dependabot/npm_and_yarn/types/node-20.1.4
chore(deps-dev): bump @types/node from 18.16.1 to 20.1.4
2023-05-15 10:52:42 +02:00
dependabot[bot]
f16c47b05f chore(deps): bump fastify from 4.16.0 to 4.17.0
Bumps [fastify](https://github.com/fastify/fastify) from 4.16.0 to 4.17.0.
- [Release notes](https://github.com/fastify/fastify/releases)
- [Commits](https://github.com/fastify/fastify/compare/4.16.0...4.17.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-15 08:44:09 +00:00
Kamil Mysliwiec
c116e1c72c Merge pull request #11580 from mik0byte/chore/remove-caret-sign
chore(deps): remove caret sign from @fastify/cors
2023-05-15 10:42:05 +02:00
Kamil Mysliwiec
21edc331b2 Merge pull request #11587 from fityannugroho/master
sample/13: change readme title
2023-05-15 10:39:46 +02:00
Kamil Mysliwiec
69f432b738 Merge pull request #11604 from micalevisk/fix/issue-11602
refactor(common): import from decorators module instead of common's barrel file
2023-05-15 10:11:19 +02:00
Kamil Mysliwiec
f5e82fe052 Merge pull request #11619 from micalevisk/patch-1
docs: update zh readme headers
2023-05-15 09:54:52 +02:00
Micael Levi L. Cavalcante
8706662a22 docs: update zh readme headers 2023-05-14 23:24:41 -04:00
dependabot[bot]
6e5143d79f chore(deps-dev): bump @types/node from 18.16.1 to 20.1.4
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.16.1 to 20.1.4.
- [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>
2023-05-15 01:19:16 +00:00
dependabot[bot]
3282db1630 chore(deps-dev): bump mongoose from 7.0.5 to 7.1.1
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.0.5 to 7.1.1.
- [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/7.0.5...7.1.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-11 01:16:34 +00:00
Micael Levi L. Cavalcante
05e49963ac refactor(common): import from decorators module instead of common barrel 2023-05-06 16:37:35 -04:00
matt1097
8ea3a5088c fix(core): Only update module distance if greater 2023-05-05 11:40:17 -04:00
dependabot[bot]
f60e62888e chore(deps): bump engine.io from 6.4.1 to 6.4.2 in /sample/02-gateways
Bumps [engine.io](https://github.com/socketio/engine.io) from 6.4.1 to 6.4.2.
- [Release notes](https://github.com/socketio/engine.io/releases)
- [Changelog](https://github.com/socketio/engine.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/engine.io/compare/6.4.1...6.4.2)

---
updated-dependencies:
- dependency-name: engine.io
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-04 01:54:39 +00:00
dependabot[bot]
73059a3acf chore(deps): bump engine.io from 6.4.1 to 6.4.2
Bumps [engine.io](https://github.com/socketio/engine.io) from 6.4.1 to 6.4.2.
- [Release notes](https://github.com/socketio/engine.io/releases)
- [Changelog](https://github.com/socketio/engine.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/engine.io/compare/6.4.1...6.4.2)

---
updated-dependencies:
- dependency-name: engine.io
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-04 01:36:37 +00:00
dependabot[bot]
dc9ee85374 chore(deps-dev): bump @grpc/proto-loader from 0.7.6 to 0.7.7
Bumps [@grpc/proto-loader](https://github.com/grpc/grpc-node) from 0.7.6 to 0.7.7.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/proto-loader@0.7.6...@grpc/proto-loader@0.7.7)

---
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>
2023-05-04 00:59:52 +00:00
dependabot[bot]
4fd0957efc chore(deps-dev): bump amqp-connection-manager from 4.1.12 to 4.1.13
Bumps [amqp-connection-manager](https://github.com/jwalton/node-amqp-connection-manager) from 4.1.12 to 4.1.13.
- [Release notes](https://github.com/jwalton/node-amqp-connection-manager/releases)
- [Changelog](https://github.com/jwalton/node-amqp-connection-manager/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jwalton/node-amqp-connection-manager/compare/v4.1.12...v4.1.13)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-03 01:10:51 +00:00
dependabot[bot]
d18343c920 chore(deps-dev): bump @apollo/server from 4.7.0 to 4.7.1
Bumps [@apollo/server](https://github.com/apollographql/apollo-server/tree/HEAD/packages/server) from 4.7.0 to 4.7.1.
- [Release notes](https://github.com/apollographql/apollo-server/releases)
- [Changelog](https://github.com/apollographql/apollo-server/blob/main/packages/server/CHANGELOG.md)
- [Commits](https://github.com/apollographql/apollo-server/commits/@apollo/server@4.7.1/packages/server)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-03 01:04:36 +00:00
Fityan
ef5f17efe1 sample/13: change readme title
this sample doesn't use `mongoose`
2023-05-02 11:20:55 +07:00
dependabot[bot]
fffdbb26c9 chore(deps-dev): bump @types/chai from 4.3.4 to 4.3.5
Bumps [@types/chai](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chai) from 4.3.4 to 4.3.5.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chai)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-01 01:09:02 +00:00
Mikayel Aleksanyan
fbca5ac5a9 chore(deps): remove caret sign from @fastify/cors 2023-04-29 18:11:19 +04:00
TP-O
c52d33348a feat: determine context and stack if passing 2 parameters 2023-04-29 08:36:44 +07:00
TP-O
87412ad51e test: add test 2023-04-28 17:41:20 +07:00
dependabot[bot]
a815394556 chore(deps-dev): bump redis from 4.6.5 to 4.6.6
Bumps [redis](https://github.com/redis/node-redis) from 4.6.5 to 4.6.6.
- [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/redis@4.6.5...redis@4.6.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-28 01:00:23 +00:00
TP-O
2effb83b21 fix: log stacktrace if 2 args is passed 2023-04-27 19:07:31 +07:00
Kamil Mysliwiec
85966703ac Merge pull request #11566 from cesarkohl/patch-1
Replace HTTP with HTTPS on README.md
2023-04-27 09:18:13 +02:00
dependabot[bot]
6098e2465f chore(deps): bump rxjs from 7.8.0 to 7.8.1
Bumps [rxjs](https://github.com/reactivex/rxjs) from 7.8.0 to 7.8.1.
- [Release notes](https://github.com/reactivex/rxjs/releases)
- [Changelog](https://github.com/ReactiveX/rxjs/blob/7.8.1/CHANGELOG.md)
- [Commits](https://github.com/reactivex/rxjs/compare/7.8.0...7.8.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-27 01:06:41 +00:00
dependabot[bot]
5db74f80c6 chore(deps-dev): bump lint-staged from 13.2.1 to 13.2.2
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 13.2.1 to 13.2.2.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v13.2.1...v13.2.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>
2023-04-27 01:00:48 +00:00
Cesar Kohl
b5cab0f907 Replace HTTP with HTTPS on README.md 2023-04-26 13:10:56 -03:00
Kamil Mysliwiec
232582477e Merge pull request #11564 from nestjs/dependabot/npm_and_yarn/types/node-18.16.1
chore(deps-dev): bump @types/node from 18.16.0 to 18.16.1
2023-04-26 08:26:02 +02:00
Kamil Mysliwiec
7ec42c7329 Merge pull request #11563 from nestjs/dependabot/npm_and_yarn/mysql2-3.2.4
chore(deps-dev): bump mysql2 from 3.2.3 to 3.2.4
2023-04-26 08:25:52 +02:00
Kamil Mysliwiec
1073c41dc4 Merge pull request #11565 from nestjs/dependabot/npm_and_yarn/fastify-4.16.0
chore(deps): bump fastify from 4.15.0 to 4.16.0
2023-04-26 08:25:24 +02:00
dependabot[bot]
26bd9662f8 chore(deps): bump fastify from 4.15.0 to 4.16.0
Bumps [fastify](https://github.com/fastify/fastify) from 4.15.0 to 4.16.0.
- [Release notes](https://github.com/fastify/fastify/releases)
- [Commits](https://github.com/fastify/fastify/compare/v4.15.0...4.16.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-26 01:09:51 +00:00
dependabot[bot]
bd03c036cd chore(deps-dev): bump @types/node from 18.16.0 to 18.16.1
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.16.0 to 18.16.1.
- [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>
2023-04-26 01:00:36 +00:00
dependabot[bot]
22d4a1edff chore(deps-dev): bump mysql2 from 3.2.3 to 3.2.4
Bumps [mysql2](https://github.com/sidorares/node-mysql2) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/sidorares/node-mysql2/releases)
- [Changelog](https://github.com/sidorares/node-mysql2/blob/master/Changelog.md)
- [Commits](https://github.com/sidorares/node-mysql2/compare/v3.2.3...v3.2.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-26 00:59:08 +00:00
Kamil Mysliwiec
c8da134e6c Merge pull request #11558 from nestjs/dependabot/npm_and_yarn/yaml-2.2.2
chore(deps): bump yaml from 2.2.1 to 2.2.2
2023-04-25 09:34:49 +02:00
dependabot[bot]
0c0c377188 chore(deps): bump yaml from 2.2.1 to 2.2.2
Bumps [yaml](https://github.com/eemeli/yaml) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/eemeli/yaml/releases)
- [Commits](https://github.com/eemeli/yaml/compare/v2.2.1...v2.2.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-25 07:07:57 +00:00
Kamil Mysliwiec
8879391672 Merge pull request #11557 from nestjs/dependabot/npm_and_yarn/mongoose-7.0.5
chore(deps-dev): bump mongoose from 7.0.4 to 7.0.5
2023-04-25 09:06:52 +02:00
dependabot[bot]
244b44580c chore(deps-dev): bump mongoose from 7.0.4 to 7.0.5
Bumps [mongoose](https://github.com/Automattic/mongoose) from 7.0.4 to 7.0.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/7.0.4...7.0.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-25 01:01:53 +00:00
Viktor Belokhvostov
924c5f32bb feat(microservices): Updated the ClientsModule options types 2023-04-24 14:31:25 +01:00
Anjorin Damilare
d46db256af Update max-file-size.validator.ts 2023-04-23 07:26:04 +01:00
Anjorin Damilare
df0270af04 Update max-file-size.validator.ts 2023-04-23 07:13:25 +01:00
Anjorin Damilare
93a2b48be7 chore: remove function to prevent breaking change 2023-04-23 07:10:15 +01:00
Anjorin Damilare
619b98caf7 Update max-file-size.validator.ts 2023-04-23 07:04:50 +01:00
Anjorin Damilare
84bd87c86a chore: add ability to pass custom message in file size validator 2023-04-23 06:57:52 +01:00
Viktor Belokhvostov
dc5aaf9af3 feat(microservices): Add isGlobal option to the ClientsModule 2023-04-21 11:50:12 +01:00
Julien Sarazin
9af95fcf50 fix(microservices): grpc-server handle async interceptors 2023-04-06 16:06:34 +02:00
41 changed files with 31146 additions and 3497 deletions

View File

@@ -1,11 +1,11 @@
<p align="center">
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
<a href="https://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
</p>
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">A progressive <a href="https://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
@@ -136,7 +136,8 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<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://nordbot.app/" target="_blank"><img src="https://nestjs.com/img/nordbot-logo.png" width="120" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://doppio.sh/" target="_blank"><img src="https://nestjs.com/img/dopiosh-logo.png" width="50" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://doppio.sh/" target="_blank"><img src="https://nestjs.com/img/dopiosh-logo.png" width="50" valign="middle" /></a></td></tr><tr>
<td align="center" valign="middle"><a href="https://www.hingehealth.com/" target="_blank"><img src="https://nestjs.com/img/hinge-health-logo.svg" width="100" valign="middle" /></a></td>
</tr></table>
## Backers

View File

@@ -3,7 +3,10 @@ import {
Get,
MiddlewareConsumer,
Module,
NestMiddleware,
NestModule,
Query,
Req,
RequestMethod,
} from '@nestjs/common';
import {
@@ -14,178 +17,385 @@ import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import { AppModule } from '../src/app.module';
const INCLUDED_VALUE = 'test_included';
const QUERY_VALUE = 'test_query';
const REQ_URL_VALUE = 'test_req_url';
const RETURN_VALUE = 'test';
const SCOPED_VALUE = 'test_scoped';
const WILDCARD_VALUE = 'test_wildcard';
@Controller()
class TestController {
@Get('express_style_wildcard/wildcard_nested')
express_style_wildcard() {
return RETURN_VALUE;
}
@Get('test')
test() {
return RETURN_VALUE;
}
@Get('query')
query() {
return RETURN_VALUE;
}
@Get('tests/wildcard_nested')
wildcard_nested() {
return RETURN_VALUE;
}
@Get('tests/included')
included() {
return RETURN_VALUE;
}
}
@Controller(QUERY_VALUE)
class TestQueryController {
@Get()
[QUERY_VALUE](@Query('test') test: string) {
return test;
}
}
@Module({
imports: [AppModule],
controllers: [TestController, TestQueryController],
})
class TestModule {
configure(consumer: MiddlewareConsumer) {
consumer
.apply((req, res, next) => res.end(INCLUDED_VALUE))
.forRoutes({ path: 'tests/included', method: RequestMethod.POST })
.apply((req, res, next) => res.end(`${REQ_URL_VALUE}${req.url}`))
.forRoutes('req/url/')
.apply((req, res, next) => res.end(WILDCARD_VALUE))
.forRoutes('express_style_wildcard/*', 'tests/(.*)')
.apply((req, res, next) => res.end(QUERY_VALUE))
.forRoutes('query')
.apply((req, res, next) => next())
.forRoutes(TestQueryController)
.apply((req, res, next) => res.end(SCOPED_VALUE))
.forRoutes(TestController)
.apply((req, res, next) => res.end(RETURN_VALUE))
.exclude({ path: QUERY_VALUE, method: -1 as any })
.forRoutes('(.*)');
}
}
describe('Middleware (FastifyAdapter)', () => {
let app: NestFastifyApplication;
beforeEach(async () => {
app = (
await Test.createTestingModule({
imports: [TestModule],
}).compile()
).createNestApplication<NestFastifyApplication>(new FastifyAdapter());
describe('should return expected values depending on the route', () => {
const INCLUDED_VALUE = 'test_included';
const QUERY_VALUE = 'test_query';
const REQ_URL_VALUE = 'test_req_url';
const RETURN_VALUE = 'test';
const SCOPED_VALUE = 'test_scoped';
const WILDCARD_VALUE = 'test_wildcard';
await app.init();
@Controller()
class TestController {
@Get('express_style_wildcard/wildcard_nested')
express_style_wildcard() {
return RETURN_VALUE;
}
@Get('test')
test() {
return RETURN_VALUE;
}
@Get('query')
query() {
return RETURN_VALUE;
}
@Get('tests/wildcard_nested')
wildcard_nested() {
return RETURN_VALUE;
}
@Get('tests/included')
included() {
return RETURN_VALUE;
}
}
@Controller(QUERY_VALUE)
class TestQueryController {
@Get()
[QUERY_VALUE](@Query('test') test: string) {
return test;
}
}
@Module({
imports: [AppModule],
controllers: [TestController, TestQueryController],
})
class TestModule {
configure(consumer: MiddlewareConsumer) {
consumer
.apply((req, res, next) => res.end(INCLUDED_VALUE))
.forRoutes({ path: 'tests/included', method: RequestMethod.POST })
.apply((req, res, next) => res.end(REQ_URL_VALUE))
.forRoutes('req/url/(.*)')
.apply((req, res, next) => res.end(WILDCARD_VALUE))
.forRoutes('express_style_wildcard/*', 'tests/(.*)')
.apply((req, res, next) => res.end(QUERY_VALUE))
.forRoutes('query')
.apply((req, res, next) => next())
.forRoutes(TestQueryController)
.apply((req, res, next) => res.end(SCOPED_VALUE))
.forRoutes(TestController)
.apply((req, res, next) => res.end(RETURN_VALUE))
.exclude({ path: QUERY_VALUE, method: -1 as any })
.forRoutes('(.*)');
}
}
beforeEach(async () => {
app = (
await Test.createTestingModule({
imports: [TestModule],
}).compile()
).createNestApplication<NestFastifyApplication>(new FastifyAdapter());
await app.init();
});
it(`forRoutes((.*))`, () => {
return app
.inject({
method: 'GET',
url: '/hello',
})
.then(({ payload }) => expect(payload).to.be.eql(RETURN_VALUE));
});
it(`forRoutes(TestController)`, () => {
return app
.inject({
method: 'GET',
url: '/test',
})
.then(({ payload }) => expect(payload).to.be.eql(SCOPED_VALUE));
});
it(`query?test=${QUERY_VALUE} forRoutes(query)`, () => {
return app
.inject({
method: 'GET',
url: '/query',
query: {
test: QUERY_VALUE,
},
})
.then(({ payload }) => expect(payload).to.be.eql(QUERY_VALUE));
});
it(`${QUERY_VALUE}?test=${QUERY_VALUE} forRoutes(${QUERY_VALUE})`, () => {
return app
.inject({
method: 'GET',
url: QUERY_VALUE,
query: {
test: QUERY_VALUE,
},
})
.then(({ payload }) => expect(payload).to.be.eql(QUERY_VALUE));
});
it(`forRoutes(tests/(.*))`, () => {
return app
.inject({
method: 'GET',
url: '/tests/wildcard_nested',
})
.then(({ payload }) => expect(payload).to.be.eql(WILDCARD_VALUE));
});
it(`forRoutes(express_style_wildcard/*)`, () => {
return app
.inject({
method: 'GET',
url: '/express_style_wildcard/wildcard_nested',
})
.then(({ payload }) => expect(payload).to.be.eql(WILDCARD_VALUE));
});
it(`forRoutes(req/url/)`, () => {
const reqUrl = '/test';
return app
.inject({
method: 'GET',
url: `/req/url${reqUrl}`,
})
.then(({ payload }) => expect(payload).to.be.eql(REQ_URL_VALUE));
});
it(`GET forRoutes(POST tests/included)`, () => {
return app
.inject({
method: 'GET',
url: '/tests/included',
})
.then(({ payload }) => expect(payload).to.be.eql(WILDCARD_VALUE));
});
it(`POST forRoutes(POST tests/included)`, () => {
return app
.inject({
method: 'POST',
url: '/tests/included',
})
.then(({ payload }) => expect(payload).to.be.eql(INCLUDED_VALUE));
});
afterEach(async () => {
await app.close();
});
});
it(`forRoutes((.*))`, () => {
return app
.inject({
method: 'GET',
url: '/hello',
})
.then(({ payload }) => expect(payload).to.be.eql(RETURN_VALUE));
});
describe.only('should execute middleware only once for given routes', () => {
class Middleware implements NestMiddleware {
use(request: any, reply: any, next: () => void) {
if (request.middlewareExecutionCount === undefined) {
request.middlewareExecutionCount = 1;
} else {
request.middlewareExecutionCount++;
}
next();
}
}
it(`forRoutes(TestController)`, () => {
return app
.inject({
method: 'GET',
url: '/test',
})
.then(({ payload }) => expect(payload).to.be.eql(SCOPED_VALUE));
});
@Controller()
class AbcController {
@Get('/a')
async a(@Req() request: any) {
return this.validateExecutionCount({
request,
expected: 1,
});
}
it(`query?test=${QUERY_VALUE} forRoutes(query)`, () => {
return app
.inject({
method: 'GET',
url: '/query',
query: {
test: QUERY_VALUE,
},
})
.then(({ payload }) => expect(payload).to.be.eql(QUERY_VALUE));
});
@Get('/a/b')
async ab(@Req() request: any) {
return this.validateExecutionCount({
request,
expected: 1,
});
}
it(`${QUERY_VALUE}?test=${QUERY_VALUE} forRoutes(${QUERY_VALUE})`, () => {
return app
.inject({
method: 'GET',
url: QUERY_VALUE,
query: {
test: QUERY_VALUE,
},
})
.then(({ payload }) => expect(payload).to.be.eql(QUERY_VALUE));
});
@Get('/a/b/c')
async abc(@Req() request: any) {
return this.validateExecutionCount({
request,
expected: 1,
});
}
it(`forRoutes(tests/(.*))`, () => {
return app
.inject({
method: 'GET',
url: '/tests/wildcard_nested',
})
.then(({ payload }) => expect(payload).to.be.eql(WILDCARD_VALUE));
});
@Get('/similar')
async withSimilar(@Req() request: any) {
return this.validateExecutionCount({
request,
expected: 1,
});
}
it(`forRoutes(express_style_wildcard/*)`, () => {
return app
.inject({
method: 'GET',
url: '/express_style_wildcard/wildcard_nested',
})
.then(({ payload }) => expect(payload).to.be.eql(WILDCARD_VALUE));
});
@Get('/similar/test')
async withSimilarTest(@Req() request: any) {
return this.validateExecutionCount({
request,
expected: 1,
});
}
it(`forRoutes(req/url/)`, () => {
const reqUrl = '/test';
return app
.inject({
method: 'GET',
url: `/req/url${reqUrl}`,
})
.then(({ payload }) =>
expect(payload).to.be.eql(`${REQ_URL_VALUE}${reqUrl}`),
);
});
@Get('/similar/:id')
async withSimilarId(@Req() request: any) {
return this.validateExecutionCount({
request,
expected: 1,
});
}
it(`GET forRoutes(POST tests/included)`, () => {
return app
.inject({
method: 'GET',
url: '/tests/included',
})
.then(({ payload }) => expect(payload).to.be.eql(WILDCARD_VALUE));
});
private validateExecutionCount({
request,
expected,
}: {
request: any;
expected: number;
}) {
let actual: number | undefined;
actual = request.raw.middlewareExecutionCount;
actual ??= 0;
it(`POST forRoutes(POST tests/included)`, () => {
return app
.inject({
method: 'POST',
url: '/tests/included',
})
.then(({ payload }) => expect(payload).to.be.eql(INCLUDED_VALUE));
});
return {
success: actual === expected,
actual,
expected,
};
}
}
afterEach(async () => {
await app.close();
@Module({
controllers: [AbcController],
})
class TestModule implements NestModule {
configure(consumer: MiddlewareConsumer) {
consumer.apply(Middleware).forRoutes(AbcController);
}
}
beforeEach(async () => {
app = (
await Test.createTestingModule({
imports: [TestModule],
}).compile()
).createNestApplication<NestFastifyApplication>(new FastifyAdapter());
await app.init();
});
it(`GET forRoutes(/a/b/c)`, () => {
return app
.inject({
method: 'GET',
url: '/a/b/c',
})
.then(({ payload }) => {
expect(payload).to.be.eql(
JSON.stringify({
success: true,
actual: 1,
expected: 1,
}),
);
});
});
it(`GET forRoutes(/a/b)`, () => {
return app
.inject({
method: 'GET',
url: '/a/b',
})
.then(({ payload }) =>
expect(payload).to.be.eql(
JSON.stringify({
success: true,
actual: 1,
expected: 1,
}),
),
);
});
it(`GET forRoutes(/a)`, () => {
return app
.inject({
method: 'GET',
url: '/a',
})
.then(({ payload }) =>
expect(payload).to.be.eql(
JSON.stringify({
success: true,
actual: 1,
expected: 1,
}),
),
);
});
it(`GET forRoutes(/similar)`, () => {
return app
.inject({
method: 'GET',
url: '/similar',
})
.then(({ payload }) =>
expect(payload).to.be.eql(
JSON.stringify({
success: true,
actual: 1,
expected: 1,
}),
),
);
});
it(`GET forRoutes(/similar/test)`, () => {
return app
.inject({
method: 'GET',
url: '/similar/test',
})
.then(({ payload }) =>
expect(payload).to.be.eql(
JSON.stringify({
success: true,
actual: 1,
expected: 1,
}),
),
);
});
it(`GET forRoutes(/similar/arbitrary)`, () => {
return app
.inject({
method: 'GET',
url: '/similar/arbitrary',
})
.then(({ payload }) =>
expect(payload).to.be.eql(
JSON.stringify({
success: true,
actual: 1,
expected: 1,
}),
),
);
});
afterEach(async () => {
await app.close();
});
});
});

View File

@@ -3,5 +3,5 @@
"packages": [
"packages/*"
],
"version": "9.4.0"
"version": "9.4.2"
}

33707
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -71,45 +71,45 @@
"object-hash": "3.0.0",
"path-to-regexp": "3.2.0",
"reflect-metadata": "0.1.13",
"rxjs": "7.8.0",
"rxjs": "7.8.1",
"socket.io": "4.6.1",
"tslib": "2.5.0",
"tslib": "2.5.2",
"uid": "2.0.2",
"uuid": "9.0.0"
},
"devDependencies": {
"@apollo/server": "4.7.0",
"@apollo/server": "4.7.1",
"@codechecks/client": "0.1.12",
"@commitlint/cli": "17.6.1",
"@commitlint/config-angular": "17.6.1",
"@fastify/cors": "^8.0.0",
"@commitlint/cli": "17.6.3",
"@commitlint/config-angular": "17.6.3",
"@fastify/cors": "8.2.1",
"@fastify/formbody": "7.4.0",
"@fastify/middie": "8.1.0",
"@fastify/middie": "8.3.0",
"@fastify/multipart": "7.6.0",
"@fastify/static": "6.10.1",
"@fastify/view": "7.4.1",
"@grpc/grpc-js": "1.8.14",
"@grpc/proto-loader": "0.7.6",
"@grpc/proto-loader": "0.7.7",
"@nestjs/apollo": "11.0.5",
"@nestjs/graphql": "11.0.5",
"@nestjs/mongoose": "9.2.2",
"@nestjs/typeorm": "9.0.1",
"@types/amqplib": "0.10.1",
"@types/bytes": "3.1.1",
"@types/chai": "4.3.4",
"@types/chai": "4.3.5",
"@types/chai-as-promised": "7.1.5",
"@types/cors": "2.8.13",
"@types/express": "4.17.17",
"@types/gulp": "4.0.10",
"@types/http-errors": "2.0.1",
"@types/mocha": "10.0.1",
"@types/node": "18.16.0",
"@types/sinon": "10.0.14",
"@types/node": "20.2.3",
"@types/sinon": "10.0.15",
"@types/supertest": "2.0.12",
"@types/ws": "8.5.4",
"@typescript-eslint/eslint-plugin": "4.33.0",
"@typescript-eslint/parser": "4.33.0",
"amqp-connection-manager": "4.1.12",
"amqp-connection-manager": "4.1.13",
"amqplib": "0.10.3",
"artillery": "1.7.9",
"body-parser": "1.20.2",
@@ -122,7 +122,7 @@
"commitlint-circle": "1.0.0",
"concurrently": "8.0.1",
"conventional-changelog": "3.1.25",
"core-js": "3.30.1",
"core-js": "3.30.2",
"coveralls": "3.1.1",
"delete-empty": "3.0.0",
"engine.io-client": "6.4.0",
@@ -131,9 +131,9 @@
"eslint-plugin-import": "2.27.5",
"eventsource": "2.0.2",
"fancy-log": "2.0.0",
"fastify": "4.15.0",
"fastify": "4.17.0",
"graphql": "16.6.0",
"graphql-tools": "8.3.20",
"graphql-tools": "9.0.0",
"gulp": "4.0.2",
"gulp-clang-format": "1.0.27",
"gulp-clean": "0.4.0",
@@ -149,34 +149,34 @@
"lerna": "2.11.0",
"lerna-changelog": "2.2.0",
"light-my-request": "5.9.1",
"lint-staged": "13.2.1",
"lint-staged": "13.2.2",
"markdown-table": "2.0.0",
"merge-graphql-schemas": "1.7.8",
"mocha": "10.2.0",
"mongoose": "7.0.4",
"mongoose": "7.2.0",
"mqtt": "4.3.7",
"multer": "1.4.4",
"mysql2": "3.2.3",
"mysql2": "3.3.1",
"nats": "2.13.1",
"nodemon": "2.0.22",
"nyc": "15.1.0",
"prettier": "2.8.8",
"redis": "4.6.5",
"redis": "4.6.6",
"rxjs-compat": "6.6.7",
"sinon": "15.0.4",
"sinon": "15.1.0",
"sinon-chai": "3.7.0",
"socket.io-client": "4.6.1",
"subscriptions-transport-ws": "0.11.0",
"supertest": "6.3.3",
"ts-morph": "18.0.0",
"ts-node": "10.9.1",
"typeorm": "0.3.15",
"typeorm": "0.3.16",
"typescript": "5.0.4",
"wrk": "1.2.1",
"ws": "8.13.0"
},
"engines": {
"node": ">= 16"
"node": ">= 12.9.0"
},
"collective": {
"type": "opencollective",

View File

@@ -1,11 +1,11 @@
<p align="center">
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
<a href="https://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
</p>
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">A progressive <a href="https://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
@@ -132,7 +132,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td align="center" valign="middle"><a href="https://klqc.de" target="_blank"><img src="https://nestjs.com/img/klcqcl-logo.png" width="120" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://thecasinowizard.com/bonuses/no-deposit-bonuses/" target="_blank"><img src="https://nestjs.com/img/casinowizard-logo.png" width="120" valign="middle" /></a></td></tr><tr>
<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://themobilereality.com/" 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://nordbot.app/" target="_blank"><img src="https://nestjs.com/img/nordbot-logo.png" width="120" valign="middle" /></a></td>

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/common",
"version": "9.4.0",
"version": "9.4.2",
"description": "Nest - modern, fast, powerful node.js web framework (@common)",
"author": "Kamil Mysliwiec",
"homepage": "https://nestjs.com",
@@ -19,7 +19,7 @@
"license": "MIT",
"dependencies": {
"iterare": "1.2.1",
"tslib": "2.5.0",
"tslib": "2.5.2",
"uid": "2.0.2"
},
"peerDependencies": {

View File

@@ -3,6 +3,7 @@ import { IFile } from './interfaces';
export type MaxFileSizeValidatorOptions = {
maxSize: number;
message?: string | ((maxSize: number) => string);
};
/**
@@ -14,6 +15,14 @@ export type MaxFileSizeValidatorOptions = {
*/
export class MaxFileSizeValidator extends FileValidator<MaxFileSizeValidatorOptions> {
buildErrorMessage(): string {
if ('message' in this.validationOptions) {
if (typeof this.validationOptions.message === 'function') {
return this.validationOptions.message(this.validationOptions.maxSize);
}
return this.validationOptions.message;
}
return `Validation failed (expected size is less than ${this.validationOptions.maxSize})`;
}

View File

@@ -1,4 +1,5 @@
import { ArgumentMetadata, HttpStatus, Injectable, Optional } from '../index';
import { ArgumentMetadata, HttpStatus } from '../index';
import { Injectable, Optional } from '../decorators/core';
import { PipeTransform } from '../interfaces/features/pipe-transform.interface';
import {
ErrorHttpStatusCode,

View File

@@ -80,6 +80,7 @@ export class ConsoleLogger implements LoggerService {
* Write an 'error' level log, if the configured level allows for it.
* Prints to `stderr` with newline.
*/
error(message: any, stackOrContext?: string): void;
error(message: any, stack?: string, context?: string): void;
error(message: any, ...optionalParams: [...any, string?, string?]): void;
error(message: any, ...optionalParams: any[]) {
@@ -281,6 +282,19 @@ export class ConsoleLogger implements LoggerService {
}
private getContextAndStackAndMessagesToPrint(args: unknown[]) {
if (args.length === 2) {
return this.isStackFormat(args[1])
? {
messages: [args[0]],
stack: args[1] as string,
context: this.context,
}
: {
messages: [args[0]],
context: args[1] as string,
};
}
const { messages, context } = this.getContextAndMessagesToPrint(args);
if (messages?.length <= 1) {
return { messages, context };
@@ -298,6 +312,14 @@ export class ConsoleLogger implements LoggerService {
};
}
private isStackFormat(stack: unknown) {
if (!isString(stack) && !isUndefined(stack)) {
return false;
}
return /^(.)+\n\s+at .+:\d+:\d+$/.test(stack);
}
private getColorByLogLevel(level: LogLevel) {
switch (level) {
case 'debug':

View File

@@ -188,6 +188,7 @@ export class Logger implements LoggerService {
/**
* Write an 'error' level log.
*/
static error(message: any, stackOrContext?: string): void;
static error(message: any, context?: string): void;
static error(message: any, stack?: string, context?: string): void;
static error(

View File

@@ -70,7 +70,7 @@ describe('Logger', () => {
);
});
it('should print one error to the console', () => {
it('should print one error to the console with context', () => {
const message = 'random error';
const context = 'RandomContext';
@@ -83,6 +83,20 @@ describe('Logger', () => {
expect(processStderrWriteSpy.firstCall.firstArg).to.include(message);
});
it('should print one error to the console with stacktrace', () => {
const message = 'random error';
const stacktrace = 'Error: message\n at <anonymous>:1:2';
Logger.error(message, stacktrace);
expect(processStderrWriteSpy.calledTwice).to.be.true;
expect(processStderrWriteSpy.firstCall.firstArg).to.not.include(`[]`);
expect(processStderrWriteSpy.firstCall.firstArg).to.include(message);
expect(processStderrWriteSpy.secondCall.firstArg).to.equal(
stacktrace + '\n',
);
});
it('should print one error without context to the console', () => {
const message = 'random error without context';
@@ -354,7 +368,7 @@ describe('Logger', () => {
);
});
it('should print one error to the console', () => {
it('should print one error to the console with context', () => {
const message = 'random error';
const context = 'RandomContext';
@@ -367,6 +381,20 @@ describe('Logger', () => {
expect(processStderrWriteSpy.firstCall.firstArg).to.include(message);
});
it('should print one error to the console with stacktrace', () => {
const message = 'random error';
const stacktrace = 'Error: message\n at <anonymous>:1:2';
logger.error(message, stacktrace);
expect(processStderrWriteSpy.calledTwice).to.be.true;
expect(processStderrWriteSpy.firstCall.firstArg).to.not.include(`[]`);
expect(processStderrWriteSpy.firstCall.firstArg).to.include(message);
expect(processStderrWriteSpy.secondCall.firstArg).to.equal(
stacktrace + '\n',
);
});
it('should print one error without context to the console', () => {
const message = 'random error without context';

View File

@@ -1,11 +1,11 @@
<p align="center">
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
<a href="https://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
</p>
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">A progressive <a href="https://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
@@ -132,7 +132,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td align="center" valign="middle"><a href="https://klqc.de" target="_blank"><img src="https://nestjs.com/img/klcqcl-logo.png" width="120" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://thecasinowizard.com/bonuses/no-deposit-bonuses/" target="_blank"><img src="https://nestjs.com/img/casinowizard-logo.png" width="120" valign="middle" /></a></td></tr><tr>
<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://themobilereality.com/" 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://nordbot.app/" target="_blank"><img src="https://nestjs.com/img/nordbot-logo.png" width="120" valign="middle" /></a></td>

View File

@@ -113,7 +113,7 @@ export class MiddlewareBuilder implements MiddlewareConsumer {
const routeMatch = routesWithRegex.find(isOverlapped);
if (routeMatch === undefined) {
return route;
return route;
}
});
}

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/core",
"version": "9.4.0",
"version": "9.4.2",
"description": "Nest - modern, fast, powerful node.js web framework (@core)",
"author": "Kamil Mysliwiec",
"license": "MIT",
@@ -32,11 +32,11 @@
"fast-safe-stringify": "2.1.1",
"iterare": "1.2.1",
"path-to-regexp": "3.2.0",
"tslib": "2.5.0",
"tslib": "2.5.2",
"uid": "2.0.2"
},
"devDependencies": {
"@nestjs/common": "9.4.0"
"@nestjs/common": "9.4.2"
},
"peerDependencies": {
"@nestjs/common": "^9.0.0",

View File

@@ -386,7 +386,9 @@ export class DependenciesScanner {
const moduleImports = moduleRef.imports;
moduleImports.forEach(importedModuleRef => {
if (importedModuleRef) {
importedModuleRef.distance = distance;
if (distance > importedModuleRef.distance) {
importedModuleRef.distance = distance;
}
calculateDistance(importedModuleRef, distance + 1);
}
});

View File

@@ -1,11 +1,11 @@
<p align="center">
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
<a href="https://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
</p>
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">A progressive <a href="https://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
@@ -132,7 +132,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td align="center" valign="middle"><a href="https://klqc.de" target="_blank"><img src="https://nestjs.com/img/klcqcl-logo.png" width="120" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://thecasinowizard.com/bonuses/no-deposit-bonuses/" target="_blank"><img src="https://nestjs.com/img/casinowizard-logo.png" width="120" valign="middle" /></a></td></tr><tr>
<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://themobilereality.com/" 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://nordbot.app/" target="_blank"><img src="https://nestjs.com/img/nordbot-logo.png" width="120" valign="middle" /></a></td>

View File

@@ -40,6 +40,11 @@ export const RQM_DEFAULT_QUEUE_OPTIONS = {};
export const RQM_DEFAULT_NOACK = true;
export const RQM_DEFAULT_PERSISTENT = false;
export const RQM_DEFAULT_NO_ASSERT = false;
export const RQM_NO_EVENT_HANDLER = (
text: TemplateStringsArray,
pattern: string,
) =>
`An unsupported event was received. It has been acknowledged, so it will not be re-delivered. Pattern: ${pattern}`;
export const GRPC_DEFAULT_PROTO_LOADER = '@grpc/proto-loader';
export const NO_EVENT_HANDLER = (text: TemplateStringsArray, pattern: string) =>

View File

@@ -16,26 +16,29 @@ import {
@Module({})
export class ClientsModule {
static register(options: ClientsModuleOptions): DynamicModule {
const clients = (options || []).map(item => ({
const clientsOptions = !Array.isArray(options) ? options.clients : options;
const clients = (clientsOptions || []).map(item => ({
provide: item.name,
useValue: this.assignOnAppShutdownHook(ClientProxyFactory.create(item)),
}));
return {
module: ClientsModule,
global: !Array.isArray(options) && options.isGlobal,
providers: clients,
exports: clients,
};
}
static registerAsync(options: ClientsModuleAsyncOptions): DynamicModule {
const providers: Provider[] = options.reduce(
const clientsOptions = !Array.isArray(options) ? options.clients : options;
const providers: Provider[] = clientsOptions.reduce(
(accProviders: Provider[], item) =>
accProviders
.concat(this.createAsyncProviders(item))
.concat(item.extraProviders || []),
[],
);
const imports = options.reduce(
const imports = clientsOptions.reduce(
(accImports, option) =>
option.imports && !accImports.includes(option.imports)
? accImports.concat(option.imports)
@@ -44,6 +47,7 @@ export class ClientsModule {
);
return {
module: ClientsModule,
global: !Array.isArray(options) && options.isGlobal,
imports,
providers: providers,
exports: providers,

View File

@@ -7,7 +7,12 @@ export type ClientProviderOptions = ClientProvider & {
name: string | symbol;
};
export type ClientsModuleOptions = Array<ClientProviderOptions>;
export type ClientsModuleOptions =
| Array<ClientProviderOptions>
| {
clients: Array<ClientProviderOptions>;
isGlobal?: boolean;
};
export interface ClientsModuleOptionsFactory {
createClientOptions(): Promise<ClientProvider> | ClientProvider;
@@ -23,4 +28,9 @@ export interface ClientsProviderAsyncOptions
name: string | symbol;
}
export type ClientsModuleAsyncOptions = Array<ClientsProviderAsyncOptions>;
export type ClientsModuleAsyncOptions =
| Array<ClientsProviderAsyncOptions>
| {
clients: Array<ClientsProviderAsyncOptions>;
isGlobal?: boolean;
};

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/microservices",
"version": "9.4.0",
"version": "9.4.2",
"description": "Nest - modern, fast, powerful node.js web framework (@microservices)",
"author": "Kamil Mysliwiec",
"license": "MIT",
@@ -19,11 +19,11 @@
},
"dependencies": {
"iterare": "1.2.1",
"tslib": "2.5.0"
"tslib": "2.5.2"
},
"devDependencies": {
"@nestjs/common": "9.4.0",
"@nestjs/core": "9.4.0"
"@nestjs/common": "9.4.2",
"@nestjs/core": "9.4.2"
},
"peerDependencies": {
"@grpc/grpc-js": "*",

View File

@@ -221,7 +221,7 @@ export class ServerGrpc extends Server implements CustomTransportStrategy {
return async (call: GrpcCall, callback: Function) => {
const handler = methodHandler(call.request, call.metadata, call);
this.transformToObservable(await handler).subscribe({
next: data => callback(null, data),
next: async data => callback(null, await data),
error: (err: any) => callback(err),
});
};

View File

@@ -17,6 +17,7 @@ import {
RQM_DEFAULT_QUEUE,
RQM_DEFAULT_QUEUE_OPTIONS,
RQM_DEFAULT_URL,
RQM_NO_EVENT_HANDLER,
} from '../constants';
import { RmqContext } from '../ctx-host';
import { Transport } from '../enums';
@@ -25,6 +26,7 @@ import { CustomTransportStrategy, RmqOptions } from '../interfaces';
import {
IncomingRequest,
OutgoingResponse,
ReadPacket,
} from '../interfaces/packet.interface';
import { RmqRecordSerializer } from '../serializers/rmq-record.serializer';
import { Server } from './server';
@@ -42,6 +44,7 @@ export class ServerRMQ extends Server implements CustomTransportStrategy {
protected readonly urls: string[] | RmqUrl[];
protected readonly queue: string;
protected readonly prefetchCount: number;
protected readonly noAck: boolean;
protected readonly queueOptions: any;
protected readonly isGlobalPrefetchCount: boolean;
protected readonly noAssert: boolean;
@@ -54,6 +57,7 @@ export class ServerRMQ extends Server implements CustomTransportStrategy {
this.prefetchCount =
this.getOptionsProp(this.options, 'prefetchCount') ||
RQM_DEFAULT_PREFETCH_COUNT;
this.noAck = this.getOptionsProp(this.options, 'noAck', RQM_DEFAULT_NOACK);
this.isGlobalPrefetchCount =
this.getOptionsProp(this.options, 'isGlobalPrefetchCount') ||
RQM_DEFAULT_IS_GLOBAL_PREFETCH_COUNT;
@@ -141,8 +145,6 @@ export class ServerRMQ extends Server implements CustomTransportStrategy {
}
public async setupChannel(channel: any, callback: Function) {
const noAck = this.getOptionsProp(this.options, 'noAck', RQM_DEFAULT_NOACK);
if (!this.queueOptions.noAssert) {
await channel.assertQueue(this.queue, this.queueOptions);
}
@@ -151,7 +153,7 @@ export class ServerRMQ extends Server implements CustomTransportStrategy {
this.queue,
(msg: Record<string, any>) => this.handleMessage(msg, channel),
{
noAck,
noAck: this.noAck,
},
);
callback();
@@ -200,6 +202,19 @@ export class ServerRMQ extends Server implements CustomTransportStrategy {
response$ && this.send(response$, publish);
}
public async handleEvent(
pattern: string,
packet: ReadPacket,
context: RmqContext,
): Promise<any> {
const handler = this.getHandlerByPattern(pattern);
if (!handler && !this.noAck) {
this.channel.nack(context.getMessage(), false, false);
return this.logger.warn(RQM_NO_EVENT_HANDLER`${pattern}`);
}
return super.handleEvent(pattern, packet, context);
}
public sendMessage<T = any>(
message: T,
replyTo: any,

View File

@@ -1,7 +1,7 @@
import { Logger } from '@nestjs/common';
import { expect } from 'chai';
import { join } from 'path';
import { of } from 'rxjs';
import { of, ReplaySubject, Subject } from 'rxjs';
import * as sinon from 'sinon';
import { CANCEL_EVENT } from '../../constants';
import { InvalidGrpcPackageException } from '../../errors/invalid-grpc-package.exception';
@@ -442,6 +442,29 @@ describe('ServerGrpc', () => {
expect(native.called).to.be.true;
expect(callback.called).to.be.true;
});
it('should await when a promise is return by the native', async () => {
const call = { write: sinon.spy(), end: sinon.spy() };
const callback = sinon.spy();
const original = { native: Function };
const mock = sinon.mock(original);
mock
.expects('native')
.once()
.returns(
(() => {
const sub = new ReplaySubject<any>(1);
sub.next(new Promise(resolve => resolve({ foo: 'bar' })));
return sub.asObservable();
})(),
);
await server.createUnaryServiceMethod(original.native)(call, callback);
mock.verify();
expect(callback.calledWith(null, { foo: 'bar' })).to.be.true;
});
});
});

View File

@@ -3,6 +3,7 @@ import * as sinon from 'sinon';
import { NO_MESSAGE_HANDLER } from '../../constants';
import { BaseRpcContext } from '../../ctx-host/base-rpc.context';
import { ServerRMQ } from '../../server/server-rmq';
import { RmqContext } from '../../ctx-host';
describe('ServerRMQ', () => {
let server: ServerRMQ;
@@ -99,10 +100,15 @@ describe('ServerRMQ', () => {
data: 'tests',
id: '3',
});
const channel = {
nack: sinon.spy(),
};
let sendMessageStub: sinon.SinonStub;
beforeEach(() => {
sendMessageStub = sinon.stub(server, 'sendMessage').callsFake(() => ({}));
(server as any).channel = channel;
});
it('should call "handleEvent" if identifier is not present', async () => {
const handleEventSpy = sinon.spy(server, 'handleEvent');
@@ -223,9 +229,33 @@ describe('ServerRMQ', () => {
server.handleEvent(
channel,
{ pattern: '', data },
new BaseRpcContext([]),
new RmqContext([{}, {}, '']),
);
expect(handler.calledWith(data)).to.be.true;
});
it('should negative acknowledge without retrying if key does not exists in handlers object and noAck option is false', () => {
const nack = sinon.spy();
const message = { pattern: 'no-exists', data };
(server as any).channel = {
nack,
};
(server as any).noAck = false;
server.handleEvent(channel, message, new RmqContext([message, '', '']));
expect(nack.calledWith(message, false, false)).to.be.true;
});
it('should not negative acknowledge if key does not exists in handlers object but noAck option is true', () => {
const nack = sinon.spy();
const message = { pattern: 'no-exists', data };
(server as any).channel = {
nack,
};
(server as any).noAck = true;
server.handleEvent(channel, message, new RmqContext([message, '', '']));
expect(nack.calledWith(message, false, false)).not.to.be.true;
});
});
});

View File

@@ -1,11 +1,11 @@
<p align="center">
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
<a href="https://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
</p>
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">A progressive <a href="https://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
@@ -132,7 +132,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td align="center" valign="middle"><a href="https://klqc.de" target="_blank"><img src="https://nestjs.com/img/klcqcl-logo.png" width="120" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://thecasinowizard.com/bonuses/no-deposit-bonuses/" target="_blank"><img src="https://nestjs.com/img/casinowizard-logo.png" width="120" valign="middle" /></a></td></tr><tr>
<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://themobilereality.com/" 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://nordbot.app/" target="_blank"><img src="https://nestjs.com/img/nordbot-logo.png" width="120" valign="middle" /></a></td>

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/platform-express",
"version": "9.4.0",
"version": "9.4.2",
"description": "Nest - modern, fast, powerful node.js web framework (@platform-express)",
"author": "Kamil Mysliwiec",
"license": "MIT",
@@ -22,11 +22,11 @@
"cors": "2.8.5",
"express": "4.18.2",
"multer": "1.4.4-lts.1",
"tslib": "2.5.0"
"tslib": "2.5.2"
},
"devDependencies": {
"@nestjs/common": "9.4.0",
"@nestjs/core": "9.4.0"
"@nestjs/common": "9.4.2",
"@nestjs/core": "9.4.2"
},
"peerDependencies": {
"@nestjs/common": "^9.0.0",

View File

@@ -1,11 +1,11 @@
<p align="center">
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
<a href="https://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
</p>
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">A progressive <a href="https://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
@@ -132,7 +132,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td align="center" valign="middle"><a href="https://klqc.de" target="_blank"><img src="https://nestjs.com/img/klcqcl-logo.png" width="120" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://thecasinowizard.com/bonuses/no-deposit-bonuses/" target="_blank"><img src="https://nestjs.com/img/casinowizard-logo.png" width="120" valign="middle" /></a></td></tr><tr>
<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://themobilereality.com/" 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://nordbot.app/" target="_blank"><img src="https://nestjs.com/img/nordbot-logo.png" width="120" valign="middle" /></a></td>

View File

@@ -4,9 +4,9 @@ import {
RawBodyRequest,
RequestMethod,
StreamableFile,
VERSION_NEUTRAL,
VersioningOptions,
VersioningType,
VERSION_NEUTRAL,
} from '@nestjs/common';
import { VersionValue } from '@nestjs/common/interfaces';
import {
@@ -17,7 +17,6 @@ import { loadPackage } from '@nestjs/common/utils/load-package.util';
import { isString, isUndefined } from '@nestjs/common/utils/shared.utils';
import { AbstractHttpAdapter } from '@nestjs/core/adapters/http-adapter';
import {
fastify,
FastifyBaseLogger,
FastifyBodyParser,
FastifyInstance,
@@ -33,6 +32,7 @@ import {
RawServerBase,
RawServerDefault,
RequestGenericInterface,
fastify,
} from 'fastify';
import * as Reply from 'fastify/lib/reply';
import { kRouteContext } from 'fastify/lib/symbols';
@@ -40,10 +40,11 @@ import { RouteShorthandMethod } from 'fastify/types/route';
import * as http2 from 'http2';
import * as https from 'https';
import {
Chain as LightMyRequestChain,
InjectOptions,
Chain as LightMyRequestChain,
Response as LightMyRequestResponse,
} from 'light-my-request';
import * as pathToRegexp from 'path-to-regexp';
// `querystring` is used internally in fastify for registering urlencoded body parser.
import { parse as querystringParse } from 'querystring';
import { NestFastifyBodyParserOptions } from '../interfaces';
@@ -547,11 +548,24 @@ export class FastifyAdapter<
// Fallback to "(.*)" to support plugins like GraphQL
normalizedPath = normalizedPath === '/(.*)' ? '(.*)' : normalizedPath;
const re = pathToRegexp(normalizedPath);
// The following type assertion is valid as we use import('@fastify/middie') rather than require('@fastify/middie')
// ref https://github.com/fastify/middie/pull/55
this.instance.use(
normalizedPath,
callback as Parameters<TInstance['use']>['1'],
(req: any, res: any, next: Function) => {
const queryParamsIndex = req.originalUrl.indexOf('?');
const pathname =
queryParamsIndex >= 0
? req.originalUrl.slice(0, queryParamsIndex)
: req.originalUrl;
if (!re.exec(pathname + '/') && normalizedPath) {
return next();
}
return callback(req, res, next);
},
);
};
}

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/platform-fastify",
"version": "9.4.0",
"version": "9.4.2",
"description": "Nest - modern, fast, powerful node.js web framework (@platform-fastify)",
"author": "Kamil Mysliwiec",
"license": "MIT",
@@ -20,11 +20,11 @@
"dependencies": {
"@fastify/cors": "8.2.1",
"@fastify/formbody": "7.4.0",
"@fastify/middie": "8.1.0",
"fastify": "4.15.0",
"@fastify/middie": "8.3.0",
"fastify": "4.17.0",
"light-my-request": "5.9.1",
"path-to-regexp": "3.2.0",
"tslib": "2.5.0"
"tslib": "2.5.2"
},
"peerDependencies": {
"@fastify/static": "^6.0.0",

View File

@@ -1,11 +1,11 @@
<p align="center">
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
<a href="https://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
</p>
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">A progressive <a href="https://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
@@ -132,7 +132,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td align="center" valign="middle"><a href="https://klqc.de" target="_blank"><img src="https://nestjs.com/img/klcqcl-logo.png" width="120" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://thecasinowizard.com/bonuses/no-deposit-bonuses/" target="_blank"><img src="https://nestjs.com/img/casinowizard-logo.png" width="120" valign="middle" /></a></td></tr><tr>
<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://themobilereality.com/" 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://nordbot.app/" target="_blank"><img src="https://nestjs.com/img/nordbot-logo.png" width="120" valign="middle" /></a></td>

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/platform-socket.io",
"version": "9.4.0",
"version": "9.4.2",
"description": "Nest - modern, fast, powerful node.js web framework (@platform-socket.io)",
"author": "Kamil Mysliwiec",
"license": "MIT",
@@ -19,7 +19,7 @@
},
"dependencies": {
"socket.io": "4.6.1",
"tslib": "2.5.0"
"tslib": "2.5.2"
},
"peerDependencies": {
"@nestjs/common": "^9.0.0",

View File

@@ -1,11 +1,11 @@
<p align="center">
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
<a href="https://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
</p>
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">A progressive <a href="https://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
@@ -132,7 +132,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td align="center" valign="middle"><a href="https://klqc.de" target="_blank"><img src="https://nestjs.com/img/klcqcl-logo.png" width="120" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://thecasinowizard.com/bonuses/no-deposit-bonuses/" target="_blank"><img src="https://nestjs.com/img/casinowizard-logo.png" width="120" valign="middle" /></a></td></tr><tr>
<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://themobilereality.com/" 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://nordbot.app/" target="_blank"><img src="https://nestjs.com/img/nordbot-logo.png" width="120" valign="middle" /></a></td>

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/platform-ws",
"version": "9.4.0",
"version": "9.4.2",
"description": "Nest - modern, fast, powerful node.js web framework (@platform-ws)",
"author": "Kamil Mysliwiec",
"license": "MIT",
@@ -18,7 +18,7 @@
"access": "public"
},
"dependencies": {
"tslib": "2.5.0",
"tslib": "2.5.2",
"ws": "8.13.0"
},
"peerDependencies": {

View File

@@ -1,11 +1,11 @@
<p align="center">
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
<a href="https://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
</p>
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">A progressive <a href="https://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
@@ -132,7 +132,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td align="center" valign="middle"><a href="https://klqc.de" target="_blank"><img src="https://nestjs.com/img/klcqcl-logo.png" width="120" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://thecasinowizard.com/bonuses/no-deposit-bonuses/" target="_blank"><img src="https://nestjs.com/img/casinowizard-logo.png" width="120" valign="middle" /></a></td></tr><tr>
<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://themobilereality.com/" 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://nordbot.app/" target="_blank"><img src="https://nestjs.com/img/nordbot-logo.png" width="120" valign="middle" /></a></td>

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/testing",
"version": "9.4.0",
"version": "9.4.2",
"description": "Nest - modern, fast, powerful node.js web framework (@testing)",
"author": "Kamil Mysliwiec",
"license": "MIT",
@@ -18,7 +18,7 @@
"access": "public"
},
"dependencies": {
"tslib": "2.5.0"
"tslib": "2.5.2"
},
"peerDependencies": {
"@nestjs/common": "^9.0.0",

View File

@@ -1,11 +1,11 @@
<p align="center">
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
<a href="https://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
</p>
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">A progressive <a href="https://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
@@ -132,7 +132,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<td align="center" valign="middle"><a href="https://klqc.de" target="_blank"><img src="https://nestjs.com/img/klcqcl-logo.png" width="120" valign="middle" /></a></td>
<td align="center" valign="middle"><a href="https://thecasinowizard.com/bonuses/no-deposit-bonuses/" target="_blank"><img src="https://nestjs.com/img/casinowizard-logo.png" width="120" valign="middle" /></a></td></tr><tr>
<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://themobilereality.com/" 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://nordbot.app/" target="_blank"><img src="https://nestjs.com/img/nordbot-logo.png" width="120" valign="middle" /></a></td>

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/websockets",
"version": "9.4.0",
"version": "9.4.2",
"description": "Nest - modern, fast, powerful node.js web framework (@websockets)",
"author": "Kamil Mysliwiec",
"license": "MIT",
@@ -15,11 +15,11 @@
"dependencies": {
"iterare": "1.2.1",
"object-hash": "3.0.0",
"tslib": "2.5.0"
"tslib": "2.5.2"
},
"devDependencies": {
"@nestjs/common": "9.4.0",
"@nestjs/core": "9.4.0"
"@nestjs/common": "9.4.2",
"@nestjs/core": "9.4.2"
},
"peerDependencies": {
"@nestjs/common": "^9.0.0",

View File

@@ -1,22 +1,22 @@
<p align="center">
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo_text.svg" width="320" alt="Nest Logo" /></a>
<a href="https://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
</p>
[travis-image]: https://api.travis-ci.org/nestjs/nest.svg?branch=master
[travis-url]: https://travis-ci.org/nestjs/nest
[linux-image]: https://img.shields.io/travis/nestjs/nest/master.svg?label=linux
[linux-url]: https://travis-ci.org/nestjs/nest
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest
<p align="center">用于构建高效且可扩展的服务器端应用程序的渐进式 <a href="http://nodejs.cn" target="blank">Node.js</a> 框架,深受 <a href="https://angular.cn" target="_blank">Angular</a> 的启发。</p>
<p align="center">用于构建高效且可扩展的服务器端应用程序的渐进式 <a href="http://nodejs.cn" target="blank">Node.js</a> 框架,深受 <a href="https://angular.cn" target="_blank">Angular</a> 的启发。</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
<a href="https://travis-ci.org/nestjs/nest"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
<a href="https://travis-ci.org/nestjs/nest"><img src="https://img.shields.io/travis/nestjs/nest/master.svg?label=linux" alt="Linux" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#5" alt="Coverage" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
</p>
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->

View File

@@ -3671,9 +3671,9 @@
}
},
"node_modules/engine.io": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.4.1.tgz",
"integrity": "sha512-JFYQurD/nbsA5BSPmbaOSLa3tSVj8L6o4srSwXXY3NqE+gGUNmmPTbhn8tjzcCtSqhFgIeqef81ngny8JM25hw==",
"version": "6.4.2",
"resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.4.2.tgz",
"integrity": "sha512-FKn/3oMiJjrOEOeUub2WCox6JhxBXq/Zn3fZOMCBxKnNYtsdKjxhl7yR3fZhM9PV+rdE75SU5SYMc+2PGzo+Tg==",
"dependencies": {
"@types/cookie": "^0.4.1",
"@types/cors": "^2.8.12",
@@ -11722,9 +11722,9 @@
}
},
"engine.io": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.4.1.tgz",
"integrity": "sha512-JFYQurD/nbsA5BSPmbaOSLa3tSVj8L6o4srSwXXY3NqE+gGUNmmPTbhn8tjzcCtSqhFgIeqef81ngny8JM25hw==",
"version": "6.4.2",
"resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.4.2.tgz",
"integrity": "sha512-FKn/3oMiJjrOEOeUub2WCox6JhxBXq/Zn3fZOMCBxKnNYtsdKjxhl7yR3fZhM9PV+rdE75SU5SYMc+2PGzo+Tg==",
"requires": {
"@types/cookie": "^0.4.1",
"@types/cors": "^2.8.12",

View File

@@ -1,8 +1,7 @@
### Mongoose sample
### Mongo TypeORM sample
### Installation
`npm install`
### Running
@@ -23,4 +22,4 @@ After running the sample, you can stop the Docker container with
Then, run Nest as usual:
`npm run start`
`npm run start`