Compare commits

...

119 Commits

Author SHA1 Message Date
Kamil Myśliwiec
99b9dda0cf chore(): minor formatting changes 2022-03-01 13:51:33 +01:00
Kamil Myśliwiec
aa0c73fd45 chore(): merge conflicts 2022-03-01 13:45:36 +01:00
Kamil Mysliwiec
874344c60e Merge pull request #9271 from micalevisk/fix/issue-9245
fix(core): use class refs as keys (container)
2022-03-01 13:01:38 +01:00
Kamil Mysliwiec
7df7e3ac47 Merge pull request #9270 from davidschuette/kafka-commit-offsets
feat(microservices): add commit-offsets function to clientkafka
2022-03-01 13:01:27 +01:00
Kamil Mysliwiec
e832503dba Merge pull request #9209 from jeean/feat/catch-decorator
feat(common): add abstract type to catch decorator
2022-03-01 13:00:49 +01:00
Kamil Mysliwiec
aad9137fc6 Merge pull request #9227 from nestjs/feat/optional-factory-deps
feat(core): support optional dependencies in factory providers
2022-03-01 13:00:40 +01:00
Kamil Mysliwiec
c653ed597e Merge pull request #9240 from davidschuette/streamable-file-update
feat(common): extend streamable-file header support
2022-03-01 13:00:26 +01:00
Kamil Mysliwiec
74789fd5c8 Merge pull request #9247 from brian-pinwheel/brian-tq-fix-middleware
fix(common): Providing typing for optional error handling in middleware
2022-03-01 13:00:20 +01:00
Kamil Mysliwiec
9911e0fb8b Merge pull request #9200 from guiruiz/kafka-serializer-input
feat(microservices): Add options param to serializer
2022-03-01 12:59:52 +01:00
Kamil Mysliwiec
5ede2867e6 Merge pull request #9274 from nestjs/dependabot/npm_and_yarn/mongoose-6.2.4
chore(deps-dev): bump mongoose from 6.2.3 to 6.2.4
2022-03-01 12:48:58 +01:00
Kamil Mysliwiec
350d4cf743 Merge pull request #9275 from nestjs/dependabot/npm_and_yarn/types/cache-manager-3.4.3
chore(deps-dev): bump @types/cache-manager from 3.4.2 to 3.4.3
2022-03-01 12:48:44 +01:00
dependabot[bot]
23d034f7b7 chore(deps-dev): bump @types/cache-manager from 3.4.2 to 3.4.3
Bumps [@types/cache-manager](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/cache-manager) from 3.4.2 to 3.4.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/cache-manager)

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

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

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-01 00:07:56 +00:00
Micael Levi (@micalevisk)
d38a592ef0 test(integration): add tests for self-injections providers 2022-02-28 18:21:26 -04:00
Micael Levi L. Cavalcante
6e1243951f fix(core): use class refs as keys (container)
Refs: commit cc6d48b4c
2022-02-28 12:33:39 -04:00
David Schütte
2ff8f702d8 feat(microservices): add commit-offsets function to clientkafka
This commit closes issue #9258.
2022-02-28 14:50:35 +01:00
Kamil Mysliwiec
342649a0f5 Merge pull request #9250 from nestjs/dependabot/npm_and_yarn/nestjs/apollo-10.0.5
chore(deps-dev): bump @nestjs/apollo from 10.0.4 to 10.0.5
2022-02-28 13:12:04 +01:00
dependabot[bot]
ce5cbba47e chore(deps-dev): bump @nestjs/apollo from 10.0.4 to 10.0.5
Bumps [@nestjs/apollo](https://github.com/nestjs/graphql) from 10.0.4 to 10.0.5.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.4...v10.0.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-28 09:23:53 +00:00
Kamil Mysliwiec
8e2ce7103c Merge pull request #9251 from nestjs/dependabot/npm_and_yarn/types/node-17.0.21
chore(deps-dev): bump @types/node from 17.0.18 to 17.0.21
2022-02-28 10:16:11 +01:00
Kamil Mysliwiec
0c83078e0c Merge pull request #9252 from nestjs/dependabot/npm_and_yarn/fastify-cors-6.0.3
chore(deps): bump fastify-cors from 6.0.2 to 6.0.3
2022-02-28 10:16:06 +01:00
Kamil Mysliwiec
38ed8175f9 Merge pull request #9253 from nestjs/dependabot/npm_and_yarn/nestjs/graphql-10.0.5
chore(deps-dev): bump @nestjs/graphql from 10.0.4 to 10.0.5
2022-02-28 10:15:33 +01:00
Kamil Mysliwiec
3a3a29438e Merge pull request #9254 from nestjs/dependabot/npm_and_yarn/typeorm-0.2.44
chore(deps-dev): bump typeorm from 0.2.43 to 0.2.44
2022-02-28 10:15:23 +01:00
Kamil Mysliwiec
1ade6f30c3 Merge pull request #9259 from nestjs/dependabot/npm_and_yarn/types/ws-8.5.1
chore(deps-dev): bump @types/ws from 8.2.3 to 8.5.1
2022-02-28 10:15:19 +01:00
Kamil Mysliwiec
559bf7d7b0 Merge pull request #9260 from nestjs/dependabot/npm_and_yarn/grpc/grpc-js-1.5.7
chore(deps-dev): bump @grpc/grpc-js from 1.5.5 to 1.5.7
2022-02-28 10:15:13 +01:00
Kamil Mysliwiec
afd4413cae Merge pull request #9267 from nestjs/dependabot/npm_and_yarn/url-parse-1.5.10
chore(deps): bump url-parse from 1.5.6 to 1.5.10
2022-02-28 10:15:06 +01:00
Kamil Mysliwiec
9a78617503 Merge pull request #9249 from nestjs/renovate/nestjs-schematics-8.x
chore(deps): update dependency @nestjs/schematics to v8.0.7
2022-02-28 10:14:52 +01:00
dependabot[bot]
7b0d79f3fe chore(deps): bump url-parse from 1.5.6 to 1.5.10
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.6 to 1.5.10.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.6...1.5.10)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-28 04:17:03 +00:00
Renovate Bot
410fa966ce chore(deps): update dependency @nestjs/schematics to v8.0.7 2022-02-28 02:03:58 +00:00
dependabot[bot]
ecce78a1a8 chore(deps-dev): bump @grpc/grpc-js from 1.5.5 to 1.5.7
Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.5.5 to 1.5.7.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/grpc-js@1.5.5...@grpc/grpc-js@1.5.7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-25 00:10:02 +00:00
dependabot[bot]
dcffa9e9e4 chore(deps-dev): bump @types/ws from 8.2.3 to 8.5.1
Bumps [@types/ws](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ws) from 8.2.3 to 8.5.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ws)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-25 00:07:59 +00:00
dependabot[bot]
4aed61f6dc chore(deps-dev): bump typeorm from 0.2.43 to 0.2.44
Bumps [typeorm](https://github.com/typeorm/typeorm) from 0.2.43 to 0.2.44.
- [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.2.43...0.2.44)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-24 00:10:56 +00:00
dependabot[bot]
b05dcf2a76 chore(deps-dev): bump @nestjs/graphql from 10.0.4 to 10.0.5
Bumps [@nestjs/graphql](https://github.com/nestjs/graphql) from 10.0.4 to 10.0.5.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.4...v10.0.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-24 00:09:23 +00:00
dependabot[bot]
e5465a0c49 chore(deps): bump fastify-cors from 6.0.2 to 6.0.3
Bumps [fastify-cors](https://github.com/fastify/fastify-cors) from 6.0.2 to 6.0.3.
- [Release notes](https://github.com/fastify/fastify-cors/releases)
- [Commits](https://github.com/fastify/fastify-cors/compare/v6.0.2...v6.0.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-24 00:07:32 +00:00
dependabot[bot]
080142d148 chore(deps-dev): bump @types/node from 17.0.18 to 17.0.21
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.18 to 17.0.21.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-24 00:06:06 +00:00
David Schütte
9ca2a9a172 feat(common): add length header to streamable-file
Provide option to specify content-length headers when using StreamableFile.
No need to access the native response object.

BREAKING CHANGE: not specifying content-disposition header and
StreamableFile option disposition would send header value 'null'
instead of not sending the header at all.
This changes to not sending the header if no value is specified.
This commit closes issue #9229.
2022-02-23 11:13:59 +01:00
Brian Bauman
730e497937 fix(common): Providing typing for optional error handling in middleware 2022-02-22 23:58:05 -06:00
Kamil Mysliwiec
a576a0b857 Merge pull request #9244 from nestjs/dependabot/npm_and_yarn/mongoose-6.2.3
chore(deps-dev): bump mongoose from 6.2.2 to 6.2.3
2022-02-22 09:19:37 +01:00
Kamil Mysliwiec
6499c83a0c Merge pull request #9242 from nestjs/renovate/babel-monorepo
chore(deps): update dependency @babel/cli to v7.17.6
2022-02-22 09:19:32 +01:00
Kamil Mysliwiec
392d84e6d6 Merge pull request #9241 from yevgeniypak/websockets-pingtimeout-default-value
docs(websockets): update GatewayMetadata pingTimeout default value to 20000 ms
2022-02-22 09:16:02 +01:00
Yevgeniy
7759ba56ca docs(websockets): add numeric separators to numeric literals 2022-02-22 11:50:16 +06:00
Renovate Bot
4eef8f473c chore(deps): update dependency @babel/cli to v7.17.6 2022-02-22 05:42:45 +00:00
dependabot[bot]
d653236e16 chore(deps-dev): bump mongoose from 6.2.2 to 6.2.3
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.2.2 to 6.2.3.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/6.2.2...6.2.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-22 00:09:54 +00:00
Yevgeniy
47a1db26c6 docs(websockets): update GatewayMetadata pingTimeout default value to 20000 ms 2022-02-22 02:58:55 +06:00
David Schütte
c8ff569985 feat(common): extend streamable-file header support
Provide option to specify additional headers when using StreamableFile.
No need to access the native response option.

BREAKING CHANGE: not specifying content-disposition header and
StreamableFile option disposition would send header value 'null'
instead of not sending the header at all.
This changes to not sending the header if no value is specified.
This commit closes issue #9229.
2022-02-21 17:58:37 +01:00
Kamil Mysliwiec
78ca731631 Merge pull request #9237 from nestjs/dependabot/npm_and_yarn/nestjs/graphql-10.0.4
chore(deps-dev): bump @nestjs/graphql from 10.0.3 to 10.0.4
2022-02-21 13:02:32 +01:00
Kamil Myśliwiec
19ea1c2f35 test(): add more tests around optional factory dependency 2022-02-21 10:20:06 +01:00
Kamil Myśliwiec
42861828d9 fix(core): fix optional factory provider condition 2022-02-21 10:19:48 +01:00
dependabot[bot]
038e2146ed chore(deps-dev): bump @nestjs/graphql from 10.0.3 to 10.0.4
Bumps [@nestjs/graphql](https://github.com/nestjs/graphql) from 10.0.3 to 10.0.4.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Changelog](https://github.com/nestjs/graphql/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.3...v10.0.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 08:25:27 +00:00
Kamil Mysliwiec
4a45709916 Merge pull request #9233 from nestjs/dependabot/npm_and_yarn/object-hash-3.0.0
chore(deps): bump object-hash from 2.2.0 to 3.0.0
2022-02-21 09:19:19 +01:00
Kamil Mysliwiec
789cb3a2d1 Merge pull request #9238 from nestjs/dependabot/npm_and_yarn/mocha-9.2.1
chore(deps-dev): bump mocha from 9.2.0 to 9.2.1
2022-02-21 09:19:09 +01:00
Kamil Mysliwiec
1287c5cda2 Merge pull request #9236 from nestjs/dependabot/npm_and_yarn/nestjs/apollo-10.0.4
chore(deps-dev): bump @nestjs/apollo from 10.0.3 to 10.0.4
2022-02-21 09:18:57 +01:00
Kamil Mysliwiec
2d7192f4c1 Merge pull request #9235 from nestjs/dependabot/npm_and_yarn/fastify-3.27.2
chore(deps): bump fastify from 3.27.1 to 3.27.2
2022-02-21 09:18:51 +01:00
Kamil Mysliwiec
13c998d411 Merge pull request #9234 from nestjs/dependabot/npm_and_yarn/eslint-config-prettier-8.4.0
chore(deps-dev): bump eslint-config-prettier from 8.3.0 to 8.4.0
2022-02-21 09:18:46 +01:00
Kamil Mysliwiec
067cb0e3cb Merge pull request #9232 from nestjs/dependabot/npm_and_yarn/types/ws-8.2.3
chore(deps-dev): bump @types/ws from 8.2.2 to 8.2.3
2022-02-21 09:18:35 +01:00
dependabot[bot]
6d4850762b chore(deps-dev): bump mocha from 9.2.0 to 9.2.1
Bumps [mocha](https://github.com/mochajs/mocha) from 9.2.0 to 9.2.1.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v9.2.0...v9.2.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 00:24:46 +00:00
dependabot[bot]
50c8f8f092 chore(deps-dev): bump @nestjs/apollo from 10.0.3 to 10.0.4
Bumps [@nestjs/apollo](https://github.com/nestjs/graphql) from 10.0.3 to 10.0.4.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Changelog](https://github.com/nestjs/graphql/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.3...v10.0.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 00:18:19 +00:00
dependabot[bot]
0cd5bb6747 chore(deps): bump fastify from 3.27.1 to 3.27.2
Bumps [fastify](https://github.com/fastify/fastify) from 3.27.1 to 3.27.2.
- [Release notes](https://github.com/fastify/fastify/releases)
- [Commits](https://github.com/fastify/fastify/compare/v3.27.1...v3.27.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 00:14:11 +00:00
dependabot[bot]
3333e991fa chore(deps-dev): bump eslint-config-prettier from 8.3.0 to 8.4.0
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.3.0 to 8.4.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.3.0...v8.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 00:12:10 +00:00
dependabot[bot]
55b731070f chore(deps): bump object-hash from 2.2.0 to 3.0.0
Bumps [object-hash](https://github.com/puleos/object-hash) from 2.2.0 to 3.0.0.
- [Release notes](https://github.com/puleos/object-hash/releases)
- [Commits](https://github.com/puleos/object-hash/compare/v2.2.0...v3.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 00:09:03 +00:00
dependabot[bot]
95cd73cbb4 chore(deps-dev): bump @types/ws from 8.2.2 to 8.2.3
Bumps [@types/ws](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ws) from 8.2.2 to 8.2.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ws)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-21 00:06:59 +00:00
Kamil Myśliwiec
6136e46419 feat(core): support optional dependencies in factory providers 2022-02-18 16:59:24 +01:00
Kamil Myśliwiec
722b651228 test(microservices): bump timeouts for mqtt integration tests 2022-02-18 16:58:46 +01:00
Kamil Myśliwiec
9f5c777f7b chore(): cleanup 2022-02-18 13:36:00 +01:00
Kamil Myśliwiec
273670dc90 Merge branch 'master' of https://github.com/nestjs/nest 2022-02-18 13:34:23 +01:00
Kamil Myśliwiec
8481539ef0 chore(): update package.json 2022-02-18 13:34:13 +01:00
Kamil Mysliwiec
2653902cd0 Merge pull request #9219 from nestjs/dependabot/npm_and_yarn/nestjs/apollo-10.0.3
chore(deps-dev): bump @nestjs/apollo from 10.0.2 to 10.0.3
2022-02-18 13:13:13 +01:00
Kamil Myśliwiec
4965e6c71e Merge branch 'master' of https://github.com/nestjs/nest 2022-02-18 13:13:00 +01:00
Kamil Myśliwiec
8357bebe5a chore(): update package.json, add new label configuration 2022-02-18 13:12:53 +01:00
Kamil Mysliwiec
87db276afd Merge pull request #9224 from nestjs/renovate/npm-url-parse-vulnerability
chore(deps): update dependency url-parse to 1.5.6 [security]
2022-02-18 11:23:04 +01:00
Kamil Mysliwiec
52c2feacbe Merge pull request #9215 from Parsath/patch-1
docs(): fix grammar typo in readme.md
2022-02-18 10:46:48 +01:00
Renovate Bot
030718b3ca chore(deps): update dependency url-parse to 1.5.6 [security] 2022-02-18 09:43:37 +00:00
Bilel Taktak
c95733b7ea docs(): fix grammar typo in readme.md
docs(): fix grammar typo on readme.md

change sentence in line 57 from:
`It can grow thanks to the sponsors and support **of** the amazing backers`
to
`It can grow thanks to the sponsors and support **from** the amazing backers`
2022-02-18 10:15:10 +01:00
dependabot[bot]
b8ee86ec68 chore(deps-dev): bump @nestjs/apollo from 10.0.2 to 10.0.3
Bumps [@nestjs/apollo](https://github.com/nestjs/graphql) from 10.0.2 to 10.0.3.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Changelog](https://github.com/nestjs/graphql/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.2...v10.0.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-18 08:38:23 +00:00
Kamil Mysliwiec
f3c8c61aea Merge pull request #9221 from nestjs/dependabot/npm_and_yarn/light-my-request-4.8.0
chore(deps): bump light-my-request from 4.7.1 to 4.8.0
2022-02-18 09:32:49 +01:00
Kamil Mysliwiec
0013296335 Merge pull request #9220 from nestjs/dependabot/npm_and_yarn/typeorm-0.2.43
chore(deps-dev): bump typeorm from 0.2.42 to 0.2.43
2022-02-18 09:32:43 +01:00
Kamil Mysliwiec
6c3f63fa38 Merge pull request #9218 from nestjs/dependabot/npm_and_yarn/express-4.17.3
chore(deps): bump express from 4.17.2 to 4.17.3
2022-02-18 09:32:35 +01:00
Kamil Mysliwiec
311aea42d9 Merge pull request #9217 from nestjs/dependabot/npm_and_yarn/mqtt-4.3.6
chore(deps-dev): bump mqtt from 4.3.5 to 4.3.6
2022-02-18 09:32:29 +01:00
Kamil Mysliwiec
1cc3028566 Merge pull request #9216 from nestjs/dependabot/npm_and_yarn/nestjs/graphql-10.0.3
chore(deps-dev): bump @nestjs/graphql from 10.0.2 to 10.0.3
2022-02-18 09:32:24 +01:00
Kamil Mysliwiec
89aa2cae59 Merge pull request #9214 from nestjs/renovate/babel-monorepo
chore(deps): update dependency @babel/core to v7.17.5
2022-02-18 09:32:11 +01:00
Renovate Bot
8612121842 chore(deps): update dependency @babel/core to v7.17.5 2022-02-18 06:20:05 +00:00
dependabot[bot]
f40e15051e chore(deps): bump light-my-request from 4.7.1 to 4.8.0
Bumps [light-my-request](https://github.com/fastify/light-my-request) from 4.7.1 to 4.8.0.
- [Release notes](https://github.com/fastify/light-my-request/releases)
- [Commits](https://github.com/fastify/light-my-request/compare/v4.7.1...v4.8.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-18 00:15:43 +00:00
dependabot[bot]
3f627298a6 chore(deps-dev): bump typeorm from 0.2.42 to 0.2.43
Bumps [typeorm](https://github.com/typeorm/typeorm) from 0.2.42 to 0.2.43.
- [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.2.42...0.2.43)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-18 00:13:48 +00:00
dependabot[bot]
82beb6e5a9 chore(deps): bump express from 4.17.2 to 4.17.3
Bumps [express](https://github.com/expressjs/express) from 4.17.2 to 4.17.3.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.17.2...4.17.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-18 00:08:45 +00:00
dependabot[bot]
ca83ce4aab chore(deps-dev): bump mqtt from 4.3.5 to 4.3.6
Bumps [mqtt](https://github.com/mqttjs/MQTT.js) from 4.3.5 to 4.3.6.
- [Release notes](https://github.com/mqttjs/MQTT.js/releases)
- [Changelog](https://github.com/mqttjs/MQTT.js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mqttjs/MQTT.js/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-18 00:07:23 +00:00
dependabot[bot]
5045153d88 chore(deps-dev): bump @nestjs/graphql from 10.0.2 to 10.0.3
Bumps [@nestjs/graphql](https://github.com/nestjs/graphql) from 10.0.2 to 10.0.3.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Changelog](https://github.com/nestjs/graphql/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.2...v10.0.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-18 00:05:11 +00:00
Bilel Taktak
16a263b998 docs(): fix grammar typo on readme.md
docs(): fix grammar typo on readme.md

change sentence in line 57 from:
`It can grow thanks to the sponsors and support **by** the amazing backers`
to
`It can grow thanks to the sponsors and support **of** the amazing backers`
2022-02-18 00:06:46 +01:00
Kamil Mysliwiec
d5eb20b73c Merge pull request #9210 from nestjs/dependabot/npm_and_yarn/mongoose-6.2.2
chore(deps-dev): bump mongoose from 6.2.1 to 6.2.2
2022-02-17 13:34:54 +01:00
Kamil Mysliwiec
e61df94d7c Merge pull request #9211 from nestjs/dependabot/npm_and_yarn/core-js-3.21.1
chore(deps-dev): bump core-js from 3.21.0 to 3.21.1
2022-02-17 13:34:34 +01:00
Kamil Mysliwiec
06e78d1699 Merge pull request #9212 from nestjs/dependabot/npm_and_yarn/typeorm-0.2.42
chore(deps-dev): bump typeorm from 0.2.41 to 0.2.42
2022-02-17 13:34:29 +01:00
Kamil Mysliwiec
0a7244095b Merge pull request #9213 from nestjs/dependabot/npm_and_yarn/body-parser-1.19.2
chore(deps): bump body-parser from 1.19.1 to 1.19.2
2022-02-17 13:34:26 +01:00
Kamil Mysliwiec
2be79b278f Merge pull request #9204 from TomerRon/sample(02-gateways)/fix-redis-adapter
sample(02-gateways): Fix Redis adapter
2022-02-17 13:33:38 +01:00
Tomer Ron
ff66f4cf8e docs(sample-02-gateways): remove redis adapter, add documentation on how to add the redis adapter 2022-02-17 13:07:33 +01:00
dependabot[bot]
bc06b6f813 chore(deps): bump body-parser from 1.19.1 to 1.19.2
Bumps [body-parser](https://github.com/expressjs/body-parser) from 1.19.1 to 1.19.2.
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/body-parser/compare/1.19.1...1.19.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-17 00:16:59 +00:00
dependabot[bot]
09277ada56 chore(deps-dev): bump typeorm from 0.2.41 to 0.2.42
Bumps [typeorm](https://github.com/typeorm/typeorm) from 0.2.41 to 0.2.42.
- [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.2.41...0.2.42)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-17 00:12:23 +00:00
dependabot[bot]
d568de3627 chore(deps-dev): bump core-js from 3.21.0 to 3.21.1
Bumps [core-js](https://github.com/zloirock/core-js) from 3.21.0 to 3.21.1.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/compare/v3.21.0...v3.21.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-17 00:10:26 +00:00
dependabot[bot]
58aeccf607 chore(deps-dev): bump mongoose from 6.2.1 to 6.2.2
Bumps [mongoose](https://github.com/Automattic/mongoose) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/Automattic/mongoose/releases)
- [Changelog](https://github.com/Automattic/mongoose/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Automattic/mongoose/compare/6.2.1...6.2.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-17 00:08:37 +00:00
Jeean
60c2551b42 feat(common): add abstract type to catch decorator 2022-02-17 02:09:23 +09:00
Kamil Myśliwiec
33b601cf0f build(): remove useUnknownInCatchVariables flag 2022-02-16 14:11:38 +01:00
Kamil Myśliwiec
813feec8c9 chore(@nestjs) publish v8.3.1 release 2022-02-16 13:49:13 +01:00
Kamil Myśliwiec
53df661a85 build(): remove useUnknownInCatchVariables flag 2022-02-16 13:48:01 +01:00
Kamil Myśliwiec
33cfad478a chore(): downgrade typescript version #8320 2022-02-16 13:47:16 +01:00
Kamil Mysliwiec
f9f8a1a8de Merge pull request #9207 from nestjs/renovate/babel-monorepo
chore(deps): update babel monorepo
2022-02-16 13:45:22 +01:00
Kamil Mysliwiec
5544fb05e9 Merge pull request #9206 from nestjs/renovate/node-16.x
chore(deps): update dependency @types/node to v16.11.25
2022-02-16 13:45:10 +01:00
Renovate Bot
246d217e67 chore(deps): update dependency @types/node to v16.11.25 2022-02-16 11:25:38 +00:00
Renovate Bot
457caa0b84 chore(deps): update babel monorepo 2022-02-16 10:58:54 +00:00
Tomer Ron
52d47f8459 docs(sample-02-gateways): fix redis adapter 2022-02-15 12:11:12 +01:00
Kamil Mysliwiec
d295f1c572 Merge pull request #9202 from nestjs/renovate/bull-3.x
chore(deps): update dependency @types/bull to v3.15.8
2022-02-15 11:22:25 +01:00
Renovate Bot
0fecd7f1c6 chore(deps): update dependency @types/bull to v3.15.8 2022-02-15 10:04:23 +00:00
Kamil Mysliwiec
07e52a9df1 Update Readme.md 2022-02-15 10:48:26 +01:00
Guilherme Ruiz
518c5d8b15 feat(microservices): Add options param to serializer 2022-02-15 20:33:28 +11:00
Kamil Mysliwiec
092da8c721 Merge pull request #9197 from nestjs/dependabot/npm_and_yarn/nestjs/apollo-10.0.2
chore(deps-dev): bump @nestjs/apollo from 10.0.0 to 10.0.2
2022-02-15 09:46:03 +01:00
Kamil Mysliwiec
a681cf1f87 Merge pull request #9196 from nestjs/dependabot/npm_and_yarn/nats-2.6.1
chore(deps-dev): bump nats from 2.6.0 to 2.6.1
2022-02-15 09:45:55 +01:00
Kamil Mysliwiec
e80e687010 Merge pull request #9195 from nestjs/dependabot/npm_and_yarn/types/node-17.0.18
chore(deps-dev): bump @types/node from 17.0.17 to 17.0.18
2022-02-15 09:45:46 +01:00
dependabot[bot]
12c317a421 chore(deps-dev): bump @nestjs/apollo from 10.0.0 to 10.0.2
Bumps [@nestjs/apollo](https://github.com/nestjs/graphql) from 10.0.0 to 10.0.2.
- [Release notes](https://github.com/nestjs/graphql/releases)
- [Changelog](https://github.com/nestjs/graphql/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nestjs/graphql/compare/v10.0.0...v10.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-15 00:09:58 +00:00
dependabot[bot]
5d73eed928 chore(deps-dev): bump nats from 2.6.0 to 2.6.1
Bumps [nats](https://github.com/nats-io/nats.js) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/nats-io/nats.js/releases)
- [Commits](https://github.com/nats-io/nats.js/compare/v2.6.0...v2.6.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-15 00:06:37 +00:00
dependabot[bot]
6e5092b410 chore(deps-dev): bump @types/node from 17.0.17 to 17.0.18
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.17 to 17.0.18.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-15 00:03:55 +00:00
Kamil Mysliwiec
ea4e4ecdfb Merge pull request #9189 from nestjs/renovate/node-16.x
chore(deps): update dependency @types/node to v16.11.24
2022-02-14 15:04:11 +01:00
Renovate Bot
1777c3dcdb chore(deps): update dependency @types/node to v16.11.24 2022-02-14 12:45:25 +00:00
wiltshir
6ec6f3535e feat(common): Add custom versioning support
Specifically, addes a 'Custom' VersioningType that allows for an
extractor function to be provided that receives the Request object
(either Express or Fastify) and returns a string or array of strings
pulled from said request. Examples include extracting custom header
values, URL params, POST request bodies, and more.

Fixes #8441
2021-12-13 18:39:37 -08:00
143 changed files with 3491 additions and 1219 deletions

View File

@@ -54,7 +54,7 @@ With official support, you can get expert help straight from Nest core team. We
## Support
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support from the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
#### Principal Sponsors
<table style="text-align:center;"><tr>
@@ -123,6 +123,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<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://boringowl.io/" target="_blank"><img src="https://nestjs.com/img/boringowl-logo.svg" width="120" valign="middle" /></a></td>
</tr></table>
## Backers

View File

@@ -1,7 +1,10 @@
import { RuntimeException } from '@nestjs/core/errors/exceptions/runtime.exception';
import { UnknownDependenciesException } from '@nestjs/core/errors/exceptions/unknown-dependencies.exception';
import { UnknownExportException } from '@nestjs/core/errors/exceptions/unknown-export.exception';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
import * as chai from 'chai';
import * as chaiAsPromised from 'chai-as-promised';
import {
DYNAMIC_TOKEN,
DYNAMIC_VALUE,
@@ -9,6 +12,13 @@ import {
} from '../src/dynamic/dynamic.module';
import { ExportsModule } from '../src/exports/exports.module';
import { InjectModule } from '../src/inject/inject.module';
import { InjectSameNameModule } from '../src/inject/inject-same-name.module';
import {
SelfInjectionProviderModule,
SelfInjectionProviderCustomTokenModule,
SelfInjectionForwardProviderModule,
} from '../src/self-injection/self-injection-provider.module';
chai.use(chaiAsPromised);
describe('Injector', () => {
describe('when "providers" and "exports" properties are inconsistent', () => {
@@ -24,6 +34,16 @@ describe('Injector', () => {
});
});
describe("When class injects a provider with the same as class's name", () => {
it('should compile with success', async () => {
const builder = Test.createTestingModule({
imports: [InjectSameNameModule],
});
await expect(builder.compile()).to.eventually.be.fulfilled;
});
});
describe('when Nest cannot resolve dependencies', () => {
it(`should fail with "RuntimeException"`, async () => {
try {
@@ -35,6 +55,42 @@ describe('Injector', () => {
expect(err).to.be.instanceof(RuntimeException);
}
});
describe('due to self-injection providers', () => {
it('should fail with "UnknownDependenciesException" due to self-injection via same class reference', async () => {
const builder = Test.createTestingModule({
imports: [SelfInjectionProviderModule],
});
await expect(
builder.compile(),
).to.eventually.be.rejected.and.be.an.instanceOf(
UnknownDependenciesException,
);
});
it('should fail with "UnknownDependenciesException" due to self-injection via forwardRef to the same class reference', async () => {
const builder = Test.createTestingModule({
imports: [SelfInjectionForwardProviderModule],
});
await expect(
builder.compile(),
).to.eventually.be.rejected.and.be.an.instanceOf(
UnknownDependenciesException,
);
});
it('should fail with "UnknownDependenciesException" due to self-injection via custom provider', async () => {
const builder = Test.createTestingModule({
imports: [SelfInjectionProviderCustomTokenModule],
});
await expect(
builder.compile(),
).to.eventually.be.rejected.and.be.an.instanceOf(
UnknownDependenciesException,
);
});
});
});
describe('when dynamic module', () => {

View File

@@ -0,0 +1,96 @@
import { UnknownDependenciesException } from '@nestjs/core/errors/exceptions/unknown-dependencies.exception';
import { Test } from '@nestjs/testing';
import { expect } from 'chai';
describe('Optional factory provider deps', () => {
describe('when dependency is optional', () => {
describe('and it is available', () => {
it('then it should be injected into the factory function', async () => {
const defaultValue = 'DEFAULT_VALUE';
const moduleRef = await Test.createTestingModule({
providers: [
{
provide: 'FACTORY',
useFactory: dep => dep ?? defaultValue,
inject: [{ token: 'MISSING_DEP', optional: true }],
},
{ provide: 'MISSING_DEP', useValue: 'OPTIONAL_DEP_VALUE' },
],
}).compile();
const factoryProvider = moduleRef.get('FACTORY');
expect(factoryProvider).to.equal('OPTIONAL_DEP_VALUE');
});
});
describe('otherwise', () => {
it('"undefined" should be injected into the factory function', async () => {
const defaultValue = 'DEFAULT_VALUE';
const moduleRef = await Test.createTestingModule({
providers: [
{
provide: 'FACTORY',
useFactory: dep => dep ?? defaultValue,
inject: [{ token: 'MISSING_DEP', optional: true }],
},
],
}).compile();
const factoryProvider = moduleRef.get('FACTORY');
expect(factoryProvider).to.equal(defaultValue);
});
});
});
describe('otherwise', () => {
describe('and dependency is not registered', () => {
it('should error out', async () => {
try {
const builder = Test.createTestingModule({
providers: [
{
provide: 'FACTORY',
useFactory: () => 'RETURNED_VALUE',
inject: ['MISSING_DEP'],
},
],
});
await builder.compile();
} catch (err) {
expect(err).to.be.instanceOf(UnknownDependenciesException);
}
});
});
});
describe('and dependency is registered but it cannot be instantiated', () => {
it('should error out', async () => {
try {
const builder = Test.createTestingModule({
providers: [
{
provide: 'POSSIBLY_MISSING_DEP',
useFactory: () => null,
inject: ['MISSING_DEP'],
},
{
provide: 'FACTORY',
useFactory: () => 'RETURNED_VALUE',
inject: [{ token: 'POSSIBLY_MISSING_DEP', optional: false }],
},
],
});
await builder.compile();
} catch (err) {
expect(err).to.be.instanceOf(UnknownDependenciesException);
expect(err.message).to
.equal(`Nest can't resolve dependencies of the POSSIBLY_MISSING_DEP (?). Please make sure that the argument MISSING_DEP at index [0] is available in the RootTestModule context.
Potential solutions:
- If MISSING_DEP is a provider, is it part of the current RootTestModule?
- If MISSING_DEP is exported from a separate @Module, is that module imported within RootTestModule?
@Module({
imports: [ /* the Module containing MISSING_DEP */ ]
})
`);
}
});
});
});

View File

@@ -0,0 +1,16 @@
import { Module, Injectable, Inject } from '@nestjs/common';
@Injectable()
class CoreService {
constructor(@Inject(CoreService.name) private readonly coreService: any) {}
}
@Module({
providers: [
{
provide: CoreService.name,
useValue: 'anything',
},
],
})
export class InjectSameNameModule {}

View File

@@ -0,0 +1,40 @@
import { Module, Injectable, Inject, forwardRef } from '@nestjs/common';
@Injectable()
class ServiceInjectingItself {
constructor(private readonly coreService: ServiceInjectingItself) {}
}
@Injectable()
class ServiceInjectingItselfForwared {
constructor(
@Inject(forwardRef(() => ServiceInjectingItself))
private readonly coreService: ServiceInjectingItself,
) {}
}
@Injectable()
class ServiceInjectingItselfViaCustomToken {
constructor(@Inject('AnotherToken') private readonly coreService: any) {}
}
@Module({
providers: [ServiceInjectingItself],
})
export class SelfInjectionProviderModule {}
@Module({
providers: [ServiceInjectingItselfForwared],
})
export class SelfInjectionForwardProviderModule {}
@Module({
providers: [
ServiceInjectingItselfViaCustomToken,
{
provide: 'AnotherToken',
useClass: ServiceInjectingItselfViaCustomToken,
},
],
})
export class SelfInjectionProviderCustomTokenModule {}

View File

@@ -47,7 +47,7 @@ describe('MQTT transport', () => {
.post('/?command=streamSum')
.send([1, 2, 3, 4, 5])
.expect(200, '15');
});
}).timeout(5000);
it(`/POST (concurrent)`, function () {
return request(server)
@@ -72,7 +72,7 @@ describe('MQTT transport', () => {
.post('/stream')
.send([1, 2, 3, 4, 5])
.expect(200, '15');
});
}).timeout(5000);
it(`/POST (event notification)`, done => {
request(server)

View File

@@ -9,7 +9,8 @@ import { join } from 'path';
import * as request from 'supertest';
import { AppModule } from '../src/app.module';
const readmeString = readFileSync(join(process.cwd(), 'Readme.md')).toString();
const readme = readFileSync(join(process.cwd(), 'Readme.md'));
const readmeString = readme.toString();
describe('Express FileSend', () => {
let app: NestExpressApplication;
@@ -53,12 +54,13 @@ describe('Express FileSend', () => {
expect(res.body.toString()).to.be.eq(readmeString);
});
});
it('should return a file with correct content type and disposition', async () => {
it('should return a file with correct headers', async () => {
return request(app.getHttpServer())
.get('/file/with/headers')
.expect(200)
.expect('Content-Type', 'text/markdown')
.expect('Content-Disposition', 'attachment; filename="Readme.md"')
.expect('Content-Length', readme.byteLength.toString())
.expect(res => {
expect(res.text).to.be.eq(readmeString);
});

View File

@@ -8,7 +8,8 @@ import { readFileSync } from 'fs';
import { join } from 'path';
import { AppModule } from '../src/app.module';
const readmeString = readFileSync(join(process.cwd(), 'Readme.md')).toString();
const readme = readFileSync(join(process.cwd(), 'Readme.md'));
const readmeString = readme.toString();
describe('Fastify FileSend', () => {
let app: NestFastifyApplication;
@@ -67,4 +68,17 @@ describe('Fastify FileSend', () => {
expect(payload.toString()).to.be.eq(readmeString);
});
});
it('should return a file with correct headers', async () => {
return app
.inject({ url: '/file/with/headers', method: 'get' })
.then(({ statusCode, headers, payload }) => {
expect(statusCode).to.equal(200);
expect(headers['content-type']).to.equal('text/markdown');
expect(headers['content-disposition']).to.equal(
'attachment; filename="Readme.md"',
);
expect(headers['content-length']).to.equal(readme.byteLength);
expect(payload).to.equal(readmeString);
});
});
});

View File

@@ -25,11 +25,13 @@ export class AppService {
}
getFileWithHeaders(): StreamableFile {
const file = readFileSync(join(process.cwd(), 'Readme.md'));
return new StreamableFile(
createReadStream(join(process.cwd(), 'Readme.md')),
{
type: 'text/markdown',
disposition: 'attachment; filename="Readme.md"',
length: file.byteLength,
},
);
}

View File

@@ -0,0 +1,967 @@
import { INestApplication, VersioningType } from '@nestjs/common';
import {
FastifyAdapter,
NestFastifyApplication,
} from '@nestjs/platform-fastify';
import { Test } from '@nestjs/testing';
import { FastifyRequest } from 'fastify';
import * as request from 'supertest';
import { AppModule } from '../src/app.module';
describe('Custom Versioning (fastify)', () => {
const extractor = (request: FastifyRequest): string | string[] => {
const versions = [request.headers['accept'] ?? '']
.flatMap(v => v.split(','))
.map(header => header.match(/v(\d+\.?\d*)\+json$/))
.filter(match => match && match.length)
.map(matchArray => matchArray[1])
.sort()
.reverse();
return versions;
};
let app: INestApplication;
// ======================================================================== //
describe('without global default version', () => {
before(async () => {
const moduleRef = await Test.createTestingModule({
imports: [AppModule],
}).compile();
app = moduleRef.createNestApplication<NestFastifyApplication>(
new FastifyAdapter(),
);
app.enableVersioning({
type: VersioningType.CUSTOM,
extractor,
});
await app.init();
await app.getHttpAdapter().getInstance().ready();
});
describe('GET /', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Hello World V1!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Hello World V2!');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Hello World V2!');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Hello World V2!');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/').expect(404);
});
});
describe('GET /:param', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Parameter V1!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Parameter V2!');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Parameter V2!');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Parameter V2!');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: '',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/').expect(404);
});
});
describe('GET /multiple', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/multiple').expect(404);
});
});
describe('GET /neutral', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Neutral');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Neutral');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Neutral');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Neutral');
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/json',
})
.expect(200)
.expect('Neutral');
});
it('No Header', () => {
return request(app.getHttpServer())
.get('/neutral')
.expect(200)
.expect('Neutral');
});
});
describe('GET /override', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Override Version 1');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Override Version 2');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Override Version 2');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Override Version 2');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/override').expect(404);
});
});
describe('GET /override-partial', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Override Partial Version 1');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Override Partial Version 2');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Override Partial Version 2');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Override Partial Version 2');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer())
.get('/override-partial')
.expect(404);
});
});
describe('GET /foo/bar', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v3+json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('No Header', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.expect(200)
.expect('Hello FooBar!');
});
});
after(async () => {
await app.close();
});
});
// ======================================================================== //
describe('with the global default version: "1"', () => {
before(async () => {
const moduleRef = await Test.createTestingModule({
imports: [AppModule],
}).compile();
app = moduleRef.createNestApplication<NestFastifyApplication>(
new FastifyAdapter(),
);
app.enableVersioning({
type: VersioningType.CUSTOM,
extractor,
defaultVersion: '1',
});
await app.init();
await app.getHttpAdapter().getInstance().ready();
});
describe('GET /', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Hello World V1!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Hello World V2!');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Hello World V2!');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Hello World V2!');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/').expect(404);
});
});
describe('GET /:param', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Parameter V1!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Parameter V2!');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Parameter V2!');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Parameter V2!');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: '',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/').expect(404);
});
});
describe('GET /multiple', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/multiple').expect(404);
});
});
describe('GET /neutral', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Neutral');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Neutral');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Neutral');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Neutral');
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/json',
})
.expect(200)
.expect('Neutral');
});
it('No Header', () => {
return request(app.getHttpServer())
.get('/neutral')
.expect(200)
.expect('Neutral');
});
});
describe('GET /override', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Override Version 1');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Override Version 2');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Override Version 2');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Override Version 2');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/override').expect(404);
});
});
describe('GET /override-partial', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Override Partial Version 1');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Override Partial Version 2');
});
it('V2, if two versions are requested, select the highest version', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect(200)
.expect('Override Partial Version 2');
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept:
'application/foo.v1+json, application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Override Partial Version 2');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer())
.get('/override-partial')
.expect(404);
});
});
describe('GET /foo/bar', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v2+json',
})
.expect(404);
});
it('V2, if a non-existent version is requested, select the highest supported version', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v1+json, application/foo.v2+json',
})
.expect('Hello FooBar!');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/foo/bar').expect(404);
});
});
after(async () => {
await app.close();
});
});
});

View File

@@ -0,0 +1,712 @@
import { INestApplication, VersioningType } from '@nestjs/common';
import { Test } from '@nestjs/testing';
import { Request } from 'express';
import * as request from 'supertest';
import { AppModule } from '../src/app.module';
describe('Custom Versioning', () => {
const extractor = (request: Request): string | string[] => {
const versions = request
.header('Accept')
?.split(',')
.map(header => header.match(/v(\d+\.?\d*)\+json$/))
.filter(match => match && match.length)
.map(matchArray => matchArray[1])
.sort()
.reverse();
return versions;
};
let app: INestApplication;
// ======================================================================== //
describe('without global default version', () => {
before(async () => {
const moduleRef = await Test.createTestingModule({
imports: [AppModule],
}).compile();
app = moduleRef.createNestApplication();
app.enableVersioning({
type: VersioningType.CUSTOM,
extractor,
});
await app.init();
});
describe('GET /', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Hello World V1!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Hello World V2!');
});
// There's a known limitation of the express-adapter, where
// it cannot handle selection of the highest matched version properly.
//
// it('V2, if two versions are requested, select the highest version', () => {
// return request(app.getHttpServer())
// .get('/')
// .set({
// Accept: 'application/foo.v1+json, application/foo.v2+json',
// })
// .expect(200)
// .expect('Hello World V2!');
// });
it('V3', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/').expect(404);
});
});
describe('GET /:param', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Parameter V1!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Parameter V2!');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: '',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/').expect(404);
});
});
describe('GET /multiple', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V2, if an unsupported version is specified, select the lower supported version', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v2+json, application/foo.v3+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/multiple').expect(404);
});
});
describe('GET /neutral', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Neutral');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Neutral');
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/json',
})
.expect(200)
.expect('Neutral');
});
it('No Header', () => {
return request(app.getHttpServer())
.get('/neutral')
.expect(200)
.expect('Neutral');
});
});
describe('GET /override', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Override Version 1');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Override Version 2');
});
// There's a known limitation of the express-adapter, where
// it cannot handle selection of the highest matched version properly.
//
// it('V2, if two versions are requested, select the highest version', () => {
// return request(app.getHttpServer())
// .get('/override')
// .set({
// Accept: 'application/foo.v1+json, application/foo.v2+json',
// })
// .expect(200)
// .expect('Override Version 2');
// });
it('V3', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/override').expect(404);
});
});
describe('GET /override-partial', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Override Partial Version 1');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Override Partial Version 2');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer())
.get('/override-partial')
.expect(404);
});
});
describe('GET /foo/bar', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v3+json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('No Header', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.expect(200)
.expect('Hello FooBar!');
});
});
after(async () => {
await app.close();
});
});
// ======================================================================== //
describe('with the global default version: "1"', () => {
before(async () => {
const moduleRef = await Test.createTestingModule({
imports: [AppModule],
}).compile();
app = moduleRef.createNestApplication();
app.enableVersioning({
type: VersioningType.CUSTOM,
extractor,
defaultVersion: '1',
});
await app.init();
});
describe('GET /', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Hello World V1!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Hello World V2!');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/').expect(404);
});
});
describe('GET /:param', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Parameter V1!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Parameter V2!');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/param/hello')
.set({
Accept: '',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/').expect(404);
});
});
describe('GET /multiple', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Multiple Versions 1 or 2');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/multiple')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/multiple').expect(404);
});
});
describe('GET /neutral', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Neutral');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Neutral');
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/neutral')
.set({
Accept: 'application/json',
})
.expect(200)
.expect('Neutral');
});
it('No Header', () => {
return request(app.getHttpServer())
.get('/neutral')
.expect(200)
.expect('Neutral');
});
});
describe('GET /override', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Override Version 1');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Override Version 2');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/override')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/override').expect(404);
});
});
describe('GET /override-partial', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Override Partial Version 1');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v2+json',
})
.expect(200)
.expect('Override Partial Version 2');
});
it('V3', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/override-partial')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer())
.get('/override-partial')
.expect(404);
});
});
describe('GET /foo/bar', () => {
it('V1', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v1+json',
})
.expect(200)
.expect('Hello FooBar!');
});
it('V2', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v2+json',
})
.expect(404);
});
it('V3', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/foo.v3+json',
})
.expect(404);
});
it('No Version', () => {
return request(app.getHttpServer())
.get('/foo/bar')
.set({
Accept: 'application/json',
})
.expect(404);
});
it('No Header', () => {
return request(app.getHttpServer()).get('/foo/bar').expect(404);
});
});
after(async () => {
await app.close();
});
});
});

View File

@@ -3,5 +3,5 @@
"packages": [
"packages/*"
],
"version": "8.3.0"
"version": "8.3.1"
}

337
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/core",
"version": "8.2.3",
"version": "8.3.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -2027,6 +2027,12 @@
"requires": {
"has-flag": "^4.0.0"
}
},
"typescript": {
"version": "4.5.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz",
"integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==",
"dev": true
}
}
},
@@ -3271,9 +3277,9 @@
"dev": true
},
"@grpc/grpc-js": {
"version": "1.5.5",
"resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.5.5.tgz",
"integrity": "sha512-FTd27ItHlsSG/7hp62xgI9YnqSwRbHRSVmDVR8DwOoC+6t8JhHRXe2JL0U8N9GLc0jS0HrtEbO/KP5+G0ebjLQ==",
"version": "1.5.7",
"resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.5.7.tgz",
"integrity": "sha512-RAlSbZ9LXo0wNoHKeUlwP9dtGgVBDUbnBKFpfAv5iSqMG4qWz9um2yLH215+Wow1I48etIa1QMS+WAGmsE/7HQ==",
"dev": true,
"requires": {
"@grpc/proto-loader": "^0.6.4",
@@ -3519,30 +3525,19 @@
"dev": true
},
"@nestjs/apollo": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/@nestjs/apollo/-/apollo-10.0.0.tgz",
"integrity": "sha512-iLBPv5KIDD1tx/QC1GmpE8wktjR3+Qj9RLOKJb0Z6uz49txqr8SYdm09MPpYHnCmqLVrujjU8SvFol/qMxABng==",
"version": "10.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/apollo/-/apollo-10.0.5.tgz",
"integrity": "sha512-HGM/nnYjS4t4W+lvvv4lo1ZKQvClDZvW/6l8aWEKtmbogeR0jOEcUQGLQs9S5J9TgcqcoPCIkBLn4VkEdS/K5A==",
"dev": true,
"requires": {
"@graphql-tools/utils": "8.6.1",
"iterall": "1.3.0",
"lodash.omit": "4.5.0"
},
"dependencies": {
"@graphql-tools/utils": {
"version": "8.6.1",
"resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.6.1.tgz",
"integrity": "sha512-uxcfHCocp4ENoIiovPxUWZEHOnbXqj3ekWc0rm7fUhW93a1xheARNHcNKhwMTR+UKXVJbTFQdGI1Rl5XdyvDBg==",
"dev": true,
"requires": {
"tslib": "~2.3.0"
}
}
}
},
"@nestjs/graphql": {
"version": "10.0.2",
"resolved": "https://registry.npmjs.org/@nestjs/graphql/-/graphql-10.0.2.tgz",
"integrity": "sha512-MttG9Lfrv0fI+o8npNAL+vPO4sVrcZaQA7UFqTghCSs1XFLWBtG9PUYJ+zcJsywGnJkv4fYegHGMuAB/G/dx+A==",
"version": "10.0.5",
"resolved": "https://registry.npmjs.org/@nestjs/graphql/-/graphql-10.0.5.tgz",
"integrity": "sha512-ok7dXJOIw3hqoler3IP/ehm2S9FBQLgmjKguuPB4OMe/pk4TbcDXzQO7SPzwkgVMB/H/fhol9+kHoCXrCMHf7w==",
"dev": true,
"requires": {
"@graphql-tools/merge": "8.2.2",
@@ -4146,9 +4141,9 @@
"dev": true
},
"@types/cache-manager": {
"version": "3.4.2",
"resolved": "https://registry.npmjs.org/@types/cache-manager/-/cache-manager-3.4.2.tgz",
"integrity": "sha512-1IwA74t5ID4KWo0Kndal16MhiPSZgMe1fGc+MLT6j5r+Ab7jku36PFTl4PP6MiWw0BJscM9QpZEo00qixNQoRg==",
"version": "3.4.3",
"resolved": "https://registry.npmjs.org/@types/cache-manager/-/cache-manager-3.4.3.tgz",
"integrity": "sha512-71aBXoFYXZW4TnDHHH8gExw2lS28BZaWeKefgsiJI7QYZeJfUEbMKw6CQtzGjlYQcGIWwB76hcCrkVA3YHSvsw==",
"dev": true
},
"@types/cacheable-request": {
@@ -4439,9 +4434,9 @@
"dev": true
},
"@types/node": {
"version": "17.0.17",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.17.tgz",
"integrity": "sha512-e8PUNQy1HgJGV3iU/Bp2+D/DXh3PYeyli8LgIwsQcs1Ar1LoaWHSIT6Rw+H2rNJmiq6SNWiDytfx8+gYj7wDHw=="
"version": "17.0.21",
"resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.21.tgz",
"integrity": "sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ=="
},
"@types/normalize-package-data": {
"version": "2.4.0",
@@ -4592,9 +4587,9 @@
}
},
"@types/ws": {
"version": "8.2.2",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.2.tgz",
"integrity": "sha512-NOn5eIcgWLOo6qW8AcuLZ7G8PycXu0xTxxkS6Q18VWFxgPUSOwV0pBj2a/4viNZVu25i7RIB7GttdkAIUUXOOg==",
"version": "8.5.1",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.1.tgz",
"integrity": "sha512-UxlLOfkuQnT2YSBCNq0x86SGOUxas6gAySFeDe2DcnEnA8655UIPoCDorWZCugcvKIL8IUI4oueUfJ1hhZSE2A==",
"dev": true,
"requires": {
"@types/node": "*"
@@ -6681,27 +6676,22 @@
"dev": true
},
"body-parser": {
"version": "1.19.1",
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.1.tgz",
"integrity": "sha512-8ljfQi5eBk8EJfECMrgqNGWPEY5jWP+1IzkzkGdFFEwFQZZyaZ21UqdaHktgiMlH0xLHqIFtE/u2OYE5dOtViA==",
"version": "1.19.2",
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.2.tgz",
"integrity": "sha512-SAAwOxgoCKMGs9uUAUFHygfLAyaniaoun6I8mFY9pRAJL9+Kec34aU+oIjDhTycub1jozEfEwx1W1IuOYxVSFw==",
"requires": {
"bytes": "3.1.1",
"bytes": "3.1.2",
"content-type": "~1.0.4",
"debug": "2.6.9",
"depd": "~1.1.2",
"http-errors": "1.8.1",
"iconv-lite": "0.4.24",
"on-finished": "~2.3.0",
"qs": "6.9.6",
"raw-body": "2.4.2",
"qs": "6.9.7",
"raw-body": "2.4.3",
"type-is": "~1.6.18"
},
"dependencies": {
"bytes": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.1.tgz",
"integrity": "sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg=="
},
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
@@ -6733,9 +6723,9 @@
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"qs": {
"version": "6.9.6",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz",
"integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ=="
"version": "6.9.7",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz",
"integrity": "sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw=="
},
"setprototypeof": {
"version": "1.2.0",
@@ -6938,8 +6928,7 @@
"bytes": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
"dev": true
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="
},
"cacache": {
"version": "15.3.0",
@@ -10264,9 +10253,9 @@
}
},
"core-js": {
"version": "3.21.0",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.21.0.tgz",
"integrity": "sha512-YUdI3fFu4TF/2WykQ2xzSiTQdldLB4KVuL9WeAy5XONZYt5Cun/fpQvctoKbCgvPhmzADeesTk/j2Rdx77AcKQ==",
"version": "3.21.1",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-3.21.1.tgz",
"integrity": "sha512-FRq5b/VMrWlrmCzwRrpDYNxyHP9BcAZC+xHJaqTgIE5091ZV1NTmyh0sGOg5XqpnHvR0svdy0sv1gWA1zmhxig==",
"dev": true
},
"core-util-is": {
@@ -11798,9 +11787,9 @@
}
},
"eslint-config-prettier": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz",
"integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==",
"version": "8.4.0",
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.4.0.tgz",
"integrity": "sha512-CFotdUcMY18nGRo5KGsnNxpznzhkopOcOo0InID+sgQssPrzjvsyKZPvOgymTFeHrFuC3Tzdf2YndhXtULK9Iw==",
"dev": true
},
"eslint-import-resolver-node": {
@@ -12225,16 +12214,16 @@
}
},
"express": {
"version": "4.17.2",
"resolved": "https://registry.npmjs.org/express/-/express-4.17.2.tgz",
"integrity": "sha512-oxlxJxcQlYwqPWKVJJtvQiwHgosH/LrLSPA+H4UxpyvSS6jC5aH+5MoHFM+KABgTOt0APue4w66Ha8jCUo9QGg==",
"version": "4.17.3",
"resolved": "https://registry.npmjs.org/express/-/express-4.17.3.tgz",
"integrity": "sha512-yuSQpz5I+Ch7gFrPCk4/c+dIBKlQUxtgwqzph132bsT6qhuzss6I8cLJQz7B3rFblzd6wtcI0ZbGltH/C4LjUg==",
"requires": {
"accepts": "~1.3.7",
"accepts": "~1.3.8",
"array-flatten": "1.1.1",
"body-parser": "1.19.1",
"body-parser": "1.19.2",
"content-disposition": "0.5.4",
"content-type": "~1.0.4",
"cookie": "0.4.1",
"cookie": "0.4.2",
"cookie-signature": "1.0.6",
"debug": "2.6.9",
"depd": "~1.1.2",
@@ -12249,7 +12238,7 @@
"parseurl": "~1.3.3",
"path-to-regexp": "0.1.7",
"proxy-addr": "~2.0.7",
"qs": "6.9.6",
"qs": "6.9.7",
"range-parser": "~1.2.1",
"safe-buffer": "5.2.1",
"send": "0.17.2",
@@ -12261,6 +12250,15 @@
"vary": "~1.1.2"
},
"dependencies": {
"accepts": {
"version": "1.3.8",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
"integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
"requires": {
"mime-types": "~2.1.34",
"negotiator": "0.6.3"
}
},
"content-disposition": {
"version": "0.5.4",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
@@ -12269,6 +12267,11 @@
"safe-buffer": "5.2.1"
}
},
"cookie": {
"version": "0.4.2",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz",
"integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA=="
},
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
@@ -12299,20 +12302,38 @@
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
},
"mime-db": {
"version": "1.51.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz",
"integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g=="
},
"mime-types": {
"version": "2.1.34",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz",
"integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==",
"requires": {
"mime-db": "1.51.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"negotiator": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
"integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg=="
},
"path-to-regexp": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
"integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
},
"qs": {
"version": "6.9.6",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.9.6.tgz",
"integrity": "sha512-TIRk4aqYLNoJUbd+g2lEdz5kLWIuTMRagAXxl78Q0RiVjAOugHmeKNGdd3cwo/ktpf9aL9epCfFqWDEKysUlLQ=="
"version": "6.9.7",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz",
"integrity": "sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw=="
},
"safe-buffer": {
"version": "5.2.1",
@@ -12640,9 +12661,9 @@
"integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA=="
},
"fastify": {
"version": "3.27.1",
"resolved": "https://registry.npmjs.org/fastify/-/fastify-3.27.1.tgz",
"integrity": "sha512-GLn3ow5BGqg/m+ztXvztp8Xp7SuH99vAm4zfbN7407Qzi4mB055SG/lWH/gYolz5Oq2K8LtUpZqt1Ccf/YkVmA==",
"version": "3.27.2",
"resolved": "https://registry.npmjs.org/fastify/-/fastify-3.27.2.tgz",
"integrity": "sha512-InZSbbfdBV8yfsTzX0Ei7aF3r7FjC+DPIf27IlTP5EIhSsvTjvlRNwxDPYYGi2NX2K654Vh+zCGCy/GaSigIuw==",
"dev": true,
"requires": {
"@fastify/ajv-compiler": "^1.0.0",
@@ -12659,7 +12680,7 @@
"rfdc": "^1.1.4",
"secure-json-parse": "^2.0.0",
"semver": "^7.3.2",
"tiny-lru": "^7.0.0"
"tiny-lru": "^8.0.1"
},
"dependencies": {
"fast-json-stringify": {
@@ -12686,9 +12707,9 @@
}
},
"fastify-cors": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/fastify-cors/-/fastify-cors-6.0.2.tgz",
"integrity": "sha512-sE0AOyzmj5hLLRRVgenjA6G2iOGX35/1S3QGYB9rr9TXelMZB3lFrXy4CzwYVOMiujJeMiLgO4J7eRm8sQSv8Q==",
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/fastify-cors/-/fastify-cors-6.0.3.tgz",
"integrity": "sha512-fMbXubKKyBHHCfSBtsCi3+7VyVRdhJQmGes5gM+eGKkRErCdm0NaYO0ozd31BQBL1ycoTIjbqOZhJo4RTF/Vlg==",
"dev": true,
"requires": {
"fastify-plugin": "^3.0.0",
@@ -12809,12 +12830,6 @@
}
}
},
"fastify-warning": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/fastify-warning/-/fastify-warning-0.2.0.tgz",
"integrity": "sha512-s1EQguBw/9qtc1p/WTY4eq9WMRIACkj+HTcOIK1in4MV5aFaQC9ZCIt0dJ7pr5bIf4lPpHvAtP2ywpTNgs7hqw==",
"dev": true
},
"fastq": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.6.0.tgz",
@@ -16957,9 +16972,9 @@
"dev": true
},
"kareem": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.3.tgz",
"integrity": "sha512-uESCXM2KdtOQ8LOvKyTUXEeg0MkYp4wGglTIpGcYHvjJcS5sn2Wkfrfit8m4xSbaNDAw2KdI9elgkOxZbrFYbg==",
"version": "2.3.4",
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.4.tgz",
"integrity": "sha512-Vcrt8lcpVl0s8ePx634BxwRqmFo+5DcOhlmNadehxreMTIQi/9hOL/B3hZQQbK5DgMS7Lem3xABXV7/S3jy+7g==",
"dev": true
},
"keyv": {
@@ -17640,21 +17655,21 @@
}
},
"light-my-request": {
"version": "4.7.1",
"resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-4.7.1.tgz",
"integrity": "sha512-7/bT6M+iHY90L9/rW7aboVYt0o0uOqzIx4yofC67d6WE9uLksecGf3mxPuZfVjMONG+i6hCq6z5NZCxqzpA2yw==",
"version": "4.8.0",
"resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-4.8.0.tgz",
"integrity": "sha512-C2XESrTRsZnI59NSQigOsS6IuTxpj8OhSBvZS9fhgBMsamBsAuWN1s4hj/nCi8EeZcyAA6xbROhsZy7wKdfckg==",
"dev": true,
"requires": {
"ajv": "^8.1.0",
"cookie": "^0.4.0",
"fastify-warning": "^0.2.0",
"process-warning": "^1.0.0",
"set-cookie-parser": "^2.4.1"
},
"dependencies": {
"ajv": {
"version": "8.9.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.9.0.tgz",
"integrity": "sha512-qOKJyNj/h+OWx7s5DePL6Zu1KeM9jPZhwBqs+7DzP6bGOvqzVCSf0xueYmVuaC/oQ/VtS2zLMLHdQFbkka+XDQ==",
"version": "8.10.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz",
"integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==",
"dev": true,
"requires": {
"fast-deep-equal": "^3.1.1",
@@ -19247,9 +19262,9 @@
}
},
"mocha": {
"version": "9.2.0",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.0.tgz",
"integrity": "sha512-kNn7E8g2SzVcq0a77dkphPsDSN7P+iYkqE0ZsGCYWRsoiKjOt+NvXfaagik8vuDa6W5Zw3qxe8Jfpt5qKf+6/Q==",
"version": "9.2.1",
"resolved": "https://registry.npmjs.org/mocha/-/mocha-9.2.1.tgz",
"integrity": "sha512-T7uscqjJVS46Pq1XDXyo9Uvey9gd3huT/DD9cYBb4K2Xc/vbKRPUWK067bxDQRK0yIz6Jxk73IrnimvASzBNAQ==",
"dev": true,
"requires": {
"@ungap/promise-all-settled": "1.1.2",
@@ -19509,12 +19524,6 @@
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"dev": true
},
"nanoid": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz",
"integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==",
"dev": true
},
"normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
@@ -19587,12 +19596,6 @@
"isexe": "^2.0.0"
}
},
"workerpool": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz",
"integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==",
"dev": true
},
"yargs-parser": {
"version": "20.2.4",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz",
@@ -19635,9 +19638,9 @@
}
},
"mongodb-connection-string-url": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.4.2.tgz",
"integrity": "sha512-mZUXF6nUzRWk5J3h41MsPv13ukWlH4jOMSk6astVeoZ1EbdTJyF5I3wxKkvqBAOoVtzLgyEYUvDjrGdcPlKjAw==",
"version": "2.5.2",
"resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.5.2.tgz",
"integrity": "sha512-tWDyIG8cQlI5k3skB6ywaEA5F9f5OntrKKsT/Lteub2zgwSUlhqEN2inGgBTm8bpYJf8QYBdA/5naz65XDpczA==",
"dev": true,
"requires": {
"@types/whatwg-url": "^8.2.1",
@@ -19645,24 +19648,24 @@
}
},
"mongoose": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.2.1.tgz",
"integrity": "sha512-VxY1wvlc4uBQKyKNVDoEkTU3/ayFOD//qVXYP+sFyvTRbAj9/M53UWTERd84pWogs2TqAC6DTvZbxCs2LoOd3Q==",
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.2.4.tgz",
"integrity": "sha512-3hA3IGxBzZdlp1+/I9qn53NjEAd01qvKAH2WUCPahjVO8+uAmR0B4m+1bC3x9a4r0ExY8QYQ2ryG3E/v5Tj+jA==",
"dev": true,
"requires": {
"bson": "^4.2.2",
"kareem": "2.3.3",
"kareem": "2.3.4",
"mongodb": "4.3.1",
"mpath": "0.8.4",
"mquery": "4.0.2",
"ms": "2.1.2",
"sift": "13.5.2"
"ms": "2.1.3",
"sift": "16.0.0"
},
"dependencies": {
"ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
"dev": true
}
}
@@ -19674,9 +19677,9 @@
"dev": true
},
"mqtt": {
"version": "4.3.5",
"resolved": "https://registry.npmjs.org/mqtt/-/mqtt-4.3.5.tgz",
"integrity": "sha512-l29WGHAc0EayK1cjb6moozc+rlgK6YRCPbP3zB1CrJw84Bjk4kG9EJCXojdn4r29lA80SCqxRKq1QJ87+Xevng==",
"version": "4.3.6",
"resolved": "https://registry.npmjs.org/mqtt/-/mqtt-4.3.6.tgz",
"integrity": "sha512-1dgQbkbh1Bba9iAGDNIrhSZ4nLDjbhmNHjOEvsmKI1Bb+2orj0gHwjqUKJ5CKUMKBYbkQYRM1fy+N1/2iZOj5w==",
"dev": true,
"requires": {
"commist": "^1.0.0",
@@ -19977,6 +19980,12 @@
"dev": true,
"optional": true
},
"nanoid": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz",
"integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==",
"dev": true
},
"nanomatch": {
"version": "1.2.13",
"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
@@ -20003,9 +20012,9 @@
"dev": true
},
"nats": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/nats/-/nats-2.6.0.tgz",
"integrity": "sha512-K6DhZ91TKfk5brL+Fyjys4I+nb0X/x27O16OYvxP/FMLQolQtZ37Ldkh8uwdNLPONztRXLUxRnXf0o9lxAxHeA==",
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/nats/-/nats-2.6.1.tgz",
"integrity": "sha512-PwcSZgWS2+JDoiU1Nd25eiV6wdvZbsCrBjyGyhqcJ72+SP2mJw0A0Sz4FKiSehx3mm2A61vwvC9rhkrNAMPpAw==",
"dev": true,
"requires": {
"nkeys.js": "^1.0.0-9"
@@ -20074,9 +20083,9 @@
},
"dependencies": {
"@types/node": {
"version": "14.18.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.10.tgz",
"integrity": "sha512-6iihJ/Pp5fsFJ/aEDGyvT4pHGmCpq7ToQ/yf4bl5SbVAvwpspYJ+v3jO7n8UyjhQVHTy+KNszOozDdv+O6sovQ==",
"version": "14.18.12",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.12.tgz",
"integrity": "sha512-q4jlIR71hUpWTnGhXWcakgkZeHa3CCjcQcnuzU8M891BAWA2jHiziiWEPEkdS5pFsz7H9HJiy8BrK7tBRNrY7A==",
"dev": true
},
"tweetnacl": {
@@ -21164,9 +21173,9 @@
}
},
"object-hash": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz",
"integrity": "sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw=="
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz",
"integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw=="
},
"object-inspect": {
"version": "1.10.3",
@@ -21758,9 +21767,9 @@
}
},
"pino": {
"version": "6.13.4",
"resolved": "https://registry.npmjs.org/pino/-/pino-6.13.4.tgz",
"integrity": "sha512-g4tHSISmQJYUEKEMVdaZ+ZokWwFnTwZL5JPn+lnBVZ1BuBbrSchrXwQINknkM5+Q4fF6U9NjiI8PWwwMDHt9zA==",
"version": "6.14.0",
"resolved": "https://registry.npmjs.org/pino/-/pino-6.14.0.tgz",
"integrity": "sha512-iuhEDel3Z3hF9Jfe44DPXR8l07bhjuFY3GMHIXbjnY9XcafbyDDwl2sN2vw2GjMPf5Nkoe+OFao7ffn9SXaKDg==",
"dev": true,
"requires": {
"fast-redact": "^3.0.0",
@@ -22219,21 +22228,16 @@
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
},
"raw-body": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.2.tgz",
"integrity": "sha512-RPMAFUJP19WIet/99ngh6Iv8fzAbqum4Li7AD6DtGaW2RpMB/11xDoalPiJMTbu6I3hkbMVkATvZrqb9EEqeeQ==",
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.3.tgz",
"integrity": "sha512-UlTNLIcu0uzb4D2f4WltY6cVjLi+/jEN4lgEUj3E04tpMDpUlkBo/eSn6zou9hum2VMNpCCUone0O0WeJim07g==",
"requires": {
"bytes": "3.1.1",
"bytes": "3.1.2",
"http-errors": "1.8.1",
"iconv-lite": "0.4.24",
"unpipe": "1.0.0"
},
"dependencies": {
"bytes": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.1.tgz",
"integrity": "sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg=="
},
"http-errors": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz",
@@ -23478,9 +23482,9 @@
}
},
"sift": {
"version": "13.5.2",
"resolved": "https://registry.npmjs.org/sift/-/sift-13.5.2.tgz",
"integrity": "sha512-+gxdEOMA2J+AI+fVsCqeNn7Tgx3M9ZN9jdi95939l1IJ8cZsqS8sqpJyOkic2SJk+1+98Uwryt/gL6XDaV+UZA==",
"version": "16.0.0",
"resolved": "https://registry.npmjs.org/sift/-/sift-16.0.0.tgz",
"integrity": "sha512-ILTjdP2Mv9V1kIxWMXeMTIRbOBrqKc4JAXmFMnFq3fKeyQ2Qwa3Dw1ubcye3vR+Y6ofA0b9gNDr/y2t6eUeIzQ==",
"dev": true
},
"signal-exit": {
@@ -24965,9 +24969,9 @@
}
},
"tiny-lru": {
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/tiny-lru/-/tiny-lru-7.0.6.tgz",
"integrity": "sha512-zNYO0Kvgn5rXzWpL0y3RS09sMK67eGaQj9805jlK9G6pSadfriTczzLHFXa/xcW4mIRfmlB9HyQ/+SgL0V1uow==",
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/tiny-lru/-/tiny-lru-8.0.1.tgz",
"integrity": "sha512-eBIAYA0BzSjxBedCaO0CSjertD+u+IvNuFkyD7ESf+qjqHKBr5wFqvEYl91+ZQd7jjq2pO6/fBVwFgb6bxvorw==",
"dev": true
},
"tmp": {
@@ -25299,9 +25303,9 @@
}
},
"typeorm": {
"version": "0.2.41",
"resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.2.41.tgz",
"integrity": "sha512-/d8CLJJxKPgsnrZWiMyPI0rz2MFZnBQrnQ5XP3Vu3mswv2WPexb58QM6BEtmRmlTMYN5KFWUz8SKluze+wS9xw==",
"version": "0.2.44",
"resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.2.44.tgz",
"integrity": "sha512-yFyb9Ts73vGaS/O06TvLpzvT5U/ngO31GeciNc0eoH7P1QcG8kVZdOy9FHJqkTeDmIljMRgWjbYUoMw53ZY7Xw==",
"dev": true,
"requires": {
"@sqltools/formatter": "^1.2.2",
@@ -25317,6 +25321,7 @@
"reflect-metadata": "^0.1.13",
"sha.js": "^2.4.11",
"tslib": "^2.1.0",
"uuid": "^8.3.2",
"xml2js": "^0.4.23",
"yargs": "^17.0.1",
"zen-observable-ts": "^1.0.0"
@@ -25396,9 +25401,9 @@
"dev": true
},
"debug": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
"integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
"version": "4.3.3",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
"dev": true,
"requires": {
"ms": "2.1.2"
@@ -25510,24 +25515,24 @@
"dev": true
},
"yargs": {
"version": "17.2.1",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.2.1.tgz",
"integrity": "sha512-XfR8du6ua4K6uLGm5S6fA+FIJom/MdJcFNVY8geLlp2v8GYbOXD4EB1tPNZsRn4vBzKGMgb5DRZMeWuFc2GO8Q==",
"version": "17.3.1",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz",
"integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==",
"dev": true,
"requires": {
"cliui": "^7.0.2",
"escalade": "^3.1.1",
"get-caller-file": "^2.0.5",
"require-directory": "^2.1.1",
"string-width": "^4.2.0",
"string-width": "^4.2.3",
"y18n": "^5.0.5",
"yargs-parser": "^20.2.2"
"yargs-parser": "^21.0.0"
}
},
"yargs-parser": {
"version": "20.2.9",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
"integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
"version": "21.0.0",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz",
"integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==",
"dev": true
},
"zen-observable": {
@@ -25549,9 +25554,9 @@
}
},
"typescript": {
"version": "4.5.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz",
"integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==",
"version": "4.3.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz",
"integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==",
"dev": true
},
"ua-parser-js": {
@@ -25846,9 +25851,9 @@
"dev": true
},
"url-parse": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.2.tgz",
"integrity": "sha512-6bTUPERy1muxxYClbzoRo5qtQuyoGEbzbQvi0SW4/8U8UyVkAQhWFBlnigqJkRm4su4x1zDQfNbEzWkt+vchcg==",
"version": "1.5.10",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz",
"integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==",
"dev": true,
"requires": {
"querystringify": "^2.1.1",
@@ -26282,6 +26287,12 @@
"integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=",
"dev": true
},
"workerpool": {
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.0.tgz",
"integrity": "sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A==",
"dev": true
},
"wrap-ansi": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/core",
"version": "8.2.3",
"version": "8.3.1",
"description": "Modern, fast, powerful node.js web framework",
"homepage": "https://nestjs.com",
"repository": {
@@ -54,12 +54,12 @@
"class-validator": "0.13.2",
"cli-color": "2.0.1",
"cors": "2.8.5",
"express": "4.17.2",
"express": "4.17.3",
"fast-json-stringify": "3.0.3",
"fast-safe-stringify": "2.1.1",
"graphql-subscriptions": "2.0.0",
"iterare": "1.2.1",
"object-hash": "2.2.0",
"object-hash": "3.0.0",
"path-to-regexp": "3.2.0",
"reflect-metadata": "0.1.13",
"rxjs": "7.5.4",
@@ -71,15 +71,15 @@
"@codechecks/client": "0.1.12",
"@commitlint/cli": "16.2.1",
"@commitlint/config-angular": "16.2.1",
"@grpc/grpc-js": "1.5.5",
"@grpc/grpc-js": "1.5.7",
"@grpc/proto-loader": "0.6.9",
"@nestjs/apollo": "10.0.0",
"@nestjs/graphql": "10.0.2",
"@nestjs/apollo": "10.0.5",
"@nestjs/graphql": "10.0.5",
"@nestjs/mongoose": "9.0.2",
"@nestjs/typeorm": "8.0.3",
"@types/amqplib": "0.8.2",
"@types/bytes": "3.1.1",
"@types/cache-manager": "3.4.2",
"@types/cache-manager": "3.4.3",
"@types/chai": "4.3.0",
"@types/chai-as-promised": "7.1.5",
"@types/cors": "2.8.12",
@@ -87,12 +87,12 @@
"@types/gulp": "4.0.9",
"@types/http-errors": "1.8.2",
"@types/mocha": "9.1.0",
"@types/node": "17.0.17",
"@types/node": "17.0.21",
"@types/redis": "4.0.11",
"@types/reflect-metadata": "0.1.0",
"@types/sinon": "10.0.11",
"@types/socket.io": "3.0.2",
"@types/ws": "8.2.2",
"@types/ws": "8.5.1",
"@typescript-eslint/eslint-plugin": "4.33.0",
"@typescript-eslint/parser": "4.33.0",
"amqp-connection-manager": "4.1.1",
@@ -100,7 +100,7 @@
"apollo-server-core": "3.6.3",
"apollo-server-express": "3.6.3",
"artillery": "1.7.9",
"body-parser": "1.19.1",
"body-parser": "1.19.2",
"bytes": "3.1.2",
"cache-manager": "3.6.0",
"cache-manager-redis-store": "2.0.0",
@@ -110,17 +110,17 @@
"commitlint-circle": "1.0.0",
"concurrently": "7.0.0",
"conventional-changelog": "3.1.25",
"core-js": "3.21.0",
"core-js": "3.21.1",
"coveralls": "3.1.1",
"delete-empty": "3.0.0",
"engine.io-client": "6.1.1",
"eslint": "7.32.0",
"eslint-config-prettier": "8.3.0",
"eslint-config-prettier": "8.4.0",
"eslint-plugin-import": "2.25.4",
"eventsource": "1.1.0",
"fancy-log": "2.0.0",
"fastify": "3.27.1",
"fastify-cors": "6.0.2",
"fastify": "3.27.2",
"fastify-cors": "6.0.3",
"fastify-formbody": "5.2.0",
"fastify-multipart": "5.3.1",
"fastify-static": "4.5.0",
@@ -139,17 +139,17 @@
"kafkajs": "1.16.0",
"lerna": "2.11.0",
"lerna-changelog": "2.2.0",
"light-my-request": "4.7.1",
"light-my-request": "4.8.0",
"lint-staged": "12.3.4",
"markdown-table": "2.0.0",
"merge-graphql-schemas": "1.7.8",
"middie": "6.0.0",
"mocha": "9.2.0",
"mongoose": "6.2.1",
"mqtt": "4.3.5",
"mocha": "9.2.1",
"mongoose": "6.2.4",
"mqtt": "4.3.6",
"multer": "1.4.4",
"mysql2": "2.3.3",
"nats": "2.6.0",
"nats": "2.6.1",
"nodemon": "2.0.15",
"nyc": "15.1.0",
"point-of-view": "5.1.0",
@@ -163,8 +163,8 @@
"supertest": "6.2.2",
"ts-morph": "13.0.3",
"ts-node": "10.5.0",
"typeorm": "0.2.41",
"typescript": "4.5.5",
"typeorm": "0.2.44",
"typescript": "4.3.5",
"wrk": "1.2.1",
"ws": "7.5.6"
},
@@ -184,6 +184,7 @@
"type: bug :sob:": "Bug fixes",
"type: enhancement :wolf:": "Enhancements",
"type: docs :page_facing_up:": "Docs",
"type: code style": "Code style tweaks",
"dependencies": "Dependencies"
}
},

View File

@@ -1,18 +0,0 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="8.2.0"></a>
# [8.2.0](https://github.com/nestjs/nest/compare/v8.1.2...v8.2.0) (2021-11-08)
### Bug Fixes
* **deps:** update dependency axios to v0.24.0 ([fc77e4f](https://github.com/nestjs/nest/commit/fc77e4f))
### Features
* **common:** add the ability to set some extra metadata about returned files ([5100573](https://github.com/nestjs/nest/commit/5100573))
* **common:** allow to swap out class-validator and class-transformer ([2a1cc62](https://github.com/nestjs/nest/commit/2a1cc62))

View File

@@ -123,6 +123,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<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://boringowl.io/" target="_blank"><img src="https://nestjs.com/img/boringowl-logo.svg" width="120" valign="middle" /></a></td>
</tr></table>
## Backers

View File

@@ -1,5 +1,5 @@
import { CATCH_WATERMARK, FILTER_CATCH_EXCEPTIONS } from '../../constants';
import { Type } from '../../interfaces';
import { Type, Abstract } from '../../interfaces';
/**
* Decorator that marks a class as a Nest exception filter. An exception filter
@@ -18,7 +18,9 @@ import { Type } from '../../interfaces';
*
* @publicApi
*/
export function Catch(...exceptions: Type<any>[]): ClassDecorator {
export function Catch(
...exceptions: Array<Type<any> | Abstract<any>>
): ClassDecorator {
return (target: object) => {
Reflect.defineMetadata(CATCH_WATERMARK, true, target);
Reflect.defineMetadata(FILTER_CATCH_EXCEPTIONS, exceptions, target);

View File

@@ -5,4 +5,5 @@ export enum VersioningType {
URI,
HEADER,
MEDIA_TYPE,
CUSTOM,
}

View File

@@ -26,8 +26,15 @@ export class StreamableFile {
}
getHeaders() {
const { type = 'application/octet-stream', disposition = null } =
this.options;
return { type, disposition };
const {
type = 'application/octet-stream',
disposition = undefined,
length = undefined,
} = this.options;
return {
type,
disposition,
length,
};
}
}

View File

@@ -1,4 +1,5 @@
export interface StreamableFileOptions {
type?: string;
disposition?: string;
length?: number;
}

View File

@@ -31,6 +31,7 @@ export {
INestApplication,
INestApplicationContext,
INestMicroservice,
InjectionToken,
IntrospectionResult,
MessageEvent,
MiddlewareConsumer,
@@ -44,6 +45,7 @@ export {
OnApplicationShutdown,
OnModuleDestroy,
OnModuleInit,
OptionalFactoryDependency,
Paramtype,
PipeTransform,
Provider,

View File

@@ -1,3 +1,3 @@
export interface NestMiddleware<TRequest = any, TResponse = any> {
use(req: TRequest, res: TResponse, next: () => void): any;
use(req: TRequest, res: TResponse, next: (error?: Error | any) => void): any;
}

View File

@@ -1,6 +1,8 @@
export * from './dynamic-module.interface';
export * from './forward-reference.interface';
export * from './injection-token.interface';
export * from './introspection-result.interface';
export * from './module-metadata.interface';
export * from './nest-module.interface';
export * from './optional-factory-dependency.interface';
export * from './provider.interface';

View File

@@ -0,0 +1,9 @@
import { Abstract } from '../abstract.interface';
import { Type } from '../type.interface';
export type InjectionToken =
| string
| symbol
| Type<any>
| Abstract<any>
| Function;

View File

@@ -0,0 +1,6 @@
import { InjectionToken } from './injection-token.interface';
export type OptionalFactoryDependency = {
token: InjectionToken;
optional: boolean;
};

View File

@@ -1,6 +1,7 @@
import { Abstract } from '../abstract.interface';
import { Scope } from '../scope-options.interface';
import { Type } from '../type.interface';
import { InjectionToken } from './injection-token.interface';
import { OptionalFactoryDependency } from './optional-factory-dependency.interface';
/**
*
@@ -36,7 +37,7 @@ export interface ClassProvider<T = any> {
/**
* Injection token
*/
provide: string | symbol | Type<any> | Abstract<any> | Function;
provide: InjectionToken;
/**
* Type (class name) of provider (instance to be injected).
*/
@@ -66,7 +67,7 @@ export interface ValueProvider<T = any> {
/**
* Injection token
*/
provide: string | symbol | Type<any> | Abstract<any> | Function;
provide: InjectionToken;
/**
* Instance of a provider to be injected.
*/
@@ -97,7 +98,7 @@ export interface FactoryProvider<T = any> {
/**
* Injection token
*/
provide: string | symbol | Type<any> | Abstract<any> | Function;
provide: InjectionToken;
/**
* Factory function that returns an instance of the provider to be injected.
*/
@@ -105,7 +106,7 @@ export interface FactoryProvider<T = any> {
/**
* Optional list of providers to be injected into the context of the Factory function.
*/
inject?: Array<Type<any> | string | symbol | Abstract<any> | Function>;
inject?: Array<InjectionToken | OptionalFactoryDependency>;
/**
* Optional enum defining lifetime of the provider that is returned by the Factory function.
*/
@@ -131,7 +132,7 @@ export interface ExistingProvider<T = any> {
/**
* Injection token
*/
provide: string | symbol | Type<any> | Abstract<any> | Function;
provide: InjectionToken;
/**
* Provider to be aliased by the Injection token.
*/

View File

@@ -58,6 +58,20 @@ export interface MediaTypeVersioningOptions {
key: string;
}
export interface CustomVersioningOptions {
type: VersioningType.CUSTOM;
/**
* A function that accepts a request object (specific to the underlying platform, ie Express or Fastify)
* and returns a single version value or an ordered array of versions, in order from HIGHEST to LOWEST.
*
* Ex. Returned version array = ['3.1', '3.0', '2.5', '2', '1.9']
*
* Use type assertion or narrowing to identify the specific request type.
*/
extractor: (request: unknown) => string | string[];
}
interface VersioningCommonOptions {
/**
* The default version to be used as a fallback when you did not provide some
@@ -70,4 +84,9 @@ interface VersioningCommonOptions {
* @publicApi
*/
export type VersioningOptions = VersioningCommonOptions &
(HeaderVersioningOptions | UriVersioningOptions | MediaTypeVersioningOptions);
(
| HeaderVersioningOptions
| UriVersioningOptions
| MediaTypeVersioningOptions
| CustomVersioningOptions
);

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/common",
"version": "8.3.0",
"version": "8.3.1",
"description": "Nest - modern, fast, powerful node.js web framework (@common)",
"author": "Kamil Mysliwiec",
"homepage": "https://nestjs.com",

View File

@@ -17,6 +17,32 @@ describe('StreamableFile', () => {
expect(streamableFile.getStream()).to.equal(stream);
});
});
describe('when options is empty', () => {
it('should return application/octet-stream for type and undefined for others', () => {
const stream = new Readable();
const streamableFile = new StreamableFile(stream);
expect(streamableFile.getHeaders()).to.deep.equal({
type: 'application/octet-stream',
disposition: undefined,
length: undefined,
});
});
});
describe('when options is defined', () => {
it('should pass provided headers', () => {
const stream = new Readable();
const streamableFile = new StreamableFile(stream, {
type: 'application/pdf',
disposition: 'inline',
length: 100,
});
expect(streamableFile.getHeaders()).to.deep.equal({
type: 'application/pdf',
disposition: 'inline',
length: 100,
});
});
});
describe('otherwise', () => {
describe('when input is a Buffer instance', () => {
it('should create a readable stream and push the input buffer', () => {

View File

@@ -1,12 +0,0 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="8.2.0"></a>
# [8.2.0](https://github.com/nestjs/nest/compare/v8.1.2...v8.2.0) (2021-11-08)
**Note:** Version bump only for package @nestjs/core

View File

@@ -123,6 +123,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<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://boringowl.io/" target="_blank"><img src="https://nestjs.com/img/boringowl-logo.svg" width="120" valign="middle" /></a></td>
</tr></table>
## Backers

View File

@@ -1,4 +1,9 @@
import { Logger, LoggerService } from '@nestjs/common';
import {
InjectionToken,
Logger,
LoggerService,
OptionalFactoryDependency,
} from '@nestjs/common';
import {
OPTIONAL_DEPS_METADATA,
OPTIONAL_PROPERTY_DEPS_METADATA,
@@ -34,7 +39,7 @@ import { InstanceToken, Module } from './module';
/**
* The type of an injectable dependency
*/
export type InjectorDependency = Type<any> | Function | string | symbol;
export type InjectorDependency = InjectionToken;
/**
* The property-based dependency
@@ -119,7 +124,7 @@ export class Injector {
const properties = await this.resolveProperties(
wrapper,
moduleRef,
inject,
inject as InjectionToken[],
contextId,
wrapper,
inquirer,
@@ -137,7 +142,7 @@ export class Injector {
await this.resolveConstructorParams<T>(
wrapper,
moduleRef,
inject,
inject as InjectionToken[],
callback,
contextId,
wrapper,
@@ -246,12 +251,11 @@ export class Injector {
);
return callback(deps);
}
const dependencies = isNil(inject)
? this.reflectConstructorParams(wrapper.metatype as Type<any>)
: inject;
const optionalDependenciesIds = isNil(inject)
? this.reflectOptionalParams(wrapper.metatype as Type<any>)
: [];
const isFactoryProvider = !isNil(inject);
const [dependencies, optionalDependenciesIds] = isFactoryProvider
? this.getFactoryProviderDependencies(wrapper)
: this.getClassDependencies(wrapper);
let isResolved = true;
const resolveParam = async (param: unknown, index: number) => {
@@ -292,6 +296,47 @@ export class Injector {
isResolved && (await callback(instances));
}
public getClassDependencies<T>(
wrapper: InstanceWrapper<T>,
): [InjectorDependency[], number[]] {
const ctorRef = wrapper.metatype as Type<any>;
return [
this.reflectConstructorParams(ctorRef),
this.reflectOptionalParams(ctorRef),
];
}
public getFactoryProviderDependencies<T>(
wrapper: InstanceWrapper<T>,
): [InjectorDependency[], number[]] {
const optionalDependenciesIds = [];
const isOptionalFactoryDep = (
item: InjectionToken | OptionalFactoryDependency,
): item is OptionalFactoryDependency =>
!isUndefined((item as OptionalFactoryDependency).token) &&
!isUndefined((item as OptionalFactoryDependency).optional);
const mapFactoryProviderInjectArray = (
item: InjectionToken | OptionalFactoryDependency,
index: number,
): InjectionToken => {
if (typeof item !== 'object') {
return item;
}
if (isOptionalFactoryDep(item)) {
if (item.optional) {
optionalDependenciesIds.push(index);
}
return item?.token;
}
return item;
};
return [
wrapper.inject?.map?.(mapFactoryProviderInjectArray),
optionalDependenciesIds,
];
}
public reflectConstructorParams<T>(type: Type<T>): any[] {
const paramtypes = Reflect.getMetadata(PARAMTYPES_METADATA, type) || [];
const selfParams = this.reflectSelfParams<T>(type);
@@ -430,8 +475,9 @@ export class Injector {
inquirer?: InstanceWrapper,
keyOrIndex?: string | number,
): Promise<InstanceWrapper<T>> {
const token = wrapper.token || wrapper.name;
const { name } = dependencyContext;
if (wrapper && wrapper.name === name) {
if (wrapper && token === name) {
throw new UnknownDependenciesException(
wrapper.name,
dependencyContext,

View File

@@ -43,7 +43,7 @@ export class InstanceWrapper<T = any> {
public scope?: Scope = Scope.DEFAULT;
public metatype: Type<T> | Function;
public inject?: (string | symbol | Function | Type<any>)[];
public inject?: FactoryProvider['inject'];
public forwardRef?: boolean;
private readonly values = new WeakMap<ContextId, InstancePerContext<T>>();

View File

@@ -1,11 +1,11 @@
import {
Abstract,
ClassProvider,
Controller,
DynamicModule,
ExistingProvider,
FactoryProvider,
Injectable,
InjectionToken,
NestModule,
Provider,
ValueProvider,
@@ -31,12 +31,11 @@ import { NestContainer } from './container';
import { InstanceWrapper } from './instance-wrapper';
import { ModuleRef } from './module-ref';
export type InstanceToken =
| string
| symbol
| Type<any>
| Abstract<any>
| Function;
/**
* @note
* Left for backward compatibility
*/
export type InstanceToken = InjectionToken;
export class Module {
private readonly _id: string;

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/core",
"version": "8.3.0",
"version": "8.3.1",
"description": "Nest - modern, fast, powerful node.js web framework (@core)",
"author": "Kamil Mysliwiec",
"license": "MIT",
@@ -30,13 +30,13 @@
"@nuxtjs/opencollective": "0.3.2",
"fast-safe-stringify": "2.1.1",
"iterare": "1.2.1",
"object-hash": "2.2.0",
"object-hash": "3.0.0",
"path-to-regexp": "3.2.0",
"tslib": "2.3.1",
"uuid": "8.3.2"
},
"devDependencies": {
"@nestjs/common": "8.3.0"
"@nestjs/common": "8.3.1"
},
"peerDependencies": {
"@nestjs/common": "^8.0.0",

View File

@@ -353,6 +353,38 @@ export class RouterExplorer {
if (versioningOptions.type === VersioningType.URI) {
return handler(req, res, next);
}
// Custom Extractor Versioning Handler
if (versioningOptions.type === VersioningType.CUSTOM) {
const extractedVersion = versioningOptions.extractor(req);
if (Array.isArray(version)) {
if (
Array.isArray(extractedVersion) &&
version.filter(extractedVersion.includes).length
) {
return handler(req, res, next);
} else if (
isString(extractedVersion) &&
version.includes(extractedVersion)
) {
return handler(req, res, next);
}
} else {
if (
Array.isArray(extractedVersion) &&
extractedVersion.includes(version)
) {
return handler(req, res, next);
} else if (
isString(extractedVersion) &&
version === extractedVersion
) {
return handler(req, res, next);
}
}
}
// Media Type (Accept Header) Versioning Handler
if (versioningOptions.type === VersioningType.MEDIA_TYPE) {
const MEDIA_TYPE_HEADER = 'Accept';

View File

@@ -1,18 +1,17 @@
import {
Abstract,
DynamicModule,
flatten,
ForwardReference,
Provider,
Logger,
Provider,
} from '@nestjs/common';
import {
CATCH_WATERMARK,
CONTROLLER_WATERMARK,
EXCEPTION_FILTERS_METADATA,
GUARDS_METADATA,
INTERCEPTORS_METADATA,
INJECTABLE_WATERMARK,
CONTROLLER_WATERMARK,
CATCH_WATERMARK,
INTERCEPTORS_METADATA,
MODULE_METADATA,
PIPES_METADATA,
ROUTE_ARGS_METADATA,
@@ -23,6 +22,7 @@ import {
ExceptionFilter,
ExistingProvider,
FactoryProvider,
InjectionToken,
NestInterceptor,
PipeTransform,
Scope,
@@ -41,8 +41,8 @@ import { iterate } from 'iterare';
import { ApplicationConfig } from './application-config';
import { APP_FILTER, APP_GUARD, APP_INTERCEPTOR, APP_PIPE } from './constants';
import { CircularDependencyException } from './errors/exceptions/circular-dependency.exception';
import { InvalidModuleException } from './errors/exceptions/invalid-module.exception';
import { InvalidClassModuleException } from './errors/exceptions/invalid-class-module.exception';
import { InvalidModuleException } from './errors/exceptions/invalid-module.exception';
import { UndefinedModuleException } from './errors/exceptions/undefined-module.exception';
import { getClassScope } from './helpers/get-class-scope';
import { NestContainer } from './injector/container';
@@ -54,7 +54,7 @@ import { MetadataScanner } from './metadata-scanner';
interface ApplicationProviderWrapper {
moduleKey: string;
providerKey: string;
type: string | symbol | Type<any> | Abstract<any> | Function;
type: InjectionToken;
scope?: Scope;
}

View File

@@ -1,3 +1,4 @@
import { Optional } from '@nestjs/common';
import * as chai from 'chai';
import { expect } from 'chai';
import * as chaiAsPromised from 'chai-as-promised';
@@ -803,4 +804,52 @@ describe('Injector', () => {
expect(loadPropertiesMetadataSpy.called).to.be.true;
});
});
describe('getClassDependencies', () => {
it('should return an array that consists of deps and optional dep ids', async () => {
class FixtureDep1 {}
class FixtureDep2 {}
@Injectable()
class FixtureClass {
constructor(
private dep1: FixtureDep1,
@Optional() private dep2: FixtureDep2,
) {}
}
const wrapper = new InstanceWrapper({ metatype: FixtureClass });
const [dependencies, optionalDependenciesIds] =
injector.getClassDependencies(wrapper);
expect(dependencies).to.deep.eq([FixtureDep1, FixtureDep2]);
expect(optionalDependenciesIds).to.deep.eq([1]);
});
});
describe('getFactoryProviderDependencies', () => {
it('should return an array that consists of deps and optional dep ids', async () => {
class FixtureDep1 {}
class FixtureDep2 {}
const wrapper = new InstanceWrapper({
inject: [
FixtureDep1,
{ token: FixtureDep2, optional: true },
{ token: FixtureDep2, optional: false },
{} as any,
],
});
const [dependencies, optionalDependenciesIds] =
injector.getFactoryProviderDependencies(wrapper);
expect(dependencies).to.deep.eq([
FixtureDep1,
FixtureDep2,
FixtureDep2,
{},
]);
expect(optionalDependenciesIds).to.deep.eq([1]);
});
});
});

View File

@@ -588,6 +588,182 @@ describe('RouterExplorer', () => {
});
});
describe('when the versioning type is CUSTOM', () => {
const extractor = (request: { headers: { accept?: string } }) => {
const match = request.headers.accept?.match(/v(\d+\.?\d*)\+json$/);
if (match) {
return match[1];
}
return null;
};
it('should return next if there is no pertinent request object', () => {
const version = '1';
const versioningOptions: VersioningOptions = {
type: VersioningType.CUSTOM,
extractor,
};
const handler = sinon.stub();
const routePathMetadata: RoutePathMetadata = {
methodVersion: version,
versioningOptions,
};
const versionFilter = (routerBuilder as any).applyVersionFilter(
null,
routePathMetadata,
handler,
);
const req = { headers: {} };
const res = {};
const next = sinon.stub();
versionFilter(req, res, next);
expect(next.called).to.be.true;
});
it('should return next if there is no version in the request object value', () => {
const version = '1';
const versioningOptions: VersioningOptions = {
type: VersioningType.CUSTOM,
extractor,
};
const handler = sinon.stub();
const routePathMetadata: RoutePathMetadata = {
methodVersion: version,
versioningOptions,
};
const versionFilter = (routerBuilder as any).applyVersionFilter(
null,
routePathMetadata,
handler,
);
const req = { headers: { accept: 'application/json;' } };
const res = {};
const next = sinon.stub();
versionFilter(req, res, next);
expect(next.called).to.be.true;
});
describe('when the handler version is an array', () => {
it('should return next if the version in the request object value does not match the handler version', () => {
const version = ['1', '2'];
const versioningOptions: VersioningOptions = {
type: VersioningType.CUSTOM,
extractor,
};
const handler = sinon.stub();
const routePathMetadata: RoutePathMetadata = {
methodVersion: version,
versioningOptions,
};
const versionFilter = (routerBuilder as any).applyVersionFilter(
null,
routePathMetadata,
handler,
);
const req = { headers: { accept: 'application/foo.v3+json' } };
const res = {};
const next = sinon.stub();
versionFilter(req, res, next);
expect(next.called).to.be.true;
});
it('should return the handler if the version in the request object value matches the handler version', () => {
const version = ['1', '2'];
const versioningOptions: VersioningOptions = {
type: VersioningType.CUSTOM,
extractor,
};
const handler = sinon.stub();
const routePathMetadata: RoutePathMetadata = {
methodVersion: version,
versioningOptions,
};
const versionFilter = (routerBuilder as any).applyVersionFilter(
null,
routePathMetadata,
handler,
);
const req = { headers: { accept: 'application/foo.v2+json' } };
const res = {};
const next = sinon.stub();
versionFilter(req, res, next);
expect(handler.calledWith(req, res, next)).to.be.true;
});
});
describe('when the handler version is a string', () => {
it('should return next if the version in the request object value does not match the handler version', () => {
const version = '1';
const versioningOptions: VersioningOptions = {
type: VersioningType.CUSTOM,
extractor,
};
const handler = sinon.stub();
const routePathMetadata: RoutePathMetadata = {
methodVersion: version,
versioningOptions,
};
const versionFilter = (routerBuilder as any).applyVersionFilter(
null,
routePathMetadata,
handler,
);
const req = { headers: { accept: 'application/foo.v2+json' } };
const res = {};
const next = sinon.stub();
versionFilter(req, res, next);
expect(next.called).to.be.true;
});
it('should return the handler if the version in the request object value matches the handler version', () => {
const version = '1';
const versioningOptions: VersioningOptions = {
type: VersioningType.CUSTOM,
extractor,
};
const handler = sinon.stub();
const routePathMetadata: RoutePathMetadata = {
methodVersion: version,
versioningOptions,
};
const versionFilter = (routerBuilder as any).applyVersionFilter(
null,
routePathMetadata,
handler,
);
const req = { headers: { accept: 'application/foo.v1+json' } };
const res = {};
const next = sinon.stub();
versionFilter(req, res, next);
expect(handler.calledWith(req, res, next)).to.be.true;
});
});
});
describe('when the versioning type is HEADER', () => {
it('should return next if there is no Custom Header', () => {
const version = '1';

View File

@@ -1,18 +0,0 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="8.2.0"></a>
# [8.2.0](https://github.com/nestjs/nest/compare/v8.1.2...v8.2.0) (2021-11-08)
### Bug Fixes
* **microservices:** npm run format ([fdf11a5](https://github.com/nestjs/nest/commit/fdf11a5))
### Features
* **microservices:** adds packageDefinition option to ClientGrpc ([76f2918](https://github.com/nestjs/nest/commit/76f2918)), closes [#8457](https://github.com/nestjs/nest/issues/8457)
* **microservices:** removes [@grpc](https://github.com/grpc)/grpc-js import ([3b74293](https://github.com/nestjs/nest/commit/3b74293))

View File

@@ -123,6 +123,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<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://boringowl.io/" target="_blank"><img src="https://nestjs.com/img/boringowl-logo.svg" width="120" valign="middle" /></a></td>
</tr></table>
## Backers

View File

@@ -19,6 +19,7 @@ import {
KafkaConfig,
KafkaMessage,
Producer,
TopicPartitionOffsetAndMetadata,
} from '../external/kafka.interface';
import {
KafkaLogger,
@@ -191,7 +192,9 @@ export class ClientKafka extends ClientProxy {
protected async dispatchEvent(packet: OutgoingEvent): Promise<any> {
const pattern = this.normalizePattern(packet.pattern);
const outgoingEvent = await this.serializer.serialize(packet.data);
const outgoingEvent = await this.serializer.serialize(packet.data, {
pattern,
});
const message = Object.assign(
{
topic: pattern,
@@ -231,7 +234,7 @@ export class ClientKafka extends ClientProxy {
const replyTopic = this.getResponsePatternName(pattern);
const replyPartition = this.getReplyTopicPartition(replyTopic);
Promise.resolve(this.serializer.serialize(packet.data))
Promise.resolve(this.serializer.serialize(packet.data, { pattern }))
.then((serializedPacket: KafkaRequest) => {
serializedPacket.headers[KafkaHeaders.CORRELATION_ID] = packet.id;
serializedPacket.headers[KafkaHeaders.REPLY_TOPIC] = replyTopic;
@@ -284,4 +287,14 @@ export class ClientKafka extends ClientProxy {
this.deserializer =
(options && options.deserializer) || new KafkaResponseDeserializer();
}
public commitOffsets(
topicPartitions: TopicPartitionOffsetAndMetadata[],
): Promise<void> {
if (this.consumer) {
return this.consumer.commitOffsets(topicPartitions);
} else {
throw new Error('No consumer initialized');
}
}
}

View File

@@ -5,7 +5,7 @@ import {
} from './packet.interface';
export interface Serializer<TInput = any, TOutput = any> {
serialize(value: TInput): TOutput;
serialize(value: TInput, options?: Record<string, any>): TOutput;
}
export type ProducerSerializer = Serializer<

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/microservices",
"version": "8.3.0",
"version": "8.3.1",
"description": "Nest - modern, fast, powerful node.js web framework (@microservices)",
"author": "Kamil Mysliwiec",
"license": "MIT",
@@ -22,8 +22,8 @@
"tslib": "2.3.1"
},
"devDependencies": {
"@nestjs/common": "8.3.0",
"@nestjs/core": "8.3.0"
"@nestjs/common": "8.3.1",
"@nestjs/core": "8.3.1"
},
"peerDependencies": {
"@grpc/grpc-js": "*",

View File

@@ -1,12 +0,0 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="8.2.0"></a>
# [8.2.0](https://github.com/nestjs/nest/compare/v8.1.2...v8.2.0) (2021-11-08)
### Features
* **common:** add the ability to set some extra metadata about returned files ([5100573](https://github.com/nestjs/nest/commit/5100573))

View File

@@ -123,6 +123,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<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://boringowl.io/" target="_blank"><img src="https://nestjs.com/img/boringowl-logo.svg" width="120" valign="middle" /></a></td>
</tr></table>
## Backers

View File

@@ -48,12 +48,24 @@ export class ExpressAdapter extends AbstractHttpAdapter {
}
if (body instanceof StreamableFile) {
const streamHeaders = body.getHeaders();
if (response.getHeader('Content-Type') === undefined) {
if (
response.getHeader('Content-Type') === undefined &&
streamHeaders.type !== undefined
) {
response.setHeader('Content-Type', streamHeaders.type);
}
if (response.getHeader('Content-Disposition') === undefined) {
if (
response.getHeader('Content-Disposition') === undefined &&
streamHeaders.disposition !== undefined
) {
response.setHeader('Content-Disposition', streamHeaders.disposition);
}
if (
response.getHeader('Content-Length') === undefined &&
streamHeaders.length !== undefined
) {
response.setHeader('Content-Length', streamHeaders.length);
}
return body.getStream().pipe(response);
}
return isObject(body) ? response.json(body) : response.send(String(body));
@@ -199,6 +211,42 @@ export class ExpressAdapter extends AbstractHttpAdapter {
if (versioningOptions.type === VersioningType.URI) {
return handler(req, res, next);
}
// Custom Extractor Versioning Handler
if (versioningOptions.type === VersioningType.CUSTOM) {
const extractedVersion = versioningOptions.extractor(req);
if (Array.isArray(version)) {
if (
Array.isArray(extractedVersion) &&
version.filter(v => extractedVersion.includes(v)).length
) {
return handler(req, res, next);
} else if (
isString(extractedVersion) &&
version.includes(extractedVersion)
) {
return handler(req, res, next);
}
} else if (isString(version)) {
// Known bug here - if there are multiple versions supported across separate
// handlers/controllers, we can't select the highest matching handler.
// Since this code is evaluated per-handler, then we can't see if the highest
// specified version exists in a different handler.
if (
Array.isArray(extractedVersion) &&
extractedVersion.includes(version)
) {
return handler(req, res, next);
} else if (
isString(extractedVersion) &&
version === extractedVersion
) {
return handler(req, res, next);
}
}
}
// Media Type (Accept Header) Versioning Handler
if (versioningOptions.type === VersioningType.MEDIA_TYPE) {
const MEDIA_TYPE_HEADER = 'Accept';

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/platform-express",
"version": "8.3.0",
"version": "8.3.1",
"description": "Nest - modern, fast, powerful node.js web framework (@platform-express)",
"author": "Kamil Mysliwiec",
"license": "MIT",
@@ -17,15 +17,15 @@
"access": "public"
},
"dependencies": {
"body-parser": "1.19.1",
"body-parser": "1.19.2",
"cors": "2.8.5",
"express": "4.17.2",
"express": "4.17.3",
"multer": "1.4.4",
"tslib": "2.3.1"
},
"devDependencies": {
"@nestjs/common": "8.3.0",
"@nestjs/core": "8.3.0"
"@nestjs/common": "8.3.1",
"@nestjs/core": "8.3.1"
},
"peerDependencies": {
"@nestjs/common": "^8.0.0",

View File

@@ -1,18 +0,0 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="8.2.0"></a>
# [8.2.0](https://github.com/nestjs/nest/compare/v8.1.2...v8.2.0) (2021-11-08)
### Bug Fixes
* **deps:** update dependency fastify to v3.23.1 ([63113d8](https://github.com/nestjs/nest/commit/63113d8))
* **platform-fastify:** fix streamable file processing ([365c40b](https://github.com/nestjs/nest/commit/365c40b))
### Features
* **common:** add the ability to set some extra metadata about returned files ([5100573](https://github.com/nestjs/nest/commit/5100573))

View File

@@ -123,6 +123,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<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://boringowl.io/" target="_blank"><img src="https://nestjs.com/img/boringowl-logo.svg" width="120" valign="middle" /></a></td>
</tr></table>
## Backers

View File

@@ -115,23 +115,27 @@ export class FastifyAdapter<
}
},
storage() {
const versions = new Map();
const versions = new Map<string, unknown>();
return {
get(version: string | Array<string>) {
if (Array.isArray(version)) {
return versions.get(version.find(v => versions.has(v))) || null;
}
return versions.get(version) || null;
},
set(
versionOrVersions: string | Array<string>,
store: Map<string, any>,
) {
const storeVersionConstraint = version =>
set(versionOrVersions: string | Array<string>, store: unknown) {
const storeVersionConstraint = (version: string) =>
versions.set(version, store);
if (Array.isArray(versionOrVersions))
versionOrVersions.forEach(storeVersionConstraint);
else storeVersionConstraint(versionOrVersions);
},
del(version: string | Array<string>) {
versions.delete(version);
if (Array.isArray(version)) {
version.forEach(v => versions.delete(v));
} else {
versions.delete(version);
}
},
empty() {
versions.clear();
@@ -167,6 +171,10 @@ export class FastifyAdapter<
return customHeaderVersionParameter;
}
}
// Custom Versioning Handler
else if (this.versioningOptions.type === VersioningType.CUSTOM) {
return this.versioningOptions.extractor(req);
}
return undefined;
},
mustMatchWhenDerived: false,
@@ -282,12 +290,24 @@ export class FastifyAdapter<
}
if (body instanceof StreamableFile) {
const streamHeaders = body.getHeaders();
if (fastifyReply.getHeader('Content-Type') === undefined) {
if (
fastifyReply.getHeader('Content-Type') === undefined &&
streamHeaders.type !== undefined
) {
fastifyReply.header('Content-Type', streamHeaders.type);
}
if (fastifyReply.getHeader('Content-Disposition') === undefined) {
if (
fastifyReply.getHeader('Content-Disposition') === undefined &&
streamHeaders.disposition !== undefined
) {
fastifyReply.header('Content-Disposition', streamHeaders.disposition);
}
if (
fastifyReply.getHeader('Content-Length') === undefined &&
streamHeaders.length !== undefined
) {
fastifyReply.header('Content-Length', streamHeaders.length);
}
body = body.getStream();
}
return fastifyReply.send(body);

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/platform-fastify",
"version": "8.3.0",
"version": "8.3.1",
"description": "Nest - modern, fast, powerful node.js web framework (@platform-fastify)",
"author": "Kamil Mysliwiec",
"license": "MIT",
@@ -17,10 +17,10 @@
"access": "public"
},
"dependencies": {
"fastify": "3.27.1",
"fastify-cors": "6.0.2",
"fastify": "3.27.2",
"fastify-cors": "6.0.3",
"fastify-formbody": "5.2.0",
"light-my-request": "4.7.1",
"light-my-request": "4.8.0",
"middie": "6.0.0",
"path-to-regexp": "3.2.0",
"tslib": "2.3.1"

View File

@@ -1,12 +0,0 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="8.2.0"></a>
# [8.2.0](https://github.com/nestjs/nest/compare/v8.1.2...v8.2.0) (2021-11-08)
**Note:** Version bump only for package @nestjs/platform-socket.io

View File

@@ -123,6 +123,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<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://boringowl.io/" target="_blank"><img src="https://nestjs.com/img/boringowl-logo.svg" width="120" valign="middle" /></a></td>
</tr></table>
## Backers

View File

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

View File

@@ -1,12 +0,0 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="8.2.0"></a>
# [8.2.0](https://github.com/nestjs/nest/compare/v8.1.2...v8.2.0) (2021-11-08)
**Note:** Version bump only for package @nestjs/platform-ws

View File

@@ -123,6 +123,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<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://boringowl.io/" target="_blank"><img src="https://nestjs.com/img/boringowl-logo.svg" width="120" valign="middle" /></a></td>
</tr></table>
## Backers

View File

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

View File

@@ -1,12 +0,0 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="8.2.0"></a>
# [8.2.0](https://github.com/nestjs/nest/compare/v8.1.2...v8.2.0) (2021-11-08)
**Note:** Version bump only for package @nestjs/testing

View File

@@ -123,6 +123,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<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://boringowl.io/" target="_blank"><img src="https://nestjs.com/img/boringowl-logo.svg" width="120" valign="middle" /></a></td>
</tr></table>
## Backers

View File

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

View File

@@ -5,7 +5,6 @@
"noImplicitAny": false,
"skipLibCheck": true,
"suppressImplicitAnyIndexErrors": true,
"useUnknownInCatchVariables": false,
"noUnusedLocals": false,
"importHelpers": true,
"removeComments": false,

View File

@@ -1,12 +0,0 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
<a name="8.2.0"></a>
# [8.2.0](https://github.com/nestjs/nest/compare/v8.1.2...v8.2.0) (2021-11-08)
**Note:** Version bump only for package @nestjs/websockets

View File

@@ -123,6 +123,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
<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://boringowl.io/" target="_blank"><img src="https://nestjs.com/img/boringowl-logo.svg" width="120" valign="middle" /></a></td>
</tr></table>
## Backers

View File

@@ -31,22 +31,22 @@ export interface GatewayMetadata {
parser?: any;
/**
* How many ms before a client without namespace is closed
* @default 45000
* @default 45_000
*/
connectTimeout?: number;
/**
* How many ms without a pong packet to consider the connection closed
* @default 5000
* @default 20_000
*/
pingTimeout?: number;
/**
* How many ms before sending a new ping packet
* @default 25000
* @default 25_000
*/
pingInterval?: number;
/**
* How many ms before an uncompleted transport upgrade is cancelled
* @default 10000
* @default 10_000
*/
upgradeTimeout?: number;
/**
@@ -116,7 +116,7 @@ export interface GatewayMetadata {
destroyUpgrade?: boolean;
/**
* Milliseconds after which unhandled requests are ended
* @default 1000
* @default 1_000
*/
destroyUpgradeTimeout?: number;
}

View File

@@ -1,6 +1,6 @@
{
"name": "@nestjs/websockets",
"version": "8.3.0",
"version": "8.3.1",
"description": "Nest - modern, fast, powerful node.js web framework (@websockets)",
"author": "Kamil Mysliwiec",
"license": "MIT",
@@ -13,12 +13,12 @@
},
"dependencies": {
"iterare": "1.2.1",
"object-hash": "2.2.0",
"object-hash": "3.0.0",
"tslib": "2.3.1"
},
"devDependencies": {
"@nestjs/common": "8.3.0",
"@nestjs/core": "8.3.0"
"@nestjs/common": "8.3.1",
"@nestjs/core": "8.3.1"
},
"peerDependencies": {
"@nestjs/common": "^8.0.0",

View File

@@ -14,9 +14,9 @@
}
},
"@angular-devkit/core": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.2.tgz",
"integrity": "sha512-qH0Vu8qwGD5uhmE8PtePA1lm7xL3JtbBCcrQICmLqD6njLDVb2N5pbdDXeiXDlWGUoIRHUhu6Uw4AsY8zXP/FA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.4.tgz",
"integrity": "sha512-hSw1JWA/6dDAF/xleQRXGtzHphfU49TMUhvAoAmsmmz3NAn03xLy1dtqdIXIf+TkFXVvZDaAB2mW8KfRV67GFg==",
"dev": true,
"requires": {
"ajv": "8.9.0",
@@ -57,12 +57,12 @@
}
},
"@angular-devkit/schematics": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.2.tgz",
"integrity": "sha512-kXPLTkSzRCeBX+SYUkC6MIrWCkH90Y8hVegR9R5n2YqhCJyE+dZlcx4d/8d3VHtZlzAs0LL8BU+liC3wMIagjA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.4.tgz",
"integrity": "sha512-VMhYa4cDu5yE31OvHncAd15Rmlchih/Sr6sxFsIwkg4xzRNIIZCtwqxVXgf0TiTN9zrvlvzK7nhPqTGNqqYb2A==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/core": "13.2.4",
"jsonc-parser": "3.0.0",
"magic-string": "0.25.7",
"ora": "5.4.1",
@@ -1730,22 +1730,22 @@
}
},
"@nestjs/schematics": {
"version": "8.0.6",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.6.tgz",
"integrity": "sha512-IgWuplXg3I+2lzQqy5jR45C+EpBiOuPQwh8zWCjlQDYU9/X/2a8B8byJXw3nuguZS/huuuXx3ZhfHJKQYk6uIA==",
"version": "8.0.7",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.7.tgz",
"integrity": "sha512-7k+eMMBUwvXFp6vwZ5byiLBEQKzjMyIJwO46ginoFugt2AXrOt0iUhR3BKFuWDBZaYQ1l4az86UGw5ohgH3wow==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/schematics": "13.2.2",
"fs-extra": "10.0.0",
"@angular-devkit/core": "13.2.4",
"@angular-devkit/schematics": "13.2.4",
"fs-extra": "10.0.1",
"jsonc-parser": "3.0.0",
"pluralize": "8.0.0"
},
"dependencies": {
"fs-extra": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
"integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz",
"integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.0",
@@ -2034,9 +2034,9 @@
"dev": true
},
"@types/node": {
"version": "16.11.21",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.21.tgz",
"integrity": "sha512-Pf8M1XD9i1ksZEcCP8vuSNwooJ/bZapNmIzpmsMaL+jMI+8mEYU3PKvs+xDNuQcJWF/x24WzY4qxLtB0zNow9A==",
"version": "16.11.25",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.25.tgz",
"integrity": "sha512-NrTwfD7L1RTc2qrHQD4RTTy4p0CO2LatKBEKEds3CaVuhoM/+DJzmWZl5f+ikR8cm8F5mfJxK+9rQq07gRiSjQ==",
"dev": true
},
"@types/parse-json": {

View File

@@ -30,11 +30,11 @@
},
"devDependencies": {
"@nestjs/cli": "8.1.7",
"@nestjs/schematics": "8.0.6",
"@nestjs/schematics": "8.0.7",
"@nestjs/testing": "8.2.3",
"@types/express": "4.17.13",
"@types/jest": "27.4.0",
"@types/node": "16.11.21",
"@types/node": "16.11.25",
"@types/supertest": "2.0.11",
"jest": "27.5.1",
"prettier": "2.5.1",

View File

@@ -14,9 +14,9 @@
}
},
"@angular-devkit/core": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.2.tgz",
"integrity": "sha512-qH0Vu8qwGD5uhmE8PtePA1lm7xL3JtbBCcrQICmLqD6njLDVb2N5pbdDXeiXDlWGUoIRHUhu6Uw4AsY8zXP/FA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.4.tgz",
"integrity": "sha512-hSw1JWA/6dDAF/xleQRXGtzHphfU49TMUhvAoAmsmmz3NAn03xLy1dtqdIXIf+TkFXVvZDaAB2mW8KfRV67GFg==",
"dev": true,
"requires": {
"ajv": "8.9.0",
@@ -63,12 +63,12 @@
}
},
"@angular-devkit/schematics": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.2.tgz",
"integrity": "sha512-kXPLTkSzRCeBX+SYUkC6MIrWCkH90Y8hVegR9R5n2YqhCJyE+dZlcx4d/8d3VHtZlzAs0LL8BU+liC3wMIagjA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.4.tgz",
"integrity": "sha512-VMhYa4cDu5yE31OvHncAd15Rmlchih/Sr6sxFsIwkg4xzRNIIZCtwqxVXgf0TiTN9zrvlvzK7nhPqTGNqqYb2A==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/core": "13.2.4",
"jsonc-parser": "3.0.0",
"magic-string": "0.25.7",
"ora": "5.4.1",
@@ -1929,22 +1929,22 @@
}
},
"@nestjs/schematics": {
"version": "8.0.6",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.6.tgz",
"integrity": "sha512-IgWuplXg3I+2lzQqy5jR45C+EpBiOuPQwh8zWCjlQDYU9/X/2a8B8byJXw3nuguZS/huuuXx3ZhfHJKQYk6uIA==",
"version": "8.0.7",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.7.tgz",
"integrity": "sha512-7k+eMMBUwvXFp6vwZ5byiLBEQKzjMyIJwO46ginoFugt2AXrOt0iUhR3BKFuWDBZaYQ1l4az86UGw5ohgH3wow==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/schematics": "13.2.2",
"fs-extra": "10.0.0",
"@angular-devkit/core": "13.2.4",
"@angular-devkit/schematics": "13.2.4",
"fs-extra": "10.0.1",
"jsonc-parser": "3.0.0",
"pluralize": "8.0.0"
},
"dependencies": {
"fs-extra": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
"integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz",
"integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.0",
@@ -2308,9 +2308,9 @@
"dev": true
},
"@types/node": {
"version": "16.11.21",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.21.tgz",
"integrity": "sha512-Pf8M1XD9i1ksZEcCP8vuSNwooJ/bZapNmIzpmsMaL+jMI+8mEYU3PKvs+xDNuQcJWF/x24WzY4qxLtB0zNow9A=="
"version": "16.11.25",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.25.tgz",
"integrity": "sha512-NrTwfD7L1RTc2qrHQD4RTTy4p0CO2LatKBEKEds3CaVuhoM/+DJzmWZl5f+ikR8cm8F5mfJxK+9rQq07gRiSjQ=="
},
"@types/parse-json": {
"version": "4.0.0",

View File

@@ -33,10 +33,10 @@
},
"devDependencies": {
"@nestjs/cli": "8.1.7",
"@nestjs/schematics": "8.0.6",
"@nestjs/schematics": "8.0.7",
"@nestjs/testing": "8.2.3",
"@types/express": "4.17.13",
"@types/node": "16.11.21",
"@types/node": "16.11.25",
"@types/supertest": "2.0.11",
"@types/ws": "8.2.2",
"@typescript-eslint/eslint-plugin": "4.33.0",

View File

@@ -1,16 +1,23 @@
import { IoAdapter } from '@nestjs/platform-socket.io';
import { Server, ServerOptions } from 'socket.io';
import { ServerOptions } from 'socket.io';
import { createAdapter } from '@socket.io/redis-adapter';
import { createClient } from 'redis';
const io = new Server();
const pubClient = createClient({ url: `redis://localhost:6379` });
const subClient = pubClient.duplicate();
const redisAdapter = io.adapter(createAdapter(pubClient, subClient));
export class RedisIoAdapter extends IoAdapter {
private adapterConstructor: ReturnType<typeof createAdapter>;
async connectToRedis(): Promise<void> {
const pubClient = createClient({ url: `redis://localhost:6379` });
const subClient = pubClient.duplicate();
await Promise.all([pubClient.connect(), subClient.connect()]);
this.adapterConstructor = createAdapter(pubClient, subClient);
}
createIOServer(port: number, options?: ServerOptions): any {
const server = super.createIOServer(port, options);
server.adapter(redisAdapter);
server.adapter(this.adapterConstructor);
return server;
}
}

View File

@@ -3,6 +3,12 @@ import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
// Uncomment these lines to use the Redis adapter:
// const redisIoAdapter = new RedisIoAdapter(app);
// await redisIoAdapter.connectToRedis();
// app.useWebSocketAdapter(redisIoAdapter);
await app.listen(3000);
console.log(`Application is running on: ${await app.getUrl()}`);
}

View File

@@ -14,9 +14,9 @@
}
},
"@angular-devkit/core": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.2.tgz",
"integrity": "sha512-qH0Vu8qwGD5uhmE8PtePA1lm7xL3JtbBCcrQICmLqD6njLDVb2N5pbdDXeiXDlWGUoIRHUhu6Uw4AsY8zXP/FA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.4.tgz",
"integrity": "sha512-hSw1JWA/6dDAF/xleQRXGtzHphfU49TMUhvAoAmsmmz3NAn03xLy1dtqdIXIf+TkFXVvZDaAB2mW8KfRV67GFg==",
"dev": true,
"requires": {
"ajv": "8.9.0",
@@ -57,12 +57,12 @@
}
},
"@angular-devkit/schematics": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.2.tgz",
"integrity": "sha512-kXPLTkSzRCeBX+SYUkC6MIrWCkH90Y8hVegR9R5n2YqhCJyE+dZlcx4d/8d3VHtZlzAs0LL8BU+liC3wMIagjA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.4.tgz",
"integrity": "sha512-VMhYa4cDu5yE31OvHncAd15Rmlchih/Sr6sxFsIwkg4xzRNIIZCtwqxVXgf0TiTN9zrvlvzK7nhPqTGNqqYb2A==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/core": "13.2.4",
"jsonc-parser": "3.0.0",
"magic-string": "0.25.7",
"ora": "5.4.1",
@@ -1825,22 +1825,22 @@
}
},
"@nestjs/schematics": {
"version": "8.0.6",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.6.tgz",
"integrity": "sha512-IgWuplXg3I+2lzQqy5jR45C+EpBiOuPQwh8zWCjlQDYU9/X/2a8B8byJXw3nuguZS/huuuXx3ZhfHJKQYk6uIA==",
"version": "8.0.7",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.7.tgz",
"integrity": "sha512-7k+eMMBUwvXFp6vwZ5byiLBEQKzjMyIJwO46ginoFugt2AXrOt0iUhR3BKFuWDBZaYQ1l4az86UGw5ohgH3wow==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/schematics": "13.2.2",
"fs-extra": "10.0.0",
"@angular-devkit/core": "13.2.4",
"@angular-devkit/schematics": "13.2.4",
"fs-extra": "10.0.1",
"jsonc-parser": "3.0.0",
"pluralize": "8.0.0"
},
"dependencies": {
"fs-extra": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
"integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz",
"integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.0",
@@ -2135,9 +2135,9 @@
"dev": true
},
"@types/node": {
"version": "16.11.21",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.21.tgz",
"integrity": "sha512-Pf8M1XD9i1ksZEcCP8vuSNwooJ/bZapNmIzpmsMaL+jMI+8mEYU3PKvs+xDNuQcJWF/x24WzY4qxLtB0zNow9A==",
"version": "16.11.25",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.25.tgz",
"integrity": "sha512-NrTwfD7L1RTc2qrHQD4RTTy4p0CO2LatKBEKEds3CaVuhoM/+DJzmWZl5f+ikR8cm8F5mfJxK+9rQq07gRiSjQ==",
"dev": true
},
"@types/parse-json": {

View File

@@ -31,11 +31,11 @@
},
"devDependencies": {
"@nestjs/cli": "8.1.7",
"@nestjs/schematics": "8.0.6",
"@nestjs/schematics": "8.0.7",
"@nestjs/testing": "8.2.3",
"@types/amqplib": "0.8.2",
"@types/express": "4.17.13",
"@types/node": "16.11.21",
"@types/node": "16.11.25",
"@types/supertest": "2.0.11",
"jest": "27.5.1",
"prettier": "2.5.1",

View File

@@ -1602,22 +1602,22 @@
}
},
"@nestjs/schematics": {
"version": "8.0.6",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.6.tgz",
"integrity": "sha512-IgWuplXg3I+2lzQqy5jR45C+EpBiOuPQwh8zWCjlQDYU9/X/2a8B8byJXw3nuguZS/huuuXx3ZhfHJKQYk6uIA==",
"version": "8.0.7",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.7.tgz",
"integrity": "sha512-7k+eMMBUwvXFp6vwZ5byiLBEQKzjMyIJwO46ginoFugt2AXrOt0iUhR3BKFuWDBZaYQ1l4az86UGw5ohgH3wow==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/schematics": "13.2.2",
"fs-extra": "10.0.0",
"@angular-devkit/core": "13.2.4",
"@angular-devkit/schematics": "13.2.4",
"fs-extra": "10.0.1",
"jsonc-parser": "3.0.0",
"pluralize": "8.0.0"
},
"dependencies": {
"@angular-devkit/core": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.2.tgz",
"integrity": "sha512-qH0Vu8qwGD5uhmE8PtePA1lm7xL3JtbBCcrQICmLqD6njLDVb2N5pbdDXeiXDlWGUoIRHUhu6Uw4AsY8zXP/FA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.4.tgz",
"integrity": "sha512-hSw1JWA/6dDAF/xleQRXGtzHphfU49TMUhvAoAmsmmz3NAn03xLy1dtqdIXIf+TkFXVvZDaAB2mW8KfRV67GFg==",
"dev": true,
"requires": {
"ajv": "8.9.0",
@@ -1629,12 +1629,12 @@
}
},
"@angular-devkit/schematics": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.2.tgz",
"integrity": "sha512-kXPLTkSzRCeBX+SYUkC6MIrWCkH90Y8hVegR9R5n2YqhCJyE+dZlcx4d/8d3VHtZlzAs0LL8BU+liC3wMIagjA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.4.tgz",
"integrity": "sha512-VMhYa4cDu5yE31OvHncAd15Rmlchih/Sr6sxFsIwkg4xzRNIIZCtwqxVXgf0TiTN9zrvlvzK7nhPqTGNqqYb2A==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/core": "13.2.4",
"jsonc-parser": "3.0.0",
"magic-string": "0.25.7",
"ora": "5.4.1",
@@ -1654,9 +1654,9 @@
}
},
"fs-extra": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
"integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz",
"integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.0",
@@ -2015,9 +2015,9 @@
"dev": true
},
"@types/node": {
"version": "16.11.21",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.21.tgz",
"integrity": "sha512-Pf8M1XD9i1ksZEcCP8vuSNwooJ/bZapNmIzpmsMaL+jMI+8mEYU3PKvs+xDNuQcJWF/x24WzY4qxLtB0zNow9A=="
"version": "16.11.25",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.25.tgz",
"integrity": "sha512-NrTwfD7L1RTc2qrHQD4RTTy4p0CO2LatKBEKEds3CaVuhoM/+DJzmWZl5f+ikR8cm8F5mfJxK+9rQq07gRiSjQ=="
},
"@types/parse-json": {
"version": "4.0.0",

View File

@@ -32,10 +32,10 @@
},
"devDependencies": {
"@nestjs/cli": "8.1.5",
"@nestjs/schematics": "8.0.6",
"@nestjs/schematics": "8.0.7",
"@nestjs/testing": "8.2.3",
"@types/express": "4.17.13",
"@types/node": "16.11.21",
"@types/node": "16.11.25",
"@types/supertest": "2.0.11",
"@typescript-eslint/eslint-plugin": "4.33.0",
"@typescript-eslint/parser": "4.33.0",

View File

@@ -14,9 +14,9 @@
}
},
"@angular-devkit/core": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.2.tgz",
"integrity": "sha512-qH0Vu8qwGD5uhmE8PtePA1lm7xL3JtbBCcrQICmLqD6njLDVb2N5pbdDXeiXDlWGUoIRHUhu6Uw4AsY8zXP/FA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.4.tgz",
"integrity": "sha512-hSw1JWA/6dDAF/xleQRXGtzHphfU49TMUhvAoAmsmmz3NAn03xLy1dtqdIXIf+TkFXVvZDaAB2mW8KfRV67GFg==",
"dev": true,
"requires": {
"ajv": "8.9.0",
@@ -57,12 +57,12 @@
}
},
"@angular-devkit/schematics": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.2.tgz",
"integrity": "sha512-kXPLTkSzRCeBX+SYUkC6MIrWCkH90Y8hVegR9R5n2YqhCJyE+dZlcx4d/8d3VHtZlzAs0LL8BU+liC3wMIagjA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.4.tgz",
"integrity": "sha512-VMhYa4cDu5yE31OvHncAd15Rmlchih/Sr6sxFsIwkg4xzRNIIZCtwqxVXgf0TiTN9zrvlvzK7nhPqTGNqqYb2A==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/core": "13.2.4",
"jsonc-parser": "3.0.0",
"magic-string": "0.25.7",
"ora": "5.4.1",
@@ -1940,22 +1940,22 @@
}
},
"@nestjs/schematics": {
"version": "8.0.6",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.6.tgz",
"integrity": "sha512-IgWuplXg3I+2lzQqy5jR45C+EpBiOuPQwh8zWCjlQDYU9/X/2a8B8byJXw3nuguZS/huuuXx3ZhfHJKQYk6uIA==",
"version": "8.0.7",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.7.tgz",
"integrity": "sha512-7k+eMMBUwvXFp6vwZ5byiLBEQKzjMyIJwO46ginoFugt2AXrOt0iUhR3BKFuWDBZaYQ1l4az86UGw5ohgH3wow==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/schematics": "13.2.2",
"fs-extra": "10.0.0",
"@angular-devkit/core": "13.2.4",
"@angular-devkit/schematics": "13.2.4",
"fs-extra": "10.0.1",
"jsonc-parser": "3.0.0",
"pluralize": "8.0.0"
},
"dependencies": {
"fs-extra": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
"integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz",
"integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.0",
@@ -2268,9 +2268,9 @@
"dev": true
},
"@types/node": {
"version": "16.11.21",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.21.tgz",
"integrity": "sha512-Pf8M1XD9i1ksZEcCP8vuSNwooJ/bZapNmIzpmsMaL+jMI+8mEYU3PKvs+xDNuQcJWF/x24WzY4qxLtB0zNow9A==",
"version": "16.11.25",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.25.tgz",
"integrity": "sha512-NrTwfD7L1RTc2qrHQD4RTTy4p0CO2LatKBEKEds3CaVuhoM/+DJzmWZl5f+ikR8cm8F5mfJxK+9rQq07gRiSjQ==",
"dev": true
},
"@types/parse-json": {

View File

@@ -31,11 +31,11 @@
},
"devDependencies": {
"@nestjs/cli": "8.1.7",
"@nestjs/schematics": "8.0.6",
"@nestjs/schematics": "8.0.7",
"@nestjs/testing": "8.2.3",
"@types/express": "4.17.13",
"@types/jest": "27.4.0",
"@types/node": "16.11.21",
"@types/node": "16.11.25",
"@types/supertest": "2.0.11",
"@typescript-eslint/eslint-plugin": "4.33.0",
"@typescript-eslint/parser": "4.33.0",

View File

@@ -14,9 +14,9 @@
}
},
"@angular-devkit/core": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.2.tgz",
"integrity": "sha512-qH0Vu8qwGD5uhmE8PtePA1lm7xL3JtbBCcrQICmLqD6njLDVb2N5pbdDXeiXDlWGUoIRHUhu6Uw4AsY8zXP/FA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.4.tgz",
"integrity": "sha512-hSw1JWA/6dDAF/xleQRXGtzHphfU49TMUhvAoAmsmmz3NAn03xLy1dtqdIXIf+TkFXVvZDaAB2mW8KfRV67GFg==",
"dev": true,
"requires": {
"ajv": "8.9.0",
@@ -57,12 +57,12 @@
}
},
"@angular-devkit/schematics": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.2.tgz",
"integrity": "sha512-kXPLTkSzRCeBX+SYUkC6MIrWCkH90Y8hVegR9R5n2YqhCJyE+dZlcx4d/8d3VHtZlzAs0LL8BU+liC3wMIagjA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.4.tgz",
"integrity": "sha512-VMhYa4cDu5yE31OvHncAd15Rmlchih/Sr6sxFsIwkg4xzRNIIZCtwqxVXgf0TiTN9zrvlvzK7nhPqTGNqqYb2A==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/core": "13.2.4",
"jsonc-parser": "3.0.0",
"magic-string": "0.25.7",
"ora": "5.4.1",
@@ -1579,14 +1579,14 @@
}
},
"@nestjs/schematics": {
"version": "8.0.6",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.6.tgz",
"integrity": "sha512-IgWuplXg3I+2lzQqy5jR45C+EpBiOuPQwh8zWCjlQDYU9/X/2a8B8byJXw3nuguZS/huuuXx3ZhfHJKQYk6uIA==",
"version": "8.0.7",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.7.tgz",
"integrity": "sha512-7k+eMMBUwvXFp6vwZ5byiLBEQKzjMyIJwO46ginoFugt2AXrOt0iUhR3BKFuWDBZaYQ1l4az86UGw5ohgH3wow==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/schematics": "13.2.2",
"fs-extra": "10.0.0",
"@angular-devkit/core": "13.2.4",
"@angular-devkit/schematics": "13.2.4",
"fs-extra": "10.0.1",
"jsonc-parser": "3.0.0",
"pluralize": "8.0.0"
}
@@ -1873,9 +1873,9 @@
"dev": true
},
"@types/node": {
"version": "16.11.21",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.21.tgz",
"integrity": "sha512-Pf8M1XD9i1ksZEcCP8vuSNwooJ/bZapNmIzpmsMaL+jMI+8mEYU3PKvs+xDNuQcJWF/x24WzY4qxLtB0zNow9A=="
"version": "16.11.25",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.25.tgz",
"integrity": "sha512-NrTwfD7L1RTc2qrHQD4RTTy4p0CO2LatKBEKEds3CaVuhoM/+DJzmWZl5f+ikR8cm8F5mfJxK+9rQq07gRiSjQ=="
},
"@types/parse-json": {
"version": "4.0.0",
@@ -4009,9 +4009,9 @@
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
},
"fs-extra": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
"integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz",
"integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.0",

View File

@@ -30,11 +30,11 @@
},
"devDependencies": {
"@nestjs/cli": "8.1.7",
"@nestjs/schematics": "8.0.6",
"@nestjs/schematics": "8.0.7",
"@nestjs/testing": "8.2.3",
"@types/express": "4.17.13",
"@types/jest": "27.4.0",
"@types/node": "16.11.21",
"@types/node": "16.11.25",
"@types/supertest": "2.0.11",
"@typescript-eslint/eslint-plugin": "4.33.0",
"@typescript-eslint/parser": "4.33.0",

View File

@@ -1434,22 +1434,22 @@
}
},
"@nestjs/schematics": {
"version": "8.0.6",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.6.tgz",
"integrity": "sha512-IgWuplXg3I+2lzQqy5jR45C+EpBiOuPQwh8zWCjlQDYU9/X/2a8B8byJXw3nuguZS/huuuXx3ZhfHJKQYk6uIA==",
"version": "8.0.7",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.7.tgz",
"integrity": "sha512-7k+eMMBUwvXFp6vwZ5byiLBEQKzjMyIJwO46ginoFugt2AXrOt0iUhR3BKFuWDBZaYQ1l4az86UGw5ohgH3wow==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/schematics": "13.2.2",
"fs-extra": "10.0.0",
"@angular-devkit/core": "13.2.4",
"@angular-devkit/schematics": "13.2.4",
"fs-extra": "10.0.1",
"jsonc-parser": "3.0.0",
"pluralize": "8.0.0"
},
"dependencies": {
"@angular-devkit/core": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.2.tgz",
"integrity": "sha512-qH0Vu8qwGD5uhmE8PtePA1lm7xL3JtbBCcrQICmLqD6njLDVb2N5pbdDXeiXDlWGUoIRHUhu6Uw4AsY8zXP/FA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.4.tgz",
"integrity": "sha512-hSw1JWA/6dDAF/xleQRXGtzHphfU49TMUhvAoAmsmmz3NAn03xLy1dtqdIXIf+TkFXVvZDaAB2mW8KfRV67GFg==",
"dev": true,
"requires": {
"ajv": "8.9.0",
@@ -1461,12 +1461,12 @@
}
},
"@angular-devkit/schematics": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.2.tgz",
"integrity": "sha512-kXPLTkSzRCeBX+SYUkC6MIrWCkH90Y8hVegR9R5n2YqhCJyE+dZlcx4d/8d3VHtZlzAs0LL8BU+liC3wMIagjA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.4.tgz",
"integrity": "sha512-VMhYa4cDu5yE31OvHncAd15Rmlchih/Sr6sxFsIwkg4xzRNIIZCtwqxVXgf0TiTN9zrvlvzK7nhPqTGNqqYb2A==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/core": "13.2.4",
"jsonc-parser": "3.0.0",
"magic-string": "0.25.7",
"ora": "5.4.1",
@@ -1792,9 +1792,9 @@
"dev": true
},
"@types/node": {
"version": "16.11.21",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.21.tgz",
"integrity": "sha512-Pf8M1XD9i1ksZEcCP8vuSNwooJ/bZapNmIzpmsMaL+jMI+8mEYU3PKvs+xDNuQcJWF/x24WzY4qxLtB0zNow9A=="
"version": "16.11.25",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.25.tgz",
"integrity": "sha512-NrTwfD7L1RTc2qrHQD4RTTy4p0CO2LatKBEKEds3CaVuhoM/+DJzmWZl5f+ikR8cm8F5mfJxK+9rQq07gRiSjQ=="
},
"@types/parse-json": {
"version": "4.0.0",
@@ -3956,9 +3956,9 @@
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
},
"fs-extra": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
"integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz",
"integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.0",

View File

@@ -33,11 +33,11 @@
},
"devDependencies": {
"@nestjs/cli": "8.1.5",
"@nestjs/schematics": "8.0.6",
"@nestjs/schematics": "8.0.7",
"@nestjs/testing": "8.2.3",
"@types/express": "4.17.13",
"@types/jest": "27.4.0",
"@types/node": "16.11.21",
"@types/node": "16.11.25",
"@types/supertest": "2.0.11",
"@typescript-eslint/eslint-plugin": "4.33.0",
"@typescript-eslint/parser": "4.33.0",

View File

@@ -5,9 +5,9 @@
"requires": true,
"dependencies": {
"@angular-devkit/core": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.2.tgz",
"integrity": "sha512-qH0Vu8qwGD5uhmE8PtePA1lm7xL3JtbBCcrQICmLqD6njLDVb2N5pbdDXeiXDlWGUoIRHUhu6Uw4AsY8zXP/FA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.4.tgz",
"integrity": "sha512-hSw1JWA/6dDAF/xleQRXGtzHphfU49TMUhvAoAmsmmz3NAn03xLy1dtqdIXIf+TkFXVvZDaAB2mW8KfRV67GFg==",
"dev": true,
"requires": {
"ajv": "8.9.0",
@@ -48,12 +48,12 @@
}
},
"@angular-devkit/schematics": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.2.tgz",
"integrity": "sha512-kXPLTkSzRCeBX+SYUkC6MIrWCkH90Y8hVegR9R5n2YqhCJyE+dZlcx4d/8d3VHtZlzAs0LL8BU+liC3wMIagjA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.4.tgz",
"integrity": "sha512-VMhYa4cDu5yE31OvHncAd15Rmlchih/Sr6sxFsIwkg4xzRNIIZCtwqxVXgf0TiTN9zrvlvzK7nhPqTGNqqYb2A==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/core": "13.2.4",
"jsonc-parser": "3.0.0",
"magic-string": "0.25.7",
"ora": "5.4.1",
@@ -628,22 +628,22 @@
}
},
"@nestjs/schematics": {
"version": "8.0.6",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.6.tgz",
"integrity": "sha512-IgWuplXg3I+2lzQqy5jR45C+EpBiOuPQwh8zWCjlQDYU9/X/2a8B8byJXw3nuguZS/huuuXx3ZhfHJKQYk6uIA==",
"version": "8.0.7",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.7.tgz",
"integrity": "sha512-7k+eMMBUwvXFp6vwZ5byiLBEQKzjMyIJwO46ginoFugt2AXrOt0iUhR3BKFuWDBZaYQ1l4az86UGw5ohgH3wow==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/schematics": "13.2.2",
"fs-extra": "10.0.0",
"@angular-devkit/core": "13.2.4",
"@angular-devkit/schematics": "13.2.4",
"fs-extra": "10.0.1",
"jsonc-parser": "3.0.0",
"pluralize": "8.0.0"
},
"dependencies": {
"fs-extra": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
"integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz",
"integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.0",
@@ -797,9 +797,9 @@
"dev": true
},
"@types/node": {
"version": "16.11.21",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.21.tgz",
"integrity": "sha512-Pf8M1XD9i1ksZEcCP8vuSNwooJ/bZapNmIzpmsMaL+jMI+8mEYU3PKvs+xDNuQcJWF/x24WzY4qxLtB0zNow9A==",
"version": "16.11.25",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.25.tgz",
"integrity": "sha512-NrTwfD7L1RTc2qrHQD4RTTy4p0CO2LatKBEKEds3CaVuhoM/+DJzmWZl5f+ikR8cm8F5mfJxK+9rQq07gRiSjQ==",
"dev": true
},
"@types/parse-json": {

View File

@@ -20,8 +20,8 @@
},
"devDependencies": {
"@nestjs/cli": "8.1.7",
"@nestjs/schematics": "8.0.6",
"@types/node": "16.11.21",
"@nestjs/schematics": "8.0.7",
"@types/node": "16.11.25",
"@typescript-eslint/eslint-plugin": "4.33.0",
"@typescript-eslint/parser": "4.33.0",
"eslint": "7.32.0",

View File

@@ -5,20 +5,21 @@
"requires": true,
"dependencies": {
"@ampproject/remapping": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.0.tgz",
"integrity": "sha512-d5RysTlJ7hmw5Tw4UxgxcY3lkMe92n8sXCcuLPAyIAHK6j8DefDwtGnVVDgOnv+RnEosulDJ9NPKQL27bDId0g==",
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz",
"integrity": "sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==",
"dev": true,
"requires": {
"@jridgewell/trace-mapping": "^0.3.0"
}
},
"@babel/cli": {
"version": "7.17.0",
"resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.17.0.tgz",
"integrity": "sha512-es10YH/ejXbg551vtnmEzIPe3MQRNOS644o3pf8vUr1tIeNzVNlP8BBvs1Eh7roh5A+k2fEHUas+ZptOWHA1fQ==",
"version": "7.17.6",
"resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.17.6.tgz",
"integrity": "sha512-l4w608nsDNlxZhiJ5tE3DbNmr61fIKMZ6fTBo171VEFuFMIYuJ3mHRhTLEkKKyvx2Mizkkv/0a8OJOnZqkKYNA==",
"dev": true,
"requires": {
"@jridgewell/trace-mapping": "^0.3.4",
"@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents.3",
"chokidar": "^3.4.0",
"commander": "^4.0.1",
@@ -46,20 +47,20 @@
"dev": true
},
"@babel/core": {
"version": "7.17.2",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.2.tgz",
"integrity": "sha512-R3VH5G42VSDolRHyUO4V2cfag8WHcZyxdq5Z/m8Xyb92lW/Erm/6kM+XtRFGf3Mulre3mveni2NHfEUws8wSvw==",
"version": "7.17.5",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.5.tgz",
"integrity": "sha512-/BBMw4EvjmyquN5O+t5eh0+YqB3XXJkYD2cjKpYtWOfFy4lQ4UozNSmxAcWT8r2XtZs0ewG+zrfsqeR15i1ajA==",
"dev": true,
"requires": {
"@ampproject/remapping": "^2.0.0",
"@ampproject/remapping": "^2.1.0",
"@babel/code-frame": "^7.16.7",
"@babel/generator": "^7.17.0",
"@babel/generator": "^7.17.3",
"@babel/helper-compilation-targets": "^7.16.7",
"@babel/helper-module-transforms": "^7.16.7",
"@babel/helpers": "^7.17.2",
"@babel/parser": "^7.17.0",
"@babel/parser": "^7.17.3",
"@babel/template": "^7.16.7",
"@babel/traverse": "^7.17.0",
"@babel/traverse": "^7.17.3",
"@babel/types": "^7.17.0",
"convert-source-map": "^1.7.0",
"debug": "^4.1.0",
@@ -78,9 +79,9 @@
}
},
"@babel/generator": {
"version": "7.17.0",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.0.tgz",
"integrity": "sha512-I3Omiv6FGOC29dtlZhkfXO6pgkmukJSlT26QjVvS1DGZe/NzSVCPG41X0tS21oZkJYlovfj9qDWgKP+Cn4bXxw==",
"version": "7.17.3",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.3.tgz",
"integrity": "sha512-+R6Dctil/MgUsZsZAkYgK+ADNSZzJRRy0TvY65T71z/CR854xHQ1EweBYXdfT+HNeN7w0cSJJEzgxZMv40pxsg==",
"dev": true,
"requires": {
"@babel/types": "^7.17.0",
@@ -144,9 +145,9 @@
}
},
"@babel/parser": {
"version": "7.17.0",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.0.tgz",
"integrity": "sha512-VKXSCQx5D8S04ej+Dqsr1CzYvvWgf20jIw2D+YhQCrIlr2UZGaDds23Y0xg75/skOxpLCRpUZvk/1EAVkGoDOw==",
"version": "7.17.3",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.3.tgz",
"integrity": "sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA==",
"dev": true
},
"@babel/template": {
@@ -161,18 +162,18 @@
}
},
"@babel/traverse": {
"version": "7.17.0",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.0.tgz",
"integrity": "sha512-fpFIXvqD6kC7c7PUNnZ0Z8cQXlarCLtCUpt2S1Dx7PjoRtCFffvOkHHSom+m5HIxMZn5bIBVb71lhabcmjEsqg==",
"version": "7.17.3",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz",
"integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.16.7",
"@babel/generator": "^7.17.0",
"@babel/generator": "^7.17.3",
"@babel/helper-environment-visitor": "^7.16.7",
"@babel/helper-function-name": "^7.16.7",
"@babel/helper-hoist-variables": "^7.16.7",
"@babel/helper-split-export-declaration": "^7.16.7",
"@babel/parser": "^7.17.0",
"@babel/parser": "^7.17.3",
"@babel/types": "^7.17.0",
"debug": "^4.1.0",
"globals": "^11.1.0"
@@ -1222,9 +1223,9 @@
}
},
"@babel/generator": {
"version": "7.17.0",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.0.tgz",
"integrity": "sha512-I3Omiv6FGOC29dtlZhkfXO6pgkmukJSlT26QjVvS1DGZe/NzSVCPG41X0tS21oZkJYlovfj9qDWgKP+Cn4bXxw==",
"version": "7.17.3",
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.3.tgz",
"integrity": "sha512-+R6Dctil/MgUsZsZAkYgK+ADNSZzJRRy0TvY65T71z/CR854xHQ1EweBYXdfT+HNeN7w0cSJJEzgxZMv40pxsg==",
"dev": true,
"requires": {
"@babel/types": "^7.17.0",
@@ -1288,9 +1289,9 @@
}
},
"@babel/parser": {
"version": "7.17.0",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.0.tgz",
"integrity": "sha512-VKXSCQx5D8S04ej+Dqsr1CzYvvWgf20jIw2D+YhQCrIlr2UZGaDds23Y0xg75/skOxpLCRpUZvk/1EAVkGoDOw==",
"version": "7.17.3",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.3.tgz",
"integrity": "sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA==",
"dev": true
},
"@babel/template": {
@@ -1305,18 +1306,18 @@
}
},
"@babel/traverse": {
"version": "7.17.0",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.0.tgz",
"integrity": "sha512-fpFIXvqD6kC7c7PUNnZ0Z8cQXlarCLtCUpt2S1Dx7PjoRtCFffvOkHHSom+m5HIxMZn5bIBVb71lhabcmjEsqg==",
"version": "7.17.3",
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz",
"integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.16.7",
"@babel/generator": "^7.17.0",
"@babel/generator": "^7.17.3",
"@babel/helper-environment-visitor": "^7.16.7",
"@babel/helper-function-name": "^7.16.7",
"@babel/helper-hoist-variables": "^7.16.7",
"@babel/helper-split-export-declaration": "^7.16.7",
"@babel/parser": "^7.17.0",
"@babel/parser": "^7.17.3",
"@babel/types": "^7.17.0",
"debug": "^4.1.0",
"globals": "^11.1.0"
@@ -3680,15 +3681,15 @@
}
},
"@jridgewell/resolve-uri": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.4.tgz",
"integrity": "sha512-cz8HFjOFfUBtvN+NXYSFMHYRdxZMaEl0XypVrhzxBgadKIXhIkRd8aMeHhmF56Sl7SuS8OnUpQ73/k9LE4VnLg==",
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz",
"integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==",
"dev": true
},
"@jridgewell/sourcemap-codec": {
"version": "1.4.10",
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.10.tgz",
"integrity": "sha512-Ht8wIW5v165atIX1p+JvKR5ONzUyF4Ac8DZIQ5kZs9zrb6M8SJNXpx1zn04rn65VjBMygRoMXcyYwNK0fT7bEg==",
"version": "1.4.11",
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz",
"integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==",
"dev": true
},
"@jridgewell/trace-mapping": {

View File

@@ -22,8 +22,8 @@
"rxjs": "7.4.0"
},
"devDependencies": {
"@babel/cli": "7.17.0",
"@babel/core": "7.17.2",
"@babel/cli": "7.17.6",
"@babel/core": "7.17.5",
"@babel/node": "7.16.8",
"@babel/plugin-proposal-decorators": "7.17.2",
"@babel/plugin-transform-runtime": "7.17.0",

View File

@@ -14,9 +14,9 @@
}
},
"@angular-devkit/core": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.2.tgz",
"integrity": "sha512-qH0Vu8qwGD5uhmE8PtePA1lm7xL3JtbBCcrQICmLqD6njLDVb2N5pbdDXeiXDlWGUoIRHUhu6Uw4AsY8zXP/FA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.4.tgz",
"integrity": "sha512-hSw1JWA/6dDAF/xleQRXGtzHphfU49TMUhvAoAmsmmz3NAn03xLy1dtqdIXIf+TkFXVvZDaAB2mW8KfRV67GFg==",
"dev": true,
"requires": {
"ajv": "8.9.0",
@@ -57,12 +57,12 @@
}
},
"@angular-devkit/schematics": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.2.tgz",
"integrity": "sha512-kXPLTkSzRCeBX+SYUkC6MIrWCkH90Y8hVegR9R5n2YqhCJyE+dZlcx4d/8d3VHtZlzAs0LL8BU+liC3wMIagjA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.4.tgz",
"integrity": "sha512-VMhYa4cDu5yE31OvHncAd15Rmlchih/Sr6sxFsIwkg4xzRNIIZCtwqxVXgf0TiTN9zrvlvzK7nhPqTGNqqYb2A==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/core": "13.2.4",
"jsonc-parser": "3.0.0",
"magic-string": "0.25.7",
"ora": "5.4.1",
@@ -1824,22 +1824,22 @@
}
},
"@nestjs/schematics": {
"version": "8.0.6",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.6.tgz",
"integrity": "sha512-IgWuplXg3I+2lzQqy5jR45C+EpBiOuPQwh8zWCjlQDYU9/X/2a8B8byJXw3nuguZS/huuuXx3ZhfHJKQYk6uIA==",
"version": "8.0.7",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.7.tgz",
"integrity": "sha512-7k+eMMBUwvXFp6vwZ5byiLBEQKzjMyIJwO46ginoFugt2AXrOt0iUhR3BKFuWDBZaYQ1l4az86UGw5ohgH3wow==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/schematics": "13.2.2",
"fs-extra": "10.0.0",
"@angular-devkit/core": "13.2.4",
"@angular-devkit/schematics": "13.2.4",
"fs-extra": "10.0.1",
"jsonc-parser": "3.0.0",
"pluralize": "8.0.0"
},
"dependencies": {
"fs-extra": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
"integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz",
"integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.0",
@@ -2118,9 +2118,9 @@
"dev": true
},
"@types/node": {
"version": "16.11.21",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.21.tgz",
"integrity": "sha512-Pf8M1XD9i1ksZEcCP8vuSNwooJ/bZapNmIzpmsMaL+jMI+8mEYU3PKvs+xDNuQcJWF/x24WzY4qxLtB0zNow9A==",
"version": "16.11.25",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.25.tgz",
"integrity": "sha512-NrTwfD7L1RTc2qrHQD4RTTy4p0CO2LatKBEKEds3CaVuhoM/+DJzmWZl5f+ikR8cm8F5mfJxK+9rQq07gRiSjQ==",
"dev": true
},
"@types/parse-json": {

View File

@@ -30,10 +30,10 @@
},
"devDependencies": {
"@nestjs/cli": "8.1.7",
"@nestjs/schematics": "8.0.6",
"@nestjs/schematics": "8.0.7",
"@nestjs/testing": "8.2.3",
"@types/express": "4.17.13",
"@types/node": "16.11.21",
"@types/node": "16.11.25",
"@types/supertest": "2.0.11",
"@typescript-eslint/eslint-plugin": "4.33.0",
"@typescript-eslint/parser": "4.33.0",

View File

@@ -1557,22 +1557,22 @@
}
},
"@nestjs/schematics": {
"version": "8.0.6",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.6.tgz",
"integrity": "sha512-IgWuplXg3I+2lzQqy5jR45C+EpBiOuPQwh8zWCjlQDYU9/X/2a8B8byJXw3nuguZS/huuuXx3ZhfHJKQYk6uIA==",
"version": "8.0.7",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.7.tgz",
"integrity": "sha512-7k+eMMBUwvXFp6vwZ5byiLBEQKzjMyIJwO46ginoFugt2AXrOt0iUhR3BKFuWDBZaYQ1l4az86UGw5ohgH3wow==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/schematics": "13.2.2",
"fs-extra": "10.0.0",
"@angular-devkit/core": "13.2.4",
"@angular-devkit/schematics": "13.2.4",
"fs-extra": "10.0.1",
"jsonc-parser": "3.0.0",
"pluralize": "8.0.0"
},
"dependencies": {
"@angular-devkit/core": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.2.tgz",
"integrity": "sha512-qH0Vu8qwGD5uhmE8PtePA1lm7xL3JtbBCcrQICmLqD6njLDVb2N5pbdDXeiXDlWGUoIRHUhu6Uw4AsY8zXP/FA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.4.tgz",
"integrity": "sha512-hSw1JWA/6dDAF/xleQRXGtzHphfU49TMUhvAoAmsmmz3NAn03xLy1dtqdIXIf+TkFXVvZDaAB2mW8KfRV67GFg==",
"dev": true,
"requires": {
"ajv": "8.9.0",
@@ -1584,12 +1584,12 @@
}
},
"@angular-devkit/schematics": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.2.tgz",
"integrity": "sha512-kXPLTkSzRCeBX+SYUkC6MIrWCkH90Y8hVegR9R5n2YqhCJyE+dZlcx4d/8d3VHtZlzAs0LL8BU+liC3wMIagjA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.4.tgz",
"integrity": "sha512-VMhYa4cDu5yE31OvHncAd15Rmlchih/Sr6sxFsIwkg4xzRNIIZCtwqxVXgf0TiTN9zrvlvzK7nhPqTGNqqYb2A==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/core": "13.2.4",
"jsonc-parser": "3.0.0",
"magic-string": "0.25.7",
"ora": "5.4.1",
@@ -1609,9 +1609,9 @@
}
},
"fs-extra": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
"integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz",
"integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.0",
@@ -1922,9 +1922,9 @@
"dev": true
},
"@types/node": {
"version": "16.11.21",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.21.tgz",
"integrity": "sha512-Pf8M1XD9i1ksZEcCP8vuSNwooJ/bZapNmIzpmsMaL+jMI+8mEYU3PKvs+xDNuQcJWF/x24WzY4qxLtB0zNow9A==",
"version": "16.11.25",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.25.tgz",
"integrity": "sha512-NrTwfD7L1RTc2qrHQD4RTTy4p0CO2LatKBEKEds3CaVuhoM/+DJzmWZl5f+ikR8cm8F5mfJxK+9rQq07gRiSjQ==",
"dev": true
},
"@types/parse-json": {

View File

@@ -32,10 +32,10 @@
},
"devDependencies": {
"@nestjs/cli": "8.1.5",
"@nestjs/schematics": "8.0.6",
"@nestjs/schematics": "8.0.7",
"@nestjs/testing": "8.2.3",
"@types/express": "4.17.13",
"@types/node": "16.11.21",
"@types/node": "16.11.25",
"@types/supertest": "2.0.11",
"jest": "27.5.1",
"prettier": "2.5.1",

View File

@@ -1760,22 +1760,22 @@
}
},
"@nestjs/schematics": {
"version": "8.0.6",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.6.tgz",
"integrity": "sha512-IgWuplXg3I+2lzQqy5jR45C+EpBiOuPQwh8zWCjlQDYU9/X/2a8B8byJXw3nuguZS/huuuXx3ZhfHJKQYk6uIA==",
"version": "8.0.7",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.7.tgz",
"integrity": "sha512-7k+eMMBUwvXFp6vwZ5byiLBEQKzjMyIJwO46ginoFugt2AXrOt0iUhR3BKFuWDBZaYQ1l4az86UGw5ohgH3wow==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/schematics": "13.2.2",
"fs-extra": "10.0.0",
"@angular-devkit/core": "13.2.4",
"@angular-devkit/schematics": "13.2.4",
"fs-extra": "10.0.1",
"jsonc-parser": "3.0.0",
"pluralize": "8.0.0"
},
"dependencies": {
"@angular-devkit/core": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.2.tgz",
"integrity": "sha512-qH0Vu8qwGD5uhmE8PtePA1lm7xL3JtbBCcrQICmLqD6njLDVb2N5pbdDXeiXDlWGUoIRHUhu6Uw4AsY8zXP/FA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.4.tgz",
"integrity": "sha512-hSw1JWA/6dDAF/xleQRXGtzHphfU49TMUhvAoAmsmmz3NAn03xLy1dtqdIXIf+TkFXVvZDaAB2mW8KfRV67GFg==",
"dev": true,
"requires": {
"ajv": "8.9.0",
@@ -1787,12 +1787,12 @@
}
},
"@angular-devkit/schematics": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.2.tgz",
"integrity": "sha512-kXPLTkSzRCeBX+SYUkC6MIrWCkH90Y8hVegR9R5n2YqhCJyE+dZlcx4d/8d3VHtZlzAs0LL8BU+liC3wMIagjA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.4.tgz",
"integrity": "sha512-VMhYa4cDu5yE31OvHncAd15Rmlchih/Sr6sxFsIwkg4xzRNIIZCtwqxVXgf0TiTN9zrvlvzK7nhPqTGNqqYb2A==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/core": "13.2.4",
"jsonc-parser": "3.0.0",
"magic-string": "0.25.7",
"ora": "5.4.1",
@@ -2181,9 +2181,9 @@
"integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw=="
},
"@types/node": {
"version": "16.11.21",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.21.tgz",
"integrity": "sha512-Pf8M1XD9i1ksZEcCP8vuSNwooJ/bZapNmIzpmsMaL+jMI+8mEYU3PKvs+xDNuQcJWF/x24WzY4qxLtB0zNow9A=="
"version": "16.11.25",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.25.tgz",
"integrity": "sha512-NrTwfD7L1RTc2qrHQD4RTTy4p0CO2LatKBEKEds3CaVuhoM/+DJzmWZl5f+ikR8cm8F5mfJxK+9rQq07gRiSjQ=="
},
"@types/parse-json": {
"version": "4.0.0",
@@ -4708,9 +4708,9 @@
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
},
"fs-extra": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
"integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz",
"integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.0",

View File

@@ -37,10 +37,10 @@
},
"devDependencies": {
"@nestjs/cli": "8.1.5",
"@nestjs/schematics": "8.0.6",
"@nestjs/schematics": "8.0.7",
"@nestjs/testing": "8.2.3",
"@types/express": "4.17.13",
"@types/node": "16.11.21",
"@types/node": "16.11.25",
"@types/supertest": "2.0.11",
"@typescript-eslint/eslint-plugin": "4.33.0",
"@typescript-eslint/parser": "4.33.0",

View File

@@ -14,9 +14,9 @@
}
},
"@angular-devkit/core": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.2.tgz",
"integrity": "sha512-qH0Vu8qwGD5uhmE8PtePA1lm7xL3JtbBCcrQICmLqD6njLDVb2N5pbdDXeiXDlWGUoIRHUhu6Uw4AsY8zXP/FA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.4.tgz",
"integrity": "sha512-hSw1JWA/6dDAF/xleQRXGtzHphfU49TMUhvAoAmsmmz3NAn03xLy1dtqdIXIf+TkFXVvZDaAB2mW8KfRV67GFg==",
"dev": true,
"requires": {
"ajv": "8.9.0",
@@ -57,12 +57,12 @@
}
},
"@angular-devkit/schematics": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.2.tgz",
"integrity": "sha512-kXPLTkSzRCeBX+SYUkC6MIrWCkH90Y8hVegR9R5n2YqhCJyE+dZlcx4d/8d3VHtZlzAs0LL8BU+liC3wMIagjA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.4.tgz",
"integrity": "sha512-VMhYa4cDu5yE31OvHncAd15Rmlchih/Sr6sxFsIwkg4xzRNIIZCtwqxVXgf0TiTN9zrvlvzK7nhPqTGNqqYb2A==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/core": "13.2.4",
"jsonc-parser": "3.0.0",
"magic-string": "0.25.7",
"ora": "5.4.1",
@@ -1850,22 +1850,22 @@
}
},
"@nestjs/schematics": {
"version": "8.0.6",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.6.tgz",
"integrity": "sha512-IgWuplXg3I+2lzQqy5jR45C+EpBiOuPQwh8zWCjlQDYU9/X/2a8B8byJXw3nuguZS/huuuXx3ZhfHJKQYk6uIA==",
"version": "8.0.7",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.7.tgz",
"integrity": "sha512-7k+eMMBUwvXFp6vwZ5byiLBEQKzjMyIJwO46ginoFugt2AXrOt0iUhR3BKFuWDBZaYQ1l4az86UGw5ohgH3wow==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/schematics": "13.2.2",
"fs-extra": "10.0.0",
"@angular-devkit/core": "13.2.4",
"@angular-devkit/schematics": "13.2.4",
"fs-extra": "10.0.1",
"jsonc-parser": "3.0.0",
"pluralize": "8.0.0"
},
"dependencies": {
"fs-extra": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
"integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz",
"integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.0",
@@ -2167,9 +2167,9 @@
"dev": true
},
"@types/node": {
"version": "16.11.21",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.21.tgz",
"integrity": "sha512-Pf8M1XD9i1ksZEcCP8vuSNwooJ/bZapNmIzpmsMaL+jMI+8mEYU3PKvs+xDNuQcJWF/x24WzY4qxLtB0zNow9A==",
"version": "16.11.25",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.25.tgz",
"integrity": "sha512-NrTwfD7L1RTc2qrHQD4RTTy4p0CO2LatKBEKEds3CaVuhoM/+DJzmWZl5f+ikR8cm8F5mfJxK+9rQq07gRiSjQ==",
"dev": true
},
"@types/parse-json": {

View File

@@ -31,11 +31,11 @@
},
"devDependencies": {
"@nestjs/cli": "8.1.7",
"@nestjs/schematics": "8.0.6",
"@nestjs/schematics": "8.0.7",
"@nestjs/testing": "8.2.3",
"@types/express": "4.17.13",
"@types/jest": "27.4.0",
"@types/node": "16.11.21",
"@types/node": "16.11.25",
"@types/supertest": "2.0.11",
"@typescript-eslint/eslint-plugin": "4.33.0",
"@typescript-eslint/parser": "4.33.0",

View File

@@ -1606,22 +1606,22 @@
}
},
"@nestjs/schematics": {
"version": "8.0.6",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.6.tgz",
"integrity": "sha512-IgWuplXg3I+2lzQqy5jR45C+EpBiOuPQwh8zWCjlQDYU9/X/2a8B8byJXw3nuguZS/huuuXx3ZhfHJKQYk6uIA==",
"version": "8.0.7",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.7.tgz",
"integrity": "sha512-7k+eMMBUwvXFp6vwZ5byiLBEQKzjMyIJwO46ginoFugt2AXrOt0iUhR3BKFuWDBZaYQ1l4az86UGw5ohgH3wow==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/schematics": "13.2.2",
"fs-extra": "10.0.0",
"@angular-devkit/core": "13.2.4",
"@angular-devkit/schematics": "13.2.4",
"fs-extra": "10.0.1",
"jsonc-parser": "3.0.0",
"pluralize": "8.0.0"
},
"dependencies": {
"@angular-devkit/core": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.2.tgz",
"integrity": "sha512-qH0Vu8qwGD5uhmE8PtePA1lm7xL3JtbBCcrQICmLqD6njLDVb2N5pbdDXeiXDlWGUoIRHUhu6Uw4AsY8zXP/FA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.4.tgz",
"integrity": "sha512-hSw1JWA/6dDAF/xleQRXGtzHphfU49TMUhvAoAmsmmz3NAn03xLy1dtqdIXIf+TkFXVvZDaAB2mW8KfRV67GFg==",
"dev": true,
"requires": {
"ajv": "8.9.0",
@@ -1633,12 +1633,12 @@
}
},
"@angular-devkit/schematics": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.2.tgz",
"integrity": "sha512-kXPLTkSzRCeBX+SYUkC6MIrWCkH90Y8hVegR9R5n2YqhCJyE+dZlcx4d/8d3VHtZlzAs0LL8BU+liC3wMIagjA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.4.tgz",
"integrity": "sha512-VMhYa4cDu5yE31OvHncAd15Rmlchih/Sr6sxFsIwkg4xzRNIIZCtwqxVXgf0TiTN9zrvlvzK7nhPqTGNqqYb2A==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/core": "13.2.4",
"jsonc-parser": "3.0.0",
"magic-string": "0.25.7",
"ora": "5.4.1",
@@ -1658,9 +1658,9 @@
}
},
"fs-extra": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
"integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz",
"integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.0",
@@ -1964,9 +1964,9 @@
"dev": true
},
"@types/node": {
"version": "16.11.21",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.21.tgz",
"integrity": "sha512-Pf8M1XD9i1ksZEcCP8vuSNwooJ/bZapNmIzpmsMaL+jMI+8mEYU3PKvs+xDNuQcJWF/x24WzY4qxLtB0zNow9A=="
"version": "16.11.25",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.25.tgz",
"integrity": "sha512-NrTwfD7L1RTc2qrHQD4RTTy4p0CO2LatKBEKEds3CaVuhoM/+DJzmWZl5f+ikR8cm8F5mfJxK+9rQq07gRiSjQ=="
},
"@types/parse-json": {
"version": "4.0.0",

View File

@@ -29,11 +29,11 @@
},
"devDependencies": {
"@nestjs/cli": "8.1.5",
"@nestjs/schematics": "8.0.6",
"@nestjs/schematics": "8.0.7",
"@nestjs/testing": "8.2.3",
"@types/express": "4.17.13",
"@types/jest": "27.4.0",
"@types/node": "16.11.21",
"@types/node": "16.11.25",
"@types/supertest": "2.0.11",
"@typescript-eslint/eslint-plugin": "4.33.0",
"@typescript-eslint/parser": "4.33.0",

View File

@@ -1843,22 +1843,22 @@
}
},
"@nestjs/schematics": {
"version": "8.0.6",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.6.tgz",
"integrity": "sha512-IgWuplXg3I+2lzQqy5jR45C+EpBiOuPQwh8zWCjlQDYU9/X/2a8B8byJXw3nuguZS/huuuXx3ZhfHJKQYk6uIA==",
"version": "8.0.7",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.7.tgz",
"integrity": "sha512-7k+eMMBUwvXFp6vwZ5byiLBEQKzjMyIJwO46ginoFugt2AXrOt0iUhR3BKFuWDBZaYQ1l4az86UGw5ohgH3wow==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/schematics": "13.2.2",
"fs-extra": "10.0.0",
"@angular-devkit/core": "13.2.4",
"@angular-devkit/schematics": "13.2.4",
"fs-extra": "10.0.1",
"jsonc-parser": "3.0.0",
"pluralize": "8.0.0"
},
"dependencies": {
"@angular-devkit/core": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.2.tgz",
"integrity": "sha512-qH0Vu8qwGD5uhmE8PtePA1lm7xL3JtbBCcrQICmLqD6njLDVb2N5pbdDXeiXDlWGUoIRHUhu6Uw4AsY8zXP/FA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.4.tgz",
"integrity": "sha512-hSw1JWA/6dDAF/xleQRXGtzHphfU49TMUhvAoAmsmmz3NAn03xLy1dtqdIXIf+TkFXVvZDaAB2mW8KfRV67GFg==",
"dev": true,
"requires": {
"ajv": "8.9.0",
@@ -1870,12 +1870,12 @@
}
},
"@angular-devkit/schematics": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.2.tgz",
"integrity": "sha512-kXPLTkSzRCeBX+SYUkC6MIrWCkH90Y8hVegR9R5n2YqhCJyE+dZlcx4d/8d3VHtZlzAs0LL8BU+liC3wMIagjA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.4.tgz",
"integrity": "sha512-VMhYa4cDu5yE31OvHncAd15Rmlchih/Sr6sxFsIwkg4xzRNIIZCtwqxVXgf0TiTN9zrvlvzK7nhPqTGNqqYb2A==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/core": "13.2.4",
"jsonc-parser": "3.0.0",
"magic-string": "0.25.7",
"ora": "5.4.1",
@@ -1895,9 +1895,9 @@
}
},
"fs-extra": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
"integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz",
"integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.0",
@@ -2208,9 +2208,9 @@
"dev": true
},
"@types/node": {
"version": "16.11.21",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.21.tgz",
"integrity": "sha512-Pf8M1XD9i1ksZEcCP8vuSNwooJ/bZapNmIzpmsMaL+jMI+8mEYU3PKvs+xDNuQcJWF/x24WzY4qxLtB0zNow9A==",
"version": "16.11.25",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.25.tgz",
"integrity": "sha512-NrTwfD7L1RTc2qrHQD4RTTy4p0CO2LatKBEKEds3CaVuhoM/+DJzmWZl5f+ikR8cm8F5mfJxK+9rQq07gRiSjQ==",
"dev": true
},
"@types/parse-json": {

View File

@@ -30,10 +30,10 @@
},
"devDependencies": {
"@nestjs/cli": "8.1.5",
"@nestjs/schematics": "8.0.6",
"@nestjs/schematics": "8.0.7",
"@nestjs/testing": "8.2.3",
"@types/express": "4.17.13",
"@types/node": "16.11.21",
"@types/node": "16.11.25",
"@types/supertest": "2.0.11",
"jest": "27.5.1",
"prettier": "2.5.1",

View File

@@ -1573,22 +1573,22 @@
}
},
"@nestjs/schematics": {
"version": "8.0.6",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.6.tgz",
"integrity": "sha512-IgWuplXg3I+2lzQqy5jR45C+EpBiOuPQwh8zWCjlQDYU9/X/2a8B8byJXw3nuguZS/huuuXx3ZhfHJKQYk6uIA==",
"version": "8.0.7",
"resolved": "https://registry.npmjs.org/@nestjs/schematics/-/schematics-8.0.7.tgz",
"integrity": "sha512-7k+eMMBUwvXFp6vwZ5byiLBEQKzjMyIJwO46ginoFugt2AXrOt0iUhR3BKFuWDBZaYQ1l4az86UGw5ohgH3wow==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/schematics": "13.2.2",
"fs-extra": "10.0.0",
"@angular-devkit/core": "13.2.4",
"@angular-devkit/schematics": "13.2.4",
"fs-extra": "10.0.1",
"jsonc-parser": "3.0.0",
"pluralize": "8.0.0"
},
"dependencies": {
"@angular-devkit/core": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.2.tgz",
"integrity": "sha512-qH0Vu8qwGD5uhmE8PtePA1lm7xL3JtbBCcrQICmLqD6njLDVb2N5pbdDXeiXDlWGUoIRHUhu6Uw4AsY8zXP/FA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-13.2.4.tgz",
"integrity": "sha512-hSw1JWA/6dDAF/xleQRXGtzHphfU49TMUhvAoAmsmmz3NAn03xLy1dtqdIXIf+TkFXVvZDaAB2mW8KfRV67GFg==",
"dev": true,
"requires": {
"ajv": "8.9.0",
@@ -1600,12 +1600,12 @@
}
},
"@angular-devkit/schematics": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.2.tgz",
"integrity": "sha512-kXPLTkSzRCeBX+SYUkC6MIrWCkH90Y8hVegR9R5n2YqhCJyE+dZlcx4d/8d3VHtZlzAs0LL8BU+liC3wMIagjA==",
"version": "13.2.4",
"resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-13.2.4.tgz",
"integrity": "sha512-VMhYa4cDu5yE31OvHncAd15Rmlchih/Sr6sxFsIwkg4xzRNIIZCtwqxVXgf0TiTN9zrvlvzK7nhPqTGNqqYb2A==",
"dev": true,
"requires": {
"@angular-devkit/core": "13.2.2",
"@angular-devkit/core": "13.2.4",
"jsonc-parser": "3.0.0",
"magic-string": "0.25.7",
"ora": "5.4.1",
@@ -1625,9 +1625,9 @@
}
},
"fs-extra": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
"integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz",
"integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.0",
@@ -1938,9 +1938,9 @@
"dev": true
},
"@types/node": {
"version": "16.11.21",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.21.tgz",
"integrity": "sha512-Pf8M1XD9i1ksZEcCP8vuSNwooJ/bZapNmIzpmsMaL+jMI+8mEYU3PKvs+xDNuQcJWF/x24WzY4qxLtB0zNow9A==",
"version": "16.11.25",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.25.tgz",
"integrity": "sha512-NrTwfD7L1RTc2qrHQD4RTTy4p0CO2LatKBEKEds3CaVuhoM/+DJzmWZl5f+ikR8cm8F5mfJxK+9rQq07gRiSjQ==",
"dev": true
},
"@types/parse-json": {

View File

@@ -34,10 +34,10 @@
"devDependencies": {
"@types/ws": "7.4.7",
"@nestjs/cli": "8.1.5",
"@nestjs/schematics": "8.0.6",
"@nestjs/schematics": "8.0.7",
"@nestjs/testing": "8.2.3",
"@types/express": "4.17.13",
"@types/node": "16.11.21",
"@types/node": "16.11.25",
"@types/supertest": "2.0.11",
"jest": "27.5.1",
"prettier": "2.5.1",

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