mirror of
https://github.com/nestjs/nest.git
synced 2026-02-24 00:02:56 +00:00
Compare commits
9 Commits
v6.8.4
...
BrunnerLiv
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c1a6a2f97 | ||
|
|
09ce572d8f | ||
|
|
3671a1b359 | ||
|
|
738e00ebb0 | ||
|
|
9edd0444e5 | ||
|
|
b840b1974c | ||
|
|
63262c38f6 | ||
|
|
e76786b1b1 | ||
|
|
68721a2539 |
@@ -1,181 +0,0 @@
|
||||
version: 2
|
||||
|
||||
aliases:
|
||||
- &restore-cache
|
||||
restore_cache:
|
||||
key: dependency-cache-{{ checksum "package.json" }}
|
||||
- &install-deps
|
||||
run:
|
||||
name: Install dependencies
|
||||
command: npm ci
|
||||
- &build-packages
|
||||
run:
|
||||
name: Build
|
||||
command: npm run build
|
||||
- &run-unit-tests
|
||||
run:
|
||||
name: Test
|
||||
command: npm run test
|
||||
|
||||
unit-tests-template: &unit-tests-template
|
||||
working_directory: ~/nest
|
||||
steps:
|
||||
- checkout
|
||||
- *restore-cache
|
||||
- *install-deps
|
||||
- *build-packages
|
||||
- *run-unit-tests
|
||||
|
||||
jobs:
|
||||
build:
|
||||
working_directory: ~/nest
|
||||
docker:
|
||||
- image: circleci/node:12
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Update NPM version
|
||||
command: 'sudo npm install -g npm@latest'
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ checksum "package.json" }}
|
||||
- run:
|
||||
name: Install dependencies
|
||||
command: npm ci
|
||||
- save_cache:
|
||||
key: dependency-cache-{{ checksum "package.json" }}
|
||||
paths:
|
||||
- ./node_modules
|
||||
- run:
|
||||
name: Build
|
||||
command: npm run build
|
||||
|
||||
test_node_12:
|
||||
working_directory: ~/nest
|
||||
docker:
|
||||
- image: circleci/node:12
|
||||
steps:
|
||||
- checkout
|
||||
- *restore-cache
|
||||
- *install-deps
|
||||
- *build-packages
|
||||
- *run-unit-tests
|
||||
- run:
|
||||
name: Collect coverage
|
||||
command: npm run coverage
|
||||
- store_artifacts:
|
||||
path: coverage
|
||||
|
||||
test_node_10:
|
||||
<<: *unit-tests-template
|
||||
docker:
|
||||
- image: circleci/node:10
|
||||
|
||||
test_node_8:
|
||||
<<: *unit-tests-template
|
||||
docker:
|
||||
- image: circleci/node:8
|
||||
|
||||
lint:
|
||||
working_directory: ~/nest
|
||||
docker:
|
||||
- image: circleci/node:12
|
||||
steps:
|
||||
- checkout
|
||||
- *restore-cache
|
||||
- *install-deps
|
||||
- run:
|
||||
name: Lint
|
||||
command: npm run lint
|
||||
- run:
|
||||
name: Lint commit
|
||||
command: ./node_modules/.bin/commitlint-circle -c .commitlintrc.json
|
||||
|
||||
integration_tests:
|
||||
working_directory: ~/nest
|
||||
machine: true
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Prepare nvm
|
||||
command: |
|
||||
echo 'export NVM_DIR="/opt/circleci/.nvm"' >> $BASH_ENV
|
||||
echo ' [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> $BASH_ENV
|
||||
- run:
|
||||
name: Upgrade Node.js
|
||||
command: |
|
||||
nvm install v12
|
||||
node -v
|
||||
nvm alias default v12
|
||||
- run:
|
||||
name: Install Docker Compose
|
||||
command: |
|
||||
curl -L https://github.com/docker/compose/releases/download/1.19.0/docker-compose-`uname -s`-`uname -m` > ~/docker-compose
|
||||
chmod +x ~/docker-compose
|
||||
sudo mv ~/docker-compose /usr/local/bin/docker-compose
|
||||
- *install-deps
|
||||
- run:
|
||||
name: Prepare tests
|
||||
command: |
|
||||
bash ./scripts/prepare.sh
|
||||
sleep 10
|
||||
- run:
|
||||
name: List containers
|
||||
command: docker ps
|
||||
- run:
|
||||
name: Integration tests
|
||||
command: npm run integration-test
|
||||
|
||||
codechecks_benchmarks:
|
||||
working_directory: ~/nest
|
||||
docker:
|
||||
- image: circleci/node:12
|
||||
steps:
|
||||
- checkout
|
||||
- *restore-cache
|
||||
- *install-deps
|
||||
- *build-packages
|
||||
- run:
|
||||
name: Install native wrk
|
||||
command: .circleci/install-wrk.sh
|
||||
- run:
|
||||
name: Run codechecks with benchmarks
|
||||
command: yarn codechecks:benchmarks
|
||||
|
||||
samples:
|
||||
working_directory: ~/nest
|
||||
docker:
|
||||
- image: circleci/node:12
|
||||
steps:
|
||||
- checkout
|
||||
- *restore-cache
|
||||
- *install-deps
|
||||
- run:
|
||||
name: Build all samples
|
||||
command: npm run build:samples
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build-and-test:
|
||||
jobs:
|
||||
- build
|
||||
- test_node_12:
|
||||
requires:
|
||||
- build
|
||||
- test_node_10:
|
||||
requires:
|
||||
- build
|
||||
- test_node_8:
|
||||
requires:
|
||||
- build
|
||||
- lint:
|
||||
requires:
|
||||
- build
|
||||
- integration_tests:
|
||||
requires:
|
||||
- build
|
||||
- samples:
|
||||
requires:
|
||||
- build
|
||||
- codechecks_benchmarks:
|
||||
requires:
|
||||
- build
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# based on https://medium.com/@felipedutratine/intelligent-benchmark-with-wrk-163986c1587f
|
||||
|
||||
cd /tmp/
|
||||
sudo apt-get install build-essential libssl-dev git -y
|
||||
git clone https://github.com/wg/wrk.git wrk
|
||||
cd wrk
|
||||
sudo make
|
||||
# move the executable to somewhere in your PATH, ex:
|
||||
sudo cp wrk /usr/local/bin
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"extends": ["@commitlint/config-angular"],
|
||||
"rules": {
|
||||
"subject-case": [
|
||||
2,
|
||||
"always",
|
||||
["sentence-case", "start-case", "pascal-case", "upper-case", "lower-case"]
|
||||
]
|
||||
}
|
||||
}
|
||||
36
.github/lock.yml
vendored
36
.github/lock.yml
vendored
@@ -1,36 +0,0 @@
|
||||
# Number of days of inactivity before a closed issue or pull request is locked
|
||||
daysUntilLock: 90
|
||||
|
||||
# Skip issues and pull requests created before a given timestamp. Timestamp must
|
||||
# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable
|
||||
skipCreatedBefore: false
|
||||
|
||||
# Issues and pull requests with these labels will be ignored. Set to `[]` to disable
|
||||
exemptLabels: []
|
||||
|
||||
# Label to add before locking, such as `outdated`. Set to `false` to disable
|
||||
lockLabel: false
|
||||
|
||||
# Comment to post before locking. Set to `false` to disable
|
||||
lockComment: >
|
||||
This thread has been automatically locked since there has not been
|
||||
any recent activity after it was closed. Please open a new issue for
|
||||
related bugs.
|
||||
|
||||
# Assign `resolved` as the reason for locking. Set to `false` to disable
|
||||
setLockReason: true
|
||||
|
||||
# Limit to only `issues` or `pulls`
|
||||
# only: issues
|
||||
|
||||
# Optionally, specify configuration settings just for `issues` or `pulls`
|
||||
# issues:
|
||||
# exemptLabels:
|
||||
# - help-wanted
|
||||
# lockLabel: outdated
|
||||
|
||||
# pulls:
|
||||
# daysUntilLock: 30
|
||||
|
||||
# Repository to extend settings from
|
||||
# _extends: repo
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,7 +5,6 @@ node_modules/
|
||||
/.idea
|
||||
/.awcache
|
||||
/.vscode
|
||||
*.code-workspace
|
||||
|
||||
# bundle
|
||||
packages/**/*.d.ts
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all"
|
||||
}
|
||||
}
|
||||
56
.travis.yml
Normal file
56
.travis.yml
Normal file
@@ -0,0 +1,56 @@
|
||||
language: node_js
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- "node_modules"
|
||||
|
||||
git:
|
||||
depth: 5
|
||||
|
||||
before_install:
|
||||
- npm i -g npm@latest
|
||||
|
||||
install:
|
||||
- npm ci
|
||||
- npm run build:dev
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- state: "Test"
|
||||
name: "Unit Test Node v12"
|
||||
script: npm test
|
||||
node_js: 12
|
||||
after_success: npm run coverage
|
||||
|
||||
- state: "Test"
|
||||
name: "Unit Test Node v10"
|
||||
script: npm test
|
||||
node_js: 10
|
||||
|
||||
- state: "Test"
|
||||
name: "Unit Test Node v8"
|
||||
script: npm test
|
||||
node_js: 8
|
||||
|
||||
- state: "Test"
|
||||
name: "Integration Test"
|
||||
install: skip
|
||||
before_install: skip
|
||||
before_script: skip
|
||||
addons: skip
|
||||
script:
|
||||
sudo service mysql stop &&
|
||||
bash ./scripts/prepare.sh &&
|
||||
npm run integration-test
|
||||
node_js: 12
|
||||
|
||||
- stage: "Test"
|
||||
name: "Lint"
|
||||
script: npm run lint
|
||||
node_js: 12
|
||||
|
||||
- stage: "Test"
|
||||
name: "Build samples"
|
||||
script: npm run build:samples
|
||||
node_js: 12
|
||||
|
||||
105
CONTRIBUTING.md
105
CONTRIBUTING.md
@@ -4,14 +4,13 @@ We would love for you to contribute to Nest and help make it even better than it
|
||||
today! As a contributor, here are the guidelines we would like you to follow:
|
||||
|
||||
<!--* [Code of Conduct](#coc)-->
|
||||
|
||||
- [Question or Problem?](#question)
|
||||
- [Issues and Bugs](#issue)
|
||||
- [Feature Requests](#feature)
|
||||
- [Submission Guidelines](#submit)
|
||||
- [Development Setup](#development)
|
||||
- [Coding Rules](#rules)
|
||||
- [Commit Message Guidelines](#commit)
|
||||
* [Question or Problem?](#question)
|
||||
* [Issues and Bugs](#issue)
|
||||
* [Feature Requests](#feature)
|
||||
* [Submission Guidelines](#submit)
|
||||
* [Development Setup](#development)
|
||||
* [Coding Rules](#rules)
|
||||
* [Commit Message Guidelines](#commit)
|
||||
<!-- - [Signing the CLA](#cla) -->
|
||||
|
||||
<!-- ## <a name="coc"></a> Code of Conduct
|
||||
@@ -25,8 +24,8 @@ Stack Overflow is a much better place to ask questions since:
|
||||
|
||||
<!-- - there are thousands of people willing to help on Stack Overflow [maybe one day] -->
|
||||
|
||||
- questions and answers stay available for public viewing so your question / answer might help someone else
|
||||
- Stack Overflow's voting system assures that the best answers are prominently visible.
|
||||
* questions and answers stay available for public viewing so your question / answer might help someone else
|
||||
* Stack Overflow's voting system assures that the best answers are prominently visible.
|
||||
|
||||
To save your and our time, we will systematically close all issues that are requests for general support and redirect people to Stack Overflow.
|
||||
|
||||
@@ -45,10 +44,10 @@ Repository. If you would like to _implement_ a new feature, please submit an iss
|
||||
a proposal for your work first, to be sure that we can use it.
|
||||
Please consider what kind of change it is:
|
||||
|
||||
- For a **Major Feature**, first open an issue and outline your proposal so that it can be
|
||||
* For a **Major Feature**, first open an issue and outline your proposal so that it can be
|
||||
discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
|
||||
and help you to craft the change so that it is successfully accepted into the project. For your issue name, please prefix your proposal with `[discussion]`, for example "[discussion]: your feature idea".
|
||||
- **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
|
||||
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
|
||||
|
||||
## <a name="submit"></a> Submission Guidelines
|
||||
|
||||
@@ -58,9 +57,9 @@ Before you submit an issue, please search the issue tracker, maybe an issue for
|
||||
|
||||
We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs we will systematically ask you to provide a minimal reproduction scenario using a repository or [Gist](https://gist.github.com/). Having a live, reproducible scenario gives us wealth of important information without going back & forth to you with additional questions like:
|
||||
|
||||
- version of NestJS used
|
||||
- 3rd-party libraries and their versions
|
||||
- and most importantly - a use-case that fails
|
||||
* version of NestJS used
|
||||
* 3rd-party libraries and their versions
|
||||
* and most importantly - a use-case that fails
|
||||
|
||||
<!--
|
||||
// TODO we need to create a playground, similar to plunkr
|
||||
@@ -115,11 +114,11 @@ We cannot accept code without this.
|
||||
|
||||
1. In GitHub, send a pull request to `nestjs:master`.
|
||||
|
||||
- If we suggest changes then:
|
||||
* If we suggest changes then:
|
||||
|
||||
- Make the required updates.
|
||||
- Re-run the Nest test suites to ensure tests are still passing.
|
||||
- Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
|
||||
* Make the required updates.
|
||||
* Re-run the Nest test suites to ensure tests are still passing.
|
||||
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
|
||||
|
||||
```shell
|
||||
git rebase master -i
|
||||
@@ -133,25 +132,25 @@ That's it! Thank you for your contribution!
|
||||
After your pull request is merged, you can safely delete your branch and pull the changes
|
||||
from the main (upstream) repository:
|
||||
|
||||
- Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
|
||||
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
|
||||
|
||||
```shell
|
||||
git push origin --delete my-fix-branch
|
||||
```
|
||||
|
||||
- Check out the master branch:
|
||||
* Check out the master branch:
|
||||
|
||||
```shell
|
||||
git checkout master -f
|
||||
```
|
||||
|
||||
- Delete the local branch:
|
||||
* Delete the local branch:
|
||||
|
||||
```shell
|
||||
git branch -D my-fix-branch
|
||||
```
|
||||
|
||||
- Update your master with the latest upstream version:
|
||||
* Update your master with the latest upstream version:
|
||||
|
||||
```shell
|
||||
git pull --ff upstream master
|
||||
@@ -178,9 +177,14 @@ That will compile fresh packages and afterward, move them to all `sample` direct
|
||||
### <a name="common-scripts"></a>Commonly used NPM scripts
|
||||
|
||||
```bash
|
||||
# build all packages and move to "sample" and "integration" directories
|
||||
# build all packages and put them near to their source .ts files
|
||||
$ npm run build
|
||||
|
||||
# build all packages and move to "sample" and "integration" directories
|
||||
# if cross-packages breaking changes were performed you may face irrelevant errors
|
||||
# in order to verify the build, you can run this command again then
|
||||
$ npm run build:dev
|
||||
|
||||
# run the full unit tests suite
|
||||
$ npm run test
|
||||
|
||||
@@ -190,9 +194,6 @@ $ sh scripts/run-integration.sh
|
||||
|
||||
# run linter
|
||||
$ npm run lint
|
||||
|
||||
# build all packages and put them near to their source .ts files
|
||||
$ npm run build:prod
|
||||
```
|
||||
|
||||
## <a name="rules"></a> Coding Rules
|
||||
@@ -203,8 +204,8 @@ To ensure consistency throughout the source code, keep these rules in mind as yo
|
||||
// We're working on auto-documentation.
|
||||
* All public API methods **must be documented**. (Details TBC). -->
|
||||
|
||||
- All features or bug fixes **must be tested** by one or more specs (unit-tests).
|
||||
- We follow [Google's JavaScript Style Guide][js-style-guide], but wrap all code at
|
||||
* All features or bug fixes **must be tested** by one or more specs (unit-tests).
|
||||
* We follow [Google's JavaScript Style Guide][js-style-guide], but wrap all code at
|
||||
**100 characters**. An automated formatter is available (`npm run format`).
|
||||
|
||||
## <a name="commit"></a> Commit Message Guidelines
|
||||
@@ -248,15 +249,15 @@ If the commit reverts a previous commit, it should begin with `revert:`, followe
|
||||
|
||||
Must be one of the following:
|
||||
|
||||
- **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
|
||||
- **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
|
||||
- **docs**: Documentation only changes
|
||||
- **feature**: A new feature
|
||||
- **fix**: A bug fix
|
||||
- **perf**: A code change that improves performance
|
||||
- **refactor**: A code change that neither fixes a bug nor adds a feature
|
||||
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
|
||||
- **test**: Adding missing tests or correcting existing tests
|
||||
* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
|
||||
* **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
|
||||
* **docs**: Documentation only changes
|
||||
* **feature**: A new feature
|
||||
* **bugfix**: A bug fix
|
||||
* **perf**: A code change that improves performance
|
||||
* **refactor**: A code change that neither fixes a bug nor adds a feature
|
||||
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
|
||||
* **test**: Adding missing tests or correcting existing tests
|
||||
|
||||
### Scope
|
||||
|
||||
@@ -264,28 +265,28 @@ The scope should be the name of the npm package affected (as perceived by person
|
||||
|
||||
The following is the list of supported scopes:
|
||||
|
||||
- **common**
|
||||
- **core**
|
||||
- **sample**
|
||||
- **microservices**
|
||||
- **testing**
|
||||
- **websockets**
|
||||
* **common**
|
||||
* **core**
|
||||
* **sample**
|
||||
* **microservices**
|
||||
* **testing**
|
||||
* **websockets**
|
||||
|
||||
There are currently a few exceptions to the "use package name" rule:
|
||||
|
||||
- **packaging**: used for changes that change the npm package layout in all of our packages, e.g. public path changes, package.json changes done to all packages, d.ts file/format changes, changes to bundles, etc.
|
||||
- **changelog**: used for updating the release notes in CHANGELOG.md
|
||||
- **sample/#**: for the example apps directory, replacing # with the example app number
|
||||
- none/empty string: useful for `style`, `test` and `refactor` changes that are done across all packages (e.g. `style: add missing semicolons`)
|
||||
<!-- * **aio**: used for docs-app (angular.io) related changes within the /aio directory of the repo -->
|
||||
* **packaging**: used for changes that change the npm package layout in all of our packages, e.g. public path changes, package.json changes done to all packages, d.ts file/format changes, changes to bundles, etc.
|
||||
* **changelog**: used for updating the release notes in CHANGELOG.md
|
||||
* **sample/#**: for the example apps directory, replacing # with the example app number
|
||||
* none/empty string: useful for `style`, `test` and `refactor` changes that are done across all packages (e.g. `style: add missing semicolons`)
|
||||
<!-- * **aio**: used for docs-app (angular.io) related changes within the /aio directory of the repo -->
|
||||
|
||||
### Subject
|
||||
|
||||
The subject contains succinct description of the change:
|
||||
|
||||
- use the imperative, present tense: "change" not "changed" nor "changes"
|
||||
- don't capitalize first letter
|
||||
- no dot (.) at the end
|
||||
* use the imperative, present tense: "change" not "changed" nor "changes"
|
||||
* don't capitalize first letter
|
||||
* no dot (.) at the end
|
||||
|
||||
### Body
|
||||
|
||||
|
||||
16
Readme.md
16
Readme.md
@@ -1,16 +1,19 @@
|
||||
<p align="center">
|
||||
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
|
||||
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo_text.svg" width="320" alt="Nest Logo" /></a>
|
||||
</p>
|
||||
|
||||
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
|
||||
[circleci-url]: https://circleci.com/gh/nestjs/nest
|
||||
[travis-image]: https://api.travis-ci.org/nestjs/nest.svg?branch=master
|
||||
[travis-url]: https://travis-ci.org/nestjs/nest
|
||||
[linux-image]: https://img.shields.io/travis/nestjs/nest/master.svg?label=linux
|
||||
[linux-url]: https://travis-ci.org/nestjs/nest
|
||||
|
||||
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
|
||||
<p align="center">
|
||||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
|
||||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
|
||||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
|
||||
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
|
||||
<a href="https://travis-ci.org/nestjs/nest" target="_blank"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
|
||||
<a href="https://travis-ci.org/nestjs/nest" target="_blank"><img src="https://img.shields.io/travis/nestjs/nest/master.svg?label=linux" alt="Linux" /></a>
|
||||
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
|
||||
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
|
||||
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
|
||||
@@ -39,7 +42,7 @@ Nest is a framework for building efficient, scalable <a href="http://nodejs.org"
|
||||
|
||||
## Consulting
|
||||
|
||||
With official support, you can get expert help straight from Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://enterprise.nestjs.com).
|
||||
With official support, you can get expert help straight from Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://docs.nestjs.com/enterprise).
|
||||
|
||||
## Support
|
||||
|
||||
@@ -68,8 +71,7 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
|
||||
<a href="https://clay.global/" target="_blank"><img src="https://nestjs.com/img/clay-logo.svg" width="75" valign="middle" /></a>
|
||||
<a href="https://firesticktricks.com" target="_blank"><img src="https://nestjs.com/img/firesticktricks-logo.png" width="120" valign="middle" /></a>
|
||||
<a href="https://www.codeguesser.co.uk" target="_blank"><img src="https://nestjs.com/img/codeguesser-logo.svg" width="120" valign="middle" /></a>
|
||||
<a href="https://tekhattan.com" target="_blank"><img src="https://nestjs.com/img/tekhattan-logo.png" width="110" valign="middle" /></a>
|
||||
<a href="https://f-a.nz/" target="_blank"><img src="https://nestjs.com/img/franz.svg" width="80" valign="middle" /></a>
|
||||
<a href="https://tekhattan.com" target="_blank"><img src="https://nestjs.com/img/tekhattan-logo.png" width="110" valign="middle" /></a>
|
||||
|
||||
|
||||
## Backers
|
||||
|
||||
14
benchmarks/run.sh
Normal file
14
benchmarks/run.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo 'Library:' $1
|
||||
node $1 &
|
||||
pid=$!
|
||||
|
||||
sleep 2
|
||||
|
||||
wrk 'http://localhost:3000' \
|
||||
-d 10 \
|
||||
-c 1024 \
|
||||
-t 8
|
||||
|
||||
kill $pid
|
||||
23
benchmarks/run_all.sh
Normal file
23
benchmarks/run_all.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
: > all_output.txt
|
||||
|
||||
lib=(express fastify nest nest-fastify)
|
||||
for item in ${lib[*]}
|
||||
do
|
||||
echo '-----------------------' >> all_output.txt
|
||||
echo $item >> all_output.txt
|
||||
echo '-----------------------' >> all_output.txt
|
||||
|
||||
node $item &
|
||||
pid=$!
|
||||
|
||||
sleep 2
|
||||
|
||||
wrk 'http://localhost:3000' \
|
||||
-d 10 \
|
||||
-c 1024 \
|
||||
-t 8 >> all_output.txt
|
||||
|
||||
kill $pid
|
||||
done
|
||||
@@ -31,42 +31,15 @@ services:
|
||||
- "3306:3306"
|
||||
restart: always
|
||||
mongodb:
|
||||
container_name: test-mongodb
|
||||
image: mongo:latest
|
||||
environment:
|
||||
- MONGODB_DATABASE="test"
|
||||
ports:
|
||||
- 27017:27017
|
||||
rabbit:
|
||||
container_name: test-rabbit
|
||||
hostname: rabbit
|
||||
image: "rabbitmq:management"
|
||||
ports:
|
||||
- "15672:15672"
|
||||
- "5672:5672"
|
||||
tty: true
|
||||
zookeeper:
|
||||
container_name: test-zookeeper
|
||||
hostname: zookeeper
|
||||
image: confluentinc/cp-zookeeper:5.3.1
|
||||
ports:
|
||||
- "2181:2181"
|
||||
environment:
|
||||
ZOOKEEPER_CLIENT_PORT: 2181
|
||||
ZOOKEEPER_TICK_TIME: 2000
|
||||
kafka:
|
||||
container_name: test-kafka
|
||||
hostname: kafka
|
||||
image: confluentinc/cp-kafka:5.3.1
|
||||
depends_on:
|
||||
- zookeeper
|
||||
ports:
|
||||
- "29092:29092"
|
||||
- "9092:9092"
|
||||
environment:
|
||||
KAFKA_BROKER_ID: 1
|
||||
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
|
||||
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
|
||||
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
|
||||
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
|
||||
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
|
||||
|
||||
1085
integration/graphql/package-lock.json
generated
1085
integration/graphql/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -9,21 +9,21 @@
|
||||
"start:prod": "node dist/main.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "6.8.3",
|
||||
"@nestjs/core": "6.8.3",
|
||||
"@nestjs/graphql": "6.5.3",
|
||||
"apollo-server-express": "2.9.7",
|
||||
"graphql": "14.5.8",
|
||||
"@nestjs/common": "6.5.3",
|
||||
"@nestjs/core": "6.5.3",
|
||||
"@nestjs/graphql": "6.4.2",
|
||||
"apollo-server-express": "2.8.1",
|
||||
"graphql": "14.5.0",
|
||||
"graphql-tools": "4.0.5",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.5.3",
|
||||
"rxjs": "6.5.2",
|
||||
"subscriptions-transport-ws": "0.9.16",
|
||||
"typescript": "3.6.4",
|
||||
"ws": "7.2.0"
|
||||
"typescript": "3.5.3",
|
||||
"ws": "7.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.10.7",
|
||||
"ts-node": "8.4.1",
|
||||
"tslint": "5.20.0"
|
||||
"ts-node": "8.3.0",
|
||||
"tslint": "5.19.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
import {
|
||||
INestApplication,
|
||||
Injectable,
|
||||
UnauthorizedException,
|
||||
} from '@nestjs/common';
|
||||
import { APP_GUARD } from '@nestjs/core';
|
||||
import { Test } from '@nestjs/testing';
|
||||
import * as request from 'supertest';
|
||||
import { Test } from '@nestjs/testing';
|
||||
import { INestApplication, Injectable, UnauthorizedException } from '@nestjs/common';
|
||||
import { ApplicationModule } from '../src/app.module';
|
||||
import { APP_GUARD } from '@nestjs/core';
|
||||
|
||||
@Injectable()
|
||||
export class AuthGuard {
|
||||
@@ -34,8 +30,10 @@ describe('Guards', () => {
|
||||
let app: INestApplication;
|
||||
|
||||
it(`should prevent access (unauthorized)`, async () => {
|
||||
app = (await createTestModule(new AuthGuard())).createNestApplication();
|
||||
|
||||
app = (await createTestModule(
|
||||
new AuthGuard(),
|
||||
)).createNestApplication();
|
||||
|
||||
await app.init();
|
||||
return request(app.getHttpServer())
|
||||
.get('/hello')
|
||||
|
||||
@@ -10,7 +10,8 @@ describe('Hello world (default adapter)', () => {
|
||||
beforeEach(async () => {
|
||||
const module = await Test.createTestingModule({
|
||||
imports: [ApplicationModule],
|
||||
}).compile();
|
||||
})
|
||||
.compile();
|
||||
|
||||
app = module.createNestApplication();
|
||||
server = app.getHttpServer();
|
||||
|
||||
@@ -10,7 +10,8 @@ describe('Hello world (default adapter)', () => {
|
||||
beforeEach(async () => {
|
||||
const module = await Test.createTestingModule({
|
||||
imports: [ApplicationModule],
|
||||
}).compile();
|
||||
})
|
||||
.compile();
|
||||
|
||||
app = module.createNestApplication();
|
||||
server = app.getHttpServer();
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
import { INestApplication, MiddlewareConsumer, Module } from '@nestjs/common';
|
||||
import { Test } from '@nestjs/testing';
|
||||
import * as request from 'supertest';
|
||||
|
||||
const RETURN_VALUE_A = 'test_A';
|
||||
const RETURN_VALUE_B = 'test_B';
|
||||
|
||||
@Module({
|
||||
imports: [],
|
||||
})
|
||||
class ModuleA {
|
||||
configure(consumer: MiddlewareConsumer) {
|
||||
consumer
|
||||
.apply((req, res, next) => {
|
||||
res.send(RETURN_VALUE_A);
|
||||
})
|
||||
.forRoutes('hello');
|
||||
}
|
||||
}
|
||||
|
||||
@Module({
|
||||
imports: [ModuleA],
|
||||
})
|
||||
class ModuleB {
|
||||
configure(consumer: MiddlewareConsumer) {
|
||||
consumer
|
||||
.apply((req, res, next) => {
|
||||
res.send(RETURN_VALUE_B);
|
||||
})
|
||||
.forRoutes('hello');
|
||||
}
|
||||
}
|
||||
|
||||
@Module({
|
||||
imports: [ModuleB],
|
||||
})
|
||||
class TestModule {}
|
||||
|
||||
describe('Middleware (execution order)', () => {
|
||||
let app: INestApplication;
|
||||
|
||||
beforeEach(async () => {
|
||||
app = (await Test.createTestingModule({
|
||||
imports: [TestModule],
|
||||
}).compile()).createNestApplication();
|
||||
|
||||
await app.init();
|
||||
});
|
||||
|
||||
it(`should execute middleware in topological order`, () => {
|
||||
return request(app.getHttpServer())
|
||||
.get('/hello')
|
||||
.expect(200, RETURN_VALUE_B);
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await app.close();
|
||||
});
|
||||
});
|
||||
266
integration/hello-world/package-lock.json
generated
266
integration/hello-world/package-lock.json
generated
@@ -5,48 +5,50 @@
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@nestjs/common": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.8.3.tgz",
|
||||
"integrity": "sha512-MQY05kocVTJx5UdLeE5gpBjiymXnKYo1rme3ejCaeMFFkiXmPcgkGquYNegCFy+SHXwsq9AW/gcoD0hkVn0Z6g==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
|
||||
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
|
||||
"requires": {
|
||||
"axios": "0.19.0",
|
||||
"cli-color": "2.0.0",
|
||||
"uuid": "3.3.3"
|
||||
"cli-color": "1.4.0",
|
||||
"uuid": "3.3.2"
|
||||
}
|
||||
},
|
||||
"@nestjs/core": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.8.3.tgz",
|
||||
"integrity": "sha512-hgpmqwbJaOFEuFYTAQe/Csu+kcxBfqlsctv6np9tg/TqDvNFMrowt3Snvtpjpz55fdvUfUh8JY7YBwoaUTo6ZA==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
|
||||
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
|
||||
"requires": {
|
||||
"@nuxtjs/opencollective": "0.2.2",
|
||||
"fast-safe-stringify": "2.0.7",
|
||||
"fast-safe-stringify": "2.0.6",
|
||||
"iterare": "1.2.0",
|
||||
"object-hash": "2.0.0",
|
||||
"uuid": "3.3.3"
|
||||
"object-hash": "1.3.1",
|
||||
"optional": "0.1.4",
|
||||
"uuid": "3.3.2"
|
||||
}
|
||||
},
|
||||
"@nestjs/microservices": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.8.3.tgz",
|
||||
"integrity": "sha512-/7v2TWt90FmqK1ZNS5nuKzTgP6ruxrLBGaJkDpPyKgguaMhtmBOuMlHg9P7LieycTKjJfYZvR6J8gL41dfypnA==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.5.3.tgz",
|
||||
"integrity": "sha512-T9zZf61myahenI4c0qhcYnhnx49L+zL9+8W6fc+LPTarbt1HJDu6iyj6fh2BzewakwNLJRyGMJ9YCYlXhFuvlA==",
|
||||
"requires": {
|
||||
"iterare": "1.2.0",
|
||||
"json-socket": "0.3.0"
|
||||
"json-socket": "0.3.0",
|
||||
"optional": "0.1.4"
|
||||
}
|
||||
},
|
||||
"@nestjs/testing": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.8.3.tgz",
|
||||
"integrity": "sha512-nhiXfvnfJ0ARzpOJ+7btnHBxTh82oQX6+/G7EnQEBB/A1jFfE+sbB7Pdt6s999prNOQmdw/XdnORV67u9BwNkw==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.5.3.tgz",
|
||||
"integrity": "sha512-W8tPhkNVhmX+jaDu4R7WUOtIl0PK3ZDso434rEm/b1+S6ZRgAKwNVHWM/rwIuTi5+erPTEULtTsZgrXFrzC1sA==",
|
||||
"requires": {
|
||||
"optional": "0.1.4"
|
||||
}
|
||||
},
|
||||
"@nestjs/websockets": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.8.3.tgz",
|
||||
"integrity": "sha512-pCKK9NDFlZJSWYeh8TAL3Ioh+fzHzMlHd6C8gcq8OmrLmuATuhqCzEcEKW9hwtl6isnZUcliXvaQdBfBBYOBcw==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.5.3.tgz",
|
||||
"integrity": "sha512-YrCvmLHTW0OBusTiUOPrG0PNrw/3Gatty/bh3ro5cEoiovcaJxGSMsTC+JSVXqPwRJjEtoHMCr5Qje2rAepIzQ==",
|
||||
"requires": {
|
||||
"iterare": "1.2.0"
|
||||
}
|
||||
@@ -68,9 +70,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/validator": {
|
||||
"version": "10.11.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.3.tgz",
|
||||
"integrity": "sha512-GKF2VnEkMmEeEGvoo03ocrP9ySMuX1ypKazIYMlsjfslfBMhOAtC5dmEWKdJioW4lJN7MZRS88kalTsVClyQ9w=="
|
||||
"version": "10.11.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.2.tgz",
|
||||
"integrity": "sha512-k/ju1RsdP5ACFUWebqsyEy0avP5uNJCs2p3pmTHzOZdd4gMSAJTq7iUEHFY3tt3emBrPTm6oGvfZ4SzcqOgLPQ=="
|
||||
},
|
||||
"abstract-logging": {
|
||||
"version": "1.0.0",
|
||||
@@ -107,9 +109,9 @@
|
||||
"integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA="
|
||||
},
|
||||
"arg": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.1.tgz",
|
||||
"integrity": "sha512-SlmP3fEA88MBv0PypnXZ8ZfJhwmDeIE3SP71j37AiXQBXYosPV0x6uISAaHYSlSVhmHOVkomen0tbGk6Anlebw==",
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz",
|
||||
"integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==",
|
||||
"dev": true
|
||||
},
|
||||
"asynckit": {
|
||||
@@ -119,9 +121,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"avvio": {
|
||||
"version": "6.2.2",
|
||||
"resolved": "https://registry.npmjs.org/avvio/-/avvio-6.2.2.tgz",
|
||||
"integrity": "sha512-7+yznbJOMoHQ8Z8VH+1meyRjtxUW8za6gqnHBl8DqlX5qPtaclNIgWrKrTLuIbfn2+1/EGkcr+rQXI8DYVU4RA==",
|
||||
"version": "6.2.1",
|
||||
"resolved": "https://registry.npmjs.org/avvio/-/avvio-6.2.1.tgz",
|
||||
"integrity": "sha512-k+gTocL3yShwN1PtKEsSj7eFiApcZ4JZLAu/ecyzEb8jyx+Kmxb+7SXUsodB47g7fqhs/zkfsCdqq72a1ok5Ew==",
|
||||
"requires": {
|
||||
"archy": "^1.0.0",
|
||||
"debug": "^4.0.0",
|
||||
@@ -174,26 +176,26 @@
|
||||
"integrity": "sha512-qsP+0xoavpOlJHuYsQJsN58HXSl8Jvveo+T37rEvCEeRfMWoytAyR0Ua/YsFgpM6AZYZ/og2PJwArwzJl1aXtQ=="
|
||||
},
|
||||
"class-validator": {
|
||||
"version": "0.10.2",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.2.tgz",
|
||||
"integrity": "sha512-57bGDjoFXizqGZBHe/uHn5/K0MSjBkToaHpDhAXR6DIwjaoET37a0Uug4F5RZR7WF31/7SqzKFIvd+ZspszGUA==",
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.0.tgz",
|
||||
"integrity": "sha512-RvjxRlvoCvM/ojUq11j78ISpReGdBoMErdmDk1e27aQZK6ppSXq751UE6jB9JI7ayEnL6Nnmllzn/HXVSu3dmg==",
|
||||
"requires": {
|
||||
"@types/validator": "10.11.3",
|
||||
"@types/validator": "10.11.2",
|
||||
"google-libphonenumber": "^3.1.6",
|
||||
"validator": "11.1.0"
|
||||
}
|
||||
},
|
||||
"cli-color": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.0.tgz",
|
||||
"integrity": "sha512-a0VZ8LeraW0jTuCkuAGMNufareGHhyZU9z8OGsW0gXd1hZGi1SRuNRXdbGkraBBKnhyUhyebFWnRbp+dIn0f0A==",
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-color/-/cli-color-1.4.0.tgz",
|
||||
"integrity": "sha512-xu6RvQqqrWEo6MPR1eixqGPywhYBHRs653F9jfXB2Hx4jdM/3WxiNE1vppRmxtMIfl16SFYTpYlrnqH/HsK/2w==",
|
||||
"requires": {
|
||||
"ansi-regex": "^2.1.1",
|
||||
"d": "^1.0.1",
|
||||
"es5-ext": "^0.10.51",
|
||||
"d": "1",
|
||||
"es5-ext": "^0.10.46",
|
||||
"es6-iterator": "^2.0.3",
|
||||
"memoizee": "^0.4.14",
|
||||
"timers-ext": "^0.1.7"
|
||||
"timers-ext": "^0.1.5"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
@@ -225,9 +227,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"consola": {
|
||||
"version": "2.10.1",
|
||||
"resolved": "https://registry.npmjs.org/consola/-/consola-2.10.1.tgz",
|
||||
"integrity": "sha512-4sxpH6SGFYLADfUip4vuY65f/gEogrzJoniVhNUYkJHtng0l8ZjnDCqxxrSVRHOHwKxsy8Vm5ONZh1wOR3/l/w=="
|
||||
"version": "2.9.0",
|
||||
"resolved": "https://registry.npmjs.org/consola/-/consola-2.9.0.tgz",
|
||||
"integrity": "sha512-34Iue+LRcWbndFIfZc5boNizWlsrRjqIBJZTe591vImgbnq7nx2EzlrLtANj9TH2Fxm7puFJBJAOk5BhvZOddQ=="
|
||||
},
|
||||
"cookiejar": {
|
||||
"version": "2.1.2",
|
||||
@@ -259,9 +261,9 @@
|
||||
}
|
||||
},
|
||||
"deepmerge": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.1.1.tgz",
|
||||
"integrity": "sha512-+qO5WbNBKBaZez95TffdUDnGIo4+r5kmsX8aOb7PDHvXsTbghAmleuxjs6ytNaf5Eg4FGBXDS5vqO61TRi6BMg=="
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.0.0.tgz",
|
||||
"integrity": "sha512-YZ1rOP5+kHor4hMAH+HRQnBQHg+wvS1un1hAOuIcxcBy0hzcUf6Jg2a1w65kpoOUnurOfZbERwjI1TfZxNjcww=="
|
||||
},
|
||||
"delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
@@ -276,9 +278,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"es5-ext": {
|
||||
"version": "0.10.51",
|
||||
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.51.tgz",
|
||||
"integrity": "sha512-oRpWzM2WcLHVKpnrcyB7OW8j/s67Ba04JCm0WnNv3RiABSvs7mrQlutB8DBv793gKcp0XENR8Il8WxGTlZ73gQ==",
|
||||
"version": "0.10.50",
|
||||
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.50.tgz",
|
||||
"integrity": "sha512-KMzZTPBkeQV/JcSQhI5/z6d9VWJ3EnQ194USTUwIYZ2ZbpN8+SGXQKt1h68EX44+qt+Fzr8DO17vnxrw7c3agw==",
|
||||
"requires": {
|
||||
"es6-iterator": "~2.0.3",
|
||||
"es6-symbol": "~3.1.1",
|
||||
@@ -296,12 +298,12 @@
|
||||
}
|
||||
},
|
||||
"es6-symbol": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.2.tgz",
|
||||
"integrity": "sha512-/ZypxQsArlv+KHpGvng52/Iz8by3EQPxhmbuz8yFG89N/caTFBSbcXONDw0aMjy827gQg26XAjP4uXFvnfINmQ==",
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
|
||||
"integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=",
|
||||
"requires": {
|
||||
"d": "^1.0.1",
|
||||
"es5-ext": "^0.10.51"
|
||||
"d": "1",
|
||||
"es5-ext": "~0.10.14"
|
||||
}
|
||||
},
|
||||
"es6-weak-map": {
|
||||
@@ -351,43 +353,43 @@
|
||||
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
|
||||
},
|
||||
"fast-json-stringify": {
|
||||
"version": "1.15.5",
|
||||
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.15.5.tgz",
|
||||
"integrity": "sha512-isOtZqxaBElpIBG5kibeBDIPyMYCGuI271ujJvAiWE+HNMPCFNiJJLVoxfGwer0u6g9wjv6OWbVzSjBPfHAgmg==",
|
||||
"version": "1.15.4",
|
||||
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.15.4.tgz",
|
||||
"integrity": "sha512-lsGTxL0OIGjGSUXgWUOdSgjCL/xMyMvMudfGN3D1zOLEv44fYZ1ZXmMyCON5XdpaiZN6nCXmU7GQg7fbXfPG4g==",
|
||||
"requires": {
|
||||
"ajv": "^6.8.1",
|
||||
"deepmerge": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"fast-redact": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-2.0.0.tgz",
|
||||
"integrity": "sha512-zxpkULI9W9MNTK2sJ3BpPQrTEXFNESd2X6O1tXMFpK/XM0G5c5Rll2EVYZH2TqI3xRGK/VaJ+eEOt7pnENJpeA=="
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-1.5.0.tgz",
|
||||
"integrity": "sha512-Afo61CgUjkzdvOKDHn08qnZ0kwck38AOGcMlvSGzvJbIab6soAP5rdoQayecGCDsD69AiF9vJBXyq31eoEO2tQ=="
|
||||
},
|
||||
"fast-safe-stringify": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz",
|
||||
"integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA=="
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz",
|
||||
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
|
||||
},
|
||||
"fastify": {
|
||||
"version": "2.10.0",
|
||||
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.10.0.tgz",
|
||||
"integrity": "sha512-ieWwtPZPpcurQlRBmWer6rSq/2WAKAI3yPkh2oBbQ98U5BnWjhcLXYYgBRTS1TDu2evwbXwnRVdLpILVC2O5XA==",
|
||||
"version": "2.7.1",
|
||||
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.7.1.tgz",
|
||||
"integrity": "sha512-ScKPXD84lkdCgz7q0zjyBr1aLxKbXRt9HYL3XIt/L8ZD2f3fAcsLEyQ2/rHxLUzLGjPlEjIvprWUL3RZvlLRLw==",
|
||||
"requires": {
|
||||
"abstract-logging": "^1.0.0",
|
||||
"ajv": "^6.10.2",
|
||||
"avvio": "^6.2.2",
|
||||
"fast-json-stringify": "^1.15.5",
|
||||
"avvio": "^6.1.1",
|
||||
"fast-json-stringify": "^1.15.0",
|
||||
"find-my-way": "^2.0.0",
|
||||
"flatstr": "^1.0.12",
|
||||
"light-my-request": "^3.4.1",
|
||||
"middie": "^4.0.1",
|
||||
"pino": "^5.13.2",
|
||||
"pino": "^5.13.1",
|
||||
"proxy-addr": "^2.0.4",
|
||||
"readable-stream": "^3.1.1",
|
||||
"rfdc": "^1.1.2",
|
||||
"secure-json-parse": "^1.0.0",
|
||||
"tiny-lru": "^7.0.0"
|
||||
"tiny-lru": "^6.0.1"
|
||||
}
|
||||
},
|
||||
"fastq": {
|
||||
@@ -399,9 +401,9 @@
|
||||
}
|
||||
},
|
||||
"find-my-way": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-2.2.1.tgz",
|
||||
"integrity": "sha512-pzZA9/PlhDGG5PRzmd4vH4AbKW7FO68RE7q2I3NzjJHcVPukYbDA7bPdArg7ySKfS6pKki+qhrawFoN6aNZfjA==",
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-2.1.0.tgz",
|
||||
"integrity": "sha512-Hdx6ctcrzkZH5y9EREHtXryXAgc5Bc8z5Cvoa61y9kaoYj2KU4yXD6h8b6u0NUkYPVmQQeRdf0AtG1kQxQ+ukQ==",
|
||||
"requires": {
|
||||
"fast-decode-uri-component": "^1.0.0",
|
||||
"safe-regex2": "^2.0.0",
|
||||
@@ -444,9 +446,9 @@
|
||||
"integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
|
||||
},
|
||||
"google-libphonenumber": {
|
||||
"version": "3.2.5",
|
||||
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.5.tgz",
|
||||
"integrity": "sha512-Y0r7MFCI11UDLn0KaMPBEInhROyIOkWkQIyvWMFVF2I+h+sHE3vbl5a7FVe39td6u/w+nlKDdUMP9dMOZyv+2Q=="
|
||||
"version": "3.2.3",
|
||||
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.3.tgz",
|
||||
"integrity": "sha512-8n4JyRptifaIRlHANKRlfqLR8fANm7+Q+1qvDuUsUeStSLtLGTVsZWe1llWDfgWTm1y07cEUyiRuNIv6cs2ovg=="
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
@@ -464,9 +466,9 @@
|
||||
"integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA=="
|
||||
},
|
||||
"is-buffer": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
|
||||
"integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A=="
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
|
||||
"integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw=="
|
||||
},
|
||||
"is-promise": {
|
||||
"version": "2.1.0",
|
||||
@@ -578,9 +580,9 @@
|
||||
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
|
||||
},
|
||||
"object-hash": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.0.0.tgz",
|
||||
"integrity": "sha512-I7zGBH0rDKwVGeGZpZoFaDhIwvJa3l1CZE+8VchylXbInNiCj7sxxea9P5dTM4ftKR5//nrqxrdeGSTWL2VpBA=="
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz",
|
||||
"integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA=="
|
||||
},
|
||||
"optional": {
|
||||
"version": "0.1.4",
|
||||
@@ -588,17 +590,17 @@
|
||||
"integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw=="
|
||||
},
|
||||
"path-to-regexp": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.1.0.tgz",
|
||||
"integrity": "sha512-PtHLisEvUOepjc+sStXxJ/pDV/s5UBTOKWJY2SOz3e6E/iN/jLknY9WL72kTwRrwXDUbZTEAtSnJbz2fF127DA=="
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.0.0.tgz",
|
||||
"integrity": "sha512-ZOtfhPttCrqp2M1PBBH4X13XlvnfhIwD7yCLx+GoGoXRPQyxGOTdQMpIzPSPKXAJT/JQrdfFrgdJOyAzvgpQ9A=="
|
||||
},
|
||||
"pino": {
|
||||
"version": "5.13.4",
|
||||
"resolved": "https://registry.npmjs.org/pino/-/pino-5.13.4.tgz",
|
||||
"integrity": "sha512-heeg8m8FZY8Nl3nuuD+msJUmhamqoGl7JXoTExh9YpGajzz6LYbVByUqrjbf4sCEMYFsqdcqnTJWiSY660DraQ==",
|
||||
"version": "5.13.1",
|
||||
"resolved": "https://registry.npmjs.org/pino/-/pino-5.13.1.tgz",
|
||||
"integrity": "sha512-IxusG28L0g50uuf21kZELypdFOeNrJ/kRhktdi7LtdZQWCxLliMxG5iOrGUQ/ng7MiJ4XqXi/hfyXwZeKc1MxA==",
|
||||
"requires": {
|
||||
"fast-redact": "^2.0.0",
|
||||
"fast-safe-stringify": "^2.0.7",
|
||||
"fast-redact": "^1.4.4",
|
||||
"fast-safe-stringify": "^2.0.6",
|
||||
"flatstr": "^1.0.9",
|
||||
"pino-std-serializers": "^2.3.0",
|
||||
"quick-format-unescaped": "^3.0.2",
|
||||
@@ -637,9 +639,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"quick-format-unescaped": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-3.0.3.tgz",
|
||||
"integrity": "sha512-dy1yjycmn9blucmJLXOfZDx1ikZJUi6E8bBZLnhPG5gBrVhHXx2xVyqqgKBubVNEXmx51dBACMHpoMQK/N/AXQ=="
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-3.0.2.tgz",
|
||||
"integrity": "sha512-FXTaCkwvpIlkdKeGDNgcq07SXWS383noQUuZjvdE1QcTt+eLuqof6/BDiEPqB59FWLie/l91+HtlJSw7iCViSA=="
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "3.4.0",
|
||||
@@ -672,9 +674,9 @@
|
||||
"integrity": "sha512-5C9HXdzK8EAqN7JDif30jqsBzavB7wLpaubisuQIGHWf2gUXSpzy6ArX/+Da8RjFpagWsCn+pIgxTMAmKw9Zug=="
|
||||
},
|
||||
"rxjs": {
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz",
|
||||
"integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==",
|
||||
"version": "6.5.2",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz",
|
||||
"integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==",
|
||||
"requires": {
|
||||
"tslib": "^1.9.0"
|
||||
}
|
||||
@@ -682,8 +684,7 @@
|
||||
"safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
|
||||
"dev": true
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||
},
|
||||
"safe-regex2": {
|
||||
"version": "2.0.0",
|
||||
@@ -704,9 +705,9 @@
|
||||
"integrity": "sha512-TcZvGMMy9vodEFSse30lWinkj+JgOBvPn8wRItpQRSayhc+4ssDs335uklkfvQQJgL/WvmHLVj4Ycv2s7QCQMg=="
|
||||
},
|
||||
"sonic-boom": {
|
||||
"version": "0.7.6",
|
||||
"resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.6.tgz",
|
||||
"integrity": "sha512-k9E2QQ4zxuVRLDW+ZW6ISzJs3wlEorVdmM7ApDgor7wsGKSDG5YGHsGmgLY4XYh4DMlr/2ap2BWAE7yTFJtWnQ==",
|
||||
"version": "0.7.5",
|
||||
"resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.5.tgz",
|
||||
"integrity": "sha512-1pKrnAV6RfvntPnarY71tpthFTM3pWZWWQdghZY8ARjtDPGzG/inxqSuRwQY/7V1woUjfyxPb437zn4p5phgnQ==",
|
||||
"requires": {
|
||||
"flatstr": "^1.0.12"
|
||||
}
|
||||
@@ -718,9 +719,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"source-map-support": {
|
||||
"version": "0.5.13",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz",
|
||||
"integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==",
|
||||
"version": "0.5.12",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz",
|
||||
"integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffer-from": "^1.0.0",
|
||||
@@ -728,18 +729,11 @@
|
||||
}
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
||||
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz",
|
||||
"integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==",
|
||||
"requires": {
|
||||
"safe-buffer": "~5.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"safe-buffer": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz",
|
||||
"integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg=="
|
||||
}
|
||||
"safe-buffer": "~5.1.0"
|
||||
}
|
||||
},
|
||||
"superagent": {
|
||||
@@ -820,14 +814,14 @@
|
||||
}
|
||||
},
|
||||
"tiny-lru": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/tiny-lru/-/tiny-lru-7.0.1.tgz",
|
||||
"integrity": "sha512-BImmnAPNkaN7XjrvmOr4JAT2U6ubLmxiD9iDBMMow3/026OZ+yiuWzM1F0TgECLfq1KO2YkXEIJ2h6sPjXv9XA=="
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/tiny-lru/-/tiny-lru-6.0.1.tgz",
|
||||
"integrity": "sha512-k/vdHz+bFALjmik0URLWBYNuO0hCABTL5dullbZBXvFDdlL8RrKaeLR6YuHfX+6ZXOLkHw+HpNLCUA7DtLMQmg=="
|
||||
},
|
||||
"ts-node": {
|
||||
"version": "8.4.1",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.4.1.tgz",
|
||||
"integrity": "sha512-5LpRN+mTiCs7lI5EtbXmF/HfMeCjzt7DH9CZwtkr6SywStrNQC723wG+aOWFiLNn7zT3kD/RnFqi3ZUfr4l5Qw==",
|
||||
"version": "8.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz",
|
||||
"integrity": "sha512-dyNS/RqyVTDcmNM4NIBAeDMpsAdaQ+ojdf0GOLqE6nwJOgzEkdRNzJywhDfwnuvB10oa6NLVG1rUJQCpRN7qoQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arg": "^4.1.0",
|
||||
@@ -838,19 +832,19 @@
|
||||
}
|
||||
},
|
||||
"tslib": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz",
|
||||
"integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ=="
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
|
||||
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
|
||||
},
|
||||
"type": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
|
||||
"integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg=="
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/type/-/type-1.0.1.tgz",
|
||||
"integrity": "sha512-MAM5dBMJCJNKs9E7JXo4CXRAansRfG0nlJxW7Wf6GZzSOvH31zClSaHdIMWLehe/EGMBkqeC55rrkaOr5Oo7Nw=="
|
||||
},
|
||||
"typescript": {
|
||||
"version": "3.6.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.4.tgz",
|
||||
"integrity": "sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg=="
|
||||
"version": "3.5.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz",
|
||||
"integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g=="
|
||||
},
|
||||
"uri-js": {
|
||||
"version": "4.2.2",
|
||||
@@ -866,9 +860,9 @@
|
||||
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
|
||||
},
|
||||
"uuid": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz",
|
||||
"integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ=="
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
|
||||
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
|
||||
},
|
||||
"validator": {
|
||||
"version": "11.1.0",
|
||||
@@ -876,9 +870,9 @@
|
||||
"integrity": "sha512-qiQ5ktdO7CD6C/5/mYV4jku/7qnqzjrxb3C/Q5wR3vGGinHTgJZN/TdFT3ZX4vXhX2R1PXx42fB1cn5W+uJ4lg=="
|
||||
},
|
||||
"yn": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
|
||||
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.0.tgz",
|
||||
"integrity": "sha512-kKfnnYkbTfrAdd0xICNFw7Atm8nKpLcLv9AZGEt+kczL/WQVai4e2V6ZN8U/O+iI6WrNuJjNNOyu4zfhl9D3Hg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,21 +7,21 @@
|
||||
"start": "ts-node src/main"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "6.8.3",
|
||||
"@nestjs/core": "6.8.3",
|
||||
"@nestjs/microservices": "6.8.3",
|
||||
"@nestjs/testing": "6.8.3",
|
||||
"@nestjs/websockets": "6.8.3",
|
||||
"@nestjs/common": "6.5.3",
|
||||
"@nestjs/core": "6.5.3",
|
||||
"@nestjs/microservices": "6.5.3",
|
||||
"@nestjs/testing": "6.5.3",
|
||||
"@nestjs/websockets": "6.5.3",
|
||||
"class-transformer": "0.2.3",
|
||||
"class-validator": "0.10.2",
|
||||
"fastify": "2.10.0",
|
||||
"class-validator": "0.10.0",
|
||||
"fastify": "2.7.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.5.3",
|
||||
"typescript": "3.6.4"
|
||||
"rxjs": "6.5.2",
|
||||
"typescript": "3.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.10.7",
|
||||
"supertest": "4.0.2",
|
||||
"ts-node": "8.4.1"
|
||||
"ts-node": "8.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
import { Injectable, BeforeApplicationShutdown } from '@nestjs/common';
|
||||
import { Test } from '@nestjs/testing';
|
||||
import { expect } from 'chai';
|
||||
import * as Sinon from 'sinon';
|
||||
|
||||
@Injectable()
|
||||
class TestInjectable implements BeforeApplicationShutdown {
|
||||
beforeApplicationShutdown = Sinon.spy();
|
||||
}
|
||||
|
||||
describe('BeforeApplicationShutdown', () => {
|
||||
it('should call `beforeApplicationShutdown` when application closes', async () => {
|
||||
const module = await Test.createTestingModule({
|
||||
providers: [TestInjectable],
|
||||
}).compile();
|
||||
|
||||
const app = module.createNestApplication();
|
||||
await app.close();
|
||||
const instance = module.get(TestInjectable);
|
||||
expect(instance.beforeApplicationShutdown.called).to.be.true;
|
||||
});
|
||||
|
||||
it('should not stop the server once beforeApplicationShutdown has been called', async () => {
|
||||
let resolve;
|
||||
const promise = new Promise(r => (resolve = r));
|
||||
const module = await Test.createTestingModule({
|
||||
providers: [
|
||||
{
|
||||
provide: 'Test',
|
||||
useValue: {
|
||||
beforeApplicationShutdown: () => promise,
|
||||
},
|
||||
},
|
||||
],
|
||||
}).compile();
|
||||
Sinon.stub(module, 'dispose' as any);
|
||||
const app = module.createNestApplication();
|
||||
|
||||
app.close();
|
||||
|
||||
expect(((module as any).dispose as Sinon.SinonSpy).called, 'dispose').to.be
|
||||
.false;
|
||||
|
||||
resolve();
|
||||
|
||||
setTimeout(
|
||||
() =>
|
||||
expect(((module as any).dispose as Sinon.SinonSpy).called, 'dispose').to
|
||||
.be.true,
|
||||
0,
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -1,54 +0,0 @@
|
||||
import { expect } from 'chai';
|
||||
import { spawnSync } from 'child_process';
|
||||
import { join } from 'path';
|
||||
|
||||
describe('enableShutdownHooks', () => {
|
||||
it('should call the correct hooks if any shutdown signal gets invoked', done => {
|
||||
const result = spawnSync('ts-node', [
|
||||
join(__dirname, '../src/enable-shutdown-hooks-main.ts'),
|
||||
'SIGHUP',
|
||||
]);
|
||||
const calls = result.stdout
|
||||
.toString()
|
||||
.split('\n')
|
||||
.map((call: string) => call.trim());
|
||||
expect(calls[0]).to.equal('beforeApplicationShutdown SIGHUP');
|
||||
expect(calls[1]).to.equal('onApplicationShutdown SIGHUP');
|
||||
done();
|
||||
}).timeout(5000);
|
||||
|
||||
it('should call the correct hooks if a specific shutdown signal gets invoked', done => {
|
||||
const result = spawnSync('ts-node', [
|
||||
join(__dirname, '../src/enable-shutdown-hooks-main.ts'),
|
||||
'SIGINT',
|
||||
'SIGINT',
|
||||
]);
|
||||
const calls = result.stdout
|
||||
.toString()
|
||||
.split('\n')
|
||||
.map((call: string) => call.trim());
|
||||
expect(calls[0]).to.equal('beforeApplicationShutdown SIGINT');
|
||||
expect(calls[1]).to.equal('onApplicationShutdown SIGINT');
|
||||
done();
|
||||
}).timeout(5000);
|
||||
|
||||
it('should ignore system signals which are not specified', done => {
|
||||
const result = spawnSync('ts-node', [
|
||||
join(__dirname, '../src/enable-shutdown-hooks-main.ts'),
|
||||
'SIGINT',
|
||||
'SIGHUP',
|
||||
]);
|
||||
expect(result.stdout.toString().trim()).to.be.eq('');
|
||||
done();
|
||||
}).timeout(5000);
|
||||
|
||||
it('should ignore system signals if "enableShutdownHooks" was not called', done => {
|
||||
const result = spawnSync('ts-node', [
|
||||
join(__dirname, '../src/enable-shutdown-hooks-main.ts'),
|
||||
'SIGINT',
|
||||
'NONE',
|
||||
]);
|
||||
expect(result.stdout.toString().trim()).to.be.eq('');
|
||||
done();
|
||||
}).timeout(5000);
|
||||
});
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Test } from '@nestjs/testing';
|
||||
import { expect } from 'chai';
|
||||
import * as Sinon from 'sinon';
|
||||
import {
|
||||
Injectable,
|
||||
@@ -6,7 +7,6 @@ import {
|
||||
OnApplicationShutdown,
|
||||
OnModuleDestroy,
|
||||
OnModuleInit,
|
||||
BeforeApplicationShutdown,
|
||||
} from '@nestjs/common';
|
||||
|
||||
@Injectable()
|
||||
@@ -15,10 +15,8 @@ class TestInjectable
|
||||
OnApplicationBootstrap,
|
||||
OnModuleInit,
|
||||
OnModuleDestroy,
|
||||
OnApplicationShutdown,
|
||||
BeforeApplicationShutdown {
|
||||
OnApplicationShutdown {
|
||||
onApplicationBootstrap = Sinon.spy();
|
||||
beforeApplicationShutdown = Sinon.spy();
|
||||
onApplicationShutdown = Sinon.spy();
|
||||
onModuleDestroy = Sinon.spy();
|
||||
onModuleInit = Sinon.spy();
|
||||
@@ -39,7 +37,6 @@ describe('Lifecycle Hook Order', () => {
|
||||
instance.onModuleInit,
|
||||
instance.onApplicationBootstrap,
|
||||
instance.onModuleDestroy,
|
||||
instance.beforeApplicationShutdown,
|
||||
instance.onApplicationShutdown,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -19,26 +19,4 @@ describe('OnApplicationBootstrap', () => {
|
||||
const instance = module.get(TestInjectable);
|
||||
expect(instance.onApplicationBootstrap.called).to.be.true;
|
||||
});
|
||||
|
||||
it('should not throw an error when onApplicationBootstrap is null', async () => {
|
||||
const module = await Test.createTestingModule({
|
||||
providers: [
|
||||
{ provide: 'TEST', useValue: { onApplicationBootstrap: null } },
|
||||
],
|
||||
}).compile();
|
||||
|
||||
const app = module.createNestApplication();
|
||||
await app.init().then(obj => expect(obj).to.not.be.undefined);
|
||||
});
|
||||
|
||||
it('should not throw an error when onApplicationBootstrap is undefined', async () => {
|
||||
const module = await Test.createTestingModule({
|
||||
providers: [
|
||||
{ provide: 'TEST', useValue: { onApplicationBootstrap: undefined } },
|
||||
],
|
||||
}).compile();
|
||||
|
||||
const app = module.createNestApplication();
|
||||
await app.init().then(obj => expect(obj).to.not.be.undefined);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { Injectable, OnApplicationShutdown } from '@nestjs/common';
|
||||
import { Test } from '@nestjs/testing';
|
||||
import { expect } from 'chai';
|
||||
import { spawnSync } from 'child_process';
|
||||
import { join } from 'path';
|
||||
import * as Sinon from 'sinon';
|
||||
|
||||
@Injectable()
|
||||
@@ -19,4 +21,43 @@ describe('OnApplicationShutdown', () => {
|
||||
const instance = module.get(TestInjectable);
|
||||
expect(instance.onApplicationShutdown.called).to.be.true;
|
||||
});
|
||||
|
||||
it('should call onApplicationShutdown if any shutdown signal gets invoked', done => {
|
||||
const result = spawnSync('ts-node', [
|
||||
join(__dirname, '../src/main.ts'),
|
||||
'SIGHUP',
|
||||
]);
|
||||
expect(result.stdout.toString().trim() === 'Signal SIGHUP').to.be.true;
|
||||
done();
|
||||
}).timeout(5000);
|
||||
|
||||
it('should call onApplicationShutdown if a specific shutdown signal gets invoked', done => {
|
||||
const result = spawnSync('ts-node', [
|
||||
join(__dirname, '../src/main.ts'),
|
||||
'SIGINT',
|
||||
'SIGINT',
|
||||
]);
|
||||
expect(result.stdout.toString().trim()).to.be.eq('Signal SIGINT');
|
||||
done();
|
||||
}).timeout(5000);
|
||||
|
||||
it('should ignore system signals which are not specified', done => {
|
||||
const result = spawnSync('ts-node', [
|
||||
join(__dirname, '../src/main.ts'),
|
||||
'SIGINT',
|
||||
'SIGHUP',
|
||||
]);
|
||||
expect(result.stdout.toString().trim()).to.be.eq('');
|
||||
done();
|
||||
}).timeout(5000);
|
||||
|
||||
it('should ignore system signals if "enableShutdownHooks" was not called', done => {
|
||||
const result = spawnSync('ts-node', [
|
||||
join(__dirname, '../src/main.ts'),
|
||||
'SIGINT',
|
||||
'NONE',
|
||||
]);
|
||||
expect(result.stdout.toString().trim()).to.be.eq('');
|
||||
done();
|
||||
}).timeout(5000);
|
||||
});
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Injectable, OnModuleDestroy } from '@nestjs/common';
|
||||
import { Test } from '@nestjs/testing';
|
||||
import { expect } from 'chai';
|
||||
import * as Sinon from 'sinon';
|
||||
import { Injectable, OnModuleDestroy } from '@nestjs/common';
|
||||
|
||||
@Injectable()
|
||||
class TestInjectable implements OnModuleDestroy {
|
||||
@@ -19,24 +19,4 @@ describe('OnModuleDestroy', () => {
|
||||
const instance = module.get(TestInjectable);
|
||||
expect(instance.onModuleDestroy.called).to.be.true;
|
||||
});
|
||||
|
||||
it('should not throw an error when onModuleDestroy is null', async () => {
|
||||
const module = await Test.createTestingModule({
|
||||
providers: [{ provide: 'TEST', useValue: { onModuleDestroy: null } }],
|
||||
}).compile();
|
||||
|
||||
const app = module.createNestApplication();
|
||||
await app.init().then(obj => expect(obj).to.not.be.undefined);
|
||||
});
|
||||
|
||||
it('should not throw an error when onModuleDestroy is undefined', async () => {
|
||||
const module = await Test.createTestingModule({
|
||||
providers: [
|
||||
{ provide: 'TEST', useValue: { onModuleDestroy: undefined } },
|
||||
],
|
||||
}).compile();
|
||||
|
||||
const app = module.createNestApplication();
|
||||
await app.init().then(obj => expect(obj).to.not.be.undefined);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -19,22 +19,4 @@ describe('OnModuleInit', () => {
|
||||
const instance = module.get(TestInjectable);
|
||||
expect(instance.onModuleInit.called).to.be.true;
|
||||
});
|
||||
|
||||
it('should not throw an error when onModuleInit is null', async () => {
|
||||
const module = await Test.createTestingModule({
|
||||
providers: [{ provide: 'TEST', useValue: { onModuleInit: null } }],
|
||||
}).compile();
|
||||
|
||||
const app = module.createNestApplication();
|
||||
await app.init().then(obj => expect(obj).to.not.be.undefined);
|
||||
});
|
||||
|
||||
it('should not throw an error when onModuleInit is undefined', async () => {
|
||||
const module = await Test.createTestingModule({
|
||||
providers: [{ provide: 'TEST', useValue: { onModuleInit: undefined } }],
|
||||
}).compile();
|
||||
|
||||
const app = module.createNestApplication();
|
||||
await app.init().then(obj => expect(obj).to.not.be.undefined);
|
||||
});
|
||||
});
|
||||
|
||||
154
integration/hooks/package-lock.json
generated
154
integration/hooks/package-lock.json
generated
@@ -5,25 +5,26 @@
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@nestjs/common": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.8.3.tgz",
|
||||
"integrity": "sha512-MQY05kocVTJx5UdLeE5gpBjiymXnKYo1rme3ejCaeMFFkiXmPcgkGquYNegCFy+SHXwsq9AW/gcoD0hkVn0Z6g==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
|
||||
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
|
||||
"requires": {
|
||||
"axios": "0.19.0",
|
||||
"cli-color": "2.0.0",
|
||||
"uuid": "3.3.3"
|
||||
"cli-color": "1.4.0",
|
||||
"uuid": "3.3.2"
|
||||
}
|
||||
},
|
||||
"@nestjs/core": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.8.3.tgz",
|
||||
"integrity": "sha512-hgpmqwbJaOFEuFYTAQe/Csu+kcxBfqlsctv6np9tg/TqDvNFMrowt3Snvtpjpz55fdvUfUh8JY7YBwoaUTo6ZA==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
|
||||
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
|
||||
"requires": {
|
||||
"@nuxtjs/opencollective": "0.2.2",
|
||||
"fast-safe-stringify": "2.0.7",
|
||||
"fast-safe-stringify": "2.0.6",
|
||||
"iterare": "1.2.0",
|
||||
"object-hash": "2.0.0",
|
||||
"uuid": "3.3.3"
|
||||
"object-hash": "1.3.1",
|
||||
"optional": "0.1.4",
|
||||
"uuid": "3.3.2"
|
||||
}
|
||||
},
|
||||
"@nuxtjs/opencollective": {
|
||||
@@ -43,9 +44,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/validator": {
|
||||
"version": "10.11.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.3.tgz",
|
||||
"integrity": "sha512-GKF2VnEkMmEeEGvoo03ocrP9ySMuX1ypKazIYMlsjfslfBMhOAtC5dmEWKdJioW4lJN7MZRS88kalTsVClyQ9w=="
|
||||
"version": "10.11.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.2.tgz",
|
||||
"integrity": "sha512-k/ju1RsdP5ACFUWebqsyEy0avP5uNJCs2p3pmTHzOZdd4gMSAJTq7iUEHFY3tt3emBrPTm6oGvfZ4SzcqOgLPQ=="
|
||||
},
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
@@ -61,9 +62,9 @@
|
||||
}
|
||||
},
|
||||
"arg": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.1.tgz",
|
||||
"integrity": "sha512-SlmP3fEA88MBv0PypnXZ8ZfJhwmDeIE3SP71j37AiXQBXYosPV0x6uISAaHYSlSVhmHOVkomen0tbGk6Anlebw==",
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz",
|
||||
"integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==",
|
||||
"dev": true
|
||||
},
|
||||
"asynckit": {
|
||||
@@ -103,26 +104,26 @@
|
||||
"integrity": "sha512-qsP+0xoavpOlJHuYsQJsN58HXSl8Jvveo+T37rEvCEeRfMWoytAyR0Ua/YsFgpM6AZYZ/og2PJwArwzJl1aXtQ=="
|
||||
},
|
||||
"class-validator": {
|
||||
"version": "0.10.2",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.2.tgz",
|
||||
"integrity": "sha512-57bGDjoFXizqGZBHe/uHn5/K0MSjBkToaHpDhAXR6DIwjaoET37a0Uug4F5RZR7WF31/7SqzKFIvd+ZspszGUA==",
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.0.tgz",
|
||||
"integrity": "sha512-RvjxRlvoCvM/ojUq11j78ISpReGdBoMErdmDk1e27aQZK6ppSXq751UE6jB9JI7ayEnL6Nnmllzn/HXVSu3dmg==",
|
||||
"requires": {
|
||||
"@types/validator": "10.11.3",
|
||||
"@types/validator": "10.11.2",
|
||||
"google-libphonenumber": "^3.1.6",
|
||||
"validator": "11.1.0"
|
||||
}
|
||||
},
|
||||
"cli-color": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.0.tgz",
|
||||
"integrity": "sha512-a0VZ8LeraW0jTuCkuAGMNufareGHhyZU9z8OGsW0gXd1hZGi1SRuNRXdbGkraBBKnhyUhyebFWnRbp+dIn0f0A==",
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-color/-/cli-color-1.4.0.tgz",
|
||||
"integrity": "sha512-xu6RvQqqrWEo6MPR1eixqGPywhYBHRs653F9jfXB2Hx4jdM/3WxiNE1vppRmxtMIfl16SFYTpYlrnqH/HsK/2w==",
|
||||
"requires": {
|
||||
"ansi-regex": "^2.1.1",
|
||||
"d": "^1.0.1",
|
||||
"es5-ext": "^0.10.51",
|
||||
"d": "1",
|
||||
"es5-ext": "^0.10.46",
|
||||
"es6-iterator": "^2.0.3",
|
||||
"memoizee": "^0.4.14",
|
||||
"timers-ext": "^0.1.7"
|
||||
"timers-ext": "^0.1.5"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
@@ -154,9 +155,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"consola": {
|
||||
"version": "2.10.1",
|
||||
"resolved": "https://registry.npmjs.org/consola/-/consola-2.10.1.tgz",
|
||||
"integrity": "sha512-4sxpH6SGFYLADfUip4vuY65f/gEogrzJoniVhNUYkJHtng0l8ZjnDCqxxrSVRHOHwKxsy8Vm5ONZh1wOR3/l/w=="
|
||||
"version": "2.9.0",
|
||||
"resolved": "https://registry.npmjs.org/consola/-/consola-2.9.0.tgz",
|
||||
"integrity": "sha512-34Iue+LRcWbndFIfZc5boNizWlsrRjqIBJZTe591vImgbnq7nx2EzlrLtANj9TH2Fxm7puFJBJAOk5BhvZOddQ=="
|
||||
},
|
||||
"cookiejar": {
|
||||
"version": "2.1.2",
|
||||
@@ -201,9 +202,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"es5-ext": {
|
||||
"version": "0.10.51",
|
||||
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.51.tgz",
|
||||
"integrity": "sha512-oRpWzM2WcLHVKpnrcyB7OW8j/s67Ba04JCm0WnNv3RiABSvs7mrQlutB8DBv793gKcp0XENR8Il8WxGTlZ73gQ==",
|
||||
"version": "0.10.50",
|
||||
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.50.tgz",
|
||||
"integrity": "sha512-KMzZTPBkeQV/JcSQhI5/z6d9VWJ3EnQ194USTUwIYZ2ZbpN8+SGXQKt1h68EX44+qt+Fzr8DO17vnxrw7c3agw==",
|
||||
"requires": {
|
||||
"es6-iterator": "~2.0.3",
|
||||
"es6-symbol": "~3.1.1",
|
||||
@@ -221,12 +222,12 @@
|
||||
}
|
||||
},
|
||||
"es6-symbol": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.2.tgz",
|
||||
"integrity": "sha512-/ZypxQsArlv+KHpGvng52/Iz8by3EQPxhmbuz8yFG89N/caTFBSbcXONDw0aMjy827gQg26XAjP4uXFvnfINmQ==",
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
|
||||
"integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=",
|
||||
"requires": {
|
||||
"d": "^1.0.1",
|
||||
"es5-ext": "^0.10.51"
|
||||
"d": "1",
|
||||
"es5-ext": "~0.10.14"
|
||||
}
|
||||
},
|
||||
"es6-weak-map": {
|
||||
@@ -261,9 +262,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"fast-safe-stringify": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz",
|
||||
"integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA=="
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz",
|
||||
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
|
||||
},
|
||||
"follow-redirects": {
|
||||
"version": "1.5.10",
|
||||
@@ -306,9 +307,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"google-libphonenumber": {
|
||||
"version": "3.2.5",
|
||||
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.5.tgz",
|
||||
"integrity": "sha512-Y0r7MFCI11UDLn0KaMPBEInhROyIOkWkQIyvWMFVF2I+h+sHE3vbl5a7FVe39td6u/w+nlKDdUMP9dMOZyv+2Q=="
|
||||
"version": "3.2.3",
|
||||
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.3.tgz",
|
||||
"integrity": "sha512-8n4JyRptifaIRlHANKRlfqLR8fANm7+Q+1qvDuUsUeStSLtLGTVsZWe1llWDfgWTm1y07cEUyiRuNIv6cs2ovg=="
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
@@ -322,9 +323,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"is-buffer": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
|
||||
"integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A=="
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
|
||||
"integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw=="
|
||||
},
|
||||
"is-promise": {
|
||||
"version": "2.1.0",
|
||||
@@ -409,9 +410,14 @@
|
||||
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
|
||||
},
|
||||
"object-hash": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.0.0.tgz",
|
||||
"integrity": "sha512-I7zGBH0rDKwVGeGZpZoFaDhIwvJa3l1CZE+8VchylXbInNiCj7sxxea9P5dTM4ftKR5//nrqxrdeGSTWL2VpBA=="
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz",
|
||||
"integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA=="
|
||||
},
|
||||
"optional": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/optional/-/optional-0.1.4.tgz",
|
||||
"integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw=="
|
||||
},
|
||||
"process-nextick-args": {
|
||||
"version": "2.0.0",
|
||||
@@ -431,9 +437,9 @@
|
||||
"integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg=="
|
||||
},
|
||||
"rxjs": {
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz",
|
||||
"integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==",
|
||||
"version": "6.5.2",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz",
|
||||
"integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==",
|
||||
"requires": {
|
||||
"tslib": "^1.9.0"
|
||||
}
|
||||
@@ -451,9 +457,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"source-map-support": {
|
||||
"version": "0.5.13",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz",
|
||||
"integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==",
|
||||
"version": "0.5.12",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz",
|
||||
"integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffer-from": "^1.0.0",
|
||||
@@ -538,9 +544,9 @@
|
||||
}
|
||||
},
|
||||
"ts-node": {
|
||||
"version": "8.4.1",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.4.1.tgz",
|
||||
"integrity": "sha512-5LpRN+mTiCs7lI5EtbXmF/HfMeCjzt7DH9CZwtkr6SywStrNQC723wG+aOWFiLNn7zT3kD/RnFqi3ZUfr4l5Qw==",
|
||||
"version": "8.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz",
|
||||
"integrity": "sha512-dyNS/RqyVTDcmNM4NIBAeDMpsAdaQ+ojdf0GOLqE6nwJOgzEkdRNzJywhDfwnuvB10oa6NLVG1rUJQCpRN7qoQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arg": "^4.1.0",
|
||||
@@ -551,19 +557,19 @@
|
||||
}
|
||||
},
|
||||
"tslib": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz",
|
||||
"integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ=="
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
|
||||
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
|
||||
},
|
||||
"type": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
|
||||
"integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg=="
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/type/-/type-1.0.1.tgz",
|
||||
"integrity": "sha512-MAM5dBMJCJNKs9E7JXo4CXRAansRfG0nlJxW7Wf6GZzSOvH31zClSaHdIMWLehe/EGMBkqeC55rrkaOr5Oo7Nw=="
|
||||
},
|
||||
"typescript": {
|
||||
"version": "3.6.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.4.tgz",
|
||||
"integrity": "sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg=="
|
||||
"version": "3.5.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz",
|
||||
"integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g=="
|
||||
},
|
||||
"util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
@@ -572,9 +578,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"uuid": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz",
|
||||
"integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ=="
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
|
||||
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
|
||||
},
|
||||
"validator": {
|
||||
"version": "11.1.0",
|
||||
@@ -582,9 +588,9 @@
|
||||
"integrity": "sha512-qiQ5ktdO7CD6C/5/mYV4jku/7qnqzjrxb3C/Q5wR3vGGinHTgJZN/TdFT3ZX4vXhX2R1PXx42fB1cn5W+uJ4lg=="
|
||||
},
|
||||
"yn": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
|
||||
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.0.tgz",
|
||||
"integrity": "sha512-kKfnnYkbTfrAdd0xICNFw7Atm8nKpLcLv9AZGEt+kczL/WQVai4e2V6ZN8U/O+iI6WrNuJjNNOyu4zfhl9D3Hg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,17 +7,17 @@
|
||||
"start": "ts-node src/main"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "6.8.3",
|
||||
"@nestjs/core": "6.8.3",
|
||||
"@nestjs/common": "6.5.3",
|
||||
"@nestjs/core": "6.5.3",
|
||||
"class-transformer": "0.2.3",
|
||||
"class-validator": "0.10.2",
|
||||
"class-validator": "0.10.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.5.3",
|
||||
"typescript": "3.6.4"
|
||||
"rxjs": "6.5.2",
|
||||
"typescript": "3.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.10.7",
|
||||
"supertest": "4.0.2",
|
||||
"ts-node": "8.4.1"
|
||||
"ts-node": "8.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,29 +1,19 @@
|
||||
import {
|
||||
Injectable,
|
||||
OnApplicationShutdown,
|
||||
BeforeApplicationShutdown,
|
||||
Module,
|
||||
} from '@nestjs/common';
|
||||
import { Injectable, OnApplicationShutdown, Module } from '@nestjs/common';
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
const SIGNAL = process.argv[2];
|
||||
const SIGNAL_TO_LISTEN = process.argv[3];
|
||||
|
||||
@Injectable()
|
||||
class TestInjectable
|
||||
implements OnApplicationShutdown, BeforeApplicationShutdown {
|
||||
beforeApplicationShutdown(signal: string) {
|
||||
console.log('beforeApplicationShutdown ' + signal);
|
||||
}
|
||||
|
||||
class TestInjectable implements OnApplicationShutdown {
|
||||
onApplicationShutdown(signal: string) {
|
||||
console.log('onApplicationShutdown ' + signal);
|
||||
console.log('Signal ' + signal);
|
||||
}
|
||||
}
|
||||
|
||||
@Module({
|
||||
providers: [TestInjectable],
|
||||
})
|
||||
class AppModule {}
|
||||
class AppModule { }
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule, { logger: true });
|
||||
@@ -30,9 +30,7 @@ describe('Core Injectables', () => {
|
||||
});
|
||||
|
||||
it('should provide the current Module as provider', () => {
|
||||
const module = testingModule.get<CoreInjectablesModule>(
|
||||
CoreInjectablesModule,
|
||||
);
|
||||
const module = testingModule.get<CoreInjectablesModule>(CoreInjectablesModule);
|
||||
expect(module).to.not.be.undefined;
|
||||
expect(module.constructor.name).to.be.eq('CoreInjectablesModule');
|
||||
});
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
import { InvalidClassScopeException } from '@nestjs/core/errors/exceptions/invalid-class-scope.exception';
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { expect } from 'chai';
|
||||
import { ScopedController } from '../src/scoped/scoped.controller';
|
||||
import { ScopedModule } from '../src/scoped/scoped.module';
|
||||
import { ScopedService } from '../src/scoped/scoped.service';
|
||||
import { TransientService } from '../src/scoped/transient.service';
|
||||
|
||||
describe('Scoped Instances', () => {
|
||||
let testingModule: TestingModule;
|
||||
|
||||
beforeEach(async () => {
|
||||
testingModule = await Test.createTestingModule({
|
||||
imports: [ScopedModule],
|
||||
}).compile();
|
||||
});
|
||||
|
||||
it('should dynamically resolve transient provider', async () => {
|
||||
const transient1 = await testingModule.resolve(TransientService);
|
||||
const transient2 = await testingModule.resolve(TransientService);
|
||||
|
||||
expect(transient1).to.be.instanceOf(TransientService);
|
||||
expect(transient2).to.be.instanceOf(TransientService);
|
||||
expect(transient1).to.be.equal(transient2);
|
||||
});
|
||||
|
||||
it('should dynamically resolve request-scoped provider', async () => {
|
||||
const request1 = await testingModule.resolve(ScopedService);
|
||||
const request2 = await testingModule.resolve(ScopedService);
|
||||
const request3 = await testingModule.resolve(ScopedService, { id: 1 });
|
||||
|
||||
expect(request1).to.be.instanceOf(ScopedService);
|
||||
expect(request2).to.be.instanceOf(ScopedService);
|
||||
expect(request3).to.not.be.equal(request2);
|
||||
});
|
||||
|
||||
it('should dynamically resolve request-scoped controller', async () => {
|
||||
const request1 = await testingModule.resolve(ScopedController);
|
||||
const request2 = await testingModule.resolve(ScopedController);
|
||||
const request3 = await testingModule.resolve(ScopedController, { id: 1 });
|
||||
|
||||
expect(request1).to.be.instanceOf(ScopedController);
|
||||
expect(request2).to.be.instanceOf(ScopedController);
|
||||
expect(request3).to.not.be.equal(request2);
|
||||
});
|
||||
|
||||
it('should throw an exception when "get()" method is used', async () => {
|
||||
try {
|
||||
testingModule.get(ScopedController);
|
||||
} catch (err) {
|
||||
expect(err).to.be.instanceOf(InvalidClassScopeException);
|
||||
}
|
||||
});
|
||||
});
|
||||
170
integration/injector/package-lock.json
generated
170
integration/injector/package-lock.json
generated
@@ -5,48 +5,50 @@
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@nestjs/common": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.8.3.tgz",
|
||||
"integrity": "sha512-MQY05kocVTJx5UdLeE5gpBjiymXnKYo1rme3ejCaeMFFkiXmPcgkGquYNegCFy+SHXwsq9AW/gcoD0hkVn0Z6g==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
|
||||
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
|
||||
"requires": {
|
||||
"axios": "0.19.0",
|
||||
"cli-color": "2.0.0",
|
||||
"uuid": "3.3.3"
|
||||
"cli-color": "1.4.0",
|
||||
"uuid": "3.3.2"
|
||||
}
|
||||
},
|
||||
"@nestjs/core": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.8.3.tgz",
|
||||
"integrity": "sha512-hgpmqwbJaOFEuFYTAQe/Csu+kcxBfqlsctv6np9tg/TqDvNFMrowt3Snvtpjpz55fdvUfUh8JY7YBwoaUTo6ZA==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
|
||||
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
|
||||
"requires": {
|
||||
"@nuxtjs/opencollective": "0.2.2",
|
||||
"fast-safe-stringify": "2.0.7",
|
||||
"fast-safe-stringify": "2.0.6",
|
||||
"iterare": "1.2.0",
|
||||
"object-hash": "2.0.0",
|
||||
"uuid": "3.3.3"
|
||||
"object-hash": "1.3.1",
|
||||
"optional": "0.1.4",
|
||||
"uuid": "3.3.2"
|
||||
}
|
||||
},
|
||||
"@nestjs/microservices": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.8.3.tgz",
|
||||
"integrity": "sha512-/7v2TWt90FmqK1ZNS5nuKzTgP6ruxrLBGaJkDpPyKgguaMhtmBOuMlHg9P7LieycTKjJfYZvR6J8gL41dfypnA==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.5.3.tgz",
|
||||
"integrity": "sha512-T9zZf61myahenI4c0qhcYnhnx49L+zL9+8W6fc+LPTarbt1HJDu6iyj6fh2BzewakwNLJRyGMJ9YCYlXhFuvlA==",
|
||||
"requires": {
|
||||
"iterare": "1.2.0",
|
||||
"json-socket": "0.3.0"
|
||||
"json-socket": "0.3.0",
|
||||
"optional": "0.1.4"
|
||||
}
|
||||
},
|
||||
"@nestjs/testing": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.8.3.tgz",
|
||||
"integrity": "sha512-nhiXfvnfJ0ARzpOJ+7btnHBxTh82oQX6+/G7EnQEBB/A1jFfE+sbB7Pdt6s999prNOQmdw/XdnORV67u9BwNkw==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.5.3.tgz",
|
||||
"integrity": "sha512-W8tPhkNVhmX+jaDu4R7WUOtIl0PK3ZDso434rEm/b1+S6ZRgAKwNVHWM/rwIuTi5+erPTEULtTsZgrXFrzC1sA==",
|
||||
"requires": {
|
||||
"optional": "0.1.4"
|
||||
}
|
||||
},
|
||||
"@nestjs/websockets": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.8.3.tgz",
|
||||
"integrity": "sha512-pCKK9NDFlZJSWYeh8TAL3Ioh+fzHzMlHd6C8gcq8OmrLmuATuhqCzEcEKW9hwtl6isnZUcliXvaQdBfBBYOBcw==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.5.3.tgz",
|
||||
"integrity": "sha512-YrCvmLHTW0OBusTiUOPrG0PNrw/3Gatty/bh3ro5cEoiovcaJxGSMsTC+JSVXqPwRJjEtoHMCr5Qje2rAepIzQ==",
|
||||
"requires": {
|
||||
"iterare": "1.2.0"
|
||||
}
|
||||
@@ -68,9 +70,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/validator": {
|
||||
"version": "10.11.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.3.tgz",
|
||||
"integrity": "sha512-GKF2VnEkMmEeEGvoo03ocrP9ySMuX1ypKazIYMlsjfslfBMhOAtC5dmEWKdJioW4lJN7MZRS88kalTsVClyQ9w=="
|
||||
"version": "10.11.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.2.tgz",
|
||||
"integrity": "sha512-k/ju1RsdP5ACFUWebqsyEy0avP5uNJCs2p3pmTHzOZdd4gMSAJTq7iUEHFY3tt3emBrPTm6oGvfZ4SzcqOgLPQ=="
|
||||
},
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
@@ -86,9 +88,9 @@
|
||||
}
|
||||
},
|
||||
"arg": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.1.tgz",
|
||||
"integrity": "sha512-SlmP3fEA88MBv0PypnXZ8ZfJhwmDeIE3SP71j37AiXQBXYosPV0x6uISAaHYSlSVhmHOVkomen0tbGk6Anlebw==",
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz",
|
||||
"integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==",
|
||||
"dev": true
|
||||
},
|
||||
"asynckit": {
|
||||
@@ -128,26 +130,26 @@
|
||||
"integrity": "sha512-qsP+0xoavpOlJHuYsQJsN58HXSl8Jvveo+T37rEvCEeRfMWoytAyR0Ua/YsFgpM6AZYZ/og2PJwArwzJl1aXtQ=="
|
||||
},
|
||||
"class-validator": {
|
||||
"version": "0.10.2",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.2.tgz",
|
||||
"integrity": "sha512-57bGDjoFXizqGZBHe/uHn5/K0MSjBkToaHpDhAXR6DIwjaoET37a0Uug4F5RZR7WF31/7SqzKFIvd+ZspszGUA==",
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.0.tgz",
|
||||
"integrity": "sha512-RvjxRlvoCvM/ojUq11j78ISpReGdBoMErdmDk1e27aQZK6ppSXq751UE6jB9JI7ayEnL6Nnmllzn/HXVSu3dmg==",
|
||||
"requires": {
|
||||
"@types/validator": "10.11.3",
|
||||
"@types/validator": "10.11.2",
|
||||
"google-libphonenumber": "^3.1.6",
|
||||
"validator": "11.1.0"
|
||||
}
|
||||
},
|
||||
"cli-color": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.0.tgz",
|
||||
"integrity": "sha512-a0VZ8LeraW0jTuCkuAGMNufareGHhyZU9z8OGsW0gXd1hZGi1SRuNRXdbGkraBBKnhyUhyebFWnRbp+dIn0f0A==",
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-color/-/cli-color-1.4.0.tgz",
|
||||
"integrity": "sha512-xu6RvQqqrWEo6MPR1eixqGPywhYBHRs653F9jfXB2Hx4jdM/3WxiNE1vppRmxtMIfl16SFYTpYlrnqH/HsK/2w==",
|
||||
"requires": {
|
||||
"ansi-regex": "^2.1.1",
|
||||
"d": "^1.0.1",
|
||||
"es5-ext": "^0.10.51",
|
||||
"d": "1",
|
||||
"es5-ext": "^0.10.46",
|
||||
"es6-iterator": "^2.0.3",
|
||||
"memoizee": "^0.4.14",
|
||||
"timers-ext": "^0.1.7"
|
||||
"timers-ext": "^0.1.5"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
@@ -179,9 +181,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"consola": {
|
||||
"version": "2.10.1",
|
||||
"resolved": "https://registry.npmjs.org/consola/-/consola-2.10.1.tgz",
|
||||
"integrity": "sha512-4sxpH6SGFYLADfUip4vuY65f/gEogrzJoniVhNUYkJHtng0l8ZjnDCqxxrSVRHOHwKxsy8Vm5ONZh1wOR3/l/w=="
|
||||
"version": "2.9.0",
|
||||
"resolved": "https://registry.npmjs.org/consola/-/consola-2.9.0.tgz",
|
||||
"integrity": "sha512-34Iue+LRcWbndFIfZc5boNizWlsrRjqIBJZTe591vImgbnq7nx2EzlrLtANj9TH2Fxm7puFJBJAOk5BhvZOddQ=="
|
||||
},
|
||||
"cookiejar": {
|
||||
"version": "2.1.2",
|
||||
@@ -226,9 +228,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"es5-ext": {
|
||||
"version": "0.10.51",
|
||||
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.51.tgz",
|
||||
"integrity": "sha512-oRpWzM2WcLHVKpnrcyB7OW8j/s67Ba04JCm0WnNv3RiABSvs7mrQlutB8DBv793gKcp0XENR8Il8WxGTlZ73gQ==",
|
||||
"version": "0.10.50",
|
||||
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.50.tgz",
|
||||
"integrity": "sha512-KMzZTPBkeQV/JcSQhI5/z6d9VWJ3EnQ194USTUwIYZ2ZbpN8+SGXQKt1h68EX44+qt+Fzr8DO17vnxrw7c3agw==",
|
||||
"requires": {
|
||||
"es6-iterator": "~2.0.3",
|
||||
"es6-symbol": "~3.1.1",
|
||||
@@ -246,12 +248,12 @@
|
||||
}
|
||||
},
|
||||
"es6-symbol": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.2.tgz",
|
||||
"integrity": "sha512-/ZypxQsArlv+KHpGvng52/Iz8by3EQPxhmbuz8yFG89N/caTFBSbcXONDw0aMjy827gQg26XAjP4uXFvnfINmQ==",
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
|
||||
"integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=",
|
||||
"requires": {
|
||||
"d": "^1.0.1",
|
||||
"es5-ext": "^0.10.51"
|
||||
"d": "1",
|
||||
"es5-ext": "~0.10.14"
|
||||
}
|
||||
},
|
||||
"es6-weak-map": {
|
||||
@@ -286,9 +288,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"fast-safe-stringify": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz",
|
||||
"integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA=="
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz",
|
||||
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
|
||||
},
|
||||
"follow-redirects": {
|
||||
"version": "1.5.10",
|
||||
@@ -331,9 +333,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"google-libphonenumber": {
|
||||
"version": "3.2.5",
|
||||
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.5.tgz",
|
||||
"integrity": "sha512-Y0r7MFCI11UDLn0KaMPBEInhROyIOkWkQIyvWMFVF2I+h+sHE3vbl5a7FVe39td6u/w+nlKDdUMP9dMOZyv+2Q=="
|
||||
"version": "3.2.3",
|
||||
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.3.tgz",
|
||||
"integrity": "sha512-8n4JyRptifaIRlHANKRlfqLR8fANm7+Q+1qvDuUsUeStSLtLGTVsZWe1llWDfgWTm1y07cEUyiRuNIv6cs2ovg=="
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
@@ -347,9 +349,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"is-buffer": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
|
||||
"integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A=="
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
|
||||
"integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw=="
|
||||
},
|
||||
"is-promise": {
|
||||
"version": "2.1.0",
|
||||
@@ -439,9 +441,9 @@
|
||||
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
|
||||
},
|
||||
"object-hash": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.0.0.tgz",
|
||||
"integrity": "sha512-I7zGBH0rDKwVGeGZpZoFaDhIwvJa3l1CZE+8VchylXbInNiCj7sxxea9P5dTM4ftKR5//nrqxrdeGSTWL2VpBA=="
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz",
|
||||
"integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA=="
|
||||
},
|
||||
"optional": {
|
||||
"version": "0.1.4",
|
||||
@@ -466,9 +468,9 @@
|
||||
"integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg=="
|
||||
},
|
||||
"rxjs": {
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz",
|
||||
"integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==",
|
||||
"version": "6.5.2",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz",
|
||||
"integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==",
|
||||
"requires": {
|
||||
"tslib": "^1.9.0"
|
||||
}
|
||||
@@ -486,9 +488,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"source-map-support": {
|
||||
"version": "0.5.13",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz",
|
||||
"integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==",
|
||||
"version": "0.5.12",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz",
|
||||
"integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffer-from": "^1.0.0",
|
||||
@@ -573,9 +575,9 @@
|
||||
}
|
||||
},
|
||||
"ts-node": {
|
||||
"version": "8.4.1",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.4.1.tgz",
|
||||
"integrity": "sha512-5LpRN+mTiCs7lI5EtbXmF/HfMeCjzt7DH9CZwtkr6SywStrNQC723wG+aOWFiLNn7zT3kD/RnFqi3ZUfr4l5Qw==",
|
||||
"version": "8.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz",
|
||||
"integrity": "sha512-dyNS/RqyVTDcmNM4NIBAeDMpsAdaQ+ojdf0GOLqE6nwJOgzEkdRNzJywhDfwnuvB10oa6NLVG1rUJQCpRN7qoQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arg": "^4.1.0",
|
||||
@@ -586,19 +588,19 @@
|
||||
}
|
||||
},
|
||||
"tslib": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz",
|
||||
"integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ=="
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
|
||||
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
|
||||
},
|
||||
"type": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
|
||||
"integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg=="
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/type/-/type-1.0.1.tgz",
|
||||
"integrity": "sha512-MAM5dBMJCJNKs9E7JXo4CXRAansRfG0nlJxW7Wf6GZzSOvH31zClSaHdIMWLehe/EGMBkqeC55rrkaOr5Oo7Nw=="
|
||||
},
|
||||
"typescript": {
|
||||
"version": "3.6.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.4.tgz",
|
||||
"integrity": "sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg=="
|
||||
"version": "3.5.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz",
|
||||
"integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g=="
|
||||
},
|
||||
"util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
@@ -607,9 +609,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"uuid": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz",
|
||||
"integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ=="
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
|
||||
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
|
||||
},
|
||||
"validator": {
|
||||
"version": "11.1.0",
|
||||
@@ -617,9 +619,9 @@
|
||||
"integrity": "sha512-qiQ5ktdO7CD6C/5/mYV4jku/7qnqzjrxb3C/Q5wR3vGGinHTgJZN/TdFT3ZX4vXhX2R1PXx42fB1cn5W+uJ4lg=="
|
||||
},
|
||||
"yn": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
|
||||
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.0.tgz",
|
||||
"integrity": "sha512-kKfnnYkbTfrAdd0xICNFw7Atm8nKpLcLv9AZGEt+kczL/WQVai4e2V6ZN8U/O+iI6WrNuJjNNOyu4zfhl9D3Hg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,20 +7,20 @@
|
||||
"start": "ts-node src/main"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "6.8.3",
|
||||
"@nestjs/core": "6.8.3",
|
||||
"@nestjs/microservices": "6.8.3",
|
||||
"@nestjs/testing": "6.8.3",
|
||||
"@nestjs/websockets": "6.8.3",
|
||||
"@nestjs/common": "6.5.3",
|
||||
"@nestjs/core": "6.5.3",
|
||||
"@nestjs/microservices": "6.5.3",
|
||||
"@nestjs/testing": "6.5.3",
|
||||
"@nestjs/websockets": "6.5.3",
|
||||
"class-transformer": "0.2.3",
|
||||
"class-validator": "0.10.2",
|
||||
"class-validator": "0.10.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.5.3",
|
||||
"typescript": "3.6.4"
|
||||
"rxjs": "6.5.2",
|
||||
"typescript": "3.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.10.7",
|
||||
"supertest": "4.0.2",
|
||||
"ts-node": "8.4.1"
|
||||
"ts-node": "8.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,4 +7,4 @@ export class CircularService {
|
||||
@Inject(forwardRef(() => InputService))
|
||||
public readonly service: InputService,
|
||||
) {}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,9 @@ export class CircularModule {
|
||||
static forRoot(): DynamicModule {
|
||||
const a = {
|
||||
module: CircularModule,
|
||||
providers: [InputService],
|
||||
providers: [
|
||||
InputService,
|
||||
],
|
||||
b: null,
|
||||
};
|
||||
a.b = a;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
|
||||
@Injectable()
|
||||
export class InputService {}
|
||||
export class InputService {
|
||||
}
|
||||
|
||||
@@ -7,4 +7,4 @@ export class CircularService {
|
||||
@Inject(forwardRef(() => InputService))
|
||||
public readonly service: InputService,
|
||||
) {}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
import { Controller, Scope } from '@nestjs/common';
|
||||
|
||||
@Controller({
|
||||
path: 'test',
|
||||
scope: Scope.REQUEST,
|
||||
})
|
||||
export class ScopedController {}
|
||||
@@ -1,10 +0,0 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { ScopedController } from './scoped.controller';
|
||||
import { ScopedService } from './scoped.service';
|
||||
import { TransientService } from './transient.service';
|
||||
|
||||
@Module({
|
||||
controllers: [ScopedController],
|
||||
providers: [ScopedService, TransientService],
|
||||
})
|
||||
export class ScopedModule {}
|
||||
@@ -1,4 +0,0 @@
|
||||
import { Injectable, Scope } from '@nestjs/common';
|
||||
|
||||
@Injectable({ scope: Scope.REQUEST })
|
||||
export class ScopedService {}
|
||||
@@ -1,4 +0,0 @@
|
||||
import { Injectable, Scope } from '@nestjs/common';
|
||||
|
||||
@Injectable({ scope: Scope.TRANSIENT })
|
||||
export class TransientService {}
|
||||
@@ -18,15 +18,9 @@ describe('MQTT transport', () => {
|
||||
|
||||
app.connectMicroservice({
|
||||
transport: Transport.MQTT,
|
||||
options: {
|
||||
host: '0.0.0.0',
|
||||
},
|
||||
});
|
||||
app.connectMicroservice({
|
||||
transport: Transport.MQTT,
|
||||
options: {
|
||||
host: '0.0.0.0',
|
||||
},
|
||||
});
|
||||
await app.startAllMicroservicesAsync();
|
||||
await app.init();
|
||||
|
||||
@@ -18,15 +18,9 @@ describe('NATS transport', () => {
|
||||
|
||||
app.connectMicroservice({
|
||||
transport: Transport.NATS,
|
||||
options: {
|
||||
url: 'nats://0.0.0.0:4222',
|
||||
},
|
||||
});
|
||||
app.connectMicroservice({
|
||||
transport: Transport.NATS,
|
||||
options: {
|
||||
url: 'nats://0.0.0.0:4222',
|
||||
},
|
||||
});
|
||||
await app.startAllMicroservicesAsync();
|
||||
await app.init();
|
||||
|
||||
@@ -18,15 +18,9 @@ describe('REDIS transport', () => {
|
||||
|
||||
app.connectMicroservice({
|
||||
transport: Transport.REDIS,
|
||||
options: {
|
||||
url: 'redis://0.0.0.0:6379',
|
||||
},
|
||||
});
|
||||
app.connectMicroservice({
|
||||
transport: Transport.REDIS,
|
||||
options: {
|
||||
url: 'redis://0.0.0.0:6379',
|
||||
},
|
||||
});
|
||||
await app.startAllMicroservicesAsync();
|
||||
await app.init();
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
import { INestApplication } from '@nestjs/common';
|
||||
import { Transport } from '@nestjs/microservices';
|
||||
import { Test } from '@nestjs/testing';
|
||||
import { expect } from 'chai';
|
||||
import * as request from 'supertest';
|
||||
import { BusinessDto } from '../src/kafka/dtos/business.dto';
|
||||
import { UserDto } from '../src/kafka/dtos/user.dto';
|
||||
import { UserEntity } from '../src/kafka/entities/user.entity';
|
||||
import { KafkaController } from '../src/kafka/kafka.controller';
|
||||
import { KafkaMessagesController } from '../src/kafka/kafka.messages.controller';
|
||||
|
||||
describe('Kafka transport', () => {
|
||||
let server;
|
||||
let app: INestApplication;
|
||||
|
||||
it(`Start Kafka app`, async () => {
|
||||
const module = await Test.createTestingModule({
|
||||
controllers: [KafkaController, KafkaMessagesController],
|
||||
}).compile();
|
||||
|
||||
app = module.createNestApplication();
|
||||
server = app.getHttpAdapter().getInstance();
|
||||
|
||||
app.connectMicroservice({
|
||||
transport: Transport.KAFKA,
|
||||
options: {
|
||||
client: {
|
||||
brokers: ['localhost:9092'],
|
||||
},
|
||||
},
|
||||
});
|
||||
await app.startAllMicroservicesAsync();
|
||||
await app.init();
|
||||
}).timeout(30000);
|
||||
|
||||
it(`/POST (sync sum kafka message)`, () => {
|
||||
return request(server)
|
||||
.post('/mathSumSyncKafkaMessage')
|
||||
.send([1, 2, 3, 4, 5])
|
||||
.expect(200)
|
||||
.expect(200, '15');
|
||||
});
|
||||
|
||||
it(`/POST (sync sum kafka(ish) message without key and only the value)`, () => {
|
||||
return request(server)
|
||||
.post('/mathSumSyncWithoutKey')
|
||||
.send([1, 2, 3, 4, 5])
|
||||
.expect(200)
|
||||
.expect(200, '15');
|
||||
});
|
||||
|
||||
it(`/POST (sync sum plain object)`, () => {
|
||||
return request(server)
|
||||
.post('/mathSumSyncPlainObject')
|
||||
.send([1, 2, 3, 4, 5])
|
||||
.expect(200)
|
||||
.expect(200, '15');
|
||||
});
|
||||
|
||||
it(`/POST (sync sum array)`, () => {
|
||||
return request(server)
|
||||
.post('/mathSumSyncArray')
|
||||
.send([1, 2, 3, 4, 5])
|
||||
.expect(200)
|
||||
.expect(200, '15');
|
||||
});
|
||||
|
||||
it(`/POST (sync sum string)`, () => {
|
||||
return request(server)
|
||||
.post('/mathSumSyncString')
|
||||
.send([1, 2, 3, 4, 5])
|
||||
.expect(200)
|
||||
.expect(200, '15');
|
||||
});
|
||||
|
||||
it(`/POST (sync sum number)`, () => {
|
||||
return request(server)
|
||||
.post('/mathSumSyncNumber')
|
||||
.send([12345])
|
||||
.expect(200)
|
||||
.expect(200, '15');
|
||||
});
|
||||
|
||||
it(`/POST (async event notification)`, done => {
|
||||
request(server)
|
||||
.post('/notify')
|
||||
.send()
|
||||
.end(() => {
|
||||
setTimeout(() => {
|
||||
expect(KafkaController.IS_NOTIFIED).to.be.true;
|
||||
done();
|
||||
}, 1000);
|
||||
});
|
||||
});
|
||||
|
||||
const userDto: UserDto = {
|
||||
email: 'enriquebenavidesm@gmail.com',
|
||||
name: 'Ben',
|
||||
phone: '1112223331',
|
||||
years: 33,
|
||||
};
|
||||
const newUser: UserEntity = new UserEntity(userDto);
|
||||
const businessDto: BusinessDto = {
|
||||
name: 'Example',
|
||||
phone: '2233441122',
|
||||
user: newUser,
|
||||
};
|
||||
it(`/POST (sync command create user)`, () => {
|
||||
return request(server)
|
||||
.post('/user')
|
||||
.send(userDto)
|
||||
.expect(200);
|
||||
});
|
||||
|
||||
it(`/POST (sync command create business`, () => {
|
||||
return request(server)
|
||||
.post('/business')
|
||||
.send(businessDto)
|
||||
.expect(200);
|
||||
});
|
||||
|
||||
it(`/POST (sync command create user) Concurrency Test`, async () => {
|
||||
const promises = [];
|
||||
for (let concurrencyKey = 0; concurrencyKey < 100; concurrencyKey++) {
|
||||
const innerUserDto = JSON.parse(JSON.stringify(userDto));
|
||||
innerUserDto.name += `+${concurrencyKey}`;
|
||||
promises.push(
|
||||
request(server)
|
||||
.post('/user')
|
||||
.send(userDto)
|
||||
.expect(200),
|
||||
);
|
||||
}
|
||||
await Promise.all(promises);
|
||||
});
|
||||
|
||||
after(`Stopping Kafka app`, async () => {
|
||||
await app.close();
|
||||
});
|
||||
}).timeout(30000);
|
||||
@@ -19,9 +19,6 @@ describe('MQTT transport', () => {
|
||||
|
||||
app.connectMicroservice({
|
||||
transport: Transport.MQTT,
|
||||
options: {
|
||||
url: 'mqtt://0.0.0.0:1883',
|
||||
},
|
||||
});
|
||||
await app.startAllMicroservicesAsync();
|
||||
await app.init();
|
||||
@@ -50,6 +47,7 @@ describe('MQTT transport', () => {
|
||||
});
|
||||
|
||||
it(`/POST (concurrent)`, function() {
|
||||
this.retries(10);
|
||||
return request(server)
|
||||
.post('/concurrent')
|
||||
.send([
|
||||
|
||||
@@ -20,7 +20,7 @@ describe('NATS transport', () => {
|
||||
app.connectMicroservice({
|
||||
transport: Transport.NATS,
|
||||
options: {
|
||||
url: 'nats://0.0.0.0:4222',
|
||||
url: 'nats://localhost:4222',
|
||||
},
|
||||
});
|
||||
await app.startAllMicroservicesAsync();
|
||||
|
||||
@@ -19,9 +19,6 @@ describe('REDIS transport', () => {
|
||||
|
||||
app.connectMicroservice({
|
||||
transport: Transport.REDIS,
|
||||
options: {
|
||||
url: 'redis://0.0.0.0:6379',
|
||||
},
|
||||
});
|
||||
await app.startAllMicroservicesAsync();
|
||||
await app.init();
|
||||
|
||||
@@ -20,7 +20,7 @@ describe('RabbitMQ transport', () => {
|
||||
app.connectMicroservice({
|
||||
transport: Transport.RMQ,
|
||||
options: {
|
||||
urls: [`amqp://0.0.0.0:5672`],
|
||||
urls: [`amqp://localhost:5672`],
|
||||
queue: 'test',
|
||||
queueOptions: { durable: false },
|
||||
socketOptions: { noDelay: true },
|
||||
|
||||
@@ -20,9 +20,6 @@ describe('RPC transport', () => {
|
||||
|
||||
app.connectMicroservice({
|
||||
transport: Transport.TCP,
|
||||
options: {
|
||||
host: '0.0.0.0',
|
||||
},
|
||||
});
|
||||
await app.startAllMicroservicesAsync();
|
||||
await app.init();
|
||||
|
||||
176
integration/microservices/package-lock.json
generated
176
integration/microservices/package-lock.json
generated
@@ -5,40 +5,42 @@
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@nestjs/common": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.8.3.tgz",
|
||||
"integrity": "sha512-MQY05kocVTJx5UdLeE5gpBjiymXnKYo1rme3ejCaeMFFkiXmPcgkGquYNegCFy+SHXwsq9AW/gcoD0hkVn0Z6g==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
|
||||
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
|
||||
"requires": {
|
||||
"axios": "0.19.0",
|
||||
"cli-color": "2.0.0",
|
||||
"uuid": "3.3.3"
|
||||
"cli-color": "1.4.0",
|
||||
"uuid": "3.3.2"
|
||||
}
|
||||
},
|
||||
"@nestjs/core": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.8.3.tgz",
|
||||
"integrity": "sha512-hgpmqwbJaOFEuFYTAQe/Csu+kcxBfqlsctv6np9tg/TqDvNFMrowt3Snvtpjpz55fdvUfUh8JY7YBwoaUTo6ZA==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
|
||||
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
|
||||
"requires": {
|
||||
"@nuxtjs/opencollective": "0.2.2",
|
||||
"fast-safe-stringify": "2.0.7",
|
||||
"fast-safe-stringify": "2.0.6",
|
||||
"iterare": "1.2.0",
|
||||
"object-hash": "2.0.0",
|
||||
"uuid": "3.3.3"
|
||||
"object-hash": "1.3.1",
|
||||
"optional": "0.1.4",
|
||||
"uuid": "3.3.2"
|
||||
}
|
||||
},
|
||||
"@nestjs/microservices": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.8.3.tgz",
|
||||
"integrity": "sha512-/7v2TWt90FmqK1ZNS5nuKzTgP6ruxrLBGaJkDpPyKgguaMhtmBOuMlHg9P7LieycTKjJfYZvR6J8gL41dfypnA==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.5.3.tgz",
|
||||
"integrity": "sha512-T9zZf61myahenI4c0qhcYnhnx49L+zL9+8W6fc+LPTarbt1HJDu6iyj6fh2BzewakwNLJRyGMJ9YCYlXhFuvlA==",
|
||||
"requires": {
|
||||
"iterare": "1.2.0",
|
||||
"json-socket": "0.3.0"
|
||||
"json-socket": "0.3.0",
|
||||
"optional": "0.1.4"
|
||||
}
|
||||
},
|
||||
"@nestjs/platform-express": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-6.8.3.tgz",
|
||||
"integrity": "sha512-Zt0JBl6AK1Cl6n88p03J8K8DVVSEQxHvDvq+oQLs9HkeGPmJ5u1xKjsHxdouXjl3RCyizzWdwzGeLZElO3lDlQ==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/platform-express/-/platform-express-6.5.3.tgz",
|
||||
"integrity": "sha512-c5n4XUbDDmF6MfBGYWM1jtsIDpVsOfOQtf3S0w3IeJNqm7dnmVAvO2Jk+RsYpt50tN4NAXntM3YTuTDqMb9uiA==",
|
||||
"requires": {
|
||||
"body-parser": "1.19.0",
|
||||
"cors": "2.8.5",
|
||||
@@ -47,17 +49,17 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/testing": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.8.3.tgz",
|
||||
"integrity": "sha512-nhiXfvnfJ0ARzpOJ+7btnHBxTh82oQX6+/G7EnQEBB/A1jFfE+sbB7Pdt6s999prNOQmdw/XdnORV67u9BwNkw==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.5.3.tgz",
|
||||
"integrity": "sha512-W8tPhkNVhmX+jaDu4R7WUOtIl0PK3ZDso434rEm/b1+S6ZRgAKwNVHWM/rwIuTi5+erPTEULtTsZgrXFrzC1sA==",
|
||||
"requires": {
|
||||
"optional": "0.1.4"
|
||||
}
|
||||
},
|
||||
"@nestjs/websockets": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.8.3.tgz",
|
||||
"integrity": "sha512-pCKK9NDFlZJSWYeh8TAL3Ioh+fzHzMlHd6C8gcq8OmrLmuATuhqCzEcEKW9hwtl6isnZUcliXvaQdBfBBYOBcw==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.5.3.tgz",
|
||||
"integrity": "sha512-YrCvmLHTW0OBusTiUOPrG0PNrw/3Gatty/bh3ro5cEoiovcaJxGSMsTC+JSVXqPwRJjEtoHMCr5Qje2rAepIzQ==",
|
||||
"requires": {
|
||||
"iterare": "1.2.0"
|
||||
}
|
||||
@@ -79,9 +81,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/validator": {
|
||||
"version": "10.11.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.3.tgz",
|
||||
"integrity": "sha512-GKF2VnEkMmEeEGvoo03ocrP9ySMuX1ypKazIYMlsjfslfBMhOAtC5dmEWKdJioW4lJN7MZRS88kalTsVClyQ9w=="
|
||||
"version": "10.11.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.2.tgz",
|
||||
"integrity": "sha512-k/ju1RsdP5ACFUWebqsyEy0avP5uNJCs2p3pmTHzOZdd4gMSAJTq7iUEHFY3tt3emBrPTm6oGvfZ4SzcqOgLPQ=="
|
||||
},
|
||||
"accepts": {
|
||||
"version": "1.3.7",
|
||||
@@ -134,9 +136,9 @@
|
||||
"integrity": "sha1-HjRA6RXwsSA9I3SOeO3XubW0PlY="
|
||||
},
|
||||
"arg": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.1.tgz",
|
||||
"integrity": "sha512-SlmP3fEA88MBv0PypnXZ8ZfJhwmDeIE3SP71j37AiXQBXYosPV0x6uISAaHYSlSVhmHOVkomen0tbGk6Anlebw==",
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz",
|
||||
"integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==",
|
||||
"dev": true
|
||||
},
|
||||
"array-flatten": {
|
||||
@@ -231,26 +233,26 @@
|
||||
"integrity": "sha512-qsP+0xoavpOlJHuYsQJsN58HXSl8Jvveo+T37rEvCEeRfMWoytAyR0Ua/YsFgpM6AZYZ/og2PJwArwzJl1aXtQ=="
|
||||
},
|
||||
"class-validator": {
|
||||
"version": "0.10.2",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.2.tgz",
|
||||
"integrity": "sha512-57bGDjoFXizqGZBHe/uHn5/K0MSjBkToaHpDhAXR6DIwjaoET37a0Uug4F5RZR7WF31/7SqzKFIvd+ZspszGUA==",
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.0.tgz",
|
||||
"integrity": "sha512-RvjxRlvoCvM/ojUq11j78ISpReGdBoMErdmDk1e27aQZK6ppSXq751UE6jB9JI7ayEnL6Nnmllzn/HXVSu3dmg==",
|
||||
"requires": {
|
||||
"@types/validator": "10.11.3",
|
||||
"@types/validator": "10.11.2",
|
||||
"google-libphonenumber": "^3.1.6",
|
||||
"validator": "11.1.0"
|
||||
}
|
||||
},
|
||||
"cli-color": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.0.tgz",
|
||||
"integrity": "sha512-a0VZ8LeraW0jTuCkuAGMNufareGHhyZU9z8OGsW0gXd1hZGi1SRuNRXdbGkraBBKnhyUhyebFWnRbp+dIn0f0A==",
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-color/-/cli-color-1.4.0.tgz",
|
||||
"integrity": "sha512-xu6RvQqqrWEo6MPR1eixqGPywhYBHRs653F9jfXB2Hx4jdM/3WxiNE1vppRmxtMIfl16SFYTpYlrnqH/HsK/2w==",
|
||||
"requires": {
|
||||
"ansi-regex": "^2.1.1",
|
||||
"d": "^1.0.1",
|
||||
"es5-ext": "^0.10.51",
|
||||
"d": "1",
|
||||
"es5-ext": "^0.10.46",
|
||||
"es6-iterator": "^2.0.3",
|
||||
"memoizee": "^0.4.14",
|
||||
"timers-ext": "^0.1.7"
|
||||
"timers-ext": "^0.1.5"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
@@ -322,9 +324,9 @@
|
||||
}
|
||||
},
|
||||
"consola": {
|
||||
"version": "2.10.1",
|
||||
"resolved": "https://registry.npmjs.org/consola/-/consola-2.10.1.tgz",
|
||||
"integrity": "sha512-4sxpH6SGFYLADfUip4vuY65f/gEogrzJoniVhNUYkJHtng0l8ZjnDCqxxrSVRHOHwKxsy8Vm5ONZh1wOR3/l/w=="
|
||||
"version": "2.9.0",
|
||||
"resolved": "https://registry.npmjs.org/consola/-/consola-2.9.0.tgz",
|
||||
"integrity": "sha512-34Iue+LRcWbndFIfZc5boNizWlsrRjqIBJZTe591vImgbnq7nx2EzlrLtANj9TH2Fxm7puFJBJAOk5BhvZOddQ=="
|
||||
},
|
||||
"content-disposition": {
|
||||
"version": "0.5.3",
|
||||
@@ -429,9 +431,9 @@
|
||||
"integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
|
||||
},
|
||||
"es5-ext": {
|
||||
"version": "0.10.51",
|
||||
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.51.tgz",
|
||||
"integrity": "sha512-oRpWzM2WcLHVKpnrcyB7OW8j/s67Ba04JCm0WnNv3RiABSvs7mrQlutB8DBv793gKcp0XENR8Il8WxGTlZ73gQ==",
|
||||
"version": "0.10.50",
|
||||
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.50.tgz",
|
||||
"integrity": "sha512-KMzZTPBkeQV/JcSQhI5/z6d9VWJ3EnQ194USTUwIYZ2ZbpN8+SGXQKt1h68EX44+qt+Fzr8DO17vnxrw7c3agw==",
|
||||
"requires": {
|
||||
"es6-iterator": "~2.0.3",
|
||||
"es6-symbol": "~3.1.1",
|
||||
@@ -449,12 +451,12 @@
|
||||
}
|
||||
},
|
||||
"es6-symbol": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.2.tgz",
|
||||
"integrity": "sha512-/ZypxQsArlv+KHpGvng52/Iz8by3EQPxhmbuz8yFG89N/caTFBSbcXONDw0aMjy827gQg26XAjP4uXFvnfINmQ==",
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
|
||||
"integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=",
|
||||
"requires": {
|
||||
"d": "^1.0.1",
|
||||
"es5-ext": "^0.10.51"
|
||||
"d": "1",
|
||||
"es5-ext": "~0.10.14"
|
||||
}
|
||||
},
|
||||
"es6-weak-map": {
|
||||
@@ -556,9 +558,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"fast-safe-stringify": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz",
|
||||
"integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA=="
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz",
|
||||
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
|
||||
},
|
||||
"finalhandler": {
|
||||
"version": "1.1.2",
|
||||
@@ -640,9 +642,9 @@
|
||||
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
|
||||
},
|
||||
"google-libphonenumber": {
|
||||
"version": "3.2.5",
|
||||
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.5.tgz",
|
||||
"integrity": "sha512-Y0r7MFCI11UDLn0KaMPBEInhROyIOkWkQIyvWMFVF2I+h+sHE3vbl5a7FVe39td6u/w+nlKDdUMP9dMOZyv+2Q=="
|
||||
"version": "3.2.3",
|
||||
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.3.tgz",
|
||||
"integrity": "sha512-8n4JyRptifaIRlHANKRlfqLR8fANm7+Q+1qvDuUsUeStSLtLGTVsZWe1llWDfgWTm1y07cEUyiRuNIv6cs2ovg=="
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
@@ -680,9 +682,9 @@
|
||||
"integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA=="
|
||||
},
|
||||
"is-buffer": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
|
||||
"integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A=="
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
|
||||
"integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw=="
|
||||
},
|
||||
"is-promise": {
|
||||
"version": "2.1.0",
|
||||
@@ -823,9 +825,9 @@
|
||||
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
|
||||
},
|
||||
"object-hash": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.0.0.tgz",
|
||||
"integrity": "sha512-I7zGBH0rDKwVGeGZpZoFaDhIwvJa3l1CZE+8VchylXbInNiCj7sxxea9P5dTM4ftKR5//nrqxrdeGSTWL2VpBA=="
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz",
|
||||
"integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA=="
|
||||
},
|
||||
"on-finished": {
|
||||
"version": "2.3.0",
|
||||
@@ -908,9 +910,9 @@
|
||||
"integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg=="
|
||||
},
|
||||
"rxjs": {
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz",
|
||||
"integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==",
|
||||
"version": "6.5.2",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz",
|
||||
"integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==",
|
||||
"requires": {
|
||||
"tslib": "^1.9.0"
|
||||
}
|
||||
@@ -990,9 +992,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"source-map-support": {
|
||||
"version": "0.5.13",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz",
|
||||
"integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==",
|
||||
"version": "0.5.12",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz",
|
||||
"integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffer-from": "^1.0.0",
|
||||
@@ -1097,9 +1099,9 @@
|
||||
"integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
|
||||
},
|
||||
"ts-node": {
|
||||
"version": "8.4.1",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.4.1.tgz",
|
||||
"integrity": "sha512-5LpRN+mTiCs7lI5EtbXmF/HfMeCjzt7DH9CZwtkr6SywStrNQC723wG+aOWFiLNn7zT3kD/RnFqi3ZUfr4l5Qw==",
|
||||
"version": "8.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz",
|
||||
"integrity": "sha512-dyNS/RqyVTDcmNM4NIBAeDMpsAdaQ+ojdf0GOLqE6nwJOgzEkdRNzJywhDfwnuvB10oa6NLVG1rUJQCpRN7qoQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arg": "^4.1.0",
|
||||
@@ -1110,14 +1112,14 @@
|
||||
}
|
||||
},
|
||||
"tslib": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz",
|
||||
"integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ=="
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
|
||||
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
|
||||
},
|
||||
"type": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
|
||||
"integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg=="
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/type/-/type-1.0.1.tgz",
|
||||
"integrity": "sha512-MAM5dBMJCJNKs9E7JXo4CXRAansRfG0nlJxW7Wf6GZzSOvH31zClSaHdIMWLehe/EGMBkqeC55rrkaOr5Oo7Nw=="
|
||||
},
|
||||
"type-is": {
|
||||
"version": "1.6.18",
|
||||
@@ -1149,9 +1151,9 @@
|
||||
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
|
||||
},
|
||||
"typescript": {
|
||||
"version": "3.6.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.4.tgz",
|
||||
"integrity": "sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg=="
|
||||
"version": "3.5.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz",
|
||||
"integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g=="
|
||||
},
|
||||
"unpipe": {
|
||||
"version": "1.0.0",
|
||||
@@ -1169,9 +1171,9 @@
|
||||
"integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
|
||||
},
|
||||
"uuid": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz",
|
||||
"integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ=="
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
|
||||
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
|
||||
},
|
||||
"validator": {
|
||||
"version": "11.1.0",
|
||||
@@ -1189,9 +1191,9 @@
|
||||
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ=="
|
||||
},
|
||||
"yn": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
|
||||
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.0.tgz",
|
||||
"integrity": "sha512-kKfnnYkbTfrAdd0xICNFw7Atm8nKpLcLv9AZGEt+kczL/WQVai4e2V6ZN8U/O+iI6WrNuJjNNOyu4zfhl9D3Hg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,22 +7,22 @@
|
||||
"start": "ts-node src/main"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "6.8.3",
|
||||
"@nestjs/core": "6.8.3",
|
||||
"@nestjs/microservices": "6.8.3",
|
||||
"@nestjs/platform-express": "6.8.3",
|
||||
"@nestjs/testing": "6.8.3",
|
||||
"@nestjs/websockets": "6.8.3",
|
||||
"@nestjs/common": "6.5.3",
|
||||
"@nestjs/core": "6.5.3",
|
||||
"@nestjs/microservices": "6.5.3",
|
||||
"@nestjs/platform-express": "6.5.3",
|
||||
"@nestjs/testing": "6.5.3",
|
||||
"@nestjs/websockets": "6.5.3",
|
||||
"amqp-connection-manager": "3.0.0",
|
||||
"class-transformer": "0.2.3",
|
||||
"class-validator": "0.10.2",
|
||||
"class-validator": "0.10.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.5.3",
|
||||
"typescript": "3.6.4"
|
||||
"rxjs": "6.5.2",
|
||||
"typescript": "3.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.10.7",
|
||||
"supertest": "4.0.2",
|
||||
"ts-node": "8.4.1"
|
||||
"ts-node": "8.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
import { UserEntity } from '../entities/user.entity';
|
||||
|
||||
export class BusinessDto {
|
||||
name: string;
|
||||
phone: string;
|
||||
user: UserEntity;
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
export class UserDto {
|
||||
name: string;
|
||||
email: string;
|
||||
phone: string;
|
||||
years: number;
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
import { UserEntity } from './user.entity';
|
||||
import { BusinessDto } from '../dtos/business.dto';
|
||||
|
||||
export class BusinessEntity {
|
||||
constructor(business: BusinessDto) {
|
||||
this.id = Math.random() * 99999999;
|
||||
this.name = business.name;
|
||||
this.phone = business.phone;
|
||||
this.createdBy = {
|
||||
id: business.user.id,
|
||||
};
|
||||
this.created = new Date();
|
||||
}
|
||||
id: number;
|
||||
name: string;
|
||||
phone: string;
|
||||
createdBy: Partial<UserEntity>;
|
||||
created: Date;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
import { UserDto } from '../dtos/user.dto';
|
||||
|
||||
export class UserEntity {
|
||||
constructor(user: UserDto) {
|
||||
this.id = Math.random() * 99999999;
|
||||
this.name = user.name;
|
||||
this.email = user.email;
|
||||
this.phone = user.phone;
|
||||
this.years = user.years;
|
||||
this.created = new Date();
|
||||
}
|
||||
id: number;
|
||||
name: string;
|
||||
email: string;
|
||||
phone: string;
|
||||
years: number;
|
||||
created: Date;
|
||||
}
|
||||
@@ -1,152 +0,0 @@
|
||||
import { Body, Controller, HttpCode, OnModuleInit, Post } from '@nestjs/common';
|
||||
import { Logger } from '@nestjs/common/services/logger.service';
|
||||
import { Client, ClientKafka, Transport } from '@nestjs/microservices';
|
||||
import { Observable } from 'rxjs';
|
||||
import { BusinessDto } from './dtos/business.dto';
|
||||
import { UserDto } from './dtos/user.dto';
|
||||
|
||||
@Controller()
|
||||
export class KafkaController implements OnModuleInit {
|
||||
protected readonly logger = new Logger(KafkaController.name);
|
||||
static IS_NOTIFIED = false;
|
||||
static MATH_SUM = 0;
|
||||
|
||||
@Client({
|
||||
transport: Transport.KAFKA,
|
||||
options: {
|
||||
client: {
|
||||
brokers: ['localhost:9092'],
|
||||
},
|
||||
},
|
||||
})
|
||||
private readonly client: ClientKafka;
|
||||
|
||||
onModuleInit() {
|
||||
const requestPatterns = [
|
||||
'math.sum.sync.kafka.message',
|
||||
'math.sum.sync.without.key',
|
||||
'math.sum.sync.plain.object',
|
||||
'math.sum.sync.array',
|
||||
'math.sum.sync.string',
|
||||
'math.sum.sync.number',
|
||||
'user.create',
|
||||
'business.create',
|
||||
];
|
||||
|
||||
requestPatterns.forEach(pattern => {
|
||||
this.client.subscribeToResponseOf(pattern);
|
||||
});
|
||||
}
|
||||
|
||||
// sync send kafka message
|
||||
@Post('mathSumSyncKafkaMessage')
|
||||
@HttpCode(200)
|
||||
async mathSumSyncKafkaMessage(
|
||||
@Body() data: number[],
|
||||
): Promise<Observable<any>> {
|
||||
const result = await this.client
|
||||
.send('math.sum.sync.kafka.message', {
|
||||
key: '1',
|
||||
value: {
|
||||
numbers: data,
|
||||
},
|
||||
})
|
||||
.toPromise();
|
||||
return result;
|
||||
}
|
||||
|
||||
// sync send kafka(ish) message without key and only the value
|
||||
@Post('mathSumSyncWithoutKey')
|
||||
@HttpCode(200)
|
||||
async mathSumSyncWithoutKey(
|
||||
@Body() data: number[],
|
||||
): Promise<Observable<any>> {
|
||||
const result = await this.client
|
||||
.send('math.sum.sync.without.key', {
|
||||
value: {
|
||||
numbers: data,
|
||||
},
|
||||
})
|
||||
.toPromise();
|
||||
return result;
|
||||
}
|
||||
|
||||
// sync send message without key or value
|
||||
@Post('mathSumSyncPlainObject')
|
||||
@HttpCode(200)
|
||||
async mathSumSyncPlainObject(
|
||||
@Body() data: number[],
|
||||
): Promise<Observable<any>> {
|
||||
const result = await this.client
|
||||
.send('math.sum.sync.plain.object', {
|
||||
numbers: data,
|
||||
})
|
||||
.toPromise();
|
||||
return result;
|
||||
}
|
||||
|
||||
// sync send message without key or value
|
||||
@Post('mathSumSyncArray')
|
||||
@HttpCode(200)
|
||||
async mathSumSyncArray(@Body() data: number[]): Promise<Observable<any>> {
|
||||
const result = await this.client
|
||||
.send('math.sum.sync.array', data)
|
||||
.toPromise();
|
||||
return result;
|
||||
}
|
||||
|
||||
@Post('mathSumSyncString')
|
||||
@HttpCode(200)
|
||||
async mathSumSyncString(@Body() data: number[]): Promise<Observable<any>> {
|
||||
// this.logger.error(util.format('mathSumSyncString() data: %o', data));
|
||||
const result = await this.client
|
||||
.send('math.sum.sync.string', data.toString())
|
||||
.toPromise();
|
||||
return result;
|
||||
}
|
||||
|
||||
@Post('mathSumSyncNumber')
|
||||
@HttpCode(200)
|
||||
async mathSumSyncNumber(@Body() data: number[]): Promise<Observable<any>> {
|
||||
const result = await this.client
|
||||
.send('math.sum.sync.number', data[0])
|
||||
.toPromise();
|
||||
return result;
|
||||
}
|
||||
|
||||
// async notify
|
||||
@Post('notify')
|
||||
async sendNotification(): Promise<any> {
|
||||
return this.client.emit('notify', { notify: true });
|
||||
}
|
||||
|
||||
// Complex data to send.
|
||||
@Post('/user')
|
||||
@HttpCode(200)
|
||||
async createUser(@Body() user: UserDto): Promise<Observable<any>> {
|
||||
const result = await this.client
|
||||
.send('user.create', {
|
||||
key: '1',
|
||||
value: {
|
||||
user,
|
||||
},
|
||||
})
|
||||
.toPromise();
|
||||
return result;
|
||||
}
|
||||
|
||||
// Complex data to send.
|
||||
@Post('/business')
|
||||
@HttpCode(200)
|
||||
async createBusiness(@Body() business: BusinessDto) {
|
||||
const result = await this.client
|
||||
.send('business.create', {
|
||||
key: '1',
|
||||
value: {
|
||||
business,
|
||||
},
|
||||
})
|
||||
.toPromise();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
import { Controller } from '@nestjs/common';
|
||||
import { Logger } from '@nestjs/common/services/logger.service';
|
||||
import { EventPattern, MessagePattern } from '@nestjs/microservices';
|
||||
import { BusinessDto } from './dtos/business.dto';
|
||||
import { UserDto } from './dtos/user.dto';
|
||||
import { BusinessEntity } from './entities/business.entity';
|
||||
import { UserEntity } from './entities/user.entity';
|
||||
import { KafkaController } from './kafka.controller';
|
||||
|
||||
@Controller()
|
||||
export class KafkaMessagesController {
|
||||
protected readonly logger = new Logger(KafkaMessagesController.name);
|
||||
static IS_NOTIFIED = false;
|
||||
|
||||
@MessagePattern('math.sum.sync.kafka.message')
|
||||
mathSumSyncKafkaMessage(data: any) {
|
||||
return (data.value.numbers || []).reduce((a, b) => a + b);
|
||||
}
|
||||
|
||||
@MessagePattern('math.sum.sync.without.key')
|
||||
mathSumSyncWithoutKey(data: any) {
|
||||
return (data.value.numbers || []).reduce((a, b) => a + b);
|
||||
}
|
||||
|
||||
@MessagePattern('math.sum.sync.plain.object')
|
||||
mathSumSyncPlainObject(data: any) {
|
||||
return (data.value.numbers || []).reduce((a, b) => a + b);
|
||||
}
|
||||
|
||||
@MessagePattern('math.sum.sync.array')
|
||||
mathSumSyncArray(data: any) {
|
||||
return (data.value || []).reduce((a, b) => a + b);
|
||||
}
|
||||
|
||||
@MessagePattern('math.sum.sync.string')
|
||||
mathSumSyncString(data: any) {
|
||||
// this.logger.error(util.format('mathSumSyncString() data: %o', data));
|
||||
return (data.value.split(',') || [])
|
||||
.map(i => {
|
||||
return parseFloat(i);
|
||||
})
|
||||
.reduce((a, b) => a + b);
|
||||
}
|
||||
|
||||
@MessagePattern('math.sum.sync.number')
|
||||
mathSumSyncNumber(data: any) {
|
||||
// this.logger.error(util.format('mathSumSyncNumber() data: %o', data));
|
||||
return (data.value.toString().split('') || [])
|
||||
.map(i => {
|
||||
return parseFloat(i);
|
||||
})
|
||||
.reduce((a, b) => a + b);
|
||||
}
|
||||
|
||||
@EventPattern('notify')
|
||||
eventHandler(data: any) {
|
||||
KafkaController.IS_NOTIFIED = data.value.notify;
|
||||
}
|
||||
|
||||
// Complex data to send.
|
||||
@MessagePattern('user.create')
|
||||
async createUser(params: { value: { user: UserDto } }) {
|
||||
return new UserEntity(params.value.user);
|
||||
}
|
||||
|
||||
@MessagePattern('business.create')
|
||||
async createBusiness(params: { value: { business: BusinessDto } }) {
|
||||
return new BusinessEntity(params.value.business);
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import {
|
||||
Client,
|
||||
ClientProxy,
|
||||
MessagePattern,
|
||||
ClientProxy,
|
||||
Transport,
|
||||
} from '@nestjs/microservices';
|
||||
import { Observable } from 'rxjs';
|
||||
@@ -15,10 +15,9 @@ export class MqttBroadcastController {
|
||||
|
||||
@Get('broadcast')
|
||||
multicats() {
|
||||
return this.client.send<number>({ cmd: 'broadcast' }, {}).pipe(
|
||||
scan((a, b) => a + b),
|
||||
take(2),
|
||||
);
|
||||
return this.client
|
||||
.send<number>({ cmd: 'broadcast' }, {})
|
||||
.pipe(scan((a, b) => a + b), take(2));
|
||||
}
|
||||
|
||||
@MessagePattern({ cmd: 'broadcast' })
|
||||
|
||||
@@ -15,10 +15,9 @@ export class NatsBroadcastController {
|
||||
|
||||
@Get('broadcast')
|
||||
multicats() {
|
||||
return this.client.send<number>('broadcast.test', {}).pipe(
|
||||
scan((a, b) => a + b),
|
||||
take(2),
|
||||
);
|
||||
return this.client
|
||||
.send<number>('broadcast.test', {})
|
||||
.pipe(scan((a, b) => a + b), take(2));
|
||||
}
|
||||
|
||||
@MessagePattern('broadcast.*')
|
||||
|
||||
@@ -2,11 +2,8 @@ import { Body, Controller, Get, HttpCode, Post, Query } from '@nestjs/common';
|
||||
import {
|
||||
Client,
|
||||
ClientProxy,
|
||||
Ctx,
|
||||
EventPattern,
|
||||
MessagePattern,
|
||||
NatsContext,
|
||||
Payload,
|
||||
RpcException,
|
||||
Transport,
|
||||
} from '@nestjs/microservices';
|
||||
@@ -60,7 +57,7 @@ export class NatsController {
|
||||
}
|
||||
|
||||
@MessagePattern('math.*')
|
||||
sum(@Payload() data: number[], @Ctx() context: NatsContext): number {
|
||||
sum(data: number[]): number {
|
||||
return (data || []).reduce((a, b) => a + b);
|
||||
}
|
||||
|
||||
@@ -97,7 +94,7 @@ export class NatsController {
|
||||
}
|
||||
|
||||
@EventPattern('notification')
|
||||
eventHandler(@Payload() data: boolean) {
|
||||
eventHandler(data: boolean) {
|
||||
NatsController.IS_NOTIFIED = data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,14 +15,15 @@ export class RedisBroadcastController {
|
||||
|
||||
@Get('broadcast')
|
||||
multicats() {
|
||||
return this.client.send<number>({ cmd: 'broadcast' }, {}).pipe(
|
||||
scan((a, b) => a + b),
|
||||
take(2),
|
||||
);
|
||||
return this.client.send<number>({ cmd: 'broadcast' }, {})
|
||||
.pipe(
|
||||
scan((a, b) => a + b),
|
||||
take(2),
|
||||
);
|
||||
}
|
||||
|
||||
@MessagePattern({ cmd: 'broadcast' })
|
||||
replyBroadcast(): Observable<number> {
|
||||
return new Observable(observer => observer.next(1));
|
||||
return new Observable((observer) => observer.next(1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,10 +26,9 @@ export class RMQBroadcastController {
|
||||
|
||||
@Get('broadcast')
|
||||
multicats() {
|
||||
return this.client.send<number>({ cmd: 'broadcast' }, {}).pipe(
|
||||
scan((a, b) => a + b),
|
||||
take(2),
|
||||
);
|
||||
return this.client
|
||||
.send<number>({ cmd: 'broadcast' }, {})
|
||||
.pipe(scan((a, b) => a + b), take(2));
|
||||
}
|
||||
|
||||
@MessagePattern({ cmd: 'broadcast' })
|
||||
|
||||
@@ -27,7 +27,7 @@ describe('Mongoose', () => {
|
||||
.post('/cats')
|
||||
.send(cat)
|
||||
.expect(201)
|
||||
.expect(({ body }) => body.name === cat.name);
|
||||
.expect(({body}) => body.name === cat.name);
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
|
||||
216
integration/mongoose/package-lock.json
generated
216
integration/mongoose/package-lock.json
generated
@@ -25,25 +25,26 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/common": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.8.3.tgz",
|
||||
"integrity": "sha512-MQY05kocVTJx5UdLeE5gpBjiymXnKYo1rme3ejCaeMFFkiXmPcgkGquYNegCFy+SHXwsq9AW/gcoD0hkVn0Z6g==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
|
||||
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
|
||||
"requires": {
|
||||
"axios": "0.19.0",
|
||||
"cli-color": "2.0.0",
|
||||
"uuid": "3.3.3"
|
||||
"cli-color": "1.4.0",
|
||||
"uuid": "3.3.2"
|
||||
}
|
||||
},
|
||||
"@nestjs/core": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.8.3.tgz",
|
||||
"integrity": "sha512-hgpmqwbJaOFEuFYTAQe/Csu+kcxBfqlsctv6np9tg/TqDvNFMrowt3Snvtpjpz55fdvUfUh8JY7YBwoaUTo6ZA==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
|
||||
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
|
||||
"requires": {
|
||||
"@nuxtjs/opencollective": "0.2.2",
|
||||
"fast-safe-stringify": "2.0.7",
|
||||
"fast-safe-stringify": "2.0.6",
|
||||
"iterare": "1.2.0",
|
||||
"object-hash": "2.0.0",
|
||||
"uuid": "3.3.3"
|
||||
"object-hash": "1.3.1",
|
||||
"optional": "0.1.4",
|
||||
"uuid": "3.3.2"
|
||||
}
|
||||
},
|
||||
"@nestjs/mongoose": {
|
||||
@@ -71,9 +72,9 @@
|
||||
}
|
||||
},
|
||||
"@types/mongodb": {
|
||||
"version": "3.3.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.3.6.tgz",
|
||||
"integrity": "sha512-bPv0lGnkL/iOoA+GSAcS5ad9QyPc/rW547vrF5j+AKX4spaMZgpaCWQ4D6ipVSN6OKuks3ueCFEPinyJJSk2zA==",
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.3.0.tgz",
|
||||
"integrity": "sha512-YMrve0uBOqFDEiezQk3AfWV73g871/rQTAEb8Y2CSlbySnV/2OyerI1DAOUUJQaIqGEWWaYF6GMPO6wTErLUuw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/bson": "*",
|
||||
@@ -81,9 +82,9 @@
|
||||
}
|
||||
},
|
||||
"@types/mongoose": {
|
||||
"version": "5.5.23",
|
||||
"resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.5.23.tgz",
|
||||
"integrity": "sha512-IMij4GufpdQ53FB+S/6KlkAWvFvqLXQNwWsfJOeuKLC9T0OynOSRUMj/LAwMcezZCCUXHBephSNsS3teg0dc/g==",
|
||||
"version": "5.5.13",
|
||||
"resolved": "https://registry.npmjs.org/@types/mongoose/-/mongoose-5.5.13.tgz",
|
||||
"integrity": "sha512-k7Kxk5gugsZhkl7euWH1p6lmIdh9W8AsQgX0cO7kaihBie/P3ywU8LFMqo9ey6frdHBlGVaNICTeFZ/pZ6s5Lg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/mongodb": "*",
|
||||
@@ -110,9 +111,9 @@
|
||||
}
|
||||
},
|
||||
"arg": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.1.tgz",
|
||||
"integrity": "sha512-SlmP3fEA88MBv0PypnXZ8ZfJhwmDeIE3SP71j37AiXQBXYosPV0x6uISAaHYSlSVhmHOVkomen0tbGk6Anlebw==",
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz",
|
||||
"integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==",
|
||||
"dev": true
|
||||
},
|
||||
"argparse": {
|
||||
@@ -124,6 +125,14 @@
|
||||
"sprintf-js": "~1.0.2"
|
||||
}
|
||||
},
|
||||
"async": {
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz",
|
||||
"integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==",
|
||||
"requires": {
|
||||
"lodash": "^4.17.11"
|
||||
}
|
||||
},
|
||||
"axios": {
|
||||
"version": "0.19.0",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz",
|
||||
@@ -182,16 +191,16 @@
|
||||
}
|
||||
},
|
||||
"cli-color": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.0.tgz",
|
||||
"integrity": "sha512-a0VZ8LeraW0jTuCkuAGMNufareGHhyZU9z8OGsW0gXd1hZGi1SRuNRXdbGkraBBKnhyUhyebFWnRbp+dIn0f0A==",
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-color/-/cli-color-1.4.0.tgz",
|
||||
"integrity": "sha512-xu6RvQqqrWEo6MPR1eixqGPywhYBHRs653F9jfXB2Hx4jdM/3WxiNE1vppRmxtMIfl16SFYTpYlrnqH/HsK/2w==",
|
||||
"requires": {
|
||||
"ansi-regex": "^2.1.1",
|
||||
"d": "^1.0.1",
|
||||
"es5-ext": "^0.10.51",
|
||||
"d": "1",
|
||||
"es5-ext": "^0.10.46",
|
||||
"es6-iterator": "^2.0.3",
|
||||
"memoizee": "^0.4.14",
|
||||
"timers-ext": "^0.1.7"
|
||||
"timers-ext": "^0.1.5"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
@@ -220,9 +229,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"consola": {
|
||||
"version": "2.10.1",
|
||||
"resolved": "https://registry.npmjs.org/consola/-/consola-2.10.1.tgz",
|
||||
"integrity": "sha512-4sxpH6SGFYLADfUip4vuY65f/gEogrzJoniVhNUYkJHtng0l8ZjnDCqxxrSVRHOHwKxsy8Vm5ONZh1wOR3/l/w=="
|
||||
"version": "2.9.0",
|
||||
"resolved": "https://registry.npmjs.org/consola/-/consola-2.9.0.tgz",
|
||||
"integrity": "sha512-34Iue+LRcWbndFIfZc5boNizWlsrRjqIBJZTe591vImgbnq7nx2EzlrLtANj9TH2Fxm7puFJBJAOk5BhvZOddQ=="
|
||||
},
|
||||
"d": {
|
||||
"version": "1.0.1",
|
||||
@@ -249,15 +258,15 @@
|
||||
}
|
||||
},
|
||||
"diff": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz",
|
||||
"integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==",
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
|
||||
"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
|
||||
"dev": true
|
||||
},
|
||||
"es5-ext": {
|
||||
"version": "0.10.51",
|
||||
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.51.tgz",
|
||||
"integrity": "sha512-oRpWzM2WcLHVKpnrcyB7OW8j/s67Ba04JCm0WnNv3RiABSvs7mrQlutB8DBv793gKcp0XENR8Il8WxGTlZ73gQ==",
|
||||
"version": "0.10.50",
|
||||
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.50.tgz",
|
||||
"integrity": "sha512-KMzZTPBkeQV/JcSQhI5/z6d9VWJ3EnQ194USTUwIYZ2ZbpN8+SGXQKt1h68EX44+qt+Fzr8DO17vnxrw7c3agw==",
|
||||
"requires": {
|
||||
"es6-iterator": "~2.0.3",
|
||||
"es6-symbol": "~3.1.1",
|
||||
@@ -275,12 +284,12 @@
|
||||
}
|
||||
},
|
||||
"es6-symbol": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.2.tgz",
|
||||
"integrity": "sha512-/ZypxQsArlv+KHpGvng52/Iz8by3EQPxhmbuz8yFG89N/caTFBSbcXONDw0aMjy827gQg26XAjP4uXFvnfINmQ==",
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
|
||||
"integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=",
|
||||
"requires": {
|
||||
"d": "^1.0.1",
|
||||
"es5-ext": "^0.10.51"
|
||||
"d": "1",
|
||||
"es5-ext": "~0.10.14"
|
||||
}
|
||||
},
|
||||
"es6-weak-map": {
|
||||
@@ -321,9 +330,9 @@
|
||||
}
|
||||
},
|
||||
"fast-safe-stringify": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz",
|
||||
"integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA=="
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz",
|
||||
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
|
||||
},
|
||||
"follow-redirects": {
|
||||
"version": "1.5.10",
|
||||
@@ -375,9 +384,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"is-buffer": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
|
||||
"integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A=="
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
|
||||
"integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw=="
|
||||
},
|
||||
"is-promise": {
|
||||
"version": "2.1.0",
|
||||
@@ -406,9 +415,14 @@
|
||||
}
|
||||
},
|
||||
"kareem": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.1.tgz",
|
||||
"integrity": "sha512-l3hLhffs9zqoDe8zjmb/mAN4B8VT3L56EUvKNqLFVs9YlFA+zx7ke1DO8STAdDyYNkeSo1nKmjuvQeI12So8Xw=="
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.0.tgz",
|
||||
"integrity": "sha512-6hHxsp9e6zQU8nXsP+02HGWXwTkOEw6IROhF2ZA28cYbUk4eJ6QbtZvdqZOdD9YPKghG3apk5eOCvs+tLl3lRg=="
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.15",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
|
||||
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
|
||||
},
|
||||
"lru-queue": {
|
||||
"version": "0.1.0",
|
||||
@@ -470,9 +484,18 @@
|
||||
}
|
||||
},
|
||||
"mongodb": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.3.3.tgz",
|
||||
"integrity": "sha512-MdRnoOjstmnrKJsK8PY0PjP6fyF/SBS4R8coxmhsfEU7tQ46/J6j+aSHF2n4c2/H8B+Hc/Klbfp8vggZfI0mmA==",
|
||||
"version": "3.2.7",
|
||||
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.2.7.tgz",
|
||||
"integrity": "sha512-2YdWrdf1PJgxcCrT1tWoL6nHuk6hCxhddAAaEh8QJL231ci4+P9FLyqopbTm2Z2sAU6mhCri+wd9r1hOcHdoMw==",
|
||||
"requires": {
|
||||
"mongodb-core": "3.2.7",
|
||||
"safe-buffer": "^5.1.2"
|
||||
}
|
||||
},
|
||||
"mongodb-core": {
|
||||
"version": "3.2.7",
|
||||
"resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-3.2.7.tgz",
|
||||
"integrity": "sha512-WypKdLxFNPOH/Jy6i9z47IjG2wIldA54iDZBmHMINcgKOUcWJh8og+Wix76oGd7EyYkHJKssQ2FAOw5Su/n4XQ==",
|
||||
"requires": {
|
||||
"bson": "^1.1.1",
|
||||
"require_optional": "^1.0.1",
|
||||
@@ -481,16 +504,18 @@
|
||||
}
|
||||
},
|
||||
"mongoose": {
|
||||
"version": "5.7.6",
|
||||
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.7.6.tgz",
|
||||
"integrity": "sha512-2r87HmQMDCeZocoFmYGnJSpCW9ut95iQyPUcseG2B6EiAJjJBmR3pA01QyDF2+zQWpA8Ui4wH7xOq05U1nF6wg==",
|
||||
"version": "5.6.10",
|
||||
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.6.10.tgz",
|
||||
"integrity": "sha512-lxWvF4Vl2118K2nZTj+QAEEmNBCbmUAcmF/roe8d+68Np4RXKEQvmpqm1c3aIlE9AVMp//eKB8IfXr38ZHe0Zw==",
|
||||
"requires": {
|
||||
"async": "2.6.2",
|
||||
"bson": "~1.1.1",
|
||||
"kareem": "2.3.1",
|
||||
"mongodb": "3.3.3",
|
||||
"kareem": "2.3.0",
|
||||
"mongodb": "3.2.7",
|
||||
"mongodb-core": "3.2.7",
|
||||
"mongoose-legacy-pluralize": "1.0.2",
|
||||
"mpath": "0.6.0",
|
||||
"mquery": "3.2.2",
|
||||
"mquery": "3.2.1",
|
||||
"ms": "2.1.2",
|
||||
"regexp-clone": "1.0.0",
|
||||
"safe-buffer": "5.1.2",
|
||||
@@ -509,9 +534,9 @@
|
||||
"integrity": "sha512-i75qh79MJ5Xo/sbhxrDrPSEG0H/mr1kcZXJ8dH6URU5jD/knFxCVqVC/gVSW7GIXL/9hHWlT9haLbCXWOll3qw=="
|
||||
},
|
||||
"mquery": {
|
||||
"version": "3.2.2",
|
||||
"resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.2.tgz",
|
||||
"integrity": "sha512-XB52992COp0KP230I3qloVUbkLUxJIu328HBP2t2EsxSFtf4W1HPSOBWOXf1bqxK4Xbb66lfMJ+Bpfd9/yZE1Q==",
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.1.tgz",
|
||||
"integrity": "sha512-kY/K8QToZWTTocm0U+r8rqcJCp5PRl6e8tPmoDs5OeSO3DInZE2rAL6AYH+V406JTo8305LdASOQcxRDqHojyw==",
|
||||
"requires": {
|
||||
"bluebird": "3.5.1",
|
||||
"debug": "3.1.0",
|
||||
@@ -536,9 +561,9 @@
|
||||
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
|
||||
},
|
||||
"object-hash": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.0.0.tgz",
|
||||
"integrity": "sha512-I7zGBH0rDKwVGeGZpZoFaDhIwvJa3l1CZE+8VchylXbInNiCj7sxxea9P5dTM4ftKR5//nrqxrdeGSTWL2VpBA=="
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz",
|
||||
"integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA=="
|
||||
},
|
||||
"once": {
|
||||
"version": "1.4.0",
|
||||
@@ -549,6 +574,11 @@
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"optional": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/optional/-/optional-0.1.4.tgz",
|
||||
"integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw=="
|
||||
},
|
||||
"path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
@@ -595,9 +625,9 @@
|
||||
"integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c="
|
||||
},
|
||||
"rxjs": {
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz",
|
||||
"integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==",
|
||||
"version": "6.5.2",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz",
|
||||
"integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==",
|
||||
"requires": {
|
||||
"tslib": "^1.9.0"
|
||||
}
|
||||
@@ -638,9 +668,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"source-map-support": {
|
||||
"version": "0.5.13",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz",
|
||||
"integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==",
|
||||
"version": "0.5.12",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz",
|
||||
"integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffer-from": "^1.0.0",
|
||||
@@ -680,9 +710,9 @@
|
||||
}
|
||||
},
|
||||
"ts-node": {
|
||||
"version": "8.4.1",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.4.1.tgz",
|
||||
"integrity": "sha512-5LpRN+mTiCs7lI5EtbXmF/HfMeCjzt7DH9CZwtkr6SywStrNQC723wG+aOWFiLNn7zT3kD/RnFqi3ZUfr4l5Qw==",
|
||||
"version": "8.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz",
|
||||
"integrity": "sha512-dyNS/RqyVTDcmNM4NIBAeDMpsAdaQ+ojdf0GOLqE6nwJOgzEkdRNzJywhDfwnuvB10oa6NLVG1rUJQCpRN7qoQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arg": "^4.1.0",
|
||||
@@ -690,6 +720,14 @@
|
||||
"make-error": "^1.1.1",
|
||||
"source-map-support": "^0.5.6",
|
||||
"yn": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"diff": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz",
|
||||
"integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"tslib": {
|
||||
@@ -698,16 +736,16 @@
|
||||
"integrity": "sha512-avfPS28HmGLLc2o4elcc2EIq2FcH++Yo5YxpBZi9Yw93BCTGFthI4HPE4Rpep6vSYQaK8e69PelM44tPj+RaQg=="
|
||||
},
|
||||
"tslint": {
|
||||
"version": "5.20.0",
|
||||
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.20.0.tgz",
|
||||
"integrity": "sha512-2vqIvkMHbnx8acMogAERQ/IuINOq6DFqgF8/VDvhEkBqQh/x6SP0Y+OHnKth9/ZcHQSroOZwUQSN18v8KKF0/g==",
|
||||
"version": "5.19.0",
|
||||
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.19.0.tgz",
|
||||
"integrity": "sha512-1LwwtBxfRJZnUvoS9c0uj8XQtAnyhWr9KlNvDIdB+oXyT+VpsOAaEhEgKi1HrZ8rq0ki/AAnbGSv4KM6/AfVZw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.0.0",
|
||||
"builtin-modules": "^1.1.1",
|
||||
"chalk": "^2.3.0",
|
||||
"commander": "^2.12.1",
|
||||
"diff": "^4.0.1",
|
||||
"diff": "^3.2.0",
|
||||
"glob": "^7.1.1",
|
||||
"js-yaml": "^3.13.1",
|
||||
"minimatch": "^3.0.4",
|
||||
@@ -728,19 +766,19 @@
|
||||
}
|
||||
},
|
||||
"type": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
|
||||
"integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg=="
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/type/-/type-1.0.1.tgz",
|
||||
"integrity": "sha512-MAM5dBMJCJNKs9E7JXo4CXRAansRfG0nlJxW7Wf6GZzSOvH31zClSaHdIMWLehe/EGMBkqeC55rrkaOr5Oo7Nw=="
|
||||
},
|
||||
"typescript": {
|
||||
"version": "3.6.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.4.tgz",
|
||||
"integrity": "sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg=="
|
||||
"version": "3.5.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz",
|
||||
"integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g=="
|
||||
},
|
||||
"uuid": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz",
|
||||
"integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ=="
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
|
||||
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
|
||||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
@@ -749,9 +787,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"yn": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
|
||||
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.0.tgz",
|
||||
"integrity": "sha512-kKfnnYkbTfrAdd0xICNFw7Atm8nKpLcLv9AZGEt+kczL/WQVai4e2V6ZN8U/O+iI6WrNuJjNNOyu4zfhl9D3Hg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,18 +9,18 @@
|
||||
"start:prod": "node dist/main.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "6.8.3",
|
||||
"@nestjs/core": "6.8.3",
|
||||
"@nestjs/common": "6.5.3",
|
||||
"@nestjs/core": "6.5.3",
|
||||
"@nestjs/mongoose": "6.1.2",
|
||||
"mongoose": "5.7.6",
|
||||
"mongoose": "5.6.10",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.5.3",
|
||||
"typescript": "3.6.4"
|
||||
"rxjs": "6.5.2",
|
||||
"typescript": "3.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mongoose": "5.5.23",
|
||||
"@types/mongoose": "5.5.13",
|
||||
"@types/node": "7.10.7",
|
||||
"ts-node": "8.4.1",
|
||||
"tslint": "5.20.0"
|
||||
"ts-node": "8.3.0",
|
||||
"tslint": "5.19.0"
|
||||
}
|
||||
}
|
||||
|
||||
266
integration/scopes/package-lock.json
generated
266
integration/scopes/package-lock.json
generated
@@ -5,48 +5,50 @@
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@nestjs/common": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.8.3.tgz",
|
||||
"integrity": "sha512-MQY05kocVTJx5UdLeE5gpBjiymXnKYo1rme3ejCaeMFFkiXmPcgkGquYNegCFy+SHXwsq9AW/gcoD0hkVn0Z6g==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
|
||||
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
|
||||
"requires": {
|
||||
"axios": "0.19.0",
|
||||
"cli-color": "2.0.0",
|
||||
"uuid": "3.3.3"
|
||||
"cli-color": "1.4.0",
|
||||
"uuid": "3.3.2"
|
||||
}
|
||||
},
|
||||
"@nestjs/core": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.8.3.tgz",
|
||||
"integrity": "sha512-hgpmqwbJaOFEuFYTAQe/Csu+kcxBfqlsctv6np9tg/TqDvNFMrowt3Snvtpjpz55fdvUfUh8JY7YBwoaUTo6ZA==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
|
||||
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
|
||||
"requires": {
|
||||
"@nuxtjs/opencollective": "0.2.2",
|
||||
"fast-safe-stringify": "2.0.7",
|
||||
"fast-safe-stringify": "2.0.6",
|
||||
"iterare": "1.2.0",
|
||||
"object-hash": "2.0.0",
|
||||
"uuid": "3.3.3"
|
||||
"object-hash": "1.3.1",
|
||||
"optional": "0.1.4",
|
||||
"uuid": "3.3.2"
|
||||
}
|
||||
},
|
||||
"@nestjs/microservices": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.8.3.tgz",
|
||||
"integrity": "sha512-/7v2TWt90FmqK1ZNS5nuKzTgP6ruxrLBGaJkDpPyKgguaMhtmBOuMlHg9P7LieycTKjJfYZvR6J8gL41dfypnA==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.5.3.tgz",
|
||||
"integrity": "sha512-T9zZf61myahenI4c0qhcYnhnx49L+zL9+8W6fc+LPTarbt1HJDu6iyj6fh2BzewakwNLJRyGMJ9YCYlXhFuvlA==",
|
||||
"requires": {
|
||||
"iterare": "1.2.0",
|
||||
"json-socket": "0.3.0"
|
||||
"json-socket": "0.3.0",
|
||||
"optional": "0.1.4"
|
||||
}
|
||||
},
|
||||
"@nestjs/testing": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.8.3.tgz",
|
||||
"integrity": "sha512-nhiXfvnfJ0ARzpOJ+7btnHBxTh82oQX6+/G7EnQEBB/A1jFfE+sbB7Pdt6s999prNOQmdw/XdnORV67u9BwNkw==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.5.3.tgz",
|
||||
"integrity": "sha512-W8tPhkNVhmX+jaDu4R7WUOtIl0PK3ZDso434rEm/b1+S6ZRgAKwNVHWM/rwIuTi5+erPTEULtTsZgrXFrzC1sA==",
|
||||
"requires": {
|
||||
"optional": "0.1.4"
|
||||
}
|
||||
},
|
||||
"@nestjs/websockets": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.8.3.tgz",
|
||||
"integrity": "sha512-pCKK9NDFlZJSWYeh8TAL3Ioh+fzHzMlHd6C8gcq8OmrLmuATuhqCzEcEKW9hwtl6isnZUcliXvaQdBfBBYOBcw==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.5.3.tgz",
|
||||
"integrity": "sha512-YrCvmLHTW0OBusTiUOPrG0PNrw/3Gatty/bh3ro5cEoiovcaJxGSMsTC+JSVXqPwRJjEtoHMCr5Qje2rAepIzQ==",
|
||||
"requires": {
|
||||
"iterare": "1.2.0"
|
||||
}
|
||||
@@ -68,9 +70,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/validator": {
|
||||
"version": "10.11.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.3.tgz",
|
||||
"integrity": "sha512-GKF2VnEkMmEeEGvoo03ocrP9ySMuX1ypKazIYMlsjfslfBMhOAtC5dmEWKdJioW4lJN7MZRS88kalTsVClyQ9w=="
|
||||
"version": "10.11.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.2.tgz",
|
||||
"integrity": "sha512-k/ju1RsdP5ACFUWebqsyEy0avP5uNJCs2p3pmTHzOZdd4gMSAJTq7iUEHFY3tt3emBrPTm6oGvfZ4SzcqOgLPQ=="
|
||||
},
|
||||
"abstract-logging": {
|
||||
"version": "1.0.0",
|
||||
@@ -107,9 +109,9 @@
|
||||
"integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA="
|
||||
},
|
||||
"arg": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.1.tgz",
|
||||
"integrity": "sha512-SlmP3fEA88MBv0PypnXZ8ZfJhwmDeIE3SP71j37AiXQBXYosPV0x6uISAaHYSlSVhmHOVkomen0tbGk6Anlebw==",
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz",
|
||||
"integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==",
|
||||
"dev": true
|
||||
},
|
||||
"asynckit": {
|
||||
@@ -119,9 +121,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"avvio": {
|
||||
"version": "6.2.2",
|
||||
"resolved": "https://registry.npmjs.org/avvio/-/avvio-6.2.2.tgz",
|
||||
"integrity": "sha512-7+yznbJOMoHQ8Z8VH+1meyRjtxUW8za6gqnHBl8DqlX5qPtaclNIgWrKrTLuIbfn2+1/EGkcr+rQXI8DYVU4RA==",
|
||||
"version": "6.2.1",
|
||||
"resolved": "https://registry.npmjs.org/avvio/-/avvio-6.2.1.tgz",
|
||||
"integrity": "sha512-k+gTocL3yShwN1PtKEsSj7eFiApcZ4JZLAu/ecyzEb8jyx+Kmxb+7SXUsodB47g7fqhs/zkfsCdqq72a1ok5Ew==",
|
||||
"requires": {
|
||||
"archy": "^1.0.0",
|
||||
"debug": "^4.0.0",
|
||||
@@ -174,26 +176,26 @@
|
||||
"integrity": "sha512-qsP+0xoavpOlJHuYsQJsN58HXSl8Jvveo+T37rEvCEeRfMWoytAyR0Ua/YsFgpM6AZYZ/og2PJwArwzJl1aXtQ=="
|
||||
},
|
||||
"class-validator": {
|
||||
"version": "0.10.2",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.2.tgz",
|
||||
"integrity": "sha512-57bGDjoFXizqGZBHe/uHn5/K0MSjBkToaHpDhAXR6DIwjaoET37a0Uug4F5RZR7WF31/7SqzKFIvd+ZspszGUA==",
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.0.tgz",
|
||||
"integrity": "sha512-RvjxRlvoCvM/ojUq11j78ISpReGdBoMErdmDk1e27aQZK6ppSXq751UE6jB9JI7ayEnL6Nnmllzn/HXVSu3dmg==",
|
||||
"requires": {
|
||||
"@types/validator": "10.11.3",
|
||||
"@types/validator": "10.11.2",
|
||||
"google-libphonenumber": "^3.1.6",
|
||||
"validator": "11.1.0"
|
||||
}
|
||||
},
|
||||
"cli-color": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.0.tgz",
|
||||
"integrity": "sha512-a0VZ8LeraW0jTuCkuAGMNufareGHhyZU9z8OGsW0gXd1hZGi1SRuNRXdbGkraBBKnhyUhyebFWnRbp+dIn0f0A==",
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-color/-/cli-color-1.4.0.tgz",
|
||||
"integrity": "sha512-xu6RvQqqrWEo6MPR1eixqGPywhYBHRs653F9jfXB2Hx4jdM/3WxiNE1vppRmxtMIfl16SFYTpYlrnqH/HsK/2w==",
|
||||
"requires": {
|
||||
"ansi-regex": "^2.1.1",
|
||||
"d": "^1.0.1",
|
||||
"es5-ext": "^0.10.51",
|
||||
"d": "1",
|
||||
"es5-ext": "^0.10.46",
|
||||
"es6-iterator": "^2.0.3",
|
||||
"memoizee": "^0.4.14",
|
||||
"timers-ext": "^0.1.7"
|
||||
"timers-ext": "^0.1.5"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
@@ -225,9 +227,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"consola": {
|
||||
"version": "2.10.1",
|
||||
"resolved": "https://registry.npmjs.org/consola/-/consola-2.10.1.tgz",
|
||||
"integrity": "sha512-4sxpH6SGFYLADfUip4vuY65f/gEogrzJoniVhNUYkJHtng0l8ZjnDCqxxrSVRHOHwKxsy8Vm5ONZh1wOR3/l/w=="
|
||||
"version": "2.9.0",
|
||||
"resolved": "https://registry.npmjs.org/consola/-/consola-2.9.0.tgz",
|
||||
"integrity": "sha512-34Iue+LRcWbndFIfZc5boNizWlsrRjqIBJZTe591vImgbnq7nx2EzlrLtANj9TH2Fxm7puFJBJAOk5BhvZOddQ=="
|
||||
},
|
||||
"cookiejar": {
|
||||
"version": "2.1.2",
|
||||
@@ -259,9 +261,9 @@
|
||||
}
|
||||
},
|
||||
"deepmerge": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.1.1.tgz",
|
||||
"integrity": "sha512-+qO5WbNBKBaZez95TffdUDnGIo4+r5kmsX8aOb7PDHvXsTbghAmleuxjs6ytNaf5Eg4FGBXDS5vqO61TRi6BMg=="
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.0.0.tgz",
|
||||
"integrity": "sha512-YZ1rOP5+kHor4hMAH+HRQnBQHg+wvS1un1hAOuIcxcBy0hzcUf6Jg2a1w65kpoOUnurOfZbERwjI1TfZxNjcww=="
|
||||
},
|
||||
"delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
@@ -276,9 +278,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"es5-ext": {
|
||||
"version": "0.10.51",
|
||||
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.51.tgz",
|
||||
"integrity": "sha512-oRpWzM2WcLHVKpnrcyB7OW8j/s67Ba04JCm0WnNv3RiABSvs7mrQlutB8DBv793gKcp0XENR8Il8WxGTlZ73gQ==",
|
||||
"version": "0.10.50",
|
||||
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.50.tgz",
|
||||
"integrity": "sha512-KMzZTPBkeQV/JcSQhI5/z6d9VWJ3EnQ194USTUwIYZ2ZbpN8+SGXQKt1h68EX44+qt+Fzr8DO17vnxrw7c3agw==",
|
||||
"requires": {
|
||||
"es6-iterator": "~2.0.3",
|
||||
"es6-symbol": "~3.1.1",
|
||||
@@ -296,12 +298,12 @@
|
||||
}
|
||||
},
|
||||
"es6-symbol": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.2.tgz",
|
||||
"integrity": "sha512-/ZypxQsArlv+KHpGvng52/Iz8by3EQPxhmbuz8yFG89N/caTFBSbcXONDw0aMjy827gQg26XAjP4uXFvnfINmQ==",
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
|
||||
"integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=",
|
||||
"requires": {
|
||||
"d": "^1.0.1",
|
||||
"es5-ext": "^0.10.51"
|
||||
"d": "1",
|
||||
"es5-ext": "~0.10.14"
|
||||
}
|
||||
},
|
||||
"es6-weak-map": {
|
||||
@@ -351,43 +353,43 @@
|
||||
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
|
||||
},
|
||||
"fast-json-stringify": {
|
||||
"version": "1.15.5",
|
||||
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.15.5.tgz",
|
||||
"integrity": "sha512-isOtZqxaBElpIBG5kibeBDIPyMYCGuI271ujJvAiWE+HNMPCFNiJJLVoxfGwer0u6g9wjv6OWbVzSjBPfHAgmg==",
|
||||
"version": "1.15.4",
|
||||
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.15.4.tgz",
|
||||
"integrity": "sha512-lsGTxL0OIGjGSUXgWUOdSgjCL/xMyMvMudfGN3D1zOLEv44fYZ1ZXmMyCON5XdpaiZN6nCXmU7GQg7fbXfPG4g==",
|
||||
"requires": {
|
||||
"ajv": "^6.8.1",
|
||||
"deepmerge": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"fast-redact": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-2.0.0.tgz",
|
||||
"integrity": "sha512-zxpkULI9W9MNTK2sJ3BpPQrTEXFNESd2X6O1tXMFpK/XM0G5c5Rll2EVYZH2TqI3xRGK/VaJ+eEOt7pnENJpeA=="
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-1.5.0.tgz",
|
||||
"integrity": "sha512-Afo61CgUjkzdvOKDHn08qnZ0kwck38AOGcMlvSGzvJbIab6soAP5rdoQayecGCDsD69AiF9vJBXyq31eoEO2tQ=="
|
||||
},
|
||||
"fast-safe-stringify": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz",
|
||||
"integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA=="
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz",
|
||||
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
|
||||
},
|
||||
"fastify": {
|
||||
"version": "2.10.0",
|
||||
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.10.0.tgz",
|
||||
"integrity": "sha512-ieWwtPZPpcurQlRBmWer6rSq/2WAKAI3yPkh2oBbQ98U5BnWjhcLXYYgBRTS1TDu2evwbXwnRVdLpILVC2O5XA==",
|
||||
"version": "2.7.1",
|
||||
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.7.1.tgz",
|
||||
"integrity": "sha512-ScKPXD84lkdCgz7q0zjyBr1aLxKbXRt9HYL3XIt/L8ZD2f3fAcsLEyQ2/rHxLUzLGjPlEjIvprWUL3RZvlLRLw==",
|
||||
"requires": {
|
||||
"abstract-logging": "^1.0.0",
|
||||
"ajv": "^6.10.2",
|
||||
"avvio": "^6.2.2",
|
||||
"fast-json-stringify": "^1.15.5",
|
||||
"avvio": "^6.1.1",
|
||||
"fast-json-stringify": "^1.15.0",
|
||||
"find-my-way": "^2.0.0",
|
||||
"flatstr": "^1.0.12",
|
||||
"light-my-request": "^3.4.1",
|
||||
"middie": "^4.0.1",
|
||||
"pino": "^5.13.2",
|
||||
"pino": "^5.13.1",
|
||||
"proxy-addr": "^2.0.4",
|
||||
"readable-stream": "^3.1.1",
|
||||
"rfdc": "^1.1.2",
|
||||
"secure-json-parse": "^1.0.0",
|
||||
"tiny-lru": "^7.0.0"
|
||||
"tiny-lru": "^6.0.1"
|
||||
}
|
||||
},
|
||||
"fastq": {
|
||||
@@ -399,9 +401,9 @@
|
||||
}
|
||||
},
|
||||
"find-my-way": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-2.2.1.tgz",
|
||||
"integrity": "sha512-pzZA9/PlhDGG5PRzmd4vH4AbKW7FO68RE7q2I3NzjJHcVPukYbDA7bPdArg7ySKfS6pKki+qhrawFoN6aNZfjA==",
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-2.1.0.tgz",
|
||||
"integrity": "sha512-Hdx6ctcrzkZH5y9EREHtXryXAgc5Bc8z5Cvoa61y9kaoYj2KU4yXD6h8b6u0NUkYPVmQQeRdf0AtG1kQxQ+ukQ==",
|
||||
"requires": {
|
||||
"fast-decode-uri-component": "^1.0.0",
|
||||
"safe-regex2": "^2.0.0",
|
||||
@@ -444,9 +446,9 @@
|
||||
"integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
|
||||
},
|
||||
"google-libphonenumber": {
|
||||
"version": "3.2.5",
|
||||
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.5.tgz",
|
||||
"integrity": "sha512-Y0r7MFCI11UDLn0KaMPBEInhROyIOkWkQIyvWMFVF2I+h+sHE3vbl5a7FVe39td6u/w+nlKDdUMP9dMOZyv+2Q=="
|
||||
"version": "3.2.3",
|
||||
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.3.tgz",
|
||||
"integrity": "sha512-8n4JyRptifaIRlHANKRlfqLR8fANm7+Q+1qvDuUsUeStSLtLGTVsZWe1llWDfgWTm1y07cEUyiRuNIv6cs2ovg=="
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
@@ -464,9 +466,9 @@
|
||||
"integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA=="
|
||||
},
|
||||
"is-buffer": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
|
||||
"integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A=="
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
|
||||
"integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw=="
|
||||
},
|
||||
"is-promise": {
|
||||
"version": "2.1.0",
|
||||
@@ -578,9 +580,9 @@
|
||||
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
|
||||
},
|
||||
"object-hash": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.0.0.tgz",
|
||||
"integrity": "sha512-I7zGBH0rDKwVGeGZpZoFaDhIwvJa3l1CZE+8VchylXbInNiCj7sxxea9P5dTM4ftKR5//nrqxrdeGSTWL2VpBA=="
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz",
|
||||
"integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA=="
|
||||
},
|
||||
"optional": {
|
||||
"version": "0.1.4",
|
||||
@@ -588,17 +590,17 @@
|
||||
"integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw=="
|
||||
},
|
||||
"path-to-regexp": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.1.0.tgz",
|
||||
"integrity": "sha512-PtHLisEvUOepjc+sStXxJ/pDV/s5UBTOKWJY2SOz3e6E/iN/jLknY9WL72kTwRrwXDUbZTEAtSnJbz2fF127DA=="
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.0.0.tgz",
|
||||
"integrity": "sha512-ZOtfhPttCrqp2M1PBBH4X13XlvnfhIwD7yCLx+GoGoXRPQyxGOTdQMpIzPSPKXAJT/JQrdfFrgdJOyAzvgpQ9A=="
|
||||
},
|
||||
"pino": {
|
||||
"version": "5.13.4",
|
||||
"resolved": "https://registry.npmjs.org/pino/-/pino-5.13.4.tgz",
|
||||
"integrity": "sha512-heeg8m8FZY8Nl3nuuD+msJUmhamqoGl7JXoTExh9YpGajzz6LYbVByUqrjbf4sCEMYFsqdcqnTJWiSY660DraQ==",
|
||||
"version": "5.13.1",
|
||||
"resolved": "https://registry.npmjs.org/pino/-/pino-5.13.1.tgz",
|
||||
"integrity": "sha512-IxusG28L0g50uuf21kZELypdFOeNrJ/kRhktdi7LtdZQWCxLliMxG5iOrGUQ/ng7MiJ4XqXi/hfyXwZeKc1MxA==",
|
||||
"requires": {
|
||||
"fast-redact": "^2.0.0",
|
||||
"fast-safe-stringify": "^2.0.7",
|
||||
"fast-redact": "^1.4.4",
|
||||
"fast-safe-stringify": "^2.0.6",
|
||||
"flatstr": "^1.0.9",
|
||||
"pino-std-serializers": "^2.3.0",
|
||||
"quick-format-unescaped": "^3.0.2",
|
||||
@@ -637,9 +639,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"quick-format-unescaped": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-3.0.3.tgz",
|
||||
"integrity": "sha512-dy1yjycmn9blucmJLXOfZDx1ikZJUi6E8bBZLnhPG5gBrVhHXx2xVyqqgKBubVNEXmx51dBACMHpoMQK/N/AXQ=="
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-3.0.2.tgz",
|
||||
"integrity": "sha512-FXTaCkwvpIlkdKeGDNgcq07SXWS383noQUuZjvdE1QcTt+eLuqof6/BDiEPqB59FWLie/l91+HtlJSw7iCViSA=="
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "3.4.0",
|
||||
@@ -672,9 +674,9 @@
|
||||
"integrity": "sha512-5C9HXdzK8EAqN7JDif30jqsBzavB7wLpaubisuQIGHWf2gUXSpzy6ArX/+Da8RjFpagWsCn+pIgxTMAmKw9Zug=="
|
||||
},
|
||||
"rxjs": {
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz",
|
||||
"integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==",
|
||||
"version": "6.5.2",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz",
|
||||
"integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==",
|
||||
"requires": {
|
||||
"tslib": "^1.9.0"
|
||||
}
|
||||
@@ -682,8 +684,7 @@
|
||||
"safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
|
||||
"dev": true
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||
},
|
||||
"safe-regex2": {
|
||||
"version": "2.0.0",
|
||||
@@ -704,9 +705,9 @@
|
||||
"integrity": "sha512-TcZvGMMy9vodEFSse30lWinkj+JgOBvPn8wRItpQRSayhc+4ssDs335uklkfvQQJgL/WvmHLVj4Ycv2s7QCQMg=="
|
||||
},
|
||||
"sonic-boom": {
|
||||
"version": "0.7.6",
|
||||
"resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.6.tgz",
|
||||
"integrity": "sha512-k9E2QQ4zxuVRLDW+ZW6ISzJs3wlEorVdmM7ApDgor7wsGKSDG5YGHsGmgLY4XYh4DMlr/2ap2BWAE7yTFJtWnQ==",
|
||||
"version": "0.7.5",
|
||||
"resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.5.tgz",
|
||||
"integrity": "sha512-1pKrnAV6RfvntPnarY71tpthFTM3pWZWWQdghZY8ARjtDPGzG/inxqSuRwQY/7V1woUjfyxPb437zn4p5phgnQ==",
|
||||
"requires": {
|
||||
"flatstr": "^1.0.12"
|
||||
}
|
||||
@@ -718,9 +719,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"source-map-support": {
|
||||
"version": "0.5.13",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz",
|
||||
"integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==",
|
||||
"version": "0.5.12",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz",
|
||||
"integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffer-from": "^1.0.0",
|
||||
@@ -728,18 +729,11 @@
|
||||
}
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
||||
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz",
|
||||
"integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==",
|
||||
"requires": {
|
||||
"safe-buffer": "~5.2.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"safe-buffer": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz",
|
||||
"integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg=="
|
||||
}
|
||||
"safe-buffer": "~5.1.0"
|
||||
}
|
||||
},
|
||||
"superagent": {
|
||||
@@ -820,14 +814,14 @@
|
||||
}
|
||||
},
|
||||
"tiny-lru": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/tiny-lru/-/tiny-lru-7.0.1.tgz",
|
||||
"integrity": "sha512-BImmnAPNkaN7XjrvmOr4JAT2U6ubLmxiD9iDBMMow3/026OZ+yiuWzM1F0TgECLfq1KO2YkXEIJ2h6sPjXv9XA=="
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/tiny-lru/-/tiny-lru-6.0.1.tgz",
|
||||
"integrity": "sha512-k/vdHz+bFALjmik0URLWBYNuO0hCABTL5dullbZBXvFDdlL8RrKaeLR6YuHfX+6ZXOLkHw+HpNLCUA7DtLMQmg=="
|
||||
},
|
||||
"ts-node": {
|
||||
"version": "8.4.1",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.4.1.tgz",
|
||||
"integrity": "sha512-5LpRN+mTiCs7lI5EtbXmF/HfMeCjzt7DH9CZwtkr6SywStrNQC723wG+aOWFiLNn7zT3kD/RnFqi3ZUfr4l5Qw==",
|
||||
"version": "8.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz",
|
||||
"integrity": "sha512-dyNS/RqyVTDcmNM4NIBAeDMpsAdaQ+ojdf0GOLqE6nwJOgzEkdRNzJywhDfwnuvB10oa6NLVG1rUJQCpRN7qoQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arg": "^4.1.0",
|
||||
@@ -838,19 +832,19 @@
|
||||
}
|
||||
},
|
||||
"tslib": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz",
|
||||
"integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ=="
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
|
||||
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
|
||||
},
|
||||
"type": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
|
||||
"integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg=="
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/type/-/type-1.0.1.tgz",
|
||||
"integrity": "sha512-MAM5dBMJCJNKs9E7JXo4CXRAansRfG0nlJxW7Wf6GZzSOvH31zClSaHdIMWLehe/EGMBkqeC55rrkaOr5Oo7Nw=="
|
||||
},
|
||||
"typescript": {
|
||||
"version": "3.6.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.4.tgz",
|
||||
"integrity": "sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg=="
|
||||
"version": "3.5.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz",
|
||||
"integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g=="
|
||||
},
|
||||
"uri-js": {
|
||||
"version": "4.2.2",
|
||||
@@ -866,9 +860,9 @@
|
||||
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
|
||||
},
|
||||
"uuid": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz",
|
||||
"integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ=="
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
|
||||
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
|
||||
},
|
||||
"validator": {
|
||||
"version": "11.1.0",
|
||||
@@ -876,9 +870,9 @@
|
||||
"integrity": "sha512-qiQ5ktdO7CD6C/5/mYV4jku/7qnqzjrxb3C/Q5wR3vGGinHTgJZN/TdFT3ZX4vXhX2R1PXx42fB1cn5W+uJ4lg=="
|
||||
},
|
||||
"yn": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
|
||||
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.0.tgz",
|
||||
"integrity": "sha512-kKfnnYkbTfrAdd0xICNFw7Atm8nKpLcLv9AZGEt+kczL/WQVai4e2V6ZN8U/O+iI6WrNuJjNNOyu4zfhl9D3Hg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,21 +7,21 @@
|
||||
"start": "ts-node src/main"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "6.8.3",
|
||||
"@nestjs/core": "6.8.3",
|
||||
"@nestjs/microservices": "6.8.3",
|
||||
"@nestjs/testing": "6.8.3",
|
||||
"@nestjs/websockets": "6.8.3",
|
||||
"@nestjs/common": "6.5.3",
|
||||
"@nestjs/core": "6.5.3",
|
||||
"@nestjs/microservices": "6.5.3",
|
||||
"@nestjs/testing": "6.5.3",
|
||||
"@nestjs/websockets": "6.5.3",
|
||||
"class-transformer": "0.2.3",
|
||||
"class-validator": "0.10.2",
|
||||
"fastify": "2.10.0",
|
||||
"class-validator": "0.10.0",
|
||||
"fastify": "2.7.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.5.3",
|
||||
"typescript": "3.6.4"
|
||||
"rxjs": "6.5.2",
|
||||
"typescript": "3.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.10.7",
|
||||
"supertest": "4.0.2",
|
||||
"ts-node": "8.4.1"
|
||||
"ts-node": "8.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
1024
integration/typegraphql/package-lock.json
generated
1024
integration/typegraphql/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -9,24 +9,24 @@
|
||||
"start:prod": "node dist/main.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "6.8.3",
|
||||
"@nestjs/core": "6.8.3",
|
||||
"@nestjs/graphql": "6.5.3",
|
||||
"apollo-server-express": "2.9.7",
|
||||
"@nestjs/common": "6.5.3",
|
||||
"@nestjs/core": "6.5.3",
|
||||
"@nestjs/graphql": "6.4.2",
|
||||
"apollo-server-express": "2.8.1",
|
||||
"class-transformer": "0.2.3",
|
||||
"class-validator": "0.10.2",
|
||||
"graphql": "14.5.8",
|
||||
"class-validator": "0.10.0",
|
||||
"graphql": "14.5.0",
|
||||
"graphql-tools": "4.0.5",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.5.3",
|
||||
"rxjs": "6.5.2",
|
||||
"subscriptions-transport-ws": "0.9.16",
|
||||
"type-graphql": "0.17.5",
|
||||
"typescript": "3.6.4",
|
||||
"ws": "7.2.0"
|
||||
"typescript": "3.5.3",
|
||||
"ws": "7.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.10.7",
|
||||
"ts-node": "8.4.1",
|
||||
"tslint": "5.20.0"
|
||||
"ts-node": "8.3.0",
|
||||
"tslint": "5.19.0"
|
||||
}
|
||||
}
|
||||
|
||||
521
integration/typeorm/package-lock.json
generated
521
integration/typeorm/package-lock.json
generated
@@ -25,33 +25,34 @@
|
||||
}
|
||||
},
|
||||
"@nestjs/common": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.8.3.tgz",
|
||||
"integrity": "sha512-MQY05kocVTJx5UdLeE5gpBjiymXnKYo1rme3ejCaeMFFkiXmPcgkGquYNegCFy+SHXwsq9AW/gcoD0hkVn0Z6g==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
|
||||
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
|
||||
"requires": {
|
||||
"axios": "0.19.0",
|
||||
"cli-color": "2.0.0",
|
||||
"uuid": "3.3.3"
|
||||
"cli-color": "1.4.0",
|
||||
"uuid": "3.3.2"
|
||||
}
|
||||
},
|
||||
"@nestjs/core": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.8.3.tgz",
|
||||
"integrity": "sha512-hgpmqwbJaOFEuFYTAQe/Csu+kcxBfqlsctv6np9tg/TqDvNFMrowt3Snvtpjpz55fdvUfUh8JY7YBwoaUTo6ZA==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
|
||||
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
|
||||
"requires": {
|
||||
"@nuxtjs/opencollective": "0.2.2",
|
||||
"fast-safe-stringify": "2.0.7",
|
||||
"fast-safe-stringify": "2.0.6",
|
||||
"iterare": "1.2.0",
|
||||
"object-hash": "2.0.0",
|
||||
"uuid": "3.3.3"
|
||||
"object-hash": "1.3.1",
|
||||
"optional": "0.1.4",
|
||||
"uuid": "3.3.2"
|
||||
}
|
||||
},
|
||||
"@nestjs/typeorm": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/typeorm/-/typeorm-6.2.0.tgz",
|
||||
"integrity": "sha512-CRDYV3oxTUa6mTDJfdW+RPLtVUpGx0RpigQdLlvMFLM56v+bYnrTuuy4vurKDgLNFC+AttL9JLZOgRhW8fGdgQ==",
|
||||
"version": "6.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/typeorm/-/typeorm-6.1.3.tgz",
|
||||
"integrity": "sha512-860tNwms0d/pnuZNEBZCFl5FjzCGG67V8TYuPIVu66jFK/Hmq2WH/GxiC8L77rWPn/o2O5LSe51lgO95GPysGw==",
|
||||
"requires": {
|
||||
"uuid": "3.3.3"
|
||||
"uuid": "3.3.2"
|
||||
}
|
||||
},
|
||||
"@nuxtjs/opencollective": {
|
||||
@@ -106,9 +107,9 @@
|
||||
"integrity": "sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA=="
|
||||
},
|
||||
"arg": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.1.tgz",
|
||||
"integrity": "sha512-SlmP3fEA88MBv0PypnXZ8ZfJhwmDeIE3SP71j37AiXQBXYosPV0x6uISAaHYSlSVhmHOVkomen0tbGk6Anlebw==",
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz",
|
||||
"integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==",
|
||||
"dev": true
|
||||
},
|
||||
"argparse": {
|
||||
@@ -134,9 +135,9 @@
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
|
||||
},
|
||||
"base64-js": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
|
||||
"integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g=="
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz",
|
||||
"integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw=="
|
||||
},
|
||||
"bignumber.js": {
|
||||
"version": "7.2.1",
|
||||
@@ -153,9 +154,9 @@
|
||||
}
|
||||
},
|
||||
"buffer": {
|
||||
"version": "5.4.3",
|
||||
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.4.3.tgz",
|
||||
"integrity": "sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A==",
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz",
|
||||
"integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==",
|
||||
"requires": {
|
||||
"base64-js": "^1.0.2",
|
||||
"ieee754": "^1.1.4"
|
||||
@@ -189,16 +190,16 @@
|
||||
}
|
||||
},
|
||||
"cli-color": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.0.tgz",
|
||||
"integrity": "sha512-a0VZ8LeraW0jTuCkuAGMNufareGHhyZU9z8OGsW0gXd1hZGi1SRuNRXdbGkraBBKnhyUhyebFWnRbp+dIn0f0A==",
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-color/-/cli-color-1.4.0.tgz",
|
||||
"integrity": "sha512-xu6RvQqqrWEo6MPR1eixqGPywhYBHRs653F9jfXB2Hx4jdM/3WxiNE1vppRmxtMIfl16SFYTpYlrnqH/HsK/2w==",
|
||||
"requires": {
|
||||
"ansi-regex": "^2.1.1",
|
||||
"d": "^1.0.1",
|
||||
"es5-ext": "^0.10.51",
|
||||
"d": "1",
|
||||
"es5-ext": "^0.10.46",
|
||||
"es6-iterator": "^2.0.3",
|
||||
"memoizee": "^0.4.14",
|
||||
"timers-ext": "^0.1.7"
|
||||
"timers-ext": "^0.1.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-regex": {
|
||||
@@ -255,15 +256,27 @@
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||
},
|
||||
"consola": {
|
||||
"version": "2.10.1",
|
||||
"resolved": "https://registry.npmjs.org/consola/-/consola-2.10.1.tgz",
|
||||
"integrity": "sha512-4sxpH6SGFYLADfUip4vuY65f/gEogrzJoniVhNUYkJHtng0l8ZjnDCqxxrSVRHOHwKxsy8Vm5ONZh1wOR3/l/w=="
|
||||
"version": "2.9.0",
|
||||
"resolved": "https://registry.npmjs.org/consola/-/consola-2.9.0.tgz",
|
||||
"integrity": "sha512-34Iue+LRcWbndFIfZc5boNizWlsrRjqIBJZTe591vImgbnq7nx2EzlrLtANj9TH2Fxm7puFJBJAOk5BhvZOddQ=="
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
|
||||
},
|
||||
"cross-spawn": {
|
||||
"version": "6.0.5",
|
||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
|
||||
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
|
||||
"requires": {
|
||||
"nice-try": "^1.0.4",
|
||||
"path-key": "^2.0.1",
|
||||
"semver": "^5.5.0",
|
||||
"shebang-command": "^1.2.0",
|
||||
"which": "^1.2.9"
|
||||
}
|
||||
},
|
||||
"d": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
|
||||
@@ -286,18 +299,10 @@
|
||||
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
|
||||
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
|
||||
},
|
||||
"define-properties": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
|
||||
"integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
|
||||
"requires": {
|
||||
"object-keys": "^1.0.12"
|
||||
}
|
||||
},
|
||||
"diff": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz",
|
||||
"integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==",
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
|
||||
"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
|
||||
"dev": true
|
||||
},
|
||||
"dotenv": {
|
||||
@@ -310,37 +315,18 @@
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
|
||||
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="
|
||||
},
|
||||
"es-abstract": {
|
||||
"version": "1.15.0",
|
||||
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.15.0.tgz",
|
||||
"integrity": "sha512-bhkEqWJ2t2lMeaJDuk7okMkJWI/yqgH/EoGwpcvv0XW9RWQsRspI4wt6xuyuvMvvQE3gg/D9HXppgk21w78GyQ==",
|
||||
"end-of-stream": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
|
||||
"integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
|
||||
"requires": {
|
||||
"es-to-primitive": "^1.2.0",
|
||||
"function-bind": "^1.1.1",
|
||||
"has": "^1.0.3",
|
||||
"has-symbols": "^1.0.0",
|
||||
"is-callable": "^1.1.4",
|
||||
"is-regex": "^1.0.4",
|
||||
"object-inspect": "^1.6.0",
|
||||
"object-keys": "^1.1.1",
|
||||
"string.prototype.trimleft": "^2.1.0",
|
||||
"string.prototype.trimright": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"es-to-primitive": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz",
|
||||
"integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==",
|
||||
"requires": {
|
||||
"is-callable": "^1.1.4",
|
||||
"is-date-object": "^1.0.1",
|
||||
"is-symbol": "^1.0.2"
|
||||
"once": "^1.4.0"
|
||||
}
|
||||
},
|
||||
"es5-ext": {
|
||||
"version": "0.10.51",
|
||||
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.51.tgz",
|
||||
"integrity": "sha512-oRpWzM2WcLHVKpnrcyB7OW8j/s67Ba04JCm0WnNv3RiABSvs7mrQlutB8DBv793gKcp0XENR8Il8WxGTlZ73gQ==",
|
||||
"version": "0.10.50",
|
||||
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.50.tgz",
|
||||
"integrity": "sha512-KMzZTPBkeQV/JcSQhI5/z6d9VWJ3EnQ194USTUwIYZ2ZbpN8+SGXQKt1h68EX44+qt+Fzr8DO17vnxrw7c3agw==",
|
||||
"requires": {
|
||||
"es6-iterator": "~2.0.3",
|
||||
"es6-symbol": "~3.1.1",
|
||||
@@ -358,12 +344,12 @@
|
||||
}
|
||||
},
|
||||
"es6-symbol": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.2.tgz",
|
||||
"integrity": "sha512-/ZypxQsArlv+KHpGvng52/Iz8by3EQPxhmbuz8yFG89N/caTFBSbcXONDw0aMjy827gQg26XAjP4uXFvnfINmQ==",
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
|
||||
"integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=",
|
||||
"requires": {
|
||||
"d": "^1.0.1",
|
||||
"es5-ext": "^0.10.51"
|
||||
"d": "1",
|
||||
"es5-ext": "~0.10.14"
|
||||
}
|
||||
},
|
||||
"es6-weak-map": {
|
||||
@@ -402,15 +388,29 @@
|
||||
"es5-ext": "~0.10.14"
|
||||
}
|
||||
},
|
||||
"execa": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
|
||||
"integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
|
||||
"requires": {
|
||||
"cross-spawn": "^6.0.0",
|
||||
"get-stream": "^4.0.0",
|
||||
"is-stream": "^1.1.0",
|
||||
"npm-run-path": "^2.0.0",
|
||||
"p-finally": "^1.0.0",
|
||||
"signal-exit": "^3.0.0",
|
||||
"strip-eof": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"fast-safe-stringify": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz",
|
||||
"integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA=="
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz",
|
||||
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
|
||||
},
|
||||
"figlet": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/figlet/-/figlet-1.2.4.tgz",
|
||||
"integrity": "sha512-mv8YA9RruB4C5QawPaD29rEVx3N97ZTyNrE4DAfbhuo6tpcMdKnPVo8MlyT3RP5uPcg5M14bEJBq7kjFf4kAWg=="
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/figlet/-/figlet-1.2.3.tgz",
|
||||
"integrity": "sha512-+F5zdvZ66j77b8x2KCPvWUHC0UCKUMWrewxmewgPlagp3wmDpcrHMbyv/ygq/6xoxBPGQA+UJU3SMoBzKoROQQ=="
|
||||
},
|
||||
"find-up": {
|
||||
"version": "3.0.0",
|
||||
@@ -448,16 +448,19 @@
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
|
||||
},
|
||||
"function-bind": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
||||
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
|
||||
},
|
||||
"get-caller-file": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
|
||||
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
|
||||
},
|
||||
"get-stream": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
|
||||
"integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
|
||||
"requires": {
|
||||
"pump": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"glob": {
|
||||
"version": "7.1.2",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
|
||||
@@ -471,14 +474,6 @@
|
||||
"path-is-absolute": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"has": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
|
||||
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
|
||||
"requires": {
|
||||
"function-bind": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"has-ansi": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
|
||||
@@ -499,15 +494,10 @@
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
|
||||
},
|
||||
"has-symbols": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz",
|
||||
"integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q="
|
||||
},
|
||||
"highlight.js": {
|
||||
"version": "9.15.10",
|
||||
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.15.10.tgz",
|
||||
"integrity": "sha512-RoV7OkQm0T3os3Dd2VHLNMoaoDVx77Wygln3n9l5YV172XonWG6rgQD3XnF/BuFFZw9A0TJgmMSO8FEWQgvcXw=="
|
||||
"version": "9.15.8",
|
||||
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.15.8.tgz",
|
||||
"integrity": "sha512-RrapkKQWwE+wKdF73VsOa2RQdIoO3mxwJ4P8mhbI6KYJUraUHRKM5w5zQQKXNk0xNL4UVRdulV9SBJcmzJNzVA=="
|
||||
},
|
||||
"ieee754": {
|
||||
"version": "1.1.13",
|
||||
@@ -528,20 +518,15 @@
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
|
||||
},
|
||||
"invert-kv": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz",
|
||||
"integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA=="
|
||||
},
|
||||
"is-buffer": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
|
||||
"integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A=="
|
||||
},
|
||||
"is-callable": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz",
|
||||
"integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA=="
|
||||
},
|
||||
"is-date-object": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
|
||||
"integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY="
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
|
||||
"integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw=="
|
||||
},
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "2.0.0",
|
||||
@@ -553,27 +538,21 @@
|
||||
"resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz",
|
||||
"integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o="
|
||||
},
|
||||
"is-regex": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
|
||||
"integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
|
||||
"requires": {
|
||||
"has": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"is-symbol": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz",
|
||||
"integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==",
|
||||
"requires": {
|
||||
"has-symbols": "^1.0.0"
|
||||
}
|
||||
"is-stream": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
|
||||
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
|
||||
},
|
||||
"isarray": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
|
||||
},
|
||||
"isexe": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
|
||||
},
|
||||
"iterare": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.0.tgz",
|
||||
@@ -594,6 +573,14 @@
|
||||
"esprima": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"lcid": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz",
|
||||
"integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==",
|
||||
"requires": {
|
||||
"invert-kv": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"locate-path": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
|
||||
@@ -617,6 +604,24 @@
|
||||
"integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==",
|
||||
"dev": true
|
||||
},
|
||||
"map-age-cleaner": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
|
||||
"integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
|
||||
"requires": {
|
||||
"p-defer": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"mem": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz",
|
||||
"integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==",
|
||||
"requires": {
|
||||
"map-age-cleaner": "^0.1.1",
|
||||
"mimic-fn": "^2.0.0",
|
||||
"p-is-promise": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"memoizee": {
|
||||
"version": "0.4.14",
|
||||
"resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.14.tgz",
|
||||
@@ -632,6 +637,11 @@
|
||||
"timers-ext": "^0.1.5"
|
||||
}
|
||||
},
|
||||
"mimic-fn": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
|
||||
"integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
@@ -654,9 +664,9 @@
|
||||
}
|
||||
},
|
||||
"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.1",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
|
||||
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
|
||||
},
|
||||
"mysql": {
|
||||
"version": "2.17.1",
|
||||
@@ -684,39 +694,33 @@
|
||||
"resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
|
||||
"integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw="
|
||||
},
|
||||
"nice-try": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
|
||||
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
|
||||
},
|
||||
"node-fetch": {
|
||||
"version": "2.6.0",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
|
||||
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
|
||||
},
|
||||
"npm-run-path": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
|
||||
"integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
|
||||
"requires": {
|
||||
"path-key": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
|
||||
},
|
||||
"object-hash": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.0.0.tgz",
|
||||
"integrity": "sha512-I7zGBH0rDKwVGeGZpZoFaDhIwvJa3l1CZE+8VchylXbInNiCj7sxxea9P5dTM4ftKR5//nrqxrdeGSTWL2VpBA=="
|
||||
},
|
||||
"object-inspect": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz",
|
||||
"integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ=="
|
||||
},
|
||||
"object-keys": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
|
||||
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA=="
|
||||
},
|
||||
"object.getownpropertydescriptors": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz",
|
||||
"integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=",
|
||||
"requires": {
|
||||
"define-properties": "^1.1.2",
|
||||
"es-abstract": "^1.5.1"
|
||||
}
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz",
|
||||
"integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA=="
|
||||
},
|
||||
"once": {
|
||||
"version": "1.4.0",
|
||||
@@ -726,10 +730,40 @@
|
||||
"wrappy": "1"
|
||||
}
|
||||
},
|
||||
"optional": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/optional/-/optional-0.1.4.tgz",
|
||||
"integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw=="
|
||||
},
|
||||
"os-locale": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz",
|
||||
"integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==",
|
||||
"requires": {
|
||||
"execa": "^1.0.0",
|
||||
"lcid": "^2.0.0",
|
||||
"mem": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"p-defer": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
|
||||
"integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww="
|
||||
},
|
||||
"p-finally": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
|
||||
"integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4="
|
||||
},
|
||||
"p-is-promise": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz",
|
||||
"integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg=="
|
||||
},
|
||||
"p-limit": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz",
|
||||
"integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==",
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz",
|
||||
"integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==",
|
||||
"requires": {
|
||||
"p-try": "^2.0.0"
|
||||
}
|
||||
@@ -767,6 +801,11 @@
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
|
||||
},
|
||||
"path-key": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
|
||||
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
|
||||
},
|
||||
"path-parse": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
|
||||
@@ -778,6 +817,15 @@
|
||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
|
||||
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
|
||||
},
|
||||
"pump": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
|
||||
"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
|
||||
"requires": {
|
||||
"end-of-stream": "^1.1.0",
|
||||
"once": "^1.3.1"
|
||||
}
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "2.3.6",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
|
||||
@@ -817,9 +865,9 @@
|
||||
}
|
||||
},
|
||||
"rxjs": {
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz",
|
||||
"integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==",
|
||||
"version": "6.5.2",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz",
|
||||
"integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==",
|
||||
"requires": {
|
||||
"tslib": "^1.9.0"
|
||||
}
|
||||
@@ -837,14 +885,31 @@
|
||||
"semver": {
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
|
||||
"integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA=="
|
||||
},
|
||||
"set-blocking": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
|
||||
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
|
||||
},
|
||||
"shebang-command": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
|
||||
"integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
|
||||
"requires": {
|
||||
"shebang-regex": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"shebang-regex": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
|
||||
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
|
||||
},
|
||||
"signal-exit": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
|
||||
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
@@ -852,9 +917,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"source-map-support": {
|
||||
"version": "0.5.13",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz",
|
||||
"integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==",
|
||||
"version": "0.5.12",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz",
|
||||
"integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffer-from": "^1.0.0",
|
||||
@@ -881,24 +946,6 @@
|
||||
"strip-ansi": "^5.1.0"
|
||||
}
|
||||
},
|
||||
"string.prototype.trimleft": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz",
|
||||
"integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==",
|
||||
"requires": {
|
||||
"define-properties": "^1.1.3",
|
||||
"function-bind": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"string.prototype.trimright": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz",
|
||||
"integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==",
|
||||
"requires": {
|
||||
"define-properties": "^1.1.3",
|
||||
"function-bind": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
||||
@@ -915,6 +962,11 @@
|
||||
"ansi-regex": "^4.1.0"
|
||||
}
|
||||
},
|
||||
"strip-eof": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
|
||||
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz",
|
||||
@@ -949,9 +1001,9 @@
|
||||
}
|
||||
},
|
||||
"ts-node": {
|
||||
"version": "8.4.1",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.4.1.tgz",
|
||||
"integrity": "sha512-5LpRN+mTiCs7lI5EtbXmF/HfMeCjzt7DH9CZwtkr6SywStrNQC723wG+aOWFiLNn7zT3kD/RnFqi3ZUfr4l5Qw==",
|
||||
"version": "8.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz",
|
||||
"integrity": "sha512-dyNS/RqyVTDcmNM4NIBAeDMpsAdaQ+ojdf0GOLqE6nwJOgzEkdRNzJywhDfwnuvB10oa6NLVG1rUJQCpRN7qoQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arg": "^4.1.0",
|
||||
@@ -959,6 +1011,14 @@
|
||||
"make-error": "^1.1.1",
|
||||
"source-map-support": "^0.5.6",
|
||||
"yn": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"diff": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz",
|
||||
"integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"tslib": {
|
||||
@@ -967,16 +1027,16 @@
|
||||
"integrity": "sha512-avfPS28HmGLLc2o4elcc2EIq2FcH++Yo5YxpBZi9Yw93BCTGFthI4HPE4Rpep6vSYQaK8e69PelM44tPj+RaQg=="
|
||||
},
|
||||
"tslint": {
|
||||
"version": "5.20.0",
|
||||
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.20.0.tgz",
|
||||
"integrity": "sha512-2vqIvkMHbnx8acMogAERQ/IuINOq6DFqgF8/VDvhEkBqQh/x6SP0Y+OHnKth9/ZcHQSroOZwUQSN18v8KKF0/g==",
|
||||
"version": "5.19.0",
|
||||
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.19.0.tgz",
|
||||
"integrity": "sha512-1LwwtBxfRJZnUvoS9c0uj8XQtAnyhWr9KlNvDIdB+oXyT+VpsOAaEhEgKi1HrZ8rq0ki/AAnbGSv4KM6/AfVZw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.0.0",
|
||||
"builtin-modules": "^1.1.1",
|
||||
"chalk": "^2.3.0",
|
||||
"commander": "^2.12.1",
|
||||
"diff": "^4.0.1",
|
||||
"diff": "^3.2.0",
|
||||
"glob": "^7.1.1",
|
||||
"js-yaml": "^3.13.1",
|
||||
"minimatch": "^3.0.4",
|
||||
@@ -997,14 +1057,14 @@
|
||||
}
|
||||
},
|
||||
"type": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
|
||||
"integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg=="
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/type/-/type-1.0.1.tgz",
|
||||
"integrity": "sha512-MAM5dBMJCJNKs9E7JXo4CXRAansRfG0nlJxW7Wf6GZzSOvH31zClSaHdIMWLehe/EGMBkqeC55rrkaOr5Oo7Nw=="
|
||||
},
|
||||
"typeorm": {
|
||||
"version": "0.2.20",
|
||||
"resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.2.20.tgz",
|
||||
"integrity": "sha512-VxB+9qH8D+PM19MIx18Zs3Fqv/ZINnnQvUGmBEiLYDrB9etdSdamgSTCIhWdFNndeJ6ldH4jbD0Z6HWsepMPlA==",
|
||||
"version": "0.2.18",
|
||||
"resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.2.18.tgz",
|
||||
"integrity": "sha512-S553GwtG5ab268+VmaLCN7gKDqFPIzUw0eGMTobJ9yr0Np62Ojfx8j1Oa9bIeh5p7Pz1/kmGabAHoP1MYK05pA==",
|
||||
"requires": {
|
||||
"app-root-path": "^2.0.1",
|
||||
"buffer": "^5.1.0",
|
||||
@@ -1035,28 +1095,27 @@
|
||||
}
|
||||
},
|
||||
"typescript": {
|
||||
"version": "3.6.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.4.tgz",
|
||||
"integrity": "sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg=="
|
||||
"version": "3.5.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz",
|
||||
"integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g=="
|
||||
},
|
||||
"util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
|
||||
},
|
||||
"util.promisify": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz",
|
||||
"integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==",
|
||||
"requires": {
|
||||
"define-properties": "^1.1.2",
|
||||
"object.getownpropertydescriptors": "^2.0.3"
|
||||
}
|
||||
},
|
||||
"uuid": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz",
|
||||
"integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ=="
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
|
||||
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
|
||||
},
|
||||
"which": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
|
||||
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
|
||||
"requires": {
|
||||
"isexe": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"which-module": {
|
||||
"version": "2.0.0",
|
||||
@@ -1079,19 +1138,18 @@
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||
},
|
||||
"xml2js": {
|
||||
"version": "0.4.22",
|
||||
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.22.tgz",
|
||||
"integrity": "sha512-MWTbxAQqclRSTnehWWe5nMKzI3VmJ8ltiJEco8akcC6j3miOhjjfzKum5sId+CWhfxdOs/1xauYr8/ZDBtQiRw==",
|
||||
"version": "0.4.19",
|
||||
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz",
|
||||
"integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==",
|
||||
"requires": {
|
||||
"sax": ">=0.6.0",
|
||||
"util.promisify": "~1.0.0",
|
||||
"xmlbuilder": "~11.0.0"
|
||||
"xmlbuilder": "~9.0.1"
|
||||
}
|
||||
},
|
||||
"xmlbuilder": {
|
||||
"version": "11.0.1",
|
||||
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz",
|
||||
"integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA=="
|
||||
"version": "9.0.7",
|
||||
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
|
||||
"integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0="
|
||||
},
|
||||
"y18n": {
|
||||
"version": "4.0.0",
|
||||
@@ -1146,35 +1204,36 @@
|
||||
}
|
||||
},
|
||||
"yargs": {
|
||||
"version": "13.3.0",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz",
|
||||
"integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==",
|
||||
"version": "13.2.4",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.4.tgz",
|
||||
"integrity": "sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg==",
|
||||
"requires": {
|
||||
"cliui": "^5.0.0",
|
||||
"find-up": "^3.0.0",
|
||||
"get-caller-file": "^2.0.1",
|
||||
"os-locale": "^3.1.0",
|
||||
"require-directory": "^2.1.1",
|
||||
"require-main-filename": "^2.0.0",
|
||||
"set-blocking": "^2.0.0",
|
||||
"string-width": "^3.0.0",
|
||||
"which-module": "^2.0.0",
|
||||
"y18n": "^4.0.0",
|
||||
"yargs-parser": "^13.1.1"
|
||||
"yargs-parser": "^13.1.0"
|
||||
}
|
||||
},
|
||||
"yargs-parser": {
|
||||
"version": "13.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz",
|
||||
"integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==",
|
||||
"version": "13.1.0",
|
||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.0.tgz",
|
||||
"integrity": "sha512-Yq+32PrijHRri0vVKQEm+ys8mbqWjLiwQkMFNXEENutzLPP0bE4Lcd4iA3OQY5HF+GD3xXxf0MEHb8E4/SA3AA==",
|
||||
"requires": {
|
||||
"camelcase": "^5.0.0",
|
||||
"decamelize": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"yn": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
|
||||
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.0.tgz",
|
||||
"integrity": "sha512-kKfnnYkbTfrAdd0xICNFw7Atm8nKpLcLv9AZGEt+kczL/WQVai4e2V6ZN8U/O+iI6WrNuJjNNOyu4zfhl9D3Hg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,18 +9,18 @@
|
||||
"start:prod": "node dist/main.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "6.8.3",
|
||||
"@nestjs/core": "6.8.3",
|
||||
"@nestjs/typeorm": "6.2.0",
|
||||
"@nestjs/common": "6.5.3",
|
||||
"@nestjs/core": "6.5.3",
|
||||
"@nestjs/typeorm": "6.1.3",
|
||||
"mysql": "2.17.1",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.5.3",
|
||||
"typeorm": "0.2.20",
|
||||
"typescript": "3.6.4"
|
||||
"rxjs": "6.5.2",
|
||||
"typeorm": "0.2.18",
|
||||
"typescript": "3.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.10.7",
|
||||
"ts-node": "8.4.1",
|
||||
"tslint": "5.20.0"
|
||||
"ts-node": "8.3.0",
|
||||
"tslint": "5.19.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@ import { DatabaseModule } from './database.module';
|
||||
import { PhotoModule } from './photo/photo.module';
|
||||
|
||||
@Module({
|
||||
imports: [DatabaseModule.forRoot(), PhotoModule],
|
||||
imports: [
|
||||
DatabaseModule.forRoot(),
|
||||
PhotoModule,
|
||||
],
|
||||
})
|
||||
export class AsyncApplicationModule {}
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Photo } from './photo/photo.entity';
|
||||
@Module({})
|
||||
export class DatabaseModule {
|
||||
static async forRoot(): Promise<DynamicModule> {
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
await new Promise((resolve) => setTimeout(resolve, 1000));
|
||||
return {
|
||||
module: DatabaseModule,
|
||||
imports: [
|
||||
@@ -25,4 +25,4 @@ export class DatabaseModule {
|
||||
],
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
170
integration/websockets/package-lock.json
generated
170
integration/websockets/package-lock.json
generated
@@ -5,48 +5,50 @@
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@nestjs/common": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.8.3.tgz",
|
||||
"integrity": "sha512-MQY05kocVTJx5UdLeE5gpBjiymXnKYo1rme3ejCaeMFFkiXmPcgkGquYNegCFy+SHXwsq9AW/gcoD0hkVn0Z6g==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/common/-/common-6.5.3.tgz",
|
||||
"integrity": "sha512-8d39grIMrUYGKM46BFWxB6csQFCu1S2aK7azPivg7gTRVSbvR84cVd6tgRVM0LwFpqQrtn3Q6G6Pa8FSk7Kh1w==",
|
||||
"requires": {
|
||||
"axios": "0.19.0",
|
||||
"cli-color": "2.0.0",
|
||||
"uuid": "3.3.3"
|
||||
"cli-color": "1.4.0",
|
||||
"uuid": "3.3.2"
|
||||
}
|
||||
},
|
||||
"@nestjs/core": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.8.3.tgz",
|
||||
"integrity": "sha512-hgpmqwbJaOFEuFYTAQe/Csu+kcxBfqlsctv6np9tg/TqDvNFMrowt3Snvtpjpz55fdvUfUh8JY7YBwoaUTo6ZA==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/core/-/core-6.5.3.tgz",
|
||||
"integrity": "sha512-ZhYfH49sVmUUw02qsaGozCFOOehlEABakYzRShyDDq30/2+ek3KpE0DfvA9tXlzX2KVrac2qDTBxMOPoJ+zY+g==",
|
||||
"requires": {
|
||||
"@nuxtjs/opencollective": "0.2.2",
|
||||
"fast-safe-stringify": "2.0.7",
|
||||
"fast-safe-stringify": "2.0.6",
|
||||
"iterare": "1.2.0",
|
||||
"object-hash": "2.0.0",
|
||||
"uuid": "3.3.3"
|
||||
"object-hash": "1.3.1",
|
||||
"optional": "0.1.4",
|
||||
"uuid": "3.3.2"
|
||||
}
|
||||
},
|
||||
"@nestjs/microservices": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.8.3.tgz",
|
||||
"integrity": "sha512-/7v2TWt90FmqK1ZNS5nuKzTgP6ruxrLBGaJkDpPyKgguaMhtmBOuMlHg9P7LieycTKjJfYZvR6J8gL41dfypnA==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/microservices/-/microservices-6.5.3.tgz",
|
||||
"integrity": "sha512-T9zZf61myahenI4c0qhcYnhnx49L+zL9+8W6fc+LPTarbt1HJDu6iyj6fh2BzewakwNLJRyGMJ9YCYlXhFuvlA==",
|
||||
"requires": {
|
||||
"iterare": "1.2.0",
|
||||
"json-socket": "0.3.0"
|
||||
"json-socket": "0.3.0",
|
||||
"optional": "0.1.4"
|
||||
}
|
||||
},
|
||||
"@nestjs/testing": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.8.3.tgz",
|
||||
"integrity": "sha512-nhiXfvnfJ0ARzpOJ+7btnHBxTh82oQX6+/G7EnQEBB/A1jFfE+sbB7Pdt6s999prNOQmdw/XdnORV67u9BwNkw==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/testing/-/testing-6.5.3.tgz",
|
||||
"integrity": "sha512-W8tPhkNVhmX+jaDu4R7WUOtIl0PK3ZDso434rEm/b1+S6ZRgAKwNVHWM/rwIuTi5+erPTEULtTsZgrXFrzC1sA==",
|
||||
"requires": {
|
||||
"optional": "0.1.4"
|
||||
}
|
||||
},
|
||||
"@nestjs/websockets": {
|
||||
"version": "6.8.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.8.3.tgz",
|
||||
"integrity": "sha512-pCKK9NDFlZJSWYeh8TAL3Ioh+fzHzMlHd6C8gcq8OmrLmuATuhqCzEcEKW9hwtl6isnZUcliXvaQdBfBBYOBcw==",
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@nestjs/websockets/-/websockets-6.5.3.tgz",
|
||||
"integrity": "sha512-YrCvmLHTW0OBusTiUOPrG0PNrw/3Gatty/bh3ro5cEoiovcaJxGSMsTC+JSVXqPwRJjEtoHMCr5Qje2rAepIzQ==",
|
||||
"requires": {
|
||||
"iterare": "1.2.0"
|
||||
}
|
||||
@@ -68,9 +70,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"@types/validator": {
|
||||
"version": "10.11.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.3.tgz",
|
||||
"integrity": "sha512-GKF2VnEkMmEeEGvoo03ocrP9ySMuX1ypKazIYMlsjfslfBMhOAtC5dmEWKdJioW4lJN7MZRS88kalTsVClyQ9w=="
|
||||
"version": "10.11.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.2.tgz",
|
||||
"integrity": "sha512-k/ju1RsdP5ACFUWebqsyEy0avP5uNJCs2p3pmTHzOZdd4gMSAJTq7iUEHFY3tt3emBrPTm6oGvfZ4SzcqOgLPQ=="
|
||||
},
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
@@ -86,9 +88,9 @@
|
||||
}
|
||||
},
|
||||
"arg": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.1.tgz",
|
||||
"integrity": "sha512-SlmP3fEA88MBv0PypnXZ8ZfJhwmDeIE3SP71j37AiXQBXYosPV0x6uISAaHYSlSVhmHOVkomen0tbGk6Anlebw==",
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.0.tgz",
|
||||
"integrity": "sha512-ZWc51jO3qegGkVh8Hwpv636EkbesNV5ZNQPCtRa+0qytRYPEs9IYT9qITY9buezqUH5uqyzlWLcufrzU2rffdg==",
|
||||
"dev": true
|
||||
},
|
||||
"asynckit": {
|
||||
@@ -128,26 +130,26 @@
|
||||
"integrity": "sha512-qsP+0xoavpOlJHuYsQJsN58HXSl8Jvveo+T37rEvCEeRfMWoytAyR0Ua/YsFgpM6AZYZ/og2PJwArwzJl1aXtQ=="
|
||||
},
|
||||
"class-validator": {
|
||||
"version": "0.10.2",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.2.tgz",
|
||||
"integrity": "sha512-57bGDjoFXizqGZBHe/uHn5/K0MSjBkToaHpDhAXR6DIwjaoET37a0Uug4F5RZR7WF31/7SqzKFIvd+ZspszGUA==",
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/class-validator/-/class-validator-0.10.0.tgz",
|
||||
"integrity": "sha512-RvjxRlvoCvM/ojUq11j78ISpReGdBoMErdmDk1e27aQZK6ppSXq751UE6jB9JI7ayEnL6Nnmllzn/HXVSu3dmg==",
|
||||
"requires": {
|
||||
"@types/validator": "10.11.3",
|
||||
"@types/validator": "10.11.2",
|
||||
"google-libphonenumber": "^3.1.6",
|
||||
"validator": "11.1.0"
|
||||
}
|
||||
},
|
||||
"cli-color": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-color/-/cli-color-2.0.0.tgz",
|
||||
"integrity": "sha512-a0VZ8LeraW0jTuCkuAGMNufareGHhyZU9z8OGsW0gXd1hZGi1SRuNRXdbGkraBBKnhyUhyebFWnRbp+dIn0f0A==",
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/cli-color/-/cli-color-1.4.0.tgz",
|
||||
"integrity": "sha512-xu6RvQqqrWEo6MPR1eixqGPywhYBHRs653F9jfXB2Hx4jdM/3WxiNE1vppRmxtMIfl16SFYTpYlrnqH/HsK/2w==",
|
||||
"requires": {
|
||||
"ansi-regex": "^2.1.1",
|
||||
"d": "^1.0.1",
|
||||
"es5-ext": "^0.10.51",
|
||||
"d": "1",
|
||||
"es5-ext": "^0.10.46",
|
||||
"es6-iterator": "^2.0.3",
|
||||
"memoizee": "^0.4.14",
|
||||
"timers-ext": "^0.1.7"
|
||||
"timers-ext": "^0.1.5"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
@@ -179,9 +181,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"consola": {
|
||||
"version": "2.10.1",
|
||||
"resolved": "https://registry.npmjs.org/consola/-/consola-2.10.1.tgz",
|
||||
"integrity": "sha512-4sxpH6SGFYLADfUip4vuY65f/gEogrzJoniVhNUYkJHtng0l8ZjnDCqxxrSVRHOHwKxsy8Vm5ONZh1wOR3/l/w=="
|
||||
"version": "2.9.0",
|
||||
"resolved": "https://registry.npmjs.org/consola/-/consola-2.9.0.tgz",
|
||||
"integrity": "sha512-34Iue+LRcWbndFIfZc5boNizWlsrRjqIBJZTe591vImgbnq7nx2EzlrLtANj9TH2Fxm7puFJBJAOk5BhvZOddQ=="
|
||||
},
|
||||
"cookiejar": {
|
||||
"version": "2.1.2",
|
||||
@@ -226,9 +228,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"es5-ext": {
|
||||
"version": "0.10.51",
|
||||
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.51.tgz",
|
||||
"integrity": "sha512-oRpWzM2WcLHVKpnrcyB7OW8j/s67Ba04JCm0WnNv3RiABSvs7mrQlutB8DBv793gKcp0XENR8Il8WxGTlZ73gQ==",
|
||||
"version": "0.10.50",
|
||||
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.50.tgz",
|
||||
"integrity": "sha512-KMzZTPBkeQV/JcSQhI5/z6d9VWJ3EnQ194USTUwIYZ2ZbpN8+SGXQKt1h68EX44+qt+Fzr8DO17vnxrw7c3agw==",
|
||||
"requires": {
|
||||
"es6-iterator": "~2.0.3",
|
||||
"es6-symbol": "~3.1.1",
|
||||
@@ -246,12 +248,12 @@
|
||||
}
|
||||
},
|
||||
"es6-symbol": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.2.tgz",
|
||||
"integrity": "sha512-/ZypxQsArlv+KHpGvng52/Iz8by3EQPxhmbuz8yFG89N/caTFBSbcXONDw0aMjy827gQg26XAjP4uXFvnfINmQ==",
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
|
||||
"integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=",
|
||||
"requires": {
|
||||
"d": "^1.0.1",
|
||||
"es5-ext": "^0.10.51"
|
||||
"d": "1",
|
||||
"es5-ext": "~0.10.14"
|
||||
}
|
||||
},
|
||||
"es6-weak-map": {
|
||||
@@ -286,9 +288,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"fast-safe-stringify": {
|
||||
"version": "2.0.7",
|
||||
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz",
|
||||
"integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA=="
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz",
|
||||
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
|
||||
},
|
||||
"follow-redirects": {
|
||||
"version": "1.5.10",
|
||||
@@ -331,9 +333,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"google-libphonenumber": {
|
||||
"version": "3.2.5",
|
||||
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.5.tgz",
|
||||
"integrity": "sha512-Y0r7MFCI11UDLn0KaMPBEInhROyIOkWkQIyvWMFVF2I+h+sHE3vbl5a7FVe39td6u/w+nlKDdUMP9dMOZyv+2Q=="
|
||||
"version": "3.2.3",
|
||||
"resolved": "https://registry.npmjs.org/google-libphonenumber/-/google-libphonenumber-3.2.3.tgz",
|
||||
"integrity": "sha512-8n4JyRptifaIRlHANKRlfqLR8fANm7+Q+1qvDuUsUeStSLtLGTVsZWe1llWDfgWTm1y07cEUyiRuNIv6cs2ovg=="
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
@@ -347,9 +349,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"is-buffer": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
|
||||
"integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A=="
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
|
||||
"integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw=="
|
||||
},
|
||||
"is-promise": {
|
||||
"version": "2.1.0",
|
||||
@@ -439,9 +441,9 @@
|
||||
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
|
||||
},
|
||||
"object-hash": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.0.0.tgz",
|
||||
"integrity": "sha512-I7zGBH0rDKwVGeGZpZoFaDhIwvJa3l1CZE+8VchylXbInNiCj7sxxea9P5dTM4ftKR5//nrqxrdeGSTWL2VpBA=="
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/object-hash/-/object-hash-1.3.1.tgz",
|
||||
"integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA=="
|
||||
},
|
||||
"optional": {
|
||||
"version": "0.1.4",
|
||||
@@ -466,9 +468,9 @@
|
||||
"integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg=="
|
||||
},
|
||||
"rxjs": {
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz",
|
||||
"integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==",
|
||||
"version": "6.5.2",
|
||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz",
|
||||
"integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==",
|
||||
"requires": {
|
||||
"tslib": "^1.9.0"
|
||||
}
|
||||
@@ -486,9 +488,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"source-map-support": {
|
||||
"version": "0.5.13",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz",
|
||||
"integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==",
|
||||
"version": "0.5.12",
|
||||
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz",
|
||||
"integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"buffer-from": "^1.0.0",
|
||||
@@ -573,9 +575,9 @@
|
||||
}
|
||||
},
|
||||
"ts-node": {
|
||||
"version": "8.4.1",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.4.1.tgz",
|
||||
"integrity": "sha512-5LpRN+mTiCs7lI5EtbXmF/HfMeCjzt7DH9CZwtkr6SywStrNQC723wG+aOWFiLNn7zT3kD/RnFqi3ZUfr4l5Qw==",
|
||||
"version": "8.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.3.0.tgz",
|
||||
"integrity": "sha512-dyNS/RqyVTDcmNM4NIBAeDMpsAdaQ+ojdf0GOLqE6nwJOgzEkdRNzJywhDfwnuvB10oa6NLVG1rUJQCpRN7qoQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"arg": "^4.1.0",
|
||||
@@ -586,19 +588,19 @@
|
||||
}
|
||||
},
|
||||
"tslib": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz",
|
||||
"integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ=="
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
|
||||
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
|
||||
},
|
||||
"type": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
|
||||
"integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg=="
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/type/-/type-1.0.1.tgz",
|
||||
"integrity": "sha512-MAM5dBMJCJNKs9E7JXo4CXRAansRfG0nlJxW7Wf6GZzSOvH31zClSaHdIMWLehe/EGMBkqeC55rrkaOr5Oo7Nw=="
|
||||
},
|
||||
"typescript": {
|
||||
"version": "3.6.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.6.4.tgz",
|
||||
"integrity": "sha512-unoCll1+l+YK4i4F8f22TaNVPRHcD9PA3yCuZ8g5e0qGqlVlJ/8FSateOLLSagn+Yg5+ZwuPkL8LFUc0Jcvksg=="
|
||||
"version": "3.5.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz",
|
||||
"integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g=="
|
||||
},
|
||||
"util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
@@ -607,9 +609,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"uuid": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz",
|
||||
"integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ=="
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
|
||||
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
|
||||
},
|
||||
"validator": {
|
||||
"version": "11.1.0",
|
||||
@@ -617,9 +619,9 @@
|
||||
"integrity": "sha512-qiQ5ktdO7CD6C/5/mYV4jku/7qnqzjrxb3C/Q5wR3vGGinHTgJZN/TdFT3ZX4vXhX2R1PXx42fB1cn5W+uJ4lg=="
|
||||
},
|
||||
"yn": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
|
||||
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.0.tgz",
|
||||
"integrity": "sha512-kKfnnYkbTfrAdd0xICNFw7Atm8nKpLcLv9AZGEt+kczL/WQVai4e2V6ZN8U/O+iI6WrNuJjNNOyu4zfhl9D3Hg==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,20 +7,20 @@
|
||||
"start": "ts-node src/main"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "6.8.3",
|
||||
"@nestjs/core": "6.8.3",
|
||||
"@nestjs/microservices": "6.8.3",
|
||||
"@nestjs/testing": "6.8.3",
|
||||
"@nestjs/websockets": "6.8.3",
|
||||
"@nestjs/common": "6.5.3",
|
||||
"@nestjs/core": "6.5.3",
|
||||
"@nestjs/microservices": "6.5.3",
|
||||
"@nestjs/testing": "6.5.3",
|
||||
"@nestjs/websockets": "6.5.3",
|
||||
"class-transformer": "0.2.3",
|
||||
"class-validator": "0.10.2",
|
||||
"class-validator": "0.10.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.5.3",
|
||||
"typescript": "3.6.4"
|
||||
"rxjs": "6.5.2",
|
||||
"typescript": "3.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "7.10.7",
|
||||
"supertest": "4.0.2",
|
||||
"ts-node": "8.4.1"
|
||||
"ts-node": "8.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
import {
|
||||
MessageBody,
|
||||
SubscribeMessage,
|
||||
WebSocketGateway,
|
||||
} from '@nestjs/websockets';
|
||||
import { WebSocketGateway, SubscribeMessage } from '@nestjs/websockets';
|
||||
|
||||
@WebSocketGateway(8080)
|
||||
export class ApplicationGateway {
|
||||
@SubscribeMessage('push')
|
||||
onPush(@MessageBody() data) {
|
||||
onPush(client, data) {
|
||||
return {
|
||||
event: 'pop',
|
||||
data,
|
||||
|
||||
@@ -2,6 +2,6 @@ import { Module } from '@nestjs/common';
|
||||
import { ApplicationGateway } from './app.gateway';
|
||||
|
||||
@Module({
|
||||
providers: [ApplicationGateway],
|
||||
providers: [ApplicationGateway]
|
||||
})
|
||||
export class ApplicationModule {}
|
||||
|
||||
@@ -1,14 +1,9 @@
|
||||
import {
|
||||
ConnectedSocket,
|
||||
MessageBody,
|
||||
SubscribeMessage,
|
||||
WebSocketGateway,
|
||||
} from '@nestjs/websockets';
|
||||
import { SubscribeMessage, WebSocketGateway } from '@nestjs/websockets';
|
||||
|
||||
@WebSocketGateway(8090)
|
||||
export class CoreGateway {
|
||||
@SubscribeMessage('push')
|
||||
onPush(@ConnectedSocket() client, @MessageBody() data) {
|
||||
onPush(client, data) {
|
||||
return {
|
||||
event: 'pop',
|
||||
data,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { WebSocketGateway, SubscribeMessage } from '@nestjs/websockets';
|
||||
|
||||
@WebSocketGateway(8080, {
|
||||
namespace: 'test',
|
||||
namespace: 'test'
|
||||
})
|
||||
export class NamespaceGateway {
|
||||
@SubscribeMessage('push')
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SubscribeMessage, WebSocketGateway } from '@nestjs/websockets';
|
||||
import { WebSocketGateway, SubscribeMessage } from '@nestjs/websockets';
|
||||
|
||||
@WebSocketGateway()
|
||||
export class ServerGateway {
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
"packages": [
|
||||
"packages/*"
|
||||
],
|
||||
"version": "6.8.4"
|
||||
"version": "6.5.3"
|
||||
}
|
||||
|
||||
2562
package-lock.json
generated
2562
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
116
package.json
116
package.json
@@ -1,28 +1,25 @@
|
||||
{
|
||||
"name": "@nestjs/core",
|
||||
"version": "6.8.0",
|
||||
"version": "6.5.3",
|
||||
"description": "Modern, fast, powerful node.js web framework",
|
||||
"scripts": {
|
||||
"coverage": "nyc report --reporter=text-lcov | coveralls",
|
||||
"test": "nyc --require ts-node/register mocha packages/**/*.spec.ts --reporter spec --retries 3 --require 'node_modules/reflect-metadata/Reflect.js'",
|
||||
"integration-test": "mocha \"integration/*/{,!(node_modules)/**/}/*.spec.ts\" --reporter spec --require ts-node/register --require 'node_modules/reflect-metadata/Reflect.js'",
|
||||
"lint": "tslint -p tsconfig.json -c tslint.json \"packages/**/*.ts\" -e \"*.spec.ts\"",
|
||||
"format": "prettier \"**/*.ts\" --ignore-path ./.prettierignore --write && git status",
|
||||
"format": "prettier **/**/*.ts --ignore-path ./.prettierignore --write && git status",
|
||||
"clean": "gulp clean:bundle",
|
||||
"prebuild": "rm -rf node_modules/@nestjs",
|
||||
"build": "gulp build --dist node_modules/@nestjs",
|
||||
"postbuild": "gulp move",
|
||||
"prebuild:prod": "npm run clean",
|
||||
"build:prod": "gulp build",
|
||||
"build:samples": "gulp install:samples && npm run build && gulp build:samples",
|
||||
"build": "npm run clean && gulp build",
|
||||
"prebuild:dev": "rm -rf node_modules/@nestjs",
|
||||
"build:dev": "gulp build --dist node_modules/@nestjs && gulp move",
|
||||
"build:samples": "gulp install:samples && npm run build:dev && gulp build:samples",
|
||||
"postinstall": "opencollective",
|
||||
"prerelease": "gulp copy-misc && gulp build --dist node_modules/@nestjs",
|
||||
"publish": "npm run prerelease && npm run build:prod && ./node_modules/.bin/lerna publish --force-publish --access public --exact -m \"chore(@nestjs) publish %s release\"",
|
||||
"publish:rc": "npm run prerelease && npm run build:prod && ./node_modules/.bin/lerna publish --npm-tag=rc --access public -m \"chore(@nestjs) publish %s release\"",
|
||||
"publish:next": "npm run prerelease && npm run build:prod && ./node_modules/.bin/lerna publish --npm-tag=next --access public --skip-git -m \"chore(@nestjs) publish %s release\"",
|
||||
"publish:beta": "npm run prerelease && npm run build:prod && ./node_modules/.bin/lerna publish --npm-tag=beta --access public -m \"chore(@nestjs) publish %s release\"",
|
||||
"publish:test": "npm run prerelease && npm run build:prod && ./node_modules/.bin/lerna publish --force-publish --access public --npm-tag=test --skip-git -m \"chore(@nestjs) publish %s release\"",
|
||||
"codechecks:benchmarks": "codechecks ./tools/benchmarks/check-benchmarks.ts"
|
||||
"publish": "npm run prerelease && npm run build && ./node_modules/.bin/lerna publish --force-publish --access public --exact -m \"chore(@nestjs) publish %s release\"",
|
||||
"publish:rc": "npm run prerelease && npm run build && ./node_modules/.bin/lerna publish --npm-tag=rc --access public -m \"chore(@nestjs) publish %s release\"",
|
||||
"publish:next": "npm run prerelease && npm run build && ./node_modules/.bin/lerna publish --npm-tag=next --access public --skip-git -m \"chore(@nestjs) publish %s release\"",
|
||||
"publish:beta": "npm run prerelease && npm run build && ./node_modules/.bin/lerna publish --npm-tag=beta --access public -m \"chore(@nestjs) publish %s release\"",
|
||||
"publish:test": "npm run prerelease && npm run build && ./node_modules/.bin/lerna publish --force-publish --access public --npm-tag=test --skip-git -m \"chore(@nestjs) publish %s release\""
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8.9.0"
|
||||
@@ -34,80 +31,78 @@
|
||||
"author": "Kamil Mysliwiec",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@grpc/proto-loader": "0.5.2",
|
||||
"@grpc/proto-loader": "0.5.1",
|
||||
"@nestjs/common": "6.1.1",
|
||||
"@nestjs/core": "6.1.1",
|
||||
"@nestjs/microservices": "6.1.1",
|
||||
"@nestjs/testing": "6.1.1",
|
||||
"@nestjs/websockets": "6.1.1",
|
||||
"@nuxtjs/opencollective": "0.2.2",
|
||||
"amqp-connection-manager": "3.0.0",
|
||||
"amqplib": "0.5.5",
|
||||
"apollo-server-express": "2.9.7",
|
||||
"apollo-server-express": "2.8.1",
|
||||
"axios": "0.19.0",
|
||||
"cache-manager": "2.10.0",
|
||||
"class-transformer": "0.2.3",
|
||||
"class-validator": "0.10.2",
|
||||
"cli-color": "2.0.0",
|
||||
"class-validator": "0.10.0",
|
||||
"cli-color": "1.4.0",
|
||||
"connect": "3.7.0",
|
||||
"cors": "2.8.5",
|
||||
"engine.io-client": "3.4.0",
|
||||
"engine.io-client": "3.3.2",
|
||||
"express": "4.17.1",
|
||||
"fast-json-stringify": "1.15.5",
|
||||
"fast-safe-stringify": "2.0.7",
|
||||
"fastify": "2.10.0",
|
||||
"fast-json-stringify": "1.15.4",
|
||||
"fast-safe-stringify": "2.0.6",
|
||||
"fastify": "2.7.1",
|
||||
"fastify-cors": "2.1.3",
|
||||
"fastify-formbody": "3.1.0",
|
||||
"fastify-multipart": "1.0.2",
|
||||
"graphql": "14.5.8",
|
||||
"grpc": "1.24.1",
|
||||
"graphql": "14.5.0",
|
||||
"grpc": "1.23.3",
|
||||
"http2": "3.3.7",
|
||||
"iterare": "1.2.0",
|
||||
"kafkajs": "1.11.0",
|
||||
"merge-graphql-schemas": "1.6.1",
|
||||
"merge-graphql-schemas": "1.7.0",
|
||||
"mqtt": "3.0.0",
|
||||
"multer": "1.4.2",
|
||||
"nats": "1.3.2",
|
||||
"object-hash": "2.0.0",
|
||||
"nats": "1.3.0",
|
||||
"object-hash": "1.3.1",
|
||||
"optional": "0.1.4",
|
||||
"path-to-regexp": "3.1.0",
|
||||
"path-to-regexp": "3.0.0",
|
||||
"pump": "3.0.0",
|
||||
"redis": "2.8.0",
|
||||
"reflect-metadata": "0.1.13",
|
||||
"rxjs": "6.5.3",
|
||||
"rxjs-compat": "6.5.3",
|
||||
"socket.io": "2.3.0",
|
||||
"ts-morph": "4.3.2",
|
||||
"rxjs": "6.5.2",
|
||||
"rxjs-compat": "6.5.2",
|
||||
"socket.io": "2.2.0",
|
||||
"ts-morph": "3.1.3",
|
||||
"uuid": "3.3.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@codechecks/client": "0.1.10",
|
||||
"@commitlint/cli": "8.2.0",
|
||||
"@commitlint/config-angular": "8.2.0",
|
||||
"@types/amqplib": "0.5.13",
|
||||
"@types/bytes": "3.0.0",
|
||||
"@types/cache-manager": "2.10.0",
|
||||
"@types/chai": "4.2.4",
|
||||
"@types/cache-manager": "1.2.8",
|
||||
"@types/chai": "4.2.0",
|
||||
"@types/chai-as-promised": "7.1.2",
|
||||
"@types/cors": "2.8.6",
|
||||
"@types/express": "4.17.1",
|
||||
"@types/fastify-cors": "2.1.0",
|
||||
"@types/gulp": "4.0.6",
|
||||
"@types/kafka-node": "2.0.9",
|
||||
"@types/kafka-node": "2.0.8",
|
||||
"@types/mocha": "5.2.7",
|
||||
"@types/node": "10.14.22",
|
||||
"@types/redis": "2.8.14",
|
||||
"@types/node": "10.14.16",
|
||||
"@types/redis": "2.8.13",
|
||||
"@types/reflect-metadata": "0.0.5",
|
||||
"@types/sinon": "7.5.0",
|
||||
"@types/socket.io": "2.1.4",
|
||||
"@types/sinon": "7.0.13",
|
||||
"@types/socket.io": "2.1.2",
|
||||
"@types/ws": "6.0.3",
|
||||
"artillery": "1.6.0-29",
|
||||
"artillery": "1.6.0-28",
|
||||
"awesome-typescript-loader": "5.2.1",
|
||||
"body-parser": "1.19.0",
|
||||
"bytes": "3.1.0",
|
||||
"chai": "4.2.0",
|
||||
"chai-as-promised": "7.1.1",
|
||||
"clang-format": "1.2.4",
|
||||
"commitlint-circle": "1.0.0",
|
||||
"concurrently": "5.0.0",
|
||||
"conventional-changelog": "3.1.12",
|
||||
"core-js": "3.3.3",
|
||||
"coveralls": "3.0.7",
|
||||
"concurrently": "4.1.2",
|
||||
"conventional-changelog": "3.1.10",
|
||||
"core-js": "3.2.1",
|
||||
"coveralls": "3.0.6",
|
||||
"csv-write-stream": "2.0.0",
|
||||
"delete-empty": "3.0.0",
|
||||
"fancy-log": "1.3.3",
|
||||
@@ -122,20 +117,18 @@
|
||||
"imports-loader": "0.8.0",
|
||||
"json-loader": "0.5.7",
|
||||
"lerna": "2.11.0",
|
||||
"lint-staged": "9.4.2",
|
||||
"markdown-table": "1.1.3",
|
||||
"lint-staged": "9.2.3",
|
||||
"mocha": "3.5.3",
|
||||
"nodemon": "1.19.4",
|
||||
"nodemon": "1.19.1",
|
||||
"nyc": "14.1.1",
|
||||
"prettier": "1.18.2",
|
||||
"sinon": "7.5.0",
|
||||
"sinon": "7.4.1",
|
||||
"sinon-chai": "3.3.0",
|
||||
"socket.io-client": "2.3.0",
|
||||
"socket.io-client": "2.2.0",
|
||||
"supertest": "4.0.2",
|
||||
"ts-node": "8.4.1",
|
||||
"tslint": "5.20.0",
|
||||
"typescript": "3.6.4",
|
||||
"wrk": "1.2.0"
|
||||
"ts-node": "8.3.0",
|
||||
"tslint": "5.19.0",
|
||||
"typescript": "3.5.3"
|
||||
},
|
||||
"collective": {
|
||||
"type": "opencollective",
|
||||
@@ -189,8 +182,7 @@
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged",
|
||||
"commit-msg": "commitlint -c .commitlintrc.json -E HUSKY_GIT_PARAMS"
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
22
packages/common/LICENSE
Normal file
22
packages/common/LICENSE
Normal file
@@ -0,0 +1,22 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2017-2019 Kamil Myśliwiec <http://kamilmysliwiec.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -2,15 +2,18 @@
|
||||
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo_text.svg" width="320" alt="Nest Logo" /></a>
|
||||
</p>
|
||||
|
||||
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
|
||||
[circleci-url]: https://circleci.com/gh/nestjs/nest
|
||||
[travis-image]: https://api.travis-ci.org/nestjs/nest.svg?branch=master
|
||||
[travis-url]: https://travis-ci.org/nestjs/nest
|
||||
[linux-image]: https://img.shields.io/travis/nestjs/nest/master.svg?label=linux
|
||||
[linux-url]: https://travis-ci.org/nestjs/nest
|
||||
|
||||
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
|
||||
<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications, heavily inspired by <a href="https://angular.io" target="blank">Angular</a>.</p>
|
||||
<p align="center">
|
||||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
|
||||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
|
||||
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
|
||||
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
|
||||
<a href="https://travis-ci.org/nestjs/nest" target="_blank"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
|
||||
<a href="https://travis-ci.org/nestjs/nest" target="_blank"><img src="https://img.shields.io/travis/nestjs/nest/master.svg?label=linux" alt="Linux" /></a>
|
||||
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
|
||||
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
|
||||
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
|
||||
@@ -39,7 +42,7 @@ Nest is a framework for building efficient, scalable <a href="http://nodejs.org"
|
||||
|
||||
## Consulting
|
||||
|
||||
With official support, you can get expert help straight from Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://enterprise.nestjs.com).
|
||||
With official support, you can get expert help straight from Nest core team. We provide dedicated technical support, migration strategies, advice on best practices (and design decisions), PR reviews, and team augmentation. Read more about [support here](https://docs.nestjs.com/enterprise).
|
||||
|
||||
## Support
|
||||
|
||||
@@ -57,24 +60,25 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
|
||||
|
||||
#### Sponsors
|
||||
|
||||
<a href="https://www.swingdev.io" target="_blank"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="110" valign="middle" /> </a> <a href="https://blueanchor.io/" target="_blank"><img src="https://nestjs.com/img/blueanchor.png" width="150" valign="middle" /></a>
|
||||
<a href="https://www.novologic.com/" target="_blank"><img src="https://nestjs.com/img/novologic.png" width="110" valign="middle" /></a>
|
||||
<a href="https://scal.io" target="_blank"><img src="https://nestjs.com/img/scalio-logo.svg" width="80" valign="middle" /></a> <a href="http://angularity.io" target="_blank"><img src="http://angularity.io/media/logo.svg" height="22" valign="middle" /></a> <!--<a href="https://keycdn.com"><img src="https://nestjs.com/img/keycdn.svg" height="30" /></a> --> <a href="https://hostpresto.com" target="_blank"><img src="https://nestjs.com/img/hostpresto.png" height="24" valign="middle" /></a>
|
||||
<a href="https://ever.co/" target="_blank"><img src="https://nestjs.com/img/ever-logo.png" height="14" valign="middle" /></a>
|
||||
<a href="https://buddy.works/" target="_blank"><img src="https://nestjs.com/img/buddy-logo.svg" height="25" valign="middle" /></a>
|
||||
<a href="https://blokt.com" target="_blank"><img src="https://nestjs.com/img/blokt-logo.png" height="25" valign="middle" /></a> <a href="https://genuinebee.com/" target="_blank"><img src="https://nestjs.com/img/genuinebee.svg" height="24" valign="middle" /></a> <a href="http://architectnow.net/" target="_blank"><img src="https://nestjs.com/img/architectnow.png" height="20" valign="middle" /></a> <a href="https://quander.io/" target="_blank"><img src="https://nestjs.com/img/quander.png" height="22" valign="middle" /></a> <a href="https://mantro.net/" target="_blank"><img src="https://nestjs.com/img/mantro-logo.svg" height="19" valign="middle" /></a> <a href="https://triplebyte.com/" target="_blank"><img src="https://nestjs.com/img/triplebyte.png" height="20" valign="middle" /></a>
|
||||
<a href="https://reposit.co.uk/" target="_blank"><img src="https://nestjs.com/img/reposit-logo.png" height="18" valign="middle" /></a> <a href="https://yakaz.com/" target="_blank"><img src="https://nestjs.com/img/yakaz.png" width="70" valign="middle" /></a>
|
||||
<a href="https://nearpod.com/" target="_blank"><img src="https://nestjs.com/img/nearpod-logo.svg" width="100" valign="middle" /></a>
|
||||
<a href="https://clay.global/" target="_blank"><img src="https://nestjs.com/img/clay-logo.svg" width="75" valign="middle" /></a>
|
||||
<a href="https://firesticktricks.com" target="_blank"><img src="https://nestjs.com/img/firesticktricks-logo.png" width="120" valign="middle" /></a>
|
||||
<a href="https://www.codeguesser.co.uk" target="_blank"><img src="https://nestjs.com/img/codeguesser-logo.svg" width="120" valign="middle" /></a>
|
||||
<a href="https://tekhattan.com" target="_blank"><img src="https://nestjs.com/img/tekhattan-logo.png" width="110" valign="middle" /></a>
|
||||
<a href="https://f-a.nz/" target="_blank"><img src="https://nestjs.com/img/franz.svg" width="80" valign="middle" /></a>
|
||||
<a href="https://www.swingdev.io" target="_blank"><img src="https://nestjs.com/img/swingdev-logo.svg#1" width="125" valign="middle" /> </a> <a href="https://blueanchor.io/" target="_blank"><img src="https://nestjs.com/img/blueanchor.png" width="180" valign="middle" /></a>
|
||||
<a href="https://www.novologic.com/" target="_blank"><img src="https://nestjs.com/img/novologic.png" width="130" valign="middle" /></a>
|
||||
<a href="https://scal.io" target="_blank"><img src="https://nestjs.com/img/scalio-logo.svg" width="100" valign="middle" /></a> <a href="http://angularity.io" target="_blank"><img src="http://angularity.io/media/logo.svg" height="26" valign="middle" /></a> <!--<a href="https://keycdn.com"><img src="https://nestjs.com/img/keycdn.svg" height="30" /></a> --> <a href="https://hostpresto.com" target="_blank"><img src="https://nestjs.com/img/hostpresto.png" height="30" valign="middle" /></a>
|
||||
|
||||
<a href="https://genuinebee.com/" target="_blank"><img src="https://nestjs.com/img/genuinebee.svg" height="36" valign="middle" /></a> <a href="http://architectnow.net/" target="_blank"><img src="https://nestjs.com/img/architectnow.png" height="24" valign="middle" /></a> <a href="https://quander.io/" target="_blank"><img src="https://nestjs.com/img/quander.png" height="28" valign="middle" /></a> <a href="https://mantro.net/" target="_blank"><img src="https://nestjs.com/img/mantro-logo.svg" height="20" valign="middle" /></a> <a href="https://triplebyte.com/" target="_blank"><img src="https://nestjs.com/img/triplebyte.png" height="30" valign="middle" /></a>
|
||||
<a href="https://ever.co/" target="_blank"><img src="https://nestjs.com/img/ever-logo.png" height="20" valign="middle" /></a>
|
||||
<a href="https://buddy.works/" target="_blank"><img src="https://nestjs.com/img/buddy-logo.svg" height="35" valign="middle" /></a>
|
||||
<a href="https://blokt.com" target="_blank"><img src="https://nestjs.com/img/blokt-logo.png" height="31" valign="middle" /></a>
|
||||
<a href="https://reposit.co.uk/" target="_blank"><img src="https://nestjs.com/img/reposit-logo.png" height="28" valign="middle" /></a> <a href="https://yakaz.com/" target="_blank"><img src="https://nestjs.com/img/yakaz.png" width="80" valign="middle" /></a>
|
||||
<a href="https://nearpod.com/" target="_blank"><img src="https://nestjs.com/img/nearpod-logo.svg" width="120" valign="middle" /></a>
|
||||
<a href="https://clay.global/" target="_blank"><img src="https://nestjs.com/img/clay-logo.svg" width="90" valign="middle" /></a>
|
||||
<a href="https://firesticktricks.com" target="_blank"><img src="https://nestjs.com/img/firesticktricks-logo.png" width="145" valign="middle" /></a>
|
||||
<a href="http://xtremis.com/" target="_blank"><img src="https://nestjs.com/img/logo-xtremis.svg" width="145" valign="middle" /></a>
|
||||
|
||||
|
||||
|
||||
## Backers
|
||||
|
||||
<a href="https://opencollective.com/nest" target="_blank"><img src="https://opencollective.com/nest/backers.svg?width=1000"></a>
|
||||
<a href="https://opencollective.com/nest" target="_blank"><img src="https://opencollective.com/nest/backers.svg?width=1600"></a>
|
||||
|
||||
## Stay in touch
|
||||
|
||||
|
||||
22
packages/common/cache/cache.module.ts
vendored
22
packages/common/cache/cache.module.ts
vendored
@@ -8,25 +8,11 @@ import {
|
||||
CacheOptionsFactory,
|
||||
} from './interfaces/cache-module.interface';
|
||||
|
||||
/**
|
||||
* Module that provides Nest cache-manager.
|
||||
*
|
||||
* @see [Caching](https://docs.nestjs.com/techniques/caching)
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
@Module({
|
||||
providers: [createCacheManager()],
|
||||
exports: [CACHE_MANAGER],
|
||||
})
|
||||
export class CacheModule {
|
||||
/**
|
||||
* Configure the cache manager statically.
|
||||
*
|
||||
* @param options options to configure the cache manager
|
||||
*
|
||||
* @see [Customize caching](https://docs.nestjs.com/techniques/caching#customize-caching)
|
||||
*/
|
||||
static register(options: CacheModuleOptions = {}): DynamicModule {
|
||||
return {
|
||||
module: CacheModule,
|
||||
@@ -34,14 +20,6 @@ export class CacheModule {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure the cache manager dynamically.
|
||||
*
|
||||
* @param options method for dynamically supplying cache manager configuration
|
||||
* options
|
||||
*
|
||||
* @see [Async configuration](https://docs.nestjs.com/techniques/caching#async-configuration)
|
||||
*/
|
||||
static registerAsync(options: CacheModuleAsyncOptions): DynamicModule {
|
||||
return {
|
||||
module: CacheModule,
|
||||
|
||||
5
packages/common/cache/cache.providers.ts
vendored
5
packages/common/cache/cache.providers.ts
vendored
@@ -4,11 +4,6 @@ import { CACHE_MANAGER, CACHE_MODULE_OPTIONS } from './cache.constants';
|
||||
import { defaultCacheOptions } from './default-options';
|
||||
import { CacheManagerOptions } from './interfaces/cache-manager.interface';
|
||||
|
||||
/**
|
||||
* Creates a CacheManager Provider.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export function createCacheManager(): Provider {
|
||||
return {
|
||||
provide: CACHE_MANAGER,
|
||||
|
||||
@@ -1,17 +1,4 @@
|
||||
import { SetMetadata } from '../../decorators';
|
||||
import { CACHE_KEY_METADATA } from '../cache.constants';
|
||||
|
||||
/**
|
||||
* Decorator that sets the caching key used to store/retrieve cached items for
|
||||
* Web sockets or Microservice based apps.
|
||||
*
|
||||
* For example:
|
||||
* `@CacheKey('events')`
|
||||
*
|
||||
* @param key string naming the field to be used as a cache key
|
||||
*
|
||||
* @see [Caching](https://docs.nestjs.com/techniques/caching)
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export const CacheKey = (key: string) => SetMetadata(CACHE_KEY_METADATA, key);
|
||||
|
||||
@@ -2,70 +2,19 @@ export interface LiteralObject {
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface defining a cache store. Implement this interface to create a custom
|
||||
* cache store.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface CacheStore {
|
||||
/**
|
||||
* Create a key/value pair in the cache.
|
||||
*
|
||||
* @param key cache key
|
||||
* @param value cache value
|
||||
*/
|
||||
set<T>(key: string, value: T): Promise<void> | void;
|
||||
/**
|
||||
* Retrieve a key/value pair from the cache.
|
||||
*
|
||||
* @param key cache key
|
||||
*/
|
||||
get<T>(key: string): Promise<T | undefined> | T | undefined;
|
||||
/**
|
||||
* Destroy a key/value pair from the cache.
|
||||
*
|
||||
* @param key cache key
|
||||
*/
|
||||
get<T>(key: string): Promise<void> | void;
|
||||
del(key: string): void | Promise<void>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface defining a factory to create a cache store.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface CacheStoreFactory {
|
||||
/**
|
||||
* Return a configured cache store.
|
||||
*
|
||||
* @param args Cache manager options received from `CacheModule.register()`
|
||||
* or `CacheModule.registerAcync()`
|
||||
*/
|
||||
create(args: LiteralObject): CacheStore;
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface defining Cache Manager configuration options.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface CacheManagerOptions {
|
||||
/**
|
||||
* Cache storage manager. Default is `'memory'` (in-memory store). See
|
||||
* [Different stores](https://docs.nestjs.com/techniques/caching#different-stores)
|
||||
* for more info.
|
||||
*/
|
||||
store?: string | CacheStoreFactory;
|
||||
/**
|
||||
* Time to live - amount of time in seconds that a response is cached before it
|
||||
* is deleted. Subsequent request will call through the route handler and refresh
|
||||
* the cache. Defaults to 5 seconds.
|
||||
*/
|
||||
ttl?: number;
|
||||
/**
|
||||
* Maximum number of responses to store in the cache. Defaults to 100.
|
||||
*/
|
||||
max?: number;
|
||||
isCacheableValue?: (value: any) => boolean;
|
||||
}
|
||||
|
||||
@@ -5,47 +5,17 @@ export interface CacheModuleOptions extends CacheManagerOptions {
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface describing a `CacheOptionsFactory`. Providers supplying configuration
|
||||
* options for the Cache module must implement this interface.
|
||||
*
|
||||
* @see [Async configuration](https://docs.nestjs.com/techniques/caching#async-configuration)
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface CacheOptionsFactory {
|
||||
createCacheOptions(): Promise<CacheModuleOptions> | CacheModuleOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Options for dynamically configuring the Cache module.
|
||||
*
|
||||
* @see [Async configuration](https://docs.nestjs.com/techniques/caching#async-configuration)
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export interface CacheModuleAsyncOptions
|
||||
extends Pick<ModuleMetadata, 'imports'> {
|
||||
/**
|
||||
* Injection token resolving to an existing provider. The provider must implement
|
||||
* the `CacheOptionsFactory` interface.
|
||||
*/
|
||||
useExisting?: Type<CacheOptionsFactory>;
|
||||
/**
|
||||
* Injection token resolving to a class that will be instantiated as a provider.
|
||||
* The class must implement the `CacheOptionsFactory` interface.
|
||||
*/
|
||||
useClass?: Type<CacheOptionsFactory>;
|
||||
/**
|
||||
* Function returning options (or a Promise resolving to options) to configure the
|
||||
* cache module.
|
||||
*/
|
||||
useFactory?: (
|
||||
...args: any[]
|
||||
) => Promise<CacheModuleOptions> | CacheModuleOptions;
|
||||
/**
|
||||
* Dependencies that a Factory may inject.
|
||||
*/
|
||||
inject?: any[];
|
||||
extraProviders?: Provider[];
|
||||
}
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
/**
|
||||
* Decorator that binds *parameter decorators* to the method that follows.
|
||||
*
|
||||
* Useful when the language doesn't provide a 'Parameter Decorator' feature
|
||||
* (i.e., vanilla JavaScript).
|
||||
*
|
||||
* @param decorators one or more parameter decorators (e.g., `Req()`)
|
||||
*
|
||||
* @publicApi
|
||||
* Binds parameter decorators to the method
|
||||
* Useful when the language doesn't provide a 'Parameter Decorators' feature (vanilla JavaScript)
|
||||
* @param ...decorators
|
||||
*/
|
||||
export function Bind(...decorators: any[]): MethodDecorator {
|
||||
return <T>(
|
||||
|
||||
@@ -2,21 +2,8 @@ import { FILTER_CATCH_EXCEPTIONS } from '../../constants';
|
||||
import { Type } from '../../interfaces';
|
||||
|
||||
/**
|
||||
* Decorator that marks a class as a Nest exception filter. An exception filter
|
||||
* handles exceptions thrown by or not handled by your application code.
|
||||
*
|
||||
* The decorated class must implement the `ExceptionFilter` interface.
|
||||
*
|
||||
* @param exceptions one or more exception *types* specifying
|
||||
* the exceptions to be caught and handled by this filter.
|
||||
*
|
||||
* @see [Exception Filters](https://docs.nestjs.com/exception-filters)
|
||||
*
|
||||
* @usageNotes
|
||||
* Exception filters are applied using the `@UseFilters()` decorator, or (globally)
|
||||
* with `app.useGlobalFilters()`.
|
||||
*
|
||||
* @publicApi
|
||||
* Defines an exception filter. Takes set of exception types as arguments which have to be caught by this filter.
|
||||
* The class should implement the `ExceptionFilter` interface.
|
||||
*/
|
||||
export function Catch(...exceptions: Type<any>[]): ClassDecorator {
|
||||
return (target: object) => {
|
||||
|
||||
@@ -1,125 +1,81 @@
|
||||
import { PATH_METADATA, SCOPE_OPTIONS_METADATA } from '../../constants';
|
||||
import { isString, isUndefined } from '../../utils/shared.utils';
|
||||
import { ScopeOptions } from '../../interfaces/scope-options.interface';
|
||||
import { ScopeOptions } from './../../interfaces/scope-options.interface';
|
||||
|
||||
/**
|
||||
* Interface defining options that can be passed to `@Controller()` decorator
|
||||
*
|
||||
* Interface defining options that can be passed to `@Controller()` decorator
|
||||
* @publicApi
|
||||
*/
|
||||
export interface ControllerOptions extends ScopeOptions {
|
||||
/**
|
||||
* Specifies an optional `route path prefix`. The prefix is pre-pended to the
|
||||
* path specified in any request decorator in the class.
|
||||
* Specifies an optional route path prefix. When specified, the route path
|
||||
* for a handler is determined by concatenating the prefix with any path
|
||||
*
|
||||
* @see [Routing](https://docs.nestjs.com/controllers#routing)
|
||||
*/
|
||||
path?: string;
|
||||
}
|
||||
|
||||
export function Controller();
|
||||
export function Controller(prefix: string);
|
||||
export function Controller(options: ControllerOptions);
|
||||
/**
|
||||
* Decorator that marks a class as a Nest controller that can receive inbound
|
||||
* requests and produce responses.
|
||||
*
|
||||
* An HTTP Controller responds to inbound HTTP Requests and produces HTTP Responses.
|
||||
* It defines a class that provides the context for one or more related route
|
||||
* handlers that correspond to HTTP request methods and associated routes
|
||||
* for example `GET /api/profile`, `POST /user/resume`.
|
||||
*
|
||||
* A Microservice Controller responds to requests as well as events, running over
|
||||
* a variety of transports [(read more here)](https://docs.nestjs.com/microservices/basics).
|
||||
* It defines a class that provides a context for one or more message or event
|
||||
* handlers.
|
||||
*
|
||||
* @see [Controllers](https://docs.nestjs.com/controllers)
|
||||
* @see [Microservices](https://docs.nestjs.com/microservices/basics#request-response)
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export function Controller(): ClassDecorator;
|
||||
|
||||
/**
|
||||
* Decorator that marks a class as a Nest controller that can receive inbound
|
||||
* requests and produce responses.
|
||||
* HTTP Controllers optionally accept configuration
|
||||
* metadata that determines route paths that route handlers in the class
|
||||
* respond to, and lifetime [scope](https://docs.nestjs.com/fundamentals/injection-scopes#usage).
|
||||
*
|
||||
* An HTTP Controller responds to inbound HTTP Requests and produces HTTP Responses.
|
||||
* It defines a class that provides the context for one or more related route
|
||||
* handlers that correspond to HTTP request methods and associated routes
|
||||
* for example `GET /api/profile`, `POST /user/resume`.
|
||||
* (e.g., `GET /api/profile`, `POST /user/resume`).
|
||||
*
|
||||
* A Microservice Controller responds to requests as well as events, running over
|
||||
* a variety of transports [(read more here)](https://docs.nestjs.com/microservices/basics).
|
||||
* It defines a class that provides a context for one or more message or event
|
||||
* handlers.
|
||||
* A Microservice Controller responds to Requests and Responses, as well as events,
|
||||
* running over a variety of transports [(read more here)](https://docs.nestjs.com/microservices/basics). It defines
|
||||
* a class that provides a context for one or more message or event handlers.
|
||||
*
|
||||
* @param {string} prefix string that defines a `route path prefix`. The prefix
|
||||
* is pre-pended to the path specified in any request decorator in the class.
|
||||
*
|
||||
* @see [Routing](https://docs.nestjs.com/controllers#routing)
|
||||
* @see [Controllers](https://docs.nestjs.com/controllers)
|
||||
* @see [Microservices](https://docs.nestjs.com/microservices/basics#request-response)
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export function Controller(prefix: string): ClassDecorator;
|
||||
|
||||
/**
|
||||
* Decorator that marks a class as a Nest controller that can receive inbound
|
||||
* requests and produce responses.
|
||||
* @usageNotes
|
||||
*
|
||||
* An HTTP Controller responds to inbound HTTP Requests and produces HTTP Responses.
|
||||
* It defines a class that provides the context for one or more related route
|
||||
* handlers that correspond to HTTP request methods and associated routes
|
||||
* for example `GET /api/profile`, `POST /user/resume`.
|
||||
* ### Setting controller options
|
||||
* The controller decorator takes an optional options object in plain JSON format.
|
||||
* This object can take properties `path` and `scope`.
|
||||
*
|
||||
* A Microservice Controller responds to requests as well as events, running over
|
||||
* a variety of transports [(read more here)](https://docs.nestjs.com/microservices/basics).
|
||||
* It defines a class that provides a context for one or more message or event
|
||||
* handlers.
|
||||
* ### Setting the default route path prefix
|
||||
* The following example sets `cats` as the default route path prefix for all route
|
||||
* handlers in this controller. When simply passing a route prefix, you can pass
|
||||
* it as a string as shown in the example below.
|
||||
*
|
||||
* @param {object} options configuration object specifying:
|
||||
* ```typescript
|
||||
* @Controller('cats')
|
||||
* export class CatsController {
|
||||
* @Get()
|
||||
* findall(): string {
|
||||
* return 'This action returns all cats';
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
* This route handler will respond to the request
|
||||
* `GET /cats`
|
||||
*
|
||||
* - `scope` - symbol that determines the lifetime of a Controller instance.
|
||||
* [See Scope](https://docs.nestjs.com/fundamentals/injection-scopes#usage) for
|
||||
* more details.
|
||||
* - `prefix` - string that defines a `route path prefix`. The prefix
|
||||
* is pre-pended to the path specified in any request decorator in the class.
|
||||
* ### Setting the injection scope
|
||||
* The following example sets the scope for all requests in the controller
|
||||
* to request-scoped. Each request will cause Nest to create a new instance of
|
||||
* the controller.
|
||||
* ```typescript
|
||||
* @Controller({
|
||||
* path: 'cats',
|
||||
* scope: Scope.REQUEST,
|
||||
* })
|
||||
* export class CatsController { ... }
|
||||
* ```
|
||||
*
|
||||
* @see [Routing](https://docs.nestjs.com/controllers#routing)
|
||||
* @see [Controllers](https://docs.nestjs.com/controllers)
|
||||
* @see [Microservices](https://docs.nestjs.com/microservices/basics#request-response)
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
export function Controller(options: ControllerOptions): ClassDecorator;
|
||||
|
||||
/**
|
||||
* Decorator that marks a class as a Nest controller that can receive inbound
|
||||
* requests and produce responses.
|
||||
*
|
||||
* An HTTP Controller responds to inbound HTTP Requests and produces HTTP Responses.
|
||||
* It defines a class that provides the context for one or more related route
|
||||
* handlers that correspond to HTTP request methods and associated routes
|
||||
* for example `GET /api/profile`, `POST /user/resume`
|
||||
*
|
||||
* A Microservice Controller responds to requests as well as events, running over
|
||||
* a variety of transports [(read more here)](https://docs.nestjs.com/microservices/basics).
|
||||
* It defines a class that provides a context for one or more message or event
|
||||
* handlers.
|
||||
*
|
||||
* @param prefixOrOptions a `route path prefix` or a `ControllerOptions` object.
|
||||
* A `route path prefix` is pre-pended to the path specified in any request decorator
|
||||
* in the class. `ControllerOptions` is an options configuration object specifying:
|
||||
* - `scope` - symbol that determines the lifetime of a Controller instance.
|
||||
* [See Scope](https://docs.nestjs.com/fundamentals/injection-scopes#usage) for
|
||||
* more details.
|
||||
* - `prefix` - string that defines a `route path prefix`. The prefix
|
||||
* is pre-pended to the path specified in any request decorator in the class.
|
||||
*
|
||||
* @see [Routing](https://docs.nestjs.com/controllers#routing)
|
||||
* @see [Controllers](https://docs.nestjs.com/controllers)
|
||||
* @see [Microservices](https://docs.nestjs.com/microservices/basics#request-response)
|
||||
* @see [Scope](https://docs.nestjs.com/fundamentals/injection-scopes#usage)
|
||||
* [Read more about scopes here.](https://docs.nestjs.com/fundamentals/injection-scopes)
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
|
||||
@@ -34,26 +34,14 @@ const defineFiltersMetadata = (...filters: (Function | ExceptionFilter)[]) => {
|
||||
};
|
||||
|
||||
/**
|
||||
* Decorator that binds exception filters to the scope of the controller or
|
||||
* method, depending on its context.
|
||||
* Bounds exception filters to the chosen context.
|
||||
* When the `@UseFilters()` is used on the controller level:
|
||||
* - Exception Filter will be set up to every handler (every method)
|
||||
*
|
||||
* When `@UseFilters` is used at the controller level, the filter will be
|
||||
* applied to every handler (method) in the controller.
|
||||
* When the `@UseFilters()` is used on the handle level:
|
||||
* - Exception Filter will be set up only to the specified method
|
||||
*
|
||||
* When `@UseFilters` is used at the individual handler level, the filter
|
||||
* will apply only to that specific method.
|
||||
*
|
||||
* @param filters exception filter instance or class, or a list of exception
|
||||
* filter instances or classes.
|
||||
*
|
||||
* @see [Exception filters](https://docs.nestjs.com/exception-filters)
|
||||
*
|
||||
* @usageNotes
|
||||
* Exception filters can also be set up globally for all controllers and routes
|
||||
* using `app.useGlobalFilters()`. [See here for details](https://docs.nestjs.com/exception-filters#binding-filters)
|
||||
*
|
||||
* @publicApi
|
||||
* @param {ExceptionFilter[]} ...filters
|
||||
*/
|
||||
|
||||
export const UseFilters = (...filters: (ExceptionFilter | Function)[]) =>
|
||||
defineFiltersMetadata(...filters);
|
||||
|
||||
@@ -6,7 +6,16 @@ import { isFunction, isUndefined } from '../../utils/shared.utils';
|
||||
|
||||
/**
|
||||
* Decorator that marks a constructor parameter as a target for
|
||||
* [Dependency Injection (DI)](https://docs.nestjs.com/providers#dependency-injection).
|
||||
* [Dependency Injection (DI)](https://docs.nestjs.com/providers#dependency-injection). Takes a single
|
||||
* required parameter which is the
|
||||
* [injection token](https://docs.nestjs.com/fundamentals/custom-providers). The injection token serves
|
||||
* as the lookup key for the [provider](https://docs.nestjs.com/providers) that will be injected
|
||||
* (assigned to the constructor parameter).
|
||||
*
|
||||
* Injection tokens can be types (class names), strings or symbols. This depends
|
||||
* on how the provider with which it is associated was defined. Providers
|
||||
* defined with the `@Injectable()` decorator use the class name. Custom
|
||||
* Providers may use strings or symbols as the injection token.
|
||||
*
|
||||
* Any injected provider must be visible within the module scope (loosely
|
||||
* speaking, the containing module) of the class it is being injected into. This
|
||||
@@ -18,21 +27,59 @@ import { isFunction, isUndefined } from '../../utils/shared.utils';
|
||||
* - exporting the provider from a module that is marked as global using the
|
||||
* `@Global()` decorator
|
||||
*
|
||||
* #### Injection tokens
|
||||
* Can be *types* (class names), *strings* or *symbols*. This depends on how the
|
||||
* provider with which it is associated was defined. Providers defined with the
|
||||
* `@Injectable()` decorator use the class name. Custom Providers may use strings
|
||||
* or symbols as the injection token.
|
||||
*
|
||||
* @param token lookup key for the provider to be injected (assigned to the constructor
|
||||
* parameter).
|
||||
*
|
||||
* @see [Providers](https://docs.nestjs.com/providers)
|
||||
* @see [Custom Providers](https://docs.nestjs.com/fundamentals/custom-providers)
|
||||
* @see [Injection Scopes](https://docs.nestjs.com/fundamentals/injection-scopes)
|
||||
*
|
||||
* @usageNotes
|
||||
*
|
||||
* #### Injecting with a type (class name)
|
||||
*
|
||||
* ```typescript
|
||||
* import { Inject } from '@nestjs/common';
|
||||
* import { ConfigService } from './config.service';
|
||||
*
|
||||
* export class CatsService {
|
||||
* constructor(@Inject(ConfigService) private readonly configService) {}
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* The above is equivalent to the conventional constructor injection syntax:
|
||||
* ```typescript
|
||||
* import { ConfigService } from './config.service';
|
||||
*
|
||||
* export class CatsService {
|
||||
* constructor(private readonly configService: ConfigService) {}
|
||||
* }
|
||||
* ```
|
||||
* #### Injecting with a string
|
||||
*
|
||||
* Assume we've registered a provider with the string `'CONNECTION'` as follows:
|
||||
*
|
||||
* ```typescript
|
||||
* import { connection } from './connection';
|
||||
* const connectionProvider = {
|
||||
* provide: 'CONNECTION',
|
||||
* useValue: connection,
|
||||
* };
|
||||
*
|
||||
* @Module({
|
||||
* providers: [connectionProvider],
|
||||
* })
|
||||
* export class ApplicationModule {}
|
||||
* ```
|
||||
* As a result, we now have a provider bound to the DI container using the
|
||||
* injection token `'CONNECTION'`. This provider can be injected as follows:
|
||||
*
|
||||
* ```typescript
|
||||
* @Injectable()
|
||||
* export class CatsRepository {
|
||||
* constructor(@Inject('CONNECTION') connection: Connection) {}
|
||||
* }
|
||||
* ```
|
||||
* @publicApi
|
||||
*/
|
||||
|
||||
export function Inject<T = any>(token?: T) {
|
||||
return (target: Object, key: string | symbol, index?: number) => {
|
||||
token = token || Reflect.getMetadata('design:type', target, key);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as uuid from 'uuid/v4';
|
||||
import { ScopeOptions } from '../../interfaces/scope-options.interface';
|
||||
import { SCOPE_OPTIONS_METADATA } from '../../constants';
|
||||
import { Type } from '../../interfaces/type.interface';
|
||||
import { SCOPE_OPTIONS_METADATA } from './../../constants';
|
||||
import { Type } from './../../interfaces/type.interface';
|
||||
|
||||
/**
|
||||
* Defines the injection scope.
|
||||
@@ -13,10 +13,9 @@ import { Type } from '../../interfaces/type.interface';
|
||||
export interface InjectableOptions extends ScopeOptions {}
|
||||
|
||||
/**
|
||||
* Decorator that marks a class as a [provider](https://docs.nestjs.com/providers).
|
||||
* Providers can be injected into other classes via constructor parameter injection
|
||||
* using Nest's built-in [Dependency Injection (DI)](https://docs.nestjs.com/providers#dependency-injection)
|
||||
* system.
|
||||
* Decorator that marks a class as a [provider](https://docs.nestjs.com/providers). Providers can be
|
||||
* injected into other classes via constructor parameter injection using Nest's
|
||||
* built-in [Dependency Injection (DI)](https://docs.nestjs.com/providers#dependency-injection) system.
|
||||
*
|
||||
* When injecting a provider, it must be visible within the module scope (loosely
|
||||
* speaking, the containing module) of the class it is being injected into. This
|
||||
@@ -32,12 +31,81 @@ export interface InjectableOptions extends ScopeOptions {}
|
||||
* various [custom provider](https://docs.nestjs.com/fundamentals/custom-providers) techniques that expose
|
||||
* more capabilities of the DI system.
|
||||
*
|
||||
* @param options options specifying scope of injectable
|
||||
*
|
||||
* @see [Providers](https://docs.nestjs.com/providers)
|
||||
* @see [Custom Providers](https://docs.nestjs.com/fundamentals/custom-providers)
|
||||
* @see [Injection Scopes](https://docs.nestjs.com/fundamentals/injection-scopes)
|
||||
*
|
||||
* @usageNotes
|
||||
*
|
||||
* #### Setting provider scope
|
||||
*
|
||||
* The `@Injector()` decorator takes an optional options object in plain JSON format.
|
||||
* This object has one property: `scope`.
|
||||
*
|
||||
* Following is an example of setting a provider's scope to per-request. See more
|
||||
* about [injection scopes here](https://docs.nestjs.com/fundamentals/injection-scopes).
|
||||
*
|
||||
* ```typescript
|
||||
* import { Injectable, Scope } from '@nestjs/common';
|
||||
*
|
||||
* @Injectable({ scope: Scope.REQUEST })
|
||||
* export class CatsService {}
|
||||
* ```
|
||||
*
|
||||
* #### Declaring providers
|
||||
*
|
||||
* Providers are declared using the `@Injectable()` decorator and a standard
|
||||
* JavaScript class.
|
||||
*
|
||||
* ```typescript
|
||||
* import { Injectable } from '@nestjs/common';
|
||||
* import { Cat } from './interfaces/cat.interface';
|
||||
*
|
||||
* @Injectable()
|
||||
* export class CatsService {
|
||||
* private readonly cats: Cat[] = [];
|
||||
*
|
||||
* create(cat: Cat) {
|
||||
* this.cats.push(cat);
|
||||
* }
|
||||
*
|
||||
* findAll(): Cat[] {
|
||||
* return this.cats;
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* #### Using providers
|
||||
*
|
||||
* Providers created using the `@Injectable()` decorator use an
|
||||
* [injection token](https://docs.nestjs.com/fundamentals/custom-providers) that is the class type.
|
||||
*
|
||||
* For example to inject the provider declared above using constructor injection,
|
||||
* use the following syntax. In this example, `CatsService` is the name of
|
||||
* the provider class declared earlier, and is used as the injection token in
|
||||
* the constructor.
|
||||
*
|
||||
* ```typescript
|
||||
* import { Controller, Get, Post, Body } from '@nestjs/common';
|
||||
* import { CreateCatDto } from './dto/create-cat.dto';
|
||||
* import { CatsService } from './cats.service';
|
||||
* import { Cat } from './interfaces/cat.interface';
|
||||
*
|
||||
* @Controller('cats')
|
||||
* export class CatsController {
|
||||
* constructor(private readonly catsService: CatsService) {}
|
||||
*
|
||||
* @Post()
|
||||
* async create(@Body() createCatDto: CreateCatDto) {
|
||||
* this.catsService.create(createCatDto);
|
||||
* }
|
||||
*
|
||||
* @Get()
|
||||
* async findAll(): Promise<Cat[]> {
|
||||
* return this.catsService.findAll();
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
* @publicApi
|
||||
*/
|
||||
export function Injectable(options?: InjectableOptions): ClassDecorator {
|
||||
|
||||
@@ -5,17 +5,7 @@ import {
|
||||
import { isUndefined } from '../../utils/shared.utils';
|
||||
|
||||
/**
|
||||
* Parameter decorator for an injected dependency marking the
|
||||
* dependency as optional.
|
||||
*
|
||||
* For example:
|
||||
* ```typescript
|
||||
* constructor(@Optional() @Inject('HTTP_OPTIONS')private readonly httpClient: T) {}
|
||||
* ```
|
||||
*
|
||||
* @see [Optional providers](https://docs.nestjs.com/providers#optional-providers)
|
||||
*
|
||||
* @publicApi
|
||||
* Sets dependency as an optional one.
|
||||
*/
|
||||
export function Optional() {
|
||||
return (target: Object, key: string | symbol, index?: number) => {
|
||||
|
||||
@@ -1,20 +1,8 @@
|
||||
import { Logger } from '../../services/logger.service';
|
||||
import { Logger } from './../../services/logger.service';
|
||||
|
||||
/**
|
||||
* Decorator that assigns metadata to the class/function using the
|
||||
* specified `key`.
|
||||
*
|
||||
* Requires two parameters:
|
||||
* - `key` - a value defining the key under which the metadata is stored
|
||||
* - `value[]` - array of metadata values to be associated with `key`
|
||||
*
|
||||
* This metadata can be reflected using the `Reflector` class.
|
||||
*
|
||||
* Example: `@SetMetadata('roles', ['admin'])`
|
||||
*
|
||||
* @see [Reflection](https://docs.nestjs.com/guards#reflection)
|
||||
*
|
||||
* @publicApi
|
||||
* Assigns the metadata to the class/function under specified `key`.
|
||||
* This metadata can be reflected using `Reflector` class.
|
||||
*/
|
||||
export const SetMetadata = <K = any, V = any>(
|
||||
metadataKey: K,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user