diff --git a/.circleci/config.yml b/.circleci/config.yml index 92530224e4..21cf1ae2c2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,14 +12,14 @@ commands: steps: - when: condition: - equal: [ << parameters.databases >>, "" ] + equal: [<< parameters.databases >>, ""] steps: - run: name: "Enabling Databases in ORM config" command: cp ormconfig.circleci-common.json ./ormconfig.json - unless: condition: - equal: [ << parameters.databases >>, "" ] + equal: [<< parameters.databases >>, ""] steps: - run: name: "Enabling Databases in ORM config" @@ -40,9 +40,10 @@ commands: - restore_cache: name: Restore node_modules cache key: node_modules-<< parameters.cache-key >>-{{ checksum "package-lock.json" }} - - run: - name: Verify `package.json` and `package-lock.json` are in sync - command: npx lock-verify + # removed this item because lock-verify is deprecated + # - run: + # name: Verify `package.json` and `package-lock.json` are in sync + # command: npx lock-verify - run: # This uses `npm install` instead of `npm ci` # because of https://github.com/npm/cli/issues/558 @@ -65,12 +66,13 @@ commands: unzip -qqo node_modules/oracledb/instantclient.zip -d node_modules/oracledb/ rm node_modules/oracledb/instantclient.zip - DEBIAN_FRONTEND=noninteractive sudo apt-get -qq -y install libaio1 + sudo apt-get update -qq && sudo apt-get -qq -y install libaio1 (cp /lib/*/libaio.so.* node_modules/oracledb/instantclient_19_8/ || cp /usr/lib/*/libaio.so.* node_modules/oracledb/instantclient_19_8/) fi environment: BLOB_URL: https://download.oracle.com/otn_software/linux/instantclient/19800/instantclient-basiclite-linux.x64-19.8.0.0.0dbru.zip + DEBIAN_FRONTEND: noninteractive - save_cache: name: Save node_modules cache key: node_modules-{{ checksum "package-lock.json" }} @@ -81,21 +83,21 @@ jobs: lint: working_directory: ~/typeorm docker: - - image: circleci/node:12 + - image: cimg/node:16.20.0 steps: - checkout - install-packages: - cache-key: node12 + cache-key: node16 - run: npm run lint build: working_directory: ~/typeorm docker: - - image: circleci/node:12 + - image: cimg/node:16.20.0 steps: - checkout - install-packages: - cache-key: node12 + cache-key: node16 - run: npm run compile - persist_to_workspace: root: ~/typeorm @@ -109,10 +111,10 @@ jobs: default: "" node-version: type: string - default: "12" + default: "16" working_directory: ~/typeorm docker: - - image: circleci/node:<< parameters.node-version >> + - image: cimg/node:<< parameters.node-version >> steps: - checkout - setup_remote_docker @@ -138,7 +140,7 @@ jobs: --volume /typeorm \ --name typeorm-code \ --workdir /typeorm \ - circleci/node:<< parameters.node-version >> \ + cimg/node:<< parameters.node-version >> \ /bin/bash -c "sudo chmod 777 /typeorm && sudo chown circleci /typeorm" docker cp ./ typeorm-code:/typeorm - run: @@ -150,8 +152,9 @@ jobs: map(select(.skip == false) | select(.host) | select(.port) - | "nc -z " + .host + " " + (.port|tostring) + " && echo " + .host + " " + (.port|tostring) + " is up") - | join(" && ") + | "nc -z " + .host + " " + (.port|tostring) + " && echo " + .host + " " + (.port|tostring) + " is up" + ) + | join(" && ") ' ) echo "Running '$COMMANDS'" @@ -161,6 +164,24 @@ jobs: --tty \ ubuntu:trusty \ timeout 60 sh -c "until ($COMMANDS); do echo \"Waiting for Services to be Available ...\"; sleep 5; done" + - run: + name: "Wait for OracleDB to be Available" + command: | + COMMANDS=$( + cat ormconfig.json \ + | jq -r ' + map(select(.skip == false) + | select(.name == "oracle") + | "sleep 60" + ) + | join(" && ") + ' + ) + if [ ! -z "$COMMANDS" ]; then + echo "$COMMANDS seconds to wait for oracledb"; + $COMMANDS + fi + # Download and cache dependencies - run: name: "Run Tests with Coverage" @@ -174,7 +195,7 @@ jobs: --tty \ --workdir /typeorm \ --name typeorm-testrunner \ - circleci/node:<< parameters.node-version >> \ + cimg/node:<< parameters.node-version >> \ npx nyc npm run test-fast docker cp typeorm-testrunner:/typeorm/coverage/ ./ @@ -200,27 +221,26 @@ workflows: matrix: parameters: node-version: - - "12" - - "14" - - "16" + - "14.21.3" + - "16.20.0" - test: - name: test (cockroachdb) - Node v12 + name: test (cockroachdb) - Node v16 requires: - lint - build databases: "cockroachdb" - node-version: "12" + node-version: "16.20.0" - test: - name: test (oracle) - Node v12 + name: test (oracle) - Node v16 requires: - lint - build databases: "oracle" - node-version: "12" + node-version: "16.20.0" - test: - name: test (postgres 12) - Node v12 + name: test (postgres 12) - Node v16 requires: - lint - build databases: "postgres-12" - node-version: "12" + node-version: "16.20.0" diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md deleted file mode 100644 index c0f95d5ddc..0000000000 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ /dev/null @@ -1,121 +0,0 @@ ---- -name: "๐Ÿ› Bug Report" -about: Report a reproducible bug or regression. -title: '' -labels: requires triage, bug -assignees: '' - ---- - - - -## Issue Description - -### Expected Behavior - - - - -### Actual Behavior - - - -``` -// include the output in code tags like these! -``` - - -### Steps to Reproduce - - - -1. -2. - -```typescript -// insert code here -``` - -### My Environment - - - -| Dependency | Version | -| --- | --- | -| Operating System | | -| Node.js version | x.y.zzz | -| Typescript version | x.y.zzz | -| TypeORM version | x.y.zzz | - - -### Additional Context - - - - -### Relevant Database Driver(s) - - - -| DB Type | Reproducible | -|-------------------| --- | -| `aurora-mysql` | no | -| `aurora-postgres` | no | -| `better-sqlite3` | no | -| `cockroachdb` | no | -| `cordova` | no | -| `expo` | no | -| `mongodb` | no | -| `mysql` | no | -| `nativescript` | no | -| `oracle` | no | -| `postgres` | no | -| `react-native` | no | -| `sap` | no | -| `spanner` | no | -| `sqlite` | no | -| `sqlite-abstract` | no | -| `sqljs` | no | -| `sqlserver` | no | - - -### Are you willing to resolve this issue by submitting a Pull Request? - - - - - โœ… Yes, I have the time, and I know how to start. - - โœ–๏ธ Yes, I have the time, but I don't know how to start. I would need guidance. - - โœ–๏ธ No, I donโ€™t have the time, but I can support (using donations) development. - - โœ–๏ธ No, I donโ€™t have the time and Iโ€™m okay to wait for the community / maintainers to resolve this issue. - - - diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 0000000000..d613f98c14 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,133 @@ +name: ๐Ÿ› Bug Report +description: Report a reproducible bug or regression. +labels: + - requires triage + - bug +body: + - type: markdown + attributes: + value: |2- + Have a question? This is the TypeORM issue tracker โ€“ and not the right place for general support or questions. Instead, check the ["Support" Documentation]( https://github.com/typeorm/typeorm/blob/master/docs/support.md + ) on the best places to ask questions! + - type: input + id: description + attributes: + label: Issue description + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected Behavior + description: " A clear and concise description of what you expected to happen." + validations: + required: true + - type: textarea + id: actual + attributes: + label: Actual Behavior + description: >- + A clear and concise description of what actually happened. Please wrap + any error messages or output in code tags, instead of images. + validations: + required: true + - type: textarea + id: steps + attributes: + label: Steps to reproduce + description: >- + Your bug will be investigated much faster if we can run your code and it + doesn't have dependencies other than TypeORM. Issues without + reproduction steps or code examples may be closed as not actionable. + placeholder: >- + Please try to provide a Minimal, Complete, and Verifiable example. + http://stackoverflow.com/help/mcve + validations: + required: true + - type: textarea + id: env + attributes: + label: My Environment + description: >- + Please add any other relevant dependencies to this table at the end. For + example: Electron, React Native, or NestJS. + value: | + | Dependency | Version | + | --- | --- | + | Operating System | | + | Node.js version | x.y.zzz | + | Typescript version | x.y.zzz | + | TypeORM version | x.y.zzz | + validations: + required: true + - type: textarea + id: context + attributes: + label: Additional Context + description: >- + Add any other context about the bug report here. Add any other context + about the bug report here. + - type: checkboxes + id: drivers + attributes: + label: Relevant Database Driver(s) + options: + - label: aurora-mysql + required: false + - label: aurora-postgres + required: false + - label: better-sqlite3 + required: false + - label: cockroachdb + required: false + - label: cordova + required: false + - label: expo + required: false + - label: mongodb + required: false + - label: mysql + required: false + - label: nativescript + required: false + - label: oracle + required: false + - label: postgres + required: false + - label: react-native + required: false + - label: sap + required: false + - label: spanner + required: false + - label: sqlite + required: false + - label: sqlite-abstract + required: false + - label: sqljs + required: false + - label: sqlserver + required: false + - type: dropdown + id: pr + attributes: + label: Are you willing to resolve this issue by submitting a Pull Request? + options: + - Yes, I have the time, and I know how to start. + - >- + Yes, I have the time, but I don't know how to start. I would need + guidance. + - >- + No, I donโ€™t have the time, but I can support (using donations) + development. + - >- + No, I donโ€™t have the time and Iโ€™m okay to wait for the community / + maintainers to resolve this issue. + validations: + required: true + - type: markdown + attributes: + value: |2- + Remember that first-time contributors are welcome! ๐Ÿ™Œ + + ๐Ÿ‘‹ Have a great day and thank you for the bug report! diff --git a/.github/ISSUE_TEMPLATE/documentation-issue.md b/.github/ISSUE_TEMPLATE/documentation-issue.md deleted file mode 100644 index 2735f23d34..0000000000 --- a/.github/ISSUE_TEMPLATE/documentation-issue.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -name: ๐Ÿ“ Documentation Issue -about: Documentation is unclear or otherwise insufficient. -title: '' -labels: documentation, requires triage -assignees: '' - ---- - - - -## Documentation Issue - -### What was unclear or otherwise insufficient? - - - - -### Recommended Fix - - - - -### Additional Context - - - - -### Are you willing to resolve this issue by submitting a Pull Request? - - - - - โœ… Yes, I have the time, and I know how to start. - - โœ–๏ธ Yes, I have the time, but I don't know how to start. I would need guidance. - - โœ–๏ธ No, I donโ€™t have the time, but I can support (using donations) development. - - โœ–๏ธ No, I donโ€™t have the time and Iโ€™m okay to wait for the community / maintainers to resolve this issue. - - - diff --git a/.github/ISSUE_TEMPLATE/documentation-issue.yml b/.github/ISSUE_TEMPLATE/documentation-issue.yml new file mode 100644 index 0000000000..2c99a73cf5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation-issue.yml @@ -0,0 +1,63 @@ +name: ๐Ÿ“ Documentation Issue +description: Documentation is unclear or otherwise insufficient. +labels: + - documentation + - requires triage +body: + - type: markdown + attributes: + value: >- + Have a question? This is the TypeORM issue tracker - and not the right + place for general support or questions. Instead, check the [โ€œSupport" + Documentation](https://github.com/typeorm/typeorm/blob/master/docs/support.md + + ) on the best places to ask questions! + - type: textarea + id: details + attributes: + label: What was unclear or otherwise insufficient? + description: >- + If relevant, Please be clear about the documentation file, as well as + the location within the file. Link to the documentation in the + repository. + placeholder: >- + If the page does not exist, please be clear why a new documentation + section is needed. + validations: + required: true + - type: textarea + id: recommendation + attributes: + label: Recommended Fix + description: How should we fix this documentation issue? + placeholder: Should we add examples, clarify the language, or drop the page entirely? + validations: + required: true + - type: textarea + id: context + attributes: + label: Additional Context + description: Add any other context about the documentation issue here. + - type: dropdown + id: pr + attributes: + label: Are you willing to resolve this issue by submitting a Pull Request? + options: + - Yes, I have the time, and I know how to start. + - >- + Yes, I have the time, but I don't know how to start. I would need + guidance. + - >- + No, I donโ€™t have the time, but I can support (using donations) + development. + - >- + No, I donโ€™t have the time and Iโ€™m okay to wait for the community / + maintainers to resolve this issue. + validations: + required: true + - type: markdown + attributes: + value: |- + Remember that first-time contributors are welcome! ๐Ÿ™Œ + + ๐Ÿ‘‹ Have a great day and thank you for the documentation problem report! diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md deleted file mode 100644 index 5c3fc3c9fb..0000000000 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -name: ๐ŸŒˆ Feature request -about: Suggest an amazing new idea for this project -title: '' -labels: new feature, requires triage -assignees: '' - ---- - - - -## Feature Description - -### The Problem - - - - -### The Solution - - - - -### Considered Alternatives - - - - -### Additional Context - - - - -### Relevant Database Driver(s) - - - -| DB Type | Relevant | -|-------------------| --- | -| `aurora-mysql` | no | -| `aurora-postgres` | no | -| `better-sqlite3` | no | -| `cockroachdb` | no | -| `cordova` | no | -| `expo` | no | -| `mongodb` | no | -| `mysql` | no | -| `nativescript` | no | -| `oracle` | no | -| `postgres` | no | -| `react-native` | no | -| `sap` | no | -| `spanner` | no | -| `sqlite` | no | -| `sqlite-abstract` | no | -| `sqljs` | no | -| `sqlserver` | no | - - -### Are you willing to resolve this issue by submitting a Pull Request? - - - - - โœ… Yes, I have the time, and I know how to start. - - โœ–๏ธ Yes, I have the time, but I don't know how to start. I would need guidance. - - โœ–๏ธ No, I donโ€™t have the time, but I can support (using donations) development. - - โœ–๏ธ No, I donโ€™t have the time and Iโ€™m okay to wait for the community / maintainers to resolve this issue. - - - diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 0000000000..e5f0aa9c94 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,112 @@ +name: ๐ŸŒˆ Feature request +description: Suggest an amazing new idea for this project +labels: + - new feature + - requires triage +body: + - type: markdown + attributes: + value: >- + Have a question? This is the TypeORM issue tracker - and not the right + place for general support or questions. Instead, check the [โ€œSupport" + Documentation](https://github.com/typeorm/typeorm/blob/master/docs/support.md) + on the best places to ask questions! + - type: textarea + id: problem + attributes: + label: Feature Description + description: >- + A clear and concise description of what the problem is, and why it needs + to be implemented as a new feature for TypeORM. + placeholder: For example, "I'm always frustrated when ..." + validations: + required: true + - type: textarea + id: solution + attributes: + label: The Solution + description: A clear and concise description of what you want to happen. + placeholder: >- + How can the requested feature be used to approach the problem it's + supposed to solve? + validations: + required: true + - type: textarea + id: alt + attributes: + label: Considered Alternatives + description: >- + A clear and concise description of any alternative solutions or features + you've considered. + placeholder: If any workaround exists to the best of your knowledge, include it here. + validations: + required: true + - type: textarea + id: context + attributes: + label: Additional Context + description: Add any other context about the feature request here + - type: checkboxes + id: drivers + attributes: + label: Relevant Database Driver(s) + options: + - label: aurora-mysql + required: false + - label: aurora-postgres + required: false + - label: better-sqlite3 + required: false + - label: cockroachdb + required: false + - label: cordova + required: false + - label: expo + required: false + - label: mongodb + required: false + - label: mysql + required: false + - label: nativescript + required: false + - label: oracle + required: false + - label: postgres + required: false + - label: react-native + required: false + - label: sap + required: false + - label: spanner + required: false + - label: sqlite + required: false + - label: sqlite-abstract + required: false + - label: sqljs + required: false + - label: sqlserver + required: false + - type: dropdown + id: pr + attributes: + label: Are you willing to resolve this issue by submitting a Pull Request? + options: + - Yes, I have the time, and I know how to start. + - >- + Yes, I have the time, but I don't know how to start. I would need + guidance. + - >- + No, I donโ€™t have the time, but I can support (using donations) + development. + - >- + No, I donโ€™t have the time and Iโ€™m okay to wait for the community / + maintainers to resolve this issue. + validations: + required: true + - type: markdown + attributes: + value: |- + Remember that first-time contributors are welcome! ๐Ÿ™Œ + + ๐Ÿ‘‹ Have a great day and thank you for the feature request! diff --git a/.gitignore b/.gitignore index 07cb31e4e1..d8b863970a 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,9 @@ node_modules/ ormlogs.log npm-debug.log /test/github-issues/799/tmp/* +# test projects generated by test/github-issues/issue-8975.ts +/*TestProject # ignore yarn2 artifacts but allow yarn.lock (forces yarn1 compat which is node_modules) .yarn/ .yarn* - +*.iml diff --git a/CHANGELOG.md b/CHANGELOG.md index 3965089706..85ad2473cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,151 @@ +## [0.3.16](https://github.com/typeorm/typeorm/compare/0.3.15...0.3.16) (2023-05-09) + +### Bug Fixes + +* add `trustServerCertificate` option to `SqlServerConnectionOptions` ([#9985](https://github.com/typeorm/typeorm/issues/9985)) ([0305805](https://github.com/typeorm/typeorm/commit/03058055df78034a4544e52cfd277ed1c0cbdcb2)), closes [#8093](https://github.com/typeorm/typeorm/issues/8093) +* add directConnection options to MongoDB connection ([#9955](https://github.com/typeorm/typeorm/issues/9955)) ([e0165e7](https://github.com/typeorm/typeorm/commit/e0165e75ee818c759b51a7fa3b0b3adc6befa347)) +* add onDelete option validation for oracle ([#9786](https://github.com/typeorm/typeorm/issues/9786)) ([938f94b](https://github.com/typeorm/typeorm/commit/938f94bded92b272bdcecc04534ffb879186dc44)), closes [#9189](https://github.com/typeorm/typeorm/issues/9189) +* added instanceName to options ([#9968](https://github.com/typeorm/typeorm/issues/9968)) ([7c5627f](https://github.com/typeorm/typeorm/commit/7c5627f2728500bb45a2586a3bfd34ab39d46fad)) +* added transaction retry logic in cockroachdb ([#10032](https://github.com/typeorm/typeorm/issues/10032)) ([607d6f9](https://github.com/typeorm/typeorm/commit/607d6f959525b7c01bad5fe14364e4af82d878bb)) +* allow json as alias for longtext mariadb ([#10018](https://github.com/typeorm/typeorm/issues/10018)) ([2a2bb4b](https://github.com/typeorm/typeorm/commit/2a2bb4bdc11915966a65dc144189b33d410d9d57)) +* convert the join table ID to the referenceColumn ID type ([#9887](https://github.com/typeorm/typeorm/issues/9887)) ([9460296](https://github.com/typeorm/typeorm/commit/9460296147b8117e414ca311828615d87f5ab283)) +* correct encode mongodb auth credentials ([#10024](https://github.com/typeorm/typeorm/issues/10024)) ([96b7ee4](https://github.com/typeorm/typeorm/commit/96b7ee44b2538f65c77c7d168e4f10316cc123fa)), closes [#9885](https://github.com/typeorm/typeorm/issues/9885) +* create correct children during cascade saving entities with STI ([#9034](https://github.com/typeorm/typeorm/issues/9034)) ([06c1e98](https://github.com/typeorm/typeorm/commit/06c1e98ae20cf516f4f5afc53fec4df91209f121)), closes [#7758](https://github.com/typeorm/typeorm/issues/7758) [#7758](https://github.com/typeorm/typeorm/issues/7758) [#9033](https://github.com/typeorm/typeorm/issues/9033) [#9033](https://github.com/typeorm/typeorm/issues/9033) [#7758](https://github.com/typeorm/typeorm/issues/7758) [#7758](https://github.com/typeorm/typeorm/issues/7758) +* express option bug in init command ([#10022](https://github.com/typeorm/typeorm/issues/10022)) ([5be20e2](https://github.com/typeorm/typeorm/commit/5be20e2bcd18431e457090a63a99dc06f9c2d3d2)) +* for running cli-ts-node-esm use exit code from child process ([#10030](https://github.com/typeorm/typeorm/issues/10030)) ([a188b1d](https://github.com/typeorm/typeorm/commit/a188b1d9f4cc0bdc36a30be1380104e5f38ccb24)), closes [#10029](https://github.com/typeorm/typeorm/issues/10029) +* mongodb typings breaks the browser version ([#9962](https://github.com/typeorm/typeorm/issues/9962)) ([99bef49](https://github.com/typeorm/typeorm/commit/99bef491280aedb6b337a14e6723b33e67b048d0)), closes [#9959](https://github.com/typeorm/typeorm/issues/9959) +* RelationIdLoader has access to queryPlanner when wrapped in transaction ([#9990](https://github.com/typeorm/typeorm/issues/9990)) ([21a9d67](https://github.com/typeorm/typeorm/commit/21a9d67fcf294e805c416d55394d55b238860b7d)), closes [#9988](https://github.com/typeorm/typeorm/issues/9988) +* resolve duplicate subscriber updated columns ([#9958](https://github.com/typeorm/typeorm/issues/9958)) ([3d67901](https://github.com/typeorm/typeorm/commit/3d67901fde2750a8c10521bedc3eee3d57065b43)), closes [#9948](https://github.com/typeorm/typeorm/issues/9948) +* select + addOrderBy broke in 0.3.14 ([#9961](https://github.com/typeorm/typeorm/issues/9961)) ([0e56f0f](https://github.com/typeorm/typeorm/commit/0e56f0fcf8ec3f2ec37fee92f75ba09262801655)), closes [#9960](https://github.com/typeorm/typeorm/issues/9960) +* support More/LessThanOrEqual in relations ([#9978](https://github.com/typeorm/typeorm/issues/9978)) ([8795c86](https://github.com/typeorm/typeorm/commit/8795c864e835a875e78577b5737da42d78e19247)) + +### Features + +* mariadb uuid inet4 inet6 column data type support ([#9845](https://github.com/typeorm/typeorm/issues/9845)) ([d8a2e37](https://github.com/typeorm/typeorm/commit/d8a2e3730f12bb2b8e521635e176a284594121f3)) + +### Reverts + +* "refactor: remove date-fns package ([#9634](https://github.com/typeorm/typeorm/issues/9634))" ([54f4f89](https://github.com/typeorm/typeorm/commit/54f4f8986adf197eb96ec0bc6d9d5a44d6552bcc)) + + +## [0.3.15](https://github.com/typeorm/typeorm/compare/0.3.14...0.3.15) (2023-04-15) + +### Bug Fixes + +* make cache optional fields optional ([#9942](https://github.com/typeorm/typeorm/issues/9942)) ([159c60a](https://github.com/typeorm/typeorm/commit/159c60a6e8cedbd32766fdca9694ec28cde9f6f7)) +* prevent unique index identical to primary key (all sql dialects) ([#9940](https://github.com/typeorm/typeorm/issues/9940)) ([51eecc2](https://github.com/typeorm/typeorm/commit/51eecc2aa07bfe3cfdd649fefadea3d719436d5e)) +* SelectQueryBuilder builds incorrectly escaped alias in Oracle when used on entity with composite key ([#9668](https://github.com/typeorm/typeorm/issues/9668)) ([83c6c0e](https://github.com/typeorm/typeorm/commit/83c6c0ed803f72c872fa40a740eb6fabe2102cbb)) + +### Features + +* support for the latest mongodb v5 ([#9925](https://github.com/typeorm/typeorm/issues/9925)) ([f6a3ce7](https://github.com/typeorm/typeorm/commit/f6a3ce732d86fd01807fc13c049ab51df785d772)), closes [#7907](https://github.com/typeorm/typeorm/issues/7907) [#7907](https://github.com/typeorm/typeorm/issues/7907) + +## [0.3.14](https://github.com/typeorm/typeorm/compare/0.3.12...0.3.14) (2023-04-09) + +### Bug Fixes + +* drop xml & yml connection option support. Addresses security issues in underlying dependency ([#9930](https://github.com/typeorm/typeorm/issues/9930)) ([7dac12c](https://github.com/typeorm/typeorm/commit/7dac12c2b18be34fb63ebfde988eb0825ec21384)) + +### Features + +* QueryBuilder performance optimizations ([#9914](https://github.com/typeorm/typeorm/issues/9914)) ([12e9db0](https://github.com/typeorm/typeorm/commit/12e9db07b6b9676e63fff5f55a45b1d269716ed9)) + +## [0.3.13](https://github.com/typeorm/typeorm/compare/0.3.12...0.3.13) (2023-04-06) + +### Bug Fixes + +* firstCapital=true not working in camelCase() function ([f1330ad](https://github.com/typeorm/typeorm/commit/f1330ad6e23bea65a16b4f1c4199f10f3fa7282b)) +* handles "query" relation loading strategy for TreeRepositories ([#9680](https://github.com/typeorm/typeorm/issues/9680)) ([a11809e](https://github.com/typeorm/typeorm/commit/a11809e1b20cc77fd2767b8bab2500a0c7e20d23)), closes [#9673](https://github.com/typeorm/typeorm/issues/9673) +* improve EntityNotFound error message in QueryBuilder.findOneOrFail ([#9872](https://github.com/typeorm/typeorm/issues/9872)) ([f7f6817](https://github.com/typeorm/typeorm/commit/f7f68178640120d8c1e92b8c9be0eeaa8262b4f3)) +* loading tables with fk in sqlite query runner ([#9875](https://github.com/typeorm/typeorm/issues/9875)) ([4997da0](https://github.com/typeorm/typeorm/commit/4997da054b5cfafdbdf374b3e554e5c4e0590da7)), closes [#9266](https://github.com/typeorm/typeorm/issues/9266) +* prevent foreign key support during migration batch under sqlite ([#9775](https://github.com/typeorm/typeorm/issues/9775)) ([197cc05](https://github.com/typeorm/typeorm/commit/197cc05e90c0182357d85aa1ce7ae45de99d9d98)), closes [#9770](https://github.com/typeorm/typeorm/issues/9770) +* proper default value on generating migration when default value is a function calling [Postgres] ([#9830](https://github.com/typeorm/typeorm/issues/9830)) ([bebba05](https://github.com/typeorm/typeorm/commit/bebba05388a40a9f278a450d4a988865c158abb7)) +* react-native doesn't properly work in ESM projects because of circular dependency ([#9765](https://github.com/typeorm/typeorm/issues/9765)) ([099fcd9](https://github.com/typeorm/typeorm/commit/099fcd9b104bc930faea08f97ee3d5610118e0c4)) +* resolve issues for mssql migration when simple-enum was changed ([cb154d4](https://github.com/typeorm/typeorm/commit/cb154d4ca36cda251fcb9eb05a29b7758ae813cf)), closes [#7785](https://github.com/typeorm/typeorm/issues/7785) [#9457](https://github.com/typeorm/typeorm/issues/9457) [#7785](https://github.com/typeorm/typeorm/issues/7785) [#9457](https://github.com/typeorm/typeorm/issues/9457) +* resolves issue with mssql column recreation ([#9773](https://github.com/typeorm/typeorm/issues/9773)) ([07221a3](https://github.com/typeorm/typeorm/commit/07221a364682b567533c93130efb4f5189e009a9)), closes [#9399](https://github.com/typeorm/typeorm/issues/9399) +* transform values for FindOperators [#9381](https://github.com/typeorm/typeorm/issues/9381) ([#9777](https://github.com/typeorm/typeorm/issues/9777)) ([de1228d](https://github.com/typeorm/typeorm/commit/de1228deace974eca3e9dd3956208ebe4cd9347f)), closes [#9816](https://github.com/typeorm/typeorm/issues/9816) +* use forward slashes when normalizing path ([#9768](https://github.com/typeorm/typeorm/issues/9768)) ([58fc088](https://github.com/typeorm/typeorm/commit/58fc08840a4a64ca1935391f4709a784c3f0b373)), closes [#9766](https://github.com/typeorm/typeorm/issues/9766) +* use object create if entity skip constructor is set ([#9831](https://github.com/typeorm/typeorm/issues/9831)) ([a868979](https://github.com/typeorm/typeorm/commit/a8689795dad796338e2a291a6a2fda89b00ef243)) + +### Features + +* add support for json datatype for sqlite ([#9744](https://github.com/typeorm/typeorm/issues/9744)) ([4ac8c00](https://github.com/typeorm/typeorm/commit/4ac8c00117417ae622368aabe36d0fd5c676bd00)) +* add support for STI on EntitySchema ([#9834](https://github.com/typeorm/typeorm/issues/9834)) ([bc306fb](https://github.com/typeorm/typeorm/commit/bc306fb5a2c4dc02d04632af2b2f6c697a684356)), closes [#9833](https://github.com/typeorm/typeorm/issues/9833) +* allow type FindOptionsOrderValue for order by object property ([#9895](https://github.com/typeorm/typeorm/issues/9895)) ([#9896](https://github.com/typeorm/typeorm/issues/9896)) ([0814970](https://github.com/typeorm/typeorm/commit/0814970a9cc2c958199c9d74d1ef313de43dab50)) +* Broadcast identifier for removed related entities ([#9913](https://github.com/typeorm/typeorm/issues/9913)) ([f530811](https://github.com/typeorm/typeorm/commit/f530811b0da2863711db3467e55bf815c66b4b4b)) +* leftJoinAndMapOne and innerJoinAndMapOne map result to entity ([#9354](https://github.com/typeorm/typeorm/issues/9354)) ([947ffc3](https://github.com/typeorm/typeorm/commit/947ffc34324c1d692496804e43dafa6302efc1db)) + + +## [0.3.12](https://github.com/typeorm/typeorm/compare/0.3.11...0.3.12) (2023-02-07) + +### Bug Fixes + +* allow to pass ObjectLiteral in mongo find where condition ([#9632](https://github.com/typeorm/typeorm/issues/9632)) ([4eda5df](https://github.com/typeorm/typeorm/commit/4eda5df8693d1a659ff5c3461124cf05619fdd72)), closes [#9518](https://github.com/typeorm/typeorm/issues/9518) +* DataSource.setOptions doesn't properly update the database in the drivers ([#9635](https://github.com/typeorm/typeorm/issues/9635)) ([a95bed7](https://github.com/typeorm/typeorm/commit/a95bed7c05d10eb4b508e225faa4cb3c7ea7944f)) +* Fix grammar error in no migrations found log ([#9754](https://github.com/typeorm/typeorm/issues/9754)) ([6fb2121](https://github.com/typeorm/typeorm/commit/6fb212187fdf97c07c41aad20d4f5503dfd44215)) +* improved `FindOptionsWhere` behavior with union types ([#9607](https://github.com/typeorm/typeorm/issues/9607)) ([7726f5a](https://github.com/typeorm/typeorm/commit/7726f5ad1ec0c826510202a0f2cbeea705547eee)) +* Incorrect enum default value when table name contains dash character ([#9685](https://github.com/typeorm/typeorm/issues/9685)) ([b3b0c11](https://github.com/typeorm/typeorm/commit/b3b0c118a40441b31ac18ee7ce0cea0696b701ab)) +* incorrect sorting of entities with multi-inheritances ([#9406](https://github.com/typeorm/typeorm/issues/9406)) ([54ca9dd](https://github.com/typeorm/typeorm/commit/54ca9dd801a77e011c2faf056b9e12845ccde82b)) +* make sure "require" is defined in the environment ([1a9b9fb](https://github.com/typeorm/typeorm/commit/1a9b9fbcd683b2a28acbd26e39ac98dc6b60f001)) +* materialized hints support for cte ([#9605](https://github.com/typeorm/typeorm/issues/9605)) ([67973b4](https://github.com/typeorm/typeorm/commit/67973b4726500fc835639ffc302e0b6b20093df4)) +* multiple select queries during db sync in sqlite ([#9639](https://github.com/typeorm/typeorm/issues/9639)) ([6c928a4](https://github.com/typeorm/typeorm/commit/6c928a4aa002cf5db0733055c0a754e97e4b43b3)) +* overriding caching settings when alwaysEnabled is true ([#9731](https://github.com/typeorm/typeorm/issues/9731)) ([4df969e](https://github.com/typeorm/typeorm/commit/4df969ea6254f9f69c371a72d80e857ab7c1f62d)) +* redundant Unique constraint on primary join column in Postgres ([#9677](https://github.com/typeorm/typeorm/issues/9677)) ([b8704f8](https://github.com/typeorm/typeorm/commit/b8704f87d2e06c048dea3f0b408ab18738acf7d7)) +* remove unnecessary .js extension in imports ([#9713](https://github.com/typeorm/typeorm/issues/9713)) ([6b37e38](https://github.com/typeorm/typeorm/commit/6b37e3818bd74541cadbd44e55c84df510e41e3a)) +* resolve issue with "simple-enum" synchronization in SQLite ([#9716](https://github.com/typeorm/typeorm/issues/9716)) ([c77c43e](https://github.com/typeorm/typeorm/commit/c77c43e2423201bdc2ede85ae921447570685585)), closes [#9715](https://github.com/typeorm/typeorm/issues/9715) +* sql expression when `where` parameter is empty array ([#9691](https://github.com/typeorm/typeorm/issues/9691)) ([7df2ccf](https://github.com/typeorm/typeorm/commit/7df2ccf69d13f8f0769e614638d8badd89c181b0)), closes [#9690](https://github.com/typeorm/typeorm/issues/9690) +* synchronizing View with schema broken for oracle ([#9602](https://github.com/typeorm/typeorm/issues/9602)) ([18b659d](https://github.com/typeorm/typeorm/commit/18b659d1298a4606da0ea54ebd852f1c726ed4f2)) + +### Features + +* add find operator json contains ([#9665](https://github.com/typeorm/typeorm/issues/9665)) ([d2f37f6](https://github.com/typeorm/typeorm/commit/d2f37f6e72f3f7566bcd312a256c652ea5dc5508)) +* allow mysql2 v3 as peerDependency ([#9747](https://github.com/typeorm/typeorm/issues/9747)) ([6c9010e](https://github.com/typeorm/typeorm/commit/6c9010e466ef103685ad842b5bcfef8ad8ace0c2)), closes [#9714](https://github.com/typeorm/typeorm/issues/9714) +* naming strategy for legacy Oracle ([#9703](https://github.com/typeorm/typeorm/issues/9703)) ([0eb7441](https://github.com/typeorm/typeorm/commit/0eb74411d62f9132ba45154040b204f31a98c779)) +* support busy_timeout param parameter for sqlite ([#9623](https://github.com/typeorm/typeorm/issues/9623)) ([8668c29](https://github.com/typeorm/typeorm/commit/8668c29d83765001d68918f0fbe663061eee9373)) +* support enableWal for the better-sqlite3 driver ([#9619](https://github.com/typeorm/typeorm/issues/9619)) ([8731858](https://github.com/typeorm/typeorm/commit/8731858fbc88150f935b9a853f533d5c217d9d0e)) +* support for SQL aggregate functions SUM, AVG, MIN, and MAX to the Repository API ([#9737](https://github.com/typeorm/typeorm/issues/9737)) ([7d1f1d6](https://github.com/typeorm/typeorm/commit/7d1f1d69588b771c5ec393c86976008a352ddcc0)) +* support time travel queries, upsert, enums, spatial types in cockroachdb ([#9128](https://github.com/typeorm/typeorm/issues/9128)) ([defb409](https://github.com/typeorm/typeorm/commit/defb409f5650fed0b7a4ff2933208282a45572fb)), closes [#9068](https://github.com/typeorm/typeorm/issues/9068) [#8532](https://github.com/typeorm/typeorm/issues/8532) [#8532](https://github.com/typeorm/typeorm/issues/8532) [#9199](https://github.com/typeorm/typeorm/issues/9199) +* update mssql dependency and other dependencies as well ([#9763](https://github.com/typeorm/typeorm/issues/9763)) ([4555211](https://github.com/typeorm/typeorm/commit/4555211bcb71dce59b418a185141cc413a910352)) + + +## [0.3.11](https://github.com/typeorm/typeorm/compare/0.3.10...0.3.11) (2022-12-03) + +### Fixes + +* boolean parameter escape in SQLiteDriver ([#9400](https://github.com/typeorm/typeorm/issues/9400)) ([4a36d0e](https://github.com/typeorm/typeorm/commit/4a36d0e8c1c50260b3a15c693802856341adfee6)), closes [#1981](https://github.com/typeorm/typeorm/issues/1981) +* cacheId not used when loading relations with take ([#9469](https://github.com/typeorm/typeorm/issues/9469)) ([93e6b3d](https://github.com/typeorm/typeorm/commit/93e6b3dd8e6c26c64a30350a6dcd486c47d7e516)) +* correctly return insertId for react-native ([#9554](https://github.com/typeorm/typeorm/issues/9554)) ([97fae63](https://github.com/typeorm/typeorm/commit/97fae631b33e5bea957f96b242df30737e2c3792)) +* disable transactionSupport option for CordovaDriver ([#9391](https://github.com/typeorm/typeorm/issues/9391)) ([53fad8f](https://github.com/typeorm/typeorm/commit/53fad8f235140b5625d0f2fb738c74d33fa31ea2)) +* explicitly define property for entity relation as enumerable ([#9437](https://github.com/typeorm/typeorm/issues/9437)) ([85fa9c6](https://github.com/typeorm/typeorm/commit/85fa9c6e7df1a0e3ba8c95d64d9b2a6ab464e0e0)), closes [#6631](https://github.com/typeorm/typeorm/issues/6631) +* fix ormUtils prototype check crashing on null prototype ([#9517](https://github.com/typeorm/typeorm/issues/9517)) ([19536ed](https://github.com/typeorm/typeorm/commit/19536edc3997d4ce83da28cc63b3962491c093d9)) +* fixed outdated `init` command ([#9422](https://github.com/typeorm/typeorm/issues/9422)) ([0984307](https://github.com/typeorm/typeorm/commit/09843078bec2e8bccece0807847ba0bc100aef5f)) +* left instead of inner join for where or + optional relations ([#9516](https://github.com/typeorm/typeorm/issues/9516)) ([d490793](https://github.com/typeorm/typeorm/commit/d490793c7ced454bcc4d770638701a54032595cc)) +* Mark array arguments to find operators as read-only ([#9474](https://github.com/typeorm/typeorm/issues/9474)) ([6eb674b](https://github.com/typeorm/typeorm/commit/6eb674bb9d5272b41b3312211e3a55390e2fe2ff)) +* pass fake flag to undoLastMigration ([#9562](https://github.com/typeorm/typeorm/issues/9562)) ([2458ac7](https://github.com/typeorm/typeorm/commit/2458ac70444ec79f800a9f5d7b8c42aeacaf4571)), closes [#9561](https://github.com/typeorm/typeorm/issues/9561) +* resolve issue with migrations and unsigned int columns in aurora-data-api ([#9478](https://github.com/typeorm/typeorm/issues/9478)) ([38e0eff](https://github.com/typeorm/typeorm/commit/38e0eff18ae23133dd0f8a392a1943a7572e68f7)), closes [#9477](https://github.com/typeorm/typeorm/issues/9477) +* resolve nameless TableForeign on drop foreign key ([#9460](https://github.com/typeorm/typeorm/issues/9460)) ([efb4168](https://github.com/typeorm/typeorm/commit/efb41688403b4daf59a129d0fd24aa4dadb626a6)), closes [#9432](https://github.com/typeorm/typeorm/issues/9432) +* synchronize with typeorm_metadata table only if needed ([#9175](https://github.com/typeorm/typeorm/issues/9175)) ([cdabaa3](https://github.com/typeorm/typeorm/commit/cdabaa30287d357c0ae994209e573f97f92dad22)), closes [#9173](https://github.com/typeorm/typeorm/issues/9173) [#9173](https://github.com/typeorm/typeorm/issues/9173) [#9173](https://github.com/typeorm/typeorm/issues/9173) +* the mpath is incorrect when the parent of the tree entity is null ([#9535](https://github.com/typeorm/typeorm/issues/9535)) ([658604d](https://github.com/typeorm/typeorm/commit/658604d0aeb65304053378ce0405f41217da45f1)) +* typings for Repository.extend function ([#9396](https://github.com/typeorm/typeorm/issues/9396)) ([f07fb2c](https://github.com/typeorm/typeorm/commit/f07fb2c3f2a4e970aef247cfd25b4a501933e6cc)) + + +### Features + +* "And" operator in FindOptions ([#9489](https://github.com/typeorm/typeorm/issues/9489)) ([fc3b4f8](https://github.com/typeorm/typeorm/commit/fc3b4f8021271601d5b896b6b30b3820303ca6fe)), closes [#3113](https://github.com/typeorm/typeorm/issues/3113) +* add id in migrate:show command logging ([#9475](https://github.com/typeorm/typeorm/issues/9475)) ([71efa8e](https://github.com/typeorm/typeorm/commit/71efa8e8590b6c2ff58e46cdaed0ef2c146e3eb0)) +* add Open DB Flags and URI DB Name in SQLite ([#9468](https://github.com/typeorm/typeorm/issues/9468)) ([73148c9](https://github.com/typeorm/typeorm/commit/73148c9ad484983123090f2ebedd3f48f83808ce)) +* add parseInt8 option to postgres driver. Closes [#9341](https://github.com/typeorm/typeorm/issues/9341) ([#9435](https://github.com/typeorm/typeorm/issues/9435)) ([2473ff0](https://github.com/typeorm/typeorm/commit/2473ff0a8eca2fafffdabd6fa4cc46b76347f0c2)) +* Add synchronize to @JoinTable ([#9442](https://github.com/typeorm/typeorm/issues/9442)) ([93e14a9](https://github.com/typeorm/typeorm/commit/93e14a928bc8755742ddbe81dffd44eac21c05e4)), closes [#3443](https://github.com/typeorm/typeorm/issues/3443) +* added opaque types support over primitives in find-options ([#9560](https://github.com/typeorm/typeorm/issues/9560)) ([4ec04fa](https://github.com/typeorm/typeorm/commit/4ec04fa1205ec9587946869c56077dae5454a063)) +* allow for partial index conditions for on conflict statments in postgres ([#8971](https://github.com/typeorm/typeorm/issues/8971)) ([2c54381](https://github.com/typeorm/typeorm/commit/2c543818158ecf0a3425b2bc7c5b26f6aff95b03)) +* allow peerDependency of better-sqlite3 version 8.x.x ([#9564](https://github.com/typeorm/typeorm/issues/9564)) ([26107e6](https://github.com/typeorm/typeorm/commit/26107e6b313fcc1a4c68998caa480a416a3af3e1)), closes [#9563](https://github.com/typeorm/typeorm/issues/9563) +* allow per-migration control over transaction behavior ([#9459](https://github.com/typeorm/typeorm/issues/9459)) ([6ba48bd](https://github.com/typeorm/typeorm/commit/6ba48bdc1bf032540256f6435327e70204bdfd6e)), closes [#7087](https://github.com/typeorm/typeorm/issues/7087) +* implement exists query method ([#9303](https://github.com/typeorm/typeorm/issues/9303)) ([598e269](https://github.com/typeorm/typeorm/commit/598e26980d0ae8431f53c14afe8f1f3ba93e43c1)), closes [#2815](https://github.com/typeorm/typeorm/issues/2815) +* index support for materialized views of PostgreSQL ([#9414](https://github.com/typeorm/typeorm/issues/9414)) ([1cb738a](https://github.com/typeorm/typeorm/commit/1cb738a701fde93814f9aaeee1b99ece938c0744)) +* migration:generate successful exit the process with zero code ([#9288](https://github.com/typeorm/typeorm/issues/9288)) ([f215e2d](https://github.com/typeorm/typeorm/commit/f215e2d16f75c730d0f2bdbd9abdbccd3b69865e)) +* new virtual column decorator ([#9339](https://github.com/typeorm/typeorm/issues/9339)) ([d305e5f](https://github.com/typeorm/typeorm/commit/d305e5f9ac431f9b38a21e493886bf4836daa488)), closes [#9323](https://github.com/typeorm/typeorm/issues/9323) [typeorm#9323](https://github.com/typeorm/issues/9323) [typeorm#9323](https://github.com/typeorm/issues/9323) [typeorm#9323](https://github.com/typeorm/issues/9323) [typeorm#9323](https://github.com/typeorm/issues/9323) +* upsert options conflictPaths as Entity keys ([#9365](https://github.com/typeorm/typeorm/issues/9365)) ([b282428](https://github.com/typeorm/typeorm/commit/b2824288f83b76b1bb8af83f51e814cc8311e4e5)) + ## [0.3.10](https://github.com/typeorm/typeorm/compare/0.3.9...0.3.10) (2022-09-19) ### Bug Fixes diff --git a/DEVELOPER.md b/DEVELOPER.md index 81db3ac156..d79cf04e34 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -57,8 +57,8 @@ Install all TypeORM dependencies by running this command: npm install ``` -During installation you may have some problems with some dependencies. -For example to proper install oracle driver you need to follow all instructions from +During installation, you may have some problems with some dependencies. +For example to properly install oracle driver you need to follow all instructions from [node-oracle documentation](https://github.com/oracle/node-oracledb). ## ORM config diff --git a/README-zh_CN.md b/README-zh_CN.md index f215a4cf2e..ab0ff83564 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -56,7 +56,6 @@ TypeORM ็š„ไธ€ไบ›็‰นๆ€ง: - ็›‘ๅฌ่€…ๅ’Œ่ฎข้˜…่€…๏ผˆ้’ฉๅญ๏ผ‰ - ๆ”ฏๆŒ้—ญๅŒ…่กจๆจกๅผ - ๅœจๆจกๅž‹ๆˆ–่€…ๅˆ†็ฆป็š„้…็ฝฎๆ–‡ไปถไธญๅฃฐๆ˜Žๆจกๅผ -- json / xml / yml / env ๆ ผๅผ็š„่ฟžๆŽฅ้…็ฝฎ - ๆ”ฏๆŒ MySQL / MariaDB / Postgres / SQLite / Microsoft SQL Server / Oracle / SAP Hana / sql.js - ๆ”ฏๆŒ MongoDB NoSQL ๆ•ฐๆฎๅบ“ - ๅฏๅœจ NodeJS / ๆต่งˆๅ™จ / Ionic / Cordova / React Native / Expo / Electron ๅนณๅฐไธŠไฝฟ็”จ diff --git a/README.md b/README.md index 1022aaae60..69dcf52b19 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,6 @@ TypeORM is highly influenced by other ORMs, such as [Hibernate](http://hibernate - Listeners and subscribers (hooks). - Supports closure table pattern. - Schema declaration in models or separate configuration files. -- Connection configuration in json / xml / yml / env formats. - Supports MySQL / MariaDB / Postgres / CockroachDB / SQLite / Microsoft SQL Server / Oracle / SAP Hana / sql.js. - Supports MongoDB NoSQL database. - Works in NodeJS / Browser / Ionic / Cordova / React Native / NativeScript / Expo / Electron platforms. @@ -251,7 +250,7 @@ await timber.remove() - for **MongoDB** (experimental) - `npm install mongodb@^3.6.0 --save` + `npm install mongodb@^5.2.0 --save` - for **NativeScript**, **react-native** and **Cordova** @@ -1000,7 +999,7 @@ Let's change our photo's `@OneToOne` decorator a bit: ```typescript export class Photo { - /// ... other columns + // ... other columns @OneToOne(() => PhotoMetadata, (metadata) => metadata.photo, { cascade: true, @@ -1155,7 +1154,7 @@ Now let's add the inverse side of our relation to the `Photo` class: ```typescript export class Photo { - /// ... other columns + // ... other columns @ManyToMany(() => Album, (album) => album.photos) albums: Album[] diff --git a/README_ko.md b/README_ko.md index 4ef2edcc3c..85fe008d00 100644 --- a/README_ko.md +++ b/README_ko.md @@ -37,7 +37,6 @@ TypeORM์€ [Hibernate](http://hibernate.org/orm/), [Doctrine](http://www.doctrin - ๋ฆฌ์Šค๋„ˆ ๋ฐ ๊ตฌ๋…์ž(hooks). - ํด๋กœ์ € ํ…Œ์ด๋ธ” ํŒจํ„ด ์ง€์›. - ๋ชจ๋ธ ๋˜๋Š” ๋ณ„๋„์˜ ์„ค์ • ํŒŒ์ผ์—์„œ ์Šคํ‚ค๋งˆ ์„ ์–ธ. -- json / xml / yml / env ํ˜•์‹์˜ ์—ฐ๊ฒฐ ๊ตฌ์„ฑ. - MySQL / MariaDB / Postgres / CockroachDB / SQLite / Microsoft SQL Server / Oracle / SAP Hana / sql.js๋ฅผ ์ง€์›. - MongoDB NoSQL ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์ง€์›. - NodeJS / Browser / Ionic / Cordova / React Native / NativeScript / Expo / Electron ํ”Œ๋žซํผ์—์„œ ์ž‘๋™. @@ -185,7 +184,7 @@ await timber.remove(); - **MongoDB** (experimental)์˜ ๊ฒฝ์šฐ - `npm install mongodb@^3.6.0 --save` + `npm install mongodb@^5.2.0 --save` - **NativeScript**, **react-native**, **Cordova**์˜ ๊ฒฝ์šฐ diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000000..e26d2a9973 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,23 @@ +## Security + +If you believe you have found a security vulnerability in any TypeORM-owned repository, please report it to us as described below. + +## Reporting a Vulnerability + +**Please do not report security vulnerabilities through public GitHub issues, discussions, or pull requests.** + +Instead, please send an email to support@typeorm.io. + +Please include as much of the information listed below as you can to help us better understand and resolve the issue: + + * The type of issue (e.g., buffer overflow, SQL injection, or cross-site scripting) + * Full paths of source file(s) related to the manifestation of the issue + * The location of the affected source code (tag/branch/commit or direct URL) + * Any special configuration required to reproduce the issue + * Step-by-step instructions to reproduce the issue + * Proof-of-concept or exploit code (if possible) + * Impact of the issue, including how an attacker might exploit the issue + +This information will help us triage your report more quickly. + +You will receive a response from us within 72 hours. If the issue is confirmed, we will release a patch as soon as possible depending on complexity. diff --git a/docker-compose.yml b/docker-compose.yml index a82254ec09..5ffbc1b584 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,7 +14,7 @@ services: # mariadb mariadb: - image: "mariadb:10.8.4" + image: "mariadb:10.10.3" container_name: "typeorm-mariadb" ports: - "3307:3306" @@ -53,7 +53,7 @@ services: # mssql mssql: - image: "mcr.microsoft.com/mssql/server:2017-latest-ubuntu" + image: "mcr.microsoft.com/mssql/server:2022-latest" container_name: "typeorm-mssql" ports: - "1433:1433" diff --git a/docs/data-source-options.md b/docs/data-source-options.md index ed33d8df94..47d948b0a6 100644 --- a/docs/data-source-options.md +++ b/docs/data-source-options.md @@ -97,10 +97,6 @@ Different RDBMS-es have their own specific options. - `cache` - Enables entity result caching. You can also configure cache type and other cache options here. Read more about caching [here](caching.md). -- `cli.entitiesDir` - Directory where entities should be created by default by CLI. - -- `cli.subscribersDir` - Directory where subscribers should be created by default by CLI. - ## `mysql` / `mariadb` data source options - `url` - Connection url where perform connection to. Please note that other data source options will override parameters set from url. @@ -186,12 +182,19 @@ Different RDBMS-es have their own specific options. - `poolErrorHandler` - A function that get's called when underlying pool emits `'error'` event. Takes single parameter (error instance) and defaults to logging with `warn` level. +- `maxTransactionRetries` - A maximum number of transaction retries in case of 40001 error. Defaults to 5. + - `logNotifications` - A boolean to determine whether postgres server [notice messages](https://www.postgresql.org/docs/current/plpgsql-errors-and-messages.html) and [notification events](https://www.postgresql.org/docs/current/sql-notify.html) should be included in client's logs with `info` level (default: `false`). - `installExtensions` - A boolean to control whether to install necessary postgres extensions automatically or not (default: `true`) - `applicationName` - A string visible in statistics and logs to help referencing an application to a connection (default: `undefined`) +- `parseInt8` - A boolean to enable parsing 64-bit integers (int8) as JavaScript integers. + By default int8 (bigint) values are returned as strings to avoid overflows. + JavaScript doesn't have support for 64-bit integers, the maximum safe integer in js is: Number.MAX_SAFE_INTEGER (`+2^53`). Be careful when enabling `parseInt8`. + Note: This option is ignored if the undelying driver does not support it. + ## `sqlite` data source options - `database` - Database path. For example "mydb.sql" @@ -377,6 +380,8 @@ Different RDBMS-es have their own specific options. - `options.appName` - Application name used for identifying a specific application in profiling, logging or tracing tools of SQL Server. (default: `node-mssql`) +- `options.trustServerCertificate` - A boolean, controlling whether encryption occurs if there is no verifiable server certificate. (default: `false`) + - `options.debug.packet` - A boolean, controlling whether `debug` events will be emitted with text describing packet details (default: `false`). @@ -505,6 +510,8 @@ Different RDBMS-es have their own specific options. - `authMechanism` - Sets the authentication mechanism that MongoDB will use to authenticate the connection. +- `directConnection` - Specifies whether to force dispatch all operations to the specified host. + ## `sql.js` data source options - `database`: The raw UInt8Array database that should be imported. @@ -548,11 +555,6 @@ Here is a small example of data source options for mysql: ], migrations: [ "migration/*.js" - ], - cli: { - entitiesDir: "entity", - migrationsDir: "migration", - subscribersDir: "subscriber" - } + ] } ``` diff --git a/docs/data-source.md b/docs/data-source.md index 337926f06c..dc6af1e93a 100644 --- a/docs/data-source.md +++ b/docs/data-source.md @@ -8,7 +8,7 @@ Your interaction with the database is only possible once you setup a `DataSource`. TypeORM's `DataSource` holds your database connection settings and -establishes initial database connection or connection pool depend on RDBMS you use. +establishes initial database connection or connection pool depending on the RDBMS you use. In order to establish initial connection / connection pool you must call `initialize` method of your `DataSource` instance. diff --git a/docs/decorator-reference.md b/docs/decorator-reference.md index 2f5f133ee1..9783a0fcd8 100644 --- a/docs/decorator-reference.md +++ b/docs/decorator-reference.md @@ -206,8 +206,8 @@ export class User { - `hstoreType: "object"|"string"` - Return type of `HSTORE` column. Returns value as string or as object. Used only in [Postgres](https://www.postgresql.org/docs/9.6/static/hstore.html). - `array: boolean` - Used for postgres and cockroachdb column types which can be array (for example int[]). - `transformer: ValueTransformer|ValueTransformer[]` - Specifies a value transformer (or array of value transformers) that is to be used to (un)marshal this column when reading or writing to the database. In case of an array, the value transformers will be applied in the natural order from entityValue to databaseValue, and in reverse order from databaseValue to entityValue. -- `spatialFeatureType: string` - Optional feature type (`Point`, `Polygon`, `LineString`, `Geometry`) used as a constraint on a spatial column. If not specified, it will behave as though `Geometry` was provided. Used only in PostgreSQL. -- `srid: number` - Optional [Spatial Reference ID](https://postgis.net/docs/using_postgis_dbmanagement.html#spatial_ref_sys) used as a constraint on a spatial column. If not specified, it will default to `0`. Standard geographic coordinates (latitude/longitude in the WGS84 datum) correspond to [EPSG 4326](http://spatialreference.org/ref/epsg/wgs-84/). Used only in PostgreSQL. +- `spatialFeatureType: string` - Optional feature type (`Point`, `Polygon`, `LineString`, `Geometry`) used as a constraint on a spatial column. If not specified, it will behave as though `Geometry` was provided. Used only in PostgreSQL and CockroachDB. +- `srid: number` - Optional [Spatial Reference ID](https://postgis.net/docs/using_postgis_dbmanagement.html#spatial_ref_sys) used as a constraint on a spatial column. If not specified, it will default to `0`. Standard geographic coordinates (latitude/longitude in the WGS84 datum) correspond to [EPSG 4326](http://spatialreference.org/ref/epsg/wgs-84/). Used only in PostgreSQL and CockroachDB. Learn more about [entity columns](entities.md#entity-columns). @@ -287,16 +287,16 @@ Learn more about [entity columns](entities.md#entity-columns). #### `@ObjectIdColumn` -Marks a property in your entity as ObjectID. +Marks a property in your entity as ObjectId. This decorator is only used in MongoDB. -Every entity in MongoDB must have a ObjectID column. +Every entity in MongoDB must have a ObjectId column. Example: ```typescript @Entity() export class User { @ObjectIdColumn() - id: ObjectID + id: ObjectId } ``` @@ -539,6 +539,7 @@ Used for `many-to-many` relations and describes join columns of the "junction" t Junction table is a special, separate table created automatically by TypeORM with columns referenced to the related entities. You can change the name of the generated "junction" table, the column names inside the junction table, their referenced columns with the `joinColumn`- and `inverseJoinColumn` attributes, and the created foreign keys names. +You can also set parameter `synchronize` to false to skip schema update(same way as in @Entity) Example: @@ -558,6 +559,7 @@ export class Post { referencedColumnName: "id", foreignKeyConstraintName: "fk_question_categories_categoryId" }, + synchronize: false, }) categories: Category[] } diff --git a/docs/entities.md b/docs/entities.md index 2d9e28671c..c061f74ef2 100644 --- a/docs/entities.md +++ b/docs/entities.md @@ -198,7 +198,7 @@ There are several special column types with additional functionality available: ### Spatial columns -MS SQL, MySQL / MariaDB, and PostgreSQL all support spatial columns. TypeORM's +MS SQL, MySQL, MariaDB, PostgreSQL and CockroachDB all support spatial columns. TypeORM's support for each varies slightly between databases, particularly as the column names vary between databases. @@ -207,10 +207,85 @@ be provided as [well-known text (WKT)](https://en.wikipedia.org/wiki/Well-known_text), so geometry columns should be tagged with the `string` type. -TypeORM's PostgreSQL support uses [GeoJSON](http://geojson.org/) as an +```typescript +import { Entity, PrimaryColumn, Column } from "typeorm" + +@Entity() +export class Thing { + @PrimaryColumn() + id: number + + @Column("point") + point: string + + @Column("linestring") + linestring: string +} + +... + +const thing = new Thing() +thing.point = "POINT(1 1)" +thing.linestring = "LINESTRING(0 0,1 1,2 2)" +``` + +TypeORM's PostgreSQL and CockroachDB support uses [GeoJSON](http://geojson.org/) as an interchange format, so geometry columns should be tagged either as `object` or `Geometry` (or subclasses, e.g. `Point`) after importing [`geojson` -types](https://www.npmjs.com/package/@types/geojson). +types](https://www.npmjs.com/package/@types/geojson) or using TypeORM built in [GeoJSON types](../src/driver/types/GeoJsonTypes.ts). + +```typescript +import { + Entity, + PrimaryColumn, + Column, + Point, + LineString, + MultiPoint +} from "typeorm" + +@Entity() +export class Thing { + @PrimaryColumn() + id: number + + @Column("geometry") + point: Point + + @Column("geometry") + linestring: LineString + + @Column("geometry", { + spatialFeatureType: "MultiPoint", + srid: 4326, + }) + multiPointWithSRID: MultiPoint +} + +... + +const thing = new Thing() +thing.point = { + type: "Point", + coordinates: [116.443987, 39.920843], +} +thing.linestring = { + type: "LineString", + coordinates: [ + [-87.623177, 41.881832], + [-90.199402, 38.627003], + [-82.446732, 38.413651], + [-87.623177, 41.881832], + ], +} +thing.multiPointWithSRID = { + type: "MultiPoint", + coordinates: [ + [100.0, 0.0], + [101.0, 1.0], + ], +} +``` TypeORM tries to do the right thing, but it's not always possible to determine when a value being inserted or the result of a PostGIS function should be @@ -219,7 +294,9 @@ to the following, where values are converted into PostGIS `geometry`s from GeoJSON and into GeoJSON as `json`: ```typescript -const origin = { +import { Point } from "typeorm" + +const origin: Point = { type: "Point", coordinates: [0, 0], } @@ -292,7 +369,10 @@ or `timestamp`, `time`, `year`, `char`, `nchar`, `national char`, `varchar`, `nvarchar`, `national varchar`, `text`, `tinytext`, `mediumtext`, `blob`, `longtext`, `tinyblob`, `mediumblob`, `longblob`, `enum`, `set`, `json`, `binary`, `varbinary`, `geometry`, `point`, `linestring`, `polygon`, `multipoint`, `multilinestring`, -`multipolygon`, `geometrycollection` +`multipolygon`, `geometrycollection`, `uuid`, `inet4`, `inet6` + +> Note: UUID, INET4, and INET6 are only available for mariadb and for respective versions that made them available. + ### Column types for `postgres` diff --git a/docs/entity-manager-api.md b/docs/entity-manager-api.md index 2f69531afd..3c339c9d86 100644 --- a/docs/entity-manager-api.md +++ b/docs/entity-manager-api.md @@ -136,8 +136,8 @@ await manager.insert(User, [ - `update` - Partially updates entity by a given update options or entity id. ```typescript -await manager.update(User, { firstName: "Timber" }, { firstName: "Rizzrak" }) -// executes UPDATE user SET firstName = Rizzrak WHERE firstName = Timber +await manager.update(User, { age: 18 }, { category: "ADULT" }) +// executes UPDATE user SET category = ADULT WHERE age = 18 await manager.update(User, 1, { firstName: "Rizzrak" }) // executes UPDATE user SET firstName = Rizzrak WHERE id = 1 @@ -252,7 +252,7 @@ const timber = await manager.findOne(User, { - `findOneBy` - Finds the first entity that matches given `FindOptionsWhere`. ```typescript -const timber = await manager.findOne(User, { firstName: "Timber" }) +const timber = await manager.findOneBy(User, { firstName: "Timber" }) ``` - `findOneOrFail` - Finds the first entity that matches some id or find options. diff --git a/docs/indices.md b/docs/indices.md index 805f9e9be5..b4d8183235 100644 --- a/docs/indices.md +++ b/docs/indices.md @@ -103,7 +103,7 @@ export class User { ## Spatial Indices -MySQL and PostgreSQL (when PostGIS is available) both support spatial indices. +MySQL, CockroachDB and PostgreSQL (when PostGIS is available) supports spatial indices. To create a spatial index on a column in MySQL, add an `Index` with `spatial: true` on a column that uses a spatial type (`geometry`, `point`, `linestring`, `polygon`, `multipoint`, `multilinestring`, `multipolygon`, @@ -118,7 +118,7 @@ export class Thing { } ``` -To create a spatial index on a column in PostgreSQL, add an `Index` with `spatial: true` on a column that uses a spatial type (`geometry`, `geography`): +To create a spatial index on a column add an `Index` with `spatial: true` on a column that uses a spatial type (`geometry`, `geography`): ```typescript export interface Geometry { diff --git a/docs/insert-query-builder.md b/docs/insert-query-builder.md index 893bbc5f9f..541711b64c 100644 --- a/docs/insert-query-builder.md +++ b/docs/insert-query-builder.md @@ -35,3 +35,69 @@ await dataSource ``` This syntax doesn't escape your values, you need to handle escape on your own. + +### Update values ON CONFLICT + +If the values you are trying to insert conflict due to existing data the `orUpdate` function can be used to update specific values on the conflicted target. + +```typescript +await datasource + .createQueryBuilder() + .insert() + .into(User) + .values({ + firstName: "Timber", + lastName: "Saw", + externalId: "abc123", + }) + .orUpdate( + ["firstName", "lastName"], + ["externalId"], + ) + .execute() +``` + +### Skip data update if values have not changed (Postgres) + +```typescript +await datasource + .createQueryBuilder() + .insert() + .into(User) + .values({ + firstName: "Timber", + lastName: "Saw", + externalId: "abc123", + }) + .orUpdate( + ["firstName", "lastName"], + ["externalId"], + { + skipUpdateIfNoValuesChanged: true, + } + ) + .execute() +``` + +### Use partial index (Postgres) + +```typescript +await datasource + .createQueryBuilder() + .insert() + .into(User) + .values({ + firstName: "Timber", + lastName: "Saw", + externalId: "abc123", + }) + .orUpdate( + ["firstName", "lastName"], + ["externalId"], + { + skipUpdateIfNoValuesChanged: true, + indexPredicate: "date > 2020-01-01" + } + ) + .execute() +``` \ No newline at end of file diff --git a/docs/logging.md b/docs/logging.md index 3c19483486..eb088e2b4d 100644 --- a/docs/logging.md +++ b/docs/logging.md @@ -79,7 +79,7 @@ by setting `maxQueryExecutionTime` in data source options: } ``` -This code will log all queries which run more then `1 second`. +This code will log all queries which run for more than `1 second`. ## Changing default logger @@ -115,6 +115,64 @@ export class MyCustomLogger implements Logger { } ``` +Or you can extend the `AbstractLogger` class: + +```typescript +import { AbstractLogger } from "typeorm" + +export class MyCustomLogger implements AbstractLogger { + /** + * Write log to specific output. + */ + protected writeLog( + level: LogLevel, + logMessage: LogMessage | LogMessage[], + queryRunner?: QueryRunner, + ) { + const messages = this.prepareLogMessages(logMessage, { + highlightSql: false, + }) + + for (let message of messages) { + switch (message.type ?? level) { + case "log": + case "schema-build": + case "migration": + console.log(message.message) + break + + case "info": + case "query": + if (message.prefix) { + console.info(message.prefix, message.message) + } else { + console.info(message.message) + } + break + + case "warn": + case "query-slow": + if (message.prefix) { + console.warn(message.prefix, message.message) + } else { + console.warn(message.message) + } + break + + case "error": + case "query-error": + if (message.prefix) { + console.error(message.prefix, message.message) + } else { + console.error(message.message) + } + break + } + } + } +} +``` + And specify it in data source options: ```typescript @@ -134,7 +192,7 @@ const dataSource = new DataSource({ ``` Logger methods can accept `QueryRunner` when it's available. It's helpful if you want to log additional data. -Also, via query runner, you can get access to additional data passed during persist/remove. For example: +Also, via query runner, you can get access to additional data passed during to persist/remove. For example: ```typescript // user sends request during entity save diff --git a/docs/many-to-many-relations.md b/docs/many-to-many-relations.md index 814e6dc509..e44c368393 100644 --- a/docs/many-to-many-relations.md +++ b/docs/many-to-many-relations.md @@ -9,7 +9,7 @@ ## What are many-to-many relations -Many-to-many is a relation where A contains multiple instances of B, and B contain multiple instances of A. +Many-to-many is a relation where A contains multiple instances of B, and B contains multiple instances of A. Let's take for example `Question` and `Category` entities. A question can have multiple categories, and each category can have multiple questions. @@ -109,7 +109,12 @@ With [cascades](./relations.md#cascades) enabled, you can delete this relation w To delete a many-to-many relationship between two records, remove it from the corresponding field and save the record. ```typescript -const question = dataSource.getRepository(Question) +const question = await dataSource.getRepository(Question).findOne({ + relations: { + categories: true, + }, + where: { id: 1 } +}) question.categories = question.categories.filter((category) => { return category.id !== categoryToRemove.id }) @@ -264,22 +269,22 @@ import { Category } from "./category" @Entity() export class PostToCategory { @PrimaryGeneratedColumn() - public postToCategoryId!: number + public postToCategoryId: number @Column() - public postId!: number + public postId: number @Column() - public categoryId!: number + public categoryId: number @Column() - public order!: number + public order: number @ManyToOne(() => Post, (post) => post.postToCategories) - public post!: Post + public post: Post @ManyToOne(() => Category, (category) => category.postToCategories) - public category!: Category + public category: Category } ``` @@ -289,10 +294,10 @@ Additionally you will have to add a relationship like the following to `Post` an // category.ts ... @OneToMany(() => PostToCategory, postToCategory => postToCategory.category) -public postToCategories!: PostToCategory[]; +public postToCategories: PostToCategory[]; // post.ts ... @OneToMany(() => PostToCategory, postToCategory => postToCategory.post) -public postToCategories!: PostToCategory[]; +public postToCategories: PostToCategory[]; ``` diff --git a/docs/migrations.md b/docs/migrations.md index 350ab67657..9c0ffadd26 100644 --- a/docs/migrations.md +++ b/docs/migrations.md @@ -1,11 +1,15 @@ # Migrations -- [How migrations work](#how-migrations-work) -- [Creating a new migration](#creating-a-new-migration) -- [Running and reverting migrations](#running-and-reverting-migrations) -- [Generating migrations](#generating-migrations) -- [Connection option](#connection-option) -- [Using migration API to write migrations](#using-migration-api-to-write-migrations) +- [Migrations](#migrations) + - [How migrations work](#how-migrations-work) + - [Creating a new migration](#creating-a-new-migration) + - [Running and reverting migrations](#running-and-reverting-migrations) + - [Faking Migrations and Rollbacks](#faking-migrations-and-rollbacks) + - [Transaction modes](#transaction-modes) + - [Generating migrations](#generating-migrations) + - [DataSource option](#datasource-option) + - [Timestamp option](#timestamp-option) + - [Using migration API to write migrations](#using-migration-api-to-write-migrations) ## How migrations work @@ -82,6 +86,8 @@ typeorm migration:create ./path-to-migrations-dir/PostRefactoring ``` + + Here, `PostRefactoring` is the name of the migration - you can specify any name you want. After you run the command you can see a new file generated in the "migration" directory named `{TIMESTAMP}-PostRefactoring.ts` where `{TIMESTAMP}` is the current timestamp when the migration was generated. @@ -133,7 +139,7 @@ export class PostRefactoringTIMESTAMP implements MigrationInterface { Once you have a migration to run on production, you can run them using a CLI command: ``` -typeorm migration:run +typeorm migration:run -- -d path-to-datasource-config ``` **`typeorm migration:create` and `typeorm migration:generate` will create `.ts` files, unless you use the `o` flag (see more in [Generating migrations](#generating-migrations)). The `migration:run` and `migration:revert` commands only work on `.js` files. Thus the typescript files need to be compiled before running the commands.** Alternatively you can use `ts-node` in conjunction with `typeorm` to run `.ts` migration files. @@ -141,13 +147,13 @@ typeorm migration:run Example with `ts-node`: ``` -npx typeorm-ts-node-commonjs migration:run +npx typeorm-ts-node-commonjs migration:run -- -d path-to-datasource-config ``` Example with `ts-node` in ESM projects: ``` -npx typeorm-ts-node-esm migration:run +npx typeorm-ts-node-esm migration:run -- -d path-to-datasource-config ``` ``` @@ -161,7 +167,7 @@ That's all! Now you have your database schema up-to-date. If for some reason you want to revert the changes, you can run: ``` -typeorm migration:revert +typeorm migration:revert -- -d path-to-datasource-config ``` This command will execute `down` in the latest executed migration. @@ -184,6 +190,34 @@ This is also possible with rollbacks. typeorm migration:revert --fake ``` +### Transaction modes + +By default, TypeORM will run all your migrations within a single wrapping transaction. +This corresponds to the `--transaction all` flag. +If you require more fine grained transaction control, you can use the `--transaction each` flag to wrap every migration individually, or the `--transaction none` flag to opt out of wrapping the migrations in transactions altogether. + +In addition to these flags, you can also override the transaction behavior on a per-migration basis by setting the `transaction` property on the `MigrationInterface` to `true` or `false`. This only works in the `each` or `none` transaction mode. + +```typescript +import { MigrationInterface, QueryRunner } from "typeorm" + +export class AddIndexTIMESTAMP implements MigrationInterface { + transaction = false + + async up(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `CREATE INDEX CONCURRENTLY post_names_idx ON post(name)` + ) + } + + async down(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `DROP INDEX CONCURRENTLY post_names_idx`, + ) + } +} +``` + ## Generating migrations TypeORM is able to automatically generate migration files with schema changes you made. @@ -192,7 +226,13 @@ Let's say you have a `Post` entity with a `title` column, and you have changed t You can run following command: ``` -typeorm migration:generate -n PostRefactoring +typeorm migration:generate PostRefactoring -d path-to-datasource-config +``` + +If you encounter any error, it require you have the path to migration name and data source. You can try this option + +``` +typeorm migration:generate -d path/to/migrations/ ``` And it will generate a new migration called `{TIMESTAMP}-PostRefactoring.ts` with the following content: diff --git a/docs/mongodb.md b/docs/mongodb.md index 1d6eaac68e..289777af89 100644 --- a/docs/mongodb.md +++ b/docs/mongodb.md @@ -20,12 +20,12 @@ instead of `@PrimaryColumn` or `@PrimaryGeneratedColumn`. Simple entity example: ```typescript -import { Entity, ObjectID, ObjectIdColumn, Column } from "typeorm" +import { Entity, ObjectId, ObjectIdColumn, Column } from "typeorm" @Entity() export class User { @ObjectIdColumn() - id: ObjectID + id: ObjectId @Column() firstName: string @@ -54,7 +54,7 @@ Since MongoDB stores objects and objects inside objects (or documents inside doc you can do the same in TypeORM: ```typescript -import { Entity, ObjectID, ObjectIdColumn, Column } from "typeorm" +import { Entity, ObjectId, ObjectIdColumn, Column } from "typeorm" export class Profile { @Column() @@ -69,7 +69,7 @@ export class Profile { ``` ```typescript -import { Entity, ObjectID, ObjectIdColumn, Column } from "typeorm" +import { Entity, ObjectId, ObjectIdColumn, Column } from "typeorm" export class Photo { @Column() @@ -90,12 +90,12 @@ export class Photo { ``` ```typescript -import { Entity, ObjectID, ObjectIdColumn, Column } from "typeorm" +import { Entity, ObjectId, ObjectIdColumn, Column } from "typeorm" @Entity() export class User { @ObjectIdColumn() - id: ObjectID + id: ObjectId @Column() firstName: string @@ -373,10 +373,6 @@ Returns if the collection is a capped collection. Get the list of all indexes information for the collection. -#### `mapReduce` - -Run Map Reduce across a collection. Be aware that the inline option for out will return an array of results not a collection. - #### `parallelCollectionScan` Return N number of parallel cursors for a collection allowing parallel reading of entire collection. There are no ordering guarantees for returned results diff --git a/docs/relations-faq.md b/docs/relations-faq.md index f0271ac9b7..1331985e2c 100644 --- a/docs/relations-faq.md +++ b/docs/relations-faq.md @@ -5,12 +5,13 @@ - [How to load relations in entities](#how-to-load-relations-in-entities) - [Avoid relation property initializers](#avoid-relation-property-initializers) - [Avoid foreign key constraint creation](#avoid-foreign-key-constraint-creation) +- [Avoid circular import errors](#avoid-circular-import-errors) ## How to create self referencing relation -Self-referencing relations are relations which have a relation to themself. +Self-referencing relations are relations which have a relation to themselves. This is useful when you are storing entities in a tree-like structures. -Also "adjacency list" pattern is implemented using self-referenced relations. +Also, "adjacency list" pattern is implemented using self-referenced relations. For example, you want to create categories tree in your application. Categories can nest categories, nested categories can nest other categories, etc. Self-referencing relations come handy here. @@ -204,7 +205,7 @@ export class Question { } ``` -However in TypeORM entities it may cause problems. +However, in TypeORM entities it may cause problems. To understand the problem, let's first try to load a Question entity WITHOUT the initializer set. When you load a question it will return an object like this: @@ -262,3 +263,43 @@ export class ActionLog { person: Person } ``` + +## Avoid circular import errors + +Here is an example if you want to define your entities, and you don't want those to cause errors in some environments. +In this situation we have Action.ts and Person.ts importing each other for a many-to-many relationship. +We use import type so that we can use the type information without any JavaScript code being generated. + +```typescript +import { Entity, PrimaryColumn, Column, ManytoMany } from "typeorm" +import type { Person } from "./Person" + +@Entity() +export class ActionLog { + @PrimaryColumn() + id: number + + @Column() + date: Date + + @Column() + action: string + + @ManyToMany("Person", (person: Person) => person.id) + person: Person +} +``` + +```typescript +import { Entity, PrimaryColumn, ManytoMany } from "typeorm" +import type { ActionLog } from "./Action" + +@Entity() +export class Person { + @PrimaryColumn() + id: number + + @ManyToMany("ActionLog", (actionLog: ActionLog) => actionLog.id) + log: ActionLog +} +``` diff --git a/docs/repository-api.md b/docs/repository-api.md index 0e341aa53d..c9d2ca899e 100644 --- a/docs/repository-api.md +++ b/docs/repository-api.md @@ -143,8 +143,8 @@ await repository.insert([ - `update` - Partially updates entity by a given update options or entity id. ```typescript -await repository.update({ firstName: "Timber" }, { firstName: "Rizzrak" }) -// executes UPDATE user SET firstName = Rizzrak WHERE firstName = Timber +await repository.update({ age: 18 }, { category: "ADULT" }) +// executes UPDATE user SET category = ADULT WHERE age = 18 await repository.update(1, { firstName: "Rizzrak" }) // executes UPDATE user SET firstName = Rizzrak WHERE id = 1 @@ -178,6 +178,7 @@ await repository.upsert( { conflictPaths: ["externalId"], skipUpdateIfNoValuesChanged: true, // supported by postgres, skips update if it would not change row values + upsertType: "upsert", // "on-conflict-do-update" | "on-duplicate-key-update" | "upsert" - optionally provide an UpsertType - 'upsert' is currently only supported by CockroachDB }, ) /** executes @@ -191,6 +192,30 @@ await repository.upsert( **/ ``` +```typescript +await repository.upsert( + [ + { externalId: "abc123", firstName: "Rizzrak", dateAdded: "2020-01-01" }, + { externalId: "bca321", firstName: "Karzzir", dateAdded: "2022-01-01" }, + ], + { + conflictPaths: ["externalId"], + skipUpdateIfNoValuesChanged: true, // supported by postgres, skips update if it would not change row values + indexPredicate: "dateAdded > 2020-01-01", // supported by postgres, allows for partial indexes + }, +) +/** executes + * INSERT INTO user + * VALUES + * (externalId = abc123, firstName = Rizzrak, dateAdded = 2020-01-01), + * (externalId = cba321, firstName = Karzzir, dateAdded = 2022-01-01), + * ON CONFLICT (externalId) WHERE ( dateAdded > 2021-01-01 ) DO UPDATE + * SET firstName = EXCLUDED.firstName, + * SET dateAdded = EXCLUDED.dateAdded, + * WHERE user.firstName IS DISTINCT FROM EXCLUDED.firstName OR user.dateAdded IS DISTINCT FROM EXCLUDED.dateAdded + **/ +``` + - `delete` - Deletes entities by entity id, ids or given conditions: ```typescript @@ -248,6 +273,30 @@ const count = await repository.count({ const count = await repository.countBy({ firstName: "Timber" }) ``` +- `sum` - Returns the sum of a numeric field for all entities that match `FindOptionsWhere`. + +```typescript +const sum = await repository.sum("age", { firstName: "Timber" }) +``` + +- `average` - Returns the average of a numeric field for all entities that match `FindOptionsWhere`. + +```typescript +const average = await repository.average("age", { firstName: "Timber" }) +``` + +- `minimum` - Returns the minimum of a numeric field for all entities that match `FindOptionsWhere`. + +```typescript +const minimum = await repository.minimum("age", { firstName: "Timber" }) +``` + +- `maximum` - Returns the maximum of a numeric field for all entities that match `FindOptionsWhere`. + +```typescript +const maximum = await repository.maximum("age", { firstName: "Timber" }) +``` + - `find` - Finds entities that match given `FindOptions`. ```typescript diff --git a/docs/select-query-builder.md b/docs/select-query-builder.md index 0d999d50af..cc23e86239 100644 --- a/docs/select-query-builder.md +++ b/docs/select-query-builder.md @@ -4,6 +4,7 @@ - [Important note when using the `QueryBuilder`](#important-note-when-using-the-querybuilder) - [How to create and use a `QueryBuilder`](#how-to-create-and-use-a-querybuilder) - [Getting values using QueryBuilder](#getting-values-using-querybuilder) +- [Getting a count](#getting-a-count) - [What are aliases for?](#what-are-aliases-for) - [Using parameters to escape data](#using-parameters-to-escape-data) - [Adding `WHERE` expression](#adding-where-expression) @@ -28,6 +29,7 @@ - [Using subqueries](#using-subqueries) - [Hidden Columns](#hidden-columns) - [Querying Deleted rows](#querying-deleted-rows) +- [Debugging](#debugging) ## What is `QueryBuilder` @@ -252,6 +254,24 @@ const photosSums = await dataSource // result will be like this: [{ id: 1, sum: 25 }, { id: 2, sum: 13 }, ...] ``` +## Getting a count + +You can get the count on the number of rows a query will return by using `getCount()`. This will return the count as a number rather than an Entity result. + +```typescript +const count = await dataSource + .getRepository(User) + .createQueryBuilder("user") + .where("user.name = :name", { name: "Timber" }) + .getCount() +``` + +Which produces the following SQL query: + +```sql +SELECT count(*) FROM users user WHERE user.name = 'Timber' +``` + ## What are aliases for? We used `createQueryBuilder("user")`. But what is "user"? @@ -761,7 +781,7 @@ const user = await createQueryBuilder("user") ## Joining and mapping functionality -Add `profilePhoto` to `User` entity and you can map any data into that property using `QueryBuilder`: +Add `profilePhoto` to `User` entity, and you can map any data into that property using `QueryBuilder`: ```typescript export class User { @@ -816,7 +836,7 @@ There are two types of results you can get using select query builder: **entitie Most of the time, you need to select real entities from your database, for example, users. For this purpose, you use `getOne` and `getMany`. However, sometimes you need to select specific data, like the _sum of all user photos_. -Such data is not a entity, it's called raw data. +Such data is not an entity, it's called raw data. To get raw data, you use `getRawOne` and `getRawMany`. Examples: @@ -844,7 +864,7 @@ const photosSums = await dataSource ## Streaming result data You can use `stream` which returns you a stream. -Streaming returns you raw data and you must handle entity transformation manually: +Streaming returns you raw data, and you must handle entity transformation manually: ```typescript const stream = await dataSource @@ -1238,3 +1258,78 @@ const users = await connection.getRepository(User) .where(`user.id IN (SELECT "id" FROM 'insert_results')`) .getMany(); ``` + +## Time Travel Queries + +[Time Travel Queries](https://www.cockroachlabs.com/blog/time-travel-queries-select-witty_subtitle-the_future/) +currently supported only in `CockroachDB` database. + +```typescript +const repository = connection.getRepository(Account) + +// create a new account +const account = new Account() +account.name = "John Smith" +account.balance = 100 +await repository.save(account) + +// imagine we update the account balance 1 hour after creation +account.balance = 200 +await repository.save(account) + +// outputs { name: "John Smith", balance: "200" } +console.log(account) + +// load account state on 1 hour back +account = await repository + .createQueryBuilder("account") + .timeTravelQuery(`'-1h'`) + .getOneOrFail() + +// outputs { name: "John Smith", balance: "100" } +console.log(account) +``` + +By default `timeTravelQuery()` uses `follower_read_timestamp()` function if no arguments passed. +For another supported timestamp arguments and additional information please refer to +[CockroachDB](https://www.cockroachlabs.com/docs/stable/as-of-system-time.html) docs. + +## Debugging + +You can get the generated SQL from the query builder by calling `getQuery()` or `getQueryAndParameters()`. + +If you just want the query you can use `getQuery()` + +```typescript +const sql = await dataSource + .getRepository(User) + .createQueryBuilder("user") + .where("user.id = :id", { id: 1 }) + .getQuery() +``` + +Which results in: + +```sql +SELECT `user`.`id` as `userId`, `user`.`firstName` as `userFirstName`, `user`.`lastName` as `userLastName` FROM `users` `user` WHERE `user`.`id` = ? +``` + +Or if you want the query and the parameters you can get an array back using `getQueryAndParameters()` + +```typescript +const queryAndParams = await dataSource + .getRepository(User) + .createQueryBuilder("user") + .where("user.id = :id", { id: 1 }) + .getQueryAndParameters() +``` + +Which results in: + +```typescript +[ + "SELECT `user`.`id` as `userId`, `user`.`firstName` as `userFirstName`, `user`.`lastName` as `userLastName` FROM `users` `user` WHERE `user`.`id` = ?", + [ 1 ] +] +``` + diff --git a/docs/separating-entity-definition.md b/docs/separating-entity-definition.md index 1912b01e93..fc5860ae71 100644 --- a/docs/separating-entity-definition.md +++ b/docs/separating-entity-definition.md @@ -230,10 +230,116 @@ export const UserEntitySchema = new EntitySchema({ Be sure to add the `extended` columns also to the `Category` interface (e.g., via `export interface Category extend BaseEntity`). +### Single Table Inheritance + +In order to use [Single Table Inheritance](entity-inheritance.md#single-table-inheritance): + +1. Add the `inheritance` option to the **parent** class schema, specifying the inheritance pattern ("STI") and the + **discriminator** column, which will store the name of the *child* class on each row +2. Set the `type: "entity-child"` option for all **children** classes' schemas, while extending the *parent* class + columns using the spread operator syntax described above + +```ts +// entity.ts + +export abstract class Base { + id!: number + type!: string + createdAt!: Date + updatedAt!: Date +} + +export class A extends Base { + constructor(public a: boolean) { + super() + } +} + +export class B extends Base { + constructor(public b: number) { + super() + } +} + +export class C extends Base { + constructor(public c: string) { + super() + } +} +``` + +```ts +// schema.ts + +const BaseSchema = new EntitySchema({ + target: Base, + name: "Base", + columns: { + id: { + type: Number, + primary: true, + generated: "increment", + }, + type: { + type: String, + }, + createdAt: { + type: Date, + createDate: true, + }, + updatedAt: { + type: Date, + updateDate: true, + }, + }, + // NEW: Inheritance options + inheritance: { + pattern: "STI", + column: "type", + }, +}) + +const ASchema = new EntitySchema({ + target: A, + name: "A", + type: "entity-child", + columns: { + ...BaseSchema.options.columns, + a: { + type: Boolean, + }, + }, +}) + +const BSchema = new EntitySchema({ + target: B, + name: "B", + type: "entity-child", + columns: { + ...BaseSchema.options.columns, + b: { + type: Number, + }, + }, +}) + +const CSchema = new EntitySchema({ + target: C, + name: "C", + type: "entity-child", + columns: { + ...BaseSchema.options.columns, + c: { + type: String, + }, + }, +}) +``` + ## Using Schemas to Query / Insert Data Of course, you can use the defined schemas in your repositories or entity manager as you would use the decorators. -Consider the previously defined `Category` example (with its `Interface` and `CategoryEntity` schema in order to get +Consider the previously defined `Category` example (with its `Interface` and `CategoryEntity` schema) in order to get some data or manipulate the database. ```ts diff --git a/docs/supported-platforms.md b/docs/supported-platforms.md index 4eb4508251..76a7894d47 100644 --- a/docs/supported-platforms.md +++ b/docs/supported-platforms.md @@ -56,7 +56,7 @@ In your main html page, you need to include reflect-metadata: TypeORM is able to run on Cordova, PhoneGap, Ionic apps using the [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage) plugin You have the option to choose between module loaders just like in browser package. -For an example how to use TypeORM in Cordova see [typeorm/cordova-example](https://github.com/typeorm/cordova-example) and for Ionic see [typeorm/ionic-example](https://github.com/typeorm/ionic-example). **Important**: For use with Ionic, a custom webpack config file is needed! Please checkout the example to see the needed changes. +For an example how to use TypeORM in Cordova see [typeorm/cordova-example](https://github.com/typeorm/cordova-example) and for Ionic see [typeorm/ionic-example](https://github.com/typeorm/ionic-example). **Important**: For use with Ionic, a custom webpack config file is needed! Please checkout the example to see the needed changes. Note that there is currently no support for transactions when using the [cordova-sqlite-storage](https://github.com/litehelpers/Cordova-sqlite-storage) plugin. See https://github.com/storesafe/cordova-sqlite-storage#other-limitations for more information. ## React Native diff --git a/docs/tree-entities.md b/docs/tree-entities.md index fe382d9a77..ce70e84440 100644 --- a/docs/tree-entities.md +++ b/docs/tree-entities.md @@ -1,7 +1,7 @@ # Tree Entities TypeORM supports the Adjacency list and Closure table patterns for storing tree structures. -To learn more about hierarchy table take a look at [this awesome presentation by Bill Karwin](https://www.slideshare.net/billkarwin/models-for-hierarchical-data). +To learn more about the hierarchy table take a look at [this awesome presentation by Bill Karwin](https://www.slideshare.net/billkarwin/models-for-hierarchical-data). - [Adjacency list](#adjacency-list) - [Nested set](#nested-set) @@ -13,7 +13,7 @@ To learn more about hierarchy table take a look at [this awesome presentation by Adjacency list is a simple model with self-referencing. The benefit of this approach is simplicity, -drawback is that you can't load big trees in all at once because of join limitations. +a drawback is that you can't load big trees all at once because of join limitations. To learn more about the benefits and use of Adjacency Lists look at [this article by Matthew Schinckel](http://schinckel.net/2014/09/13/long-live-adjacency-lists/). Example: @@ -48,8 +48,8 @@ export class Category { ## Nested set Nested set is another pattern of storing tree structures in the database. -Its very efficient for reads, but bad for writes. -You cannot have multiple roots in nested set. +It is very efficient for reads, but bad for writes. +You cannot have multiple roots in the nested set. Example: ```typescript @@ -83,7 +83,7 @@ export class Category { ## Materialized Path (aka Path Enumeration) Materialized Path (also called Path Enumeration) is another pattern of storing tree structures in the database. -Its simple and effective. +It is simple and effective. Example: ```typescript @@ -117,7 +117,7 @@ export class Category { ## Closure table Closure table stores relations between parent and child in a separate table in a special way. -It's efficient in both reads and writes. +It's efficient in both reading and writing. Example: ```typescript @@ -148,7 +148,7 @@ export class Category { } ``` -You can specify closure table name and / or closure table columns names by setting optional parameter `options` into `@Tree("closure-table", options)`. `ancestorColumnName` and `descandantColumnName` are callback functions, which receive primary column's metadata and return column's name. +You can specify the closure table name and/or closure table column names by setting optional parameter `options` into `@Tree("closure-table", options)`. `ancestorColumnName` and `descandantColumnName` are callback functions, which receive the primary column's metadata and return the column's name. ```ts @Tree("closure-table", { @@ -195,7 +195,7 @@ To load such a tree use `TreeRepository`: const trees = await dataSource.manager.getTreeRepository(Category).findTrees() ``` -`trees` will be following: +`trees` will be the following: ```json [ @@ -239,7 +239,7 @@ const treeCategoriesWithLimitedDepth = await dataSource.manager.getTreeRepositor ``` - `findRoots` - Roots are entities that have no ancestors. Finds them all. - Does not load children leafs. + Does not load children's leaves. ```typescript const rootCategories = await dataSource.manager.getTreeRepository(Category).findRoots() @@ -278,27 +278,27 @@ const children = await repository .getMany() ``` -- `countDescendants` - Gets number of descendants of the entity. +- `countDescendants` - Gets the number of descendants of the entity. ```typescript const childrenCount = await dataSource.manager.getTreeRepository(Category).countDescendants(parentCategory) ``` -- `findAncestors` - Gets all parent (ancestors) of the given entity. Returns them all in a flat array. +- `findAncestors` - Gets all parents (ancestors) of the given entity. Returns them all in a flat array. ```typescript const parents = await repository.findAncestors(childCategory) // returns all direct childCategory's parent categories (without "parent of parents") ``` -- `findAncestorsTree` - Gets all parent (ancestors) of the given entity. Returns them in a tree - nested into each other. +- `findAncestorsTree` - Gets all parents (ancestors) of the given entity. Returns them in a tree - nested into each other. ```typescript const parentsTree = await dataSource.manager.getTreeRepository(Category).findAncestorsTree(childCategory) // returns all direct childCategory's parent categories (with "parent of parents") ``` -- `createAncestorsQueryBuilder` - Creates a query builder used to get ancestors of the entities in a tree. +- `createAncestorsQueryBuilder` - Creates a query builder used to get the ancestors of the entities in a tree. ```typescript const parents = await repository diff --git a/docs/using-cli.md b/docs/using-cli.md index d2196059a9..90736d84ae 100644 --- a/docs/using-cli.md +++ b/docs/using-cli.md @@ -60,13 +60,7 @@ If you want to load more modules like [module-alias](https://github.com/ilearnio Then you may run the command like this: ``` -npm run typeorm migration:run -``` - -If you need to pass parameter with dash to npm script, you will need to add them after --. For example, if you need to _generate_, the command is like this: - -``` -npm run typeorm migration:generate -- -n migrationNameHere +npm run typeorm migration:run -- -d path-to-datasource-config ``` ### How to read the documentation @@ -131,27 +125,7 @@ typeorm init --docker You can create a new entity using CLI: ``` -typeorm entity:create -n User -``` - -where `User` is an entity file and class name. -Running the command will create a new empty entity in `entitiesDir` of the project. -To set up the `entitiesDir` of the project you must add it in data source options: - -``` -{ - cli: { - entitiesDir: "src/entity" - } -} -``` - -Learn more about [data source options](./data-source-options.md). -If you have a multi-module project structure with multiple entities in different directories -you can provide the path to the CLI command where you want to generate an entity: - -``` -typeorm entity:create -n User -d src/user/entity +typeorm entity:create path-to-entity-dir/entity ``` Learn more about [entities](./entities.md). @@ -161,27 +135,7 @@ Learn more about [entities](./entities.md). You can create a new subscriber using CLI: ``` -typeorm subscriber:create -n UserSubscriber -``` - -where `UserSubscriber` is a subscriber file and class name. -Running the following command will create a new empty subscriber in the `subscribersDir` of the project. -To setup `subscribersDir` you must add it in data source options: - -``` -{ - cli: { - subscribersDir: "src/subscriber" - } -} -``` - -Learn more about [data source options](./data-source-options.md). -If you have a multi-module project structure with multiple subscribers in different directories -you can provide a path to the CLI command where you want to generate a subscriber: - -``` -typeorm subscriber:create -n UserSubscriber -d src/user/subscriber +typeorm subscriber:create path-to-subscriber-dir/subscriber ``` Learn more about [Subscribers](./listeners-and-subscribers.md). @@ -191,29 +145,8 @@ Learn more about [Subscribers](./listeners-and-subscribers.md). You can create a new migration using CLI: ``` -typeorm migration:create -n UserMigration -``` - -where `UserMigration` is a migration file and class name. -Running the command will create a new empty migration in the `migrationsDir` of the project. -To setup `migrationsDir` you must add it in data source options: - -``` -{ - cli: { - migrationsDir: "src/migration" - } -} -``` - -Learn more about [data source options](./data-source-options.md). -If you have a multi-module project structure with multiple migrations in different directories -you can provide a path to the CLI command where you want to generate a migration: - -``` -typeorm migration:create -n UserMigration -d src/user/migration +typeorm migration:create path-to-migrations-dir/migrationName ``` - Learn more about [Migrations](./migrations.md). ## Generate a migration from existing table schema @@ -238,7 +171,7 @@ Learn more about [Migrations](./migrations.md). To execute all pending migrations use following command: ``` -typeorm migration:run +typeorm migration:run -- -d path-to-datasource-config ``` Learn more about [Migrations](./migrations.md). @@ -248,7 +181,7 @@ Learn more about [Migrations](./migrations.md). To revert the most recently executed migration use the following command: ``` -typeorm migration:revert +typeorm migration:revert -- -d path-to-datasource-config ``` This command will undo only the last executed migration. @@ -260,15 +193,13 @@ Learn more about [Migrations](./migrations.md). To show all migrations and whether they've been run or not use following command: ``` -typeorm migration:show +typeorm migration:show -- -d path-to-datasource-config ``` [X] = Migration has been ran [ ] = Migration is pending/unapplied -This command also returns an error code if there are unapplied migrations. - ## Sync database schema To synchronize a database schema use: @@ -294,7 +225,7 @@ typeorm schema:log To completely drop a database schema use: ``` -typeorm schema:drop +typeorm schema:drop -- -d path-to-datasource-config ``` Be careful with this command on production since it completely removes data from your database. diff --git a/docs/view-entities.md b/docs/view-entities.md index 97e4ff9f8b..e8888ca66c 100644 --- a/docs/view-entities.md +++ b/docs/view-entities.md @@ -152,6 +152,43 @@ List of available options in `ViewColumnOptions`: - `name: string` - Column name in the database view. - `transformer: { from(value: DatabaseType): EntityType, to(value: EntityType): DatabaseType }` - Used to unmarshal properties of arbitrary type `DatabaseType` supported by the database into a type `EntityType`. Arrays of transformers are also supported and are applied in reverse order when reading. Note that because database views are read-only, `transformer.to(value)` will never be used. +## Materialized View Indices + +There's support for creation of indices for materialized views if using `PostgreSQL`. + +```typescript +@ViewEntity({ + materialized: true, + expression: (dataSource: DataSource) => + dataSource + .createQueryBuilder() + .select("post.id", "id") + .addSelect("post.name", "name") + .addSelect("category.name", "categoryName") + .from(Post, "post") + .leftJoin(Category, "category", "category.id = post.categoryId"), +}) +export class PostCategory { + @ViewColumn() + id: number + + @Index() + @ViewColumn() + name: string + + @Index("catname-idx") + @ViewColumn() + categoryName: string +} +``` +However, `unique` is currently the only supported option for indices in materialized views. The rest of the indices options will be ignored. + +````typescript +@Index("name-idx", { unique: true }) +@ViewColumn() +name: string +```` + ## Complete example Let create two entities and a view containing aggregated data from these entities: diff --git a/docs/zh_CN/README.md b/docs/zh_CN/README.md index c8e24aeee8..2917001032 100644 --- a/docs/zh_CN/README.md +++ b/docs/zh_CN/README.md @@ -28,117 +28,119 @@ TypeORM ๅ‚่€ƒไบ†ๅพˆๅคšๅ…ถไป–ไผ˜็ง€ ORM ็š„ๅฎž็Žฐ, ๆฏ”ๅฆ‚ [Hibernate](http://hib TypeORM ็š„ไธ€ไบ›็‰นๆ€ง: -- ๆ”ฏๆŒ [DataMapper](active-record-data-mapper.md#what-is-the-data-mapper-pattern) ๅ’Œ [ActiveRecord](active-record-data-mapper.md#what-is-the-active-record-pattern) (้šไฝ ้€‰ๆ‹ฉ) -- ๅฎžไฝ“ๅ’Œๅˆ— -- ๆ•ฐๆฎๅบ“็‰นๆ€งๅˆ—็ฑปๅž‹ -- ๅฎžไฝ“็ฎก็† -- ๅญ˜ๅ‚จๅบ“ๅ’Œ่‡ชๅฎšไน‰ๅญ˜ๅ‚จๅบ“ -- ๆธ…ๆ™ฐ็š„ๅฏน่ฑกๅ…ณ็ณปๆจกๅž‹ -- ๅ…ณ่”๏ผˆๅ…ณ็ณป๏ผ‰ -- ่ดชๅฉชๅ’Œๅปถ่ฟŸๅ…ณ็ณป -- ๅ•ๅ‘็š„๏ผŒๅŒๅ‘็š„ๅ’Œ่‡ชๅผ•็”จ็š„ๅ…ณ็ณป -- ๆ”ฏๆŒๅคš้‡็ปงๆ‰ฟๆจกๅผ -- ็บง่” -- ็ดขๅผ• -- ไบ‹ๅŠก -- ่ฟ็งปๅ’Œ่‡ชๅŠจ่ฟ็งป -- ่ฟžๆŽฅๆฑ  -- ไธปไปŽๅคๅˆถ -- ไฝฟ็”จๅคšไธชๆ•ฐๆฎๅบ“่ฟžๆŽฅ -- ไฝฟ็”จๅคšไธชๆ•ฐๆฎๅบ“็ฑปๅž‹ -- ่ทจๆ•ฐๆฎๅบ“ๅ’Œ่ทจๆจกๅผๆŸฅ่ฏข -- ไผ˜้›…็š„่ฏญๆณ•๏ผŒ็ตๆดป่€Œๅผบๅคง็š„ QueryBuilder -- ๅทฆ่”ๆŽฅๅ’Œๅ†…่”ๆŽฅ -- ไฝฟ็”จ่”ๆŸฅๆŸฅ่ฏข็š„้€‚ๅฝ“ๅˆ†้กต -- ๆŸฅ่ฏข็ผ“ๅญ˜ -- ๅŽŸๅง‹็ป“ๆžœๆต -- ๆ—ฅๅฟ— -- ็›‘ๅฌ่€…ๅ’Œ่ฎข้˜…่€…๏ผˆ้’ฉๅญ๏ผ‰ -- ๆ”ฏๆŒ้—ญๅŒ…่กจๆจกๅผ -- ๅœจๆจกๅž‹ๆˆ–่€…ๅˆ†็ฆป็š„้…็ฝฎๆ–‡ไปถไธญๅฃฐๆ˜Žๆจกๅผ -- json / xml / yml / env ๆ ผๅผ็š„่ฟžๆŽฅ้…็ฝฎ -- ๆ”ฏๆŒ MySQL / MariaDB / Postgres / SQLite / Microsoft SQL Server / Oracle / sql.js -- ๆ”ฏๆŒ MongoDB NoSQL ๆ•ฐๆฎๅบ“ -- ๅฏๅœจ NodeJS / ๆต่งˆๅ™จ / Ionic / Cordova / React Native / Expo / Electron ๅนณๅฐไธŠไฝฟ็”จ -- ๆ”ฏๆŒ TypeScript ๅ’Œ JavaScript -- ็”Ÿๆˆ้ซ˜ๆ€ง่ƒฝใ€็ตๆดปใ€ๆธ…ๆ™ฐๅ’Œๅฏ็ปดๆŠค็š„ไปฃ็  -- ้ตๅพชๆ‰€ๆœ‰ๅฏ่ƒฝ็š„ๆœ€ไฝณๅฎž่ทต -- ๅ‘ฝไปค่กŒๅทฅๅ…ท +- ๆ”ฏๆŒ [DataMapper](active-record-data-mapper.md#what-is-the-data-mapper-pattern) ๅ’Œ [ActiveRecord](active-record-data-mapper.md#what-is-the-active-record-pattern) (้šไฝ ้€‰ๆ‹ฉ) +- ๅฎžไฝ“ๅ’Œๅˆ— +- ๆ•ฐๆฎๅบ“็‰นๆ€งๅˆ—็ฑปๅž‹ +- ๅฎžไฝ“็ฎก็† +- ๅญ˜ๅ‚จๅบ“ๅ’Œ่‡ชๅฎšไน‰ๅญ˜ๅ‚จๅบ“ +- ๆธ…ๆ™ฐ็š„ๅฏน่ฑกๅ…ณ็ณปๆจกๅž‹ +- ๅ…ณ่”๏ผˆๅ…ณ็ณป๏ผ‰ +- ่ดชๅฉชๅ’Œๅปถ่ฟŸๅ…ณ็ณป +- ๅ•ๅ‘็š„๏ผŒๅŒๅ‘็š„ๅ’Œ่‡ชๅผ•็”จ็š„ๅ…ณ็ณป +- ๆ”ฏๆŒๅคš้‡็ปงๆ‰ฟๆจกๅผ +- ็บง่” +- ็ดขๅผ• +- ไบ‹ๅŠก +- ่ฟ็งปๅ’Œ่‡ชๅŠจ่ฟ็งป +- ่ฟžๆŽฅๆฑ  +- ไธปไปŽๅคๅˆถ +- ไฝฟ็”จๅคšไธชๆ•ฐๆฎๅบ“่ฟžๆŽฅ +- ไฝฟ็”จๅคšไธชๆ•ฐๆฎๅบ“็ฑปๅž‹ +- ่ทจๆ•ฐๆฎๅบ“ๅ’Œ่ทจๆจกๅผๆŸฅ่ฏข +- ไผ˜้›…็š„่ฏญๆณ•๏ผŒ็ตๆดป่€Œๅผบๅคง็š„ QueryBuilder +- ๅทฆ่”ๆŽฅๅ’Œๅ†…่”ๆŽฅ +- ไฝฟ็”จ่”ๆŸฅๆŸฅ่ฏข็š„้€‚ๅฝ“ๅˆ†้กต +- ๆŸฅ่ฏข็ผ“ๅญ˜ +- ๅŽŸๅง‹็ป“ๆžœๆต +- ๆ—ฅๅฟ— +- ็›‘ๅฌ่€…ๅ’Œ่ฎข้˜…่€…๏ผˆ้’ฉๅญ๏ผ‰ +- ๆ”ฏๆŒ้—ญๅŒ…่กจๆจกๅผ +- ๅœจๆจกๅž‹ๆˆ–่€…ๅˆ†็ฆป็š„้…็ฝฎๆ–‡ไปถไธญๅฃฐๆ˜Žๆจกๅผ +- ๆ”ฏๆŒ MySQL / MariaDB / Postgres / SQLite / Microsoft SQL Server / Oracle / sql.js +- ๆ”ฏๆŒ MongoDB NoSQL ๆ•ฐๆฎๅบ“ +- ๅฏๅœจ NodeJS / ๆต่งˆๅ™จ / Ionic / Cordova / React Native / Expo / Electron ๅนณๅฐไธŠไฝฟ็”จ +- ๆ”ฏๆŒ TypeScript ๅ’Œ JavaScript +- ็”Ÿๆˆ้ซ˜ๆ€ง่ƒฝใ€็ตๆดปใ€ๆธ…ๆ™ฐๅ’Œๅฏ็ปดๆŠค็š„ไปฃ็  +- ้ตๅพชๆ‰€ๆœ‰ๅฏ่ƒฝ็š„ๆœ€ไฝณๅฎž่ทต +- ๅ‘ฝไปค่กŒๅทฅๅ…ท ่ฟ˜ๆœ‰ๆ›ดๅคš... ้€š่ฟ‡ไฝฟ็”จ `TypeORM` ไฝ ็š„ `models` ็œ‹่ตทๆฅๅƒ่ฟ™ๆ ท: ```typescript -import { Entity, PrimaryGeneratedColumn, Column } from "typeorm"; +import { Entity, PrimaryGeneratedColumn, Column } from "typeorm" @Entity() export class User { - @PrimaryGeneratedColumn() - id: number; + @PrimaryGeneratedColumn() + id: number - @Column() - firstName: string; + @Column() + firstName: string - @Column() - lastName: string; + @Column() + lastName: string - @Column() - age: number; + @Column() + age: number } ``` ้€ป่พ‘ๆ“ไฝœๅฐฑๅƒๆ˜ฏ่ฟ™ๆ ท: ```typescript -const user = new User(); -user.firstName = "Timber"; -user.lastName = "Saw"; -user.age = 25; -await repository.save(user); - -const allUsers = await repository.find(); -const firstUser = await repository.findOne(1); // find by id -const timber = await repository.findOne({ firstName: "Timber", lastName: "Saw" }); +const user = new User() +user.firstName = "Timber" +user.lastName = "Saw" +user.age = 25 +await repository.save(user) + +const allUsers = await repository.find() +const firstUser = await repository.findOne(1) // find by id +const timber = await repository.findOne({ + firstName: "Timber", + lastName: "Saw", +}) -await repository.remove(timber); +await repository.remove(timber) ``` ๆˆ–่€…๏ผŒๅฆ‚ๆžœไฝ ๆ›ดๅ–œๆฌขไฝฟ็”จ`ActiveRecord`ๅฎž็Žฐ๏ผŒไนŸๅฏไปฅ่ฟ™ๆ ท็”จ๏ผš ```typescript -import { Entity, PrimaryGeneratedColumn, Column, BaseEntity } from "typeorm"; +import { Entity, PrimaryGeneratedColumn, Column, BaseEntity } from "typeorm" @Entity() export class User extends BaseEntity { - @PrimaryGeneratedColumn() - id: number; + @PrimaryGeneratedColumn() + id: number - @Column() - firstName: string; + @Column() + firstName: string - @Column() - lastName: string; + @Column() + lastName: string - @Column() - age: number; + @Column() + age: number } ``` ้€ป่พ‘ๆ“ไฝœๅฆ‚ไธ‹ๆ‰€็คบ: ```typescript -const user = new User(); -user.firstName = "Timber"; -user.lastName = "Saw"; -user.age = 25; -await user.save(); +const user = new User() +user.firstName = "Timber" +user.lastName = "Saw" +user.age = 25 +await user.save() -const allUsers = await User.find(); -const firstUser = await User.findOne(1); -const timber = await User.findOne({ firstName: "Timber", lastName: "Saw" }); +const allUsers = await User.find() +const firstUser = await User.findOne(1) +const timber = await User.findOne({ firstName: "Timber", lastName: "Saw" }) -await timber.remove(); +await timber.remove() ``` # ๅ…ฅ้—จ @@ -147,56 +149,56 @@ await timber.remove(); 1. ้€š่ฟ‡`npm`ๅฎ‰่ฃ…: - `npm install typeorm --save` + `npm install typeorm --save` 2. ไฝ ่ฟ˜้œ€่ฆๅฎ‰่ฃ… `reflect-metadata`: - `npm install reflect-metadata --save` + `npm install reflect-metadata --save` - ๅนถไธ”้œ€่ฆๅœจๅบ”็”จ็จ‹ๅบ็š„ๅ…จๅฑ€ไฝ็ฝฎๅฏผๅ…ฅ๏ผˆไพ‹ๅฆ‚ๅœจ`app.ts`ไธญ๏ผ‰ + ๅนถไธ”้œ€่ฆๅœจๅบ”็”จ็จ‹ๅบ็š„ๅ…จๅฑ€ไฝ็ฝฎๅฏผๅ…ฅ๏ผˆไพ‹ๅฆ‚ๅœจ`app.ts`ไธญ๏ผ‰ - `import "reflect-metadata";` + `import "reflect-metadata";` 3. ไฝ ๅฏ่ƒฝ่ฟ˜้œ€่ฆๅฎ‰่ฃ… node typings(ไปฅๆญคๆฅไฝฟ็”จ Node ็š„ๆ™บ่ƒฝๆ็คบ): - `npm install @types/node --save` + `npm install @types/node --save` 4. ๅฎ‰่ฃ…ๆ•ฐๆฎๅบ“้ฉฑๅŠจ: - - **MySQL** ๆˆ–่€… **MariaDB** + - **MySQL** ๆˆ–่€… **MariaDB** - `npm install mysql --save` (ไนŸๅฏไปฅๅฎ‰่ฃ… `mysql2`) + `npm install mysql --save` (ไนŸๅฏไปฅๅฎ‰่ฃ… `mysql2`) - - **PostgreSQL** + - **PostgreSQL** - `npm install pg --save` + `npm install pg --save` - - **SQLite** + - **SQLite** - `npm install sqlite3 --save` + `npm install sqlite3 --save` - - **Microsoft SQL Server** + - **Microsoft SQL Server** - `npm install mssql --save` + `npm install mssql --save` - - **sql.js** + - **sql.js** - `npm install sql.js --save` + `npm install sql.js --save` - - **Oracle** + - **Oracle** - `npm install oracledb --save` + `npm install oracledb --save` - ๆ นๆฎไฝ ไฝฟ็”จ็š„ๆ•ฐๆฎๅบ“๏ผŒไป…ๅฎ‰่ฃ…ๅ…ถไธญ*ไธ€ไธช*ๅณๅฏใ€‚ - ่ฆไฝฟ Oracle ้ฉฑๅŠจ็จ‹ๅบๆญฃๅธธๅทฅไฝœ๏ผŒ้œ€่ฆๆŒ‰็…งๅ…ถ[็ซ™็‚น](https://github.com/oracle/node-oracledb)ไธญ็š„ๅฎ‰่ฃ…่ฏดๆ˜Ž่ฟ›่กŒๆ“ไฝœใ€‚ + ๆ นๆฎไฝ ไฝฟ็”จ็š„ๆ•ฐๆฎๅบ“๏ผŒไป…ๅฎ‰่ฃ…ๅ…ถไธญ*ไธ€ไธช*ๅณๅฏใ€‚ + ่ฆไฝฟ Oracle ้ฉฑๅŠจ็จ‹ๅบๆญฃๅธธๅทฅไฝœ๏ผŒ้œ€่ฆๆŒ‰็…งๅ…ถ[็ซ™็‚น](https://github.com/oracle/node-oracledb)ไธญ็š„ๅฎ‰่ฃ…่ฏดๆ˜Ž่ฟ›่กŒๆ“ไฝœใ€‚ - - **MongoDB** (่ฏ•้ชŒๆ€ง) + - **MongoDB** (่ฏ•้ชŒๆ€ง) - `npm install mongodb --save` + `npm install mongodb --save` - - **NativeScript**, **react-native** ๅ’Œ **Cordova** + - **NativeScript**, **react-native** ๅ’Œ **Cordova** - ๆŸฅ็œ‹ [ๆ”ฏๆŒ็š„ๅนณๅฐ](/supported-platforms.md) + ๆŸฅ็œ‹ [ๆ”ฏๆŒ็š„ๅนณๅฐ](/supported-platforms.md) ##### TypeScript ้…็ฝฎ @@ -260,17 +262,17 @@ npm install ```json { - "type": "mysql", - "host": "localhost", - "port": 3306, - "username": "test", - "password": "test", - "database": "test", - "synchronize": true, - "logging": false, - "entities": ["src/entity/**/*.ts"], - "migrations": ["src/migration/**/*.ts"], - "subscribers": ["src/subscriber/**/*.ts"] + "type": "mysql", + "host": "localhost", + "port": 3306, + "username": "test", + "password": "test", + "database": "test", + "synchronize": true, + "logging": false, + "entities": ["src/entity/**/*.ts"], + "migrations": ["src/migration/**/*.ts"], + "subscribers": ["src/subscriber/**/*.ts"] } ``` @@ -300,11 +302,11 @@ npm start ```typescript export class Photo { - id: number; - name: string; - description: string; - filename: string; - views: number; + id: number + name: string + description: string + filename: string + views: number } ``` @@ -317,16 +319,16 @@ export class Photo { ่ฎฉๆˆ‘ไปฌๅฐ†`Photo`ๆจกๅž‹ไฝœไธบไธ€ไธชๅฎžไฝ“ ```typescript -import { Entity } from "typeorm"; +import { Entity } from "typeorm" @Entity() export class Photo { - id: number; - name: string; - description: string; - filename: string; - views: number; - isPublished: boolean; + id: number + name: string + description: string + filename: string + views: number + isPublished: boolean } ``` @@ -338,27 +340,27 @@ export class Photo { ่ฆๆทปๅŠ ๆ•ฐๆฎๅบ“ๅˆ—๏ผŒไฝ ๅช้œ€่ฆๅฐ†่ฆ็”Ÿๆˆ็š„ๅฎžไฝ“ๅฑžๆ€งๅŠ ไธŠ`@Column`่ฃ…้ฅฐๅ™จใ€‚ ```typescript -import { Entity, Column } from "typeorm"; +import { Entity, Column } from "typeorm" @Entity() export class Photo { - @Column() - id: number; + @Column() + id: number - @Column() - name: string; + @Column() + name: string - @Column() - description: string; + @Column() + description: string - @Column() - filename: string; + @Column() + filename: string - @Column() - views: number; + @Column() + views: number - @Column() - isPublished: boolean; + @Column() + isPublished: boolean } ``` @@ -372,27 +374,27 @@ export class Photo { ๆฏไธชๅฎžไฝ“**ๅฟ…้กป**่‡ณๅฐ‘ๆœ‰ไธ€ไธชไธป้”ฎๅˆ—ใ€‚่ฟ™ๆ˜ฏๅฟ…้กป็š„๏ผŒไฝ ๆ— ๆณ•้ฟๅ…ใ€‚่ฆไฝฟๅˆ—ๆˆไธบไธป้”ฎ๏ผŒๆ‚จ้œ€่ฆไฝฟ็”จ`@PrimaryColumn`่ฃ…้ฅฐๅ™จใ€‚ ```typescript -import { Entity, Column, PrimaryColumn } from "typeorm"; +import { Entity, Column, PrimaryColumn } from "typeorm" @Entity() export class Photo { - @PrimaryColumn() - id: number; + @PrimaryColumn() + id: number - @Column() - name: string; + @Column() + name: string - @Column() - description: string; + @Column() + description: string - @Column() - filename: string; + @Column() + filename: string - @Column() - views: number; + @Column() + views: number - @Column() - isPublished: boolean; + @Column() + isPublished: boolean } ``` @@ -401,27 +403,27 @@ export class Photo { ๅ‡่ฎพไฝ ๅธŒๆœ› id ๅˆ—่‡ชๅŠจ็”Ÿๆˆ๏ผˆ่ฟ™็งฐไธบ auto-increment/sequence/serial/generated identity column๏ผ‰ใ€‚ไธบๆญคไฝ ้œ€่ฆๅฐ†`@PrimaryColumn`่ฃ…้ฅฐๅ™จๆ›ดๆ”นไธบ`@PrimaryGeneratedColumn`่ฃ…้ฅฐๅ™จ๏ผš ```typescript -import { Entity, Column, PrimaryGeneratedColumn } from "typeorm"; +import { Entity, Column, PrimaryGeneratedColumn } from "typeorm" @Entity() export class Photo { - @PrimaryGeneratedColumn() - id: number; + @PrimaryGeneratedColumn() + id: number - @Column() - name: string; + @Column() + name: string - @Column() - description: string; + @Column() + description: string - @Column() - filename: string; + @Column() + filename: string - @Column() - views: number; + @Column() + views: number - @Column() - isPublished: boolean; + @Column() + isPublished: boolean } ``` @@ -431,29 +433,29 @@ export class Photo { ๆ•ฐๅญ—่ขซๆ˜ ๅฐ„ๅˆฐไธ€ไธช็ฑปไผผๆ•ดๆ•ฐ็ฑปๅž‹๏ผˆๅ–ๅ†ณไบŽๆ•ฐๆฎๅบ“็ฑปๅž‹๏ผ‰ใ€‚ไฝ†ๆ˜ฏๆˆ‘ไปฌไธๅธŒๆœ›ๆ‰€ๆœ‰็š„ๅˆ—้ƒฝๆ˜ฏๆœ‰้™็š„ varchars ๆˆ–ๆ•ดๆ•ฐ๏ผŒ่ฎฉๆˆ‘ไปฌไฟฎๆ”นไธ‹ไปฃ็ ไปฅ่ฎพ็ฝฎๆƒณ่ฆ็š„ๆ•ฐๆฎ็ฑปๅž‹๏ผš ```typescript -import { Entity, Column, PrimaryGeneratedColumn } from "typeorm"; +import { Entity, Column, PrimaryGeneratedColumn } from "typeorm" @Entity() export class Photo { - @PrimaryGeneratedColumn() - id: number; + @PrimaryGeneratedColumn() + id: number - @Column({ - length: 100 - }) - name: string; + @Column({ + length: 100, + }) + name: string - @Column("text") - description: string; + @Column("text") + description: string - @Column() - filename: string; + @Column() + filename: string - @Column("double") - views: number; + @Column("double") + views: number - @Column() - isPublished: boolean; + @Column() + isPublished: boolean } ``` @@ -464,25 +466,25 @@ export class Photo { ๅฝ“ๅฎžไฝ“่ขซๅˆ›ๅปบๅŽ๏ผŒ่ฎฉๆˆ‘ไปฌๅˆ›ๅปบไธ€ไธช`index.ts`๏ผˆๆˆ–`app.ts`๏ผŒๆ— ่ฎบไฝ ๆ€Žไนˆๅ‘ฝๅ๏ผ‰ๆ–‡ไปถ๏ผŒๅนถ้…็ฝฎๆ•ฐๆฎๅบ“่ฟžๆŽฅ๏ผš: ```typescript -import "reflect-metadata"; -import { createConnection } from "typeorm"; -import { Photo } from "./entity/Photo"; +import "reflect-metadata" +import { createConnection } from "typeorm" +import { Photo } from "./entity/Photo" createConnection({ - type: "mysql", - host: "localhost", - port: 3306, - username: "root", - password: "admin", - database: "test", - entities: [Photo], - synchronize: true, - logging: false + type: "mysql", + host: "localhost", + port: 3306, + username: "root", + password: "admin", + database: "test", + entities: [Photo], + synchronize: true, + logging: false, }) - .then(connection => { - // ่ฟ™้‡Œๅฏไปฅๅ†™ๅฎžไฝ“ๆ“ไฝœ็›ธๅ…ณ็š„ไปฃ็  - }) - .catch(error => console.log(error)); + .then((connection) => { + // ่ฟ™้‡Œๅฏไปฅๅ†™ๅฎžไฝ“ๆ“ไฝœ็›ธๅ…ณ็š„ไปฃ็  + }) + .catch((error) => console.log(error)) ``` ๆˆ‘ไปฌๅœจๆญค็คบไพ‹ไธญไฝฟ็”จ MySQL๏ผŒไฝ ๅฏไปฅไฝฟ็”จไปปไฝ•ๅ…ถไป–ๅ—ๆ”ฏๆŒ็š„ๆ•ฐๆฎๅบ“ใ€‚่ฆไฝฟ็”จๅ…ถไป–ๆ•ฐๆฎๅบ“๏ผŒๅช้œ€ๅฐ†้€‰้กนไธญ็š„`type`ๆ›ดๆ”นไธบๅธŒๆœ›ไฝฟ็”จ็š„ๆ•ฐๆฎๅบ“็ฑปๅž‹๏ผšmysql๏ผŒmariadb๏ผŒpostgres๏ผŒsqlite๏ผŒmssql๏ผŒoracle๏ผŒcordova๏ผŒnativescript๏ผŒreact-native๏ผŒexpo ๆˆ– mongodbใ€‚ๅŒๆ—ถ่ฟ˜่ฆ็กฎไฟ host, port, username, password ๅ’Œๆ•ฐๆฎๅบ“่ฎพ็ฝฎ็š„ๆญฃ็กฎๆ€งใ€‚ @@ -496,22 +498,22 @@ createConnection({ ไน‹ๅŽๅฝ“ๆˆ‘ไปฌๅˆ›ๅปบๆ›ดๅคšๅฎžไฝ“ๆ—ถ๏ผŒ้ƒฝ้œ€่ฆๅฐ†ไธ€ไธ€ๅฎƒไปฌๆทปๅŠ ๅˆฐ้…็ฝฎไธญ็š„ๅฎžไฝ“ไธญ๏ผŒไฝ†ๆ˜ฏ่ฟ™ไธๆ˜ฏๅพˆๆ–นไพฟ๏ผŒๆ‰€ไปฅๆˆ‘ไปฌๅฏไปฅ่ฎพ็ฝฎๆ•ดไธช็›ฎๅฝ•๏ผŒไปŽไธญ่ฟžๆŽฅๆ‰€ๆœ‰ๅฎžไฝ“ๅนถๅœจ่ฟžๆŽฅไธญไฝฟ็”จ๏ผš ```typescript -import { createConnection } from "typeorm"; +import { createConnection } from "typeorm" createConnection({ - type: "mysql", - host: "localhost", - port: 3306, - username: "root", - password: "admin", - database: "test", - entities: [__dirname + "/entity/*.js"], - synchronize: true + type: "mysql", + host: "localhost", + port: 3306, + username: "root", + password: "admin", + database: "test", + entities: [__dirname + "/entity/*.js"], + synchronize: true, }) - .then(connection => { - // ่ฟ™้‡Œๅฏไปฅๅ†™ๅฎžไฝ“ๆ“ไฝœ็›ธๅ…ณ็š„ไปฃ็  - }) - .catch(error => console.log(error)); + .then((connection) => { + // ่ฟ™้‡Œๅฏไปฅๅ†™ๅฎžไฝ“ๆ“ไฝœ็›ธๅ…ณ็š„ไปฃ็  + }) + .catch((error) => console.log(error)) ``` ไฝ†่ฆๅฐๅฟƒ่ฟ™็งๆ–นๆณ•ใ€‚ @@ -541,23 +543,23 @@ createConnection({ ็Žฐๅœจๅˆ›ๅปบไธ€ไธชๆ–ฐ็š„ photo ๅญ˜ๅˆฐๆ•ฐๆฎๅบ“๏ผš ```typescript -import { createConnection } from "typeorm"; -import { Photo } from "./entity/Photo"; +import { createConnection } from "typeorm" +import { Photo } from "./entity/Photo" createConnection(/*...*/) - .then(connection => { - let photo = new Photo(); - photo.name = "Me and Bears"; - photo.description = "I am near polar bears"; - photo.filename = "photo-with-bears.jpg"; - photo.views = 1; - photo.isPublished = true; - - return connection.manager.save(photo).then(photo => { - console.log("Photo has been saved. Photo id is", photo.id); - }); - }) - .catch(error => console.log(error)); + .then((connection) => { + let photo = new Photo() + photo.name = "Me and Bears" + photo.description = "I am near polar bears" + photo.filename = "photo-with-bears.jpg" + photo.views = 1 + photo.isPublished = true + + return connection.manager.save(photo).then((photo) => { + console.log("Photo has been saved. Photo id is", photo.id) + }) + }) + .catch((error) => console.log(error)) ``` ไฟๅญ˜ๅฎžไฝ“ๅŽ๏ผŒๅฎƒๅฐ†่Žทๅพ—ๆ–ฐ็”Ÿๆˆ็š„ IDใ€‚ `save`ๆ–นๆณ•่ฟ”ๅ›žไผ ้€’็ป™ๅฎƒ็š„ๅŒไธ€ๅฏน่ฑก็š„ๅฎžไพ‹ใ€‚ไฝ†ๅฎƒไธๆ˜ฏๅฏน่ฑก็š„ๆ–ฐๅ‰ฏๆœฌ๏ผŒๅชๆ˜ฏไฟฎๆ”นไบ†ๅฎƒ็š„"id"ๅนถ่ฟ”ๅ›žๅฎƒใ€‚ @@ -567,22 +569,22 @@ createConnection(/*...*/) ๆˆ‘ไปฌๅฏไปฅไฝฟ็”จๆœ€ๆ–ฐ็š„ ES8๏ผˆES2017๏ผ‰ๅŠŸ่ƒฝ๏ผŒๅนถไฝฟ็”จ async / await ่ฏญๆณ•ไปฃๆ›ฟ๏ผš ```typescript -import { createConnection } from "typeorm"; -import { Photo } from "./entity/Photo"; +import { createConnection } from "typeorm" +import { Photo } from "./entity/Photo" createConnection(/*...*/) - .then(async connection => { - let photo = new Photo(); - photo.name = "Me and Bears"; - photo.description = "I am near polar bears"; - photo.filename = "photo-with-bears.jpg"; - photo.views = 1; - photo.isPublished = true; - - await connection.manager.save(photo); - console.log("Photo has been saved"); - }) - .catch(error => console.log(error)); + .then(async (connection) => { + let photo = new Photo() + photo.name = "Me and Bears" + photo.description = "I am near polar bears" + photo.filename = "photo-with-bears.jpg" + photo.views = 1 + photo.isPublished = true + + await connection.manager.save(photo) + console.log("Photo has been saved") + }) + .catch((error) => console.log(error)) ``` ### ไฝฟ็”จ Entity Manager @@ -592,16 +594,16 @@ createConnection(/*...*/) ไพ‹ๅฆ‚๏ผŒๅŠ ่ฝฝๅทฒ็ปไฟๅญ˜็š„ๅฎžไฝ“๏ผš ```typescript -import { createConnection } from "typeorm"; -import { Photo } from "./entity/Photo"; +import { createConnection } from "typeorm" +import { Photo } from "./entity/Photo" createConnection(/*...*/) - .then(async connection => { - /*...*/ - let savedPhotos = await connection.manager.find(Photo); - console.log("All photos from the db: ", savedPhotos); - }) - .catch(error => console.log(error)); + .then(async (connection) => { + /*...*/ + let savedPhotos = await connection.manager.find(Photo) + console.log("All photos from the db: ", savedPhotos) + }) + .catch((error) => console.log(error)) ``` `savedPhotos`ๆ˜ฏไธ€ไธช Photo ๅฏน่ฑกๆ•ฐ็ป„๏ผŒๅ…ถไธญๅŒ…ๅซไปŽๆ•ฐๆฎๅบ“ๅŠ ่ฝฝ็š„ๆ•ฐๆฎใ€‚ @@ -613,27 +615,27 @@ createConnection(/*...*/) ็Žฐๅœจ่ฎฉๆˆ‘ไปฌ้‡ๆž„ไน‹ๅ‰็š„ไปฃ็ ๏ผŒๅนถไฝฟ็”จ`Repository`่€Œไธๆ˜ฏ`EntityManager`ใ€‚ๆฏไธชๅฎžไฝ“้ƒฝๆœ‰่‡ชๅทฑ็š„ๅญ˜ๅ‚จๅบ“๏ผŒๅฏไปฅๅค„็†ๅ…ถๅฎžไฝ“็š„ๆ‰€ๆœ‰ๆ“ไฝœใ€‚ๅฝ“ไฝ ็ปๅธธๅค„็†ๅฎžไฝ“ๆ—ถ๏ผŒRepositories ๆฏ” EntityManagers ๆ›ดๆ–นไพฟไฝฟ็”จ๏ผš ```typescript -import { createConnection } from "typeorm"; -import { Photo } from "./entity/Photo"; +import { createConnection } from "typeorm" +import { Photo } from "./entity/Photo" createConnection(/*...*/) - .then(async connection => { - let photo = new Photo(); - photo.name = "Me and Bears"; - photo.description = "I am near polar bears"; - photo.filename = "photo-with-bears.jpg"; - photo.views = 1; - photo.isPublished = true; - - let photoRepository = connection.getRepository(Photo); - - await photoRepository.save(photo); - console.log("Photo has been saved"); - - let savedPhotos = await photoRepository.find(); - console.log("All photos from the db: ", savedPhotos); - }) - .catch(error => console.log(error)); + .then(async (connection) => { + let photo = new Photo() + photo.name = "Me and Bears" + photo.description = "I am near polar bears" + photo.filename = "photo-with-bears.jpg" + photo.views = 1 + photo.isPublished = true + + let photoRepository = connection.getRepository(Photo) + + await photoRepository.save(photo) + console.log("Photo has been saved") + + let savedPhotos = await photoRepository.find() + console.log("All photos from the db: ", savedPhotos) + }) + .catch((error) => console.log(error)) ``` ไบ†่งฃ[ๆ›ดๅคš](./docs/working-with-repository.md)ๆœ‰ๅ…ณ Repository ็š„ไฟกๆฏใ€‚ @@ -643,32 +645,36 @@ createConnection(/*...*/) ่ฎฉๆˆ‘ไปฌไฝฟ็”จ Repository ๅฐ่ฏ•ๆ›ดๅคš็š„ๅŠ ่ฝฝๆ“ไฝœ: ```typescript -import { createConnection } from "typeorm"; -import { Photo } from "./entity/Photo"; +import { createConnection } from "typeorm" +import { Photo } from "./entity/Photo" createConnection(/*...*/) - .then(async connection => { - /*...*/ - let allPhotos = await photoRepository.find(); - console.log("All photos from the db: ", allPhotos); - - let firstPhoto = await photoRepository.findOne(1); - console.log("First photo from the db: ", firstPhoto); - - let meAndBearsPhoto = await photoRepository.findOne({ name: "Me and Bears" }); - console.log("Me and Bears photo from the db: ", meAndBearsPhoto); - - let allViewedPhotos = await photoRepository.find({ views: 1 }); - console.log("All viewed photos: ", allViewedPhotos); - - let allPublishedPhotos = await photoRepository.find({ isPublished: true }); - console.log("All published photos: ", allPublishedPhotos); - - let [allPhotos, photosCount] = await photoRepository.findAndCount(); - console.log("All photos: ", allPhotos); - console.log("Photos count: ", photosCount); - }) - .catch(error => console.log(error)); + .then(async (connection) => { + /*...*/ + let allPhotos = await photoRepository.find() + console.log("All photos from the db: ", allPhotos) + + let firstPhoto = await photoRepository.findOne(1) + console.log("First photo from the db: ", firstPhoto) + + let meAndBearsPhoto = await photoRepository.findOne({ + name: "Me and Bears", + }) + console.log("Me and Bears photo from the db: ", meAndBearsPhoto) + + let allViewedPhotos = await photoRepository.find({ views: 1 }) + console.log("All viewed photos: ", allViewedPhotos) + + let allPublishedPhotos = await photoRepository.find({ + isPublished: true, + }) + console.log("All published photos: ", allPublishedPhotos) + + let [allPhotos, photosCount] = await photoRepository.findAndCount() + console.log("All photos: ", allPhotos) + console.log("Photos count: ", photosCount) + }) + .catch((error) => console.log(error)) ``` ### ๅœจๆ•ฐๆฎๅบ“ไธญๆ›ดๆ–ฐ @@ -676,17 +682,17 @@ createConnection(/*...*/) ่ฎฉๆˆ‘ไปฌไปŽๆ•ฐๆฎๅบ“ๅŠ ่ฝฝๅ‡บ photo๏ผŒๆ›ดๆ–ฐๅนถไฟๅญ˜ๅˆฐๆ•ฐๆฎๅบ“๏ผš ```typescript -import { createConnection } from "typeorm"; -import { Photo } from "./entity/Photo"; +import { createConnection } from "typeorm" +import { Photo } from "./entity/Photo" createConnection(/*...*/) - .then(async connection => { - /*...*/ - let photoToUpdate = await photoRepository.findOne(1); - photoToUpdate.name = "Me, my friends and polar bears"; - await photoRepository.save(photoToUpdate); - }) - .catch(error => console.log(error)); + .then(async (connection) => { + /*...*/ + let photoToUpdate = await photoRepository.findOne(1) + photoToUpdate.name = "Me, my friends and polar bears" + await photoRepository.save(photoToUpdate) + }) + .catch((error) => console.log(error)) ``` ่ฟ™ไธช`id = 1`็š„ photo ๅœจๆ•ฐๆฎๅบ“ไธญๅฐฑๆˆๅŠŸๆ›ดๆ–ฐไบ†ใ€‚ @@ -696,16 +702,16 @@ createConnection(/*...*/) ่ฎฉๆˆ‘ไปฌไปŽๆ•ฐๆฎๅบ“ไธญๅˆ ้™คๆˆ‘ไปฌ็š„ Photo: ```typescript -import { createConnection } from "typeorm"; -import { Photo } from "./entity/Photo"; +import { createConnection } from "typeorm" +import { Photo } from "./entity/Photo" createConnection(/*...*/) - .then(async connection => { - /*...*/ - let photoToRemove = await photoRepository.findOne(1); - await photoRepository.remove(photoToRemove); - }) - .catch(error => console.log(error)); + .then(async (connection) => { + /*...*/ + let photoToRemove = await photoRepository.findOne(1) + await photoRepository.remove(photoToRemove) + }) + .catch((error) => console.log(error)) ``` ่ฟ™ไธช`id = 1`็š„ photo ๅœจๆ•ฐๆฎๅบ“ไธญ่ขซ็งป้™คไบ†ใ€‚ @@ -715,32 +721,38 @@ createConnection(/*...*/) ่ฎฉๆˆ‘ไปฌไธŽๅฆไธ€ไธช็ฑปๅˆ›ๅปบไธ€ๅฏนไธ€็š„ๅ…ณ็ณปใ€‚ๅ…ˆๅœจ`PhotoMetadata.ts`ไธญๅˆ›ๅปบไธ€ไธชๆ–ฐ็ฑปใ€‚ๆญค PhotoMetadata ็ฑปๅบ”ๅŒ…ๅซ photo ็š„ๅ…ถไป–ๅ…ƒไฟกๆฏ๏ผš ```typescript -import { Entity, Column, PrimaryGeneratedColumn, OneToOne, JoinColumn } from "typeorm"; -import { Photo } from "./Photo"; +import { + Entity, + Column, + PrimaryGeneratedColumn, + OneToOne, + JoinColumn, +} from "typeorm" +import { Photo } from "./Photo" @Entity() export class PhotoMetadata { - @PrimaryGeneratedColumn() - id: number; + @PrimaryGeneratedColumn() + id: number - @Column("int") - height: number; + @Column("int") + height: number - @Column("int") - width: number; + @Column("int") + width: number - @Column() - orientation: string; + @Column() + orientation: string - @Column() - compressed: boolean; + @Column() + compressed: boolean - @Column() - comment: string; + @Column() + comment: string - @OneToOne(type => Photo) - @JoinColumn() - photo: Photo; + @OneToOne((type) => Photo) + @JoinColumn() + photo: Photo } ``` @@ -771,42 +783,44 @@ export class PhotoMetadata { ็Žฐๅœจๆฅๅˆ›ๅปบไธ€ไธช photo๏ผŒๅฎƒ็š„ๅ…ƒไฟกๆฏๅฐ†ๅฎƒไปฌไบ’็›ธ่ฟžๆŽฅ่ตทๆฅใ€‚ ```typescript -import { createConnection } from "typeorm"; -import { Photo } from "./entity/Photo"; -import { PhotoMetadata } from "./entity/PhotoMetadata"; +import { createConnection } from "typeorm" +import { Photo } from "./entity/Photo" +import { PhotoMetadata } from "./entity/PhotoMetadata" createConnection(/*...*/) - .then(async connection => { - // ๅˆ›ๅปบ photo - let photo = new Photo(); - photo.name = "Me and Bears"; - photo.description = "I am near polar bears"; - photo.filename = "photo-with-bears.jpg"; - photo.isPublished = true; - - // ๅˆ›ๅปบ photo metadata - let metadata = new PhotoMetadata(); - metadata.height = 640; - metadata.width = 480; - metadata.compressed = true; - metadata.comment = "cybershoot"; - metadata.orientation = "portait"; - metadata.photo = photo; // ่”ๆŽฅไธค่€… - - // ่Žทๅ–ๅฎžไฝ“ repositories - let photoRepository = connection.getRepository(Photo); - let metadataRepository = connection.getRepository(PhotoMetadata); - - // ๅ…ˆไฟๅญ˜photo - await photoRepository.save(photo); - - // ็„ถๅŽไฟๅญ˜photo็š„metadata - await metadataRepository.save(metadata); - - // ๅฎŒๆˆ - console.log("Metadata is saved, and relation between metadata and photo is created in the database too"); - }) - .catch(error => console.log(error)); + .then(async (connection) => { + // ๅˆ›ๅปบ photo + let photo = new Photo() + photo.name = "Me and Bears" + photo.description = "I am near polar bears" + photo.filename = "photo-with-bears.jpg" + photo.isPublished = true + + // ๅˆ›ๅปบ photo metadata + let metadata = new PhotoMetadata() + metadata.height = 640 + metadata.width = 480 + metadata.compressed = true + metadata.comment = "cybershoot" + metadata.orientation = "portait" + metadata.photo = photo // ่”ๆŽฅไธค่€… + + // ่Žทๅ–ๅฎžไฝ“ repositories + let photoRepository = connection.getRepository(Photo) + let metadataRepository = connection.getRepository(PhotoMetadata) + + // ๅ…ˆไฟๅญ˜photo + await photoRepository.save(photo) + + // ็„ถๅŽไฟๅญ˜photo็š„metadata + await metadataRepository.save(metadata) + + // ๅฎŒๆˆ + console.log( + "Metadata is saved, and relation between metadata and photo is created in the database too", + ) + }) + .catch((error) => console.log(error)) ``` ### ๅๅ‘ๅ…ณ็ณป @@ -814,29 +828,35 @@ createConnection(/*...*/) ๅ…ณ็ณปๅฏไปฅๆ˜ฏๅ•ๅ‘็š„ๆˆ–ๅŒๅ‘็š„ใ€‚็›ฎๅ‰ PhotoMetadata ๅ’Œ Photo ไน‹้—ด็š„ๅ…ณ็ณปๆ˜ฏๅ•ๅ‘็š„ใ€‚ๅ…ณ็ณป็š„ๆ‰€ๆœ‰่€…ๆ˜ฏ PhotoMetadata๏ผŒ่€Œ Photo ๅฏน PhotoMetadata ไธ€ๆ— ๆ‰€็Ÿฅใ€‚่ฟ™ไฝฟๅพ—ไปŽ Photo ไธญ่ฎฟ้—ฎ PhotoMetadata ๅ˜ๅพ—ๅพˆๅคๆ‚ใ€‚่ฆ่งฃๅ†ณ่ฟ™ไธช้—ฎ้ข˜๏ผŒๆˆ‘ไปฌๅบ”่ฏฅๅœจ PhotoMetadata ๅ’Œ Photo ไน‹้—ดๅปบ็ซ‹ๅŒๅ‘ๅ…ณ็ณปใ€‚่ฎฉๆˆ‘ไปฌๆฅไฟฎๆ”นไธ€ไธ‹ๅฎžไฝ“๏ผš ```typescript -import { Entity, Column, PrimaryGeneratedColumn, OneToOne, JoinColumn } from "typeorm"; -import { Photo } from "./Photo"; +import { + Entity, + Column, + PrimaryGeneratedColumn, + OneToOne, + JoinColumn, +} from "typeorm" +import { Photo } from "./Photo" @Entity() export class PhotoMetadata { - /* ... other columns */ + /* ... other columns */ - @OneToOne(type => Photo, photo => photo.metadata) - @JoinColumn() - photo: Photo; + @OneToOne((type) => Photo, (photo) => photo.metadata) + @JoinColumn() + photo: Photo } ``` ```typescript -import { Entity, Column, PrimaryGeneratedColumn, OneToOne } from "typeorm"; -import { PhotoMetadata } from "./PhotoMetadata"; +import { Entity, Column, PrimaryGeneratedColumn, OneToOne } from "typeorm" +import { PhotoMetadata } from "./PhotoMetadata" @Entity() export class Photo { - /* ... other columns */ + /* ... other columns */ - @OneToOne(type => PhotoMetadata, photoMetadata => photoMetadata.photo) - metadata: PhotoMetadata; + @OneToOne((type) => PhotoMetadata, (photoMetadata) => photoMetadata.photo) + metadata: PhotoMetadata } ``` @@ -849,17 +869,17 @@ export class Photo { ๅœจไธ€ไธชๆŸฅ่ฏขไธญๅŠ ่ฝฝ photo ๅŠ photo metadata ๆœ‰ไธค็งๆ–นๆณ•ใ€‚ไฝฟ็”จ`find *`ๆˆ–ไฝฟ็”จ`QueryBuilder`ใ€‚ๆˆ‘ไปฌๅ…ˆไฝฟ็”จ`find *`ๆ–นๆณ•ใ€‚ `find *`ๆ–นๆณ•ๅ…่ฎธไฝ ไฝฟ็”จ`FindOneOptions` / `FindManyOptions`ๆŽฅๅฃๆŒ‡ๅฎšๅฏน่ฑกใ€‚ ```typescript -import { createConnection } from "typeorm"; -import { Photo } from "./entity/Photo"; -import { PhotoMetadata } from "./entity/PhotoMetadata"; +import { createConnection } from "typeorm" +import { Photo } from "./entity/Photo" +import { PhotoMetadata } from "./entity/PhotoMetadata" createConnection(/*...*/) - .then(async connection => { - /*...*/ - let photoRepository = connection.getRepository(Photo); - let photos = await photoRepository.find({ relations: ["metadata"] }); - }) - .catch(error => console.log(error)); + .then(async (connection) => { + /*...*/ + let photoRepository = connection.getRepository(Photo) + let photos = await photoRepository.find({ relations: ["metadata"] }) + }) + .catch((error) => console.log(error)) ``` photos ๅฐ†ๅŒ…ๅซๆฅ่‡ชๆ•ฐๆฎๅบ“็š„ photos ๆ•ฐ็ป„๏ผŒๆฏไธช photo ๅฐ†ๅŒ…ๅซๅ…ถ photo metadataใ€‚่ฏฆ็ป†ไบ†่งฃๆœฌๆ–‡ๆกฃไธญ็š„[ๆŸฅๆ‰พ้€‰้กน](./docs/find-options.md)ใ€‚ @@ -867,20 +887,20 @@ photos ๅฐ†ๅŒ…ๅซๆฅ่‡ชๆ•ฐๆฎๅบ“็š„ photos ๆ•ฐ็ป„๏ผŒๆฏไธช photo ๅฐ†ๅŒ…ๅซๅ…ถ pho ไฝฟ็”จๆŸฅๆ‰พ้€‰้กนๅพˆ็ฎ€ๅ•๏ผŒไฝ†ๆ˜ฏๅฆ‚ๆžœไฝ ้œ€่ฆๆ›ดๅคๆ‚็š„ๆŸฅ่ฏข๏ผŒๅˆ™ๅบ”่ฏฅไฝฟ็”จ`QueryBuilder`ใ€‚ `QueryBuilder`ๅ…่ฎธไปฅๆ›ดไผ˜้›…็š„ๆ–นๅผไฝฟ็”จๆ›ดๅคๆ‚็š„ๆŸฅ่ฏข๏ผš ```typescript -import { createConnection } from "typeorm"; -import { Photo } from "./entity/Photo"; -import { PhotoMetadata } from "./entity/PhotoMetadata"; +import { createConnection } from "typeorm" +import { Photo } from "./entity/Photo" +import { PhotoMetadata } from "./entity/PhotoMetadata" createConnection(/*...*/) - .then(async connection => { - /*...*/ - let photos = await connection - .getRepository(Photo) - .createQueryBuilder("photo") - .innerJoinAndSelect("photo.metadata", "metadata") - .getMany(); - }) - .catch(error => console.log(error)); + .then(async (connection) => { + /*...*/ + let photos = await connection + .getRepository(Photo) + .createQueryBuilder("photo") + .innerJoinAndSelect("photo.metadata", "metadata") + .getMany() + }) + .catch((error) => console.log(error)) ``` `QueryBuilder`ๅ…่ฎธๅˆ›ๅปบๅ’Œๆ‰ง่กŒๅ‡ ไนŽไปปไฝ•ๅคๆ‚ๆ€ง็š„ SQL ๆŸฅ่ฏขใ€‚ไฝฟ็”จ`QueryBuilder`ๆ—ถ๏ผŒ่ฏท่€ƒ่™‘ๅˆ›ๅปบ SQL ๆŸฅ่ฏขใ€‚ๅœจๆญค็คบไพ‹ไธญ๏ผŒ"photo"ๅ’Œ"metadata"ๆ˜ฏๅบ”็”จไบŽๆ‰€้€‰ photos ็š„ โ€‹โ€‹ ๅˆซๅใ€‚ไฝ ๅฏไปฅไฝฟ็”จๅˆซๅๆฅ่ฎฟ้—ฎๆ‰€้€‰ๆ•ฐๆฎ็š„ๅˆ—ๅ’Œๅฑžๆ€งใ€‚ @@ -891,12 +911,12 @@ createConnection(/*...*/) ```typescript export class Photo { - /// ... other columns + /// ... other columns - @OneToOne(type => PhotoMetadata, metadata => metadata.photo, { - cascade: true - }) - metadata: PhotoMetadata; + @OneToOne((type) => PhotoMetadata, (metadata) => metadata.photo, { + cascade: true, + }) + metadata: PhotoMetadata } ``` @@ -904,33 +924,33 @@ export class Photo { ```typescript createConnection(options) - .then(async connection => { - // ๅˆ›ๅปบ photo ๅฏน่ฑก - let photo = new Photo(); - photo.name = "Me and Bears"; - photo.description = "I am near polar bears"; - photo.filename = "photo-with-bears.jpg"; - photo.isPublished = true; - - // ๅˆ›ๅปบ photo metadata ๅฏน่ฑก - let metadata = new PhotoMetadata(); - metadata.height = 640; - metadata.width = 480; - metadata.compressed = true; - metadata.comment = "cybershoot"; - metadata.orientation = "portait"; - - photo.metadata = metadata; // this way we connect them - - // ่Žทๅ– repository - let photoRepository = connection.getRepository(Photo); - - // ไฟๅญ˜photo็š„ๅŒๆ—ถไฟๅญ˜metadata - await photoRepository.save(photo); - - console.log("Photo is saved, photo metadata is saved too."); - }) - .catch(error => console.log(error)); + .then(async (connection) => { + // ๅˆ›ๅปบ photo ๅฏน่ฑก + let photo = new Photo() + photo.name = "Me and Bears" + photo.description = "I am near polar bears" + photo.filename = "photo-with-bears.jpg" + photo.isPublished = true + + // ๅˆ›ๅปบ photo metadata ๅฏน่ฑก + let metadata = new PhotoMetadata() + metadata.height = 640 + metadata.width = 480 + metadata.compressed = true + metadata.comment = "cybershoot" + metadata.orientation = "portait" + + photo.metadata = metadata // this way we connect them + + // ่Žทๅ– repository + let photoRepository = connection.getRepository(Photo) + + // ไฟๅญ˜photo็š„ๅŒๆ—ถไฟๅญ˜metadata + await photoRepository.save(photo) + + console.log("Photo is saved, photo metadata is saved too.") + }) + .catch((error) => console.log(error)) ``` ### ๅˆ›ๅปบๅคšๅฏนไธ€/ไธ€ๅฏนๅคšๅ…ณ็ณป @@ -938,19 +958,25 @@ createConnection(options) ่ฎฉๆˆ‘ไปฌๅˆ›ๅปบไธ€ไธชๅคšๅฏนไธ€/ไธ€ๅฏนๅคš็š„ๅ…ณ็ณปใ€‚ๅ‡่ฎพไธ€ไธช photo ๆœ‰ไธ€ไธช author๏ผŒๆฏไธช author ้ƒฝๅฏไปฅๆœ‰ๅคšไธช photosใ€‚้ฆ–ๅ…ˆ่ฎฉๆˆ‘ไปฌๅˆ›ๅปบไธ€ไธช`Author`็ฑป๏ผš ```typescript -import { Entity, Column, PrimaryGeneratedColumn, OneToMany, JoinColumn } from "typeorm"; -import { Photo } from "./Photo"; +import { + Entity, + Column, + PrimaryGeneratedColumn, + OneToMany, + JoinColumn, +} from "typeorm" +import { Photo } from "./Photo" @Entity() export class Author { - @PrimaryGeneratedColumn() - id: number; + @PrimaryGeneratedColumn() + id: number - @Column() - name: string; + @Column() + name: string - @OneToMany(type => Photo, photo => photo.author) // note: we will create author property in the Photo class below - photos: Photo[]; + @OneToMany((type) => Photo, (photo) => photo.author) // note: we will create author property in the Photo class below + photos: Photo[] } ``` @@ -960,16 +986,16 @@ export class Author { ็Žฐๅœจ่ฎฉๆˆ‘ไปฌๅฐ†ๅ…ณ็ณป็š„ๆ‰€ๆœ‰่€…ๆ–นๆทปๅŠ ๅˆฐ Photo ๅฎžไฝ“ไธญ๏ผš ```typescript -import { Entity, Column, PrimaryGeneratedColumn, ManyToOne } from "typeorm"; -import { PhotoMetadata } from "./PhotoMetadata"; -import { Author } from "./Author"; +import { Entity, Column, PrimaryGeneratedColumn, ManyToOne } from "typeorm" +import { PhotoMetadata } from "./PhotoMetadata" +import { Author } from "./Author" @Entity() export class Photo { - /* ... other columns */ + /* ... other columns */ - @ManyToOne(type => Author, author => author.photos) - author: Author; + @ManyToOne((type) => Author, (author) => author.photos) + author: Author } ``` @@ -1005,19 +1031,25 @@ export class Photo { ๅ‡่ฎพไธ€ไธช photo ๅฏไปฅๆ”พๅœจๅคšไธช albums ไธญ๏ผŒๆฏไธช albums ๅฏไปฅๅŒ…ๅซๅคšไธช photoใ€‚่ฎฉๆˆ‘ไปฌๅˆ›ๅปบไธ€ไธช`Album`็ฑป๏ผš ```typescript -import { Entity, PrimaryGeneratedColumn, Column, ManyToMany, JoinTable } from "typeorm"; +import { + Entity, + PrimaryGeneratedColumn, + Column, + ManyToMany, + JoinTable, +} from "typeorm" @Entity() export class Album { - @PrimaryGeneratedColumn() - id: number; + @PrimaryGeneratedColumn() + id: number - @Column() - name: string; + @Column() + name: string - @ManyToMany(type => Photo, photo => photo.albums) - @JoinTable() - photos: Photo[]; + @ManyToMany((type) => Photo, (photo) => photo.albums) + @JoinTable() + photos: Photo[] } ``` @@ -1027,10 +1059,10 @@ export class Album { ```typescript export class Photo { - /// ... other columns + /// ... other columns - @ManyToMany(type => Album, album => album.photos) - albums: Album[]; + @ManyToMany((type) => Album, (album) => album.photos) + albums: Album[] } ``` @@ -1049,36 +1081,38 @@ export class Photo { ```typescript const options: ConnectionOptions = { - // ... other options - entities: [Photo, PhotoMetadata, Author, Album] -}; + // ... other options + entities: [Photo, PhotoMetadata, Author, Album], +} ``` ็Žฐๅœจ่ฎฉๆˆ‘ไปฌๅฐ† albums ๅ’Œ photos ๆ’ๅ…ฅๆˆ‘ไปฌ็š„ๆ•ฐๆฎๅบ“: ```typescript -let connection = await createConnection(options); +let connection = await createConnection(options) // create a few albums -let album1 = new Album(); -album1.name = "Bears"; -await connection.manager.save(album1); +let album1 = new Album() +album1.name = "Bears" +await connection.manager.save(album1) -let album2 = new Album(); -album2.name = "Me"; -await connection.manager.save(album2); +let album2 = new Album() +album2.name = "Me" +await connection.manager.save(album2) // create a few photos -let photo = new Photo(); -photo.name = "Me and Bears"; -photo.description = "I am near polar bears"; -photo.filename = "photo-with-bears.jpg"; -photo.albums = [album1, album2]; -await connection.manager.save(photo); +let photo = new Photo() +photo.name = "Me and Bears" +photo.description = "I am near polar bears" +photo.filename = "photo-with-bears.jpg" +photo.albums = [album1, album2] +await connection.manager.save(photo) // now our photo is saved and albums are attached to it // now lets load them: -const loadedPhoto = await connection.getRepository(Photo).findOne(1, { relations: ["albums"] }); +const loadedPhoto = await connection + .getRepository(Photo) + .findOne(1, { relations: ["albums"] }) ``` `loadedPhoto` ๅฆ‚ไธ‹ๆ‰€็คบ: @@ -1105,17 +1139,17 @@ const loadedPhoto = await connection.getRepository(Photo).findOne(1, { relations ```typescript let photos = await connection - .getRepository(Photo) - .createQueryBuilder("photo") // first argument is an alias. Alias is what you are selecting - photos. You must specify it. - .innerJoinAndSelect("photo.metadata", "metadata") - .leftJoinAndSelect("photo.albums", "album") - .where("photo.isPublished = true") - .andWhere("(photo.name = :photoName OR photo.name = :bearName)") - .orderBy("photo.id", "DESC") - .skip(5) - .take(10) - .setParameters({ photoName: "My", bearName: "Mishka" }) - .getMany(); + .getRepository(Photo) + .createQueryBuilder("photo") // first argument is an alias. Alias is what you are selecting - photos. You must specify it. + .innerJoinAndSelect("photo.metadata", "metadata") + .leftJoinAndSelect("photo.albums", "album") + .where("photo.isPublished = true") + .andWhere("(photo.name = :photoName OR photo.name = :bearName)") + .orderBy("photo.id", "DESC") + .skip(5) + .take(10) + .setParameters({ photoName: "My", bearName: "Mishka" }) + .getMany() ``` ๆญคๆŸฅ่ฏข้€‰ๆ‹ฉๆ‰€ๆœ‰ published ็š„ name ็ญ‰ไบŽ"My"ๆˆ–"Mishka"็š„ photosใ€‚ๅฎƒๅฐ†ไปŽ็ป“ๆžœไธญ็š„็ฌฌ 5 ไธช๏ผˆๅˆ†้กตๅ็งป๏ผ‰ๅผ€ๅง‹๏ผŒๅนถไธ”ไป…้€‰ๆ‹ฉ 10 ไธช็ป“ๆžœ๏ผˆๅˆ†้กต้™ๅˆถ๏ผ‰ใ€‚ๅพ—ๅˆฐ็š„็ป“ๆžœๅฐ†ๆŒ‰ ID ้™ๅบๆŽ’ๅบใ€‚photo ็š„ albums ๅฐ†่ขซ left-joined๏ผŒๅ…ถๅ…ƒๆ•ฐๆฎๅฐ†่ขซ inner joinedใ€‚ @@ -1129,27 +1163,27 @@ let photos = await connection ไธ‹้ข่ฟ™ไบ› repositories ๅฏไปฅๅธฎๅŠฉไฝ ๅฟซ้€Ÿๅผ€ๅง‹๏ผš -- [Example how to use TypeORM with TypeScript](https://github.com/typeorm/typescript-example) -- [Example how to use TypeORM with JavaScript](https://github.com/typeorm/javascript-example) -- [Example how to use TypeORM with JavaScript and Babel](https://github.com/typeorm/babel-example) -- [Example how to use TypeORM with TypeScript and SystemJS in Browser](https://github.com/typeorm/browser-example) -- [Example how to use Express and TypeORM](https://github.com/typeorm/typescript-express-example) -- [Example how to use Koa and TypeORM](https://github.com/typeorm/typescript-koa-example) -- [Example how to use TypeORM with MongoDB](https://github.com/typeorm/mongo-typescript-example) -- [Example how to use TypeORM in a Cordova/PhoneGap app](https://github.com/typeorm/cordova-example) -- [Example how to use TypeORM with an Ionic app](https://github.com/typeorm/ionic-example) -- [Example how to use TypeORM with React Native](https://github.com/typeorm/react-native-example) -- [Example how to use TypeORM with Electron using JavaScript](https://github.com/typeorm/electron-javascript-example) -- [Example how to use TypeORM with Electron using TypeScript](https://github.com/typeorm/electron-typescript-example) +- [Example how to use TypeORM with TypeScript](https://github.com/typeorm/typescript-example) +- [Example how to use TypeORM with JavaScript](https://github.com/typeorm/javascript-example) +- [Example how to use TypeORM with JavaScript and Babel](https://github.com/typeorm/babel-example) +- [Example how to use TypeORM with TypeScript and SystemJS in Browser](https://github.com/typeorm/browser-example) +- [Example how to use Express and TypeORM](https://github.com/typeorm/typescript-express-example) +- [Example how to use Koa and TypeORM](https://github.com/typeorm/typescript-koa-example) +- [Example how to use TypeORM with MongoDB](https://github.com/typeorm/mongo-typescript-example) +- [Example how to use TypeORM in a Cordova/PhoneGap app](https://github.com/typeorm/cordova-example) +- [Example how to use TypeORM with an Ionic app](https://github.com/typeorm/ionic-example) +- [Example how to use TypeORM with React Native](https://github.com/typeorm/react-native-example) +- [Example how to use TypeORM with Electron using JavaScript](https://github.com/typeorm/electron-javascript-example) +- [Example how to use TypeORM with Electron using TypeScript](https://github.com/typeorm/electron-typescript-example) ## ๆ‰ฉๅฑ• ่ฟ™ๅ‡ ไธชๆ‰ฉๅฑ•ๅฏไปฅ็ฎ€ๅŒ– TypeORM ็š„ไฝฟ็”จ๏ผŒๅนถๅฐ†ๅ…ถไธŽๅ…ถไป–ๆจกๅ—้›†ๆˆ๏ผš -- [TypeORM + GraphQL framework](http://vesper-framework.com) -- [TypeORM integration](https://github.com/typeorm/typeorm-typedi-extensions) with [TypeDI](https://github.com/pleerock/typedi) -- [TypeORM integration](https://github.com/typeorm/typeorm-routing-controllers-extensions) with [routing-controllers](https://github.com/pleerock/routing-controllers) -- ไปŽ็Žฐๆœ‰ๆ•ฐๆฎๅบ“็”Ÿๆˆๆจกๅž‹ - [typeorm-model-generator](https://github.com/Kononnable/typeorm-model-generator) +- [TypeORM + GraphQL framework](http://vesper-framework.com) +- [TypeORM integration](https://github.com/typeorm/typeorm-typedi-extensions) with [TypeDI](https://github.com/pleerock/typedi) +- [TypeORM integration](https://github.com/typeorm/typeorm-routing-controllers-extensions) with [routing-controllers](https://github.com/pleerock/routing-controllers) +- ไปŽ็Žฐๆœ‰ๆ•ฐๆฎๅบ“็”Ÿๆˆๆจกๅž‹ - [typeorm-model-generator](https://github.com/Kononnable/typeorm-model-generator) ## ่ดก็Œฎ @@ -1170,4 +1204,3 @@ let photos = await connection ๆˆไธบ้‡‘็‰Œ่ตžๅŠฉๅ•†๏ผŒๅนถไปŽๆˆ‘ไปฌ็š„ๆ ธๅฟƒ่ดก็Œฎ่€…้‚ฃ้‡Œ่Žทๅพ—้ซ˜็บงๆŠ€ๆœฏๆ”ฏๆŒใ€‚ [ๆˆไธบ้‡‘็‰Œ่ตžๅŠฉๅ•†](https://opencollective.com/typeorm) - diff --git a/docs/zh_CN/connection-options.md b/docs/zh_CN/connection-options.md index 2c0ad657e9..2b7e8b27b0 100644 --- a/docs/zh_CN/connection-options.md +++ b/docs/zh_CN/connection-options.md @@ -375,6 +375,8 @@ - `authMechanism` - ่ฎพ็ฝฎMongoDB็”จไบŽ้ชŒ่ฏ่ฟžๆŽฅ็š„่บซไปฝ้ชŒ่ฏๆœบๅˆถใ€‚ +- `directConnection` - ๆŒ‡ๅฎšๆ˜ฏๅฆๅผบๅˆถๅฐ†ๆ‰€ๆœ‰ๆ“ไฝœๅˆ†ๆดพๅˆฐๆŒ‡ๅฎš็š„ไธปๆœบใ€‚ + > ๆณจ๏ผš ็”ฑไบŽ่ฏ‘่€…ๅฏนMongoDB็†่งฃไธๅคŸๆทฑๅ…ฅ๏ผŒๆ•…ไธ€ไบ›็ฟป่ฏ‘็›ดๆŽฅไฝฟ็”จไบ†ๆœบ็ฟป๏ผŒๅ› ๆญคไผšๆœ‰ไบ›่ฏไธ่พพๆ„๏ผŒๅฆ‚ๆœ‰ๆ›ดๅฅฝ็š„็ฟป่ฏ‘้€‰้กน๏ผŒ่ฏทๆไบคPR่ฟ›่กŒๅฎŒๅ–„ใ€‚ ## `sql.js` @@ -420,11 +422,6 @@ ], migrations: [ "migration/*.js" - ], - cli: { - entitiesDir: "entity", - migrationsDir: "migration", - subscribersDir: "subscriber" - } + ] } ``` diff --git a/docs/zh_CN/data-source.md b/docs/zh_CN/data-source.md index 416729adc4..958fba99ab 100644 --- a/docs/zh_CN/data-source.md +++ b/docs/zh_CN/data-source.md @@ -1,10 +1,10 @@ # ๆ•ฐๆฎๅบ“่ฟžๆŽฅ - * [่ฟžๆŽฅ](#connection) - * [ไป€ไนˆๆ˜ฏ`Connection`](#ไป€ไนˆๆ˜ฏ`Connection`) - * [ๅˆ›ๅปบๆ–ฐ็š„่ฟžๆŽฅ](#ๅˆ›ๅปบๆ–ฐ็š„่ฟžๆŽฅ) - * [ไฝฟ็”จ`ConnectionManager`](#ไฝฟ็”จ`ConnectionManager`) - * [ไฝฟ็”จ่ฟžๆŽฅ](#ไฝฟ็”จ่ฟžๆŽฅ) +- [่ฟžๆŽฅ](#connection) +- [ไป€ไนˆๆ˜ฏ`Connection`](#ไป€ไนˆๆ˜ฏ`Connection`) +- [ๅˆ›ๅปบๆ–ฐ็š„่ฟžๆŽฅ](#ๅˆ›ๅปบๆ–ฐ็š„่ฟžๆŽฅ) +- [ไฝฟ็”จ`ConnectionManager`](#ไฝฟ็”จ`ConnectionManager`) +- [ไฝฟ็”จ่ฟžๆŽฅ](#ไฝฟ็”จ่ฟžๆŽฅ) ## ไป€ไนˆๆ˜ฏ`Connection` @@ -22,69 +22,69 @@ TypeORM ็š„`Connection`ไธไผšๅƒ็œ‹่ตทๆฅ้‚ฃๆ ท่ฎพ็ฝฎๅ•ไธชๆ•ฐๆฎๅบ“่ฟžๆŽฅ๏ผŒ่€Œ `createConnection` ๅˆ›ๅปบๅ•ไธช่ฟžๆŽฅ๏ผš ```typescript -import { createConnection, Connection } from "typeorm"; +import { createConnection, Connection } from "typeorm" const connection = await createConnection({ - type: "mysql", - host: "localhost", - port: 3306, - username: "test", - password: "test", - database: "test" -}); + type: "mysql", + host: "localhost", + port: 3306, + username: "test", + password: "test", + database: "test", +}) ``` ๅชไฝฟ็”จ`url`ๅ’Œ`type`ไนŸๅฏไปฅ่ฟ›่กŒ่ฟžๆŽฅใ€‚ ```js createConnection({ - type: "postgres", - url: "postgres://test:test@localhost/test" -}); + type: "postgres", + url: "postgres://test:test@localhost/test", +}) ``` `createConnections` ๅˆ›ๅปบๅคšไธช่ฟžๆŽฅ: ```typescript -import { createConnections, Connection } from "typeorm"; +import { createConnections, Connection } from "typeorm" const connections = await createConnections([ - { - name: "default", - type: "mysql", - host: "localhost", - port: 3306, - username: "test", - password: "test", - database: "test" - }, - { - name: "test2-connection", - type: "mysql", - host: "localhost", - port: 3306, - username: "test", - password: "test", - database: "test2" - } -]); + { + name: "default", + type: "mysql", + host: "localhost", + port: 3306, + username: "test", + password: "test", + database: "test", + }, + { + name: "test2-connection", + type: "mysql", + host: "localhost", + port: 3306, + username: "test", + password: "test", + database: "test2", + }, +]) ``` ่ฟ™ไธค็งๆ–นๅผ้ƒฝๆ นๆฎไฝ ไผ ้€’็š„่ฟžๆŽฅ้€‰้กนๅˆ›ๅปบ`Connection`๏ผŒๅนถ่ฐƒ็”จ`connect`ๆ–นๆณ•ใ€‚ๅฆๅค–ไฝ ไนŸๅฏไปฅๅœจ้กน็›ฎ็š„ๆ น็›ฎๅฝ•ไธญๅˆ›ๅปบไธ€ไธช`ormconfig.json`ๆ–‡ไปถ๏ผŒ`createConnection`ๅ’Œ`createConnections`ๅฐ†่‡ชๅŠจไปŽๆญคๆ–‡ไปถไธญ่ฏปๅ–่ฟžๆŽฅ้€‰้กนใ€‚้กน็›ฎ็š„ๆ น็›ฎๅฝ•ไธŽ`node_modules`็›ฎๅฝ•็š„็บงๅˆซ็›ธๅŒใ€‚ ```typescript -import { createConnection, createConnections, Connection } from "typeorm"; +import { createConnection, createConnections, Connection } from "typeorm" -// createConnectionๅฐ†ไปŽormconfig.json / ormconfig.js / ormconfig.yml / ormconfig.env / ormconfig.xml ๆ–‡ไปถๆˆ–็‰นๆฎŠ็Žฏๅขƒๅ˜้‡ไธญๅŠ ่ฝฝ่ฟžๆŽฅ้€‰้กน -const connection: Connection = await createConnection(); +// createConnectionๅฐ†ไปŽormconfig.json / ormconfig.js / ormconfig.env ๆ–‡ไปถๆˆ–็‰นๆฎŠ็Žฏๅขƒๅ˜้‡ไธญๅŠ ่ฝฝ่ฟžๆŽฅ้€‰้กน +const connection: Connection = await createConnection() // ไฝ ๅฏไปฅๆŒ‡ๅฎš่ฆๅˆ›ๅปบ็š„่ฟžๆŽฅ็š„ๅ็งฐ // ๏ผˆๅฆ‚ๆžœ็œ็•ฅๅ็งฐ๏ผŒๅˆ™ๅฐ†ๅˆ›ๅปบๆฒกๆœ‰ๆŒ‡ๅฎšๅ็งฐ็š„่ฟžๆŽฅ๏ผ‰ -const secondConnection: Connection = await createConnection("test2-connection"); +const secondConnection: Connection = await createConnection("test2-connection") // ๅฆ‚ๆžœ่ฐƒ็”จcreateConnections่€Œไธๆ˜ฏcreateConnection // ๅฎƒๅฐ†ๅˆๅง‹ๅŒ–ๅนถ่ฟ”ๅ›žormconfigๆ–‡ไปถไธญๅฎšไน‰็š„ๆ‰€ๆœ‰่ฟžๆŽฅ -const connections: Connection[] = await createConnections(); +const connections: Connection[] = await createConnections() ``` ไธๅŒ็š„่ฟžๆŽฅๅฟ…้กปๅ…ทๆœ‰ไธๅŒ็š„ๅ็งฐใ€‚้ป˜่ฎคๆƒ…ๅ†ตไธ‹๏ผŒๅฆ‚ๆžœๆœชๆŒ‡ๅฎš่ฟžๆŽฅๅ็งฐ๏ผŒๅˆ™ไธบ`default`ใ€‚ @@ -93,13 +93,13 @@ const connections: Connection[] = await createConnections(); ๅˆ›ๅปบ่ฟžๆŽฅๅŽ๏ผŒไฝ ๅฏไปฅไฝฟ็”จ`getConnection`ๅ‡ฝๆ•ฐไปŽๅบ”็”จ็จ‹ๅบไธญ็š„ไปปไฝ•ไฝ็ฝฎไฝฟ็”จๅฎƒ๏ผš ```typescript -import { getConnection } from "typeorm"; +import { getConnection } from "typeorm" // ๅฏไปฅๅœจ่ฐƒ็”จcreateConnectionๅŽไฝฟ็”จๅนถ่งฃๆž -const connection = getConnection(); +const connection = getConnection() // ๅฆ‚ๆžœไฝ ๆœ‰ๅคšไธช่ฟžๆŽฅ๏ผŒๅˆ™ๅฏไปฅๆŒ‰ๅ็งฐ่Žทๅ–่ฟžๆŽฅ -const secondConnection = getConnection("test2-connection"); +const secondConnection = getConnection("test2-connection") ``` ๅบ”้ฟๅ…้ขๅค–ๅˆ›ๅปบ classes/services ๆฅๅญ˜ๅ‚จๅ’Œ็ฎก็†่ฟžๆŽฅใ€‚ๆญคๅŠŸ่ƒฝๅทฒๅตŒๅ…ฅๅˆฐ TypeORM ไธญ - ๆ— ้œ€่ฟ‡ๅบฆๅทฅ็จ‹ๅนถๅˆ›ๅปบๆ— ็”จ็š„ๆŠฝ่ฑกใ€‚ @@ -109,35 +109,35 @@ const secondConnection = getConnection("test2-connection"); ไฝ ๅฏไปฅไฝฟ็”จ`ConnectionManager`็ฑปๅˆ›ๅปบ่ฟžๆŽฅใ€‚ไพ‹ๅฆ‚๏ผš ```typescript -import { getConnectionManager, ConnectionManager, Connection } from "typeorm"; +import { getConnectionManager, ConnectionManager, Connection } from "typeorm" -const connectionManager = getConnectionManager(); +const connectionManager = getConnectionManager() const connection = connectionManager.create({ - type: "mysql", - host: "localhost", - port: 3306, - username: "test", - password: "test", - database: "test" -}); -await connection.connect(); // ๆ‰ง่กŒ่ฟžๆŽฅ + type: "mysql", + host: "localhost", + port: 3306, + username: "test", + password: "test", + database: "test", +}) +await connection.connect() // ๆ‰ง่กŒ่ฟžๆŽฅ ``` ่ฟ™ไธๆ˜ฏๅธธ่ง„ๅˆ›ๅปบ่ฟžๆŽฅ็š„ๆ–นๆณ•๏ผŒไฝ†ๅฎƒๅฏ่ƒฝๅฏนๆŸไบ›็”จๆˆทๆœ‰็”จใ€‚ไพ‹ๅฆ‚๏ผŒๆƒณ่ฆๅˆ›ๅปบ่ฟžๆŽฅๅนถๅญ˜ๅ‚จๅ…ถๅฎžไพ‹,ๅŒๆ—ถๆŽงๅˆถไฝ•ๆ—ถๅปบ็ซ‹ๅฎž้™…"connection"ใ€‚ไฝ ่ฟ˜ๅฏไปฅๅˆ›ๅปบๅ’Œ็ปดๆŠค่‡ชๅทฑ็š„`ConnectionManager`๏ผš ```typescript -import { getConnectionManager, ConnectionManager, Connection } from "typeorm"; +import { getConnectionManager, ConnectionManager, Connection } from "typeorm" -const connectionManager = new ConnectionManager(); +const connectionManager = new ConnectionManager() const connection = connectionManager.create({ - type: "mysql", - host: "localhost", - port: 3306, - username: "test", - password: "test", - database: "test" -}); -await connection.connect(); // ๆ‰ง่กŒ่ฟžๆŽฅ + type: "mysql", + host: "localhost", + port: 3306, + username: "test", + password: "test", + database: "test", +}) +await connection.connect() // ๆ‰ง่กŒ่ฟžๆŽฅ ``` ไฝ†่ฏทๆณจๆ„๏ผŒไฝฟ็”จ่ฏฅๆ–นๅผ๏ผŒไฝ ๅฐ†ๆ— ๆณ•ๅ†ไฝฟ็”จ`getConnection()` - ไฝ ้œ€่ฆๅญ˜ๅ‚จ่ฟžๆŽฅ็ฎก็†ๅ™จๅฎžไพ‹๏ผŒๅนถไฝฟ็”จ`connectionManager.get`ๆฅ่Žทๅ–ๆ‰€้œ€็š„่ฟžๆŽฅใ€‚ @@ -149,14 +149,14 @@ await connection.connect(); // ๆ‰ง่กŒ่ฟžๆŽฅ ่ฎพ็ฝฎ่ฟžๆŽฅๅŽ๏ผŒๅฏไปฅไฝฟ็”จ`getConnection`ๅ‡ฝๆ•ฐๅœจๅบ”็”จ็จ‹ๅบ็š„ไปปไฝ•ไฝ็ฝฎไฝฟ็”จๅฎƒ๏ผš ```typescript -import { getConnection } from "typeorm"; -import { User } from "../entity/User"; +import { getConnection } from "typeorm" +import { User } from "../entity/User" export class UserController { - @Get("/users") - getAll() { - return getConnection().manager.find(User); - } + @Get("/users") + getAll() { + return getConnection().manager.find(User) + } } ``` @@ -168,18 +168,18 @@ export class UserController { ไฝ†ไธ€่ˆฌๆฅ่ฏด๏ผŒไฝ ไธ่ฆๅคชๅคšไฝฟ็”จ`Connection`ใ€‚ๅคงๅคšๆ•ฐๆƒ…ๅ†ตไธ‹๏ผŒไฝ ๅช้œ€ๅˆ›ๅปบ่ฟžๆŽฅๅนถไฝฟ็”จ`getRepository()`ๅ’Œ`getManager()`ๆฅ่ฎฟ้—ฎ่ฟžๆŽฅ็š„็ฎก็†ๅ™จๅ’Œๅญ˜ๅ‚จๅบ“๏ผŒ่€Œๆ— ้œ€็›ดๆŽฅไฝฟ็”จ่ฟžๆŽฅๅฏน่ฑก๏ผš ```typescript -import { getManager, getRepository } from "typeorm"; -import { User } from "../entity/User"; +import { getManager, getRepository } from "typeorm" +import { User } from "../entity/User" export class UserController { - @Get("/users") - getAll() { - return getManager().find(User); - } - - @Get("/users/:id") - getAll(@Param("id") userId: number) { - return getRepository(User).findOne(userId); - } + @Get("/users") + getAll() { + return getManager().find(User) + } + + @Get("/users/:id") + getAll(@Param("id") userId: number) { + return getRepository(User).findOne(userId) + } } ``` diff --git a/docs/zh_CN/find-options.md b/docs/zh_CN/find-options.md index ad02c7e904..64139b9aa1 100644 --- a/docs/zh_CN/find-options.md +++ b/docs/zh_CN/find-options.md @@ -20,7 +20,7 @@ userRepository.find({ relations: ["profile", "photos", "videos"] }); userRepository.find({ relations: ["profile", "photos", "videos", "videos.video_attributes"] }); ``` -- `join` - ้œ€่ฆไธบๅฎžไฝ“ๆ‰ง่กŒ่”ๆŽฅ๏ผŒๆ‰ฉๅฑ•็‰ˆๅฏน็š„"relations"ใ€‚ +- `join` - ้œ€่ฆไธบๅฎžไฝ“ๆ‰ง่กŒ่”ๆŽฅ๏ผŒๆ‰ฉๅฑ•็‰ˆ็š„"relations"ใ€‚ ```typescript userRepository.find({ diff --git a/docs/zh_CN/index.md b/docs/zh_CN/index.md index c8e24aeee8..2917001032 100644 --- a/docs/zh_CN/index.md +++ b/docs/zh_CN/index.md @@ -28,117 +28,119 @@ TypeORM ๅ‚่€ƒไบ†ๅพˆๅคšๅ…ถไป–ไผ˜็ง€ ORM ็š„ๅฎž็Žฐ, ๆฏ”ๅฆ‚ [Hibernate](http://hib TypeORM ็š„ไธ€ไบ›็‰นๆ€ง: -- ๆ”ฏๆŒ [DataMapper](active-record-data-mapper.md#what-is-the-data-mapper-pattern) ๅ’Œ [ActiveRecord](active-record-data-mapper.md#what-is-the-active-record-pattern) (้šไฝ ้€‰ๆ‹ฉ) -- ๅฎžไฝ“ๅ’Œๅˆ— -- ๆ•ฐๆฎๅบ“็‰นๆ€งๅˆ—็ฑปๅž‹ -- ๅฎžไฝ“็ฎก็† -- ๅญ˜ๅ‚จๅบ“ๅ’Œ่‡ชๅฎšไน‰ๅญ˜ๅ‚จๅบ“ -- ๆธ…ๆ™ฐ็š„ๅฏน่ฑกๅ…ณ็ณปๆจกๅž‹ -- ๅ…ณ่”๏ผˆๅ…ณ็ณป๏ผ‰ -- ่ดชๅฉชๅ’Œๅปถ่ฟŸๅ…ณ็ณป -- ๅ•ๅ‘็š„๏ผŒๅŒๅ‘็š„ๅ’Œ่‡ชๅผ•็”จ็š„ๅ…ณ็ณป -- ๆ”ฏๆŒๅคš้‡็ปงๆ‰ฟๆจกๅผ -- ็บง่” -- ็ดขๅผ• -- ไบ‹ๅŠก -- ่ฟ็งปๅ’Œ่‡ชๅŠจ่ฟ็งป -- ่ฟžๆŽฅๆฑ  -- ไธปไปŽๅคๅˆถ -- ไฝฟ็”จๅคšไธชๆ•ฐๆฎๅบ“่ฟžๆŽฅ -- ไฝฟ็”จๅคšไธชๆ•ฐๆฎๅบ“็ฑปๅž‹ -- ่ทจๆ•ฐๆฎๅบ“ๅ’Œ่ทจๆจกๅผๆŸฅ่ฏข -- ไผ˜้›…็š„่ฏญๆณ•๏ผŒ็ตๆดป่€Œๅผบๅคง็š„ QueryBuilder -- ๅทฆ่”ๆŽฅๅ’Œๅ†…่”ๆŽฅ -- ไฝฟ็”จ่”ๆŸฅๆŸฅ่ฏข็š„้€‚ๅฝ“ๅˆ†้กต -- ๆŸฅ่ฏข็ผ“ๅญ˜ -- ๅŽŸๅง‹็ป“ๆžœๆต -- ๆ—ฅๅฟ— -- ็›‘ๅฌ่€…ๅ’Œ่ฎข้˜…่€…๏ผˆ้’ฉๅญ๏ผ‰ -- ๆ”ฏๆŒ้—ญๅŒ…่กจๆจกๅผ -- ๅœจๆจกๅž‹ๆˆ–่€…ๅˆ†็ฆป็š„้…็ฝฎๆ–‡ไปถไธญๅฃฐๆ˜Žๆจกๅผ -- json / xml / yml / env ๆ ผๅผ็š„่ฟžๆŽฅ้…็ฝฎ -- ๆ”ฏๆŒ MySQL / MariaDB / Postgres / SQLite / Microsoft SQL Server / Oracle / sql.js -- ๆ”ฏๆŒ MongoDB NoSQL ๆ•ฐๆฎๅบ“ -- ๅฏๅœจ NodeJS / ๆต่งˆๅ™จ / Ionic / Cordova / React Native / Expo / Electron ๅนณๅฐไธŠไฝฟ็”จ -- ๆ”ฏๆŒ TypeScript ๅ’Œ JavaScript -- ็”Ÿๆˆ้ซ˜ๆ€ง่ƒฝใ€็ตๆดปใ€ๆธ…ๆ™ฐๅ’Œๅฏ็ปดๆŠค็š„ไปฃ็  -- ้ตๅพชๆ‰€ๆœ‰ๅฏ่ƒฝ็š„ๆœ€ไฝณๅฎž่ทต -- ๅ‘ฝไปค่กŒๅทฅๅ…ท +- ๆ”ฏๆŒ [DataMapper](active-record-data-mapper.md#what-is-the-data-mapper-pattern) ๅ’Œ [ActiveRecord](active-record-data-mapper.md#what-is-the-active-record-pattern) (้šไฝ ้€‰ๆ‹ฉ) +- ๅฎžไฝ“ๅ’Œๅˆ— +- ๆ•ฐๆฎๅบ“็‰นๆ€งๅˆ—็ฑปๅž‹ +- ๅฎžไฝ“็ฎก็† +- ๅญ˜ๅ‚จๅบ“ๅ’Œ่‡ชๅฎšไน‰ๅญ˜ๅ‚จๅบ“ +- ๆธ…ๆ™ฐ็š„ๅฏน่ฑกๅ…ณ็ณปๆจกๅž‹ +- ๅ…ณ่”๏ผˆๅ…ณ็ณป๏ผ‰ +- ่ดชๅฉชๅ’Œๅปถ่ฟŸๅ…ณ็ณป +- ๅ•ๅ‘็š„๏ผŒๅŒๅ‘็š„ๅ’Œ่‡ชๅผ•็”จ็š„ๅ…ณ็ณป +- ๆ”ฏๆŒๅคš้‡็ปงๆ‰ฟๆจกๅผ +- ็บง่” +- ็ดขๅผ• +- ไบ‹ๅŠก +- ่ฟ็งปๅ’Œ่‡ชๅŠจ่ฟ็งป +- ่ฟžๆŽฅๆฑ  +- ไธปไปŽๅคๅˆถ +- ไฝฟ็”จๅคšไธชๆ•ฐๆฎๅบ“่ฟžๆŽฅ +- ไฝฟ็”จๅคšไธชๆ•ฐๆฎๅบ“็ฑปๅž‹ +- ่ทจๆ•ฐๆฎๅบ“ๅ’Œ่ทจๆจกๅผๆŸฅ่ฏข +- ไผ˜้›…็š„่ฏญๆณ•๏ผŒ็ตๆดป่€Œๅผบๅคง็š„ QueryBuilder +- ๅทฆ่”ๆŽฅๅ’Œๅ†…่”ๆŽฅ +- ไฝฟ็”จ่”ๆŸฅๆŸฅ่ฏข็š„้€‚ๅฝ“ๅˆ†้กต +- ๆŸฅ่ฏข็ผ“ๅญ˜ +- ๅŽŸๅง‹็ป“ๆžœๆต +- ๆ—ฅๅฟ— +- ็›‘ๅฌ่€…ๅ’Œ่ฎข้˜…่€…๏ผˆ้’ฉๅญ๏ผ‰ +- ๆ”ฏๆŒ้—ญๅŒ…่กจๆจกๅผ +- ๅœจๆจกๅž‹ๆˆ–่€…ๅˆ†็ฆป็š„้…็ฝฎๆ–‡ไปถไธญๅฃฐๆ˜Žๆจกๅผ +- ๆ”ฏๆŒ MySQL / MariaDB / Postgres / SQLite / Microsoft SQL Server / Oracle / sql.js +- ๆ”ฏๆŒ MongoDB NoSQL ๆ•ฐๆฎๅบ“ +- ๅฏๅœจ NodeJS / ๆต่งˆๅ™จ / Ionic / Cordova / React Native / Expo / Electron ๅนณๅฐไธŠไฝฟ็”จ +- ๆ”ฏๆŒ TypeScript ๅ’Œ JavaScript +- ็”Ÿๆˆ้ซ˜ๆ€ง่ƒฝใ€็ตๆดปใ€ๆธ…ๆ™ฐๅ’Œๅฏ็ปดๆŠค็š„ไปฃ็  +- ้ตๅพชๆ‰€ๆœ‰ๅฏ่ƒฝ็š„ๆœ€ไฝณๅฎž่ทต +- ๅ‘ฝไปค่กŒๅทฅๅ…ท ่ฟ˜ๆœ‰ๆ›ดๅคš... ้€š่ฟ‡ไฝฟ็”จ `TypeORM` ไฝ ็š„ `models` ็œ‹่ตทๆฅๅƒ่ฟ™ๆ ท: ```typescript -import { Entity, PrimaryGeneratedColumn, Column } from "typeorm"; +import { Entity, PrimaryGeneratedColumn, Column } from "typeorm" @Entity() export class User { - @PrimaryGeneratedColumn() - id: number; + @PrimaryGeneratedColumn() + id: number - @Column() - firstName: string; + @Column() + firstName: string - @Column() - lastName: string; + @Column() + lastName: string - @Column() - age: number; + @Column() + age: number } ``` ้€ป่พ‘ๆ“ไฝœๅฐฑๅƒๆ˜ฏ่ฟ™ๆ ท: ```typescript -const user = new User(); -user.firstName = "Timber"; -user.lastName = "Saw"; -user.age = 25; -await repository.save(user); - -const allUsers = await repository.find(); -const firstUser = await repository.findOne(1); // find by id -const timber = await repository.findOne({ firstName: "Timber", lastName: "Saw" }); +const user = new User() +user.firstName = "Timber" +user.lastName = "Saw" +user.age = 25 +await repository.save(user) + +const allUsers = await repository.find() +const firstUser = await repository.findOne(1) // find by id +const timber = await repository.findOne({ + firstName: "Timber", + lastName: "Saw", +}) -await repository.remove(timber); +await repository.remove(timber) ``` ๆˆ–่€…๏ผŒๅฆ‚ๆžœไฝ ๆ›ดๅ–œๆฌขไฝฟ็”จ`ActiveRecord`ๅฎž็Žฐ๏ผŒไนŸๅฏไปฅ่ฟ™ๆ ท็”จ๏ผš ```typescript -import { Entity, PrimaryGeneratedColumn, Column, BaseEntity } from "typeorm"; +import { Entity, PrimaryGeneratedColumn, Column, BaseEntity } from "typeorm" @Entity() export class User extends BaseEntity { - @PrimaryGeneratedColumn() - id: number; + @PrimaryGeneratedColumn() + id: number - @Column() - firstName: string; + @Column() + firstName: string - @Column() - lastName: string; + @Column() + lastName: string - @Column() - age: number; + @Column() + age: number } ``` ้€ป่พ‘ๆ“ไฝœๅฆ‚ไธ‹ๆ‰€็คบ: ```typescript -const user = new User(); -user.firstName = "Timber"; -user.lastName = "Saw"; -user.age = 25; -await user.save(); +const user = new User() +user.firstName = "Timber" +user.lastName = "Saw" +user.age = 25 +await user.save() -const allUsers = await User.find(); -const firstUser = await User.findOne(1); -const timber = await User.findOne({ firstName: "Timber", lastName: "Saw" }); +const allUsers = await User.find() +const firstUser = await User.findOne(1) +const timber = await User.findOne({ firstName: "Timber", lastName: "Saw" }) -await timber.remove(); +await timber.remove() ``` # ๅ…ฅ้—จ @@ -147,56 +149,56 @@ await timber.remove(); 1. ้€š่ฟ‡`npm`ๅฎ‰่ฃ…: - `npm install typeorm --save` + `npm install typeorm --save` 2. ไฝ ่ฟ˜้œ€่ฆๅฎ‰่ฃ… `reflect-metadata`: - `npm install reflect-metadata --save` + `npm install reflect-metadata --save` - ๅนถไธ”้œ€่ฆๅœจๅบ”็”จ็จ‹ๅบ็š„ๅ…จๅฑ€ไฝ็ฝฎๅฏผๅ…ฅ๏ผˆไพ‹ๅฆ‚ๅœจ`app.ts`ไธญ๏ผ‰ + ๅนถไธ”้œ€่ฆๅœจๅบ”็”จ็จ‹ๅบ็š„ๅ…จๅฑ€ไฝ็ฝฎๅฏผๅ…ฅ๏ผˆไพ‹ๅฆ‚ๅœจ`app.ts`ไธญ๏ผ‰ - `import "reflect-metadata";` + `import "reflect-metadata";` 3. ไฝ ๅฏ่ƒฝ่ฟ˜้œ€่ฆๅฎ‰่ฃ… node typings(ไปฅๆญคๆฅไฝฟ็”จ Node ็š„ๆ™บ่ƒฝๆ็คบ): - `npm install @types/node --save` + `npm install @types/node --save` 4. ๅฎ‰่ฃ…ๆ•ฐๆฎๅบ“้ฉฑๅŠจ: - - **MySQL** ๆˆ–่€… **MariaDB** + - **MySQL** ๆˆ–่€… **MariaDB** - `npm install mysql --save` (ไนŸๅฏไปฅๅฎ‰่ฃ… `mysql2`) + `npm install mysql --save` (ไนŸๅฏไปฅๅฎ‰่ฃ… `mysql2`) - - **PostgreSQL** + - **PostgreSQL** - `npm install pg --save` + `npm install pg --save` - - **SQLite** + - **SQLite** - `npm install sqlite3 --save` + `npm install sqlite3 --save` - - **Microsoft SQL Server** + - **Microsoft SQL Server** - `npm install mssql --save` + `npm install mssql --save` - - **sql.js** + - **sql.js** - `npm install sql.js --save` + `npm install sql.js --save` - - **Oracle** + - **Oracle** - `npm install oracledb --save` + `npm install oracledb --save` - ๆ นๆฎไฝ ไฝฟ็”จ็š„ๆ•ฐๆฎๅบ“๏ผŒไป…ๅฎ‰่ฃ…ๅ…ถไธญ*ไธ€ไธช*ๅณๅฏใ€‚ - ่ฆไฝฟ Oracle ้ฉฑๅŠจ็จ‹ๅบๆญฃๅธธๅทฅไฝœ๏ผŒ้œ€่ฆๆŒ‰็…งๅ…ถ[็ซ™็‚น](https://github.com/oracle/node-oracledb)ไธญ็š„ๅฎ‰่ฃ…่ฏดๆ˜Ž่ฟ›่กŒๆ“ไฝœใ€‚ + ๆ นๆฎไฝ ไฝฟ็”จ็š„ๆ•ฐๆฎๅบ“๏ผŒไป…ๅฎ‰่ฃ…ๅ…ถไธญ*ไธ€ไธช*ๅณๅฏใ€‚ + ่ฆไฝฟ Oracle ้ฉฑๅŠจ็จ‹ๅบๆญฃๅธธๅทฅไฝœ๏ผŒ้œ€่ฆๆŒ‰็…งๅ…ถ[็ซ™็‚น](https://github.com/oracle/node-oracledb)ไธญ็š„ๅฎ‰่ฃ…่ฏดๆ˜Ž่ฟ›่กŒๆ“ไฝœใ€‚ - - **MongoDB** (่ฏ•้ชŒๆ€ง) + - **MongoDB** (่ฏ•้ชŒๆ€ง) - `npm install mongodb --save` + `npm install mongodb --save` - - **NativeScript**, **react-native** ๅ’Œ **Cordova** + - **NativeScript**, **react-native** ๅ’Œ **Cordova** - ๆŸฅ็œ‹ [ๆ”ฏๆŒ็š„ๅนณๅฐ](/supported-platforms.md) + ๆŸฅ็œ‹ [ๆ”ฏๆŒ็š„ๅนณๅฐ](/supported-platforms.md) ##### TypeScript ้…็ฝฎ @@ -260,17 +262,17 @@ npm install ```json { - "type": "mysql", - "host": "localhost", - "port": 3306, - "username": "test", - "password": "test", - "database": "test", - "synchronize": true, - "logging": false, - "entities": ["src/entity/**/*.ts"], - "migrations": ["src/migration/**/*.ts"], - "subscribers": ["src/subscriber/**/*.ts"] + "type": "mysql", + "host": "localhost", + "port": 3306, + "username": "test", + "password": "test", + "database": "test", + "synchronize": true, + "logging": false, + "entities": ["src/entity/**/*.ts"], + "migrations": ["src/migration/**/*.ts"], + "subscribers": ["src/subscriber/**/*.ts"] } ``` @@ -300,11 +302,11 @@ npm start ```typescript export class Photo { - id: number; - name: string; - description: string; - filename: string; - views: number; + id: number + name: string + description: string + filename: string + views: number } ``` @@ -317,16 +319,16 @@ export class Photo { ่ฎฉๆˆ‘ไปฌๅฐ†`Photo`ๆจกๅž‹ไฝœไธบไธ€ไธชๅฎžไฝ“ ```typescript -import { Entity } from "typeorm"; +import { Entity } from "typeorm" @Entity() export class Photo { - id: number; - name: string; - description: string; - filename: string; - views: number; - isPublished: boolean; + id: number + name: string + description: string + filename: string + views: number + isPublished: boolean } ``` @@ -338,27 +340,27 @@ export class Photo { ่ฆๆทปๅŠ ๆ•ฐๆฎๅบ“ๅˆ—๏ผŒไฝ ๅช้œ€่ฆๅฐ†่ฆ็”Ÿๆˆ็š„ๅฎžไฝ“ๅฑžๆ€งๅŠ ไธŠ`@Column`่ฃ…้ฅฐๅ™จใ€‚ ```typescript -import { Entity, Column } from "typeorm"; +import { Entity, Column } from "typeorm" @Entity() export class Photo { - @Column() - id: number; + @Column() + id: number - @Column() - name: string; + @Column() + name: string - @Column() - description: string; + @Column() + description: string - @Column() - filename: string; + @Column() + filename: string - @Column() - views: number; + @Column() + views: number - @Column() - isPublished: boolean; + @Column() + isPublished: boolean } ``` @@ -372,27 +374,27 @@ export class Photo { ๆฏไธชๅฎžไฝ“**ๅฟ…้กป**่‡ณๅฐ‘ๆœ‰ไธ€ไธชไธป้”ฎๅˆ—ใ€‚่ฟ™ๆ˜ฏๅฟ…้กป็š„๏ผŒไฝ ๆ— ๆณ•้ฟๅ…ใ€‚่ฆไฝฟๅˆ—ๆˆไธบไธป้”ฎ๏ผŒๆ‚จ้œ€่ฆไฝฟ็”จ`@PrimaryColumn`่ฃ…้ฅฐๅ™จใ€‚ ```typescript -import { Entity, Column, PrimaryColumn } from "typeorm"; +import { Entity, Column, PrimaryColumn } from "typeorm" @Entity() export class Photo { - @PrimaryColumn() - id: number; + @PrimaryColumn() + id: number - @Column() - name: string; + @Column() + name: string - @Column() - description: string; + @Column() + description: string - @Column() - filename: string; + @Column() + filename: string - @Column() - views: number; + @Column() + views: number - @Column() - isPublished: boolean; + @Column() + isPublished: boolean } ``` @@ -401,27 +403,27 @@ export class Photo { ๅ‡่ฎพไฝ ๅธŒๆœ› id ๅˆ—่‡ชๅŠจ็”Ÿๆˆ๏ผˆ่ฟ™็งฐไธบ auto-increment/sequence/serial/generated identity column๏ผ‰ใ€‚ไธบๆญคไฝ ้œ€่ฆๅฐ†`@PrimaryColumn`่ฃ…้ฅฐๅ™จๆ›ดๆ”นไธบ`@PrimaryGeneratedColumn`่ฃ…้ฅฐๅ™จ๏ผš ```typescript -import { Entity, Column, PrimaryGeneratedColumn } from "typeorm"; +import { Entity, Column, PrimaryGeneratedColumn } from "typeorm" @Entity() export class Photo { - @PrimaryGeneratedColumn() - id: number; + @PrimaryGeneratedColumn() + id: number - @Column() - name: string; + @Column() + name: string - @Column() - description: string; + @Column() + description: string - @Column() - filename: string; + @Column() + filename: string - @Column() - views: number; + @Column() + views: number - @Column() - isPublished: boolean; + @Column() + isPublished: boolean } ``` @@ -431,29 +433,29 @@ export class Photo { ๆ•ฐๅญ—่ขซๆ˜ ๅฐ„ๅˆฐไธ€ไธช็ฑปไผผๆ•ดๆ•ฐ็ฑปๅž‹๏ผˆๅ–ๅ†ณไบŽๆ•ฐๆฎๅบ“็ฑปๅž‹๏ผ‰ใ€‚ไฝ†ๆ˜ฏๆˆ‘ไปฌไธๅธŒๆœ›ๆ‰€ๆœ‰็š„ๅˆ—้ƒฝๆ˜ฏๆœ‰้™็š„ varchars ๆˆ–ๆ•ดๆ•ฐ๏ผŒ่ฎฉๆˆ‘ไปฌไฟฎๆ”นไธ‹ไปฃ็ ไปฅ่ฎพ็ฝฎๆƒณ่ฆ็š„ๆ•ฐๆฎ็ฑปๅž‹๏ผš ```typescript -import { Entity, Column, PrimaryGeneratedColumn } from "typeorm"; +import { Entity, Column, PrimaryGeneratedColumn } from "typeorm" @Entity() export class Photo { - @PrimaryGeneratedColumn() - id: number; + @PrimaryGeneratedColumn() + id: number - @Column({ - length: 100 - }) - name: string; + @Column({ + length: 100, + }) + name: string - @Column("text") - description: string; + @Column("text") + description: string - @Column() - filename: string; + @Column() + filename: string - @Column("double") - views: number; + @Column("double") + views: number - @Column() - isPublished: boolean; + @Column() + isPublished: boolean } ``` @@ -464,25 +466,25 @@ export class Photo { ๅฝ“ๅฎžไฝ“่ขซๅˆ›ๅปบๅŽ๏ผŒ่ฎฉๆˆ‘ไปฌๅˆ›ๅปบไธ€ไธช`index.ts`๏ผˆๆˆ–`app.ts`๏ผŒๆ— ่ฎบไฝ ๆ€Žไนˆๅ‘ฝๅ๏ผ‰ๆ–‡ไปถ๏ผŒๅนถ้…็ฝฎๆ•ฐๆฎๅบ“่ฟžๆŽฅ๏ผš: ```typescript -import "reflect-metadata"; -import { createConnection } from "typeorm"; -import { Photo } from "./entity/Photo"; +import "reflect-metadata" +import { createConnection } from "typeorm" +import { Photo } from "./entity/Photo" createConnection({ - type: "mysql", - host: "localhost", - port: 3306, - username: "root", - password: "admin", - database: "test", - entities: [Photo], - synchronize: true, - logging: false + type: "mysql", + host: "localhost", + port: 3306, + username: "root", + password: "admin", + database: "test", + entities: [Photo], + synchronize: true, + logging: false, }) - .then(connection => { - // ่ฟ™้‡Œๅฏไปฅๅ†™ๅฎžไฝ“ๆ“ไฝœ็›ธๅ…ณ็š„ไปฃ็  - }) - .catch(error => console.log(error)); + .then((connection) => { + // ่ฟ™้‡Œๅฏไปฅๅ†™ๅฎžไฝ“ๆ“ไฝœ็›ธๅ…ณ็š„ไปฃ็  + }) + .catch((error) => console.log(error)) ``` ๆˆ‘ไปฌๅœจๆญค็คบไพ‹ไธญไฝฟ็”จ MySQL๏ผŒไฝ ๅฏไปฅไฝฟ็”จไปปไฝ•ๅ…ถไป–ๅ—ๆ”ฏๆŒ็š„ๆ•ฐๆฎๅบ“ใ€‚่ฆไฝฟ็”จๅ…ถไป–ๆ•ฐๆฎๅบ“๏ผŒๅช้œ€ๅฐ†้€‰้กนไธญ็š„`type`ๆ›ดๆ”นไธบๅธŒๆœ›ไฝฟ็”จ็š„ๆ•ฐๆฎๅบ“็ฑปๅž‹๏ผšmysql๏ผŒmariadb๏ผŒpostgres๏ผŒsqlite๏ผŒmssql๏ผŒoracle๏ผŒcordova๏ผŒnativescript๏ผŒreact-native๏ผŒexpo ๆˆ– mongodbใ€‚ๅŒๆ—ถ่ฟ˜่ฆ็กฎไฟ host, port, username, password ๅ’Œๆ•ฐๆฎๅบ“่ฎพ็ฝฎ็š„ๆญฃ็กฎๆ€งใ€‚ @@ -496,22 +498,22 @@ createConnection({ ไน‹ๅŽๅฝ“ๆˆ‘ไปฌๅˆ›ๅปบๆ›ดๅคšๅฎžไฝ“ๆ—ถ๏ผŒ้ƒฝ้œ€่ฆๅฐ†ไธ€ไธ€ๅฎƒไปฌๆทปๅŠ ๅˆฐ้…็ฝฎไธญ็š„ๅฎžไฝ“ไธญ๏ผŒไฝ†ๆ˜ฏ่ฟ™ไธๆ˜ฏๅพˆๆ–นไพฟ๏ผŒๆ‰€ไปฅๆˆ‘ไปฌๅฏไปฅ่ฎพ็ฝฎๆ•ดไธช็›ฎๅฝ•๏ผŒไปŽไธญ่ฟžๆŽฅๆ‰€ๆœ‰ๅฎžไฝ“ๅนถๅœจ่ฟžๆŽฅไธญไฝฟ็”จ๏ผš ```typescript -import { createConnection } from "typeorm"; +import { createConnection } from "typeorm" createConnection({ - type: "mysql", - host: "localhost", - port: 3306, - username: "root", - password: "admin", - database: "test", - entities: [__dirname + "/entity/*.js"], - synchronize: true + type: "mysql", + host: "localhost", + port: 3306, + username: "root", + password: "admin", + database: "test", + entities: [__dirname + "/entity/*.js"], + synchronize: true, }) - .then(connection => { - // ่ฟ™้‡Œๅฏไปฅๅ†™ๅฎžไฝ“ๆ“ไฝœ็›ธๅ…ณ็š„ไปฃ็  - }) - .catch(error => console.log(error)); + .then((connection) => { + // ่ฟ™้‡Œๅฏไปฅๅ†™ๅฎžไฝ“ๆ“ไฝœ็›ธๅ…ณ็š„ไปฃ็  + }) + .catch((error) => console.log(error)) ``` ไฝ†่ฆๅฐๅฟƒ่ฟ™็งๆ–นๆณ•ใ€‚ @@ -541,23 +543,23 @@ createConnection({ ็Žฐๅœจๅˆ›ๅปบไธ€ไธชๆ–ฐ็š„ photo ๅญ˜ๅˆฐๆ•ฐๆฎๅบ“๏ผš ```typescript -import { createConnection } from "typeorm"; -import { Photo } from "./entity/Photo"; +import { createConnection } from "typeorm" +import { Photo } from "./entity/Photo" createConnection(/*...*/) - .then(connection => { - let photo = new Photo(); - photo.name = "Me and Bears"; - photo.description = "I am near polar bears"; - photo.filename = "photo-with-bears.jpg"; - photo.views = 1; - photo.isPublished = true; - - return connection.manager.save(photo).then(photo => { - console.log("Photo has been saved. Photo id is", photo.id); - }); - }) - .catch(error => console.log(error)); + .then((connection) => { + let photo = new Photo() + photo.name = "Me and Bears" + photo.description = "I am near polar bears" + photo.filename = "photo-with-bears.jpg" + photo.views = 1 + photo.isPublished = true + + return connection.manager.save(photo).then((photo) => { + console.log("Photo has been saved. Photo id is", photo.id) + }) + }) + .catch((error) => console.log(error)) ``` ไฟๅญ˜ๅฎžไฝ“ๅŽ๏ผŒๅฎƒๅฐ†่Žทๅพ—ๆ–ฐ็”Ÿๆˆ็š„ IDใ€‚ `save`ๆ–นๆณ•่ฟ”ๅ›žไผ ้€’็ป™ๅฎƒ็š„ๅŒไธ€ๅฏน่ฑก็š„ๅฎžไพ‹ใ€‚ไฝ†ๅฎƒไธๆ˜ฏๅฏน่ฑก็š„ๆ–ฐๅ‰ฏๆœฌ๏ผŒๅชๆ˜ฏไฟฎๆ”นไบ†ๅฎƒ็š„"id"ๅนถ่ฟ”ๅ›žๅฎƒใ€‚ @@ -567,22 +569,22 @@ createConnection(/*...*/) ๆˆ‘ไปฌๅฏไปฅไฝฟ็”จๆœ€ๆ–ฐ็š„ ES8๏ผˆES2017๏ผ‰ๅŠŸ่ƒฝ๏ผŒๅนถไฝฟ็”จ async / await ่ฏญๆณ•ไปฃๆ›ฟ๏ผš ```typescript -import { createConnection } from "typeorm"; -import { Photo } from "./entity/Photo"; +import { createConnection } from "typeorm" +import { Photo } from "./entity/Photo" createConnection(/*...*/) - .then(async connection => { - let photo = new Photo(); - photo.name = "Me and Bears"; - photo.description = "I am near polar bears"; - photo.filename = "photo-with-bears.jpg"; - photo.views = 1; - photo.isPublished = true; - - await connection.manager.save(photo); - console.log("Photo has been saved"); - }) - .catch(error => console.log(error)); + .then(async (connection) => { + let photo = new Photo() + photo.name = "Me and Bears" + photo.description = "I am near polar bears" + photo.filename = "photo-with-bears.jpg" + photo.views = 1 + photo.isPublished = true + + await connection.manager.save(photo) + console.log("Photo has been saved") + }) + .catch((error) => console.log(error)) ``` ### ไฝฟ็”จ Entity Manager @@ -592,16 +594,16 @@ createConnection(/*...*/) ไพ‹ๅฆ‚๏ผŒๅŠ ่ฝฝๅทฒ็ปไฟๅญ˜็š„ๅฎžไฝ“๏ผš ```typescript -import { createConnection } from "typeorm"; -import { Photo } from "./entity/Photo"; +import { createConnection } from "typeorm" +import { Photo } from "./entity/Photo" createConnection(/*...*/) - .then(async connection => { - /*...*/ - let savedPhotos = await connection.manager.find(Photo); - console.log("All photos from the db: ", savedPhotos); - }) - .catch(error => console.log(error)); + .then(async (connection) => { + /*...*/ + let savedPhotos = await connection.manager.find(Photo) + console.log("All photos from the db: ", savedPhotos) + }) + .catch((error) => console.log(error)) ``` `savedPhotos`ๆ˜ฏไธ€ไธช Photo ๅฏน่ฑกๆ•ฐ็ป„๏ผŒๅ…ถไธญๅŒ…ๅซไปŽๆ•ฐๆฎๅบ“ๅŠ ่ฝฝ็š„ๆ•ฐๆฎใ€‚ @@ -613,27 +615,27 @@ createConnection(/*...*/) ็Žฐๅœจ่ฎฉๆˆ‘ไปฌ้‡ๆž„ไน‹ๅ‰็š„ไปฃ็ ๏ผŒๅนถไฝฟ็”จ`Repository`่€Œไธๆ˜ฏ`EntityManager`ใ€‚ๆฏไธชๅฎžไฝ“้ƒฝๆœ‰่‡ชๅทฑ็š„ๅญ˜ๅ‚จๅบ“๏ผŒๅฏไปฅๅค„็†ๅ…ถๅฎžไฝ“็š„ๆ‰€ๆœ‰ๆ“ไฝœใ€‚ๅฝ“ไฝ ็ปๅธธๅค„็†ๅฎžไฝ“ๆ—ถ๏ผŒRepositories ๆฏ” EntityManagers ๆ›ดๆ–นไพฟไฝฟ็”จ๏ผš ```typescript -import { createConnection } from "typeorm"; -import { Photo } from "./entity/Photo"; +import { createConnection } from "typeorm" +import { Photo } from "./entity/Photo" createConnection(/*...*/) - .then(async connection => { - let photo = new Photo(); - photo.name = "Me and Bears"; - photo.description = "I am near polar bears"; - photo.filename = "photo-with-bears.jpg"; - photo.views = 1; - photo.isPublished = true; - - let photoRepository = connection.getRepository(Photo); - - await photoRepository.save(photo); - console.log("Photo has been saved"); - - let savedPhotos = await photoRepository.find(); - console.log("All photos from the db: ", savedPhotos); - }) - .catch(error => console.log(error)); + .then(async (connection) => { + let photo = new Photo() + photo.name = "Me and Bears" + photo.description = "I am near polar bears" + photo.filename = "photo-with-bears.jpg" + photo.views = 1 + photo.isPublished = true + + let photoRepository = connection.getRepository(Photo) + + await photoRepository.save(photo) + console.log("Photo has been saved") + + let savedPhotos = await photoRepository.find() + console.log("All photos from the db: ", savedPhotos) + }) + .catch((error) => console.log(error)) ``` ไบ†่งฃ[ๆ›ดๅคš](./docs/working-with-repository.md)ๆœ‰ๅ…ณ Repository ็š„ไฟกๆฏใ€‚ @@ -643,32 +645,36 @@ createConnection(/*...*/) ่ฎฉๆˆ‘ไปฌไฝฟ็”จ Repository ๅฐ่ฏ•ๆ›ดๅคš็š„ๅŠ ่ฝฝๆ“ไฝœ: ```typescript -import { createConnection } from "typeorm"; -import { Photo } from "./entity/Photo"; +import { createConnection } from "typeorm" +import { Photo } from "./entity/Photo" createConnection(/*...*/) - .then(async connection => { - /*...*/ - let allPhotos = await photoRepository.find(); - console.log("All photos from the db: ", allPhotos); - - let firstPhoto = await photoRepository.findOne(1); - console.log("First photo from the db: ", firstPhoto); - - let meAndBearsPhoto = await photoRepository.findOne({ name: "Me and Bears" }); - console.log("Me and Bears photo from the db: ", meAndBearsPhoto); - - let allViewedPhotos = await photoRepository.find({ views: 1 }); - console.log("All viewed photos: ", allViewedPhotos); - - let allPublishedPhotos = await photoRepository.find({ isPublished: true }); - console.log("All published photos: ", allPublishedPhotos); - - let [allPhotos, photosCount] = await photoRepository.findAndCount(); - console.log("All photos: ", allPhotos); - console.log("Photos count: ", photosCount); - }) - .catch(error => console.log(error)); + .then(async (connection) => { + /*...*/ + let allPhotos = await photoRepository.find() + console.log("All photos from the db: ", allPhotos) + + let firstPhoto = await photoRepository.findOne(1) + console.log("First photo from the db: ", firstPhoto) + + let meAndBearsPhoto = await photoRepository.findOne({ + name: "Me and Bears", + }) + console.log("Me and Bears photo from the db: ", meAndBearsPhoto) + + let allViewedPhotos = await photoRepository.find({ views: 1 }) + console.log("All viewed photos: ", allViewedPhotos) + + let allPublishedPhotos = await photoRepository.find({ + isPublished: true, + }) + console.log("All published photos: ", allPublishedPhotos) + + let [allPhotos, photosCount] = await photoRepository.findAndCount() + console.log("All photos: ", allPhotos) + console.log("Photos count: ", photosCount) + }) + .catch((error) => console.log(error)) ``` ### ๅœจๆ•ฐๆฎๅบ“ไธญๆ›ดๆ–ฐ @@ -676,17 +682,17 @@ createConnection(/*...*/) ่ฎฉๆˆ‘ไปฌไปŽๆ•ฐๆฎๅบ“ๅŠ ่ฝฝๅ‡บ photo๏ผŒๆ›ดๆ–ฐๅนถไฟๅญ˜ๅˆฐๆ•ฐๆฎๅบ“๏ผš ```typescript -import { createConnection } from "typeorm"; -import { Photo } from "./entity/Photo"; +import { createConnection } from "typeorm" +import { Photo } from "./entity/Photo" createConnection(/*...*/) - .then(async connection => { - /*...*/ - let photoToUpdate = await photoRepository.findOne(1); - photoToUpdate.name = "Me, my friends and polar bears"; - await photoRepository.save(photoToUpdate); - }) - .catch(error => console.log(error)); + .then(async (connection) => { + /*...*/ + let photoToUpdate = await photoRepository.findOne(1) + photoToUpdate.name = "Me, my friends and polar bears" + await photoRepository.save(photoToUpdate) + }) + .catch((error) => console.log(error)) ``` ่ฟ™ไธช`id = 1`็š„ photo ๅœจๆ•ฐๆฎๅบ“ไธญๅฐฑๆˆๅŠŸๆ›ดๆ–ฐไบ†ใ€‚ @@ -696,16 +702,16 @@ createConnection(/*...*/) ่ฎฉๆˆ‘ไปฌไปŽๆ•ฐๆฎๅบ“ไธญๅˆ ้™คๆˆ‘ไปฌ็š„ Photo: ```typescript -import { createConnection } from "typeorm"; -import { Photo } from "./entity/Photo"; +import { createConnection } from "typeorm" +import { Photo } from "./entity/Photo" createConnection(/*...*/) - .then(async connection => { - /*...*/ - let photoToRemove = await photoRepository.findOne(1); - await photoRepository.remove(photoToRemove); - }) - .catch(error => console.log(error)); + .then(async (connection) => { + /*...*/ + let photoToRemove = await photoRepository.findOne(1) + await photoRepository.remove(photoToRemove) + }) + .catch((error) => console.log(error)) ``` ่ฟ™ไธช`id = 1`็š„ photo ๅœจๆ•ฐๆฎๅบ“ไธญ่ขซ็งป้™คไบ†ใ€‚ @@ -715,32 +721,38 @@ createConnection(/*...*/) ่ฎฉๆˆ‘ไปฌไธŽๅฆไธ€ไธช็ฑปๅˆ›ๅปบไธ€ๅฏนไธ€็š„ๅ…ณ็ณปใ€‚ๅ…ˆๅœจ`PhotoMetadata.ts`ไธญๅˆ›ๅปบไธ€ไธชๆ–ฐ็ฑปใ€‚ๆญค PhotoMetadata ็ฑปๅบ”ๅŒ…ๅซ photo ็š„ๅ…ถไป–ๅ…ƒไฟกๆฏ๏ผš ```typescript -import { Entity, Column, PrimaryGeneratedColumn, OneToOne, JoinColumn } from "typeorm"; -import { Photo } from "./Photo"; +import { + Entity, + Column, + PrimaryGeneratedColumn, + OneToOne, + JoinColumn, +} from "typeorm" +import { Photo } from "./Photo" @Entity() export class PhotoMetadata { - @PrimaryGeneratedColumn() - id: number; + @PrimaryGeneratedColumn() + id: number - @Column("int") - height: number; + @Column("int") + height: number - @Column("int") - width: number; + @Column("int") + width: number - @Column() - orientation: string; + @Column() + orientation: string - @Column() - compressed: boolean; + @Column() + compressed: boolean - @Column() - comment: string; + @Column() + comment: string - @OneToOne(type => Photo) - @JoinColumn() - photo: Photo; + @OneToOne((type) => Photo) + @JoinColumn() + photo: Photo } ``` @@ -771,42 +783,44 @@ export class PhotoMetadata { ็Žฐๅœจๆฅๅˆ›ๅปบไธ€ไธช photo๏ผŒๅฎƒ็š„ๅ…ƒไฟกๆฏๅฐ†ๅฎƒไปฌไบ’็›ธ่ฟžๆŽฅ่ตทๆฅใ€‚ ```typescript -import { createConnection } from "typeorm"; -import { Photo } from "./entity/Photo"; -import { PhotoMetadata } from "./entity/PhotoMetadata"; +import { createConnection } from "typeorm" +import { Photo } from "./entity/Photo" +import { PhotoMetadata } from "./entity/PhotoMetadata" createConnection(/*...*/) - .then(async connection => { - // ๅˆ›ๅปบ photo - let photo = new Photo(); - photo.name = "Me and Bears"; - photo.description = "I am near polar bears"; - photo.filename = "photo-with-bears.jpg"; - photo.isPublished = true; - - // ๅˆ›ๅปบ photo metadata - let metadata = new PhotoMetadata(); - metadata.height = 640; - metadata.width = 480; - metadata.compressed = true; - metadata.comment = "cybershoot"; - metadata.orientation = "portait"; - metadata.photo = photo; // ่”ๆŽฅไธค่€… - - // ่Žทๅ–ๅฎžไฝ“ repositories - let photoRepository = connection.getRepository(Photo); - let metadataRepository = connection.getRepository(PhotoMetadata); - - // ๅ…ˆไฟๅญ˜photo - await photoRepository.save(photo); - - // ็„ถๅŽไฟๅญ˜photo็š„metadata - await metadataRepository.save(metadata); - - // ๅฎŒๆˆ - console.log("Metadata is saved, and relation between metadata and photo is created in the database too"); - }) - .catch(error => console.log(error)); + .then(async (connection) => { + // ๅˆ›ๅปบ photo + let photo = new Photo() + photo.name = "Me and Bears" + photo.description = "I am near polar bears" + photo.filename = "photo-with-bears.jpg" + photo.isPublished = true + + // ๅˆ›ๅปบ photo metadata + let metadata = new PhotoMetadata() + metadata.height = 640 + metadata.width = 480 + metadata.compressed = true + metadata.comment = "cybershoot" + metadata.orientation = "portait" + metadata.photo = photo // ่”ๆŽฅไธค่€… + + // ่Žทๅ–ๅฎžไฝ“ repositories + let photoRepository = connection.getRepository(Photo) + let metadataRepository = connection.getRepository(PhotoMetadata) + + // ๅ…ˆไฟๅญ˜photo + await photoRepository.save(photo) + + // ็„ถๅŽไฟๅญ˜photo็š„metadata + await metadataRepository.save(metadata) + + // ๅฎŒๆˆ + console.log( + "Metadata is saved, and relation between metadata and photo is created in the database too", + ) + }) + .catch((error) => console.log(error)) ``` ### ๅๅ‘ๅ…ณ็ณป @@ -814,29 +828,35 @@ createConnection(/*...*/) ๅ…ณ็ณปๅฏไปฅๆ˜ฏๅ•ๅ‘็š„ๆˆ–ๅŒๅ‘็š„ใ€‚็›ฎๅ‰ PhotoMetadata ๅ’Œ Photo ไน‹้—ด็š„ๅ…ณ็ณปๆ˜ฏๅ•ๅ‘็š„ใ€‚ๅ…ณ็ณป็š„ๆ‰€ๆœ‰่€…ๆ˜ฏ PhotoMetadata๏ผŒ่€Œ Photo ๅฏน PhotoMetadata ไธ€ๆ— ๆ‰€็Ÿฅใ€‚่ฟ™ไฝฟๅพ—ไปŽ Photo ไธญ่ฎฟ้—ฎ PhotoMetadata ๅ˜ๅพ—ๅพˆๅคๆ‚ใ€‚่ฆ่งฃๅ†ณ่ฟ™ไธช้—ฎ้ข˜๏ผŒๆˆ‘ไปฌๅบ”่ฏฅๅœจ PhotoMetadata ๅ’Œ Photo ไน‹้—ดๅปบ็ซ‹ๅŒๅ‘ๅ…ณ็ณปใ€‚่ฎฉๆˆ‘ไปฌๆฅไฟฎๆ”นไธ€ไธ‹ๅฎžไฝ“๏ผš ```typescript -import { Entity, Column, PrimaryGeneratedColumn, OneToOne, JoinColumn } from "typeorm"; -import { Photo } from "./Photo"; +import { + Entity, + Column, + PrimaryGeneratedColumn, + OneToOne, + JoinColumn, +} from "typeorm" +import { Photo } from "./Photo" @Entity() export class PhotoMetadata { - /* ... other columns */ + /* ... other columns */ - @OneToOne(type => Photo, photo => photo.metadata) - @JoinColumn() - photo: Photo; + @OneToOne((type) => Photo, (photo) => photo.metadata) + @JoinColumn() + photo: Photo } ``` ```typescript -import { Entity, Column, PrimaryGeneratedColumn, OneToOne } from "typeorm"; -import { PhotoMetadata } from "./PhotoMetadata"; +import { Entity, Column, PrimaryGeneratedColumn, OneToOne } from "typeorm" +import { PhotoMetadata } from "./PhotoMetadata" @Entity() export class Photo { - /* ... other columns */ + /* ... other columns */ - @OneToOne(type => PhotoMetadata, photoMetadata => photoMetadata.photo) - metadata: PhotoMetadata; + @OneToOne((type) => PhotoMetadata, (photoMetadata) => photoMetadata.photo) + metadata: PhotoMetadata } ``` @@ -849,17 +869,17 @@ export class Photo { ๅœจไธ€ไธชๆŸฅ่ฏขไธญๅŠ ่ฝฝ photo ๅŠ photo metadata ๆœ‰ไธค็งๆ–นๆณ•ใ€‚ไฝฟ็”จ`find *`ๆˆ–ไฝฟ็”จ`QueryBuilder`ใ€‚ๆˆ‘ไปฌๅ…ˆไฝฟ็”จ`find *`ๆ–นๆณ•ใ€‚ `find *`ๆ–นๆณ•ๅ…่ฎธไฝ ไฝฟ็”จ`FindOneOptions` / `FindManyOptions`ๆŽฅๅฃๆŒ‡ๅฎšๅฏน่ฑกใ€‚ ```typescript -import { createConnection } from "typeorm"; -import { Photo } from "./entity/Photo"; -import { PhotoMetadata } from "./entity/PhotoMetadata"; +import { createConnection } from "typeorm" +import { Photo } from "./entity/Photo" +import { PhotoMetadata } from "./entity/PhotoMetadata" createConnection(/*...*/) - .then(async connection => { - /*...*/ - let photoRepository = connection.getRepository(Photo); - let photos = await photoRepository.find({ relations: ["metadata"] }); - }) - .catch(error => console.log(error)); + .then(async (connection) => { + /*...*/ + let photoRepository = connection.getRepository(Photo) + let photos = await photoRepository.find({ relations: ["metadata"] }) + }) + .catch((error) => console.log(error)) ``` photos ๅฐ†ๅŒ…ๅซๆฅ่‡ชๆ•ฐๆฎๅบ“็š„ photos ๆ•ฐ็ป„๏ผŒๆฏไธช photo ๅฐ†ๅŒ…ๅซๅ…ถ photo metadataใ€‚่ฏฆ็ป†ไบ†่งฃๆœฌๆ–‡ๆกฃไธญ็š„[ๆŸฅๆ‰พ้€‰้กน](./docs/find-options.md)ใ€‚ @@ -867,20 +887,20 @@ photos ๅฐ†ๅŒ…ๅซๆฅ่‡ชๆ•ฐๆฎๅบ“็š„ photos ๆ•ฐ็ป„๏ผŒๆฏไธช photo ๅฐ†ๅŒ…ๅซๅ…ถ pho ไฝฟ็”จๆŸฅๆ‰พ้€‰้กนๅพˆ็ฎ€ๅ•๏ผŒไฝ†ๆ˜ฏๅฆ‚ๆžœไฝ ้œ€่ฆๆ›ดๅคๆ‚็š„ๆŸฅ่ฏข๏ผŒๅˆ™ๅบ”่ฏฅไฝฟ็”จ`QueryBuilder`ใ€‚ `QueryBuilder`ๅ…่ฎธไปฅๆ›ดไผ˜้›…็š„ๆ–นๅผไฝฟ็”จๆ›ดๅคๆ‚็š„ๆŸฅ่ฏข๏ผš ```typescript -import { createConnection } from "typeorm"; -import { Photo } from "./entity/Photo"; -import { PhotoMetadata } from "./entity/PhotoMetadata"; +import { createConnection } from "typeorm" +import { Photo } from "./entity/Photo" +import { PhotoMetadata } from "./entity/PhotoMetadata" createConnection(/*...*/) - .then(async connection => { - /*...*/ - let photos = await connection - .getRepository(Photo) - .createQueryBuilder("photo") - .innerJoinAndSelect("photo.metadata", "metadata") - .getMany(); - }) - .catch(error => console.log(error)); + .then(async (connection) => { + /*...*/ + let photos = await connection + .getRepository(Photo) + .createQueryBuilder("photo") + .innerJoinAndSelect("photo.metadata", "metadata") + .getMany() + }) + .catch((error) => console.log(error)) ``` `QueryBuilder`ๅ…่ฎธๅˆ›ๅปบๅ’Œๆ‰ง่กŒๅ‡ ไนŽไปปไฝ•ๅคๆ‚ๆ€ง็š„ SQL ๆŸฅ่ฏขใ€‚ไฝฟ็”จ`QueryBuilder`ๆ—ถ๏ผŒ่ฏท่€ƒ่™‘ๅˆ›ๅปบ SQL ๆŸฅ่ฏขใ€‚ๅœจๆญค็คบไพ‹ไธญ๏ผŒ"photo"ๅ’Œ"metadata"ๆ˜ฏๅบ”็”จไบŽๆ‰€้€‰ photos ็š„ โ€‹โ€‹ ๅˆซๅใ€‚ไฝ ๅฏไปฅไฝฟ็”จๅˆซๅๆฅ่ฎฟ้—ฎๆ‰€้€‰ๆ•ฐๆฎ็š„ๅˆ—ๅ’Œๅฑžๆ€งใ€‚ @@ -891,12 +911,12 @@ createConnection(/*...*/) ```typescript export class Photo { - /// ... other columns + /// ... other columns - @OneToOne(type => PhotoMetadata, metadata => metadata.photo, { - cascade: true - }) - metadata: PhotoMetadata; + @OneToOne((type) => PhotoMetadata, (metadata) => metadata.photo, { + cascade: true, + }) + metadata: PhotoMetadata } ``` @@ -904,33 +924,33 @@ export class Photo { ```typescript createConnection(options) - .then(async connection => { - // ๅˆ›ๅปบ photo ๅฏน่ฑก - let photo = new Photo(); - photo.name = "Me and Bears"; - photo.description = "I am near polar bears"; - photo.filename = "photo-with-bears.jpg"; - photo.isPublished = true; - - // ๅˆ›ๅปบ photo metadata ๅฏน่ฑก - let metadata = new PhotoMetadata(); - metadata.height = 640; - metadata.width = 480; - metadata.compressed = true; - metadata.comment = "cybershoot"; - metadata.orientation = "portait"; - - photo.metadata = metadata; // this way we connect them - - // ่Žทๅ– repository - let photoRepository = connection.getRepository(Photo); - - // ไฟๅญ˜photo็š„ๅŒๆ—ถไฟๅญ˜metadata - await photoRepository.save(photo); - - console.log("Photo is saved, photo metadata is saved too."); - }) - .catch(error => console.log(error)); + .then(async (connection) => { + // ๅˆ›ๅปบ photo ๅฏน่ฑก + let photo = new Photo() + photo.name = "Me and Bears" + photo.description = "I am near polar bears" + photo.filename = "photo-with-bears.jpg" + photo.isPublished = true + + // ๅˆ›ๅปบ photo metadata ๅฏน่ฑก + let metadata = new PhotoMetadata() + metadata.height = 640 + metadata.width = 480 + metadata.compressed = true + metadata.comment = "cybershoot" + metadata.orientation = "portait" + + photo.metadata = metadata // this way we connect them + + // ่Žทๅ– repository + let photoRepository = connection.getRepository(Photo) + + // ไฟๅญ˜photo็š„ๅŒๆ—ถไฟๅญ˜metadata + await photoRepository.save(photo) + + console.log("Photo is saved, photo metadata is saved too.") + }) + .catch((error) => console.log(error)) ``` ### ๅˆ›ๅปบๅคšๅฏนไธ€/ไธ€ๅฏนๅคšๅ…ณ็ณป @@ -938,19 +958,25 @@ createConnection(options) ่ฎฉๆˆ‘ไปฌๅˆ›ๅปบไธ€ไธชๅคšๅฏนไธ€/ไธ€ๅฏนๅคš็š„ๅ…ณ็ณปใ€‚ๅ‡่ฎพไธ€ไธช photo ๆœ‰ไธ€ไธช author๏ผŒๆฏไธช author ้ƒฝๅฏไปฅๆœ‰ๅคšไธช photosใ€‚้ฆ–ๅ…ˆ่ฎฉๆˆ‘ไปฌๅˆ›ๅปบไธ€ไธช`Author`็ฑป๏ผš ```typescript -import { Entity, Column, PrimaryGeneratedColumn, OneToMany, JoinColumn } from "typeorm"; -import { Photo } from "./Photo"; +import { + Entity, + Column, + PrimaryGeneratedColumn, + OneToMany, + JoinColumn, +} from "typeorm" +import { Photo } from "./Photo" @Entity() export class Author { - @PrimaryGeneratedColumn() - id: number; + @PrimaryGeneratedColumn() + id: number - @Column() - name: string; + @Column() + name: string - @OneToMany(type => Photo, photo => photo.author) // note: we will create author property in the Photo class below - photos: Photo[]; + @OneToMany((type) => Photo, (photo) => photo.author) // note: we will create author property in the Photo class below + photos: Photo[] } ``` @@ -960,16 +986,16 @@ export class Author { ็Žฐๅœจ่ฎฉๆˆ‘ไปฌๅฐ†ๅ…ณ็ณป็š„ๆ‰€ๆœ‰่€…ๆ–นๆทปๅŠ ๅˆฐ Photo ๅฎžไฝ“ไธญ๏ผš ```typescript -import { Entity, Column, PrimaryGeneratedColumn, ManyToOne } from "typeorm"; -import { PhotoMetadata } from "./PhotoMetadata"; -import { Author } from "./Author"; +import { Entity, Column, PrimaryGeneratedColumn, ManyToOne } from "typeorm" +import { PhotoMetadata } from "./PhotoMetadata" +import { Author } from "./Author" @Entity() export class Photo { - /* ... other columns */ + /* ... other columns */ - @ManyToOne(type => Author, author => author.photos) - author: Author; + @ManyToOne((type) => Author, (author) => author.photos) + author: Author } ``` @@ -1005,19 +1031,25 @@ export class Photo { ๅ‡่ฎพไธ€ไธช photo ๅฏไปฅๆ”พๅœจๅคšไธช albums ไธญ๏ผŒๆฏไธช albums ๅฏไปฅๅŒ…ๅซๅคšไธช photoใ€‚่ฎฉๆˆ‘ไปฌๅˆ›ๅปบไธ€ไธช`Album`็ฑป๏ผš ```typescript -import { Entity, PrimaryGeneratedColumn, Column, ManyToMany, JoinTable } from "typeorm"; +import { + Entity, + PrimaryGeneratedColumn, + Column, + ManyToMany, + JoinTable, +} from "typeorm" @Entity() export class Album { - @PrimaryGeneratedColumn() - id: number; + @PrimaryGeneratedColumn() + id: number - @Column() - name: string; + @Column() + name: string - @ManyToMany(type => Photo, photo => photo.albums) - @JoinTable() - photos: Photo[]; + @ManyToMany((type) => Photo, (photo) => photo.albums) + @JoinTable() + photos: Photo[] } ``` @@ -1027,10 +1059,10 @@ export class Album { ```typescript export class Photo { - /// ... other columns + /// ... other columns - @ManyToMany(type => Album, album => album.photos) - albums: Album[]; + @ManyToMany((type) => Album, (album) => album.photos) + albums: Album[] } ``` @@ -1049,36 +1081,38 @@ export class Photo { ```typescript const options: ConnectionOptions = { - // ... other options - entities: [Photo, PhotoMetadata, Author, Album] -}; + // ... other options + entities: [Photo, PhotoMetadata, Author, Album], +} ``` ็Žฐๅœจ่ฎฉๆˆ‘ไปฌๅฐ† albums ๅ’Œ photos ๆ’ๅ…ฅๆˆ‘ไปฌ็š„ๆ•ฐๆฎๅบ“: ```typescript -let connection = await createConnection(options); +let connection = await createConnection(options) // create a few albums -let album1 = new Album(); -album1.name = "Bears"; -await connection.manager.save(album1); +let album1 = new Album() +album1.name = "Bears" +await connection.manager.save(album1) -let album2 = new Album(); -album2.name = "Me"; -await connection.manager.save(album2); +let album2 = new Album() +album2.name = "Me" +await connection.manager.save(album2) // create a few photos -let photo = new Photo(); -photo.name = "Me and Bears"; -photo.description = "I am near polar bears"; -photo.filename = "photo-with-bears.jpg"; -photo.albums = [album1, album2]; -await connection.manager.save(photo); +let photo = new Photo() +photo.name = "Me and Bears" +photo.description = "I am near polar bears" +photo.filename = "photo-with-bears.jpg" +photo.albums = [album1, album2] +await connection.manager.save(photo) // now our photo is saved and albums are attached to it // now lets load them: -const loadedPhoto = await connection.getRepository(Photo).findOne(1, { relations: ["albums"] }); +const loadedPhoto = await connection + .getRepository(Photo) + .findOne(1, { relations: ["albums"] }) ``` `loadedPhoto` ๅฆ‚ไธ‹ๆ‰€็คบ: @@ -1105,17 +1139,17 @@ const loadedPhoto = await connection.getRepository(Photo).findOne(1, { relations ```typescript let photos = await connection - .getRepository(Photo) - .createQueryBuilder("photo") // first argument is an alias. Alias is what you are selecting - photos. You must specify it. - .innerJoinAndSelect("photo.metadata", "metadata") - .leftJoinAndSelect("photo.albums", "album") - .where("photo.isPublished = true") - .andWhere("(photo.name = :photoName OR photo.name = :bearName)") - .orderBy("photo.id", "DESC") - .skip(5) - .take(10) - .setParameters({ photoName: "My", bearName: "Mishka" }) - .getMany(); + .getRepository(Photo) + .createQueryBuilder("photo") // first argument is an alias. Alias is what you are selecting - photos. You must specify it. + .innerJoinAndSelect("photo.metadata", "metadata") + .leftJoinAndSelect("photo.albums", "album") + .where("photo.isPublished = true") + .andWhere("(photo.name = :photoName OR photo.name = :bearName)") + .orderBy("photo.id", "DESC") + .skip(5) + .take(10) + .setParameters({ photoName: "My", bearName: "Mishka" }) + .getMany() ``` ๆญคๆŸฅ่ฏข้€‰ๆ‹ฉๆ‰€ๆœ‰ published ็š„ name ็ญ‰ไบŽ"My"ๆˆ–"Mishka"็š„ photosใ€‚ๅฎƒๅฐ†ไปŽ็ป“ๆžœไธญ็š„็ฌฌ 5 ไธช๏ผˆๅˆ†้กตๅ็งป๏ผ‰ๅผ€ๅง‹๏ผŒๅนถไธ”ไป…้€‰ๆ‹ฉ 10 ไธช็ป“ๆžœ๏ผˆๅˆ†้กต้™ๅˆถ๏ผ‰ใ€‚ๅพ—ๅˆฐ็š„็ป“ๆžœๅฐ†ๆŒ‰ ID ้™ๅบๆŽ’ๅบใ€‚photo ็š„ albums ๅฐ†่ขซ left-joined๏ผŒๅ…ถๅ…ƒๆ•ฐๆฎๅฐ†่ขซ inner joinedใ€‚ @@ -1129,27 +1163,27 @@ let photos = await connection ไธ‹้ข่ฟ™ไบ› repositories ๅฏไปฅๅธฎๅŠฉไฝ ๅฟซ้€Ÿๅผ€ๅง‹๏ผš -- [Example how to use TypeORM with TypeScript](https://github.com/typeorm/typescript-example) -- [Example how to use TypeORM with JavaScript](https://github.com/typeorm/javascript-example) -- [Example how to use TypeORM with JavaScript and Babel](https://github.com/typeorm/babel-example) -- [Example how to use TypeORM with TypeScript and SystemJS in Browser](https://github.com/typeorm/browser-example) -- [Example how to use Express and TypeORM](https://github.com/typeorm/typescript-express-example) -- [Example how to use Koa and TypeORM](https://github.com/typeorm/typescript-koa-example) -- [Example how to use TypeORM with MongoDB](https://github.com/typeorm/mongo-typescript-example) -- [Example how to use TypeORM in a Cordova/PhoneGap app](https://github.com/typeorm/cordova-example) -- [Example how to use TypeORM with an Ionic app](https://github.com/typeorm/ionic-example) -- [Example how to use TypeORM with React Native](https://github.com/typeorm/react-native-example) -- [Example how to use TypeORM with Electron using JavaScript](https://github.com/typeorm/electron-javascript-example) -- [Example how to use TypeORM with Electron using TypeScript](https://github.com/typeorm/electron-typescript-example) +- [Example how to use TypeORM with TypeScript](https://github.com/typeorm/typescript-example) +- [Example how to use TypeORM with JavaScript](https://github.com/typeorm/javascript-example) +- [Example how to use TypeORM with JavaScript and Babel](https://github.com/typeorm/babel-example) +- [Example how to use TypeORM with TypeScript and SystemJS in Browser](https://github.com/typeorm/browser-example) +- [Example how to use Express and TypeORM](https://github.com/typeorm/typescript-express-example) +- [Example how to use Koa and TypeORM](https://github.com/typeorm/typescript-koa-example) +- [Example how to use TypeORM with MongoDB](https://github.com/typeorm/mongo-typescript-example) +- [Example how to use TypeORM in a Cordova/PhoneGap app](https://github.com/typeorm/cordova-example) +- [Example how to use TypeORM with an Ionic app](https://github.com/typeorm/ionic-example) +- [Example how to use TypeORM with React Native](https://github.com/typeorm/react-native-example) +- [Example how to use TypeORM with Electron using JavaScript](https://github.com/typeorm/electron-javascript-example) +- [Example how to use TypeORM with Electron using TypeScript](https://github.com/typeorm/electron-typescript-example) ## ๆ‰ฉๅฑ• ่ฟ™ๅ‡ ไธชๆ‰ฉๅฑ•ๅฏไปฅ็ฎ€ๅŒ– TypeORM ็š„ไฝฟ็”จ๏ผŒๅนถๅฐ†ๅ…ถไธŽๅ…ถไป–ๆจกๅ—้›†ๆˆ๏ผš -- [TypeORM + GraphQL framework](http://vesper-framework.com) -- [TypeORM integration](https://github.com/typeorm/typeorm-typedi-extensions) with [TypeDI](https://github.com/pleerock/typedi) -- [TypeORM integration](https://github.com/typeorm/typeorm-routing-controllers-extensions) with [routing-controllers](https://github.com/pleerock/routing-controllers) -- ไปŽ็Žฐๆœ‰ๆ•ฐๆฎๅบ“็”Ÿๆˆๆจกๅž‹ - [typeorm-model-generator](https://github.com/Kononnable/typeorm-model-generator) +- [TypeORM + GraphQL framework](http://vesper-framework.com) +- [TypeORM integration](https://github.com/typeorm/typeorm-typedi-extensions) with [TypeDI](https://github.com/pleerock/typedi) +- [TypeORM integration](https://github.com/typeorm/typeorm-routing-controllers-extensions) with [routing-controllers](https://github.com/pleerock/routing-controllers) +- ไปŽ็Žฐๆœ‰ๆ•ฐๆฎๅบ“็”Ÿๆˆๆจกๅž‹ - [typeorm-model-generator](https://github.com/Kononnable/typeorm-model-generator) ## ่ดก็Œฎ @@ -1170,4 +1204,3 @@ let photos = await connection ๆˆไธบ้‡‘็‰Œ่ตžๅŠฉๅ•†๏ผŒๅนถไปŽๆˆ‘ไปฌ็š„ๆ ธๅฟƒ่ดก็Œฎ่€…้‚ฃ้‡Œ่Žทๅพ—้ซ˜็บงๆŠ€ๆœฏๆ”ฏๆŒใ€‚ [ๆˆไธบ้‡‘็‰Œ่ตžๅŠฉๅ•†](https://opencollective.com/typeorm) - diff --git a/docs/zh_CN/migrations.md b/docs/zh_CN/migrations.md index 11b47b356a..c066ffa6b3 100644 --- a/docs/zh_CN/migrations.md +++ b/docs/zh_CN/migrations.md @@ -77,7 +77,7 @@ TypeORM ๆไพ›ไบ†ไธ€ไธชๅฏไปฅ็ผ–ๅ†™ๆญค็ฑป SQL ๆŸฅ่ฏขๅนถๅœจ้œ€่ฆๆ—ถ่ฟ่กŒๅฎƒไปฌ ่ฎพ็ฝฎ่ฟžๆŽฅ้€‰้กนๅŽ๏ผŒๅฏไปฅไฝฟ็”จ CLI ๅˆ›ๅปบๆ–ฐ็š„่ฟ็งป๏ผš ``` -typeorm migration:create -n PostRefactoring +typeorm migration:create path-to-migrations-dir/migrationName ``` ่ฆไฝฟ็”จ CLI ๅ‘ฝไปค๏ผŒ้œ€่ฆๅ…จๅฑ€ๅฎ‰่ฃ… typeorm๏ผˆ`npm i typeorm -g`๏ผ‰ใ€‚ @@ -130,7 +130,7 @@ export class PostRefactoringTIMESTAMP implements MigrationInterface { ่ฟ็งปๅˆฐ็”ŸไบงๅŽ๏ผŒๅฏไปฅไฝฟ็”จ CLI ๅ‘ฝไปค่ฟ่กŒๅฎƒไปฌ๏ผš ``` -typeorm migration:run +typeorm migration:run -- -d path-to-datasource-config ``` **`typeorm migration๏ผšcreate`ๅ’Œ`typeorm migration๏ผšgenerate`ๅฐ†ๅˆ›ๅปบ`.ts`ๆ–‡ไปถใ€‚ `migration๏ผšrun`ๅ’Œ`migration๏ผšrevert`ๅ‘ฝไปคไป…้€‚็”จไบŽ`.js`ๆ–‡ไปถใ€‚ ๅ› ๆญค๏ผŒๅœจ่ฟ่กŒๅ‘ฝไปคไน‹ๅ‰้œ€่ฆ็ผ–่ฏ‘ typescript ๆ–‡ไปถใ€‚**ๆˆ–่€…ไฝ ๅฏไปฅไฝฟ็”จ`ts-node`ๅ’Œ`typeorm`ๆฅ่ฟ่กŒ`.ts`่ฟ็งปๆ–‡ไปถใ€‚ @@ -138,7 +138,7 @@ typeorm migration:run `ts-node`็š„็คบไพ‹๏ผš ``` -npx typeorm-ts-node-commonjs migration:run +npx typeorm-ts-node-commonjs migration:run -- -d path-to-datasource-config ``` ๆญคๅ‘ฝไปคๅฐ†ๆ‰ง่กŒๆ‰€ๆœ‰ๆŒ‚่ตท็š„่ฟ็งป๏ผŒๅนถๆŒ‰ๅ…ถๆ—ถ้—ดๆˆณๆŽ’ๅบ็š„้กบๅบ่ฟ่กŒๅฎƒไปฌใ€‚ @@ -148,7 +148,7 @@ npx typeorm-ts-node-commonjs migration:run ๅฆ‚ๆžœ็”ฑไบŽๆŸ็งๅŽŸๅ› ไฝ ๆƒณ่ฆ่ฟ˜ๅŽŸๆ›ดๆ”น๏ผŒๅˆ™ๅฏไปฅ่ฟ่กŒ๏ผš ``` -typeorm migration:revert +typeorm migration:revert -- -d path-to-datasource-config ``` ่ฏฅๅ‘ฝไปคๅฐ†ๅœจๆœ€่ฟ‘ๆ‰ง่กŒ็š„่ฟ็งปไธญๆ‰ง่กŒ`down`ใ€‚ diff --git a/docs/zh_CN/mongodb.md b/docs/zh_CN/mongodb.md index 277cf5c02e..c0f0d31dba 100644 --- a/docs/zh_CN/mongodb.md +++ b/docs/zh_CN/mongodb.md @@ -18,12 +18,12 @@ TypeORM ๅคงๅคšๆ•ฐๅŠŸ่ƒฝ้ƒฝๆ˜ฏ็‰นๅฎšไบŽ RDBMS ็š„๏ผŒ ็ฎ€ๅ•ๅฎžไฝ“็คบไพ‹๏ผš ```typescript -import { Entity, ObjectID, ObjectIdColumn, Column } from "typeorm"; +import { Entity, ObjectId, ObjectIdColumn, Column } from "typeorm"; @Entity() export class User { @ObjectIdColumn() - id: ObjectID; + id: ObjectId; @Column() firstName: string; @@ -51,7 +51,7 @@ const connection: Connection = await createConnection({ ็”ฑไบŽ MongoDB ๅญ˜ๅ‚จๅฏน่ฑกๅ’Œๅฏน่ฑกๅ†…็š„ๅฏน่ฑก๏ผˆๆˆ–ๆ–‡ๆกฃๅ†…็š„ๆ–‡ๆกฃ๏ผ‰๏ผŒๅ› ๆญคไฝ ๅฏไปฅๅœจ TypeORM ไธญๆ‰ง่กŒ็›ธๅŒ็š„ๆ“ไฝœ๏ผš ```typescript -import { Entity, ObjectID, ObjectIdColumn, Column } from "typeorm"; +import { Entity, ObjectId, ObjectIdColumn, Column } from "typeorm"; export class Profile { @Column() @@ -66,7 +66,7 @@ export class Profile { ``` ```typescript -import { Entity, ObjectID, ObjectIdColumn, Column } from "typeorm"; +import { Entity, ObjectId, ObjectIdColumn, Column } from "typeorm"; export class Photo { @Column() @@ -87,12 +87,12 @@ export class Photo { ``` ```typescript -import { Entity, ObjectID, ObjectIdColumn, Column } from "typeorm"; +import { Entity, ObjectId, ObjectIdColumn, Column } from "typeorm"; @Entity() export class User { @ObjectIdColumn() - id: ObjectID; + id: ObjectId; @Column() firstName: string; @@ -297,10 +297,6 @@ distinct ๅ‘ฝไปค่ฟ”ๅ›ž้›†ๅˆไธญ็ป™ๅฎš้”ฎ็š„ไธๅŒๅ€ผๅˆ—่กจใ€‚ ่Žทๅ–้›†ๅˆ็š„ๆ‰€ๆœ‰็ดขๅผ•ไฟกๆฏ็š„ๅˆ—่กจใ€‚ -#### `mapReduce` - -ๅœจ้›†ๅˆไธญ่ฟ่กŒ Map Reduceใ€‚ ่ฏทๆณจๆ„๏ผŒout ็š„ๅ†…่”้€‰้กนๅฐ†่ฟ”ๅ›ž็ป“ๆžœๆ•ฐ็ป„่€Œไธๆ˜ฏ้›†ๅˆใ€‚ - #### `parallelCollectionScan` ไธบ้›†ๅˆ่ฟ”ๅ›ž N ไธชๅนถ่กŒๆธธๆ ‡๏ผŒๅ…่ฎธๅนถ่กŒ่ฏปๅ–ๆ•ดไธช้›†ๅˆใ€‚ ่ฟ”ๅ›ž็š„็ป“ๆžœๆฒกๆœ‰้กบๅบไฟ่ฏใ€‚ diff --git a/docs/zh_CN/using-cli.md b/docs/zh_CN/using-cli.md index 62c9bdb154..85ca3cdfd3 100644 --- a/docs/zh_CN/using-cli.md +++ b/docs/zh_CN/using-cli.md @@ -161,7 +161,7 @@ typeorm subscriber:create -n UserSubscriber -d src/user/subscriber ไฝ ๅฏไปฅไฝฟ็”จ CLI ๅˆ›ๅปบๆ–ฐ็š„่ฟ็งป๏ผš ``` -typeorm migration:create -n UserMigration +typeorm migration:create path-to-migrations-dir/migrationName ``` ๅ…ถไธญ`UserMigration`ๆ˜ฏไธ€ไธช่ฟ็งปๆ–‡ไปถๅ’Œ็ฑปๅใ€‚ @@ -180,7 +180,7 @@ typeorm migration:create -n UserMigration ๅฆ‚ๆžœไฝ ๆœ‰ไธ€ไธชๅœจไธๅŒ็›ฎๅฝ•ไธญๅ…ทๆœ‰ๅคšไธช่ฟ็งป็š„ๅคšๆจกๅ—็ป“ๆž„็š„้กน็›ฎ๏ผŒๅˆ™ๅฏไปฅๆไพ›่ฆ็”Ÿๆˆ่ฟ็งป็š„ CLI ๅ‘ฝไปค็š„่ทฏๅพ„๏ผš ``` -typeorm migration:create -n UserMigration -d src/user/migration +typeorm migration:create path-to-migrations-dir/migrationName ``` ไบ†่งฃๆœ‰ๅ…ณ[Migrations](./migrations.md)็š„ๆ›ดๅคšไฟกๆฏใ€‚ @@ -212,7 +212,7 @@ typeorm migration:run ่ฆ่ฟ˜ๅŽŸๆœ€่ฟ‘ๆ‰ง่กŒ็š„่ฟ็งป๏ผŒ่ฏทไฝฟ็”จไปฅไธ‹ๅ‘ฝไปค๏ผš ``` -typeorm migration:revert +typeorm migration:revert -- -d path-to-datasource-config ``` ๆญคๅ‘ฝไปคๅฐ†ไป…ๆ’คๆถˆไธŠๆฌกๆ‰ง่กŒ็š„่ฟ็งปใ€‚ @@ -242,7 +242,7 @@ typeorm schema:log ่ฆๅฎŒๅ…จๅˆ ้™คๆ•ฐๆฎๅบ“ๆžถๆž„๏ผŒ่ฏทไฝฟ็”จไปฅไธ‹ๅ‘ฝไปค๏ผš ``` -typeorm schema:drop +typeorm schema:drop -- -d path-to-datasource-config ``` ๅœจ็”Ÿไบง็Žฏๅขƒๆ—ถ่ฆ่ฐจๆ…Žไฝฟ็”จ่ฟ™ไธชๅ‘ฝไปค๏ผŒๅ› ไธบๅฎƒไผšๅฎŒๅ…จๅˆ ้™คๆ•ฐๆฎๅบ“ไธญ็š„ๆ•ฐๆฎใ€‚ diff --git a/docs/zh_CN/using-ormconfig.md b/docs/zh_CN/using-ormconfig.md index 0ba2a87b59..06e04e9caf 100644 --- a/docs/zh_CN/using-ormconfig.md +++ b/docs/zh_CN/using-ormconfig.md @@ -1,38 +1,34 @@ # ไฝฟ็”จ ormconfig.json - * [ไปŽ้…็ฝฎๆ–‡ไปถๅˆ›ๅปบๆ–ฐ่ฟžๆŽฅ](#ไปŽ้…็ฝฎๆ–‡ไปถๅˆ›ๅปบๆ–ฐ่ฟžๆŽฅ) - * [ไฝฟ็”จ`ormconfig.json`](#ไฝฟ็”จ`ormconfig.json`) - * [ไฝฟ็”จ`ormconfig.js`](#ไฝฟ็”จ`ormconfig.js`) - * [ไฝฟ็”จ็Žฏๅขƒๅ˜้‡](#ไฝฟ็”จ็Žฏๅขƒๅ˜้‡) - * [ไฝฟ็”จ`ormconfig.yml`](#ไฝฟ็”จ`ormconfig.yml`) - * [ไฝฟ็”จ`ormconfig.xml`](#ไฝฟ็”จ`ormconfig.xml`) - * [่ฆ†็›–ormconfigไธญๅฎšไน‰็š„้€‰้กน](#่ฆ†็›–ormconfigไธญๅฎšไน‰็š„้€‰้กน) +- [ไปŽ้…็ฝฎๆ–‡ไปถๅˆ›ๅปบๆ–ฐ่ฟžๆŽฅ](#ไปŽ้…็ฝฎๆ–‡ไปถๅˆ›ๅปบๆ–ฐ่ฟžๆŽฅ) +- [ไฝฟ็”จ`ormconfig.json`](#ไฝฟ็”จ`ormconfig.json`) +- [ไฝฟ็”จ`ormconfig.js`](#ไฝฟ็”จ`ormconfig.js`) +- [ไฝฟ็”จ็Žฏๅขƒๅ˜้‡](#ไฝฟ็”จ็Žฏๅขƒๅ˜้‡) +- [่ฆ†็›– ormconfig ไธญๅฎšไน‰็š„้€‰้กน](#่ฆ†็›–ormconfigไธญๅฎšไน‰็š„้€‰้กน) ## ไปŽ้…็ฝฎๆ–‡ไปถๅˆ›ๅปบๆ–ฐ่ฟžๆŽฅ ๅคงๅคšๆ•ฐๆƒ…ๅ†ตไธ‹๏ผŒๆˆ‘ไปฌๅธŒๆœ›ๅฐ†่ฟžๆŽฅ้€‰้กนๅญ˜ๅ‚จๅœจๅ•็‹ฌ็š„้…็ฝฎๆ–‡ไปถไธญ๏ผŒๅ› ไธบๆญคๆ–นๅผไฝฟ็ฎก็†ๅ˜ๅพ—ๆ›ดๆ–นไพฟๅ’Œๅฎนๆ˜“ใ€‚ TypeORM ๆ”ฏๆŒๅคšไธช้…็ฝฎๆบใ€‚ไฝ ๅช้œ€่ฆๅœจๅบ”็”จ็จ‹ๅบ็š„ๆ น็›ฎๅฝ•๏ผˆ`package.json`้™„่ฟ‘๏ผ‰ไธญๅˆ›ๅปบไธ€ไธช`ormconfig.[format]`ๆ–‡ไปถๅญ˜ๆ”พ่ฟžๆŽฅ้…็ฝฎ๏ผŒๅนถๅœจๅบ”็”จ็จ‹ๅบไธญ่ฐƒ็”จ`createConnection()`๏ผŒ่€Œไธไผ ้€’ไปปไฝ•ๅ‚ๆ•ฐ้…็ฝฎ๏ผš ```typescript -import { createConnection } from "typeorm"; +import { createConnection } from "typeorm" // createConnectionๆ–นๆณ•ไผš่‡ชๅŠจ่ฏปๅ–ๆฅ่‡ชormconfigๆ–‡ไปถๆˆ–็Žฏๅขƒๅ˜้‡ไธญ็š„่ฟžๆŽฅ้€‰้กน -const connection = await createConnection(); +const connection = await createConnection() ``` -ๆ”ฏๆŒ็š„ ormconfig ๆ–‡ไปถๆ ผๅผๆœ‰๏ผš`.json`, `.js`, `.env`, `.yml` ๅ’Œ `.xml`. - ## ไฝฟ็”จ`ormconfig.json` ๅœจ้กน็›ฎๆ น็›ฎๅฝ•๏ผˆ`package.json`้™„่ฟ‘๏ผ‰ไธญๅˆ›ๅปบ`ormconfig.json`๏ผŒๅนถๅŒ…ๅซไปฅไธ‹ๅ†…ๅฎน๏ผš ```json { - "type": "mysql", - "host": "localhost", - "port": 3306, - "username": "test", - "password": "test", - "database": "test" + "type": "mysql", + "host": "localhost", + "port": 3306, + "username": "test", + "password": "test", + "database": "test" } ``` @@ -42,24 +38,24 @@ const connection = await createConnection(); ```json [ - { - "name": "default", - "type": "mysql", - "host": "localhost", - "port": 3306, - "username": "test", - "password": "test", - "database": "test" - }, - { - "name": "second-connection", - "type": "mysql", - "host": "localhost", - "port": 3306, - "username": "test", - "password": "test", - "database": "test" - } + { + "name": "default", + "type": "mysql", + "host": "localhost", + "port": 3306, + "username": "test", + "password": "test", + "database": "test" + }, + { + "name": "second-connection", + "type": "mysql", + "host": "localhost", + "port": 3306, + "username": "test", + "password": "test", + "database": "test" + } ] ``` @@ -69,13 +65,13 @@ const connection = await createConnection(); ```javascript module.exports = { - type: "mysql", - host: "localhost", - port: 3306, - username: "test", - password: "test", - database: "test" -}; + type: "mysql", + host: "localhost", + port: 3306, + username: "test", + password: "test", + database: "test", +} ``` ไฝ ๅฏไปฅๅ‚่€ƒ[ConnectionOptions](./connection-options.md)ๆฅ่ฎพ็ฝฎๅ…ถไป–้€‰้กนใ€‚ @@ -100,114 +96,65 @@ TYPEORM_ENTITIES = entity/.*js,modules/**/entity/.*js ๅฏไปฅ่ฎพ็ฝฎ็š„ๅฏ็”จ env ๅ˜้‡ๅˆ—่กจ๏ผš -- TYPEORM_CACHE -- TYPEORM_CACHE_ALWAYS_ENABLED -- TYPEORM_CACHE_DURATION -- TYPEORM_CACHE_OPTIONS -- TYPEORM_CONNECTION -- TYPEORM_DATABASE -- TYPEORM_DEBUG -- TYPEORM_DRIVER_EXTRA -- TYPEORM_DROP_SCHEMA -- TYPEORM_ENTITIES -- TYPEORM_ENTITIES_DIR -- TYPEORM_ENTITY_PREFIX -- TYPEORM_HOST -- TYPEORM_LOGGER -- TYPEORM_LOGGING -- TYPEORM_MAX_QUERY_EXECUTION_TIME -- TYPEORM_MIGRATIONS -- TYPEORM_MIGRATIONS_DIR -- TYPEORM_MIGRATIONS_RUN -- TYPEORM_MIGRATIONS_TABLE_NAME -- TYPEORM_METADATA_TABLE_NAME -- TYPEORM_PASSWORD -- TYPEORM_PORT -- TYPEORM_SCHEMA -- TYPEORM_SID -- TYPEORM_SUBSCRIBERS -- TYPEORM_SUBSCRIBERS_DIR -- TYPEORM_SYNCHRONIZE -- TYPEORM_URL -- TYPEORM_USERNAME -- TYPEORM_UUID_EXTENSION +- TYPEORM_CACHE +- TYPEORM_CACHE_ALWAYS_ENABLED +- TYPEORM_CACHE_DURATION +- TYPEORM_CACHE_OPTIONS +- TYPEORM_CONNECTION +- TYPEORM_DATABASE +- TYPEORM_DEBUG +- TYPEORM_DRIVER_EXTRA +- TYPEORM_DROP_SCHEMA +- TYPEORM_ENTITIES +- TYPEORM_ENTITIES_DIR +- TYPEORM_ENTITY_PREFIX +- TYPEORM_HOST +- TYPEORM_LOGGER +- TYPEORM_LOGGING +- TYPEORM_MAX_QUERY_EXECUTION_TIME +- TYPEORM_MIGRATIONS +- TYPEORM_MIGRATIONS_DIR +- TYPEORM_MIGRATIONS_RUN +- TYPEORM_MIGRATIONS_TABLE_NAME +- TYPEORM_METADATA_TABLE_NAME +- TYPEORM_PASSWORD +- TYPEORM_PORT +- TYPEORM_SCHEMA +- TYPEORM_SID +- TYPEORM_SUBSCRIBERS +- TYPEORM_SUBSCRIBERS_DIR +- TYPEORM_SYNCHRONIZE +- TYPEORM_URL +- TYPEORM_USERNAME +- TYPEORM_UUID_EXTENSION `ormconfig.env`ๅช่ƒฝๅœจๅผ€ๅ‘ๆœŸ้—ดไฝฟ็”จใ€‚ๅœจ็”Ÿไบง็Žฏๅขƒไธญ๏ผŒไฝ ๅฏไปฅๅœจ ENVIRONMENT VARIABLES ไธญ่ฎพ็ฝฎๆ‰€ๆœ‰่ฟ™ไบ›ๅ€ผใ€‚ ไฝ ๆ— ๆณ•ไฝฟ็”จ`env`ๆ–‡ไปถๆˆ–็Žฏๅขƒๅ˜้‡ๅฎšไน‰ๅคšไธช่ฟžๆŽฅใ€‚ๅฆ‚ๆžœไฝ ็š„ๅบ”็”จ้œ€่ฆๆœ‰ๅคšไธช่ฟžๆŽฅ๏ผŒ่ฏทไฝฟ็”จๅ…ถไป–้…็ฝฎๆ›ฟไปฃใ€‚ -## ไฝฟ็”จ`ormconfig.yml` - -ๅœจ้กน็›ฎๆ น็›ฎๅฝ•๏ผˆ`package.json`้™„่ฟ‘๏ผ‰ไธญๅˆ›ๅปบ`ormconfig.yml`๏ผŒๅนถๅŒ…ๅซไปฅไธ‹ๅ†…ๅฎน๏ผš - -```yaml -default: # ้ป˜่ฎค่ฟžๆŽฅ - host: "localhost" - port: 3306 - username: "test" - password: "test" - database: "test" - -second-connection: # ๅ…ถไป–่ฟžๆŽฅ - host: "localhost" - port: 3306 - username: "test" - password: "test" - database: "test2" -``` - -ไฝ ๅฏไปฅไฝฟ็”จไปปไธ€่ฟžๆŽฅใ€‚ - -## ไฝฟ็”จ`ormconfig.xml` - -ๅœจ้กน็›ฎๆ น็›ฎๅฝ•๏ผˆ`package.json`้™„่ฟ‘๏ผ‰ไธญๅˆ›ๅปบ`ormconfig.xml`๏ผŒๅนถๅŒ…ๅซไปฅไธ‹ๅ†…ๅฎน๏ผš - -```xml - - - localhost - root - admin - test - 3000 - true - - - localhost - root - admin - test2 - 3000 - true - - -``` - -ไฝ ๅฏไปฅไฝฟ็”จไปปไฝ•ๅฏ็”จ็š„่ฟžๆŽฅ้€‰้กนใ€‚ - -## Typeormไฝฟ็”จๅ“ชไธช้…็ฝฎๆ–‡ไปถ +## Typeorm ไฝฟ็”จๅ“ชไธช้…็ฝฎๆ–‡ไปถ -ๆœ‰ๆ—ถไฝ ๅฏ่ƒฝๅธŒๆœ›ไฝฟ็”จไธๅŒๆ ผๅผ็š„ๅคšไธช้…็ฝฎใ€‚ ๅฝ“่ฐƒ็”จ`getConnectionOptions()`ๆˆ–ๅฐ่ฏ•ๅœจๆฒกๆœ‰่ฟžๆŽฅ้€‰้กน็š„ๆƒ…ๅ†ตไธ‹ไฝฟ็”จ`createConnection()`ๆ—ถ๏ผŒTypeormๅฐ†ๅฐ่ฏ•ๆŒ‰ไปฅไธ‹้กบๅบๅŠ ่ฝฝ้…็ฝฎ๏ผš +ๆœ‰ๆ—ถไฝ ๅฏ่ƒฝๅธŒๆœ›ไฝฟ็”จไธๅŒๆ ผๅผ็š„ๅคšไธช้…็ฝฎใ€‚ ๅฝ“่ฐƒ็”จ`getConnectionOptions()`ๆˆ–ๅฐ่ฏ•ๅœจๆฒกๆœ‰่ฟžๆŽฅ้€‰้กน็š„ๆƒ…ๅ†ตไธ‹ไฝฟ็”จ`createConnection()`ๆ—ถ๏ผŒTypeorm ๅฐ†ๅฐ่ฏ•ๆŒ‰ไปฅไธ‹้กบๅบๅŠ ่ฝฝ้…็ฝฎ๏ผš -1. ๆฅ่‡ช็Žฏๅขƒๅ˜้‡ใ€‚ Typeormๅฐ†ๅฐ่ฏ•ไฝฟ็”จdotEnvๅŠ ่ฝฝ`.env`ๆ–‡ไปถ๏ผˆๅฆ‚ๆžœๅญ˜ๅœจ๏ผ‰ใ€‚ ๅฆ‚ๆžœ่ฎพ็ฝฎไบ†็Žฏๅขƒๅ˜้‡`TYPEORM_CONNECTION`ๆˆ–`TYPEORM_URL`๏ผŒTypeormๅฐ†ไฝฟ็”จๆญคๆ–นๆณ•ใ€‚ +1. ๆฅ่‡ช็Žฏๅขƒๅ˜้‡ใ€‚ Typeorm ๅฐ†ๅฐ่ฏ•ไฝฟ็”จ dotEnv ๅŠ ่ฝฝ`.env`ๆ–‡ไปถ๏ผˆๅฆ‚ๆžœๅญ˜ๅœจ๏ผ‰ใ€‚ ๅฆ‚ๆžœ่ฎพ็ฝฎไบ†็Žฏๅขƒๅ˜้‡`TYPEORM_CONNECTION`ๆˆ–`TYPEORM_URL`๏ผŒTypeorm ๅฐ†ไฝฟ็”จๆญคๆ–นๆณ•ใ€‚ 2. ๆฅ่‡ช`ormconfig.env`ใ€‚ -3. ไปŽๅฆไธ€ไธช`ormconfig.[format]`ๆ–‡ไปถ๏ผŒๆŒ‰ๆญค้กบๅบ๏ผš`[js๏ผŒts๏ผŒjson๏ผŒyml๏ผŒyaml๏ผŒxml]`ใ€‚ +3. ไปŽๅฆไธ€ไธช`ormconfig.[format]`ๆ–‡ไปถ๏ผŒๆŒ‰ๆญค้กบๅบ๏ผš`[js๏ผŒts๏ผŒjson]`ใ€‚ -ๆณจๆ„๏ผŒTypeormๅฐ†ไฝฟ็”จๆ‰พๅˆฐ็š„็ฌฌไธ€ไธชๆœ‰ๆ•ˆๆ–นๆณ•๏ผŒ่€ŒไธไผšๅŠ ่ฝฝๅ…ถไป–ๆ–นๆณ•ใ€‚ ไพ‹ๅฆ‚๏ผŒๅฆ‚ๆžœๅœจ็Žฏๅขƒไธญๆ‰พๅˆฐ้…็ฝฎ๏ผŒTypeormๅฐ†ไธไผšๅŠ ่ฝฝ`ormconfig.[format]`ๆ–‡ไปถใ€‚ +ๆณจๆ„๏ผŒTypeorm ๅฐ†ไฝฟ็”จๆ‰พๅˆฐ็š„็ฌฌไธ€ไธชๆœ‰ๆ•ˆๆ–นๆณ•๏ผŒ่€ŒไธไผšๅŠ ่ฝฝๅ…ถไป–ๆ–นๆณ•ใ€‚ ไพ‹ๅฆ‚๏ผŒๅฆ‚ๆžœๅœจ็Žฏๅขƒไธญๆ‰พๅˆฐ้…็ฝฎ๏ผŒTypeorm ๅฐ†ไธไผšๅŠ ่ฝฝ`ormconfig.[format]`ๆ–‡ไปถใ€‚ -## ่ฆ†็›–ormconfigไธญๅฎšไน‰็š„้€‰้กน +## ่ฆ†็›– ormconfig ไธญๅฎšไน‰็š„้€‰้กน ๆœ‰ๆ—ถไฝ ๅธŒๆœ›่ฆ†็›– ormconfig ๆ–‡ไปถไธญๅฎšไน‰็š„ๅ€ผ๏ผŒๆˆ–่€…ๅฏ่ƒฝไผšๅœจ้…็ฝฎไธญ้™„ๅŠ ไธ€ไบ› TypeScript / JavaScript ้€ป่พ‘ใ€‚ ๅœจ่ฟ™็งๆƒ…ๅ†ตไธ‹๏ผŒไฝ ๅฏไปฅไปŽ ormconfig ๅŠ ่ฝฝ้€‰้กนๅนถๆž„ๅปบ`ConnectionOptions`๏ผŒ็„ถๅŽๅœจๅฐ†ๅฎƒไปฌไผ ้€’็ป™`createConnection`ๅ‡ฝๆ•ฐไน‹ๅ‰๏ผŒไฝฟ็”จ่ฟ™ไบ›้€‰้กนๆ‰ง่กŒไปปไฝ•ๆ“ไฝœ๏ผš ```typescript // ไปŽormconfigๆ–‡ไปถ๏ผˆๆˆ–ENVๅ˜้‡๏ผ‰่ฏปๅ–่ฟžๆŽฅ้€‰้กน -const connectionOptions = await getConnectionOptions(); +const connectionOptions = await getConnectionOptions() // ไฝฟ็”จconnectionOptionsๅšไธ€ไบ›ไบ‹ๆƒ…๏ผŒ // ไพ‹ๅฆ‚๏ผŒ้™„ๅŠ ่‡ชๅฎšไน‰ๅ‘ฝๅ็ญ–็•ฅๆˆ–่‡ชๅฎšไน‰่ฎฐๅฝ•ๅ™จ -Object.assign(connectionOptions, { namingStrategy: new MyNamingStrategy() }); +Object.assign(connectionOptions, { namingStrategy: new MyNamingStrategy() }) // ไฝฟ็”จ่ฆ†็›–ๅŽ็š„่ฟžๆŽฅ้€‰้กนๅˆ›ๅปบ่ฟžๆŽฅ -const connection = await createConnection(connectionOptions); +const connection = await createConnection(connectionOptions) ``` diff --git a/package-lock.json b/package-lock.json index 10c7fe7023..484c635b77 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,31 +1,29 @@ { "name": "@streamyard/typeorm", - "version": "0.3.10.1", - "lockfileVersion": 2, + "version": "0.3.16-1", + "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@streamyard/typeorm", - "version": "0.3.10.1", + "version": "0.3.16-1", "license": "MIT", "dependencies": { - "@sqltools/formatter": "^1.2.2", - "app-root-path": "^3.0.0", + "@sqltools/formatter": "^1.2.5", + "app-root-path": "^3.1.0", "buffer": "^6.0.3", - "chalk": "^4.1.0", + "chalk": "^4.1.2", "cli-highlight": "^2.1.11", - "date-fns": "^2.28.0", - "debug": "^4.3.3", - "dotenv": "^16.0.0", - "glob": "^7.2.0", - "js-yaml": "^4.1.0", - "mkdirp": "^1.0.4", + "date-fns": "^2.29.3", + "debug": "^4.3.4", + "dotenv": "^16.0.3", + "glob": "^8.1.0", + "mkdirp": "^2.1.3", "reflect-metadata": "^0.1.13", "sha.js": "^2.4.11", - "tslib": "^2.3.1", - "uuid": "^8.3.2", - "xml2js": "^0.4.23", - "yargs": "^17.3.1" + "tslib": "^2.5.0", + "uuid": "^9.0.0", + "yargs": "^17.6.2" }, "bin": { "typeorm": "cli.js", @@ -34,56 +32,53 @@ }, "devDependencies": { "@types/app-root-path": "^1.2.4", - "@types/chai": "^4.2.15", - "@types/chai-as-promised": "^7.1.3", - "@types/debug": "^4.1.5", - "@types/js-yaml": "^4.0.0", - "@types/mkdirp": "^1.0.1", - "@types/mocha": "^8.2.1", - "@types/node": "^14.14.31", - "@types/rimraf": "^3.0.0", + "@types/chai": "^4.3.4", + "@types/chai-as-promised": "^7.1.5", + "@types/debug": "^4.1.7", + "@types/mkdirp": "^1.0.2", + "@types/mocha": "^10.0.1", + "@types/node": "^18.13.0", "@types/sha.js": "^2.4.0", - "@types/sinon": "^9.0.10", - "@types/source-map-support": "^0.5.3", - "@types/uuid": "^8.3.4", - "@types/xml2js": "^0.4.8", - "@types/yargs": "^17.0.2", - "better-sqlite3": "^7.1.2", - "chai": "^4.3.0", + "@types/sinon": "^10.0.13", + "@types/source-map-support": "^0.5.6", + "@types/uuid": "^9.0.0", + "@types/yargs": "^17.0.22", + "better-sqlite3": "^8.1.0", + "chai": "^4.3.7", "chai-as-promised": "^7.1.1", - "class-transformer": "^0.4.0", - "conventional-changelog-angular": "^5.0.12", - "conventional-changelog-cli": "^2.1.1", - "del": "^6.0.0", + "class-transformer": "^0.5.1", + "conventional-changelog-angular": "^5.0.13", + "conventional-changelog-cli": "^2.2.2", + "del": "6.1.1", "gulp": "^4.0.2", "gulp-istanbul": "^1.1.3", "gulp-mocha": "^8.0.0", "gulp-rename": "^2.0.0", - "gulp-replace": "^1.0.0", + "gulp-replace": "^1.1.4", "gulp-shell": "^0.8.0", "gulp-sourcemaps": "^3.0.0", "gulp-typescript": "^6.0.0-alpha.1", "gulpclass": "^0.2.0", - "husky": "^5.1.1", - "mocha": "^8.3.0", - "mongodb": "^3.6.4", - "mssql": "^7.3.0", + "husky": "^8.0.3", + "mocha": "^10.2.0", + "mongodb": "^5.2.0", + "mssql": "^9.1.1", "mysql": "^2.18.1", - "mysql2": "^2.2.5", - "pg": "^8.5.1", - "pg-query-stream": "^4.0.0", - "prettier": "^2.5.1", - "redis": "^3.1.1", + "mysql2": "^3.1.1", + "pg": "^8.9.0", + "pg-query-stream": "^4.3.0", + "prettier": "^2.8.3", + "redis": "^4.6.4", "remap-istanbul": "^0.13.0", - "rimraf": "^3.0.2", - "sinon": "^9.2.4", - "sinon-chai": "^3.5.0", - "source-map-support": "^0.5.19", - "sql.js": "^1.4.0", - "sqlite3": "^5.0.11", - "ts-node": "^10.7.0", - "typeorm-aurora-data-api-driver": "^2.0.0", - "typescript": "^4.8.2" + "rimraf": "^4.1.2", + "sinon": "^15.0.1", + "sinon-chai": "^3.7.0", + "source-map-support": "^0.5.21", + "sql.js": "^1.8.0", + "sqlite3": "^5.1.4", + "ts-node": "^10.9.1", + "typeorm-aurora-data-api-driver": "^2.4.4", + "typescript": "^4.9.5" }, "engines": { "node": ">= 12.9.0" @@ -94,12 +89,12 @@ "peerDependencies": { "@google-cloud/spanner": "^5.18.0", "@sap/hana-client": "^2.12.25", - "better-sqlite3": "^7.1.2", + "better-sqlite3": "^7.1.2 || ^8.0.0", "hdb-pool": "^0.1.6", "ioredis": "^5.0.4", - "mongodb": "^3.6.0", - "mssql": "^7.3.0", - "mysql2": "^2.2.5", + "mongodb": "^5.2.0", + "mssql": "^9.1.1", + "mysql2": "^2.2.5 || ^3.0.1", "oracledb": "^5.1.0", "pg": "^8.5.1", "pg-native": "^3.0.0", @@ -165,27 +160,21 @@ } }, "node_modules/@azure/abort-controller": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.0.4.tgz", - "integrity": "sha512-lNUmDRVGpanCsiUN3NWxFTdwmdFI53xwhkTFfHDGTYk46ca7Ind3nanJc+U6Zj9Tv+9nTCWRBscWEW1DyKOpTw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.1.0.tgz", + "integrity": "sha512-TrRLIoSQVzfAJX9H1JeFjzAoDGcoK1IYX1UImfceTZpsyYfWr09Ss1aHW1y5TrrR3iq6RZLBwJ3E24uwPhwahw==", "dev": true, "dependencies": { - "tslib": "^2.0.0" + "tslib": "^2.2.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=12.0.0" } }, - "node_modules/@azure/core-asynciterator-polyfill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@azure/core-asynciterator-polyfill/-/core-asynciterator-polyfill-1.0.0.tgz", - "integrity": "sha512-kmv8CGrPfN9SwMwrkiBK9VTQYxdFQEGe0BmQk+M8io56P9KNzpAxcWE/1fxJj7uouwN4kXF0BHW8DNlgx+wtCg==", - "dev": true - }, "node_modules/@azure/core-auth": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.3.2.tgz", - "integrity": "sha512-7CU6DmCHIZp5ZPiZ9r3J17lTKMmYsm/zGvNkjArQwPkrLlZ1TZ+EUYfGgh2X31OLMVAQCTJZW4cXHJi02EbJnA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.4.0.tgz", + "integrity": "sha512-HFrcTgmuSuukRf/EdPmqBrc5l6Q5Uu+2TbuhaKbgaCpP2TfAeiNaQPAadxO+CYBRHGUzIDteMAjFspFLDLnKVQ==", "dev": true, "dependencies": { "@azure/abort-controller": "^1.0.0", @@ -196,198 +185,135 @@ } }, "node_modules/@azure/core-client": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.4.0.tgz", - "integrity": "sha512-6v1pn4ubNSeI56PUgj2NLR/nfoMfkjYmrtNX0YdXrjxSajKcf/TZc/QJtTFj4wHIvYqU/Yn/g/Zb+MNhFZ5c+Q==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.7.1.tgz", + "integrity": "sha512-85igXpc5V7ns6rvMEpLmIcBDftjUgTWD+0tmYPyQEfPfkAwpPTs1X5rhCDsfqvUZGA8Ksid1hdZGu62r6XXeHg==", "dev": true, "dependencies": { "@azure/abort-controller": "^1.0.0", - "@azure/core-asynciterator-polyfill": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.4.0", - "@azure/core-tracing": "1.0.0-preview.13", + "@azure/core-auth": "^1.4.0", + "@azure/core-rest-pipeline": "^1.9.1", + "@azure/core-tracing": "^1.0.0", + "@azure/core-util": "^1.0.0", "@azure/logger": "^1.0.0", "tslib": "^2.2.0" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" } }, - "node_modules/@azure/core-client/node_modules/@azure/core-tracing": { - "version": "1.0.0-preview.13", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", - "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", + "node_modules/@azure/core-http-compat": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@azure/core-http-compat/-/core-http-compat-1.3.0.tgz", + "integrity": "sha512-ZN9avruqbQ5TxopzG3ih3KRy52n8OAbitX3fnZT5go4hzu0J+KVPSzkL+Wt3hpJpdG8WIfg1sBD1tWkgUdEpBA==", "dev": true, "dependencies": { - "@opentelemetry/api": "^1.0.1", - "tslib": "^2.2.0" + "@azure/abort-controller": "^1.0.4", + "@azure/core-client": "^1.3.0", + "@azure/core-rest-pipeline": "^1.3.0" }, "engines": { "node": ">=12.0.0" } }, - "node_modules/@azure/core-http": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.2.3.tgz", - "integrity": "sha512-xr8AeszxP418rI//W38NfJDDr0kbVAPZkURZnZ+Fle+lLWeURjDE5zNIuocA1wUPoKSP8iXc0ApW6nPtbLGswA==", + "node_modules/@azure/core-lro": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.5.1.tgz", + "integrity": "sha512-JHQy/bA3NOz2WuzOi5zEk6n/TJdAropupxUT521JIJvW7EXV2YN2SFYZrf/2RHeD28QAClGdynYadZsbmP+nyQ==", "dev": true, "dependencies": { "@azure/abort-controller": "^1.0.0", - "@azure/core-asynciterator-polyfill": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-tracing": "1.0.0-preview.13", "@azure/logger": "^1.0.0", - "@types/node-fetch": "^2.5.0", - "@types/tunnel": "^0.0.3", - "form-data": "^4.0.0", - "node-fetch": "^2.6.6", - "process": "^0.11.10", - "tough-cookie": "^4.0.0", - "tslib": "^2.2.0", - "tunnel": "^0.0.6", - "uuid": "^8.3.0", - "xml2js": "^0.4.19" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@azure/core-http/node_modules/@azure/core-tracing": { - "version": "1.0.0-preview.13", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", - "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", - "dev": true, - "dependencies": { - "@opentelemetry/api": "^1.0.1", "tslib": "^2.2.0" }, "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@azure/core-http/node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" + "node": ">=14.0.0" } }, - "node_modules/@azure/core-http/node_modules/tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "node_modules/@azure/core-paging": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.5.0.tgz", + "integrity": "sha512-zqWdVIt+2Z+3wqxEOGzR5hXFZ8MGKK52x4vFLw8n58pR6ZfKRx3EXYTxTaYxYHc/PexPUTyimcTWFJbji9Z6Iw==", "dev": true, "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.1.2" + "tslib": "^2.2.0" }, "engines": { - "node": ">=6" + "node": ">=14.0.0" } }, - "node_modules/@azure/core-lro": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.2.3.tgz", - "integrity": "sha512-UMdlR9NsqDCLTba3EUbRjfMF4gDmWvld196JmUjbz9WWhJ2XT00OR5MXeWiR+vmGT+ETiO4hHFCi2/eGO5YVtg==", + "node_modules/@azure/core-rest-pipeline": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.10.1.tgz", + "integrity": "sha512-Kji9k6TOFRDB5ZMTw8qUf2IJ+CeJtsuMdAHox9eqpTf1cefiNMpzrfnF6sINEBZJsaVaWgQ0o48B6kcUH68niA==", "dev": true, "dependencies": { "@azure/abort-controller": "^1.0.0", - "@azure/core-tracing": "1.0.0-preview.13", + "@azure/core-auth": "^1.4.0", + "@azure/core-tracing": "^1.0.1", + "@azure/core-util": "^1.0.0", "@azure/logger": "^1.0.0", - "tslib": "^2.2.0" + "form-data": "^4.0.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "tslib": "^2.2.0", + "uuid": "^8.3.0" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" } }, - "node_modules/@azure/core-lro/node_modules/@azure/core-tracing": { - "version": "1.0.0-preview.13", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", - "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", + "node_modules/@azure/core-rest-pipeline/node_modules/@tootallnate/once": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", + "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", "dev": true, - "dependencies": { - "@opentelemetry/api": "^1.0.1", - "tslib": "^2.2.0" - }, "engines": { - "node": ">=12.0.0" + "node": ">= 10" } }, - "node_modules/@azure/core-paging": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.2.1.tgz", - "integrity": "sha512-UtH5iMlYsvg+nQYIl4UHlvvSrsBjOlRF4fs0j7mxd3rWdAStrKYrh2durOpHs5C9yZbVhsVDaisoyaf/lL1EVA==", + "node_modules/@azure/core-rest-pipeline/node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", "dev": true, "dependencies": { - "@azure/core-asynciterator-polyfill": "^1.0.0", - "tslib": "^2.2.0" + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" }, "engines": { - "node": ">=12.0.0" + "node": ">= 6" } }, - "node_modules/@azure/core-rest-pipeline": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.4.0.tgz", - "integrity": "sha512-M2uL9PbvhJIEMRoUad3EnXCHWLN/i0W7D7MQJ9rnIDW7iLVCteUiegdqNa2Cr1/7he/ysEXYiwaXiHmfack/6g==", + "node_modules/@azure/core-rest-pipeline/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true, - "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-tracing": "1.0.0-preview.13", - "@azure/logger": "^1.0.0", - "form-data": "^4.0.0", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "tslib": "^2.2.0", - "uuid": "^8.3.0" - }, - "engines": { - "node": ">=12.0.0" + "bin": { + "uuid": "dist/bin/uuid" } }, - "node_modules/@azure/core-rest-pipeline/node_modules/@azure/core-tracing": { - "version": "1.0.0-preview.13", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", - "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", + "node_modules/@azure/core-tracing": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.1.tgz", + "integrity": "sha512-I5CGMoLtX+pI17ZdiFJZgxMJApsK6jjfm85hpgp3oazCdq5Wxgh4wMr7ge/TTWW1B5WBuvIOI1fMU/FrOAMKrw==", "dev": true, "dependencies": { - "@opentelemetry/api": "^1.0.1", "tslib": "^2.2.0" }, "engines": { "node": ">=12.0.0" } }, - "node_modules/@azure/core-rest-pipeline/node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/@azure/core-tracing": { - "version": "1.0.0-preview.12", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.12.tgz", - "integrity": "sha512-nvo2Wc4EKZGN6eFu9n3U7OXmASmL8VxoPIH7xaD6OlQqi44bouF0YIi9ID5rEsKLiAU59IYx6M297nqWVMWPDg==", + "node_modules/@azure/core-util": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.1.1.tgz", + "integrity": "sha512-A4TBYVQCtHOigFb2ETiiKFDocBoI1Zk2Ui1KpI42aJSIDexF7DHQFpnjonltXAIU/ceH+1fsZAWWgvX6/AKzog==", "dev": true, "dependencies": { - "@opentelemetry/api": "^1.0.0", + "@azure/abort-controller": "^1.0.0", "tslib": "^2.2.0" }, "engines": { @@ -395,77 +321,59 @@ } }, "node_modules/@azure/identity": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-1.5.2.tgz", - "integrity": "sha512-vqyeRbd2i0h9F4mqW5JbkP1xfabqKQ21l/81osKhpOQ2LtwaJW6nw4+0PsVYnxcbPHFCIZt6EWAk74a3OGYZJA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-2.1.0.tgz", + "integrity": "sha512-BPDz1sK7Ul9t0l9YKLEa8PHqWU4iCfhGJ+ELJl6c8CP3TpJt2urNCbm0ZHsthmxRsYoMPbz2Dvzj30zXZVmAFw==", "dev": true, "dependencies": { + "@azure/abort-controller": "^1.0.0", "@azure/core-auth": "^1.3.0", - "@azure/core-client": "^1.0.0", + "@azure/core-client": "^1.4.0", "@azure/core-rest-pipeline": "^1.1.0", - "@azure/core-tracing": "1.0.0-preview.12", + "@azure/core-tracing": "^1.0.0", + "@azure/core-util": "^1.0.0", "@azure/logger": "^1.0.0", - "@azure/msal-node": "1.0.0-beta.6", - "@types/stoppable": "^1.1.0", - "axios": "^0.21.1", + "@azure/msal-browser": "^2.26.0", + "@azure/msal-common": "^7.0.0", + "@azure/msal-node": "^1.10.0", "events": "^3.0.0", "jws": "^4.0.0", - "msal": "^1.0.2", - "open": "^7.0.0", - "qs": "^6.7.0", + "open": "^8.0.0", "stoppable": "^1.1.0", - "tslib": "^2.0.0", + "tslib": "^2.2.0", "uuid": "^8.3.0" }, "engines": { "node": ">=12.0.0" - }, - "optionalDependencies": { - "keytar": "^7.3.0" } }, - "node_modules/@azure/identity/node_modules/qs": { - "version": "6.10.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", - "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", + "node_modules/@azure/identity/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true, - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bin": { + "uuid": "dist/bin/uuid" } }, "node_modules/@azure/keyvault-keys": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@azure/keyvault-keys/-/keyvault-keys-4.3.0.tgz", - "integrity": "sha512-OEosl0/rE/mKD5Ji9KaQN7UH+yQnV5MS0MRhGqQIiJrG+qAvAla0MYudJzv3XvBlplpGk0+MVgyL9H3KX/UAwQ==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@azure/keyvault-keys/-/keyvault-keys-4.6.0.tgz", + "integrity": "sha512-0112LegxeR03L8J4k+q6HwBVvrpd9y+oInG0FG3NaHXN7YUubVBon/eb5jFI6edGrvNigpxSR0XIsprFXdkzCQ==", "dev": true, "dependencies": { "@azure/abort-controller": "^1.0.0", - "@azure/core-http": "^2.0.0", - "@azure/core-lro": "^2.0.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-client": "^1.5.0", + "@azure/core-http-compat": "^1.3.0", + "@azure/core-lro": "^2.2.0", "@azure/core-paging": "^1.1.1", - "@azure/core-tracing": "1.0.0-preview.13", + "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-tracing": "^1.0.0", + "@azure/core-util": "^1.0.0", "@azure/logger": "^1.0.0", "tslib": "^2.2.0" }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@azure/keyvault-keys/node_modules/@azure/core-tracing": { - "version": "1.0.0-preview.13", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", - "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", - "dev": true, - "dependencies": { - "@opentelemetry/api": "^1.0.1", - "tslib": "^2.2.0" - }, "engines": { "node": ">=12.0.0" } @@ -482,123 +390,96 @@ "node": ">=12.0.0" } }, - "node_modules/@azure/ms-rest-azure-env": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@azure/ms-rest-azure-env/-/ms-rest-azure-env-2.0.0.tgz", - "integrity": "sha512-dG76W7ElfLi+fbTjnZVGj+M9e0BIEJmRxU6fHaUQ12bZBe8EJKYb2GV50YWNaP2uJiVQ5+7nXEVj1VN1UQtaEw==", - "dev": true - }, - "node_modules/@azure/ms-rest-js": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.6.0.tgz", - "integrity": "sha512-4C5FCtvEzWudblB+h92/TYYPiq7tuElX8icVYToxOdggnYqeec4Se14mjse5miInKtZahiFHdl8lZA/jziEc5g==", + "node_modules/@azure/msal-browser": { + "version": "2.33.0", + "resolved": "https://registry.npmjs.org/@azure/msal-browser/-/msal-browser-2.33.0.tgz", + "integrity": "sha512-c7CVh1tfUfxiWkEIhoIb11hL4PGo4hz0M+gMy34ATagAKdLK7qyEu/5AXJWAf5lz5eE+vQhm7+LKiuETrcXXGw==", "dev": true, "dependencies": { - "@azure/core-auth": "^1.1.4", - "abort-controller": "^3.0.0", - "form-data": "^2.5.0", - "node-fetch": "^2.6.0", - "tough-cookie": "^3.0.1", - "tslib": "^1.10.0", - "tunnel": "0.0.6", - "uuid": "^8.3.2", - "xml2js": "^0.4.19" + "@azure/msal-common": "^10.0.0" + }, + "engines": { + "node": ">=0.8.0" } }, - "node_modules/@azure/ms-rest-js/node_modules/form-data": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", - "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "node_modules/@azure/msal-browser/node_modules/@azure/msal-common": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-10.0.0.tgz", + "integrity": "sha512-/LghpT93jsZLy55QzTsRZWMx6R1Mjc1Aktwps8sKSGE3WbrGwbSsh2uhDlpl6FMcKChYjJ0ochThWwwOodrQNg==", "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, "engines": { - "node": ">= 0.12" + "node": ">=0.8.0" } }, - "node_modules/@azure/ms-rest-js/node_modules/tough-cookie": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", - "integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==", + "node_modules/@azure/msal-common": { + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-7.6.0.tgz", + "integrity": "sha512-XqfbglUTVLdkHQ8F9UQJtKseRr3sSnr9ysboxtoswvaMVaEfvyLtMoHv9XdKUfOc0qKGzNgRFd9yRjIWVepl6Q==", "dev": true, - "dependencies": { - "ip-regex": "^2.1.0", - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, "engines": { - "node": ">=6" + "node": ">=0.8.0" } }, - "node_modules/@azure/ms-rest-js/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/@azure/ms-rest-nodeauth": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@azure/ms-rest-nodeauth/-/ms-rest-nodeauth-3.1.1.tgz", - "integrity": "sha512-UA/8dgLy3+ZiwJjAZHxL4MUB14fFQPkaAOZ94jsTW/Z6WmoOeny2+cLk0+dyIX/iH6qSrEWKwbStEeB970B9pA==", + "node_modules/@azure/msal-node": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.15.0.tgz", + "integrity": "sha512-fwC5M0c8pxOAzmScPbpx7j28YVTDebUaizlVF7bR0xvlU0r3VWW5OobCcr9ybqKS6wGyO7u4EhXJS9rjRWAuwA==", "dev": true, "dependencies": { - "@azure/ms-rest-azure-env": "^2.0.0", - "@azure/ms-rest-js": "^2.0.4", - "adal-node": "^0.2.2" + "@azure/msal-common": "^10.0.0", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "engines": { + "node": "10 || 12 || 14 || 16 || 18" } }, - "node_modules/@azure/msal-common": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-4.5.1.tgz", - "integrity": "sha512-/i5dXM+QAtO+6atYd5oHGBAx48EGSISkXNXViheliOQe+SIFMDo3gSq3lL54W0suOSAsVPws3XnTaIHlla0PIQ==", + "node_modules/@azure/msal-node/node_modules/@azure/msal-common": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-10.0.0.tgz", + "integrity": "sha512-/LghpT93jsZLy55QzTsRZWMx6R1Mjc1Aktwps8sKSGE3WbrGwbSsh2uhDlpl6FMcKChYjJ0ochThWwwOodrQNg==", "dev": true, - "dependencies": { - "debug": "^4.1.1" - }, "engines": { "node": ">=0.8.0" } }, - "node_modules/@azure/msal-node": { - "version": "1.0.0-beta.6", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.0.0-beta.6.tgz", - "integrity": "sha512-ZQI11Uz1j0HJohb9JZLRD8z0moVcPks1AFW4Q/Gcl67+QvH4aKEJti7fjCcipEEZYb/qzLSO8U6IZgPYytsiJQ==", + "node_modules/@azure/msal-node/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true, - "dependencies": { - "@azure/msal-common": "^4.0.0", - "axios": "^0.21.1", - "jsonwebtoken": "^8.5.1", - "uuid": "^8.3.0" + "bin": { + "uuid": "dist/bin/uuid" } }, "node_modules/@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", "dev": true, "dependencies": { - "@babel/highlight": "^7.10.4" + "@babel/highlight": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.15.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", - "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", + "version": "7.19.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", + "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", - "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.14.5", + "@babel/helper-validator-identifier": "^7.18.6", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, @@ -644,13 +525,13 @@ "node_modules/@babel/highlight/node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, "node_modules/@babel/highlight/node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, "engines": { "node": ">=0.8.0" @@ -659,7 +540,7 @@ "node_modules/@babel/highlight/node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, "engines": { "node": ">=4" @@ -677,22 +558,13 @@ "node": ">=4" } }, - "node_modules/@cspotcode/source-map-consumer": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", - "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", - "dev": true, - "engines": { - "node": ">= 12" - } - }, "node_modules/@cspotcode/source-map-support": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", - "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", "dev": true, "dependencies": { - "@cspotcode/source-map-consumer": "0.8.0" + "@jridgewell/trace-mapping": "0.3.9" }, "engines": { "node": ">=12" @@ -721,18 +593,6 @@ "node": ">= 0.10" } }, - "node_modules/@gulp-sourcemaps/identity-map/node_modules/acorn": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", - "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", - "dev": true, - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/@gulp-sourcemaps/identity-map/node_modules/through2": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", @@ -746,7 +606,7 @@ "node_modules/@gulp-sourcemaps/map-sources": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz", - "integrity": "sha1-iQrnxdjId/bThIYCFazp1+yUW9o=", + "integrity": "sha512-o/EatdaGt8+x2qpb0vFLC/2Gug/xYPRXb6a+ET1wGYKozKN3krDWC/zZFZAtrzxJHuDL12mwdfEFKcKMNvc55A==", "dev": true, "dependencies": { "normalize-path": "^2.0.1", @@ -759,7 +619,7 @@ "node_modules/@gulp-sourcemaps/map-sources/node_modules/normalize-path": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", "dev": true, "dependencies": { "remove-trailing-separator": "^1.0.1" @@ -787,16 +647,41 @@ "node": ">=6.9.0" } }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@js-joda/core": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@js-joda/core/-/core-3.2.0.tgz", - "integrity": "sha512-PMqgJ0sw5B7FKb2d5bWYIoxjri+QlW/Pys7+Rw82jSH0QN3rB05jZ/VrrsUdh1w4+i2kw9JOejXGq/KhDOX7Kg==", + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/@js-joda/core/-/core-5.5.2.tgz", + "integrity": "sha512-retLUN4TwCJ0QJDi9OCJwYVaXAz93NeOkEtEQL98M2bykBOxmURlP0YlfsuE46kItOOVZIWRYC3KsSLhQ1R2Qw==", "dev": true }, "node_modules/@mapbox/node-pre-gyp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.9.tgz", - "integrity": "sha512-aDF3S3rK9Q2gey/WAttUlISduDItz5BU3306M9Eyv6/oS40aMprnopshtlKTykxRNIBEZuRMaZAnbrQ4QtKGyw==", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz", + "integrity": "sha512-4ySo4CjzStuprMwk35H5pPbkymjv1SF3jGLj6rAHp/xT/RF7TL7bd9CTm1xDY49K2qF7jmR/g7k+SkLETP6opA==", "dev": true, "dependencies": { "detect-libc": "^2.0.0", @@ -813,46 +698,46 @@ "node-pre-gyp": "bin/node-pre-gyp" } }, - "node_modules/@mapbox/node-pre-gyp/node_modules/are-we-there-yet": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", - "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", + "node_modules/@mapbox/node-pre-gyp/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=10" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/@mapbox/node-pre-gyp/node_modules/detect-libc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", - "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", + "node_modules/@mapbox/node-pre-gyp/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, "engines": { - "node": ">=8" + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@mapbox/node-pre-gyp/node_modules/gauge": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", - "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", + "node_modules/@mapbox/node-pre-gyp/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.1", - "object-assign": "^4.1.1", - "signal-exit": "^3.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=10" + "node": "*" } }, "node_modules/@mapbox/node-pre-gyp/node_modules/nopt": { @@ -870,30 +755,34 @@ "node": ">=6" } }, - "node_modules/@mapbox/node-pre-gyp/node_modules/npmlog": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", - "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", + "node_modules/@mapbox/node-pre-gyp/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "dependencies": { - "are-we-there-yet": "^2.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^3.0.0", - "set-blocking": "^2.0.0" + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@mapbox/node-pre-gyp/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "node_modules/@mapbox/node-pre-gyp/node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": ">= 6" + "node": ">=10" } }, "node_modules/@nodelib/fs.scandir": { @@ -942,10 +831,27 @@ "semver": "^7.3.5" } }, + "node_modules/@npmcli/fs/node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dev": true, + "optional": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@npmcli/move-file": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", + "deprecated": "This functionality has been moved to @npmcli/fs", "dev": true, "optional": true, "dependencies": { @@ -956,89 +862,183 @@ "node": ">=10" } }, - "node_modules/@opentelemetry/api": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.0.4.tgz", - "integrity": "sha512-BuJuXRSJNQ3QoKA6GWWDyuLpOUck+9hAXNMCnrloc1aWVoy6Xq6t9PUV08aBZ4Lutqq2LEHM486bpZqoViScog==", + "node_modules/@npmcli/move-file/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "engines": { - "node": ">=8.0.0" + "optional": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/@sap/hana-client": { - "version": "2.12.25", - "resolved": "https://registry.npmjs.org/@sap/hana-client/-/hana-client-2.12.25.tgz", - "integrity": "sha512-Jn76aKTXryJmKbZaZdtUt2oLN3EQXyBi9gHK2hs+cTIK2Eb0popYvQu0M/9d2YXFGAtsfD14cXgh621m+NhRJA==", - "hasInstallScript": true, - "hasShrinkwrap": true, + "node_modules/@npmcli/move-file/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, "optional": true, - "peer": true, "dependencies": { - "debug": "3.1.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">=4.0.0" + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@sap/hana-client/node_modules/debug": { - "version": "3.1.0", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "node_modules/@npmcli/move-file/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, "optional": true, - "peer": true, "dependencies": { - "ms": "2.0.0" + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" } }, - "node_modules/@sap/hana-client/node_modules/ms": { - "version": "2.0.0", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "node_modules/@npmcli/move-file/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "optional": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@npmcli/move-file/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, "optional": true, - "peer": true + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@redis/bloom": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@redis/bloom/-/bloom-1.2.0.tgz", + "integrity": "sha512-HG2DFjYKbpNmVXsa0keLHp/3leGJz1mjh09f2RLGGLQZzSHpkmZWuwJbAvo3QcRY8p80m5+ZdXZdYOSBLlp7Cg==", + "dev": true, + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/client": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@redis/client/-/client-1.5.5.tgz", + "integrity": "sha512-fuMnpDYSjT5JXR9rrCW1YWA4L8N/9/uS4ImT3ZEC/hcaQRI1D/9FvwjriRj1UvepIgzZXthFVKMNRzP/LNL7BQ==", + "dev": true, + "dependencies": { + "cluster-key-slot": "1.1.2", + "generic-pool": "3.9.0", + "yallist": "4.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@redis/graph": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@redis/graph/-/graph-1.1.0.tgz", + "integrity": "sha512-16yZWngxyXPd+MJxeSr0dqh2AIOi8j9yXKcKCwVaKDbH3HTuETpDVPcLujhFYVPtYrngSco31BUcSa9TH31Gqg==", + "dev": true, + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/json": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@redis/json/-/json-1.0.4.tgz", + "integrity": "sha512-LUZE2Gdrhg0Rx7AN+cZkb1e6HjoSKaeeW8rYnt89Tly13GBI5eP4CwDVr+MY8BAYfCg4/N15OUrtLoona9uSgw==", + "dev": true, + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/search": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@redis/search/-/search-1.1.1.tgz", + "integrity": "sha512-pqCXTc5e7wJJgUuJiC3hBgfoFRoPxYzwn0BEfKgejTM7M/9zP3IpUcqcjgfp8hF+LoV8rHZzcNTz7V+pEIY7LQ==", + "dev": true, + "peerDependencies": { + "@redis/client": "^1.0.0" + } + }, + "node_modules/@redis/time-series": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@redis/time-series/-/time-series-1.0.4.tgz", + "integrity": "sha512-ThUIgo2U/g7cCuZavucQTQzA9g9JbDDY2f64u3AbAoz/8vE2lt2U37LamDUVChhaDA3IRT9R6VvJwqnUfTJzng==", + "dev": true, + "peerDependencies": { + "@redis/client": "^1.0.0" + } }, "node_modules/@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", "dev": true, "dependencies": { "type-detect": "4.0.8" } }, "node_modules/@sinonjs/fake-timers": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", - "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.0.2.tgz", + "integrity": "sha512-SwUDyjWnah1AaNl7kxsa7cfLhlTYoiyhDAIgyh+El30YvXs/o7OLXpYH88Zdhyx9JExKrmHDJ+10bwIcY80Jmw==", "dev": true, "dependencies": { - "@sinonjs/commons": "^1.7.0" + "@sinonjs/commons": "^2.0.0" } }, "node_modules/@sinonjs/samsam": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.1.tgz", - "integrity": "sha512-1Hc0b1TtyfBu8ixF/tpfSHTVWKwCBLY4QJbkgnE7HcwyvT2xArDxb4K7dMgqRm3szI+LJbzmW/s4xxEhv6hwDg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-7.0.1.tgz", + "integrity": "sha512-zsAk2Jkiq89mhZovB2LLOdTCxJF4hqqTToGP0ASWlhp4I1hqOjcfmZGafXntCN7MDC6yySH0mFHrYtHceOeLmw==", "dev": true, "dependencies": { - "@sinonjs/commons": "^1.6.0", + "@sinonjs/commons": "^2.0.0", "lodash.get": "^4.4.2", "type-detect": "^4.0.8" } }, "node_modules/@sinonjs/text-encoding": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", - "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz", + "integrity": "sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==", "dev": true }, "node_modules/@sqltools/formatter": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@sqltools/formatter/-/formatter-1.2.3.tgz", - "integrity": "sha512-O3uyB/JbkAEMZaP3YqyHH7TMnex7tWyCbCI4EfJdOCoN6HIhqdJBWTM6aCCiWQ/5f5wxjgU735QAIpJbjDvmzg==" + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@sqltools/formatter/-/formatter-1.2.5.tgz", + "integrity": "sha512-Uy0+khmZqUrUGm5dmMqVlnvufZRSK0FbYzVgp0UMstm+F5+W2/jnEEQyc9vo1ZR/E5ZI/B1WjjoTqBqwJL6Krw==" }, "node_modules/@tediousjs/connection-string": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@tediousjs/connection-string/-/connection-string-0.3.0.tgz", - "integrity": "sha512-d/keJiNKfpHo+GmSB8QcsAwBx8h+V1UbdozA5TD+eSLXprNY53JAYub47J9evsSKWDdNG5uVj0FiMozLKuzowQ==", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@tediousjs/connection-string/-/connection-string-0.4.2.tgz", + "integrity": "sha512-1R9UC7Qc5wief2oJL+c1+d7v1/oPBayL85u8L/jV2DzIKput1TZ8ZUjj2nxQaSfzu210zp0oFWUrYUiUs8NhBQ==", "dev": true }, "node_modules/@tootallnate/once": { @@ -1046,50 +1046,51 @@ "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", "dev": true, + "optional": true, "engines": { "node": ">= 6" } }, "node_modules/@tsconfig/node10": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", - "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", "dev": true }, "node_modules/@tsconfig/node12": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz", - "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", "dev": true }, "node_modules/@tsconfig/node14": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz", - "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", "dev": true }, "node_modules/@tsconfig/node16": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", - "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==", "dev": true }, "node_modules/@types/app-root-path": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/@types/app-root-path/-/app-root-path-1.2.4.tgz", - "integrity": "sha1-p4twMoKzKsVN52j1US7MNWmRncc=", + "integrity": "sha512-yhURoXmWN/zfw2MXXcOdUTwe5CWhzRWtb4Rs2+JwGpuhm2hxLCzjASi/aIuyVeJB3Iyks1teaHyOEfNNmltdvQ==", "dev": true }, "node_modules/@types/chai": { - "version": "4.2.22", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.22.tgz", - "integrity": "sha512-tFfcE+DSTzWAgifkjik9AySNqIyNoYwmR+uecPwwD/XRNfvOjmC/FjCxpiUGDkDVDphPfCUecSQVFw+lN3M3kQ==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.4.tgz", + "integrity": "sha512-KnRanxnpfpjUTqTCXslZSEdLfXExwgNxYPdiO2WGUj8+HDjFi8R3k5RVKPeSCzLjCcshCAtVO2QBbVuAV4kTnw==", "dev": true }, "node_modules/@types/chai-as-promised": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.4.tgz", - "integrity": "sha512-1y3L1cHePcIm5vXkh1DSGf/zQq5n5xDKG1fpCvf18+uOkpce0Z1ozNFPkyWsVswK7ntN1sZBw3oU6gmN+pDUcA==", + "version": "7.1.5", + "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.5.tgz", + "integrity": "sha512-jStwss93SITGBwt/niYrkf2C+/1KTeZCZl1LaeezTlqppAKeoQC7jxyqYuP72sxBGKCIbw7oHgbYssIRzT5FCQ==", "dev": true, "dependencies": { "@types/chai": "*" @@ -1111,12 +1112,12 @@ "dev": true }, "node_modules/@types/glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-w+LsMxKyYQm347Otw+IfBXOv9UWVjpHpCDdbBMt8Kz/xbvCYNjP+0qPh91Km3iKfSRLBB0P7fAMf0KHrPu+MyA==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-8.0.1.tgz", + "integrity": "sha512-8bVUjXZvJacUFkJXHdyZ9iH1Eaj5V7I8c4NdH5sQJsdXkqT4CA5Dhb4yb4VE/3asyx4L9ayZr1NIhTsWHczmMw==", "dev": true, "dependencies": { - "@types/minimatch": "*", + "@types/minimatch": "^5.1.2", "@types/node": "*" } }, @@ -1131,20 +1132,20 @@ } }, "node_modules/@types/gulp": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/@types/gulp/-/gulp-4.0.9.tgz", - "integrity": "sha512-zzT+wfQ8uwoXjDhRK9Zkmmk09/fbLLmN/yDHFizJiEKIve85qutOnXcP/TM2sKPBTU+Jc16vfPbOMkORMUBN7Q==", + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/@types/gulp/-/gulp-4.0.10.tgz", + "integrity": "sha512-spgZHJFqiEJGwqGlf7T/k4nkBpBcLgP7T0EfN6G2vvnhUfvd4uO1h8RwpXOE8x/54DVYUs1XCAtBHkX/R3axAQ==", "dev": true, "dependencies": { - "@types/undertaker": "*", + "@types/undertaker": ">=1.2.6", "@types/vinyl-fs": "*", "chokidar": "^3.3.1" } }, "node_modules/@types/gulp/node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "dependencies": { "normalize-path": "^3.0.0", @@ -1176,10 +1177,16 @@ } }, "node_modules/@types/gulp/node_modules/chokidar": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", - "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -1267,25 +1274,19 @@ "node": ">=8.0" } }, - "node_modules/@types/js-yaml": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.3.tgz", - "integrity": "sha512-5t9BhoORasuF5uCPr+d5/hdB++zRFUTMIZOzbNkr+jZh3yQht4HYbRDyj9fY8n2TZT30iW9huzav73x4NikqWg==", - "dev": true - }, "node_modules/@types/merge2": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@types/merge2/-/merge2-1.3.1.tgz", - "integrity": "sha512-aDA8WfZHU/J1OeQmrP+DfGrl1tb0cwNIuiiIqK3+S21gQ+aWg2n4OIvmFHpd2A4yQdZfjikC4XIYVNtX+b9qgg==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@types/merge2/-/merge2-1.4.0.tgz", + "integrity": "sha512-MRHDvln2ldZELrUC8n1PGaQzZ33aNh8uDcsGehREW0zR1Fr818a4/JTZjO9eloHPPxnpUp8fz/YFTRc5CWm7Xw==", "dev": true, "dependencies": { "@types/node": "*" } }, "node_modules/@types/minimatch": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", - "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-5.1.2.tgz", + "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", "dev": true }, "node_modules/@types/minimist": { @@ -1304,9 +1305,9 @@ } }, "node_modules/@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", + "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", "dev": true }, "node_modules/@types/ms": { @@ -1316,35 +1317,11 @@ "dev": true }, "node_modules/@types/node": { - "version": "14.17.20", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.20.tgz", - "integrity": "sha512-gI5Sl30tmhXsqkNvopFydP7ASc4c2cLfGNQrVKN3X90ADFWFsPEsotm/8JHSUJQKTHbwowAHtcJPeyVhtKv0TQ==", + "version": "18.13.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.13.0.tgz", + "integrity": "sha512-gC3TazRzGoOnoKAhUx+Q0t8S9Tzs74z7m0ipwGpSqQrleP14hKxP4/JUeEQcD3W1/aIpnWl8pHowI7WokuZpXg==", "dev": true }, - "node_modules/@types/node-fetch": { - "version": "2.5.12", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz", - "integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==", - "dev": true, - "dependencies": { - "@types/node": "*", - "form-data": "^3.0.0" - } - }, - "node_modules/@types/node-fetch/node_modules/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/@types/normalize-package-data": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", @@ -1352,9 +1329,9 @@ "dev": true }, "node_modules/@types/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-F3OznnSLAUxFrCEu/L5PY8+ny8DtcFRjx7fZZ9bycvXRi3KPTRS9HOitGZwvPg0juRhXFWIeKX58cnX5YqLohQ==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@types/rimraf/-/rimraf-2.0.5.tgz", + "integrity": "sha512-YyP+VfeaqAyFmXoTh3HChxOQMyjByRMsHU7kc5KOJkSlXudhMhQIALbYV7rHh/l8d2lX3VUQzprrcAgWdRuU8g==", "dev": true, "dependencies": { "@types/glob": "*", @@ -1371,51 +1348,33 @@ } }, "node_modules/@types/sinon": { - "version": "9.0.11", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-9.0.11.tgz", - "integrity": "sha512-PwP4UY33SeeVKodNE37ZlOsR9cReypbMJOhZ7BVE0lB+Hix3efCOxiJWiE5Ia+yL9Cn2Ch72EjFTRze8RZsNtg==", + "version": "10.0.13", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.13.tgz", + "integrity": "sha512-UVjDqJblVNQYvVNUsj0PuYYw0ELRmgt1Nt5Vk0pT5f16ROGfcKJY8o1HVuMOJOpD727RrGB9EGvoaTQE5tgxZQ==", "dev": true, "dependencies": { "@types/sinonjs__fake-timers": "*" } }, "node_modules/@types/sinonjs__fake-timers": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.4.tgz", - "integrity": "sha512-IFQTJARgMUBF+xVd2b+hIgXWrZEjND3vJtRCvIelcFB5SIXfjV4bOHbHJ0eXKh+0COrBRc8MqteKAz/j88rE0A==", + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.2.tgz", + "integrity": "sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA==", "dev": true }, "node_modules/@types/source-map-support": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@types/source-map-support/-/source-map-support-0.5.4.tgz", - "integrity": "sha512-9zGujX1sOPg32XLyfgEB/0G9ZnrjthL/Iv1ZfuAjj8LEilHZEpQSQs1scpRXPhHzGYgWiLz9ldF1cI8JhL+yMw==", + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/@types/source-map-support/-/source-map-support-0.5.6.tgz", + "integrity": "sha512-b2nJ9YyXmkhGaa2b8VLM0kJ04xxwNyijcq12/kDoomCt43qbHBeK2SLNJ9iJmETaAj+bKUT05PQUu3Q66GvLhQ==", "dev": true, "dependencies": { "source-map": "^0.6.0" } }, - "node_modules/@types/stoppable": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/stoppable/-/stoppable-1.1.1.tgz", - "integrity": "sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/tunnel": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@types/tunnel/-/tunnel-0.0.3.tgz", - "integrity": "sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/undertaker": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@types/undertaker/-/undertaker-1.2.7.tgz", - "integrity": "sha512-xuY7nBwo1zSRoY2aitp/HArHfTulFAKql2Fr4b4mWbBBP+F50n7Jm6nwISTTMaDk2xvl92O10TTejVF0Q9mInw==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@types/undertaker/-/undertaker-1.2.8.tgz", + "integrity": "sha512-gW3PRqCHYpo45XFQHJBhch7L6hytPsIe0QeLujlnFsjHPnXLhJcPdN6a9368d7aIQgH2I/dUTPFBlGeSNA3qOg==", "dev": true, "dependencies": { "@types/node": "*", @@ -1430,15 +1389,15 @@ "dev": true }, "node_modules/@types/uuid": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", - "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-kr90f+ERiQtKWMz5rP32ltJ/BtULDI5RVO0uavn1HQUOwjx0R1h0rnDYNL0CepF1zL5bSY6FISAfd9tOdDhU5Q==", "dev": true }, "node_modules/@types/vinyl": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.6.tgz", - "integrity": "sha512-ayJ0iOCDNHnKpKTgBG6Q6JOnHTj9zFta+3j2b8Ejza0e4cvRyMn0ZoLEmbPrTHe5YYRlDYPvPWVdV4cTaRyH7g==", + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.7.tgz", + "integrity": "sha512-4UqPv+2567NhMQuMLdKAyK4yzrfCqwaTt6bLhHEs8PFcxbHILsrxaY63n4wgE/BRLDWDQeI+WcTmkXKExh9hQg==", "dev": true, "dependencies": { "@types/expect": "^1.20.4", @@ -1446,38 +1405,46 @@ } }, "node_modules/@types/vinyl-fs": { - "version": "2.4.12", - "resolved": "https://registry.npmjs.org/@types/vinyl-fs/-/vinyl-fs-2.4.12.tgz", - "integrity": "sha512-LgBpYIWuuGsihnlF+OOWWz4ovwCYlT03gd3DuLwex50cYZLmX3yrW+sFF9ndtmh7zcZpS6Ri47PrIu+fV+sbXw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/vinyl-fs/-/vinyl-fs-3.0.1.tgz", + "integrity": "sha512-me2Gcxw23pZp62oqPoiTDDMz/txEmtEZzXM/D/VTr+xUX4LiNA+nQPs38SSPu5KHnsaEER4HEtzWU5qJRXigfA==", "dev": true, "dependencies": { "@types/glob-stream": "*", "@types/node": "*", + "@types/rimraf": "^2.0.3", "@types/vinyl": "*" } }, - "node_modules/@types/xml2js": { - "version": "0.4.9", - "resolved": "https://registry.npmjs.org/@types/xml2js/-/xml2js-0.4.9.tgz", - "integrity": "sha512-CHiCKIihl1pychwR2RNX5mAYmJDACgFVCMT5OArMaO3erzwXVcBqPcusr+Vl8yeeXukxZqtF8mZioqX+mpjjdw==", + "node_modules/@types/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-xTE1E+YF4aWPJJeUzaZI5DRntlkY3+BCVJi0axFptnjGmAoWxkyREIh/XMrfxVLejwQxMCfDXdICo0VLxThrog==", + "dev": true + }, + "node_modules/@types/whatwg-url": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.2.tgz", + "integrity": "sha512-FtQu10RWgn3D9U4aazdwIE2yzphmTJREDqNdODHrbrZmmMqI0vMheC/6NE/J1Yveaj8H+ela+YwWTjq5PGmuhA==", "dev": true, "dependencies": { - "@types/node": "*" + "@types/node": "*", + "@types/webidl-conversions": "*" } }, "node_modules/@types/yargs": { - "version": "17.0.3", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.3.tgz", - "integrity": "sha512-K7rm3Ke3ag/pAniBe80A6J6fjoqRibvCrl3dRmtXV9eCEt9h/pZwmHX9MzjQVUc/elneQTL4Ky7XKorC71Lmxw==", + "version": "17.0.22", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.22.tgz", + "integrity": "sha512-pet5WJ9U8yPVRhkwuEIp5ktAeAqRZOq4UdAyWLWzxbtpyXnzbtLdKiXAjJzi/KLmPGS9wk86lUFWZFN6sISo4g==", "dev": true, "dependencies": { "@types/yargs-parser": "*" } }, "node_modules/@types/yargs-parser": { - "version": "20.2.1", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz", - "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==", + "version": "21.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", + "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", "dev": true }, "node_modules/@ungap/promise-all-settled": { @@ -1486,37 +1453,16 @@ "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", "dev": true }, - "node_modules/@xmldom/xmldom": { - "version": "0.7.8", - "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.8.tgz", - "integrity": "sha512-PrJx38EfpitFhwmILRl37jAdBlsww6AZ6rRVK4QS7T7RHLhX7mSs647sTmgr9GIxe3qjXdesmomEgbgaokrVFg==", - "dev": true, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/abbrev": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", + "integrity": "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==", "dev": true }, - "node_modules/abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "dev": true, - "dependencies": { - "event-target-shim": "^5.0.0" - }, - "engines": { - "node": ">=6.5" - } - }, "node_modules/acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1534,112 +1480,43 @@ "node": ">=0.4.0" } }, - "node_modules/adal-node": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/adal-node/-/adal-node-0.2.3.tgz", - "integrity": "sha512-gMKr8RuYEYvsj7jyfCv/4BfKToQThz20SP71N3AtFn3ia3yAR8Qt2T3aVQhuJzunWs2b38ZsQV0qsZPdwZr7VQ==", + "node_modules/add-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/add-stream/-/add-stream-1.0.0.tgz", + "integrity": "sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ==", + "dev": true + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", "dev": true, "dependencies": { - "@xmldom/xmldom": "^0.7.0", - "async": "^2.6.3", - "axios": "^0.21.1", - "date-utils": "*", - "jws": "3.x.x", - "underscore": ">= 1.3.1", - "uuid": "^3.1.0", - "xpath.js": "~1.1.0" + "debug": "4" }, "engines": { - "node": ">= 0.6.15" + "node": ">= 6.0.0" } }, - "node_modules/adal-node/node_modules/async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "node_modules/agentkeepalive": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", + "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", "dev": true, + "optional": true, "dependencies": { - "lodash": "^4.17.14" + "debug": "^4.1.0", + "depd": "^1.1.2", + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" } }, - "node_modules/adal-node/node_modules/jwa": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", - "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", - "dev": true, - "dependencies": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/adal-node/node_modules/jws": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", - "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", - "dev": true, - "dependencies": { - "jwa": "^1.4.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/adal-node/node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true, - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/add-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/add-stream/-/add-stream-1.0.0.tgz", - "integrity": "sha1-anmQQ3ynNtXhKI25K9MmbV9csqo=", - "dev": true - }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/agentkeepalive": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", - "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", - "dev": true, - "optional": true, - "dependencies": { - "debug": "^4.1.0", - "depd": "^1.1.2", - "humanize-ms": "^1.2.1" - }, - "engines": { - "node": ">= 8.0.0" - } - }, - "node_modules/agentkeepalive/node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "dev": true, - "optional": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", "dev": true, "dependencies": { "clean-stack": "^2.0.0", @@ -1652,7 +1529,7 @@ "node_modules/amdefine": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", "dev": true, "optional": true, "engines": { @@ -1660,18 +1537,21 @@ } }, "node_modules/ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", "dev": true, + "dependencies": { + "ansi-wrap": "^0.1.0" + }, "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, "node_modules/ansi-cyan": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz", - "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=", + "integrity": "sha512-eCjan3AVo/SxZ0/MyIYRtkpxIu/H3xZN7URr1vXVrISxeyz8fUFz0FJziamK4sS8I+t35y4rHg1b2PklyBe/7A==", "dev": true, "dependencies": { "ansi-wrap": "0.1.0" @@ -1683,7 +1563,7 @@ "node_modules/ansi-gray": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", - "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", + "integrity": "sha512-HrgGIZUl8h2EHuZaU9hTR/cU5nhKxpVE1V6kdGsQ8e4zirElJ5fvtfc8N7Q1oq1aatO275i8pUFUCpNWCAnVWw==", "dev": true, "dependencies": { "ansi-wrap": "0.1.0" @@ -1695,7 +1575,7 @@ "node_modules/ansi-red": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", - "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", + "integrity": "sha512-ewaIr5y+9CUTGFwZfpECUbFlGcC0GCw1oqR9RI6h1gQCd9Aj2GxSckCnPsVJnmfMZbwFYE+leZGASgkWl06Jow==", "dev": true, "dependencies": { "ansi-wrap": "0.1.0" @@ -1729,7 +1609,7 @@ "node_modules/ansi-wrap": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", - "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "integrity": "sha512-ZyznvL8k/FZeQHr2T6LzcJ/+vBApDnMNZvfVFy3At0knswWd6rJ3/0Hhmpu8oqa6C92npmozs890sX9Dl6q+Qw==", "dev": true, "engines": { "node": ">=0.10.0" @@ -1738,7 +1618,7 @@ "node_modules/any-promise": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=" + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==" }, "node_modules/anymatch": { "version": "2.0.0", @@ -1750,6 +1630,15 @@ "normalize-path": "^2.1.1" } }, + "node_modules/anymatch/node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/anymatch/node_modules/define-property": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", @@ -1766,7 +1655,7 @@ "node_modules/anymatch/node_modules/extend-shallow": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", "dev": true, "dependencies": { "assign-symbols": "^1.0.0", @@ -1874,7 +1763,7 @@ "node_modules/anymatch/node_modules/normalize-path": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", "dev": true, "dependencies": { "remove-trailing-separator": "^1.0.1" @@ -1884,9 +1773,9 @@ } }, "node_modules/app-root-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.0.0.tgz", - "integrity": "sha512-qMcx+Gy2UZynHjOHOIXPNvpf+9cjvk3cWrBBK7zg4gH9+clobJRb9NGzcT7mQTcV/6Gm/1WelUtqxVXnNlrwcw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.1.0.tgz", + "integrity": "sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA==", "engines": { "node": ">= 6.0.0" } @@ -1894,7 +1783,7 @@ "node_modules/append-buffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", - "integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=", + "integrity": "sha512-WLbYiXzD3y/ATLZFufV/rZvWdZOs+Z/+5v1rBZ463Jn398pa6kcde27cvozYnBoxXblGZTFfoPpsaEw0orU5BA==", "dev": true, "dependencies": { "buffer-equal": "^1.0.0" @@ -1904,25 +1793,42 @@ } }, "node_modules/aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", "dev": true }, "node_modules/archy": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", "dev": true }, "node_modules/are-we-there-yet": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", - "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", + "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", "dev": true, "dependencies": { "delegates": "^1.0.0", - "readable-stream": "^2.0.6" + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/are-we-there-yet/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" } }, "node_modules/arg": { @@ -1934,12 +1840,26 @@ "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "node_modules/arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", + "integrity": "sha512-OQwDZUqYaQwyyhDJHThmzId8daf4/RFNLaeh3AevmSeZ5Y7ug4Ga/yKc6l6kTZOBW781rCj103ZuTh8GAsB3+Q==", + "dev": true, + "dependencies": { + "arr-flatten": "^1.0.1", + "array-slice": "^0.2.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-diff/node_modules/array-slice": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", + "integrity": "sha512-rlVfZW/1Ph2SNySXwR9QYkChp8EkOEiTMO5Vwx60usw04i4nWemkm9RXmQqgkQFaLHsqLuADvjp6IfgL9l2M8Q==", "dev": true, "engines": { "node": ">=0.10.0" @@ -1948,7 +1868,7 @@ "node_modules/arr-filter": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz", - "integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=", + "integrity": "sha512-A2BETWCqhsecSvCkWAeVBFLH6sXEUGASuzkpjL3GR1SlL/PWL6M3J8EAAld2Uubmh39tvkJTqC9LeLHCUKmFXA==", "dev": true, "dependencies": { "make-iterator": "^1.0.0" @@ -1969,7 +1889,7 @@ "node_modules/arr-map": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz", - "integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=", + "integrity": "sha512-tVqVTHt+Q5Xb09qRkbu+DidW1yYzz5izWS2Xm2yFm7qJnmUfz4HPzNxbHkdRJbz2lrqI7S+z17xNYdFcBBO8Hw==", "dev": true, "dependencies": { "make-iterator": "^1.0.0" @@ -1979,9 +1899,9 @@ } }, "node_modules/arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", + "integrity": "sha512-t5db90jq+qdgk8aFnxEkjqta0B/GHrM1pxzuuZz2zWsOXc5nKu3t+76s/PQBA8FTcM/ipspIH9jWG4OxCBc2eA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -1990,7 +1910,7 @@ "node_modules/array-each": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", - "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", + "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -1999,13 +1919,13 @@ "node_modules/array-ify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", - "integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=", + "integrity": "sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==", "dev": true }, "node_modules/array-initial": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", - "integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U=", + "integrity": "sha512-BC4Yl89vneCYfpLrs5JU2aAu9/a+xWbeKhvISg9PT7eWFB9UlRvI+rKEtk6mgxWr3dSkk9gQ8hCrdqt06NXPdw==", "dev": true, "dependencies": { "array-slice": "^1.0.0", @@ -2080,7 +2000,7 @@ "node_modules/array-unique": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "integrity": "sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==", "dev": true, "engines": { "node": ">=0.10.0" @@ -2089,7 +2009,7 @@ "node_modules/arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -2107,7 +2027,7 @@ "node_modules/assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "integrity": "sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==", "dev": true, "engines": { "node": ">=0.10.0" @@ -2116,7 +2036,7 @@ "node_modules/async": { "version": "1.5.2", "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", "dev": true }, "node_modules/async-done": { @@ -2135,15 +2055,21 @@ } }, "node_modules/async-each": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", - "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", - "dev": true + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.6.tgz", + "integrity": "sha512-c646jH1avxr+aVpndVMeAfYw7wAa6idufrlN3LPA4PmKS0QEGp6PIC9nwz0WQkkvBGAMEki3pFdtxaF39J9vvg==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ] }, "node_modules/async-settle": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz", - "integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs=", + "integrity": "sha512-VPXfB4Vk49z1LHHodrEQ6Xf7W4gg1w0dAPROHngx7qgDjqmIQ+fXmwgGXTW/ITLai0YLSvWepJOP9EVpMnEAcw==", "dev": true, "dependencies": { "async-done": "^1.2.2" @@ -2155,7 +2081,7 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, "node_modules/atob": { @@ -2170,19 +2096,22 @@ "node": ">= 4.5.0" } }, - "node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", "dev": true, - "dependencies": { - "follow-redirects": "^1.14.0" + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/bach": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz", - "integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA=", + "integrity": "sha512-bZOOfCb3gXBXbTFXq3OZtGR88LwGeJvzu6szttaIzymOTS4ZttBNOWSv7aLZja2EMycKtRYV0Oa8SNKH/zkxvg==", "dev": true, "dependencies": { "arr-filter": "^1.1.1", @@ -2225,7 +2154,7 @@ "node_modules/base/node_modules/define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", "dev": true, "dependencies": { "is-descriptor": "^1.0.0" @@ -2301,15 +2230,14 @@ ] }, "node_modules/better-sqlite3": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-7.4.3.tgz", - "integrity": "sha512-07bKjClZg/f4KMVRkzWtoIvazVPcF1gsvVKVIXlxwleC2DxuIhnra3KCMlUT1rFeRYXXckot2a46UciF2d9KLw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-8.1.0.tgz", + "integrity": "sha512-p1m09H+Oi8R9TPj810pdNswMFuVgRNgCJEWypp6jlkOgSwMIrNyuj3hW78xEuBRGok5RzeaUW8aBtTWF3l/TQA==", "dev": true, "hasInstallScript": true, "dependencies": { "bindings": "^1.5.0", - "prebuild-install": "^6.0.1", - "tar": "^6.1.0" + "prebuild-install": "^7.1.0" } }, "node_modules/bignumber.js": { @@ -2351,23 +2279,12 @@ "file-uri-to-path": "1.0.0" } }, - "node_modules/bl": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", - "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", - "dev": true, - "dependencies": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - } - }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "balanced-match": "^1.0.0" } }, "node_modules/braces": { @@ -2398,12 +2315,12 @@ "dev": true }, "node_modules/bson": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.6.tgz", - "integrity": "sha512-EvVNVeGo4tHxwi8L6bPj3y3itEvStdwvvlojVxxbyYfoaxJ6keLgrTuKdyfEAszFK+H3olzBuafE0yoh0D1gdg==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-5.2.0.tgz", + "integrity": "sha512-HevkSpDbpUfsrHWmWiAsNavANKYIErV2ePXllp1bwq5CDreAaFVj6RVlZpJnxK4WWDCJ/5jMUpaY6G526q3Hjg==", "dev": true, "engines": { - "node": ">=0.6.19" + "node": ">=14.20.1" } }, "node_modules/buffer": { @@ -2430,18 +2347,21 @@ } }, "node_modules/buffer-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", - "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.1.tgz", + "integrity": "sha512-QoV3ptgEaQpvVwbXdSO39iqPQTCxSF7A5U99AxbHYqUdCizL/lH2Z0A2y6nbZucxMEOtNyZfG2s6gsVugGpKkg==", "dev": true, "engines": { - "node": ">=0.4.0" + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/buffer-equal-constant-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==", "dev": true }, "node_modules/buffer-from": { @@ -2489,6 +2409,80 @@ "node": ">= 10" } }, + "node_modules/cacache/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "optional": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/cacache/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "optional": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/cacache/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "optional": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/cacache/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "optional": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/cacache/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "optional": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", @@ -2549,15 +2543,16 @@ } }, "node_modules/chai": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", - "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", + "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==", "dev": true, "dependencies": { "assertion-error": "^1.1.0", "check-error": "^1.0.2", - "deep-eql": "^3.0.1", + "deep-eql": "^4.1.2", "get-func-name": "^2.0.0", + "loupe": "^2.3.1", "pathval": "^1.1.1", "type-detect": "^4.0.5" }, @@ -2595,7 +2590,7 @@ "node_modules/check-error": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", "dev": true, "engines": { "node": "*" @@ -2605,7 +2600,7 @@ "version": "2.1.8", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", - "deprecated": "Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.", + "deprecated": "Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies", "dev": true, "dependencies": { "anymatch": "^2.0.0", @@ -2627,7 +2622,7 @@ "node_modules/chokidar/node_modules/glob-parent": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", "dev": true, "dependencies": { "is-glob": "^3.1.0", @@ -2637,7 +2632,7 @@ "node_modules/chokidar/node_modules/glob-parent/node_modules/is-glob": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", "dev": true, "dependencies": { "is-extglob": "^2.1.0" @@ -2656,9 +2651,9 @@ } }, "node_modules/class-transformer": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/class-transformer/-/class-transformer-0.4.0.tgz", - "integrity": "sha512-ETWD/H2TbWbKEi7m9N4Km5+cw1hNcqJSxlSYhsLsNjQzWWiZIYA1zafxpK9PwVfaZ6AqR5rrjPVUBGESm5tQUA==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/class-transformer/-/class-transformer-0.5.1.tgz", + "integrity": "sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw==", "dev": true }, "node_modules/class-utils": { @@ -2676,6 +2671,15 @@ "node": ">=0.10.0" } }, + "node_modules/class-utils/node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -2705,6 +2709,16 @@ "npm": ">=5.0.0" } }, + "node_modules/cli-highlight/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, "node_modules/cli-highlight/node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -2722,20 +2736,31 @@ "node": ">=10" } }, + "node_modules/cli-highlight/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "engines": { + "node": ">=10" + } + }, "node_modules/cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dependencies": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", + "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" } }, "node_modules/clone": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", "dev": true, "engines": { "node": ">=0.8" @@ -2744,7 +2769,7 @@ "node_modules/clone-buffer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", - "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", + "integrity": "sha512-KLLTJWrvwIP+OPfMn0x2PheDEP20RPUcGXj/ERegTgdmPEZylALQldygiqrPPu8P45uNuPs7ckmReLY6v/iA5g==", "dev": true, "engines": { "node": ">= 0.10" @@ -2753,7 +2778,7 @@ "node_modules/clone-stats": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", - "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "integrity": "sha512-au6ydSpg6nsrigcZ4m8Bc9hxjeW+GJ8xh5G3BJCMt4WXe1H10UNaVOamqQTmrx1kjVuxAHIQSNU6hY4Nsn9/ag==", "dev": true }, "node_modules/cloneable-readable": { @@ -2767,10 +2792,19 @@ "readable-stream": "^2.3.5" } }, + "node_modules/cluster-key-slot": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz", + "integrity": "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -2779,7 +2813,7 @@ "node_modules/collection-map": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz", - "integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw=", + "integrity": "sha512-5D2XXSpkOnleOI21TG7p3T0bGAsZ/XknZpKBmGYyluO8pw4zA3K8ZlrBIbC4FXg3m6z/RNFiUFfT2sQK01+UHA==", "dev": true, "dependencies": { "arr-map": "^2.0.2", @@ -2793,7 +2827,7 @@ "node_modules/collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "integrity": "sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==", "dev": true, "dependencies": { "map-visit": "^1.0.0", @@ -2840,6 +2874,15 @@ "node": ">= 0.8" } }, + "node_modules/commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || >=14" + } + }, "node_modules/compare-func": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz", @@ -2859,7 +2902,8 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true }, "node_modules/concat-stream": { "version": "1.6.2", @@ -2879,13 +2923,13 @@ "node_modules/console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", "dev": true }, "node_modules/conventional-changelog": { - "version": "3.1.24", - "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.24.tgz", - "integrity": "sha512-ed6k8PO00UVvhExYohroVPXcOJ/K1N0/drJHx/faTH37OIZthlecuLIRX/T6uOp682CAoVoFpu+sSEaeuH6Asg==", + "version": "3.1.25", + "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.25.tgz", + "integrity": "sha512-ryhi3fd1mKf3fSjbLXOfK2D06YwKNic1nC9mWqybBHdObPd8KJ2vjaXZfYj1U23t+V8T8n0d7gwnc9XbIdFbyQ==", "dev": true, "dependencies": { "conventional-changelog-angular": "^5.0.12", @@ -2930,9 +2974,9 @@ } }, "node_modules/conventional-changelog-cli": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-2.1.1.tgz", - "integrity": "sha512-xMGQdKJ+4XFDDgfX5aK7UNFduvJMbvF5BB+g0OdVhA3rYdYyhctrIE2Al+WYdZeKTdg9YzMWF2iFPT8MupIwng==", + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-2.2.2.tgz", + "integrity": "sha512-8grMV5Jo8S0kP3yoMeJxV2P5R6VJOqK72IiSV9t/4H5r/HiRqEBQ83bYGuz4Yzfdj4bjaAEhZN/FFbsFXr5bOA==", "dev": true, "dependencies": { "add-stream": "^1.0.0", @@ -2961,9 +3005,9 @@ } }, "node_modules/conventional-changelog-conventionalcommits": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.6.1.tgz", - "integrity": "sha512-lzWJpPZhbM1R0PIzkwzGBCnAkH5RKJzJfFQZcl/D+2lsJxAwGnDKBqn/F4C1RD31GJNn8NuKWQzAZDAVXPp2Mw==", + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.6.3.tgz", + "integrity": "sha512-LTTQV4fwOM4oLPad317V/QNQ1FY4Hju5qeBIM1uTHbrnCE+Eg4CdRZ3gO2pUeR+tzWdp80M2j3qFFEDWVqOV4g==", "dev": true, "dependencies": { "compare-func": "^2.0.0", @@ -3070,14 +3114,14 @@ } }, "node_modules/conventional-changelog-writer": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-5.0.0.tgz", - "integrity": "sha512-HnDh9QHLNWfL6E1uHz6krZEQOgm8hN7z/m7tT16xwd802fwgMN0Wqd7AQYVkhpsjDUx/99oo+nGgvKF657XP5g==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-5.0.1.tgz", + "integrity": "sha512-5WsuKUfxW7suLblAbFnxAcrvf6r+0b7GvNaWUwUIk0bXMnENP/PEieGKVUQrjPqwPT4o3EPAASBXiY6iHooLOQ==", "dev": true, "dependencies": { "conventional-commits-filter": "^2.0.7", "dateformat": "^3.0.0", - "handlebars": "^4.7.6", + "handlebars": "^4.7.7", "json-stringify-safe": "^5.0.1", "lodash": "^4.17.15", "meow": "^8.0.0", @@ -3092,15 +3136,6 @@ "node": ">=10" } }, - "node_modules/conventional-changelog-writer/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/conventional-commits-filter": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz", @@ -3115,9 +3150,9 @@ } }, "node_modules/conventional-commits-parser": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.2.2.tgz", - "integrity": "sha512-Jr9KAKgqAkwXMRHjxDwO/zOCDKod1XdAESHAGuJX38iZ7ZzVti/tvVoysO0suMsdAObp9NQ2rHSsSbnAqZ5f5g==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.2.4.tgz", + "integrity": "sha512-nK7sAtfi+QXbxHCYfhpZsfRtaitZLIA6889kFIouLvz6repszQDgxBu7wf2WbU+Dco7sAnNCJYERCwt54WPC2Q==", "dev": true, "dependencies": { "is-text-path": "^1.0.1", @@ -3135,18 +3170,15 @@ } }, "node_modules/convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.1" - } + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true }, "node_modules/copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "integrity": "sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==", "dev": true, "engines": { "node": ">=0.10.0" @@ -3219,27 +3251,27 @@ } }, "node_modules/data-api-client": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/data-api-client/-/data-api-client-1.2.0.tgz", - "integrity": "sha512-AGv4lWOF4RyoqUOLrYWbZeIP7eyFCM2UxGJ92XG9Q0xHofrT/67plprl0mAsxpAYdWQ8u0hLZFxC+iQSASsjgQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/data-api-client/-/data-api-client-1.3.0.tgz", + "integrity": "sha512-+Q+lChhl5PBogsB7nO/VZFF3X0WJe8y93dyft50HIg2Bg+c765wM/sXkfBz5pjmGoRESkB/GLesQJLTMBbK4dQ==", "dev": true, "dependencies": { "sqlstring": "^2.3.2" } }, "node_modules/data-api-client/node_modules/sqlstring": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.2.tgz", - "integrity": "sha512-vF4ZbYdKS8OnoJAWBmMxCQDkiEBkGQYU7UZPtL8flbDRSNkhaXvRJ279ZtI6M+zDaQovVU4tuRgzK5fVhvFAhg==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", + "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", "dev": true, "engines": { "node": ">= 0.6" } }, "node_modules/date-fns": { - "version": "2.28.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.28.0.tgz", - "integrity": "sha512-8d35hViGYx/QH0icHYCeLmsLmMUheMmTyV9Fcm6gvNwdw31yXXH+O85sOBJ+OLnLQMKZowvpKb6FgMIQjcpvQw==", + "version": "2.29.3", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.3.tgz", + "integrity": "sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA==", "engines": { "node": ">=0.11" }, @@ -3248,15 +3280,6 @@ "url": "https://opencollective.com/date-fns" } }, - "node_modules/date-utils": { - "version": "1.2.21", - "resolved": "https://registry.npmjs.org/date-utils/-/date-utils-1.2.21.tgz", - "integrity": "sha1-YfsWzcEnSzyayq/+n8ad+HIKK2Q=", - "dev": true, - "engines": { - "node": ">0.4.0" - } - }, "node_modules/dateformat": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", @@ -3267,9 +3290,9 @@ } }, "node_modules/debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dependencies": { "ms": "2.1.2" }, @@ -3305,16 +3328,16 @@ "node_modules/decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/decamelize-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", - "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", + "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", "dev": true, "dependencies": { "decamelize": "^1.1.0", @@ -3322,48 +3345,54 @@ }, "engines": { "node": ">=0.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/decamelize-keys/node_modules/map-obj": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", "dev": true, "engines": { "node": ">=0.10" } }, "node_modules/decompress-response": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", - "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", "dev": true, "dependencies": { - "mimic-response": "^2.0.0" + "mimic-response": "^3.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", "dev": true, "dependencies": { "type-detect": "^4.0.0" }, "engines": { - "node": ">=0.12" + "node": ">=6" } }, "node_modules/deep-extend": { @@ -3396,28 +3425,41 @@ "node_modules/default-resolution": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/default-resolution/-/default-resolution-2.0.0.tgz", - "integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ=", + "integrity": "sha512-2xaP6GiwVwOEbXCGoJ4ufgC76m8cj805jrghScewJC2ZDsb9U0b4BIrba+xt/Uytyd0HvQ6+WymSRTfnYj59GQ==", "dev": true, "engines": { "node": ">= 0.10" } }, + "node_modules/define-lazy-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", + "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/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==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.4.tgz", + "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", "dev": true, "dependencies": { - "object-keys": "^1.0.12" + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "integrity": "sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==", "dev": true, "dependencies": { "is-descriptor": "^0.1.0" @@ -3427,9 +3469,9 @@ } }, "node_modules/del": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-6.0.0.tgz", - "integrity": "sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz", + "integrity": "sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==", "dev": true, "dependencies": { "globby": "^11.0.1", @@ -3448,10 +3490,67 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/del/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/del/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/del/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/del/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true, "engines": { "node": ">=0.4.0" @@ -3460,52 +3559,41 @@ "node_modules/delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", "dev": true }, - "node_modules/denque": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.1.tgz", - "integrity": "sha512-XwE+iZ4D6ZUB7mfYRMb5wByE8L74HCn30FBN7sWnXksWc1LO1bPDl67pBR9o/kC4z/xSNAwkMYcGgqDV3BE3Hw==", - "dev": true, - "engines": { - "node": ">=0.10" - } - }, "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", "dev": true, + "optional": true, "engines": { - "node": ">= 0.8" + "node": ">= 0.6" } }, "node_modules/detect-file": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", + "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", + "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", "dev": true, - "bin": { - "detect-libc": "bin/detect-libc.js" - }, "engines": { - "node": ">=0.10" + "node": ">=8" } }, "node_modules/detect-newline": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", - "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=", + "integrity": "sha512-CwffZFvlJffUg9zZA0uqrjQayUTC8ob94pnr5sFwaVv3IOmkfUHcWH+jXaQK3askE51Cqe8/9Ql/0uXNwqZ8Zg==", "dev": true, "engines": { "node": ">=0.10.0" @@ -3545,9 +3633,9 @@ } }, "node_modules/dotenv": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.0.tgz", - "integrity": "sha512-qD9WU0MPM4SWLPJy/r2Be+2WgQj8plChsyrCNQzW/0WjvcJQiKQJ9mH3ZgB3fxbUUxgc/11ZJ0Fi5KiimWGz2Q==", + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz", + "integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==", "engines": { "node": ">=12" } @@ -3645,27 +3733,124 @@ "is-arrayish": "^0.2.1" } }, - "node_modules/es5-ext": { - "version": "0.10.53", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", - "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", + "node_modules/es-abstract": { + "version": "1.21.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.21.1.tgz", + "integrity": "sha512-QudMsPOz86xYz/1dG1OuGBKOELjCh99IIWHLzy5znUB6j8xG2yMA7bfTV86VSqKF+Y/H08vQPR+9jyXpuC6hfg==", "dev": true, "dependencies": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.3", - "next-tick": "~1.0.0" + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.1.3", + "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has": "^1.0.3", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.4", + "is-array-buffer": "^3.0.1", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.10", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.2", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "safe-regex-test": "^1.0.0", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.9" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es5-ext/node_modules/next-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", - "dev": true + "node_modules/es-aggregate-error": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/es-aggregate-error/-/es-aggregate-error-1.0.9.tgz", + "integrity": "sha512-fvnX40sb538wdU6r4s35cq4EY6Lr09Upj40BEVem4LEsuW8XgQep9yD5Q1U2KftokNp1rWODFJ2qwZSsAjFpbg==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "function-bind": "^1.1.1", + "functions-have-names": "^1.2.3", + "get-intrinsic": "^1.1.3", + "globalthis": "^1.0.3", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es5-ext": { + "version": "0.10.62", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", + "integrity": "sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.3", + "next-tick": "^1.1.0" + }, + "engines": { + "node": ">=0.10" + } }, "node_modules/es6-iterator": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "integrity": "sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==", "dev": true, "dependencies": { "d": "1", @@ -3718,7 +3903,7 @@ "node_modules/escodegen": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", + "integrity": "sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A==", "dev": true, "dependencies": { "esprima": "^2.7.1", @@ -3737,58 +3922,10 @@ "source-map": "~0.2.0" } }, - "node_modules/escodegen/node_modules/estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/escodegen/node_modules/levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dev": true, - "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/escodegen/node_modules/source-map": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", + "integrity": "sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA==", "dev": true, "optional": true, "dependencies": { @@ -3798,22 +3935,10 @@ "node": ">=0.8.0" } }, - "node_modules/escodegen/node_modules/type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "dependencies": { - "prelude-ls": "~1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/esprima": { "version": "2.7.3", "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", "dev": true, "bin": { "esparse": "bin/esparse.js", @@ -3823,6 +3948,15 @@ "node": ">=0.10.0" } }, + "node_modules/estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -3835,22 +3969,13 @@ "node_modules/event-emitter": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "integrity": "sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==", "dev": true, "dependencies": { "d": "1", "es5-ext": "~0.10.14" } }, - "node_modules/event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/events": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", @@ -3886,7 +4011,7 @@ "node_modules/expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "integrity": "sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==", "dev": true, "dependencies": { "debug": "^2.3.3", @@ -3913,7 +4038,7 @@ "node_modules/expand-brackets/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, "node_modules/expand-template": { @@ -3928,7 +4053,7 @@ "node_modules/expand-tilde": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", "dev": true, "dependencies": { "homedir-polyfill": "^1.0.1" @@ -3938,18 +4063,18 @@ } }, "node_modules/ext": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.6.0.tgz", - "integrity": "sha512-sdBImtzkq2HpkdRLtlLWDa6w4DX22ijZLKx8BMPUuKe1c5lbN6xwQDQCxSfxBQnHZ13ls/FH0MQZx/q/gr6FQg==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", + "integrity": "sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==", "dev": true, "dependencies": { - "type": "^2.5.0" + "type": "^2.7.2" } }, "node_modules/ext/node_modules/type": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", - "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==", + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", + "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==", "dev": true }, "node_modules/extend": { @@ -3961,7 +4086,7 @@ "node_modules/extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", "dev": true, "dependencies": { "is-extendable": "^0.1.0" @@ -3992,7 +4117,7 @@ "node_modules/extglob/node_modules/define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", "dev": true, "dependencies": { "is-descriptor": "^1.0.0" @@ -4064,9 +4189,9 @@ } }, "node_modules/fast-glob": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", - "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", + "version": "3.2.12", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", + "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -4076,19 +4201,19 @@ "micromatch": "^4.0.4" }, "engines": { - "node": ">=8" + "node": ">=8.6.0" } }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, "node_modules/fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -4103,7 +4228,7 @@ "node_modules/fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "integrity": "sha512-VcpLTWqWDiTerugjj8e3+esbg+skS3M9e54UuR3iCeIDMXCLTsAH8hTSzDQU/X6/6t3eYkOKoZSef2PlU6U1XQ==", "dev": true, "dependencies": { "extend-shallow": "^2.0.1", @@ -4146,6 +4271,15 @@ "node": ">= 0.10" } }, + "node_modules/findup-sync/node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/findup-sync/node_modules/define-property": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", @@ -4162,7 +4296,7 @@ "node_modules/findup-sync/node_modules/extend-shallow": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", "dev": true, "dependencies": { "assign-symbols": "^1.0.0", @@ -4323,30 +4457,19 @@ "readable-stream": "^2.3.6" } }, - "node_modules/follow-redirects": { - "version": "1.14.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", - "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==", + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } + "dependencies": { + "is-callable": "^1.1.3" } }, "node_modules/for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", "dev": true, "engines": { "node": ">=0.10.0" @@ -4355,7 +4478,7 @@ "node_modules/for-own": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", "dev": true, "dependencies": { "for-in": "^1.0.1" @@ -4364,10 +4487,24 @@ "node": ">=0.10.0" } }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "integrity": "sha512-GMBAbW9antB8iZRHLoGw0b3HANt57diZYFO/HL1JGIC1MjKrdmhxvrJbupnVvpys0zsz7yBApXdQyfepKly2kA==", "dev": true, "dependencies": { "map-cache": "^0.2.2" @@ -4397,7 +4534,7 @@ "node_modules/fs-mkdirp-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", - "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=", + "integrity": "sha512-+vSd9frUnapVC2RZYfL3FCB2p3g4TBhaUmrsWlSudsGdnxIuUvBB2QM1VZeBtc49QFwrp+wQLrDs3+xxDgI5gQ==", "dev": true, "dependencies": { "graceful-fs": "^4.1.11", @@ -4420,7 +4557,7 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, "node_modules/fsevents": { "version": "1.2.13", @@ -4447,67 +4584,51 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, - "node_modules/gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "dev": true, - "dependencies": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "node_modules/gauge/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gauge/node_modules/is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "node_modules/function.prototype.name": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz", + "integrity": "sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==", "dev": true, "dependencies": { - "number-is-nan": "^1.0.0" + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.0", + "functions-have-names": "^1.2.2" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/gauge/node_modules/string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", "dev": true, - "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/gauge/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "node_modules/gauge": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", + "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", "dev": true, "dependencies": { - "ansi-regex": "^2.0.0" + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.2", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.1", + "object-assign": "^4.1.1", + "signal-exit": "^3.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.2" }, "engines": { - "node": ">=0.10.0" + "node": ">=10" } }, "node_modules/generate-function": { @@ -4519,6 +4640,15 @@ "is-property": "^1.0.2" } }, + "node_modules/generic-pool": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/generic-pool/-/generic-pool-3.9.0.tgz", + "integrity": "sha512-hymDOu5B53XvN4QT9dBmZxPX4CWhBPPLguTZ9MMFeFa/Kg0xWVfylOVNlJji/E7yTZWFd/q9GO5TxDLq156D7g==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -4530,21 +4660,21 @@ "node_modules/get-func-name": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", "dev": true, "engines": { "node": "*" } }, "node_modules/get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz", + "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==", "dev": true, "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1" + "has-symbols": "^1.0.3" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4568,6 +4698,17 @@ "node": ">=6.9.0" } }, + "node_modules/get-pkg-repo/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, "node_modules/get-pkg-repo/node_modules/through2": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", @@ -4596,6 +4737,15 @@ "node": ">=10" } }, + "node_modules/get-pkg-repo/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -4608,19 +4758,35 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/get-symbol-description": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "integrity": "sha512-Ln0UQDlxH1BapMu3GPtf7CuYNwRZf2gwCuPqbyG6pB8WfmFpzqcy4xtAaAMUhnNqjMKTiCPZG2oMT3YSx8U2NA==", "dev": true, "engines": { "node": ">=0.10.0" } }, "node_modules/git-raw-commits": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.10.tgz", - "integrity": "sha512-sHhX5lsbG9SOO6yXdlwgEMQ/ljIn7qMpAbJZCGfXX2fq5T8M5SrDnpYk9/4HswTildcIqatsWa91vty6VhWSaQ==", + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.11.tgz", + "integrity": "sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A==", "dev": true, "dependencies": { "dargs": "^7.0.0", @@ -4639,7 +4805,7 @@ "node_modules/git-remote-origin-url": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz", - "integrity": "sha1-UoJlna4hBxRaERJhEq0yFuxfpl8=", + "integrity": "sha512-eU+GGrZgccNJcsDH5LkXR3PB9M958hxc7sbA8DFJjrv9j4L2P/eZfKhM+QD6wyzpiv+b1BpK0XrYCxkovtjSLw==", "dev": true, "dependencies": { "gitconfiglocal": "^1.0.0", @@ -4665,19 +4831,10 @@ "node": ">=10" } }, - "node_modules/git-semver-tags/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/gitconfiglocal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz", - "integrity": "sha1-QdBF84UaXqiPA/JMocYXgRRGS5s=", + "integrity": "sha512-spLUXeTAVHxDtKsJc8FkFVgFtMdEN9qPGpL23VfSHx4fP4+Ds097IXLvymbnDH8FnmxX5Nr9bPw3A+AQ6mWEaQ==", "dev": true, "dependencies": { "ini": "^1.3.2" @@ -4686,23 +4843,22 @@ "node_modules/github-from-package": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", "dev": true }, "node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": "*" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -4723,7 +4879,7 @@ "node_modules/glob-stream": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", - "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=", + "integrity": "sha512-uMbLGAP3S2aDOHUDfdoYcdIePUCfysbAd0IAoWVZbeGU/oNQ8asHVSshLDJUPWxfzj8zsCG7/XeHPHTtow0nsw==", "dev": true, "dependencies": { "extend": "^3.0.0", @@ -4741,10 +4897,40 @@ "node": ">= 0.10" } }, + "node_modules/glob-stream/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob-stream/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/glob-stream/node_modules/glob-parent": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==", "dev": true, "dependencies": { "is-glob": "^3.1.0", @@ -4754,7 +4940,7 @@ "node_modules/glob-stream/node_modules/is-glob": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", "dev": true, "dependencies": { "is-extglob": "^2.1.0" @@ -4763,6 +4949,18 @@ "node": ">=0.10.0" } }, + "node_modules/glob-stream/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/glob-watcher": { "version": "5.0.5", "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.5.tgz", @@ -4798,7 +4996,7 @@ "node_modules/global-prefix": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", "dev": true, "dependencies": { "expand-tilde": "^2.0.2", @@ -4823,17 +5021,32 @@ "which": "bin/which" } }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/globby": { - "version": "11.0.4", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", - "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", "slash": "^3.0.0" }, "engines": { @@ -4855,10 +5068,22 @@ "node": ">= 0.10" } }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, "node_modules/growl": { @@ -4920,18 +5145,6 @@ "node": ">= 0.10" } }, - "node_modules/gulp-cli/node_modules/ansi-colors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", - "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", - "dev": true, - "dependencies": { - "ansi-wrap": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/gulp-cli/node_modules/ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -4944,7 +5157,7 @@ "node_modules/gulp-cli/node_modules/camelcase": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==", "dev": true, "engines": { "node": ">=0.10.0" @@ -4953,7 +5166,7 @@ "node_modules/gulp-cli/node_modules/cliui": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "integrity": "sha512-0yayqDxWQbqk3ojkYqUKqaAQ6AfNKeKWRNA8kR0WXzAsdHpP4BIaOmMAG87JGuO6qcobyW4GjxHd9PmhEd+T9w==", "dev": true, "dependencies": { "string-width": "^1.0.1", @@ -4964,7 +5177,7 @@ "node_modules/gulp-cli/node_modules/find-up": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", "dev": true, "dependencies": { "path-exists": "^2.0.0", @@ -4989,7 +5202,7 @@ "node_modules/gulp-cli/node_modules/is-fullwidth-code-point": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", "dev": true, "dependencies": { "number-is-nan": "^1.0.0" @@ -5001,7 +5214,7 @@ "node_modules/gulp-cli/node_modules/load-json-file": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "integrity": "sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==", "dev": true, "dependencies": { "graceful-fs": "^4.1.2", @@ -5029,7 +5242,7 @@ "node_modules/gulp-cli/node_modules/parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", "dev": true, "dependencies": { "error-ex": "^1.2.0" @@ -5041,7 +5254,7 @@ "node_modules/gulp-cli/node_modules/path-exists": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", "dev": true, "dependencies": { "pinkie-promise": "^2.0.0" @@ -5053,7 +5266,7 @@ "node_modules/gulp-cli/node_modules/path-type": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "integrity": "sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", "dev": true, "dependencies": { "graceful-fs": "^4.1.2", @@ -5067,7 +5280,7 @@ "node_modules/gulp-cli/node_modules/read-pkg": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", "dev": true, "dependencies": { "load-json-file": "^1.0.0", @@ -5081,7 +5294,7 @@ "node_modules/gulp-cli/node_modules/read-pkg-up": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "integrity": "sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==", "dev": true, "dependencies": { "find-up": "^1.0.0", @@ -5092,13 +5305,17 @@ } }, "node_modules/gulp-cli/node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", "dev": true, "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5116,7 +5333,7 @@ "node_modules/gulp-cli/node_modules/string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", "dev": true, "dependencies": { "code-point-at": "^1.0.0", @@ -5130,7 +5347,7 @@ "node_modules/gulp-cli/node_modules/strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", "dev": true, "dependencies": { "ansi-regex": "^2.0.0" @@ -5142,7 +5359,7 @@ "node_modules/gulp-cli/node_modules/strip-bom": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "integrity": "sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==", "dev": true, "dependencies": { "is-utf8": "^0.2.0" @@ -5154,7 +5371,7 @@ "node_modules/gulp-cli/node_modules/wrap-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "integrity": "sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==", "dev": true, "dependencies": { "string-width": "^1.0.1", @@ -5215,88 +5432,20 @@ "vinyl-sourcemaps-apply": "^0.2.1" } }, - "node_modules/gulp-istanbul/node_modules/arr-diff": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", - "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", + "node_modules/gulp-istanbul/node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", "dev": true, "dependencies": { - "arr-flatten": "^1.0.1", - "array-slice": "^0.2.3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-istanbul/node_modules/arr-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", - "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-istanbul/node_modules/array-slice": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", - "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", - "dev": true, - "engines": { - "node": ">=0.10.0" + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" } }, - "node_modules/gulp-istanbul/node_modules/extend-shallow": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", - "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", - "dev": true, - "dependencies": { - "kind-of": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-istanbul/node_modules/kind-of": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", - "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-istanbul/node_modules/plugin-error": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", - "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", - "dev": true, - "dependencies": { - "ansi-cyan": "^0.1.1", - "ansi-red": "^0.1.1", - "arr-diff": "^1.0.1", - "arr-union": "^2.0.1", - "extend-shallow": "^1.1.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gulp-istanbul/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/gulp-mocha": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/gulp-mocha/-/gulp-mocha-8.0.0.tgz", - "integrity": "sha512-FdbBydfzszaES/gXfwD6RFq1yJTj4Z6328R1yqsmhf+t7hW2aj9ZD9Hz8boQShjZ9J8/w6tQBM5mePb8K2pbqA==", + "node_modules/gulp-mocha": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/gulp-mocha/-/gulp-mocha-8.0.0.tgz", + "integrity": "sha512-FdbBydfzszaES/gXfwD6RFq1yJTj4Z6328R1yqsmhf+t7hW2aj9ZD9Hz8boQShjZ9J8/w6tQBM5mePb8K2pbqA==", "dev": true, "dependencies": { "dargs": "^7.0.0", @@ -5321,3837 +5470,3745 @@ } } }, - "node_modules/gulp-mocha/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "node_modules/gulp-mocha/node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/gulp-rename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-2.0.0.tgz", - "integrity": "sha512-97Vba4KBzbYmR5VBs9mWmK+HwIf5mj+/zioxfZhOKeXtx5ZjBk57KFlePf5nxq9QsTtFl0ejnHE3zTC9MHXqyQ==", - "dev": true, "engines": { - "node": ">=4" + "node": ">= 8" } }, - "node_modules/gulp-replace": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/gulp-replace/-/gulp-replace-1.1.3.tgz", - "integrity": "sha512-HcPHpWY4XdF8zxYkDODHnG2+7a3nD/Y8Mfu3aBgMiCFDW3X2GiOKXllsAmILcxe3KZT2BXoN18WrpEFm48KfLQ==", + "node_modules/gulp-mocha/node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", "dev": true, - "dependencies": { - "@types/node": "^14.14.41", - "@types/vinyl": "^2.0.4", - "istextorbinary": "^3.0.0", - "replacestream": "^4.0.3", - "yargs-parser": ">=5.0.0-security.0" - }, "engines": { - "node": ">=10" + "node": ">=0.10.0" } }, - "node_modules/gulp-shell": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/gulp-shell/-/gulp-shell-0.8.0.tgz", - "integrity": "sha512-wHNCgmqbWkk1c6Gc2dOL5SprcoeujQdeepICwfQRo91DIylTE7a794VEE+leq3cE2YDoiS5ulvRfKVIEMazcTQ==", + "node_modules/gulp-mocha/node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", "dev": true, - "dependencies": { - "chalk": "^3.0.0", - "fancy-log": "^1.3.3", - "lodash.template": "^4.5.0", - "plugin-error": "^1.0.1", - "through2": "^3.0.1", - "tslib": "^1.10.0" - }, "engines": { - "node": ">=10.0.0" + "node": ">=0.10.0" } }, - "node_modules/gulp-shell/node_modules/chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "node_modules/gulp-mocha/node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, "engines": { "node": ">=8" } }, - "node_modules/gulp-shell/node_modules/through2": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", - "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", + "node_modules/gulp-mocha/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "2 || 3" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/gulp-shell/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/gulp-sourcemaps": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-3.0.0.tgz", - "integrity": "sha512-RqvUckJkuYqy4VaIH60RMal4ZtG0IbQ6PXMNkNsshEGJ9cldUPRb/YCgboYae+CLAs1HQNb4ADTKCx65HInquQ==", + "node_modules/gulp-mocha/node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "dependencies": { - "@gulp-sourcemaps/identity-map": "^2.0.1", - "@gulp-sourcemaps/map-sources": "^1.0.0", - "acorn": "^6.4.1", - "convert-source-map": "^1.0.0", - "css": "^3.0.0", - "debug-fabulous": "^1.0.0", - "detect-newline": "^2.0.0", - "graceful-fs": "^4.0.0", - "source-map": "^0.6.0", - "strip-bom-string": "^1.0.0", - "through2": "^2.0.0" + "fill-range": "^7.0.1" }, "engines": { - "node": ">= 6" + "node": ">=8" } }, - "node_modules/gulp-sourcemaps/node_modules/acorn": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", - "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", + "node_modules/gulp-mocha/node_modules/chokidar": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", + "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", "dev": true, - "bin": { - "acorn": "bin/acorn" + "dependencies": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.5.0" }, "engines": { - "node": ">=0.4.0" + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.1" } }, - "node_modules/gulp-sourcemaps/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "node_modules/gulp-mocha/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, - "node_modules/gulp-typescript": { - "version": "6.0.0-alpha.1", - "resolved": "https://registry.npmjs.org/gulp-typescript/-/gulp-typescript-6.0.0-alpha.1.tgz", - "integrity": "sha512-KoT0TTfjfT7w3JItHkgFH1T/zK4oXWC+a8xxKfniRfVcA0Fa1bKrIhztYelYmb+95RB80OLMBreknYkdwzdi2Q==", + "node_modules/gulp-mocha/node_modules/debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "dependencies": { - "ansi-colors": "^4.1.1", - "plugin-error": "^1.0.1", - "source-map": "^0.7.3", - "through2": "^3.0.1", - "vinyl": "^2.2.0", - "vinyl-fs": "^3.0.3" + "ms": "2.1.2" }, "engines": { - "node": ">= 8" + "node": ">=6.0" }, - "peerDependencies": { - "typescript": "~2.7.1 || >=2.8.0-dev || >=2.9.0-dev || ~3.0.0 || >=3.0.0-dev || >=3.1.0-dev || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.7.0-dev " + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/gulp-typescript/node_modules/source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "node_modules/gulp-mocha/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", "dev": true, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, "engines": { - "node": ">= 8" + "node": ">=0.10.0" } }, - "node_modules/gulp-typescript/node_modules/through2": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", - "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", + "node_modules/gulp-mocha/node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "2 || 3" + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "node_modules/gulpclass": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/gulpclass/-/gulpclass-0.2.0.tgz", - "integrity": "sha512-S2p0SgnVLjBbIEw5tHbBV6Wm6abD+leA5xZG6ukf9M+j1I/8zIeKPby9GLWnI90671YRk+lXbvEUROKaZXo8NA==", + "node_modules/gulp-mocha/node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, - "dependencies": { - "@types/gulp": "^4.0.5", - "@types/merge2": "^1.1.4", - "@types/node": "*", - "gulp": "^4.0.0", - "merge2": "^1.2.2" + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/gulplog": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", - "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "node_modules/gulp-mocha/node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "dev": true, "dependencies": { - "glogg": "^1.0.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">= 0.10" + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", - "dev": true, + "node_modules/gulp-mocha/node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "wordwrap": "^1.0.0" - }, - "bin": { - "handlebars": "bin/handlebars" + "binary-extensions": "^2.0.0" }, "engines": { - "node": ">=0.4.7" + "node": ">=8" + } + }, + "node_modules/gulp-mocha/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" }, - "optionalDependencies": { - "uglify-js": "^3.1.4" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/hard-rejection": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", - "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", + "node_modules/gulp-mocha/node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, "engines": { - "node": ">=6" + "node": ">=0.12.0" } }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "node_modules/gulp-mocha/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "dependencies": { - "function-bind": "^1.1.1" + "isobject": "^3.0.1" }, "engines": { - "node": ">= 0.4.0" + "node": ">=0.10.0" } }, - "node_modules/has-flag": { + "node_modules/gulp-mocha/node_modules/js-yaml": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", + "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", "dev": true, - "engines": { - "node": ">= 0.4" + "dependencies": { + "argparse": "^2.0.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "dev": true - }, - "node_modules/has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "node_modules/gulp-mocha/node_modules/log-symbols": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", + "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", "dev": true, "dependencies": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" + "chalk": "^4.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=10" } }, - "node_modules/has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "node_modules/gulp-mocha/node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "dependencies": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=0.10.0" + "node": "*" } }, - "node_modules/has-values/node_modules/kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "node_modules/gulp-mocha/node_modules/mocha": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz", + "integrity": "sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ==", "dev": true, "dependencies": { - "is-buffer": "^1.1.5" + "@ungap/promise-all-settled": "1.1.2", + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.1", + "debug": "4.3.1", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.1.6", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "4.0.0", + "log-symbols": "4.0.0", + "minimatch": "3.0.4", + "ms": "2.1.3", + "nanoid": "3.1.20", + "serialize-javascript": "5.0.1", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "which": "2.0.2", + "wide-align": "1.1.3", + "workerpool": "6.1.0", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha" }, "engines": { - "node": ">=0.10.0" + "node": ">= 10.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" } }, - "node_modules/hdb-pool": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/hdb-pool/-/hdb-pool-0.1.6.tgz", - "integrity": "sha512-8VZOLn1EHamm1NmTFQj2iqjVcfonYIsD7F5DU2bz2N+gF+knp6/MbAVeRXkJtya717IBkPeA5iv0/1iPuYo4ZA==", - "optional": true, - "peer": true, + "node_modules/gulp-mocha/node_modules/mocha/node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, "engines": { - "node": ">= 8" + "node": ">=6" } }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "node_modules/gulp-mocha/node_modules/mocha/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/gulp-mocha/node_modules/nanoid": { + "version": "3.1.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", + "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", "dev": true, "bin": { - "he": "bin/he" - } - }, - "node_modules/highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "nanoid": "bin/nanoid.cjs" + }, "engines": { - "node": "*" + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "node_modules/gulp-mocha/node_modules/plugin-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", + "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", "dev": true, "dependencies": { - "parse-passwd": "^1.0.0" + "ansi-colors": "^1.0.1", + "arr-diff": "^4.0.0", + "arr-union": "^3.1.0", + "extend-shallow": "^3.0.2" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.10" } }, - "node_modules/hosted-git-info": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz", - "integrity": "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==", + "node_modules/gulp-mocha/node_modules/readdirp": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", "dev": true, "dependencies": { - "lru-cache": "^6.0.0" + "picomatch": "^2.2.1" }, "engines": { - "node": ">=10" + "node": ">=8.10.0" } }, - "node_modules/http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "node_modules/gulp-mocha/node_modules/serialize-javascript": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", + "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", "dev": true, - "optional": true + "dependencies": { + "randombytes": "^2.1.0" + } }, - "node_modules/http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "node_modules/gulp-mocha/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "dependencies": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" + "has-flag": "^4.0.0" }, "engines": { - "node": ">= 6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "node_modules/gulp-mocha/node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "dependencies": { - "agent-base": "6", - "debug": "4" + "is-number": "^7.0.0" }, "engines": { - "node": ">= 6" + "node": ">=8.0" } }, - "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, - "engines": { - "node": ">=10.17.0" - } + "node_modules/gulp-mocha/node_modules/workerpool": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.0.tgz", + "integrity": "sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==", + "dev": true }, - "node_modules/humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "node_modules/gulp-mocha/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", "dev": true, - "optional": true, "dependencies": { - "ms": "^2.0.0" + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" } }, - "node_modules/husky": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/husky/-/husky-5.2.0.tgz", - "integrity": "sha512-AM8T/auHXRBxlrfPVLKP6jt49GCM2Zz47m8G3FOMsLmTv8Dj/fKVWE0Rh2d4Qrvmy131xEsdQnb3OXRib67PGg==", + "node_modules/gulp-mocha/node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/typicode" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/husky" - } - ], - "bin": { - "husky": "lib/bin.js" - }, "engines": { - "node": ">= 10" + "node": ">=10" } }, - "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "node_modules/gulp-rename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-2.0.0.tgz", + "integrity": "sha512-97Vba4KBzbYmR5VBs9mWmK+HwIf5mj+/zioxfZhOKeXtx5ZjBk57KFlePf5nxq9QsTtFl0ejnHE3zTC9MHXqyQ==", "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "node_modules/gulp-replace": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/gulp-replace/-/gulp-replace-1.1.4.tgz", + "integrity": "sha512-SVSF7ikuWKhpAW4l4wapAqPPSToJoiNKsbDoUnRrSgwZHH7lH8pbPeQj1aOVYQrbZKhfSVBxVW+Py7vtulRktw==", "dev": true, + "dependencies": { + "@types/node": "*", + "@types/vinyl": "^2.0.4", + "istextorbinary": "^3.0.0", + "replacestream": "^4.0.3", + "yargs-parser": ">=5.0.0-security.0" + }, "engines": { - "node": ">= 4" + "node": ">=10" } }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "node_modules/gulp-shell": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/gulp-shell/-/gulp-shell-0.8.0.tgz", + "integrity": "sha512-wHNCgmqbWkk1c6Gc2dOL5SprcoeujQdeepICwfQRo91DIylTE7a794VEE+leq3cE2YDoiS5ulvRfKVIEMazcTQ==", "dev": true, - "optional": true, + "dependencies": { + "chalk": "^3.0.0", + "fancy-log": "^1.3.3", + "lodash.template": "^4.5.0", + "plugin-error": "^1.0.1", + "through2": "^3.0.1", + "tslib": "^1.10.0" + }, "engines": { - "node": ">=0.8.19" + "node": ">=10.0.0" } }, - "node_modules/indent-string": { + "node_modules/gulp-shell/node_modules/arr-diff": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", - "dev": true, - "optional": true - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "node_modules/interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", "dev": true, "engines": { - "node": ">= 0.10" + "node": ">=0.10.0" } }, - "node_modules/invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "node_modules/gulp-shell/node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/ip": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz", - "integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==", - "dev": true, - "optional": true - }, - "node_modules/ip-regex": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", - "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", + "node_modules/gulp-shell/node_modules/chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/is-absolute": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "node_modules/gulp-shell/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", "dev": true, "dependencies": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "node_modules/gulp-shell/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "dependencies": { - "kind-of": "^3.0.2" + "is-plain-object": "^2.0.4" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/is-accessor-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "node_modules/gulp-shell/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "dependencies": { - "is-buffer": "^1.1.5" + "isobject": "^3.0.1" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "node_modules/is-binary-path": { + "node_modules/gulp-shell/node_modules/plugin-error": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", + "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", "dev": true, "dependencies": { - "binary-extensions": "^1.0.0" + "ansi-colors": "^1.0.1", + "arr-diff": "^4.0.0", + "arr-union": "^3.1.0", + "extend-shallow": "^3.0.2" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.10" } }, - "node_modules/is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "node_modules/gulp-shell/node_modules/through2": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", + "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", + "dev": true, + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "2 || 3" + } + }, + "node_modules/gulp-shell/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, - "node_modules/is-core-module": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.7.0.tgz", - "integrity": "sha512-ByY+tjCciCr+9nLryBYcSD50EOGWt95c7tIsKTG1J2ixKKXPvF7Ej3AVd+UfDydAJom3biBGDBALaO79ktwgEQ==", + "node_modules/gulp-sourcemaps": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-3.0.0.tgz", + "integrity": "sha512-RqvUckJkuYqy4VaIH60RMal4ZtG0IbQ6PXMNkNsshEGJ9cldUPRb/YCgboYae+CLAs1HQNb4ADTKCx65HInquQ==", "dev": true, "dependencies": { - "has": "^1.0.3" + "@gulp-sourcemaps/identity-map": "^2.0.1", + "@gulp-sourcemaps/map-sources": "^1.0.0", + "acorn": "^6.4.1", + "convert-source-map": "^1.0.0", + "css": "^3.0.0", + "debug-fabulous": "^1.0.0", + "detect-newline": "^2.0.0", + "graceful-fs": "^4.0.0", + "source-map": "^0.6.0", + "strip-bom-string": "^1.0.0", + "through2": "^2.0.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">= 6" } }, - "node_modules/is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "node_modules/gulp-sourcemaps/node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", "dev": true, "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" } }, - "node_modules/is-data-descriptor/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "node_modules/gulp-typescript": { + "version": "6.0.0-alpha.1", + "resolved": "https://registry.npmjs.org/gulp-typescript/-/gulp-typescript-6.0.0-alpha.1.tgz", + "integrity": "sha512-KoT0TTfjfT7w3JItHkgFH1T/zK4oXWC+a8xxKfniRfVcA0Fa1bKrIhztYelYmb+95RB80OLMBreknYkdwzdi2Q==", "dev": true, "dependencies": { - "is-buffer": "^1.1.5" + "ansi-colors": "^4.1.1", + "plugin-error": "^1.0.1", + "source-map": "^0.7.3", + "through2": "^3.0.1", + "vinyl": "^2.2.0", + "vinyl-fs": "^3.0.3" }, "engines": { - "node": ">=0.10.0" + "node": ">= 8" + }, + "peerDependencies": { + "typescript": "~2.7.1 || >=2.8.0-dev || >=2.9.0-dev || ~3.0.0 || >=3.0.0-dev || >=3.1.0-dev || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.7.0-dev " } }, - "node_modules/is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "node_modules/gulp-typescript/node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", "dev": true, - "dependencies": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - }, "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, - "node_modules/is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "node_modules/gulp-typescript/node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", "dev": true, - "bin": { - "is-docker": "cli.js" - }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=0.10.0" } }, - "node_modules/is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "node_modules/gulp-typescript/node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "node_modules/gulp-typescript/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", "dev": true, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "node_modules/gulp-typescript/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "dependencies": { - "is-extglob": "^2.1.1" + "is-plain-object": "^2.0.4" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/is-lambda": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", - "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", - "dev": true, - "optional": true - }, - "node_modules/is-negated-glob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", - "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=", + "node_modules/gulp-typescript/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "node_modules/gulp-typescript/node_modules/plugin-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", + "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", "dev": true, "dependencies": { - "kind-of": "^3.0.2" + "ansi-colors": "^1.0.1", + "arr-diff": "^4.0.0", + "arr-union": "^3.1.0", + "extend-shallow": "^3.0.2" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.10" } }, - "node_modules/is-number/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "node_modules/gulp-typescript/node_modules/plugin-error/node_modules/ansi-colors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", "dev": true, "dependencies": { - "is-buffer": "^1.1.5" + "ansi-wrap": "^0.1.0" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "node_modules/gulp-typescript/node_modules/source-map": { + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", + "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", "dev": true, "engines": { - "node": ">=8" + "node": ">= 8" } }, - "node_modules/is-path-cwd": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", - "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", + "node_modules/gulp-typescript/node_modules/through2": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", + "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", "dev": true, - "engines": { - "node": ">=6" + "dependencies": { + "inherits": "^2.0.4", + "readable-stream": "2 || 3" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "node_modules/gulpclass": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/gulpclass/-/gulpclass-0.2.0.tgz", + "integrity": "sha512-S2p0SgnVLjBbIEw5tHbBV6Wm6abD+leA5xZG6ukf9M+j1I/8zIeKPby9GLWnI90671YRk+lXbvEUROKaZXo8NA==", "dev": true, - "engines": { - "node": ">=8" + "dependencies": { + "@types/gulp": "^4.0.5", + "@types/merge2": "^1.1.4", + "@types/node": "*", + "gulp": "^4.0.0", + "merge2": "^1.2.2" } }, - "node_modules/is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "node_modules/gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha512-hm6N8nrm3Y08jXie48jsC55eCZz9mnb4OirAStEk2deqeyhXU3C1otDVh+ccttMuc1sBi6RX6ZJ720hs9RCvgw==", "dev": true, + "dependencies": { + "glogg": "^1.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.10" } }, - "node_modules/is-plain-object": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", - "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "node_modules/handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", "dev": true, + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, "engines": { - "node": ">=0.10.0" + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" } }, - "node_modules/is-promise": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", - "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", - "dev": true - }, - "node_modules/is-property": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", - "dev": true + "node_modules/hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", + "dev": true, + "engines": { + "node": ">=6" + } }, - "node_modules/is-relative": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, "dependencies": { - "is-unc-path": "^1.0.0" + "function-bind": "^1.1.1" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4.0" } }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "engines": { "node": ">=8" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.1" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-text-path": { + "node_modules/has-proto": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", - "integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", "dev": true, - "dependencies": { - "text-extensions": "^1.0.0" + "engines": { + "node": ">= 0.4" }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-unc-path": { + "node_modules/has-tostringtag": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", "dev": true, "dependencies": { - "unc-path-regex": "^0.1.2" + "has-symbols": "^1.0.2" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", "dev": true }, - "node_modules/is-valid-glob": { + "node_modules/has-value": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", - "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha512-IBXk4GTsLYdQ7Rvt+GRBrFSVEkmuOUy4re0Xjd9kJSUQpnTrWR4/y9RpfexN9vkAPMFuQoeWKwqzPozRTlasGw==", "dev": true, + "dependencies": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "node_modules/has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha512-ODYZC64uqzmtfGMEAX/FvZiRyWLpAC3vYnNunURUnkGVTS+mI0smVsWaPydRBsE3g+ok7h960jChO8mFcWlHaQ==", "dev": true, + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "node_modules/has-values/node_modules/kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha512-24XsCxmEbRwEDbz/qz3stgin8TTzZ1ESR56OMCN0ujYg+vRutNSiOj9bHH9u85DKgXguraugV5sFuvbD4FW/hw==", "dev": true, "dependencies": { - "is-docker": "^2.0.0" + "is-buffer": "^1.1.5" }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true, + "bin": { + "he": "bin/he" + } }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true + "node_modules/highlight.js": { + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", + "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "engines": { + "node": "*" + } }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "node_modules/homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", "dev": true, + "dependencies": { + "parse-passwd": "^1.0.0" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/istanbul": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", - "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", - "deprecated": "This module is no longer maintained, try this instead:\n npm i nyc\nVisit https://istanbul.js.org/integrations for other alternatives.", + "node_modules/hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", "dev": true, "dependencies": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.8.x", - "esprima": "2.7.x", - "glob": "^5.0.15", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" + "lru-cache": "^6.0.0" }, - "bin": { - "istanbul": "lib/cli.js" + "engines": { + "node": ">=10" } }, - "node_modules/istanbul-threshold-checker": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/istanbul-threshold-checker/-/istanbul-threshold-checker-0.2.1.tgz", - "integrity": "sha1-xdyU6PLMXNP/0zVFL4S1U8QkgzE=", + "node_modules/http-cache-semantics": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", "dev": true, - "dependencies": { - "istanbul": "~0.4.5", - "lodash": "~4.17.2" - } + "optional": true }, - "node_modules/istanbul/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "node_modules/http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", "dev": true, + "optional": true, "dependencies": { - "sprintf-js": "~1.0.2" + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" } }, - "node_modules/istanbul/node_modules/glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", "dev": true, "dependencies": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "agent-base": "6", + "debug": "4" }, "engines": { - "node": "*" + "node": ">= 6" } }, - "node_modules/istanbul/node_modules/has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=10.17.0" } }, - "node_modules/istanbul/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "node_modules/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", "dev": true, + "optional": true, "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "ms": "^2.0.0" } }, - "node_modules/istanbul/node_modules/js-yaml/node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "node_modules/husky": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", + "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", "dev": true, "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" + "husky": "lib/bin.js" }, "engines": { - "node": ">=4" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" } }, - "node_modules/istanbul/node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", "dev": true, "dependencies": { - "minimist": "^1.2.5" + "safer-buffer": ">= 2.1.2 < 3.0.0" }, - "bin": { - "mkdirp": "bin/cmd.js" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/istanbul/node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "node_modules/istanbul/node_modules/supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true, - "dependencies": { - "has-flag": "^1.0.0" - }, "engines": { - "node": ">=0.8.0" + "node": ">= 4" } }, - "node_modules/istanbul/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" + "optional": true, + "engines": { + "node": ">=0.8.19" } }, - "node_modules/istextorbinary": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-3.3.0.tgz", - "integrity": "sha512-Tvq1W6NAcZeJ8op+Hq7tdZ434rqnMx4CCZ7H0ff83uEloDvVbqAwaMTZcafKGJT0VHkYzuXUiCY4hlXQg6WfoQ==", + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", "dev": true, - "dependencies": { - "binaryextensions": "^2.2.0", - "textextensions": "^3.2.0" - }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://bevry.me/fund" } }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "node_modules/infer-owner": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", + "dev": true, + "optional": true }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "once": "^1.3.0", + "wrappy": "1" } }, - "node_modules/jsbi": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/jsbi/-/jsbi-3.2.5.tgz", - "integrity": "sha512-aBE4n43IPvjaddScbvWRA2YlTzKEynHzu7MqOyTipdHucf/VxS63ViCjxYRg86M8Rxwbt/GfzHl1kKERkt45fQ==", - "dev": true + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, - "node_modules/json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true + "node_modules/internal-slot": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.4.tgz", + "integrity": "sha512-tA8URYccNzMo94s5MQZgH8NB/XTa6HsOo0MLfXTKKEnHVVdegzaQoFZ7Jp44bdvLvY2waT5dc+j5ICEswhi7UQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } }, - "node_modules/jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "node_modules/interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", "dev": true, - "engines": [ - "node >= 0.2.0" - ] + "engines": { + "node": ">= 0.10" + } }, - "node_modules/JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "node_modules/invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha512-xgs2NH9AE66ucSq4cNG1nhSFghr5l6tdL15Pk+jl46bmmBapgoaY/AacXyaDznAqmGL99TiLSQgO/XazFSKYeQ==", "dev": true, - "dependencies": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - }, - "bin": { - "JSONStream": "bin.js" - }, "engines": { - "node": "*" + "node": ">=0.10.0" } }, - "node_modules/jsonwebtoken": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", - "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "node_modules/ip": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", + "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==", + "dev": true + }, + "node_modules/is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", "dev": true, "dependencies": { - "jws": "^3.2.2", - "lodash.includes": "^4.3.0", - "lodash.isboolean": "^3.0.3", - "lodash.isinteger": "^4.0.4", - "lodash.isnumber": "^3.0.3", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.once": "^4.0.0", - "ms": "^2.1.1", - "semver": "^5.6.0" + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" }, "engines": { - "node": ">=4", - "npm": ">=1.4.28" + "node": ">=0.10.0" } }, - "node_modules/jsonwebtoken/node_modules/jwa": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", - "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==", "dev": true, "dependencies": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/jsonwebtoken/node_modules/jws": { + "node_modules/is-accessor-descriptor/node_modules/kind-of": { "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", - "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", "dev": true, "dependencies": { - "jwa": "^1.4.1", - "safe-buffer": "^5.0.1" + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/jsonwebtoken/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "node_modules/is-array-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.1.tgz", + "integrity": "sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==", "dev": true, - "bin": { - "semver": "bin/semver" + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/just-debounce": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.1.0.tgz", - "integrity": "sha512-qpcRocdkUmf+UTNBYx5w6dexX5J31AKK1OmPwH630a83DdVVUIngk55RSAiIGpQyoH0dlr872VHfPjnQnK1qDQ==", - "dev": true - }, - "node_modules/just-extend": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", - "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "dev": true }, - "node_modules/jwa": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", - "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, "dependencies": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/jws": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", - "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", + "node_modules/is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha512-9fRVlXc0uCxEDj1nQzaWONSpbTfx0FmJfzHF7pwlI8DkWGoHBBea4Pg5Ky0ojwwxQmnSifgbKkI06Qv0Ljgj+Q==", "dev": true, "dependencies": { - "jwa": "^2.0.0", - "safe-buffer": "^5.0.1" + "binary-extensions": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/keytar": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/keytar/-/keytar-7.7.0.tgz", - "integrity": "sha512-YEY9HWqThQc5q5xbXbRwsZTh2PJ36OSYRjSv3NN2xf5s5dpLTjEZnC2YikR29OaVybf9nQ0dJ/80i40RS97t/A==", + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, - "hasInstallScript": true, - "optional": true, "dependencies": { - "node-addon-api": "^3.0.0", - "prebuild-install": "^6.0.0" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/last-run": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz", - "integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls=", + "node_modules/is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", "dev": true, "dependencies": { - "default-resolution": "^2.0.0", - "es6-weak-map": "^2.0.1" + "has": "^1.0.3" }, - "engines": { - "node": ">= 0.10" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/lazystream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", - "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==", "dev": true, "dependencies": { - "readable-stream": "^2.0.5" + "kind-of": "^3.0.2" }, "engines": { - "node": ">= 0.6.3" + "node": ">=0.10.0" } }, - "node_modules/lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", "dev": true, "dependencies": { - "invert-kv": "^1.0.0" + "is-buffer": "^1.1.5" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/lead": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", - "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=", + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", "dev": true, "dependencies": { - "flush-write-stream": "^1.0.2" + "has-tostringtag": "^1.0.0" }, "engines": { - "node": ">= 0.10" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/liftoff": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz", - "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==", + "node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "dev": true, "dependencies": { - "extend": "^3.0.0", - "findup-sync": "^3.0.0", - "fined": "^1.0.1", - "flagged-respawn": "^1.0.0", - "is-plain-object": "^2.0.4", - "object.map": "^1.0.0", - "rechoir": "^0.6.2", - "resolve": "^1.1.7" + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" }, "engines": { - "node": ">= 0.8" + "node": ">=0.10.0" } }, - "node_modules/liftoff/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", "dev": true, - "dependencies": { - "isobject": "^3.0.1" + "bin": { + "is-docker": "cli.js" }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", + "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", - "dev": true + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "node_modules/load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" + "is-extglob": "^2.1.1" }, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/load-json-file/node_modules/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "node_modules/is-lambda": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", + "dev": true, + "optional": true + }, + "node_modules/is-negated-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", + "integrity": "sha512-czXVVn/QEmgvej1f50BZ648vUI+em0xqMq2Sn+QncCLN4zj1UAxlT+kw/6ggQTOaZPd1HqKQGEqbpQVtJucWug==", "dev": true, - "dependencies": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - }, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/load-json-file/node_modules/pify": { + "node_modules/is-negative-zero": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", + "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==", "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, "dependencies": { - "p-locate": "^5.0.0" + "has-tostringtag": "^1.0.0" }, "engines": { - "node": ">=10" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/lodash._reinterpolate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", - "dev": true + "node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } }, - "node_modules/lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true + "node_modules/is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true, + "engines": { + "node": ">=8" + } }, - "node_modules/lodash.includes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", - "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=", - "dev": true + "node_modules/is-path-cwd": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", + "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", + "dev": true, + "engines": { + "node": ">=6" + } }, - "node_modules/lodash.isboolean": { + "node_modules/is-path-inside": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=", - "dev": true - }, - "node_modules/lodash.isinteger": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=", - "dev": true - }, - "node_modules/lodash.ismatch": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", - "integrity": "sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc=", - "dev": true + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } }, - "node_modules/lodash.isnumber": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=", - "dev": true + "node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "node_modules/lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", - "dev": true + "node_modules/is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "node_modules/lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=", + "node_modules/is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", "dev": true }, - "node_modules/lodash.once": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=", + "node_modules/is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==", "dev": true }, - "node_modules/lodash.template": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", - "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dev": true, "dependencies": { - "lodash._reinterpolate": "^3.0.0", - "lodash.templatesettings": "^4.0.0" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/lodash.templatesettings": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz", - "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==", + "node_modules/is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", "dev": true, "dependencies": { - "lodash._reinterpolate": "^3.0.0" + "is-unc-path": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", - "dev": true - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "node_modules/is-shared-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", "dev": true, "dependencies": { - "yallist": "^4.0.0" + "call-bind": "^1.0.2" }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, "engines": { - "node": ">=10" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lru-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", - "integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM=", + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", "dev": true, "dependencies": { - "es5-ext": "~0.10.2" + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", "dev": true, "dependencies": { - "semver": "^6.0.0" + "has-symbols": "^1.0.2" }, "engines": { - "node": ">=8" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "node_modules/is-text-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", + "integrity": "sha512-xFuJpne9oFz5qDaodwmmG08e3CawH/2ZV8Qqza1Ko7Sk8POWbkRdwIoAWVhqvq0XeUzANEhKo2n0IXUGBm7A/w==", "dev": true, - "bin": { - "semver": "bin/semver.js" + "dependencies": { + "text-extensions": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, - "node_modules/make-fetch-happen": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz", - "integrity": "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==", + "node_modules/is-typed-array": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", "dev": true, - "optional": true, "dependencies": { - "agentkeepalive": "^4.1.3", - "cacache": "^15.2.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^6.0.0", - "minipass": "^3.1.3", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^1.3.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.2", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^6.0.0", - "ssri": "^8.0.0" + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" }, "engines": { - "node": ">= 10" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/make-iterator": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", - "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "node_modules/is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", "dev": true, "dependencies": { - "kind-of": "^6.0.2" + "unc-path-regex": "^0.1.2" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/make-iterator/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "node_modules/is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", + "dev": true + }, + "node_modules/is-valid-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", + "integrity": "sha512-AhiROmoEFDSsjx8hW+5sGwgKVIORcXnrlAx/R0ZSeaPw70Vw0CqkGBBhHGL58Uox2eXnU1AnvXJl1XlyedO5bA==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/map-obj": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", - "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", "dev": true, - "engines": { - "node": ">=8" + "dependencies": { + "call-bind": "^1.0.2" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", "dev": true, - "dependencies": { - "object-visit": "^1.0.0" - }, "engines": { "node": ">=0.10.0" } }, - "node_modules/matchdep": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz", - "integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4=", + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", "dev": true, "dependencies": { - "findup-sync": "^2.0.0", - "micromatch": "^3.0.4", - "resolve": "^1.4.0", - "stack-trace": "0.0.10" + "is-docker": "^2.0.0" }, "engines": { - "node": ">= 0.10.0" + "node": ">=8" } }, - "node_modules/matchdep/node_modules/define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", "dev": true, - "dependencies": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, "engines": { "node": ">=0.10.0" } }, - "node_modules/matchdep/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "node_modules/istanbul": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", + "integrity": "sha512-nMtdn4hvK0HjUlzr1DrKSUY8ychprt8dzHOgY2KXsIhHu5PuQQEOTM27gV9Xblyon7aUH/TSFIjRHEODF/FRPg==", + "deprecated": "This module is no longer maintained, try this instead:\n npm i nyc\nVisit https://istanbul.js.org/integrations for other alternatives.", "dev": true, "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.8.x", + "esprima": "2.7.x", + "glob": "^5.0.15", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "once": "1.x", + "resolve": "1.1.x", + "supports-color": "^3.1.0", + "which": "^1.1.1", + "wordwrap": "^1.0.0" }, - "engines": { - "node": ">=0.10.0" + "bin": { + "istanbul": "lib/cli.js" } }, - "node_modules/matchdep/node_modules/findup-sync": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", - "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "node_modules/istanbul-threshold-checker": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/istanbul-threshold-checker/-/istanbul-threshold-checker-0.2.1.tgz", + "integrity": "sha512-KBEXIAIr7ANpZHX4qkRvbIV5XYyMXn9hwBjddR/ixG8b/M+K1y8a6h4Ca+3HUn2WUr2WnRryhNeM+KXXJROqww==", "dev": true, "dependencies": { - "detect-file": "^1.0.0", - "is-glob": "^3.1.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" - }, - "engines": { - "node": ">= 0.10" + "istanbul": "~0.4.5", + "lodash": "~4.17.2" } }, - "node_modules/matchdep/node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "node_modules/istanbul/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" + "sprintf-js": "~1.0.2" } }, - "node_modules/matchdep/node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "node_modules/istanbul/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/matchdep/node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "node_modules/istanbul/node_modules/glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", "dev": true, "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">=0.10.0" + "node": "*" } }, - "node_modules/matchdep/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "node_modules/istanbul/node_modules/has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==", "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4" - }, "engines": { "node": ">=0.10.0" } }, - "node_modules/matchdep/node_modules/is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "node_modules/istanbul/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", "dev": true, "dependencies": { - "is-extglob": "^2.1.0" + "argparse": "^1.0.7", + "esprima": "^4.0.0" }, - "engines": { - "node": ">=0.10.0" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/matchdep/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "node_modules/istanbul/node_modules/js-yaml/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, - "dependencies": { - "isobject": "^3.0.1" + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" }, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/matchdep/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "node_modules/istanbul/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, "engines": { - "node": ">=0.10.0" + "node": "*" } }, - "node_modules/matchdep/node_modules/micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "node_modules/istanbul/node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", "dev": true, "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" + "minimist": "^1.2.6" }, - "engines": { - "node": ">=0.10.0" + "bin": { + "mkdirp": "bin/cmd.js" } }, - "node_modules/matchdep/node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "node_modules/istanbul/node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "node_modules/istanbul/node_modules/supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==", "dev": true, "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "has-flag": "^1.0.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=0.8.0" } }, - "node_modules/memoizee": { - "version": "0.4.15", - "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", - "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", + "node_modules/istanbul/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "dev": true, "dependencies": { - "d": "^1.0.1", - "es5-ext": "^0.10.53", - "es6-weak-map": "^2.0.3", - "event-emitter": "^0.3.5", - "is-promise": "^2.2.2", - "lru-queue": "^0.1.0", - "next-tick": "^1.1.0", - "timers-ext": "^0.1.7" + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" } }, - "node_modules/memory-pager": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", - "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", - "dev": true, - "optional": true - }, - "node_modules/meow": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", - "integrity": "sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==", + "node_modules/istextorbinary": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-3.3.0.tgz", + "integrity": "sha512-Tvq1W6NAcZeJ8op+Hq7tdZ434rqnMx4CCZ7H0ff83uEloDvVbqAwaMTZcafKGJT0VHkYzuXUiCY4hlXQg6WfoQ==", "dev": true, "dependencies": { - "@types/minimist": "^1.2.0", - "camelcase-keys": "^6.2.2", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "4.1.0", - "normalize-package-data": "^3.0.0", - "read-pkg-up": "^7.0.1", - "redent": "^3.0.0", - "trim-newlines": "^3.0.0", - "type-fest": "^0.18.0", - "yargs-parser": "^20.2.3" + "binaryextensions": "^2.2.0", + "textextensions": "^3.2.0" }, "engines": { - "node": ">=10" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://bevry.me/fund" } }, - "node_modules/meow/node_modules/find-up": { + "node_modules/js-md4": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/js-md4/-/js-md4-0.3.2.tgz", + "integrity": "sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA==", + "dev": true + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "argparse": "^2.0.1" }, - "engines": { - "node": ">=8" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/meow/node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "node_modules/jsbi": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/jsbi/-/jsbi-4.3.0.tgz", + "integrity": "sha512-SnZNcinB4RIcnEyZqFPdGPVgrg2AcnykiBy0sHVJQKHYeaLUvi3Exj+iaPpLnFVkDPZIV4U0yvgC9/R4uEAZ9g==", "dev": true }, - "node_modules/meow/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "dev": true, + "engines": [ + "node >= 0.2.0" + ] + }, + "node_modules/JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", "dev": true, "dependencies": { - "p-locate": "^4.1.0" + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "bin": { + "JSONStream": "bin.js" }, "engines": { - "node": ">=8" + "node": "*" } }, - "node_modules/meow/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "node_modules/jsonwebtoken": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", + "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==", "dev": true, "dependencies": { - "p-try": "^2.0.0" + "jws": "^3.2.2", + "lodash": "^4.17.21", + "ms": "^2.1.1", + "semver": "^7.3.8" }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=12", + "npm": ">=6" } }, - "node_modules/meow/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "node_modules/jsonwebtoken/node_modules/jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", "dev": true, "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" } }, - "node_modules/meow/node_modules/read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "node_modules/jsonwebtoken/node_modules/jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", "dev": true, "dependencies": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "engines": { - "node": ">=8" + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" } }, - "node_modules/meow/node_modules/read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "node_modules/jsonwebtoken/node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, "dependencies": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" + "lru-cache": "^6.0.0" }, - "engines": { - "node": ">=8" + "bin": { + "semver": "bin/semver.js" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=10" } }, - "node_modules/meow/node_modules/read-pkg-up/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "node_modules/just-debounce": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.1.0.tgz", + "integrity": "sha512-qpcRocdkUmf+UTNBYx5w6dexX5J31AKK1OmPwH630a83DdVVUIngk55RSAiIGpQyoH0dlr872VHfPjnQnK1qDQ==", + "dev": true + }, + "node_modules/just-extend": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", + "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "dev": true + }, + "node_modules/jwa": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", + "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", "dev": true, - "engines": { - "node": ">=8" + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" } }, - "node_modules/meow/node_modules/read-pkg/node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "node_modules/jws": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", + "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", "dev": true, "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" + "jwa": "^2.0.0", + "safe-buffer": "^5.0.1" } }, - "node_modules/meow/node_modules/read-pkg/node_modules/type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true, + "node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/meow/node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "node_modules/last-run": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz", + "integrity": "sha512-U/VxvpX4N/rFvPzr3qG5EtLKEnNI0emvIQB3/ecEwv+8GHaUKbIB8vxv1Oai5FAF0d0r7LXHhLLe5K/yChm5GQ==", "dev": true, "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" + "default-resolution": "^2.0.0", + "es6-weak-map": "^2.0.1" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/meow/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/meow/node_modules/type-fest": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", - "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", - "dev": true, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">= 0.10" } }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "node_modules/lazystream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.1.tgz", + "integrity": "sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==", "dev": true, + "dependencies": { + "readable-stream": "^2.0.5" + }, "engines": { - "node": ">= 8" + "node": ">= 0.6.3" } }, - "node_modules/micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "node_modules/lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==", "dev": true, "dependencies": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" + "invert-kv": "^1.0.0" }, "engines": { - "node": ">=8.6" + "node": ">=0.10.0" } }, - "node_modules/micromatch/node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "node_modules/lead": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", + "integrity": "sha512-IpSVCk9AYvLHo5ctcIXxOBpMWUe+4TKN3VPWAKUbJikkmsGp0VrSM8IttVc32D6J4WUsiPE6aEFRNmIoF/gdow==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "flush-write-stream": "^1.0.2" }, "engines": { - "node": ">=8" + "node": ">= 0.10" } }, - "node_modules/micromatch/node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", "dev": true, "dependencies": { - "to-regex-range": "^5.0.1" + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" }, "engines": { - "node": ">=8" + "node": ">= 0.8.0" } }, - "node_modules/micromatch/node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "node_modules/liftoff": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz", + "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==", "dev": true, + "dependencies": { + "extend": "^3.0.0", + "findup-sync": "^3.0.0", + "fined": "^1.0.1", + "flagged-respawn": "^1.0.0", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" + }, "engines": { - "node": ">=0.12.0" + "node": ">= 0.8" } }, - "node_modules/micromatch/node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "node_modules/liftoff/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "dependencies": { - "is-number": "^7.0.0" + "isobject": "^3.0.1" }, "engines": { - "node": ">=8.0" + "node": ">=0.10.0" } }, - "node_modules/mime-db": { - "version": "1.50.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz", - "integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==", - "dev": true, - "engines": { - "node": ">= 0.6" - } + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true }, - "node_modules/mime-types": { - "version": "2.1.33", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz", - "integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==", + "node_modules/load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", "dev": true, "dependencies": { - "mime-db": "1.50.0" + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" }, "engines": { - "node": ">= 0.6" + "node": ">=4" } }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "node_modules/load-json-file/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", "dev": true, "engines": { - "node": ">=6" + "node": ">=4" } }, - "node_modules/mimic-response": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", - "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/min-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA==", + "dev": true + }, + "node_modules/lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", + "dev": true + }, + "node_modules/lodash.ismatch": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", + "integrity": "sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g==", + "dev": true + }, + "node_modules/lodash.template": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", + "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", "dev": true, - "engines": { - "node": ">=4" + "dependencies": { + "lodash._reinterpolate": "^3.0.0", + "lodash.templatesettings": "^4.0.0" } }, - "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "node_modules/lodash.templatesettings": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz", + "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==", + "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" + "lodash._reinterpolate": "^3.0.0" } }, - "node_modules/minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true - }, - "node_modules/minimist-options": { + "node_modules/log-symbols": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", - "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "dev": true, "dependencies": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0", - "kind-of": "^6.0.3" + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" }, "engines": { - "node": ">= 6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/minimist-options/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "node_modules/long": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.1.tgz", + "integrity": "sha512-GKSNGeNAtw8IryjjkhZxuKB3JzlcLTwjtiQCHKvqQet81I93kXslhDQruGI/QsddO83mcDToBVy7GqGS/zYf/A==", + "dev": true + }, + "node_modules/loupe": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", + "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", "dev": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "get-func-name": "^2.0.0" } }, - "node_modules/minipass": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.5.tgz", - "integrity": "sha512-+8NzxD82XQoNKNrl1d/FSi+X8wAEWR+sbYAfIvub4Nz0d22plFG72CEVVaufV8PNf4qSslFTD8VMOxNVhHCjTw==", + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "dependencies": { "yallist": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "node_modules/minipass-collect": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", - "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", + "node_modules/lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==", "dev": true, - "optional": true, "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" + "es5-ext": "~0.10.2" } }, - "node_modules/minipass-fetch": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz", - "integrity": "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==", + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", "dev": true, - "optional": true, "dependencies": { - "minipass": "^3.1.0", - "minipass-sized": "^1.0.3", - "minizlib": "^2.0.0" + "semver": "^6.0.0" }, "engines": { "node": ">=8" }, - "optionalDependencies": { - "encoding": "^0.1.12" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/minipass-flush": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", - "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "node_modules/make-fetch-happen": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz", + "integrity": "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==", "dev": true, "optional": true, "dependencies": { - "minipass": "^3.0.0" + "agentkeepalive": "^4.1.3", + "cacache": "^15.2.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^6.0.0", + "minipass": "^3.1.3", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^1.3.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.2", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^6.0.0", + "ssri": "^8.0.0" }, "engines": { - "node": ">= 8" + "node": ">= 10" } }, - "node_modules/minipass-pipeline": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", - "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "node_modules/make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", "dev": true, - "optional": true, "dependencies": { - "minipass": "^3.0.0" + "kind-of": "^6.0.2" }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/minipass-sized": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", - "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "node_modules/make-iterator/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true, - "optional": true, - "dependencies": { - "minipass": "^3.0.0" - }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "node_modules/map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", "dev": true, - "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, "engines": { - "node": ">= 8" + "node": ">=0.10.0" } }, - "node_modules/mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "node_modules/map-obj": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha512-4y7uGv8bd2WdM9vpQsiQNo41Ln1NvhvDRuVt0k2JZQ+ezN2uaQes7lZeZ+QQUHOLQAtDaBJ+7wCbi+ab/KFs+w==", "dev": true, "dependencies": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" + "object-visit": "^1.0.0" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/mixin-deep/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "node_modules/matchdep": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz", + "integrity": "sha512-LFgVbaHIHMqCRuCZyfCtUOq9/Lnzhi7Z0KFUE2fhD54+JN2jLh3hC02RLkqauJ3U4soU6H1J3tfj/Byk7GoEjA==", "dev": true, "dependencies": { - "is-plain-object": "^2.0.4" + "findup-sync": "^2.0.0", + "micromatch": "^3.0.4", + "resolve": "^1.4.0", + "stack-trace": "0.0.10" }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/matchdep/node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", + "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/mixin-deep/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "node_modules/matchdep/node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "dev": true, "dependencies": { + "is-descriptor": "^1.0.2", "isobject": "^3.0.1" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "bin": { - "mkdirp": "bin/cmd.js" + "node_modules/matchdep/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" }, "engines": { - "node": ">=10" + "node": ">=0.10.0" } }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "dev": true - }, - "node_modules/mocha": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz", - "integrity": "sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ==", + "node_modules/matchdep/node_modules/findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha512-vs+3unmJT45eczmcAZ6zMJtxN3l/QXeccaXQx5cu/MeJMhewVfoWZqibRkOxPnmoR59+Zy5hjabfQc6JLSah4g==", "dev": true, "dependencies": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.1", - "debug": "4.3.1", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.1.6", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "4.0.0", - "log-symbols": "4.0.0", - "minimatch": "3.0.4", - "ms": "2.1.3", - "nanoid": "3.1.20", - "serialize-javascript": "5.0.1", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "which": "2.0.2", - "wide-align": "1.1.3", - "workerpool": "6.1.0", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha" + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" }, "engines": { - "node": ">= 10.12.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" + "node": ">= 0.10" } }, - "node_modules/mocha/node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "node_modules/matchdep/node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" + "kind-of": "^6.0.0" }, "engines": { - "node": ">= 8" + "node": ">=0.10.0" } }, - "node_modules/mocha/node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "node_modules/matchdep/node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/mocha/node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "node_modules/matchdep/node_modules/is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/mocha/node_modules/chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", + "node_modules/matchdep/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "dependencies": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" + "is-plain-object": "^2.0.4" }, "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.1" + "node": ">=0.10.0" } }, - "node_modules/mocha/node_modules/debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "node_modules/matchdep/node_modules/is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha512-UFpDDrPgM6qpnFNI+rh/p3bUaq9hKLZN8bMUWzxmcnZVS3omf4IPK+BrewlnWjO1WmUsMYuSjKh4UJuV4+Lqmw==", "dev": true, "dependencies": { - "ms": "2.1.2" + "is-extglob": "^2.1.0" }, "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "node": ">=0.10.0" } }, - "node_modules/mocha/node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/mocha/node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "node_modules/matchdep/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "dependencies": { - "to-regex-range": "^5.0.1" + "isobject": "^3.0.1" }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/mocha/node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "node_modules/matchdep/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + "node": ">=0.10.0" } }, - "node_modules/mocha/node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "node_modules/matchdep/node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" }, "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=0.10.0" } }, - "node_modules/mocha/node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "node_modules/matchdep/node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", "dev": true, "dependencies": { - "binary-extensions": "^2.0.0" + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" }, - "engines": { - "node": ">=8" + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mocha/node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "node_modules/memoizee": { + "version": "0.4.15", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", + "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", "dev": true, - "engines": { - "node": ">=0.12.0" + "dependencies": { + "d": "^1.0.1", + "es5-ext": "^0.10.53", + "es6-weak-map": "^2.0.3", + "event-emitter": "^0.3.5", + "is-promise": "^2.2.2", + "lru-queue": "^0.1.0", + "next-tick": "^1.1.0", + "timers-ext": "^0.1.7" } }, - "node_modules/mocha/node_modules/js-yaml": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", - "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", + "node_modules/memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", + "dev": true, + "optional": true + }, + "node_modules/meow": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", + "integrity": "sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==", "dev": true, "dependencies": { - "argparse": "^2.0.1" + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mocha/node_modules/log-symbols": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", - "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "node_modules/meow/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "dependencies": { - "chalk": "^4.0.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=10" + "node": ">=8" } }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "node_modules/meow/node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, - "node_modules/mocha/node_modules/readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", + "node_modules/meow/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "dependencies": { - "picomatch": "^2.2.1" + "p-locate": "^4.1.0" }, "engines": { - "node": ">=8.10.0" + "node": ">=8" } }, - "node_modules/mocha/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "node_modules/meow/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "p-try": "^2.0.0" }, "engines": { - "node": ">=10" + "node": ">=6" }, "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mocha/node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "node_modules/meow/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "dependencies": { - "is-number": "^7.0.0" + "p-limit": "^2.2.0" }, "engines": { - "node": ">=8.0" + "node": ">=8" } }, - "node_modules/mocha/node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "node_modules/meow/node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "dev": true, "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" }, "engines": { - "node": ">=10" - } - }, - "node_modules/mocha/node_modules/yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true, - "engines": { - "node": ">=10" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/modify-values": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz", - "integrity": "sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==", + "node_modules/meow/node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", "dev": true, + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/mongodb": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.7.1.tgz", - "integrity": "sha512-iSVgexYr8ID0ieeNFUbRfQeOZxOchRck6kEDVySQRaa8VIw/1Pm+/LgcpZcl/BWV6nT0L8lP9qyl7dRPJ6mnLw==", + "node_modules/meow/node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", "dev": true, "dependencies": { - "bl": "^2.2.1", - "bson": "^1.1.4", - "denque": "^1.4.1", - "optional-require": "^1.0.3", - "safe-buffer": "^5.1.2" + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" }, "engines": { - "node": ">=4" - }, - "optionalDependencies": { - "saslprep": "^1.0.0" + "node": ">=8" }, - "peerDependenciesMeta": { - "aws4": { - "optional": true - }, - "bson-ext": { - "optional": true - }, - "kerberos": { - "optional": true - }, - "mongodb-client-encryption": { - "optional": true - }, - "mongodb-extjson": { - "optional": true - }, - "snappy": { - "optional": true - } + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/msal": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/msal/-/msal-1.4.15.tgz", - "integrity": "sha512-H/CxkeZJ4laEK6GZ/cDKQoYjBTvDNFK3hDC8mfU8IkuZvKFfFdo9KM89r8spXY7xnBK9SQBAjIuQgwUogeUw7g==", + "node_modules/meow/node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true, - "dependencies": { - "tslib": "^1.9.3" - }, "engines": { - "node": ">=0.8.0" + "node": ">=8" } }, - "node_modules/msal/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/mssql": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/mssql/-/mssql-7.3.0.tgz", - "integrity": "sha512-3NGxDomH5Lci2g0EUrsejHIsvtFwlIE6A9SNFWQ2/JD4Dh0+5XVFHeyB4RXKb+nRMDosSUBAQDIVSuLXo5XFZA==", + "node_modules/meow/node_modules/read-pkg/node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, "dependencies": { - "@tediousjs/connection-string": "^0.3.0", - "debug": "^4.3.2", - "rfdc": "^1.3.0", - "tarn": "^3.0.1", - "tedious": "^11.4.0" - }, - "bin": { - "mssql": "bin/mssql" - }, - "engines": { - "node": ">=10" + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, - "node_modules/mute-stdout": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz", - "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==", + "node_modules/meow/node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", "dev": true, "engines": { - "node": ">= 0.10" + "node": ">=8" } }, - "node_modules/mysql": { - "version": "2.18.1", - "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz", - "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==", + "node_modules/meow/node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", "dev": true, "dependencies": { - "bignumber.js": "9.0.0", - "readable-stream": "2.3.7", - "safe-buffer": "5.1.2", - "sqlstring": "2.3.1" + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mysql2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-2.3.0.tgz", - "integrity": "sha512-0t5Ivps5Tdy5YHk5NdKwQhe/4Qyn2pload+S+UooDBvsqngtzujG1BaTWBihQLfeKO3t3122/GtusBtmHEHqww==", - "dev": true, - "dependencies": { - "denque": "^1.4.1", - "generate-function": "^2.3.1", - "iconv-lite": "^0.6.2", - "long": "^4.0.0", - "lru-cache": "^6.0.0", - "named-placeholders": "^1.1.2", - "seq-queue": "^0.0.5", - "sqlstring": "^2.3.2" + "bin": { + "resolve": "bin/resolve" }, - "engines": { - "node": ">= 8.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/mysql2/node_modules/sqlstring": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.2.tgz", - "integrity": "sha512-vF4ZbYdKS8OnoJAWBmMxCQDkiEBkGQYU7UZPtL8flbDRSNkhaXvRJ279ZtI6M+zDaQovVU4tuRgzK5fVhvFAhg==", + "node_modules/meow/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "dependencies": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" + "bin": { + "semver": "bin/semver" } }, - "node_modules/named-placeholders": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.2.tgz", - "integrity": "sha512-wiFWqxoLL3PGVReSZpjLVxyJ1bRqe+KKJVbr4hGs1KWfTZTQyezHFBbuKj9hsizHyGV2ne7EMjHdxEGAybD5SA==", + "node_modules/meow/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true, - "dependencies": { - "lru-cache": "^4.1.3" - }, "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/named-placeholders/node_modules/lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "dependencies": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "node": ">=10" } }, - "node_modules/named-placeholders/node_modules/yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, - "node_modules/nan": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", - "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==", - "dev": true, - "optional": true - }, - "node_modules/nanocolors": { - "version": "0.2.12", - "resolved": "https://registry.npmjs.org/nanocolors/-/nanocolors-0.2.12.tgz", - "integrity": "sha512-SFNdALvzW+rVlzqexid6epYdt8H9Zol7xDoQarioEFcFN0JHo4CYNztAxmtfgGTVRCmFlEOqqhBpoFGKqSAMug==", + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, - "node_modules/nanoid": { - "version": "3.1.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", - "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + "node": ">= 8" } }, - "node_modules/nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" + "braces": "^3.0.2", + "picomatch": "^2.3.1" }, "engines": { - "node": ">=0.10.0" + "node": ">=8.6" } }, - "node_modules/nanomatch/node_modules/define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "node_modules/micromatch/node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "dependencies": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" + "fill-range": "^7.0.1" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/nanomatch/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "node_modules/micromatch/node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" + "to-regex-range": "^5.0.1" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/nanomatch/node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "node_modules/micromatch/node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, "engines": { - "node": ">=0.10.0" + "node": ">=0.12.0" } }, - "node_modules/nanomatch/node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "node_modules/micromatch/node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "dependencies": { - "kind-of": "^6.0.0" + "is-number": "^7.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8.0" } }, - "node_modules/nanomatch/node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true, - "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.6" } }, - "node_modules/nanomatch/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, "dependencies": { - "is-plain-object": "^2.0.4" + "mime-db": "1.52.0" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.6" } }, - "node_modules/nanomatch/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, "engines": { - "node": ">=0.10.0" + "node": ">=6" } }, - "node_modules/nanomatch/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/napi-build-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", - "dev": true - }, - "node_modules/native-duplexpair": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/native-duplexpair/-/native-duplexpair-1.0.0.tgz", - "integrity": "sha1-eJkHjmS/PIo9cyYBs9QP8F21j6A=", - "dev": true - }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", "dev": true, - "optional": true, "engines": { - "node": ">= 0.6" + "node": ">=4" } }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "node_modules/next-tick": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", - "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", - "dev": true - }, - "node_modules/nise": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/nise/-/nise-4.1.0.tgz", - "integrity": "sha512-eQMEmGN/8arp0xsvGoQ+B1qvSkR73B1nWSCh7nOt5neMCtwcQVYQGdzQMhcNscktTsWB54xnlSQFzOAPJD8nXA==", - "dev": true, + "node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dependencies": { - "@sinonjs/commons": "^1.7.0", - "@sinonjs/fake-timers": "^6.0.0", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" } }, - "node_modules/node-abi": { - "version": "2.30.1", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz", - "integrity": "sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w==", + "node_modules/minimist": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", "dev": true, - "dependencies": { - "semver": "^5.4.1" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/node-abi/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "node_modules/minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", "dev": true, - "bin": { - "semver": "bin/semver" + "dependencies": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" + }, + "engines": { + "node": ">= 6" } }, - "node_modules/node-abort-controller": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-2.0.0.tgz", - "integrity": "sha512-L8RfEgjBTHAISTuagw51PprVAqNZoG6KSB6LQ6H1bskMVkFs5E71IyjauLBv3XbuomJlguWF/VnRHdJ1gqiAqA==", - "dev": true - }, - "node_modules/node-addon-api": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", - "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", - "dev": true, - "optional": true - }, - "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "node_modules/minimist-options/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true, - "dependencies": { - "whatwg-url": "^5.0.0" - }, "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } + "node": ">=0.10.0" } }, - "node_modules/node-gyp": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz", - "integrity": "sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==", + "node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, - "optional": true, "dependencies": { - "env-paths": "^2.2.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.6", - "make-fetch-happen": "^9.1.0", - "nopt": "^5.0.0", - "npmlog": "^6.0.0", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.2", - "which": "^2.0.2" - }, - "bin": { - "node-gyp": "bin/node-gyp.js" + "yallist": "^4.0.0" }, "engines": { - "node": ">= 10.12.0" + "node": ">=8" } }, - "node_modules/node-gyp/node_modules/are-we-there-yet": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.0.tgz", - "integrity": "sha512-0GWpv50YSOcLXaN6/FAKY3vfRbllXWV2xvfA/oKJF8pzFhWXPV+yjhJXDBbjscDYowv7Yw1A3uigpzn5iEGTyw==", + "node_modules/minipass-collect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", "dev": true, "optional": true, "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" + "minipass": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16" + "node": ">= 8" } }, - "node_modules/node-gyp/node_modules/gauge": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", - "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", + "node_modules/minipass-fetch": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz", + "integrity": "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==", "dev": true, "optional": true, "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.3", - "console-control-strings": "^1.1.0", - "has-unicode": "^2.0.1", - "signal-exit": "^3.0.7", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.5" + "minipass": "^3.1.0", + "minipass-sized": "^1.0.3", + "minizlib": "^2.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=8" + }, + "optionalDependencies": { + "encoding": "^0.1.12" } }, - "node_modules/node-gyp/node_modules/nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", "dev": true, "optional": true, "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" + "minipass": "^3.0.0" }, "engines": { - "node": ">=6" + "node": ">= 8" } }, - "node_modules/node-gyp/node_modules/npmlog": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", - "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", "dev": true, "optional": true, "dependencies": { - "are-we-there-yet": "^3.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^4.0.3", - "set-blocking": "^2.0.0" + "minipass": "^3.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=8" } }, - "node_modules/node-gyp/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", "dev": true, "optional": true, "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "minipass": "^3.0.0" }, "engines": { - "node": ">= 6" + "node": ">=8" } }, - "node_modules/node-gyp/node_modules/wide-align": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", - "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", "dev": true, - "optional": true, "dependencies": { - "string-width": "^1.0.2 || 2 || 3 || 4" + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" } }, - "node_modules/nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "node_modules/mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", "dev": true, "dependencies": { - "abbrev": "1" + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" }, - "bin": { - "nopt": "bin/nopt.js" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/normalize-package-data": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", - "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", + "node_modules/mixin-deep/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "dependencies": { - "hosted-git-info": "^4.0.1", - "is-core-module": "^2.5.0", - "semver": "^7.3.4", - "validate-npm-package-license": "^3.0.1" + "is-plain-object": "^2.0.4" }, "engines": { - "node": ">=10" + "node": ">=0.10.0" } }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "node_modules/mixin-deep/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/now-and-later": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", - "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", - "dev": true, - "dependencies": { - "once": "^1.3.2" + "node_modules/mkdirp": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.3.tgz", + "integrity": "sha512-sjAkg21peAG9HS+Dkx7hlG9Ztx7HLeKnvB3NQRcu/mltCVmvkF0pisbiTSfDVYTT86XEfZrTUosLdZLStquZUw==", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" }, "engines": { - "node": ">= 0.10" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true + }, + "node_modules/mocha": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", + "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", "dev": true, "dependencies": { - "path-key": "^3.0.0" + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" }, "engines": { - "node": ">=8" + "node": ">= 14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" } }, - "node_modules/npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "node_modules/mocha/node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true, - "dependencies": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" + "engines": { + "node": ">=6" } }, - "node_modules/number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "node_modules/mocha/node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, "engines": { - "node": ">=0.10.0" + "node": ">= 8" } }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "node_modules/mocha/node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "node_modules/mocha/node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, "dependencies": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" + "fill-range": "^7.0.1" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/object-copy/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "node_modules/mocha/node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], "dependencies": { - "is-buffer": "^1.1.5" + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" }, "engines": { - "node": ">=0.10.0" + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" } }, - "node_modules/object-inspect": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", - "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", + "node_modules/mocha/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" } }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "node_modules/mocha/node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, "engines": { - "node": ">= 0.4" + "node": ">=8" } }, - "node_modules/object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "node_modules/mocha/node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, - "dependencies": { - "isobject": "^3.0.0" - }, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=0.10.0" + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "node_modules/mocha/node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">= 0.4" + "node": "*" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/object.defaults": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", - "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "node_modules/mocha/node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "array-each": "^1.0.1", - "array-slice": "^1.0.0", - "for-own": "^1.0.0", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/object.map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", - "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", + "node_modules/mocha/node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=0.10.0" + "node": "*" } }, - "node_modules/object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "node_modules/mocha/node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, "dependencies": { - "isobject": "^3.0.1" + "binary-extensions": "^2.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/object.reduce": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz", - "integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60=", + "node_modules/mocha/node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, - "dependencies": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - }, "engines": { - "node": ">=0.10.0" + "node": ">=0.12.0" } }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "node_modules/mocha/node_modules/minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "dev": true, "dependencies": { - "wrappy": "1" + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" } }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "node_modules/mocha/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/mocha/node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, "dependencies": { - "mimic-fn": "^2.1.0" + "picomatch": "^2.2.1" }, "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8.10.0" } }, - "node_modules/open": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", - "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", + "node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "dependencies": { - "is-docker": "^2.0.0", - "is-wsl": "^2.1.1" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/optional-require": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/optional-require/-/optional-require-1.1.8.tgz", - "integrity": "sha512-jq83qaUb0wNg9Krv1c5OQ+58EK+vHde6aBPzLvPPqJm89UQWsvSuFy9X/OSNJnFeSOKo7btE0n8Nl2+nE+z5nA==", + "node_modules/mocha/node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, "dependencies": { - "require-at": "^1.0.6" + "is-number": "^7.0.0" }, "engines": { - "node": ">=4" + "node": ">=8.0" } }, - "node_modules/oracledb": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/oracledb/-/oracledb-5.2.0.tgz", - "integrity": "sha512-gHOWTM6ILKOGVH3Z+11Cnpls8XWW7sZUoBrbQWvspYOGpkvJ+TKRr1OdVS21EyeAtfMzXePDrSvG/Mlp/fxOVA==", - "hasInstallScript": true, - "optional": true, - "peer": true, + "node_modules/mocha/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, "engines": { - "node": ">=10.16" + "node": ">=10" } }, - "node_modules/ordered-read-streams": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", - "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=", + "node_modules/mocha/node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "dev": true, - "dependencies": { - "readable-stream": "^2.0.1" + "engines": { + "node": ">=10" } }, - "node_modules/os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "node_modules/modify-values": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz", + "integrity": "sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==", "dev": true, - "dependencies": { - "lcid": "^1.0.0" - }, "engines": { "node": ">=0.10.0" } }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "node_modules/mongodb": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-5.4.0.tgz", + "integrity": "sha512-6GDKgO7WiYUw+ILap143VXfAou06hjxDGgYUZWGnI4hgoZfP3el0G3l69JqJF8SEQbZmC+SN/2a0aWI/aWJoxA==", "dev": true, "dependencies": { - "yocto-queue": "^0.1.0" + "bson": "^5.2.0", + "mongodb-connection-string-url": "^2.6.0", + "socks": "^2.7.1" }, "engines": { - "node": ">=10" + "node": ">=14.20.1" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "optionalDependencies": { + "saslprep": "^1.0.3" + }, + "peerDependencies": { + "@aws-sdk/credential-providers": "^3.201.0", + "mongodb-client-encryption": ">=2.3.0 <3", + "snappy": "^7.2.2" + }, + "peerDependenciesMeta": { + "@aws-sdk/credential-providers": { + "optional": true + }, + "mongodb-client-encryption": { + "optional": true + }, + "snappy": { + "optional": true + } } }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "node_modules/mongodb-connection-string-url": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.6.0.tgz", + "integrity": "sha512-WvTZlI9ab0QYtTYnuMLgobULWhokRjtC7db9LtcVfJ+Hsnyr5eo6ZtNAt3Ly24XZScGMelOcGtm7lSn0332tPQ==", "dev": true, "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "@types/whatwg-url": "^8.2.1", + "whatwg-url": "^11.0.0" } }, - "node_modules/p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "node_modules/mongodb-connection-string-url/node_modules/tr46": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", "dev": true, "dependencies": { - "aggregate-error": "^3.0.0" + "punycode": "^2.1.1" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=12" } }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "node_modules/mongodb-connection-string-url/node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", "dev": true, "engines": { - "node": ">=6" + "node": ">=12" } }, - "node_modules/packet-reader": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz", - "integrity": "sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==", - "dev": true - }, - "node_modules/parse-filepath": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", - "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", + "node_modules/mongodb-connection-string-url/node_modules/whatwg-url": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", "dev": true, "dependencies": { - "is-absolute": "^1.0.0", - "map-cache": "^0.2.0", - "path-root": "^0.1.1" + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" }, "engines": { - "node": ">=0.8" + "node": ">=12" } }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/mssql": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/mssql/-/mssql-9.1.1.tgz", + "integrity": "sha512-m0yTx9xzUtTvJpWJHqknUXUDPRnJXZYOOFNygnNIXn1PBkLsC/rkXQdquObd+M0ZPlBhGC00Jg28zG0wCl7VWg==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" + "@tediousjs/connection-string": "^0.4.1", + "commander": "^9.4.0", + "debug": "^4.3.3", + "rfdc": "^1.3.0", + "tarn": "^3.0.2", + "tedious": "^15.0.1" }, - "engines": { - "node": ">=8" + "bin": { + "mssql": "bin/mssql" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=10" } }, - "node_modules/parse-node-version": { + "node_modules/mute-stdout": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", - "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz", + "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==", "dev": true, "engines": { "node": ">= 0.10" } }, - "node_modules/parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "node_modules/mysql": { + "version": "2.18.1", + "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz", + "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==", "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/parse5": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", - "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==" - }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", - "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", "dependencies": { - "parse5": "^6.0.1" + "bignumber.js": "9.0.0", + "readable-stream": "2.3.7", + "safe-buffer": "5.1.2", + "sqlstring": "2.3.1" + }, + "engines": { + "node": ">= 0.6" } }, - "node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" + "node_modules/mysql/node_modules/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 }, - "node_modules/pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "node_modules/mysql2": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.1.1.tgz", + "integrity": "sha512-mXz4wEj7AIKPdHQJLJcvq8GJ75BDMH9K4V8Lthra8WH7o/xjV6TXp+dXAXDaMFkLa8YhdZr5X6rxIGQSHPPfhg==", "dev": true, + "dependencies": { + "denque": "^2.1.0", + "generate-function": "^2.3.1", + "iconv-lite": "^0.6.3", + "long": "^5.2.1", + "lru-cache": "^7.14.1", + "named-placeholders": "^1.1.3", + "seq-queue": "^0.0.5", + "sqlstring": "^2.3.2" + }, "engines": { - "node": ">=0.10.0" + "node": ">= 8.0" } }, - "node_modules/path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "node_modules/mysql2/node_modules/denque": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz", + "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==", "dev": true, "engines": { - "node": ">=8" + "node": ">=0.10" } }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "node_modules/mysql2/node_modules/lru-cache": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", + "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=12" } }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "node_modules/mysql2/node_modules/sqlstring": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", + "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", "dev": true, "engines": { - "node": ">=8" + "node": ">= 0.6" } }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } }, - "node_modules/path-root": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", - "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "node_modules/named-placeholders": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.3.tgz", + "integrity": "sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==", "dev": true, "dependencies": { - "path-root-regex": "^0.1.0" + "lru-cache": "^7.14.1" }, "engines": { - "node": ">=0.10.0" + "node": ">=12.0.0" } }, - "node_modules/path-root-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", - "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", + "node_modules/named-placeholders/node_modules/lru-cache": { + "version": "7.14.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz", + "integrity": "sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=12" } }, - "node_modules/path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "node_modules/nan": { + "version": "2.17.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", + "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", "dev": true, - "dependencies": { - "isarray": "0.0.1" - } + "optional": true }, - "node_modules/path-to-regexp/node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/pg": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/pg/-/pg-8.7.1.tgz", - "integrity": "sha512-7bdYcv7V6U3KAtWjpQJJBww0UEsWuh4yQ/EjNf2HeO/NnvKjpvhEIe/A/TleP6wtmSKnUnghs5A9jUoK6iDdkA==", + "node_modules/nanoid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", "dev": true, - "dependencies": { - "buffer-writer": "2.0.0", - "packet-reader": "1.0.0", - "pg-connection-string": "^2.5.0", - "pg-pool": "^3.4.1", - "pg-protocol": "^1.5.0", - "pg-types": "^2.1.0", - "pgpass": "1.x" - }, - "engines": { - "node": ">= 8.0.0" - }, - "peerDependencies": { - "pg-native": ">=2.0.0" + "bin": { + "nanoid": "bin/nanoid.cjs" }, - "peerDependenciesMeta": { - "pg-native": { - "optional": true - } - } - }, - "node_modules/pg-connection-string": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.5.0.tgz", - "integrity": "sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ==", - "dev": true - }, - "node_modules/pg-cursor": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/pg-cursor/-/pg-cursor-2.7.1.tgz", - "integrity": "sha512-dtxtyvx4BcSammddki27KPBVA0sZ8AguLabgs7++gqaefX7dlQ5zaRlk1Gi5mvyO25aCmHFAZyNq9zYtPDwFTA==", - "dev": true, - "peerDependencies": { - "pg": "^8" - } - }, - "node_modules/pg-int8": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", - "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", - "dev": true, "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/pg-pool": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.4.1.tgz", - "integrity": "sha512-TVHxR/gf3MeJRvchgNHxsYsTCHQ+4wm3VIHSS19z8NC0+gioEhq1okDY1sm/TYbfoP6JLFx01s0ShvZ3puP/iQ==", - "dev": true, - "peerDependencies": { - "pg": ">=8.0" - } - }, - "node_modules/pg-protocol": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.5.0.tgz", - "integrity": "sha512-muRttij7H8TqRNu/DxrAJQITO4Ac7RmX3Klyr/9mJEOBeIpgnF8f9jAfRz5d3XwQZl5qBjF9gLsUtMPJE0vezQ==", - "dev": true - }, - "node_modules/pg-query-stream": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/pg-query-stream/-/pg-query-stream-4.2.1.tgz", - "integrity": "sha512-8rOjGPgerzYmfRnX/EYhWiI7OVI17BGM3PxsI8o/Ot8IDyFMy8cf2xG5S9XpVPgkAjBs8c47vSclKuJqlN2c9g==", - "dev": true, - "dependencies": { - "pg-cursor": "^2.7.1" + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/pg-types": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", - "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "node_modules/nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", "dev": true, "dependencies": { - "pg-int8": "1.0.1", - "postgres-array": "~2.0.0", - "postgres-bytea": "~1.0.0", - "postgres-date": "~1.0.4", - "postgres-interval": "^1.1.0" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" }, "engines": { - "node": ">=4" - } - }, - "node_modules/pgpass": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.4.tgz", - "integrity": "sha512-YmuA56alyBq7M59vxVBfPJrGSozru8QAdoNlWuW3cz8l+UX3cWge0vTvjKhsSHSJpo3Bom8/Mm6hf0TR5GY0+w==", - "dev": true, - "dependencies": { - "split2": "^3.1.1" - } - }, - "node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "node": ">=0.10.0" } }, - "node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "node_modules/nanomatch/node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "node_modules/nanomatch/node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "dev": true, + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "node_modules/nanomatch/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", "dev": true, "dependencies": { - "pinkie": "^2.0.0" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/plugin-error": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", - "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", + "node_modules/nanomatch/node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "dependencies": { - "ansi-colors": "^1.0.1", - "arr-diff": "^4.0.0", - "arr-union": "^3.1.0", - "extend-shallow": "^3.0.2" + "kind-of": "^6.0.0" }, "engines": { - "node": ">= 0.10" + "node": ">=0.10.0" } }, - "node_modules/plugin-error/node_modules/ansi-colors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", - "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", + "node_modules/nanomatch/node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "dependencies": { - "ansi-wrap": "^0.1.0" + "kind-of": "^6.0.0" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/plugin-error/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "node_modules/nanomatch/node_modules/is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/plugin-error/node_modules/is-extendable": { + "node_modules/nanomatch/node_modules/is-extendable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", @@ -9163,7 +9220,7 @@ "node": ">=0.10.0" } }, - "node_modules/plugin-error/node_modules/is-plain-object": { + "node_modules/nanomatch/node_modules/is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", @@ -9175,1535 +9232,1575 @@ "node": ">=0.10.0" } }, - "node_modules/posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "node_modules/nanomatch/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/postcss": { - "version": "7.0.38", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.38.tgz", - "integrity": "sha512-wNrSHWjHDQJR/IZL5IKGxRtFgrYNaAA/UrkW2WqbtZO6uxSLMxMN+s2iqUMwnAWm3fMROlDYZB41dr0Mt7vBwQ==", - "dev": true, - "dependencies": { - "nanocolors": "^0.2.2", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=6.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } + "node_modules/napi-build-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", + "dev": true }, - "node_modules/postgres-array": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", - "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", + "node_modules/native-duplexpair": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/native-duplexpair/-/native-duplexpair-1.0.0.tgz", + "integrity": "sha512-E7QQoM+3jvNtlmyfqRZ0/U75VFgCls+fSkbml2MpgWkWyz3ox8Y58gNhfuziuQYGNNQAbFZJQck55LHCnCK6CA==", + "dev": true + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", "dev": true, + "optional": true, "engines": { - "node": ">=4" + "node": ">= 0.6" } }, - "node_modules/postgres-bytea": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", - "integrity": "sha1-AntTPAqokOJtFy1Hz5zOzFIazTU=", + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node_modules/next-tick": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", + "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", + "dev": true + }, + "node_modules/nise": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.4.tgz", + "integrity": "sha512-8+Ib8rRJ4L0o3kfmyVCL7gzrohyDe0cMFTBa2d364yIrEGMEoetznKJx899YxjybU6bL9SQkYPSBBs1gyYs8Xg==", "dev": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "@sinonjs/commons": "^2.0.0", + "@sinonjs/fake-timers": "^10.0.2", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "path-to-regexp": "^1.7.0" } }, - "node_modules/postgres-date": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", - "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", + "node_modules/node-abi": { + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.32.0.tgz", + "integrity": "sha512-HkwdiLzE/LeuOMIQq/dJq70oNyRc88+wt5CH/RXYseE00LkA/c4PkS6Ti1vE4OHYUiKjkwuxjWq9pItgrz8UJw==", "dev": true, + "dependencies": { + "semver": "^7.3.5" + }, "engines": { - "node": ">=0.10.0" + "node": ">=10" } }, - "node_modules/postgres-interval": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", - "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "node_modules/node-abi/node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, "dependencies": { - "xtend": "^4.0.0" + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": ">=0.10.0" + "node": ">=10" } }, - "node_modules/prebuild-install": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.1.4.tgz", - "integrity": "sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ==", + "node_modules/node-abort-controller": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", + "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==", + "dev": true + }, + "node_modules/node-addon-api": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz", + "integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==", + "dev": true + }, + "node_modules/node-fetch": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz", + "integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==", "dev": true, "dependencies": { - "detect-libc": "^1.0.3", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^1.0.1", - "node-abi": "^2.21.0", - "npmlog": "^4.0.1", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^3.0.3", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - }, - "bin": { - "prebuild-install": "bin.js" + "whatwg-url": "^5.0.0" }, "engines": { - "node": ">=6" + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } } }, - "node_modules/prettier": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz", - "integrity": "sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==", + "node_modules/node-gyp": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz", + "integrity": "sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==", "dev": true, + "optional": true, + "dependencies": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^9.1.0", + "nopt": "^5.0.0", + "npmlog": "^6.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^2.0.2" + }, "bin": { - "prettier": "bin-prettier.js" + "node-gyp": "bin/node-gyp.js" }, "engines": { - "node": ">=10.13.0" + "node": ">= 10.12.0" } }, - "node_modules/pretty-hrtime": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", - "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", + "node_modules/node-gyp/node_modules/are-we-there-yet": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", + "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", "dev": true, + "optional": true, + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, "engines": { - "node": ">= 0.8" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "node_modules/node-gyp/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "engines": { - "node": ">= 0.6.0" + "optional": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "node_modules/promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", - "dev": true, - "optional": true - }, - "node_modules/promise-retry": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", - "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", + "node_modules/node-gyp/node_modules/gauge": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", + "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", "dev": true, "optional": true, "dependencies": { - "err-code": "^2.0.2", - "retry": "^0.12.0" + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" }, "engines": { - "node": ">=10" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "node_modules/psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "dev": true - }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "node_modules/node-gyp/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "dev": true, + "optional": true, "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "node_modules/node-gyp/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "optional": true, "dependencies": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" } }, - "node_modules/pumpify/node_modules/pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "node_modules/node-gyp/node_modules/nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", "dev": true, + "optional": true, "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, "engines": { "node": ">=6" } }, - "node_modules/q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "node_modules/node-gyp/node_modules/npmlog": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", "dev": true, + "optional": true, + "dependencies": { + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + }, "engines": { - "node": ">=0.6.0", - "teleport": ">=0.2.0" + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" } }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/quick-lru": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "node_modules/node-gyp/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", "dev": true, + "optional": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, "engines": { - "node": ">=8" + "node": ">= 6" } }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "node_modules/node-gyp/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, + "optional": true, "dependencies": { - "safe-buffer": "^5.1.0" + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "node_modules/node-gyp/node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, + "optional": true, "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" + "lru-cache": "^6.0.0" }, "bin": { - "rc": "cli.js" + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, - "node_modules/rc/node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "node_modules/node-gyp/node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", "dev": true, - "engines": { - "node": ">=0.10.0" + "optional": true, + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" } }, - "node_modules/read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "node_modules/nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", "dev": true, "dependencies": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" + "abbrev": "1" }, - "engines": { - "node": ">=4" + "bin": { + "nopt": "bin/nopt.js" } }, - "node_modules/read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "node_modules/normalize-package-data": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", "dev": true, "dependencies": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" + "hosted-git-info": "^4.0.1", + "is-core-module": "^2.5.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" }, "engines": { - "node": ">=4" + "node": ">=10" } }, - "node_modules/read-pkg-up/node_modules/find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "node_modules/normalize-package-data/node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", "dev": true, "dependencies": { - "locate-path": "^2.0.0" + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": ">=4" + "node": ">=10" } }, - "node_modules/read-pkg-up/node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/read-pkg-up/node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "node_modules/now-and-later": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", + "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", "dev": true, "dependencies": { - "p-try": "^1.0.0" + "once": "^1.3.2" }, "engines": { - "node": ">=4" + "node": ">= 0.10" } }, - "node_modules/read-pkg-up/node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, "dependencies": { - "p-limit": "^1.1.0" + "path-key": "^3.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/read-pkg-up/node_modules/p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "node_modules/npmlog": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", + "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", "dev": true, - "engines": { - "node": ">=4" + "dependencies": { + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" } }, - "node_modules/read-pkg-up/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "node_modules/number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", "dev": true, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/read-pkg/node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "node_modules/read-pkg/node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" } }, - "node_modules/read-pkg/node_modules/path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "node_modules/object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==", "dev": true, "dependencies": { - "pify": "^3.0.0" + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" }, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/read-pkg/node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "node_modules/object-copy/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, - "node_modules/read-pkg/node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "node_modules/object-inspect": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", + "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", "dev": true, - "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/read-pkg/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", "dev": true, - "bin": { - "semver": "bin/semver" + "engines": { + "node": ">= 0.4" } }, - "node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "node_modules/object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==", "dev": true, "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "node_modules/object.assign": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", "dev": true, "dependencies": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" }, "engines": { - "node": ">=0.10" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/readdirp/node_modules/define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "node_modules/object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", "dev": true, "dependencies": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/readdirp/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "node_modules/object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", "dev": true, "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/readdirp/node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "node_modules/object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", "dev": true, "dependencies": { - "kind-of": "^6.0.0" + "isobject": "^3.0.1" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/readdirp/node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "node_modules/object.reduce": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz", + "integrity": "sha512-naLhxxpUESbNkRqc35oQ2scZSJueHGQNUfMW/0U37IgN6tE2dgDWg3whf+NEliy3F/QysrO48XKUz/nGPe+AQw==", "dev": true, "dependencies": { - "kind-of": "^6.0.0" + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/readdirp/node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "mimic-fn": "^2.1.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/readdirp/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "node_modules/open": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz", + "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==", "dev": true, "dependencies": { - "is-plain-object": "^2.0.4" + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/readdirp/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "dev": true, "dependencies": { - "isobject": "^3.0.1" + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.8.0" } }, - "node_modules/readdirp/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "node_modules/ordered-read-streams": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", + "integrity": "sha512-Z87aSjx3r5c0ZB7bcJqIgIRX5bxR7A4aSzvIbaxd0oTkWBCOoKfuGHiKj60CHVUgg1Phm5yMZzBdt8XqRs73Mw==", "dev": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "readable-stream": "^2.0.1" } }, - "node_modules/readdirp/node_modules/micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "node_modules/os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==", "dev": true, "dependencies": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" + "lcid": "^1.0.0" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "dependencies": { - "resolve": "^1.1.6" + "yocto-queue": "^0.1.0" }, "engines": { - "node": ">= 0.10" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/redent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", - "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "dependencies": { - "indent-string": "^4.0.0", - "strip-indent": "^3.0.0" + "p-limit": "^3.0.2" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/redis": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/redis/-/redis-3.1.2.tgz", - "integrity": "sha512-grn5KoZLr/qrRQVwoSkmzdbw6pwF+/rwODtrOr6vuBRiR/f3rjSTGupbF90Zpqm2oenix8Do6RV7pYEkGwlKkw==", + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", "dev": true, "dependencies": { - "denque": "^1.5.0", - "redis-commands": "^1.7.0", - "redis-errors": "^1.2.0", - "redis-parser": "^3.0.0" + "aggregate-error": "^3.0.0" }, "engines": { "node": ">=10" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/node-redis" - } - }, - "node_modules/redis-commands": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.7.0.tgz", - "integrity": "sha512-nJWqw3bTFy21hX/CPKHth6sfhZbdiHP6bTawSgQBlKOVRG7EZkfHbbHwQJnrE4vsQf0CMNE+3gJ4Fmm16vdVlQ==", - "dev": true - }, - "node_modules/redis-errors": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", - "integrity": "sha1-62LSrbFeTq9GEMBK/hUpOEJQq60=", - "dev": true, - "engines": { - "node": ">=4" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/redis-parser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz", - "integrity": "sha1-tm2CjNyv5rS4pCin3vTGvKwxyLQ=", + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, - "dependencies": { - "redis-errors": "^1.0.0" - }, "engines": { - "node": ">=4" + "node": ">=6" } }, - "node_modules/reflect-metadata": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", - "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==" + "node_modules/packet-reader": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz", + "integrity": "sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==", + "dev": true }, - "node_modules/regex-not": { + "node_modules/parse-filepath": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==", "dev": true, "dependencies": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" }, "engines": { - "node": ">=0.10.0" + "node": ">=0.8" } }, - "node_modules/regex-not/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", "dev": true, "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" }, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/regex-not/node_modules/is-extendable": { + "node_modules/parse-node-version": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4" - }, "engines": { - "node": ">=0.10.0" + "node": ">= 0.10" } }, - "node_modules/regex-not/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "node_modules/parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, "engines": { "node": ">=0.10.0" } }, - "node_modules/remap-istanbul": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/remap-istanbul/-/remap-istanbul-0.13.0.tgz", - "integrity": "sha512-rS5ZpVAx3fGtKZkiBe1esXg5mKYbgW9iz8kkADFt3p6lo3NsBBUX1q6SwdhwUtYCGnr7nK6gRlbYK3i8R0jbRA==", - "dev": true, - "dependencies": { - "istanbul": "0.4.5", - "minimatch": "^3.0.4", - "plugin-error": "^1.0.1", - "source-map": "0.6.1", - "through2": "3.0.0" - }, - "bin": { - "remap-istanbul": "bin/remap-istanbul.js" - } + "node_modules/parse5": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", + "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==" }, - "node_modules/remap-istanbul/node_modules/through2": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.0.tgz", - "integrity": "sha512-8B+sevlqP4OiCjonI1Zw03Sf8PuV1eRsYQgLad5eonILOdyeRsY27A/2Ze8IlvlMvq31OH+3fz/styI7Ya62yQ==", - "dev": true, + "node_modules/parse5-htmlparser2-tree-adapter": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", + "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", "dependencies": { - "readable-stream": "2 || 3", - "xtend": "~4.0.1" + "parse5": "^6.0.1" } }, - "node_modules/remove-bom-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", - "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==", + "node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" + }, + "node_modules/pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha512-XHXfu/yOQRy9vYOtUDVMN60OEJjW013GoObG1o+xwQTpB9eYJX/BjXMsdW13ZDPruFhYYn0AG22w0xgQMwl3Nw==", "dev": true, - "dependencies": { - "is-buffer": "^1.1.5", - "is-utf8": "^0.2.1" - }, "engines": { "node": ">=0.10.0" } }, - "node_modules/remove-bom-stream": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", - "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=", + "node_modules/path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha512-ALzNPpyNq9AqXMBjeymIjFDAkAFH06mHJH/cSBHAgU0s4vfpBn6b2nf8tiRLvagKD8RbTpq2FKTBg7cl9l3c7Q==", + "dev": true + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, - "dependencies": { - "remove-bom-buffer": "^3.0.0", - "safe-buffer": "^5.1.0", - "through2": "^2.0.3" - }, "engines": { - "node": ">= 0.10" + "node": ">=8" } }, - "node_modules/remove-bom-stream/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/remove-trailing-separator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "node_modules/repeat-element": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", - "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "node_modules/path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", "dev": true, + "dependencies": { + "path-root-regex": "^0.1.0" + }, "engines": { "node": ">=0.10.0" } }, - "node_modules/repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "node_modules/path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==", "dev": true, "engines": { - "node": ">=0.10" + "node": ">=0.10.0" } }, - "node_modules/replace-ext": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", - "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", + "node_modules/path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "dependencies": { + "isarray": "0.0.1" + } + }, + "node_modules/path-to-regexp/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "dev": true + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true, "engines": { - "node": ">= 0.10" + "node": ">=8" } }, - "node_modules/replace-homedir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz", - "integrity": "sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw=", + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true, - "dependencies": { - "homedir-polyfill": "^1.0.1", - "is-absolute": "^1.0.0", - "remove-trailing-separator": "^1.1.0" - }, "engines": { - "node": ">= 0.10" + "node": "*" } }, - "node_modules/replacestream": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/replacestream/-/replacestream-4.0.3.tgz", - "integrity": "sha512-AC0FiLS352pBBiZhd4VXB1Ab/lh0lEgpP+GGvZqbQh8a5cmXVoTe5EX/YeTFArnp4SRGTHh1qCHu9lGs1qG8sA==", + "node_modules/pg": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.9.0.tgz", + "integrity": "sha512-ZJM+qkEbtOHRuXjmvBtOgNOXOtLSbxiMiUVMgE4rV6Zwocy03RicCVvDXgx8l4Biwo8/qORUnEqn2fdQzV7KCg==", "dev": true, "dependencies": { - "escape-string-regexp": "^1.0.3", - "object-assign": "^4.0.1", - "readable-stream": "^2.0.2" + "buffer-writer": "2.0.0", + "packet-reader": "1.0.0", + "pg-connection-string": "^2.5.0", + "pg-pool": "^3.5.2", + "pg-protocol": "^1.6.0", + "pg-types": "^2.1.0", + "pgpass": "1.x" + }, + "engines": { + "node": ">= 8.0.0" + }, + "peerDependencies": { + "pg-native": ">=3.0.1" + }, + "peerDependenciesMeta": { + "pg-native": { + "optional": true + } } }, - "node_modules/replacestream/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "node_modules/pg-connection-string": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.5.0.tgz", + "integrity": "sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ==", + "dev": true + }, + "node_modules/pg-cursor": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/pg-cursor/-/pg-cursor-2.8.0.tgz", + "integrity": "sha512-LrOaEHK+R1C40e+xeri3FTRY/VKp9uTOCVsKtGB7LJ57qbeaphYvWjbVly8AesdT1GfHXYcAnVdExKhW7DKOvA==", "dev": true, - "engines": { - "node": ">=0.8.0" + "peerDependencies": { + "pg": "^8" } }, - "node_modules/require-at": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/require-at/-/require-at-1.0.6.tgz", - "integrity": "sha512-7i1auJbMUrXEAZCOQ0VNJgmcT2VOKPRl2YGJwgpHpC9CE91Mv4/4UYIUm4chGJaI381ZDq1JUicFii64Hapd8g==", + "node_modules/pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", "dev": true, "engines": { - "node": ">=4" + "node": ">=4.0.0" } }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "engines": { - "node": ">=0.10.0" + "node_modules/pg-pool": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.5.2.tgz", + "integrity": "sha512-His3Fh17Z4eg7oANLob6ZvH8xIVen3phEZh2QuyrIl4dQSDVEabNducv6ysROKpDNPSD+12tONZVWfSgMvDD9w==", + "dev": true, + "peerDependencies": { + "pg": ">=8.0" } }, - "node_modules/require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "node_modules/pg-protocol": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.6.0.tgz", + "integrity": "sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q==", "dev": true }, - "node_modules/resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true + "node_modules/pg-query-stream": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/pg-query-stream/-/pg-query-stream-4.3.0.tgz", + "integrity": "sha512-+Eer4Y1e43rAaphFNu9/VJKn9nKTApFKCSwVtDjXYnuO4QYqWHOEkApmGJv8gvaU5T6fcuEtjsN24gk+Rx7X9A==", + "dev": true, + "dependencies": { + "pg-cursor": "^2.8.0" + }, + "peerDependencies": { + "pg": "^8" + } }, - "node_modules/resolve-dir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "node_modules/pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", "dev": true, "dependencies": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/resolve-options": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", - "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=", + "node_modules/pgpass": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", + "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", "dev": true, "dependencies": { - "value-or-function": "^3.0.0" - }, + "split2": "^4.1.0" + } + }, + "node_modules/pgpass/node_modules/split2": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.1.0.tgz", + "integrity": "sha512-VBiJxFkxiXRlUIeyMQi8s4hgvKCSjtknJv/LVYbrgALPwf5zSKmEwV9Lst25AkvMDnvxODugjdl6KZgwKM1WYQ==", + "dev": true, "engines": { - "node": ">= 0.10" + "node": ">= 10.x" } }, - "node_modules/resolve-url": { + "node_modules/picocolors": { "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "deprecated": "https://github.com/lydell/resolve-url#deprecated", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", + "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==", "dev": true }, - "node_modules/ret": { - "version": "0.1.15", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", - "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, "engines": { - "node": ">=0.12" + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", "dev": true, - "optional": true, "engines": { - "node": ">= 4" + "node": ">=0.10.0" } }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "node_modules/pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", "dev": true, "engines": { - "iojs": ">=1.0.0", "node": ">=0.10.0" } }, - "node_modules/rfdc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", - "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", - "dev": true - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "node_modules/pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", "dev": true, "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" + "pinkie": "^2.0.0" }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "node_modules/plugin-error": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", + "integrity": "sha512-WzZHcm4+GO34sjFMxQMqZbsz3xiNEgonCskQ9v+IroMmYgk/tas8dG+Hr2D6IbRPybZ12oWpzE/w3cGJ6FJzOw==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], "dependencies": { - "queue-microtask": "^1.2.2" + "ansi-cyan": "^0.1.1", + "ansi-red": "^0.1.1", + "arr-diff": "^1.0.1", + "arr-union": "^2.0.1", + "extend-shallow": "^1.1.2" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/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==" - }, - "node_modules/safe-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "node_modules/plugin-error/node_modules/extend-shallow": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha512-L7AGmkO6jhDkEBBGWlLtftA80Xq8DipnrRPr0pyi7GQLXkaq9JYA4xF4z6qnadIC6euiTDKco0cGSU9muw+WTw==", "dev": true, "dependencies": { - "ret": "~0.1.10" + "kind-of": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "node_modules/saslprep": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", - "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", + "node_modules/plugin-error/node_modules/kind-of": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha512-aUH6ElPnMGon2/YkxRIigV32MOpTVcoXQ1Oo8aYn40s+sJ3j+0gFZsT8HKDcxNy7Fi9zuquWtGaGAahOdv5p/g==", "dev": true, - "optional": true, - "dependencies": { - "sparse-bitfield": "^3.0.3" - }, "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, - "node_modules/sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" - }, - "node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "node_modules/posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha512-xTgYBc3fuo7Yt7JbiuFxSYGToMoz8fLoE6TC9Wx1P/u+LfeThMOAqmuyECnlBaaJb+u1m9hHiXUEtwW4OzfUJg==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, "engines": { - "node": ">=10" + "node": ">=0.10.0" } }, - "node_modules/semver-greatest-satisfied-range": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz", - "integrity": "sha1-E+jCZYq5aRywzXEJMkAoDTb3els=", + "node_modules/postcss": { + "version": "7.0.39", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz", + "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==", "dev": true, "dependencies": { - "sver-compat": "^1.5.0" + "picocolors": "^0.2.1", + "source-map": "^0.6.1" }, "engines": { - "node": ">= 0.10" + "node": ">=6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" } }, - "node_modules/seq-queue": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", - "integrity": "sha1-1WgS4cAXpuTnw+Ojeh2m143TyT4=", - "dev": true - }, - "node_modules/serialize-javascript": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", - "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "node_modules/postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", "dev": true, - "dependencies": { - "randombytes": "^2.1.0" + "engines": { + "node": ">=4" } }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "node_modules/set-value": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", - "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "node_modules/postgres-bytea": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", + "integrity": "sha512-xy3pmLuQqRBZBXDULy7KbaitYqLcmxigw14Q5sj8QBVLqEwXfeybIKVWiqAXTlcvdvb0+xkOtDbfQMOf4lST1w==", "dev": true, - "dependencies": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.3", - "split-string": "^3.0.1" - }, "engines": { "node": ">=0.10.0" } }, - "node_modules/set-value/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "node_modules/postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, "engines": { "node": ">=0.10.0" } }, - "node_modules/sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "node_modules/postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "dev": true, "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "xtend": "^4.0.0" }, - "bin": { - "sha.js": "bin.js" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "node_modules/prebuild-install": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", + "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==", "dev": true, "dependencies": { - "shebang-regex": "^3.0.0" + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^1.0.1", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" }, "engines": { - "node": ">=8" + "node": ">=10" } }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", "dev": true, "engines": { - "node": ">=8" + "node": ">= 0.8.0" } }, - "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "node_modules/prettier": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.3.tgz", + "integrity": "sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==", "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "node_modules/pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, - "node_modules/simple-concat": { + "node_modules/promise-inflight": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "optional": true }, - "node_modules/simple-get": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz", - "integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==", + "node_modules/promise-retry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", + "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", "dev": true, + "optional": true, "dependencies": { - "decompress-response": "^4.2.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" + "err-code": "^2.0.2", + "retry": "^0.12.0" + }, + "engines": { + "node": ">=10" } }, - "node_modules/sinon": { - "version": "9.2.4", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz", - "integrity": "sha512-zljcULZQsJxVra28qIAL6ow1Z9tpattkCTEJR4RBP3TGc00FcttsP5pK284Nas5WjMZU5Yzy3kAIp3B3KRf5Yg==", + "node_modules/pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", "dev": true, "dependencies": { - "@sinonjs/commons": "^1.8.1", - "@sinonjs/fake-timers": "^6.0.1", - "@sinonjs/samsam": "^5.3.1", - "diff": "^4.0.2", - "nise": "^4.0.4", - "supports-color": "^7.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/sinon" + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, - "node_modules/sinon-chai": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.7.0.tgz", - "integrity": "sha512-mf5NURdUaSdnatJx3uhoBOrY9dtL19fiOtAdT1Azxg3+lNJFiuN0uzaU3xX1LeAfL17kHQhTAJgpsfhbMJMY2g==", + "node_modules/pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", "dev": true, - "peerDependencies": { - "chai": "^4.0.0", - "sinon": ">=4.0.0" + "dependencies": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" } }, - "node_modules/sinon/node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "node_modules/pumpify/node_modules/pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", "dev": true, - "engines": { - "node": ">=0.3.1" + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" } }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "node_modules/punycode": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", + "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", "dev": true, "engines": { - "node": ">=8" + "node": ">=6" } }, - "node_modules/smart-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", - "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "node_modules/q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==", "dev": true, - "optional": true, "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" + "node": ">=0.6.0", + "teleport": ">=0.2.0" } }, - "node_modules/snapdragon": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", - "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", "dev": true, - "dependencies": { - "base": "^0.11.1", - "debug": "^2.2.0", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "map-cache": "^0.2.2", - "source-map": "^0.5.6", - "source-map-resolve": "^0.5.0", - "use": "^3.1.0" - }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/snapdragon-node": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", - "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, "dependencies": { - "define-property": "^1.0.0", - "isobject": "^3.0.0", - "snapdragon-util": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" + "safe-buffer": "^5.1.0" } }, - "node_modules/snapdragon-node/node_modules/define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "dependencies": { - "is-descriptor": "^1.0.0" + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/rc/node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/snapdragon-node/node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "node_modules/read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", "dev": true, "dependencies": { - "kind-of": "^6.0.0" + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/snapdragon-node/node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "node_modules/read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha512-YFzFrVvpC6frF1sz8psoHDBGF7fLPc+llq/8NB43oagqWkx8ar5zYtsTORtOjw9W2RHLpWP+zTWwBvf1bCmcSw==", "dev": true, "dependencies": { - "kind-of": "^6.0.0" + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/snapdragon-node/node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "node_modules/read-pkg-up/node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", "dev": true, "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "locate-path": "^2.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/snapdragon-node/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "node_modules/read-pkg-up/node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", "dev": true, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/snapdragon-util": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", - "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "node_modules/read-pkg-up/node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, "dependencies": { - "kind-of": "^3.2.0" + "p-try": "^1.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/snapdragon-util/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "node_modules/read-pkg-up/node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", "dev": true, "dependencies": { - "is-buffer": "^1.1.5" + "p-limit": "^1.1.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/snapdragon/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "node_modules/read-pkg-up/node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", "dev": true, - "dependencies": { - "ms": "2.0.0" + "engines": { + "node": ">=4" } }, - "node_modules/snapdragon/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "node_modules/snapdragon/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "node_modules/read-pkg-up/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=4" } }, - "node_modules/snapdragon/node_modules/source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "node_modules/read-pkg/node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/read-pkg/node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, "dependencies": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, - "node_modules/socks": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.2.tgz", - "integrity": "sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==", + "node_modules/read-pkg/node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "dev": true, - "optional": true, "dependencies": { - "ip": "^1.1.5", - "smart-buffer": "^4.2.0" + "pify": "^3.0.0" }, "engines": { - "node": ">= 10.13.0", - "npm": ">= 3.0.0" + "node": ">=4" } }, - "node_modules/socks-proxy-agent": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.2.1.tgz", - "integrity": "sha512-a6KW9G+6B3nWZ1yB8G7pJwL3ggLy1uTzKAgCb7ttblwqdz9fMGJUuTy3uFzEP48FAs9FLILlmzDlE2JJhVQaXQ==", + "node_modules/read-pkg/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", "dev": true, - "optional": true, - "dependencies": { - "agent-base": "^6.0.2", - "debug": "^4.3.3", - "socks": "^2.6.2" - }, "engines": { - "node": ">= 10" + "node": ">=4" } }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/read-pkg/node_modules/resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", "dev": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/source-map-resolve": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz", - "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==", + "node_modules/read-pkg/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true, - "dependencies": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0" + "bin": { + "semver": "bin/semver" } }, - "node_modules/source-map-support": { - "version": "0.5.20", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", - "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", + "node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "dev": true, "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, - "node_modules/source-map-url": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", - "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "node_modules/readable-stream/node_modules/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 }, - "node_modules/sparkles": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", - "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", + "node_modules/readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", "dev": true, + "dependencies": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, "engines": { - "node": ">= 0.10" + "node": ">=0.10" } }, - "node_modules/sparse-bitfield": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", - "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", + "node_modules/readdirp/node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", "dev": true, - "optional": true, - "dependencies": { - "memory-pager": "^1.0.2" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "node_modules/readdirp/node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "dev": true, "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "node_modules/readdirp/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", "dev": true, "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/spdx-license-ids": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz", - "integrity": "sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==", - "dev": true - }, - "node_modules/split": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", - "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "node_modules/readdirp/node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, "dependencies": { - "through": "2" + "kind-of": "^6.0.0" }, "engines": { - "node": "*" + "node": ">=0.10.0" } }, - "node_modules/split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "node_modules/readdirp/node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, "dependencies": { - "extend-shallow": "^3.0.0" + "kind-of": "^6.0.0" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/split-string/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "node_modules/readdirp/node_modules/is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" }, "engines": { "node": ">=0.10.0" } }, - "node_modules/split-string/node_modules/is-extendable": { + "node_modules/readdirp/node_modules/is-extendable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", @@ -10715,7 +10812,7 @@ "node": ">=0.10.0" } }, - "node_modules/split-string/node_modules/is-plain-object": { + "node_modules/readdirp/node_modules/is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", @@ -10727,9619 +10824,778 @@ "node": ">=0.10.0" } }, - "node_modules/split2": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", - "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", + "node_modules/readdirp/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true, - "dependencies": { - "readable-stream": "^3.0.0" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/split2/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "node_modules/readdirp/node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "dev": true, "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" }, "engines": { - "node": ">= 6" + "node": ">=0.10.0" } }, - "node_modules/sprintf-js": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", - "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", - "dev": true - }, - "node_modules/sql.js": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/sql.js/-/sql.js-1.6.2.tgz", - "integrity": "sha512-9iucI5fXQa+Gspeqf/BNB20PxJIn5LhXDt4mjXoFPqXdR+NqtFs15SdKpSIJ6s529aGL9zFR9p2eSCIEiMsNGA==", - "dev": true - }, - "node_modules/sqlite3": { - "version": "5.0.11", - "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.0.11.tgz", - "integrity": "sha512-4akFOr7u9lJEeAWLJxmwiV43DJcGV7w3ab7SjQFAFaTVyknY3rZjvXTKIVtWqUoY4xwhjwoHKYs2HDW2SoHVsA==", + "node_modules/rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", "dev": true, - "hasInstallScript": true, "dependencies": { - "@mapbox/node-pre-gyp": "^1.0.0", - "node-addon-api": "^4.2.0", - "tar": "^6.1.11" - }, - "optionalDependencies": { - "node-gyp": "8.x" - }, - "peerDependencies": { - "node-gyp": "8.x" + "resolve": "^1.1.6" }, - "peerDependenciesMeta": { - "node-gyp": { - "optional": true - } - } - }, - "node_modules/sqlite3/node_modules/node-addon-api": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz", - "integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==", - "dev": true - }, - "node_modules/sqlstring": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz", - "integrity": "sha1-R1OT/56RR5rqYtyvDKPRSYOn+0A=", - "dev": true, "engines": { - "node": ">= 0.6" + "node": ">= 0.10" } }, - "node_modules/ssri": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", - "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", + "node_modules/redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", "dev": true, - "optional": true, "dependencies": { - "minipass": "^3.1.1" + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" }, "engines": { - "node": ">= 8" - } - }, - "node_modules/stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", - "dev": true, - "engines": { - "node": "*" + "node": ">=8" } }, - "node_modules/static-extend": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "node_modules/redis": { + "version": "4.6.4", + "resolved": "https://registry.npmjs.org/redis/-/redis-4.6.4.tgz", + "integrity": "sha512-wi2tgDdQ+Q8q+PR5FLRx4QvDiWaA+PoJbrzsyFqlClN5R4LplHqN3scs/aGjE//mbz++W19SgxiEnQ27jnCRaA==", "dev": true, "dependencies": { - "define-property": "^0.2.5", - "object-copy": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" + "@redis/bloom": "1.2.0", + "@redis/client": "1.5.5", + "@redis/graph": "1.1.0", + "@redis/json": "1.0.4", + "@redis/search": "1.1.1", + "@redis/time-series": "1.0.4" } }, - "node_modules/stoppable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz", - "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==", - "dev": true, - "engines": { - "node": ">=4", - "npm": ">=6" - } + "node_modules/reflect-metadata": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", + "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==" }, - "node_modules/stream-exhaust": { + "node_modules/regex-not": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz", - "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==", - "dev": true - }, - "node_modules/stream-shift": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", - "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", - "dev": true - }, - "node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "dev": true, "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "node_modules/regex-not/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, "dependencies": { - "ansi-regex": "^5.0.1" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/strip-bom-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", - "integrity": "sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI=", - "dev": true, "engines": { "node": ">=0.10.0" } }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "node_modules/regex-not/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, - "node_modules/strip-indent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", - "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "node_modules/regex-not/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, "dependencies": { - "min-indent": "^1.0.0" + "isobject": "^3.0.1" }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "node_modules/regexp.prototype.flags": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", + "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "functions-have-names": "^1.2.2" + }, "engines": { - "node": ">=8" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "node_modules/remap-istanbul": { + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/remap-istanbul/-/remap-istanbul-0.13.0.tgz", + "integrity": "sha512-rS5ZpVAx3fGtKZkiBe1esXg5mKYbgW9iz8kkADFt3p6lo3NsBBUX1q6SwdhwUtYCGnr7nK6gRlbYK3i8R0jbRA==", + "dev": true, "dependencies": { - "has-flag": "^4.0.0" + "istanbul": "0.4.5", + "minimatch": "^3.0.4", + "plugin-error": "^1.0.1", + "source-map": "0.6.1", + "through2": "3.0.0" }, - "engines": { - "node": ">=8" + "bin": { + "remap-istanbul": "bin/remap-istanbul.js" } }, - "node_modules/sver-compat": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz", - "integrity": "sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg=", + "node_modules/remap-istanbul/node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha512-YVIQ82gZPGBebQV/a8dar4AitzCQs0jjXwMPZllpXMaGjXPYVUawSxQrRsjhjupyVxEvbHgUmIhKVlND+j02kA==", "dev": true, - "dependencies": { - "es6-iterator": "^2.0.1", - "es6-symbol": "^3.1.1" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/tar": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", - "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", + "node_modules/remap-istanbul/node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", "dev": true, - "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, "engines": { - "node": ">= 10" + "node": ">=0.10.0" } }, - "node_modules/tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "node_modules/remap-istanbul/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/tar-fs/node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true - }, - "node_modules/tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "node_modules/remap-istanbul/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", "dev": true, "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" }, "engines": { - "node": ">=6" - } - }, - "node_modules/tar-stream/node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/tar-stream/node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" + "node": ">=0.10.0" } }, - "node_modules/tar-stream/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "node_modules/remap-istanbul/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "is-plain-object": "^2.0.4" }, "engines": { - "node": ">= 6" + "node": ">=0.10.0" } }, - "node_modules/tarn": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/tarn/-/tarn-3.0.2.tgz", - "integrity": "sha512-51LAVKUSZSVfI05vjPESNc5vwqqZpbXCsU+/+wxlOrUjk2SnFTt97v9ZgQrD4YmxYW1Px6w2KjaDitCfkvgxMQ==", + "node_modules/remap-istanbul/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, "engines": { - "node": ">=8.0.0" + "node": ">=0.10.0" } }, - "node_modules/tedious": { - "version": "11.8.0", - "resolved": "https://registry.npmjs.org/tedious/-/tedious-11.8.0.tgz", - "integrity": "sha512-GtFrO694x/7CRiUBt0AI4jrMtrkXV+ywifiOrDy4K0ufJLeKB4rgmPjy5Ws366fCaBaKlqQ9RnJ+sCJ1Jbd1lw==", + "node_modules/remap-istanbul/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, "dependencies": { - "@azure/identity": "^1.3.0", - "@azure/keyvault-keys": "^4.1.0", - "@azure/ms-rest-nodeauth": "^3.0.6", - "@js-joda/core": "^3.2.0", - "adal-node": "^0.2.1", - "bl": "^5.0.0", - "depd": "^2.0.0", - "iconv-lite": "^0.6.3", - "jsbi": "^3.1.5", - "native-duplexpair": "^1.0.0", - "node-abort-controller": "^2.0.0", - "punycode": "^2.1.0", - "sprintf-js": "^1.1.2" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">= 10" - } - }, - "node_modules/tedious/node_modules/bl": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-5.0.0.tgz", - "integrity": "sha512-8vxFNZ0pflFfi0WXA3WQXlj6CaMEwsmh63I1CNp0q+wWv8sD0ARx1KovSQd0l2GkwrMIOyedq0EF1FxI+RCZLQ==", - "dev": true, - "dependencies": { - "buffer": "^6.0.3", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/tedious/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/temp-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", - "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/tempfile": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/tempfile/-/tempfile-3.0.0.tgz", - "integrity": "sha512-uNFCg478XovRi85iD42egu+eSFUmmka750Jy7L5tfHI5hQKKtbPnxaSaXAbBqCDYrw3wx4tXjKwci4/QmsZJxw==", - "dev": true, - "dependencies": { - "temp-dir": "^2.0.0", - "uuid": "^3.3.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/tempfile/node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true, - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/text-extensions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", - "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==", - "dev": true, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/textextensions": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-3.3.0.tgz", - "integrity": "sha512-mk82dS8eRABNbeVJrEiN5/UMSCliINAuz8mkUwH4SwslkNP//gbEzlWNS5au0z5Dpx40SQxzqZevZkn+WYJ9Dw==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://bevry.me/fund" - } - }, - "node_modules/thenify": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", - "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", - "dependencies": { - "any-promise": "^1.0.0" - } - }, - "node_modules/thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", - "dependencies": { - "thenify": ">= 3.1.0 < 4" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "node_modules/through2": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", - "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", - "dev": true, - "dependencies": { - "readable-stream": "3" - } - }, - "node_modules/through2-filter": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", - "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", - "dev": true, - "dependencies": { - "through2": "~2.0.0", - "xtend": "~4.0.0" - } - }, - "node_modules/through2-filter/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/through2/node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/time-stamp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", - "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/timers-ext": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", - "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", - "dev": true, - "dependencies": { - "es5-ext": "~0.10.46", - "next-tick": "1" - } - }, - "node_modules/to-absolute-glob": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", - "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", - "dev": true, - "dependencies": { - "is-absolute": "^1.0.0", - "is-negated-glob": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-object-path": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", - "dev": true, - "dependencies": { - "kind-of": "^3.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-object-path/node_modules/kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "dependencies": { - "is-buffer": "^1.1.5" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", - "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", - "dev": true, - "dependencies": { - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "regex-not": "^1.0.2", - "safe-regex": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", - "dev": true, - "dependencies": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex/node_modules/define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "dependencies": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex/node_modules/extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "dependencies": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex/node_modules/is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex/node_modules/is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex/node_modules/is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "dependencies": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex/node_modules/is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex/node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-regex/node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/to-through": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", - "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=", - "dev": true, - "dependencies": { - "through2": "^2.0.3" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/to-through/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", - "dev": true - }, - "node_modules/trim-newlines": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", - "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ts-node": { - "version": "10.7.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.7.0.tgz", - "integrity": "sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==", - "dev": true, - "dependencies": { - "@cspotcode/source-map-support": "0.7.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.0", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/ts-node/node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" - }, - "node_modules/tunnel": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", - "dev": true, - "engines": { - "node": ">=0.6.11 <=0.7.0 || >=0.7.3" - } - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", - "dev": true - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "node_modules/typeorm-aurora-data-api-driver": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/typeorm-aurora-data-api-driver/-/typeorm-aurora-data-api-driver-2.3.4.tgz", - "integrity": "sha512-1EsmZvhUCWIVP5Ss9e/P8Ya6LY7Oi58X4whmrFmH56aIlAs4chJUhMGMomfl1A1R5SZK+QKEJHMbSKQlNd7Jgw==", - "dev": true, - "dependencies": { - "data-api-client": "^1.2.0" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/typescript": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz", - "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/uglify-js": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.2.tgz", - "integrity": "sha512-rtPMlmcO4agTUfz10CbgJ1k6UAoXM2gWb3GoMPPZB/+/Ackf8lNWk11K4rYi2D0apgoFRLtQOZhb+/iGNJq26A==", - "dev": true, - "optional": true, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/unc-path-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/underscore": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.2.tgz", - "integrity": "sha512-ekY1NhRzq0B08g4bGuX4wd2jZx5GnKz6mKSqFL4nqBlfyMGiG10gDFhDTMEfYmDL6Jy0FUIZp7wiRB+0BP7J2g==", - "dev": true - }, - "node_modules/undertaker": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.3.0.tgz", - "integrity": "sha512-/RXwi5m/Mu3H6IHQGww3GNt1PNXlbeCuclF2QYR14L/2CHPz3DFZkvB5hZ0N/QUkiXWCACML2jXViIQEQc2MLg==", - "dev": true, - "dependencies": { - "arr-flatten": "^1.0.1", - "arr-map": "^2.0.0", - "bach": "^1.0.0", - "collection-map": "^1.0.0", - "es6-weak-map": "^2.0.1", - "fast-levenshtein": "^1.0.0", - "last-run": "^1.1.0", - "object.defaults": "^1.0.0", - "object.reduce": "^1.0.0", - "undertaker-registry": "^1.0.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/undertaker-registry": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz", - "integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA=", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/undertaker/node_modules/fast-levenshtein": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.4.tgz", - "integrity": "sha1-5qdUzI8V5YmHqpy9J69m/W9OWvk=", - "dev": true - }, - "node_modules/union-value": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", - "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", - "dev": true, - "dependencies": { - "arr-union": "^3.1.0", - "get-value": "^2.0.6", - "is-extendable": "^0.1.1", - "set-value": "^2.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", - "dev": true, - "optional": true, - "dependencies": { - "unique-slug": "^2.0.0" - } - }, - "node_modules/unique-slug": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", - "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", - "dev": true, - "optional": true, - "dependencies": { - "imurmurhash": "^0.1.4" - } - }, - "node_modules/unique-stream": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", - "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", - "dev": true, - "dependencies": { - "json-stable-stringify-without-jsonify": "^1.0.1", - "through2-filter": "^3.0.0" - } - }, - "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/unset-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", - "dev": true, - "dependencies": { - "has-value": "^0.3.1", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "dependencies": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "dependencies": { - "isarray": "1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unset-value/node_modules/has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/upath": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", - "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", - "dev": true, - "engines": { - "node": ">=4", - "yarn": "*" - } - }, - "node_modules/urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "deprecated": "Please see https://github.com/lydell/urix#deprecated", - "dev": true - }, - "node_modules/use": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz", - "integrity": "sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA==", - "dev": true - }, - "node_modules/v8flags": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", - "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", - "dev": true, - "dependencies": { - "homedir-polyfill": "^1.0.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "node_modules/value-or-function": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", - "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/vinyl": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", - "integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==", - "dev": true, - "dependencies": { - "clone": "^2.1.1", - "clone-buffer": "^1.0.0", - "clone-stats": "^1.0.0", - "cloneable-readable": "^1.0.0", - "remove-trailing-separator": "^1.0.1", - "replace-ext": "^1.0.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/vinyl-fs": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", - "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", - "dev": true, - "dependencies": { - "fs-mkdirp-stream": "^1.0.0", - "glob-stream": "^6.1.0", - "graceful-fs": "^4.0.0", - "is-valid-glob": "^1.0.0", - "lazystream": "^1.0.0", - "lead": "^1.0.0", - "object.assign": "^4.0.4", - "pumpify": "^1.3.5", - "readable-stream": "^2.3.3", - "remove-bom-buffer": "^3.0.0", - "remove-bom-stream": "^1.2.0", - "resolve-options": "^1.1.0", - "through2": "^2.0.0", - "to-through": "^2.0.0", - "value-or-function": "^3.0.0", - "vinyl": "^2.0.0", - "vinyl-sourcemap": "^1.1.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/vinyl-fs/node_modules/through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "dependencies": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "node_modules/vinyl-sourcemap": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", - "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=", - "dev": true, - "dependencies": { - "append-buffer": "^1.0.2", - "convert-source-map": "^1.5.0", - "graceful-fs": "^4.1.6", - "normalize-path": "^2.1.1", - "now-and-later": "^2.0.0", - "remove-bom-buffer": "^3.0.0", - "vinyl": "^2.0.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/vinyl-sourcemap/node_modules/normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "dependencies": { - "remove-trailing-separator": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/vinyl-sourcemaps-apply": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz", - "integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=", - "dev": true, - "dependencies": { - "source-map": "^0.5.1" - } - }, - "node_modules/vinyl-sourcemaps-apply/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", - "dev": true - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", - "dev": true, - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/which-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", - "dev": true - }, - "node_modules/wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "dependencies": { - "string-width": "^1.0.2 || 2" - } - }, - "node_modules/wide-align/node_modules/ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/wide-align/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/wide-align/node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/wide-align/node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "dependencies": { - "ansi-regex": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, - "node_modules/workerpool": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.0.tgz", - "integrity": "sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==", - "dev": true - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "node_modules/xml2js": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", - "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/xpath.js": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/xpath.js/-/xpath.js-1.1.0.tgz", - "integrity": "sha512-jg+qkfS4K8E7965sqaUl8mRngXiKb3WZGfONgE18pr03FUQiuSV6G+Ej4tS55B+rIQSFEIw3phdVAQ4pPqNWfQ==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true, - "engines": { - "node": ">=0.4" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/yargs": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz", - "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==", - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "dependencies": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/yargs-unparser/node_modules/camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yargs-unparser/node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yargs-unparser/node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==", - "engines": { - "node": ">=12" - } - }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - }, - "dependencies": { - "@azure/abort-controller": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.0.4.tgz", - "integrity": "sha512-lNUmDRVGpanCsiUN3NWxFTdwmdFI53xwhkTFfHDGTYk46ca7Ind3nanJc+U6Zj9Tv+9nTCWRBscWEW1DyKOpTw==", - "dev": true, - "requires": { - "tslib": "^2.0.0" - } - }, - "@azure/core-asynciterator-polyfill": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@azure/core-asynciterator-polyfill/-/core-asynciterator-polyfill-1.0.0.tgz", - "integrity": "sha512-kmv8CGrPfN9SwMwrkiBK9VTQYxdFQEGe0BmQk+M8io56P9KNzpAxcWE/1fxJj7uouwN4kXF0BHW8DNlgx+wtCg==", - "dev": true - }, - "@azure/core-auth": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.3.2.tgz", - "integrity": "sha512-7CU6DmCHIZp5ZPiZ9r3J17lTKMmYsm/zGvNkjArQwPkrLlZ1TZ+EUYfGgh2X31OLMVAQCTJZW4cXHJi02EbJnA==", - "dev": true, - "requires": { - "@azure/abort-controller": "^1.0.0", - "tslib": "^2.2.0" - } - }, - "@azure/core-client": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@azure/core-client/-/core-client-1.4.0.tgz", - "integrity": "sha512-6v1pn4ubNSeI56PUgj2NLR/nfoMfkjYmrtNX0YdXrjxSajKcf/TZc/QJtTFj4wHIvYqU/Yn/g/Zb+MNhFZ5c+Q==", - "dev": true, - "requires": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-asynciterator-polyfill": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.4.0", - "@azure/core-tracing": "1.0.0-preview.13", - "@azure/logger": "^1.0.0", - "tslib": "^2.2.0" - }, - "dependencies": { - "@azure/core-tracing": { - "version": "1.0.0-preview.13", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", - "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", - "dev": true, - "requires": { - "@opentelemetry/api": "^1.0.1", - "tslib": "^2.2.0" - } - } - } - }, - "@azure/core-http": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.2.3.tgz", - "integrity": "sha512-xr8AeszxP418rI//W38NfJDDr0kbVAPZkURZnZ+Fle+lLWeURjDE5zNIuocA1wUPoKSP8iXc0ApW6nPtbLGswA==", - "dev": true, - "requires": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-asynciterator-polyfill": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-tracing": "1.0.0-preview.13", - "@azure/logger": "^1.0.0", - "@types/node-fetch": "^2.5.0", - "@types/tunnel": "^0.0.3", - "form-data": "^4.0.0", - "node-fetch": "^2.6.6", - "process": "^0.11.10", - "tough-cookie": "^4.0.0", - "tslib": "^2.2.0", - "tunnel": "^0.0.6", - "uuid": "^8.3.0", - "xml2js": "^0.4.19" - }, - "dependencies": { - "@azure/core-tracing": { - "version": "1.0.0-preview.13", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", - "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", - "dev": true, - "requires": { - "@opentelemetry/api": "^1.0.1", - "tslib": "^2.2.0" - } - }, - "form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - }, - "tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", - "dev": true, - "requires": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.1.2" - } - } - } - }, - "@azure/core-lro": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.2.3.tgz", - "integrity": "sha512-UMdlR9NsqDCLTba3EUbRjfMF4gDmWvld196JmUjbz9WWhJ2XT00OR5MXeWiR+vmGT+ETiO4hHFCi2/eGO5YVtg==", - "dev": true, - "requires": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-tracing": "1.0.0-preview.13", - "@azure/logger": "^1.0.0", - "tslib": "^2.2.0" - }, - "dependencies": { - "@azure/core-tracing": { - "version": "1.0.0-preview.13", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", - "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", - "dev": true, - "requires": { - "@opentelemetry/api": "^1.0.1", - "tslib": "^2.2.0" - } - } - } - }, - "@azure/core-paging": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@azure/core-paging/-/core-paging-1.2.1.tgz", - "integrity": "sha512-UtH5iMlYsvg+nQYIl4UHlvvSrsBjOlRF4fs0j7mxd3rWdAStrKYrh2durOpHs5C9yZbVhsVDaisoyaf/lL1EVA==", - "dev": true, - "requires": { - "@azure/core-asynciterator-polyfill": "^1.0.0", - "tslib": "^2.2.0" - } - }, - "@azure/core-rest-pipeline": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.4.0.tgz", - "integrity": "sha512-M2uL9PbvhJIEMRoUad3EnXCHWLN/i0W7D7MQJ9rnIDW7iLVCteUiegdqNa2Cr1/7he/ysEXYiwaXiHmfack/6g==", - "dev": true, - "requires": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.3.0", - "@azure/core-tracing": "1.0.0-preview.13", - "@azure/logger": "^1.0.0", - "form-data": "^4.0.0", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "tslib": "^2.2.0", - "uuid": "^8.3.0" - }, - "dependencies": { - "@azure/core-tracing": { - "version": "1.0.0-preview.13", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", - "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", - "dev": true, - "requires": { - "@opentelemetry/api": "^1.0.1", - "tslib": "^2.2.0" - } - }, - "form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - } - } - }, - "@azure/core-tracing": { - "version": "1.0.0-preview.12", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.12.tgz", - "integrity": "sha512-nvo2Wc4EKZGN6eFu9n3U7OXmASmL8VxoPIH7xaD6OlQqi44bouF0YIi9ID5rEsKLiAU59IYx6M297nqWVMWPDg==", - "dev": true, - "requires": { - "@opentelemetry/api": "^1.0.0", - "tslib": "^2.2.0" - } - }, - "@azure/identity": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@azure/identity/-/identity-1.5.2.tgz", - "integrity": "sha512-vqyeRbd2i0h9F4mqW5JbkP1xfabqKQ21l/81osKhpOQ2LtwaJW6nw4+0PsVYnxcbPHFCIZt6EWAk74a3OGYZJA==", - "dev": true, - "requires": { - "@azure/core-auth": "^1.3.0", - "@azure/core-client": "^1.0.0", - "@azure/core-rest-pipeline": "^1.1.0", - "@azure/core-tracing": "1.0.0-preview.12", - "@azure/logger": "^1.0.0", - "@azure/msal-node": "1.0.0-beta.6", - "@types/stoppable": "^1.1.0", - "axios": "^0.21.1", - "events": "^3.0.0", - "jws": "^4.0.0", - "keytar": "^7.3.0", - "msal": "^1.0.2", - "open": "^7.0.0", - "qs": "^6.7.0", - "stoppable": "^1.1.0", - "tslib": "^2.0.0", - "uuid": "^8.3.0" - }, - "dependencies": { - "qs": { - "version": "6.10.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", - "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", - "dev": true, - "requires": { - "side-channel": "^1.0.4" - } - } - } - }, - "@azure/keyvault-keys": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@azure/keyvault-keys/-/keyvault-keys-4.3.0.tgz", - "integrity": "sha512-OEosl0/rE/mKD5Ji9KaQN7UH+yQnV5MS0MRhGqQIiJrG+qAvAla0MYudJzv3XvBlplpGk0+MVgyL9H3KX/UAwQ==", - "dev": true, - "requires": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-http": "^2.0.0", - "@azure/core-lro": "^2.0.0", - "@azure/core-paging": "^1.1.1", - "@azure/core-tracing": "1.0.0-preview.13", - "@azure/logger": "^1.0.0", - "tslib": "^2.2.0" - }, - "dependencies": { - "@azure/core-tracing": { - "version": "1.0.0-preview.13", - "resolved": "https://registry.npmjs.org/@azure/core-tracing/-/core-tracing-1.0.0-preview.13.tgz", - "integrity": "sha512-KxDlhXyMlh2Jhj2ykX6vNEU0Vou4nHr025KoSEiz7cS3BNiHNaZcdECk/DmLkEB0as5T7b/TpRcehJ5yV6NeXQ==", - "dev": true, - "requires": { - "@opentelemetry/api": "^1.0.1", - "tslib": "^2.2.0" - } - } - } - }, - "@azure/logger": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@azure/logger/-/logger-1.0.3.tgz", - "integrity": "sha512-aK4s3Xxjrx3daZr3VylxejK3vG5ExXck5WOHDJ8in/k9AqlfIyFMMT1uG7u8mNjX+QRILTIn0/Xgschfh/dQ9g==", - "dev": true, - "requires": { - "tslib": "^2.2.0" - } - }, - "@azure/ms-rest-azure-env": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@azure/ms-rest-azure-env/-/ms-rest-azure-env-2.0.0.tgz", - "integrity": "sha512-dG76W7ElfLi+fbTjnZVGj+M9e0BIEJmRxU6fHaUQ12bZBe8EJKYb2GV50YWNaP2uJiVQ5+7nXEVj1VN1UQtaEw==", - "dev": true - }, - "@azure/ms-rest-js": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/@azure/ms-rest-js/-/ms-rest-js-2.6.0.tgz", - "integrity": "sha512-4C5FCtvEzWudblB+h92/TYYPiq7tuElX8icVYToxOdggnYqeec4Se14mjse5miInKtZahiFHdl8lZA/jziEc5g==", - "dev": true, - "requires": { - "@azure/core-auth": "^1.1.4", - "abort-controller": "^3.0.0", - "form-data": "^2.5.0", - "node-fetch": "^2.6.0", - "tough-cookie": "^3.0.1", - "tslib": "^1.10.0", - "tunnel": "0.0.6", - "uuid": "^8.3.2", - "xml2js": "^0.4.19" - }, - "dependencies": { - "form-data": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", - "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "tough-cookie": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", - "integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==", - "dev": true, - "requires": { - "ip-regex": "^2.1.0", - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - } - } - }, - "@azure/ms-rest-nodeauth": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@azure/ms-rest-nodeauth/-/ms-rest-nodeauth-3.1.1.tgz", - "integrity": "sha512-UA/8dgLy3+ZiwJjAZHxL4MUB14fFQPkaAOZ94jsTW/Z6WmoOeny2+cLk0+dyIX/iH6qSrEWKwbStEeB970B9pA==", - "dev": true, - "requires": { - "@azure/ms-rest-azure-env": "^2.0.0", - "@azure/ms-rest-js": "^2.0.4", - "adal-node": "^0.2.2" - } - }, - "@azure/msal-common": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-4.5.1.tgz", - "integrity": "sha512-/i5dXM+QAtO+6atYd5oHGBAx48EGSISkXNXViheliOQe+SIFMDo3gSq3lL54W0suOSAsVPws3XnTaIHlla0PIQ==", - "dev": true, - "requires": { - "debug": "^4.1.1" - } - }, - "@azure/msal-node": { - "version": "1.0.0-beta.6", - "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.0.0-beta.6.tgz", - "integrity": "sha512-ZQI11Uz1j0HJohb9JZLRD8z0moVcPks1AFW4Q/Gcl67+QvH4aKEJti7fjCcipEEZYb/qzLSO8U6IZgPYytsiJQ==", - "dev": true, - "requires": { - "@azure/msal-common": "^4.0.0", - "axios": "^0.21.1", - "jsonwebtoken": "^8.5.1", - "uuid": "^8.3.0" - } - }, - "@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.15.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", - "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", - "dev": true - }, - "@babel/highlight": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", - "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.14.5", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@cspotcode/source-map-consumer": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz", - "integrity": "sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==", - "dev": true - }, - "@cspotcode/source-map-support": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz", - "integrity": "sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==", - "dev": true, - "requires": { - "@cspotcode/source-map-consumer": "0.8.0" - } - }, - "@gar/promisify": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", - "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", - "dev": true, - "optional": true - }, - "@gulp-sourcemaps/identity-map": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/identity-map/-/identity-map-2.0.1.tgz", - "integrity": "sha512-Tb+nSISZku+eQ4X1lAkevcQa+jknn/OVUgZ3XCxEKIsLsqYuPoJwJOPQeaOk75X3WPftb29GWY1eqE7GLsXb1Q==", - "dev": true, - "requires": { - "acorn": "^6.4.1", - "normalize-path": "^3.0.0", - "postcss": "^7.0.16", - "source-map": "^0.6.0", - "through2": "^3.0.1" - }, - "dependencies": { - "acorn": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", - "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", - "dev": true - }, - "through2": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", - "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", - "dev": true, - "requires": { - "inherits": "^2.0.4", - "readable-stream": "2 || 3" - } - } - } - }, - "@gulp-sourcemaps/map-sources": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz", - "integrity": "sha1-iQrnxdjId/bThIYCFazp1+yUW9o=", - "dev": true, - "requires": { - "normalize-path": "^2.0.1", - "through2": "^2.0.3" - }, - "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - } - } - }, - "@hutson/parse-repository-url": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz", - "integrity": "sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==", - "dev": true - }, - "@js-joda/core": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@js-joda/core/-/core-3.2.0.tgz", - "integrity": "sha512-PMqgJ0sw5B7FKb2d5bWYIoxjri+QlW/Pys7+Rw82jSH0QN3rB05jZ/VrrsUdh1w4+i2kw9JOejXGq/KhDOX7Kg==", - "dev": true - }, - "@mapbox/node-pre-gyp": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.9.tgz", - "integrity": "sha512-aDF3S3rK9Q2gey/WAttUlISduDItz5BU3306M9Eyv6/oS40aMprnopshtlKTykxRNIBEZuRMaZAnbrQ4QtKGyw==", - "dev": true, - "requires": { - "detect-libc": "^2.0.0", - "https-proxy-agent": "^5.0.0", - "make-dir": "^3.1.0", - "node-fetch": "^2.6.7", - "nopt": "^5.0.0", - "npmlog": "^5.0.1", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.11" - }, - "dependencies": { - "are-we-there-yet": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", - "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", - "dev": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - } - }, - "detect-libc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", - "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", - "dev": true - }, - "gauge": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", - "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", - "dev": true, - "requires": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.1", - "object-assign": "^4.1.1", - "signal-exit": "^3.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" - } - }, - "nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", - "dev": true, - "requires": { - "abbrev": "1" - } - }, - "npmlog": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", - "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", - "dev": true, - "requires": { - "are-we-there-yet": "^2.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^3.0.0", - "set-blocking": "^2.0.0" - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, - "@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - } - }, - "@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true - }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - } - }, - "@npmcli/fs": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz", - "integrity": "sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==", - "dev": true, - "optional": true, - "requires": { - "@gar/promisify": "^1.0.1", - "semver": "^7.3.5" - } - }, - "@npmcli/move-file": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz", - "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==", - "dev": true, - "optional": true, - "requires": { - "mkdirp": "^1.0.4", - "rimraf": "^3.0.2" - } - }, - "@opentelemetry/api": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.0.4.tgz", - "integrity": "sha512-BuJuXRSJNQ3QoKA6GWWDyuLpOUck+9hAXNMCnrloc1aWVoy6Xq6t9PUV08aBZ4Lutqq2LEHM486bpZqoViScog==", - "dev": true - }, - "@sap/hana-client": { - "version": "2.12.25", - "resolved": "https://registry.npmjs.org/@sap/hana-client/-/hana-client-2.12.25.tgz", - "integrity": "sha512-Jn76aKTXryJmKbZaZdtUt2oLN3EQXyBi9gHK2hs+cTIK2Eb0popYvQu0M/9d2YXFGAtsfD14cXgh621m+NhRJA==", - "optional": true, - "peer": true, - "requires": { - "debug": "3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "optional": true, - "peer": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "optional": true, - "peer": true - } - } - }, - "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/fake-timers": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", - "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - }, - "@sinonjs/samsam": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.1.tgz", - "integrity": "sha512-1Hc0b1TtyfBu8ixF/tpfSHTVWKwCBLY4QJbkgnE7HcwyvT2xArDxb4K7dMgqRm3szI+LJbzmW/s4xxEhv6hwDg==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.6.0", - "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" - } - }, - "@sinonjs/text-encoding": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", - "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", - "dev": true - }, - "@sqltools/formatter": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@sqltools/formatter/-/formatter-1.2.3.tgz", - "integrity": "sha512-O3uyB/JbkAEMZaP3YqyHH7TMnex7tWyCbCI4EfJdOCoN6HIhqdJBWTM6aCCiWQ/5f5wxjgU735QAIpJbjDvmzg==" - }, - "@tediousjs/connection-string": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@tediousjs/connection-string/-/connection-string-0.3.0.tgz", - "integrity": "sha512-d/keJiNKfpHo+GmSB8QcsAwBx8h+V1UbdozA5TD+eSLXprNY53JAYub47J9evsSKWDdNG5uVj0FiMozLKuzowQ==", - "dev": true - }, - "@tootallnate/once": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", - "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", - "dev": true - }, - "@tsconfig/node10": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", - "integrity": "sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==", - "dev": true - }, - "@tsconfig/node12": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.9.tgz", - "integrity": "sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==", - "dev": true - }, - "@tsconfig/node14": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.1.tgz", - "integrity": "sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==", - "dev": true - }, - "@tsconfig/node16": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.2.tgz", - "integrity": "sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==", - "dev": true - }, - "@types/app-root-path": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@types/app-root-path/-/app-root-path-1.2.4.tgz", - "integrity": "sha1-p4twMoKzKsVN52j1US7MNWmRncc=", - "dev": true - }, - "@types/chai": { - "version": "4.2.22", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.22.tgz", - "integrity": "sha512-tFfcE+DSTzWAgifkjik9AySNqIyNoYwmR+uecPwwD/XRNfvOjmC/FjCxpiUGDkDVDphPfCUecSQVFw+lN3M3kQ==", - "dev": true - }, - "@types/chai-as-promised": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.4.tgz", - "integrity": "sha512-1y3L1cHePcIm5vXkh1DSGf/zQq5n5xDKG1fpCvf18+uOkpce0Z1ozNFPkyWsVswK7ntN1sZBw3oU6gmN+pDUcA==", - "dev": true, - "requires": { - "@types/chai": "*" - } - }, - "@types/debug": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", - "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==", - "dev": true, - "requires": { - "@types/ms": "*" - } - }, - "@types/expect": { - "version": "1.20.4", - "resolved": "https://registry.npmjs.org/@types/expect/-/expect-1.20.4.tgz", - "integrity": "sha512-Q5Vn3yjTDyCMV50TB6VRIbQNxSE4OmZR86VSbGaNpfUolm0iePBB4KdEEHmxoY5sT2+2DIvXW0rvMDP2nHZ4Mg==", - "dev": true - }, - "@types/glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-w+LsMxKyYQm347Otw+IfBXOv9UWVjpHpCDdbBMt8Kz/xbvCYNjP+0qPh91Km3iKfSRLBB0P7fAMf0KHrPu+MyA==", - "dev": true, - "requires": { - "@types/minimatch": "*", - "@types/node": "*" - } - }, - "@types/glob-stream": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@types/glob-stream/-/glob-stream-6.1.1.tgz", - "integrity": "sha512-AGOUTsTdbPkRS0qDeyeS+6KypmfVpbT5j23SN8UPG63qjKXNKjXn6V9wZUr8Fin0m9l8oGYaPK8b2WUMF8xI1A==", - "dev": true, - "requires": { - "@types/glob": "*", - "@types/node": "*" - } - }, - "@types/gulp": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/@types/gulp/-/gulp-4.0.9.tgz", - "integrity": "sha512-zzT+wfQ8uwoXjDhRK9Zkmmk09/fbLLmN/yDHFizJiEKIve85qutOnXcP/TM2sKPBTU+Jc16vfPbOMkORMUBN7Q==", - "dev": true, - "requires": { - "@types/undertaker": "*", - "@types/vinyl-fs": "*", - "chokidar": "^3.3.1" - }, - "dependencies": { - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "chokidar": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", - "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", - "dev": true, - "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "requires": { - "picomatch": "^2.2.1" - } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - } - } - }, - "@types/js-yaml": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.3.tgz", - "integrity": "sha512-5t9BhoORasuF5uCPr+d5/hdB++zRFUTMIZOzbNkr+jZh3yQht4HYbRDyj9fY8n2TZT30iW9huzav73x4NikqWg==", - "dev": true - }, - "@types/merge2": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@types/merge2/-/merge2-1.3.1.tgz", - "integrity": "sha512-aDA8WfZHU/J1OeQmrP+DfGrl1tb0cwNIuiiIqK3+S21gQ+aWg2n4OIvmFHpd2A4yQdZfjikC4XIYVNtX+b9qgg==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/minimatch": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", - "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", - "dev": true - }, - "@types/minimist": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", - "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", - "dev": true - }, - "@types/mkdirp": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@types/mkdirp/-/mkdirp-1.0.2.tgz", - "integrity": "sha512-o0K1tSO0Dx5X6xlU5F1D6625FawhC3dU3iqr25lluNv/+/QIVH8RLNEiVokgIZo+mz+87w/3Mkg/VvQS+J51fQ==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - }, - "@types/ms": { - "version": "0.7.31", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", - "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==", - "dev": true - }, - "@types/node": { - "version": "14.17.20", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.20.tgz", - "integrity": "sha512-gI5Sl30tmhXsqkNvopFydP7ASc4c2cLfGNQrVKN3X90ADFWFsPEsotm/8JHSUJQKTHbwowAHtcJPeyVhtKv0TQ==", - "dev": true - }, - "@types/node-fetch": { - "version": "2.5.12", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz", - "integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==", - "dev": true, - "requires": { - "@types/node": "*", - "form-data": "^3.0.0" - }, - "dependencies": { - "form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - } - } - }, - "@types/normalize-package-data": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", - "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", - "dev": true - }, - "@types/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-F3OznnSLAUxFrCEu/L5PY8+ny8DtcFRjx7fZZ9bycvXRi3KPTRS9HOitGZwvPg0juRhXFWIeKX58cnX5YqLohQ==", - "dev": true, - "requires": { - "@types/glob": "*", - "@types/node": "*" - } - }, - "@types/sha.js": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@types/sha.js/-/sha.js-2.4.0.tgz", - "integrity": "sha512-amxKgPy6WJTKuw8mpUwjX2BSxuBtBmZfRwIUDIuPJKNwGN8CWDli8JTg5ONTWOtcTkHIstvT7oAhhYXqEjStHQ==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/sinon": { - "version": "9.0.11", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-9.0.11.tgz", - "integrity": "sha512-PwP4UY33SeeVKodNE37ZlOsR9cReypbMJOhZ7BVE0lB+Hix3efCOxiJWiE5Ia+yL9Cn2Ch72EjFTRze8RZsNtg==", - "dev": true, - "requires": { - "@types/sinonjs__fake-timers": "*" - } - }, - "@types/sinonjs__fake-timers": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-6.0.4.tgz", - "integrity": "sha512-IFQTJARgMUBF+xVd2b+hIgXWrZEjND3vJtRCvIelcFB5SIXfjV4bOHbHJ0eXKh+0COrBRc8MqteKAz/j88rE0A==", - "dev": true - }, - "@types/source-map-support": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@types/source-map-support/-/source-map-support-0.5.4.tgz", - "integrity": "sha512-9zGujX1sOPg32XLyfgEB/0G9ZnrjthL/Iv1ZfuAjj8LEilHZEpQSQs1scpRXPhHzGYgWiLz9ldF1cI8JhL+yMw==", - "dev": true, - "requires": { - "source-map": "^0.6.0" - } - }, - "@types/stoppable": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/stoppable/-/stoppable-1.1.1.tgz", - "integrity": "sha512-b8N+fCADRIYYrGZOcmOR8ZNBOqhktWTB/bMUl5LvGtT201QKJZOOH5UsFyI3qtteM6ZAJbJqZoBcLqqxKIwjhw==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/tunnel": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@types/tunnel/-/tunnel-0.0.3.tgz", - "integrity": "sha512-sOUTGn6h1SfQ+gbgqC364jLFBw2lnFqkgF3q0WovEHRLMrVD1sd5aufqi/aJObLekJO+Aq5z646U4Oxy6shXMA==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/undertaker": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/@types/undertaker/-/undertaker-1.2.7.tgz", - "integrity": "sha512-xuY7nBwo1zSRoY2aitp/HArHfTulFAKql2Fr4b4mWbBBP+F50n7Jm6nwISTTMaDk2xvl92O10TTejVF0Q9mInw==", - "dev": true, - "requires": { - "@types/node": "*", - "@types/undertaker-registry": "*", - "async-done": "~1.3.2" - } - }, - "@types/undertaker-registry": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/undertaker-registry/-/undertaker-registry-1.0.1.tgz", - "integrity": "sha512-Z4TYuEKn9+RbNVk1Ll2SS4x1JeLHecolIbM/a8gveaHsW0Hr+RQMraZACwTO2VD7JvepgA6UO1A1VrbktQrIbQ==", - "dev": true - }, - "@types/uuid": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", - "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==", - "dev": true - }, - "@types/vinyl": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.6.tgz", - "integrity": "sha512-ayJ0iOCDNHnKpKTgBG6Q6JOnHTj9zFta+3j2b8Ejza0e4cvRyMn0ZoLEmbPrTHe5YYRlDYPvPWVdV4cTaRyH7g==", - "dev": true, - "requires": { - "@types/expect": "^1.20.4", - "@types/node": "*" - } - }, - "@types/vinyl-fs": { - "version": "2.4.12", - "resolved": "https://registry.npmjs.org/@types/vinyl-fs/-/vinyl-fs-2.4.12.tgz", - "integrity": "sha512-LgBpYIWuuGsihnlF+OOWWz4ovwCYlT03gd3DuLwex50cYZLmX3yrW+sFF9ndtmh7zcZpS6Ri47PrIu+fV+sbXw==", - "dev": true, - "requires": { - "@types/glob-stream": "*", - "@types/node": "*", - "@types/vinyl": "*" - } - }, - "@types/xml2js": { - "version": "0.4.9", - "resolved": "https://registry.npmjs.org/@types/xml2js/-/xml2js-0.4.9.tgz", - "integrity": "sha512-CHiCKIihl1pychwR2RNX5mAYmJDACgFVCMT5OArMaO3erzwXVcBqPcusr+Vl8yeeXukxZqtF8mZioqX+mpjjdw==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/yargs": { - "version": "17.0.3", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.3.tgz", - "integrity": "sha512-K7rm3Ke3ag/pAniBe80A6J6fjoqRibvCrl3dRmtXV9eCEt9h/pZwmHX9MzjQVUc/elneQTL4Ky7XKorC71Lmxw==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, - "@types/yargs-parser": { - "version": "20.2.1", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz", - "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==", - "dev": true - }, - "@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, - "@xmldom/xmldom": { - "version": "0.7.8", - "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.7.8.tgz", - "integrity": "sha512-PrJx38EfpitFhwmILRl37jAdBlsww6AZ6rRVK4QS7T7RHLhX7mSs647sTmgr9GIxe3qjXdesmomEgbgaokrVFg==", - "dev": true - }, - "abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", - "dev": true - }, - "abort-controller": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", - "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", - "dev": true, - "requires": { - "event-target-shim": "^5.0.0" - } - }, - "acorn": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", - "dev": true - }, - "acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "dev": true - }, - "adal-node": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/adal-node/-/adal-node-0.2.3.tgz", - "integrity": "sha512-gMKr8RuYEYvsj7jyfCv/4BfKToQThz20SP71N3AtFn3ia3yAR8Qt2T3aVQhuJzunWs2b38ZsQV0qsZPdwZr7VQ==", - "dev": true, - "requires": { - "@xmldom/xmldom": "^0.7.0", - "async": "^2.6.3", - "axios": "^0.21.1", - "date-utils": "*", - "jws": "3.x.x", - "underscore": ">= 1.3.1", - "uuid": "^3.1.0", - "xpath.js": "~1.1.0" - }, - "dependencies": { - "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", - "dev": true, - "requires": { - "lodash": "^4.17.14" - } - }, - "jwa": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", - "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", - "dev": true, - "requires": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "jws": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", - "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", - "dev": true, - "requires": { - "jwa": "^1.4.1", - "safe-buffer": "^5.0.1" - } - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "dev": true - } - } - }, - "add-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/add-stream/-/add-stream-1.0.0.tgz", - "integrity": "sha1-anmQQ3ynNtXhKI25K9MmbV9csqo=", - "dev": true - }, - "agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dev": true, - "requires": { - "debug": "4" - } - }, - "agentkeepalive": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz", - "integrity": "sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA==", - "dev": true, - "optional": true, - "requires": { - "debug": "^4.1.0", - "depd": "^1.1.2", - "humanize-ms": "^1.2.1" - }, - "dependencies": { - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "dev": true, - "optional": true - } - } - }, - "aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - } - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true, - "optional": true - }, - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - }, - "ansi-cyan": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz", - "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=", - "dev": true, - "requires": { - "ansi-wrap": "0.1.0" - } - }, - "ansi-gray": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", - "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", - "dev": true, - "requires": { - "ansi-wrap": "0.1.0" - } - }, - "ansi-red": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", - "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", - "dev": true, - "requires": { - "ansi-wrap": "0.1.0" - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "ansi-wrap": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", - "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", - "dev": true - }, - "any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=" - }, - "anymatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", - "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", - "dev": true, - "requires": { - "micromatch": "^3.1.4", - "normalize-path": "^2.1.1" - }, - "dependencies": { - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - } - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - } - } - }, - "app-root-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.0.0.tgz", - "integrity": "sha512-qMcx+Gy2UZynHjOHOIXPNvpf+9cjvk3cWrBBK7zg4gH9+clobJRb9NGzcT7mQTcV/6Gm/1WelUtqxVXnNlrwcw==" - }, - "append-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", - "integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=", - "dev": true, - "requires": { - "buffer-equal": "^1.0.0" - } - }, - "aproba": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "dev": true - }, - "archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", - "dev": true - }, - "are-we-there-yet": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", - "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", - "dev": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" - }, - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "arr-filter": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz", - "integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=", - "dev": true, - "requires": { - "make-iterator": "^1.0.0" - } - }, - "arr-flatten": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", - "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true - }, - "arr-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz", - "integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=", - "dev": true, - "requires": { - "make-iterator": "^1.0.0" - } - }, - "arr-union": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", - "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true - }, - "array-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", - "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", - "dev": true - }, - "array-ify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", - "integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=", - "dev": true - }, - "array-initial": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", - "integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U=", - "dev": true, - "requires": { - "array-slice": "^1.0.0", - "is-number": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - } - } - }, - "array-last": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/array-last/-/array-last-1.3.0.tgz", - "integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==", - "dev": true, - "requires": { - "is-number": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", - "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", - "dev": true - } - } - }, - "array-slice": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", - "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", - "dev": true - }, - "array-sort": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz", - "integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==", - "dev": true, - "requires": { - "default-compare": "^1.0.0", - "get-value": "^2.0.6", - "kind-of": "^5.0.2" - } - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true - }, - "assign-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", - "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "async-done": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz", - "integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.2", - "process-nextick-args": "^2.0.0", - "stream-exhaust": "^1.0.1" - } - }, - "async-each": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", - "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", - "dev": true - }, - "async-settle": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz", - "integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs=", - "dev": true, - "requires": { - "async-done": "^1.2.2" - } - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true - }, - "axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "dev": true, - "requires": { - "follow-redirects": "^1.14.0" - } - }, - "bach": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz", - "integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA=", - "dev": true, - "requires": { - "arr-filter": "^1.1.1", - "arr-flatten": "^1.0.1", - "arr-map": "^2.0.0", - "array-each": "^1.0.0", - "array-initial": "^1.0.0", - "array-last": "^1.1.1", - "async-done": "^1.2.2", - "async-settle": "^1.0.0", - "now-and-later": "^2.0.0" - } - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "base": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", - "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", - "dev": true, - "requires": { - "cache-base": "^1.0.1", - "class-utils": "^0.3.5", - "component-emitter": "^1.2.1", - "define-property": "^1.0.0", - "isobject": "^3.0.1", - "mixin-deep": "^1.2.0", - "pascalcase": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - } - } - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, - "better-sqlite3": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-7.4.3.tgz", - "integrity": "sha512-07bKjClZg/f4KMVRkzWtoIvazVPcF1gsvVKVIXlxwleC2DxuIhnra3KCMlUT1rFeRYXXckot2a46UciF2d9KLw==", - "dev": true, - "requires": { - "bindings": "^1.5.0", - "prebuild-install": "^6.0.1", - "tar": "^6.1.0" - } - }, - "bignumber.js": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", - "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==", - "dev": true - }, - "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", - "dev": true - }, - "binaryextensions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-2.3.0.tgz", - "integrity": "sha512-nAihlQsYGyc5Bwq6+EsubvANYGExeJKHDO3RjnvwU042fawQTQfM3Kxn7IHUXQOz4bzfwsGYYHGSvXyW4zOGLg==", - "dev": true - }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "dev": true, - "requires": { - "file-uri-to-path": "1.0.0" - } - }, - "bl": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", - "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", - "dev": true, - "requires": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - } - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "bson": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.6.tgz", - "integrity": "sha512-EvVNVeGo4tHxwi8L6bPj3y3itEvStdwvvlojVxxbyYfoaxJ6keLgrTuKdyfEAszFK+H3olzBuafE0yoh0D1gdg==", - "dev": true - }, - "buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "buffer-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", - "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", - "dev": true - }, - "buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=", - "dev": true - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "buffer-writer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/buffer-writer/-/buffer-writer-2.0.0.tgz", - "integrity": "sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==", - "dev": true - }, - "cacache": { - "version": "15.3.0", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.3.0.tgz", - "integrity": "sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ==", - "dev": true, - "optional": true, - "requires": { - "@npmcli/fs": "^1.0.0", - "@npmcli/move-file": "^1.0.1", - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "glob": "^7.1.4", - "infer-owner": "^1.0.4", - "lru-cache": "^6.0.0", - "minipass": "^3.1.1", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.2", - "mkdirp": "^1.0.3", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^8.0.1", - "tar": "^6.0.2", - "unique-filename": "^1.1.1" - } - }, - "cache-base": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", - "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", - "dev": true, - "requires": { - "collection-visit": "^1.0.0", - "component-emitter": "^1.2.1", - "get-value": "^2.0.6", - "has-value": "^1.0.0", - "isobject": "^3.0.1", - "set-value": "^2.0.0", - "to-object-path": "^0.3.0", - "union-value": "^1.0.0", - "unset-value": "^1.0.0" - } - }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "camelcase-keys": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", - "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "map-obj": "^4.0.0", - "quick-lru": "^4.0.1" - } - }, - "chai": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz", - "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==", - "dev": true, - "requires": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", - "pathval": "^1.1.1", - "type-detect": "^4.0.5" - } - }, - "chai-as-promised": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", - "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", - "dev": true, - "requires": { - "check-error": "^1.0.2" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", - "dev": true - }, - "chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", - "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" - }, - "dependencies": { - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - } - } - }, - "chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "dev": true - }, - "class-transformer": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/class-transformer/-/class-transformer-0.4.0.tgz", - "integrity": "sha512-ETWD/H2TbWbKEi7m9N4Km5+cw1hNcqJSxlSYhsLsNjQzWWiZIYA1zafxpK9PwVfaZ6AqR5rrjPVUBGESm5tQUA==", - "dev": true - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - } - }, - "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true - }, - "cli-highlight": { - "version": "2.1.11", - "resolved": "https://registry.npmjs.org/cli-highlight/-/cli-highlight-2.1.11.tgz", - "integrity": "sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg==", - "requires": { - "chalk": "^4.0.0", - "highlight.js": "^10.7.1", - "mz": "^2.4.0", - "parse5": "^5.1.1", - "parse5-htmlparser2-tree-adapter": "^6.0.0", - "yargs": "^16.0.0" - }, - "dependencies": { - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - } - } - } - }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - } - }, - "clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "dev": true - }, - "clone-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", - "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", - "dev": true - }, - "clone-stats": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", - "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", - "dev": true - }, - "cloneable-readable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", - "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "process-nextick-args": "^2.0.0", - "readable-stream": "^2.3.5" - } - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "collection-map": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz", - "integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw=", - "dev": true, - "requires": { - "arr-map": "^2.0.2", - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - } - }, - "collection-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", - "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", - "dev": true, - "requires": { - "map-visit": "^1.0.0", - "object-visit": "^1.0.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "dev": true - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "compare-func": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz", - "integrity": "sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==", - "dev": true, - "requires": { - "array-ify": "^1.0.0", - "dot-prop": "^5.1.0" - } - }, - "component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", - "dev": true - }, - "conventional-changelog": { - "version": "3.1.24", - "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.24.tgz", - "integrity": "sha512-ed6k8PO00UVvhExYohroVPXcOJ/K1N0/drJHx/faTH37OIZthlecuLIRX/T6uOp682CAoVoFpu+sSEaeuH6Asg==", - "dev": true, - "requires": { - "conventional-changelog-angular": "^5.0.12", - "conventional-changelog-atom": "^2.0.8", - "conventional-changelog-codemirror": "^2.0.8", - "conventional-changelog-conventionalcommits": "^4.5.0", - "conventional-changelog-core": "^4.2.1", - "conventional-changelog-ember": "^2.0.9", - "conventional-changelog-eslint": "^3.0.9", - "conventional-changelog-express": "^2.0.6", - "conventional-changelog-jquery": "^3.0.11", - "conventional-changelog-jshint": "^2.0.9", - "conventional-changelog-preset-loader": "^2.3.4" - } - }, - "conventional-changelog-angular": { - "version": "5.0.13", - "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz", - "integrity": "sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA==", - "dev": true, - "requires": { - "compare-func": "^2.0.0", - "q": "^1.5.1" - } - }, - "conventional-changelog-atom": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-2.0.8.tgz", - "integrity": "sha512-xo6v46icsFTK3bb7dY/8m2qvc8sZemRgdqLb/bjpBsH2UyOS8rKNTgcb5025Hri6IpANPApbXMg15QLb1LJpBw==", - "dev": true, - "requires": { - "q": "^1.5.1" - } - }, - "conventional-changelog-cli": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/conventional-changelog-cli/-/conventional-changelog-cli-2.1.1.tgz", - "integrity": "sha512-xMGQdKJ+4XFDDgfX5aK7UNFduvJMbvF5BB+g0OdVhA3rYdYyhctrIE2Al+WYdZeKTdg9YzMWF2iFPT8MupIwng==", - "dev": true, - "requires": { - "add-stream": "^1.0.0", - "conventional-changelog": "^3.1.24", - "lodash": "^4.17.15", - "meow": "^8.0.0", - "tempfile": "^3.0.0" - } - }, - "conventional-changelog-codemirror": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-2.0.8.tgz", - "integrity": "sha512-z5DAsn3uj1Vfp7po3gpt2Boc+Bdwmw2++ZHa5Ak9k0UKsYAO5mH1UBTN0qSCuJZREIhX6WU4E1p3IW2oRCNzQw==", - "dev": true, - "requires": { - "q": "^1.5.1" - } - }, - "conventional-changelog-conventionalcommits": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-4.6.1.tgz", - "integrity": "sha512-lzWJpPZhbM1R0PIzkwzGBCnAkH5RKJzJfFQZcl/D+2lsJxAwGnDKBqn/F4C1RD31GJNn8NuKWQzAZDAVXPp2Mw==", - "dev": true, - "requires": { - "compare-func": "^2.0.0", - "lodash": "^4.17.15", - "q": "^1.5.1" - } - }, - "conventional-changelog-core": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-4.2.4.tgz", - "integrity": "sha512-gDVS+zVJHE2v4SLc6B0sLsPiloR0ygU7HaDW14aNJE1v4SlqJPILPl/aJC7YdtRE4CybBf8gDwObBvKha8Xlyg==", - "dev": true, - "requires": { - "add-stream": "^1.0.0", - "conventional-changelog-writer": "^5.0.0", - "conventional-commits-parser": "^3.2.0", - "dateformat": "^3.0.0", - "get-pkg-repo": "^4.0.0", - "git-raw-commits": "^2.0.8", - "git-remote-origin-url": "^2.0.0", - "git-semver-tags": "^4.1.1", - "lodash": "^4.17.15", - "normalize-package-data": "^3.0.0", - "q": "^1.5.1", - "read-pkg": "^3.0.0", - "read-pkg-up": "^3.0.0", - "through2": "^4.0.0" - } - }, - "conventional-changelog-ember": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-2.0.9.tgz", - "integrity": "sha512-ulzIReoZEvZCBDhcNYfDIsLTHzYHc7awh+eI44ZtV5cx6LVxLlVtEmcO+2/kGIHGtw+qVabJYjdI5cJOQgXh1A==", - "dev": true, - "requires": { - "q": "^1.5.1" - } - }, - "conventional-changelog-eslint": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-3.0.9.tgz", - "integrity": "sha512-6NpUCMgU8qmWmyAMSZO5NrRd7rTgErjrm4VASam2u5jrZS0n38V7Y9CzTtLT2qwz5xEChDR4BduoWIr8TfwvXA==", - "dev": true, - "requires": { - "q": "^1.5.1" - } - }, - "conventional-changelog-express": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-2.0.6.tgz", - "integrity": "sha512-SDez2f3iVJw6V563O3pRtNwXtQaSmEfTCaTBPCqn0oG0mfkq0rX4hHBq5P7De2MncoRixrALj3u3oQsNK+Q0pQ==", - "dev": true, - "requires": { - "q": "^1.5.1" - } - }, - "conventional-changelog-jquery": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-3.0.11.tgz", - "integrity": "sha512-x8AWz5/Td55F7+o/9LQ6cQIPwrCjfJQ5Zmfqi8thwUEKHstEn4kTIofXub7plf1xvFA2TqhZlq7fy5OmV6BOMw==", - "dev": true, - "requires": { - "q": "^1.5.1" - } - }, - "conventional-changelog-jshint": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-2.0.9.tgz", - "integrity": "sha512-wMLdaIzq6TNnMHMy31hql02OEQ8nCQfExw1SE0hYL5KvU+JCTuPaDO+7JiogGT2gJAxiUGATdtYYfh+nT+6riA==", - "dev": true, - "requires": { - "compare-func": "^2.0.0", - "q": "^1.5.1" - } - }, - "conventional-changelog-preset-loader": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz", - "integrity": "sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g==", - "dev": true - }, - "conventional-changelog-writer": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-5.0.0.tgz", - "integrity": "sha512-HnDh9QHLNWfL6E1uHz6krZEQOgm8hN7z/m7tT16xwd802fwgMN0Wqd7AQYVkhpsjDUx/99oo+nGgvKF657XP5g==", - "dev": true, - "requires": { - "conventional-commits-filter": "^2.0.7", - "dateformat": "^3.0.0", - "handlebars": "^4.7.6", - "json-stringify-safe": "^5.0.1", - "lodash": "^4.17.15", - "meow": "^8.0.0", - "semver": "^6.0.0", - "split": "^1.0.0", - "through2": "^4.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "conventional-commits-filter": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz", - "integrity": "sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA==", - "dev": true, - "requires": { - "lodash.ismatch": "^4.4.0", - "modify-values": "^1.0.0" - } - }, - "conventional-commits-parser": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.2.2.tgz", - "integrity": "sha512-Jr9KAKgqAkwXMRHjxDwO/zOCDKod1XdAESHAGuJX38iZ7ZzVti/tvVoysO0suMsdAObp9NQ2rHSsSbnAqZ5f5g==", - "dev": true, - "requires": { - "is-text-path": "^1.0.1", - "JSONStream": "^1.0.4", - "lodash": "^4.17.15", - "meow": "^8.0.0", - "split2": "^3.0.0", - "through2": "^4.0.0" - } - }, - "convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "copy-descriptor": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", - "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true - }, - "copy-props": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.5.tgz", - "integrity": "sha512-XBlx8HSqrT0ObQwmSzM7WE5k8FxTV75h1DX1Z3n6NhQ/UYYAvInWYmG06vFt7hQZArE2fuO62aihiWIVQwh1sw==", - "dev": true, - "requires": { - "each-props": "^1.3.2", - "is-plain-object": "^5.0.0" - } - }, - "core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true - }, - "create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "css": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz", - "integrity": "sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ==", - "dev": true, - "requires": { - "inherits": "^2.0.4", - "source-map": "^0.6.1", - "source-map-resolve": "^0.6.0" - } - }, - "d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", - "dev": true, - "requires": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, - "dargs": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz", - "integrity": "sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==", - "dev": true - }, - "data-api-client": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/data-api-client/-/data-api-client-1.2.0.tgz", - "integrity": "sha512-AGv4lWOF4RyoqUOLrYWbZeIP7eyFCM2UxGJ92XG9Q0xHofrT/67plprl0mAsxpAYdWQ8u0hLZFxC+iQSASsjgQ==", - "dev": true, - "requires": { - "sqlstring": "^2.3.2" - }, - "dependencies": { - "sqlstring": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.2.tgz", - "integrity": "sha512-vF4ZbYdKS8OnoJAWBmMxCQDkiEBkGQYU7UZPtL8flbDRSNkhaXvRJ279ZtI6M+zDaQovVU4tuRgzK5fVhvFAhg==", - "dev": true - } - } - }, - "date-fns": { - "version": "2.28.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.28.0.tgz", - "integrity": "sha512-8d35hViGYx/QH0icHYCeLmsLmMUheMmTyV9Fcm6gvNwdw31yXXH+O85sOBJ+OLnLQMKZowvpKb6FgMIQjcpvQw==" - }, - "date-utils": { - "version": "1.2.21", - "resolved": "https://registry.npmjs.org/date-utils/-/date-utils-1.2.21.tgz", - "integrity": "sha1-YfsWzcEnSzyayq/+n8ad+HIKK2Q=", - "dev": true - }, - "dateformat": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", - "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", - "dev": true - }, - "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", - "requires": { - "ms": "2.1.2" - } - }, - "debug-fabulous": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/debug-fabulous/-/debug-fabulous-1.1.0.tgz", - "integrity": "sha512-GZqvGIgKNlUnHUPQhepnUZFIMoi3dgZKQBzKDeL2g7oJF9SNAji/AAu36dusFUas0O+pae74lNeoIPHqXWDkLg==", - "dev": true, - "requires": { - "debug": "3.X", - "memoizee": "0.4.X", - "object-assign": "4.X" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "decamelize-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", - "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", - "dev": true, - "requires": { - "decamelize": "^1.1.0", - "map-obj": "^1.0.0" - }, - "dependencies": { - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - } - } - }, - "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true - }, - "decompress-response": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", - "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", - "dev": true, - "requires": { - "mimic-response": "^2.0.0" - } - }, - "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "dev": true, - "requires": { - "type-detect": "^4.0.0" - } - }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true - }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "default-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz", - "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==", - "dev": true, - "requires": { - "kind-of": "^5.0.2" - } - }, - "default-resolution": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/default-resolution/-/default-resolution-2.0.0.tgz", - "integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ=", - "dev": true - }, - "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==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "del": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-6.0.0.tgz", - "integrity": "sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ==", - "dev": true, - "requires": { - "globby": "^11.0.1", - "graceful-fs": "^4.2.4", - "is-glob": "^4.0.1", - "is-path-cwd": "^2.2.0", - "is-path-inside": "^3.0.2", - "p-map": "^4.0.0", - "rimraf": "^3.0.2", - "slash": "^3.0.0" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true - }, - "delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true - }, - "denque": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.1.tgz", - "integrity": "sha512-XwE+iZ4D6ZUB7mfYRMb5wByE8L74HCn30FBN7sWnXksWc1LO1bPDl67pBR9o/kC4z/xSNAwkMYcGgqDV3BE3Hw==", - "dev": true - }, - "depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true - }, - "detect-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", - "dev": true - }, - "detect-libc": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", - "dev": true - }, - "detect-newline": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", - "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=", - "dev": true - }, - "diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true - }, - "dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "requires": { - "path-type": "^4.0.0" - } - }, - "dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", - "dev": true, - "requires": { - "is-obj": "^2.0.0" - } - }, - "dotenv": { - "version": "16.0.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.0.tgz", - "integrity": "sha512-qD9WU0MPM4SWLPJy/r2Be+2WgQj8plChsyrCNQzW/0WjvcJQiKQJ9mH3ZgB3fxbUUxgc/11ZJ0Fi5KiimWGz2Q==" - }, - "duplexify": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", - "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", - "dev": true, - "requires": { - "end-of-stream": "^1.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.0.0", - "stream-shift": "^1.0.0" - } - }, - "each-props": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz", - "integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.1", - "object.defaults": "^1.1.0" - }, - "dependencies": { - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - } - } - }, - "ecdsa-sig-formatter": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", - "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "encoding": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", - "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "dev": true, - "optional": true, - "requires": { - "iconv-lite": "^0.6.2" - } - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "env-paths": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", - "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", - "dev": true, - "optional": true - }, - "err-code": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz", - "integrity": "sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==", - "dev": true, - "optional": true - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es5-ext": { - "version": "0.10.53", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", - "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", - "dev": true, - "requires": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.3", - "next-tick": "~1.0.0" - }, - "dependencies": { - "next-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", - "dev": true - } - } - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "dev": true, - "requires": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, - "es6-weak-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", - "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "^0.10.46", - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.1" - } - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "escodegen": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", - "dev": true, - "requires": { - "esprima": "^2.7.1", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.2.0" - }, - "dependencies": { - "estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", - "dev": true - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", - "dev": true, - "optional": true, - "requires": { - "amdefine": ">=0.0.4" - } - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - } - } - }, - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, - "event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", - "dev": true - }, - "events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true - }, - "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - } - } - }, - "expand-template": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", - "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", - "dev": true - }, - "expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "ext": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.6.0.tgz", - "integrity": "sha512-sdBImtzkq2HpkdRLtlLWDa6w4DX22ijZLKx8BMPUuKe1c5lbN6xwQDQCxSfxBQnHZ13ls/FH0MQZx/q/gr6FQg==", - "dev": true, - "requires": { - "type": "^2.5.0" - }, - "dependencies": { - "type": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz", - "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==", - "dev": true - } - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - } - } - }, - "fancy-log": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz", - "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==", - "dev": true, - "requires": { - "ansi-gray": "^0.1.1", - "color-support": "^1.1.3", - "parse-node-version": "^1.0.0", - "time-stamp": "^1.0.0" - } - }, - "fast-glob": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", - "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - } - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", - "dev": true - }, - "fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", - "dev": true, - "requires": { - "reusify": "^1.0.4" - } - }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "dev": true - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - } - }, - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "findup-sync": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", - "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", - "dev": true, - "requires": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" - }, - "dependencies": { - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - } - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - } - } - }, - "fined": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", - "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", - "dev": true, - "requires": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^2.0.3", - "object.defaults": "^1.1.0", - "object.pick": "^1.2.0", - "parse-filepath": "^1.0.1" - }, - "dependencies": { - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - } - } - }, - "flagged-respawn": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", - "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", - "dev": true - }, - "flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true - }, - "flush-write-stream": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", - "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" - } - }, - "follow-redirects": { - "version": "1.14.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", - "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==", - "dev": true - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "fragment-cache": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", - "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", - "dev": true, - "requires": { - "map-cache": "^0.2.2" - } - }, - "fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true - }, - "fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dev": true, - "requires": { - "minipass": "^3.0.0" - } - }, - "fs-mkdirp-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", - "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "through2": "^2.0.3" - }, - "dependencies": { - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - } - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "fsevents": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", - "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", - "dev": true, - "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1" - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", - "dev": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "generate-function": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", - "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", - "dev": true, - "requires": { - "is-property": "^1.0.2" - } - }, - "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-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", - "dev": true - }, - "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - } - }, - "get-pkg-repo": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-4.2.1.tgz", - "integrity": "sha512-2+QbHjFRfGB74v/pYWjd5OhU3TDIC2Gv/YKUTk/tCvAz0pkn/Mz6P3uByuBimLOcPvN2jYdScl3xGFSrx0jEcA==", - "dev": true, - "requires": { - "@hutson/parse-repository-url": "^3.0.0", - "hosted-git-info": "^4.0.0", - "through2": "^2.0.0", - "yargs": "^16.2.0" - }, - "dependencies": { - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - } - } - } - }, - "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, - "git-raw-commits": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.10.tgz", - "integrity": "sha512-sHhX5lsbG9SOO6yXdlwgEMQ/ljIn7qMpAbJZCGfXX2fq5T8M5SrDnpYk9/4HswTildcIqatsWa91vty6VhWSaQ==", - "dev": true, - "requires": { - "dargs": "^7.0.0", - "lodash": "^4.17.15", - "meow": "^8.0.0", - "split2": "^3.0.0", - "through2": "^4.0.0" - } - }, - "git-remote-origin-url": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz", - "integrity": "sha1-UoJlna4hBxRaERJhEq0yFuxfpl8=", - "dev": true, - "requires": { - "gitconfiglocal": "^1.0.0", - "pify": "^2.3.0" - } - }, - "git-semver-tags": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-4.1.1.tgz", - "integrity": "sha512-OWyMt5zBe7xFs8vglMmhM9lRQzCWL3WjHtxNNfJTMngGym7pC1kh8sP6jevfydJ6LP3ZvGxfb6ABYgPUM0mtsA==", - "dev": true, - "requires": { - "meow": "^8.0.0", - "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "gitconfiglocal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz", - "integrity": "sha1-QdBF84UaXqiPA/JMocYXgRRGS5s=", - "dev": true, - "requires": { - "ini": "^1.3.2" - } - }, - "github-from-package": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=", - "dev": true - }, - "glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "glob-stream": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", - "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=", - "dev": true, - "requires": { - "extend": "^3.0.0", - "glob": "^7.1.1", - "glob-parent": "^3.1.0", - "is-negated-glob": "^1.0.0", - "ordered-read-streams": "^1.0.0", - "pumpify": "^1.3.5", - "readable-stream": "^2.1.5", - "remove-trailing-separator": "^1.0.1", - "to-absolute-glob": "^2.0.0", - "unique-stream": "^2.0.2" - }, - "dependencies": { - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - } - }, - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "glob-watcher": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.5.tgz", - "integrity": "sha512-zOZgGGEHPklZNjZQaZ9f41i7F2YwE+tS5ZHrDhbBCk3stwahn5vQxnFmBJZHoYdusR6R1bLSXeGUy/BhctwKzw==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-done": "^1.2.0", - "chokidar": "^2.0.0", - "is-negated-glob": "^1.0.0", - "just-debounce": "^1.0.0", - "normalize-path": "^3.0.0", - "object.defaults": "^1.1.0" - } - }, - "global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "dev": true, - "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - } - }, - "global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", - "dev": true, - "requires": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - }, - "dependencies": { - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "globby": { - "version": "11.0.4", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", - "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", - "dev": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", - "slash": "^3.0.0" - } - }, - "glogg": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz", - "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==", - "dev": true, - "requires": { - "sparkles": "^1.0.0" - } - }, - "graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", - "dev": true - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, - "gulp": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz", - "integrity": "sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==", - "dev": true, - "requires": { - "glob-watcher": "^5.0.3", - "gulp-cli": "^2.2.0", - "undertaker": "^1.2.1", - "vinyl-fs": "^3.0.0" - } - }, - "gulp-cli": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.3.0.tgz", - "integrity": "sha512-zzGBl5fHo0EKSXsHzjspp3y5CONegCm8ErO5Qh0UzFzk2y4tMvzLWhoDokADbarfZRL2pGpRp7yt6gfJX4ph7A==", - "dev": true, - "requires": { - "ansi-colors": "^1.0.1", - "archy": "^1.0.0", - "array-sort": "^1.0.0", - "color-support": "^1.1.3", - "concat-stream": "^1.6.0", - "copy-props": "^2.0.1", - "fancy-log": "^1.3.2", - "gulplog": "^1.0.0", - "interpret": "^1.4.0", - "isobject": "^3.0.1", - "liftoff": "^3.1.0", - "matchdep": "^2.0.0", - "mute-stdout": "^1.0.0", - "pretty-hrtime": "^1.0.0", - "replace-homedir": "^1.0.0", - "semver-greatest-satisfied-range": "^1.1.0", - "v8flags": "^3.2.0", - "yargs": "^7.1.0" - }, - "dependencies": { - "ansi-colors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", - "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", - "dev": true, - "requires": { - "ansi-wrap": "^0.1.0" - } - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true - }, - "camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", - "dev": true - }, - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - } - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, - "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "dev": true, - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - } - }, - "y18n": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", - "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", - "dev": true - }, - "yargs": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.2.tgz", - "integrity": "sha512-ZEjj/dQYQy0Zx0lgLMLR8QuaqTihnxirir7EwUHp1Axq4e3+k8jXU5K0VLbNvedv1f4EWtBonDIZm0NUr+jCcA==", - "dev": true, - "requires": { - "camelcase": "^3.0.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^1.4.0", - "read-pkg-up": "^1.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^1.0.2", - "which-module": "^1.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^5.0.1" - } - }, - "yargs-parser": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.1.tgz", - "integrity": "sha512-wpav5XYiddjXxirPoCTUPbqM0PXvJ9hiBMvuJgInvo4/lAOTZzUprArw17q2O1P2+GHhbBr18/iQwjL5Z9BqfA==", - "dev": true, - "requires": { - "camelcase": "^3.0.0", - "object.assign": "^4.1.0" - } - } - } - }, - "gulp-istanbul": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/gulp-istanbul/-/gulp-istanbul-1.1.3.tgz", - "integrity": "sha512-uMLSdqPDnBAV/B9rNyOgVMgrVC1tPbe+5GH6P13UOyxbRDT/w4sKYHWftPMA8j9om+NFvfeRlqpDXL2fixFWNA==", - "dev": true, - "requires": { - "istanbul": "^0.4.0", - "istanbul-threshold-checker": "^0.2.1", - "lodash": "^4.0.0", - "plugin-error": "^0.1.2", - "through2": "^2.0.0", - "vinyl-sourcemaps-apply": "^0.2.1" - }, - "dependencies": { - "arr-diff": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", - "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1", - "array-slice": "^0.2.3" - } - }, - "arr-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", - "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=", - "dev": true - }, - "array-slice": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", - "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", - "dev": true - }, - "extend-shallow": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", - "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", - "dev": true, - "requires": { - "kind-of": "^1.1.0" - } - }, - "kind-of": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", - "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", - "dev": true - }, - "plugin-error": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", - "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", - "dev": true, - "requires": { - "ansi-cyan": "^0.1.1", - "ansi-red": "^0.1.1", - "arr-diff": "^1.0.1", - "arr-union": "^2.0.1", - "extend-shallow": "^1.1.2" - } - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - } - } - }, - "gulp-mocha": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/gulp-mocha/-/gulp-mocha-8.0.0.tgz", - "integrity": "sha512-FdbBydfzszaES/gXfwD6RFq1yJTj4Z6328R1yqsmhf+t7hW2aj9ZD9Hz8boQShjZ9J8/w6tQBM5mePb8K2pbqA==", - "dev": true, - "requires": { - "dargs": "^7.0.0", - "execa": "^5.0.0", - "mocha": "^8.3.0", - "plugin-error": "^1.0.1", - "supports-color": "^8.1.1", - "through2": "^4.0.2" - }, - "dependencies": { - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "gulp-rename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-2.0.0.tgz", - "integrity": "sha512-97Vba4KBzbYmR5VBs9mWmK+HwIf5mj+/zioxfZhOKeXtx5ZjBk57KFlePf5nxq9QsTtFl0ejnHE3zTC9MHXqyQ==", - "dev": true - }, - "gulp-replace": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/gulp-replace/-/gulp-replace-1.1.3.tgz", - "integrity": "sha512-HcPHpWY4XdF8zxYkDODHnG2+7a3nD/Y8Mfu3aBgMiCFDW3X2GiOKXllsAmILcxe3KZT2BXoN18WrpEFm48KfLQ==", - "dev": true, - "requires": { - "@types/node": "^14.14.41", - "@types/vinyl": "^2.0.4", - "istextorbinary": "^3.0.0", - "replacestream": "^4.0.3", - "yargs-parser": ">=5.0.0-security.0" - } - }, - "gulp-shell": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/gulp-shell/-/gulp-shell-0.8.0.tgz", - "integrity": "sha512-wHNCgmqbWkk1c6Gc2dOL5SprcoeujQdeepICwfQRo91DIylTE7a794VEE+leq3cE2YDoiS5ulvRfKVIEMazcTQ==", - "dev": true, - "requires": { - "chalk": "^3.0.0", - "fancy-log": "^1.3.3", - "lodash.template": "^4.5.0", - "plugin-error": "^1.0.1", - "through2": "^3.0.1", - "tslib": "^1.10.0" - }, - "dependencies": { - "chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "through2": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", - "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", - "dev": true, - "requires": { - "inherits": "^2.0.4", - "readable-stream": "2 || 3" - } - }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - } - } - }, - "gulp-sourcemaps": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-3.0.0.tgz", - "integrity": "sha512-RqvUckJkuYqy4VaIH60RMal4ZtG0IbQ6PXMNkNsshEGJ9cldUPRb/YCgboYae+CLAs1HQNb4ADTKCx65HInquQ==", - "dev": true, - "requires": { - "@gulp-sourcemaps/identity-map": "^2.0.1", - "@gulp-sourcemaps/map-sources": "^1.0.0", - "acorn": "^6.4.1", - "convert-source-map": "^1.0.0", - "css": "^3.0.0", - "debug-fabulous": "^1.0.0", - "detect-newline": "^2.0.0", - "graceful-fs": "^4.0.0", - "source-map": "^0.6.0", - "strip-bom-string": "^1.0.0", - "through2": "^2.0.0" - }, - "dependencies": { - "acorn": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", - "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", - "dev": true - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - } - } - }, - "gulp-typescript": { - "version": "6.0.0-alpha.1", - "resolved": "https://registry.npmjs.org/gulp-typescript/-/gulp-typescript-6.0.0-alpha.1.tgz", - "integrity": "sha512-KoT0TTfjfT7w3JItHkgFH1T/zK4oXWC+a8xxKfniRfVcA0Fa1bKrIhztYelYmb+95RB80OLMBreknYkdwzdi2Q==", - "dev": true, - "requires": { - "ansi-colors": "^4.1.1", - "plugin-error": "^1.0.1", - "source-map": "^0.7.3", - "through2": "^3.0.1", - "vinyl": "^2.2.0", - "vinyl-fs": "^3.0.3" - }, - "dependencies": { - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true - }, - "through2": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", - "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", - "dev": true, - "requires": { - "inherits": "^2.0.4", - "readable-stream": "2 || 3" - } - } - } - }, - "gulpclass": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/gulpclass/-/gulpclass-0.2.0.tgz", - "integrity": "sha512-S2p0SgnVLjBbIEw5tHbBV6Wm6abD+leA5xZG6ukf9M+j1I/8zIeKPby9GLWnI90671YRk+lXbvEUROKaZXo8NA==", - "dev": true, - "requires": { - "@types/gulp": "^4.0.5", - "@types/merge2": "^1.1.4", - "@types/node": "*", - "gulp": "^4.0.0", - "merge2": "^1.2.2" - } - }, - "gulplog": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", - "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", - "dev": true, - "requires": { - "glogg": "^1.0.0" - } - }, - "handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", - "dev": true, - "requires": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4", - "wordwrap": "^1.0.0" - } - }, - "hard-rejection": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", - "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", - "dev": true - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", - "dev": true - }, - "has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", - "dev": true - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "hdb-pool": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/hdb-pool/-/hdb-pool-0.1.6.tgz", - "integrity": "sha512-8VZOLn1EHamm1NmTFQj2iqjVcfonYIsD7F5DU2bz2N+gF+knp6/MbAVeRXkJtya717IBkPeA5iv0/1iPuYo4ZA==", - "optional": true, - "peer": true - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==" - }, - "homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "dev": true, - "requires": { - "parse-passwd": "^1.0.0" - } - }, - "hosted-git-info": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz", - "integrity": "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "http-cache-semantics": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", - "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", - "dev": true, - "optional": true - }, - "http-proxy-agent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", - "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", - "dev": true, - "requires": { - "@tootallnate/once": "1", - "agent-base": "6", - "debug": "4" - } - }, - "https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", - "dev": true, - "requires": { - "agent-base": "6", - "debug": "4" - } - }, - "human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true - }, - "humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", - "dev": true, - "optional": true, - "requires": { - "ms": "^2.0.0" - } - }, - "husky": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/husky/-/husky-5.2.0.tgz", - "integrity": "sha512-AM8T/auHXRBxlrfPVLKP6jt49GCM2Zz47m8G3FOMsLmTv8Dj/fKVWE0Rh2d4Qrvmy131xEsdQnb3OXRib67PGg==", - "dev": true - }, - "iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" - }, - "ignore": { - "version": "5.1.8", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "optional": true - }, - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true - }, - "infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", - "dev": true, - "optional": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, - "ip": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz", - "integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==", - "dev": true, - "optional": true - }, - "ip-regex": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", - "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", - "dev": true - }, - "is-absolute": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", - "dev": true, - "requires": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "is-core-module": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.7.0.tgz", - "integrity": "sha512-ByY+tjCciCr+9nLryBYcSD50EOGWt95c7tIsKTG1J2ixKKXPvF7Ej3AVd+UfDydAJom3biBGDBALaO79ktwgEQ==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "is-docker": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", - "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", - "dev": true - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-lambda": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", - "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", - "dev": true, - "optional": true - }, - "is-negated-glob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", - "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=", - "dev": true - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", - "dev": true - }, - "is-path-cwd": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", - "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", - "dev": true - }, - "is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true - }, - "is-plain-object": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", - "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", - "dev": true - }, - "is-promise": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", - "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", - "dev": true - }, - "is-property": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", - "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=", - "dev": true - }, - "is-relative": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", - "dev": true, - "requires": { - "is-unc-path": "^1.0.0" - } - }, - "is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true - }, - "is-text-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", - "integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=", - "dev": true, - "requires": { - "text-extensions": "^1.0.0" - } - }, - "is-unc-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", - "dev": true, - "requires": { - "unc-path-regex": "^0.1.2" - } - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "is-valid-glob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", - "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "is-wsl": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", - "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", - "dev": true, - "requires": { - "is-docker": "^2.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "istanbul": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", - "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", - "dev": true, - "requires": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.8.x", - "esprima": "2.7.x", - "glob": "^5.0.15", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", - "dev": true - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "dependencies": { - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - } - } - }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "istanbul-threshold-checker": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/istanbul-threshold-checker/-/istanbul-threshold-checker-0.2.1.tgz", - "integrity": "sha1-xdyU6PLMXNP/0zVFL4S1U8QkgzE=", - "dev": true, - "requires": { - "istanbul": "~0.4.5", - "lodash": "~4.17.2" - } - }, - "istextorbinary": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-3.3.0.tgz", - "integrity": "sha512-Tvq1W6NAcZeJ8op+Hq7tdZ434rqnMx4CCZ7H0ff83uEloDvVbqAwaMTZcafKGJT0VHkYzuXUiCY4hlXQg6WfoQ==", - "dev": true, - "requires": { - "binaryextensions": "^2.2.0", - "textextensions": "^3.2.0" - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "requires": { - "argparse": "^2.0.1" - } - }, - "jsbi": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/jsbi/-/jsbi-3.2.5.tgz", - "integrity": "sha512-aBE4n43IPvjaddScbvWRA2YlTzKEynHzu7MqOyTipdHucf/VxS63ViCjxYRg86M8Rxwbt/GfzHl1kKERkt45fQ==", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", - "dev": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", - "dev": true - }, - "JSONStream": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", - "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", - "dev": true, - "requires": { - "jsonparse": "^1.2.0", - "through": ">=2.2.7 <3" - } - }, - "jsonwebtoken": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", - "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", - "dev": true, - "requires": { - "jws": "^3.2.2", - "lodash.includes": "^4.3.0", - "lodash.isboolean": "^3.0.3", - "lodash.isinteger": "^4.0.4", - "lodash.isnumber": "^3.0.3", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.once": "^4.0.0", - "ms": "^2.1.1", - "semver": "^5.6.0" - }, - "dependencies": { - "jwa": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", - "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", - "dev": true, - "requires": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "jws": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", - "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", - "dev": true, - "requires": { - "jwa": "^1.4.1", - "safe-buffer": "^5.0.1" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "just-debounce": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.1.0.tgz", - "integrity": "sha512-qpcRocdkUmf+UTNBYx5w6dexX5J31AKK1OmPwH630a83DdVVUIngk55RSAiIGpQyoH0dlr872VHfPjnQnK1qDQ==", - "dev": true - }, - "just-extend": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", - "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", - "dev": true - }, - "jwa": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", - "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", - "dev": true, - "requires": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "jws": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", - "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", - "dev": true, - "requires": { - "jwa": "^2.0.0", - "safe-buffer": "^5.0.1" - } - }, - "keytar": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/keytar/-/keytar-7.7.0.tgz", - "integrity": "sha512-YEY9HWqThQc5q5xbXbRwsZTh2PJ36OSYRjSv3NN2xf5s5dpLTjEZnC2YikR29OaVybf9nQ0dJ/80i40RS97t/A==", - "dev": true, - "optional": true, - "requires": { - "node-addon-api": "^3.0.0", - "prebuild-install": "^6.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - }, - "last-run": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz", - "integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls=", - "dev": true, - "requires": { - "default-resolution": "^2.0.0", - "es6-weak-map": "^2.0.1" - } - }, - "lazystream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", - "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", - "dev": true, - "requires": { - "readable-stream": "^2.0.5" - } - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "lead": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", - "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=", - "dev": true, - "requires": { - "flush-write-stream": "^1.0.2" - } - }, - "liftoff": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz", - "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==", - "dev": true, - "requires": { - "extend": "^3.0.0", - "findup-sync": "^3.0.0", - "fined": "^1.0.1", - "flagged-respawn": "^1.0.0", - "is-plain-object": "^2.0.4", - "object.map": "^1.0.0", - "rechoir": "^0.6.2", - "resolve": "^1.1.7" - }, - "dependencies": { - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - } - } - }, - "lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", - "dev": true - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - }, - "dependencies": { - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "requires": { - "p-locate": "^5.0.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "lodash._reinterpolate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", - "dev": true - }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true - }, - "lodash.includes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", - "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=", - "dev": true - }, - "lodash.isboolean": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=", - "dev": true - }, - "lodash.isinteger": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=", - "dev": true - }, - "lodash.ismatch": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", - "integrity": "sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc=", - "dev": true - }, - "lodash.isnumber": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=", - "dev": true - }, - "lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", - "dev": true - }, - "lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=", - "dev": true - }, - "lodash.once": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=", - "dev": true - }, - "lodash.template": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", - "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", - "dev": true, - "requires": { - "lodash._reinterpolate": "^3.0.0", - "lodash.templatesettings": "^4.0.0" - } - }, - "lodash.templatesettings": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz", - "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==", - "dev": true, - "requires": { - "lodash._reinterpolate": "^3.0.0" - } - }, - "long": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", - "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==", - "dev": true - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "lru-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", - "integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM=", - "dev": true, - "requires": { - "es5-ext": "~0.10.2" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, - "make-fetch-happen": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz", - "integrity": "sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==", - "dev": true, - "optional": true, - "requires": { - "agentkeepalive": "^4.1.3", - "cacache": "^15.2.0", - "http-cache-semantics": "^4.1.0", - "http-proxy-agent": "^4.0.1", - "https-proxy-agent": "^5.0.0", - "is-lambda": "^1.0.1", - "lru-cache": "^6.0.0", - "minipass": "^3.1.3", - "minipass-collect": "^1.0.2", - "minipass-fetch": "^1.3.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "negotiator": "^0.6.2", - "promise-retry": "^2.0.1", - "socks-proxy-agent": "^6.0.0", - "ssri": "^8.0.0" - } - }, - "make-iterator": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", - "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", - "dev": true, - "requires": { - "kind-of": "^6.0.2" - }, - "dependencies": { - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - } - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "map-obj": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", - "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", - "dev": true - }, - "map-visit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", - "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", - "dev": true, - "requires": { - "object-visit": "^1.0.0" - } - }, - "matchdep": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz", - "integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4=", - "dev": true, - "requires": { - "findup-sync": "^2.0.0", - "micromatch": "^3.0.4", - "resolve": "^1.4.0", - "stack-trace": "0.0.10" - }, - "dependencies": { - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - } - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, - "findup-sync": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", - "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", - "dev": true, - "requires": { - "detect-file": "^1.0.0", - "is-glob": "^3.1.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - }, - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - }, - "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "dev": true, - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - } - } - }, - "memoizee": { - "version": "0.4.15", - "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", - "integrity": "sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==", - "dev": true, - "requires": { - "d": "^1.0.1", - "es5-ext": "^0.10.53", - "es6-weak-map": "^2.0.3", - "event-emitter": "^0.3.5", - "is-promise": "^2.2.2", - "lru-queue": "^0.1.0", - "next-tick": "^1.1.0", - "timers-ext": "^0.1.7" - } - }, - "memory-pager": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", - "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", - "dev": true, - "optional": true - }, - "meow": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", - "integrity": "sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==", - "dev": true, - "requires": { - "@types/minimist": "^1.2.0", - "camelcase-keys": "^6.2.2", - "decamelize-keys": "^1.1.0", - "hard-rejection": "^2.1.0", - "minimist-options": "4.1.0", - "normalize-package-data": "^3.0.0", - "read-pkg-up": "^7.0.1", - "redent": "^3.0.0", - "trim-newlines": "^3.0.0", - "type-fest": "^0.18.0", - "yargs-parser": "^20.2.3" - }, - "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "dependencies": { - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true - } - } - }, - "read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", - "dev": true, - "requires": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" - }, - "dependencies": { - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true - } - } - }, - "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "dev": true, - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "type-fest": { - "version": "0.18.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", - "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", - "dev": true - } - } - }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true - }, - "micromatch": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", - "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", - "dev": true, - "requires": { - "braces": "^3.0.1", - "picomatch": "^2.2.3" - }, - "dependencies": { - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - } - } - }, - "mime-db": { - "version": "1.50.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz", - "integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==", - "dev": true - }, - "mime-types": { - "version": "2.1.33", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz", - "integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==", - "dev": true, - "requires": { - "mime-db": "1.50.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "mimic-response": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", - "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", - "dev": true - }, - "min-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", - "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", - "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true - }, - "minimist-options": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", - "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", - "dev": true, - "requires": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0", - "kind-of": "^6.0.3" - }, - "dependencies": { - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - } - } - }, - "minipass": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.5.tgz", - "integrity": "sha512-+8NzxD82XQoNKNrl1d/FSi+X8wAEWR+sbYAfIvub4Nz0d22plFG72CEVVaufV8PNf4qSslFTD8VMOxNVhHCjTw==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "minipass-collect": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", - "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", - "dev": true, - "optional": true, - "requires": { - "minipass": "^3.0.0" - } - }, - "minipass-fetch": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-1.4.1.tgz", - "integrity": "sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw==", - "dev": true, - "optional": true, - "requires": { - "encoding": "^0.1.12", - "minipass": "^3.1.0", - "minipass-sized": "^1.0.3", - "minizlib": "^2.0.0" - } - }, - "minipass-flush": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", - "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", - "dev": true, - "optional": true, - "requires": { - "minipass": "^3.0.0" - } - }, - "minipass-pipeline": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", - "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", - "dev": true, - "optional": true, - "requires": { - "minipass": "^3.0.0" - } - }, - "minipass-sized": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", - "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", - "dev": true, - "optional": true, - "requires": { - "minipass": "^3.0.0" - } - }, - "minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "dev": true, - "requires": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - } - }, - "mixin-deep": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", - "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", - "dev": true, - "requires": { - "for-in": "^1.0.2", - "is-extendable": "^1.0.1" - }, - "dependencies": { - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - } - } - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" - }, - "mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "dev": true - }, - "mocha": { - "version": "8.4.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.4.0.tgz", - "integrity": "sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ==", - "dev": true, - "requires": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.1", - "debug": "4.3.1", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.1.6", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "4.0.0", - "log-symbols": "4.0.0", - "minimatch": "3.0.4", - "ms": "2.1.3", - "nanoid": "3.1.20", - "serialize-javascript": "5.0.1", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "which": "2.0.2", - "wide-align": "1.1.3", - "workerpool": "6.1.0", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "dependencies": { - "anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", - "dev": true, - "requires": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "fsevents": "~2.3.1", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" - } - }, - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - }, - "dependencies": { - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "requires": { - "binary-extensions": "^2.0.0" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "js-yaml": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.0.0.tgz", - "integrity": "sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "log-symbols": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", - "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", - "dev": true, - "requires": { - "chalk": "^4.0.0" - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", - "dev": true, - "requires": { - "picomatch": "^2.2.1" - } - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - } - }, - "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true - } - } - }, - "modify-values": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz", - "integrity": "sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==", - "dev": true - }, - "mongodb": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.7.1.tgz", - "integrity": "sha512-iSVgexYr8ID0ieeNFUbRfQeOZxOchRck6kEDVySQRaa8VIw/1Pm+/LgcpZcl/BWV6nT0L8lP9qyl7dRPJ6mnLw==", - "dev": true, - "requires": { - "bl": "^2.2.1", - "bson": "^1.1.4", - "denque": "^1.4.1", - "optional-require": "^1.0.3", - "safe-buffer": "^5.1.2", - "saslprep": "^1.0.0" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "msal": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/msal/-/msal-1.4.15.tgz", - "integrity": "sha512-H/CxkeZJ4laEK6GZ/cDKQoYjBTvDNFK3hDC8mfU8IkuZvKFfFdo9KM89r8spXY7xnBK9SQBAjIuQgwUogeUw7g==", - "dev": true, - "requires": { - "tslib": "^1.9.3" - }, - "dependencies": { - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - } - } - }, - "mssql": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/mssql/-/mssql-7.3.0.tgz", - "integrity": "sha512-3NGxDomH5Lci2g0EUrsejHIsvtFwlIE6A9SNFWQ2/JD4Dh0+5XVFHeyB4RXKb+nRMDosSUBAQDIVSuLXo5XFZA==", - "dev": true, - "requires": { - "@tediousjs/connection-string": "^0.3.0", - "debug": "^4.3.2", - "rfdc": "^1.3.0", - "tarn": "^3.0.1", - "tedious": "^11.4.0" - } - }, - "mute-stdout": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz", - "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==", - "dev": true - }, - "mysql": { - "version": "2.18.1", - "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz", - "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==", - "dev": true, - "requires": { - "bignumber.js": "9.0.0", - "readable-stream": "2.3.7", - "safe-buffer": "5.1.2", - "sqlstring": "2.3.1" - } - }, - "mysql2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-2.3.0.tgz", - "integrity": "sha512-0t5Ivps5Tdy5YHk5NdKwQhe/4Qyn2pload+S+UooDBvsqngtzujG1BaTWBihQLfeKO3t3122/GtusBtmHEHqww==", - "dev": true, - "requires": { - "denque": "^1.4.1", - "generate-function": "^2.3.1", - "iconv-lite": "^0.6.2", - "long": "^4.0.0", - "lru-cache": "^6.0.0", - "named-placeholders": "^1.1.2", - "seq-queue": "^0.0.5", - "sqlstring": "^2.3.2" - }, - "dependencies": { - "sqlstring": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.2.tgz", - "integrity": "sha512-vF4ZbYdKS8OnoJAWBmMxCQDkiEBkGQYU7UZPtL8flbDRSNkhaXvRJ279ZtI6M+zDaQovVU4tuRgzK5fVhvFAhg==", - "dev": true - } - } - }, - "mz": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", - "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", - "requires": { - "any-promise": "^1.0.0", - "object-assign": "^4.0.1", - "thenify-all": "^1.0.0" - } - }, - "named-placeholders": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.2.tgz", - "integrity": "sha512-wiFWqxoLL3PGVReSZpjLVxyJ1bRqe+KKJVbr4hGs1KWfTZTQyezHFBbuKj9hsizHyGV2ne7EMjHdxEGAybD5SA==", - "dev": true, - "requires": { - "lru-cache": "^4.1.3" - }, - "dependencies": { - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - } - } - }, - "nan": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz", - "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==", - "dev": true, - "optional": true - }, - "nanocolors": { - "version": "0.2.12", - "resolved": "https://registry.npmjs.org/nanocolors/-/nanocolors-0.2.12.tgz", - "integrity": "sha512-SFNdALvzW+rVlzqexid6epYdt8H9Zol7xDoQarioEFcFN0JHo4CYNztAxmtfgGTVRCmFlEOqqhBpoFGKqSAMug==", - "dev": true - }, - "nanoid": { - "version": "3.1.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", - "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", - "dev": true - }, - "nanomatch": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", - "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "fragment-cache": "^0.2.1", - "is-windows": "^1.0.2", - "kind-of": "^6.0.2", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - } - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - } - } - }, - "napi-build-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", - "dev": true - }, - "native-duplexpair": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/native-duplexpair/-/native-duplexpair-1.0.0.tgz", - "integrity": "sha1-eJkHjmS/PIo9cyYBs9QP8F21j6A=", - "dev": true - }, - "negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true, - "optional": true - }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "next-tick": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz", - "integrity": "sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==", - "dev": true - }, - "nise": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/nise/-/nise-4.1.0.tgz", - "integrity": "sha512-eQMEmGN/8arp0xsvGoQ+B1qvSkR73B1nWSCh7nOt5neMCtwcQVYQGdzQMhcNscktTsWB54xnlSQFzOAPJD8nXA==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0", - "@sinonjs/fake-timers": "^6.0.0", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" - } - }, - "node-abi": { - "version": "2.30.1", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz", - "integrity": "sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w==", - "dev": true, - "requires": { - "semver": "^5.4.1" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "node-abort-controller": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-2.0.0.tgz", - "integrity": "sha512-L8RfEgjBTHAISTuagw51PprVAqNZoG6KSB6LQ6H1bskMVkFs5E71IyjauLBv3XbuomJlguWF/VnRHdJ1gqiAqA==", - "dev": true - }, - "node-addon-api": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", - "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", - "dev": true, - "optional": true - }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dev": true, - "requires": { - "whatwg-url": "^5.0.0" - } - }, - "node-gyp": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-8.4.1.tgz", - "integrity": "sha512-olTJRgUtAb/hOXG0E93wZDs5YiJlgbXxTwQAFHyNlRsXQnYzUaF2aGgujZbw+hR8aF4ZG/rST57bWMWD16jr9w==", - "dev": true, - "optional": true, - "requires": { - "env-paths": "^2.2.0", - "glob": "^7.1.4", - "graceful-fs": "^4.2.6", - "make-fetch-happen": "^9.1.0", - "nopt": "^5.0.0", - "npmlog": "^6.0.0", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.2", - "which": "^2.0.2" - }, - "dependencies": { - "are-we-there-yet": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.0.tgz", - "integrity": "sha512-0GWpv50YSOcLXaN6/FAKY3vfRbllXWV2xvfA/oKJF8pzFhWXPV+yjhJXDBbjscDYowv7Yw1A3uigpzn5iEGTyw==", - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - } - }, - "gauge": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", - "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.3", - "console-control-strings": "^1.1.0", - "has-unicode": "^2.0.1", - "signal-exit": "^3.0.7", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.5" - } - }, - "nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", - "dev": true, - "optional": true, - "requires": { - "abbrev": "1" - } - }, - "npmlog": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", - "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "^3.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^4.0.3", - "set-blocking": "^2.0.0" - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "optional": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "wide-align": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", - "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2 || 3 || 4" - } - } - } - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", - "dev": true, - "requires": { - "abbrev": "1" - } - }, - "normalize-package-data": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", - "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", - "dev": true, - "requires": { - "hosted-git-info": "^4.0.1", - "is-core-module": "^2.5.0", - "semver": "^7.3.4", - "validate-npm-package-license": "^3.0.1" - } - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "now-and-later": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", - "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", - "dev": true, - "requires": { - "once": "^1.3.2" - } - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "requires": { - "path-key": "^3.0.0" - } - }, - "npmlog": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", - "dev": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "object-copy": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", - "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", - "dev": true, - "requires": { - "copy-descriptor": "^0.1.0", - "define-property": "^0.2.5", - "kind-of": "^3.0.3" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "object-inspect": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", - "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", - "dev": true - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object-visit": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", - "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", - "dev": true, - "requires": { - "isobject": "^3.0.0" - } - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - }, - "object.defaults": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", - "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", - "dev": true, - "requires": { - "array-each": "^1.0.1", - "array-slice": "^1.0.0", - "for-own": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "object.map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", - "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", - "dev": true, - "requires": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "object.reduce": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz", - "integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60=", - "dev": true, - "requires": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "open": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz", - "integrity": "sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==", - "dev": true, - "requires": { - "is-docker": "^2.0.0", - "is-wsl": "^2.1.1" - } - }, - "optional-require": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/optional-require/-/optional-require-1.1.8.tgz", - "integrity": "sha512-jq83qaUb0wNg9Krv1c5OQ+58EK+vHde6aBPzLvPPqJm89UQWsvSuFy9X/OSNJnFeSOKo7btE0n8Nl2+nE+z5nA==", - "dev": true, - "requires": { - "require-at": "^1.0.6" - } - }, - "oracledb": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/oracledb/-/oracledb-5.2.0.tgz", - "integrity": "sha512-gHOWTM6ILKOGVH3Z+11Cnpls8XWW7sZUoBrbQWvspYOGpkvJ+TKRr1OdVS21EyeAtfMzXePDrSvG/Mlp/fxOVA==", - "optional": true, - "peer": true - }, - "ordered-read-streams": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", - "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=", - "dev": true, - "requires": { - "readable-stream": "^2.0.1" - } - }, - "os-locale": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", - "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", - "dev": true, - "requires": { - "lcid": "^1.0.0" - } - }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "requires": { - "p-limit": "^3.0.2" - } - }, - "p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "dev": true, - "requires": { - "aggregate-error": "^3.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "packet-reader": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/packet-reader/-/packet-reader-1.0.0.tgz", - "integrity": "sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==", - "dev": true - }, - "parse-filepath": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", - "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", - "dev": true, - "requires": { - "is-absolute": "^1.0.0", - "map-cache": "^0.2.0", - "path-root": "^0.1.1" - } - }, - "parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - } - }, - "parse-node-version": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", - "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", - "dev": true - }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", - "dev": true - }, - "parse5": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", - "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==" - }, - "parse5-htmlparser2-tree-adapter": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz", - "integrity": "sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==", - "requires": { - "parse5": "^6.0.1" - }, - "dependencies": { - "parse5": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", - "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==" - } - } - }, - "pascalcase": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", - "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "path-root": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", - "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", - "dev": true, - "requires": { - "path-root-regex": "^0.1.0" - } - }, - "path-root-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", - "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", - "dev": true - }, - "path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", - "dev": true, - "requires": { - "isarray": "0.0.1" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - } - } - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - }, - "pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true - }, - "pg": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/pg/-/pg-8.7.1.tgz", - "integrity": "sha512-7bdYcv7V6U3KAtWjpQJJBww0UEsWuh4yQ/EjNf2HeO/NnvKjpvhEIe/A/TleP6wtmSKnUnghs5A9jUoK6iDdkA==", - "dev": true, - "requires": { - "buffer-writer": "2.0.0", - "packet-reader": "1.0.0", - "pg-connection-string": "^2.5.0", - "pg-pool": "^3.4.1", - "pg-protocol": "^1.5.0", - "pg-types": "^2.1.0", - "pgpass": "1.x" - } - }, - "pg-connection-string": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.5.0.tgz", - "integrity": "sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ==", - "dev": true - }, - "pg-cursor": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/pg-cursor/-/pg-cursor-2.7.1.tgz", - "integrity": "sha512-dtxtyvx4BcSammddki27KPBVA0sZ8AguLabgs7++gqaefX7dlQ5zaRlk1Gi5mvyO25aCmHFAZyNq9zYtPDwFTA==", - "dev": true, - "requires": {} - }, - "pg-int8": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", - "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", - "dev": true - }, - "pg-pool": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.4.1.tgz", - "integrity": "sha512-TVHxR/gf3MeJRvchgNHxsYsTCHQ+4wm3VIHSS19z8NC0+gioEhq1okDY1sm/TYbfoP6JLFx01s0ShvZ3puP/iQ==", - "dev": true, - "requires": {} - }, - "pg-protocol": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.5.0.tgz", - "integrity": "sha512-muRttij7H8TqRNu/DxrAJQITO4Ac7RmX3Klyr/9mJEOBeIpgnF8f9jAfRz5d3XwQZl5qBjF9gLsUtMPJE0vezQ==", - "dev": true - }, - "pg-query-stream": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/pg-query-stream/-/pg-query-stream-4.2.1.tgz", - "integrity": "sha512-8rOjGPgerzYmfRnX/EYhWiI7OVI17BGM3PxsI8o/Ot8IDyFMy8cf2xG5S9XpVPgkAjBs8c47vSclKuJqlN2c9g==", - "dev": true, - "requires": { - "pg-cursor": "^2.7.1" - } - }, - "pg-types": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", - "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", - "dev": true, - "requires": { - "pg-int8": "1.0.1", - "postgres-array": "~2.0.0", - "postgres-bytea": "~1.0.0", - "postgres-date": "~1.0.4", - "postgres-interval": "^1.1.0" - } - }, - "pgpass": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.4.tgz", - "integrity": "sha512-YmuA56alyBq7M59vxVBfPJrGSozru8QAdoNlWuW3cz8l+UX3cWge0vTvjKhsSHSJpo3Bom8/Mm6hf0TR5GY0+w==", - "dev": true, - "requires": { - "split2": "^3.1.1" - } - }, - "picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "plugin-error": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", - "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", - "dev": true, - "requires": { - "ansi-colors": "^1.0.1", - "arr-diff": "^4.0.0", - "arr-union": "^3.1.0", - "extend-shallow": "^3.0.2" - }, - "dependencies": { - "ansi-colors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", - "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", - "dev": true, - "requires": { - "ansi-wrap": "^0.1.0" - } - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - } - } - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, - "postcss": { - "version": "7.0.38", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.38.tgz", - "integrity": "sha512-wNrSHWjHDQJR/IZL5IKGxRtFgrYNaAA/UrkW2WqbtZO6uxSLMxMN+s2iqUMwnAWm3fMROlDYZB41dr0Mt7vBwQ==", - "dev": true, - "requires": { - "nanocolors": "^0.2.2", - "source-map": "^0.6.1" - } - }, - "postgres-array": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", - "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", - "dev": true - }, - "postgres-bytea": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.0.tgz", - "integrity": "sha1-AntTPAqokOJtFy1Hz5zOzFIazTU=", - "dev": true - }, - "postgres-date": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", - "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", - "dev": true - }, - "postgres-interval": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", - "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", - "dev": true, - "requires": { - "xtend": "^4.0.0" - } - }, - "prebuild-install": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.1.4.tgz", - "integrity": "sha512-Z4vpywnK1lBg+zdPCVCsKq0xO66eEV9rWo2zrROGGiRS4JtueBOdlB1FnY8lcy7JsUud/Q3ijUxyWN26Ika0vQ==", - "dev": true, - "requires": { - "detect-libc": "^1.0.3", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^1.0.1", - "node-abi": "^2.21.0", - "npmlog": "^4.0.1", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^3.0.3", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - } - }, - "prettier": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz", - "integrity": "sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg==", - "dev": true - }, - "pretty-hrtime": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", - "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", - "dev": true - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", - "dev": true, - "optional": true - }, - "promise-retry": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", - "integrity": "sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==", - "dev": true, - "optional": true, - "requires": { - "err-code": "^2.0.2", - "retry": "^0.12.0" - } - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "dev": true - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "pumpify": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", - "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", - "dev": true, - "requires": { - "duplexify": "^3.6.0", - "inherits": "^2.0.3", - "pump": "^2.0.0" - }, - "dependencies": { - "pump": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", - "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - } - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", - "dev": true - }, - "queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true - }, - "quick-lru": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", - "dev": true - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true - } - } - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - }, - "dependencies": { - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "dev": true, - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - } - } - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - }, - "dependencies": { - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - } - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } - } - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, - "requires": { - "resolve": "^1.1.6" - } - }, - "redent": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", - "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", - "dev": true, - "requires": { - "indent-string": "^4.0.0", - "strip-indent": "^3.0.0" - } - }, - "redis": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/redis/-/redis-3.1.2.tgz", - "integrity": "sha512-grn5KoZLr/qrRQVwoSkmzdbw6pwF+/rwODtrOr6vuBRiR/f3rjSTGupbF90Zpqm2oenix8Do6RV7pYEkGwlKkw==", - "dev": true, - "requires": { - "denque": "^1.5.0", - "redis-commands": "^1.7.0", - "redis-errors": "^1.2.0", - "redis-parser": "^3.0.0" - } - }, - "redis-commands": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.7.0.tgz", - "integrity": "sha512-nJWqw3bTFy21hX/CPKHth6sfhZbdiHP6bTawSgQBlKOVRG7EZkfHbbHwQJnrE4vsQf0CMNE+3gJ4Fmm16vdVlQ==", - "dev": true - }, - "redis-errors": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", - "integrity": "sha1-62LSrbFeTq9GEMBK/hUpOEJQq60=", - "dev": true - }, - "redis-parser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz", - "integrity": "sha1-tm2CjNyv5rS4pCin3vTGvKwxyLQ=", - "dev": true, - "requires": { - "redis-errors": "^1.0.0" - } - }, - "reflect-metadata": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", - "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==" + "node": "*" + } }, - "regex-not": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", - "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "node_modules/remap-istanbul/node_modules/plugin-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", + "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", "dev": true, - "requires": { - "extend-shallow": "^3.0.2", - "safe-regex": "^1.1.0" - }, "dependencies": { - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - } + "ansi-colors": "^1.0.1", + "arr-diff": "^4.0.0", + "arr-union": "^3.1.0", + "extend-shallow": "^3.0.2" + }, + "engines": { + "node": ">= 0.10" } }, - "remap-istanbul": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/remap-istanbul/-/remap-istanbul-0.13.0.tgz", - "integrity": "sha512-rS5ZpVAx3fGtKZkiBe1esXg5mKYbgW9iz8kkADFt3p6lo3NsBBUX1q6SwdhwUtYCGnr7nK6gRlbYK3i8R0jbRA==", + "node_modules/remap-istanbul/node_modules/through2": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.0.tgz", + "integrity": "sha512-8B+sevlqP4OiCjonI1Zw03Sf8PuV1eRsYQgLad5eonILOdyeRsY27A/2Ze8IlvlMvq31OH+3fz/styI7Ya62yQ==", "dev": true, - "requires": { - "istanbul": "0.4.5", - "minimatch": "^3.0.4", - "plugin-error": "^1.0.1", - "source-map": "0.6.1", - "through2": "3.0.0" - }, "dependencies": { - "through2": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.0.tgz", - "integrity": "sha512-8B+sevlqP4OiCjonI1Zw03Sf8PuV1eRsYQgLad5eonILOdyeRsY27A/2Ze8IlvlMvq31OH+3fz/styI7Ya62yQ==", - "dev": true, - "requires": { - "readable-stream": "2 || 3", - "xtend": "~4.0.1" - } - } + "readable-stream": "2 || 3", + "xtend": "~4.0.1" } }, - "remove-bom-buffer": { + "node_modules/remove-bom-buffer": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==", "dev": true, - "requires": { + "dependencies": { "is-buffer": "^1.1.5", "is-utf8": "^0.2.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "remove-bom-stream": { + "node_modules/remove-bom-stream": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", - "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=", + "integrity": "sha512-wigO8/O08XHb8YPzpDDT+QmRANfW6vLqxfaXm1YXhnFf3AkSLyjfG3GEFg4McZkmgL7KvCj5u2KczkvSP6NfHA==", "dev": true, - "requires": { + "dependencies": { "remove-bom-buffer": "^3.0.0", "safe-buffer": "^5.1.0", "through2": "^2.0.3" }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/remove-bom-stream/node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, "dependencies": { - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - } + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" } }, - "remove-trailing-separator": { + "node_modules/remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "integrity": "sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw==", "dev": true }, - "repeat-element": { + "node_modules/repeat-element": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "repeat-string": { + "node_modules/repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true, + "engines": { + "node": ">=0.10" + } }, - "replace-ext": { + "node_modules/replace-ext": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.10" + } }, - "replace-homedir": { + "node_modules/replace-homedir": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz", - "integrity": "sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw=", + "integrity": "sha512-CHPV/GAglbIB1tnQgaiysb8H2yCy8WQ7lcEwQ/eT+kLj0QHV8LnJW0zpqpE7RSkrMSRoa+EBoag86clf7WAgSg==", "dev": true, - "requires": { + "dependencies": { "homedir-polyfill": "^1.0.1", "is-absolute": "^1.0.0", "remove-trailing-separator": "^1.1.0" + }, + "engines": { + "node": ">= 0.10" } }, - "replacestream": { + "node_modules/replacestream": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/replacestream/-/replacestream-4.0.3.tgz", "integrity": "sha512-AC0FiLS352pBBiZhd4VXB1Ab/lh0lEgpP+GGvZqbQh8a5cmXVoTe5EX/YeTFArnp4SRGTHh1qCHu9lGs1qG8sA==", "dev": true, - "requires": { + "dependencies": { "escape-string-regexp": "^1.0.3", "object-assign": "^4.0.1", "readable-stream": "^2.0.2" - }, - "dependencies": { - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - } } }, - "require-at": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/require-at/-/require-at-1.0.6.tgz", - "integrity": "sha512-7i1auJbMUrXEAZCOQ0VNJgmcT2VOKPRl2YGJwgpHpC9CE91Mv4/4UYIUm4chGJaI381ZDq1JUicFii64Hapd8g==", - "dev": true + "node_modules/replacestream/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } }, - "require-directory": { + "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "engines": { + "node": ">=0.10.0" + } }, - "require-main-filename": { + "node_modules/require-main-filename": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "integrity": "sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug==", "dev": true }, - "resolve": { + "node_modules/resolve": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", "dev": true }, - "resolve-dir": { + "node_modules/resolve-dir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", "dev": true, - "requires": { + "dependencies": { "expand-tilde": "^2.0.0", "global-modules": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "resolve-options": { + "node_modules/resolve-options": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", - "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=", + "integrity": "sha512-NYDgziiroVeDC29xq7bp/CacZERYsA9bXYd1ZmcJlF3BcrZv5pTb4NG7SjdyKDnXZ84aC4vo2u6sNKIA1LCu/A==", "dev": true, - "requires": { + "dependencies": { "value-or-function": "^3.0.0" + }, + "engines": { + "node": ">= 0.10" } }, - "resolve-url": { + "node_modules/resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==", + "deprecated": "https://github.com/lydell/resolve-url#deprecated", "dev": true }, - "ret": { + "node_modules/ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.12" + } }, - "retry": { + "node_modules/retry": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", "dev": true, - "optional": true + "optional": true, + "engines": { + "node": ">= 4" + } }, - "reusify": { + "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } }, - "rfdc": { + "node_modules/rfdc": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", "dev": true }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "node_modules/rimraf": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-4.1.2.tgz", + "integrity": "sha512-BlIbgFryTbw3Dz6hyoWFhKk+unCcHMSkZGrTFVAx2WmttdBSonsdtRlwiuTbDqTKr+UlXIUqJVS4QT5tUzGENQ==", "dev": true, - "requires": { - "glob": "^7.1.3" + "bin": { + "rimraf": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "run-parallel": { + "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", "dev": true, - "requires": { + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { "queue-microtask": "^1.2.2" } }, - "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==" + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "safe-regex": { + "node_modules/safe-regex": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", - "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "integrity": "sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==", "dev": true, - "requires": { + "dependencies": { "ret": "~0.1.10" } }, - "safer-buffer": { + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, - "saslprep": { + "node_modules/saslprep": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz", "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==", "dev": true, "optional": true, - "requires": { + "dependencies": { "sparse-bitfield": "^3.0.3" + }, + "engines": { + "node": ">=6" } }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" - }, - "semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, - "requires": { - "lru-cache": "^6.0.0" + "bin": { + "semver": "bin/semver.js" } }, - "semver-greatest-satisfied-range": { + "node_modules/semver-greatest-satisfied-range": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz", - "integrity": "sha1-E+jCZYq5aRywzXEJMkAoDTb3els=", + "integrity": "sha512-Ny/iyOzSSa8M5ML46IAx3iXc6tfOsYU2R4AXi2UpHk60Zrgyq6eqPj/xiOfS0rRl/iiQ/rdJkVjw/5cdUyCntQ==", "dev": true, - "requires": { + "dependencies": { "sver-compat": "^1.5.0" + }, + "engines": { + "node": ">= 0.10" } }, - "seq-queue": { + "node_modules/seq-queue": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", - "integrity": "sha1-1WgS4cAXpuTnw+Ojeh2m143TyT4=", + "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==", "dev": true }, - "serialize-javascript": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", - "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, - "requires": { + "dependencies": { "randombytes": "^2.1.0" } }, - "set-blocking": { + "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", "dev": true }, - "set-value": { + "node_modules/set-value": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", "dev": true, - "requires": { + "dependencies": { "extend-shallow": "^2.0.1", "is-extendable": "^0.1.1", "is-plain-object": "^2.0.3", "split-string": "^3.0.1" }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, "dependencies": { - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - } + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "sha.js": { + "node_modules/sha.js": { "version": "2.4.11", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "requires": { + "dependencies": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" } }, - "shebang-command": { + "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, - "requires": { + "dependencies": { "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "shebang-regex": { + "node_modules/shebang-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "side-channel": { + "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.0", "get-intrinsic": "^1.0.2", "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "signal-exit": { + "node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "simple-concat": { + "node_modules/simple-concat": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "dev": true + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "simple-get": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz", - "integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==", + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", "dev": true, - "requires": { - "decompress-response": "^4.2.0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "decompress-response": "^6.0.0", "once": "^1.3.1", "simple-concat": "^1.0.0" } }, - "sinon": { - "version": "9.2.4", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-9.2.4.tgz", - "integrity": "sha512-zljcULZQsJxVra28qIAL6ow1Z9tpattkCTEJR4RBP3TGc00FcttsP5pK284Nas5WjMZU5Yzy3kAIp3B3KRf5Yg==", + "node_modules/sinon": { + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-15.0.1.tgz", + "integrity": "sha512-PZXKc08f/wcA/BMRGBze2Wmw50CWPiAH3E21EOi4B49vJ616vW4DQh4fQrqsYox2aNR/N3kCqLuB0PwwOucQrg==", "dev": true, - "requires": { - "@sinonjs/commons": "^1.8.1", - "@sinonjs/fake-timers": "^6.0.1", - "@sinonjs/samsam": "^5.3.1", - "diff": "^4.0.2", - "nise": "^4.0.4", - "supports-color": "^7.1.0" - }, "dependencies": { - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true - } + "@sinonjs/commons": "^2.0.0", + "@sinonjs/fake-timers": "10.0.2", + "@sinonjs/samsam": "^7.0.1", + "diff": "^5.0.0", + "nise": "^5.1.2", + "supports-color": "^7.2.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/sinon" } }, - "sinon-chai": { + "node_modules/sinon-chai": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/sinon-chai/-/sinon-chai-3.7.0.tgz", "integrity": "sha512-mf5NURdUaSdnatJx3uhoBOrY9dtL19fiOtAdT1Azxg3+lNJFiuN0uzaU3xX1LeAfL17kHQhTAJgpsfhbMJMY2g==", "dev": true, - "requires": {} + "peerDependencies": { + "chai": "^4.0.0", + "sinon": ">=4.0.0" + } }, - "slash": { + "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "smart-buffer": { + "node_modules/smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", "dev": true, - "optional": true + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } }, - "snapdragon": { + "node_modules/snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "dev": true, - "requires": { + "dependencies": { "base": "^0.11.1", "debug": "^2.2.0", "define-property": "^0.2.5", @@ -20349,870 +11605,1122 @@ "source-map-resolve": "^0.5.0", "use": "^3.1.0" }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "dev": true, - "requires": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - } + "engines": { + "node": ">=0.10.0" } }, - "snapdragon-node": { + "node_modules/snapdragon-node": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "dev": true, - "requires": { + "dependencies": { "define-property": "^1.0.0", "isobject": "^3.0.0", "snapdragon-util": "^3.0.1" }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha512-cZTYKFWspt9jZsMscWo8sc/5lbPC9Q0N5nBLgb+Yd915iL3udB1uFgS3B8YCx66UVHq018DAVFoee7x+gxggeA==", + "dev": true, "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - } + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" } }, - "snapdragon-util": { + "node_modules/snapdragon-util": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "dev": true, - "requires": { + "dependencies": { "kind-of": "^3.2.0" }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" } }, - "socks": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.6.2.tgz", - "integrity": "sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==", + "node_modules/snapdragon/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, - "optional": true, - "requires": { - "ip": "^1.1.5", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/snapdragon/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, + "node_modules/snapdragon/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", + "dev": true, + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "node_modules/socks": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", + "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", + "dev": true, + "dependencies": { + "ip": "^2.0.0", "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.13.0", + "npm": ">= 3.0.0" } }, - "socks-proxy-agent": { + "node_modules/socks-proxy-agent": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-6.2.1.tgz", "integrity": "sha512-a6KW9G+6B3nWZ1yB8G7pJwL3ggLy1uTzKAgCb7ttblwqdz9fMGJUuTy3uFzEP48FAs9FLILlmzDlE2JJhVQaXQ==", "dev": true, "optional": true, - "requires": { + "dependencies": { "agent-base": "^6.0.2", "debug": "^4.3.3", "socks": "^2.6.2" + }, + "engines": { + "node": ">= 10" } }, - "source-map": { + "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "source-map-resolve": { + "node_modules/source-map-resolve": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz", "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==", + "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", "dev": true, - "requires": { + "dependencies": { "atob": "^2.1.2", "decode-uri-component": "^0.2.0" } }, - "source-map-support": { - "version": "0.5.20", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", - "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, - "requires": { + "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, - "source-map-url": { + "node_modules/source-map-url": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "deprecated": "See https://github.com/lydell/source-map-url#deprecated", "dev": true }, - "sparkles": { + "node_modules/sparkles": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.10" + } }, - "sparse-bitfield": { + "node_modules/sparse-bitfield": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", - "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", + "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", "dev": true, "optional": true, - "requires": { + "dependencies": { "memory-pager": "^1.0.2" } }, - "spdx-correct": { + "node_modules/spdx-correct": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", "dev": true, - "requires": { + "dependencies": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" } }, - "spdx-exceptions": { + "node_modules/spdx-exceptions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", "dev": true }, - "spdx-expression-parse": { + "node_modules/spdx-expression-parse": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", "dev": true, - "requires": { + "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, - "spdx-license-ids": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz", - "integrity": "sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==", - "dev": true - }, - "split": { + "node_modules/spdx-license-ids": { + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz", + "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==", + "dev": true + }, + "node_modules/split": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", + "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "dev": true, + "dependencies": { + "through": "2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/split-string/node_modules/is-extendable": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", - "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, - "requires": { - "through": "2" + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" } }, - "split-string": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", - "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "node_modules/split-string/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, - "requires": { - "extend-shallow": "^3.0.0" - }, "dependencies": { - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - } + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "split2": { + "node_modules/split2": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", "dev": true, - "requires": { + "dependencies": { "readable-stream": "^3.0.0" - }, + } + }, + "node_modules/split2/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" } }, - "sprintf-js": { + "node_modules/sprintf-js": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", "dev": true }, - "sql.js": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/sql.js/-/sql.js-1.6.2.tgz", - "integrity": "sha512-9iucI5fXQa+Gspeqf/BNB20PxJIn5LhXDt4mjXoFPqXdR+NqtFs15SdKpSIJ6s529aGL9zFR9p2eSCIEiMsNGA==", + "node_modules/sql.js": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/sql.js/-/sql.js-1.8.0.tgz", + "integrity": "sha512-3HD8pSkZL+5YvYUI8nlvNILs61ALqq34xgmF+BHpqxe68yZIJ1H+sIVIODvni25+CcxHUxDyrTJUL0lE/m7afw==", "dev": true }, - "sqlite3": { - "version": "5.0.11", - "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.0.11.tgz", - "integrity": "sha512-4akFOr7u9lJEeAWLJxmwiV43DJcGV7w3ab7SjQFAFaTVyknY3rZjvXTKIVtWqUoY4xwhjwoHKYs2HDW2SoHVsA==", + "node_modules/sqlite3": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.1.4.tgz", + "integrity": "sha512-i0UlWAzPlzX3B5XP2cYuhWQJsTtlMD6obOa1PgeEQ4DHEXUuyJkgv50I3isqZAP5oFc2T8OFvakmDh2W6I+YpA==", "dev": true, - "requires": { + "hasInstallScript": true, + "dependencies": { "@mapbox/node-pre-gyp": "^1.0.0", "node-addon-api": "^4.2.0", - "node-gyp": "8.x", "tar": "^6.1.11" }, - "dependencies": { - "node-addon-api": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz", - "integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==", - "dev": true + "optionalDependencies": { + "node-gyp": "8.x" + }, + "peerDependencies": { + "node-gyp": "8.x" + }, + "peerDependenciesMeta": { + "node-gyp": { + "optional": true } } }, - "sqlstring": { + "node_modules/sqlstring": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz", - "integrity": "sha1-R1OT/56RR5rqYtyvDKPRSYOn+0A=", - "dev": true + "integrity": "sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ==", + "dev": true, + "engines": { + "node": ">= 0.6" + } }, - "ssri": { + "node_modules/ssri": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", "dev": true, "optional": true, - "requires": { + "dependencies": { "minipass": "^3.1.1" + }, + "engines": { + "node": ">= 8" } }, - "stack-trace": { + "node_modules/stack-trace": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", - "dev": true + "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", + "dev": true, + "engines": { + "node": "*" + } }, - "static-extend": { + "node_modules/static-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", - "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "integrity": "sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==", "dev": true, - "requires": { + "dependencies": { "define-property": "^0.2.5", "object-copy": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "stoppable": { + "node_modules/stoppable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz", "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==", - "dev": true + "dev": true, + "engines": { + "node": ">=4", + "npm": ">=6" + } }, - "stream-exhaust": { + "node_modules/stream-exhaust": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz", "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==", "dev": true }, - "stream-shift": { + "node_modules/stream-shift": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", "dev": true }, - "string_decoder": { + "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, - "requires": { + "dependencies": { "safe-buffer": "~5.1.0" } }, - "string-width": { + "node_modules/string_decoder/node_modules/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 + }, + "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "requires": { + "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "strip-ansi": { + "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "requires": { + "dependencies": { "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "strip-bom": { + "node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } }, - "strip-bom-string": { + "node_modules/strip-bom-string": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", - "integrity": "sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI=", - "dev": true + "integrity": "sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "strip-final-newline": { + "node_modules/strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "strip-indent": { + "node_modules/strip-indent": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", "dev": true, - "requires": { + "dependencies": { "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" } }, - "strip-json-comments": { + "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "supports-color": { + "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "requires": { + "dependencies": { "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "sver-compat": { + "node_modules/sver-compat": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz", - "integrity": "sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg=", + "integrity": "sha512-aFTHfmjwizMNlNE6dsGmoAM4lHjL0CyiobWaFiXWSlD7cIxshW422Nb8KbXCmR6z+0ZEPY+daXJrDyh/vuwTyg==", "dev": true, - "requires": { + "dependencies": { "es6-iterator": "^2.0.1", "es6-symbol": "^3.1.1" } }, - "tar": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", - "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", + "node_modules/tar": { + "version": "6.1.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz", + "integrity": "sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw==", "dev": true, - "requires": { + "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", + "minipass": "^4.0.0", "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" } }, - "tar-fs": { + "node_modules/tar-fs": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", "dev": true, - "requires": { + "dependencies": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", "pump": "^3.0.0", "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-fs/node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tar-stream/node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, "dependencies": { - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/tar-stream/node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/tar-stream/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/tar/node_modules/minipass": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.0.2.tgz", + "integrity": "sha512-4Hbzei7ZyBp+1aw0874YWpKOubZd/jc53/XU+gkYry1QV+VvrbO8icLM5CUtm4F0hyXn85DXYKEMIS26gitD3A==", + "dev": true, + "engines": { + "node": ">=8" } }, - "tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "node_modules/tar/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true, - "requires": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" + "bin": { + "mkdirp": "bin/cmd.js" }, - "dependencies": { - "bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } + "engines": { + "node": ">=10" } }, - "tarn": { + "node_modules/tarn": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/tarn/-/tarn-3.0.2.tgz", "integrity": "sha512-51LAVKUSZSVfI05vjPESNc5vwqqZpbXCsU+/+wxlOrUjk2SnFTt97v9ZgQrD4YmxYW1Px6w2KjaDitCfkvgxMQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=8.0.0" + } }, - "tedious": { - "version": "11.8.0", - "resolved": "https://registry.npmjs.org/tedious/-/tedious-11.8.0.tgz", - "integrity": "sha512-GtFrO694x/7CRiUBt0AI4jrMtrkXV+ywifiOrDy4K0ufJLeKB4rgmPjy5Ws366fCaBaKlqQ9RnJ+sCJ1Jbd1lw==", - "dev": true, - "requires": { - "@azure/identity": "^1.3.0", - "@azure/keyvault-keys": "^4.1.0", - "@azure/ms-rest-nodeauth": "^3.0.6", - "@js-joda/core": "^3.2.0", - "adal-node": "^0.2.1", + "node_modules/tedious": { + "version": "15.1.2", + "resolved": "https://registry.npmjs.org/tedious/-/tedious-15.1.2.tgz", + "integrity": "sha512-94slmnggCX8zG6iLNnM3k6PplTguP0p7R2RWOKTXdPmK1VmTpWk4+e0J4koIMXm1jjG7sGlZ1/JlaGVAdF1OOg==", + "dev": true, + "dependencies": { + "@azure/identity": "^2.0.4", + "@azure/keyvault-keys": "^4.4.0", + "@js-joda/core": "^5.2.0", "bl": "^5.0.0", - "depd": "^2.0.0", + "es-aggregate-error": "^1.0.8", "iconv-lite": "^0.6.3", - "jsbi": "^3.1.5", + "js-md4": "^0.3.2", + "jsbi": "^4.3.0", "native-duplexpair": "^1.0.0", - "node-abort-controller": "^2.0.0", + "node-abort-controller": "^3.0.1", "punycode": "^2.1.0", "sprintf-js": "^1.1.2" }, + "engines": { + "node": ">=14" + } + }, + "node_modules/tedious/node_modules/bl": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-5.1.0.tgz", + "integrity": "sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==", + "dev": true, "dependencies": { - "bl": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-5.0.0.tgz", - "integrity": "sha512-8vxFNZ0pflFfi0WXA3WQXlj6CaMEwsmh63I1CNp0q+wWv8sD0ARx1KovSQd0l2GkwrMIOyedq0EF1FxI+RCZLQ==", - "dev": true, - "requires": { - "buffer": "^6.0.3", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } + "buffer": "^6.0.3", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/tedious/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" } }, - "temp-dir": { + "node_modules/temp-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "tempfile": { + "node_modules/tempfile": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/tempfile/-/tempfile-3.0.0.tgz", "integrity": "sha512-uNFCg478XovRi85iD42egu+eSFUmmka750Jy7L5tfHI5hQKKtbPnxaSaXAbBqCDYrw3wx4tXjKwci4/QmsZJxw==", "dev": true, - "requires": { + "dependencies": { "temp-dir": "^2.0.0", "uuid": "^3.3.2" }, - "dependencies": { - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "dev": true - } + "engines": { + "node": ">=8" + } + }, + "node_modules/tempfile/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "bin": { + "uuid": "bin/uuid" } }, - "text-extensions": { + "node_modules/text-extensions": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10" + } }, - "textextensions": { + "node_modules/textextensions": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-3.3.0.tgz", "integrity": "sha512-mk82dS8eRABNbeVJrEiN5/UMSCliINAuz8mkUwH4SwslkNP//gbEzlWNS5au0z5Dpx40SQxzqZevZkn+WYJ9Dw==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://bevry.me/fund" + } }, - "thenify": { + "node_modules/thenify": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz", "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", - "requires": { + "dependencies": { "any-promise": "^1.0.0" } }, - "thenify-all": { + "node_modules/thenify-all": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", - "requires": { + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dependencies": { "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" } }, - "through": { + "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", "dev": true }, - "through2": { + "node_modules/through2": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", "dev": true, - "requires": { - "readable-stream": "3" - }, "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } + "readable-stream": "3" } }, - "through2-filter": { + "node_modules/through2-filter": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", "dev": true, - "requires": { + "dependencies": { "through2": "~2.0.0", "xtend": "~4.0.0" - }, + } + }, + "node_modules/through2-filter/node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, "dependencies": { - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - } + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/through2/node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" } }, - "time-stamp": { + "node_modules/time-stamp": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", - "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", - "dev": true + "integrity": "sha512-gLCeArryy2yNTRzTGKbZbloctj64jkZ57hj5zdraXue6aFgd6PmvVtEyiUU+hvU0v7q08oVv8r8ev0tRo6bvgw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "timers-ext": { + "node_modules/timers-ext": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", "dev": true, - "requires": { + "dependencies": { "es5-ext": "~0.10.46", "next-tick": "1" } }, - "to-absolute-glob": { + "node_modules/to-absolute-glob": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", - "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", + "integrity": "sha512-rtwLUQEwT8ZeKQbyFJyomBRYXyE16U5VKuy0ftxLMK/PZb2fkOsg5r9kHdauuVDbsNdIBoC/HCthpidamQFXYA==", "dev": true, - "requires": { + "dependencies": { "is-absolute": "^1.0.0", "is-negated-glob": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "to-object-path": { + "node_modules/to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "integrity": "sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==", "dev": true, - "requires": { + "dependencies": { "kind-of": "^3.0.2" }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-object-path/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" } }, - "to-regex": { + "node_modules/to-regex": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", "dev": true, - "requires": { + "dependencies": { "define-property": "^2.0.2", "extend-shallow": "^3.0.2", "regex-not": "^1.0.2", "safe-regex": "^1.1.0" }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", + "dev": true, + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha512-BwY5b5Ql4+qZoefgMj2NUmx+tehVTH/Kf4k1ZEtOHNFcm2wSxMRo992l6X3TIgni2eZVTZ85xMOjF31fwZAj6Q==", + "dev": true, + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, "dependencies": { - "define-property": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", - "dev": true, - "requires": { - "is-descriptor": "^1.0.2", - "isobject": "^3.0.1" - } - }, - "extend-shallow": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", - "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", - "dev": true, - "requires": { - "assign-symbols": "^1.0.0", - "is-extendable": "^1.0.1" - } - }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", - "dev": true, - "requires": { - "kind-of": "^6.0.0" - } - }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" - } - }, - "is-extendable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", - "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4" - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - } + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "to-regex-range": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "node_modules/to-regex/node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true, - "requires": { - "is-number": "^3.0.0", - "repeat-string": "^1.6.1" + "engines": { + "node": ">=0.10.0" } }, - "to-through": { + "node_modules/to-through": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", - "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=", + "integrity": "sha512-+QIz37Ly7acM4EMdw2PRN389OneM5+d844tirkGp4dPKzI5OE72V9OsbFp+CIYJDahZ41ZV05hNtcPAQUAm9/Q==", "dev": true, - "requires": { + "dependencies": { "through2": "^2.0.3" }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/to-through/node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, "dependencies": { - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - } + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" } }, - "tr46": { + "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", "dev": true }, - "trim-newlines": { + "node_modules/trim-newlines": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", - "dev": true + "dev": true, + "engines": { + "node": ">=8" + } }, - "ts-node": { - "version": "10.7.0", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.7.0.tgz", - "integrity": "sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==", + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", "dev": true, - "requires": { - "@cspotcode/source-map-support": "0.7.0", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", "@tsconfig/node12": "^1.0.7", "@tsconfig/node14": "^1.0.0", @@ -21223,96 +12731,197 @@ "create-require": "^1.1.0", "diff": "^4.0.1", "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.0", + "v8-compile-cache-lib": "^3.0.1", "yn": "3.1.1" }, - "dependencies": { - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true } } }, - "tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + "node_modules/ts-node/node_modules/acorn": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", + "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } }, - "tunnel": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", - "dev": true + "node_modules/ts-node/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==" }, - "tunnel-agent": { + "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", "dev": true, - "requires": { + "dependencies": { "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" } }, - "type": { + "node_modules/type": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", "dev": true }, - "type-detect": { + "node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "dev": true, + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "typedarray": { + "node_modules/typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", "dev": true }, - "typeorm-aurora-data-api-driver": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/typeorm-aurora-data-api-driver/-/typeorm-aurora-data-api-driver-2.3.4.tgz", - "integrity": "sha512-1EsmZvhUCWIVP5Ss9e/P8Ya6LY7Oi58X4whmrFmH56aIlAs4chJUhMGMomfl1A1R5SZK+QKEJHMbSKQlNd7Jgw==", + "node_modules/typeorm-aurora-data-api-driver": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/typeorm-aurora-data-api-driver/-/typeorm-aurora-data-api-driver-2.4.4.tgz", + "integrity": "sha512-EqrdoXr0FbUrAMmkNQQuPwlhUGM7SJnpwUlWTWNlK2mOhOUyM+33fhm1f1hz3nnJJV8fTxzS3kTDq6pkVASLAw==", "dev": true, - "requires": { - "data-api-client": "^1.2.0" + "dependencies": { + "data-api-client": "^1.3.0" + }, + "engines": { + "node": ">=6.0.0" } }, - "typescript": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz", - "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==", - "dev": true + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } }, - "uglify-js": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.2.tgz", - "integrity": "sha512-rtPMlmcO4agTUfz10CbgJ1k6UAoXM2gWb3GoMPPZB/+/Ackf8lNWk11K4rYi2D0apgoFRLtQOZhb+/iGNJq26A==", + "node_modules/uglify-js": { + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", "dev": true, - "optional": true + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "unc-path-regex": { + "node_modules/unc-path-regex": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", - "dev": true - }, - "underscore": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.2.tgz", - "integrity": "sha512-ekY1NhRzq0B08g4bGuX4wd2jZx5GnKz6mKSqFL4nqBlfyMGiG10gDFhDTMEfYmDL6Jy0FUIZp7wiRB+0BP7J2g==", - "dev": true + "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "undertaker": { + "node_modules/undertaker": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.3.0.tgz", "integrity": "sha512-/RXwi5m/Mu3H6IHQGww3GNt1PNXlbeCuclF2QYR14L/2CHPz3DFZkvB5hZ0N/QUkiXWCACML2jXViIQEQc2MLg==", "dev": true, - "requires": { + "dependencies": { "arr-flatten": "^1.0.1", "arr-map": "^2.0.0", "bach": "^1.0.0", @@ -21324,189 +12933,227 @@ "object.reduce": "^1.0.0", "undertaker-registry": "^1.0.0" }, - "dependencies": { - "fast-levenshtein": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.4.tgz", - "integrity": "sha1-5qdUzI8V5YmHqpy9J69m/W9OWvk=", - "dev": true - } + "engines": { + "node": ">= 0.10" } }, - "undertaker-registry": { + "node_modules/undertaker-registry": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz", - "integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA=", + "integrity": "sha512-UR1khWeAjugW3548EfQmL9Z7pGMlBgXteQpr1IZeZBtnkCJQJIJ1Scj0mb9wQaPvUZ9Q17XqW6TIaPchJkyfqw==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/undertaker/node_modules/fast-levenshtein": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.4.tgz", + "integrity": "sha512-Ia0sQNrMPXXkqVFt6w6M1n1oKo3NfKs+mvaV811Jwir7vAk9a6PVV9VPYf6X3BU97QiLEmuW3uXH9u87zDFfdw==", "dev": true }, - "union-value": { + "node_modules/union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", "dev": true, - "requires": { + "dependencies": { "arr-union": "^3.1.0", "get-value": "^2.0.6", "is-extendable": "^0.1.1", "set-value": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "unique-filename": { + "node_modules/union-value/node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unique-filename": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", "dev": true, "optional": true, - "requires": { + "dependencies": { "unique-slug": "^2.0.0" } }, - "unique-slug": { + "node_modules/unique-slug": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", "dev": true, "optional": true, - "requires": { + "dependencies": { "imurmurhash": "^0.1.4" } }, - "unique-stream": { + "node_modules/unique-stream": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", "dev": true, - "requires": { + "dependencies": { "json-stable-stringify-without-jsonify": "^1.0.1", "through2-filter": "^3.0.0" } }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true - }, - "unset-value": { + "node_modules/unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "integrity": "sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==", "dev": true, - "requires": { + "dependencies": { "has-value": "^0.3.1", "isobject": "^3.0.0" }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==", + "dev": true, "dependencies": { - "has-value": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", - "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", - "dev": true, - "requires": { - "get-value": "^2.0.3", - "has-values": "^0.1.4", - "isobject": "^2.0.0" - }, - "dependencies": { - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "requires": { - "isarray": "1.0.0" - } - } - } - }, - "has-values": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", - "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true - } + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==", + "dev": true, + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha512-J8S0cEdWuQbqD9//tlZxiMuMNmxB8PlEwvYwuxsTmR1G5RXUePEX/SJn7aD0GMLieuZYSwNH0cQuJGwnYunXRQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" } }, - "upath": { + "node_modules/upath": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", - "dev": true + "dev": true, + "engines": { + "node": ">=4", + "yarn": "*" + } }, - "urix": { + "node_modules/urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", + "deprecated": "Please see https://github.com/lydell/urix#deprecated", "dev": true }, - "use": { + "node_modules/use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "util-deprecate": { + "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, - "uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + "node_modules/uuid": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", + "bin": { + "uuid": "dist/bin/uuid" + } }, - "v8-compile-cache-lib": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz", - "integrity": "sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA==", + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", "dev": true }, - "v8flags": { + "node_modules/v8flags": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", "dev": true, - "requires": { + "dependencies": { "homedir-polyfill": "^1.0.1" + }, + "engines": { + "node": ">= 0.10" } }, - "validate-npm-package-license": { + "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "dev": true, - "requires": { + "dependencies": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" } }, - "value-or-function": { + "node_modules/value-or-function": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", - "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", - "dev": true + "integrity": "sha512-jdBB2FrWvQC/pnPtIqcLsMaQgjhdb6B7tk1MMyTKapox+tQZbdRP4uLxu/JY0t7fbfDCUMnuelzEYv5GsxHhdg==", + "dev": true, + "engines": { + "node": ">= 0.10" + } }, - "vinyl": { + "node_modules/vinyl": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", "integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==", "dev": true, - "requires": { + "dependencies": { "clone": "^2.1.1", "clone-buffer": "^1.0.0", "clone-stats": "^1.0.0", "cloneable-readable": "^1.0.0", "remove-trailing-separator": "^1.0.1", "replace-ext": "^1.0.0" + }, + "engines": { + "node": ">= 0.10" } }, - "vinyl-fs": { + "node_modules/vinyl-fs": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", "dev": true, - "requires": { + "dependencies": { "fs-mkdirp-stream": "^1.0.0", "glob-stream": "^6.1.0", "graceful-fs": "^4.0.0", @@ -21525,25 +13172,26 @@ "vinyl": "^2.0.0", "vinyl-sourcemap": "^1.1.0" }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vinyl-fs/node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, "dependencies": { - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - } + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" } }, - "vinyl-sourcemap": { + "node_modules/vinyl-sourcemap": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", - "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=", + "integrity": "sha512-NiibMgt6VJGJmyw7vtzhctDcfKch4e4n9TBeoWlirb7FMg9/1Ov9k+A5ZRAtywBpRPiyECvQRQllYM8dECegVA==", "dev": true, - "requires": { + "dependencies": { "append-buffer": "^1.0.2", "convert-source-map": "^1.5.0", "graceful-fs": "^4.1.6", @@ -21552,247 +13200,323 @@ "remove-bom-buffer": "^3.0.0", "vinyl": "^2.0.0" }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vinyl-sourcemap/node_modules/normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w==", + "dev": true, "dependencies": { - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true, - "requires": { - "remove-trailing-separator": "^1.0.1" - } - } + "remove-trailing-separator": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "vinyl-sourcemaps-apply": { + "node_modules/vinyl-sourcemaps-apply": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz", - "integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=", + "integrity": "sha512-+oDh3KYZBoZC8hfocrbrxbLUeaYtQK7J5WU5Br9VqWqmCll3tFJqKp97GC9GmMsVIL0qnx2DgEDVxdo5EZ5sSw==", "dev": true, - "requires": { - "source-map": "^0.5.1" - }, "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } + "source-map": "^0.5.1" + } + }, + "node_modules/vinyl-sourcemaps-apply/node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" } }, - "webidl-conversions": { + "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", "dev": true }, - "whatwg-url": { + "node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "dev": true, - "requires": { + "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, - "which": { + "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, - "requires": { + "dependencies": { "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "which-module": { + "node_modules/which-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", - "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "integrity": "sha512-F6+WgncZi/mJDrammbTuHe1q0R5hOXv/mBaiNA2TCNT/LTHusX0V+CJnj9XT8ki5ln2UZyyddDgHfCzyrOH7MQ==", "dev": true }, - "wide-align": { + "node_modules/which-typed-array": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/wide-align": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "dev": true, - "requires": { + "dependencies": { "string-width": "^1.0.2 || 2" + } + }, + "node_modules/wide-align/node_modules/ansi-regex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/wide-align/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/wide-align/node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" }, + "engines": { + "node": ">=4" + } + }, + "node_modules/wide-align/node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "dev": true, "dependencies": { - "ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" } }, - "word-wrap": { + "node_modules/word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "wordwrap": { + "node_modules/wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", "dev": true }, - "workerpool": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.0.tgz", - "integrity": "sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg==", + "node_modules/workerpool": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==", "dev": true }, - "wrap-ansi": { + "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "requires": { + "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "wrappy": { + "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "xml2js": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", - "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", - "requires": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - } - }, - "xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" - }, - "xpath.js": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/xpath.js/-/xpath.js-1.1.0.tgz", - "integrity": "sha512-jg+qkfS4K8E7965sqaUl8mRngXiKb3WZGfONgE18pr03FUQiuSV6G+Ej4tS55B+rIQSFEIw3phdVAQ4pPqNWfQ==", - "dev": true + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, - "xtend": { + "node_modules/xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.4" + } }, - "y18n": { + "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } }, - "yallist": { + "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "yargs": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz", - "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==", - "requires": { - "cliui": "^7.0.2", + "node_modules/yargs": { + "version": "17.6.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz", + "integrity": "sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==", + "dependencies": { + "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" + "yargs-parser": "^21.1.1" }, - "dependencies": { - "yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==" - } + "engines": { + "node": ">=12" } }, - "yargs-parser": { - "version": "20.2.9", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==" + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "engines": { + "node": ">=12" + } }, - "yargs-unparser": { + "node_modules/yargs-unparser": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", "dev": true, - "requires": { + "dependencies": { "camelcase": "^6.0.0", "decamelize": "^4.0.0", "flat": "^5.0.2", "is-plain-obj": "^2.1.0" }, - "dependencies": { - "camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", - "dev": true - }, - "decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true - }, - "is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true - } + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs-unparser/node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs-unparser/node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" } }, - "yn": { + "node_modules/yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "yocto-queue": { + "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/package.json b/package.json index d234a2d7d4..a7fa46db59 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@streamyard/typeorm", "private": true, - "version": "0.3.10-1", + "version": "0.3.16-1", "description": "Data-Mapper ORM for TypeScript, ES7, ES6, ES5. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, MongoDB, Spanner databases.", "license": "MIT", "readmeFilename": "README.md", @@ -48,6 +48,8 @@ "./browser/driver/cockroachdb/CockroachDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/mongodb/MongoDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/mongodb/MongoQueryRunner.js": "./browser/platform/BrowserDisabledDriversDummy.js", + "./browser/driver/mongodb/typings.js": "./browser/platform/BrowserDisabledDriversDummy.js", + "./browser/driver/mongodb/bson.typings.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/mysql/MysqlDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/oracle/OracleDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", "./browser/driver/postgres/PostgresDriver.js": "./browser/platform/BrowserDisabledDriversDummy.js", @@ -92,66 +94,63 @@ ], "devDependencies": { "@types/app-root-path": "^1.2.4", - "@types/chai": "^4.2.15", - "@types/chai-as-promised": "^7.1.3", - "@types/debug": "^4.1.5", - "@types/js-yaml": "^4.0.0", - "@types/mkdirp": "^1.0.1", - "@types/mocha": "^8.2.1", - "@types/node": "^14.14.31", - "@types/rimraf": "^3.0.0", + "@types/chai": "^4.3.4", + "@types/chai-as-promised": "^7.1.5", + "@types/debug": "^4.1.7", + "@types/mkdirp": "^1.0.2", + "@types/mocha": "^10.0.1", + "@types/node": "^18.13.0", "@types/sha.js": "^2.4.0", - "@types/sinon": "^9.0.10", - "@types/source-map-support": "^0.5.3", - "@types/uuid": "^8.3.4", - "@types/xml2js": "^0.4.8", - "@types/yargs": "^17.0.2", - "better-sqlite3": "^7.1.2", - "chai": "^4.3.0", + "@types/sinon": "^10.0.13", + "@types/source-map-support": "^0.5.6", + "@types/uuid": "^9.0.0", + "@types/yargs": "^17.0.22", + "better-sqlite3": "^8.1.0", + "chai": "^4.3.7", "chai-as-promised": "^7.1.1", - "class-transformer": "^0.4.0", - "conventional-changelog-angular": "^5.0.12", - "conventional-changelog-cli": "^2.1.1", - "del": "^6.0.0", + "class-transformer": "^0.5.1", + "conventional-changelog-angular": "^5.0.13", + "conventional-changelog-cli": "^2.2.2", + "del": "6.1.1", "gulp": "^4.0.2", "gulp-istanbul": "^1.1.3", "gulp-mocha": "^8.0.0", "gulp-rename": "^2.0.0", - "gulp-replace": "^1.0.0", + "gulp-replace": "^1.1.4", "gulp-shell": "^0.8.0", "gulp-sourcemaps": "^3.0.0", "gulp-typescript": "^6.0.0-alpha.1", "gulpclass": "^0.2.0", - "husky": "^5.1.1", - "mocha": "^8.3.0", - "mongodb": "^3.6.4", - "mssql": "^7.3.0", + "husky": "^8.0.3", + "mocha": "^10.2.0", + "mongodb": "^5.2.0", + "mssql": "^9.1.1", "mysql": "^2.18.1", - "mysql2": "^2.2.5", - "pg": "^8.5.1", - "pg-query-stream": "^4.0.0", - "prettier": "^2.5.1", - "redis": "^3.1.1", + "mysql2": "^3.1.1", + "pg": "^8.9.0", + "pg-query-stream": "^4.3.0", + "prettier": "^2.8.3", + "redis": "^4.6.4", "remap-istanbul": "^0.13.0", - "rimraf": "^3.0.2", - "sinon": "^9.2.4", - "sinon-chai": "^3.5.0", - "source-map-support": "^0.5.19", - "sql.js": "^1.4.0", - "sqlite3": "^5.0.11", - "ts-node": "^10.7.0", - "typeorm-aurora-data-api-driver": "^2.0.0", - "typescript": "^4.8.2" + "rimraf": "^4.1.2", + "sinon": "^15.0.1", + "sinon-chai": "^3.7.0", + "source-map-support": "^0.5.21", + "sql.js": "^1.8.0", + "sqlite3": "^5.1.4", + "ts-node": "^10.9.1", + "typeorm-aurora-data-api-driver": "^2.4.4", + "typescript": "^4.9.5" }, "peerDependencies": { "@google-cloud/spanner": "^5.18.0", "@sap/hana-client": "^2.12.25", - "better-sqlite3": "^7.1.2", + "better-sqlite3": "^7.1.2 || ^8.0.0", "hdb-pool": "^0.1.6", "ioredis": "^5.0.4", - "mongodb": "^3.6.0", - "mssql": "^7.3.0", - "mysql2": "^2.2.5", + "mongodb": "^5.2.0", + "mssql": "^9.1.1", + "mysql2": "^2.2.5 || ^3.0.1", "oracledb": "^5.1.0", "pg": "^8.5.1", "pg-native": "^3.0.0", @@ -216,33 +215,31 @@ } }, "dependencies": { - "@sqltools/formatter": "^1.2.2", - "app-root-path": "^3.0.0", + "@sqltools/formatter": "^1.2.5", + "app-root-path": "^3.1.0", "buffer": "^6.0.3", - "chalk": "^4.1.0", + "chalk": "^4.1.2", "cli-highlight": "^2.1.11", - "date-fns": "^2.28.0", - "debug": "^4.3.3", - "dotenv": "^16.0.0", - "glob": "^7.2.0", - "js-yaml": "^4.1.0", - "mkdirp": "^1.0.4", + "date-fns": "^2.29.3", + "debug": "^4.3.4", + "dotenv": "^16.0.3", + "glob": "^8.1.0", + "mkdirp": "^2.1.3", "reflect-metadata": "^0.1.13", "sha.js": "^2.4.11", - "tslib": "^2.3.1", - "uuid": "^8.3.2", - "xml2js": "^0.4.23", - "yargs": "^17.3.1" + "tslib": "^2.5.0", + "uuid": "^9.0.0", + "yargs": "^17.6.2" }, "scripts": { - "test": "rimraf ./build && tsc && mocha --file ./build/compiled/test/utils/test-setup.js --bail --recursive --timeout 60000 ./build/compiled/test", - "test-fast": "mocha --file ./build/compiled/test/utils/test-setup.js --bail --recursive --timeout 60000 ./build/compiled/test", + "test": "rimraf ./build && tsc && mocha --file ./build/compiled/test/utils/test-setup.js --bail --recursive --timeout 90000 ./build/compiled/test", + "test-fast": "mocha --file ./build/compiled/test/utils/test-setup.js --bail --recursive --timeout 90000 ./build/compiled/test", "compile": "rimraf ./build && tsc", "watch": "./node_modules/.bin/tsc -w", "package": "gulp package", "pack": "gulp pack", "lint": "prettier --check \"./src/**/*.ts\" \"./test/**/*.ts\" \"./sample/**/*.ts\"", - "format": "prettier --write \"./src/**/*.ts\" \"./test/**/*.ts\" \"./sample/**/*.ts\"", + "format": "prettier --write --end-of-line auto \"./src/**/*.ts\" \"./test/**/*.ts\" \"./sample/**/*.ts\"", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 2" }, "bin": { diff --git a/sample/sample34-mongodb/entity/Post.ts b/sample/sample34-mongodb/entity/Post.ts index a1e5a6cfe8..eafd0219cf 100644 --- a/sample/sample34-mongodb/entity/Post.ts +++ b/sample/sample34-mongodb/entity/Post.ts @@ -1,11 +1,11 @@ import { Column, Entity } from "../../../src/index" import { ObjectIdColumn } from "../../../src/decorator/columns/ObjectIdColumn" -import { ObjectID } from "../../../src/driver/mongodb/typings" +import { ObjectId } from "../../../src/driver/mongodb/typings" @Entity("sample34_post") export class Post { @ObjectIdColumn() - id: ObjectID + id: ObjectId @Column() title: string diff --git a/src/cache/DbQueryResultCache.ts b/src/cache/DbQueryResultCache.ts index b79c58660c..91dbb00929 100644 --- a/src/cache/DbQueryResultCache.ts +++ b/src/cache/DbQueryResultCache.ts @@ -131,7 +131,7 @@ export class DbQueryResultCache implements QueryResultCache { } /** - * Caches given query result. + * Get data from cache. * Returns cache result if found. * Returns undefined if result is not cached. */ diff --git a/src/cache/QueryResultCacheOptions.ts b/src/cache/QueryResultCacheOptions.ts index e1041b571a..287c1a8c9c 100644 --- a/src/cache/QueryResultCacheOptions.ts +++ b/src/cache/QueryResultCacheOptions.ts @@ -6,7 +6,7 @@ export interface QueryResultCacheOptions { * Cache identifier set by user. * Can be empty. */ - identifier: string + identifier?: string /** * Time, when cache was created. @@ -21,7 +21,7 @@ export interface QueryResultCacheOptions { /** * Cached query. */ - query: string + query?: string /** * Query result that will be cached. diff --git a/src/cache/RedisQueryResultCache.ts b/src/cache/RedisQueryResultCache.ts index 95b34674d5..4c25bc9af6 100644 --- a/src/cache/RedisQueryResultCache.ts +++ b/src/cache/RedisQueryResultCache.ts @@ -123,7 +123,7 @@ export class RedisQueryResultCache implements QueryResultCache { async synchronize(queryRunner: QueryRunner): Promise {} /** - * Caches given query result. + * Get data from cache. * Returns cache result if found. * Returns undefined if result is not cached. */ diff --git a/src/cli-ts-node-esm.ts b/src/cli-ts-node-esm.ts index 56206d3234..747c9f41e9 100644 --- a/src/cli-ts-node-esm.ts +++ b/src/cli-ts-node-esm.ts @@ -3,8 +3,8 @@ import { spawnSync } from "child_process" if ((process.env["NODE_OPTIONS"] || "").includes("--loader ts-node")) require("./cli") -else - spawnSync(process.argv[0], process.argv.slice(1), { +else { + const childProcess = spawnSync(process.argv[0], process.argv.slice(1), { stdio: "inherit", env: { ...process.env, @@ -18,3 +18,6 @@ else }, windowsHide: true, }) + + process.exit(childProcess.status || 0) +} diff --git a/src/commands/InitCommand.ts b/src/commands/InitCommand.ts index ca32e48973..8a14d2738f 100644 --- a/src/commands/InitCommand.ts +++ b/src/commands/InitCommand.ts @@ -315,7 +315,7 @@ temp/` protected static getUserEntityTemplate(database: string): string { return `import { Entity, ${ database === "mongodb" - ? "ObjectIdColumn, ObjectID" + ? "ObjectIdColumn, ObjectId" : "PrimaryGeneratedColumn" }, Column } from "typeorm" @@ -327,7 +327,7 @@ export class User { ? "@ObjectIdColumn()" : "@PrimaryGeneratedColumn()" } - id: ${database === "mongodb" ? "ObjectID" : "number"} + id: ${database === "mongodb" ? "ObjectId" : "number"} @Column() firstName: string @@ -377,29 +377,58 @@ export const Routes = [{ * Gets contents of the user controller file (used when express is enabled). */ protected static getControllerTemplate(isEsm: boolean): string { - return `import { getRepository } from "typeorm" + return `import { AppDataSource } from "../data-source${ + isEsm ? ".js" : "" + }" import { NextFunction, Request, Response } from "express" import { User } from "../entity/User${isEsm ? ".js" : ""}" export class UserController { - private userRepository = getRepository(User) + private userRepository = AppDataSource.getRepository(User) async all(request: Request, response: Response, next: NextFunction) { return this.userRepository.find() } async one(request: Request, response: Response, next: NextFunction) { - return this.userRepository.findOne(request.params.id) + const id = parseInt(request.params.id) + + + const user = await this.userRepository.findOne({ + where: { id } + }) + + if (!user) { + return "unregistered user" + } + return user } async save(request: Request, response: Response, next: NextFunction) { - return this.userRepository.save(request.body) + const { firstName, lastName, age } = request.body; + + const user = Object.assign(new User(), { + firstName, + lastName, + age + }) + + return this.userRepository.save(user) } async remove(request: Request, response: Response, next: NextFunction) { - let userToRemove = await this.userRepository.findOneBy({ id: request.params.id }) + const id = parseInt(request.params.id) + + let userToRemove = await this.userRepository.findOneBy({ id }) + + if (!userToRemove) { + return "this user not exist" + } + await this.userRepository.remove(userToRemove) + + return "user has been removed" } }` @@ -668,7 +697,10 @@ Steps to run this project: if (!packageJson.dependencies) packageJson.dependencies = {} Object.assign(packageJson.dependencies, { - typeorm: require("../package.json").version, + typeorm: + require("../package.json").version !== "0.0.0" + ? require("../package.json").version // install version from package.json if present + : require("../package.json").installFrom, // else use custom source "reflect-metadata": "^0.1.13", }) @@ -691,10 +723,10 @@ Steps to run this project: packageJson.dependencies["oracledb"] = "^5.1.0" break case "mssql": - packageJson.dependencies["mssql"] = "^7.3.0" + packageJson.dependencies["mssql"] = "^9.1.1" break case "mongodb": - packageJson.dependencies["mongodb"] = "^3.0.8" + packageJson.dependencies["mongodb"] = "^5.2.0" break case "spanner": packageJson.dependencies["@google-cloud/spanner"] = "^5.18.0" diff --git a/src/commands/MigrationGenerateCommand.ts b/src/commands/MigrationGenerateCommand.ts index fd4048a29d..ac6f7b5313 100644 --- a/src/commands/MigrationGenerateCommand.ts +++ b/src/commands/MigrationGenerateCommand.ts @@ -196,6 +196,7 @@ export class MigrationGenerateCommand implements yargs.CommandModule { )} has been generated successfully.`, ), ) + process.exit(0) } } catch (err) { PlatformTools.logCmdErr("Error during migration generation:", err) diff --git a/src/commands/MigrationRevertCommand.ts b/src/commands/MigrationRevertCommand.ts index 0c4b878667..d4315c4a1e 100644 --- a/src/commands/MigrationRevertCommand.ts +++ b/src/commands/MigrationRevertCommand.ts @@ -53,6 +53,7 @@ export class MigrationRevertCommand implements yargs.CommandModule { transaction: dataSource.options.migrationsTransactionMode ?? ("all" as "all" | "none" | "each"), + fake: !!args.f, } switch (args.t) { diff --git a/src/common/PickKeysByType.ts b/src/common/PickKeysByType.ts new file mode 100644 index 0000000000..fd4f9d24c9 --- /dev/null +++ b/src/common/PickKeysByType.ts @@ -0,0 +1,7 @@ +/** + * Pick only the keys that match the Type `U` + */ +export type PickKeysByType = string & + keyof { + [P in keyof T as T[P] extends U ? P : never]: T[P] + } diff --git a/src/connection/ConnectionOptionsReader.ts b/src/connection/ConnectionOptionsReader.ts index 31fb3c1154..5421b7be98 100644 --- a/src/connection/ConnectionOptionsReader.ts +++ b/src/connection/ConnectionOptionsReader.ts @@ -3,15 +3,12 @@ import path from "path" import { DataSourceOptions } from "../data-source/DataSourceOptions" import { PlatformTools } from "../platform/PlatformTools" import { ConnectionOptionsEnvReader } from "./options-reader/ConnectionOptionsEnvReader" -import { ConnectionOptionsYmlReader } from "./options-reader/ConnectionOptionsYmlReader" -import { ConnectionOptionsXmlReader } from "./options-reader/ConnectionOptionsXmlReader" import { TypeORMError } from "../error" import { isAbsolute } from "../util/PathUtils" import { importOrRequireFile } from "../util/ImportUtils" /** * Reads connection options from the ormconfig. - * Can read from multiple file extensions including env, json, js, xml and yml. */ export class ConnectionOptionsReader { // ------------------------------------------------------------------------- @@ -106,9 +103,6 @@ export class ConnectionOptionsReader { "mts", "cts", "json", - "yml", - "yaml", - "xml", ] // Detect if baseFilePath contains file extension @@ -168,18 +162,6 @@ export class ConnectionOptionsReader { } } else if (foundFileFormat === "json") { connectionOptions = require(configFile) - } else if (foundFileFormat === "yml") { - connectionOptions = await new ConnectionOptionsYmlReader().read( - configFile, - ) - } else if (foundFileFormat === "yaml") { - connectionOptions = await new ConnectionOptionsYmlReader().read( - configFile, - ) - } else if (foundFileFormat === "xml") { - connectionOptions = await new ConnectionOptionsXmlReader().read( - configFile, - ) } // normalize and return connection options diff --git a/src/connection/options-reader/ConnectionOptionsXmlReader.ts b/src/connection/options-reader/ConnectionOptionsXmlReader.ts deleted file mode 100644 index 4d046a8a06..0000000000 --- a/src/connection/options-reader/ConnectionOptionsXmlReader.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { parseString as xmlParser } from "xml2js" -import { PlatformTools } from "../../platform/PlatformTools" -import { DataSourceOptions } from "../../data-source/DataSourceOptions" - -/** - * Reads connection options defined in the xml file. - * - * @deprecated - */ -export class ConnectionOptionsXmlReader { - // ------------------------------------------------------------------------- - // Public Methods - // ------------------------------------------------------------------------- - - /** - * Reads connection options from given xml file. - */ - async read(path: string): Promise { - const xml = await this.readXml(path) - return (xml.connection as any[]).map((connection) => { - return { - name: connection.$.name, - type: connection.$.type, - url: connection.url ? connection.url[0] : undefined, - host: connection.host ? connection.host[0] : undefined, - port: - connection.port && connection.port[0] - ? parseInt(connection.port[0]) - : undefined, - username: connection.username - ? connection.username[0] - : undefined, - password: connection.password - ? connection.password[0] - : undefined, - database: connection.database - ? connection.database[0] - : undefined, - sid: connection.sid ? connection.sid[0] : undefined, - extra: connection.extra ? connection.extra[0] : undefined, - synchronize: connection.synchronize - ? connection.synchronize[0] - : undefined, - entities: connection.entities - ? connection.entities[0].entity - : [], - subscribers: connection.subscribers - ? connection.subscribers[0].entity - : [], - logging: connection.logging[0] - ? connection.logging[0].split(",") - : undefined, - } - }) - } - - // ------------------------------------------------------------------------- - // Protected Methods - // ------------------------------------------------------------------------- - - /** - * Reads xml file contents and returns them in a promise. - */ - protected readXml(path: string): Promise { - const xmlOptions = { trim: true, explicitRoot: false } - return new Promise((ok, fail) => { - xmlParser( - PlatformTools.readFileSync(path), - xmlOptions, - (err: any, result: any) => (err ? fail(err) : ok(result)), - ) - }) - } -} diff --git a/src/connection/options-reader/ConnectionOptionsYmlReader.ts b/src/connection/options-reader/ConnectionOptionsYmlReader.ts deleted file mode 100644 index cc1b13c537..0000000000 --- a/src/connection/options-reader/ConnectionOptionsYmlReader.ts +++ /dev/null @@ -1,35 +0,0 @@ -import ymlParser from "js-yaml" -import { PlatformTools } from "../../platform/PlatformTools" -import { DataSourceOptions } from "../../data-source/DataSourceOptions" - -/** - * Reads connection options defined in the yml file. - * - * @deprecated - */ -export class ConnectionOptionsYmlReader { - // ------------------------------------------------------------------------- - // Public Methods - // ------------------------------------------------------------------------- - - /** - * Reads connection options from given yml file. - */ - async read(path: string): Promise { - const contentsBuffer = PlatformTools.readFileSync(path) - const contents = contentsBuffer.toString() - - const config = ymlParser.load(contents) - - if (!config || typeof config !== "object" || config === null) { - return [] - } - - return Object.keys(config).map((connectionName) => { - return Object.assign( - { name: connectionName }, - (config as any)[connectionName], - ) - }) - } -} diff --git a/src/data-source/DataSource.ts b/src/data-source/DataSource.ts index 2775422322..1a811b8c5a 100644 --- a/src/data-source/DataSource.ts +++ b/src/data-source/DataSource.ts @@ -10,6 +10,7 @@ import { CannotExecuteNotConnectedError, EntityMetadataNotFoundError, QueryRunnerProviderAlreadyReleasedError, + TypeORMError, } from "../error" import { TreeRepository } from "../repository/TreeRepository" import { NamingStrategyInterface } from "../naming-strategy/NamingStrategyInterface" @@ -35,7 +36,6 @@ import { RelationLoader } from "../query-builder/RelationLoader" import { ObjectUtils } from "../util/ObjectUtils" import { IsolationLevel } from "../driver/types/IsolationLevel" import { ReplicationMode } from "../driver/types/ReplicationMode" -import { TypeORMError } from "../error" import { RelationIdLoader } from "../query-builder/RelationIdLoader" import { DriverUtils } from "../driver/DriverUtils" import { InstanceChecker } from "../util/InstanceChecker" @@ -113,6 +113,12 @@ export class DataSource { */ readonly entityMetadatas: EntityMetadata[] = [] + /** + * All entity metadatas that are registered for this connection. + * This is a copy of #.entityMetadatas property -> used for more performant searches. + */ + readonly entityMetadatasMap = new Map, EntityMetadata>() + /** * Used to work with query result cache. */ @@ -215,6 +221,17 @@ export class DataSource { this.queryResultCache = new QueryResultCacheFactory(this).create() } + // todo: we must update the database in the driver as well, if it was set by setOptions method + // in the future we need to refactor the code and remove "database" from the driver, and instead + // use database (and options) from a single place - data source. + if (options.database) { + this.driver.database = DriverUtils.buildDriverOptions( + this.options, + ).database + } + + // todo: need to take a look if we need to update schema and other "poor" properties + return this } @@ -257,7 +274,7 @@ export class DataSource { } catch (error) { // if for some reason build metadata fail (for example validation error during entity metadata check) // connection needs to be closed - await this.close() + await this.destroy() throw error } @@ -498,11 +515,11 @@ export class DataSource { /** * Executes raw SQL query and returns raw database results. */ - async query( + async query( query: string, parameters?: any[], queryRunner?: QueryRunner, - ): Promise { + ): Promise { if (InstanceChecker.isMongoEntityManager(this.manager)) throw new TypeORMError(`Queries aren't supported by MongoDB.`) @@ -544,7 +561,7 @@ export class DataSource { throw new TypeORMError(`Query Builder is not supported by MongoDB.`) if (alias) { - alias = DriverUtils.buildAlias(this.driver, alias) + alias = DriverUtils.buildAlias(this.driver, undefined, alias) const metadata = this.getMetadata( entityOrRunner as EntityTarget, ) @@ -617,37 +634,50 @@ export class DataSource { protected findMetadata( target: EntityTarget, ): EntityMetadata | undefined { - return this.entityMetadatas.find((metadata) => { - if (metadata.target === target) return true - if (InstanceChecker.isEntitySchema(target)) { - return metadata.name === target.options.name + const metadataFromMap = this.entityMetadatasMap.get(target) + if (metadataFromMap) return metadataFromMap + + for (let [_, metadata] of this.entityMetadatasMap) { + if ( + InstanceChecker.isEntitySchema(target) && + metadata.name === target.options.name + ) { + return metadata } if (typeof target === "string") { if (target.indexOf(".") !== -1) { - return metadata.tablePath === target + if (metadata.tablePath === target) { + return metadata + } } else { - return ( + if ( metadata.name === target || metadata.tableName === target - ) + ) { + return metadata + } } } if ( - ObjectUtils.isObject(target) && + ObjectUtils.isObjectWithName(target) && typeof target.name === "string" ) { if (target.name.indexOf(".") !== -1) { - return metadata.tablePath === target.name + if (metadata.tablePath === target.name) { + return metadata + } } else { - return ( + if ( metadata.name === target.name || metadata.tableName === target.name - ) + ) { + return metadata + } } } + } - return false - }) + return undefined } /** @@ -674,7 +704,12 @@ export class DataSource { await connectionMetadataBuilder.buildEntityMetadatas( flattenedEntities, ) - ObjectUtils.assign(this, { entityMetadatas: entityMetadatas }) + ObjectUtils.assign(this, { + entityMetadatas: entityMetadatas, + entityMetadatasMap: new Map( + entityMetadatas.map((metadata) => [metadata.target, metadata]), + ), + }) // create migration instances const flattenedMigrations = ObjectUtils.mixedListToArray( diff --git a/src/decorator/options/JoinTableMultipleColumnsOptions.ts b/src/decorator/options/JoinTableMultipleColumnsOptions.ts index 18684bcc23..07147f1672 100644 --- a/src/decorator/options/JoinTableMultipleColumnsOptions.ts +++ b/src/decorator/options/JoinTableMultipleColumnsOptions.ts @@ -31,4 +31,11 @@ export interface JoinTableMultipleColumnsOptions { * Works only in some databases (like postgres and mssql). */ schema?: string + + /** + * Indicates if schema synchronization is enabled or disabled junction table. + * If it will be set to false then schema sync will and migrations ignores junction table. + * By default schema synchronization is enabled. + */ + readonly synchronize?: boolean } diff --git a/src/decorator/options/JoinTableOptions.ts b/src/decorator/options/JoinTableOptions.ts index b387a77484..d2b8aa5c36 100644 --- a/src/decorator/options/JoinTableOptions.ts +++ b/src/decorator/options/JoinTableOptions.ts @@ -31,4 +31,11 @@ export interface JoinTableOptions { * Works only in some databases (like postgres and mssql). */ schema?: string + + /** + * Indicates if schema synchronization is enabled or disabled junction table. + * If it will be set to false then schema sync will and migrations ignores junction table. + * By default schema synchronization is enabled. + */ + synchronize?: boolean } diff --git a/src/decorator/options/SpatialColumnOptions.ts b/src/decorator/options/SpatialColumnOptions.ts index ac88bc6c4a..32bc29939a 100644 --- a/src/decorator/options/SpatialColumnOptions.ts +++ b/src/decorator/options/SpatialColumnOptions.ts @@ -1,3 +1,5 @@ +import { Geometry } from "../../driver/types/GeoJsonTypes" + /** * Options for spatial columns. */ @@ -6,7 +8,7 @@ export interface SpatialColumnOptions { * Column type's feature type. * Geometry, Point, Polygon, etc. */ - spatialFeatureType?: string + spatialFeatureType?: Geometry["type"] /** * Column type's SRID. diff --git a/src/decorator/relations/JoinTable.ts b/src/decorator/relations/JoinTable.ts index ad3e2e5627..b609bce768 100644 --- a/src/decorator/relations/JoinTable.ts +++ b/src/decorator/relations/JoinTable.ts @@ -50,6 +50,7 @@ export function JoinTable( schema: options && options.schema ? options.schema : undefined, database: options && options.database ? options.database : undefined, + synchronize: !(options && options.synchronize === false), } as JoinTableMetadataArgs) } } diff --git a/src/driver/Driver.ts b/src/driver/Driver.ts index 46e2ad3cc4..90a6fec010 100644 --- a/src/driver/Driver.ts +++ b/src/driver/Driver.ts @@ -14,6 +14,8 @@ import { Table } from "../schema-builder/table/Table" import { View } from "../schema-builder/view/View" import { TableForeignKey } from "../schema-builder/table/TableForeignKey" import { UpsertType } from "./types/UpsertType" +import { OnDeleteType } from "../metadata/types/OnDeleteType" +import { OnUpdateType } from "../metadata/types/OnUpdateType" export type ReturningType = "insert" | "update" | "delete" @@ -66,7 +68,17 @@ export interface Driver { /** * Returns type of upsert supported by driver if any */ - supportedUpsertType?: UpsertType + supportedUpsertTypes: UpsertType[] + + /** + * Returns list of supported onDelete types by driver + */ + supportedOnDeleteTypes?: OnDeleteType[] + + /** + * Returns list of supported onUpdate types by driver + */ + supportedOnUpdateTypes?: OnUpdateType[] /** * Default values of length, precision and scale depends on column data type. @@ -107,6 +119,11 @@ export interface Driver { cteCapabilities: CteCapabilities + /** + * Dummy table name + */ + dummyTableName?: string + /** * Performs connection to the database. * Depend on driver type it may create a connection pool. diff --git a/src/driver/DriverUtils.ts b/src/driver/DriverUtils.ts index 4c75d8c744..4600aeec73 100644 --- a/src/driver/DriverUtils.ts +++ b/src/driver/DriverUtils.ts @@ -41,7 +41,9 @@ export class DriverUtils { } static isPostgresFamily(driver: Driver): boolean { - return ["postgres", "aurora-postgres"].includes(driver.options.type) + return ["postgres", "aurora-postgres", "cockroachdb"].includes( + driver.options.type, + ) } /** @@ -122,27 +124,23 @@ export class DriverUtils { */ static buildAlias( { maxAliasLength }: Driver, - buildOptions: { shorten?: boolean; joiner?: string } | string, + buildOptions: { shorten?: boolean; joiner?: string } | undefined, ...alias: string[] ): string { - if (typeof buildOptions === "string") { - alias.unshift(buildOptions) - buildOptions = { shorten: false, joiner: "_" } - } else { - buildOptions = Object.assign( - { shorten: false, joiner: "_" }, - buildOptions, - ) - } - const newAlias = - alias.length === 1 ? alias[0] : alias.join(buildOptions.joiner) + alias.length === 1 + ? alias[0] + : alias.join( + buildOptions && buildOptions.joiner + ? buildOptions.joiner + : "_", + ) if ( maxAliasLength && maxAliasLength > 0 && newAlias.length > maxAliasLength ) { - if (buildOptions.shorten === true) { + if (buildOptions && buildOptions.shorten === true) { const shortenedAlias = shorten(newAlias) if (shortenedAlias.length < maxAliasLength) { return shortenedAlias @@ -163,6 +161,15 @@ export class DriverUtils { buildOptions: { shorten?: boolean; joiner?: string } | string, ...alias: string[] ) { + if (typeof buildOptions === "string") { + alias.unshift(buildOptions) + buildOptions = { shorten: false, joiner: "_" } + } else { + buildOptions = Object.assign( + { shorten: false, joiner: "_" }, + buildOptions, + ) + } return this.buildAlias( { maxAliasLength } as Driver, buildOptions, diff --git a/src/driver/aurora-mysql/AuroraMysqlDriver.ts b/src/driver/aurora-mysql/AuroraMysqlDriver.ts index b485ae6e11..28e7d31a3e 100644 --- a/src/driver/aurora-mysql/AuroraMysqlDriver.ts +++ b/src/driver/aurora-mysql/AuroraMysqlDriver.ts @@ -23,6 +23,7 @@ import { Table } from "../../schema-builder/table/Table" import { View } from "../../schema-builder/view/View" import { TableForeignKey } from "../../schema-builder/table/TableForeignKey" import { InstanceChecker } from "../../util/InstanceChecker" +import { UpsertType } from "../types/UpsertType" /** * Organizes communication with MySQL DBMS. @@ -152,7 +153,7 @@ export class AuroraMysqlDriver implements Driver { /** * Returns type of upsert supported by driver if any */ - readonly supportedUpsertType = "on-duplicate-key-update" + supportedUpsertTypes: UpsertType[] = ["on-duplicate-key-update"] /** * Gets list of spatial column data types. diff --git a/src/driver/better-sqlite3/BetterSqlite3ConnectionOptions.ts b/src/driver/better-sqlite3/BetterSqlite3ConnectionOptions.ts index 5399428669..d426c8c4f5 100644 --- a/src/driver/better-sqlite3/BetterSqlite3ConnectionOptions.ts +++ b/src/driver/better-sqlite3/BetterSqlite3ConnectionOptions.ts @@ -69,4 +69,11 @@ export interface BetterSqlite3ConnectionOptions extends BaseDataSourceOptions { readonly nativeBinding?: string readonly poolSize?: never + + /** + * Enables WAL mode. By default its disabled. + * + * @see https://www.sqlite.org/wal.html + */ + readonly enableWAL?: boolean } diff --git a/src/driver/better-sqlite3/BetterSqlite3Driver.ts b/src/driver/better-sqlite3/BetterSqlite3Driver.ts index 4dc71071f6..a5e9f04d12 100644 --- a/src/driver/better-sqlite3/BetterSqlite3Driver.ts +++ b/src/driver/better-sqlite3/BetterSqlite3Driver.ts @@ -1,7 +1,6 @@ import mkdirp from "mkdirp" import path from "path" import { DriverPackageNotInstalledError } from "../../error" -import { DriverOptionNotSetError } from "../../error" import { PlatformTools } from "../../platform/PlatformTools" import { DataSource } from "../../data-source" import { ColumnType } from "../types/ColumnTypes" @@ -41,10 +40,6 @@ export class BetterSqlite3Driver extends AbstractSqliteDriver { this.options = connection.options as BetterSqlite3ConnectionOptions this.database = this.options.database - // validate options to make sure everything is set - if (!this.options.database) - throw new DriverOptionNotSetError("database") - // load sqlite package this.loadDependencies() } @@ -168,7 +163,9 @@ export class BetterSqlite3Driver extends AbstractSqliteDriver { databaseConnection.exec(`PRAGMA foreign_keys = ON`) // turn on WAL mode to enhance performance - databaseConnection.exec(`PRAGMA journal_mode = WAL`) + if (this.options.enableWAL) { + databaseConnection.exec(`PRAGMA journal_mode = WAL`) + } return databaseConnection } diff --git a/src/driver/capacitor/CapacitorDriver.ts b/src/driver/capacitor/CapacitorDriver.ts index 66fb281f64..0a08012f3c 100644 --- a/src/driver/capacitor/CapacitorDriver.ts +++ b/src/driver/capacitor/CapacitorDriver.ts @@ -3,10 +3,7 @@ import { CapacitorConnectionOptions } from "./CapacitorConnectionOptions" import { CapacitorQueryRunner } from "./CapacitorQueryRunner" import { QueryRunner } from "../../query-runner/QueryRunner" import { DataSource } from "../../data-source/DataSource" -import { - DriverOptionNotSetError, - DriverPackageNotInstalledError, -} from "../../error" +import { DriverPackageNotInstalledError } from "../../error" import { ReplicationMode } from "../types/ReplicationMode" export class CapacitorDriver extends AbstractSqliteDriver { @@ -23,12 +20,6 @@ export class CapacitorDriver extends AbstractSqliteDriver { this.database = this.options.database this.driver = this.options.driver - // validate options to make sure everything is set - if (!this.options.database) - throw new DriverOptionNotSetError("database") - - if (!this.options.driver) throw new DriverOptionNotSetError("driver") - // load sqlite package this.sqlite = this.options.driver } diff --git a/src/driver/cockroachdb/CockroachConnectionOptions.ts b/src/driver/cockroachdb/CockroachConnectionOptions.ts index 16c67af943..4ec17d369f 100644 --- a/src/driver/cockroachdb/CockroachConnectionOptions.ts +++ b/src/driver/cockroachdb/CockroachConnectionOptions.ts @@ -12,6 +12,12 @@ export interface CockroachConnectionOptions */ readonly type: "cockroachdb" + /** + * Enable time travel queries on cockroachdb. + * https://www.cockroachlabs.com/docs/stable/as-of-system-time.html + */ + readonly timeTravelQueries: boolean + /** * Schema name. */ @@ -50,9 +56,14 @@ export interface CockroachConnectionOptions */ readonly applicationName?: string - /* + /** * Function handling errors thrown by drivers pool. * Defaults to logging error with `warn` level. */ readonly poolErrorHandler?: (err: any) => any + + /** + * Max number of transaction retries in case of 40001 error. + */ + readonly maxTransactionRetries?: number } diff --git a/src/driver/cockroachdb/CockroachDriver.ts b/src/driver/cockroachdb/CockroachDriver.ts index 81a8838458..e7312bff5c 100644 --- a/src/driver/cockroachdb/CockroachDriver.ts +++ b/src/driver/cockroachdb/CockroachDriver.ts @@ -1,32 +1,33 @@ -import { Driver } from "../Driver" -import { ConnectionIsNotSetError } from "../../error/ConnectionIsNotSetError" import { ObjectLiteral } from "../../common/ObjectLiteral" +import { DataSource } from "../../data-source/DataSource" +import { TypeORMError } from "../../error" +import { ConnectionIsNotSetError } from "../../error/ConnectionIsNotSetError" import { DriverPackageNotInstalledError } from "../../error/DriverPackageNotInstalledError" -import { DriverUtils } from "../DriverUtils" import { ColumnMetadata } from "../../metadata/ColumnMetadata" -import { CteCapabilities } from "../types/CteCapabilities" -import { CockroachConnectionCredentialsOptions } from "./CockroachConnectionCredentialsOptions" -import { CockroachConnectionOptions } from "./CockroachConnectionOptions" -import { DateUtils } from "../../util/DateUtils" +import { EntityMetadata } from "../../metadata/EntityMetadata" import { PlatformTools } from "../../platform/PlatformTools" -import { DataSource } from "../../data-source/DataSource" -import { RdbmsSchemaBuilder } from "../../schema-builder/RdbmsSchemaBuilder" -import { MappedColumnTypes } from "../types/MappedColumnTypes" -import { ColumnType } from "../types/ColumnTypes" import { QueryRunner } from "../../query-runner/QueryRunner" -import { DataTypeDefaults } from "../types/DataTypeDefaults" -import { TableColumn } from "../../schema-builder/table/TableColumn" -import { EntityMetadata } from "../../metadata/EntityMetadata" -import { OrmUtils } from "../../util/OrmUtils" -import { CockroachQueryRunner } from "./CockroachQueryRunner" -import { ApplyValueTransformers } from "../../util/ApplyValueTransformers" -import { ReplicationMode } from "../types/ReplicationMode" -import { TypeORMError } from "../../error" +import { RdbmsSchemaBuilder } from "../../schema-builder/RdbmsSchemaBuilder" import { Table } from "../../schema-builder/table/Table" -import { View } from "../../schema-builder/view/View" +import { TableColumn } from "../../schema-builder/table/TableColumn" import { TableForeignKey } from "../../schema-builder/table/TableForeignKey" -import { ObjectUtils } from "../../util/ObjectUtils" +import { View } from "../../schema-builder/view/View" +import { ApplyValueTransformers } from "../../util/ApplyValueTransformers" +import { DateUtils } from "../../util/DateUtils" import { InstanceChecker } from "../../util/InstanceChecker" +import { ObjectUtils } from "../../util/ObjectUtils" +import { OrmUtils } from "../../util/OrmUtils" +import { Driver } from "../Driver" +import { DriverUtils } from "../DriverUtils" +import { ColumnType } from "../types/ColumnTypes" +import { CteCapabilities } from "../types/CteCapabilities" +import { DataTypeDefaults } from "../types/DataTypeDefaults" +import { MappedColumnTypes } from "../types/MappedColumnTypes" +import { ReplicationMode } from "../types/ReplicationMode" +import { UpsertType } from "../types/UpsertType" +import { CockroachConnectionCredentialsOptions } from "./CockroachConnectionCredentialsOptions" +import { CockroachConnectionOptions } from "./CockroachConnectionOptions" +import { CockroachQueryRunner } from "./CockroachQueryRunner" /** * Organizes communication with Cockroach DBMS. @@ -119,6 +120,9 @@ export class CockroachDriver implements Driver { "bytea", "blob", "date", + "enum", + "geometry", + "geography", "numeric", "decimal", "dec", @@ -158,12 +162,15 @@ export class CockroachDriver implements Driver { /** * Returns type of upsert supported by driver if any */ - readonly supportedUpsertType = "on-conflict-do-update" + supportedUpsertTypes: UpsertType[] = [ + "on-conflict-do-update", + "primary-key", + ] /** * Gets list of spatial column data types. */ - spatialTypes: ColumnType[] = [] + spatialTypes: ColumnType[] = ["geometry", "geography"] /** * Gets list of column data types that support length by a driver. @@ -315,6 +322,18 @@ export class CockroachDriver implements Driver { * Makes any action after connection (e.g. create extensions in Postgres driver). */ async afterConnect(): Promise { + // enable time travel queries + if (this.options.timeTravelQueries) { + await this.connection.query( + `SET default_transaction_use_follower_reads = 'on';`, + ) + } + + // enable experimental alter column type support (we need it to alter enum types) + await this.connection.query( + "SET enable_experimental_alter_column_type_general = true", + ) + return Promise.resolve() } @@ -427,6 +446,43 @@ export class CockroachDriver implements Driver { value = DateUtils.stringToSimpleArray(value) } else if (columnMetadata.type === "simple-json") { value = DateUtils.stringToSimpleJson(value) + } else if ( + columnMetadata.type === "enum" || + columnMetadata.type === "simple-enum" + ) { + if (columnMetadata.isArray) { + if (value === "{}") return [] + if (Array.isArray(value)) return value + + // manually convert enum array to array of values (pg does not support, see https://github.com/brianc/node-pg-types/issues/56) + value = (value as string) + .substr(1, (value as string).length - 2) + .split(",") + .map((val) => { + // replace double quotes from the beginning and from the end + if (val.startsWith(`"`) && val.endsWith(`"`)) + val = val.slice(1, -1) + // replace double escaped backslash to single escaped e.g. \\\\ -> \\ + val = val.replace(/(\\\\)/g, "\\") + // replace escaped double quotes to non-escaped e.g. \"asd\" -> "asd" + return val.replace(/(\\")/g, '"') + }) + + // convert to number if that exists in possible enum options + value = value.map((val: string) => { + return !isNaN(+val) && + columnMetadata.enum!.indexOf(parseInt(val)) >= 0 + ? parseInt(val) + : val + }) + } else { + // convert to number if that exists in possible enum options + value = + !isNaN(+value) && + columnMetadata.enum!.indexOf(parseInt(value)) >= 0 + ? parseInt(value) + : value + } } if (columnMetadata.transformer) @@ -618,6 +674,8 @@ export class CockroachDriver implements Driver { return "float4" } else if (column.type === "character") { return "char" + } else if (column.type === "simple-enum") { + return "enum" } else if (column.type === "json") { return "jsonb" } else { @@ -630,11 +688,33 @@ export class CockroachDriver implements Driver { */ normalizeDefault(columnMetadata: ColumnMetadata): string | undefined { const defaultValue = columnMetadata.default - const arrayCast = columnMetadata.isArray - ? `::${columnMetadata.type}[]` - : "" - if (typeof defaultValue === "number") { + if ( + (columnMetadata.type === "enum" || + columnMetadata.type === "simple-enum") && + defaultValue !== undefined + ) { + if (defaultValue === null) return "NULL" + if (columnMetadata.isArray) { + const enumName = this.buildEnumName(columnMetadata) + let arrayValue = defaultValue + if (typeof defaultValue === "string") { + if (defaultValue === "{}") return `ARRAY[]::${enumName}[]` + arrayValue = defaultValue + .replace("{", "") + .replace("}", "") + .split(",") + } + if (Array.isArray(arrayValue)) { + const expr = `ARRAY[${arrayValue + .map((it) => `'${it}'`) + .join(",")}]` + return `${expr}::${enumName}[]` + } + } else { + return `'${defaultValue}'` + } + } else if (typeof defaultValue === "number") { return `(${defaultValue})` } @@ -653,6 +733,9 @@ export class CockroachDriver implements Driver { } if (typeof defaultValue === "string") { + const arrayCast = columnMetadata.isArray + ? `::${columnMetadata.type}[]` + : "" return `'${defaultValue}'${arrayCast}` } @@ -703,6 +786,14 @@ export class CockroachDriver implements Driver { column.precision !== undefined ) { type += "(" + column.precision + ")" + } else if (this.spatialTypes.indexOf(column.type as ColumnType) >= 0) { + if (column.spatialFeatureType != null && column.srid != null) { + type = `${column.type}(${column.spatialFeatureType},${column.srid})` + } else if (column.spatialFeatureType != null) { + type = `${column.type}(${column.spatialFeatureType})` + } else { + type = column.type + } } if (column.isArray) type += " array" @@ -802,6 +893,7 @@ export class CockroachDriver implements Driver { tableColumn.name !== columnMetadata.databaseName || tableColumn.type !== this.normalizeType(columnMetadata) || tableColumn.length !== columnMetadata.length || + tableColumn.isArray !== columnMetadata.isArray || tableColumn.precision !== columnMetadata.precision || (columnMetadata.scale !== undefined && tableColumn.scale !== columnMetadata.scale) || @@ -815,10 +907,20 @@ export class CockroachDriver implements Driver { tableColumn.isNullable !== columnMetadata.isNullable || tableColumn.isUnique !== this.normalizeIsUnique(columnMetadata) || + tableColumn.enumName !== columnMetadata.enumName || + (tableColumn.enum && + columnMetadata.enum && + !OrmUtils.isArraysEqual( + tableColumn.enum, + columnMetadata.enum.map((val) => val + ""), + )) || // enums in postgres are always strings tableColumn.isGenerated !== columnMetadata.isGenerated || tableColumn.generatedType !== columnMetadata.generatedType || (tableColumn.asExpression || "").trim() !== - (columnMetadata.asExpression || "").trim() + (columnMetadata.asExpression || "").trim() || + (tableColumn.spatialFeatureType || "").toLowerCase() !== + (columnMetadata.spatialFeatureType || "").toLowerCase() || + tableColumn.srid !== columnMetadata.srid ) }) } @@ -980,4 +1082,21 @@ export class CockroachDriver implements Driver { return comment } + + /** + * Builds ENUM type name from given table and column. + */ + protected buildEnumName(column: ColumnMetadata): string { + const { schema, tableName } = this.parseTableName(column.entityMetadata) + let enumName = column.enumName + ? column.enumName + : `${tableName}_${column.databaseName.toLowerCase()}_enum` + if (schema) enumName = `${schema}.${enumName}` + return enumName + .split(".") + .map((i) => { + return `"${i}"` + }) + .join(".") + } } diff --git a/src/driver/cockroachdb/CockroachQueryRunner.ts b/src/driver/cockroachdb/CockroachQueryRunner.ts index 4a9e461927..28ad89f176 100644 --- a/src/driver/cockroachdb/CockroachQueryRunner.ts +++ b/src/driver/cockroachdb/CockroachQueryRunner.ts @@ -25,6 +25,7 @@ import { ReplicationMode } from "../types/ReplicationMode" import { TypeORMError } from "../../error" import { MetadataTableType } from "../types/MetadataTableType" import { InstanceChecker } from "../../util/InstanceChecker" +import { VersionUtils } from "../../util/VersionUtils" /** * Runs queries on a single postgres database connection. @@ -66,6 +67,11 @@ export class CockroachQueryRunner */ protected storeQueries: boolean = false + /** + * Current number of transaction retries in case of 40001 error. + */ + protected transactionRetries: number = 0 + // ------------------------------------------------------------------------- // Constructor // ------------------------------------------------------------------------- @@ -122,6 +128,10 @@ export class CockroachQueryRunner * You cannot use query runner methods once its released. */ release(): Promise { + if (this.isReleased) { + return Promise.resolve() + } + this.isReleased = true if (this.releaseCallback) this.releaseCallback() @@ -136,6 +146,7 @@ export class CockroachQueryRunner */ async startTransaction(isolationLevel?: IsolationLevel): Promise { this.isTransactionActive = true + this.transactionRetries = 0 try { await this.broadcaster.broadcast("BeforeTransactionStart") } catch (err) { @@ -177,21 +188,12 @@ export class CockroachQueryRunner this.transactionDepth -= 1 } else { this.storeQueries = false - try { - await this.query("RELEASE SAVEPOINT cockroach_restart") - await this.query("COMMIT") - this.queries = [] - this.isTransactionActive = false - this.transactionDepth -= 1 - } catch (e) { - if (e.code === "40001") { - await this.query("ROLLBACK TO SAVEPOINT cockroach_restart") - for (const q of this.queries) { - await this.query(q.query, q.parameters) - } - await this.commitTransaction() - } - } + await this.query("RELEASE SAVEPOINT cockroach_restart") + await this.query("COMMIT") + this.queries = [] + this.isTransactionActive = false + this.transactionRetries = 0 + this.transactionDepth -= 1 } await this.broadcaster.broadcast("AfterTransactionCommit") @@ -215,6 +217,7 @@ export class CockroachQueryRunner await this.query("ROLLBACK") this.queries = [] this.isTransactionActive = false + this.transactionRetries = 0 } this.transactionDepth -= 1 @@ -290,16 +293,45 @@ export class CockroachQueryRunner return result.raw } } catch (err) { - if (err.code !== "40001") { + if ( + err.code === "40001" && + this.isTransactionActive && + this.transactionRetries < + (this.driver.options.maxTransactionRetries || 5) + ) { + this.transactionRetries += 1 + this.storeQueries = false + await this.query("ROLLBACK TO SAVEPOINT cockroach_restart") + const sleepTime = + 2 ** this.transactionRetries * + 0.1 * + (Math.random() + 0.5) * + 1000 + await new Promise((resolve) => setTimeout(resolve, sleepTime)) + + let result = undefined + for (const q of this.queries) { + this.driver.connection.logger.logQuery( + `Retrying transaction for query "${q.query}"`, + q.parameters, + this, + ) + result = await this.query(q.query, q.parameters) + } + this.transactionRetries = 0 + this.storeQueries = true + + return result + } else { this.driver.connection.logger.logQueryError( err, query, parameters, this, ) - } - throw new QueryFailedError(query, parameters, err) + throw new QueryFailedError(query, parameters, err) + } } } @@ -496,6 +528,24 @@ export class CockroachQueryRunner const upQueries: Query[] = [] const downQueries: Query[] = [] + // if table have column with ENUM type, we must create this type in postgres. + const enumColumns = table.columns.filter( + (column) => column.type === "enum" || column.type === "simple-enum", + ) + const createdEnumTypes: string[] = [] + for (const column of enumColumns) { + // TODO: Should also check if values of existing type matches expected ones + const hasEnum = await this.hasEnumType(table, column) + const enumName = this.buildEnumName(table, column) + + // if enum with the same "enumName" is defined more then once, me must prevent double creation + if (!hasEnum && createdEnumTypes.indexOf(enumName) === -1) { + createdEnumTypes.push(enumName) + upQueries.push(this.createEnumTypeSql(table, column, enumName)) + downQueries.push(this.dropEnumTypeSql(table, column, enumName)) + } + } + table.columns .filter( (column) => @@ -900,6 +950,39 @@ export class CockroachQueryRunner foreignKey.name = newForeignKeyName }) + // rename ENUM types + const enumColumns = newTable.columns.filter( + (column) => column.type === "enum" || column.type === "simple-enum", + ) + for (let column of enumColumns) { + // skip renaming for user-defined enum name + if (column.enumName) continue + + const oldEnumType = await this.getUserDefinedTypeName( + oldTable, + column, + ) + upQueries.push( + new Query( + `ALTER TYPE "${oldEnumType.schema}"."${ + oldEnumType.name + }" RENAME TO ${this.buildEnumName( + newTable, + column, + false, + )}`, + ), + ) + downQueries.push( + new Query( + `ALTER TYPE ${this.buildEnumName( + newTable, + column, + )} RENAME TO "${oldEnumType.name}"`, + ), + ) + } + await this.executeQueries(upQueries, downQueries) } @@ -923,6 +1006,14 @@ export class CockroachQueryRunner ) } + if (column.type === "enum" || column.type === "simple-enum") { + const hasEnum = await this.hasEnumType(table, column) + if (!hasEnum) { + upQueries.push(this.createEnumTypeSql(table, column)) + downQueries.push(this.dropEnumTypeSql(table, column)) + } + } + upQueries.push( new Query( `ALTER TABLE ${this.escapePath( @@ -1143,6 +1234,7 @@ export class CockroachQueryRunner let clonedTable = table.clone() const upQueries: Query[] = [] const downQueries: Query[] = [] + let defaultValueChanged = false const oldColumn = InstanceChecker.isTableColumn(oldTableColumnOrName) ? oldTableColumnOrName @@ -1157,6 +1249,7 @@ export class CockroachQueryRunner if ( oldColumn.type !== newColumn.type || oldColumn.length !== newColumn.length || + newColumn.isArray !== oldColumn.isArray || oldColumn.generatedType !== newColumn.generatedType || oldColumn.asExpression !== newColumn.asExpression ) { @@ -1184,6 +1277,36 @@ export class CockroachQueryRunner ), ) + // rename ENUM type + if ( + oldColumn.type === "enum" || + oldColumn.type === "simple-enum" + ) { + const oldEnumType = await this.getUserDefinedTypeName( + table, + oldColumn, + ) + upQueries.push( + new Query( + `ALTER TYPE "${oldEnumType.schema}"."${ + oldEnumType.name + }" RENAME TO ${this.buildEnumName( + table, + newColumn, + false, + )}`, + ), + ) + downQueries.push( + new Query( + `ALTER TYPE ${this.buildEnumName( + table, + newColumn, + )} RENAME TO "${oldEnumType.name}"`, + ), + ) + } + // rename column primary key constraint if ( oldColumn.isPrimary === true && @@ -1603,6 +1726,158 @@ export class CockroachQueryRunner } } + if ( + (newColumn.type === "enum" || + newColumn.type === "simple-enum") && + (oldColumn.type === "enum" || + oldColumn.type === "simple-enum") && + (!OrmUtils.isArraysEqual(newColumn.enum!, oldColumn.enum!) || + newColumn.enumName !== oldColumn.enumName) + ) { + const arraySuffix = newColumn.isArray ? "[]" : "" + + // "public"."new_enum" + const newEnumName = this.buildEnumName(table, newColumn) + + // "public"."old_enum" + const oldEnumName = this.buildEnumName(table, oldColumn) + + // "old_enum" + const oldEnumNameWithoutSchema = this.buildEnumName( + table, + oldColumn, + false, + ) + + //"public"."old_enum_old" + const oldEnumNameWithSchema_old = this.buildEnumName( + table, + oldColumn, + true, + false, + true, + ) + + //"old_enum_old" + const oldEnumNameWithoutSchema_old = this.buildEnumName( + table, + oldColumn, + false, + false, + true, + ) + + // rename old ENUM + upQueries.push( + new Query( + `ALTER TYPE ${oldEnumName} RENAME TO ${oldEnumNameWithoutSchema_old}`, + ), + ) + downQueries.push( + new Query( + `ALTER TYPE ${oldEnumNameWithSchema_old} RENAME TO ${oldEnumNameWithoutSchema}`, + ), + ) + + // create new ENUM + upQueries.push( + this.createEnumTypeSql(table, newColumn, newEnumName), + ) + downQueries.push( + this.dropEnumTypeSql(table, newColumn, newEnumName), + ) + + // if column have default value, we must drop it to avoid issues with type casting + if ( + oldColumn.default !== null && + oldColumn.default !== undefined + ) { + // mark default as changed to prevent double update + defaultValueChanged = true + upQueries.push( + new Query( + `ALTER TABLE ${this.escapePath( + table, + )} ALTER COLUMN "${oldColumn.name}" DROP DEFAULT`, + ), + ) + downQueries.push( + new Query( + `ALTER TABLE ${this.escapePath( + table, + )} ALTER COLUMN "${oldColumn.name}" SET DEFAULT ${ + oldColumn.default + }`, + ), + ) + } + + // build column types + const upType = `${newEnumName}${arraySuffix} USING "${newColumn.name}"::"text"::${newEnumName}${arraySuffix}` + const downType = `${oldEnumNameWithSchema_old}${arraySuffix} USING "${newColumn.name}"::"text"::${oldEnumNameWithSchema_old}${arraySuffix}` + + upQueries.push( + new Query( + `ALTER TABLE ${this.escapePath(table)} ALTER COLUMN "${ + newColumn.name + }" TYPE ${upType}`, + ), + ) + + // we add a delay here since for some reason cockroachdb fails with + // "cannot drop type because other objects still depend on it" error + // if we are trying to drop type right after we altered it. + upQueries.push(new Query(`SELECT pg_sleep(0.1)`)) + downQueries.push(new Query(`SELECT pg_sleep(0.1)`)) + + downQueries.push( + new Query( + `ALTER TABLE ${this.escapePath(table)} ALTER COLUMN "${ + newColumn.name + }" TYPE ${downType}`, + ), + ) + + // restore column default or create new one + if ( + newColumn.default !== null && + newColumn.default !== undefined + ) { + upQueries.push( + new Query( + `ALTER TABLE ${this.escapePath( + table, + )} ALTER COLUMN "${newColumn.name}" SET DEFAULT ${ + newColumn.default + }`, + ), + ) + downQueries.push( + new Query( + `ALTER TABLE ${this.escapePath( + table, + )} ALTER COLUMN "${newColumn.name}" DROP DEFAULT`, + ), + ) + } + + // remove old ENUM + upQueries.push( + this.dropEnumTypeSql( + table, + oldColumn, + oldEnumNameWithSchema_old, + ), + ) + downQueries.push( + this.createEnumTypeSql( + table, + oldColumn, + oldEnumNameWithSchema_old, + ), + ) + } + if ( oldColumn.isGenerated !== newColumn.isGenerated && newColumn.generationStrategy !== "uuid" @@ -1652,7 +1927,10 @@ export class CockroachQueryRunner } } - if (newColumn.default !== oldColumn.default) { + if ( + newColumn.default !== oldColumn.default && + !defaultValueChanged + ) { if ( newColumn.default !== null && newColumn.default !== undefined @@ -1715,6 +1993,27 @@ export class CockroachQueryRunner } } + if ( + (newColumn.spatialFeatureType || "").toLowerCase() !== + (oldColumn.spatialFeatureType || "").toLowerCase() || + newColumn.srid !== oldColumn.srid + ) { + upQueries.push( + new Query( + `ALTER TABLE ${this.escapePath(table)} ALTER COLUMN "${ + newColumn.name + }" TYPE ${this.driver.createFullType(newColumn)}`, + ), + ) + downQueries.push( + new Query( + `ALTER TABLE ${this.escapePath(table)} ALTER COLUMN "${ + newColumn.name + }" TYPE ${this.driver.createFullType(oldColumn)}`, + ), + ) + } + await this.executeQueries(upQueries, downQueries) this.replaceCachedTable(table, clonedTable) } @@ -1922,6 +2221,24 @@ export class CockroachQueryRunner downQueries.push(insertQuery) } + // drop enum type + if (column.type === "enum" || column.type === "simple-enum") { + const hasEnum = await this.hasEnumType(table, column) + if (hasEnum) { + const enumType = await this.getUserDefinedTypeName( + table, + column, + ) + const escapedEnumName = `"${enumType.schema}"."${enumType.name}"` + upQueries.push( + this.dropEnumTypeSql(table, column, escapedEnumName), + ) + downQueries.push( + this.createEnumTypeSql(table, column, escapedEnumName), + ) + } + } + await this.executeQueries(upQueries, downQueries) clonedTable.removeColumn(column) @@ -2457,6 +2774,7 @@ export class CockroachQueryRunner const isAnotherTransactionActive = this.isTransactionActive if (!isAnotherTransactionActive) await this.startTransaction() try { + const version = await this.getVersion() const selectViewDropsQuery = `SELECT 'DROP VIEW IF EXISTS "' || schemaname || '"."' || viewname || '" CASCADE;' as "query" ` + `FROM "pg_views" WHERE "schemaname" IN (${schemaNamesString})` @@ -2481,6 +2799,11 @@ export class CockroachQueryRunner sequenceDropQueries.map((q) => this.query(q["query"])), ) + // drop enum types. Supported starting from v20.2.19. + if (VersionUtils.isGreaterOrEqual(version, "20.2.19")) { + await this.dropEnumTypes(schemaNamesString) + } + if (!isAnotherTransactionActive) await this.commitTransaction() } catch (error) { try { @@ -2559,7 +2882,6 @@ export class CockroachQueryRunner if (!tableNames) { const tablesSql = `SELECT "table_schema", "table_name" FROM "information_schema"."tables"` - dbTables.push(...(await this.query(tablesSql))) } else { const tablesCondition = tableNames @@ -2646,16 +2968,30 @@ export class CockroachQueryRunner `INNER JOIN "pg_class" "cl" ON "cl"."oid" = "con"."confrelid" ` + `INNER JOIN "pg_namespace" "ns" ON "cl"."relnamespace" = "ns"."oid" ` + `INNER JOIN "pg_attribute" "att2" ON "att2"."attrelid" = "con"."conrelid" AND "att2"."attnum" = "con"."parent"` + + const tableSchemas = dbTables + .map((dbTable) => `'${dbTable.table_schema}'`) + .join(", ") + const enumsSql = + `SELECT "t"."typname" AS "name", string_agg("e"."enumlabel", '|') AS "value" ` + + `FROM "pg_enum" "e" ` + + `INNER JOIN "pg_type" "t" ON "t"."oid" = "e"."enumtypid" ` + + `INNER JOIN "pg_namespace" "n" ON "n"."oid" = "t"."typnamespace" ` + + `WHERE "n"."nspname" IN (${tableSchemas}) ` + + `GROUP BY "t"."typname"` + const [ dbColumns, dbConstraints, dbIndices, dbForeignKeys, + dbEnums, ]: ObjectLiteral[][] = await Promise.all([ this.query(columnsSql), this.query(constraintsSql), this.query(indicesSql), this.query(foreignKeysSql), + this.query(enumsSql), ]) // create tables for loaded tables @@ -2785,17 +3121,50 @@ export class CockroachQueryRunner } } + // docs: https://www.postgresql.org/docs/current/xtypes.html + // When you define a new base type, PostgreSQL automatically provides support for arrays of that type. + // The array type typically has the same name as the base type with the underscore character (_) prepended. + // ---- + // so, we must remove this underscore character from enum type name + let udtName = dbColumn["udt_name"] + if (udtName.indexOf("_") === 0) { + udtName = udtName.substr(1, udtName.length) + } + + const enumType = dbEnums.find((dbEnum) => { + return dbEnum["name"] === udtName + }) + if (enumType) { + // check if `enumName` is specified by user + const builtEnumName = this.buildEnumName( + table, + tableColumn, + false, + true, + ) + const enumName = + builtEnumName !== enumType["name"] + ? enumType["name"] + : undefined + + tableColumn.type = "enum" + tableColumn.enum = enumType["value"].split("|") + tableColumn.enumName = enumName + } + if ( dbColumn["data_type"].toLowerCase() === "array" ) { tableColumn.isArray = true - const type = dbColumn["crdb_sql_type"] - .replace("[]", "") - .toLowerCase() - tableColumn.type = - this.connection.driver.normalizeType({ - type: type, - }) + if (!enumType) { + const type = dbColumn["crdb_sql_type"] + .replace("[]", "") + .toLowerCase() + tableColumn.type = + this.connection.driver.normalizeType({ + type: type, + }) + } } // check only columns that have length property @@ -2920,6 +3289,14 @@ export class CockroachQueryRunner /^(-?[\d\.]+)$/, "($1)", ) + + if (enumType) { + tableColumn.default = + tableColumn.default.replace( + `.${enumType["name"]}`, + "", + ) + } } } @@ -2959,6 +3336,32 @@ export class CockroachQueryRunner tableColumn.charset = dbColumn["character_set_name"] + if ( + tableColumn.type === "geometry" || + tableColumn.type === "geography" + ) { + const sql = + `SELECT * FROM (` + + `SELECT "f_table_schema" "table_schema", "f_table_name" "table_name", ` + + `"f_${tableColumn.type}_column" "column_name", "srid", "type" ` + + `FROM "${tableColumn.type}_columns"` + + `) AS _ ` + + `WHERE "column_name" = '${dbColumn["column_name"]}' AND ` + + `"table_schema" = '${dbColumn["table_schema"]}' AND ` + + `"table_name" = '${dbColumn["table_name"]}'` + + const results: ObjectLiteral[] = + await this.query(sql) + + if (results.length > 0) { + tableColumn.spatialFeatureType = + results[0].type + tableColumn.srid = results[0].srid + ? parseInt(results[0].srid) + : undefined + } + } + return tableColumn }), ) @@ -3269,6 +3672,17 @@ export class CockroachQueryRunner return new Query(sql) } + /** + * Loads Cockroachdb version. + */ + protected async getVersion(): Promise { + const result = await this.query(`SELECT version()`) + return result[0]["version"].replace( + /^CockroachDB CCL v([\d\.]+) .*$/, + "$1", + ) + } + /** * Builds drop table sql. */ @@ -3337,6 +3751,68 @@ export class CockroachQueryRunner }) } + /** + * Drops ENUM type from given schemas. + */ + protected async dropEnumTypes(schemaNames: string): Promise { + const selectDropsQuery = + `SELECT 'DROP TYPE IF EXISTS "' || n.nspname || '"."' || t.typname || '";' as "query" FROM "pg_type" "t" ` + + `INNER JOIN "pg_enum" "e" ON "e"."enumtypid" = "t"."oid" ` + + `INNER JOIN "pg_namespace" "n" ON "n"."oid" = "t"."typnamespace" ` + + `WHERE "n"."nspname" IN (${schemaNames}) GROUP BY "n"."nspname", "t"."typname"` + const dropQueries: ObjectLiteral[] = await this.query(selectDropsQuery) + await Promise.all(dropQueries.map((q) => this.query(q["query"]))) + } + + /** + * Checks if enum with the given name exist in the database. + */ + protected async hasEnumType( + table: Table, + column: TableColumn, + ): Promise { + let { schema } = this.driver.parseTableName(table) + + if (!schema) { + schema = await this.getCurrentSchema() + } + + const enumName = this.buildEnumName(table, column, false, true) + const sql = + `SELECT "n"."nspname", "t"."typname" FROM "pg_type" "t" ` + + `INNER JOIN "pg_namespace" "n" ON "n"."oid" = "t"."typnamespace" ` + + `WHERE "n"."nspname" = '${schema}' AND "t"."typname" = '${enumName}'` + const result = await this.query(sql) + return result.length ? true : false + } + + /** + * Builds create ENUM type sql. + */ + protected createEnumTypeSql( + table: Table, + column: TableColumn, + enumName?: string, + ): Query { + if (!enumName) enumName = this.buildEnumName(table, column) + const enumValues = column + .enum!.map((value) => `'${value.replace("'", "''")}'`) + .join(", ") + return new Query(`CREATE TYPE ${enumName} AS ENUM(${enumValues})`) + } + + /** + * Builds create ENUM type sql. + */ + protected dropEnumTypeSql( + table: Table, + column: TableColumn, + enumName?: string, + ): Query { + if (!enumName) enumName = this.buildEnumName(table, column) + return new Query(`DROP TYPE ${enumName}`) + } + /** * Builds create index sql. * UNIQUE indices creates as UNIQUE constraints. @@ -3346,9 +3822,11 @@ export class CockroachQueryRunner .map((columnName) => `"${columnName}"`) .join(", ") return new Query( - `CREATE INDEX "${index.name}" ON ${this.escapePath( - table, - )} (${columns}) ${index.where ? "WHERE " + index.where : ""}`, + `CREATE ${index.isUnique ? "UNIQUE " : ""}INDEX "${ + index.name + }" ON ${this.escapePath(table)} ${ + index.isSpatial ? "USING GiST " : "" + }(${columns}) ${index.where ? "WHERE " + index.where : ""}`, ) } @@ -3546,6 +4024,57 @@ export class CockroachQueryRunner : this.buildSequenceName(table, columnOrName) } + /** + * Builds ENUM type name from given table and column. + */ + protected buildEnumName( + table: Table, + column: TableColumn, + withSchema: boolean = true, + disableEscape?: boolean, + toOld?: boolean, + ): string { + const { schema, tableName } = this.driver.parseTableName(table) + let enumName = column.enumName + ? column.enumName + : `${tableName}_${column.name.toLowerCase()}_enum` + if (schema && withSchema) enumName = `${schema}.${enumName}` + if (toOld) enumName = enumName + "_old" + return enumName + .split(".") + .map((i) => { + return disableEscape ? i : `"${i}"` + }) + .join(".") + } + + protected async getUserDefinedTypeName(table: Table, column: TableColumn) { + let { schema, tableName: name } = this.driver.parseTableName(table) + + if (!schema) { + schema = await this.getCurrentSchema() + } + + const result = await this.query( + `SELECT "udt_schema", "udt_name" ` + + `FROM "information_schema"."columns" WHERE "table_schema" = '${schema}' AND "table_name" = '${name}' AND "column_name"='${column.name}'`, + ) + + // docs: https://www.postgresql.org/docs/current/xtypes.html + // When you define a new base type, PostgreSQL automatically provides support for arrays of that type. + // The array type typically has the same name as the base type with the underscore character (_) prepended. + // ---- + // so, we must remove this underscore character from enum type name + let udtName = result[0]["udt_name"] + if (udtName.indexOf("_") === 0) { + udtName = udtName.substr(1, udtName.length) + } + return { + schema: result[0]["udt_schema"], + name: udtName, + } + } + /** * Escapes a given comment so it's safe to include in a query. */ @@ -3590,8 +4119,12 @@ export class CockroachQueryRunner } } - if (!column.isGenerated) + if (column.type === "enum" || column.type === "simple-enum") { + c += " " + this.buildEnumName(table, column) + if (column.isArray) c += " array" + } else if (!column.isGenerated) { c += " " + this.connection.driver.createFullType(column) + } if (column.asExpression) { c += ` AS (${column.asExpression}) ${ diff --git a/src/driver/cordova/CordovaDriver.ts b/src/driver/cordova/CordovaDriver.ts index 32d12854b9..50eee92f6b 100644 --- a/src/driver/cordova/CordovaDriver.ts +++ b/src/driver/cordova/CordovaDriver.ts @@ -3,7 +3,6 @@ import { CordovaConnectionOptions } from "./CordovaConnectionOptions" import { CordovaQueryRunner } from "./CordovaQueryRunner" import { QueryRunner } from "../../query-runner/QueryRunner" import { DataSource } from "../../data-source/DataSource" -import { DriverOptionNotSetError } from "../../error/DriverOptionNotSetError" import { DriverPackageNotInstalledError } from "../../error/DriverPackageNotInstalledError" import { ReplicationMode } from "../types/ReplicationMode" @@ -17,6 +16,8 @@ declare let window: Window export class CordovaDriver extends AbstractSqliteDriver { options: CordovaConnectionOptions + transactionSupport = "none" as const + // ------------------------------------------------------------------------- // Constructor // ------------------------------------------------------------------------- @@ -28,13 +29,6 @@ export class CordovaDriver extends AbstractSqliteDriver { // this.options = connection.options as CordovaConnectionOptions; this.database = this.options.database - // validate options to make sure everything is set - if (!this.options.database) - throw new DriverOptionNotSetError("database") - - if (!this.options.location) - throw new DriverOptionNotSetError("location") - // load sqlite package this.loadDependencies() } diff --git a/src/driver/expo/ExpoDriver.ts b/src/driver/expo/ExpoDriver.ts index 5a83192c27..d9106d30ef 100644 --- a/src/driver/expo/ExpoDriver.ts +++ b/src/driver/expo/ExpoDriver.ts @@ -3,7 +3,6 @@ import { ExpoConnectionOptions } from "./ExpoConnectionOptions" import { ExpoQueryRunner } from "./ExpoQueryRunner" import { QueryRunner } from "../../query-runner/QueryRunner" import { DataSource } from "../../data-source/DataSource" -import { DriverOptionNotSetError } from "../../error/DriverOptionNotSetError" import { ReplicationMode } from "../types/ReplicationMode" export class ExpoDriver extends AbstractSqliteDriver { @@ -18,12 +17,6 @@ export class ExpoDriver extends AbstractSqliteDriver { this.database = this.options.database - // validate options to make sure everything is set - if (!this.options.database) - throw new DriverOptionNotSetError("database") - - if (!this.options.driver) throw new DriverOptionNotSetError("driver") - // load sqlite package this.sqlite = this.options.driver } diff --git a/src/driver/mongodb/MongoConnectionOptions.ts b/src/driver/mongodb/MongoConnectionOptions.ts index 383ccc062f..88199dd05c 100644 --- a/src/driver/mongodb/MongoConnectionOptions.ts +++ b/src/driver/mongodb/MongoConnectionOptions.ts @@ -46,6 +46,11 @@ export interface MongoConnectionOptions extends BaseDataSourceOptions { */ readonly database?: string + /** + * Specifies whether to force dispatch all operations to the specified host. Default: false + */ + readonly directConnection?: boolean + /** * The driver object * This defaults to require("mongodb") diff --git a/src/driver/mongodb/MongoDriver.ts b/src/driver/mongodb/MongoDriver.ts index 23dedc9408..23c7507a2b 100644 --- a/src/driver/mongodb/MongoDriver.ts +++ b/src/driver/mongodb/MongoDriver.ts @@ -24,6 +24,7 @@ import { Table } from "../../schema-builder/table/Table" import { View } from "../../schema-builder/view/View" import { TableForeignKey } from "../../schema-builder/table/TableForeignKey" import { InstanceChecker } from "../../util/InstanceChecker" +import { UpsertType } from "../types/UpsertType" /** * Organizes communication with MongoDB. @@ -78,6 +79,11 @@ export class MongoDriver implements Driver { */ supportedDataTypes: ColumnType[] = [] + /** + * Returns type of upsert supported by driver if any + */ + supportedUpsertTypes: UpsertType[] + /** * Gets list of spatial column data types. */ @@ -211,6 +217,7 @@ export class MongoDriver implements Driver { "useUnifiedTopology", "autoEncryption", "retryWrites", + "directConnection", ] cteCapabilities: CteCapabilities = { @@ -242,26 +249,17 @@ export class MongoDriver implements Driver { /** * Performs connection to the database. */ - connect(): Promise { - return new Promise((ok, fail) => { - const options = DriverUtils.buildMongoDBDriverOptions(this.options) - - this.mongodb.MongoClient.connect( - this.buildConnectionUrl(options), - this.buildConnectionOptions(options), - (err: any, client: any) => { - if (err) return fail(err) - - this.queryRunner = new MongoQueryRunner( - this.connection, - client, - ) - ObjectUtils.assign(this.queryRunner, { - manager: this.connection.manager, - }) - ok() - }, - ) + async connect(): Promise { + const options = DriverUtils.buildMongoDBDriverOptions(this.options) + + const client = await this.mongodb.MongoClient.connect( + this.buildConnectionUrl(options), + this.buildConnectionOptions(options), + ) + + this.queryRunner = new MongoQueryRunner(this.connection, client) + ObjectUtils.assign(this.queryRunner, { + manager: this.connection.manager, }) } @@ -273,14 +271,11 @@ export class MongoDriver implements Driver { * Closes connection with the database. */ async disconnect(): Promise { - return new Promise((ok, fail) => { - if (!this.queryRunner) - return fail(new ConnectionIsNotSetError("mongodb")) - - const handler = (err: any) => (err ? fail(err) : ok()) - this.queryRunner.databaseConnection.close(handler) - this.queryRunner = undefined - }) + if (!this.queryRunner) throw new ConnectionIsNotSetError("mongodb") + // const handler = (err: any) => (err ? fail(err) : ok()) + this.queryRunner.databaseConnection.close() + this.queryRunner = undefined + // return ok() } /** @@ -533,7 +528,9 @@ export class MongoDriver implements Driver { const schemaUrlPart = options.type.toLowerCase() const credentialsUrlPart = options.username && options.password - ? `${options.username}:${options.password}@` + ? `${encodeURIComponent(options.username)}:${encodeURIComponent( + options.password, + )}@` : "" const portUrlPart = diff --git a/src/driver/mongodb/MongoQueryRunner.ts b/src/driver/mongodb/MongoQueryRunner.ts index 1a826d200f..3839cdcc60 100644 --- a/src/driver/mongodb/MongoQueryRunner.ts +++ b/src/driver/mongodb/MongoQueryRunner.ts @@ -1,44 +1,10 @@ import { QueryRunner } from "../../query-runner/QueryRunner" -import { ObjectLiteral } from "../../common/ObjectLiteral" import { TableColumn } from "../../schema-builder/table/TableColumn" import { Table } from "../../schema-builder/table/Table" import { TableForeignKey } from "../../schema-builder/table/TableForeignKey" import { TableIndex } from "../../schema-builder/table/TableIndex" import { View } from "../../schema-builder/view/View" -import { - AggregationCursor, - BulkWriteOpResultObject, - ChangeStream, - ChangeStreamOptions, - Code, - Collection, - CollectionAggregationOptions, - CollectionBulkWriteOptions, - CollectionInsertManyOptions, - CollectionInsertOneOptions, - CollectionOptions, - CollStats, - CommandCursor, - Cursor, - DeleteWriteOpResultObject, - FindAndModifyWriteOpResultObject, - FindOneAndReplaceOption, - GeoHaystackSearchOptions, - GeoNearOptions, - InsertOneWriteOpResult, - InsertWriteOpResult, - MapReduceOptions, - MongoClient, - MongoCountPreferences, - MongodbIndexOptions, - OrderedBulkOperation, - ParallelCollectionScanOptions, - ReadPreference, - ReplaceOneOptions, - UnorderedBulkOperation, - UpdateWriteOpResult, -} from "./typings" -import { DataSource } from "../../data-source/DataSource" +// import {Connection} from "../../connection/Connection"; import { ReadStream } from "../../platform/PlatformTools" import { MongoEntityManager } from "../../entity-manager/MongoEntityManager" import { SqlInMemory } from "../SqlInMemory" @@ -47,6 +13,49 @@ import { Broadcaster } from "../../subscriber/Broadcaster" import { TableCheck } from "../../schema-builder/table/TableCheck" import { TableExclusion } from "../../schema-builder/table/TableExclusion" import { TypeORMError } from "../../error" + +import { + BulkWriteResult, + AggregationCursor, + MongoClient, + Collection, + FindCursor, + Document, + AggregateOptions, + AnyBulkWriteOperation, + BulkWriteOptions, + Filter, + CountOptions, + CountDocumentsOptions, + IndexSpecification, + CreateIndexesOptions, + IndexDescription, + DeleteResult, + DeleteOptions, + CommandOperationOptions, + FindOneAndDeleteOptions, + FindOneAndReplaceOptions, + UpdateFilter, + FindOneAndUpdateOptions, + RenameOptions, + ReplaceOptions, + UpdateResult, + CollStats, + CollStatsOptions, + ChangeStreamOptions, + ChangeStream, + UpdateOptions, + ListIndexesOptions, + ListIndexesCursor, + OptionalId, + InsertOneOptions, + InsertOneResult, + InsertManyResult, + UnorderedBulkOperation, + OrderedBulkOperation, + IndexInformationOptions, +} from "../../driver/mongodb/typings" +import { DataSource } from "../../data-source/DataSource" import { ReplicationMode } from "../types/ReplicationMode" /** @@ -137,8 +146,8 @@ export class MongoQueryRunner implements QueryRunner { /** * Creates a cursor for a query that can be used to iterate over results from MongoDB. */ - cursor(collectionName: string, query?: ObjectLiteral): Cursor { - return this.getCollection(collectionName).find(query || {}) + cursor(collectionName: string, filter: Filter): FindCursor { + return this.getCollection(collectionName).find(filter || {}) } /** @@ -146,10 +155,13 @@ export class MongoQueryRunner implements QueryRunner { */ aggregate( collectionName: string, - pipeline: ObjectLiteral[], - options?: CollectionAggregationOptions, + pipeline: Document[], + options?: AggregateOptions, ): AggregationCursor { - return this.getCollection(collectionName).aggregate(pipeline, options) + return this.getCollection(collectionName).aggregate( + pipeline, + options || {}, + ) } /** @@ -157,12 +169,12 @@ export class MongoQueryRunner implements QueryRunner { */ async bulkWrite( collectionName: string, - operations: ObjectLiteral[], - options?: CollectionBulkWriteOptions, - ): Promise { + operations: AnyBulkWriteOperation[], + options?: BulkWriteOptions, + ): Promise { return await this.getCollection(collectionName).bulkWrite( operations, - options, + options || {}, ) } @@ -171,12 +183,26 @@ export class MongoQueryRunner implements QueryRunner { */ async count( collectionName: string, - query?: ObjectLiteral, - options?: MongoCountPreferences, + filter: Filter, + options?: CountOptions, + ): Promise { + return this.getCollection(collectionName).count( + filter || {}, + options || {}, + ) + } + + /** + * Count number of matching documents in the db to a query. + */ + async countDocuments( + collectionName: string, + filter: Filter, + options?: CountDocumentsOptions, ): Promise { - return await this.getCollection(collectionName).countDocuments( - query || {}, - options, + return this.getCollection(collectionName).countDocuments( + filter || {}, + options || {}, ) } @@ -185,12 +211,12 @@ export class MongoQueryRunner implements QueryRunner { */ async createCollectionIndex( collectionName: string, - fieldOrSpec: string | any, - options?: MongodbIndexOptions, + indexSpec: IndexSpecification, + options?: CreateIndexesOptions, ): Promise { - return await this.getCollection(collectionName).createIndex( - fieldOrSpec, - options, + return this.getCollection(collectionName).createIndex( + indexSpec, + options || {}, ) } @@ -200,11 +226,9 @@ export class MongoQueryRunner implements QueryRunner { */ async createCollectionIndexes( collectionName: string, - indexSpecs: ObjectLiteral[], - ): Promise { - return await this.getCollection(collectionName).createIndexes( - indexSpecs, - ) + indexSpecs: IndexDescription[], + ): Promise { + return this.getCollection(collectionName).createIndexes(indexSpecs) } /** @@ -212,12 +236,12 @@ export class MongoQueryRunner implements QueryRunner { */ async deleteMany( collectionName: string, - query: ObjectLiteral, - options?: CollectionOptions, - ): Promise { - return await this.getCollection(collectionName).deleteMany( - query, - options, + filter: Filter, + options: DeleteOptions, + ): Promise { + return this.getCollection(collectionName).deleteMany( + filter, + options || {}, ) } @@ -226,12 +250,12 @@ export class MongoQueryRunner implements QueryRunner { */ async deleteOne( collectionName: string, - query: ObjectLiteral, - options?: CollectionOptions, - ): Promise { - return await this.getCollection(collectionName).deleteOne( - query, - options, + filter: Filter, + options?: DeleteOptions, + ): Promise { + return this.getCollection(collectionName).deleteOne( + filter, + options || {}, ) } @@ -240,14 +264,14 @@ export class MongoQueryRunner implements QueryRunner { */ async distinct( collectionName: string, - key: string, - query: ObjectLiteral, - options?: { readPreference?: ReadPreference | string }, + key: any, + filter: Filter, + options?: CommandOperationOptions, ): Promise { - return await this.getCollection(collectionName).distinct( + return this.getCollection(collectionName).distinct( key, - query, - options, + filter, + options || {}, ) } @@ -257,19 +281,19 @@ export class MongoQueryRunner implements QueryRunner { async dropCollectionIndex( collectionName: string, indexName: string, - options?: CollectionOptions, - ): Promise { - return await this.getCollection(collectionName).dropIndex( + options?: CommandOperationOptions, + ): Promise { + return this.getCollection(collectionName).dropIndex( indexName, - options, + options || {}, ) } /** * Drops all indexes from the collection. */ - async dropCollectionIndexes(collectionName: string): Promise { - return await this.getCollection(collectionName).dropIndexes() + async dropCollectionIndexes(collectionName: string): Promise { + return this.getCollection(collectionName).dropIndexes() } /** @@ -277,12 +301,12 @@ export class MongoQueryRunner implements QueryRunner { */ async findOneAndDelete( collectionName: string, - query: ObjectLiteral, - options?: { projection?: Object; sort?: Object; maxTimeMS?: number }, - ): Promise { - return await this.getCollection(collectionName).findOneAndDelete( - query, - options, + filter: Filter, + options?: FindOneAndDeleteOptions, + ): Promise { + return this.getCollection(collectionName).findOneAndDelete( + filter, + options || {}, ) } @@ -291,14 +315,14 @@ export class MongoQueryRunner implements QueryRunner { */ async findOneAndReplace( collectionName: string, - query: ObjectLiteral, - replacement: Object, - options?: FindOneAndReplaceOption, - ): Promise { - return await this.getCollection(collectionName).findOneAndReplace( - query, + filter: Filter, + replacement: Document, + options?: FindOneAndReplaceOptions, + ): Promise { + return this.getCollection(collectionName).findOneAndReplace( + filter, replacement, - options, + options || {}, ) } @@ -307,74 +331,22 @@ export class MongoQueryRunner implements QueryRunner { */ async findOneAndUpdate( collectionName: string, - query: ObjectLiteral, - update: Object, - options?: FindOneAndReplaceOption, - ): Promise { - return await this.getCollection(collectionName).findOneAndUpdate( - query, + filter: Filter, + update: UpdateFilter, + options?: FindOneAndUpdateOptions, + ): Promise { + return this.getCollection(collectionName).findOneAndUpdate( + filter, update, - options, - ) - } - - /** - * Execute a geo search using a geo haystack index on a collection. - */ - async geoHaystackSearch( - collectionName: string, - x: number, - y: number, - options?: GeoHaystackSearchOptions, - ): Promise { - return await this.getCollection(collectionName).geoHaystackSearch( - x, - y, - options, - ) - } - - /** - * Execute the geoNear command to search for items in the collection. - */ - async geoNear( - collectionName: string, - x: number, - y: number, - options?: GeoNearOptions, - ): Promise { - return await this.getCollection(collectionName).geoNear(x, y, options) - } - - /** - * Run a group command across a collection. - */ - async group( - collectionName: string, - keys: Object | Array | Function | Code, - condition: Object, - initial: Object, - reduce: Function | Code, - finalize: Function | Code, - command: boolean, - options?: { readPreference?: ReadPreference | string }, - ): Promise { - return await this.getCollection(collectionName).group( - keys, - condition, - initial, - reduce, - finalize, - command, - options, + options || {}, ) } /** * Retrieve all the indexes on the collection. */ - async collectionIndexes(collectionName: string): Promise { - return await this.getCollection(collectionName).indexes() + async collectionIndexes(collectionName: string): Promise { + return this.getCollection(collectionName).indexes() } /** @@ -384,7 +356,7 @@ export class MongoQueryRunner implements QueryRunner { collectionName: string, indexes: string | string[], ): Promise { - return await this.getCollection(collectionName).indexExists(indexes) + return this.getCollection(collectionName).indexExists(indexes) } /** @@ -392,10 +364,10 @@ export class MongoQueryRunner implements QueryRunner { */ async collectionIndexInformation( collectionName: string, - options?: { full: boolean }, + options?: IndexInformationOptions, ): Promise { - return await this.getCollection(collectionName).indexInformation( - options, + return this.getCollection(collectionName).indexInformation( + options || {}, ) } @@ -404,7 +376,7 @@ export class MongoQueryRunner implements QueryRunner { */ initializeOrderedBulkOp( collectionName: string, - options?: CollectionOptions, + options?: BulkWriteOptions, ): OrderedBulkOperation { return this.getCollection(collectionName).initializeOrderedBulkOp( options, @@ -416,7 +388,7 @@ export class MongoQueryRunner implements QueryRunner { */ initializeUnorderedBulkOp( collectionName: string, - options?: CollectionOptions, + options?: BulkWriteOptions, ): UnorderedBulkOperation { return this.getCollection(collectionName).initializeUnorderedBulkOp( options, @@ -428,12 +400,12 @@ export class MongoQueryRunner implements QueryRunner { */ async insertMany( collectionName: string, - docs: ObjectLiteral[], - options?: CollectionInsertManyOptions, - ): Promise { - return await this.getCollection(collectionName).insertMany( + docs: OptionalId[], + options?: BulkWriteOptions, + ): Promise { + return this.getCollection(collectionName).insertMany( docs, - options, + options || {}, ) } @@ -442,17 +414,17 @@ export class MongoQueryRunner implements QueryRunner { */ async insertOne( collectionName: string, - doc: ObjectLiteral, - options?: CollectionInsertOneOptions, - ): Promise { - return await this.getCollection(collectionName).insertOne(doc, options) + doc: OptionalId, + options?: InsertOneOptions, + ): Promise { + return this.getCollection(collectionName).insertOne(doc, options || {}) } /** * Returns if the collection is a capped collection. */ - async isCapped(collectionName: string): Promise { - return await this.getCollection(collectionName).isCapped() + async isCapped(collectionName: string): Promise { + return this.getCollection(collectionName).isCapped() } /** @@ -460,59 +432,20 @@ export class MongoQueryRunner implements QueryRunner { */ listCollectionIndexes( collectionName: string, - options?: { - batchSize?: number - readPreference?: ReadPreference | string - }, - ): CommandCursor { + options?: ListIndexesOptions, + ): ListIndexesCursor { return this.getCollection(collectionName).listIndexes(options) } - /** - * Run Map Reduce across a collection. Be aware that the inline option for out will return an array of results not a collection. - */ - async mapReduce( - collectionName: string, - map: Function | string, - reduce: Function | string, - options?: MapReduceOptions, - ): Promise { - return await this.getCollection(collectionName).mapReduce( - map, - reduce, - options, - ) - } - - /** - * Return N number of parallel cursors for a collection allowing parallel reading of entire collection. - * There are no ordering guarantees for returned results. - */ - async parallelCollectionScan( - collectionName: string, - options?: ParallelCollectionScanOptions, - ): Promise[]> { - return await this.getCollection(collectionName).parallelCollectionScan( - options, - ) - } - - /** - * Reindex all indexes on the collection Warning: reIndex is a blocking operation (indexes are rebuilt in the foreground) and will be slow for large collections. - */ - async reIndex(collectionName: string): Promise { - return await this.getCollection(collectionName).reIndex() - } - /** * Reindex all indexes on the collection Warning: reIndex is a blocking operation (indexes are rebuilt in the foreground) and will be slow for large collections. */ async rename( collectionName: string, newName: string, - options?: { dropTarget?: boolean }, - ): Promise> { - return await this.getCollection(collectionName).rename(newName, options) + options?: RenameOptions, + ): Promise> { + return this.getCollection(collectionName).rename(newName, options || {}) } /** @@ -520,14 +453,14 @@ export class MongoQueryRunner implements QueryRunner { */ async replaceOne( collectionName: string, - query: ObjectLiteral, - doc: ObjectLiteral, - options?: ReplaceOneOptions, - ): Promise { - return await this.getCollection(collectionName).replaceOne( - query, - doc, - options, + filter: Filter, + replacement: Document, + options?: ReplaceOptions, + ): Promise { + return this.getCollection(collectionName).replaceOne( + filter, + replacement, + options || {}, ) } @@ -536,9 +469,9 @@ export class MongoQueryRunner implements QueryRunner { */ async stats( collectionName: string, - options?: { scale: number }, + options?: CollStatsOptions, ): Promise { - return await this.getCollection(collectionName).stats(options) + return this.getCollection(collectionName).stats(options || {}) } /** @@ -546,7 +479,7 @@ export class MongoQueryRunner implements QueryRunner { */ watch( collectionName: string, - pipeline?: Object[], + pipeline?: Document[], options?: ChangeStreamOptions, ): ChangeStream { return this.getCollection(collectionName).watch(pipeline, options) @@ -557,14 +490,14 @@ export class MongoQueryRunner implements QueryRunner { */ async updateMany( collectionName: string, - query: ObjectLiteral, - update: ObjectLiteral, - options?: { upsert?: boolean; w?: any; wtimeout?: number; j?: boolean }, - ): Promise { - return await this.getCollection(collectionName).updateMany( - query, + filter: Filter, + update: UpdateFilter, + options?: UpdateOptions, + ): Promise { + return this.getCollection(collectionName).updateMany( + filter, update, - options, + options || {}, ) } @@ -573,14 +506,14 @@ export class MongoQueryRunner implements QueryRunner { */ async updateOne( collectionName: string, - query: ObjectLiteral, - update: ObjectLiteral, - options?: ReplaceOneOptions, - ): Promise { + filter: Filter, + update: UpdateFilter, + options?: UpdateOptions, + ): Promise { return await this.getCollection(collectionName).updateOne( - query, + filter, update, - options, + options || {}, ) } diff --git a/src/driver/mongodb/bson.typings.ts b/src/driver/mongodb/bson.typings.ts new file mode 100644 index 0000000000..51602ae95a --- /dev/null +++ b/src/driver/mongodb/bson.typings.ts @@ -0,0 +1,1291 @@ +/** + * A class representation of the BSON Binary type. + * @public + * @category BSONType + */ +export declare class Binary extends BSONValue { + get _bsontype(): "Binary" + /* Excluded from this release type: BSON_BINARY_SUBTYPE_DEFAULT */ + /** Initial buffer default size */ + static readonly BUFFER_SIZE = 256 + /** Default BSON type */ + static readonly SUBTYPE_DEFAULT = 0 + /** Function BSON type */ + static readonly SUBTYPE_FUNCTION = 1 + /** Byte Array BSON type */ + static readonly SUBTYPE_BYTE_ARRAY = 2 + /** Deprecated UUID BSON type @deprecated Please use SUBTYPE_UUID */ + static readonly SUBTYPE_UUID_OLD = 3 + /** UUID BSON type */ + static readonly SUBTYPE_UUID = 4 + /** MD5 BSON type */ + static readonly SUBTYPE_MD5 = 5 + /** Encrypted BSON type */ + static readonly SUBTYPE_ENCRYPTED = 6 + /** Column BSON type */ + static readonly SUBTYPE_COLUMN = 7 + /** User BSON type */ + static readonly SUBTYPE_USER_DEFINED = 128 + buffer: Uint8Array + sub_type: number + position: number + /** + * Create a new Binary instance. + * + * This constructor can accept a string as its first argument. In this case, + * this string will be encoded using ISO-8859-1, **not** using UTF-8. + * This is almost certainly not what you want. Use `new Binary(Buffer.from(string))` + * instead to convert the string to a Buffer using UTF-8 first. + * + * @param buffer - a buffer object containing the binary data. + * @param subType - the option binary type. + */ + constructor(buffer?: string | BinarySequence, subType?: number) + /** + * Updates this binary with byte_value. + * + * @param byteValue - a single byte we wish to write. + */ + put(byteValue: string | number | Uint8Array | number[]): void + /** + * Writes a buffer or string to the binary. + * + * @param sequence - a string or buffer to be written to the Binary BSON object. + * @param offset - specify the binary of where to write the content. + */ + write(sequence: string | BinarySequence, offset: number): void + /** + * Reads **length** bytes starting at **position**. + * + * @param position - read from the given position in the Binary. + * @param length - the number of bytes to read. + */ + read(position: number, length: number): BinarySequence + /** + * Returns the value of this binary as a string. + * @param asRaw - Will skip converting to a string + * @remarks + * This is handy when calling this function conditionally for some key value pairs and not others + */ + value(asRaw?: boolean): string | BinarySequence + /** the length of the binary sequence */ + length(): number + toJSON(): string + toString(encoding?: "hex" | "base64" | "utf8" | "utf-8"): string + /* Excluded from this release type: toExtendedJSON */ + toUUID(): UUID + /** Creates an Binary instance from a hex digit string */ + static createFromHexString(hex: string, subType?: number): Binary + /** Creates an Binary instance from a base64 string */ + static createFromBase64(base64: string, subType?: number): Binary + /* Excluded from this release type: fromExtendedJSON */ + inspect(): string +} + +/** @public */ +export declare interface BinaryExtended { + $binary: { + subType: string + base64: string + } +} + +/** @public */ +export declare interface BinaryExtendedLegacy { + $type: string + $binary: string +} + +/** @public */ +export declare type BinarySequence = Uint8Array | number[] + +declare namespace BSON { + export { + setInternalBufferSize, + serialize, + serializeWithBufferAndIndex, + deserialize, + calculateObjectSize, + deserializeStream, + UUIDExtended, + BinaryExtended, + BinaryExtendedLegacy, + BinarySequence, + CodeExtended, + DBRefLike, + Decimal128Extended, + DoubleExtended, + EJSONOptions, + Int32Extended, + LongExtended, + MaxKeyExtended, + MinKeyExtended, + ObjectIdExtended, + ObjectIdLike, + BSONRegExpExtended, + BSONRegExpExtendedLegacy, + BSONSymbolExtended, + LongWithoutOverrides, + TimestampExtended, + TimestampOverrides, + LongWithoutOverridesClass, + SerializeOptions, + DeserializeOptions, + Code, + BSONSymbol, + DBRef, + Binary, + ObjectId, + UUID, + Long, + Timestamp, + Double, + Int32, + MinKey, + MaxKey, + BSONRegExp, + Decimal128, + BSONValue, + BSONError, + BSONVersionError, + BSONRuntimeError, + BSONType, + EJSON, + Document, + CalculateObjectSizeOptions, + } +} +export { BSON } + +/** + * @public + * @category Error + * + * `BSONError` objects are thrown when BSON ecounters an error. + * + * This is the parent class for all the other errors thrown by this library. + */ +export declare class BSONError extends Error { + /* Excluded from this release type: bsonError */ + get name(): string + constructor(message: string) + /** + * @public + * + * All errors thrown from the BSON library inherit from `BSONError`. + * This method can assist with determining if an error originates from the BSON library + * even if it does not pass an `instanceof` check against this class' constructor. + * + * @param value - any javascript value that needs type checking + */ + static isBSONError(value: unknown): value is BSONError +} + +/** + * A class representation of the BSON RegExp type. + * @public + * @category BSONType + */ +export declare class BSONRegExp extends BSONValue { + get _bsontype(): "BSONRegExp" + pattern: string + options: string + /** + * @param pattern - The regular expression pattern to match + * @param options - The regular expression options + */ + constructor(pattern: string, options?: string) + static parseOptions(options?: string): string + /* Excluded from this release type: toExtendedJSON */ + /* Excluded from this release type: fromExtendedJSON */ + inspect(): string +} + +/** @public */ +export declare interface BSONRegExpExtended { + $regularExpression: { + pattern: string + options: string + } +} + +/** @public */ +export declare interface BSONRegExpExtendedLegacy { + $regex: string | BSONRegExp + $options: string +} + +/** + * @public + * @category Error + * + * An error generated when BSON functions encounter an unexpected input + * or reaches an unexpected/invalid internal state + * + */ +export declare class BSONRuntimeError extends BSONError { + get name(): "BSONRuntimeError" + constructor(message: string) +} + +/** + * A class representation of the BSON Symbol type. + * @public + * @category BSONType + */ +export declare class BSONSymbol extends BSONValue { + get _bsontype(): "BSONSymbol" + value: string + /** + * @param value - the string representing the symbol. + */ + constructor(value: string) + /** Access the wrapped string value. */ + valueOf(): string + toString(): string + inspect(): string + toJSON(): string + /* Excluded from this release type: toExtendedJSON */ + /* Excluded from this release type: fromExtendedJSON */ +} + +/** @public */ +export declare interface BSONSymbolExtended { + $symbol: string +} + +/** @public */ +export declare const BSONType: Readonly<{ + readonly double: 1 + readonly string: 2 + readonly object: 3 + readonly array: 4 + readonly binData: 5 + readonly undefined: 6 + readonly objectId: 7 + readonly bool: 8 + readonly date: 9 + readonly null: 10 + readonly regex: 11 + readonly dbPointer: 12 + readonly javascript: 13 + readonly symbol: 14 + readonly javascriptWithScope: 15 + readonly int: 16 + readonly timestamp: 17 + readonly long: 18 + readonly decimal: 19 + readonly minKey: -1 + readonly maxKey: 127 +}> + +/** @public */ +export declare type BSONType = (typeof BSONType)[keyof typeof BSONType] + +/** @public */ +export declare abstract class BSONValue { + /** @public */ + abstract get _bsontype(): string + /** @public */ + abstract inspect(): string + /* Excluded from this release type: toExtendedJSON */ +} + +/** + * @public + * @category Error + */ +export declare class BSONVersionError extends BSONError { + get name(): "BSONVersionError" + constructor() +} + +/** + * Calculate the bson size for a passed in Javascript object. + * + * @param object - the Javascript object to calculate the BSON byte size for + * @returns size of BSON object in bytes + * @public + */ +export declare function calculateObjectSize( + object: Document, + options?: CalculateObjectSizeOptions, +): number + +/** @public */ +export declare type CalculateObjectSizeOptions = Pick< + SerializeOptions, + "serializeFunctions" | "ignoreUndefined" +> + +/** + * A class representation of the BSON Code type. + * @public + * @category BSONType + */ +export declare class Code extends BSONValue { + get _bsontype(): "Code" + code: string + scope: Document | null + /** + * @param code - a string or function. + * @param scope - an optional scope for the function. + */ + constructor(code: string | Function, scope?: Document | null) + toJSON(): { + code: string + scope?: Document + } + /* Excluded from this release type: toExtendedJSON */ + /* Excluded from this release type: fromExtendedJSON */ + inspect(): string +} + +/** @public */ +export declare interface CodeExtended { + $code: string + $scope?: Document +} + +/** + * A class representation of the BSON DBRef type. + * @public + * @category BSONType + */ +export declare class DBRef extends BSONValue { + get _bsontype(): "DBRef" + collection: string + oid: ObjectId + db?: string + fields: Document + /** + * @param collection - the collection name. + * @param oid - the reference ObjectId. + * @param db - optional db name, if omitted the reference is local to the current db. + */ + constructor( + collection: string, + oid: ObjectId, + db?: string, + fields?: Document, + ) + /* Excluded from this release type: namespace */ + /* Excluded from this release type: namespace */ + toJSON(): DBRefLike & Document + /* Excluded from this release type: toExtendedJSON */ + /* Excluded from this release type: fromExtendedJSON */ + inspect(): string +} + +/** @public */ +export declare interface DBRefLike { + $ref: string + $id: ObjectId + $db?: string +} + +/** + * A class representation of the BSON Decimal128 type. + * @public + * @category BSONType + */ +export declare class Decimal128 extends BSONValue { + get _bsontype(): "Decimal128" + readonly bytes: Uint8Array + /** + * @param bytes - a buffer containing the raw Decimal128 bytes in little endian order, + * or a string representation as returned by .toString() + */ + constructor(bytes: Uint8Array | string) + /** + * Create a Decimal128 instance from a string representation + * + * @param representation - a numeric string representation. + */ + static fromString(representation: string): Decimal128 + /** Create a string representation of the raw Decimal128 value */ + toString(): string + toJSON(): Decimal128Extended + /* Excluded from this release type: toExtendedJSON */ + /* Excluded from this release type: fromExtendedJSON */ + inspect(): string +} + +/** @public */ +export declare interface Decimal128Extended { + $numberDecimal: string +} + +/** + * Deserialize data as BSON. + * + * @param buffer - the buffer containing the serialized set of BSON documents. + * @returns returns the deserialized Javascript Object. + * @public + */ +export declare function deserialize( + buffer: Uint8Array, + options?: DeserializeOptions, +): Document + +/** @public */ +export declare interface DeserializeOptions { + /** when deserializing a Long will return as a BigInt. */ + useBigInt64?: boolean + /** when deserializing a Long will fit it into a Number if it's smaller than 53 bits. */ + promoteLongs?: boolean + /** when deserializing a Binary will return it as a node.js Buffer instance. */ + promoteBuffers?: boolean + /** when deserializing will promote BSON values to their Node.js closest equivalent types. */ + promoteValues?: boolean + /** allow to specify if there what fields we wish to return as unserialized raw buffer. */ + fieldsAsRaw?: Document + /** return BSON regular expressions as BSONRegExp instances. */ + bsonRegExp?: boolean + /** allows the buffer to be larger than the parsed BSON object. */ + allowObjectSmallerThanBufferSize?: boolean + /** Offset into buffer to begin reading document from */ + index?: number + raw?: boolean + /** Allows for opt-out utf-8 validation for all keys or + * specified keys. Must be all true or all false. + * + * @example + * ```js + * // disables validation on all keys + * validation: { utf8: false } + * + * // enables validation only on specified keys a, b, and c + * validation: { utf8: { a: true, b: true, c: true } } + * + * // disables validation only on specified keys a, b + * validation: { utf8: { a: false, b: false } } + * ``` + */ + validation?: { + utf8: boolean | Record | Record + } +} + +/** + * Deserialize stream data as BSON documents. + * + * @param data - the buffer containing the serialized set of BSON documents. + * @param startIndex - the start index in the data Buffer where the deserialization is to start. + * @param numberOfDocuments - number of documents to deserialize. + * @param documents - an array where to store the deserialized documents. + * @param docStartIndex - the index in the documents array from where to start inserting documents. + * @param options - additional options used for the deserialization. + * @returns next index in the buffer after deserialization **x** numbers of documents. + * @public + */ +export declare function deserializeStream( + data: Uint8Array | ArrayBuffer, + startIndex: number, + numberOfDocuments: number, + documents: Document[], + docStartIndex: number, + options: DeserializeOptions, +): number + +/** @public */ +export declare interface Document { + [key: string]: any +} + +/** + * A class representation of the BSON Double type. + * @public + * @category BSONType + */ +export declare class Double extends BSONValue { + get _bsontype(): "Double" + value: number + /** + * Create a Double type + * + * @param value - the number we want to represent as a double. + */ + constructor(value: number) + /** + * Access the number value. + * + * @returns returns the wrapped double number. + */ + valueOf(): number + toJSON(): number + toString(radix?: number): string + /* Excluded from this release type: toExtendedJSON */ + /* Excluded from this release type: fromExtendedJSON */ + inspect(): string +} + +/** @public */ +export declare interface DoubleExtended { + $numberDouble: string +} + +/** @public */ +export declare const EJSON: { + parse: typeof parse + stringify: typeof stringify + serialize: typeof EJSONserialize + deserialize: typeof EJSONdeserialize +} + +/** + * Deserializes an Extended JSON object into a plain JavaScript object with native/BSON types + * + * @param ejson - The Extended JSON object to deserialize + * @param options - Optional settings passed to the parse method + */ +declare function EJSONdeserialize(ejson: Document, options?: EJSONOptions): any + +/** @public */ +export declare type EJSONOptions = { + /** Output using the Extended JSON v1 spec */ + legacy?: boolean + /** Enable Extended JSON's `relaxed` mode, which attempts to return native JS types where possible, rather than BSON types */ + relaxed?: boolean + /** Enable native bigint support */ + useBigInt64?: boolean +} + +/** + * Serializes an object to an Extended JSON string, and reparse it as a JavaScript object. + * + * @param value - The object to serialize + * @param options - Optional settings passed to the `stringify` function + */ +declare function EJSONserialize(value: any, options?: EJSONOptions): Document + +/** + * A class representation of a BSON Int32 type. + * @public + * @category BSONType + */ +export declare class Int32 extends BSONValue { + get _bsontype(): "Int32" + value: number + /** + * Create an Int32 type + * + * @param value - the number we want to represent as an int32. + */ + constructor(value: number | string) + /** + * Access the number value. + * + * @returns returns the wrapped int32 number. + */ + valueOf(): number + toString(radix?: number): string + toJSON(): number + /* Excluded from this release type: toExtendedJSON */ + /* Excluded from this release type: fromExtendedJSON */ + inspect(): string +} + +/** @public */ +export declare interface Int32Extended { + $numberInt: string +} + +declare const kId: unique symbol + +/** + * A class representing a 64-bit integer + * @public + * @category BSONType + * @remarks + * The internal representation of a long is the two given signed, 32-bit values. + * We use 32-bit pieces because these are the size of integers on which + * Javascript performs bit-operations. For operations like addition and + * multiplication, we split each number into 16 bit pieces, which can easily be + * multiplied within Javascript's floating-point representation without overflow + * or change in sign. + * In the algorithms below, we frequently reduce the negative case to the + * positive case by negating the input(s) and then post-processing the result. + * Note that we must ALWAYS check specially whether those values are MIN_VALUE + * (-2^63) because -MIN_VALUE == MIN_VALUE (since 2^63 cannot be represented as + * a positive number, it overflows back into a negative). Not handling this + * case would often result in infinite recursion. + * Common constant values ZERO, ONE, NEG_ONE, etc. are found as static properties on this class. + */ +export declare class Long extends BSONValue { + get _bsontype(): "Long" + /** An indicator used to reliably determine if an object is a Long or not. */ + get __isLong__(): boolean + /** + * The high 32 bits as a signed value. + */ + high: number + /** + * The low 32 bits as a signed value. + */ + low: number + /** + * Whether unsigned or not. + */ + unsigned: boolean + /** + * Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as *signed* integers. + * See the from* functions below for more convenient ways of constructing Longs. + * + * Acceptable signatures are: + * - Long(low, high, unsigned?) + * - Long(bigint, unsigned?) + * - Long(string, unsigned?) + * + * @param low - The low (signed) 32 bits of the long + * @param high - The high (signed) 32 bits of the long + * @param unsigned - Whether unsigned or not, defaults to signed + */ + constructor( + low?: number | bigint | string, + high?: number | boolean, + unsigned?: boolean, + ) + static TWO_PWR_24: Long + /** Maximum unsigned value. */ + static MAX_UNSIGNED_VALUE: Long + /** Signed zero */ + static ZERO: Long + /** Unsigned zero. */ + static UZERO: Long + /** Signed one. */ + static ONE: Long + /** Unsigned one. */ + static UONE: Long + /** Signed negative one. */ + static NEG_ONE: Long + /** Maximum signed value. */ + static MAX_VALUE: Long + /** Minimum signed value. */ + static MIN_VALUE: Long + /** + * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. + * Each is assumed to use 32 bits. + * @param lowBits - The low 32 bits + * @param highBits - The high 32 bits + * @param unsigned - Whether unsigned or not, defaults to signed + * @returns The corresponding Long value + */ + static fromBits(lowBits: number, highBits: number, unsigned?: boolean): Long + /** + * Returns a Long representing the given 32 bit integer value. + * @param value - The 32 bit integer in question + * @param unsigned - Whether unsigned or not, defaults to signed + * @returns The corresponding Long value + */ + static fromInt(value: number, unsigned?: boolean): Long + /** + * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned. + * @param value - The number in question + * @param unsigned - Whether unsigned or not, defaults to signed + * @returns The corresponding Long value + */ + static fromNumber(value: number, unsigned?: boolean): Long + /** + * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned. + * @param value - The number in question + * @param unsigned - Whether unsigned or not, defaults to signed + * @returns The corresponding Long value + */ + static fromBigInt(value: bigint, unsigned?: boolean): Long + /** + * Returns a Long representation of the given string, written using the specified radix. + * @param str - The textual representation of the Long + * @param unsigned - Whether unsigned or not, defaults to signed + * @param radix - The radix in which the text is written (2-36), defaults to 10 + * @returns The corresponding Long value + */ + static fromString(str: string, unsigned?: boolean, radix?: number): Long + /** + * Creates a Long from its byte representation. + * @param bytes - Byte representation + * @param unsigned - Whether unsigned or not, defaults to signed + * @param le - Whether little or big endian, defaults to big endian + * @returns The corresponding Long value + */ + static fromBytes(bytes: number[], unsigned?: boolean, le?: boolean): Long + /** + * Creates a Long from its little endian byte representation. + * @param bytes - Little endian byte representation + * @param unsigned - Whether unsigned or not, defaults to signed + * @returns The corresponding Long value + */ + static fromBytesLE(bytes: number[], unsigned?: boolean): Long + /** + * Creates a Long from its big endian byte representation. + * @param bytes - Big endian byte representation + * @param unsigned - Whether unsigned or not, defaults to signed + * @returns The corresponding Long value + */ + static fromBytesBE(bytes: number[], unsigned?: boolean): Long + /** + * Tests if the specified object is a Long. + */ + static isLong(value: unknown): value is Long + /** + * Converts the specified value to a Long. + * @param unsigned - Whether unsigned or not, defaults to signed + */ + static fromValue( + val: + | number + | string + | { + low: number + high: number + unsigned?: boolean + }, + unsigned?: boolean, + ): Long + /** Returns the sum of this and the specified Long. */ + add(addend: string | number | Long | Timestamp): Long + /** + * Returns the sum of this and the specified Long. + * @returns Sum + */ + and(other: string | number | Long | Timestamp): Long + /** + * Compares this Long's value with the specified's. + * @returns 0 if they are the same, 1 if the this is greater and -1 if the given one is greater + */ + compare(other: string | number | Long | Timestamp): 0 | 1 | -1 + /** This is an alias of {@link Long.compare} */ + comp(other: string | number | Long | Timestamp): 0 | 1 | -1 + /** + * Returns this Long divided by the specified. The result is signed if this Long is signed or unsigned if this Long is unsigned. + * @returns Quotient + */ + divide(divisor: string | number | Long | Timestamp): Long + /**This is an alias of {@link Long.divide} */ + div(divisor: string | number | Long | Timestamp): Long + /** + * Tests if this Long's value equals the specified's. + * @param other - Other value + */ + equals(other: string | number | Long | Timestamp): boolean + /** This is an alias of {@link Long.equals} */ + eq(other: string | number | Long | Timestamp): boolean + /** Gets the high 32 bits as a signed integer. */ + getHighBits(): number + /** Gets the high 32 bits as an unsigned integer. */ + getHighBitsUnsigned(): number + /** Gets the low 32 bits as a signed integer. */ + getLowBits(): number + /** Gets the low 32 bits as an unsigned integer. */ + getLowBitsUnsigned(): number + /** Gets the number of bits needed to represent the absolute value of this Long. */ + getNumBitsAbs(): number + /** Tests if this Long's value is greater than the specified's. */ + greaterThan(other: string | number | Long | Timestamp): boolean + /** This is an alias of {@link Long.greaterThan} */ + gt(other: string | number | Long | Timestamp): boolean + /** Tests if this Long's value is greater than or equal the specified's. */ + greaterThanOrEqual(other: string | number | Long | Timestamp): boolean + /** This is an alias of {@link Long.greaterThanOrEqual} */ + gte(other: string | number | Long | Timestamp): boolean + /** This is an alias of {@link Long.greaterThanOrEqual} */ + ge(other: string | number | Long | Timestamp): boolean + /** Tests if this Long's value is even. */ + isEven(): boolean + /** Tests if this Long's value is negative. */ + isNegative(): boolean + /** Tests if this Long's value is odd. */ + isOdd(): boolean + /** Tests if this Long's value is positive. */ + isPositive(): boolean + /** Tests if this Long's value equals zero. */ + isZero(): boolean + /** Tests if this Long's value is less than the specified's. */ + lessThan(other: string | number | Long | Timestamp): boolean + /** This is an alias of {@link Long#lessThan}. */ + lt(other: string | number | Long | Timestamp): boolean + /** Tests if this Long's value is less than or equal the specified's. */ + lessThanOrEqual(other: string | number | Long | Timestamp): boolean + /** This is an alias of {@link Long.lessThanOrEqual} */ + lte(other: string | number | Long | Timestamp): boolean + /** Returns this Long modulo the specified. */ + modulo(divisor: string | number | Long | Timestamp): Long + /** This is an alias of {@link Long.modulo} */ + mod(divisor: string | number | Long | Timestamp): Long + /** This is an alias of {@link Long.modulo} */ + rem(divisor: string | number | Long | Timestamp): Long + /** + * Returns the product of this and the specified Long. + * @param multiplier - Multiplier + * @returns Product + */ + multiply(multiplier: string | number | Long | Timestamp): Long + /** This is an alias of {@link Long.multiply} */ + mul(multiplier: string | number | Long | Timestamp): Long + /** Returns the Negation of this Long's value. */ + negate(): Long + /** This is an alias of {@link Long.negate} */ + neg(): Long + /** Returns the bitwise NOT of this Long. */ + not(): Long + /** Tests if this Long's value differs from the specified's. */ + notEquals(other: string | number | Long | Timestamp): boolean + /** This is an alias of {@link Long.notEquals} */ + neq(other: string | number | Long | Timestamp): boolean + /** This is an alias of {@link Long.notEquals} */ + ne(other: string | number | Long | Timestamp): boolean + /** + * Returns the bitwise OR of this Long and the specified. + */ + or(other: number | string | Long): Long + /** + * Returns this Long with bits shifted to the left by the given amount. + * @param numBits - Number of bits + * @returns Shifted Long + */ + shiftLeft(numBits: number | Long): Long + /** This is an alias of {@link Long.shiftLeft} */ + shl(numBits: number | Long): Long + /** + * Returns this Long with bits arithmetically shifted to the right by the given amount. + * @param numBits - Number of bits + * @returns Shifted Long + */ + shiftRight(numBits: number | Long): Long + /** This is an alias of {@link Long.shiftRight} */ + shr(numBits: number | Long): Long + /** + * Returns this Long with bits logically shifted to the right by the given amount. + * @param numBits - Number of bits + * @returns Shifted Long + */ + shiftRightUnsigned(numBits: Long | number): Long + /** This is an alias of {@link Long.shiftRightUnsigned} */ + shr_u(numBits: number | Long): Long + /** This is an alias of {@link Long.shiftRightUnsigned} */ + shru(numBits: number | Long): Long + /** + * Returns the difference of this and the specified Long. + * @param subtrahend - Subtrahend + * @returns Difference + */ + subtract(subtrahend: string | number | Long | Timestamp): Long + /** This is an alias of {@link Long.subtract} */ + sub(subtrahend: string | number | Long | Timestamp): Long + /** Converts the Long to a 32 bit integer, assuming it is a 32 bit integer. */ + toInt(): number + /** Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa). */ + toNumber(): number + /** Converts the Long to a BigInt (arbitrary precision). */ + toBigInt(): bigint + /** + * Converts this Long to its byte representation. + * @param le - Whether little or big endian, defaults to big endian + * @returns Byte representation + */ + toBytes(le?: boolean): number[] + /** + * Converts this Long to its little endian byte representation. + * @returns Little endian byte representation + */ + toBytesLE(): number[] + /** + * Converts this Long to its big endian byte representation. + * @returns Big endian byte representation + */ + toBytesBE(): number[] + /** + * Converts this Long to signed. + */ + toSigned(): Long + /** + * Converts the Long to a string written in the specified radix. + * @param radix - Radix (2-36), defaults to 10 + * @throws RangeError If `radix` is out of range + */ + toString(radix?: number): string + /** Converts this Long to unsigned. */ + toUnsigned(): Long + /** Returns the bitwise XOR of this Long and the given one. */ + xor(other: Long | number | string): Long + /** This is an alias of {@link Long.isZero} */ + eqz(): boolean + /** This is an alias of {@link Long.lessThanOrEqual} */ + le(other: string | number | Long | Timestamp): boolean + toExtendedJSON(options?: EJSONOptions): number | LongExtended + static fromExtendedJSON( + doc: { + $numberLong: string + }, + options?: EJSONOptions, + ): number | Long | bigint + inspect(): string +} + +/** @public */ +export declare interface LongExtended { + $numberLong: string +} + +/** @public */ +export declare type LongWithoutOverrides = new ( + low: unknown, + high?: number | boolean, + unsigned?: boolean, +) => { + [P in Exclude]: Long[P] +} + +/** @public */ +export declare const LongWithoutOverridesClass: LongWithoutOverrides + +/** + * A class representation of the BSON MaxKey type. + * @public + * @category BSONType + */ +export declare class MaxKey extends BSONValue { + get _bsontype(): "MaxKey" + /* Excluded from this release type: toExtendedJSON */ + /* Excluded from this release type: fromExtendedJSON */ + inspect(): string +} + +/** @public */ +export declare interface MaxKeyExtended { + $maxKey: 1 +} + +/** + * A class representation of the BSON MinKey type. + * @public + * @category BSONType + */ +export declare class MinKey extends BSONValue { + get _bsontype(): "MinKey" + /* Excluded from this release type: toExtendedJSON */ + /* Excluded from this release type: fromExtendedJSON */ + inspect(): string +} + +/** @public */ +export declare interface MinKeyExtended { + $minKey: 1 +} + +/** + * A class representation of the BSON ObjectId type. + * @public + * @category BSONType + */ +export declare class ObjectId extends BSONValue { + get _bsontype(): "ObjectId" + /* Excluded from this release type: index */ + static cacheHexString: boolean + /* Excluded from this release type: [kId] */ + /* Excluded from this release type: __id */ + /** + * Create an ObjectId type + * + * @param inputId - Can be a 24 character hex string, 12 byte binary Buffer, or a number. + */ + constructor( + inputId?: string | number | ObjectId | ObjectIdLike | Uint8Array, + ) + /** + * The ObjectId bytes + * @readonly + */ + get id(): Uint8Array + set id(value: Uint8Array) + /** Returns the ObjectId id as a 24 character hex string representation */ + toHexString(): string + /* Excluded from this release type: getInc */ + /** + * Generate a 12 byte id buffer used in ObjectId's + * + * @param time - pass in a second based timestamp. + */ + static generate(time?: number): Uint8Array + /** + * Converts the id into a 24 character hex string for printing, unless encoding is provided. + * @param encoding - hex or base64 + */ + toString(encoding?: "hex" | "base64"): string + /** Converts to its JSON the 24 character hex string representation. */ + toJSON(): string + /** + * Compares the equality of this ObjectId with `otherID`. + * + * @param otherId - ObjectId instance to compare against. + */ + equals(otherId: string | ObjectId | ObjectIdLike): boolean + /** Returns the generation date (accurate up to the second) that this ID was generated. */ + getTimestamp(): Date + /* Excluded from this release type: createPk */ + /** + * Creates an ObjectId from a second based number, with the rest of the ObjectId zeroed out. Used for comparisons or sorting the ObjectId. + * + * @param time - an integer number representing a number of seconds. + */ + static createFromTime(time: number): ObjectId + /** + * Creates an ObjectId from a hex string representation of an ObjectId. + * + * @param hexString - create a ObjectId from a passed in 24 character hexstring. + */ + static createFromHexString(hexString: string): ObjectId + /** Creates an ObjectId instance from a base64 string */ + static createFromBase64(base64: string): ObjectId + /** + * Checks if a value is a valid bson ObjectId + * + * @param id - ObjectId instance to validate. + */ + static isValid( + id: string | number | ObjectId | ObjectIdLike | Uint8Array, + ): boolean + /* Excluded from this release type: toExtendedJSON */ + /* Excluded from this release type: fromExtendedJSON */ + inspect(): string +} + +/** @public */ +export declare interface ObjectIdExtended { + $oid: string +} + +/** @public */ +export declare interface ObjectIdLike { + id: string | Uint8Array + __id?: string + toHexString(): string +} + +/** + * Parse an Extended JSON string, constructing the JavaScript value or object described by that + * string. + * + * @example + * ```js + * const { EJSON } = require('bson'); + * const text = '{ "int32": { "$numberInt": "10" } }'; + * + * // prints { int32: { [String: '10'] _bsontype: 'Int32', value: '10' } } + * console.log(EJSON.parse(text, { relaxed: false })); + * + * // prints { int32: 10 } + * console.log(EJSON.parse(text)); + * ``` + */ +declare function parse(text: string, options?: EJSONOptions): any + +/** + * Serialize a Javascript object. + * + * @param object - the Javascript object to serialize. + * @returns Buffer object containing the serialized object. + * @public + */ +export declare function serialize( + object: Document, + options?: SerializeOptions, +): Uint8Array + +/** @public */ +export declare interface SerializeOptions { + /** the serializer will check if keys are valid. */ + checkKeys?: boolean + /** serialize the javascript functions **(default:false)**. */ + serializeFunctions?: boolean + /** serialize will not emit undefined fields **(default:true)** */ + ignoreUndefined?: boolean + /* Excluded from this release type: minInternalBufferSize */ + /** the index in the buffer where we wish to start serializing into */ + index?: number +} + +/** + * Serialize a Javascript object using a predefined Buffer and index into the buffer, + * useful when pre-allocating the space for serialization. + * + * @param object - the Javascript object to serialize. + * @param finalBuffer - the Buffer you pre-allocated to store the serialized BSON object. + * @returns the index pointing to the last written byte in the buffer. + * @public + */ +export declare function serializeWithBufferAndIndex( + object: Document, + finalBuffer: Uint8Array, + options?: SerializeOptions, +): number + +/** + * Sets the size of the internal serialization buffer. + * + * @param size - The desired size for the internal serialization buffer + * @public + */ +export declare function setInternalBufferSize(size: number): void + +/** + * Converts a BSON document to an Extended JSON string, optionally replacing values if a replacer + * function is specified or optionally including only the specified properties if a replacer array + * is specified. + * + * @param value - The value to convert to extended JSON + * @param replacer - A function that alters the behavior of the stringification process, or an array of String and Number objects that serve as a whitelist for selecting/filtering the properties of the value object to be included in the JSON string. If this value is null or not provided, all properties of the object are included in the resulting JSON string + * @param space - A String or Number object that's used to insert white space into the output JSON string for readability purposes. + * @param options - Optional settings + * + * @example + * ```js + * const { EJSON } = require('bson'); + * const Int32 = require('mongodb').Int32; + * const doc = { int32: new Int32(10) }; + * + * // prints '{"int32":{"$numberInt":"10"}}' + * console.log(EJSON.stringify(doc, { relaxed: false })); + * + * // prints '{"int32":10}' + * console.log(EJSON.stringify(doc)); + * ``` + */ +declare function stringify( + value: any, + replacer?: + | (number | string)[] + | ((this: any, key: string, value: any) => any) + | EJSONOptions, + space?: string | number, + options?: EJSONOptions, +): string + +/** + * @public + * @category BSONType + * */ +export declare class Timestamp extends LongWithoutOverridesClass { + get _bsontype(): "Timestamp" + static readonly MAX_VALUE: Long + /** + * @param int - A 64-bit bigint representing the Timestamp. + */ + constructor(int: bigint) + /** + * @param long - A 64-bit Long representing the Timestamp. + */ + constructor(long: Long) + /** + * @param value - A pair of two values indicating timestamp and increment. + */ + constructor(value: { t: number; i: number }) + toJSON(): { + $timestamp: string + } + /** Returns a Timestamp represented by the given (32-bit) integer value. */ + static fromInt(value: number): Timestamp + /** Returns a Timestamp representing the given number value, provided that it is a finite number. Otherwise, zero is returned. */ + static fromNumber(value: number): Timestamp + /** + * Returns a Timestamp for the given high and low bits. Each is assumed to use 32 bits. + * + * @param lowBits - the low 32-bits. + * @param highBits - the high 32-bits. + */ + static fromBits(lowBits: number, highBits: number): Timestamp + /** + * Returns a Timestamp from the given string, optionally using the given radix. + * + * @param str - the textual representation of the Timestamp. + * @param optRadix - the radix in which the text is written. + */ + static fromString(str: string, optRadix: number): Timestamp + /* Excluded from this release type: toExtendedJSON */ + /* Excluded from this release type: fromExtendedJSON */ + inspect(): string +} + +/** @public */ +export declare interface TimestampExtended { + $timestamp: { + t: number + i: number + } +} + +/** @public */ +export declare type TimestampOverrides = + | "_bsontype" + | "toExtendedJSON" + | "fromExtendedJSON" + | "inspect" + +/** + * A class representation of the BSON UUID type. + * @public + */ +export declare class UUID extends Binary { + static cacheHexString: boolean + /* Excluded from this release type: __id */ + /** + * Create an UUID type + * + * @param input - Can be a 32 or 36 character hex string (dashes excluded/included) or a 16 byte binary Buffer. + */ + constructor(input?: string | Uint8Array | UUID) + /** + * The UUID bytes + * @readonly + */ + get id(): Uint8Array + set id(value: Uint8Array) + /** + * Returns the UUID id as a 32 or 36 character hex string representation, excluding/including dashes (defaults to 36 character dash separated) + * @param includeDashes - should the string exclude dash-separators. + * */ + toHexString(includeDashes?: boolean): string + /** + * Converts the id into a 36 character (dashes included) hex string, unless a encoding is specified. + */ + toString(encoding?: "hex" | "base64"): string + /** + * Converts the id into its JSON string representation. + * A 36 character (dashes included) hex string in the format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + */ + toJSON(): string + /** + * Compares the equality of this UUID with `otherID`. + * + * @param otherId - UUID instance to compare against. + */ + equals(otherId: string | Uint8Array | UUID): boolean + /** + * Creates a Binary instance from the current UUID. + */ + toBinary(): Binary + /** + * Generates a populated buffer containing a v4 uuid + */ + static generate(): Uint8Array + /** + * Checks if a value is a valid bson UUID + * @param input - UUID, string or Buffer to validate. + */ + static isValid(input: string | Uint8Array | UUID): boolean + /** + * Creates an UUID from a hex string representation of an UUID. + * @param hexString - 32 or 36 character hex string (dashes excluded/included). + */ + static createFromHexString(hexString: string): UUID + /** Creates an UUID from a base64 string representation of an UUID. */ + static createFromBase64(base64: string): UUID + inspect(): string +} + +/** @public */ +export declare type UUIDExtended = { + $uuid: string +} + +export {} diff --git a/src/driver/mongodb/typings.ts b/src/driver/mongodb/typings.ts index 6f4f2ffa9f..d988b5e7e9 100644 --- a/src/driver/mongodb/typings.ts +++ b/src/driver/mongodb/typings.ts @@ -1,6566 +1,7067 @@ -import { EventEmitter, Readable, Writable } from "../../platform/PlatformTools" - -/** - * Creates a new MongoClient instance. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/MongoClient.html - */ -export declare class MongoClient extends EventEmitter { - constructor(uri: string, options?: MongoClientOptions) - +import { + BSON, + BSONRegExp, + BSONSymbol, + BSONType, + Binary, + Code, + DBRef, + Decimal128, + DeserializeOptions, + Document, + Double, + Int32, + Long, + MaxKey, + MinKey, + ObjectId, + ObjectIdLike, + SerializeOptions, + Timestamp, + deserialize, + serialize, +} from "./bson.typings" +import type { ConnectionOptions as ConnectionOptions_2 } from "tls" +import type { Socket } from "net" +import type { SrvRecord } from "dns" +import type { TcpNetConnectOpts } from "net" +import type { TLSSocket } from "tls" +import type { TLSSocketOptions } from "tls" +import { Readable, EventEmitter } from "../../platform/PlatformTools" + +/** @public */ +export declare abstract class AbstractCursor< + TSchema = any, + CursorEvents extends AbstractCursorEvents = AbstractCursorEvents, +> extends TypedEventEmitter { + /* Excluded from this release type: [kId] */ + /* Excluded from this release type: [kSession] */ + /* Excluded from this release type: [kServer] */ + /* Excluded from this release type: [kNamespace] */ + /* Excluded from this release type: [kDocuments] */ + /* Excluded from this release type: [kClient] */ + /* Excluded from this release type: [kTransform] */ + /* Excluded from this release type: [kInitialized] */ + /* Excluded from this release type: [kClosed] */ + /* Excluded from this release type: [kKilled] */ + /* Excluded from this release type: [kOptions] */ + /** @event */ + static readonly CLOSE: "close" + /* Excluded from this release type: __constructor */ + get id(): Long | undefined + /* Excluded from this release type: client */ + /* Excluded from this release type: server */ + get namespace(): MongoDBNamespace + get readPreference(): ReadPreference + get readConcern(): ReadConcern | undefined + /* Excluded from this release type: session */ + /* Excluded from this release type: session */ + /* Excluded from this release type: cursorOptions */ + get closed(): boolean + get killed(): boolean + get loadBalanced(): boolean + /** Returns current buffered documents length */ + bufferedCount(): number + /** Returns current buffered documents */ + readBufferedDocuments(number?: number): TSchema[] + [Symbol.asyncIterator](): AsyncGenerator + stream(options?: CursorStreamOptions): Readable & AsyncIterable + hasNext(): Promise + /** Get the next available document from the cursor, returns null if no more documents are available. */ + next(): Promise /** - * Connect to MongoDB using a url as documented at docs.mongodb.org/manual/reference/connection-string/ - * Note that for replicasets the replicaSet query parameter is required in the 2.0 driver. - * - * @param url The connection URI string. - * @param callback The command result callback. + * Try to get the next available document from the cursor or `null` if an empty batch is returned */ - static connect(url: string, callback: MongoCallback): void - + tryNext(): Promise /** - * Connect to MongoDB using a url as documented at docs.mongodb.org/manual/reference/connection-string/ - * Note that for replicasets the replicaSet query parameter is required in the 2.0 driver. + * Iterates over all the documents for this cursor using the iterator, callback pattern. + * + * If the iterator returns `false`, iteration will stop. * - * @param url The connection URI string. - * @param options Optional settings. + * @param iterator - The iteration callback. */ - static connect(url: string, options?: MongoClientOptions): Promise - + forEach(iterator: (doc: TSchema) => boolean | void): Promise + close(): Promise /** - * Connect to MongoDB using a url as documented at docs.mongodb.org/manual/reference/connection-string/ - * Note that for replicasets the replicaSet query parameter is required in the 2.0 driver. - * - * @param url The connection URI string. - * @param options Optional settings. - * @param callback The command result callback. + * Returns an array of documents. The caller is responsible for making sure that there + * is enough memory to store the results. Note that the array only contains partial + * results when this cursor had been previously accessed. In that case, + * cursor.rewind() can be used to reset the cursor. */ - static connect( - url: string, - options: MongoClientOptions, - callback: MongoCallback, - ): void - + toArray(): Promise /** - * Connect to MongoDB using a url as documented at docs.mongodb.org/manual/reference/connection-string/ - * Note that for replicasets the replicaSet query parameter is required in the 2.0 driver. + * Add a cursor flag to the cursor + * + * @param flag - The flag to set, must be one of following ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'partial' -. + * @param value - The flag boolean value. */ - connect(): Promise - + addCursorFlag(flag: CursorFlag, value: boolean): this /** - * Connect to MongoDB using a url as documented at docs.mongodb.org/manual/reference/connection-string/ - * Note that for replicasets the replicaSet query parameter is required in the 2.0 driver. + * Map all documents using the provided function + * If there is a transform set on the cursor, that will be called first and the result passed to + * this function's transform. + * + * @remarks + * + * **Note** Cursors use `null` internally to indicate that there are no more documents in the cursor. Providing a mapping + * function that maps values to `null` will result in the cursor closing itself before it has finished iterating + * all documents. This will **not** result in a memory leak, just surprising behavior. For example: + * + * ```typescript + * const cursor = collection.find({}); + * cursor.map(() => null); * - * @param url The connection URI string. - * @param callback The command result callback. + * const documents = await cursor.toArray(); + * // documents is always [], regardless of how many documents are in the collection. + * ``` + * + * Other falsey values are allowed: + * + * ```typescript + * const cursor = collection.find({}); + * cursor.map(() => ''); + * + * const documents = await cursor.toArray(); + * // documents is now an array of empty strings + * ``` + * + * **Note for Typescript Users:** adding a transform changes the return type of the iteration of this cursor, + * it **does not** return a new instance of a cursor. This means when calling map, + * you should always assign the result to a new variable in order to get a correctly typed cursor variable. + * Take note of the following example: + * + * @example + * ```typescript + * const cursor: FindCursor = coll.find(); + * const mappedCursor: FindCursor = cursor.map(doc => Object.keys(doc).length); + * const keyCounts: number[] = await mappedCursor.toArray(); // cursor.toArray() still returns Document[] + * ``` + * @param transform - The mapping transformation method. */ - connect(url: string, callback: MongoCallback): void - + map(transform: (doc: TSchema) => T): AbstractCursor /** - * Connect to MongoDB using a url as documented at docs.mongodb.org/manual/reference/connection-string/ - * Note that for replicasets the replicaSet query parameter is required in the 2.0 driver. + * Set the ReadPreference for the cursor. * - * @param url The connection URI string. - * @param options Optional settings. + * @param readPreference - The new read preference for the cursor. */ - connect(url: string, options?: MongoClientOptions): Promise - + withReadPreference(readPreference: ReadPreferenceLike): this /** - * Connect to MongoDB using a url as documented at docs.mongodb.org/manual/reference/connection-string/ - * Note that for replicasets the replicaSet query parameter is required in the 2.0 driver. + * Set the ReadPreference for the cursor. * - * @param url The connection URI string. - * @param options Optional settings. - * @param callback The command result callback. + * @param readPreference - The new read preference for the cursor. */ - connect( - url: string, - options: MongoClientOptions, - callback: MongoCallback, - ): void - + withReadConcern(readConcern: ReadConcernLike): this /** - * Close the db and its underlying connections. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/MongoClient.html#close + * Set a maxTimeMS on the cursor query, allowing for hard timeout limits on queries (Only supported on MongoDB 2.6 or higher) + * + * @param value - Number of milliseconds to wait before aborting the query. */ - close(callback: MongoCallback): void - + maxTimeMS(value: number): this /** - * Close the db and its underlying connections. - * @param force Force close, emitting no events. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/MongoClient.html#close + * Set the batch size for the cursor. + * + * @param value - The number of documents to return per batch. See {@link https://www.mongodb.com/docs/manual/reference/command/find/|find command documentation}. */ - close(force?: boolean): Promise - + batchSize(value: number): this /** - * Close the db and its underlying connections. - * @param force Force close, emitting no events. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/MongoClient.html#close + * Rewind this cursor to its uninitialized state. Any options that are present on the cursor will + * remain in effect. Iterating this cursor will cause new queries to be sent to the server, even + * if the resultant data has already been retrieved by this cursor. */ - close(force: boolean, callback: MongoCallback): void - + rewind(): void /** - * Create a new Db instance sharing the current socket connections. Be aware that the new db instances are - * related in a parent-child relationship to the original instance so that events are correctly emitted on child - * db instances. Child db instances are cached so performing db('db1') twice will return the same instance. - * You can control these behaviors with the options noListener and returnNonCachedInstance. - * @param dbName The name of the database we want to use. If not provided, use database name from connection string. - * @param options Optional settings. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/MongoClient.html#db + * Returns a new uninitialized copy of this cursor, with options matching those that have been set on the current instance */ - db(dbName?: string, options?: MongoClientCommonOption): Db + abstract clone(): AbstractCursor + /* Excluded from this release type: _initialize */ + /* Excluded from this release type: _getMore */ + /* Excluded from this release type: [kInit] */ +} + +/** @public */ +export declare type AbstractCursorEvents = { + [AbstractCursor.CLOSE](): void +} +/** @public */ +export declare interface AbstractCursorOptions extends BSONSerializeOptions { + session?: ClientSession + readPreference?: ReadPreferenceLike + readConcern?: ReadConcernLike /** - * Check if MongoClient is connected. - * @param options Optional settings. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/MongoClient.html#isConnected + * Specifies the number of documents to return in each response from MongoDB */ - isConnected(options?: MongoClientCommonOption): boolean - + batchSize?: number /** - * Logout user from server, fire off on all connections and remove all auth info. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/MongoClient.html#logout + * When applicable `maxTimeMS` controls the amount of time the initial command + * that constructs a cursor should take. (ex. find, aggregate, listCollections) */ - logout(callback: MongoCallback): void - logout(options?: { dbName?: string }): Promise - logout(options: { dbName?: string }, callback: MongoCallback): void - + maxTimeMS?: number /** - * Starts a new session on the server. - * @param options Optional settings. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/MongoClient.html#startSession + * When applicable `maxAwaitTimeMS` controls the amount of time subsequent getMores + * that a cursor uses to fetch more data should take. (ex. cursor.next()) */ - startSession(options?: SessionOptions): ClientSession - + maxAwaitTimeMS?: number /** - * Create a new Change Stream, watching for new changes (insertions, updates, replacements, deletions, and invalidations) in this cluster. - * Will ignore all changes to system collections, as well as the local, admin, and config databases. - * @param pipeline An array of aggregation pipeline stages through which to pass change stream documents. This allows for filtering (using $match) and manipulating the change stream documents. - * @param options Optional settings. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#watch + * Comment to apply to the operation. + * + * In server versions pre-4.4, 'comment' must be string. A server + * error will be thrown if any other type is provided. + * + * In server versions 4.4 and above, 'comment' can be any valid BSON type. */ - watch( - pipeline?: Object[], - options?: ChangeStreamOptions & { - startAtClusterTime?: Timestamp - session?: ClientSession - }, - ): ChangeStream - + comment?: unknown /** - * Runs a given operation with an implicitly created session. The lifetime of the session will be handled without the need for user interaction. - * @param operation An operation to execute with an implicitly created session. The signature of this MUST be `(session) => {}` - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/MongoClient.html#withSession + * By default, MongoDB will automatically close a cursor when the + * client has exhausted all results in the cursor. However, for [capped collections](https://www.mongodb.com/docs/manual/core/capped-collections) + * you may use a Tailable Cursor that remains open after the client exhausts + * the results in the initial cursor. */ - withSession( - operation: (session: ClientSession) => Promise, - ): Promise - + tailable?: boolean /** - * Runs a given operation with an implicitly created session. The lifetime of the session will be handled without the need for user interaction. - * @param options Optional settings to be appled to implicitly created session. - * @param operation An operation to execute with an implicitly created session. The signature of this MUST be `(session) => {}` - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/MongoClient.html#withSession + * If awaitData is set to true, when the cursor reaches the end of the capped collection, + * MongoDB blocks the query thread for a period of time waiting for new data to arrive. + * When new data is inserted into the capped collection, the blocked thread is signaled + * to wake up and return the next batch to the client. */ - withSession( - options: SessionOptions, - operation: (session: ClientSession) => Promise, - ): Promise + awaitData?: boolean + noCursorTimeout?: boolean } -/** - * The callback format for results. - */ -export interface MongoCallback { - /** - * @param error An error instance representing the error during the execution. - * @param result The result of execution. - */ - (error: MongoError, result: T): void +/* Excluded from this release type: AbstractOperation */ + +/** @public */ +export declare type AcceptedFields = { + readonly [key in KeysOfAType]?: AssignableType } -// http://mongodb.github.io/node-mongodb-native/2.1/api/MongoError.html -export declare class MongoError extends Error { - constructor(message: string) - static create(options: Object): MongoError +/** @public */ +export declare type AddToSetOperators = { + $each?: Array> +} + +/** @public */ +export declare interface AddUserOptions extends CommandOperationOptions { + /** Roles associated with the created user */ + roles?: string | string[] | RoleSpecification | RoleSpecification[] + /** Custom data associated with the user (only Mongodb 2.6 or higher) */ + customData?: Document } /** - * Options for MongoClient#connect method. + * The **Admin** class is an internal class that allows convenient access to + * the admin functionality and commands for MongoDB. + * + * **ADMIN Cannot directly be instantiated** + * @public * - * @see http://mongodb.github.io/node-mongodb-native/2.2/api/MongoClient.html#.connect + * @example + * ```ts + * import { MongoClient } from 'mongodb'; + * + * const client = new MongoClient('mongodb://localhost:27017'); + * const admin = client.db().admin(); + * const dbInfo = await admin.listDatabases(); + * for (const db of dbInfo.databases) { + * console.log(db.name); + * } + * ``` */ -export interface MongoClientOptions { +export declare class Admin { + /* Excluded from this release type: s */ + /* Excluded from this release type: __constructor */ /** - * The maximum size of the individual server pool. + * Execute a command + * + * @param command - The command to execute + * @param options - Optional settings for the command */ - poolSize?: number - + command(command: Document, options?: RunCommandOptions): Promise /** - * Enable SSL connection. + * Retrieve the server build information + * + * @param options - Optional settings for the command */ - ssl?: boolean - + buildInfo(options?: CommandOperationOptions): Promise /** - * SSL Certificate store binary buffer. + * Retrieve the server build information + * + * @param options - Optional settings for the command */ - sslCA?: Buffer - + serverInfo(options?: CommandOperationOptions): Promise /** - * Uri decode the user name and password for authentication. + * Retrieve this db's server status. + * + * @param options - Optional settings for the command */ - uri_decode_auth?: boolean - + serverStatus(options?: CommandOperationOptions): Promise /** - * A hash of options to set on the db object, see Db constructor. + * Ping the MongoDB server and retrieve results + * + * @param options - Optional settings for the command */ - db?: DbCreateOptions - + ping(options?: CommandOperationOptions): Promise /** - * A hash of options to set on the server objects, see Server constructor**. + * Add a user to the database + * + * @param username - The username for the new user + * @param passwordOrOptions - An optional password for the new user, or the options for the command + * @param options - Optional settings for the command */ - server?: ServerOptions - + addUser( + username: string, + passwordOrOptions?: string | AddUserOptions, + options?: AddUserOptions, + ): Promise /** - * A hash of options to set on the replSet object, see ReplSet constructor**. + * Remove a user from a database + * + * @param username - The username to remove + * @param options - Optional settings for the command */ - replSet?: ReplSetOptions - + removeUser(username: string, options?: RemoveUserOptions): Promise + /** + * Validate an existing collection + * + * @param collectionName - The name of the collection to validate. + * @param options - Optional settings for the command + */ + validateCollection( + collectionName: string, + options?: ValidateCollectionOptions, + ): Promise /** - * A hash of options to set on the mongos object, see Mongos constructor**. + * List the available databases + * + * @param options - Optional settings for the command */ - mongos?: MongosOptions - + listDatabases(options?: ListDatabasesOptions): Promise /** - * A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible. + * Get ReplicaSet status + * + * @param options - Optional settings for the command */ - promiseLibrary?: Object + replSetGetStatus(options?: CommandOperationOptions): Promise } -export interface CommandOptions { - /** - * The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, - * ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST). - */ - readPreference?: ReadPreference | string +/* Excluded from this release type: AdminPrivate */ - /** - * Number of milliseconds to wait before aborting the query. - */ +/* Excluded from this release type: AggregateOperation */ + +/** @public */ +export declare interface AggregateOptions extends CommandOperationOptions { + /** allowDiskUse lets the server know if it can use disk to store temporary results for the aggregation (requires mongodb 2.6 \>). */ + allowDiskUse?: boolean + /** The number of documents to return per batch. See [aggregation documentation](https://www.mongodb.com/docs/manual/reference/command/aggregate). */ + batchSize?: number + /** Allow driver to bypass schema validation in MongoDB 3.2 or higher. */ + bypassDocumentValidation?: boolean + /** Return the query as cursor, on 2.6 \> it returns as a real cursor on pre 2.6 it returns as an emulated cursor. */ + cursor?: Document + /** specifies a cumulative time limit in milliseconds for processing operations on the cursor. MongoDB interrupts the operation at the earliest following interrupt point. */ maxTimeMS?: number + /** The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query. */ + maxAwaitTimeMS?: number + /** Specify collation. */ + collation?: CollationOptions + /** Add an index selection hint to an aggregation command */ + hint?: Hint + /** Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0). */ + let?: Document + out?: string } /** - * Options for Db class. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html + * The **AggregationCursor** class is an internal class that embodies an aggregation cursor on MongoDB + * allowing for iteration over the results returned from the underlying query. It supports + * one by one document iteration, conversion to an array or can be iterated as a Node 4.X + * or higher stream + * @public */ -export interface DbCreateOptions { - /** - * If the database authentication is dependent on another databaseName. - */ - authSource?: string +export declare class AggregationCursor< + TSchema = any, +> extends AbstractCursor { + /* Excluded from this release type: [kPipeline] */ + /* Excluded from this release type: [kOptions] */ + /* Excluded from this release type: __constructor */ + get pipeline(): Document[] + clone(): AggregationCursor + map(transform: (doc: TSchema) => T): AggregationCursor + /* Excluded from this release type: _initialize */ + /** Execute the explain for the cursor */ + explain(verbosity?: ExplainVerbosityLike): Promise + /** Add a group stage to the aggregation pipeline */ + group($group: Document): AggregationCursor + /** Add a limit stage to the aggregation pipeline */ + limit($limit: number): this + /** Add a match stage to the aggregation pipeline */ + match($match: Document): this + /** Add an out stage to the aggregation pipeline */ + out( + $out: + | { + db: string + coll: string + } + | string, + ): this + /** + * Add a project stage to the aggregation pipeline + * + * @remarks + * In order to strictly type this function you must provide an interface + * that represents the effect of your projection on the result documents. + * + * By default chaining a projection to your cursor changes the returned type to the generic {@link Document} type. + * You should specify a parameterized type to have assertions on your final results. + * + * @example + * ```typescript + * // Best way + * const docs: AggregationCursor<{ a: number }> = cursor.project<{ a: number }>({ _id: 0, a: true }); + * // Flexible way + * const docs: AggregationCursor = cursor.project({ _id: 0, a: true }); + * ``` + * + * @remarks + * In order to strictly type this function you must provide an interface + * that represents the effect of your projection on the result documents. + * + * **Note for Typescript Users:** adding a transform changes the return type of the iteration of this cursor, + * it **does not** return a new instance of a cursor. This means when calling project, + * you should always assign the result to a new variable in order to get a correctly typed cursor variable. + * Take note of the following example: + * + * @example + * ```typescript + * const cursor: AggregationCursor<{ a: number; b: string }> = coll.aggregate([]); + * const projectCursor = cursor.project<{ a: number }>({ _id: 0, a: true }); + * const aPropOnlyArray: {a: number}[] = await projectCursor.toArray(); + * + * // or always use chaining and save the final cursor + * + * const cursor = coll.aggregate().project<{ a: string }>({ + * _id: 0, + * a: { $convert: { input: '$a', to: 'string' } + * }}); + * ``` + */ + project( + $project: Document, + ): AggregationCursor + /** Add a lookup stage to the aggregation pipeline */ + lookup($lookup: Document): this + /** Add a redact stage to the aggregation pipeline */ + redact($redact: Document): this + /** Add a skip stage to the aggregation pipeline */ + skip($skip: number): this + /** Add a sort stage to the aggregation pipeline */ + sort($sort: Sort): this + /** Add a unwind stage to the aggregation pipeline */ + unwind($unwind: Document | string): this + /** Add a geoNear stage to the aggregation pipeline */ + geoNear($geoNear: Document): this +} - /** - * The write concern. - */ - w?: number | string +/** @public */ +export declare interface AggregationCursorOptions + extends AbstractCursorOptions, + AggregateOptions {} - /** - * The write concern timeout. - */ - wtimeout?: number +/** + * It is possible to search using alternative types in mongodb e.g. + * string types can be searched using a regex in mongo + * array types can be searched using their element type + * @public + */ +export declare type AlternativeType = T extends ReadonlyArray + ? T | RegExpOrString + : RegExpOrString + +/** @public */ +export declare type AnyBulkWriteOperation = + + | { + insertOne: InsertOneModel + } + | { + replaceOne: ReplaceOneModel + } + | { + updateOne: UpdateOneModel + } + | { + updateMany: UpdateManyModel + } + | { + deleteOne: DeleteOneModel + } + | { + deleteMany: DeleteManyModel + } + +/** @public */ +export declare type AnyError = MongoError | Error + +/** @public */ +export declare type ArrayElement = Type extends ReadonlyArray + ? Item + : never + +/** @public */ +export declare type ArrayOperator = { + $each?: Array> + $slice?: number + $position?: number + $sort?: Sort +} - /** - * Specify a journal write concern. - */ - j?: boolean +/** @public */ +export declare interface Auth { + /** The username for auth */ + username?: string + /** The password for auth */ + password?: string +} + +/* Excluded from this release type: AuthContext */ + +/** @public */ +export declare const AuthMechanism: Readonly<{ + readonly MONGODB_AWS: "MONGODB-AWS" + readonly MONGODB_CR: "MONGODB-CR" + readonly MONGODB_DEFAULT: "DEFAULT" + readonly MONGODB_GSSAPI: "GSSAPI" + readonly MONGODB_PLAIN: "PLAIN" + readonly MONGODB_SCRAM_SHA1: "SCRAM-SHA-1" + readonly MONGODB_SCRAM_SHA256: "SCRAM-SHA-256" + readonly MONGODB_X509: "MONGODB-X509" + /** @experimental */ + readonly MONGODB_OIDC: "MONGODB-OIDC" +}> + +/** @public */ +export declare type AuthMechanism = + (typeof AuthMechanism)[keyof typeof AuthMechanism] + +/** @public */ +export declare interface AuthMechanismProperties extends Document { + SERVICE_HOST?: string + SERVICE_NAME?: string + SERVICE_REALM?: string + CANONICALIZE_HOST_NAME?: GSSAPICanonicalizationValue + AWS_SESSION_TOKEN?: string + /** @experimental */ + REQUEST_TOKEN_CALLBACK?: OIDCRequestFunction + /** @experimental */ + REFRESH_TOKEN_CALLBACK?: OIDCRefreshFunction + /** @experimental */ + PROVIDER_NAME?: "aws" +} + +/** @public */ +export declare interface AutoEncrypter { + new (client: MongoClient, options: AutoEncryptionOptions): AutoEncrypter + init(cb: Callback): void + teardown(force: boolean, callback: Callback): void + encrypt( + ns: string, + cmd: Document, + options: any, + callback: Callback, + ): void + decrypt(cmd: Document, options: any, callback: Callback): void + /** @experimental */ + readonly cryptSharedLibVersionInfo: { + version: bigint + versionStr: string + } | null +} +/** @public */ +export declare const AutoEncryptionLoggerLevel: Readonly<{ + readonly FatalError: 0 + readonly Error: 1 + readonly Warning: 2 + readonly Info: 3 + readonly Trace: 4 +}> + +/** @public */ +export declare type AutoEncryptionLoggerLevel = + (typeof AutoEncryptionLoggerLevel)[keyof typeof AutoEncryptionLoggerLevel] + +/** @public */ +export declare interface AutoEncryptionOptions { + /* Excluded from this release type: metadataClient */ + /** A `MongoClient` used to fetch keys from a key vault */ + keyVaultClient?: MongoClient + /** The namespace where keys are stored in the key vault */ + keyVaultNamespace?: string + /** Configuration options that are used by specific KMS providers during key generation, encryption, and decryption. */ + kmsProviders?: { + /** Configuration options for using 'aws' as your KMS provider */ + aws?: + | { + /** The access key used for the AWS KMS provider */ + accessKeyId: string + /** The secret access key used for the AWS KMS provider */ + secretAccessKey: string + /** + * An optional AWS session token that will be used as the + * X-Amz-Security-Token header for AWS requests. + */ + sessionToken?: string + } + | Record + /** Configuration options for using 'local' as your KMS provider */ + local?: { + /** + * The master key used to encrypt/decrypt data keys. + * A 96-byte long Buffer or base64 encoded string. + */ + key: Buffer | string + } + /** Configuration options for using 'azure' as your KMS provider */ + azure?: + | { + /** The tenant ID identifies the organization for the account */ + tenantId: string + /** The client ID to authenticate a registered application */ + clientId: string + /** The client secret to authenticate a registered application */ + clientSecret: string + /** + * If present, a host with optional port. E.g. "example.com" or "example.com:443". + * This is optional, and only needed if customer is using a non-commercial Azure instance + * (e.g. a government or China account, which use different URLs). + * Defaults to "login.microsoftonline.com" + */ + identityPlatformEndpoint?: string | undefined + } + | { + /** + * If present, an access token to authenticate with Azure. + */ + accessToken: string + } + | Record + /** Configuration options for using 'gcp' as your KMS provider */ + gcp?: + | { + /** The service account email to authenticate */ + email: string + /** A PKCS#8 encrypted key. This can either be a base64 string or a binary representation */ + privateKey: string | Buffer + /** + * If present, a host with optional port. E.g. "example.com" or "example.com:443". + * Defaults to "oauth2.googleapis.com" + */ + endpoint?: string | undefined + } + | { + /** + * If present, an access token to authenticate with GCP. + */ + accessToken: string + } + | Record + /** + * Configuration options for using 'kmip' as your KMS provider + */ + kmip?: { + /** + * The output endpoint string. + * The endpoint consists of a hostname and port separated by a colon. + * E.g. "example.com:123". A port is always present. + */ + endpoint?: string + } + } /** - * The current value of the parameter native_parser. - */ - native_parser?: boolean + * A map of namespaces to a local JSON schema for encryption + * + * **NOTE**: Supplying options.schemaMap provides more security than relying on JSON Schemas obtained from the server. + * It protects against a malicious server advertising a false JSON Schema, which could trick the client into sending decrypted data that should be encrypted. + * Schemas supplied in the schemaMap only apply to configuring automatic encryption for Client-Side Field Level Encryption. + * Other validation rules in the JSON schema will not be enforced by the driver and will result in an error. + */ + schemaMap?: Document + /** @experimental Public Technical Preview: Supply a schema for the encrypted fields in the document */ + encryptedFieldsMap?: Document + /** Allows the user to bypass auto encryption, maintaining implicit decryption */ + bypassAutoEncryption?: boolean + /** @experimental Public Technical Preview: Allows users to bypass query analysis */ + bypassQueryAnalysis?: boolean + options?: { + /** An optional hook to catch logging messages from the underlying encryption engine */ + logger?: (level: AutoEncryptionLoggerLevel, message: string) => void + } + extraOptions?: { + /** + * A local process the driver communicates with to determine how to encrypt values in a command. + * Defaults to "mongodb://%2Fvar%2Fmongocryptd.sock" if domain sockets are available or "mongodb://localhost:27020" otherwise + */ + mongocryptdURI?: string + /** If true, autoEncryption will not attempt to spawn a mongocryptd before connecting */ + mongocryptdBypassSpawn?: boolean + /** The path to the mongocryptd executable on the system */ + mongocryptdSpawnPath?: string + /** Command line arguments to use when auto-spawning a mongocryptd */ + mongocryptdSpawnArgs?: string[] + /** + * Full path to a MongoDB Crypt shared library to be used (instead of mongocryptd). + * + * This needs to be the path to the file itself, not a directory. + * It can be an absolute or relative path. If the path is relative and + * its first component is `$ORIGIN`, it will be replaced by the directory + * containing the mongodb-client-encryption native addon file. Otherwise, + * the path will be interpreted relative to the current working directory. + * + * Currently, loading different MongoDB Crypt shared library files from different + * MongoClients in the same process is not supported. + * + * If this option is provided and no MongoDB Crypt shared library could be loaded + * from the specified location, creating the MongoClient will fail. + * + * If this option is not provided and `cryptSharedLibRequired` is not specified, + * the AutoEncrypter will attempt to spawn and/or use mongocryptd according + * to the mongocryptd-specific `extraOptions` options. + * + * Specifying a path prevents mongocryptd from being used as a fallback. + * + * Requires the MongoDB Crypt shared library, available in MongoDB 6.0 or higher. + */ + cryptSharedLibPath?: string + /** + * If specified, never use mongocryptd and instead fail when the MongoDB Crypt + * shared library could not be loaded. + * + * This is always true when `cryptSharedLibPath` is specified. + * + * Requires the MongoDB Crypt shared library, available in MongoDB 6.0 or higher. + */ + cryptSharedLibRequired?: boolean + /* Excluded from this release type: cryptSharedLibSearchPaths */ + } + proxyOptions?: ProxyOptions + /** The TLS options to use connecting to the KMS provider */ + tlsOptions?: { + aws?: AutoEncryptionTlsOptions + local?: AutoEncryptionTlsOptions + azure?: AutoEncryptionTlsOptions + gcp?: AutoEncryptionTlsOptions + kmip?: AutoEncryptionTlsOptions + } +} +/** @public */ +export declare interface AutoEncryptionTlsOptions { /** - * Force server to assign _id values instead of driver. + * Specifies the location of a local .pem file that contains + * either the client's TLS/SSL certificate and key or only the + * client's TLS/SSL key when tlsCertificateFile is used to + * provide the certificate. */ - forceServerObjectId?: boolean - + tlsCertificateKeyFile?: string /** - * Serialize functions on any object. + * Specifies the password to de-crypt the tlsCertificateKeyFile. */ - serializeFunctions?: boolean - + tlsCertificateKeyFilePassword?: string /** - * Specify if the BSON serializer should ignore undefined fields. + * Specifies the location of a local .pem file that contains the + * root certificate chain from the Certificate Authority. + * This file is used to validate the certificate presented by the + * KMS provider. */ - ignoreUndefined?: boolean + tlsCAFile?: string +} - /** - * Return document results as raw BSON buffers. +/** + * Keeps the state of a unordered batch so we can rewrite the results + * correctly after command execution + * + * @public + */ +export declare class Batch { + originalZeroIndex: number + currentIndex: number + originalIndexes: number[] + batchType: BatchType + operations: T[] + size: number + sizeBytes: number + constructor(batchType: BatchType, originalZeroIndex: number) +} + +/** @public */ +export declare const BatchType: Readonly<{ + readonly INSERT: 1 + readonly UPDATE: 2 + readonly DELETE: 3 +}> + +/** @public */ +export declare type BatchType = (typeof BatchType)[keyof typeof BatchType] + +export { Binary } + +/* Excluded from this release type: BinMsg */ + +/** @public */ +export declare type BitwiseFilter = + | number /** numeric bit mask */ + | Binary /** BinData bit mask */ + | ReadonlyArray + +export { BSON } + +export { BSONRegExp } + +/** + * BSON Serialization options. + * @public + */ +export declare interface BSONSerializeOptions + extends Omit, + Omit< + DeserializeOptions, + | "evalFunctions" + | "cacheFunctions" + | "cacheFunctionsCrc32" + | "allowObjectSmallerThanBufferSize" + | "index" + | "validation" + > { + /** + * Enabling the raw option will return a [Node.js Buffer](https://nodejs.org/api/buffer.html) + * which is allocated using [allocUnsafe API](https://nodejs.org/api/buffer.html#static-method-bufferallocunsafesize). + * See this section from the [Node.js Docs here](https://nodejs.org/api/buffer.html#what-makes-bufferallocunsafe-and-bufferallocunsafeslow-unsafe) + * for more detail about what "unsafe" refers to in this context. + * If you need to maintain your own editable clone of the bytes returned for an extended life time of the process, it is recommended you allocate + * your own buffer and clone the contents: + * + * @example + * ```ts + * const raw = await collection.findOne({}, { raw: true }); + * const myBuffer = Buffer.alloc(raw.byteLength); + * myBuffer.set(raw, 0); + * // Only save and use `myBuffer` beyond this point + * ``` + * + * @remarks + * Please note there is a known limitation where this option cannot be used at the MongoClient level (see [NODE-3946](https://jira.mongodb.org/browse/NODE-3946)). + * It does correctly work at `Db`, `Collection`, and per operation the same as other BSON options work. */ raw?: boolean + /** Enable utf8 validation when deserializing BSON documents. Defaults to true. */ + enableUtf8Validation?: boolean +} - /** - * Promotes Long values to number if they fit inside the 53 bits resolution. - */ - promoteLongs?: boolean +export { BSONSymbol } - /** - * Sets a cap on how many operations the driver will buffer up before giving up on getting a working connection, default is -1 which is unlimited. - */ - bufferMaxEntries?: number +export { BSONType } - /** - * The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST). - */ - readPreference?: ReadPreference | string +/** @public */ +export declare type BSONTypeAlias = keyof typeof BSONType - /** - * A primary key factory object for generation of custom _id keys. - */ - pkFactory?: Object +/* Excluded from this release type: BufferPool */ +/** @public */ +export declare abstract class BulkOperationBase { + isOrdered: boolean + /* Excluded from this release type: s */ + operationId?: number + /* Excluded from this release type: __constructor */ /** - * A Promise library class the application wishes to use such as Bluebird, must be ES6 compatible. + * Add a single insert document to the bulk operation + * + * @example + * ```ts + * const bulkOp = collection.initializeOrderedBulkOp(); + * + * // Adds three inserts to the bulkOp. + * bulkOp + * .insert({ a: 1 }) + * .insert({ b: 2 }) + * .insert({ c: 3 }); + * await bulkOp.execute(); + * ``` */ - promiseLibrary?: Object - + insert(document: Document): BulkOperationBase /** - * Specify a read concern for the collection. (only MongoDB 3.2 or higher supported). + * Builds a find operation for an update/updateOne/delete/deleteOne/replaceOne. + * Returns a builder object used to complete the definition of the operation. + * + * @example + * ```ts + * const bulkOp = collection.initializeOrderedBulkOp(); + * + * // Add an updateOne to the bulkOp + * bulkOp.find({ a: 1 }).updateOne({ $set: { b: 2 } }); + * + * // Add an updateMany to the bulkOp + * bulkOp.find({ c: 3 }).update({ $set: { d: 4 } }); + * + * // Add an upsert + * bulkOp.find({ e: 5 }).upsert().updateOne({ $set: { f: 6 } }); + * + * // Add a deletion + * bulkOp.find({ g: 7 }).deleteOne(); + * + * // Add a multi deletion + * bulkOp.find({ h: 8 }).delete(); + * + * // Add a replaceOne + * bulkOp.find({ i: 9 }).replaceOne({writeConcern: { j: 10 }}); + * + * // Update using a pipeline (requires Mongodb 4.2 or higher) + * bulk.find({ k: 11, y: { $exists: true }, z: { $exists: true } }).updateOne([ + * { $set: { total: { $sum: [ '$y', '$z' ] } } } + * ]); + * + * // All of the ops will now be executed + * await bulkOp.execute(); + * ``` */ - readConcern?: ReadConcern + find(selector: Document): FindOperators + /** Specifies a raw operation to perform in the bulk write. */ + raw(op: AnyBulkWriteOperation): this + get bsonOptions(): BSONSerializeOptions + get writeConcern(): WriteConcern | undefined + get batches(): Batch[] + execute(options?: BulkWriteOptions): Promise + /* Excluded from this release type: handleWriteError */ + abstract addToOperationsList( + batchType: BatchType, + document: Document | UpdateStatement | DeleteStatement, + ): this +} + +/* Excluded from this release type: BulkOperationPrivate */ + +/* Excluded from this release type: BulkResult */ + +/** @public */ +export declare interface BulkWriteOperationError { + index: number + code: number + errmsg: string + errInfo: Document + op: Document | UpdateStatement | DeleteStatement +} + +/** @public */ +export declare interface BulkWriteOptions extends CommandOperationOptions { + /** Allow driver to bypass schema validation in MongoDB 3.2 or higher. */ + bypassDocumentValidation?: boolean + /** If true, when an insert fails, don't execute the remaining writes. If false, continue with remaining inserts when one fails. */ + ordered?: boolean + /** Force server to assign _id values instead of driver. */ + forceServerObjectId?: boolean + /** Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0). */ + let?: Document } /** - * Creates a new ReadPreference instance. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/ReadPreference.html + * @public + * The result of a bulk write. */ -export declare class ReadPreference { - constructor(mode: string, tags: Object) - - /** - * The ReadPreference mode as listed above. - */ - mode: string +export declare class BulkWriteResult { + private readonly result + /** Number of documents inserted. */ + readonly insertedCount: number + /** Number of documents matched for update. */ + readonly matchedCount: number + /** Number of documents modified. */ + readonly modifiedCount: number + /** Number of documents deleted. */ + readonly deletedCount: number + /** Number of documents upserted. */ + readonly upsertedCount: number + /** Upserted document generated Id's, hash key is the index of the originating operation */ + readonly upsertedIds: { + [key: number]: any + } + /** Inserted document generated Id's, hash key is the index of the originating operation */ + readonly insertedIds: { + [key: number]: any + } + private static generateIdMap + /* Excluded from this release type: __constructor */ + /** Evaluates to true if the bulk operation correctly executes */ + get ok(): number + /** The number of inserted documents */ + get nInserted(): number + /** Number of upserted documents */ + get nUpserted(): number + /** Number of matched documents */ + get nMatched(): number + /** Number of documents updated physically on disk */ + get nModified(): number + /** Number of removed documents */ + get nRemoved(): number + /** Returns an array of all inserted ids */ + getInsertedIds(): Document[] + /** Returns an array of all upserted ids */ + getUpsertedIds(): Document[] + /** Returns the upserted id at the given index */ + getUpsertedIdAt(index: number): Document | undefined + /** Returns raw internal result */ + getRawResponse(): Document + /** Returns true if the bulk operation contains a write error */ + hasWriteErrors(): boolean + /** Returns the number of write errors off the bulk operation */ + getWriteErrorCount(): number + /** Returns a specific write error object */ + getWriteErrorAt(index: number): WriteError | undefined + /** Retrieve all write errors */ + getWriteErrors(): WriteError[] + /** Retrieve the write concern error if one exists */ + getWriteConcernError(): WriteConcernError | undefined + toString(): string + isOk(): boolean +} - /** - * An object representing read preference tags. - */ - tags: any +/** + * MongoDB Driver style callback + * @public + */ +export declare type Callback = (error?: AnyError, result?: T) => void - /** - * Read from primary only. All operations produce an error (throw an exception where applicable) if primary is unavailable. Cannot be combined with tags (This is the default.). - */ - static PRIMARY: string +/** @public */ +export declare class CancellationToken extends TypedEventEmitter<{ + cancel(): void +}> {} +/** + * Creates a new Change Stream instance. Normally created using {@link Collection#watch|Collection.watch()}. + * @public + */ +export declare class ChangeStream< + TSchema extends Document = Document, + TChange extends Document = ChangeStreamDocument, +> extends TypedEventEmitter> { + pipeline: Document[] + /** + * @remarks WriteConcern can still be present on the options because + * we inherit options from the client/db/collection. The + * key must be present on the options in order to delete it. + * This allows typescript to delete the key but will + * not allow a writeConcern to be assigned as a property on options. + */ + options: ChangeStreamOptions & { + writeConcern?: never + } + parent: MongoClient | Db | Collection + namespace: MongoDBNamespace + type: symbol + /* Excluded from this release type: cursor */ + streamOptions?: CursorStreamOptions + /* Excluded from this release type: [kCursorStream] */ + /* Excluded from this release type: [kClosed] */ + /* Excluded from this release type: [kMode] */ + /** @event */ + static readonly RESPONSE: "response" + /** @event */ + static readonly MORE: "more" + /** @event */ + static readonly INIT: "init" + /** @event */ + static readonly CLOSE: "close" + /** + * Fired for each new matching change in the specified namespace. Attaching a `change` + * event listener to a Change Stream will switch the stream into flowing mode. Data will + * then be passed as soon as it is available. + * @event + */ + static readonly CHANGE: "change" + /** @event */ + static readonly END: "end" + /** @event */ + static readonly ERROR: "error" + /** + * Emitted each time the change stream stores a new resume token. + * @event + */ + static readonly RESUME_TOKEN_CHANGED: "resumeTokenChanged" + /* Excluded from this release type: __constructor */ + /* Excluded from this release type: cursorStream */ + /** The cached resume token that is used to resume after the most recently returned change. */ + get resumeToken(): ResumeToken + /** Check if there is any document still available in the Change Stream */ + hasNext(): Promise + /** Get the next available document from the Change Stream. */ + next(): Promise /** - * Read from primary if available, otherwise a secondary. + * Try to get the next available document from the Change Stream's cursor or `null` if an empty batch is returned */ - static PRIMARY_PREFERRED: string - + tryNext(): Promise + [Symbol.asyncIterator](): AsyncGenerator + /** Is the cursor closed */ + get closed(): boolean + /** Close the Change Stream */ + close(): Promise /** - * Read from secondary if available, otherwise error. - */ - static SECONDARY: string + * Return a modified Readable stream including a possible transform method. + * + * NOTE: When using a Stream to process change stream events, the stream will + * NOT automatically resume in the case a resumable error is encountered. + * + * @throws MongoChangeStreamError if the underlying cursor or the change stream is closed + */ + stream(options?: CursorStreamOptions): Readable & AsyncIterable + /* Excluded from this release type: _setIsEmitter */ + /* Excluded from this release type: _setIsIterator */ + /* Excluded from this release type: _createChangeStreamCursor */ + /* Excluded from this release type: _closeEmitterModeWithError */ + /* Excluded from this release type: _streamEvents */ + /* Excluded from this release type: _endStream */ + /* Excluded from this release type: _processChange */ + /* Excluded from this release type: _processErrorStreamMode */ + /* Excluded from this release type: _processErrorIteratorMode */ +} - /** - * Read from a secondary if available, otherwise read from the primary. - */ - static SECONDARY_PREFERRED: string +/* Excluded from this release type: ChangeStreamAggregateRawResult */ - /** - * All modes read from among the nearest candidates, but unlike other modes, NEAREST will include both the primary and all secondaries in the random selection. - */ - static NEAREST: string +/** + * Only present when the `showExpandedEvents` flag is enabled. + * @public + * @see https://www.mongodb.com/docs/manual/reference/change-events/ + */ +export declare interface ChangeStreamCollModDocument + extends ChangeStreamDocumentCommon, + ChangeStreamDocumentCollectionUUID { + /** Describes the type of operation represented in this change notification */ + operationType: "modify" +} - /** - * Validate if a mode is legal. - */ - isValid(mode: string): boolean +/** + * @public + * @see https://www.mongodb.com/docs/manual/reference/change-events/ + */ +export declare interface ChangeStreamCreateDocument + extends ChangeStreamDocumentCommon, + ChangeStreamDocumentCollectionUUID { + /** Describes the type of operation represented in this change notification */ + operationType: "create" +} - /** - * Validate if a mode is legal. - */ - static isValid(mode: string): boolean +/** + * Only present when the `showExpandedEvents` flag is enabled. + * @public + * @see https://www.mongodb.com/docs/manual/reference/change-events/ + */ +export declare interface ChangeStreamCreateIndexDocument + extends ChangeStreamDocumentCommon, + ChangeStreamDocumentCollectionUUID, + ChangeStreamDocumentOperationDescription { + /** Describes the type of operation represented in this change notification */ + operationType: "createIndexes" } +/* Excluded from this release type: ChangeStreamCursor */ + +/* Excluded from this release type: ChangeStreamCursorOptions */ + /** - * Creates a new Server instance. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Server.html + * @public + * @see https://www.mongodb.com/docs/manual/reference/change-events/#delete-event */ -export interface SocketOptions { +export declare interface ChangeStreamDeleteDocument< + TSchema extends Document = Document, +> extends ChangeStreamDocumentCommon, + ChangeStreamDocumentKey, + ChangeStreamDocumentCollectionUUID { + /** Describes the type of operation represented in this change notification */ + operationType: "delete" + /** Namespace the delete event occurred on */ + ns: ChangeStreamNameSpace + /** + * Contains the pre-image of the modified or deleted document if the + * pre-image is available for the change event and either 'required' or + * 'whenAvailable' was specified for the 'fullDocumentBeforeChange' option + * when creating the change stream. If 'whenAvailable' was specified but the + * pre-image is unavailable, this will be explicitly set to null. + */ + fullDocumentBeforeChange?: TSchema +} + +/** @public */ +export declare type ChangeStreamDocument = + | ChangeStreamInsertDocument + | ChangeStreamUpdateDocument + | ChangeStreamReplaceDocument + | ChangeStreamDeleteDocument + | ChangeStreamDropDocument + | ChangeStreamRenameDocument + | ChangeStreamDropDatabaseDocument + | ChangeStreamInvalidateDocument + | ChangeStreamCreateIndexDocument + | ChangeStreamCreateDocument + | ChangeStreamCollModDocument + | ChangeStreamDropIndexDocument + | ChangeStreamShardCollectionDocument + | ChangeStreamReshardCollectionDocument + | ChangeStreamRefineCollectionShardKeyDocument + +/** @public */ +export declare interface ChangeStreamDocumentCollectionUUID { + /** + * The UUID (Binary subtype 4) of the collection that the operation was performed on. + * + * Only present when the `showExpandedEvents` flag is enabled. + * + * **NOTE:** collectionUUID will be converted to a NodeJS Buffer if the promoteBuffers + * flag is enabled. + * + * @sinceServerVersion 6.1.0 + */ + collectionUUID: Binary +} + +/** @public */ +export declare interface ChangeStreamDocumentCommon { /** - * Reconnect on error. + * The id functions as an opaque token for use when resuming an interrupted + * change stream. */ - autoReconnect?: boolean - + _id: ResumeToken /** - * TCP Socket NoDelay option. + * The timestamp from the oplog entry associated with the event. + * For events that happened as part of a multi-document transaction, the associated change stream + * notifications will have the same clusterTime value, namely the time when the transaction was committed. + * On a sharded cluster, events that occur on different shards can have the same clusterTime but be + * associated with different transactions or even not be associated with any transaction. + * To identify events for a single transaction, you can use the combination of lsid and txnNumber in the change stream event document. */ - noDelay?: boolean - + clusterTime?: Timestamp /** - * TCP KeepAlive on the socket with a X ms delay before start. + * The transaction number. + * Only present if the operation is part of a multi-document transaction. + * + * **NOTE:** txnNumber can be a Long if promoteLongs is set to false */ - keepAlive?: number - + txnNumber?: number /** - * TCP Connection timeout setting. + * The identifier for the session associated with the transaction. + * Only present if the operation is part of a multi-document transaction. */ - connectTimeoutMS?: number + lsid?: ServerSessionId +} +/** @public */ +export declare interface ChangeStreamDocumentKey< + TSchema extends Document = Document, +> { /** - * TCP Socket timeout setting. + * For unsharded collections this contains a single field `_id`. + * For sharded collections, this will contain all the components of the shard key */ - socketTimeoutMS?: number + documentKey: { + _id: InferIdType + [shardKey: string]: any + } } -/** - * Creates a new Server instance. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Server.html - */ -export interface ServerOptions { +/** @public */ +export declare interface ChangeStreamDocumentOperationDescription { /** - * Number of connections in the connection pool for each server instance, set to 5 as default for legacy reasons. - */ - poolSize?: number - - /** - * Use ssl connection (needs to have a mongod server with ssl support). - */ - ssl?: boolean - - /** - * Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher). - */ - sslValidate?: Object - - /** - * Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function. + * An description of the operation. + * + * Only present when the `showExpandedEvents` flag is enabled. + * + * @sinceServerVersion 6.1.0 */ - checkServerIdentity?: boolean | Function + operationDescription?: Document +} - /** - * Array of valid certificates either as Buffers or Strings (needs to have a mongod server with ssl support, 2.4 or higher). - */ - sslCA?: Array +/** + * @public + * @see https://www.mongodb.com/docs/manual/reference/change-events/#dropdatabase-event + */ +export declare interface ChangeStreamDropDatabaseDocument + extends ChangeStreamDocumentCommon { + /** Describes the type of operation represented in this change notification */ + operationType: "dropDatabase" + /** The database dropped */ + ns: { + db: string + } +} - /** - * String or buffer containing the certificate we wish to present (needs to have a mongod server with ssl support, 2.4 or higher). - */ - sslCert?: Buffer | string +/** + * @public + * @see https://www.mongodb.com/docs/manual/reference/change-events/#drop-event + */ +export declare interface ChangeStreamDropDocument + extends ChangeStreamDocumentCommon, + ChangeStreamDocumentCollectionUUID { + /** Describes the type of operation represented in this change notification */ + operationType: "drop" + /** Namespace the drop event occurred on */ + ns: ChangeStreamNameSpace +} - /** - * String or buffer containing the certificate private key we wish to present (needs to have a mongod server with ssl support, 2.4 or higher). - */ - sslKey?: Buffer | string +/** + * Only present when the `showExpandedEvents` flag is enabled. + * @public + * @see https://www.mongodb.com/docs/manual/reference/change-events/ + */ +export declare interface ChangeStreamDropIndexDocument + extends ChangeStreamDocumentCommon, + ChangeStreamDocumentCollectionUUID, + ChangeStreamDocumentOperationDescription { + /** Describes the type of operation represented in this change notification */ + operationType: "dropIndexes" +} - /** - * String or buffer containing the certificate password (needs to have a mongod server with ssl support, 2.4 or higher). - */ - sslPass?: Buffer | string +/** @public */ +export declare type ChangeStreamEvents< + TSchema extends Document = Document, + TChange extends Document = ChangeStreamDocument, +> = { + resumeTokenChanged(token: ResumeToken): void + init(response: any): void + more(response?: any): void + response(): void + end(): void + error(error: Error): void + change(change: TChange): void +} & AbstractCursorEvents - /** - * Socket options. - */ - socketOptions?: SocketOptions +/** + * @public + * @see https://www.mongodb.com/docs/manual/reference/change-events/#insert-event + */ +export declare interface ChangeStreamInsertDocument< + TSchema extends Document = Document, +> extends ChangeStreamDocumentCommon, + ChangeStreamDocumentKey, + ChangeStreamDocumentCollectionUUID { + /** Describes the type of operation represented in this change notification */ + operationType: "insert" + /** This key will contain the document being inserted */ + fullDocument: TSchema + /** Namespace the insert event occurred on */ + ns: ChangeStreamNameSpace +} - /** - * Server attempt to reconnect #times. - */ - reconnectTries?: number +/** + * @public + * @see https://www.mongodb.com/docs/manual/reference/change-events/#invalidate-event + */ +export declare interface ChangeStreamInvalidateDocument + extends ChangeStreamDocumentCommon { + /** Describes the type of operation represented in this change notification */ + operationType: "invalidate" +} - /** - * Server will wait # milliseconds between retries. - */ - reconnectInterval?: number +/** @public */ +export declare interface ChangeStreamNameSpace { + db: string + coll: string } /** - * Creates a new ReplSet instance. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/ReplSet.html + * Options that can be passed to a ChangeStream. Note that startAfter, resumeAfter, and startAtOperationTime are all mutually exclusive, and the server will error if more than one is specified. + * @public */ -export interface ReplSetOptions { +export declare interface ChangeStreamOptions + extends Omit { /** - * Turn on high availability monitoring. + * Allowed values: 'updateLookup', 'whenAvailable', 'required'. + * + * When set to 'updateLookup', the change notification for partial updates + * will include both a delta describing the changes to the document as well + * as a copy of the entire document that was changed from some time after + * the change occurred. + * + * When set to 'whenAvailable', configures the change stream to return the + * post-image of the modified document for replace and update change events + * if the post-image for this event is available. + * + * When set to 'required', the same behavior as 'whenAvailable' except that + * an error is raised if the post-image is not available. */ - ha?: boolean - + fullDocument?: string /** - * Time between each replicaset status check. + * Allowed values: 'whenAvailable', 'required', 'off'. + * + * The default is to not send a value, which is equivalent to 'off'. + * + * When set to 'whenAvailable', configures the change stream to return the + * pre-image of the modified document for replace, update, and delete change + * events if it is available. + * + * When set to 'required', the same behavior as 'whenAvailable' except that + * an error is raised if the pre-image is not available. */ - haInterval?: number - + fullDocumentBeforeChange?: string + /** The maximum amount of time for the server to wait on new documents to satisfy a change stream query. */ + maxAwaitTimeMS?: number /** - * The name of the replicaset to connect to. + * Allows you to start a changeStream after a specified event. + * @see https://www.mongodb.com/docs/manual/changeStreams/#resumeafter-for-change-streams */ - replicaSet?: string - + resumeAfter?: ResumeToken /** - * Sets the range of servers to pick when using NEAREST (lowest ping ms + the latency fence, ex: range of 1 to (1 + 15) ms). + * Similar to resumeAfter, but will allow you to start after an invalidated event. + * @see https://www.mongodb.com/docs/manual/changeStreams/#startafter-for-change-streams */ - secondaryAcceptableLatencyMS?: number - + startAfter?: ResumeToken + /** Will start the changeStream after the specified operationTime. */ + startAtOperationTime?: OperationTime /** - * Sets if the driver should connect even if no primary is available. + * The number of documents to return per batch. + * @see https://www.mongodb.com/docs/manual/reference/command/aggregate */ - connectWithNoPrimary?: boolean - + batchSize?: number /** - * Number of connections in the connection pool for each server instance, set to 5 as default for legacy reasons. + * When enabled, configures the change stream to include extra change events. + * + * - createIndexes + * - dropIndexes + * - modify + * - create + * - shardCollection + * - reshardCollection + * - refineCollectionShardKey */ - poolSize?: number + showExpandedEvents?: boolean +} - /** - * Use ssl connection (needs to have a mongod server with ssl support). - */ - ssl?: boolean +/** + * @public + * @see https://www.mongodb.com/docs/manual/reference/change-events/ + */ +export declare interface ChangeStreamRefineCollectionShardKeyDocument + extends ChangeStreamDocumentCommon, + ChangeStreamDocumentCollectionUUID, + ChangeStreamDocumentOperationDescription { + /** Describes the type of operation represented in this change notification */ + operationType: "refineCollectionShardKey" +} - /** - * Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher). - */ - sslValidate?: Object +/** + * @public + * @see https://www.mongodb.com/docs/manual/reference/change-events/#rename-event + */ +export declare interface ChangeStreamRenameDocument + extends ChangeStreamDocumentCommon, + ChangeStreamDocumentCollectionUUID { + /** Describes the type of operation represented in this change notification */ + operationType: "rename" + /** The new name for the `ns.coll` collection */ + to: { + db: string + coll: string + } + /** The "from" namespace that the rename occurred on */ + ns: ChangeStreamNameSpace +} - /** - * Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function. - */ - checkServerIdentity?: boolean | Function +/** + * @public + * @see https://www.mongodb.com/docs/manual/reference/change-events/#replace-event + */ +export declare interface ChangeStreamReplaceDocument< + TSchema extends Document = Document, +> extends ChangeStreamDocumentCommon, + ChangeStreamDocumentKey { + /** Describes the type of operation represented in this change notification */ + operationType: "replace" + /** The fullDocument of a replace event represents the document after the insert of the replacement document */ + fullDocument: TSchema + /** Namespace the replace event occurred on */ + ns: ChangeStreamNameSpace + /** + * Contains the pre-image of the modified or deleted document if the + * pre-image is available for the change event and either 'required' or + * 'whenAvailable' was specified for the 'fullDocumentBeforeChange' option + * when creating the change stream. If 'whenAvailable' was specified but the + * pre-image is unavailable, this will be explicitly set to null. + */ + fullDocumentBeforeChange?: TSchema +} - /** - * Array of valid certificates either as Buffers or Strings (needs to have a mongod server with ssl support, 2.4 or higher). - */ - sslCA?: Array +/** + * @public + * @see https://www.mongodb.com/docs/manual/reference/change-events/ + */ +export declare interface ChangeStreamReshardCollectionDocument + extends ChangeStreamDocumentCommon, + ChangeStreamDocumentCollectionUUID, + ChangeStreamDocumentOperationDescription { + /** Describes the type of operation represented in this change notification */ + operationType: "reshardCollection" +} - /** - * String or buffer containing the certificate we wish to present (needs to have a mongod server with ssl support, 2.4 or higher). - */ - sslCert?: Buffer | string +/** + * @public + * @see https://www.mongodb.com/docs/manual/reference/change-events/ + */ +export declare interface ChangeStreamShardCollectionDocument + extends ChangeStreamDocumentCommon, + ChangeStreamDocumentCollectionUUID, + ChangeStreamDocumentOperationDescription { + /** Describes the type of operation represented in this change notification */ + operationType: "shardCollection" +} - /** - * String or buffer containing the certificate private key we wish to present (needs to have a mongod server with ssl support, 2.4 or higher). - */ - sslKey?: Buffer | string +/** + * @public + * @see https://www.mongodb.com/docs/manual/reference/change-events/#update-event + */ +export declare interface ChangeStreamUpdateDocument< + TSchema extends Document = Document, +> extends ChangeStreamDocumentCommon, + ChangeStreamDocumentKey, + ChangeStreamDocumentCollectionUUID { + /** Describes the type of operation represented in this change notification */ + operationType: "update" + /** + * This is only set if `fullDocument` is set to `'updateLookup'` + * Contains the point-in-time post-image of the modified document if the + * post-image is available and either 'required' or 'whenAvailable' was + * specified for the 'fullDocument' option when creating the change stream. + */ + fullDocument?: TSchema + /** Contains a description of updated and removed fields in this operation */ + updateDescription: UpdateDescription + /** Namespace the update event occurred on */ + ns: ChangeStreamNameSpace + /** + * Contains the pre-image of the modified or deleted document if the + * pre-image is available for the change event and either 'required' or + * 'whenAvailable' was specified for the 'fullDocumentBeforeChange' option + * when creating the change stream. If 'whenAvailable' was specified but the + * pre-image is unavailable, this will be explicitly set to null. + */ + fullDocumentBeforeChange?: TSchema +} - /** - * String or buffer containing the certificate private key we wish to present (needs to have a mongod server with ssl support, 2.4 or higher). - */ - sslPass?: Buffer | string +/** + * @public + * @see https://github.com/mongodb/specifications/blob/master/source/mongodb-handshake/handshake.rst#hello-command + */ +export declare interface ClientMetadata { + driver: { + name: string + version: string + } + os: { + type: string + name: NodeJS.Platform + architecture: string + version: string + } + platform: string + application?: { + name: string + } +} - /** - * Socket options. - */ - socketOptions?: SocketOptions +/** @public */ +export declare interface ClientMetadataOptions { + driverInfo?: { + name?: string + version?: string + platform?: string + } + appName?: string } /** - * Creates a new Mongos instance. + * A class representing a client session on the server * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Mongos.html + * NOTE: not meant to be instantiated directly. + * @public */ -export interface MongosOptions { - /** - * Turn on high availability monitoring. - */ - ha?: boolean - - /** - * Time between each replicaset status check. - */ - haInterval?: number - +export declare class ClientSession extends TypedEventEmitter { + /* Excluded from this release type: client */ + /* Excluded from this release type: sessionPool */ + hasEnded: boolean + clientOptions?: MongoOptions + supports: { + causalConsistency: boolean + } + clusterTime?: ClusterTime + operationTime?: Timestamp + explicit: boolean + /* Excluded from this release type: owner */ + defaultTransactionOptions: TransactionOptions + transaction: Transaction + /* Excluded from this release type: [kServerSession] */ + /* Excluded from this release type: [kSnapshotTime] */ + /* Excluded from this release type: [kSnapshotEnabled] */ + /* Excluded from this release type: [kPinnedConnection] */ + /* Excluded from this release type: [kTxnNumberIncrement] */ + /* Excluded from this release type: __constructor */ + /** The server id associated with this session */ + get id(): ServerSessionId | undefined + get serverSession(): ServerSession + /** Whether or not this session is configured for snapshot reads */ + get snapshotEnabled(): boolean + get loadBalanced(): boolean + /* Excluded from this release type: pinnedConnection */ + /* Excluded from this release type: pin */ + /* Excluded from this release type: unpin */ + get isPinned(): boolean + /** + * Ends this session on the server + * + * @param options - Optional settings. Currently reserved for future use + */ + endSession(options?: EndSessionOptions): Promise /** - * Number of connections in the connection pool for each server instance, set to 5 as default for legacy reasons. + * Advances the operationTime for a ClientSession. + * + * @param operationTime - the `BSON.Timestamp` of the operation type it is desired to advance to */ - poolSize?: number - + advanceOperationTime(operationTime: Timestamp): void /** - * Use ssl connection (needs to have a mongod server with ssl support). + * Advances the clusterTime for a ClientSession to the provided clusterTime of another ClientSession + * + * @param clusterTime - the $clusterTime returned by the server from another session in the form of a document containing the `BSON.Timestamp` clusterTime and signature */ - ssl?: boolean - + advanceClusterTime(clusterTime: ClusterTime): void /** - * Validate mongod server certificate against ca (needs to have a mongod server with ssl support, 2.4 or higher). + * Used to determine if this session equals another + * + * @param session - The session to compare to */ - sslValidate?: Object - + equals(session: ClientSession): boolean /** - * Ensure we check server identify during SSL, set to false to disable checking. Only works for Node 0.12.x or higher. You can pass in a boolean or your own checkServerIdentity override function. + * Increment the transaction number on the internal ServerSession + * + * @privateRemarks + * This helper increments a value stored on the client session that will be + * added to the serverSession's txnNumber upon applying it to a command. + * This is because the serverSession is lazily acquired after a connection is obtained */ - checkServerIdentity?: boolean | Function - + incrementTransactionNumber(): void + /** @returns whether this session is currently in a transaction or not */ + inTransaction(): boolean /** - * Array of valid certificates either as Buffers or Strings (needs to have a mongod server with ssl support, 2.4 or higher). + * Starts a new transaction with the given options. + * + * @param options - Options for the transaction */ - sslCA?: Array - + startTransaction(options?: TransactionOptions): void /** - * String or buffer containing the certificate we wish to present (needs to have a mongod server with ssl support, 2.4 or higher). + * Commits the currently active transaction in this session. */ - sslCert?: Buffer | string - + commitTransaction(): Promise /** - * String or buffer containing the certificate private key we wish to present (needs to have a mongod server with ssl support, 2.4 or higher). + * Aborts the currently active transaction in this session. */ - sslKey?: Buffer | string - + abortTransaction(): Promise /** - * String or buffer containing the certificate password (needs to have a mongod server with ssl support, 2.4 or higher). + * This is here to ensure that ClientSession is never serialized to BSON. */ - sslPass?: Buffer | string - + toBSON(): never /** - * Socket options. + * Runs a provided callback within a transaction, retrying either the commitTransaction operation + * or entire transaction as needed (and when the error permits) to better ensure that + * the transaction can complete successfully. + * + * **IMPORTANT:** This method requires the user to return a Promise, and `await` all operations. + * Any callbacks that do not return a Promise will result in undefined behavior. + * + * @remarks + * This function: + * - Will return the command response from the final commitTransaction if every operation is successful (can be used as a truthy object) + * - Will return `undefined` if the transaction is explicitly aborted with `await session.abortTransaction()` + * - Will throw if one of the operations throws or `throw` statement is used inside the `withTransaction` callback + * + * Checkout a descriptive example here: + * @see https://www.mongodb.com/developer/quickstart/node-transactions/ + * + * @param fn - callback to run within a transaction + * @param options - optional settings for the transaction + * @returns A raw command response or undefined */ - socketOptions?: SocketOptions + withTransaction( + fn: WithTransactionCallback, + options?: TransactionOptions, + ): Promise } -export interface DbOptions { - /** - * Do not make the db an event listener to the original connection. - */ - noListener?: boolean - - /** - * Control if you want to return a cached instance or have a new one created. - */ - returnNonCachedInstance?: boolean +/** @public */ +export declare type ClientSessionEvents = { + ended(session: ClientSession): void } -export interface IndexInformationOptions { - /** - * Returns the full raw index information. - */ - full?: boolean +/** @public */ +export declare interface ClientSessionOptions { + /** Whether causal consistency should be enabled on this session */ + causalConsistency?: boolean + /** Whether all read operations should be read from the same snapshot for this session (NOTE: not compatible with `causalConsistency=true`) */ + snapshot?: boolean + /** The default TransactionOptions to use for transactions started on this session. */ + defaultTransactionOptions?: TransactionOptions + /* Excluded from this release type: owner */ + /* Excluded from this release type: explicit */ + /* Excluded from this release type: initialClusterTime */ +} - /** - * The preferred read preference (ReadPreference.PRIMARY, - * ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, - * ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST). - */ - readPreference?: ReadPreference | string +/** @public */ +export declare interface CloseOptions { + force?: boolean } -export interface ExecuteDbAdminCommandOptions { - /** - * The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, - * ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST). - */ - readPreference?: ReadPreference | string +/** @public + * Configuration options for clustered collections + * @see https://www.mongodb.com/docs/manual/core/clustered-collections/ + */ +export declare interface ClusteredCollectionOptions extends Document { + name?: string + key: Document + unique: boolean +} - // maxTimeMS?: number; +/** @public */ +export declare interface ClusterTime { + clusterTime: Timestamp + signature: { + hash: Binary + keyId: Long + } } -export interface ListCollectionsOptions { - /** - * The batchSize for the returned command cursor or if pre 2.8 the systems batch collection. - */ - batchSize?: number +export { Code } - /** - * The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, - * ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST). - */ - readPreference?: ReadPreference | string +/** @public */ +export declare interface CollationOptions { + locale: string + caseLevel?: boolean + caseFirst?: string + strength?: number + numericOrdering?: boolean + alternate?: string + maxVariable?: string + backwards?: boolean + normalization?: boolean } /** - * Db. + * The **Collection** class is an internal class that embodies a MongoDB collection + * allowing for insert/find/update/delete and other command operation on that MongoDB collection. + * + * **COLLECTION Cannot directly be instantiated** + * @public + * + * @example + * ```ts + * import { MongoClient } from 'mongodb'; + * + * interface Pet { + * name: string; + * kind: 'dog' | 'cat' | 'fish'; + * } * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html + * const client = new MongoClient('mongodb://localhost:27017'); + * const pets = client.db().collection('pets'); + * + * const petCursor = pets.find(); + * + * for await (const pet of petCursor) { + * console.log(`${pet.name} is a ${pet.kind}!`); + * } + * ``` */ -export declare class Db extends EventEmitter { +export declare class Collection { + /* Excluded from this release type: s */ + /* Excluded from this release type: __constructor */ /** - * - * @param databaseName The name of the database this instance represents. - * @param serverConfig The server topology for the database. - * @param options Optional. + * The name of the database this collection belongs to */ - constructor( - databaseName: string, - serverConfig: Server | ReplSet | Mongos, - options?: DbCreateOptions, - ) - + get dbName(): string /** - * Get the current db topology. + * The name of this collection */ - serverConfig: Server | ReplSet | Mongos - + get collectionName(): string /** - * Current bufferMaxEntries value for the database. + * The namespace of this collection, in the format `${this.dbName}.${this.collectionName}` */ - bufferMaxEntries: number - + get namespace(): string /** - * The name of the database this instance represents. + * The current readConcern of the collection. If not explicitly defined for + * this collection, will be inherited from the parent DB */ - databaseName: string - + get readConcern(): ReadConcern | undefined /** - * The options associated with the db instance. + * The current readPreference of the collection. If not explicitly defined for + * this collection, will be inherited from the parent DB */ - options: any - + get readPreference(): ReadPreference | undefined + get bsonOptions(): BSONSerializeOptions /** - * The current value of the parameter native_parser. + * The current writeConcern of the collection. If not explicitly defined for + * this collection, will be inherited from the parent DB */ - native_parser: boolean - + get writeConcern(): WriteConcern | undefined + /** The current index hint for the collection */ + get hint(): Hint | undefined + set hint(v: Hint | undefined) /** - * The current slaveOk value for the db instance. + * Inserts a single document into MongoDB. If documents passed in do not contain the **_id** field, + * one will be added to each of the documents missing it by the driver, mutating the document. This behavior + * can be overridden by setting the **forceServerObjectId** flag. + * + * @param doc - The document to insert + * @param options - Optional settings for the command */ - slaveOk: boolean - + insertOne( + doc: OptionalUnlessRequiredId, + options?: InsertOneOptions, + ): Promise> /** - * The current write concern values. + * Inserts an array of documents into MongoDB. If documents passed in do not contain the **_id** field, + * one will be added to each of the documents missing it by the driver, mutating the document. This behavior + * can be overridden by setting the **forceServerObjectId** flag. + * + * @param docs - The documents to insert + * @param options - Optional settings for the command */ - writeConcern: WriteConcern - + insertMany( + docs: OptionalUnlessRequiredId[], + options?: BulkWriteOptions, + ): Promise> /** - * Add a user to the database. + * Perform a bulkWrite operation without a fluent API + * + * Legal operation types are + * - `insertOne` + * - `replaceOne` + * - `updateOne` + * - `updateMany` + * - `deleteOne` + * - `deleteMany` * - * @param username The username. - * @param password The password. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#addUser + * If documents passed in do not contain the **_id** field, + * one will be added to each of the documents missing it by the driver, mutating the document. This behavior + * can be overridden by setting the **forceServerObjectId** flag. + * + * @param operations - Bulk operations to perform + * @param options - Optional settings for the command + * @throws MongoDriverError if operations is not an array */ - addUser( - username: string, - password: string, - callback: MongoCallback, - ): void - + bulkWrite( + operations: AnyBulkWriteOperation[], + options?: BulkWriteOptions, + ): Promise /** - * Add a user to the database. + * Update a single document in a collection * - * @param username The username. - * @param password The password. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#addUser + * @param filter - The filter used to select the document to update + * @param update - The update operations to be applied to the document + * @param options - Optional settings for the command */ - addUser( - username: string, - password: string, - options?: DbAddUserOptions, - ): Promise - + updateOne( + filter: Filter, + update: UpdateFilter | Partial, + options?: UpdateOptions, + ): Promise /** - * Add a user to the database. + * Replace a document in a collection with another document * - * @param username The username. - * @param password The password. - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#addUser + * @param filter - The filter used to select the document to replace + * @param replacement - The Document that replaces the matching document + * @param options - Optional settings for the command */ - addUser( - username: string, - password: string, - options: DbAddUserOptions, - callback: MongoCallback, - ): void - + replaceOne( + filter: Filter, + replacement: WithoutId, + options?: ReplaceOptions, + ): Promise /** - * Return the Admin db instance. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#admin + * Update multiple documents in a collection + * + * @param filter - The filter used to select the documents to update + * @param update - The update operations to be applied to the documents + * @param options - Optional settings for the command */ - admin(): Admin - + updateMany( + filter: Filter, + update: UpdateFilter, + options?: UpdateOptions, + ): Promise /** - * Authenticate a user against the server. + * Delete a document from a collection * - * @param userName The username. - * @param password The password. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#authenticate + * @param filter - The filter used to select the document to remove + * @param options - Optional settings for the command */ - authenticate( - userName: string, - password: string, - callback: MongoCallback, - ): void - + deleteOne( + filter?: Filter, + options?: DeleteOptions, + ): Promise /** - * Authenticate a user against the server. + * Delete multiple documents from a collection * - * @param userName The username. - * @param password The password. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#authenticate + * @param filter - The filter used to select the documents to remove + * @param options - Optional settings for the command */ - authenticate( - userName: string, - password: string, - options?: { authMechanism: string }, - ): Promise - + deleteMany( + filter?: Filter, + options?: DeleteOptions, + ): Promise /** - * Authenticate a user against the server. + * Rename the collection. + * + * @remarks + * This operation does not inherit options from the Db or MongoClient. * - * @param userName The username. - * @param password The password. - * @param password - * @param options - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#authenticate + * @param newName - New name of of the collection. + * @param options - Optional settings for the command */ - authenticate( - userName: string, - password: string, - options: { authMechanism: string }, - callback: MongoCallback, - ): void - + rename(newName: string, options?: RenameOptions): Promise /** - * Close the db and its underlying connections. + * Drop the collection from the database, removing it permanently. New accesses will create a new collection. * - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#close + * @param options - Optional settings for the command */ - close(callback: MongoCallback): void - + drop(options?: DropCollectionOptions): Promise /** - * Close the db and its underlying connections. + * Fetches the first document that matches the filter * - * @param forceClose Force close, emitting no events. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#close + * @param filter - Query for find Operation + * @param options - Optional settings for the command */ - close(forceClose?: boolean): Promise - + findOne(): Promise | null> + findOne(filter: Filter): Promise | null> + findOne( + filter: Filter, + options: FindOptions, + ): Promise | null> + findOne(): Promise + findOne(filter: Filter): Promise + findOne( + filter: Filter, + options?: FindOptions, + ): Promise /** - * Close the db and its underlying connections. + * Creates a cursor for a filter that can be used to iterate over results from MongoDB * - * @param forceClose Force close, emitting no events. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#close + * @param filter - The filter predicate. If unspecified, then all documents in the collection will match the predicate */ - close(forceClose: boolean, callback: MongoCallback): void - + find(): FindCursor> + find( + filter: Filter, + options?: FindOptions, + ): FindCursor> + find( + filter: Filter, + options?: FindOptions, + ): FindCursor /** - * Fetch a specific collection (containing the actual collection information). If the application does not use strict mode you can - * can use it without a callback in the following way: var collection = db.collection('mycollection'); + * Returns the options of the collection. * - * @param name The collection name we wish to access. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#collection + * @param options - Optional settings for the command */ - collection(name: string): Collection - + options(options?: OperationOptions): Promise /** - * Fetch a specific collection (containing the actual collection information). If the application does not use strict mode you can - * can use it without a callback in the following way: var collection = db.collection('mycollection'); + * Returns if the collection is a capped collection * - * @param name The collection name we wish to access. - * @param callback The collection result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#collection + * @param options - Optional settings for the command */ - collection( - name: string, - callback: MongoCallback>, - ): Collection - + isCapped(options?: OperationOptions): Promise /** - * Fetch a specific collection (containing the actual collection information). If the application does not use strict mode you can - * can use it without a callback in the following way: var collection = db.collection('mycollection'); + * Creates an index on the db and collection collection. + * + * @param indexSpec - The field name or index specification to create an index for + * @param options - Optional settings for the command + * + * @example + * ```ts + * const collection = client.db('foo').collection('bar'); + * + * await collection.createIndex({ a: 1, b: -1 }); + * + * // Alternate syntax for { c: 1, d: -1 } that ensures order of indexes + * await collection.createIndex([ [c, 1], [d, -1] ]); + * + * // Equivalent to { e: 1 } + * await collection.createIndex('e'); * - * @param name The collection name we wish to access. - * @param options Optional settings. - * @param callback The collection result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#collection + * // Equivalent to { f: 1, g: 1 } + * await collection.createIndex(['f', 'g']) + * + * // Equivalent to { h: 1, i: -1 } + * await collection.createIndex([ { h: 1 }, { i: -1 } ]); + * + * // Equivalent to { j: 1, k: -1, l: 2d } + * await collection.createIndex(['j', ['k', -1], { l: '2d' }]) + * ``` */ - collection( - name: string, - options: DbCollectionOptions, - callback: MongoCallback>, - ): Collection - + createIndex( + indexSpec: IndexSpecification, + options?: CreateIndexesOptions, + ): Promise /** - * Fetch all collections for the current db. + * Creates multiple indexes in the collection, this method is only supported for + * MongoDB 2.6 or higher. Earlier version of MongoDB will throw a command not supported + * error. + * + * **Note**: Unlike {@link Collection#createIndex| createIndex}, this function takes in raw index specifications. + * Index specifications are defined {@link https://www.mongodb.com/docs/manual/reference/command/createIndexes/| here}. + * + * @param indexSpecs - An array of index specifications to be created + * @param options - Optional settings for the command + * + * @example + * ```ts + * const collection = client.db('foo').collection('bar'); + * await collection.createIndexes([ + * // Simple index on field fizz + * { + * key: { fizz: 1 }, + * } + * // wildcard index + * { + * key: { '$**': 1 } + * }, + * // named index on darmok and jalad + * { + * key: { darmok: 1, jalad: -1 } + * name: 'tanagra' + * } + * ]); + * ``` + */ + createIndexes( + indexSpecs: IndexDescription[], + options?: CreateIndexesOptions, + ): Promise + /** + * Drops an index from this collection. * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#collections + * @param indexName - Name of the index to drop. + * @param options - Optional settings for the command */ - collections(): Promise[]> - + dropIndex( + indexName: string, + options?: DropIndexesOptions, + ): Promise /** - * Fetch all collections for the current db. + * Drops all indexes from this collection. * - * @param callback The results callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#collections + * @param options - Optional settings for the command */ - collections(callback: MongoCallback[]>): void - + dropIndexes(options?: DropIndexesOptions): Promise /** - * Execute a command. + * Get the list of all indexes information for the collection. * - * @param command The command hash. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#command + * @param options - Optional settings for the command */ - command(command: Object, callback: MongoCallback): void - + listIndexes(options?: ListIndexesOptions): ListIndexesCursor /** - * Execute a command. + * Checks if one or more indexes exist on the collection, fails on first non-existing index * - * @param command The command hash. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#command + * @param indexes - One or more index names to check. + * @param options - Optional settings for the command */ - command( - command: Object, - options?: { readPreference: ReadPreference | string }, - ): Promise - + indexExists( + indexes: string | string[], + options?: IndexInformationOptions, + ): Promise /** - * Execute a command. + * Retrieves this collections index info. * - * @param command The command hash. - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#command + * @param options - Optional settings for the command */ - command( - command: Object, - options: { readPreference: ReadPreference | string }, - callback: MongoCallback, - ): void - + indexInformation(options?: IndexInformationOptions): Promise /** - * Create a new collection on a server with the specified options. Use this to create capped collections. + * Gets an estimate of the count of documents in a collection using collection metadata. + * This will always run a count command on all server versions. * - * @param name The collection name we wish to access. - * @param callback The results callback - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#createCollection - */ - createCollection( - name: string, - callback: MongoCallback>, - ): void - - /** - * Create a new collection on a server with the specified options. Use this to create capped collections. + * due to an oversight in versions 5.0.0-5.0.8 of MongoDB, the count command, + * which estimatedDocumentCount uses in its implementation, was not included in v1 of + * the Stable API, and so users of the Stable API with estimatedDocumentCount are + * recommended to upgrade their server version to 5.0.9+ or set apiStrict: false to avoid + * encountering errors. * - * @param name The collection name we wish to access. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#createCollection + * @see {@link https://www.mongodb.com/docs/manual/reference/command/count/#behavior|Count: Behavior} + * @param options - Optional settings for the command */ - createCollection( - name: string, - options?: CollectionCreateOptions, - ): Promise> - + estimatedDocumentCount( + options?: EstimatedDocumentCountOptions, + ): Promise /** - * Create a new collection on a server with the specified options. Use this to create capped collections. + * Gets the number of documents matching the filter. + * For a fast count of the total documents in a collection see {@link Collection#estimatedDocumentCount| estimatedDocumentCount}. + * **Note**: When migrating from {@link Collection#count| count} to {@link Collection#countDocuments| countDocuments} + * the following query operators must be replaced: * - * @param name The collection name we wish to access. - * @param options Optional settings. - * @param callback The results callback - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#createCollection - */ - createCollection( - name: string, - options: CollectionCreateOptions, - callback: MongoCallback>, - ): void - - /** - * Creates an index on the db and collection collection. + * | Operator | Replacement | + * | -------- | ----------- | + * | `$where` | [`$expr`][1] | + * | `$near` | [`$geoWithin`][2] with [`$center`][3] | + * | `$nearSphere` | [`$geoWithin`][2] with [`$centerSphere`][4] | * - * @param name Name of the collection to create the index on. - * @param fieldOrSpec Defines the index. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#createIndex - */ - createIndex( - name: string, - fieldOrSpec: string | Object, - callback: MongoCallback, - ): void - - /** - * Creates an index on the db and collection collection. + * [1]: https://www.mongodb.com/docs/manual/reference/operator/query/expr/ + * [2]: https://www.mongodb.com/docs/manual/reference/operator/query/geoWithin/ + * [3]: https://www.mongodb.com/docs/manual/reference/operator/query/center/#op._S_center + * [4]: https://www.mongodb.com/docs/manual/reference/operator/query/centerSphere/#op._S_centerSphere * - * @param name Name of the collection to create the index on. - * @param fieldOrSpec Defines the index. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#createIndex - */ - createIndex( - name: string, - fieldOrSpec: string | Object, - options?: MongodbIndexOptions, - ): Promise - - /** - * Creates an index on the db and collection collection. + * @param filter - The filter for the count + * @param options - Optional settings for the command * - * @param name Name of the collection to create the index on. - * @param fieldOrSpec Defines the index. - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#createIndex + * @see https://www.mongodb.com/docs/manual/reference/operator/query/expr/ + * @see https://www.mongodb.com/docs/manual/reference/operator/query/geoWithin/ + * @see https://www.mongodb.com/docs/manual/reference/operator/query/center/#op._S_center + * @see https://www.mongodb.com/docs/manual/reference/operator/query/centerSphere/#op._S_centerSphere */ - createIndex( - name: string, - fieldOrSpec: string | Object, - options: MongodbIndexOptions, - callback: MongoCallback, - ): void - + countDocuments( + filter?: Document, + options?: CountDocumentsOptions, + ): Promise /** - * Create a new Db instance sharing the current socket connections. Be aware that the new db instances are - * related in a parent-child relationship to the original instance so that events are correctly emitted on child - * db instances. Child db instances are cached so performing db('db1') twice will return the same instance. - * You can control these behaviors with the options noListener and returnNonCachedInstance. - * - * @param dbName The name of the database we want to use. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#db - */ - db(dbName: string): Db - + * The distinct command returns a list of distinct values for the given key across a collection. + * + * @param key - Field of the document to find distinct values for + * @param filter - The filter for filtering the set of documents to which we apply the distinct filter. + * @param options - Optional settings for the command + */ + distinct>( + key: Key, + ): Promise[Key]>>> + distinct>( + key: Key, + filter: Filter, + ): Promise[Key]>>> + distinct>( + key: Key, + filter: Filter, + options: DistinctOptions, + ): Promise[Key]>>> + distinct(key: string): Promise + distinct(key: string, filter: Filter): Promise + distinct( + key: string, + filter: Filter, + options: DistinctOptions, + ): Promise /** - * Create a new Db instance sharing the current socket connections. Be aware that the new db instances are - * related in a parent-child relationship to the original instance so that events are correctly emitted on child - * db instances. Child db instances are cached so performing db('db1') twice will return the same instance. - * You can control these behaviors with the options noListener and returnNonCachedInstance. + * Retrieve all the indexes on the collection. * - * @param dbName The name of the database we want to use. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#db + * @param options - Optional settings for the command */ - db(dbName: string, options: DbOptions): Db - + indexes(options?: IndexInformationOptions): Promise /** - * Drop a collection from the database, removing it permanently. New accesses will create a new collection. + * Get all the collection statistics. * - * @param name Name of collection to drop. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#dropCollection + * @param options - Optional settings for the command */ - dropCollection(name: string): Promise - + stats(options?: CollStatsOptions): Promise /** - * Drop a collection from the database, removing it permanently. New accesses will create a new collection. + * Find a document and delete it in one atomic operation. Requires a write lock for the duration of the operation. * - * @param name Name of collection to drop. - * @param callback The results callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#dropCollection + * @param filter - The filter used to select the document to remove + * @param options - Optional settings for the command */ - dropCollection(name: string, callback: MongoCallback): void - + findOneAndDelete( + filter: Filter, + options?: FindOneAndDeleteOptions, + ): Promise> /** - * Drop a database, removing it permanently from the server. + * Find a document and replace it in one atomic operation. Requires a write lock for the duration of the operation. * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#dropDatabase + * @param filter - The filter used to select the document to replace + * @param replacement - The Document that replaces the matching document + * @param options - Optional settings for the command */ - dropDatabase(): Promise - + findOneAndReplace( + filter: Filter, + replacement: WithoutId, + options?: FindOneAndReplaceOptions, + ): Promise> /** - * Drop a database, removing it permanently from the server. + * Find a document and update it in one atomic operation. Requires a write lock for the duration of the operation. * - * @param callback The results callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#dropDatabase + * @param filter - The filter used to select the document to update + * @param update - Update operations to be performed on the document + * @param options - Optional settings for the command */ - dropDatabase(callback: MongoCallback): void - - // deprecated http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#ensureIndex - // ensureIndex(collectionName: any, fieldOrSpec: any, options: IndexOptions, callback: Function): void; - // deprecated http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#eval - // eval(code: any, parameters: any[], options?: any, callback?: MongoCallback): void; - + findOneAndUpdate( + filter: Filter, + update: UpdateFilter, + options?: FindOneAndUpdateOptions, + ): Promise> /** - * Runs a command on the database as admin. + * Execute an aggregation framework pipeline against the collection, needs MongoDB \>= 2.2 * - * @param command The command hash. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#executeDbAdminCommand + * @param pipeline - An array of aggregation pipelines to execute + * @param options - Optional settings for the command */ - executeDbAdminCommand(command: Object, callback: MongoCallback): void - + aggregate( + pipeline?: Document[], + options?: AggregateOptions, + ): AggregationCursor /** - * Runs a command on the database as admin. + * Create a new Change Stream, watching for new changes (insertions, updates, replacements, deletions, and invalidations) in this collection. * - * @param command The command hash. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#executeDbAdminCommand - */ - executeDbAdminCommand( - command: Object, - options?: ExecuteDbAdminCommandOptions, - ): Promise - + * @remarks + * watch() accepts two generic arguments for distinct use cases: + * - The first is to override the schema that may be defined for this specific collection + * - The second is to override the shape of the change stream document entirely, if it is not provided the type will default to ChangeStreamDocument of the first argument + * @example + * By just providing the first argument I can type the change to be `ChangeStreamDocument<{ _id: number }>` + * ```ts + * collection.watch<{ _id: number }>() + * .on('change', change => console.log(change._id.toFixed(4))); + * ``` + * + * @example + * Passing a second argument provides a way to reflect the type changes caused by an advanced pipeline. + * Here, we are using a pipeline to have MongoDB filter for insert changes only and add a comment. + * No need start from scratch on the ChangeStreamInsertDocument type! + * By using an intersection we can save time and ensure defaults remain the same type! + * ```ts + * collection + * .watch & { comment: string }>([ + * { $addFields: { comment: 'big changes' } }, + * { $match: { operationType: 'insert' } } + * ]) + * .on('change', change => { + * change.comment.startsWith('big'); + * change.operationType === 'insert'; + * // No need to narrow in code because the generics did that for us! + * expectType(change.fullDocument); + * }); + * ``` + * + * @param pipeline - An array of {@link https://www.mongodb.com/docs/manual/reference/operator/aggregation-pipeline/|aggregation pipeline stages} through which to pass change stream documents. This allows for filtering (using $match) and manipulating the change stream documents. + * @param options - Optional settings for the command + * @typeParam TLocal - Type of the data being detected by the change stream + * @typeParam TChange - Type of the whole change stream document emitted + */ + watch< + TLocal extends Document = TSchema, + TChange extends Document = ChangeStreamDocument, + >( + pipeline?: Document[], + options?: ChangeStreamOptions, + ): ChangeStream /** - * Runs a command on the database as admin. + * Initiate an Out of order batch write operation. All operations will be buffered into insert/update/remove commands executed out of order. * - * @param command The command hash. - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#executeDbAdminCommand + * @throws MongoNotConnectedError + * @remarks + * **NOTE:** MongoClient must be connected prior to calling this method due to a known limitation in this legacy implementation. + * However, `collection.bulkWrite()` provides an equivalent API that does not require prior connecting. */ - executeDbAdminCommand( - command: Object, - options: ExecuteDbAdminCommandOptions, - callback: MongoCallback, - ): void - + initializeUnorderedBulkOp( + options?: BulkWriteOptions, + ): UnorderedBulkOperation /** - * Retrieves this collections index info. + * Initiate an In order bulk write operation. Operations will be serially executed in the order they are added, creating a new operation for each switch in types. * - * @param name The name of the collection. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#indexInformation + * @throws MongoNotConnectedError + * @remarks + * **NOTE:** MongoClient must be connected prior to calling this method due to a known limitation in this legacy implementation. + * However, `collection.bulkWrite()` provides an equivalent API that does not require prior connecting. */ - indexInformation(name: string, callback: MongoCallback): void - + initializeOrderedBulkOp(options?: BulkWriteOptions): OrderedBulkOperation /** - * Retrieves this collections index info. + * An estimated count of matching documents in the db to a filter. * - * @param name The name of the collection. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#indexInformation - */ - indexInformation( - name: string, - options?: IndexInformationOptions, - ): Promise - - /** - * Retrieves this collections index info. + * **NOTE:** This method has been deprecated, since it does not provide an accurate count of the documents + * in a collection. To obtain an accurate count of documents in the collection, use {@link Collection#countDocuments| countDocuments}. + * To obtain an estimated count of all documents in the collection, use {@link Collection#estimatedDocumentCount| estimatedDocumentCount}. * - * @param name The name of the collection. - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#indexInformation - */ - indexInformation( - name: string, - options: IndexInformationOptions, - callback: MongoCallback, - ): void - - /** - * Get the list of all collection information for the specified db. + * @deprecated use {@link Collection#countDocuments| countDocuments} or {@link Collection#estimatedDocumentCount| estimatedDocumentCount} instead * - * @param filter Query to filter collections by. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#listCollections + * @param filter - The filter for the count. + * @param options - Optional settings for the command */ - listCollections( - filter: Object, - options?: ListCollectionsOptions, - ): CommandCursor + count(filter?: Filter, options?: CountOptions): Promise +} - /** - * Logout user from server, fire off on all connections and remove all auth info. - * - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#logout - */ - logout(callback: MongoCallback): void +/** @public */ +export declare interface CollectionInfo extends Document { + name: string + type?: string + options?: Document + info?: { + readOnly?: false + uuid?: Binary + } + idIndex?: Document +} - /** - * Logout user from server, fire off on all connections and remove all auth info. - * - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#logout - */ - logout(options?: { dbName?: string }): Promise +/** @public */ +export declare interface CollectionOptions + extends BSONSerializeOptions, + WriteConcernOptions { + /** Specify a read concern for the collection. (only MongoDB 3.2 or higher supported) */ + readConcern?: ReadConcernLike + /** The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST). */ + readPreference?: ReadPreferenceLike +} - /** - * Logout user from server, fire off on all connections and remove all auth info. - * - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#logout - */ - logout(options: { dbName?: string }, callback: MongoCallback): void +/* Excluded from this release type: CollectionPrivate */ - /** - * Open the database. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#open - */ - open(): Promise +/** + * @public + * @see https://www.mongodb.com/docs/manual/reference/command/collStats/ + */ +export declare interface CollStats extends Document { + /** Namespace */ + ns: string + /** Number of documents */ + count: number + /** Collection size in bytes */ + size: number + /** Average object size in bytes */ + avgObjSize: number + /** (Pre)allocated space for the collection in bytes */ + storageSize: number + /** Number of extents (contiguously allocated chunks of datafile space) */ + numExtents: number + /** Number of indexes */ + nindexes: number + /** Size of the most recently created extent in bytes */ + lastExtentSize: number + /** Padding can speed up updates if documents grow */ + paddingFactor: number + /** A number that indicates the user-set flags on the collection. userFlags only appears when using the mmapv1 storage engine */ + userFlags?: number + /** Total index size in bytes */ + totalIndexSize: number + /** Size of specific indexes in bytes */ + indexSizes: { + _id_: number + [index: string]: number + } + /** `true` if the collection is capped */ + capped: boolean + /** The maximum number of documents that may be present in a capped collection */ + max: number + /** The maximum size of a capped collection */ + maxSize: number + /** This document contains data reported directly by the WiredTiger engine and other data for internal diagnostic use */ + wiredTiger?: WiredTigerData + /** The fields in this document are the names of the indexes, while the values themselves are documents that contain statistics for the index provided by the storage engine */ + indexDetails?: any + ok: number + /** The amount of storage available for reuse. The scale argument affects this value. */ + freeStorageSize?: number + /** An array that contains the names of the indexes that are currently being built on the collection */ + indexBuilds?: number + /** The sum of the storageSize and totalIndexSize. The scale argument affects this value */ + totalSize: number + /** The scale value used by the command. */ + scaleFactor: number +} - /** - * Open the database - * - * @param callback Callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#open - */ - open(callback: MongoCallback): void +/** @public */ +export declare interface CollStatsOptions extends CommandOperationOptions { + /** Divide the returned sizes by scale value. */ + scale?: number +} - /** - * - * @param username - * @param callback - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#removeUser - */ - removeUser(username: string, callback: MongoCallback): void - removeUser( - username: string, - options?: { w?: number | string; wtimeout?: number; j?: boolean }, - ): Promise - removeUser( - username: string, - options: { w?: number | string; wtimeout?: number; j?: boolean }, - callback: MongoCallback, - ): void +/** + * An event indicating the failure of a given command + * @public + * @category Event + */ +export declare class CommandFailedEvent { + address: string + connectionId?: string | number + requestId: number + duration: number + commandName: string + failure: Error + serviceId?: ObjectId + /* Excluded from this release type: __constructor */ + get hasServiceId(): boolean +} +/* Excluded from this release type: CommandOperation */ + +/** @public */ +export declare interface CommandOperationOptions + extends OperationOptions, + WriteConcernOptions, + ExplainOptions { + /** Specify a read concern and level for the collection. (only MongoDB 3.2 or higher supported) */ + readConcern?: ReadConcernLike + /** Collation */ + collation?: CollationOptions + maxTimeMS?: number /** - * Rename a collection. + * Comment to apply to the operation. * - * @param fromCollection Name of current collection to rename. - * @param toCollection New name of of the collection. - * @param callback The results callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#renameCollection - */ - renameCollection( - fromCollection: string, - toCollection: string, - callback: MongoCallback>, - ): void - - /** - * Rename a collection. + * In server versions pre-4.4, 'comment' must be string. A server + * error will be thrown if any other type is provided. * - * @param fromCollection Name of current collection to rename. - * @param toCollection New name of of the collection. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#renameCollection + * In server versions 4.4 and above, 'comment' can be any valid BSON type. */ - renameCollection( - fromCollection: string, - toCollection: string, - options?: { dropTarget?: boolean }, - ): Promise> + comment?: unknown + /** Should retry failed writes */ + retryWrites?: boolean + dbName?: string + authdb?: string + noResponse?: boolean +} - /** - * Rename a collection. - * - * @param fromCollection Name of current collection to rename. - * @param toCollection New name of of the collection. - * @param options Optional settings. - * @param callback The results callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#renameCollection - */ - renameCollection( - fromCollection: string, - toCollection: string, - options: { dropTarget?: boolean }, - callback: MongoCallback>, - ): void +/* Excluded from this release type: CommandOptions */ - /** - * Get all the db statistics. - * - * @param callback The collection result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#stats - */ - stats(callback: MongoCallback): void +/** + * An event indicating the start of a given + * @public + * @category Event + */ +export declare class CommandStartedEvent { + commandObj?: Document + requestId: number + databaseName: string + commandName: string + command: Document + address: string + connectionId?: string | number + serviceId?: ObjectId + /* Excluded from this release type: __constructor */ + get hasServiceId(): boolean +} - /** - * Get all the db statistics. - * - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#stats - */ - stats(options?: { scale?: number }): Promise +/** + * An event indicating the success of a given command + * @public + * @category Event + */ +export declare class CommandSucceededEvent { + address: string + connectionId?: string | number + requestId: number + duration: number + commandName: string + reply: unknown + serviceId?: ObjectId + /* Excluded from this release type: __constructor */ + get hasServiceId(): boolean +} - /** - * Get all the db statistics. - * - * @param options Optional settings. - * @param callback The collection result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#stats - */ - stats(options: { scale?: number }, callback: MongoCallback): void +/** @public */ +export declare type CommonEvents = "newListener" | "removeListener" - /** - * Create a new Change Stream, watching for new changes (insertions, updates, replacements, deletions, and invalidations) in this database. Will ignore all changes to system collections. - * @param pipeline An array of aggregation pipeline stages through which to pass change stream documents. This allows for filtering (using $match) and manipulating the change stream documents. - * @param options Optional settings. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#watch - */ - watch( - pipeline?: Object[], - options?: ChangeStreamOptions & { - startAtClusterTime?: Timestamp - session?: ClientSession - }, - ): ChangeStream -} +/** @public */ +export declare const Compressor: Readonly<{ + readonly none: 0 + readonly snappy: 1 + readonly zlib: 2 + readonly zstd: 3 +}> + +/** @public */ +export declare type Compressor = (typeof Compressor)[CompressorName] + +/** @public */ +export declare type CompressorName = keyof typeof Compressor + +/** @public */ +export declare type Condition = + | AlternativeType + | FilterOperators> + +/* Excluded from this release type: Connection */ /** - * Server. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Server.html + * An event published when a connection is checked into the connection pool + * @public + * @category Event */ -export declare class Server extends EventEmitter { - /** - * - * @param host The host for the server, can be either an IP4, IP6 or domain socket style host. - * @param port The server port if IP4. - * @param options Optional. - */ - constructor(host: string, port: number, options?: ServerOptions) - - /** - * All raw connections. - */ - connections(): Array +export declare class ConnectionCheckedInEvent extends ConnectionPoolMonitoringEvent { + /** The id of the connection */ + connectionId: number | "" + /* Excluded from this release type: __constructor */ } /** - * ReplSet. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/ReplSet.html + * An event published when a connection is checked out of the connection pool + * @public + * @category Event */ -export declare class ReplSet extends EventEmitter { - /** - * - * @param servers A seedlist of servers participating in the replicaset. - * @param options Optional. - */ - constructor(servers: Array, options?: ReplSetOptions) +export declare class ConnectionCheckedOutEvent extends ConnectionPoolMonitoringEvent { + /** The id of the connection */ + connectionId: number | "" + /* Excluded from this release type: __constructor */ +} - /** - * All raw connections - */ - connections(): Array +/** + * An event published when a request to check a connection out fails + * @public + * @category Event + */ +export declare class ConnectionCheckOutFailedEvent extends ConnectionPoolMonitoringEvent { + /** The reason the attempt to check out failed */ + reason: AnyError | string + /* Excluded from this release type: __constructor */ } /** - * Mongos. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Mongos.html + * An event published when a request to check a connection out begins + * @public + * @category Event */ -export declare class Mongos extends EventEmitter { - /** - * - * @param servers A seedlist of servers participating in the replicaset. - * @param options Optional. - */ - constructor(servers: Array, options?: MongosOptions) +export declare class ConnectionCheckOutStartedEvent extends ConnectionPoolMonitoringEvent { + /* Excluded from this release type: __constructor */ +} - /** - * All raw connections - */ - connections(): Array +/** + * An event published when a connection is closed + * @public + * @category Event + */ +export declare class ConnectionClosedEvent extends ConnectionPoolMonitoringEvent { + /** The id of the connection */ + connectionId: number | "" + /** The reason the connection was closed */ + reason: string + serviceId?: ObjectId + /* Excluded from this release type: __constructor */ } /** - * Creates a new Db instance. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#addUser + * An event published when a connection pool creates a new connection + * @public + * @category Event */ -export interface DbAddUserOptions { - /** - * The write concern. - */ - w?: string | number +export declare class ConnectionCreatedEvent extends ConnectionPoolMonitoringEvent { + /** A monotonically increasing, per-pool id for the newly created connection */ + connectionId: number | "" + /* Excluded from this release type: __constructor */ +} - /** - * The write concern timeout. - */ - wtimeout?: number +/** @public */ +export declare type ConnectionEvents = { + commandStarted(event: CommandStartedEvent): void + commandSucceeded(event: CommandSucceededEvent): void + commandFailed(event: CommandFailedEvent): void + clusterTimeReceived(clusterTime: Document): void + close(): void + message(message: any): void + pinned(pinType: string): void + unpinned(pinType: string): void +} - /** - * Specify a journal write concern. - */ - j?: boolean +/** @public */ +export declare interface ConnectionOptions + extends SupportedNodeConnectionOptions, + StreamDescriptionOptions, + ProxyOptions { + id: number | "" + generation: number + hostAddress: HostAddress + autoEncrypter?: AutoEncrypter + serverApi?: ServerApi + monitorCommands: boolean + /* Excluded from this release type: connectionType */ + credentials?: MongoCredentials + connectTimeoutMS?: number + tls: boolean + keepAlive?: boolean + keepAliveInitialDelay?: number + noDelay?: boolean + socketTimeoutMS?: number + cancellationToken?: CancellationToken + metadata: ClientMetadata +} - /** - * Custom data associated with the user (only Mongodb 2.6 or higher). - */ - customData?: Object +/* Excluded from this release type: ConnectionPool */ - /** - * Roles associated with the created user (only Mongodb 2.6 or higher). - */ - roles?: Object[] +/** + * An event published when a connection pool is cleared + * @public + * @category Event + */ +export declare class ConnectionPoolClearedEvent extends ConnectionPoolMonitoringEvent { + /* Excluded from this release type: serviceId */ + interruptInUseConnections?: boolean + /* Excluded from this release type: __constructor */ } /** - * Creates a new Db instance. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#createCollection + * An event published when a connection pool is closed + * @public + * @category Event */ -export interface CollectionCreateOptions { - /** - * The write concern. - */ - w?: number | string +export declare class ConnectionPoolClosedEvent extends ConnectionPoolMonitoringEvent { + /* Excluded from this release type: __constructor */ +} - /** - * The write concern timeout. - */ - wtimeout?: number +/** + * An event published when a connection pool is created + * @public + * @category Event + */ +export declare class ConnectionPoolCreatedEvent extends ConnectionPoolMonitoringEvent { + /** The options used to create this connection pool */ + options?: ConnectionPoolOptions + /* Excluded from this release type: __constructor */ +} - /** - * Specify a journal write concern. - */ - j?: boolean +/** @public */ +export declare type ConnectionPoolEvents = { + connectionPoolCreated(event: ConnectionPoolCreatedEvent): void + connectionPoolReady(event: ConnectionPoolReadyEvent): void + connectionPoolClosed(event: ConnectionPoolClosedEvent): void + connectionPoolCleared(event: ConnectionPoolClearedEvent): void + connectionCreated(event: ConnectionCreatedEvent): void + connectionReady(event: ConnectionReadyEvent): void + connectionClosed(event: ConnectionClosedEvent): void + connectionCheckOutStarted(event: ConnectionCheckOutStartedEvent): void + connectionCheckOutFailed(event: ConnectionCheckOutFailedEvent): void + connectionCheckedOut(event: ConnectionCheckedOutEvent): void + connectionCheckedIn(event: ConnectionCheckedInEvent): void +} & Omit + +/* Excluded from this release type: ConnectionPoolMetrics */ - /** - * Return document results as raw BSON buffers. - */ - raw?: boolean +/** + * The base export class for all monitoring events published from the connection pool + * @public + * @category Event + */ +export declare class ConnectionPoolMonitoringEvent { + /** A timestamp when the event was created */ + time: Date + /** The address (host/port pair) of the pool */ + address: string + /* Excluded from this release type: __constructor */ +} - /** - * A primary key factory object for generation of custom _id keys. - */ - pkFactory?: Object +/** @public */ +export declare interface ConnectionPoolOptions + extends Omit { + /** The maximum number of connections that may be associated with a pool at a given time. This includes in use and available connections. */ + maxPoolSize: number + /** The minimum number of connections that MUST exist at any moment in a single connection pool. */ + minPoolSize: number + /** The maximum number of connections that may be in the process of being established concurrently by the connection pool. */ + maxConnecting: number + /** The maximum amount of time a connection should remain idle in the connection pool before being marked idle. */ + maxIdleTimeMS: number + /** The maximum amount of time operation execution should wait for a connection to become available. The default is 0 which means there is no limit. */ + waitQueueTimeoutMS: number + /** If we are in load balancer mode. */ + loadBalanced: boolean + /* Excluded from this release type: minPoolSizeCheckFrequencyMS */ +} - /** - * The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST). - */ - readPreference?: ReadPreference | string - - /** - * Serialize functions on any object. - */ - serializeFunctions?: boolean - - /** - * Returns an error if the collection does not exist. - */ - strict?: boolean - - /** - * Create a capped collection. - */ - capped?: boolean - - /** - * The size of the capped collection in bytes. - */ - size?: number - - /** - * The maximum number of documents in the capped collection. - */ - max?: number - - /** - * Create an index on the _id field of the document, True by default on MongoDB 2.2 or higher off for version < 2.2. - */ - autoIndexId?: boolean +/** + * An event published when a connection pool is ready + * @public + * @category Event + */ +export declare class ConnectionPoolReadyEvent extends ConnectionPoolMonitoringEvent { + /* Excluded from this release type: __constructor */ } /** - * Creates a new Db instance. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#collection + * An event published when a connection is ready for use + * @public + * @category Event */ -export interface DbCollectionOptions { - /** - * The write concern. - */ - w?: number | string - - /** - * The write concern timeout. - */ - wtimeout?: number - - /** - * Specify a journal write concern. - */ - j?: boolean +export declare class ConnectionReadyEvent extends ConnectionPoolMonitoringEvent { + /** The id of the connection */ + connectionId: number | "" + /* Excluded from this release type: __constructor */ +} - /** - * Return document results as raw BSON buffers. - */ - raw?: boolean +/** @public */ +export declare interface ConnectOptions { + readPreference?: ReadPreference +} - /** - * A primary key factory object for generation of custom _id keys. - */ - pkFactory?: Object +/** @public */ +export declare interface CountDocumentsOptions extends AggregateOptions { + /** The number of documents to skip. */ + skip?: number + /** The maximum amounts to count before aborting. */ + limit?: number +} - /** - * The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST). - */ - readPreference?: ReadPreference | string +/** @public */ +export declare interface CountOptions extends CommandOperationOptions { + /** The number of documents to skip. */ + skip?: number + /** The maximum amounts to count before aborting. */ + limit?: number + /** Number of milliseconds to wait before aborting the query. */ + maxTimeMS?: number + /** An index name hint for the query. */ + hint?: string | Document +} +/** @public */ +export declare interface CreateCollectionOptions + extends CommandOperationOptions { + /** Returns an error if the collection does not exist */ + strict?: boolean + /** Create a capped collection */ + capped?: boolean + /** @deprecated Create an index on the _id field of the document. This option is deprecated in MongoDB 3.2+ and will be removed once no longer supported by the server. */ + autoIndexId?: boolean + /** The size of the capped collection in bytes */ + size?: number + /** The maximum number of documents in the capped collection */ + max?: number + /** Available for the MMAPv1 storage engine only to set the usePowerOf2Sizes and the noPadding flag */ + flags?: number + /** Allows users to specify configuration to the storage engine on a per-collection basis when creating a collection */ + storageEngine?: Document + /** Allows users to specify validation rules or expressions for the collection. For more information, see Document Validation */ + validator?: Document + /** Determines how strictly MongoDB applies the validation rules to existing documents during an update */ + validationLevel?: string + /** Determines whether to error on invalid documents or just warn about the violations but allow invalid documents to be inserted */ + validationAction?: string + /** Allows users to specify a default configuration for indexes when creating a collection */ + indexOptionDefaults?: Document + /** The name of the source collection or view from which to create the view. The name is not the full namespace of the collection or view (i.e., does not include the database name and implies the same database as the view to create) */ + viewOn?: string + /** An array that consists of the aggregation pipeline stage. Creates the view by applying the specified pipeline to the viewOn collection or view */ + pipeline?: Document[] + /** A primary key factory function for generation of custom _id keys. */ + pkFactory?: PkFactory + /** A document specifying configuration options for timeseries collections. */ + timeseries?: TimeSeriesCollectionOptions + /** A document specifying configuration options for clustered collections. For MongoDB 5.3 and above. */ + clusteredIndex?: ClusteredCollectionOptions + /** The number of seconds after which a document in a timeseries or clustered collection expires. */ + expireAfterSeconds?: number + /** @experimental */ + encryptedFields?: Document /** - * Serialize functions on any object. + * If set, enables pre-update and post-update document events to be included for any + * change streams that listen on this collection. */ - serializeFunctions?: boolean + changeStreamPreAndPostImages?: { + enabled: boolean + } +} - /** - * Returns an error if the collection does not exist. - */ - strict?: boolean +/** @public */ +export declare interface CreateIndexesOptions + extends Omit { + /** Creates the index in the background, yielding whenever possible. */ + background?: boolean + /** Creates an unique index. */ + unique?: boolean + /** Override the autogenerated index name (useful if the resulting name is larger than 128 bytes) */ + name?: string + /** Creates a partial index based on the given filter object (MongoDB 3.2 or higher) */ + partialFilterExpression?: Document + /** Creates a sparse index. */ + sparse?: boolean + /** Allows you to expire data on indexes applied to a data (MongoDB 2.2 or higher) */ + expireAfterSeconds?: number + /** Allows users to configure the storage engine on a per-index basis when creating an index. (MongoDB 3.0 or higher) */ + storageEngine?: Document + /** (MongoDB 4.4. or higher) Specifies how many data-bearing members of a replica set, including the primary, must complete the index builds successfully before the primary marks the indexes as ready. This option accepts the same values for the "w" field in a write concern plus "votingMembers", which indicates all voting data-bearing nodes. */ + commitQuorum?: number | string + /** Specifies the index version number, either 0 or 1. */ + version?: number + weights?: Document + default_language?: string + language_override?: string + textIndexVersion?: number + "2dsphereIndexVersion"?: number + bits?: number + /** For geospatial indexes set the lower bound for the co-ordinates. */ + min?: number + /** For geospatial indexes set the high bound for the co-ordinates. */ + max?: number + bucketSize?: number + wildcardProjection?: Document + /** Specifies that the index should exist on the target collection but should not be used by the query planner when executing operations. (MongoDB 4.4 or higher) */ + hidden?: boolean +} - /** - * Specify a read concern for the collection. (only MongoDB 3.2 or higher supported). - */ - readConcern?: ReadConcern +/** @public */ +export declare const CURSOR_FLAGS: readonly [ + "tailable", + "oplogReplay", + "noCursorTimeout", + "awaitData", + "exhaust", + "partial", +] + +/** @public */ +export declare type CursorFlag = (typeof CURSOR_FLAGS)[number] + +/** @public */ +export declare interface CursorStreamOptions { + /** A transformation method applied to each document emitted by the stream */ + transform?(this: void, doc: Document): Document } /** - * Creates an index on the db and collection collection. + * The **Db** class is a class that represents a MongoDB Database. + * @public + * + * @example + * ```ts + * import { MongoClient } from 'mongodb'; * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Db.html#createIndex + * interface Pet { + * name: string; + * kind: 'dog' | 'cat' | 'fish'; + * } + * + * const client = new MongoClient('mongodb://localhost:27017'); + * const db = client.db(); + * + * // Create a collection that validates our union + * await db.createCollection('pets', { + * validator: { $expr: { $in: ['$kind', ['dog', 'cat', 'fish']] } } + * }) + * ``` */ -export interface MongodbIndexOptions { +export declare class Db { + /* Excluded from this release type: s */ + static SYSTEM_NAMESPACE_COLLECTION: string + static SYSTEM_INDEX_COLLECTION: string + static SYSTEM_PROFILE_COLLECTION: string + static SYSTEM_USER_COLLECTION: string + static SYSTEM_COMMAND_COLLECTION: string + static SYSTEM_JS_COLLECTION: string /** - * The write concern. + * Creates a new Db instance + * + * @param client - The MongoClient for the database. + * @param databaseName - The name of the database this instance represents. + * @param options - Optional settings for Db construction */ - w?: number | string - + constructor(client: MongoClient, databaseName: string, options?: DbOptions) + get databaseName(): string + get options(): DbOptions | undefined /** - * The write concern timeout. + * Check if a secondary can be used (because the read preference is *not* set to primary) */ - wtimeout?: number - + get secondaryOk(): boolean + get readConcern(): ReadConcern | undefined /** - * Specify a journal write concern. + * The current readPreference of the Db. If not explicitly defined for + * this Db, will be inherited from the parent MongoClient */ - j?: boolean - + get readPreference(): ReadPreference + get bsonOptions(): BSONSerializeOptions + get writeConcern(): WriteConcern | undefined + get namespace(): string /** - * Creates an unique index. + * Create a new collection on a server with the specified options. Use this to create capped collections. + * More information about command options available at https://www.mongodb.com/docs/manual/reference/command/create/ + * + * @param name - The name of the collection to create + * @param options - Optional settings for the command */ - unique?: boolean - + createCollection( + name: string, + options?: CreateCollectionOptions, + ): Promise> /** - * Creates a sparse index. + * Execute a command + * + * @remarks + * This command does not inherit options from the MongoClient. + * + * @param command - The command to run + * @param options - Optional settings for the command */ - sparse?: boolean - + command(command: Document, options?: RunCommandOptions): Promise /** - * Creates the index in the background, yielding whenever possible. + * Execute an aggregation framework pipeline against the database, needs MongoDB \>= 3.6 + * + * @param pipeline - An array of aggregation stages to be executed + * @param options - Optional settings for the command */ - background?: boolean - + aggregate( + pipeline?: Document[], + options?: AggregateOptions, + ): AggregationCursor + /** Return the Admin db instance */ + admin(): Admin /** - * A unique index cannot be created on a key that has pre-existing duplicate values. - * If you would like to create the index anyway, keeping the first document - * the database indexes and deleting all subsequent documents that have duplicate value. + * Returns a reference to a MongoDB Collection. If it does not exist it will be created implicitly. + * + * @param name - the collection name we wish to access. + * @returns return the new Collection instance */ - dropDups?: boolean - + collection( + name: string, + options?: CollectionOptions, + ): Collection /** - * For geospatial indexes set the lower bound for the co-ordinates. + * Get all the db statistics. + * + * @param options - Optional settings for the command */ - min?: number - + stats(options?: DbStatsOptions): Promise /** - * For geospatial indexes set the high bound for the co-ordinates. + * List all collections of this database with optional filter + * + * @param filter - Query to filter collections by + * @param options - Optional settings for the command */ - max?: number - + listCollections( + filter: Document, + options: Exclude & { + nameOnly: true + }, + ): ListCollectionsCursor> + listCollections( + filter: Document, + options: Exclude & { + nameOnly: false + }, + ): ListCollectionsCursor + listCollections< + T extends Pick | CollectionInfo = + | Pick + | CollectionInfo, + >( + filter?: Document, + options?: ListCollectionsOptions, + ): ListCollectionsCursor /** - * Specify the format version of the indexes. + * Rename a collection. + * + * @remarks + * This operation does not inherit options from the MongoClient. + * + * @param fromCollection - Name of current collection to rename + * @param toCollection - New name of of the collection + * @param options - Optional settings for the command */ - v?: number - + renameCollection( + fromCollection: string, + toCollection: string, + options?: RenameOptions, + ): Promise> /** - * Allows you to expire data on indexes applied to a data (MongoDB 2.2 or higher). + * Drop a collection from the database, removing it permanently. New accesses will create a new collection. + * + * @param name - Name of collection to drop + * @param options - Optional settings for the command */ - expireAfterSeconds?: number - + dropCollection( + name: string, + options?: DropCollectionOptions, + ): Promise /** - * Override the autogenerated index name (useful if the resulting name is larger than 128 bytes). + * Drop a database, removing it permanently from the server. + * + * @param options - Optional settings for the command */ - name?: string -} - -/** - * Admin. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html - */ -export interface Admin { + dropDatabase(options?: DropDatabaseOptions): Promise /** - * Add a user to the database. + * Fetch all collections for the current db. * - * @param username The username. - * @param password The password. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#addUser + * @param options - Optional settings for the command */ - addUser( - username: string, - password: string, - callback: MongoCallback, - ): void - + collections(options?: ListCollectionsOptions): Promise /** - * Add a user to the database. + * Creates an index on the db and collection. * - * @param username The username. - * @param password The password. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#addUser + * @param name - Name of the collection to create the index on. + * @param indexSpec - Specify the field to index, or an index specification + * @param options - Optional settings for the command */ - addUser( - username: string, - password: string, - options?: AddUserOptions, - ): Promise - + createIndex( + name: string, + indexSpec: IndexSpecification, + options?: CreateIndexesOptions, + ): Promise /** - * Add a user to the database. + * Add a user to the database * - * @param username The username. - * @param password The password. - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#addUser + * @param username - The username for the new user + * @param passwordOrOptions - An optional password for the new user, or the options for the command + * @param options - Optional settings for the command */ addUser( username: string, - password: string, - options: AddUserOptions, - callback: MongoCallback, - ): void - + passwordOrOptions?: string | AddUserOptions, + options?: AddUserOptions, + ): Promise /** - * Authenticate a user against the server. + * Remove a user from a database * - * @param username The username. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#authenticate + * @param username - The username to remove + * @param options - Optional settings for the command */ - authenticate(username: string, callback: MongoCallback): void - + removeUser(username: string, options?: RemoveUserOptions): Promise /** - * Authenticate a user against the server. + * Set the current profiling level of MongoDB * - * @param username The username. - * @param password The password. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#authenticate + * @param level - The new profiling level (off, slow_only, all). + * @param options - Optional settings for the command */ - authenticate(username: string, password?: string): Promise - + setProfilingLevel( + level: ProfilingLevel, + options?: SetProfilingLevelOptions, + ): Promise /** - * Authenticate a user against the server. + * Retrieve the current profiling Level for MongoDB * - * @param username The username. - * @param password The password. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#authenticate + * @param options - Optional settings for the command */ - authenticate( - username: string, - password: string, - callback: MongoCallback, - ): void - + profilingLevel(options?: ProfilingLevelOptions): Promise /** - * Retrieve the server information for the current instance of the db client + * Retrieves this collections index info. * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#buildInfo + * @param name - The name of the collection. + * @param options - Optional settings for the command */ - buildInfo(): Promise + indexInformation( + name: string, + options?: IndexInformationOptions, + ): Promise + /** + * Create a new Change Stream, watching for new changes (insertions, updates, + * replacements, deletions, and invalidations) in this database. Will ignore all + * changes to system collections. + * + * @remarks + * watch() accepts two generic arguments for distinct use cases: + * - The first is to provide the schema that may be defined for all the collections within this database + * - The second is to override the shape of the change stream document entirely, if it is not provided the type will default to ChangeStreamDocument of the first argument + * + * @param pipeline - An array of {@link https://www.mongodb.com/docs/manual/reference/operator/aggregation-pipeline/|aggregation pipeline stages} through which to pass change stream documents. This allows for filtering (using $match) and manipulating the change stream documents. + * @param options - Optional settings for the command + * @typeParam TSchema - Type of the data being detected by the change stream + * @typeParam TChange - Type of the whole change stream document emitted + */ + watch< + TSchema extends Document = Document, + TChange extends Document = ChangeStreamDocument, + >( + pipeline?: Document[], + options?: ChangeStreamOptions, + ): ChangeStream +} - /** - * Retrieve the server information for the current instance of the db client - * - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#buildInfo - */ - buildInfo(callback: MongoCallback): void +/* Excluded from this release type: DB_AGGREGATE_COLLECTION */ + +/** @public */ +export declare interface DbOptions + extends BSONSerializeOptions, + WriteConcernOptions { + /** If the database authentication is dependent on another databaseName. */ + authSource?: string + /** Force server to assign _id values instead of driver. */ + forceServerObjectId?: boolean + /** The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST). */ + readPreference?: ReadPreferenceLike + /** A primary key factory object for generation of custom _id keys. */ + pkFactory?: PkFactory + /** Specify a read concern for the collection. (only MongoDB 3.2 or higher supported) */ + readConcern?: ReadConcern + /** Should retry failed writes */ + retryWrites?: boolean +} + +/* Excluded from this release type: DbPrivate */ +export { DBRef } + +/** @public */ +export declare interface DbStatsOptions extends CommandOperationOptions { + /** Divide the returned sizes by scale value. */ + scale?: number +} + +export { Decimal128 } + +/** @public */ +export declare interface DeleteManyModel { + /** The filter to limit the deleted documents. */ + filter: Filter + /** Specifies a collation. */ + collation?: CollationOptions + /** The index to use. If specified, then the query system will only consider plans using the hinted index. */ + hint?: Hint +} + +/** @public */ +export declare interface DeleteOneModel { + /** The filter to limit the deleted documents. */ + filter: Filter + /** Specifies a collation. */ + collation?: CollationOptions + /** The index to use. If specified, then the query system will only consider plans using the hinted index. */ + hint?: Hint +} + +/** @public */ +export declare interface DeleteOptions + extends CommandOperationOptions, + WriteConcernOptions { + /** If true, when an insert fails, don't execute the remaining writes. If false, continue with remaining inserts when one fails. */ + ordered?: boolean + /** Specifies the collation to use for the operation */ + collation?: CollationOptions + /** Specify that the update query should only consider plans using the hinted index */ + hint?: string | Document + /** Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0). */ + let?: Document +} + +/** @public */ +export declare interface DeleteResult { + /** Indicates whether this write result was acknowledged. If not, then all other members of this result will be undefined. */ + acknowledged: boolean + /** The number of documents that were deleted */ + deletedCount: number +} + +/** @public */ +export declare interface DeleteStatement { + /** The query that matches documents to delete. */ + q: Document + /** The number of matching documents to delete. */ + limit: number + /** Specifies the collation to use for the operation. */ + collation?: CollationOptions + /** A document or string that specifies the index to use to support the query predicate. */ + hint?: Hint +} + +export { deserialize } + +/* Excluded from this release type: DestroyOptions */ + +/** @public */ +export declare type DistinctOptions = CommandOperationOptions + +export { Document } + +export { Double } + +/** @public */ +export declare interface DriverInfo { + name?: string + version?: string + platform?: string +} + +/** @public */ +export declare interface DropCollectionOptions extends CommandOperationOptions { + /** @experimental */ + encryptedFields?: Document +} +/** @public */ +export declare type DropDatabaseOptions = CommandOperationOptions + +/** @public */ +export declare type DropIndexesOptions = CommandOperationOptions + +/* Excluded from this release type: Encrypter */ + +/* Excluded from this release type: EncrypterOptions */ + +/** @public */ +export declare interface EndSessionOptions { + /* Excluded from this release type: error */ + force?: boolean + forceClear?: boolean +} + +/** TypeScript Omit (Exclude to be specific) does not work for objects with an "any" indexed type, and breaks discriminated unions @public */ +export declare type EnhancedOmit = + string extends keyof TRecordOrUnion + ? TRecordOrUnion + : TRecordOrUnion extends any + ? Pick> + : never + +/** @public */ +export declare interface ErrorDescription extends Document { + message?: string + errmsg?: string + $err?: string + errorLabels?: string[] + errInfo?: Document +} + +/** @public */ +export declare interface EstimatedDocumentCountOptions + extends CommandOperationOptions { /** - * Execute a command. + * The maximum amount of time to allow the operation to run. * - * @param command The command hash. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#command + * This option is sent only if the caller explicitly provides a value. The default is to not send a value. */ - command(command: Object, callback: MongoCallback): void + maxTimeMS?: number +} + +/** @public */ +export declare interface EvalOptions extends CommandOperationOptions { + nolock?: boolean +} + +/** @public */ +export declare type EventEmitterWithState = { + /* Excluded from this release type: stateChanged */ +} + +/** + * Event description type + * @public + */ +export declare type EventsDescription = Record + +/* Excluded from this release type: ExecutionResult */ + +/* Excluded from this release type: Explain */ + +/** @public */ +export declare interface ExplainOptions { + /** Specifies the verbosity mode for the explain output. */ + explain?: ExplainVerbosityLike +} + +/** @public */ +export declare const ExplainVerbosity: Readonly<{ + readonly queryPlanner: "queryPlanner" + readonly queryPlannerExtended: "queryPlannerExtended" + readonly executionStats: "executionStats" + readonly allPlansExecution: "allPlansExecution" +}> + +/** @public */ +export declare type ExplainVerbosity = string + +/** + * For backwards compatibility, true is interpreted as "allPlansExecution" + * and false as "queryPlanner". Prior to server version 3.6, aggregate() + * ignores the verbosity parameter and executes in "queryPlanner". + * @public + */ +export declare type ExplainVerbosityLike = ExplainVerbosity | boolean + +/** A MongoDB filter can be some portion of the schema or a set of operators @public */ +export declare type Filter = { + [P in keyof WithId]?: Condition[P]> +} & RootFilterOperators> + +/** @public */ +export declare type FilterOperations = T extends Record + ? { + [key in keyof T]?: FilterOperators + } + : FilterOperators + +/** @public */ +export declare interface FilterOperators + extends NonObjectIdLikeDocument { + $eq?: TValue + $gt?: TValue + $gte?: TValue + $in?: ReadonlyArray + $lt?: TValue + $lte?: TValue + $ne?: TValue + $nin?: ReadonlyArray + $not?: TValue extends string + ? FilterOperators | RegExp + : FilterOperators + /** + * When `true`, `$exists` matches the documents that contain the field, + * including documents where the field value is null. + */ + $exists?: boolean + $type?: BSONType | BSONTypeAlias + $expr?: Record + $jsonSchema?: Record + $mod?: TValue extends number ? [number, number] : never + $regex?: TValue extends string ? RegExp | BSONRegExp | string : never + $options?: TValue extends string ? string : never + $geoIntersects?: { + $geometry: Document + } + $geoWithin?: Document + $near?: Document + $nearSphere?: Document + $maxDistance?: number + $all?: ReadonlyArray + $elemMatch?: Document + $size?: TValue extends ReadonlyArray ? number : never + $bitsAllClear?: BitwiseFilter + $bitsAllSet?: BitwiseFilter + $bitsAnyClear?: BitwiseFilter + $bitsAnySet?: BitwiseFilter + $rand?: Record +} +/** @public */ +export declare class FindCursor extends AbstractCursor { + /* Excluded from this release type: [kFilter] */ + /* Excluded from this release type: [kNumReturned] */ + /* Excluded from this release type: [kBuiltOptions] */ + /* Excluded from this release type: __constructor */ + clone(): FindCursor + map(transform: (doc: TSchema) => T): FindCursor + /* Excluded from this release type: _initialize */ + /* Excluded from this release type: _getMore */ /** - * Execute a command. - * - * @param command The command hash. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#command + * Get the count of documents for this cursor + * @deprecated Use `collection.estimatedDocumentCount` or `collection.countDocuments` instead */ - command(command: Object, options?: CommandOptions): Promise - + count(options?: CountOptions): Promise + /** Execute the explain for the cursor */ + explain(verbosity?: ExplainVerbosityLike): Promise + /** Set the cursor query */ + filter(filter: Document): this /** - * Execute a command. + * Set the cursor hint * - * @param command The command hash. - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#command + * @param hint - If specified, then the query system will only consider plans using the hinted index. */ - command( - command: Object, - options: CommandOptions, - callback: MongoCallback, - ): void - + hint(hint: Hint): this /** - * List the available databases. + * Set the cursor min * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#listDatabases + * @param min - Specify a $min value to specify the inclusive lower bound for a specific index in order to constrain the results of find(). The $min specifies the lower bound for all keys of a specific index in order. */ - listDatabases(): Promise - + min(min: Document): this /** - * List the available databases. + * Set the cursor max * - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#listDatabases + * @param max - Specify a $max value to specify the exclusive upper bound for a specific index in order to constrain the results of find(). The $max specifies the upper bound for all keys of a specific index in order. */ - listDatabases(callback: MongoCallback): void - + max(max: Document): this /** - * Logout user from server, fire off on all connections and remove all auth info. + * Set the cursor returnKey. + * If set to true, modifies the cursor to only return the index field or fields for the results of the query, rather than documents. + * If set to true and the query does not use an index to perform the read operation, the returned documents will not contain any fields. * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#logout. + * @param value - the returnKey value. */ - logout(): Promise - + returnKey(value: boolean): this /** - * Logout user from server, fire off on all connections and remove all auth info. + * Modifies the output of a query by adding a field $recordId to matching documents. $recordId is the internal key which uniquely identifies a document in a collection. * - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#logout. + * @param value - The $showDiskLoc option has now been deprecated and replaced with the showRecordId field. $showDiskLoc will still be accepted for OP_QUERY stye find. */ - logout(callback: MongoCallback): void - + showRecordId(value: boolean): this /** - * Ping the MongoDB server and retrieve results. + * Add a query modifier to the cursor query * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#ping + * @param name - The query modifier (must start with $, such as $orderby etc) + * @param value - The modifier value. */ - ping(): Promise - + addQueryModifier( + name: string, + value: string | boolean | number | Document, + ): this /** - * Ping the MongoDB server and retrieve results. + * Add a comment to the cursor query allowing for tracking the comment in the log. * - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#ping + * @param value - The comment attached to this query. */ - ping(callback: MongoCallback): void - + comment(value: string): this /** - * Retrive the current profiling information for MongoDB. + * Set a maxAwaitTimeMS on a tailing cursor query to allow to customize the timeout value for the option awaitData (Only supported on MongoDB 3.2 or higher, ignored otherwise) * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#profilingInfo + * @param value - Number of milliseconds to wait before aborting the tailed query. */ - profilingInfo(): Promise - + maxAwaitTimeMS(value: number): this /** - * Retrive the current profiling information for MongoDB. + * Set a maxTimeMS on the cursor query, allowing for hard timeout limits on queries (Only supported on MongoDB 2.6 or higher) * - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#profilingInfo + * @param value - Number of milliseconds to wait before aborting the query. */ - profilingInfo(callback: MongoCallback): void - + maxTimeMS(value: number): this /** - * Retrieve the current profiling Level for MongoDB. + * Add a project stage to the aggregation pipeline + * + * @remarks + * In order to strictly type this function you must provide an interface + * that represents the effect of your projection on the result documents. + * + * By default chaining a projection to your cursor changes the returned type to the generic + * {@link Document} type. + * You should specify a parameterized type to have assertions on your final results. * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#profilingLevel + * @example + * ```typescript + * // Best way + * const docs: FindCursor<{ a: number }> = cursor.project<{ a: number }>({ _id: 0, a: true }); + * // Flexible way + * const docs: FindCursor = cursor.project({ _id: 0, a: true }); + * ``` + * + * @remarks + * + * **Note for Typescript Users:** adding a transform changes the return type of the iteration of this cursor, + * it **does not** return a new instance of a cursor. This means when calling project, + * you should always assign the result to a new variable in order to get a correctly typed cursor variable. + * Take note of the following example: + * + * @example + * ```typescript + * const cursor: FindCursor<{ a: number; b: string }> = coll.find(); + * const projectCursor = cursor.project<{ a: number }>({ _id: 0, a: true }); + * const aPropOnlyArray: {a: number}[] = await projectCursor.toArray(); + * + * // or always use chaining and save the final cursor + * + * const cursor = coll.find().project<{ a: string }>({ + * _id: 0, + * a: { $convert: { input: '$a', to: 'string' } + * }}); + * ``` */ - profilingLevel(): Promise - + project(value: Document): FindCursor /** - * Retrieve the current profiling Level for MongoDB. + * Sets the sort order of the cursor query. * - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#profilingLevel + * @param sort - The key or keys set for the sort. + * @param direction - The direction of the sorting (1 or -1). */ - profilingLevel(callback: MongoCallback): void - + sort(sort: Sort | string, direction?: SortDirection): this /** - * Remove a user from a database. + * Allows disk use for blocking sort operations exceeding 100MB memory. (MongoDB 3.2 or higher) * - * @param username The username. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#removeUser + * @remarks + * {@link https://www.mongodb.com/docs/manual/reference/command/find/#find-cmd-allowdiskuse | find command allowDiskUse documentation} */ - removeUser(username: string, callback: MongoCallback): void - + allowDiskUse(allow?: boolean): this /** - * Remove a user from a database. + * Set the collation options for the cursor. * - * @param username The username. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#removeUser + * @param value - The cursor collation options (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields). */ - removeUser(username: string, options?: FSyncOptions): Promise - + collation(value: CollationOptions): this /** - * Remove a user from a database. + * Set the limit for the cursor. * - * @param username The username. - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#removeUser + * @param value - The limit for the cursor query. */ - removeUser( - username: string, - options: FSyncOptions, - callback: MongoCallback, - ): void - + limit(value: number): this /** - * Get ReplicaSet status. + * Set the skip for the cursor. * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#replSetGetStatus + * @param value - The skip for the cursor query. */ - replSetGetStatus(): Promise + skip(value: number): this +} - /** - * Get ReplicaSet status. - * - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#replSetGetStatus - */ - replSetGetStatus(callback: MongoCallback): void +/** @public */ +export declare interface FindOneAndDeleteOptions + extends CommandOperationOptions { + /** An optional hint for query optimization. See the {@link https://www.mongodb.com/docs/manual/reference/command/update/#update-command-hint|update command} reference for more information.*/ + hint?: Document + /** Limits the fields to return for all matching documents. */ + projection?: Document + /** Determines which document the operation modifies if the query selects multiple documents. */ + sort?: Sort + /** Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0). */ + let?: Document +} - /** - * Retrieve the server information for the current - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#serverInfo - */ - serverInfo(): Promise +/** @public */ +export declare interface FindOneAndReplaceOptions + extends CommandOperationOptions { + /** Allow driver to bypass schema validation in MongoDB 3.2 or higher. */ + bypassDocumentValidation?: boolean + /** An optional hint for query optimization. See the {@link https://www.mongodb.com/docs/manual/reference/command/update/#update-command-hint|update command} reference for more information.*/ + hint?: Document + /** Limits the fields to return for all matching documents. */ + projection?: Document + /** When set to 'after', returns the updated document rather than the original. The default is 'before'. */ + returnDocument?: ReturnDocument + /** Determines which document the operation modifies if the query selects multiple documents. */ + sort?: Sort + /** Upsert the document if it does not exist. */ + upsert?: boolean + /** Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0). */ + let?: Document +} - /** - * instance of the db client - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#serverInfo - * @param callback The command result callback. - */ - serverInfo(callback: MongoCallback): void +/** @public */ +export declare interface FindOneAndUpdateOptions + extends CommandOperationOptions { + /** Optional list of array filters referenced in filtered positional operators */ + arrayFilters?: Document[] + /** Allow driver to bypass schema validation in MongoDB 3.2 or higher. */ + bypassDocumentValidation?: boolean + /** An optional hint for query optimization. See the {@link https://www.mongodb.com/docs/manual/reference/command/update/#update-command-hint|update command} reference for more information.*/ + hint?: Document + /** Limits the fields to return for all matching documents. */ + projection?: Document + /** When set to 'after', returns the updated document rather than the original. The default is 'before'. */ + returnDocument?: ReturnDocument + /** Determines which document the operation modifies if the query selects multiple documents. */ + sort?: Sort + /** Upsert the document if it does not exist. */ + upsert?: boolean + /** Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0). */ + let?: Document +} - /** - * Retrieve this db's server status. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#serverStatus - */ - serverStatus(): Promise +/** + * A builder object that is returned from {@link BulkOperationBase#find}. + * Is used to build a write operation that involves a query filter. + * + * @public + */ +export declare class FindOperators { + bulkOperation: BulkOperationBase + /* Excluded from this release type: __constructor */ + /** Add a multiple update operation to the bulk operation */ + update(updateDocument: Document | Document[]): BulkOperationBase + /** Add a single update operation to the bulk operation */ + updateOne(updateDocument: Document | Document[]): BulkOperationBase + /** Add a replace one operation to the bulk operation */ + replaceOne(replacement: Document): BulkOperationBase + /** Add a delete one operation to the bulk operation */ + deleteOne(): BulkOperationBase + /** Add a delete many operation to the bulk operation */ + delete(): BulkOperationBase + /** Upsert modifier for update bulk operation, noting that this operation is an upsert. */ + upsert(): this + /** Specifies the collation for the query condition. */ + collation(collation: CollationOptions): this + /** Specifies arrayFilters for UpdateOne or UpdateMany bulk operations. */ + arrayFilters(arrayFilters: Document[]): this + /** Specifies hint for the bulk operation. */ + hint(hint: Hint): this +} + +/** + * @public + * @typeParam TSchema - Unused schema definition, deprecated usage, only specify `FindOptions` with no generic + */ +export declare interface FindOptions + extends Omit { + /** Sets the limit of documents returned in the query. */ + limit?: number + /** Set to sort the documents coming back from the query. Array of indexes, `[['a', 1]]` etc. */ + sort?: Sort + /** The fields to return in the query. Object of fields to either include or exclude (one of, not both), `{'a':1, 'b': 1}` **or** `{'a': 0, 'b': 0}` */ + projection?: Document + /** Set to skip N documents ahead in your query (useful for pagination). */ + skip?: number + /** Tell the query to use specific indexes in the query. Object of indexes to use, `{'_id':1}` */ + hint?: Hint + /** Specify if the cursor can timeout. */ + timeout?: boolean + /** Specify if the cursor is tailable. */ + tailable?: boolean + /** Specify if the cursor is a tailable-await cursor. Requires `tailable` to be true */ + awaitData?: boolean + /** Set the batchSize for the getMoreCommand when iterating over the query results. */ + batchSize?: number + /** If true, returns only the index keys in the resulting documents. */ + returnKey?: boolean + /** The inclusive lower bound for a specific index */ + min?: Document + /** The exclusive upper bound for a specific index */ + max?: Document + /** Number of milliseconds to wait before aborting the query. */ + maxTimeMS?: number + /** The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query. Requires `tailable` and `awaitData` to be true */ + maxAwaitTimeMS?: number + /** The server normally times out idle cursors after an inactivity period (10 minutes) to prevent excess memory use. Set this option to prevent that. */ + noCursorTimeout?: boolean + /** Specify collation (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields). */ + collation?: CollationOptions + /** Allows disk use for blocking sort operations exceeding 100MB memory. (MongoDB 3.2 or higher) */ + allowDiskUse?: boolean + /** Determines whether to close the cursor after the first batch. Defaults to false. */ + singleBatch?: boolean + /** For queries against a sharded collection, allows the command (or subsequent getMore commands) to return partial results, rather than an error, if one or more queried shards are unavailable. */ + allowPartialResults?: boolean + /** Determines whether to return the record identifier for each document. If true, adds a field $recordId to the returned documents. */ + showRecordId?: boolean + /** Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0). */ + let?: Document + /** + * Option to enable an optimized code path for queries looking for a particular range of `ts` values in the oplog. Requires `tailable` to be true. + * @deprecated Starting from MongoDB 4.4 this flag is not needed and will be ignored. + */ + oplogReplay?: boolean +} + +/** @public */ +export declare type Flatten = Type extends ReadonlyArray + ? Item + : Type + +/** @public */ +export declare type GenericListener = (...args: any[]) => void +/** + * Constructor for a streaming GridFS interface + * @public + */ +export declare class GridFSBucket extends TypedEventEmitter { + /* Excluded from this release type: s */ /** - * Retrieve this db's server status. - * - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#serverStatus + * When the first call to openUploadStream is made, the upload stream will + * check to see if it needs to create the proper indexes on the chunks and + * files collections. This event is fired either when 1) it determines that + * no index creation is necessary, 2) when it successfully creates the + * necessary indexes. + * @event */ - serverStatus(callback: MongoCallback): void - + static readonly INDEX: "index" + constructor(db: Db, options?: GridFSBucketOptions) /** - * Set the current profiling level of MongoDB. + * Returns a writable stream (GridFSBucketWriteStream) for writing + * buffers to GridFS. The stream's 'id' property contains the resulting + * file's id. * - * @param level The new profiling level (off, slow_only, all). - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#setProfilingLevel + * @param filename - The value of the 'filename' key in the files doc + * @param options - Optional settings. */ - setProfilingLevel(level: string): Promise - + openUploadStream( + filename: string, + options?: GridFSBucketWriteStreamOptions, + ): GridFSBucketWriteStream /** - * Set the current profiling level of MongoDB. - * - * @param level The new profiling level (off, slow_only, all). - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#setProfilingLevel + * Returns a writable stream (GridFSBucketWriteStream) for writing + * buffers to GridFS for a custom file id. The stream's 'id' property contains the resulting + * file's id. */ - setProfilingLevel(level: string, callback: MongoCallback): void - + openUploadStreamWithId( + id: ObjectId, + filename: string, + options?: GridFSBucketWriteStreamOptions, + ): GridFSBucketWriteStream + /** Returns a readable stream (GridFSBucketReadStream) for streaming file data from GridFS. */ + openDownloadStream( + id: ObjectId, + options?: GridFSBucketReadStreamOptions, + ): GridFSBucketReadStream /** - * Validate an existing collection + * Deletes a file with the given id * - * @param collectionNme The name of the collection to validate. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#validateCollection + * @param id - The id of the file doc */ - validateCollection( - collectionNme: string, - callback: MongoCallback, - ): void - + delete(id: ObjectId): Promise + /** Convenience wrapper around find on the files collection */ + find( + filter?: Filter, + options?: FindOptions, + ): FindCursor /** - * Validate an existing collection - * - * @param collectionNme The name of the collection to validate. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#validateCollection + * Returns a readable stream (GridFSBucketReadStream) for streaming the + * file with the given name from GridFS. If there are multiple files with + * the same name, this will stream the most recent file with the given name + * (as determined by the `uploadDate` field). You can set the `revision` + * option to change this behavior. */ - validateCollection(collectionNme: string, options?: Object): Promise - + openDownloadStreamByName( + filename: string, + options?: GridFSBucketReadStreamOptionsWithRevision, + ): GridFSBucketReadStream /** - * Validate an existing collection + * Renames the file with the given _id to the given string * - * @param collectionNme The name of the collection to validate. - * @param options Optional settings. - * @param callback The command result callback - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#validateCollection + * @param id - the id of the file to rename + * @param filename - new name for the file */ - validateCollection( - collectionNme: string, - options: Object, - callback: MongoCallback, - ): void + rename(id: ObjectId, filename: string): Promise + /** Removes this bucket's files collection, followed by its chunks collection. */ + drop(): Promise +} + +/** @public */ +export declare type GridFSBucketEvents = { + index(): void +} + +/** @public */ +export declare interface GridFSBucketOptions extends WriteConcernOptions { + /** The 'files' and 'chunks' collections will be prefixed with the bucket name followed by a dot. */ + bucketName?: string + /** Number of bytes stored in each chunk. Defaults to 255KB */ + chunkSizeBytes?: number + /** Read preference to be passed to read operations */ + readPreference?: ReadPreference } +/* Excluded from this release type: GridFSBucketPrivate */ + /** - * Add a user to the database. + * A readable stream that enables you to read buffers from GridFS. * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#addUser + * Do not instantiate this class directly. Use `openDownloadStream()` instead. + * @public */ -export interface AddUserOptions { +export declare class GridFSBucketReadStream + extends Readable + implements NodeJS.ReadableStream +{ + /* Excluded from this release type: s */ /** - * The write concern. + * An error occurred + * @event */ - w?: number | string - + static readonly ERROR: "error" /** - * The write concern timeout. + * Fires when the stream loaded the file document corresponding to the provided id. + * @event */ - wtimeout?: number - + static readonly FILE: "file" /** - * Specify a journal write concern. + * Emitted when a chunk of data is available to be consumed. + * @event */ - j?: boolean - + static readonly DATA: "data" /** - * Specify a file sync write concern. + * Fired when the stream is exhausted (no more data events). + * @event */ - fsync: boolean - + static readonly END: "end" /** - * Custom data associated with the user (only Mongodb 2.6 or higher). + * Fired when the stream is exhausted and the underlying cursor is killed + * @event */ - customData?: Object - + static readonly CLOSE: "close" + /* Excluded from this release type: __constructor */ + /* Excluded from this release type: _read */ /** - * Roles associated with the created user (only Mongodb 2.6 or higher). + * Sets the 0-based offset in bytes to start streaming from. Throws + * an error if this stream has entered flowing mode + * (e.g. if you've already called `on('data')`) + * + * @param start - 0-based offset in bytes to start streaming from */ - roles?: Object[] -} -export interface ListIndexesOptions { + start(start?: number): this /** - * The batchSize for the returned command cursor or if pre 2.8 the systems batch collection. + * Sets the 0-based offset in bytes to start streaming from. Throws + * an error if this stream has entered flowing mode + * (e.g. if you've already called `on('data')`) + * + * @param end - Offset in bytes to stop reading at */ - batchSize?: number - + end(end?: number): this /** - * The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, - * ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST). + * Marks this stream as aborted (will never push another `data` event) + * and kills the underlying cursor. Will emit the 'end' event, and then + * the 'close' event once the cursor is successfully killed. */ - readPreference?: ReadPreference | string + abort(): Promise } -export interface GroupOptions { +/** @public */ +export declare interface GridFSBucketReadStreamOptions { + sort?: Sort + skip?: number + /** + * 0-indexed non-negative byte offset from the beginning of the file + */ + start?: number /** - * The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, - * ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST). + * 0-indexed non-negative byte offset to the end of the file contents + * to be returned by the stream. `end` is non-inclusive */ - readPreference?: ReadPreference | string + end?: number +} + +/** @public */ +export declare interface GridFSBucketReadStreamOptionsWithRevision + extends GridFSBucketReadStreamOptions { + /** The revision number relative to the oldest file with the given filename. 0 + * gets you the oldest file, 1 gets you the 2nd oldest, -1 gets you the + * newest. */ + revision?: number } +/* Excluded from this release type: GridFSBucketReadStreamPrivate */ + /** - * Remove a user from a database. + * A writable stream that enables you to write buffers to GridFS. * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Admin.html#removeUser + * Do not instantiate this class directly. Use `openUploadStream()` instead. + * @public */ -export interface FSyncOptions { - /** - * The write concern. - */ - w?: number | string +export declare class GridFSBucketWriteStream { + /* + `implements NodeJS.WritableStream` + Has to be removed, otherwise tsc places a `/// ` in the output file, + because vinyl-fs messed with NodeJS.WritableStream in the global scope: + https://github.com/DefinitelyTyped/DefinitelyTyped/blob/45372bb8a679f310f65765321ed38399055dcf1b/types/vinyl-fs/v1/index.d.ts#L9 */ + + bucket: GridFSBucket + chunks: Collection + filename: string + files: Collection + options: GridFSBucketWriteStreamOptions + done: boolean + id: ObjectId + chunkSizeBytes: number + bufToStore: Buffer + length: number + n: number + pos: number + state: { + streamEnd: boolean + outstandingRequests: number + errored: boolean + aborted: boolean + } + writeConcern?: WriteConcern + /** @event */ + static readonly CLOSE = "close" + /** @event */ + static readonly ERROR = "error" + /** + * `end()` was called and the write stream successfully wrote the file metadata and all the chunks to MongoDB. + * @event + */ + static readonly FINISH = "finish" + /* Excluded from this release type: __constructor */ + /** + * Write a buffer to the stream. + * + * @param chunk - Buffer to write + * @param encodingOrCallback - Optional encoding for the buffer + * @param callback - Function to call when the chunk was added to the buffer, or if the entire chunk was persisted to MongoDB if this chunk caused a flush. + * @returns False if this write required flushing a chunk to MongoDB. True otherwise. + */ + write(chunk: Buffer | string): boolean + write(chunk: Buffer | string, callback: Callback): boolean + write(chunk: Buffer | string, encoding: BufferEncoding | undefined): boolean + write( + chunk: Buffer | string, + encoding: BufferEncoding | undefined, + callback: Callback, + ): boolean + /** + * Places this write stream into an aborted state (all future writes fail) + * and deletes all chunks that have already been written. + */ + abort(): Promise + /** + * Tells the stream that no more data will be coming in. The stream will + * persist the remaining data to MongoDB, write the files document, and + * then emit a 'finish' event. + * + * @param chunk - Buffer to write + * @param encoding - Optional encoding for the buffer + * @param callback - Function to call when all files and chunks have been persisted to MongoDB + */ + end(): this + end(chunk: Buffer): this + end(callback: Callback): this + end(chunk: Buffer, callback: Callback): this + end(chunk: Buffer, encoding: BufferEncoding): this + end( + chunk: Buffer, + encoding: BufferEncoding | undefined, + callback: Callback, + ): this +} - /** - * The write concern timeout. - */ - wtimeout?: number +/** @public */ +export declare interface GridFSBucketWriteStreamOptions + extends WriteConcernOptions { + /** Overwrite this bucket's chunkSizeBytes for this file */ + chunkSizeBytes?: number + /** Custom file id for the GridFS file. */ + id?: ObjectId + /** Object to store in the file document's `metadata` field */ + metadata?: Document + /** String to store in the file document's `contentType` field */ + contentType?: string + /** Array of strings to store in the file document's `aliases` field */ + aliases?: string[] +} - /** - * Specify a journal write concern. - */ - j?: boolean +/** @public */ +export declare interface GridFSChunk { + _id: ObjectId + files_id: ObjectId + n: number + data: Buffer | Uint8Array +} - /** - * Specify a file sync write concern. - */ - fsync?: boolean +/** @public */ +export declare interface GridFSFile { + _id: ObjectId + length: number + chunkSize: number + filename: string + contentType?: string + aliases?: string[] + metadata?: Document + uploadDate: Date } -export interface FindOneAndDeleteOptions { - /** - * Limits the fields to return for all matching documents. - */ - projection?: Object +/** @public */ +export declare const GSSAPICanonicalizationValue: Readonly<{ + readonly on: true + readonly off: false + readonly none: "none" + readonly forward: "forward" + readonly forwardAndReverse: "forwardAndReverse" +}> + +/** @public */ +export declare type GSSAPICanonicalizationValue = + (typeof GSSAPICanonicalizationValue)[keyof typeof GSSAPICanonicalizationValue] + +/** @public */ +export declare interface HedgeOptions { + /** Explicitly enable or disable hedged reads. */ + enabled?: boolean +} - /** - * Determines which document the operation modifies if the query selects multiple documents. - */ - sort?: Object +/** @public */ +export declare type Hint = string | Document + +/** @public */ +export declare class HostAddress { + host: string | undefined + port: number | undefined + socketPath: string | undefined + isIPv6: boolean + constructor(hostString: string) + inspect(): string + toString(): string + static fromString(this: void, s: string): HostAddress + static fromHostPort(host: string, port: number): HostAddress + static fromSrvRecord({ name, port }: SrvRecord): HostAddress +} - /** - * The maximum amount of time to allow the query to run. - */ - maxTimeMS?: number +/** @public */ +export declare interface IndexDescription + extends Pick< + CreateIndexesOptions, + | "background" + | "unique" + | "partialFilterExpression" + | "sparse" + | "hidden" + | "expireAfterSeconds" + | "storageEngine" + | "version" + | "weights" + | "default_language" + | "language_override" + | "textIndexVersion" + | "2dsphereIndexVersion" + | "bits" + | "min" + | "max" + | "bucketSize" + | "wildcardProjection" + > { + collation?: CollationOptions + name?: string + key: + | { + [key: string]: IndexDirection + } + | Map } -/** - * Create a new ObjectID instance. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/ObjectID.html - */ -export declare class ObjectID { - constructor(s?: string | number) +/** @public */ +export declare type IndexDirection = + | -1 + | 1 + | "2d" + | "2dsphere" + | "text" + | "geoHaystack" + | "hashed" + | number + +/** @public */ +export declare interface IndexInformationOptions { + full?: boolean + readPreference?: ReadPreference + session?: ClientSession +} - /** - * The generation time of this ObjectId instance. - */ - generationTime: number +/** @public */ +export declare type IndexSpecification = OneOrMore< + | string + | [string, IndexDirection] + | { + [key: string]: IndexDirection + } + | Map +> - /** - * Creates an ObjectID from a hex string representation of an ObjectID. - */ - static createFromHexString(hexString: string): ObjectID +/** Given an object shaped type, return the type of the _id field or default to ObjectId @public */ +export declare type InferIdType = TSchema extends { + _id: infer IdType +} + ? Record extends IdType + ? never + : IdType + : TSchema extends { + _id?: infer IdType + } + ? unknown extends IdType + ? ObjectId + : IdType + : ObjectId + +/** @public */ +export declare interface InsertManyResult { + /** Indicates whether this write result was acknowledged. If not, then all other members of this result will be undefined */ + acknowledged: boolean + /** The number of inserted documents for this operations */ + insertedCount: number + /** Map of the index of the inserted document to the id of the inserted document */ + insertedIds: { + [key: number]: InferIdType + } +} - /** - * Creates an ObjectID from a second based number, with the rest of the ObjectID zeroed out. Used for comparisons or sorting the ObjectID. - */ - static createFromTime(time: number): ObjectID +/** @public */ +export declare interface InsertOneModel { + /** The document to insert. */ + document: OptionalId +} - /** - * Checks if a value is a valid bson ObjectId. - */ - static isValid(id: any): boolean +/** @public */ +export declare interface InsertOneOptions extends CommandOperationOptions { + /** Allow driver to bypass schema validation in MongoDB 3.2 or higher. */ + bypassDocumentValidation?: boolean + /** Force server to assign _id values instead of driver. */ + forceServerObjectId?: boolean +} - /** - * Compares the equality of this ObjectID with otherID. - */ - equals(otherID: ObjectID): boolean +/** @public */ +export declare interface InsertOneResult { + /** Indicates whether this write result was acknowledged. If not, then all other members of this result will be undefined */ + acknowledged: boolean + /** The identifier that was inserted. If the server generated the identifier, this value will be null as the driver does not have access to that data */ + insertedId: InferIdType +} - /** - * Generate a 12 byte id buffer used in ObjectID's. - */ - generate(time?: number): string +export { Int32 } - /** - * Returns the generation date (accurate up to the second) that this ID was generated. - * - */ - getTimestamp(): Date +/** @public */ +export declare type IntegerType = number | Int32 | Long | bigint - /** - * Return the ObjectID id as a 24 byte hex string representation. - */ - toHexString(): string +/* Excluded from this release type: InternalAbstractCursorOptions */ - /** - * Get the timestamp and validate correctness. - */ - toString(): string -} +/** @public */ +export declare type IsAny = + true extends false & Type ? ResultIfAny : ResultIfNotAny /** - * A class representation of the BSON Binary type. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Binary.html + * Helper types for dot-notation filter attributes */ -export declare class Binary { - /** - * @param buffer A buffer object containing the binary data. - * @param subType The option binary type. - */ - constructor(buffer: Buffer, subType?: number) +/** @public */ +export declare type Join = T extends [] + ? "" + : T extends [string | number] + ? `${T[0]}` + : T extends [string | number, ...infer R] + ? `${T[0]}${D}${Join}` + : string - /** - * Byte Array BSON type. - */ - static SUBTYPE_BYTE_ARRAY: number +/* Excluded from this release type: kBeforeHandshake */ - /** - * Default BSON type. - */ - static SUBTYPE_DEFAULT: number +/* Excluded from this release type: kBuffer */ - /** - * Function BSON type. - */ - static SUBTYPE_FUNCTION: number +/* Excluded from this release type: kBuiltOptions */ - /** - * MD5 BSON type. - */ - static SUBTYPE_MD5: number +/* Excluded from this release type: kCancellationToken */ - /** - * User BSON type. - */ - static SUBTYPE_USER_DEFINED: number +/* Excluded from this release type: kCancellationToken_2 */ - /** - * UUID BSON type. - */ - static SUBTYPE_UUID: number +/* Excluded from this release type: kCancelled */ - /** - * OLD UUID BSON type - */ - static SUBTYPE_UUID_OLD: number +/* Excluded from this release type: kCancelled_2 */ - /** - * The length of the binary. - */ - length(): number +/* Excluded from this release type: kCheckedOut */ - /** - * Updates this binary with byte_value. - * - * @param byte_value A single byte we wish to write. - */ - put(byte_value: number | string): void +/* Excluded from this release type: kClient */ - /** - * Reads length bytes starting at position. - * - * @param position Read from the given position in the Binary. - * @param length The number of bytes to read. - */ - read(position: number, length: number): Buffer +/* Excluded from this release type: kClosed */ - /** - * Returns the value of this binary as a string. - */ - value(): string +/* Excluded from this release type: kClosed_2 */ - /** - * Writes a buffer or string to the binary - * - * @param buffer A string or buffer to be written to the Binary BSON object. - * @param offset Specify the binary of where to write the content. - */ - write(buffer: Buffer | string, offset: number): void -} -/** - * A class representation of the BSON Double type. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Double.html - */ -export declare class Double { - /** - * @param value The number we want to represent as a double. - */ - constructor(value: number) +/* Excluded from this release type: kClusterTime */ - /** - * Access the number value. - */ - valueOf(): number -} +/* Excluded from this release type: kConnection */ -/** - * Long - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Long.html - */ -export declare class Long { - /** - * @param low The low (signed) 32 bits of the Long. - * @param high The high (signed) 32 bits of the Long. - */ - constructor(low: number, high: number) +/* Excluded from this release type: kConnectionCounter */ - static MAX_VALUE: Long - static MIN_VALUE: Long - static NEG_ONE: Long - static ONE: Long - static ZERO: Long +/* Excluded from this release type: kConnections */ - /** - * Returns a Long representing the 64-bit integer that comes by concatenating the given high and low bits. - * Each is assumed to use 32 bits. - * - * @param lowBits The low 32-bits. - * @param highBits The high 32-bits. - */ - static fromBits(lowBits: number, highBits: number): Long +/* Excluded from this release type: kCursorStream */ - /** - * Returns a Long representing the given (32-bit) integer value. - * - * @param value The 32-bit integer in question. - */ - static fromInt(value: number): Long +/* Excluded from this release type: kDelayedTimeoutId */ - /** - * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned. - * - * @param value The number in question. - */ - static fromNumber(value: number): Long +/* Excluded from this release type: kDescription */ - /** - * Returns a Long representation of the given string, written using the given radix. - * - * @param str The textual representation of the Long. - * @param radix The radix in which the text is written. - */ - static fromString(str: string, radix?: number): Long +/* Excluded from this release type: kDocuments */ - /** - * Returns the sum of this and the given Long. - * - * @param other Long to add to this one. - */ - add(other: Long): Long +/* Excluded from this release type: kErrorLabels */ - /** - * Returns the bitwise-AND of this Long and the given one. - * - * @param other The Long with which to AND. - */ - and(other: Long): Long +/** @public */ +export declare type KeysOfAType = { + [key in keyof TSchema]: NonNullable extends Type ? key : never +}[keyof TSchema] - /** - * Compares this Long with the given one. - * - * @param other Long to compare against. - */ - compare(other: Long): number +/** @public */ +export declare type KeysOfOtherType = { + [key in keyof TSchema]: NonNullable extends Type ? never : key +}[keyof TSchema] - /** - * Returns this Long divided by the given one. - * - * @param other Long by which to divide. - */ - div(other: Long): Long +/* Excluded from this release type: kFilter */ - /** - * Return whether this Long equals the other. - * - * @param other Long to compare against. - */ - equals(other: Long): boolean +/* Excluded from this release type: kGeneration */ - /** - * Return the high 32-bits value. - */ - getHighBits(): number +/* Excluded from this release type: kGeneration_2 */ - /** - * Return the low 32-bits value. - */ - getLowBits(): number +/* Excluded from this release type: kHello */ - /** - * Return the low unsigned 32-bits value. - */ - getLowBitsUnsigned(): number +/* Excluded from this release type: kId */ - /** - * Returns the number of bits needed to represent the absolute value of this Long. - */ - getNumBitsAbs(): number +/* Excluded from this release type: kInit */ - /** - * Return whether this Long is greater than the other. - * - * @param other Long to compare against. - */ - greaterThan(other: Long): number +/* Excluded from this release type: kInitialized */ - /** - * Return whether this Long is greater than or equal to the other. - * - * @param other Long to compare against. - */ - greaterThanOrEqual(other: Long): number +/* Excluded from this release type: kInternalClient */ - /** - * Return whether this value is negative. - */ - isNegative(): boolean +/* Excluded from this release type: kKilled */ - /** - * Return whether this value is odd. - */ - isOdd(): boolean +/* Excluded from this release type: kLastUseTime */ - /** - * Return whether this value is zero. - */ - isZero(): boolean +/* Excluded from this release type: kMessageStream */ - /** - * Return whether this Long is less than the other. - * - * @param other Long to compare against. - */ - lessThan(other: Long): boolean +/* Excluded from this release type: kMetrics */ - /** - * Return whether this Long is less than or equal to the other. - * - * @param other Long to compare against. - */ - lessThanOrEqual(other: Long): boolean +/* Excluded from this release type: kMinPoolSizeTimer */ - /** - * Returns this Long modulo the given one. - * - * @param other Long by which to mod. - */ - modulo(other: Long): Long +/* Excluded from this release type: kMode */ - /** - * Returns the product of this and the given Long. - * - * @param other Long to multiply with this. - */ - multiply(other: Long): Long +/* Excluded from this release type: kMonitor */ - /** - * The negation of this value. - */ - negate(): Long +/* Excluded from this release type: kMonitorId */ - /** - * The bitwise-NOT of this value. - */ - not(): Long +/* Excluded from this release type: kNamespace */ - /** - * Return whether this Long does not equal the other. - * - * @param other Long to compare against. - */ - notEquals(other: Long): boolean +/* Excluded from this release type: kNumReturned */ - /** - * Returns the bitwise-OR of this Long and the given one. - * - * @param other The Long with which to OR. - */ - or(other: Long): Long +/* Excluded from this release type: kOptions */ - /** - * Returns this Long with bits shifted to the left by the given amount. - * - * @param other The number of bits by which to shift. - */ - shiftLeft(other: number): Long +/* Excluded from this release type: kOptions_2 */ - /** - * Returns this Long with bits shifted to the right by the given amount. - * - * @param other The number of bits by which to shift. - */ - shiftRight(other: number): Long +/* Excluded from this release type: kOptions_3 */ - /** - * Returns this Long with bits shifted to the right by the given amount, with the new top bits matching the current sign bit. - * - * @param other The number of bits by which to shift. - */ - shiftRightUnsigned(other: number): Long +/* Excluded from this release type: kPending */ - /** - * Returns the difference of this and the given Long. - * - * @param other Long to subtract from this. - */ - subtract(other: Long): Long +/* Excluded from this release type: kPinnedConnection */ - /** - * Return the int value. - */ - toInt(): number +/* Excluded from this release type: kPipeline */ - /** - * Return the JSON value. - */ - toJSON(): string +/* Excluded from this release type: kPoolState */ - /** - * Return the Number value. - */ - toNumber(): number +/* Excluded from this release type: kProcessingWaitQueue */ - /** - * Return the String value. - * - * @param opt_radix The radix in which the text should be written. - */ - toString(opt_radix?: number): string +/* Excluded from this release type: kQueue */ - /** - * Returns the bitwise-XOR of this Long and the given one. - * - * @param other The Long with which to XOR. - */ - xor(other: Long): Long -} +/* Excluded from this release type: kRoundTripTime */ -/** - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/MaxKey.html - */ -export declare class MaxKey {} +/* Excluded from this release type: kRTTPinger */ -/** - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/MinKey.html - */ -export declare class MinKey {} +/* Excluded from this release type: kServer */ -/** - * Timestamp. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Timestamp.html - */ -export declare class Timestamp { - /** - * @param low The low (signed) 32 bits of the Timestamp. - * @param high The high (signed) 32 bits of the Timestamp. - */ - constructor(low: number, high: number) +/* Excluded from this release type: kServer_2 */ - static MAX_VALUE: Timestamp - static MIN_VALUE: Timestamp - static NEG_ONE: Timestamp - static ONE: Timestamp - static ZERO: Timestamp +/* Excluded from this release type: kServer_3 */ - /** - * Returns a Timestamp representing the 64-bit integer that comes by concatenating the - * given high and low bits. Each is assumed to use 32 bits.. - * - * @param lowBits The low 32-bits. - * @param highBits The high 32-bits. - */ - static fromBits(lowBits: number, highBits: number): Timestamp +/* Excluded from this release type: kServerError */ - /** - * Returns a Timestamp representing the given (32-bit) integer value. - * - * @param value The 32-bit integer in question. - */ - static fromInt(value: number): Timestamp +/* Excluded from this release type: kServerSession */ - /** - * Returns a Timestamp representing the given value, provided that it is a finite number. Otherwise, zero is returned. - * - * @param value The number in question. - */ - static fromNumber(value: number): Timestamp +/* Excluded from this release type: kServiceGenerations */ - /** - * Returns a Timestamp representation of the given string, written using the given radix. - * - * @param str The textual representation of the Timestamp. - * @param radix The radix in which the text is written. - */ - static fromString(str: string, radix?: number): Timestamp +/* Excluded from this release type: kSession */ - /** - * Returns the sum of this and the given Timestamp. - * - * @param other Timestamp to add to this one. - */ - add(other: Timestamp): Timestamp +/* Excluded from this release type: kSession_2 */ - /** - * Returns the bitwise-AND of this Timestamp and the given one. - * - * @param other Timestamp to add to this one. - */ - and(other: Timestamp): Timestamp +/* Excluded from this release type: kSnapshotEnabled */ - /** - * Compares this Timestamp with the given one. - * - * @param other Timestamp to compare against. - */ - compare(other: Timestamp): number +/* Excluded from this release type: kSnapshotTime */ - /** - * Returns this Timestamp divided by the given one. - * - * @param other Timestamp by which to divide. - */ - div(other: Timestamp): Timestamp +/* Excluded from this release type: kStream */ - /** - * Return whether this Timestamp equals the other - * - * @param other - */ - equals(other: Timestamp): boolean +/* Excluded from this release type: kTransform */ - /** - * Return the high 32-bits value. - */ - getHighBits(): number +/* Excluded from this release type: kTxnNumberIncrement */ - /** - * Return the low 32-bits value. - */ - getLowBits(): number +/* Excluded from this release type: kWaitQueue */ - /** - * Return the low unsigned 32-bits value. - */ - getLowBitsUnsigned(): number +/* Excluded from this release type: kWaitQueue_2 */ - /** - * Returns the number of bits needed to represent the absolute value of this Timestamp. - */ - getNumBitsAbs(): number +/** @public */ +export declare const LEGAL_TCP_SOCKET_OPTIONS: readonly [ + "family", + "hints", + "localAddress", + "localPort", + "lookup", +] - /** - * Return whether this Timestamp is greater than the other. - * - * @param other Timestamp to compare against. - */ - greaterThan(other: Timestamp): number +/** @public */ +export declare const LEGAL_TLS_SOCKET_OPTIONS: readonly [ + "ALPNProtocols", + "ca", + "cert", + "checkServerIdentity", + "ciphers", + "crl", + "ecdhCurve", + "key", + "minDHSize", + "passphrase", + "pfx", + "rejectUnauthorized", + "secureContext", + "secureProtocol", + "servername", + "session", +] - /** - * Return whether this Timestamp is greater than or equal to the other. - * - * @param other Timestamp to compare against. - */ - greaterThanOrEqual(other: Timestamp): number +/* Excluded from this release type: List */ - /** - * Return whether this value is negative. - */ - isNegative(): boolean +/** @public */ +export declare class ListCollectionsCursor< + T extends Pick | CollectionInfo = + | Pick + | CollectionInfo, +> extends AbstractCursor { + parent: Db + filter: Document + options?: ListCollectionsOptions + constructor(db: Db, filter: Document, options?: ListCollectionsOptions) + clone(): ListCollectionsCursor + /* Excluded from this release type: _initialize */ +} - /** - * IsOdd. - * Return whether this value is odd. - */ - isOdd(): boolean +/** @public */ +export declare interface ListCollectionsOptions + extends Omit { + /** Since 4.0: If true, will only return the collection name in the response, and will omit additional info */ + nameOnly?: boolean + /** Since 4.0: If true and nameOnly is true, allows a user without the required privilege (i.e. listCollections action on the database) to run the command when access control is enforced. */ + authorizedCollections?: boolean + /** The batchSize for the returned command cursor or if pre 2.8 the systems batch collection */ + batchSize?: number +} - /** - * Return whether this value is zero. - */ - isZero(): boolean +/** @public */ +export declare interface ListDatabasesOptions extends CommandOperationOptions { + /** A query predicate that determines which databases are listed */ + filter?: Document + /** A flag to indicate whether the command should return just the database names, or return both database names and size information */ + nameOnly?: boolean + /** A flag that determines which databases are returned based on the user privileges when access control is enabled */ + authorizedDatabases?: boolean +} - /** - * Return whether this Timestamp is less than the other. - * - * @param other Timestamp to compare against. - */ - lessThan(other: Timestamp): boolean +/** @public */ +export declare interface ListDatabasesResult { + databases: ({ + name: string + sizeOnDisk?: number + empty?: boolean + } & Document)[] + totalSize?: number + totalSizeMb?: number + ok: 1 | 0 +} - /** - * Return whether this Timestamp is less than or equal to the other. - * - * @param other Timestamp to compare against. - */ - lessThanOrEqual(other: Timestamp): boolean +/** @public */ +export declare class ListIndexesCursor extends AbstractCursor { + parent: Collection + options?: ListIndexesOptions + constructor(collection: Collection, options?: ListIndexesOptions) + clone(): ListIndexesCursor + /* Excluded from this release type: _initialize */ +} - /** - * Returns this Timestamp modulo the given one. - * - * @param other Timestamp by which to mod. - */ - modulo(other: Timestamp): Timestamp +/** @public */ +export declare interface ListIndexesOptions + extends Omit { + /** The batchSize for the returned command cursor or if pre 2.8 the systems batch collection */ + batchSize?: number +} - /** - * Returns the product of this and the given Timestamp. - * - * @param other Timestamp to multiply with this. - */ - multiply(other: Timestamp): Timestamp +export { Long } - /** - * The negation of this value. - */ - negate(): Timestamp +/** @public */ +export declare type MatchKeysAndValues = Readonly> & + Record - /** - * The bitwise-NOT of this value. - */ - not(): Timestamp +export { MaxKey } - /** - * Return whether this Timestamp does not equal the other. - * - * @param other Timestamp to compare against. - */ - notEquals(other: Timestamp): boolean +/* Excluded from this release type: MessageHeader */ - /** - * Returns the bitwise-OR of this Timestamp and the given one. - * - * @param other The Timestamp with which to OR. - */ - or(other: Timestamp): Timestamp +/* Excluded from this release type: MessageStream */ - /** - * Returns this Timestamp with bits shifted to the left by the given amount. - * - * @param other The number of bits by which to shift. - */ - shiftLeft(other: number): Timestamp +/* Excluded from this release type: MessageStreamOptions */ +export { MinKey } - /** - * Returns this Timestamp with bits shifted to the right by the given amount. - * - * @param other The number of bits by which to shift. - */ - shiftRight(other: number): Timestamp +/** + * @public + * @deprecated This type will be completely removed and findOneAndUpdate, + * findOneAndDelete, and findOneAndReplace will then return the + * actual result document. + */ +export declare interface ModifyResult { + value: WithId | null + lastErrorObject?: Document + ok: 0 | 1 +} - /** - * Returns this Timestamp with bits shifted to the right by the given amount, with the new top bits matching the current sign bit. - * - * @param other - */ - shiftRightUnsigned(other: number): Timestamp +/** @public */ +export declare const MONGO_CLIENT_EVENTS: readonly [ + "connectionPoolCreated", + "connectionPoolReady", + "connectionPoolCleared", + "connectionPoolClosed", + "connectionCreated", + "connectionReady", + "connectionClosed", + "connectionCheckOutStarted", + "connectionCheckOutFailed", + "connectionCheckedOut", + "connectionCheckedIn", + "commandStarted", + "commandSucceeded", + "commandFailed", + "serverOpening", + "serverClosed", + "serverDescriptionChanged", + "topologyOpening", + "topologyClosed", + "topologyDescriptionChanged", + "error", + "timeout", + "close", + "serverHeartbeatStarted", + "serverHeartbeatSucceeded", + "serverHeartbeatFailed", +] - /** - * Returns the difference of this and the given Timestamp. - * - * @param other Timestamp to subtract from this. - */ - subtract(other: Timestamp): Timestamp +/** + * An error generated when the driver API is used incorrectly + * + * @privateRemarks + * Should **never** be directly instantiated + * + * @public + * @category Error + */ +export declare class MongoAPIError extends MongoDriverError { + constructor(message: string) + get name(): string +} - /** - * Return the int value. - */ - toInt(): number +/** + * A error generated when the user attempts to authenticate + * via AWS, but fails + * + * @public + * @category Error + */ +export declare class MongoAWSError extends MongoRuntimeError { + constructor(message: string) + get name(): string +} - /** - * Return the JSON value. - */ - toJSON(): string +/** + * An error generated when a batch command is re-executed after one of the commands in the batch + * has failed + * + * @public + * @category Error + */ +export declare class MongoBatchReExecutionError extends MongoAPIError { + constructor(message?: string) + get name(): string +} + +/** + * An error indicating an unsuccessful Bulk Write + * @public + * @category Error + */ +export declare class MongoBulkWriteError extends MongoServerError { + result: BulkWriteResult + writeErrors: OneOrMore + err?: WriteConcernError + /** Creates a new MongoBulkWriteError */ + constructor( + error: + | { + message: string + code: number + writeErrors?: WriteError[] + } + | WriteConcernError + | AnyError, + result: BulkWriteResult, + ) + get name(): string + /** Number of documents inserted. */ + get insertedCount(): number + /** Number of documents matched for update. */ + get matchedCount(): number + /** Number of documents modified. */ + get modifiedCount(): number + /** Number of documents deleted. */ + get deletedCount(): number + /** Number of documents upserted. */ + get upsertedCount(): number + /** Inserted document generated Id's, hash key is the index of the originating operation */ + get insertedIds(): { + [key: number]: any + } + /** Upserted document generated Id's, hash key is the index of the originating operation */ + get upsertedIds(): { + [key: number]: any + } +} + +/** + * An error generated when a ChangeStream operation fails to execute. + * + * @public + * @category Error + */ +export declare class MongoChangeStreamError extends MongoRuntimeError { + constructor(message: string) + get name(): string +} +/** + * The **MongoClient** class is a class that allows for making Connections to MongoDB. + * @public + * + * @remarks + * The programmatically provided options take precedence over the URI options. + * + * @example + * ```ts + * import { MongoClient } from 'mongodb'; + * + * // Enable command monitoring for debugging + * const client = new MongoClient('mongodb://localhost:27017', { monitorCommands: true }); + * + * client.on('commandStarted', started => console.log(started)); + * client.db().collection('pets'); + * await client.insertOne({ name: 'spot', kind: 'dog' }); + * ``` + */ +export declare class MongoClient extends TypedEventEmitter { + /* Excluded from this release type: s */ + /* Excluded from this release type: topology */ + /* Excluded from this release type: mongoLogger */ + /* Excluded from this release type: connectionLock */ + /* Excluded from this release type: [kOptions] */ + constructor(url: string, options?: MongoClientOptions) + get options(): Readonly + get serverApi(): Readonly + /* Excluded from this release type: monitorCommands */ + /* Excluded from this release type: monitorCommands */ + get autoEncrypter(): AutoEncrypter | undefined + get readConcern(): ReadConcern | undefined + get writeConcern(): WriteConcern | undefined + get readPreference(): ReadPreference + get bsonOptions(): BSONSerializeOptions + /** + * Connect to MongoDB using a url + * + * @see docs.mongodb.org/manual/reference/connection-string/ + */ + connect(): Promise + /* Excluded from this release type: _connect */ + /** + * Close the client and its underlying connections + * + * @param force - Force close, emitting no events + */ + close(force?: boolean): Promise /** - * Return the Number value. + * Create a new Db instance sharing the current socket connections. + * + * @param dbName - The name of the database we want to use. If not provided, use database name from connection string. + * @param options - Optional settings for Db construction */ - toNumber(): number - + db(dbName?: string, options?: DbOptions): Db /** - * Return the String value. + * Connect to MongoDB using a url * - * @param radix The radix in which the text should be written. + * @remarks + * The programmatically provided options take precedence over the URI options. + * + * @see https://www.mongodb.com/docs/manual/reference/connection-string/ */ - toString(radix?: number): string - + static connect( + url: string, + options?: MongoClientOptions, + ): Promise + /** Starts a new session on the server */ + startSession(options?: ClientSessionOptions): ClientSession /** - * Returns the bitwise-XOR of this Timestamp and the given one. + * Runs a given operation with an implicitly created session. The lifetime of the session + * will be handled without the need for user interaction. * - * @param other The Timestamp with which to XOR. + * NOTE: presently the operation MUST return a Promise (either explicit or implicitly as an async function) + * + * @param options - Optional settings for the command + * @param callback - An callback to execute with an implicitly created session */ - xor(other: Timestamp): Timestamp + withSession(callback: WithSessionCallback): Promise + withSession( + options: ClientSessionOptions, + callback: WithSessionCallback, + ): Promise + /** + * Create a new Change Stream, watching for new changes (insertions, updates, + * replacements, deletions, and invalidations) in this cluster. Will ignore all + * changes to system collections, as well as the local, admin, and config databases. + * + * @remarks + * watch() accepts two generic arguments for distinct use cases: + * - The first is to provide the schema that may be defined for all the data within the current cluster + * - The second is to override the shape of the change stream document entirely, if it is not provided the type will default to ChangeStreamDocument of the first argument + * + * @param pipeline - An array of {@link https://www.mongodb.com/docs/manual/reference/operator/aggregation-pipeline/|aggregation pipeline stages} through which to pass change stream documents. This allows for filtering (using $match) and manipulating the change stream documents. + * @param options - Optional settings for the command + * @typeParam TSchema - Type of the data being detected by the change stream + * @typeParam TChange - Type of the whole change stream document emitted + */ + watch< + TSchema extends Document = Document, + TChange extends Document = ChangeStreamDocument, + >( + pipeline?: Document[], + options?: ChangeStreamOptions, + ): ChangeStream } -export interface CollectionDeleteOneOptions { - /** - * The write concern. - */ - w?: number | string +/** @public */ +export declare type MongoClientEvents = Pick< + TopologyEvents, + (typeof MONGO_CLIENT_EVENTS)[number] +> & { + open(mongoClient: MongoClient): void +} - /** - * The write concern timeout. - */ - wtimmeout?: number +/** + * Describes all possible URI query options for the mongo client + * @public + * @see https://www.mongodb.com/docs/manual/reference/connection-string + */ +export declare interface MongoClientOptions + extends BSONSerializeOptions, + SupportedNodeConnectionOptions { + /** Specifies the name of the replica set, if the mongod is a member of a replica set. */ + replicaSet?: string + /** Enables or disables TLS/SSL for the connection. */ + tls?: boolean + /** A boolean to enable or disables TLS/SSL for the connection. (The ssl option is equivalent to the tls option.) */ + ssl?: boolean + /** Specifies the location of a local TLS Certificate */ + tlsCertificateFile?: string + /** Specifies the location of a local .pem file that contains either the client's TLS/SSL certificate and key or only the client's TLS/SSL key when tlsCertificateFile is used to provide the certificate. */ + tlsCertificateKeyFile?: string + /** Specifies the password to de-crypt the tlsCertificateKeyFile. */ + tlsCertificateKeyFilePassword?: string + /** Specifies the location of a local .pem file that contains the root certificate chain from the Certificate Authority. This file is used to validate the certificate presented by the mongod/mongos instance. */ + tlsCAFile?: string + /** Bypasses validation of the certificates presented by the mongod/mongos instance */ + tlsAllowInvalidCertificates?: boolean + /** Disables hostname validation of the certificate presented by the mongod/mongos instance. */ + tlsAllowInvalidHostnames?: boolean + /** Disables various certificate validations. */ + tlsInsecure?: boolean + /** The time in milliseconds to attempt a connection before timing out. */ + connectTimeoutMS?: number + /** The time in milliseconds to attempt a send or receive on a socket before the attempt times out. */ + socketTimeoutMS?: number + /** An array or comma-delimited string of compressors to enable network compression for communication between this client and a mongod/mongos instance. */ + compressors?: CompressorName[] | string + /** An integer that specifies the compression level if using zlib for network compression. */ + zlibCompressionLevel?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | undefined + /** The maximum number of hosts to connect to when using an srv connection string, a setting of `0` means unlimited hosts */ + srvMaxHosts?: number + /** + * Modifies the srv URI to look like: + * + * `_{srvServiceName}._tcp.{hostname}.{domainname}` + * + * Querying this DNS URI is expected to respond with SRV records + */ + srvServiceName?: string + /** The maximum number of connections in the connection pool. */ + maxPoolSize?: number + /** The minimum number of connections in the connection pool. */ + minPoolSize?: number + /** The maximum number of connections that may be in the process of being established concurrently by the connection pool. */ + maxConnecting?: number + /** The maximum number of milliseconds that a connection can remain idle in the pool before being removed and closed. */ + maxIdleTimeMS?: number + /** The maximum time in milliseconds that a thread can wait for a connection to become available. */ + waitQueueTimeoutMS?: number + /** Specify a read concern for the collection (only MongoDB 3.2 or higher supported) */ + readConcern?: ReadConcernLike + /** The level of isolation */ + readConcernLevel?: ReadConcernLevel + /** Specifies the read preferences for this connection */ + readPreference?: ReadPreferenceMode | ReadPreference + /** Specifies, in seconds, how stale a secondary can be before the client stops using it for read operations. */ + maxStalenessSeconds?: number + /** Specifies the tags document as a comma-separated list of colon-separated key-value pairs. */ + readPreferenceTags?: TagSet[] + /** The auth settings for when connection to server. */ + auth?: Auth + /** Specify the database name associated with the userโ€™s credentials. */ + authSource?: string + /** Specify the authentication mechanism that MongoDB will use to authenticate the connection. */ + authMechanism?: AuthMechanism + /** Specify properties for the specified authMechanism as a comma-separated list of colon-separated key-value pairs. */ + authMechanismProperties?: AuthMechanismProperties + /** The size (in milliseconds) of the latency window for selecting among multiple suitable MongoDB instances. */ + localThresholdMS?: number + /** Specifies how long (in milliseconds) to block for server selection before throwing an exception. */ + serverSelectionTimeoutMS?: number + /** heartbeatFrequencyMS controls when the driver checks the state of the MongoDB deployment. Specify the interval (in milliseconds) between checks, counted from the end of the previous check until the beginning of the next one. */ + heartbeatFrequencyMS?: number + /** Sets the minimum heartbeat frequency. In the event that the driver has to frequently re-check a server's availability, it will wait at least this long since the previous check to avoid wasted effort. */ + minHeartbeatFrequencyMS?: number + /** The name of the application that created this MongoClient instance. MongoDB 3.4 and newer will print this value in the server log upon establishing each connection. It is also recorded in the slow query log and profile collections */ + appName?: string + /** Enables retryable reads. */ + retryReads?: boolean + /** Enable retryable writes. */ + retryWrites?: boolean + /** Allow a driver to force a Single topology type with a connection string containing one host */ + directConnection?: boolean + /** Instruct the driver it is connecting to a load balancer fronting a mongos like service */ + loadBalanced?: boolean + /** + * The write concern w value + * @deprecated Please use the `writeConcern` option instead + */ + w?: W + /** + * The write concern timeout + * @deprecated Please use the `writeConcern` option instead + */ + wtimeoutMS?: number + /** + * The journal write concern + * @deprecated Please use the `writeConcern` option instead + */ + journal?: boolean + /** + * A MongoDB WriteConcern, which describes the level of acknowledgement + * requested from MongoDB for write operations. + * + * @see https://www.mongodb.com/docs/manual/reference/write-concern/ + */ + writeConcern?: WriteConcern | WriteConcernSettings + /** Validate mongod server certificate against Certificate Authority */ + sslValidate?: boolean + /** SSL Certificate file path. */ + sslCA?: string + /** SSL Certificate file path. */ + sslCert?: string + /** SSL Key file file path. */ + sslKey?: string + /** SSL Certificate pass phrase. */ + sslPass?: string + /** SSL Certificate revocation list file path. */ + sslCRL?: string + /** TCP Connection no delay */ + noDelay?: boolean + /** TCP Connection keep alive enabled */ + keepAlive?: boolean + /** The number of milliseconds to wait before initiating keepAlive on the TCP socket */ + keepAliveInitialDelay?: number + /** Force server to assign `_id` values instead of driver */ + forceServerObjectId?: boolean + /** A primary key factory function for generation of custom `_id` keys */ + pkFactory?: PkFactory + /** Enable command monitoring for this client */ + monitorCommands?: boolean + /** Server API version */ + serverApi?: ServerApi | ServerApiVersion + /** + * Optionally enable in-use auto encryption + * + * @remarks + * Automatic encryption is an enterprise only feature that only applies to operations on a collection. Automatic encryption is not supported for operations on a database or view, and operations that are not bypassed will result in error + * (see [libmongocrypt: Auto Encryption Allow-List](https://github.com/mongodb/specifications/blob/master/source/client-side-encryption/client-side-encryption.rst#libmongocrypt-auto-encryption-allow-list)). To bypass automatic encryption for all operations, set bypassAutoEncryption=true in AutoEncryptionOpts. + * + * Automatic encryption requires the authenticated user to have the [listCollections privilege action](https://www.mongodb.com/docs/manual/reference/command/listCollections/#dbcmd.listCollections). + * + * If a MongoClient with a limited connection pool size (i.e a non-zero maxPoolSize) is configured with AutoEncryptionOptions, a separate internal MongoClient is created if any of the following are true: + * - AutoEncryptionOptions.keyVaultClient is not passed. + * - AutoEncryptionOptions.bypassAutomaticEncryption is false. + * + * If an internal MongoClient is created, it is configured with the same options as the parent MongoClient except minPoolSize is set to 0 and AutoEncryptionOptions is omitted. + */ + autoEncryption?: AutoEncryptionOptions + /** Allows a wrapping driver to amend the client metadata generated by the driver to include information about the wrapping driver */ + driverInfo?: DriverInfo + /** Configures a Socks5 proxy host used for creating TCP connections. */ + proxyHost?: string + /** Configures a Socks5 proxy port used for creating TCP connections. */ + proxyPort?: number + /** Configures a Socks5 proxy username when the proxy in proxyHost requires username/password authentication. */ + proxyUsername?: string + /** Configures a Socks5 proxy password when the proxy in proxyHost requires username/password authentication. */ + proxyPassword?: string + /* Excluded from this release type: srvPoller */ + /* Excluded from this release type: connectionType */ + /* Excluded from this release type: __index */ +} - /** - * Specify a journal write concern. - */ - j?: boolean +/* Excluded from this release type: MongoClientPrivate */ - /** - * Allow driver to bypass schema validation in MongoDB 3.2 or higher. - */ - bypassDocumentValidation?: boolean +/** + * An error generated when a feature that is not enabled or allowed for the current server + * configuration is used + * + * + * @public + * @category Error + */ +export declare class MongoCompatibilityError extends MongoAPIError { + constructor(message: string) + get name(): string } -export interface CollectionDistinctOptions { - /** - * The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, - * ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST). - */ - readPreference?: ReadPreference | string +/** + * A representation of the credentials used by MongoDB + * @public + */ +export declare class MongoCredentials { + /** The username used for authentication */ + readonly username: string + /** The password used for authentication */ + readonly password: string + /** The database that the user should authenticate against */ + readonly source: string + /** The method used to authenticate */ + readonly mechanism: AuthMechanism + /** Special properties used by some types of auth mechanisms */ + readonly mechanismProperties: AuthMechanismProperties + constructor(options: MongoCredentialsOptions) + /** Determines if two MongoCredentials objects are equivalent */ + equals(other: MongoCredentials): boolean + /** + * If the authentication mechanism is set to "default", resolves the authMechanism + * based on the server version and server supported sasl mechanisms. + * + * @param hello - A hello response from the server + */ + resolveAuthMechanism(hello?: Document): MongoCredentials + validate(): void + static merge( + creds: MongoCredentials | undefined, + options: Partial, + ): MongoCredentials +} + +/** @public */ +export declare interface MongoCredentialsOptions { + username: string + password: string + source: string + db?: string + mechanism?: AuthMechanism + mechanismProperties: AuthMechanismProperties } /** - * Create a new ObjectID instance. + * An error thrown when an attempt is made to read from a cursor that has been exhausted * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html + * @public + * @category Error */ -export interface Collection { - /** - * Get the collection name. - */ - collectionName: string - - /** - * Get the full collection namespace. - */ - namespace: string +export declare class MongoCursorExhaustedError extends MongoAPIError { + constructor(message?: string) + get name(): string +} - /** - * The current write concern values. - */ - writeConcern: WriteConcern +/** + * An error thrown when the user attempts to add options to a cursor that has already been + * initialized + * + * @public + * @category Error + */ +export declare class MongoCursorInUseError extends MongoAPIError { + constructor(message?: string) + get name(): string +} +/** @public */ +export declare class MongoDBNamespace { + db: string + collection: string | undefined /** - * The current read concern values. + * Create a namespace object + * + * @param db - database name + * @param collection - collection name */ - readConcern: ReadConcern + constructor(db: string, collection?: string) + toString(): string + withCollection(collection: string): MongoDBNamespace + static fromString(namespace?: string): MongoDBNamespace +} - /** - * Get current index hint for collection. - */ - hint: any - - /** - * Execute an aggregation framework pipeline against the collection, needs MongoDB >= 2.2 - * - * @param pipeline Array containing all the aggregation framework commands for the execution. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#aggregate - */ - aggregate( - pipeline: Object[], - callback: MongoCallback, - ): AggregationCursor - - /** - * Execute an aggregation framework pipeline against the collection, needs MongoDB >= 2.2 - * - * @param pipeline Array containing all the aggregation framework commands for the execution. - * @param options Optional. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#aggregate - */ - aggregate( - pipeline: Object[], - options?: CollectionAggregationOptions, - callback?: MongoCallback, - ): AggregationCursor - - /** - * Execute an aggregation framework pipeline against the collection, needs MongoDB >= 2.2 - * - * @param pipeline Array containing all the aggregation framework commands for the execution. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#aggregate - */ - aggregate( - pipeline: Object[], - callback: MongoCallback, - ): AggregationCursor - - /** - * Execute an aggregation framework pipeline against the collection, needs MongoDB >= 2.2 - * - * @param pipeline Array containing all the aggregation framework commands for the execution. - * @param options Optional. - * @param callback Optional - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#aggregate - */ - aggregate( - pipeline: Object[], - options?: CollectionAggregationOptions, - callback?: MongoCallback, - ): AggregationCursor - - /** - * BulkWrite. - * - * @param operations Bulk operations to perform. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#bulkWrite - */ - bulkWrite( - operations: Object[], - callback: MongoCallback, - ): void - - /** - * BulkWrite. - * - * @param operations Bulk operations to perform. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#bulkWrite - */ - bulkWrite( - operations: Object[], - options?: CollectionBulkWriteOptions, - ): Promise - - /** - * BulkWrite. - * - * @param operations Bulk operations to perform. - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#bulkWrite - */ - bulkWrite( - operations: Object[], - options: CollectionBulkWriteOptions, - callback: MongoCallback, - ): void - - /** - * Count number of matching documents in the db to a query. - * - * @param query The query for the count. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#count - */ - count(query: FilterQuery, callback: MongoCallback): void - - /** - * Count number of matching documents in the db to a query. - * - * @param query The query for the count. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#count - */ - count( - query: FilterQuery, - options?: MongoCountPreferences, - ): Promise - - /** - * Count number of matching documents in the db to a query. - * - * @param query The query for the count= - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#count - */ - count( - query: FilterQuery, - options: MongoCountPreferences, - callback: MongoCallback, - ): void - - /** - * Count number of matching documents in the db to a query. - * - * @param query The query for the countDocuments. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#countDocumentst - */ - countDocuments(query: FilterQuery, callback: MongoCallback): void - - /** - * Count number of matching documents in the db to a query. - * - * @param query The query for the count. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#countDocuments - */ - countDocuments( - query: FilterQuery, - options?: MongoCountPreferences, - ): Promise - - /** - * Count number of matching documents in the db to a query. - * - * @param query The query for the count= - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#countDocuments - */ - countDocuments( - query: FilterQuery, - options: MongoCountPreferences, - callback: MongoCallback, - ): void - - /** - * Creates an index on the db and collection collection. - * - * @param fieldOrSpec Defines the index. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#createIndex - */ - createIndex( - fieldOrSpec: string | any, - callback: MongoCallback, - ): void - - /** - * Creates an index on the db and collection collection. - * - * @param fieldOrSpec Defines the index. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#createIndex - */ - createIndex( - fieldOrSpec: string | any, - options?: MongodbIndexOptions, - ): Promise - - /** - * Creates an index on the db and collection collection. - * - * @param fieldOrSpec Defines the index. - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#createIndex - */ - createIndex( - fieldOrSpec: string | any, - options: MongodbIndexOptions, - callback: MongoCallback, - ): void - - /** - * CreateIndexes. - * - * @param indexSpecs An array of index specifications to be created. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#createIndexes and http://docs.mongodb.org/manual/reference/command/createIndexes/ - */ - createIndexes(indexSpecs: Object[]): Promise - - /** - * CreateIndexes. - * - * @param indexSpecs An array of index specifications to be created. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#createIndexes and http://docs.mongodb.org/manual/reference/command/createIndexes/ - */ - createIndexes(indexSpecs: Object[], callback: MongoCallback): void - - /** - * Delete multiple documents on MongoDB. - * - * @param filter The Filter used to select the documents to remove. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#deleteMany - */ - deleteMany( - filter: FilterQuery, - callback: MongoCallback, - ): void - - /** - * Delete multiple documents on MongoDB. - * - * @param filter The Filter used to select the documents to remove. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#deleteMany - */ - deleteMany( - filter: FilterQuery, - options?: CollectionOptions, - ): Promise - - /** - * Delete multiple documents on MongoDB. - * - * @param filter The Filter used to select the documents to remove. - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#deleteMany - */ - deleteMany( - filter: FilterQuery, - options: CollectionOptions, - callback: MongoCallback, - ): void - - /** - * Delete a document on MongoDB. - * - * @param filter The Filter used to select the document to remove. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#deleteOne - */ - deleteOne( - filter: FilterQuery, - callback: MongoCallback, - ): void - - /** - * Delete a document on MongoDB. - * - * @param filter The Filter used to select the document to remove. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#deleteOne - */ - deleteOne( - filter: FilterQuery, - options?: CollectionDeleteOneOptions, - ): Promise - - /** - * Delete a document on MongoDB. - * - * @param filter The Filter used to select the document to remove. - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#deleteOne - */ - deleteOne( - filter: FilterQuery, - options: CollectionDeleteOneOptions, - callback: MongoCallback, - ): void - - /** - * The distinct command returns returns a list of distinct values for the given key across a collection. - * - * @param key Field of the document to find distinct values for. - * @param query The query for filtering the set of documents to which we apply the distinct filter. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#distinct - */ - distinct( - key: string, - query: FilterQuery, - callback: MongoCallback, - ): void - - /** - * The distinct command returns returns a list of distinct values for the given key across a collection. - * - * @param key Field of the document to find distinct values for. - * @param query The query for filtering the set of documents to which we apply the distinct filter. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#distinct - */ - distinct( - key: string, - query: FilterQuery, - options?: CollectionDistinctOptions, - ): Promise - - /** - * The distinct command returns returns a list of distinct values for the given key across a collection. - * - * @param key Field of the document to find distinct values for. - * @param query The query for filtering the set of documents to which we apply the distinct filter. - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#distinct - */ - distinct( - key: string, - query: FilterQuery, - options: CollectionDistinctOptions, - callback: MongoCallback, - ): void - - /** - * Drop the collection from the database, removing it permanently. New accesses will create a new collection. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#drop - */ - drop(): Promise - - /** - * Drop the collection from the database, removing it permanently. New accesses will create a new collection. - * - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#drop - */ - drop(callback: MongoCallback): void - - /** - * Drops an index from this collection. - * - * @param indexName Name of the index to drop. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#dropIndex - */ - dropIndex(indexName: string, callback: MongoCallback): void - - /** - * Drops an index from this collection. - * - * @param indexName Name of the index to drop. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#dropIndex - */ - dropIndex(indexName: string, options?: CollectionOptions): Promise - - /** - * Drops an index from this collection. - * - * @param indexName Name of the index to drop. - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#dropIndex - */ - dropIndex( - indexName: string, - options: CollectionOptions, - callback: MongoCallback, - ): void - - /** - * Drops all indexes from this collection. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#dropIndexes - */ - dropIndexes(): Promise - - /** - * Drops all indexes from this collection. - * - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#dropIndexes - */ - dropIndexes(callback?: MongoCallback): void - - /** - * Creates a cursor for a query that can be used to iterate over results from MongoDB. - * - * @param query The cursor query object. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#find - */ - find(query?: Object): Cursor - - /** - * Creates a cursor for a query that can be used to iterate over results from MongoDB. - * - * @param query The cursor query object. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#find - */ - find(query?: FilterQuery): Cursor - - /** @deprecated */ - find( - query: FilterQuery, - fields?: Object, - skip?: number, - limit?: number, - timeout?: number, - ): Cursor - - /** - * Fetches the first document that matches the query. - * - * @param query Query for find Operation. - * @param callback The command result callback. - * @see https://mongodb.github.io/node-mongodb-native/3.6/api/Collection.html#findOne - */ - findOne(query: FilterQuery, callback: MongoCallback): void - - /** - * Fetches the first document that matches the query. - * - * @param query Query for find Operation. - * @param options Optional. - * @see https://mongodb.github.io/node-mongodb-native/3.6/api/Collection.html#findOne - */ - findOne( - query: FilterQuery, - options?: MongodbFindOneOptions, - ): Promise - - /** - * Fetches the first document that matches the query. - * - * @param query Query for find Operation. - * @param options Optional settings. - * @param callback The command result callback. - * @see https://mongodb.github.io/node-mongodb-native/3.6/api/Collection.html#findOne - */ - findOne( - query: FilterQuery, - options: MongodbFindOneOptions, - callback: MongoCallback, - ): void - - /** - * Find a document and delete it in one atomic operation, requires a write lock for the duration of the operation. - * - * @param filter Document selection filter. - * @param callback The collection result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#findOneAndDelete - */ - findOneAndDelete( - filter: FilterQuery, - callback: MongoCallback, - ): void - - /** - * Find a document and delete it in one atomic operation, requires a write lock for the duration of the operation. - * - * @param filter Document selection filter. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#findOneAndDelete - */ - findOneAndDelete( - filter: FilterQuery, - options?: FindOneAndDeleteOptions, - ): Promise - - /** - * Find a document and delete it in one atomic operation, requires a write lock for the duration of the operation. - * - * @param filter Document selection filter. - * @param options Optional settings. - * @param callback The collection result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#findOneAndDelete - */ - findOneAndDelete( - filter: FilterQuery, - options: FindOneAndDeleteOptions, - callback: MongoCallback, - ): void - - /** - * Find a document and replace it in one atomic operation, requires a write lock for the duration of the operation. - * - * @param filter Document selection filter. - * @param replacement Document replacing the matching document. - * @param callback The collection result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#findOneAndReplace - */ - findOneAndReplace( - filter: FilterQuery, - replacement: Object, - callback: MongoCallback, - ): void - - /** - * Find a document and replace it in one atomic operation, requires a write lock for the duration of the operation. - * - * @param filter Document selection filter. - * @param replacement Document replacing the matching document. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#findOneAndReplace - */ - findOneAndReplace( - filter: FilterQuery, - replacement: Object, - options?: FindOneAndReplaceOption, - ): Promise - - /** - * Find a document and replace it in one atomic operation, requires a write lock for the duration of the operation. - * - * @param filter Document selection filter. - * @param replacement Document replacing the matching document. - * @param options Optional settings. - * @param callback The collection result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#findOneAndReplace - */ - findOneAndReplace( - filter: FilterQuery, - replacement: Object, - options: FindOneAndReplaceOption, - callback: MongoCallback, - ): void - - /** - * Find a document and update it in one atomic operation, requires a write lock for the duration of the operation. - * - * @param filter Document selection filter. - * @param update Update operations to be performed on the document. - * @param callback The collection result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#findOneAndUpdate - */ - findOneAndUpdate( - filter: FilterQuery, - update: UpdateQuery, - callback: MongoCallback, - ): void - - /** - * Find a document and update it in one atomic operation, requires a write lock for the duration of the operation. - * - * @param filter Document selection filter. - * @param update Update operations to be performed on the document. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#findOneAndUpdate - */ - findOneAndUpdate( - filter: FilterQuery, - update: UpdateQuery, - options?: FindOneAndReplaceOption, - ): Promise - - /** - * Find a document and update it in one atomic operation, requires a write lock for the duration of the operation. - * - * @param filter Document selection filter. - * @param update Update operations to be performed on the document. - * @param options Optional settings. - * @param callback The collection result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#findOneAndUpdate - */ - findOneAndUpdate( - filter: FilterQuery, - update: UpdateQuery, - options: FindOneAndReplaceOption, - callback: MongoCallback, - ): void - - /** - * Execute a geo search using a geo haystack index on a collection. - * - * @param x Point to search on the x axis, ensure the indexes are ordered in the same order. - * @param y Point to search on the y axis, ensure the indexes are ordered in the same order. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#geoHaystackSearch - */ - geoHaystackSearch(x: number, y: number, callback: MongoCallback): void - - /** - * Execute a geo search using a geo haystack index on a collection. - * - * @param x Point to search on the x axis, ensure the indexes are ordered in the same order. - * @param y Point to search on the y axis, ensure the indexes are ordered in the same order. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#geoHaystackSearch - */ - geoHaystackSearch( - x: number, - y: number, - options?: GeoHaystackSearchOptions, - ): Promise - - /** - * Execute a geo search using a geo haystack index on a collection. - * - * @param x Point to search on the x axis, ensure the indexes are ordered in the same order. - * @param y Point to search on the y axis, ensure the indexes are ordered in the same order. - * @param options Optional settings - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#geoHaystackSearch - */ - geoHaystackSearch( - x: number, - y: number, - options: GeoHaystackSearchOptions, - callback: MongoCallback, - ): void - - /** - * Execute the geoNear command to search for items in the collection. - * - * @param x Point to search on the x axis, ensure the indexes are ordered in the same order. - * @param y Point to search on the y axis, ensure the indexes are ordered in the same order. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#geoNear - */ - geoNear(x: number, y: number, callback: MongoCallback): void - - /** - * Execute the geoNear command to search for items in the collection. - * - * @param x Point to search on the x axis, ensure the indexes are ordered in the same order. - * @param y Point to search on the y axis, ensure the indexes are ordered in the same order. - * @param options Optionals. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#geoNear - */ - geoNear(x: number, y: number, options?: GeoNearOptions): Promise - - /** - * Execute the geoNear command to search for items in the collection. - * - * @param x Point to search on the x axis, ensure the indexes are ordered in the same order. - * @param y Point to search on the y axis, ensure the indexes are ordered in the same order. - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#geoNear - */ - geoNear( - x: number, - y: number, - options: GeoNearOptions, - callback: MongoCallback, - ): void - - /** - * Run a group command across a collection. - * - * @param keys An object, array or function expressing the keys to group by. - * @param condition An optional condition that must be true for a row to be considered. - * @param initial Initial value of the aggregation counter object. - * @param reduce The reduce function aggregates (reduces) the objects iterated. - * @param finalize An optional function to be run on each item in the result set just before the item is returned. - * @param command Specify if you wish to run using the internal group command or using eval, default is true. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#group - */ - group( - keys: Object | Array | Function | Code, - condition: Object, - initial: Object, - reduce: Function | Code, - finalize: Function | Code, - command: boolean, - callback: MongoCallback, - ): void - - /** - * Run a group command across a collection. - * - * @param keys An object, array or function expressing the keys to group by. - * @param condition An optional condition that must be true for a row to be considered. - * @param initial Initial value of the aggregation counter object. - * @param reduce The reduce function aggregates (reduces) the objects iterated. - * @param finalize An optional function to be run on each item in the result set just before the item is returned. - * @param command Specify if you wish to run using the internal group command or using eval, default is true. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#group - */ - group( - keys: Object | Array | Function | Code, - condition: Object, - initial: Object, - reduce: Function | Code, - finalize: Function | Code, - command: boolean, - options?: GroupOptions, - ): Promise - - /** - * Run a group command across a collection. - * - * @param keys An object, array or function expressing the keys to group by. - * @param condition An optional condition that must be true for a row to be considered. - * @param initial Initial value of the aggregation counter object. - * @param reduce The reduce function aggregates (reduces) the objects iterated. - * @param finalize An optional function to be run on each item in the result set just before the item is returned. - * @param command Specify if you wish to run using the internal group command or using eval, default is true. - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#group - */ - group( - keys: Object | Array | Function | Code, - condition: Object, - initial: Object, - reduce: Function | Code, - finalize: Function | Code, - command: boolean, - options: GroupOptions, - callback: MongoCallback, - ): void - - /** - * Retrieve all the indexes on the collection. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#indexes - */ - indexes(): Promise - - /** - * Retrieve all the indexes on the collection. - * - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#indexes - */ - indexes(callback: MongoCallback): void - - /** - * Checks if one or more indexes exist on the collection, fails on first non-existing index. - * - * @param indexes One or more index names to check. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#indexExists - */ - indexExists(indexes: string | string[]): Promise - - /** - * Checks if one or more indexes exist on the collection, fails on first non-existing index. - * - * @param indexes One or more index names to check. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#indexExists - */ - indexExists( - indexes: string | string[], - callback: MongoCallback, - ): void - - /** - * Retrieves this collections index info. - * - * @param callback The command result callback - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#indexInformation - */ - indexInformation(callback: MongoCallback): void - - /** - * Retrieves this collections index info. - * - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#indexInformation - */ - indexInformation(options?: { full: boolean }): Promise - - /** - * Retrieves this collections index info. - * - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#indexInformation - */ - indexInformation( - options: { full: boolean }, - callback: MongoCallback, - ): void - - /** - * Initiate an In order bulk write operation, operations will be serially executed in the order they are added, - * creating a new operation for each switch in types. - * - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#initializeOrderedBulkOp - */ - initializeOrderedBulkOp(options?: CollectionOptions): OrderedBulkOperation - - /** - * Initiate a Out of order batch write operation. All operations will be buffered into insert/update/remove commands executed out of order. - * - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#initializeUnorderedBulkOp - */ - initializeUnorderedBulkOp( - options?: CollectionOptions, - ): UnorderedBulkOperation - - // http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#insertOne - /** @deprecated Use insertOne, insertMany or bulkWrite */ - insert(docs: Object, callback: MongoCallback): void - /** @deprecated Use insertOne, insertMany or bulkWrite */ - insert( - docs: Object, - options?: CollectionInsertOneOptions, - ): Promise - /** @deprecated Use insertOne, insertMany or bulkWrite */ - insert( - docs: Object, - options: CollectionInsertOneOptions, - callback: MongoCallback, - ): void - - /** - * InsertMany. - * - * @param docs Documents to insert. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#insertMany - */ - insertMany( - docs: Object[], - callback: MongoCallback, - ): void - - /** - * InsertMany. - * - * @param docs Documents to insert. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#insertMany - */ - insertMany( - docs: Object[], - options?: CollectionInsertManyOptions, - ): Promise - - /** - * InsertMany. - * - * @param docs Documents to insert. - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#insertMany - */ - insertMany( - docs: Object[], - options: CollectionInsertManyOptions, - callback: MongoCallback, - ): void - - /** - * InsertOne. - * - * @param docs Document to insert. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#insertOne - */ - insertOne( - docs: Object, - callback: MongoCallback, - ): void - - /** - * InsertOne. - * - * @param docs Document to insert. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#insertOne - */ - insertOne( - docs: Object, - options?: CollectionInsertOneOptions, - ): Promise - - /** - * InsertOne. - * - * @param docs Document to insert. - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#insertOne - */ - insertOne( - docs: Object, - options: CollectionInsertOneOptions, - callback: MongoCallback, - ): void - - /** - * Returns if the collection is a capped collection. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#isCapped - */ - isCapped(): Promise - - /** - * Returns if the collection is a capped collection. - * - * @param callback The results callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#isCapped - */ - isCapped(callback: MongoCallback): void - - /** - * Get the list of all indexes information for the collection. - * - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#listIndexes - */ - listIndexes(options?: ListIndexesOptions): CommandCursor - - /** - * Run Map Reduce across a collection. Be aware that the inline option for out will return an array of results not a collection. - * - * @param map The mapping function. - * @param reduce The reduce function. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#mapReduce - */ - mapReduce( - map: Function | string, - reduce: Function | string, - callback: MongoCallback, - ): void - - /** - * Run Map Reduce across a collection. Be aware that the inline option for out will return an array of results not a collection. - * - * @param map The mapping function. - * @param reduce The reduce function. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#mapReduce - */ - mapReduce( - map: Function | string, - reduce: Function | string, - options?: MapReduceOptions, - ): Promise - - /** - * Run Map Reduce across a collection. Be aware that the inline option for out will return an array of results not a collection. - * - * @param map The mapping function. - * @param reduce The reduce function. - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#mapReduce - */ - mapReduce( - map: Function | string, - reduce: Function | string, - options: MapReduceOptions, - callback: MongoCallback, - ): void - - /** - * Returns the options of the collection. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#options - */ - options(): Promise - - /** - * Returns the options of the collection. - * - * @param callback The results callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#options - */ - options(callback: MongoCallback): void - - /** - * Return N number of parallel cursors for a collection allowing parallel reading of entire collection. There are - * no ordering guarantees for returned results. - * - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#parallelCollectionScan - */ - parallelCollectionScan(callback: MongoCallback[]>): void - - /** - * Return N number of parallel cursors for a collection allowing parallel reading of entire collection. There are - * no ordering guarantees for returned results. - * - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#parallelCollectionScan - */ - parallelCollectionScan( - options?: ParallelCollectionScanOptions, - ): Promise[]> - - /** - * Return N number of parallel cursors for a collection allowing parallel reading of entire collection. There are - * no ordering guarantees for returned results. - * - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#parallelCollectionScan - */ - parallelCollectionScan( - options: ParallelCollectionScanOptions, - callback: MongoCallback[]>, - ): void - - /** - * Reindex all indexes on the collection. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#reIndex - */ - reIndex(): Promise - - /** - * Reindex all indexes on the collection. - * - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#reIndex - */ - reIndex(callback: MongoCallback): void - - // http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#remove - /** @deprecated Use use deleteOne, deleteMany or bulkWrite */ - remove(selector: Object, callback: MongoCallback): void - /** @deprecated Use use deleteOne, deleteMany or bulkWrite */ - remove( - selector: Object, - options?: CollectionOptions & { single?: boolean }, - ): Promise - /** @deprecated Use use deleteOne, deleteMany or bulkWrite */ - remove( - selector: Object, - options?: CollectionOptions & { single?: boolean }, - callback?: MongoCallback, - ): void - - /** - * Rename the collection. - * - * @param newName New name of of the collection. - * @param callback The results callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#rename - */ - rename(newName: string, callback: MongoCallback>): void - - /** - * Rename the collection. - * - * @param newName New name of of the collection. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#rename - */ - rename( - newName: string, - options?: { dropTarget?: boolean }, - ): Promise> - - /** - * Rename the collection. - * - * @param newName New name of of the collection. - * @param options Optional settings. - * @param callback The results callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#rename - */ - rename( - newName: string, - options: { dropTarget?: boolean }, - callback: MongoCallback>, - ): void - - /** - * Replace a document on MongoDB. - * - * @param filter The Filter used to select the document to update. - * @param doc The Document that replaces the matching document. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#replaceOne - */ - replaceOne( - filter: FilterQuery, - doc: Object, - callback: MongoCallback, - ): void - - /** - * Replace a document on MongoDB. - * - * @param filter The Filter used to select the document to update. - * @param doc The Document that replaces the matching document. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#replaceOne - */ - replaceOne( - filter: FilterQuery, - doc: Object, - options?: ReplaceOneOptions, - ): Promise - - /** - * Replace a document on MongoDB. - * - * @param filter The Filter used to select the document to update. - * @param doc The Document that replaces the matching document. - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#replaceOne - */ - replaceOne( - filter: FilterQuery, - doc: Object, - options: ReplaceOneOptions, - callback: MongoCallback, - ): void - - // http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#save - /** @deprecated Use insertOne, insertMany, updateOne or updateMany */ - save(doc: Object, callback: MongoCallback): void - /** @deprecated Use insertOne, insertMany, updateOne or updateMany */ - save(doc: Object, options?: CollectionOptions): Promise - /** @deprecated Use insertOne, insertMany, updateOne or updateMany */ - save( - doc: Object, - options: CollectionOptions, - callback: MongoCallback, - ): void - - /** - * Get all the collection statistics. - * - * @param callback The collection result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#stats - */ - stats(callback: MongoCallback): void - - /** - * Get all the collection statistics. - * - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#stats - */ - stats(options?: { scale: number }): Promise - - /** - * Get all the collection statistics. - * - * @param options Optional settings. - * @param callback The collection result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#stats - */ - stats(options: { scale: number }, callback: MongoCallback): void - - // http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#update - /** @deprecated use updateOne, updateMany or bulkWrite */ - update( - filter: FilterQuery, - update: UpdateQuery, - callback: MongoCallback, - ): void - /** @deprecated use updateOne, updateMany or bulkWrite */ - update( - filter: FilterQuery, - update: UpdateQuery, - options?: ReplaceOneOptions & { multi?: boolean }, - ): Promise - /** @deprecated use updateOne, updateMany or bulkWrite */ - update( - filter: FilterQuery, - update: UpdateQuery, - options: ReplaceOneOptions & { multi?: boolean }, - callback: MongoCallback, - ): void - - /** - * Update multiple documents on MongoDB. - * - * @param filter The Filter used to select the document to update. - * @param update The update operations to be applied to the document. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#updateMany - */ - updateMany( - filter: FilterQuery, - update: UpdateQuery, - callback: MongoCallback, - ): void - - /** - * Update multiple documents on MongoDB. - * - * @param filter The Filter used to select the document to update. - * @param update The update operations to be applied to the document. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#updateMany - */ - updateMany( - filter: FilterQuery, - update: UpdateQuery, - options?: UpdateManyOptions, - ): Promise - - /** - * Update multiple documents on MongoDB. - * - * @param filter The Filter used to select the document to update. - * @param update The update operations to be applied to the document. - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#updateMany - */ - updateMany( - filter: FilterQuery, - update: UpdateQuery, - options: UpdateManyOptions, - callback: MongoCallback, - ): void - - /** - * Update a single document on MongoDB. - * - * @param filter The Filter used to select the document to update. - * @param update The update operations to be applied to the document. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#updateOne - */ - updateOne( - filter: FilterQuery, - update: UpdateQuery, - callback: MongoCallback, - ): void - - /** - * Update a single document on MongoDB. - * - * @param filter The Filter used to select the document to update. - * @param update The update operations to be applied to the document. - * @param options Optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#updateOne - */ - updateOne( - filter: FilterQuery, - update: UpdateQuery, - options?: ReplaceOneOptions, - ): Promise - - /** - * Update a single document on MongoDB. - * - * @param filter The Filter used to select the document to update. - * @param update The update operations to be applied to the document. - * @param options Optional settings. - * @param callback The command result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#updateOne - */ - updateOne( - filter: FilterQuery, - update: UpdateQuery, - options: ReplaceOneOptions, - callback: MongoCallback, - ): void - - /** - * Create a new Change Stream, watching for new changes (insertions, updates, replacements, deletions, and invalidations) in this collection. - * @param pipeline An array of aggregation pipeline stages through which to pass change stream documents. This allows for filtering (using $match) and manipulating the change stream documents. - * @param options Optional settings. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/Collection.html#watch - */ - watch( - pipeline?: Object[], - options?: ChangeStreamOptions & { - startAtClusterTime?: Timestamp - session?: ClientSession - }, - ): ChangeStream -} - -/** - * Condition. - */ -export type Condition = { - $eq?: T[P] - $gt?: T[P] - $gte?: T[P] - $in?: T[P][] - $lt?: T[P] - $lte?: T[P] - $ne?: T[P] - $nin?: T[P][] - $and?: (FilterQuery | T[P])[] - $or?: (FilterQuery | T[P])[] - $not?: (FilterQuery | T[P])[] | T[P] - $expr?: any - $jsonSchema?: any - $mod?: [number, number] - $regex?: RegExp - $options?: string - $text?: { - $search: string - $language?: string - $caseSensitive?: boolean - $diacraticSensitive?: boolean - } - $where?: Object - $geoIntersects?: Object - $geoWithin?: Object - $near?: Object - $nearSphere?: Object - $elemMatch?: Object - $size?: number - $bitsAllClear?: Object - $bitsAllSet?: Object - $bitsAnyClear?: Object - $bitsAnySet?: Object - [key: string]: any -} - -/** - * @see https://docs.mongodb.com/manual/reference/operator/update - */ -export type UpdateQuery = { - $inc?: { [P in keyof T]?: number } | { [key: string]: number } - $min?: { [P in keyof T]?: number } | { [key: string]: number } - $max?: { [P in keyof T]?: number } | { [key: string]: number } - $mul?: { [P in keyof T]?: number } | { [key: string]: number } - $set?: Partial | { [key: string]: any } - $setOnInsert?: Partial | { [key: string]: any } - $unset?: { [P in keyof T]?: "" } | { [key: string]: "" } - $rename?: { [key: string]: keyof T } | { [key: string]: string } - $currentDate?: - | { [P in keyof T]?: true | { $type: "date" | "timestamp" } } - | { [key: string]: true | { $type: "date" | "timestamp" } } - $addToSet?: Partial | { [key: string]: any } - $pop?: { [P in keyof T]?: -1 | 1 } | { [key: string]: -1 | 1 } - $pull?: Partial | { [key: string]: Condition } - $push?: Partial | { [key: string]: any } - $pushAll?: Partial | { [key: string]: Array } - $each?: Partial | { [key: string]: Array } - $bit?: { [P in keyof T]?: any } | { [key: string]: any } -} - -export type FilterQuery = - | { - [P in keyof T]?: T[P] | Condition - } - | { [key: string]: any } - -/** - * The name of the target collection. - * - * @see http://docs.mongodb.org/manual/reference/command/collStats/ - */ -export interface CollStats { - /** - * Namespace. - */ - ns: string - - /** - * The number of objects or documents in this collection. - */ - count: number - - /** - * Collection size in bytes. - */ - size: number - - /** - * Average object size in bytes. - */ - avgObjSize: number - - /** - * (Pre)allocated space for the collection in bytes. - */ - storageSize: number - - /** - * Number of extents (contiguously allocated chunks of datafile space). - */ - numExtents: number - - /** - * Number of indexes. - */ - nindexes: number - - /** - * Size of the most recently created extent in bytes. - */ - lastExtentSize: number - - /** - * Padding can speed up updates if documents grow. - */ - paddingFactor: number - - /** - * A number that indicates the user-set flags on the collection. userFlags - * only appears when using the mmapv1 storage engine. - */ - userFlags: number - - /** - * Total index size in bytes. - */ - totalIndexSize: number - - /** - * Size of specific indexes in bytes. - */ - indexSizes: { - _id_: number - username: number - } - - /** - * This field will be โ€œtrueโ€ if the collection is capped. - */ - capped: boolean - - /** - * Shows the maximum size of a capped collection. - */ - maxSize: boolean - - /** - * This document contains data reported directly by the WiredTiger engine and other data for internal diagnostic use. - */ - wiredTiger: any - - /** - * A document that reports data from the WiredTiger storage engine for each index in the collection. - * Other storage engines will return an empty document. - */ - indexDetails: any - - /** - * - */ - ok: number -} - -/** - * CollectionAggregationOptions. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#aggregate - */ -export interface CollectionAggregationOptions { - readPreference?: ReadPreference | string - - /** - * Return the query as cursor, on 2.6 > it returns as a real cursor on pre 2.6 it returns as an emulated cursor. - */ - cursor?: { batchSize: number } - - /** - * Explain returns the aggregation execution plan (requires mongodb 2.6 >). - */ - explain?: boolean - - /** - * allowDiskUse lets the server know if it can use disk to store temporary results for the aggregation (requires mongodb 2.6 >). - */ - allowDiskUse?: boolean - - /** - * maxTimeMS specifies a cumulative time limit in milliseconds for processing operations on the cursor. MongoDB interrupts the operation at the earliest following interrupt point. - */ - maxTimeMS?: boolean - - /** - * Allow driver to bypass schema validation in MongoDB 3.2 or higher. - */ - bypassDocumentValidation?: boolean -} - -/** - * CollectionInsertManyOptions. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#insertMany - */ -export interface CollectionInsertManyOptions { - /** - * The write concern. - */ - w?: number | string - - /** - * The write concern timeout. - */ - wtimeout?: number - - /** - * Specify a journal write concern. - */ - j?: boolean - - /** - * Serialize functions on any object. - */ - serializeFunctions?: boolean - - /** - * Force server to assign _id values instead of driver. - */ - forceServerObjectId?: boolean -} - -export interface UpdateManyOptions { - /** - * Update operation is an upsert. - */ - upsert?: boolean - - /** - * The write concern. - */ - w?: any - - /** - * The write concern timeout. - */ - wtimeout?: number - - /** - * Specify a journal write concern. - */ - j?: boolean -} - -/** - * CollectionBulkWriteOptions. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#bulkWrite - */ -export interface CollectionBulkWriteOptions { - /** - * The write concern. - */ - w?: number | string - - /** - * The write concern timeout. - */ - wtimeout?: number - - /** - * Specify a journal write concern. - */ - j?: boolean - - /** - * Serialize functions on any object. - */ - serializeFunctions?: boolean - - /** - * Execute write operation in ordered or unordered fashion. - */ - ordered?: boolean - - /** - * Allow driver to bypass schema validation in MongoDB 3.2 or higher. - */ - bypassDocumentValidation?: boolean -} - -/** - * BulkWriteOpResultObject. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#~BulkWriteOpResult - */ -export interface BulkWriteOpResultObject { - /** - * Number of documents inserted. - */ - insertedCount?: number - - /** - * Number of documents matched for update. - */ - matchedCount?: number - - /** - * Number of documents modified. - */ - modifiedCount?: number - - /** - * Number of documents deleted. - */ - deletedCount?: number - - /** - * Number of documents upserted. - */ - upsertedCount?: number - - /** - * Inserted document generated Id's, hash key is the index of the originating operation. - */ - insertedIds?: any - - /** - * Upserted document generated Id's, hash key is the index of the originating operation. - */ - upsertedIds?: any - - /** - * The command result object. - */ - result?: any -} - -/** - * MongoCountPreferences. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#count - */ -export interface MongoCountPreferences { - /** - * The limit of documents to count. - */ - limit?: number - - /** - * The number of documents to skip for the count. - */ - skip?: boolean - - /** - * An index name hint for the query. - */ - hint?: string - - /** - * The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, - * ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST). - */ - readPreference?: ReadPreference | string -} - -/** - * DeleteWriteOpResultObject. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#~deleteWriteOpResult - */ -export interface DeleteWriteOpResultObject { - /** - * The raw result returned from MongoDB, field will vary depending on server version. - * @param ok Is 1 if the command executed correctly. - * @param n The total count of documents deleted. - */ - result: { - ok?: number - n?: number - } - - /** - * The connection object used for the operation. - */ - connection?: any - - /** - * The number of documents deleted. - */ - deletedCount?: number -} - -/** - * FindAndModifyWriteOpResultObject. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#~findAndModifyWriteOpResult - */ -export interface FindAndModifyWriteOpResultObject { - /** - * Document returned from findAndModify command. - */ - value?: any - - /** - * The raw lastErrorObject returned from the command. - */ - lastErrorObject?: any - - /** - * Is 1 if the command executed correctly. - */ - ok?: number -} - -/** - * FindOneAndReplaceOption. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#findOneAndReplace - */ -export interface FindOneAndReplaceOption { - /** - * Limits the fields to return for all matching documents. - */ - projection?: Object - - /** - * Determines which document the operation modifies if the query selects multiple documents. - */ - sort?: Object - - /** - * The maximum amount of time to allow the query to run. - */ - maxTimeMS?: number - - /** - * Upsert the document if it does not exist. - */ - upsert?: boolean - - /** - * When false, returns the updated document rather than the original. The default is true. - */ - returnOriginal?: boolean -} - -/** - * GeoHaystackSearchOptions. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#geoHaystackSearch - */ -export interface GeoHaystackSearchOptions { - /** - * The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, - * ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST). - */ - readPreference?: ReadPreference | string - - /** - * Include results up to maxDistance from the point. - */ - maxDistance?: number - - /** - * Filter the results by a query. - */ - search?: Object - - /** - * Max number of results to return. - */ - limit?: number -} - -/** - * GeoNearOptions. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#geoNear - */ -export interface GeoNearOptions { - /** - * The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, - * ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST). - */ - readPreference?: ReadPreference | string - - /** - * Max number of results to return. - */ - num?: number - - /** - * Include results starting at minDistance from a point (2.6 or higher). - */ - minDistance?: number - - /** - * Include results up to maxDistance from the point. - */ - maxDistance?: number - - /** - * Include a value to multiply the distances with allowing for range conversions. - */ - distanceMultiplier?: number - - /** - * Filter the results by a query. - */ - query?: Object - - /** - * Perform query using a spherical model. - */ - spherical?: boolean - - /** - * The closest location in a document to the center of the search region will always be returned MongoDB > 2.X. - */ - uniqueDocs?: boolean - - /** - * Include the location data fields in the top level of the results MongoDB > 2.X. - */ - includeLocs?: boolean -} - -/** - * A class representation of the BSON Code type. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Code.html - */ -export declare class Code { - /** - * - * @param code a string or function. - * @param scope optional - */ - constructor(code: string | Function, scope?: Object) - - /** - * A string or function. - */ - code: string | Function - - /** - * An optional scope for the function. - */ - scope: any -} - -/** - * CollectionOptions. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#deleteMany - */ -export interface CollectionOptions { - /** - * The write concern. - */ - w?: number | string - - /** - * The write concern timeout. - */ - wtimeout?: number - - /** - * Specify a journal write concern. - */ - j?: boolean -} - -/** - * Create a new OrderedBulkOperation instance (INTERNAL TYPE, do not instantiate directly). - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/OrderedBulkOperation.html - */ -export interface OrderedBulkOperation { - /** - * Get the number of operations in the bulk. - */ - length: number - - /** - * Execute the ordered bulk operation. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/OrderedBulkOperation.html#execute - */ - execute(callback: MongoCallback): void - - /** - * Execute the ordered bulk operation. - * @param options optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/OrderedBulkOperation.html#execute - */ - execute(options?: FSyncOptions): Promise - - /** - * Execute the ordered bulk operation. - * @param options Optional settings. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/OrderedBulkOperation.html#execute - */ - execute( - options: FSyncOptions, - callback: MongoCallback, - ): void - - /** - * Initiate a find operation for an update/updateOne/remove/removeOne/replaceOne. - * @param selector The selector for the bulk operation. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/OrderedBulkOperation.html#find - */ - find(selector: Object): FindOperatorsOrdered - - /** - * Add a single insert document to the bulk operation. - * @param doc The document to insert - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/OrderedBulkOperation.html#insert - */ - insert(doc: Object): OrderedBulkOperation -} - -/** - * BulkWriteResult. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/BulkWriteResult.html - */ -export interface BulkWriteResult { - /** - * Did bulk operation correctly execute. - */ - ok: number - - /** - * number of inserted documents. - */ - nInserted: number - - /** - * number of documents updated logically. - */ - nUpdated: number - - /** - * Number of upserted documents. - */ - nUpserted: number - - /** - * - Number of documents updated physically on disk. - */ - nModified: number - - /** - * Number of removed documents. - */ - nRemoved: number - - /** - * Return an array of inserted ids. - */ - getInsertedIds(): Array - - /** - * Retrieve lastOp if available. - */ - getLastOp(): Object - - /** - * Return raw internal result. - */ - getRawResponse(): Object - - /** - * Return the upserted id at position x. - */ - getUpsertedIdAt(index: number): Object - - /** - * Return an array of upserted ids. - */ - getUpsertedIds(): Array<{ _id: string; index: number }> - - /** - * Retrieve the write concern error if any. - */ - getWriteConcernError(): WriteConcernError - - /** - * Returns a specific write error object. - */ - getWriteErrorAt(index: number): WriteError - - /** - * Returns the number of write errors off the bulk operation. - */ - getWriteErrorCount(): number - - /** - * Retrieve all write errors. - */ - getWriteErrors(): Array - - /** - * Returns true if the bulk operation contains a write error. - */ - hasWriteErrors(): boolean -} - -/** - * Create a new WriteError instance (INTERNAL TYPE, do not instantiate directly). - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/WriteError.html - */ -export interface WriteError { - /** - * Write concern error code. - */ - code: number - - /** - * Write concern error original bulk operation index. - */ - index: number - - /** - * Write concern error message. - */ - errmsg: string -} - -/** - * Create a new WriteConcernError instance (INTERNAL TYPE, do not instantiate directly). - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/WriteConcernError.html - */ -export interface WriteConcernError { - /** - * Write concern error code. - */ - code: number - - /** - * Write concern error message. - */ - errmsg: string -} - -/** - * Create a FindOperatorsOrdered instance (INTERNAL TYPE, do not instantiate directly). - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/FindOperatorsOrdered.html - */ -export interface FindOperatorsOrdered { - /** - * Add a remove operation to the bulk operation. - */ - delete(): OrderedBulkOperation - - /** - * Add a remove one operation to the bulk operation. - */ - deleteOne(): OrderedBulkOperation - - /** - * Add a replace one operation to the bulk operation. - */ - replaceOne(doc: Object): OrderedBulkOperation - - /** - * Add a single update document to the bulk operation. - */ - update(doc: Object): OrderedBulkOperation - - /** - * Add a single update one document to the bulk operation. - */ - updateOne(doc: Object): OrderedBulkOperation - - /** - * Upsert modifier for update bulk operation. - */ - upsert(): FindOperatorsOrdered -} - -/** - * Create a new UnorderedBulkOperation instance (INTERNAL TYPE, do not instantiate directly). - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/UnorderedBulkOperation.html - */ -export interface UnorderedBulkOperation { - /** - * Get the number of operations in the bulk. - */ - length: number - - /** - * Execute the ordered bulk operation. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/UnorderedBulkOperation.html#execute - */ - execute(callback: MongoCallback): void - - /** - * Execute the ordered bulk operation. - * @param options optional. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/UnorderedBulkOperation.html#execute - */ - execute(options?: FSyncOptions): Promise - - /** - * Execute the ordered bulk operation. - * @param options Optional settings. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/UnorderedBulkOperation.html#execute - */ - execute( - options: FSyncOptions, - callback: MongoCallback, - ): void - - /** - * Initiate a find operation for an update/updateOne/remove/removeOne/replaceOne. - * @param selector The selector for the bulk operation. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/UnorderedBulkOperation.html#find - */ - find(selector: Object): FindOperatorsUnordered - - /** - * Add a single insert document to the bulk operation. - * @param doc The document to insert. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/UnorderedBulkOperation.html#insert - */ - insert(doc: Object): UnorderedBulkOperation -} - -/** - * Create a FindOperatorsUnordered instance (INTERNAL TYPE, do not instantiate directly). - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/FindOperatorsUnordered.html - */ -export interface FindOperatorsUnordered { - /** - * Get the number of operations in the bulk. - */ - length: number - - /** - * Add a remove operation to the bulk operation. - */ - remove(): UnorderedBulkOperation - - /** - * Add a remove one operation to the bulk operation. - */ - removeOne(): UnorderedBulkOperation - - /** - * Add a replace one operation to the bulk operation. - * @param doc The new document to replace the existing one with. - */ - replaceOne(doc: Object): UnorderedBulkOperation - - /** - * Add a single update document to the bulk operation. - * @param doc Update operations - */ - update(doc: Object): UnorderedBulkOperation - - /** - * Add a single update one document to the bulk operation. - * @param doc Update operations - */ - updateOne(doc: Object): UnorderedBulkOperation - - /** - * Upsert modifier for update bulk operation. - */ - upsert(): FindOperatorsUnordered -} - -/** - * MongodbFindOneOptions. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#findOne - */ -export interface MongodbFindOneOptions { - /** - * Sets the limit of documents returned in the query. - */ - limit?: number - - /** - * Set to sort the documents coming back from the query. Array of indexes, [['a', 1]] etc. - */ - sort?: Array | Object - - /** - * The fields to return in the query. Object of fields to include or exclude (not both), {'a':1}. - */ - fields?: Object - - /** - * Set to skip N documents ahead in your query (useful for pagination). - */ - skip?: number - - /** - * Tell the query to use specific indexes in the query. Object of indexes to use, {'_id':1}. - */ - hint?: Object - - /** - * Explain the query instead of returning the data. - */ - explain?: boolean - - /** - * Snapshot query. - */ - snapshot?: boolean - - /** - * Specify if the cursor can timeout. - */ - timeout?: boolean - - /** - * Specify if the cursor is tailable. - */ - tailable?: boolean - - /** - * Set the batchSize for the getMoreCommand when iterating over the query results. - */ - batchSize?: number - - /** - * Only return the index key. - */ - returnKey?: boolean - - /** - * Limit the number of items to scan. - */ - maxScan?: number - - /** - * Set index bounds. - */ - min?: number - - /** - * Set index bounds. - */ - max?: number - - /** - * Show disk location of results. - */ - showDiskLoc?: boolean - - /** - * You can put a $comment field on a query to make looking in the profiler logs simpler. - */ - comment?: string - - /** - * Return document results as raw BSON buffers. - */ - raw?: boolean - - /** - * The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, - * ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST). - */ - readPreference?: ReadPreference | string - - /** - * Specify if the cursor should return partial results when querying against a sharded system. - */ - partial?: boolean - - /** - * Number of milliseconds to wait before aborting the query. - */ - maxTimeMs?: number -} - -/** - * InsertWriteOpResult. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#~insertWriteOpResult - */ -export interface InsertWriteOpResult { - /** - * The total amount of documents inserted. - */ - insertedCount: number - - /** - * All the documents inserted using insertOne/insertMany/replaceOne. - * Documents contain the _id field if forceServerObjectId == false for insertOne/insertMany. - */ - ops: Array - - /** - * All the generated _id's for the inserted documents. - */ - insertedIds: Array - - /** - * The connection object used for the operation. - */ - connection: any - - /** - * The raw command result object returned from MongoDB (content might vary by server version). - * @param ok Is 1 if the command executed correctly. - * @param n The total count of documents inserted. - */ - result: { ok: number; n: number } -} - -/** - * CollectionInsertOneOptions. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#insertOne - */ -export interface CollectionInsertOneOptions { - /** - * The write concern. - */ - w?: number | string - - /** - * The write concern timeout. - */ - wtimeout?: number - - /** - * Specify a journal write concern. - */ - j?: boolean - - /** - * Serialize functions on any object. - */ - serializeFunctions?: boolean - - /** - * Force server to assign _id values instead of driver. - */ - forceServerObjectId?: boolean - - /** - * Allow driver to bypass schema validation in MongoDB 3.2 or higher. - */ - bypassDocumentValidation?: boolean -} - -/** - * InsertOneWriteOpResult. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#~insertOneWriteOpResult - */ -export interface InsertOneWriteOpResult { - /** - * The total amount of documents inserted. - */ - insertedCount: number - - /** - * All the documents inserted using insertOne/insertMany/replaceOne. - * Documents contain the _id field if forceServerObjectId == false for insertOne/insertMany. - */ - ops: Array - - /** - * The driver generated ObjectId for the insert operation. - */ - insertedId: ObjectID - - /** - * The connection object used for the operation. - */ - connection: any - - /** - * The raw command result object returned from MongoDB (content might vary by server version). - * @param ok Is 1 if the command executed correctly. - * @param n The total count of documents inserted. - */ - result: { ok: number; n: number } -} - -/** - * ParallelCollectionScanOptions. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#parallelCollectionScan - */ -export interface ParallelCollectionScanOptions { - /** - * The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, - * ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST). - */ - readPreference?: ReadPreference | string - - /** - * Set the batchSize for the getMoreCommand when iterating over the query results. - */ - batchSize?: number - - /** - * The maximum number of parallel command cursors to return (the number of returned cursors will be in the range 1:numCursors). - */ - numCursors?: number - - /** - * Return all BSON documents as Raw Buffer documents. - */ - raw?: boolean -} - -/** - * ParallelCollectionScanOptions. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#replaceOne - */ -export interface ReplaceOneOptions { - /** - * Update operation is an upsert. - */ - upsert?: boolean - - /** - * The write concern. - */ - w?: number | string - - /** - * The write concern timeout. - */ - wtimeout?: number - - /** - * Specify a journal write concern. - */ - j?: boolean - - /** - * Allow driver to bypass schema validation in MongoDB 3.2 or higher. - */ - bypassDocumentValidation?: boolean -} - -/** - * ParallelCollectionScanOptions. - * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#~updateWriteOpResult - */ -export interface UpdateWriteOpResult { - /** - * The raw result returned from MongoDB, field will vary depending on server version. - * @param ok Is 1 if the command executed correctly. - * @param n The total count of documents scanned. - * @param nModified The total count of documents modified. - */ - result: { ok: number; n: number; nModified: number } - - /** - * The connection object used for the operation. - */ - connection: any - - /** - * The number of documents that matched the filter. - */ - matchedCount: number - - /** - * The number of documents that were modified. - */ - modifiedCount: number - - /** - * The number of documents upserted. - */ - upsertedCount: number - - /** - * The upserted id. - * @param _id The upserted _id returned from the server. - */ - upsertedId: { _id: ObjectID } +/** + * An error generated when the driver fails to decompress + * data received from the server. + * + * @public + * @category Error + */ +export declare class MongoDecompressionError extends MongoRuntimeError { + constructor(message: string) + get name(): string } /** - * ParallelCollectionScanOptions. + * An error generated by the driver * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#mapReduce + * @public + * @category Error */ -export interface MapReduceOptions { - /** - * The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, - * ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST). - */ - readPreference?: ReadPreference | string - - /** - * Sets the output target for the map reduce job. - * {inline:1} | {replace:'collectionName'} | {merge:'collectionName'} | {reduce:'collectionName'}. - */ - out?: Object - - /** - * Query filter object. - */ - query?: Object - - /** - * Sorts the input objects using this key. Useful for optimization, like sorting by the emit key for fewer reduces. - */ - sort?: Object - - /** - * Number of objects to return from collection. - */ - limit?: number - - /** - * Keep temporary data. - */ - keeptemp?: boolean - - /** - * Finalize function. - */ - finalize?: Function | string +export declare class MongoDriverError extends MongoError { + constructor(message: string) + get name(): string +} +/** + * @public + * @category Error + * + * @privateRemarks + * mongodb-client-encryption has a dependency on this error, it uses the constructor with a string argument + */ +export declare class MongoError extends Error { + /* Excluded from this release type: [kErrorLabels] */ /** - * Can pass in variables that can be access from map/reduce/finalize. + * This is a number in MongoServerError and a string in MongoDriverError + * @privateRemarks + * Define the type override on the subclasses when we can use the override keyword */ - scope?: Object - + code?: number | string + topologyVersion?: TopologyVersion + connectionGeneration?: number + cause?: Error + constructor(message: string | Error) + get name(): string + /** Legacy name for server error responses */ + get errmsg(): string /** - * It is possible to make the execution stay in JS. Provided in MongoDB > 2.0.X. + * Checks the error to see if it has an error label + * + * @param label - The error label to check for + * @returns returns true if the error has the provided error label */ - jsMode?: boolean + hasErrorLabel(label: string): boolean + addErrorLabel(label: string): void + get errorLabels(): string[] +} - /** - * Provide statistics on job execution time. - */ - verbose?: boolean +/** @public */ +export declare const MongoErrorLabel: Readonly<{ + readonly RetryableWriteError: "RetryableWriteError" + readonly TransientTransactionError: "TransientTransactionError" + readonly UnknownTransactionCommitResult: "UnknownTransactionCommitResult" + readonly ResumableChangeStreamError: "ResumableChangeStreamError" + readonly HandshakeError: "HandshakeError" + readonly ResetPool: "ResetPool" + readonly InterruptInUseConnections: "InterruptInUseConnections" + readonly NoWritesPerformed: "NoWritesPerformed" +}> + +/** @public */ +export declare type MongoErrorLabel = + (typeof MongoErrorLabel)[keyof typeof MongoErrorLabel] - /** - * Allow driver to bypass schema validation in MongoDB 3.2 or higher. - */ - bypassDocumentValidation?: boolean +/** + * An error generated when the user attempts to operate + * on a session that has expired or has been closed. + * + * @public + * @category Error + */ +export declare class MongoExpiredSessionError extends MongoAPIError { + constructor(message?: string) + get name(): string } /** - * WriteOpResult. + * An error generated when a malformed or invalid chunk is + * encountered when reading from a GridFSStream. * - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Collection.html#~WriteOpResult + * @public + * @category Error */ -export interface WriteOpResult { - /** - * All the documents inserted using insertOne/insertMany/replaceOne. - * Documents contain the _id field if forceServerObjectId == false for insertOne/insertMany. - */ - ops: Array - - /** - * The connection object used for the operation. - */ - connection: any +export declare class MongoGridFSChunkError extends MongoRuntimeError { + constructor(message: string) + get name(): string +} - /** - * The command result object. - */ - result: any +/** An error generated when a GridFSStream operation fails to execute. + * + * @public + * @category Error + */ +export declare class MongoGridFSStreamError extends MongoRuntimeError { + constructor(message: string) + get name(): string } /** - * WriteOpResult. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#~resultCallback + * An error generated when the user supplies malformed or unexpected arguments + * or when a required argument or field is not provided. + * + * + * @public + * @category Error */ -export type CursorResult = any | void | boolean +export declare class MongoInvalidArgumentError extends MongoAPIError { + constructor(message: string) + get name(): string +} /** - * Creates a new Cursor instance (INTERNAL TYPE, do not instantiate directly). - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html + * A error generated when the user attempts to authenticate + * via Kerberos, but fails to connect to the Kerberos client. + * + * @public + * @category Error */ -export declare class Cursor extends Readable { - [Symbol.asyncIterator](): AsyncIterableIterator - - /** - * Cursor query sort setting. - */ - sortValue: string - - /** - * Is Cursor able to time out. - */ - timeout: boolean - - /** - * Get cursor ReadPreference. - */ - readPreference: ReadPreference - - /** - * @param flag The flag to set, must be one of following ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'partial']. - * @param value The flag boolean value. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#addCursorFlag - */ - addCursorFlag(flag: string, value: boolean): Cursor - - /** - * @param name The query modifier (must start with $, such as $orderby etc). - * @param value The flag boolean value. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#addQueryModifier - */ - addQueryModifier(name: string, value: boolean): Cursor - - /** - * @param value The batchSize for the cursor. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#batchSize - */ - batchSize(value: number): Cursor - - /** - * Clone the cursor. - * still returns the same type. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#clone - */ - clone(): Cursor - - /** - * Close the cursor, sending a KillCursor command and emitting close. - * The result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#close - */ - close(): Promise - - /** - * Close the cursor, sending a KillCursor command and emitting close. - * The result callback. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#close - */ - close(callback: MongoCallback): void - - /** - * Add a comment to the cursor query allowing for tracking the comment in the log. - * @param value The comment attached to this query. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#comment - */ - comment(value: string): Cursor - - /** - * Get the count of documents for this cursor. - * @param applySkipLimit Should the count command apply limit and skip settings on the cursor or in the passed in options. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#count - */ - count(applySkipLimit: boolean, callback: MongoCallback): void - - /** - * Get the count of documents for this cursor. - * @param applySkipLimit Should the count command apply limit and skip settings on the cursor or in the passed in options. - * @param options Optional settings. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#count - */ - count( - applySkipLimit: boolean, - options?: CursorCommentOptions, - ): Promise - - /** - * Get the count of documents for this cursor. - * @param applySkipLimit Should the count command apply limit and skip settings on the cursor or in the passed in options. - * @param options Optional settings. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#count - */ - count( - applySkipLimit: boolean, - options: CursorCommentOptions, - callback: MongoCallback, - ): void - - /** - * Execute the explain for the cursor. - * returns Promise if no callback passed. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#explain - */ - explain(): Promise - - /** - * Execute the explain for the cursor. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#explain - */ - explain(callback: MongoCallback): void - - /** - * Set the cursor query. - * @param filter The filter object used for the cursor. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#filter - */ - filter(filter: Object): Cursor - - /** - * Iterates over all the documents for this cursor using the iterator, callback pattern. - * @param iterator The iteration callback. - * @param callback The end callback. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/Cursor.html#forEach - */ - forEach(iterator: IteratorCallback, callback: EndCallback): void - forEach(iterator: IteratorCallback): Promise - - /** - * Check if there is any document still available in the cursor. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#hasNext - */ - hasNext(): Promise - - /** - * Check if there is any document still available in the cursor. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#hasNext - */ - hasNext(callback: MongoCallback): void - - /** - * Set the cursor hint. - * @param hint If specified, then the query system will only consider plans using the hinted index. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#hint - */ - hint(hint: Object): Cursor - - /** - * Is the cursor closed. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#isClosed - */ - isClosed(): boolean - - /** - * Set the limit for the cursor. - * @param value The limit for the cursor query. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#limit - */ - limit(value: number): Cursor - - /** - * SMap all documents using the provided function. - * @param transform The mapping transformation method. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#map - */ - map(transform: Function): Cursor - - /** - * Set the cursor max. - * @param max Specify a $max value to specify the exclusive upper bound for a specific index in - * order to constrain the results of find(). The $max specifies the upper bound for - * all keys of a specific index in order. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#max - */ - max(max: number): Cursor - - /** - * Set a maxAwaitTimeMS on a tailing cursor query to allow to customize the - * timeout value for the option awaitData (Only supported on MongoDB 3.2 or higher, ignored otherwise). - * @param value Number of milliseconds to wait before aborting the tailed query. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#maxAwaitTimeMS - */ - maxAwaitTimeMS(value: number): Cursor - - /** - * Set the cursor maxScan. - * @param maxScan Constrains the query to only scan the specified number of documents when fulfilling the query. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#maxScan - */ - maxScan(maxScan: Object): Cursor - - /** - * Set a maxTimeMS on the cursor query, allowing for hard timeout limits on queries (Only supported on MongoDB 2.6 or higher). - * @param value Number of milliseconds to wait before aborting the query. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#maxTimeMS - */ - maxTimeMS(value: number): Cursor - - /** - * Set the cursor min. - * @param min Specify a $min value to specify the inclusive lower bound for a specific index in order to - * constrain the results of find(). The $min specifies the lower bound for all keys of a specific index in order. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#min - */ - min(min: number): Cursor - - /** - * Get the next available document from the cursor, returns null if no more documents are available. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#next - */ - next(): Promise - - /** - * Get the next available document from the cursor, returns null if no more documents are available. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#next - */ - next(callback: MongoCallback): void - - /** - * Sets a field projection for the query. - * @param value The field projection object. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#project - */ - project(value: Object): Cursor - - /** - * The read() method pulls some data out of the internal buffer and returns it. - * If there is no data available, then it will return null. - * @param size Optional argument to specify how much data to read. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#read - */ - read(size: number): string | Buffer | void - - /** - * Set the cursor returnKey. - * @param returnKey Only return the index field or fields for the results of the query. If $returnKey is set - * to true and the query does not use an index to perform the read operation, - * the returned documents will not contain any fields. Use one of the following forms: - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#next - */ - returnKey(returnKey: Object): Cursor - - /** - * Resets the cursor. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#rewind - */ - rewind(): void - - /** - * Set a node.js specific cursor option. - * @param field The cursor option to set ['numberOfRetries', 'tailableRetryInterval']. - * @param value The field value. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#setCursorOption - */ - setCursorOption(field: string, value: Object): Cursor - - /** - * Set the ReadPreference for the cursor. - * @param readPreference The new read preference for the cursor. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#setReadPreference - */ - setReadPreference(readPreference: string | ReadPreference): Cursor - - /** - * Set the cursor showRecordId. - * @param showRecordId The $showDiskLoc option has now been deprecated and replaced with the - * showRecordId field. $showDiskLoc will still be accepted for OP_QUERY stye find. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#showRecordId - */ - showRecordId(showRecordId: Object): Cursor - - /** - * Set the skip for the cursor. - * @param value The skip for the cursor query. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#skip - */ - skip(value: number): Cursor +export declare class MongoKerberosError extends MongoRuntimeError { + constructor(message: string) + get name(): string +} - /** - * Set the cursor snapshot. - * @param snapshot The $snapshot operator prevents the cursor from returning a document more than - * once because an intervening write operation results in a move of the document. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#snapshot - */ - snapshot(snapshot: Object): Cursor +/* Excluded from this release type: MongoLoggableComponent */ - /** - * Sets the sort order of the cursor query. - * @param keyOrList The key or keys set for the sort. - * @param direction The direction of the sorting (1 or -1). - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#sort - */ - sort(keyOrList: string | Object[] | Object, direction?: number): Cursor +/* Excluded from this release type: MongoLogger */ - /** - * Return a modified Readable stream including a possible transform method. - * @param options Optional settings. - * @param transform A transformation method applied to each document emitted by the stream. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#stream - */ - stream(options?: { transform?: Function }): Cursor +/* Excluded from this release type: MongoLoggerEnvOptions */ - /** - * Returns an array of documents. The caller is responsible for making sure that there is enough - * memory to store the results. Note that the array only contain partial results when this cursor had - * been previously accessed. In that case, cursor.rewind() can be used to reset the cursor. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#toArray - */ - toArray(): Promise +/* Excluded from this release type: MongoLoggerMongoClientOptions */ - /** - * Returns an array of documents. The caller is responsible for making sure that there is enough - * memory to store the results. Note that the array only contain partial results when this cursor had - * been previously accessed. In that case, cursor.rewind() can be used to reset the cursor. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#toArray - */ - toArray(callback: MongoCallback): void +/* Excluded from this release type: MongoLoggerOptions */ - /** - * This is useful in certain cases where a stream is being consumed by a parser, which needs to "un-consume" some - * data that it has optimistically pulled out of the source, so that the stream can be passed on to some other party. - * @param stream Chunk of data to unshift onto the read queue. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#unshift - */ - unshift(stream: Buffer | string): void +/** + * An error generated when the user fails to provide authentication credentials before attempting + * to connect to a mongo server instance. + * + * + * @public + * @category Error + */ +export declare class MongoMissingCredentialsError extends MongoAPIError { + constructor(message: string) + get name(): string } /** - * Get the count of documents for this cursor. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#count + * An error generated when a required module or dependency is not present in the local environment + * + * @public + * @category Error */ -export interface CursorCommentOptions { - /** - * The number of documents to skip. - */ - skip?: number - - /** - * The maximum amounts to count before aborting. - */ - limit?: number - - /** - * Number of miliseconds to wait before aborting the query. - */ - maxTimeMS?: number - - /** - * An index name hint for the query. - */ - hint?: string - - /** - * The preferred read preference (ReadPreference.PRIMARY, ReadPreference.PRIMARY_PREFERRED, - * ReadPreference.SECONDARY, ReadPreference.SECONDARY_PREFERRED, ReadPreference.NEAREST). - */ - readPreference?: ReadPreference | string +export declare class MongoMissingDependencyError extends MongoAPIError { + constructor(message: string) + get name(): string } /** - * Creates a new Change Stream instance. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/ChangeStream.html + * An error indicating an issue with the network, including TCP errors and timeouts. + * @public + * @category Error */ -export declare class ChangeStream extends Readable { - constructor( - changeDomain: MongoClient | Db | Collection, - pipeline: Object[], - options?: ChangeStreamOptions, - ) - - /** - * Close the Change Stream. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/ChangeStream.html#close - */ - close(): Promise - - /** - * Close the Change Stream. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/ChangeStream.html#close - */ - close(callback: MongoCallback): void - - /** - * Check if there is any document still available in the Change Stream. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/ChangeStream.html#hasNext - */ - hasNext(): Promise +export declare class MongoNetworkError extends MongoError { + /* Excluded from this release type: [kBeforeHandshake] */ + constructor(message: string | Error, options?: MongoNetworkErrorOptions) + get name(): string +} - /** - * Check if there is any document still available in the Change Stream. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/ChangeStream.html#hasNext - */ - hasNext(callback: MongoCallback): void +/** @public */ +export declare interface MongoNetworkErrorOptions { + /** Indicates the timeout happened before a connection handshake completed */ + beforeHandshake: boolean +} - /** - * Is the cursor closed. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/ChangeStream.html#isClosed - */ - isClosed(): boolean +/** + * An error indicating a network timeout occurred + * @public + * @category Error + * + * @privateRemarks + * mongodb-client-encryption has a dependency on this error with an instanceof check + */ +export declare class MongoNetworkTimeoutError extends MongoNetworkError { + constructor(message: string, options?: MongoNetworkErrorOptions) + get name(): string +} - /** - * Get the next available document from the Change Stream, returns null if no more documents are available. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/ChangeStream.html#next - */ - next(): Promise +/** + * An error thrown when the user attempts to operate on a database or collection through a MongoClient + * that has not yet successfully called the "connect" method + * + * @public + * @category Error + */ +export declare class MongoNotConnectedError extends MongoAPIError { + constructor(message: string) + get name(): string +} - /** - * Get the next available document from the Change Stream, returns null if no more documents are available. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/ChangeStream.html#next - */ - next(callback: MongoCallback): void +/** + * Mongo Client Options + * @public + */ +export declare interface MongoOptions + extends Required< + Pick< + MongoClientOptions, + | "autoEncryption" + | "connectTimeoutMS" + | "directConnection" + | "driverInfo" + | "forceServerObjectId" + | "minHeartbeatFrequencyMS" + | "heartbeatFrequencyMS" + | "keepAlive" + | "keepAliveInitialDelay" + | "localThresholdMS" + | "maxConnecting" + | "maxIdleTimeMS" + | "maxPoolSize" + | "minPoolSize" + | "monitorCommands" + | "noDelay" + | "pkFactory" + | "raw" + | "replicaSet" + | "retryReads" + | "retryWrites" + | "serverSelectionTimeoutMS" + | "socketTimeoutMS" + | "srvMaxHosts" + | "srvServiceName" + | "tlsAllowInvalidCertificates" + | "tlsAllowInvalidHostnames" + | "tlsInsecure" + | "waitQueueTimeoutMS" + | "zlibCompressionLevel" + > + >, + SupportedNodeConnectionOptions { + appName?: string + hosts: HostAddress[] + srvHost?: string + credentials?: MongoCredentials + readPreference: ReadPreference + readConcern: ReadConcern + loadBalanced: boolean + serverApi: ServerApi + compressors: CompressorName[] + writeConcern: WriteConcern + dbName: string + metadata: ClientMetadata + autoEncrypter?: AutoEncrypter + proxyHost?: string + proxyPort?: number + proxyUsername?: string + proxyPassword?: string + /* Excluded from this release type: connectionType */ + /* Excluded from this release type: encrypter */ + /* Excluded from this release type: userSpecifiedAuthSource */ + /* Excluded from this release type: userSpecifiedReplicaSet */ + /** + * # NOTE ABOUT TLS Options + * + * If set TLS enabled, equivalent to setting the ssl option. + * + * ### Additional options: + * + * | nodejs option | MongoDB equivalent | type | + * |:---------------------|--------------------------------------------------------- |:---------------------------------------| + * | `ca` | `sslCA`, `tlsCAFile` | `string \| Buffer \| Buffer[]` | + * | `crl` | `sslCRL` | `string \| Buffer \| Buffer[]` | + * | `cert` | `sslCert`, `tlsCertificateFile`, `tlsCertificateKeyFile` | `string \| Buffer \| Buffer[]` | + * | `key` | `sslKey`, `tlsCertificateKeyFile` | `string \| Buffer \| KeyObject[]` | + * | `passphrase` | `sslPass`, `tlsCertificateKeyFilePassword` | `string` | + * | `rejectUnauthorized` | `sslValidate` | `boolean` | + * + */ + tls: boolean + /* Excluded from this release type: __index */ + /* Excluded from this release type: mongoLoggerOptions */ +} - /** - * Return a modified Readable stream including a possible transform method. - * @param options Optional settings. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/ChangeStream.html#stream - */ - stream(options?: { transform: Function }): Cursor +/** + * An error used when attempting to parse a value (like a connection string) + * @public + * @category Error + */ +export declare class MongoParseError extends MongoDriverError { + constructor(message: string) + get name(): string } /** - * ChangeStreamOptions + * An error generated when the driver encounters unexpected input + * or reaches an unexpected/invalid internal state + * + * @privateRemarks + * Should **never** be directly instantiated. + * + * @public + * @category Error */ -export interface ChangeStreamOptions { - /** - * Allowed values: โ€˜defaultโ€™, โ€˜updateLookupโ€™. - * When set to โ€˜updateLookupโ€™, the change stream will include both a delta describing the changes to the document, - * as well as a copy of the entire document that was changed from some time after the change occurred. - */ - fullDocument?: string +export declare class MongoRuntimeError extends MongoDriverError { + constructor(message: string) + get name(): string +} - /** - * The maximum amount of time for the server to wait on new documents to satisfy a change stream query - */ - maxAwaitTimeMS?: number +/** + * An error generated when an attempt is made to operate + * on a closed/closing server. + * + * @public + * @category Error + */ +export declare class MongoServerClosedError extends MongoAPIError { + constructor(message?: string) + get name(): string +} - /** - * Specifies the logical starting point for the new change stream. - * This should be the _id field from a previously returned change stream document. - */ - resumeAfter?: Object +/** + * An error coming from the mongo server + * + * @public + * @category Error + */ +export declare class MongoServerError extends MongoError { + codeName?: string + writeConcernError?: Document + errInfo?: Document + ok?: number; + [key: string]: any + constructor(message: ErrorDescription) + get name(): string +} - /** - * The number of documents to return per batch. - */ - batchSize?: number +/** + * An error signifying a client-side server selection error + * @public + * @category Error + */ +export declare class MongoServerSelectionError extends MongoSystemError { + constructor(message: string, reason: TopologyDescription) + get name(): string +} - /** - * Specify collation settings for operation. - */ - collation?: CollationDocument +/** + * An error signifying a general system issue + * @public + * @category Error + */ +export declare class MongoSystemError extends MongoError { + /** An optional reason context, such as an error saved during flow of monitoring and selecting servers */ + reason?: TopologyDescription + constructor(message: string, reason: TopologyDescription) + get name(): string +} - /** - * The read preference. Defaults to the read preference of the database or collection. - */ - readPreference?: ReadPreference +/** + * An error thrown when the user calls a function or method not supported on a tailable cursor + * + * @public + * @category Error + */ +export declare class MongoTailableCursorError extends MongoAPIError { + constructor(message?: string) + get name(): string } /** - * CollationDocument + * An error generated when an attempt is made to operate on a + * dropped, or otherwise unavailable, database. + * + * @public + * @category Error */ -export interface CollationDocument { - locale: string - strength?: number - caseLevel?: boolean - caseFirst?: string - numericOrdering?: boolean - alternate?: string - maxVariable?: string - backwards?: boolean - normalization?: boolean +export declare class MongoTopologyClosedError extends MongoAPIError { + constructor(message?: string) + get name(): string } /** - * A class representing a client session on the server. - * WARNING: not meant to be instantiated directly. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/ClientSession.html + * An error generated when the user makes a mistake in the usage of transactions. + * (e.g. attempting to commit a transaction with a readPreference other than primary) + * + * @public + * @category Error */ -export interface ClientSession extends EventEmitter { - /** - * The server id associated with this session - */ - id: any +export declare class MongoTransactionError extends MongoAPIError { + constructor(message: string) + get name(): string +} - /** - * Aborts the currently active transaction in this session. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/ClientSession.html#abortTransaction - */ - abortTransaction(): Promise +/** + * An error generated when a **parsable** unexpected response comes from the server. + * This is generally an error where the driver in a state expecting a certain behavior to occur in + * the next message from MongoDB but it receives something else. + * This error **does not** represent an issue with wire message formatting. + * + * #### Example + * When an operation fails, it is the driver's job to retry it. It must perform serverSelection + * again to make sure that it attempts the operation against a server in a good state. If server + * selection returns a server that does not support retryable operations, this error is used. + * This scenario is unlikely as retryable support would also have been determined on the first attempt + * but it is possible the state change could report a selectable server that does not support retries. + * + * @public + * @category Error + */ +export declare class MongoUnexpectedServerResponseError extends MongoRuntimeError { + constructor(message: string) + get name(): string +} - /** - * Aborts the currently active transaction in this session. - * @param callback Optional callback for completion of this operation - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/ClientSession.html#abortTransaction - */ - abortTransaction(callback?: MongoCallback): Promise +/** + * An error thrown when the server reports a writeConcernError + * @public + * @category Error + */ +export declare class MongoWriteConcernError extends MongoServerError { + /** The result document (provided if ok: 1) */ + result?: Document + constructor(message: ErrorDescription, result?: Document) + get name(): string +} - /** - * Advances the operationTime for a ClientSession. - * @param operationTime the BSON.Timestamp of the operation type it is desired to advance to. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/ClientSession.html#advanceOperationTime - */ - advanceOperationTime(operationTime: Timestamp): void +/* Excluded from this release type: Monitor */ - /** - * Commits the currently active transaction in this session. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/ClientSession.html#commitTransaction - */ - commitTransaction(): Promise +/** @public */ +export declare type MonitorEvents = { + serverHeartbeatStarted(event: ServerHeartbeatStartedEvent): void + serverHeartbeatSucceeded(event: ServerHeartbeatSucceededEvent): void + serverHeartbeatFailed(event: ServerHeartbeatFailedEvent): void + resetServer(error?: MongoError): void + resetConnectionPool(): void + close(): void +} & EventEmitterWithState - /** - * Commits the currently active transaction in this session. - * @param callback Optional callback for completion of this operation. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/ClientSession.html#commitTransaction - */ - commitTransaction(callback?: MongoCallback): Promise +/* Excluded from this release type: MonitorInterval */ - /** - * Ends this session on the server. - * @param callback Optional callback for completion of this operation. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/ClientSession.html#endSession - */ - endSession(callback?: MongoCallback): void +/* Excluded from this release type: MonitorIntervalOptions */ - /** - * Ends this session on the server. - * @param options Optional settings. Currently reserved for future use. - * @param callback Optional callback for completion of this operation. - * @see @see http://mongodb.github.io/node-mongodb-native/3.1/api/ClientSession.html#endSession - */ - endSession(options?: any, callback?: MongoCallback): void +/** @public */ +export declare interface MonitorOptions + extends Omit { + connectTimeoutMS: number + heartbeatFrequencyMS: number + minHeartbeatFrequencyMS: number +} - /** - * Used to determine if this session equals another. - * @param session A class representing a client session on the server. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/ClientSession.html#equals - */ - equals(session: ClientSession): boolean +/* Excluded from this release type: MonitorPrivate */ - /** - * Increment the transaction number on the internal ServerSession. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/ClientSession.html#incrementTransactionNumber - */ - incrementTransactionNumber(): void +/* Excluded from this release type: Msg */ - /** - * Check this session is currently in a transaction or not. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/ClientSession.html#inTransaction - */ - inTransaction(): boolean +/** + * @public + * returns tuple of strings (keys to be joined on '.') that represent every path into a schema + * https://www.mongodb.com/docs/manual/tutorial/query-embedded-documents/ + * + * @remarks + * Through testing we determined that a depth of 8 is safe for the typescript compiler + * and provides reasonable compilation times. This number is otherwise not special and + * should be changed if issues are found with this level of checking. Beyond this + * depth any helpers that make use of NestedPaths should devolve to not asserting any + * type safety on the input. + */ +export declare type NestedPaths< + Type, + Depth extends number[], +> = Depth["length"] extends 8 + ? [] + : Type extends + | string + | number + | bigint + | boolean + | Date + | RegExp + | Buffer + | Uint8Array + | ((...args: any[]) => any) + | { + _bsontype: string + } + ? [] + : Type extends ReadonlyArray + ? [] | [number, ...NestedPaths] + : Type extends Map + ? [string] + : Type extends object + ? { + [Key in Extract]: Type[Key] extends Type + ? [Key] + : Type extends Type[Key] + ? [Key] + : Type[Key] extends ReadonlyArray + ? Type extends ArrayType + ? [Key] + : ArrayType extends Type + ? [Key] + : [Key, ...NestedPaths] // child is not structured the same as the parent + : [Key, ...NestedPaths] | [Key] + }[Extract] + : [] - /** - * Starts a new transaction with the given options. - * @param options Optional settings. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/ClientSession.html#startTransaction - */ - startTransaction(options?: TransactionOptions): void -} +/** + * @public + * returns keys (strings) for every path into a schema with a value of type + * https://www.mongodb.com/docs/manual/tutorial/query-embedded-documents/ + */ +export declare type NestedPathsOfType = KeysOfAType< + { + [Property in Join, ".">]: PropertyType< + TSchema, + Property + > + }, + Type +> /** - * Options to pass when creating a Client Session - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/global.html#SessionOptions + * @public + * A type that extends Document but forbids anything that "looks like" an object id. */ -export interface SessionOptions { - /** - * Whether causal consistency should be enabled on this session - */ - causalConsistency?: boolean +export declare type NonObjectIdLikeDocument = { + [key in keyof ObjectIdLike]?: never +} & Document - /** - * The default TransactionOptions to use for transactions started on this session. - */ - defaultTransactionOptions?: TransactionOptions +/** It avoids using fields with not acceptable types @public */ +export declare type NotAcceptedFields = { + readonly [key in KeysOfOtherType]?: never } +/** @public */ +export declare type NumericType = IntegerType | Decimal128 | Double + +export { ObjectId } + /** - * TransactionOptions + * @public + * @experimental */ -export interface TransactionOptions { - readConcern?: ReadConcern - writeConcern?: WriteConcern - readPreference?: ReadPreference +export declare interface OIDCMechanismServerStep1 { + authorizationEndpoint?: string + tokenEndpoint?: string + deviceAuthorizationEndpoint?: string + clientId: string + clientSecret?: string + requestScopes?: string[] } /** - * MongoClientCommonOption + * @public + * @experimental */ -export interface MongoClientCommonOption { - /** - * Do not make the db an event listener to the original connection. - */ - noListener?: boolean - - /** - * Control if you want to return a cached instance or have a new one created - */ - returnNonCachedInstance?: boolean -} +export declare type OIDCRefreshFunction = ( + principalName: string, + serverResult: OIDCMechanismServerStep1, + result: OIDCRequestTokenResult, + timeout: AbortSignal | number, +) => Promise /** - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/global.html#ReadConcern + * @public + * @experimental */ -export type ReadConcernLevel = - | "local" - | "available" - | "majority" - | "linearizable" - | "snapshot" +export declare type OIDCRequestFunction = ( + principalName: string, + serverResult: OIDCMechanismServerStep1, + timeout: AbortSignal | number, +) => Promise /** - * The MongoDB ReadConcern, which allows for control of the consistency and isolation properties - * of the data read from replica sets and replica set shards. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/global.html#ReadConcern + * @public + * @experimental */ -export interface ReadConcern { - level?: ReadConcernLevel +export declare interface OIDCRequestTokenResult { + accessToken: string + expiresInSeconds?: number + refreshToken?: string +} + +/** @public */ +export declare type OneOrMore = T | ReadonlyArray + +/** @public */ +export declare type OnlyFieldsOfType< + TSchema, + FieldType = any, + AssignableType = FieldType, +> = IsAny< + TSchema[keyof TSchema], + Record, + AcceptedFields & + NotAcceptedFields & + Record +> + +/* Excluded from this release type: OperationDescription */ + +/** @public */ +export declare interface OperationOptions extends BSONSerializeOptions { + /** Specify ClientSession for this command */ + session?: ClientSession + willRetryWrite?: boolean + /** The preferred read preference (ReadPreference.primary, ReadPreference.primary_preferred, ReadPreference.secondary, ReadPreference.secondary_preferred, ReadPreference.nearest). */ + readPreference?: ReadPreferenceLike + /* Excluded from this release type: bypassPinningCheck */ + omitReadPreference?: boolean } +/* Excluded from this release type: OperationParent */ + /** - * A MongoDB WriteConcern, which describes the level of acknowledgement - * requested from MongoDB for write operations. - * @see http://mongodb.github.io/node-mongodb-native/3.1/api/global.html#WriteConcern + * Represents a specific point in time on a server. Can be retrieved by using `db.command()` + * @public + * @see https://www.mongodb.com/docs/manual/reference/method/db.runCommand/#response */ -export interface WriteConcern { - /** - * requests acknowledgement that the write operation has - * propagated to a specified number of mongod hosts - */ - w?: number | "majority" | string +export declare type OperationTime = Timestamp - /** - * requests acknowledgement from MongoDB that the write operation has - * been written to the journal - */ - j?: boolean +/* Excluded from this release type: OpMsgOptions */ - /** - * a time limit, in milliseconds, for the write concern - */ - wtimeout?: number -} +/* Excluded from this release type: OpQueryOptions */ + +/* Excluded from this release type: OpResponseOptions */ /** - * The callback format for the forEach iterator method. - * @param doc An emitted document for the iterator. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#~iteratorCallback + * Add an optional _id field to an object shaped type + * @public */ -export interface IteratorCallback { - (doc: T): void +export declare type OptionalId = EnhancedOmit & { + _id?: InferIdType } /** - * The callback error format for the forEach iterator method. - * @param error An error instance representing the error during the execution. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/Cursor.html#~endCallback + * Adds an optional _id field to an object shaped type, unless the _id field is required on that type. + * In the case _id is required, this method continues to require_id. + * + * @public + * + * @privateRemarks + * `ObjectId extends TSchema['_id']` is a confusing ordering at first glance. Rather than ask + * `TSchema['_id'] extends ObjectId` which translated to "Is the _id property ObjectId?" + * we instead ask "Does ObjectId look like (have the same shape) as the _id?" */ -export interface EndCallback { - (error: MongoError): void +export declare type OptionalUnlessRequiredId = TSchema extends { + _id: any +} + ? TSchema + : OptionalId + +/** @public */ +export declare class OrderedBulkOperation extends BulkOperationBase { + /* Excluded from this release type: __constructor */ + addToOperationsList( + batchType: BatchType, + document: Document | UpdateStatement | DeleteStatement, + ): this +} + +/** @public */ +export declare interface PkFactory { + createPk(): any +} + +/* Excluded from this release type: PoolState */ + +/** @public */ +export declare const ProfilingLevel: Readonly<{ + readonly off: "off" + readonly slowOnly: "slow_only" + readonly all: "all" +}> + +/** @public */ +export declare type ProfilingLevel = + (typeof ProfilingLevel)[keyof typeof ProfilingLevel] + +/** @public */ +export declare type ProfilingLevelOptions = CommandOperationOptions + +/** @public */ +export declare type PropertyType< + Type, + Property extends string, +> = string extends Property + ? unknown + : Property extends keyof Type + ? Type[Property] + : Property extends `${number}` + ? Type extends ReadonlyArray + ? ArrayType + : unknown + : Property extends `${infer Key}.${infer Rest}` + ? Key extends `${number}` + ? Type extends ReadonlyArray + ? PropertyType + : unknown + : Key extends keyof Type + ? Type[Key] extends Map + ? MapType + : PropertyType + : unknown + : unknown + +/** @public */ +export declare interface ProxyOptions { + proxyHost?: string + proxyPort?: number + proxyUsername?: string + proxyPassword?: string +} + +/** @public */ +export declare type PullAllOperator = ({ + readonly [key in KeysOfAType>]?: TSchema[key] +} & NotAcceptedFields>) & { + readonly [key: string]: ReadonlyArray +} + +/** @public */ +export declare type PullOperator = ({ + readonly [key in KeysOfAType>]?: + | Partial> + | FilterOperations> +} & NotAcceptedFields>) & { + readonly [key: string]: FilterOperators | any +} + +/** @public */ +export declare type PushOperator = ({ + readonly [key in KeysOfAType>]?: + | Flatten + | ArrayOperator>> +} & NotAcceptedFields>) & { + readonly [key: string]: ArrayOperator | any } +/* Excluded from this release type: Query */ + /** - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#~resultCallback + * The MongoDB ReadConcern, which allows for control of the consistency and isolation properties + * of the data read from replica sets and replica set shards. + * @public + * + * @see https://www.mongodb.com/docs/manual/reference/read-concern/index.html */ -export type AggregationCursorResult = any | void +export declare class ReadConcern { + level: ReadConcernLevel | string + /** Constructs a ReadConcern from the read concern level.*/ + constructor(level: ReadConcernLevel) + /** + * Construct a ReadConcern given an options object. + * + * @param options - The options object from which to extract the write concern. + */ + static fromOptions(options?: { + readConcern?: ReadConcernLike + level?: ReadConcernLevel + }): ReadConcern | undefined + static get MAJORITY(): "majority" + static get AVAILABLE(): "available" + static get LINEARIZABLE(): "linearizable" + static get SNAPSHOT(): "snapshot" + toJSON(): Document +} + +/** @public */ +export declare const ReadConcernLevel: Readonly<{ + readonly local: "local" + readonly majority: "majority" + readonly linearizable: "linearizable" + readonly available: "available" + readonly snapshot: "snapshot" +}> + +/** @public */ +export declare type ReadConcernLevel = + (typeof ReadConcernLevel)[keyof typeof ReadConcernLevel] + +/** @public */ +export declare type ReadConcernLike = + | ReadConcern + | { + level: ReadConcernLevel + } + | ReadConcernLevel /** - * Creates a new Aggregation Cursor instance (INTERNAL TYPE, do not instantiate directly), - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html + * The **ReadPreference** class is a class that represents a MongoDB ReadPreference and is + * used to construct connections. + * @public + * + * @see https://www.mongodb.com/docs/manual/core/read-preference/ */ -export interface AggregationCursor extends Readable { - /** - * Set the batch size for the cursor. - * @param value The batchSize for the cursor. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#batchSize +export declare class ReadPreference { + mode: ReadPreferenceMode + tags?: TagSet[] + hedge?: HedgeOptions + maxStalenessSeconds?: number + minWireVersion?: number + static PRIMARY: "primary" + static PRIMARY_PREFERRED: "primaryPreferred" + static SECONDARY: "secondary" + static SECONDARY_PREFERRED: "secondaryPreferred" + static NEAREST: "nearest" + static primary: ReadPreference + static primaryPreferred: ReadPreference + static secondary: ReadPreference + static secondaryPreferred: ReadPreference + static nearest: ReadPreference + /** + * @param mode - A string describing the read preference mode (primary|primaryPreferred|secondary|secondaryPreferred|nearest) + * @param tags - A tag set used to target reads to members with the specified tag(s). tagSet is not available if using read preference mode primary. + * @param options - Additional read preference options */ - batchSize(value: number): AggregationCursor - + constructor( + mode: ReadPreferenceMode, + tags?: TagSet[], + options?: ReadPreferenceOptions, + ) + get preference(): ReadPreferenceMode + static fromString(mode: string): ReadPreference /** - * Clone the cursor. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#clone + * Construct a ReadPreference given an options object. + * + * @param options - The options object from which to extract the read preference. */ - clone(): AggregationCursor - + static fromOptions( + options?: ReadPreferenceFromOptions, + ): ReadPreference | undefined /** - * Close the cursor, sending a AggregationCursor command and emitting close. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#close + * Replaces options.readPreference with a ReadPreference instance */ - close(): Promise - + static translate( + options: ReadPreferenceLikeOptions, + ): ReadPreferenceLikeOptions /** - * Close the cursor, sending a AggregationCursor command and emitting close. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#close + * Validate if a mode is legal + * + * @param mode - The string representing the read preference mode. */ - close(callback: MongoCallback): void - + static isValid(mode: string): boolean /** - * Iterates over all the documents for this cursor. As with {cursor.toArray}, not all of the elements will - * be iterated if this cursor had been previously accessed. In that case, {cursor.rewind} can be used to reset - * the cursor. However, unlike {cursor.toArray}, the cursor will only hold a maximum of batch size elements - * at any given time if batch size is specified. Otherwise, the caller is responsible for making sure - * that the entire result can fit the memory. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#each + * Validate if a mode is legal + * + * @param mode - The string representing the read preference mode. */ - each(callback: MongoCallback): void - + isValid(mode?: string): boolean /** - * Execute the explain for the cursor. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#explain + * Indicates that this readPreference needs the "SecondaryOk" bit when sent over the wire + * @see https://www.mongodb.com/docs/manual/reference/mongodb-wire-protocol/#op-query */ - explain(): Promise - + secondaryOk(): boolean /** - * Execute the explain for the cursor. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#explain + * Check if the two ReadPreferences are equivalent + * + * @param readPreference - The read preference with which to check equality */ - explain(callback: MongoCallback): void + equals(readPreference: ReadPreference): boolean + /** Return JSON representation */ + toJSON(): Document +} - /** - * Add a geoNear stage to the aggregation pipeline. - * @param document The geoNear stage document. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#geoNear - */ - geoNear(document: Object): AggregationCursor +/** @public */ +export declare interface ReadPreferenceFromOptions + extends ReadPreferenceLikeOptions { + session?: ClientSession + readPreferenceTags?: TagSet[] + hedge?: HedgeOptions +} - /** - * Add a group stage to the aggregation pipeline. - * @param document The group stage document. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#group - */ - group(document: Object): AggregationCursor +/** @public */ +export declare type ReadPreferenceLike = ReadPreference | ReadPreferenceMode + +/** @public */ +export declare interface ReadPreferenceLikeOptions + extends ReadPreferenceOptions { + readPreference?: + | ReadPreferenceLike + | { + mode?: ReadPreferenceMode + preference?: ReadPreferenceMode + tags?: TagSet[] + maxStalenessSeconds?: number + } +} - /** - * Is the cursor closed. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#isClosed - */ - isClosed(): boolean +/** @public */ +export declare const ReadPreferenceMode: Readonly<{ + readonly primary: "primary" + readonly primaryPreferred: "primaryPreferred" + readonly secondary: "secondary" + readonly secondaryPreferred: "secondaryPreferred" + readonly nearest: "nearest" +}> + +/** @public */ +export declare type ReadPreferenceMode = + (typeof ReadPreferenceMode)[keyof typeof ReadPreferenceMode] + +/** @public */ +export declare interface ReadPreferenceOptions { + /** Max secondary read staleness in seconds, Minimum value is 90 seconds.*/ + maxStalenessSeconds?: number + /** Server mode in which the same query is dispatched in parallel to multiple replica set members. */ + hedge?: HedgeOptions +} - /** - * Add a limit stage to the aggregation pipeline. - * @param value The state limit value. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#limit - */ - limit(value: number): AggregationCursor +/** @public */ +export declare type RegExpOrString = T extends string + ? BSONRegExp | RegExp | T + : T - /** - * Add a match stage to the aggregation pipeline. - * @param document The match stage document. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#match - */ - match(document: Object): AggregationCursor +/** @public */ +export declare type RemoveUserOptions = CommandOperationOptions - /** - * Add a maxTimeMS stage to the aggregation pipeline. - * @param value The state maxTimeMS value. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#maxTimeMS - */ - maxTimeMS(value: number): AggregationCursor +/** @public */ +export declare interface RenameOptions extends CommandOperationOptions { + /** Drop the target name collection if it previously exists. */ + dropTarget?: boolean + /** Unclear */ + new_collection?: boolean +} - /** - * Get the next available document from the cursor, returns null if no more documents are available. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#next - */ - next(): Promise +/** @public */ +export declare interface ReplaceOneModel { + /** The filter to limit the replaced document. */ + filter: Filter + /** The document with which to replace the matched document. */ + replacement: WithoutId + /** Specifies a collation. */ + collation?: CollationOptions + /** The index to use. If specified, then the query system will only consider plans using the hinted index. */ + hint?: Hint + /** When true, creates a new document if no document matches the query. */ + upsert?: boolean +} - /** - * Get the next available document from the cursor, returns null if no more documents are available. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#next - */ - next(callback: MongoCallback): void +/** @public */ +export declare interface ReplaceOptions extends CommandOperationOptions { + /** If true, allows the write to opt-out of document level validation */ + bypassDocumentValidation?: boolean + /** Specifies a collation */ + collation?: CollationOptions + /** Specify that the update query should only consider plans using the hinted index */ + hint?: string | Document + /** When true, creates a new document if no document matches the query */ + upsert?: boolean + /** Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0). */ + let?: Document +} - /** - * Add a out stage to the aggregation pipeline. - * @param destination The destination name. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#out - */ - out(destination: string): AggregationCursor +/* Excluded from this release type: Response */ - /** - * Add a project stage to the aggregation pipeline. - * @param document The project stage document. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#project - */ - project(document: Object): AggregationCursor +/** + * @public + * @deprecated Please use the ChangeStreamCursorOptions type instead. + */ +export declare interface ResumeOptions { + startAtOperationTime?: Timestamp + batchSize?: number + maxAwaitTimeMS?: number + collation?: CollationOptions + readPreference?: ReadPreference + resumeAfter?: ResumeToken + startAfter?: ResumeToken + fullDocument?: string +} - /** - * The read() method pulls some data out of the internal buffer and returns it. - * If there is no data available, then it will return null. - * @param size Optional argument to specify how much data to read. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#read - */ - read(size: number): string | Buffer | void +/** + * Represents the logical starting point for a new ChangeStream or resuming a ChangeStream on the server. + * @see https://www.mongodb.com/docs/manual/changeStreams/#std-label-change-stream-resume + * @public + */ +export declare type ResumeToken = unknown - /** - * Add a redact stage to the aggregation pipeline. - * @param document The redact stage document. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#redact - */ - redact(document: Object): AggregationCursor +/** @public */ +export declare const ReturnDocument: Readonly<{ + readonly BEFORE: "before" + readonly AFTER: "after" +}> - /** - * Resets the cursor. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#rewind - */ - rewind(): AggregationCursor +/** @public */ +export declare type ReturnDocument = + (typeof ReturnDocument)[keyof typeof ReturnDocument] +/** @public */ +export declare interface RoleSpecification { /** - * Add a skip stage to the aggregation pipeline. - * @param value The state skip value. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#setEncoding + * A role grants privileges to perform sets of actions on defined resources. + * A given role applies to the database on which it is defined and can grant access down to a collection level of granularity. */ - skip(value: number): AggregationCursor + role: string + /** The database this user's role should effect. */ + db: string +} - /** - * Add a sort stage to the aggregation pipeline. - * @param document The sort stage document. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#sort - */ - sort(document: Object): AggregationCursor +/** @public */ +export declare interface RootFilterOperators extends Document { + $and?: Filter[] + $nor?: Filter[] + $or?: Filter[] + $text?: { + $search: string + $language?: string + $caseSensitive?: boolean + $diacriticSensitive?: boolean + } + $where?: string | ((this: TSchema) => boolean) + $comment?: string | Document +} - /** - * Returns an array of documents. The caller is responsible for making sure that there - * is enough memory to store the results. Note that the array only contain partial - * results when this cursor had been previously accessed. In that case, - * cursor.rewind() can be used to reset the cursor. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#toArray - */ - toArray(): Promise +/* Excluded from this release type: RTTPinger */ + +/* Excluded from this release type: RTTPingerOptions */ + +/** @public */ +export declare type RunCommandOptions = CommandOperationOptions + +/** @public */ +export declare type SchemaMember = + | { + [P in keyof T]?: V + } + | { + [key: string]: V + } + +/** @public */ +export declare interface SelectServerOptions { + readPreference?: ReadPreferenceLike + /** How long to block for server selection before throwing an error */ + serverSelectionTimeoutMS?: number + session?: ClientSession +} + +export { serialize } + +/* Excluded from this release type: Server */ - /** - * Returns an array of documents. The caller is responsible for making sure that there - * is enough memory to store the results. Note that the array only contain partial - * results when this cursor had been previously accessed. In that case, - * cursor.rewind() can be used to reset the cursor. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#toArray - */ - toArray(callback: MongoCallback): void +/** @public */ +export declare interface ServerApi { + version: ServerApiVersion + strict?: boolean + deprecationErrors?: boolean +} - /** - * This is useful in certain cases where a stream is being consumed by a parser, - * which needs to "un-consume" some data that it has optimistically pulled out of the source, - * so that the stream can be passed on to some other party. - * @param stream Chunk of data to unshift onto the read queue. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#unshift - */ - unshift(stream: Buffer | string): void +/** @public */ +export declare const ServerApiVersion: Readonly<{ + readonly v1: "1" +}> + +/** @public */ +export declare type ServerApiVersion = + (typeof ServerApiVersion)[keyof typeof ServerApiVersion] + +/** @public */ +export declare class ServerCapabilities { + maxWireVersion: number + minWireVersion: number + constructor(hello: Document) + get hasAggregationCursor(): boolean + get hasWriteCommands(): boolean + get hasTextSearch(): boolean + get hasAuthCommands(): boolean + get hasListCollectionsCommand(): boolean + get hasListIndexesCommand(): boolean + get supportsSnapshotReads(): boolean + get commandsTakeWriteConcern(): boolean + get commandsTakeCollation(): boolean +} - /** - * Add a unwind stage to the aggregation pipeline. - * @param field The unwind field name. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/AggregationCursor.html#unwind - */ - unwind(field: string): AggregationCursor +/** + * Emitted when server is closed. + * @public + * @category Event + */ +export declare class ServerClosedEvent { + /** A unique identifier for the topology */ + topologyId: number + /** The address (host/port pair) of the server */ + address: string + /* Excluded from this release type: __constructor */ } /** - * CommandCursor. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/CommandCursor.html + * The client's view of a single server, based on the most recent hello outcome. + * + * Internal type, not meant to be directly instantiated + * @public */ -export interface CommandCursor extends Readable { - /** - * Set the batch size for the cursor. - * @param value The batchSize for the cursor. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/CommandCursor.html#batchSize - */ - batchSize(value: number): CommandCursor +export declare class ServerDescription { + address: string + type: ServerType + hosts: string[] + passives: string[] + arbiters: string[] + tags: TagSet + error: MongoError | null + topologyVersion: TopologyVersion | null + minWireVersion: number + maxWireVersion: number + roundTripTime: number + lastUpdateTime: number + lastWriteDate: number + me: string | null + primary: string | null + setName: string | null + setVersion: number | null + electionId: ObjectId | null + logicalSessionTimeoutMinutes: number | null + $clusterTime?: ClusterTime + /* Excluded from this release type: __constructor */ + get hostAddress(): HostAddress + get allHosts(): string[] + /** Is this server available for reads*/ + get isReadable(): boolean + /** Is this server data bearing */ + get isDataBearing(): boolean + /** Is this server available for writes */ + get isWritable(): boolean + get host(): string + get port(): number + /** + * Determines if another `ServerDescription` is equal to this one per the rules defined + * in the {@link https://github.com/mongodb/specifications/blob/master/source/server-discovery-and-monitoring/server-discovery-and-monitoring.rst#serverdescription|SDAM spec} + */ + equals(other?: ServerDescription | null): boolean +} - /** - * Clone the cursor. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/CommandCursor.html#clone - */ - clone(): CommandCursor +/** + * Emitted when server description changes, but does NOT include changes to the RTT. + * @public + * @category Event + */ +export declare class ServerDescriptionChangedEvent { + /** A unique identifier for the topology */ + topologyId: number + /** The address (host/port pair) of the server */ + address: string + /** The previous server description */ + previousDescription: ServerDescription + /** The new server description */ + newDescription: ServerDescription + /* Excluded from this release type: __constructor */ +} - /** - * Close the cursor, sending a KillCursor command and emitting close. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/CommandCursor.html#close - */ - close(): Promise +/* Excluded from this release type: ServerDescriptionOptions */ - /** - * Close the cursor, sending a KillCursor command and emitting close. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/CommandCursor.html#close - */ - close(callback: MongoCallback): void +/** @public */ +export declare type ServerEvents = { + serverHeartbeatStarted(event: ServerHeartbeatStartedEvent): void + serverHeartbeatSucceeded(event: ServerHeartbeatSucceededEvent): void + serverHeartbeatFailed(event: ServerHeartbeatFailedEvent): void + /* Excluded from this release type: connect */ + descriptionReceived(description: ServerDescription): void + closed(): void + ended(): void +} & ConnectionPoolEvents & + EventEmitterWithState - /** - * Each - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/CommandCursor.html#each - */ - each(callback: MongoCallback): void +/** + * Emitted when the server monitorโ€™s hello fails, either with an โ€œok: 0โ€ or a socket exception. + * @public + * @category Event + */ +export declare class ServerHeartbeatFailedEvent { + /** The connection id for the command */ + connectionId: string + /** The execution time of the event in ms */ + duration: number + /** The command failure */ + failure: Error + /* Excluded from this release type: __constructor */ +} - /** - * Is the cursor closed. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/CommandCursor.html#isClosed - */ - isClosed(): boolean +/** + * Emitted when the server monitorโ€™s hello command is started - immediately before + * the hello command is serialized into raw BSON and written to the socket. + * + * @public + * @category Event + */ +export declare class ServerHeartbeatStartedEvent { + /** The connection id for the command */ + connectionId: string + /* Excluded from this release type: __constructor */ +} - /** - * Add a maxTimeMS stage to the aggregation pipeline. - * @param value The state maxTimeMS value. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/CommandCursor.html#maxTimeMS - */ - maxTimeMS(value: number): CommandCursor +/** + * Emitted when the server monitorโ€™s hello succeeds. + * @public + * @category Event + */ +export declare class ServerHeartbeatSucceededEvent { + /** The connection id for the command */ + connectionId: string + /** The execution time of the event in ms */ + duration: number + /** The command reply */ + reply: Document + /* Excluded from this release type: __constructor */ +} - /** - * Get the next available document from the cursor, returns null if no more documents are available. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/CommandCursor.html#next - */ - next(): Promise +/** + * Emitted when server is initialized. + * @public + * @category Event + */ +export declare class ServerOpeningEvent { + /** A unique identifier for the topology */ + topologyId: number + /** The address (host/port pair) of the server */ + address: string + /* Excluded from this release type: __constructor */ +} - /** - * Get the next available document from the cursor, returns null if no more documents are available. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/CommandCursor.html#next - */ - next(callback: MongoCallback): void +/* Excluded from this release type: ServerOptions */ - /** - * The read() method pulls some data out of the internal buffer and returns it. - * If there is no data available, then it will return null. - * @param size Optional argument to specify how much data to read. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/CommandCursor.html#read - */ - read(size: number): string | Buffer | void +/* Excluded from this release type: ServerPrivate */ - /** - * Resets the cursor. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/CommandCursor.html#rewind - */ - rewind(): CommandCursor +/* Excluded from this release type: ServerSelectionCallback */ - /** - * Set the ReadPreference for the cursor. - * @param readPreference The new read preference for the cursor. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/CommandCursor.html#setReadPreference - */ - setReadPreference(readPreference: string | ReadPreference): CommandCursor +/* Excluded from this release type: ServerSelectionRequest */ - /** - * Returns an array of documents. The caller is responsible for making sure that there is enough memory - * to store the results. Note that the array only contain partial results when this cursor had been previously accessed. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/CommandCursor.html#toArray - */ - toArray(): Promise +/* Excluded from this release type: ServerSelector */ +/** + * Reflects the existence of a session on the server. Can be reused by the session pool. + * WARNING: not meant to be instantiated directly. For internal use only. + * @public + */ +export declare class ServerSession { + id: ServerSessionId + lastUse: number + txnNumber: number + isDirty: boolean + /* Excluded from this release type: __constructor */ /** - * Returns an array of documents. The caller is responsible for making sure that there is enough memory - * to store the results. Note that the array only contain partial results when this cursor had been previously accessed. - * @param callback The result callback. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/CommandCursor.html#toArray + * Determines if the server session has timed out. + * + * @param sessionTimeoutMinutes - The server's "logicalSessionTimeoutMinutes" */ - toArray(callback: MongoCallback): void + hasTimedOut(sessionTimeoutMinutes: number): boolean + /* Excluded from this release type: clone */ +} - /** - * This is useful in certain cases where a stream is being consumed by a parser, - * which needs to "un-consume" some data that it has optimistically pulled out of the source, - * so that the stream can be passed on to some other party. - * @param stream Chunk of data to unshift onto the read queue. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/CommandCursor.html#unshift - */ - unshift(stream: Buffer | string): void +/** @public */ +export declare type ServerSessionId = { + id: Binary } +/* Excluded from this release type: ServerSessionPool */ + /** - * GridFSBucket. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/GridFSBucket.html + * An enumeration of server types we know about + * @public */ -export declare class GridFSBucket { - /** - * - * @param db A db handle. - * @param options Optional settings. - */ - constructor(db: Db, options?: GridFSBucketOptions) +export declare const ServerType: Readonly<{ + readonly Standalone: "Standalone" + readonly Mongos: "Mongos" + readonly PossiblePrimary: "PossiblePrimary" + readonly RSPrimary: "RSPrimary" + readonly RSSecondary: "RSSecondary" + readonly RSArbiter: "RSArbiter" + readonly RSOther: "RSOther" + readonly RSGhost: "RSGhost" + readonly Unknown: "Unknown" + readonly LoadBalancer: "LoadBalancer" +}> + +/** @public */ +export declare type ServerType = (typeof ServerType)[keyof typeof ServerType] + +/** @public */ +export declare type SetFields = ({ + readonly [key in KeysOfAType | undefined>]?: + | OptionalId> + | AddToSetOperators>>> +} & NotAcceptedFields | undefined>) & { + readonly [key: string]: AddToSetOperators | any +} - /** - * Deletes a file with the given id. - * @param id The id of the file doc - * @param callback The result callback - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/GridFSBucket.html#delete - */ - delete(id: ObjectID, callback?: GridFSBucketErrorCallback): void +/** @public */ +export declare type SetProfilingLevelOptions = CommandOperationOptions + +/* Excluded from this release type: SeverityLevel */ + +/** @public */ +export declare type Sort = + | string + | Exclude< + SortDirection, + { + $meta: string + } + > + | string[] + | { + [key: string]: SortDirection + } + | Map + | [string, SortDirection][] + | [string, SortDirection] + +/** @public */ +export declare type SortDirection = + | 1 + | -1 + | "asc" + | "desc" + | "ascending" + | "descending" + | { + $meta: string + } - /** - * Removes this bucket's files collection, followed by its chunks collection. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/GridFSBucket.html#drop - */ - drop(callback?: GridFSBucketErrorCallback): void +/* Excluded from this release type: SortDirectionForCmd */ - /** - * Convenience wrapper around find on the files collection - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/GridFSBucket.html#find - */ - find(filter?: Object, options?: GridFSBucketFindOptions): Cursor +/* Excluded from this release type: SortForCmd */ - /** - * Returns a readable stream (GridFSBucketReadStream) for streaming file. - * @param id The id of the file doc. - * @param options Optional settings - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/GridFSBucket.html#openDownloadStream - */ - openDownloadStream( - id: ObjectID, - options?: { start: number; end: number }, - ): GridFSBucketReadStream +/* Excluded from this release type: SrvPoller */ - /** - * Returns a readable stream (GridFSBucketReadStream) for streaming file - * @param filename The id of the file doc - * @param options Optional settings - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/GridFSBucket.html#openDownloadStreamByName - */ +/* Excluded from this release type: SrvPollerEvents */ - openDownloadStreamByName( - filename: string, - options?: { revision: number; start: number; end: number }, - ): GridFSBucketReadStream +/* Excluded from this release type: SrvPollerOptions */ - /** - * Returns a writable stream (GridFSBucketWriteStream) for writing buffers to GridFS. - * The stream's 'id' property contains the resulting file's id. - * @param filename The value of the 'filename' key in the files doc. - * @param options Optional settings - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/GridFSBucket.html#openUploadStream - */ - openUploadStream( - filename: string, - options?: GridFSBucketOpenUploadStreamOptions, - ): GridFSBucketWriteStream +/* Excluded from this release type: SrvPollingEvent */ - /** - * Returns a writable stream (GridFSBucketWriteStream) for writing buffers to GridFS for a custom file id. - * The stream's 'id' property contains the resulting file's id. - * @param id A custom id used to identify the file. - * @param filename The value of the 'filename' key in the files doc. - * @param options Optional settings - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/GridFSBucket.html#openUploadStreamWithId - */ - openUploadStreamWithId( - id: string | number | Object, - filename: string, - options?: GridFSBucketOpenUploadStreamOptions, - ): GridFSBucketWriteStream +/** @public */ +export declare type Stream = Socket | TLSSocket - /** - * Renames the file with the given _id to the given string. - * @param id the id of the file to rename. - * @param filename new name for the file. - * @param callback The result callback - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/GridFSBucket.html#rename - */ - rename( - id: ObjectID, - filename: string, - callback?: GridFSBucketErrorCallback, - ): void +/** @public */ +export declare class StreamDescription { + address: string + type: string + minWireVersion?: number + maxWireVersion?: number + maxBsonObjectSize: number + maxMessageSizeBytes: number + maxWriteBatchSize: number + compressors: CompressorName[] + compressor?: CompressorName + logicalSessionTimeoutMinutes?: number + loadBalanced: boolean + __nodejs_mock_server__?: boolean + zlibCompressionLevel?: number + constructor(address: string, options?: StreamDescriptionOptions) + receiveResponse(response: Document | null): void +} + +/** @public */ +export declare interface StreamDescriptionOptions { + compressors?: CompressorName[] + logicalSessionTimeoutMinutes?: number + loadBalanced: boolean } /** - * Constructor for a streaming GridFS interface. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/GridFSBucket.html + * @public + * @experimental */ -export interface GridFSBucketOptions { - /** - * The 'files' and 'chunks' collections will be prefixed with the bucket name followed by a dot. - */ - bucketName?: string +export declare type StrictFilter = + | Partial + | ({ + [Property in Join, []>, ".">]?: Condition< + PropertyType, Property> + > + } & RootFilterOperators>) - /** - * Number of bytes stored in each chunk. Defaults to 255KB. - */ - chunkSizeBytes?: number +/** + * @public + * @experimental + */ +export declare type StrictMatchKeysAndValues = Readonly< + { + [Property in Join, ".">]?: PropertyType< + TSchema, + Property + > + } & { + [Property in `${NestedPathsOfType}.$${ + | `[${string}]` + | ""}`]?: ArrayElement< + PropertyType< + TSchema, + Property extends `${infer Key}.$${string}` ? Key : never + > + > + } & { + [Property in `${NestedPathsOfType[]>}.$${ + | `[${string}]` + | ""}.${string}`]?: any + } & Document +> - /** - * Optional write concern to be passed to write operations, for instance { w: 1 }. - */ - writeConcern?: WriteConcern +/** + * @public + * @experimental + */ +export declare type StrictUpdateFilter = { + $currentDate?: OnlyFieldsOfType< + TSchema, + Date | Timestamp, + | true + | { + $type: "date" | "timestamp" + } + > + $inc?: OnlyFieldsOfType + $min?: StrictMatchKeysAndValues + $max?: StrictMatchKeysAndValues + $mul?: OnlyFieldsOfType + $rename?: Record + $set?: StrictMatchKeysAndValues + $setOnInsert?: StrictMatchKeysAndValues + $unset?: OnlyFieldsOfType + $addToSet?: SetFields + $pop?: OnlyFieldsOfType, 1 | -1> + $pull?: PullOperator + $push?: PushOperator + $pullAll?: PullAllOperator + $bit?: OnlyFieldsOfType< + TSchema, + NumericType | undefined, + | { + and: IntegerType + } + | { + or: IntegerType + } + | { + xor: IntegerType + } + > +} & Document + +/** @public */ +export declare type SupportedNodeConnectionOptions = + SupportedTLSConnectionOptions & + SupportedTLSSocketOptions & + SupportedSocketOptions + +/** @public */ +export declare type SupportedSocketOptions = Pick< + TcpNetConnectOpts, + (typeof LEGAL_TCP_SOCKET_OPTIONS)[number] +> + +/** @public */ +export declare type SupportedTLSConnectionOptions = Pick< + ConnectionOptions_2, + Extract< + keyof ConnectionOptions_2, + (typeof LEGAL_TLS_SOCKET_OPTIONS)[number] + > +> + +/** @public */ +export declare type SupportedTLSSocketOptions = Pick< + TLSSocketOptions, + Extract +> + +/** @public */ +export declare type TagSet = { + [key: string]: string +} - /** - * Optional read preference to be passed to read operations. - */ - ReadPreference?: ReadPreference +/* Excluded from this release type: TimerQueue */ + +/** @public + * Configuration options for timeseries collections + * @see https://www.mongodb.com/docs/manual/core/timeseries-collections/ + */ +export declare interface TimeSeriesCollectionOptions extends Document { + timeField: string + metaField?: string + granularity?: "seconds" | "minutes" | "hours" | string } +export { Timestamp } + +/* Excluded from this release type: Topology */ + /** - * GridFSBucketErrorCallback. - * @param err An error instance representing any errors that occurred. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/GridFSBucket.html#~errorCallback + * Emitted when topology is closed. + * @public + * @category Event */ -export interface GridFSBucketErrorCallback { - (err?: MongoError): void +export declare class TopologyClosedEvent { + /** A unique identifier for the topology */ + topologyId: number + /* Excluded from this release type: __constructor */ } /** - * GridFSBucketFindOptions. - * @see http://mongodb.github.io/node-mongodb-native/2.1/api/GridFSBucket.html#find + * Representation of a deployment of servers + * @public */ -export interface GridFSBucketFindOptions { - /** - * Optional batch size for cursor. +export declare class TopologyDescription { + type: TopologyType + setName: string | null + maxSetVersion: number | null + maxElectionId: ObjectId | null + servers: Map + stale: boolean + compatible: boolean + compatibilityError?: string + logicalSessionTimeoutMinutes: number | null + heartbeatFrequencyMS: number + localThresholdMS: number + commonWireVersion: number + /** + * Create a TopologyDescription */ - batchSize?: number - - /** - * Optional limit for cursor. - */ - limit?: number - + constructor( + topologyType: TopologyType, + serverDescriptions?: Map | null, + setName?: string | null, + maxSetVersion?: number | null, + maxElectionId?: ObjectId | null, + commonWireVersion?: number | null, + options?: TopologyDescriptionOptions | null, + ) + /* Excluded from this release type: updateFromSrvPollingEvent */ + /* Excluded from this release type: update */ + get error(): MongoServerError | null /** - * Optional maxTimeMS for cursor. + * Determines if the topology description has any known servers */ - maxTimeMS?: number - + get hasKnownServers(): boolean /** - * Optionally set cursor's noCursorTimeout flag. + * Determines if this topology description has a data-bearing server available. */ - noCursorTimeout?: boolean + get hasDataBearingServers(): boolean + /* Excluded from this release type: hasServer */ +} - /** - * Optional skip for cursor. - */ - skip?: number +/** + * Emitted when topology description changes. + * @public + * @category Event + */ +export declare class TopologyDescriptionChangedEvent { + /** A unique identifier for the topology */ + topologyId: number + /** The old topology description */ + previousDescription: TopologyDescription + /** The new topology description */ + newDescription: TopologyDescription + /* Excluded from this release type: __constructor */ +} - /** - * Optional sort for cursor. - */ - sort?: Object +/** @public */ +export declare interface TopologyDescriptionOptions { + heartbeatFrequencyMS?: number + localThresholdMS?: number } +/** @public */ +export declare type TopologyEvents = { + /* Excluded from this release type: connect */ + serverOpening(event: ServerOpeningEvent): void + serverClosed(event: ServerClosedEvent): void + serverDescriptionChanged(event: ServerDescriptionChangedEvent): void + topologyClosed(event: TopologyClosedEvent): void + topologyOpening(event: TopologyOpeningEvent): void + topologyDescriptionChanged(event: TopologyDescriptionChangedEvent): void + error(error: Error): void + /* Excluded from this release type: open */ + close(): void + timeout(): void +} & Omit & + ConnectionPoolEvents & + ConnectionEvents & + EventEmitterWithState + /** - * GridFSBucketOpenUploadStreamOptions. - * @see https://mongodb.github.io/node-mongodb-native/2.1/api/GridFSBucket.html#openUploadStream + * Emitted when topology is initialized. + * @public + * @category Event */ -export interface GridFSBucketOpenUploadStreamOptions { - /** - * Optional overwrite this bucket's chunkSizeBytes for this file. - */ - chunkSizeBytes?: number +export declare class TopologyOpeningEvent { + /** A unique identifier for the topology */ + topologyId: number + /* Excluded from this release type: __constructor */ +} - /** - * Optional object to store in the file document's metadata field. - */ - metadata?: Object +/* Excluded from this release type: TopologyOptions */ - /** - * Optional string to store in the file document's contentType field. - */ - contentType?: string +/* Excluded from this release type: TopologyPrivate */ - /** - * Optional array of strings to store in the file document's aliases field. - */ - aliases?: Array +/** + * An enumeration of topology types we know about + * @public + */ +export declare const TopologyType: Readonly<{ + readonly Single: "Single" + readonly ReplicaSetNoPrimary: "ReplicaSetNoPrimary" + readonly ReplicaSetWithPrimary: "ReplicaSetWithPrimary" + readonly Sharded: "Sharded" + readonly Unknown: "Unknown" + readonly LoadBalanced: "LoadBalanced" +}> + +/** @public */ +export declare type TopologyType = + (typeof TopologyType)[keyof typeof TopologyType] + +/** @public */ +export declare interface TopologyVersion { + processId: ObjectId + counter: Long } /** - * GridFSBucketReadStream. - * @see https://mongodb.github.io/node-mongodb-native/2.1/api/GridFSBucketReadStream.html + * @public + * A class maintaining state related to a server transaction. Internal Only */ -export declare class GridFSBucketReadStream extends Readable { - /** - * - * @param chunks Handle for chunks collection. - * @param files Handle for files collection. - * @param readPreference The read preference to use. - * @param filter The query to use to find the file document. - * @param options Optional settings. - */ - constructor( - chunks: Collection, - files: Collection, - readPreference: Object, - filter: Object, - options?: GridFSBucketReadStreamOptions, - ) +export declare class Transaction { + /* Excluded from this release type: state */ + options: TransactionOptions + /* Excluded from this release type: _pinnedServer */ + /* Excluded from this release type: _recoveryToken */ + /* Excluded from this release type: __constructor */ + /* Excluded from this release type: server */ + get recoveryToken(): Document | undefined + get isPinned(): boolean + /** @returns Whether the transaction has started */ + get isStarting(): boolean + /** + * @returns Whether this session is presently in a transaction + */ + get isActive(): boolean + get isCommitted(): boolean + /* Excluded from this release type: transition */ + /* Excluded from this release type: pinServer */ + /* Excluded from this release type: unpinServer */ +} + +/** + * Configuration options for a transaction. + * @public + */ +export declare interface TransactionOptions extends CommandOperationOptions { + /** A default read concern for commands in this transaction */ + readConcern?: ReadConcernLike + /** A default writeConcern for commands in this transaction */ + writeConcern?: WriteConcern + /** A default read preference for commands in this transaction */ + readPreference?: ReadPreferenceLike + /** Specifies the maximum amount of time to allow a commit action on a transaction to run in milliseconds */ + maxCommitTimeMS?: number +} + +/* Excluded from this release type: TxnState */ + +/** + * Typescript type safe event emitter + * @public + */ +export declare interface TypedEventEmitter + extends EventEmitter { + addListener( + event: EventKey, + listener: Events[EventKey], + ): this + addListener( + event: CommonEvents, + listener: ( + eventName: string | symbol, + listener: GenericListener, + ) => void, + ): this + addListener(event: string | symbol, listener: GenericListener): this + on( + event: EventKey, + listener: Events[EventKey], + ): this + on( + event: CommonEvents, + listener: ( + eventName: string | symbol, + listener: GenericListener, + ) => void, + ): this + on(event: string | symbol, listener: GenericListener): this + once( + event: EventKey, + listener: Events[EventKey], + ): this + once( + event: CommonEvents, + listener: ( + eventName: string | symbol, + listener: GenericListener, + ) => void, + ): this + once(event: string | symbol, listener: GenericListener): this + removeListener( + event: EventKey, + listener: Events[EventKey], + ): this + removeListener( + event: CommonEvents, + listener: ( + eventName: string | symbol, + listener: GenericListener, + ) => void, + ): this + removeListener(event: string | symbol, listener: GenericListener): this + off( + event: EventKey, + listener: Events[EventKey], + ): this + off( + event: CommonEvents, + listener: ( + eventName: string | symbol, + listener: GenericListener, + ) => void, + ): this + off(event: string | symbol, listener: GenericListener): this + removeAllListeners( + event?: EventKey | CommonEvents | symbol | string, + ): this + listeners( + event: EventKey | CommonEvents | symbol | string, + ): Events[EventKey][] + rawListeners( + event: EventKey | CommonEvents | symbol | string, + ): Events[EventKey][] + emit( + event: EventKey | symbol, + ...args: Parameters + ): boolean + listenerCount( + type: EventKey | CommonEvents | symbol | string, + ): number + prependListener( + event: EventKey, + listener: Events[EventKey], + ): this + prependListener( + event: CommonEvents, + listener: ( + eventName: string | symbol, + listener: GenericListener, + ) => void, + ): this + prependListener(event: string | symbol, listener: GenericListener): this + prependOnceListener( + event: EventKey, + listener: Events[EventKey], + ): this + prependOnceListener( + event: CommonEvents, + listener: ( + eventName: string | symbol, + listener: GenericListener, + ) => void, + ): this + prependOnceListener(event: string | symbol, listener: GenericListener): this + eventNames(): string[] + getMaxListeners(): number + setMaxListeners(n: number): this } /** - * GridFSBucketReadStreamOptions. - * @see https://mongodb.github.io/node-mongodb-native/2.1/api/GridFSBucketReadStream.html + * Typescript type safe event emitter + * @public */ -export interface GridFSBucketReadStreamOptions { +export declare class TypedEventEmitter< + Events extends EventsDescription, +> extends EventEmitter {} + +/** @public */ +export declare class UnorderedBulkOperation extends BulkOperationBase { + /* Excluded from this release type: __constructor */ + handleWriteError(callback: Callback, writeResult: BulkWriteResult): boolean + addToOperationsList( + batchType: BatchType, + document: Document | UpdateStatement | DeleteStatement, + ): this +} + +/** @public */ +export declare interface UpdateDescription< + TSchema extends Document = Document, +> { /** - * Optional sort for the file find query. + * A document containing key:value pairs of names of the fields that were + * changed, and the new value for those fields. */ - sort?: number - + updatedFields?: Partial /** - * Optional skip for the file find query. + * An array of field names that were removed from the document. */ - skip?: number - + removedFields?: string[] /** - * Optional 0-based offset in bytes to start streaming from. + * An array of documents which record array truncations performed with pipeline-based updates using one or more of the following stages: + * - $addFields + * - $set + * - $replaceRoot + * - $replaceWith */ - start?: number - + truncatedArrays?: Array<{ + /** The name of the truncated field. */ + field: string + /** The number of elements in the truncated array. */ + newSize: number + }> /** - * Optional 0-based offset in bytes to stop streaming before. + * A document containing additional information about any ambiguous update paths from the update event. The document + * maps the full ambiguous update path to an array containing the actual resolved components of the path. For example, + * given a document shaped like `{ a: { '0': 0 } }`, and an update of `{ $inc: 'a.0' }`, disambiguated paths would look like + * the following: + * + * ``` + * { + * 'a.0': ['a', '0'] + * } + * ``` + * + * This field is only present when there are ambiguous paths that are updated as a part of the update event and `showExpandedEvents` + * is enabled for the change stream. + * @sinceServerVersion 6.1.0 */ - end?: number + disambiguatedPaths?: Document +} + +/** @public */ +export declare type UpdateFilter = { + $currentDate?: OnlyFieldsOfType< + TSchema, + Date | Timestamp, + | true + | { + $type: "date" | "timestamp" + } + > + $inc?: OnlyFieldsOfType + $min?: MatchKeysAndValues + $max?: MatchKeysAndValues + $mul?: OnlyFieldsOfType + $rename?: Record + $set?: MatchKeysAndValues + $setOnInsert?: MatchKeysAndValues + $unset?: OnlyFieldsOfType + $addToSet?: SetFields + $pop?: OnlyFieldsOfType, 1 | -1> + $pull?: PullOperator + $push?: PushOperator + $pullAll?: PullAllOperator + $bit?: OnlyFieldsOfType< + TSchema, + NumericType | undefined, + | { + and: IntegerType + } + | { + or: IntegerType + } + | { + xor: IntegerType + } + > +} & Document + +/** @public */ +export declare interface UpdateManyModel { + /** The filter to limit the updated documents. */ + filter: Filter + /** A document or pipeline containing update operators. */ + update: UpdateFilter | UpdateFilter[] + /** A set of filters specifying to which array elements an update should apply. */ + arrayFilters?: Document[] + /** Specifies a collation. */ + collation?: CollationOptions + /** The index to use. If specified, then the query system will only consider plans using the hinted index. */ + hint?: Hint + /** When true, creates a new document if no document matches the query. */ + upsert?: boolean +} + +/** @public */ +export declare interface UpdateOneModel { + /** The filter to limit the updated documents. */ + filter: Filter + /** A document or pipeline containing update operators. */ + update: UpdateFilter | UpdateFilter[] + /** A set of filters specifying to which array elements an update should apply. */ + arrayFilters?: Document[] + /** Specifies a collation. */ + collation?: CollationOptions + /** The index to use. If specified, then the query system will only consider plans using the hinted index. */ + hint?: Hint + /** When true, creates a new document if no document matches the query. */ + upsert?: boolean +} + +/** @public */ +export declare interface UpdateOptions extends CommandOperationOptions { + /** A set of filters specifying to which array elements an update should apply */ + arrayFilters?: Document[] + /** If true, allows the write to opt-out of document level validation */ + bypassDocumentValidation?: boolean + /** Specifies a collation */ + collation?: CollationOptions + /** Specify that the update query should only consider plans using the hinted index */ + hint?: Hint + /** When true, creates a new document if no document matches the query */ + upsert?: boolean + /** Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0). */ + let?: Document +} + +/** @public */ +export declare interface UpdateResult { + /** Indicates whether this write result was acknowledged. If not, then all other members of this result will be undefined */ + acknowledged: boolean + /** The number of documents that matched the filter */ + matchedCount: number + /** The number of documents that were modified */ + modifiedCount: number + /** The number of documents that were upserted */ + upsertedCount: number + /** The identifier of the inserted document if an upsert took place */ + upsertedId: ObjectId +} + +/** @public */ +export declare interface UpdateStatement { + /** The query that matches documents to update. */ + q: Document + /** The modifications to apply. */ + u: Document | Document[] + /** If true, perform an insert if no documents match the query. */ + upsert?: boolean + /** If true, updates all documents that meet the query criteria. */ + multi?: boolean + /** Specifies the collation to use for the operation. */ + collation?: CollationOptions + /** An array of filter documents that determines which array elements to modify for an update operation on an array field. */ + arrayFilters?: Document[] + /** A document or string that specifies the index to use to support the query predicate. */ + hint?: Hint +} + +/** @public */ +export declare interface ValidateCollectionOptions + extends CommandOperationOptions { + /** Validates a collection in the background, without interrupting read or write traffic (only in MongoDB 4.4+) */ + background?: boolean +} + +/** @public */ +export declare type W = number | "majority" + +/* Excluded from this release type: WaitQueueMember */ + +/** @public */ +export declare interface WiredTigerData extends Document { + LSM: { + "bloom filter false positives": number + "bloom filter hits": number + "bloom filter misses": number + "bloom filter pages evicted from cache": number + "bloom filter pages read into cache": number + "bloom filters in the LSM tree": number + "chunks in the LSM tree": number + "highest merge generation in the LSM tree": number + "queries that could have benefited from a Bloom filter that did not exist": number + "sleep for LSM checkpoint throttle": number + "sleep for LSM merge throttle": number + "total size of bloom filters": number + } & Document + "block-manager": { + "allocations requiring file extension": number + "blocks allocated": number + "blocks freed": number + "checkpoint size": number + "file allocation unit size": number + "file bytes available for reuse": number + "file magic number": number + "file major version number": number + "file size in bytes": number + "minor version number": number + } + btree: { + "btree checkpoint generation": number + "column-store fixed-size leaf pages": number + "column-store internal pages": number + "column-store variable-size RLE encoded values": number + "column-store variable-size deleted values": number + "column-store variable-size leaf pages": number + "fixed-record size": number + "maximum internal page key size": number + "maximum internal page size": number + "maximum leaf page key size": number + "maximum leaf page size": number + "maximum leaf page value size": number + "maximum tree depth": number + "number of key/value pairs": number + "overflow pages": number + "pages rewritten by compaction": number + "row-store internal pages": number + "row-store leaf pages": number + } & Document + cache: { + "bytes currently in the cache": number + "bytes read into cache": number + "bytes written from cache": number + "checkpoint blocked page eviction": number + "data source pages selected for eviction unable to be evicted": number + "hazard pointer blocked page eviction": number + "in-memory page passed criteria to be split": number + "in-memory page splits": number + "internal pages evicted": number + "internal pages split during eviction": number + "leaf pages split during eviction": number + "modified pages evicted": number + "overflow pages read into cache": number + "overflow values cached in memory": number + "page split during eviction deepened the tree": number + "page written requiring lookaside records": number + "pages read into cache": number + "pages read into cache requiring lookaside entries": number + "pages requested from the cache": number + "pages written from cache": number + "pages written requiring in-memory restoration": number + "tracked dirty bytes in the cache": number + "unmodified pages evicted": number + } & Document + cache_walk: { + "Average difference between current eviction generation when the page was last considered": number + "Average on-disk page image size seen": number + "Clean pages currently in cache": number + "Current eviction generation": number + "Dirty pages currently in cache": number + "Entries in the root page": number + "Internal pages currently in cache": number + "Leaf pages currently in cache": number + "Maximum difference between current eviction generation when the page was last considered": number + "Maximum page size seen": number + "Minimum on-disk page image size seen": number + "On-disk page image sizes smaller than a single allocation unit": number + "Pages created in memory and never written": number + "Pages currently queued for eviction": number + "Pages that could not be queued for eviction": number + "Refs skipped during cache traversal": number + "Size of the root page": number + "Total number of pages currently in cache": number + } & Document + compression: { + "compressed pages read": number + "compressed pages written": number + "page written failed to compress": number + "page written was too small to compress": number + "raw compression call failed, additional data available": number + "raw compression call failed, no additional data available": number + "raw compression call succeeded": number + } & Document + cursor: { + "bulk-loaded cursor-insert calls": number + "create calls": number + "cursor-insert key and value bytes inserted": number + "cursor-remove key bytes removed": number + "cursor-update value bytes updated": number + "insert calls": number + "next calls": number + "prev calls": number + "remove calls": number + "reset calls": number + "restarted searches": number + "search calls": number + "search near calls": number + "truncate calls": number + "update calls": number + } + reconciliation: { + "dictionary matches": number + "fast-path pages deleted": number + "internal page key bytes discarded using suffix compression": number + "internal page multi-block writes": number + "internal-page overflow keys": number + "leaf page key bytes discarded using prefix compression": number + "leaf page multi-block writes": number + "leaf-page overflow keys": number + "maximum blocks required for a page": number + "overflow values written": number + "page checksum matches": number + "page reconciliation calls": number + "page reconciliation calls for eviction": number + "pages deleted": number + } & Document +} + +/* Excluded from this release type: WithConnectionCallback */ + +/** Add an _id field to an object shaped type @public */ +export declare type WithId = EnhancedOmit & { + _id: InferIdType } +/** Remove the _id field from an object shaped type @public */ +export declare type WithoutId = Omit + +/** @public */ +export declare type WithSessionCallback = ( + session: ClientSession, +) => Promise + +/** @public */ +export declare type WithTransactionCallback = ( + session: ClientSession, +) => Promise + /** - * GridFSBucketWriteStream - * @see https://mongodb.github.io/node-mongodb-native/2.1/api/GridFSBucketWriteStream.html + * A MongoDB WriteConcern, which describes the level of acknowledgement + * requested from MongoDB for write operations. + * @public + * + * @see https://www.mongodb.com/docs/manual/reference/write-concern/ */ -export declare class GridFSBucketWriteStream extends Writable { - /** - * - * @param bucket Handle for this stream's corresponding bucket. - * @param filename The value of the 'filename' key in the files doc. - * @param options Optional settings. - */ - constructor( - bucket: GridFSBucket, - filename: string, - options?: GridFSBucketWriteStreamOptions, - ) +export declare class WriteConcern { + /** request acknowledgment that the write operation has propagated to a specified number of mongod instances or to mongod instances with specified tags. */ + w?: W + /** specify a time limit to prevent write operations from blocking indefinitely */ + wtimeout?: number + /** request acknowledgment that the write operation has been written to the on-disk journal */ + j?: boolean + /** equivalent to the j option */ + fsync?: boolean | 1 + /** + * Constructs a WriteConcern from the write concern properties. + * @param w - request acknowledgment that the write operation has propagated to a specified number of mongod instances or to mongod instances with specified tags. + * @param wtimeout - specify a time limit to prevent write operations from blocking indefinitely + * @param j - request acknowledgment that the write operation has been written to the on-disk journal + * @param fsync - equivalent to the j option + */ + constructor(w?: W, wtimeout?: number, j?: boolean, fsync?: boolean | 1) + /** Construct a WriteConcern given an options object. */ + static fromOptions( + options?: WriteConcernOptions | WriteConcern | W, + inherit?: WriteConcernOptions | WriteConcern, + ): WriteConcern | undefined } /** - * GridFSBucketWriteStreamOptions. - * @see https://mongodb.github.io/node-mongodb-native/2.1/api/GridFSBucketWriteStream.html + * An error representing a failure by the server to apply the requested write concern to the bulk operation. + * @public + * @category Error */ -export interface GridFSBucketWriteStreamOptions { - /** - * Custom file id for the GridFS file. - */ - id?: string | number | Object +export declare class WriteConcernError { + /* Excluded from this release type: [kServerError] */ + constructor(error: WriteConcernErrorData) + /** Write concern error code. */ + get code(): number | undefined + /** Write concern error message. */ + get errmsg(): string | undefined + /** Write concern error info. */ + get errInfo(): Document | undefined + toJSON(): WriteConcernErrorData + toString(): string +} - /** - * The chunk size to use, in bytes. - */ - chunkSizeBytes?: number +/** @public */ +export declare interface WriteConcernErrorData { + code: number + errmsg: string + errInfo?: Document +} - /** - * The write concern. - */ - w?: number +/** @public */ +export declare interface WriteConcernOptions { + /** Write Concern as an object */ + writeConcern?: WriteConcern | WriteConcernSettings +} - /** - * The write concern timeout. - */ +/** @public */ +export declare interface WriteConcernSettings { + /** The write concern */ + w?: W + /** The write concern timeout */ + wtimeoutMS?: number + /** The journal write concern */ + journal?: boolean + /** The journal write concern */ + j?: boolean + /** The write concern timeout */ wtimeout?: number + /** The file sync write concern */ + fsync?: boolean | 1 +} - /** - * The journal write concern. - */ - j?: number +/** + * An error that occurred during a BulkWrite on the server. + * @public + * @category Error + */ +export declare class WriteError { + err: BulkWriteOperationError + constructor(err: BulkWriteOperationError) + /** WriteError code. */ + get code(): number + /** WriteError original bulk operation index. */ + get index(): number + /** WriteError message. */ + get errmsg(): string | undefined + /** WriteError details. */ + get errInfo(): Document | undefined + /** Returns the underlying operation that caused the error */ + getOperation(): Document + toJSON(): { + code: number + index: number + errmsg?: string + op: Document + } + toString(): string } + +/* Excluded from this release type: WriteProtocolMessageType */ + +export {} diff --git a/src/driver/mysql/MysqlDriver.ts b/src/driver/mysql/MysqlDriver.ts index 25fd52e1e2..c0e56d7bd8 100644 --- a/src/driver/mysql/MysqlDriver.ts +++ b/src/driver/mysql/MysqlDriver.ts @@ -26,6 +26,7 @@ import { View } from "../../schema-builder/view/View" import { TableForeignKey } from "../../schema-builder/table/TableForeignKey" import { VersionUtils } from "../../util/VersionUtils" import { InstanceChecker } from "../../util/InstanceChecker" +import { UpsertType } from "../types/UpsertType" /** * Organizes communication with MySQL DBMS. @@ -151,12 +152,16 @@ export class MysqlDriver implements Driver { "multilinestring", "multipolygon", "geometrycollection", + // additional data types for mariadb + "uuid", + "inet4", + "inet6", ] /** * Returns type of upsert supported by driver if any */ - readonly supportedUpsertType = "on-duplicate-key-update" + supportedUpsertTypes: UpsertType[] = ["on-duplicate-key-update"] /** * Gets list of spatial column data types. @@ -330,6 +335,9 @@ export class MysqlDriver implements Driver { update: false, } + /** MariaDB supports uuid type for version 10.7.0 and up */ + private uuidColumnTypeSuported = false + // ------------------------------------------------------------------------- // Constructor // ------------------------------------------------------------------------- @@ -420,6 +428,9 @@ export class MysqlDriver implements Driver { if (VersionUtils.isGreaterOrEqual(dbVersion, "10.2.0")) { this.cteCapabilities.enabled = true } + if (VersionUtils.isGreaterOrEqual(dbVersion, "10.7.0")) { + this.uuidColumnTypeSuported = true + } } else if (this.options.type === "mysql") { if (VersionUtils.isGreaterOrEqual(dbVersion, "8.0.0")) { this.cteCapabilities.enabled = true @@ -719,14 +730,19 @@ export class MysqlDriver implements Driver { return "blob" } else if (column.type === Boolean) { return "tinyint" - } else if (column.type === "uuid") { + } else if (column.type === "uuid" && !this.uuidColumnTypeSuported) { return "varchar" - } else if (column.type === "json" && this.options.type === "mariadb") { + } else if ( + column.type === "json" && + this.options.type === "mariadb" && + !VersionUtils.isGreaterOrEqual(this.version ?? "0.0.0", "10.4.3") + ) { /* * MariaDB implements this as a LONGTEXT rather, as the JSON data type contradicts the SQL standard, * and MariaDB's benchmarks indicate that performance is at least equivalent. * * @see https://mariadb.com/kb/en/json-data-type/ + * if Version is 10.4.3 or greater, JSON is an alias for longtext and an automatic check_json(column) constraint is added */ return "longtext" } else if ( @@ -824,8 +840,13 @@ export class MysqlDriver implements Driver { /** * fix https://github.com/typeorm/typeorm/issues/1139 + * note that if the db did support uuid column type it wouldn't have been defaulted to varchar */ - if (column.generationStrategy === "uuid") return "36" + if ( + column.generationStrategy === "uuid" && + !this.uuidColumnTypeSuported + ) + return "36" switch (column.type) { case String: @@ -986,7 +1007,7 @@ export class MysqlDriver implements Driver { const isColumnChanged = tableColumn.name !== columnMetadata.databaseName || - tableColumn.type !== this.normalizeType(columnMetadata) || + this.isColumnDataTypeChanged(tableColumn, columnMetadata) || tableColumn.length !== this.getColumnLength(columnMetadata) || tableColumn.width !== columnMetadata.width || (columnMetadata.precision !== undefined && @@ -1345,4 +1366,22 @@ export class MysqlDriver implements Driver { return comment } + + /** + * A helper to check if column data types have changed + * This can be used to manage checking any types the + * database may alias + */ + private isColumnDataTypeChanged( + tableColumn: TableColumn, + columnMetadata: ColumnMetadata, + ) { + // this is an exception for mariadb versions where json is an alias for longtext + if ( + this.normalizeType(columnMetadata) === "json" && + tableColumn.type.toLowerCase() === "longtext" + ) + return false + return tableColumn.type !== this.normalizeType(columnMetadata) + } } diff --git a/src/driver/nativescript/NativescriptDriver.ts b/src/driver/nativescript/NativescriptDriver.ts index a3193f0620..0f1d910160 100644 --- a/src/driver/nativescript/NativescriptDriver.ts +++ b/src/driver/nativescript/NativescriptDriver.ts @@ -3,7 +3,6 @@ import { NativescriptConnectionOptions } from "./NativescriptConnectionOptions" import { NativescriptQueryRunner } from "./NativescriptQueryRunner" import { QueryRunner } from "../../query-runner/QueryRunner" import { DataSource } from "../../data-source/DataSource" -import { DriverOptionNotSetError } from "../../error/DriverOptionNotSetError" import { DriverPackageNotInstalledError } from "../../error/DriverPackageNotInstalledError" import { ColumnType } from "../types/ColumnTypes" import { ReplicationMode } from "../types/ReplicationMode" @@ -40,11 +39,6 @@ export class NativescriptDriver extends AbstractSqliteDriver { this.database = this.options.database this.driver = this.options.driver - // validate options to make sure everything is set - if (!this.options.database) { - throw new DriverOptionNotSetError("database") - } - // load sqlite package this.loadDependencies() } diff --git a/src/driver/oracle/OracleDriver.ts b/src/driver/oracle/OracleDriver.ts index 949a32932d..2eafc1e47c 100644 --- a/src/driver/oracle/OracleDriver.ts +++ b/src/driver/oracle/OracleDriver.ts @@ -25,6 +25,9 @@ import { View } from "../../schema-builder/view/View" import { TableForeignKey } from "../../schema-builder/table/TableForeignKey" import { TypeORMError } from "../../error" import { InstanceChecker } from "../../util/InstanceChecker" +import { UpsertType } from "../types/UpsertType" +import { OnDeleteType } from "../../metadata/types/OnDeleteType" +import { OnUpdateType } from "../../metadata/types/OnUpdateType" /** * Organizes communication with Oracle RDBMS. @@ -127,6 +130,28 @@ export class OracleDriver implements Driver { "urowid", ] + /** + * Returns type of upsert supported by driver if any + */ + supportedUpsertTypes: UpsertType[] = [] + + /** + * Returns list of supported onDelete types by driver. + * https://docs.oracle.com/en/database/oracle/oracle-database/21/sqlrf/sql-language-reference.pdf + * Oracle does not support NO ACTION, but NO ACTION is set by default in EntityMetadata + */ + supportedOnDeleteTypes: OnDeleteType[] = [ + "CASCADE", + "SET NULL", + "NO ACTION", + ] + + /** + * Returns list of supported onUpdate types by driver. + * Oracle does not have onUpdate option, but we allow NO ACTION since it is set by default in EntityMetadata + */ + supportedOnUpdateTypes: OnUpdateType[] = ["NO ACTION"] + /** * Gets list of spatial column data types. */ @@ -225,6 +250,8 @@ export class OracleDriver implements Driver { enabled: false, // TODO: enable } + dummyTableName = "DUAL" + // ------------------------------------------------------------------------- // Constructor // ------------------------------------------------------------------------- diff --git a/src/driver/oracle/OracleQueryRunner.ts b/src/driver/oracle/OracleQueryRunner.ts index 12cc4f23b2..8cb4d3dd23 100644 --- a/src/driver/oracle/OracleQueryRunner.ts +++ b/src/driver/oracle/OracleQueryRunner.ts @@ -2242,17 +2242,25 @@ export class OracleQueryRunner extends BaseQueryRunner implements QueryRunner { const currentDatabase = await this.getCurrentDatabase() const currentSchema = await this.getCurrentSchema() - const viewNamesString = viewNames - .map((name) => "'" + name + "'") - .join(", ") + const viewsCondition = viewNames + .map((viewName) => this.driver.parseTableName(viewName)) + .map(({ schema, tableName }) => { + if (!schema) { + schema = this.driver.options.schema || currentSchema + } + + return `("T"."schema" = '${schema}' AND "T"."name" = '${tableName}')` + }) + .join(" OR ") + let query = `SELECT "T".* FROM ${this.escapePath( this.getTypeormMetadataTableName(), )} "T" ` + `INNER JOIN "USER_OBJECTS" "O" ON "O"."OBJECT_NAME" = "T"."name" AND "O"."OBJECT_TYPE" IN ( 'MATERIALIZED VIEW', 'VIEW' ) ` + - `WHERE "T"."type" IN ( '${MetadataTableType.MATERIALIZED_VIEW}', '${MetadataTableType.VIEW}' )` - if (viewNamesString.length > 0) - query += ` AND "T"."name" IN (${viewNamesString})` + `WHERE "T"."type" IN ('${MetadataTableType.MATERIALIZED_VIEW}', '${MetadataTableType.VIEW}')` + if (viewsCondition.length > 0) query += ` AND ${viewsCondition}` + const dbViews = await this.query(query) return dbViews.map((dbView: any) => { const parsedName = this.driver.parseTableName(dbView["name"]) @@ -2777,10 +2785,10 @@ export class OracleQueryRunner extends BaseQueryRunner implements QueryRunner { }" FOREIGN KEY (${columnNames}) REFERENCES ${this.escapePath( this.getTablePath(fk), )} (${referencedColumnNames})` - if (fk.onDelete && fk.onDelete !== "NO ACTION") + if (fk.onDelete && fk.onDelete !== "NO ACTION") { // Oracle does not support NO ACTION, but we set NO ACTION by default in EntityMetadata constraint += ` ON DELETE ${fk.onDelete}` - + } return constraint }) .join(", ") @@ -2848,9 +2856,11 @@ export class OracleQueryRunner extends BaseQueryRunner implements QueryRunner { const type = view.materialized ? MetadataTableType.MATERIALIZED_VIEW : MetadataTableType.VIEW + const { schema, tableName } = this.driver.parseTableName(view) return this.insertTypeormMetadataSql({ type: type, - name: view.name, + name: tableName, + schema: schema, value: expression, }) } @@ -3028,9 +3038,9 @@ export class OracleQueryRunner extends BaseQueryRunner implements QueryRunner { this.getTablePath(foreignKey), )} (${referencedColumnNames})` // Oracle does not support NO ACTION, but we set NO ACTION by default in EntityMetadata - if (foreignKey.onDelete && foreignKey.onDelete !== "NO ACTION") + if (foreignKey.onDelete && foreignKey.onDelete !== "NO ACTION") { sql += ` ON DELETE ${foreignKey.onDelete}` - + } return new Query(sql) } diff --git a/src/driver/postgres/PostgresConnectionOptions.ts b/src/driver/postgres/PostgresConnectionOptions.ts index 7e91a48c47..231fadfd25 100644 --- a/src/driver/postgres/PostgresConnectionOptions.ts +++ b/src/driver/postgres/PostgresConnectionOptions.ts @@ -83,4 +83,21 @@ export interface PostgresConnectionOptions * the service using this connection. Defaults to 'undefined' */ readonly applicationName?: string + + /** + * Return 64-bit integers (int8) as JavaScript integers. + * + * Because JavaScript doesn't have support for 64-bit integers node-postgres cannot confidently + * parse int8 data type results as numbers because if you have a huge number it will overflow + * and the result you'd get back from node-postgres would not be the result in the database. + * That would be a very bad thing so node-postgres just returns int8 results as strings and leaves the parsing up to you. + * + * Enabling parseInt8 will cause node-postgres to parse int8 results as numbers. + * Note: the maximum safe integer in js is: Number.MAX_SAFE_INTEGER (`+2^53`) + * + * @see [JavaScript Number objects](http://ecma262-5.com/ELS5_HTML.htm#Section_8.5) + * @see [node-postgres int8 explanation](https://github.com/brianc/node-pg-types#:~:text=on%20projects%3A%20return-,64%2Dbit%20integers,-(int8)%20as) + * @see [node-postgres defaults.parseInt8 implementation](https://github.com/brianc/node-postgres/blob/pg%408.8.0/packages/pg/lib/defaults.js#L80) + */ + readonly parseInt8?: boolean } diff --git a/src/driver/postgres/PostgresDriver.ts b/src/driver/postgres/PostgresDriver.ts index 1621f9383a..a66911e3bb 100644 --- a/src/driver/postgres/PostgresDriver.ts +++ b/src/driver/postgres/PostgresDriver.ts @@ -27,6 +27,7 @@ import { Table } from "../../schema-builder/table/Table" import { View } from "../../schema-builder/view/View" import { TableForeignKey } from "../../schema-builder/table/TableForeignKey" import { InstanceChecker } from "../../util/InstanceChecker" +import { UpsertType } from "../types/UpsertType" /** * Organizes communication with PostgreSQL DBMS. @@ -188,7 +189,7 @@ export class PostgresDriver implements Driver { /** * Returns type of upsert supported by driver if any */ - readonly supportedUpsertType = "on-conflict-do-update" + supportedUpsertTypes: UpsertType[] = ["on-conflict-do-update"] /** * Gets list of spatial column data types. @@ -485,7 +486,7 @@ export class PostgresDriver implements Driver { } catch (_) { logger.log( "warn", - "At least one of the entities has a cube column, but the 'ltree' extension cannot be installed automatically. Please install it manually using superuser rights", + "At least one of the entities has a ltree column, but the 'ltree' extension cannot be installed automatically. Please install it manually using superuser rights", ) } if (hasExclusionConstraints) @@ -1449,6 +1450,7 @@ export class PostgresDriver implements Driver { options: PostgresConnectionOptions, credentials: PostgresConnectionCredentialsOptions, ): Promise { + const { logger } = this.connection credentials = Object.assign({}, credentials) // build connection options for the driver @@ -1470,9 +1472,25 @@ export class PostgresDriver implements Driver { options.extra || {}, ) + if (options.parseInt8 !== undefined) { + if ( + this.postgres.defaults && + Object.getOwnPropertyDescriptor( + this.postgres.defaults, + "parseInt8", + )?.set + ) { + this.postgres.defaults.parseInt8 = options.parseInt8 + } else { + logger.log( + "warn", + "Attempted to set parseInt8 option, but the postgres driver does not support setting defaults.parseInt8. This option will be ignored.", + ) + } + } + // create a connection pool const pool = new this.postgres.Pool(connectionOptions) - const { logger } = this.connection const poolErrorHandler = options.poolErrorHandler || diff --git a/src/driver/postgres/PostgresQueryRunner.ts b/src/driver/postgres/PostgresQueryRunner.ts index c3443f3c53..3fa2d3ddb9 100644 --- a/src/driver/postgres/PostgresQueryRunner.ts +++ b/src/driver/postgres/PostgresQueryRunner.ts @@ -2538,7 +2538,7 @@ export class PostgresQueryRunner .filter((column) => columnNames.indexOf(column.name) !== -1) .forEach((column) => (column.isPrimary = true)) - const pkName = primaryColumns[0].primaryKeyConstraintName + const pkName = primaryColumns[0]?.primaryKeyConstraintName ? primaryColumns[0].primaryKeyConstraintName : this.connection.namingStrategy.primaryKeyName( clonedTable, @@ -2921,6 +2921,26 @@ export class PostgresQueryRunner table.addIndex(index) } + /** + * Create a new view index. + */ + async createViewIndex( + viewOrName: View | string, + index: TableIndex, + ): Promise { + const view = InstanceChecker.isView(viewOrName) + ? viewOrName + : await this.getCachedView(viewOrName) + + // new index may be passed without name. In this case we generate index name manually. + if (!index.name) index.name = this.generateIndexName(view, index) + + const up = this.createViewIndexSql(view, index) + const down = this.dropIndexSql(view, index) + await this.executeQueries(up, down) + view.addIndex(index) + } + /** * Creates a new indices */ @@ -2933,6 +2953,18 @@ export class PostgresQueryRunner } } + /** + * Creates new view indices + */ + async createViewIndices( + viewOrName: View | string, + indices: TableIndex[], + ): Promise { + for (const index of indices) { + await this.createViewIndex(viewOrName, index) + } + } + /** * Drops an index from the table. */ @@ -2959,6 +2991,32 @@ export class PostgresQueryRunner table.removeIndex(index) } + /** + * Drops an index from a view. + */ + async dropViewIndex( + viewOrName: View | string, + indexOrName: TableIndex | string, + ): Promise { + const view = InstanceChecker.isView(viewOrName) + ? viewOrName + : await this.getCachedView(viewOrName) + const index = InstanceChecker.isTableIndex(indexOrName) + ? indexOrName + : view.indices.find((i) => i.name === indexOrName) + if (!index) + throw new TypeORMError( + `Supplied index ${indexOrName} was not found in view ${view.name}`, + ) + // old index may be passed without name. In this case we generate index name manually. + if (!index.name) index.name = this.generateIndexName(view, index) + + const up = this.dropIndexSql(view, index) + const down = this.createViewIndexSql(view, index) + await this.executeQueries(up, down) + view.removeIndex(index) + } + /** * Drops an indices from the table. */ @@ -3087,6 +3145,34 @@ export class PostgresQueryRunner }) .join(" OR ") + const constraintsCondition = + viewNames.length === 0 + ? "1=1" + : viewNames + .map((tableName) => this.driver.parseTableName(tableName)) + .map(({ schema, tableName }) => { + if (!schema) { + schema = + this.driver.options.schema || currentSchema + } + + return `("ns"."nspname" = '${schema}' AND "t"."relname" = '${tableName}')` + }) + .join(" OR ") + + const indicesSql = + `SELECT "ns"."nspname" AS "table_schema", "t"."relname" AS "table_name", "i"."relname" AS "constraint_name", "a"."attname" AS "column_name", ` + + `CASE "ix"."indisunique" WHEN 't' THEN 'TRUE' ELSE'FALSE' END AS "is_unique", pg_get_expr("ix"."indpred", "ix"."indrelid") AS "condition", ` + + `"types"."typname" AS "type_name" ` + + `FROM "pg_class" "t" ` + + `INNER JOIN "pg_index" "ix" ON "ix"."indrelid" = "t"."oid" ` + + `INNER JOIN "pg_attribute" "a" ON "a"."attrelid" = "t"."oid" AND "a"."attnum" = ANY ("ix"."indkey") ` + + `INNER JOIN "pg_namespace" "ns" ON "ns"."oid" = "t"."relnamespace" ` + + `INNER JOIN "pg_class" "i" ON "i"."oid" = "ix"."indexrelid" ` + + `INNER JOIN "pg_type" "types" ON "types"."oid" = "a"."atttypid" ` + + `LEFT JOIN "pg_constraint" "cnst" ON "cnst"."conname" = "i"."relname" ` + + `WHERE "t"."relkind" IN ('m') AND "cnst"."contype" IS NULL AND (${constraintsCondition})` + const query = `SELECT "t".* FROM ${this.escapePath( this.getTypeormMetadataTableName(), @@ -3098,7 +3184,18 @@ export class PostgresQueryRunner }') ${viewsCondition ? `AND (${viewsCondition})` : ""}` const dbViews = await this.query(query) + const dbIndices: ObjectLiteral[] = await this.query(indicesSql) return dbViews.map((dbView: any) => { + // find index constraints of table, group them by constraint name and build TableIndex. + const tableIndexConstraints = OrmUtils.uniq( + dbIndices.filter((dbIndex) => { + return ( + dbIndex["table_name"] === dbView["name"] && + dbIndex["table_schema"] === dbView["schema"] + ) + }), + (dbIndex) => dbIndex["constraint_name"], + ) const view = new View() const schema = dbView["schema"] === currentSchema && @@ -3111,6 +3208,24 @@ export class PostgresQueryRunner view.expression = dbView["value"] view.materialized = dbView["type"] === MetadataTableType.MATERIALIZED_VIEW + view.indices = tableIndexConstraints.map((constraint) => { + const indices = dbIndices.filter((index) => { + return ( + index["table_schema"] === constraint["table_schema"] && + index["table_name"] === constraint["table_name"] && + index["constraint_name"] === + constraint["constraint_name"] + ) + }) + return new TableIndex({ + view: view, + name: constraint["constraint_name"], + columnNames: indices.map((i) => i["column_name"]), + isUnique: constraint["is_unique"] === "TRUE", + where: constraint["condition"], + isFulltext: false, + }) + }) return view }) } @@ -3422,48 +3537,22 @@ export class PostgresQueryRunner } } - if (tableColumn.type === "geometry") { - const geometryColumnSql = `SELECT * FROM ( - SELECT - "f_table_schema" "table_schema", - "f_table_name" "table_name", - "f_geometry_column" "column_name", - "srid", - "type" - FROM "geometry_columns" - ) AS _ - WHERE - "column_name" = '${dbColumn["column_name"]}' AND - "table_schema" = '${dbColumn["table_schema"]}' AND - "table_name" = '${dbColumn["table_name"]}'` - - const results: ObjectLiteral[] = - await this.query(geometryColumnSql) - - if (results.length > 0) { - tableColumn.spatialFeatureType = - results[0].type - tableColumn.srid = results[0].srid - } - } - - if (tableColumn.type === "geography") { - const geographyColumnSql = `SELECT * FROM ( - SELECT - "f_table_schema" "table_schema", - "f_table_name" "table_name", - "f_geography_column" "column_name", - "srid", - "type" - FROM "geography_columns" - ) AS _ - WHERE - "column_name" = '${dbColumn["column_name"]}' AND - "table_schema" = '${dbColumn["table_schema"]}' AND - "table_name" = '${dbColumn["table_name"]}'` + if ( + tableColumn.type === "geometry" || + tableColumn.type === "geography" + ) { + const sql = + `SELECT * FROM (` + + `SELECT "f_table_schema" "table_schema", "f_table_name" "table_name", ` + + `"f_${tableColumn.type}_column" "column_name", "srid", "type" ` + + `FROM "${tableColumn.type}_columns"` + + `) AS _ ` + + `WHERE "column_name" = '${dbColumn["column_name"]}' AND ` + + `"table_schema" = '${dbColumn["table_schema"]}' AND ` + + `"table_name" = '${dbColumn["table_name"]}'` const results: ObjectLiteral[] = - await this.query(geographyColumnSql) + await this.query(sql) if (results.length > 0) { tableColumn.spatialFeatureType = @@ -3628,7 +3717,7 @@ export class PostgresQueryRunner } else { tableColumn.default = dbColumn[ "column_default" - ].replace(/::[\w\s\.\[\]\"]+/g, "") + ].replace(/::[\w\s.\[\]\-"]+/g, "") tableColumn.default = tableColumn.default.replace( /^(-?\d+)$/, @@ -4163,11 +4252,27 @@ export class PostgresQueryRunner ) } + /** + * Builds create view index sql. + */ + protected createViewIndexSql(view: View, index: TableIndex): Query { + const columns = index.columnNames + .map((columnName) => `"${columnName}"`) + .join(", ") + return new Query( + `CREATE ${index.isUnique ? "UNIQUE " : ""}INDEX "${ + index.name + }" ON ${this.escapePath(view)} (${columns}) ${ + index.where ? "WHERE " + index.where : "" + }`, + ) + } + /** * Builds drop index sql. */ protected dropIndexSql( - table: Table, + table: Table | View, indexOrName: TableIndex | string, ): Query { let indexName = InstanceChecker.isTableIndex(indexOrName) diff --git a/src/driver/react-native/ReactNativeDriver.ts b/src/driver/react-native/ReactNativeDriver.ts index 40e53fadb5..549b6a8621 100644 --- a/src/driver/react-native/ReactNativeDriver.ts +++ b/src/driver/react-native/ReactNativeDriver.ts @@ -1,39 +1,289 @@ -import { AbstractSqliteDriver } from "../sqlite-abstract/AbstractSqliteDriver" -import { ReactNativeConnectionOptions } from "./ReactNativeConnectionOptions" -import { ReactNativeQueryRunner } from "./ReactNativeQueryRunner" -import { QueryRunner } from "../../query-runner/QueryRunner" +import { Driver } from "../Driver" +import { ObjectLiteral } from "../../common/ObjectLiteral" +import { ColumnMetadata } from "../../metadata/ColumnMetadata" +import { DateUtils } from "../../util/DateUtils" import { DataSource } from "../../data-source/DataSource" -import { DriverOptionNotSetError } from "../../error/DriverOptionNotSetError" -import { DriverPackageNotInstalledError } from "../../error/DriverPackageNotInstalledError" +import { RdbmsSchemaBuilder } from "../../schema-builder/RdbmsSchemaBuilder" +import { CteCapabilities } from "../types/CteCapabilities" +import { MappedColumnTypes } from "../types/MappedColumnTypes" +import { ColumnType } from "../types/ColumnTypes" +import { QueryRunner } from "../../query-runner/QueryRunner" +import { DataTypeDefaults } from "../types/DataTypeDefaults" +import { TableColumn } from "../../schema-builder/table/TableColumn" +import { EntityMetadata } from "../../metadata/EntityMetadata" +import { OrmUtils } from "../../util/OrmUtils" +import { ApplyValueTransformers } from "../../util/ApplyValueTransformers" import { ReplicationMode } from "../types/ReplicationMode" +import { DriverPackageNotInstalledError } from "../../error" +import { Table } from "../../schema-builder/table/Table" +import { View } from "../../schema-builder/view/View" +import { TableForeignKey } from "../../schema-builder/table/TableForeignKey" +import { InstanceChecker } from "../../util/InstanceChecker" +import { UpsertType } from "../types/UpsertType" +import { ReactNativeConnectionOptions } from "./ReactNativeConnectionOptions" +import { ReactNativeQueryRunner } from "./ReactNativeQueryRunner" + +type DatabasesMap = Record< + string, + { + attachFilepathAbsolute: string + attachFilepathRelative: string + attachHandle: string + } +> -export class ReactNativeDriver extends AbstractSqliteDriver { +/** + * Organizes communication with sqlite DBMS. + */ +export class ReactNativeDriver implements Driver { + // ------------------------------------------------------------------------- + // Public Properties + // ------------------------------------------------------------------------- + + /** + * Connection used by driver. + */ + connection: DataSource + + /** + * Sqlite has a single QueryRunner because it works on a single database connection. + */ + queryRunner?: QueryRunner + + /** + * Real database connection with sqlite database. + */ + databaseConnection: any + + // ------------------------------------------------------------------------- + // Public Implemented Properties + // ------------------------------------------------------------------------- + + /** + * Connection options. + */ options: ReactNativeConnectionOptions + /** + * Master database used to perform all write queries. + */ + database?: string + + /** + * Indicates if replication is enabled. + */ + isReplicated: boolean = false + + /** + * SQLite underlying library. + */ + sqlite: any + + /** + * Indicates if tree tables are supported by this driver. + */ + treeSupport = true + + /** + * Represent transaction support by this driver + */ + transactionSupport: "simple" | "nested" | "none" = "nested" + + /** + * Gets list of supported column data types by a driver. + * + * @see https://www.tutorialspoint.com/sqlite/sqlite_data_types.htm + * @see https://sqlite.org/datatype3.html + */ + supportedDataTypes: ColumnType[] = [ + "int", + "integer", + "tinyint", + "smallint", + "mediumint", + "bigint", + "unsigned big int", + "int2", + "int8", + "integer", + "character", + "varchar", + "varying character", + "nchar", + "native character", + "nvarchar", + "text", + "clob", + "text", + "blob", + "real", + "double", + "double precision", + "float", + "real", + "numeric", + "decimal", + "boolean", + "date", + "time", + "datetime", + ] + + /** + * Returns type of upsert supported by driver if any + */ + supportedUpsertTypes: UpsertType[] = ["on-conflict-do-update"] + + /** + * Gets list of column data types that support length by a driver. + */ + withLengthColumnTypes: ColumnType[] = [ + "character", + "varchar", + "varying character", + "nchar", + "native character", + "nvarchar", + "text", + "blob", + "clob", + ] + + /** + * Gets list of spatial column data types. + */ + spatialTypes: ColumnType[] = [] + + /** + * Gets list of column data types that support precision by a driver. + */ + withPrecisionColumnTypes: ColumnType[] = [ + "real", + "double", + "double precision", + "float", + "real", + "numeric", + "decimal", + "date", + "time", + "datetime", + ] + + /** + * Gets list of column data types that support scale by a driver. + */ + withScaleColumnTypes: ColumnType[] = [ + "real", + "double", + "double precision", + "float", + "real", + "numeric", + "decimal", + ] + + /** + * Orm has special columns and we need to know what database column types should be for those types. + * Column types are driver dependant. + */ + mappedDataTypes: MappedColumnTypes = { + createDate: "datetime", + createDateDefault: "datetime('now')", + updateDate: "datetime", + updateDateDefault: "datetime('now')", + deleteDate: "datetime", + deleteDateNullable: true, + version: "integer", + treeLevel: "integer", + migrationId: "integer", + migrationName: "varchar", + migrationTimestamp: "bigint", + cacheId: "int", + cacheIdentifier: "varchar", + cacheTime: "bigint", + cacheDuration: "int", + cacheQuery: "text", + cacheResult: "text", + metadataType: "varchar", + metadataDatabase: "varchar", + metadataSchema: "varchar", + metadataTable: "varchar", + metadataName: "varchar", + metadataValue: "text", + } + + /** + * Default values of length, precision and scale depends on column data type. + * Used in the cases when length/precision/scale is not specified by user. + */ + dataTypeDefaults: DataTypeDefaults + + /** + * No documentation specifying a maximum length for identifiers could be found + * for SQLite. + */ + maxAliasLength?: number + + cteCapabilities: CteCapabilities = { + enabled: true, + requiresRecursiveHint: true, + } + + // ------------------------------------------------------------------------- + // Protected Properties + // ------------------------------------------------------------------------- + + /** + * Any attached databases (excepting default 'main') + */ + attachedDatabases: DatabasesMap = {} + // ------------------------------------------------------------------------- // Constructor // ------------------------------------------------------------------------- constructor(connection: DataSource) { - super(connection) - + this.connection = connection + this.options = connection.options as ReactNativeConnectionOptions + // this.database = DriverUtils.buildDriverOptions(this.options).database this.database = this.options.database - // validate options to make sure everything is set - if (!this.options.database) - throw new DriverOptionNotSetError("database") + this.loadDependencies() + } - if (!this.options.location) - throw new DriverOptionNotSetError("location") + // ------------------------------------------------------------------------- + // Public Abstract + // ------------------------------------------------------------------------- - // load sqlite package - this.loadDependencies() + /** + * Creates a query runner used to execute database queries. + */ + createQueryRunner(mode: ReplicationMode): QueryRunner { + if (!this.queryRunner) + this.queryRunner = new ReactNativeQueryRunner(this) + + return this.queryRunner } // ------------------------------------------------------------------------- // Public Methods // ------------------------------------------------------------------------- + /** + * Performs connection to the database. + */ + async connect(): Promise { + this.databaseConnection = await this.createDatabaseConnection() + } + + /** + * Makes any action after connection (e.g. create extensions in Postgres driver). + */ + afterConnect(): Promise { + return Promise.resolve() + } + /** * Closes connection with database. */ @@ -44,14 +294,614 @@ export class ReactNativeDriver extends AbstractSqliteDriver { }) } + hasAttachedDatabases(): boolean { + return !!Object.keys(this.attachedDatabases).length + } + + getAttachedDatabaseHandleByRelativePath(path: string): string | undefined { + return this.attachedDatabases?.[path]?.attachHandle + } + + getAttachedDatabasePathRelativeByHandle( + handle: string, + ): string | undefined { + return Object.values(this.attachedDatabases).find( + ({ attachHandle }) => handle === attachHandle, + )?.attachFilepathRelative + } + /** - * Creates a query runner used to execute database queries. + * Creates a schema builder used to build and sync a schema. */ - createQueryRunner(mode: ReplicationMode): QueryRunner { - if (!this.queryRunner) - this.queryRunner = new ReactNativeQueryRunner(this) + createSchemaBuilder() { + return new RdbmsSchemaBuilder(this.connection) + } - return this.queryRunner + /** + * Prepares given value to a value to be persisted, based on its column type and metadata. + */ + preparePersistentValue(value: any, columnMetadata: ColumnMetadata): any { + if (columnMetadata.transformer) + value = ApplyValueTransformers.transformTo( + columnMetadata.transformer, + value, + ) + + if (value === null || value === undefined) return value + + if ( + columnMetadata.type === Boolean || + columnMetadata.type === "boolean" + ) { + return value === true ? 1 : 0 + } else if (columnMetadata.type === "date") { + return DateUtils.mixedDateToDateString(value) + } else if (columnMetadata.type === "time") { + return DateUtils.mixedDateToTimeString(value) + } else if ( + columnMetadata.type === "datetime" || + columnMetadata.type === Date + ) { + // to string conversation needs because SQLite stores date as integer number, when date came as Object + // TODO: think about `toUTC` conversion + return DateUtils.mixedDateToUtcDatetimeString(value) + } else if (columnMetadata.type === "simple-array") { + return DateUtils.simpleArrayToString(value) + } else if (columnMetadata.type === "simple-json") { + return DateUtils.simpleJsonToString(value) + } else if (columnMetadata.type === "simple-enum") { + return DateUtils.simpleEnumToString(value) + } + + return value + } + + /** + * Prepares given value to a value to be hydrated, based on its column type or metadata. + */ + prepareHydratedValue(value: any, columnMetadata: ColumnMetadata): any { + if (value === null || value === undefined) + return columnMetadata.transformer + ? ApplyValueTransformers.transformFrom( + columnMetadata.transformer, + value, + ) + : value + + if ( + columnMetadata.type === Boolean || + columnMetadata.type === "boolean" + ) { + value = value ? true : false + } else if ( + columnMetadata.type === "datetime" || + columnMetadata.type === Date + ) { + /** + * Fix date conversion issue + * + * If the format of the date string is "2018-03-14 02:33:33.906", Safari (and iOS WKWebView) will convert it to an invalid date object. + * We need to modify the date string to "2018-03-14T02:33:33.906Z" and Safari will convert it correctly. + * + * ISO 8601 + * https://www.w3.org/TR/NOTE-datetime + */ + if (value && typeof value === "string") { + // There are various valid time string formats a sqlite time string might have: + // https://www.sqlite.org/lang_datefunc.html + // There are two separate fixes we may need to do: + // 1) Add 'T' separator if space is used instead + // 2) Add 'Z' UTC suffix if no timezone or offset specified + + if (/^\d\d\d\d-\d\d-\d\d \d\d:\d\d/.test(value)) { + value = value.replace(" ", "T") + } + if ( + /^\d\d\d\d-\d\d-\d\dT\d\d:\d\d(:\d\d(\.\d\d\d)?)?$/.test( + value, + ) + ) { + value += "Z" + } + } + + value = DateUtils.normalizeHydratedDate(value) + } else if (columnMetadata.type === "date") { + value = DateUtils.mixedDateToDateString(value) + } else if (columnMetadata.type === "time") { + value = DateUtils.mixedTimeToString(value) + } else if (columnMetadata.type === "simple-array") { + value = DateUtils.stringToSimpleArray(value) + } else if (columnMetadata.type === "simple-json") { + value = DateUtils.stringToSimpleJson(value) + } else if (columnMetadata.type === "simple-enum") { + value = DateUtils.stringToSimpleEnum(value, columnMetadata) + } else if (columnMetadata.type === Number) { + // convert to number if number + value = !isNaN(+value) ? parseInt(value) : value + } + + if (columnMetadata.transformer) + value = ApplyValueTransformers.transformFrom( + columnMetadata.transformer, + value, + ) + + return value + } + + /** + * Replaces parameters in the given sql with special escaping character + * and an array of parameter names to be passed to a query. + */ + escapeQueryWithParameters( + sql: string, + parameters: ObjectLiteral, + nativeParameters: ObjectLiteral, + ): [string, any[]] { + const escapedParameters: any[] = Object.keys(nativeParameters).map( + (key) => { + // Mapping boolean values to their numeric representation + if (typeof nativeParameters[key] === "boolean") { + return nativeParameters[key] === true ? 1 : 0 + } + + if (nativeParameters[key] instanceof Date) { + return DateUtils.mixedDateToUtcDatetimeString( + nativeParameters[key], + ) + } + + return nativeParameters[key] + }, + ) + + if (!parameters || !Object.keys(parameters).length) + return [sql, escapedParameters] + + sql = sql.replace( + /:(\.\.\.)?([A-Za-z0-9_.]+)/g, + (full, isArray: string, key: string): string => { + if (!parameters.hasOwnProperty(key)) { + return full + } + + let value: any = parameters[key] + + if (isArray) { + return value + .map((v: any) => { + escapedParameters.push(v) + return this.createParameter( + key, + escapedParameters.length - 1, + ) + }) + .join(", ") + } + + if (typeof value === "function") { + return value() + } else if (typeof value === "number") { + return String(value) + } + + // Sqlite does not have a boolean data type so we have to transform + // it to 1 or 0 + if (typeof value === "boolean") { + escapedParameters.push(+value) + return this.createParameter( + key, + escapedParameters.length - 1, + ) + } + + if (value instanceof Date) { + escapedParameters.push( + DateUtils.mixedDateToUtcDatetimeString(value), + ) + return this.createParameter( + key, + escapedParameters.length - 1, + ) + } + + escapedParameters.push(value) + return this.createParameter(key, escapedParameters.length - 1) + }, + ) // todo: make replace only in value statements, otherwise problems + return [sql, escapedParameters] + } + + /** + * Escapes a column name. + */ + escape(columnName: string): string { + return '"' + columnName + '"' + } + + /** + * Build full table name with database name, schema name and table name. + * E.g. myDB.mySchema.myTable + * + * Returns only simple table name because all inherited drivers does not supports schema and database. + */ + buildTableName( + tableName: string, + schema?: string, + database?: string, + ): string { + return tableName + } + + /** + * Parse a target table name or other types and return a normalized table definition. + */ + parseTableName( + target: EntityMetadata | Table | View | TableForeignKey | string, + ): { database?: string; schema?: string; tableName: string } { + const driverDatabase = this.database + const driverSchema = undefined + + if (InstanceChecker.isTable(target) || InstanceChecker.isView(target)) { + const parsed = this.parseTableName( + target.schema + ? `"${target.schema}"."${target.name}"` + : target.name, + ) + + return { + database: target.database || parsed.database || driverDatabase, + schema: target.schema || parsed.schema || driverSchema, + tableName: parsed.tableName, + } + } + + if (InstanceChecker.isTableForeignKey(target)) { + const parsed = this.parseTableName(target.referencedTableName) + + return { + database: + target.referencedDatabase || + parsed.database || + driverDatabase, + schema: + target.referencedSchema || parsed.schema || driverSchema, + tableName: parsed.tableName, + } + } + + if (InstanceChecker.isEntityMetadata(target)) { + // EntityMetadata tableName is never a path + + return { + database: target.database || driverDatabase, + schema: target.schema || driverSchema, + tableName: target.tableName, + } + } + + const parts = target.split(".") + + if (parts.length === 3) { + return { + database: parts[0] || driverDatabase, + schema: parts[1] || driverSchema, + tableName: parts[2], + } + } else if (parts.length === 2) { + const database = + this.getAttachedDatabasePathRelativeByHandle(parts[0]) ?? + driverDatabase + return { + database: database, + schema: parts[0], + tableName: parts[1], + } + } else { + return { + database: driverDatabase, + schema: driverSchema, + tableName: target, + } + } + } + + /** + * Creates a database type from a given column metadata. + */ + normalizeType(column: { + type?: ColumnType + length?: number | string + precision?: number | null + scale?: number + }): string { + if (column.type === Number || column.type === "int") { + return "integer" + } else if (column.type === String) { + return "varchar" + } else if (column.type === Date) { + return "datetime" + } else if (column.type === Boolean) { + return "boolean" + } else if (column.type === "uuid") { + return "varchar" + } else if (column.type === "simple-array") { + return "text" + } else if (column.type === "simple-json") { + return "text" + } else if (column.type === "simple-enum") { + return "varchar" + } else { + return (column.type as string) || "" + } + } + + /** + * Normalizes "default" value of the column. + */ + normalizeDefault(columnMetadata: ColumnMetadata): string | undefined { + const defaultValue = columnMetadata.default + + if (typeof defaultValue === "number") { + return "" + defaultValue + } + + if (typeof defaultValue === "boolean") { + return defaultValue ? "1" : "0" + } + + if (typeof defaultValue === "function") { + return defaultValue() + } + + if (typeof defaultValue === "string") { + return `'${defaultValue}'` + } + + if (defaultValue === null || defaultValue === undefined) { + return undefined + } + + return `${defaultValue}` + } + + /** + * Normalizes "isUnique" value of the column. + */ + normalizeIsUnique(column: ColumnMetadata): boolean { + return column.entityMetadata.uniques.some( + (uq) => uq.columns.length === 1 && uq.columns[0] === column, + ) + } + + /** + * Calculates column length taking into account the default length values. + */ + getColumnLength(column: ColumnMetadata): string { + return column.length ? column.length.toString() : "" + } + + /** + * Normalizes "default" value of the column. + */ + createFullType(column: TableColumn): string { + let type = column.type + if (column.enum) { + return "varchar" + } + if (column.length) { + type += "(" + column.length + ")" + } else if ( + column.precision !== null && + column.precision !== undefined && + column.scale !== null && + column.scale !== undefined + ) { + type += "(" + column.precision + "," + column.scale + ")" + } else if ( + column.precision !== null && + column.precision !== undefined + ) { + type += "(" + column.precision + ")" + } + + if (column.isArray) type += " array" + + return type + } + + /** + * Obtains a new database connection to a master server. + * Used for replication. + * If replication is not setup then returns default connection's database connection. + */ + obtainMasterConnection(): Promise { + return Promise.resolve() + } + + /** + * Obtains a new database connection to a slave server. + * Used for replication. + * If replication is not setup then returns master (default) connection's database connection. + */ + obtainSlaveConnection(): Promise { + return Promise.resolve() + } + + /** + * Creates generated map of values generated or returned by database after INSERT query. + */ + createGeneratedMap( + metadata: EntityMetadata, + insertResult: any, + entityIndex: number, + entityNum: number, + ) { + const generatedMap = metadata.generatedColumns.reduce( + (map, generatedColumn) => { + let value: any + if ( + generatedColumn.generationStrategy === "increment" && + insertResult + ) { + // NOTE: When INSERT statement is successfully completed, the last inserted row ID is returned. + // see also: SqliteQueryRunner.query() + value = insertResult - entityNum + entityIndex + 1 + // } else if (generatedColumn.generationStrategy === "uuid") { + // value = insertValue[generatedColumn.databaseName]; + } + + if (!value) return map + return OrmUtils.mergeDeep( + map, + generatedColumn.createValueMap(value), + ) + }, + {} as ObjectLiteral, + ) + + return Object.keys(generatedMap).length > 0 ? generatedMap : undefined + } + + /** + * Differentiate columns of this table and columns from the given column metadatas columns + * and returns only changed. + */ + findChangedColumns( + tableColumns: TableColumn[], + columnMetadatas: ColumnMetadata[], + ): ColumnMetadata[] { + return columnMetadatas.filter((columnMetadata) => { + const tableColumn = tableColumns.find( + (c) => c.name === columnMetadata.databaseName, + ) + if (!tableColumn) return false // we don't need new columns, we only need exist and changed + + const isColumnChanged = + tableColumn.name !== columnMetadata.databaseName || + tableColumn.type !== this.normalizeType(columnMetadata) || + tableColumn.length !== columnMetadata.length || + tableColumn.precision !== columnMetadata.precision || + tableColumn.scale !== columnMetadata.scale || + this.normalizeDefault(columnMetadata) !== tableColumn.default || + tableColumn.isPrimary !== columnMetadata.isPrimary || + tableColumn.isNullable !== columnMetadata.isNullable || + tableColumn.generatedType !== columnMetadata.generatedType || + tableColumn.asExpression !== columnMetadata.asExpression || + tableColumn.isUnique !== + this.normalizeIsUnique(columnMetadata) || + (tableColumn.enum && + columnMetadata.enum && + !OrmUtils.isArraysEqual( + tableColumn.enum, + columnMetadata.enum.map((val) => val + ""), + )) || + (columnMetadata.generationStrategy !== "uuid" && + tableColumn.isGenerated !== columnMetadata.isGenerated) + + // DEBUG SECTION + // if (isColumnChanged) { + // console.log("table:", columnMetadata.entityMetadata.tableName) + // console.log( + // "name:", + // tableColumn.name, + // columnMetadata.databaseName, + // ) + // console.log( + // "type:", + // tableColumn.type, + // this.normalizeType(columnMetadata), + // ) + // console.log( + // "length:", + // tableColumn.length, + // columnMetadata.length, + // ) + // console.log( + // "precision:", + // tableColumn.precision, + // columnMetadata.precision, + // ) + // console.log("scale:", tableColumn.scale, columnMetadata.scale) + // console.log( + // "default:", + // this.normalizeDefault(columnMetadata), + // columnMetadata.default, + // ) + // console.log( + // "isPrimary:", + // tableColumn.isPrimary, + // columnMetadata.isPrimary, + // ) + // console.log( + // "isNullable:", + // tableColumn.isNullable, + // columnMetadata.isNullable, + // ) + // console.log( + // "generatedType:", + // tableColumn.generatedType, + // columnMetadata.generatedType, + // ) + // console.log( + // "asExpression:", + // tableColumn.asExpression, + // columnMetadata.asExpression, + // ) + // console.log( + // "isUnique:", + // tableColumn.isUnique, + // this.normalizeIsUnique(columnMetadata), + // ) + // console.log( + // "enum:", + // tableColumn.enum && + // columnMetadata.enum && + // !OrmUtils.isArraysEqual( + // tableColumn.enum, + // columnMetadata.enum.map((val) => val + ""), + // ), + // ) + // console.log( + // "isGenerated:", + // tableColumn.isGenerated, + // columnMetadata.isGenerated, + // ) + // } + + return isColumnChanged + }) + } + + /** + * Returns true if driver supports RETURNING / OUTPUT statement. + */ + isReturningSqlSupported(): boolean { + return false + } + + /** + * Returns true if driver supports uuid values generation on its own. + */ + isUUIDGenerationSupported(): boolean { + return false + } + + /** + * Returns true if driver supports fulltext indices. + */ + isFullTextColumnTypeSupported(): boolean { + return false + } + + /** + * Creates an escaped parameter. + */ + createParameter(parameterName: string, index: number): string { + // return "$" + (index + 1); + return "?" + // return "$" + parameterName; } // ------------------------------------------------------------------------- diff --git a/src/driver/react-native/ReactNativeQueryRunner.ts b/src/driver/react-native/ReactNativeQueryRunner.ts index 8aa8b05343..75defeadfe 100644 --- a/src/driver/react-native/ReactNativeQueryRunner.ts +++ b/src/driver/react-native/ReactNativeQueryRunner.ts @@ -13,6 +13,7 @@ export class ReactNativeQueryRunner extends AbstractSqliteQueryRunner { /** * Database driver used by connection. */ + // @ts-ignore temporary, we need to fix the issue with the AbstractSqliteDriver and circular errors driver: ReactNativeDriver // ------------------------------------------------------------------------- @@ -76,11 +77,6 @@ export class ReactNativeQueryRunner extends AbstractSqliteQueryRunner { const result = new QueryResult() - // return id of inserted row, if query was insert statement. - if (query.substr(0, 11) === "INSERT INTO") { - result.raw = raw.insertId - } - if (raw?.hasOwnProperty("rowsAffected")) { result.affected = raw.rowsAffected } @@ -95,6 +91,11 @@ export class ReactNativeQueryRunner extends AbstractSqliteQueryRunner { result.records = records } + // return id of inserted row, if query was insert statement. + if (query.substr(0, 11) === "INSERT INTO") { + result.raw = raw.insertId + } + if (useStructuredResult) { ok(result) } else { diff --git a/src/driver/sap/SapDriver.ts b/src/driver/sap/SapDriver.ts index 03a796c6ed..365ec471bf 100644 --- a/src/driver/sap/SapDriver.ts +++ b/src/driver/sap/SapDriver.ts @@ -25,6 +25,7 @@ import { ReplicationMode } from "../types/ReplicationMode" import { DriverUtils } from "../DriverUtils" import { View } from "../../schema-builder/view/View" import { InstanceChecker } from "../../util/InstanceChecker" +import { UpsertType } from "../types/UpsertType" /** * Organizes communication with SAP Hana DBMS. @@ -129,6 +130,11 @@ export class SapDriver implements Driver { "st_point", ] + /** + * Returns type of upsert supported by driver if any + */ + supportedUpsertTypes: UpsertType[] = [] + /** * Gets list of spatial column data types. */ @@ -209,6 +215,8 @@ export class SapDriver implements Driver { enabled: true, } + dummyTableName = `SYS.DUMMY` + // ------------------------------------------------------------------------- // Constructor // ------------------------------------------------------------------------- diff --git a/src/driver/spanner/SpannerDriver.ts b/src/driver/spanner/SpannerDriver.ts index 5bd635a52f..025812c47b 100644 --- a/src/driver/spanner/SpannerDriver.ts +++ b/src/driver/spanner/SpannerDriver.ts @@ -20,6 +20,7 @@ import { Table } from "../../schema-builder/table/Table" import { View } from "../../schema-builder/view/View" import { TableForeignKey } from "../../schema-builder/table/TableForeignKey" import { CteCapabilities } from "../types/CteCapabilities" +import { UpsertType } from "../types/UpsertType" /** * Organizes communication with Spanner DBMS. @@ -99,7 +100,7 @@ export class SpannerDriver implements Driver { /** * Returns type of upsert supported by driver if any */ - readonly supportedUpsertType = undefined + supportedUpsertTypes: UpsertType[] = [] /** * Gets list of spatial column data types. diff --git a/src/driver/sqlite-abstract/AbstractSqliteDriver.ts b/src/driver/sqlite-abstract/AbstractSqliteDriver.ts index 38b10befac..d56be345fd 100644 --- a/src/driver/sqlite-abstract/AbstractSqliteDriver.ts +++ b/src/driver/sqlite-abstract/AbstractSqliteDriver.ts @@ -21,6 +21,7 @@ import { Table } from "../../schema-builder/table/Table" import { View } from "../../schema-builder/view/View" import { TableForeignKey } from "../../schema-builder/table/TableForeignKey" import { InstanceChecker } from "../../util/InstanceChecker" +import { UpsertType } from "../types/UpsertType" type DatabasesMap = Record< string, @@ -126,12 +127,13 @@ export abstract class AbstractSqliteDriver implements Driver { "date", "time", "datetime", + "json", ] /** * Returns type of upsert supported by driver if any */ - readonly supportedUpsertType = "on-conflict-do-update" + supportedUpsertTypes: UpsertType[] = ["on-conflict-do-update"] /** * Gets list of column data types that support length by a driver. @@ -339,10 +341,13 @@ export abstract class AbstractSqliteDriver implements Driver { // to string conversation needs because SQLite stores date as integer number, when date came as Object // TODO: think about `toUTC` conversion return DateUtils.mixedDateToUtcDatetimeString(value) + } else if ( + columnMetadata.type === "json" || + columnMetadata.type === "simple-json" + ) { + return DateUtils.simpleJsonToString(value) } else if (columnMetadata.type === "simple-array") { return DateUtils.simpleArrayToString(value) - } else if (columnMetadata.type === "simple-json") { - return DateUtils.simpleJsonToString(value) } else if (columnMetadata.type === "simple-enum") { return DateUtils.simpleEnumToString(value) } @@ -404,10 +409,13 @@ export abstract class AbstractSqliteDriver implements Driver { value = DateUtils.mixedDateToDateString(value) } else if (columnMetadata.type === "time") { value = DateUtils.mixedTimeToString(value) + } else if ( + columnMetadata.type === "json" || + columnMetadata.type === "simple-json" + ) { + value = DateUtils.stringToSimpleJson(value) } else if (columnMetadata.type === "simple-array") { value = DateUtils.stringToSimpleArray(value) - } else if (columnMetadata.type === "simple-json") { - value = DateUtils.stringToSimpleJson(value) } else if (columnMetadata.type === "simple-enum") { value = DateUtils.stringToSimpleEnum(value, columnMetadata) } else if (columnMetadata.type === Number) { @@ -785,6 +793,12 @@ export abstract class AbstractSqliteDriver implements Driver { tableColumn.asExpression !== columnMetadata.asExpression || tableColumn.isUnique !== this.normalizeIsUnique(columnMetadata) || + (tableColumn.enum && + columnMetadata.enum && + !OrmUtils.isArraysEqual( + tableColumn.enum, + columnMetadata.enum.map((val) => val + ""), + )) || (columnMetadata.generationStrategy !== "uuid" && tableColumn.isGenerated !== columnMetadata.isGenerated) @@ -843,6 +857,15 @@ export abstract class AbstractSqliteDriver implements Driver { // this.normalizeIsUnique(columnMetadata), // ) // console.log( + // "enum:", + // tableColumn.enum && + // columnMetadata.enum && + // !OrmUtils.isArraysEqual( + // tableColumn.enum, + // columnMetadata.enum.map((val) => val + ""), + // ), + // ) + // console.log( // "isGenerated:", // tableColumn.isGenerated, // columnMetadata.isGenerated, diff --git a/src/driver/sqlite-abstract/AbstractSqliteQueryRunner.ts b/src/driver/sqlite-abstract/AbstractSqliteQueryRunner.ts index d5921d6fa3..5e155ccbc4 100644 --- a/src/driver/sqlite-abstract/AbstractSqliteQueryRunner.ts +++ b/src/driver/sqlite-abstract/AbstractSqliteQueryRunner.ts @@ -1257,7 +1257,7 @@ export abstract class AbstractSqliteQueryRunner database = this.driver.getAttachedDatabasePathRelativeByHandle(schema) } - const res = await this.query( + return this.query( `SELECT ${database ? `'${database}'` : null} as database, ${ schema ? `'${schema}'` : null } as schema, * FROM ${ @@ -1268,12 +1268,11 @@ export abstract class AbstractSqliteQueryRunner tableOrIndex === "table" ? "name" : "tbl_name" }" IN ('${tableName}')`, ) - return res } + protected async loadPragmaRecords(tablePath: string, pragma: string) { const [, tableName] = this.splitTablePath(tablePath) - const res = await this.query(`PRAGMA ${pragma}("${tableName}")`) - return res + return this.query(`PRAGMA ${pragma}("${tableName}")`) } /** @@ -1299,22 +1298,39 @@ export abstract class AbstractSqliteQueryRunner `SELECT * FROM "sqlite_master" WHERE "type" = 'index' AND "tbl_name" IN (${tableNamesString})`, ) } else { - dbTables = ( - await Promise.all( - tableNames.map((tableName) => - this.loadTableRecords(tableName, "table"), + const tableNamesWithoutDot = tableNames + .filter((tableName) => { + return tableName.split(".").length === 1 + }) + .map((tableName) => `'${tableName}'`) + + const tableNamesWithDot = tableNames.filter((tableName) => { + return tableName.split(".").length > 1 + }) + + const queryPromises = (type: "table" | "index") => { + const promises = [ + ...tableNamesWithDot.map((tableName) => + this.loadTableRecords(tableName, type), ), - ) - ) + ] + + if (tableNamesWithoutDot.length) { + promises.push( + this.query( + `SELECT * FROM "sqlite_master" WHERE "type" = '${type}' AND "${ + type === "table" ? "name" : "tbl_name" + }" IN (${tableNamesWithoutDot})`, + ), + ) + } + + return promises + } + dbTables = (await Promise.all(queryPromises("table"))) .reduce((acc, res) => [...acc, ...res], []) .filter(Boolean) - dbIndicesDef = ( - await Promise.all( - (tableNames ?? []).map((tableName) => - this.loadTableRecords(tableName, "index"), - ), - ) - ) + dbIndicesDef = (await Promise.all(queryPromises("index"))) .reduce((acc, res) => [...acc, ...res], []) .filter(Boolean) } @@ -1554,7 +1570,7 @@ export abstract class AbstractSqliteQueryRunner ) return new TableForeignKey({ - name: fkMapping!.name, + name: fkMapping?.name, columnNames: columnNames, referencedTableName: foreignKey["table"], referencedColumnNames: referencedColumnNames, diff --git a/src/driver/sqlite/SqliteConnectionOptions.ts b/src/driver/sqlite/SqliteConnectionOptions.ts index 839a3a1d07..db7554d0ab 100644 --- a/src/driver/sqlite/SqliteConnectionOptions.ts +++ b/src/driver/sqlite/SqliteConnectionOptions.ts @@ -45,5 +45,20 @@ export interface SqliteConnectionOptions extends BaseDataSourceOptions { */ readonly enableWAL?: boolean + /** + * Specifies the open file flags. By default its undefined. + * @see https://www.sqlite.org/c3ref/c_open_autoproxy.html + * @see https://github.com/TryGhost/node-sqlite3/blob/master/test/open_close.test.js + */ + readonly flags?: number + readonly poolSize?: never + + /** + * Query or change the setting of the busy timeout. + * Time in milliseconds. + * + * @see https://www.sqlite.org/pragma.html#pragma_busy_timeout + */ + readonly busyTimeout?: number } diff --git a/src/driver/sqlite/SqliteDriver.ts b/src/driver/sqlite/SqliteDriver.ts index 09b03ea7f5..91adfe8444 100644 --- a/src/driver/sqlite/SqliteDriver.ts +++ b/src/driver/sqlite/SqliteDriver.ts @@ -2,7 +2,6 @@ import mkdirp from "mkdirp" import path from "path" import { DriverPackageNotInstalledError } from "../../error/DriverPackageNotInstalledError" import { SqliteQueryRunner } from "./SqliteQueryRunner" -import { DriverOptionNotSetError } from "../../error/DriverOptionNotSetError" import { PlatformTools } from "../../platform/PlatformTools" import { DataSource } from "../../data-source/DataSource" import { SqliteConnectionOptions } from "./SqliteConnectionOptions" @@ -41,10 +40,6 @@ export class SqliteDriver extends AbstractSqliteDriver { this.options = connection.options as SqliteConnectionOptions this.database = this.options.database - // validate options to make sure everything is set - if (!this.options.database) - throw new DriverOptionNotSetError("database") - // load sqlite package this.loadDependencies() } @@ -131,16 +126,32 @@ export class SqliteDriver extends AbstractSqliteDriver { * Creates connection with the database. */ protected async createDatabaseConnection() { - await this.createDatabaseDirectory(this.options.database) + if ( + this.options.flags === undefined || + !(this.options.flags & this.sqlite.OPEN_URI) + ) { + await this.createDatabaseDirectory(this.options.database) + } const databaseConnection: any = await new Promise((ok, fail) => { - const connection = new this.sqlite.Database( - this.options.database, - (err: any) => { - if (err) return fail(err) - ok(connection) - }, - ) + if (this.options.flags === undefined) { + const connection = new this.sqlite.Database( + this.options.database, + (err: any) => { + if (err) return fail(err) + ok(connection) + }, + ) + } else { + const connection = new this.sqlite.Database( + this.options.database, + this.options.flags, + (err: any) => { + if (err) return fail(err) + ok(connection) + }, + ) + } }) // Internal function to run a command on the connection and fail if an error occured. @@ -162,6 +173,14 @@ export class SqliteDriver extends AbstractSqliteDriver { await run(`PRAGMA journal_mode = WAL`) } + if ( + this.options.busyTimeout && + typeof this.options.busyTimeout === "number" && + this.options.busyTimeout > 0 + ) { + await run(`PRAGMA busy_timeout = ${this.options.busyTimeout}`) + } + // we need to enable foreign keys in sqlite to make sure all foreign key related features // working properly. this also makes onDelete to work with sqlite. await run(`PRAGMA foreign_keys = ON`) diff --git a/src/driver/sqlserver/SqlServerConnectionOptions.ts b/src/driver/sqlserver/SqlServerConnectionOptions.ts index 6a68bf71ae..7ae231b639 100644 --- a/src/driver/sqlserver/SqlServerConnectionOptions.ts +++ b/src/driver/sqlserver/SqlServerConnectionOptions.ts @@ -119,6 +119,11 @@ export interface SqlServerConnectionOptions * Extra options */ readonly options?: { + /** + * The named instance to connect to + */ + readonly instanceName?: string + /** * By default, if the database requestion by options.database cannot be accessed, the connection will fail with * an error. However, if options.fallbackToDefaultDb is set to true, then the user's default database will @@ -278,6 +283,12 @@ export interface SqlServerConnectionOptions * (default: node-mssql) */ readonly appName?: string + + /** + * A boolean, controlling whether encryption occurs if there is no verifiable server certificate. + * (default: false) + */ + readonly trustServerCertificate?: boolean } /** diff --git a/src/driver/sqlserver/SqlServerDriver.ts b/src/driver/sqlserver/SqlServerDriver.ts index e44c6451ea..9f0fba09d9 100644 --- a/src/driver/sqlserver/SqlServerDriver.ts +++ b/src/driver/sqlserver/SqlServerDriver.ts @@ -26,6 +26,7 @@ import { View } from "../../schema-builder/view/View" import { TableForeignKey } from "../../schema-builder/table/TableForeignKey" import { TypeORMError } from "../../error" import { InstanceChecker } from "../../util/InstanceChecker" +import { UpsertType } from "../types/UpsertType" /** * Organizes communication with SQL Server DBMS. @@ -142,6 +143,11 @@ export class SqlServerDriver implements Driver { "rowversion", ] + /** + * Returns type of upsert supported by driver if any + */ + supportedUpsertTypes: UpsertType[] = [] + /** * Gets list of spatial column data types. */ @@ -789,7 +795,14 @@ export class SqlServerDriver implements Driver { tableColumn.isNullable !== columnMetadata.isNullable || tableColumn.asExpression !== columnMetadata.asExpression || tableColumn.generatedType !== columnMetadata.generatedType || - tableColumn.isUnique !== this.normalizeIsUnique(columnMetadata) + tableColumn.isUnique !== + this.normalizeIsUnique(columnMetadata) || + (tableColumn.enum && + columnMetadata.enum && + !OrmUtils.isArraysEqual( + tableColumn.enum, + columnMetadata.enum.map((val) => val + ""), + )) // DEBUG SECTION // if (isColumnChanged) { @@ -1029,7 +1042,10 @@ export class SqlServerDriver implements Driver { // of data type precedence to the expressions specified in the formula. if (columnMetadata.asExpression) return false - return tableColumn.length !== this.getColumnLength(columnMetadata) + return ( + tableColumn.length.toUpperCase() !== + this.getColumnLength(columnMetadata).toUpperCase() + ) } protected lowerDefaultValueIfNecessary(value: string | undefined) { diff --git a/src/driver/sqlserver/SqlServerQueryRunner.ts b/src/driver/sqlserver/SqlServerQueryRunner.ts index 2779a1dd17..c320b184b4 100644 --- a/src/driver/sqlserver/SqlServerQueryRunner.ts +++ b/src/driver/sqlserver/SqlServerQueryRunner.ts @@ -1566,7 +1566,9 @@ export class SqlServerQueryRunner oldColumn.name = newColumn.name } - if (this.isColumnChanged(oldColumn, newColumn, false)) { + if ( + this.isColumnChanged(oldColumn, newColumn, false, false, false) + ) { upQueries.push( new Query( `ALTER TABLE ${this.escapePath( @@ -1576,6 +1578,7 @@ export class SqlServerQueryRunner newColumn, true, false, + true, )}`, ), ) @@ -1588,11 +1591,40 @@ export class SqlServerQueryRunner oldColumn, true, false, + true, )}`, ), ) } + if (this.isEnumChanged(oldColumn, newColumn)) { + const oldExpression = this.getEnumExpression(oldColumn) + const oldCheck = new TableCheck({ + name: this.connection.namingStrategy.checkConstraintName( + table, + oldExpression, + true, + ), + expression: oldExpression, + }) + + const newExpression = this.getEnumExpression(newColumn) + const newCheck = new TableCheck({ + name: this.connection.namingStrategy.checkConstraintName( + table, + newExpression, + true, + ), + expression: newExpression, + }) + + upQueries.push(this.dropCheckConstraintSql(table, oldCheck)) + upQueries.push(this.createCheckConstraintSql(table, newCheck)) + + downQueries.push(this.dropCheckConstraintSql(table, newCheck)) + downQueries.push(this.createCheckConstraintSql(table, oldCheck)) + } + if (newColumn.isPrimary !== oldColumn.isPrimary) { const primaryColumns = clonedTable.primaryColumns @@ -3904,17 +3936,14 @@ export class SqlServerQueryRunner column: TableColumn, skipIdentity: boolean, createDefault: boolean, + skipEnum?: boolean, ) { let c = `"${column.name}" ${this.connection.driver.createFullType( column, )}` - if (column.enum) { - const expression = - column.name + - " IN (" + - column.enum.map((val) => "'" + val + "'").join(",") + - ")" + if (!skipEnum && column.enum) { + const expression = this.getEnumExpression(column) const checkName = this.connection.namingStrategy.checkConstraintName( table, @@ -3976,6 +4005,18 @@ export class SqlServerQueryRunner return c } + private getEnumExpression(column: TableColumn) { + if (!column.enum) { + throw new Error(`Enum is not defined in column ${column.name}`) + } + return ( + column.name + + " IN (" + + column.enum.map((val) => "'" + val + "'").join(",") + + ")" + ) + } + protected isEnumCheckConstraint(name: string): boolean { return name.indexOf("CHK_") !== -1 && name.indexOf("_ENUM") !== -1 } diff --git a/src/driver/types/ColumnTypes.ts b/src/driver/types/ColumnTypes.ts index 105d4571bd..f40ec1a4f1 100644 --- a/src/driver/types/ColumnTypes.ts +++ b/src/driver/types/ColumnTypes.ts @@ -177,13 +177,15 @@ export type SimpleColumnType = | "set" // mysql | "cidr" // postgres | "inet" // postgres, cockroachdb + | "inet4" // mariadb + | "inet6" // mariadb | "macaddr" // postgres | "bit" // postgres, mssql | "bit varying" // postgres | "varbit" // postgres | "tsvector" // postgres | "tsquery" // postgres - | "uuid" // postgres, cockroachdb + | "uuid" // postgres, cockroachdb, mariadb | "xml" // mssql, postgres | "json" // mysql, postgres, cockroachdb, spanner | "jsonb" // postgres, cockroachdb diff --git a/src/driver/types/GeoJsonTypes.ts b/src/driver/types/GeoJsonTypes.ts new file mode 100644 index 0000000000..c046d6075d --- /dev/null +++ b/src/driver/types/GeoJsonTypes.ts @@ -0,0 +1,109 @@ +/** + * Point geometry object. + * https://tools.ietf.org/html/rfc7946#section-3.1.2 + */ +export type Point = { + type: "Point" + coordinates: number[] +} + +/** + * LineString geometry object. + * https://tools.ietf.org/html/rfc7946#section-3.1.4 + */ +export type LineString = { + type: "LineString" + coordinates: number[][] +} + +/** + * Polygon geometry object. + * https://tools.ietf.org/html/rfc7946#section-3.1.6 + */ +export type Polygon = { + type: "Polygon" + coordinates: number[][][] +} + +/** + * MultiPoint geometry object. + * https://tools.ietf.org/html/rfc7946#section-3.1.3 + */ +export type MultiPoint = { + type: "MultiPoint" + coordinates: number[][] +} + +/** + * MultiLineString geometry object. + * https://tools.ietf.org/html/rfc7946#section-3.1.5 + */ +export type MultiLineString = { + type: "MultiLineString" + coordinates: number[][][] +} + +/** + * MultiPolygon geometry object. + * https://tools.ietf.org/html/rfc7946#section-3.1.7 + */ +export type MultiPolygon = { + type: "MultiPolygon" + coordinates: number[][][][] +} + +/** + * Geometry Collection + * https://tools.ietf.org/html/rfc7946#section-3.1.8 + */ +export type GeometryCollection = { + type: "GeometryCollection" + geometries: ( + | Point + | LineString + | Polygon + | MultiPoint + | MultiLineString + | MultiPolygon + )[] +} + +/** + * Union of Geometry objects. + */ +export type Geometry = + | Point + | LineString + | Polygon + | MultiPoint + | MultiLineString + | MultiPolygon + | GeometryCollection +export type Geography = Geometry + +/** + * A feature object which contains a geometry and associated properties. + * https://tools.ietf.org/html/rfc7946#section-3.2 + */ +export type Feature = { + type: "Feature" + geometry: Geometry + id?: string | number + bbox?: number[] + properties: { [name: string]: any } | null +} + +/** + * A collection of feature objects. + * https://tools.ietf.org/html/rfc7946#section-3.3 + */ +export type FeatureCollection = { + type: "FeatureCollection" + bbox?: number[] + features: Feature[] +} + +/** + * Union of GeoJSON objects. + */ +export type GeoJSON = Geometry | Feature | FeatureCollection diff --git a/src/driver/types/UpsertType.ts b/src/driver/types/UpsertType.ts index 22ee17a148..60078bbeb2 100644 --- a/src/driver/types/UpsertType.ts +++ b/src/driver/types/UpsertType.ts @@ -1 +1,4 @@ -export type UpsertType = "on-conflict-do-update" | "on-duplicate-key-update" +export type UpsertType = + | "on-conflict-do-update" + | "on-duplicate-key-update" + | "primary-key" diff --git a/src/entity-manager/EntityManager.ts b/src/entity-manager/EntityManager.ts index 213dfe915d..7d12f4bc19 100644 --- a/src/entity-manager/EntityManager.ts +++ b/src/entity-manager/EntityManager.ts @@ -26,7 +26,7 @@ import { QueryRunner } from "../query-runner/QueryRunner" import { SelectQueryBuilder } from "../query-builder/SelectQueryBuilder" import { QueryDeepPartialEntity } from "../query-builder/QueryPartialEntity" import { EntityPersistExecutor } from "../persistence/EntityPersistExecutor" -import { ObjectID } from "../driver/mongodb/typings" +import { ObjectId } from "../driver/mongodb/typings" import { InsertResult } from "../query-builder/result/InsertResult" import { UpdateResult } from "../query-builder/result/UpdateResult" import { DeleteResult } from "../query-builder/result/DeleteResult" @@ -37,6 +37,7 @@ import { getMetadataArgsStorage } from "../globals" import { UpsertOptions } from "../repository/UpsertOptions" import { InstanceChecker } from "../util/InstanceChecker" import { ObjectLiteral } from "../common/ObjectLiteral" +import { PickKeysByType } from "../common/PickKeysByType" /** * Entity manager supposed to work with any entity, automatically find its repository and call its methods, @@ -66,8 +67,9 @@ export class EntityManager { /** * Once created and then reused by repositories. + * Created as a future replacement for the #repositories to provide a bit more perf optimization. */ - protected repositories: Repository[] = [] + protected repositories = new Map, Repository>() /** * Once created and then reused by repositories. @@ -168,7 +170,7 @@ export class EntityManager { /** * Executes raw SQL query and returns raw database results. */ - async query(query: string, parameters?: any[]): Promise { + async query(query: string, parameters?: any[]): Promise { return this.connection.query(query, parameters, this.queryRunner) } @@ -700,7 +702,9 @@ export class EntityManager { } const conflictColumns = metadata.mapPropertyPathsToColumns( - options.conflictPaths, + Array.isArray(options.conflictPaths) + ? options.conflictPaths + : Object.keys(options.conflictPaths), ) const overwriteColumns = metadata.columns.filter( @@ -724,6 +728,10 @@ export class EntityManager { { skipUpdateIfNoValuesChanged: options.skipUpdateIfNoValuesChanged, + indexPredicate: options.indexPredicate, + upsertType: + options.upsertType || + this.connection.driver.supportedUpsertTypes[0], }, ) .execute() @@ -745,8 +753,8 @@ export class EntityManager { | number[] | Date | Date[] - | ObjectID - | ObjectID[] + | ObjectId + | ObjectId[] | any, partialEntity: QueryDeepPartialEntity, ): Promise { @@ -800,8 +808,8 @@ export class EntityManager { | number[] | Date | Date[] - | ObjectID - | ObjectID[] + | ObjectId + | ObjectId[] | any, ): Promise { // if user passed empty criteria or empty list of criterias, then throw an error @@ -854,8 +862,8 @@ export class EntityManager { | number[] | Date | Date[] - | ObjectID - | ObjectID[] + | ObjectId + | ObjectId[] | any, ): Promise { // if user passed empty criteria or empty list of criterias, then throw an error @@ -908,8 +916,8 @@ export class EntityManager { | number[] | Date | Date[] - | ObjectID - | ObjectID[] + | ObjectId + | ObjectId[] | any, ): Promise { // if user passed empty criteria or empty list of criterias, then throw an error @@ -946,6 +954,23 @@ export class EntityManager { } } + /** + * Checks whether any entity exists with the given condition + */ + exists( + entityClass: EntityTarget, + options?: FindManyOptions, + ): Promise { + const metadata = this.connection.getMetadata(entityClass) + return this.createQueryBuilder( + entityClass, + FindOptionsUtils.extractFindManyOptionsAlias(options) || + metadata.name, + ) + .setFindOptions(options || {}) + .getExists() + } + /** * Counts entities that match given options. * Useful for pagination. @@ -978,6 +1003,69 @@ export class EntityManager { .getCount() } + /** + * Return the SUM of a column + */ + sum( + entityClass: EntityTarget, + columnName: PickKeysByType, + where?: FindOptionsWhere | FindOptionsWhere[], + ): Promise { + return this.callAggregateFun(entityClass, "SUM", columnName, where) + } + + /** + * Return the AVG of a column + */ + average( + entityClass: EntityTarget, + columnName: PickKeysByType, + where?: FindOptionsWhere | FindOptionsWhere[], + ): Promise { + return this.callAggregateFun(entityClass, "AVG", columnName, where) + } + + /** + * Return the MIN of a column + */ + minimum( + entityClass: EntityTarget, + columnName: PickKeysByType, + where?: FindOptionsWhere | FindOptionsWhere[], + ): Promise { + return this.callAggregateFun(entityClass, "MIN", columnName, where) + } + + /** + * Return the MAX of a column + */ + maximum( + entityClass: EntityTarget, + columnName: PickKeysByType, + where?: FindOptionsWhere | FindOptionsWhere[], + ): Promise { + return this.callAggregateFun(entityClass, "MAX", columnName, where) + } + + private async callAggregateFun( + entityClass: EntityTarget, + fnName: "SUM" | "AVG" | "MIN" | "MAX", + columnName: PickKeysByType, + where: FindOptionsWhere | FindOptionsWhere[] = {}, + ): Promise { + const metadata = this.connection.getMetadata(entityClass) + const result = await this.createQueryBuilder(entityClass, metadata.name) + .setFindOptions({ where }) + .select( + `${fnName}(${this.connection.driver.escape( + String(columnName), + )})`, + fnName, + ) + .getRawOne() + return result[fnName] === null ? null : parseFloat(result[fnName]) + } + /** * Finds entities that match given find options. */ @@ -1136,7 +1224,7 @@ export class EntityManager { */ async findOneById( entityClass: EntityTarget, - id: number | string | Date | ObjectID, + id: number | string | Date | ObjectId, ): Promise { const metadata = this.connection.getMetadata(entityClass) @@ -1290,10 +1378,8 @@ export class EntityManager { target: EntityTarget, ): Repository { // find already created repository instance and return it if found - const repository = this.repositories.find( - (repository) => repository.target === target, - ) - if (repository) return repository + const repoFromMap = this.repositories.get(target) + if (repoFromMap) return repoFromMap // if repository was not found then create it, store its instance and return it if (this.connection.driver.options.type === "mongodb") { @@ -1302,7 +1388,7 @@ export class EntityManager { this, this.queryRunner, ) - this.repositories.push(newRepository as any) + this.repositories.set(target, newRepository) return newRepository } else { const newRepository = new Repository( @@ -1310,7 +1396,7 @@ export class EntityManager { this, this.queryRunner, ) - this.repositories.push(newRepository) + this.repositories.set(target, newRepository) return newRepository } } diff --git a/src/entity-manager/MongoEntityManager.ts b/src/entity-manager/MongoEntityManager.ts index 12aa712bb1..1951d26a63 100644 --- a/src/entity-manager/MongoEntityManager.ts +++ b/src/entity-manager/MongoEntityManager.ts @@ -1,46 +1,11 @@ -import { DataSource } from "../data-source/DataSource" import { EntityManager } from "./EntityManager" import { EntityTarget } from "../common/EntityTarget" -import { - AggregationCursor, - BulkWriteOpResultObject, - ChangeStream, - ChangeStreamOptions, - Code, - Collection, - CollectionAggregationOptions, - CollectionBulkWriteOptions, - CollectionInsertManyOptions, - CollectionInsertOneOptions, - CollectionOptions, - CollStats, - CommandCursor, - Cursor, - CursorResult, - DeleteWriteOpResultObject, - FindAndModifyWriteOpResultObject, - FindOneAndReplaceOption, - GeoHaystackSearchOptions, - GeoNearOptions, - InsertOneWriteOpResult, - InsertWriteOpResult, - MapReduceOptions, - MongoCallback, - MongoCountPreferences, - MongodbIndexOptions, - MongoError, - ObjectID, - OrderedBulkOperation, - ParallelCollectionScanOptions, - ReadPreference, - ReplaceOneOptions, - UnorderedBulkOperation, - UpdateWriteOpResult, -} from "../driver/mongodb/typings" + import { ObjectLiteral } from "../common/ObjectLiteral" import { MongoQueryRunner } from "../driver/mongodb/MongoQueryRunner" import { MongoDriver } from "../driver/mongodb/MongoDriver" import { DocumentToEntityTransformer } from "../query-builder/transformer/DocumentToEntityTransformer" +import { FindManyOptions } from "../find-options/FindManyOptions" import { FindOptionsUtils } from "../find-options/FindOptionsUtils" import { PlatformTools } from "../platform/PlatformTools" import { QueryDeepPartialEntity } from "../query-builder/QueryPartialEntity" @@ -48,15 +13,57 @@ import { InsertResult } from "../query-builder/result/InsertResult" import { UpdateResult } from "../query-builder/result/UpdateResult" import { DeleteResult } from "../query-builder/result/DeleteResult" import { EntityMetadata } from "../metadata/EntityMetadata" -import { FindOptionsWhere } from "../find-options/FindOptionsWhere" + +import { + BulkWriteResult, + AggregationCursor, + Collection, + FindCursor, + Document, + AggregateOptions, + AnyBulkWriteOperation, + BulkWriteOptions, + Filter, + CountOptions, + IndexSpecification, + CreateIndexesOptions, + IndexDescription, + DeleteResult as DeleteResultMongoDb, + DeleteOptions, + CommandOperationOptions, + FindOneAndDeleteOptions, + FindOneAndReplaceOptions, + UpdateFilter, + FindOneAndUpdateOptions, + RenameOptions, + ReplaceOptions, + UpdateResult as UpdateResultMongoDb, + CollStats, + CollStatsOptions, + ChangeStreamOptions, + ChangeStream, + UpdateOptions, + ListIndexesOptions, + ListIndexesCursor, + OptionalId, + InsertOneOptions, + InsertOneResult, + InsertManyResult, + UnorderedBulkOperation, + OrderedBulkOperation, + IndexInformationOptions, + ObjectId, + FilterOperators, +} from "../driver/mongodb/typings" +import { DataSource } from "../data-source/DataSource" +import { MongoFindManyOptions } from "../find-options/mongodb/MongoFindManyOptions" +import { MongoFindOneOptions } from "../find-options/mongodb/MongoFindOneOptions" import { FindOptionsSelect, FindOptionsSelectByString, } from "../find-options/FindOptionsSelect" -import { MongoFindManyOptions } from "../find-options/mongodb/MongoFindManyOptions" -import { MongoFindOneOptions } from "../find-options/mongodb/MongoFindOneOptions" -import { ColumnMetadata } from "../metadata/ColumnMetadata" import { ObjectUtils } from "../util/ObjectUtils" +import { ColumnMetadata } from "../metadata/ColumnMetadata" /** * Entity manager supposed to work with any entity, automatically find its repository and call its methods, @@ -87,25 +94,54 @@ export class MongoEntityManager extends EntityManager { /** * Finds entities that match given find options. */ - async find( - entityClassOrName: EntityTarget, - options?: MongoFindManyOptions, - ): Promise { - return this.executeFind(entityClassOrName, options) - } - /** - * Finds entities that match given conditions. + * Finds entities that match given find options or conditions. */ - async findBy( + async find( entityClassOrName: EntityTarget, - where: any, + optionsOrConditions?: + | FindManyOptions + | Partial + | FilterOperators, ): Promise { - return this.executeFind(entityClassOrName, where) + const query = + this.convertFindManyOptionsOrConditionsToMongodbQuery( + optionsOrConditions, + ) + const cursor = this.createEntityCursor( + entityClassOrName, + query as Filter, + ) + const deleteDateColumn = + this.connection.getMetadata(entityClassOrName).deleteDateColumn + if (FindOptionsUtils.isFindManyOptions(optionsOrConditions)) { + if (optionsOrConditions.select) + cursor.project( + this.convertFindOptionsSelectToProjectCriteria( + optionsOrConditions.select, + ), + ) + if (optionsOrConditions.skip) cursor.skip(optionsOrConditions.skip) + if (optionsOrConditions.take) cursor.limit(optionsOrConditions.take) + if (optionsOrConditions.order) + cursor.sort( + this.convertFindOptionsOrderToOrderCriteria( + optionsOrConditions.order, + ), + ) + if (deleteDateColumn && !optionsOrConditions.withDeleted) { + this.filterSoftDeleted(cursor, deleteDateColumn, query) + } + } else if (deleteDateColumn) { + this.filterSoftDeleted(cursor, deleteDateColumn, query) + } + return cursor.toArray() } /** - * Finds entities that match given find options. + * Finds entities that match given find options or conditions. + * Also counts all entities that match given conditions, + * but ignores pagination settings (from and take options). */ async findAndCount( entityClassOrName: EntityTarget, @@ -133,37 +169,38 @@ export class MongoEntityManager extends EntityManager { async findByIds( entityClassOrName: EntityTarget, ids: any[], - optionsOrConditions?: any, + optionsOrConditions?: FindManyOptions | Partial, ): Promise { const metadata = this.connection.getMetadata(entityClassOrName) const query = this.convertFindManyOptionsOrConditionsToMongodbQuery( optionsOrConditions, ) || {} - const objectIdInstance = PlatformTools.load("mongodb").ObjectID + const objectIdInstance = PlatformTools.load("mongodb").ObjectId query["_id"] = { $in: ids.map((id) => { if (typeof id === "string") { return new objectIdInstance(id) } - if (ObjectUtils.isObject(id)) { + if (typeof id === "object") { if (id instanceof objectIdInstance) { return id } const propertyName = metadata.objectIdColumn!.propertyName - if ((id as any)[propertyName] instanceof objectIdInstance) { - return (id as any)[propertyName] + if (id[propertyName] instanceof objectIdInstance) { + return id[propertyName] } } }), } - const cursor = await this.createEntityCursor(entityClassOrName, query) - const deleteDateColumn = - this.connection.getMetadata(entityClassOrName).deleteDateColumn + const cursor = this.createEntityCursor( + entityClassOrName, + query as Filter, + ) if (FindOptionsUtils.isFindManyOptions(optionsOrConditions)) { if (optionsOrConditions.select) cursor.project( @@ -179,17 +216,12 @@ export class MongoEntityManager extends EntityManager { optionsOrConditions.order, ), ) - if (deleteDateColumn && !optionsOrConditions.withDeleted) { - this.filterSoftDeleted(cursor, deleteDateColumn, query) - } - } else if (deleteDateColumn) { - this.filterSoftDeleted(cursor, deleteDateColumn, query) } - return await cursor.toArray() + return cursor.toArray() } /** - * Finds first entity that matches given find options. + * Finds first entity that matches given conditions and/or find options. */ async findOne( entityClassOrName: EntityTarget, @@ -219,15 +251,7 @@ export class MongoEntityManager extends EntityManager { */ async findOneById( entityClassOrName: EntityTarget, - id: - | string - | string[] - | number - | number[] - | Date - | Date[] - | ObjectID - | ObjectID[], + id: string | number | Date | ObjectId, ): Promise { return this.executeFindOne(entityClassOrName, id) } @@ -298,9 +322,9 @@ export class MongoEntityManager extends EntityManager { | number[] | Date | Date[] - | ObjectID - | ObjectID[] - | FindOptionsWhere, + | ObjectId + | ObjectId[] + | ObjectLiteral, partialEntity: QueryDeepPartialEntity, ): Promise { const result = new UpdateResult() @@ -350,9 +374,9 @@ export class MongoEntityManager extends EntityManager { | number[] | Date | Date[] - | ObjectID - | ObjectID[] - | FindOptionsWhere, + | ObjectId + | ObjectId[] + | ObjectLiteral[], ): Promise { const result = new DeleteResult() @@ -392,8 +416,8 @@ export class MongoEntityManager extends EntityManager { */ createCursor( entityClassOrName: EntityTarget, - query?: ObjectLiteral, - ): Cursor { + query: ObjectLiteral = {}, + ): FindCursor { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.cursor(metadata.tableName, query) } @@ -404,8 +428,8 @@ export class MongoEntityManager extends EntityManager { */ createEntityCursor( entityClassOrName: EntityTarget, - query?: ObjectLiteral, - ): Cursor { + query: ObjectLiteral = {}, + ): FindCursor { const metadata = this.connection.getMetadata(entityClassOrName) const cursor = this.createCursor(entityClassOrName, query) this.applyEntityTransformationToCursor(metadata, cursor) @@ -417,8 +441,8 @@ export class MongoEntityManager extends EntityManager { */ aggregate( entityClassOrName: EntityTarget, - pipeline: ObjectLiteral[], - options?: CollectionAggregationOptions, + pipeline: Document[], + options?: AggregateOptions, ): AggregationCursor { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.aggregate( @@ -434,8 +458,8 @@ export class MongoEntityManager extends EntityManager { */ aggregateEntity( entityClassOrName: EntityTarget, - pipeline: ObjectLiteral[], - options?: CollectionAggregationOptions, + pipeline: Document[], + options?: AggregateOptions, ): AggregationCursor { const metadata = this.connection.getMetadata(entityClassOrName) const cursor = this.mongoQueryRunner.aggregate( @@ -452,9 +476,9 @@ export class MongoEntityManager extends EntityManager { */ bulkWrite( entityClassOrName: EntityTarget, - operations: ObjectLiteral[], - options?: CollectionBulkWriteOptions, - ): Promise { + operations: AnyBulkWriteOperation[], + options?: BulkWriteOptions, + ): Promise { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.bulkWrite( metadata.tableName, @@ -468,8 +492,8 @@ export class MongoEntityManager extends EntityManager { */ count( entityClassOrName: EntityTarget, - query?: ObjectLiteral, - options?: MongoCountPreferences, + query: Filter = {}, + options: CountOptions = {}, ): Promise { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.count(metadata.tableName, query, options) @@ -481,7 +505,7 @@ export class MongoEntityManager extends EntityManager { countBy( entityClassOrName: EntityTarget, query?: ObjectLiteral, - options?: MongoCountPreferences, + options?: CountOptions, ): Promise { return this.count(entityClassOrName, query, options) } @@ -491,8 +515,8 @@ export class MongoEntityManager extends EntityManager { */ createCollectionIndex( entityClassOrName: EntityTarget, - fieldOrSpec: string | any, - options?: MongodbIndexOptions, + fieldOrSpec: IndexSpecification, + options?: CreateIndexesOptions, ): Promise { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.createCollectionIndex( @@ -509,8 +533,8 @@ export class MongoEntityManager extends EntityManager { */ createCollectionIndexes( entityClassOrName: EntityTarget, - indexSpecs: ObjectLiteral[], - ): Promise { + indexSpecs: IndexDescription[], + ): Promise { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.createCollectionIndexes( metadata.tableName, @@ -523,9 +547,9 @@ export class MongoEntityManager extends EntityManager { */ deleteMany( entityClassOrName: EntityTarget, - query: ObjectLiteral, - options?: CollectionOptions, - ): Promise { + query: Filter, + options: DeleteOptions = {}, + ): Promise { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.deleteMany( metadata.tableName, @@ -539,9 +563,9 @@ export class MongoEntityManager extends EntityManager { */ deleteOne( entityClassOrName: EntityTarget, - query: ObjectLiteral, - options?: CollectionOptions, - ): Promise { + query: Filter, + options: DeleteOptions = {}, + ): Promise { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.deleteOne( metadata.tableName, @@ -556,8 +580,8 @@ export class MongoEntityManager extends EntityManager { distinct( entityClassOrName: EntityTarget, key: string, - query: ObjectLiteral, - options?: { readPreference?: ReadPreference | string }, + query: Filter, + options?: CommandOperationOptions, ): Promise { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.distinct( @@ -574,7 +598,7 @@ export class MongoEntityManager extends EntityManager { dropCollectionIndex( entityClassOrName: EntityTarget, indexName: string, - options?: CollectionOptions, + options?: CommandOperationOptions, ): Promise { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.dropCollectionIndex( @@ -600,8 +624,8 @@ export class MongoEntityManager extends EntityManager { findOneAndDelete( entityClassOrName: EntityTarget, query: ObjectLiteral, - options?: { projection?: Object; sort?: Object; maxTimeMS?: number }, - ): Promise { + options?: FindOneAndDeleteOptions, + ): Promise { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.findOneAndDelete( metadata.tableName, @@ -615,10 +639,10 @@ export class MongoEntityManager extends EntityManager { */ findOneAndReplace( entityClassOrName: EntityTarget, - query: ObjectLiteral, - replacement: Object, - options?: FindOneAndReplaceOption, - ): Promise { + query: Filter, + replacement: Document, + options?: FindOneAndReplaceOptions, + ): Promise { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.findOneAndReplace( metadata.tableName, @@ -633,10 +657,10 @@ export class MongoEntityManager extends EntityManager { */ findOneAndUpdate( entityClassOrName: EntityTarget, - query: ObjectLiteral, - update: Object, - options?: FindOneAndReplaceOption, - ): Promise { + query: Filter, + update: UpdateFilter, + options?: FindOneAndUpdateOptions, + ): Promise { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.findOneAndUpdate( metadata.tableName, @@ -646,69 +670,12 @@ export class MongoEntityManager extends EntityManager { ) } - /** - * Execute a geo search using a geo haystack index on a collection. - */ - geoHaystackSearch( - entityClassOrName: EntityTarget, - x: number, - y: number, - options?: GeoHaystackSearchOptions, - ): Promise { - const metadata = this.connection.getMetadata(entityClassOrName) - return this.mongoQueryRunner.geoHaystackSearch( - metadata.tableName, - x, - y, - options, - ) - } - - /** - * Execute the geoNear command to search for items in the collection. - */ - geoNear( - entityClassOrName: EntityTarget, - x: number, - y: number, - options?: GeoNearOptions, - ): Promise { - const metadata = this.connection.getMetadata(entityClassOrName) - return this.mongoQueryRunner.geoNear(metadata.tableName, x, y, options) - } - - /** - * Run a group command across a collection. - */ - group( - entityClassOrName: EntityTarget, - keys: Object | Array | Function | Code, - condition: Object, - initial: Object, - reduce: Function | Code, - finalize: Function | Code, - command: boolean, - options?: { readPreference?: ReadPreference | string }, - ): Promise { - const metadata = this.connection.getMetadata(entityClassOrName) - return this.mongoQueryRunner.group( - metadata.tableName, - keys, - condition, - initial, - reduce, - finalize, - command, - options, - ) - } - /** * Retrieve all the indexes on the collection. */ collectionIndexes( entityClassOrName: EntityTarget, - ): Promise { + ): Promise { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.collectionIndexes(metadata.tableName) } @@ -732,7 +699,7 @@ export class MongoEntityManager extends EntityManager { */ collectionIndexInformation( entityClassOrName: EntityTarget, - options?: { full: boolean }, + options?: IndexInformationOptions, ): Promise { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.collectionIndexInformation( @@ -746,7 +713,7 @@ export class MongoEntityManager extends EntityManager { */ initializeOrderedBulkOp( entityClassOrName: EntityTarget, - options?: CollectionOptions, + options?: BulkWriteOptions, ): OrderedBulkOperation { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.initializeOrderedBulkOp( @@ -760,7 +727,7 @@ export class MongoEntityManager extends EntityManager { */ initializeUnorderedBulkOp( entityClassOrName: EntityTarget, - options?: CollectionOptions, + options?: BulkWriteOptions, ): UnorderedBulkOperation { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.initializeUnorderedBulkOp( @@ -774,9 +741,9 @@ export class MongoEntityManager extends EntityManager { */ insertMany( entityClassOrName: EntityTarget, - docs: ObjectLiteral[], - options?: CollectionInsertManyOptions, - ): Promise { + docs: OptionalId[], + options?: BulkWriteOptions, + ): Promise { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.insertMany( metadata.tableName, @@ -790,9 +757,9 @@ export class MongoEntityManager extends EntityManager { */ insertOne( entityClassOrName: EntityTarget, - doc: ObjectLiteral, - options?: CollectionInsertOneOptions, - ): Promise { + doc: OptionalId, + options?: InsertOneOptions, + ): Promise { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.insertOne(metadata.tableName, doc, options) } @@ -810,11 +777,8 @@ export class MongoEntityManager extends EntityManager { */ listCollectionIndexes( entityClassOrName: EntityTarget, - options?: { - batchSize?: number - readPreference?: ReadPreference | string - }, - ): CommandCursor { + options?: ListIndexesOptions, + ): ListIndexesCursor { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.listCollectionIndexes( metadata.tableName, @@ -822,55 +786,14 @@ export class MongoEntityManager extends EntityManager { ) } - /** - * Run Map Reduce across a collection. Be aware that the inline option for out will return an array of results not a collection. - */ - mapReduce( - entityClassOrName: EntityTarget, - map: Function | string, - reduce: Function | string, - options?: MapReduceOptions, - ): Promise { - const metadata = this.connection.getMetadata(entityClassOrName) - return this.mongoQueryRunner.mapReduce( - metadata.tableName, - map, - reduce, - options, - ) - } - - /** - * Return N number of parallel cursors for a collection allowing parallel reading of entire collection. - * There are no ordering guarantees for returned results. - */ - parallelCollectionScan( - entityClassOrName: EntityTarget, - options?: ParallelCollectionScanOptions, - ): Promise[]> { - const metadata = this.connection.getMetadata(entityClassOrName) - return this.mongoQueryRunner.parallelCollectionScan( - metadata.tableName, - options, - ) - } - - /** - * Reindex all indexes on the collection Warning: reIndex is a blocking operation (indexes are rebuilt in the foreground) and will be slow for large collections. - */ - reIndex(entityClassOrName: EntityTarget): Promise { - const metadata = this.connection.getMetadata(entityClassOrName) - return this.mongoQueryRunner.reIndex(metadata.tableName) - } - /** * Reindex all indexes on the collection Warning: reIndex is a blocking operation (indexes are rebuilt in the foreground) and will be slow for large collections. */ rename( entityClassOrName: EntityTarget, newName: string, - options?: { dropTarget?: boolean }, - ): Promise> { + options?: RenameOptions, + ): Promise> { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.rename( metadata.tableName, @@ -884,10 +807,10 @@ export class MongoEntityManager extends EntityManager { */ replaceOne( entityClassOrName: EntityTarget, - query: ObjectLiteral, - doc: ObjectLiteral, - options?: ReplaceOneOptions, - ): Promise { + query: Filter, + doc: Document, + options?: ReplaceOptions, + ): Promise { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.replaceOne( metadata.tableName, @@ -902,7 +825,7 @@ export class MongoEntityManager extends EntityManager { */ stats( entityClassOrName: EntityTarget, - options?: { scale: number }, + options?: CollStatsOptions, ): Promise { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.stats(metadata.tableName, options) @@ -910,7 +833,7 @@ export class MongoEntityManager extends EntityManager { watch( entityClassOrName: EntityTarget, - pipeline?: Object[], + pipeline?: Document[], options?: ChangeStreamOptions, ): ChangeStream { const metadata = this.connection.getMetadata(entityClassOrName) @@ -926,10 +849,10 @@ export class MongoEntityManager extends EntityManager { */ updateMany( entityClassOrName: EntityTarget, - query: ObjectLiteral, - update: ObjectLiteral, - options?: { upsert?: boolean; w?: any; wtimeout?: number; j?: boolean }, - ): Promise { + query: Filter, + update: UpdateFilter, + options?: UpdateOptions, + ): Promise { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.updateMany( metadata.tableName, @@ -944,10 +867,10 @@ export class MongoEntityManager extends EntityManager { */ updateOne( entityClassOrName: EntityTarget, - query: ObjectLiteral, - update: ObjectLiteral, - options?: ReplaceOneOptions, - ): Promise { + query: Filter, + update: UpdateFilter, + options?: UpdateOptions, + ): Promise { const metadata = this.connection.getMetadata(entityClassOrName) return this.mongoQueryRunner.updateOne( metadata.tableName, @@ -968,6 +891,7 @@ export class MongoEntityManager extends EntityManager { optionsOrConditions: | MongoFindManyOptions | Partial + | FilterOperators | any[] | undefined, ): ObjectLiteral | undefined { @@ -1047,7 +971,7 @@ export class MongoEntityManager extends EntityManager { metadata: EntityMetadata, idMap: any, ): ObjectLiteral { - const objectIdInstance = PlatformTools.load("mongodb").ObjectID + const objectIdInstance = PlatformTools.load("mongodb").ObjectId // check first if it's ObjectId compatible: // string, number, Buffer, ObjectId or ObjectId-like @@ -1068,7 +992,7 @@ export class MongoEntityManager extends EntityManager { }, {} as any) } - // last resort: try to convert it to an ObjectID anyway + // last resort: try to convert it to an ObjectId anyway // most likely it will fail, but we want to be backwards compatible and keep the same thrown Errors. // it can still pass with null/undefined return { @@ -1081,92 +1005,45 @@ export class MongoEntityManager extends EntityManager { */ protected applyEntityTransformationToCursor( metadata: EntityMetadata, - cursor: Cursor | AggregationCursor, + cursor: FindCursor | AggregationCursor, ) { - // mongdb-3.7 exports Cursor, mongodb-4.2 exports FindCursor, provide support for both. - const ParentCursor = - PlatformTools.load("mongodb").Cursor || - PlatformTools.load("mongodb").FindCursor const queryRunner = this.mongoQueryRunner - cursor.toArray = function (callback?: MongoCallback) { - if (callback) { - ParentCursor.prototype.toArray.call( - this, - (error: MongoError, results: Entity[]): void => { - if (error) { - callback(error, results) - return - } - - const transformer = new DocumentToEntityTransformer() - const entities = transformer.transformAll( - results, - metadata, - ) - - // broadcast "load" events - queryRunner.broadcaster - .broadcast("Load", metadata, entities) - .then(() => callback(error, entities)) - }, - ) - } else { - return ParentCursor.prototype.toArray - .call(this) - .then((results: Entity[]) => { - const transformer = new DocumentToEntityTransformer() - const entities = transformer.transformAll( - results, - metadata, - ) - - // broadcast "load" events - return queryRunner.broadcaster - .broadcast("Load", metadata, entities) - .then(() => entities) - }) - } - } - cursor.next = function (callback?: MongoCallback) { - if (callback) { - ParentCursor.prototype.next.call( - this, - (error: MongoError, result: CursorResult): void => { - if (error || !result) { - callback(error, result) - return - } - - const transformer = new DocumentToEntityTransformer() - const entity = transformer.transform(result, metadata) - - // broadcast "load" events - - queryRunner.broadcaster - .broadcast("Load", metadata, [entity]) - .then(() => callback(error, entity)) - }, - ) - } else { - return ParentCursor.prototype.next - .call(this) - .then((result: Entity) => { - if (!result) return result - - const transformer = new DocumentToEntityTransformer() - const entity = transformer.transform(result, metadata) - - // broadcast "load" events - return queryRunner.broadcaster - .broadcast("Load", metadata, [entity]) - .then(() => entity) - }) - } - } + cursor.toArray = () => + cursor + .clone() + .toArray() + .then(async (results: Entity[]) => { + const transformer = new DocumentToEntityTransformer() + const entities = transformer.transformAll(results, metadata) + // broadcast "load" events + await queryRunner.broadcaster.broadcast( + "Load", + metadata, + entities, + ) + return entities + }) + + cursor.next = () => + cursor + .clone() + .next() + .then(async (result: Entity) => { + if (!result) { + return result + } + const transformer = new DocumentToEntityTransformer() + const entity = transformer.transform(result, metadata) + // broadcast "load" events + await queryRunner.broadcaster.broadcast("Load", metadata, [ + entity, + ]) + return entity + }) } protected filterSoftDeleted( - cursor: Cursor, + cursor: FindCursor, deleteDateColumn: ColumnMetadata, query?: ObjectLiteral, ) { @@ -1188,7 +1065,7 @@ export class MongoEntityManager extends EntityManager { optionsOrConditions?: any, maybeOptions?: MongoFindOneOptions, ): Promise { - const objectIdInstance = PlatformTools.load("mongodb").ObjectID + const objectIdInstance = PlatformTools.load("mongodb").ObjectId const id = optionsOrConditions instanceof objectIdInstance || typeof optionsOrConditions === "string" @@ -1203,9 +1080,9 @@ export class MongoEntityManager extends EntityManager { ) || {} if (id) { query["_id"] = - id instanceof objectIdInstance ? id : new objectIdInstance(id) + id instanceof objectIdInstance ? id : new ObjectId(id) } - const cursor = await this.createEntityCursor(entityClassOrName, query) + const cursor = this.createEntityCursor(entityClassOrName, query) const deleteDateColumn = this.connection.getMetadata(entityClassOrName).deleteDateColumn if (FindOptionsUtils.isFindOneOptions(findOneOptionsOrConditions)) { @@ -1244,7 +1121,7 @@ export class MongoEntityManager extends EntityManager { this.convertFindManyOptionsOrConditionsToMongodbQuery( optionsOrConditions, ) - const cursor = await this.createEntityCursor(entityClassOrName, query) + const cursor = this.createEntityCursor(entityClassOrName, query) const deleteDateColumn = this.connection.getMetadata(entityClassOrName).deleteDateColumn diff --git a/src/entity-schema/EntitySchemaColumnOptions.ts b/src/entity-schema/EntitySchemaColumnOptions.ts index dd94682eba..05855cd106 100644 --- a/src/entity-schema/EntitySchemaColumnOptions.ts +++ b/src/entity-schema/EntitySchemaColumnOptions.ts @@ -9,7 +9,7 @@ export interface EntitySchemaColumnOptions extends SpatialColumnOptions { primary?: boolean /** - * Indicates if this column is of type ObjectID + * Indicates if this column is of type ObjectId */ objectId?: boolean diff --git a/src/entity-schema/EntitySchemaInheritanceOptions.ts b/src/entity-schema/EntitySchemaInheritanceOptions.ts new file mode 100644 index 0000000000..656ac1b031 --- /dev/null +++ b/src/entity-schema/EntitySchemaInheritanceOptions.ts @@ -0,0 +1,13 @@ +import { ColumnOptions } from "../decorator/options/ColumnOptions" + +export interface EntitySchemaInheritanceOptions { + /** + * Inheritance pattern. + */ + pattern?: "STI" + + /** + * Inheritance discriminator column. + */ + column?: string | ColumnOptions +} diff --git a/src/entity-schema/EntitySchemaOptions.ts b/src/entity-schema/EntitySchemaOptions.ts index 2d5fb79edd..42e0bd47c6 100644 --- a/src/entity-schema/EntitySchemaOptions.ts +++ b/src/entity-schema/EntitySchemaOptions.ts @@ -11,17 +11,13 @@ import { TableType } from "../metadata/types/TableTypes" import { EntitySchemaUniqueOptions } from "./EntitySchemaUniqueOptions" import { EntitySchemaCheckOptions } from "./EntitySchemaCheckOptions" import { EntitySchemaExclusionOptions } from "./EntitySchemaExclusionOptions" +import { EntitySchemaInheritanceOptions } from "./EntitySchemaInheritanceOptions" import { EntitySchemaRelationIdOptions } from "./EntitySchemaRelationIdOptions" /** * Interface for entity metadata mappings stored inside "schemas" instead of models decorated by decorators. */ export class EntitySchemaOptions { - /** - * Name of the schema it extends. - */ - extends?: string - /** * Target bind to this entity schema. Optional. */ @@ -123,4 +119,9 @@ export class EntitySchemaOptions { * View expression. */ expression?: string | ((connection: DataSource) => SelectQueryBuilder) + + /** + * Inheritance options. + */ + inheritance?: EntitySchemaInheritanceOptions } diff --git a/src/entity-schema/EntitySchemaTransformer.ts b/src/entity-schema/EntitySchemaTransformer.ts index 6c53749ab3..1e3d77b312 100644 --- a/src/entity-schema/EntitySchemaTransformer.ts +++ b/src/entity-schema/EntitySchemaTransformer.ts @@ -16,6 +16,7 @@ import { ExclusionMetadataArgs } from "../metadata-args/ExclusionMetadataArgs" import { EntitySchemaColumnOptions } from "./EntitySchemaColumnOptions" import { EntitySchemaOptions } from "./EntitySchemaOptions" import { EntitySchemaEmbeddedError } from "./EntitySchemaEmbeddedError" +import { InheritanceMetadataArgs } from "../metadata-args/InheritanceMetadataArgs" import { RelationIdMetadataArgs } from "../metadata-args/RelationIdMetadataArgs" /** @@ -50,6 +51,20 @@ export class EntitySchemaTransformer { } metadataArgsStorage.tables.push(tableMetadata) + const { inheritance } = options + + if (inheritance) { + metadataArgsStorage.inheritances.push({ + target: options.target, + pattern: inheritance.pattern ?? "STI", + column: inheritance.column + ? typeof inheritance.column === "string" + ? { name: inheritance.column } + : inheritance.column + : undefined, + } as InheritanceMetadataArgs) + } + this.transformColumnsRecursive(options, metadataArgsStorage) }) diff --git a/src/error/ForbiddenTransactionModeOverrideError.ts b/src/error/ForbiddenTransactionModeOverrideError.ts new file mode 100644 index 0000000000..64d77e8ecd --- /dev/null +++ b/src/error/ForbiddenTransactionModeOverrideError.ts @@ -0,0 +1,19 @@ +import { Migration } from "../migration/Migration" +import { TypeORMError } from "./TypeORMError" + +/** + * Thrown when the per-migration transaction mode is overriden but the global transaction mode is set to "all". + */ +export class ForbiddenTransactionModeOverrideError extends TypeORMError { + constructor(migrationsOverridingTransactionMode: Migration[]) { + const migrationNames = migrationsOverridingTransactionMode.map( + (migration) => `"${migration.name}"`, + ) + + super( + `Migrations ${migrationNames.join( + ", ", + )} override the transaction mode, but the global transaction mode is "all"`, + ) + } +} diff --git a/src/error/index.ts b/src/error/index.ts index 60e8239ef3..86a468fb27 100644 --- a/src/error/index.ts +++ b/src/error/index.ts @@ -59,3 +59,4 @@ export * from "./OffsetWithoutLimitNotSupportedError" export * from "./CannotExecuteNotConnectedError" export * from "./NoConnectionOptionError" export * from "./TypeORMError" +export * from "./ForbiddenTransactionModeOverrideError" diff --git a/src/find-options/FindOperator.ts b/src/find-options/FindOperator.ts index 30dcc166fd..95fa581141 100644 --- a/src/find-options/FindOperator.ts +++ b/src/find-options/FindOperator.ts @@ -1,6 +1,8 @@ import { ObjectLiteral } from "../common/ObjectLiteral" import { FindOperatorType } from "./FindOperatorType" import { InstanceChecker } from "../util/InstanceChecker" +import { ValueTransformer } from "../decorator/options/ValueTransformer" +import { ApplyValueTransformers } from "../util/ApplyValueTransformers" type SqlGeneratorType = (aliasPath: string) => string @@ -135,4 +137,25 @@ export class FindOperator { return this._getSql } + + transformValue(transformer: ValueTransformer | ValueTransformer[]) { + if (this._value instanceof FindOperator) { + this._value.transformValue(transformer) + } else { + this._value = + Array.isArray(this._value) && this._multipleParameters + ? this._value.map( + (v: any) => + transformer && + ApplyValueTransformers.transformTo( + transformer, + v, + ), + ) + : ApplyValueTransformers.transformTo( + transformer, + this._value, + ) + } + } } diff --git a/src/find-options/FindOperatorType.ts b/src/find-options/FindOperatorType.ts index edda3a2f78..dfd03fef10 100644 --- a/src/find-options/FindOperatorType.ts +++ b/src/find-options/FindOperatorType.ts @@ -18,3 +18,5 @@ export type FindOperatorType = | "arrayContains" | "arrayContainedBy" | "arrayOverlap" + | "and" + | "jsonContains" diff --git a/src/find-options/FindOptionsOrder.ts b/src/find-options/FindOptionsOrder.ts index 431ebf7a1e..d2871c3e74 100644 --- a/src/find-options/FindOptionsOrder.ts +++ b/src/find-options/FindOptionsOrder.ts @@ -1,4 +1,4 @@ -import { ObjectID } from "../driver/mongodb/typings" +import { ObjectId } from "../driver/mongodb/typings" /** * A single property handler for FindOptionsOrder. @@ -11,14 +11,20 @@ export type FindOptionsOrderProperty = Property extends Promise< ? FindOptionsOrderProperty> : Property extends Function ? never + : Property extends string + ? FindOptionsOrderValue + : Property extends number + ? FindOptionsOrderValue + : Property extends boolean + ? FindOptionsOrderValue : Property extends Buffer ? FindOptionsOrderValue : Property extends Date ? FindOptionsOrderValue - : Property extends ObjectID + : Property extends ObjectId ? FindOptionsOrderValue : Property extends object - ? FindOptionsOrder + ? FindOptionsOrder | FindOptionsOrderValue : FindOptionsOrderValue /** diff --git a/src/find-options/FindOptionsRelations.ts b/src/find-options/FindOptionsRelations.ts index e0cd035c89..8c8967babe 100644 --- a/src/find-options/FindOptionsRelations.ts +++ b/src/find-options/FindOptionsRelations.ts @@ -1,4 +1,4 @@ -import { ObjectID } from "../driver/mongodb/typings" +import { ObjectId } from "../driver/mongodb/typings" /** * A single property handler for FindOptionsRelations. @@ -9,13 +9,19 @@ export type FindOptionsRelationsProperty = Property extends Promise< ? FindOptionsRelationsProperty> | boolean : Property extends Array ? FindOptionsRelationsProperty> | boolean + : Property extends string + ? never + : Property extends number + ? never + : Property extends boolean + ? never : Property extends Function ? never : Property extends Buffer ? never : Property extends Date ? never - : Property extends ObjectID + : Property extends ObjectId ? never : Property extends object ? FindOptionsRelations | boolean diff --git a/src/find-options/FindOptionsSelect.ts b/src/find-options/FindOptionsSelect.ts index 34b9fb1e13..ab528181e4 100644 --- a/src/find-options/FindOptionsSelect.ts +++ b/src/find-options/FindOptionsSelect.ts @@ -1,4 +1,4 @@ -import { ObjectID } from "../driver/mongodb/typings" +import { ObjectId } from "../driver/mongodb/typings" /** * A single property handler for FindOptionsSelect. @@ -9,13 +9,19 @@ export type FindOptionsSelectProperty = Property extends Promise< ? FindOptionsSelectProperty | boolean : Property extends Array ? FindOptionsSelectProperty | boolean + : Property extends string + ? boolean + : Property extends number + ? boolean + : Property extends boolean + ? boolean : Property extends Function ? never : Property extends Buffer ? boolean : Property extends Date ? boolean - : Property extends ObjectID + : Property extends ObjectId ? boolean : Property extends object ? FindOptionsSelect diff --git a/src/find-options/FindOptionsUtils.ts b/src/find-options/FindOptionsUtils.ts index bec7988e18..e6e8900c24 100644 --- a/src/find-options/FindOptionsUtils.ts +++ b/src/find-options/FindOptionsUtils.ts @@ -1,11 +1,13 @@ import { FindManyOptions } from "./FindManyOptions" import { FindOneOptions } from "./FindOneOptions" import { SelectQueryBuilder } from "../query-builder/SelectQueryBuilder" -import { FindRelationsNotFoundError } from "../error/FindRelationsNotFoundError" +import { FindRelationsNotFoundError } from "../error" import { EntityMetadata } from "../metadata/EntityMetadata" import { DriverUtils } from "../driver/DriverUtils" import { FindTreeOptions } from "./FindTreeOptions" import { ObjectLiteral } from "../common/ObjectLiteral" +import { RelationMetadata } from "../metadata/RelationMetadata" +import { EntityPropertyNotFoundError } from "../error" /** * Utilities to work with FindOptions. @@ -281,19 +283,23 @@ export class FindOptionsUtils { prefix: string, ): void { // find all relations that match given prefix - let matchedBaseRelations: string[] = [] + let matchedBaseRelations: RelationMetadata[] = [] if (prefix) { const regexp = new RegExp("^" + prefix.replace(".", "\\.") + "\\.") matchedBaseRelations = allRelations .filter((relation) => relation.match(regexp)) - .map((relation) => relation.replace(regexp, "")) - .filter((relation) => - metadata.findRelationWithPropertyPath(relation), + .map((relation) => + metadata.findRelationWithPropertyPath( + relation.replace(regexp, ""), + ), ) + .filter((entity) => entity) as RelationMetadata[] } else { - matchedBaseRelations = allRelations.filter((relation) => - metadata.findRelationWithPropertyPath(relation), - ) + matchedBaseRelations = allRelations + .map((relation) => + metadata.findRelationWithPropertyPath(relation), + ) + .filter((entity) => entity) as RelationMetadata[] } // go through all matched relations and add join for them @@ -303,43 +309,73 @@ export class FindOptionsUtils { qb.connection.driver, { joiner: "__" }, alias, - relation, + relation.propertyPath, ) // add a join for the found relation - const selection = alias + "." + relation - qb.leftJoinAndSelect(selection, relationAlias) + const selection = alias + "." + relation.propertyPath + if (qb.expressionMap.relationLoadStrategy === "query") { + qb.concatRelationMetadata(relation) + } else { + qb.leftJoinAndSelect(selection, relationAlias) + } // remove added relations from the allRelations array, this is needed to find all not found relations at the end allRelations.splice( allRelations.indexOf( - prefix ? prefix + "." + relation : relation, + prefix + ? prefix + "." + relation.propertyPath + : relation.propertyPath, ), 1, ) // try to find sub-relations - const join = qb.expressionMap.joinAttributes.find( - (join) => join.entityOrProperty === selection, - ) + let relationMetadata: EntityMetadata | undefined + let relationName: string | undefined + + if (qb.expressionMap.relationLoadStrategy === "query") { + relationMetadata = relation.inverseEntityMetadata + relationName = relationAlias + } else { + const join = qb.expressionMap.joinAttributes.find( + (join) => join.entityOrProperty === selection, + ) + relationMetadata = join!.metadata! + relationName = join!.alias.name + } + + if (!relationName || !relationMetadata) { + throw new EntityPropertyNotFoundError( + relation.propertyPath, + metadata, + ) + } + this.applyRelationsRecursively( qb, allRelations, - join!.alias.name, - join!.metadata!, - prefix ? prefix + "." + relation : relation, + relationName, + relationMetadata, + prefix + ? prefix + "." + relation.propertyPath + : relation.propertyPath, ) // join the eager relations of the found relation - const relMetadata = metadata.relations.find( - (metadata) => metadata.propertyName === relation, - ) - if (relMetadata) { - this.joinEagerRelations( - qb, - relationAlias, - relMetadata.inverseEntityMetadata, + // Only supported for "join" relationLoadStrategy + if (qb.expressionMap.relationLoadStrategy === "join") { + const relMetadata = metadata.relations.find( + (metadata) => + metadata.propertyName === relation.propertyPath, ) + if (relMetadata) { + this.joinEagerRelations( + qb, + relationAlias, + relMetadata.inverseEntityMetadata, + ) + } } }) } @@ -351,17 +387,17 @@ export class FindOptionsUtils { ) { metadata.eagerRelations.forEach((relation) => { // generate a relation alias - let relationAlias = DriverUtils.buildAlias( + let relationAlias: string = DriverUtils.buildAlias( qb.connection.driver, - qb.connection.namingStrategy.eagerJoinRelationAlias( - alias, - relation.propertyPath, - ), + { joiner: "__" }, + alias, + relation.propertyPath, ) // add a join for the relation // Checking whether the relation wasn't joined yet. let addJoin = true + // TODO: Review this validation for (const join of qb.expressionMap.joinAttributes) { if ( join.condition !== undefined || @@ -378,7 +414,14 @@ export class FindOptionsUtils { break } - if (addJoin) { + const joinAlreadyAdded = Boolean( + qb.expressionMap.joinAttributes.find( + (joinAttribute) => + joinAttribute.alias.name === relationAlias, + ), + ) + + if (addJoin && !joinAlreadyAdded) { qb.leftJoin(alias + "." + relation.propertyPath, relationAlias) } diff --git a/src/find-options/FindOptionsWhere.ts b/src/find-options/FindOptionsWhere.ts index 5b5707f867..5dec38e30b 100644 --- a/src/find-options/FindOptionsWhere.ts +++ b/src/find-options/FindOptionsWhere.ts @@ -1,25 +1,36 @@ import { FindOperator } from "./FindOperator" -import { ObjectID } from "../driver/mongodb/typings" +import { ObjectId } from "../driver/mongodb/typings" import { EqualOperator } from "./EqualOperator" /** * A single property handler for FindOptionsWhere. + * + * The reason why we have both "PropertyToBeNarrowed" and "Property" is that Union is narrowed down when extends is used. + * It means the result of FindOptionsWhereProperty<1 | 2> doesn't include FindOperator<1 | 2> but FindOperator<1> | FindOperator<2>. + * So we keep the original Union as Original and pass it to the FindOperator too. Original remains Union as extends is not used for it. */ -export type FindOptionsWhereProperty = Property extends Promise< - infer I -> +export type FindOptionsWhereProperty< + PropertyToBeNarrowed, + Property = PropertyToBeNarrowed, +> = PropertyToBeNarrowed extends Promise ? FindOptionsWhereProperty> - : Property extends Array + : PropertyToBeNarrowed extends Array ? FindOptionsWhereProperty> - : Property extends Function + : PropertyToBeNarrowed extends Function ? never - : Property extends Buffer + : PropertyToBeNarrowed extends Buffer ? Property | FindOperator - : Property extends Date + : PropertyToBeNarrowed extends Date ? Property | FindOperator - : Property extends ObjectID + : PropertyToBeNarrowed extends ObjectId ? Property | FindOperator - : Property extends object + : PropertyToBeNarrowed extends string + ? Property | FindOperator + : PropertyToBeNarrowed extends number + ? Property | FindOperator + : PropertyToBeNarrowed extends boolean + ? Property | FindOperator + : PropertyToBeNarrowed extends object ? | FindOptionsWhere | FindOptionsWhere[] @@ -28,7 +39,7 @@ export type FindOptionsWhereProperty = Property extends Promise< | boolean : Property | FindOperator -/** : +/** * Used for find operations. */ export type FindOptionsWhere = { diff --git a/src/find-options/mongodb/MongoFindOneOptions.ts b/src/find-options/mongodb/MongoFindOneOptions.ts index 5392927f27..75e46eee31 100644 --- a/src/find-options/mongodb/MongoFindOneOptions.ts +++ b/src/find-options/mongodb/MongoFindOneOptions.ts @@ -4,9 +4,12 @@ import { ObjectLiteral } from "../../common/ObjectLiteral" /** * Defines a special criteria to find specific entity. */ -export type MongoFindOneOptions = FindOneOptions & { +export type MongoFindOneOptions = Omit< + FindOneOptions, + "where" +> & { /** * Simple condition that should be applied to match entities. */ - where?: ObjectLiteral + where?: FindOneOptions["where"] | ObjectLiteral } diff --git a/src/find-options/operator/And.ts b/src/find-options/operator/And.ts new file mode 100644 index 0000000000..b2e9c13503 --- /dev/null +++ b/src/find-options/operator/And.ts @@ -0,0 +1,5 @@ +import { FindOperator } from "../FindOperator" + +export function And(...values: FindOperator[]): FindOperator { + return new FindOperator("and", values as any, true, true) +} diff --git a/src/find-options/operator/JsonContains.ts b/src/find-options/operator/JsonContains.ts new file mode 100644 index 0000000000..165180e6b7 --- /dev/null +++ b/src/find-options/operator/JsonContains.ts @@ -0,0 +1,11 @@ +import { FindOperator } from "../FindOperator" + +/** + * FindOptions Operator. + * Example: { someField: JsonContains({...}) } + */ +export function JsonContains< + T extends Record, +>(value: T | FindOperator): FindOperator { + return new FindOperator("jsonContains", value as any) +} diff --git a/src/globals.ts b/src/globals.ts index 8cd74ceca7..bb6615ccd8 100644 --- a/src/globals.ts +++ b/src/globals.ts @@ -84,7 +84,7 @@ export async function createConnection( * Creates a new connection and registers it in the manager. * * If connection options were not specified, then it will try to create connection automatically, - * based on content of ormconfig (json/js/yml/xml/env) file or environment variables. + * based on content of ormconfig (json/js/env) file or environment variables. * Only one connection from ormconfig will be created (name "default" or connection without name). * * @deprecated @@ -104,7 +104,7 @@ export async function createConnection( * Creates new connections and registers them in the manager. * * If connection options were not specified, then it will try to create connection automatically, - * based on content of ormconfig (json/js/yml/xml/env) file or environment variables. + * based on content of ormconfig (json/js/env) file or environment variables. * All connections from the ormconfig will be created. * * @deprecated diff --git a/src/index.ts b/src/index.ts index c7010c5f0d..97607928be 100644 --- a/src/index.ts +++ b/src/index.ts @@ -66,6 +66,7 @@ export * from "./decorator/Check" export * from "./decorator/Exclusion" export * from "./decorator/Generated" export * from "./decorator/EntityRepository" +export * from "./find-options/operator/And" export * from "./find-options/operator/Any" export * from "./find-options/operator/ArrayContainedBy" export * from "./find-options/operator/ArrayContains" @@ -82,6 +83,7 @@ export * from "./find-options/operator/MoreThan" export * from "./find-options/operator/MoreThanOrEqual" export * from "./find-options/operator/Not" export * from "./find-options/operator/Raw" +export * from "./find-options/operator/JsonContains" export * from "./find-options/EqualOperator" export * from "./find-options/FindManyOptions" export * from "./find-options/FindOneOptions" @@ -95,6 +97,7 @@ export * from "./find-options/FindOptionsWhere" export * from "./find-options/FindTreeOptions" export * from "./find-options/JoinOptions" export * from "./find-options/OrderByCondition" +export * from "./logger/AbstractLogger" export * from "./logger/Logger" export * from "./logger/LoggerOptions" export * from "./logger/AdvancedConsoleLogger" @@ -126,6 +129,7 @@ export * from "./schema-builder/options/TableUniqueOptions" export * from "./schema-builder/options/ViewOptions" export * from "./driver/mongodb/typings" export * from "./driver/types/DatabaseType" +export * from "./driver/types/GeoJsonTypes" export * from "./driver/types/ReplicationMode" export * from "./driver/sqlserver/MssqlParameter" @@ -159,6 +163,7 @@ export { MigrationExecutor } from "./migration/MigrationExecutor" export { MigrationInterface } from "./migration/MigrationInterface" export { DefaultNamingStrategy } from "./naming-strategy/DefaultNamingStrategy" export { NamingStrategyInterface } from "./naming-strategy/NamingStrategyInterface" +export { LegacyOracleNamingStrategy } from "./naming-strategy/LegacyOracleNamingStrategy" export { InsertEvent } from "./subscriber/event/InsertEvent" export { LoadEvent } from "./subscriber/event/LoadEvent" export { UpdateEvent } from "./subscriber/event/UpdateEvent" diff --git a/src/logger/AbstractLogger.ts b/src/logger/AbstractLogger.ts new file mode 100644 index 0000000000..217723006e --- /dev/null +++ b/src/logger/AbstractLogger.ts @@ -0,0 +1,354 @@ +import { + Logger, + LogLevel, + LogMessage, + LogMessageType, + PrepareLogMessagesOptions, +} from "./Logger" +import { QueryRunner } from "../query-runner/QueryRunner" +import { LoggerOptions } from "./LoggerOptions" +import { PlatformTools } from "../platform/PlatformTools" + +export abstract class AbstractLogger implements Logger { + // ------------------------------------------------------------------------- + // Constructor + // ------------------------------------------------------------------------- + + constructor(protected options?: LoggerOptions) {} + + // ------------------------------------------------------------------------- + // Public Methods + // ------------------------------------------------------------------------- + + /** + * Logs query and parameters used in it. + */ + logQuery(query: string, parameters?: any[], queryRunner?: QueryRunner) { + if (!this.isLogEnabledFor("query")) { + return + } + + this.writeLog( + "query", + { + type: "query", + prefix: "query", + message: query, + format: "sql", + parameters, + }, + queryRunner, + ) + } + + /** + * Logs query that is failed. + */ + logQueryError( + error: string, + query: string, + parameters?: any[], + queryRunner?: QueryRunner, + ) { + if (!this.isLogEnabledFor("query-error")) { + return + } + + this.writeLog( + "warn", + [ + { + type: "query-error", + prefix: "query failed", + message: query, + format: "sql", + parameters, + }, + { + type: "query-error", + prefix: "error", + message: error, + }, + ], + queryRunner, + ) + } + + /** + * Logs query that is slow. + */ + logQuerySlow( + time: number, + query: string, + parameters?: any[], + queryRunner?: QueryRunner, + ) { + if (!this.isLogEnabledFor("query-slow")) { + return + } + + this.writeLog( + "warn", + [ + { + type: "query-slow", + prefix: "query is slow", + message: query, + format: "sql", + parameters, + additionalInfo: { + time, + }, + }, + { + type: "query-slow", + prefix: "execution time", + message: time, + }, + ], + queryRunner, + ) + } + + /** + * Logs events from the schema build process. + */ + logSchemaBuild(message: string, queryRunner?: QueryRunner) { + if (!this.isLogEnabledFor("schema-build")) { + return + } + + this.writeLog( + "schema", + { + type: "schema-build", + message, + }, + queryRunner, + ) + } + + /** + * Logs events from the migration run process. + */ + logMigration(message: string, queryRunner?: QueryRunner) { + if (this.isLogEnabledFor("migration")) { + return + } + + this.writeLog( + "log", + { + type: "migration", + message, + }, + queryRunner, + ) + } + + /** + * Perform logging using given logger, or by default to the console. + * Log has its own level and message. + */ + log( + level: "log" | "info" | "warn", + message: any, + queryRunner?: QueryRunner, + ) { + switch (level) { + case "log": + if (!this.isLogEnabledFor("log")) { + return + } + + this.writeLog( + "log", + { + type: "log", + message, + }, + queryRunner, + ) + break + + case "info": + if (!this.isLogEnabledFor("info")) { + return + } + + this.writeLog( + "info", + { + type: "info", + prefix: "info", + message, + }, + queryRunner, + ) + break + + case "warn": + if (!this.isLogEnabledFor("warn")) { + return + } + + this.writeLog( + "warn", + { + type: "warn", + message, + }, + queryRunner, + ) + break + } + } + + // ------------------------------------------------------------------------- + // Protected Methods + // ------------------------------------------------------------------------- + + /** + * Check is logging for level or message type is enabled. + */ + protected isLogEnabledFor(type?: LogLevel | LogMessageType) { + switch (type) { + case "query": + return ( + this.options === "all" || + this.options === true || + (Array.isArray(this.options) && + this.options.indexOf("query") !== -1) + ) + + case "error": + case "query-error": + return ( + this.options === "all" || + this.options === true || + (Array.isArray(this.options) && + this.options.indexOf("error") !== -1) + ) + + case "query-slow": + return true + + case "schema": + case "schema-build": + return ( + this.options === "all" || + (Array.isArray(this.options) && + this.options.indexOf("schema") !== -1) + ) + + case "migration": + return true + + case "log": + return ( + this.options === "all" || + (Array.isArray(this.options) && + this.options.indexOf("log") !== -1) + ) + + case "info": + return ( + this.options === "all" || + (Array.isArray(this.options) && + this.options.indexOf("info") !== -1) + ) + + case "warn": + return ( + this.options === "all" || + (Array.isArray(this.options) && + this.options.indexOf("warn") !== -1) + ) + + default: + return false + } + } + + /** + * Write log to specific output. + */ + protected abstract writeLog( + level: LogLevel, + message: + | LogMessage + | string + | number + | (LogMessage | string | number)[], + queryRunner?: QueryRunner, + ): void + + /** + * Prepare and format log messages + */ + protected prepareLogMessages( + logMessage: + | LogMessage + | string + | number + | (LogMessage | string | number)[], + options?: Partial, + ): LogMessage[] { + options = { + ...{ + addColonToPrefix: true, + appendParameterAsComment: true, + highlightSql: true, + }, + ...options, + } + const messages = Array.isArray(logMessage) ? logMessage : [logMessage] + + for (let message of messages) { + if (typeof message !== "object") { + message = { + message, + } + } + + if (message.format === "sql") { + let sql = String(message.message) + + if ( + options.appendParameterAsComment && + message.parameters && + message.parameters.length + ) { + sql += ` -- PARAMETERS: ${this.stringifyParams( + message.parameters, + )}` + } + + if (options.highlightSql) { + sql = PlatformTools.highlightSql(sql) + } + + message.message = sql + } + + if (options.addColonToPrefix && message.prefix) { + message.prefix += ":" + } + } + + return messages as LogMessage[] + } + + /** + * Converts parameters to a string. + * Sometimes parameters can have circular objects and therefor we are handle this case too. + */ + protected stringifyParams(parameters: any[]) { + try { + return JSON.stringify(parameters) + } catch (error) { + // most probably circular objects in parameters + return parameters + } + } +} diff --git a/src/logger/AdvancedConsoleLogger.ts b/src/logger/AdvancedConsoleLogger.ts index 8d2e31de71..ddb66efe82 100644 --- a/src/logger/AdvancedConsoleLogger.ts +++ b/src/logger/AdvancedConsoleLogger.ts @@ -1,159 +1,65 @@ -import { LoggerOptions } from "./LoggerOptions" import { PlatformTools } from "../platform/PlatformTools" +import { AbstractLogger } from "./AbstractLogger" +import { LogLevel, LogMessage } from "./Logger" import { QueryRunner } from "../query-runner/QueryRunner" -import { Logger } from "./Logger" /** * Performs logging of the events in TypeORM. * This version of logger uses console to log events and use syntax highlighting. */ -export class AdvancedConsoleLogger implements Logger { - // ------------------------------------------------------------------------- - // Constructor - // ------------------------------------------------------------------------- - - constructor(private options?: LoggerOptions) {} - - // ------------------------------------------------------------------------- - // Public Methods - // ------------------------------------------------------------------------- - - /** - * Logs query and parameters used in it. - */ - logQuery(query: string, parameters?: any[], queryRunner?: QueryRunner) { - if ( - this.options === "all" || - this.options === true || - (Array.isArray(this.options) && - this.options.indexOf("query") !== -1) - ) { - const sql = - query + - (parameters && parameters.length - ? " -- PARAMETERS: " + this.stringifyParams(parameters) - : "") - PlatformTools.logInfo("query:", PlatformTools.highlightSql(sql)) - } - } - +export class AdvancedConsoleLogger extends AbstractLogger { /** - * Logs query that is failed. + * Write log to specific output. */ - logQueryError( - error: string, - query: string, - parameters?: any[], + protected writeLog( + level: LogLevel, + logMessage: LogMessage | LogMessage[], queryRunner?: QueryRunner, ) { - if ( - this.options === "all" || - this.options === true || - (Array.isArray(this.options) && - this.options.indexOf("error") !== -1) - ) { - const sql = - query + - (parameters && parameters.length - ? " -- PARAMETERS: " + this.stringifyParams(parameters) - : "") - PlatformTools.logError( - `query failed:`, - PlatformTools.highlightSql(sql), - ) - PlatformTools.logError(`error:`, error) - } - } - - /** - * Logs query that is slow. - */ - logQuerySlow( - time: number, - query: string, - parameters?: any[], - queryRunner?: QueryRunner, - ) { - const sql = - query + - (parameters && parameters.length - ? " -- PARAMETERS: " + this.stringifyParams(parameters) - : "") - PlatformTools.logWarn(`query is slow:`, PlatformTools.highlightSql(sql)) - PlatformTools.logWarn(`execution time:`, time) - } + const messages = this.prepareLogMessages(logMessage) - /** - * Logs events from the schema build process. - */ - logSchemaBuild(message: string, queryRunner?: QueryRunner) { - if ( - this.options === "all" || - (Array.isArray(this.options) && - this.options.indexOf("schema") !== -1) - ) { - PlatformTools.log(message) - } - } - - /** - * Logs events from the migration run process. - */ - logMigration(message: string, queryRunner?: QueryRunner) { - PlatformTools.log(message) - } + for (let message of messages) { + switch (message.type ?? level) { + case "log": + case "schema-build": + case "migration": + PlatformTools.log(String(message.message)) + break - /** - * Perform logging using given logger, or by default to the console. - * Log has its own level and message. - */ - log( - level: "log" | "info" | "warn", - message: any, - queryRunner?: QueryRunner, - ) { - switch (level) { - case "log": - if ( - this.options === "all" || - (Array.isArray(this.options) && - this.options.indexOf("log") !== -1) - ) - PlatformTools.log(message) - break - case "info": - if ( - this.options === "all" || - (Array.isArray(this.options) && - this.options.indexOf("info") !== -1) - ) - PlatformTools.logInfo("INFO:", message) - break - case "warn": - if ( - this.options === "all" || - (Array.isArray(this.options) && - this.options.indexOf("warn") !== -1) - ) - console.warn(PlatformTools.warn(message)) - break - } - } + case "info": + case "query": + if (message.prefix) { + PlatformTools.logInfo(message.prefix, message.message) + } else { + PlatformTools.log(String(message.message)) + } + break - // ------------------------------------------------------------------------- - // Protected Methods - // ------------------------------------------------------------------------- + case "warn": + case "query-slow": + if (message.prefix) { + PlatformTools.logWarn(message.prefix, message.message) + } else { + console.warn( + PlatformTools.warn(String(message.message)), + ) + } + break - /** - * Converts parameters to a string. - * Sometimes parameters can have circular objects and therefore we are handle this case too. - */ - protected stringifyParams(parameters: any[]) { - try { - return JSON.stringify(parameters) - } catch (error) { - // most probably circular objects in parameters - return parameters + case "error": + case "query-error": + if (message.prefix) { + PlatformTools.logError( + message.prefix, + String(message.message), + ) + } else { + console.error( + PlatformTools.error(String(message.message)), + ) + } + break + } } } } diff --git a/src/logger/DebugLogger.ts b/src/logger/DebugLogger.ts index dc35af08da..65e7472a37 100644 --- a/src/logger/DebugLogger.ts +++ b/src/logger/DebugLogger.ts @@ -1,113 +1,94 @@ -import debug from "debug" -import { Logger } from "./Logger" +import { AbstractLogger } from "./AbstractLogger" +import { debug, Debugger } from "debug" +import { LogLevel, LogMessage, LogMessageType } from "./Logger" import { QueryRunner } from "../query-runner/QueryRunner" -import { PlatformTools } from "../platform/PlatformTools" /** * Performs logging of the events in TypeORM via debug library. */ -export class DebugLogger implements Logger { - private debugQueryLog = debug("typeorm:query:log") - private debugQueryError = debug("typeorm:query:error") - private debugQuerySlow = debug("typeorm:query:slow") - private debugSchemaBuild = debug("typeorm:schema") - private debugMigration = debug("typeorm:migration") - - private debugLog = debug("typeorm:log") - private debugInfo = debug("typeorm:info") - private debugWarn = debug("typeorm:warn") - +export class DebugLogger extends AbstractLogger { /** - * Logs query and parameters used in it. + * Object with all debug logger. */ - logQuery(query: string, parameters?: any[], queryRunner?: QueryRunner) { - if (this.debugQueryLog.enabled) { - this.debugQueryLog(PlatformTools.highlightSql(query) + ";") - if (parameters && parameters.length) { - this.debugQueryLog("parameters:", parameters) - } - } + private logger: Record = { + log: debug("typeorm:log"), + info: debug("typeorm:info"), + warn: debug("typeorm:warn"), + error: debug("typeorm:error"), + query: debug("typeorm:query:log"), + "query-error": debug("typeorm:query:error"), + "query-slow": debug("typeorm:query:slow"), + "schema-build": debug("typeorm:schema"), + migration: debug("typeorm:migration"), } /** - * Logs query that failed. + * Check is logging for level or message type is enabled. */ - logQueryError( - error: string, - query: string, - parameters?: any[], - queryRunner?: QueryRunner, - ) { - if (this.debugQueryError.enabled) { - this.debugQueryError(PlatformTools.highlightSql(query) + ";") - if (parameters && parameters.length) { - this.debugQueryError("parameters:", parameters) - } - this.debugQueryError("error: ", error) - } - } + protected isLogEnabledFor(type?: LogLevel | LogMessageType) { + switch (type) { + case "query": + return this.logger["query"].enabled - /** - * Logs query that is slow. - */ - logQuerySlow( - time: number, - query: string, - parameters?: any[], - queryRunner?: QueryRunner, - ) { - if (this.debugQuerySlow.enabled) { - this.debugQuerySlow(PlatformTools.highlightSql(query) + ";") - if (parameters && parameters.length) { - this.debugQuerySlow("parameters:", parameters) - } - this.debugQuerySlow("execution time:", time) - } - } + case "query-error": + return this.logger["query-error"].enabled - /** - * Logs events from the schema build process. - */ - logSchemaBuild(message: string, queryRunner?: QueryRunner) { - if (this.debugSchemaBuild.enabled) { - this.debugSchemaBuild(message) - } - } + case "query-slow": + return true - /** - * Logs events from the migration run process. - */ - logMigration(message: string, queryRunner?: QueryRunner) { - if (this.debugMigration.enabled) { - this.debugMigration(message) + case "schema": + case "schema-build": + return this.logger["schema-build"].enabled + + case "migration": + return this.logger["migration"].enabled + + case "log": + return this.logger["log"].enabled + + case "info": + return this.logger["info"].enabled + + case "warn": + return this.logger["warn"].enabled + + default: + return false } } /** - * Perform logging using given logger. - * Log has its own level and message. + * Write log to specific output. */ - log( - level: "log" | "info" | "warn", - message: any, + protected writeLog( + level: LogLevel, + logMessage: LogMessage | LogMessage[], queryRunner?: QueryRunner, ) { - switch (level) { - case "log": - if (this.debugLog.enabled) { - this.debugLog(message) - } - break - case "info": - if (this.debugInfo.enabled) { - this.debugInfo(message) + const messages = this.prepareLogMessages(logMessage, { + appendParameterAsComment: false, + }) + + for (let message of messages) { + const messageTypeOrLevel = message.type ?? level + + if (messageTypeOrLevel in this.logger) { + if (message.prefix) { + this.logger[messageTypeOrLevel]( + message.prefix, + message.message, + ) + } else { + this.logger[messageTypeOrLevel](message.message) } - break - case "warn": - if (this.debugWarn.enabled) { - this.debugWarn(message) + + if (message.parameters && message.parameters.length) { + this.logger[messageTypeOrLevel]( + "parameters:", + message.parameters, + ) } - break + } } } } diff --git a/src/logger/FileLogger.ts b/src/logger/FileLogger.ts index 3c22047030..5e909fb42d 100644 --- a/src/logger/FileLogger.ts +++ b/src/logger/FileLogger.ts @@ -1,147 +1,93 @@ import { FileLoggerOptions, LoggerOptions } from "./LoggerOptions" +import { LogLevel, LogMessage } from "./Logger" import appRootPath from "app-root-path" import { QueryRunner } from "../query-runner/QueryRunner" -import { Logger } from "./Logger" import { PlatformTools } from "../platform/PlatformTools" +import { AbstractLogger } from "./AbstractLogger" /** * Performs logging of the events in TypeORM. * This version of logger logs everything into ormlogs.log file. */ -export class FileLogger implements Logger { +export class FileLogger extends AbstractLogger { // ------------------------------------------------------------------------- // Constructor // ------------------------------------------------------------------------- constructor( - private options?: LoggerOptions, + options?: LoggerOptions, private fileLoggerOptions?: FileLoggerOptions, - ) {} + ) { + super(options) + } // ------------------------------------------------------------------------- - // Public Methods + // Protected Methods // ------------------------------------------------------------------------- /** - * Logs query and parameters used in it. + * Write log to specific output. */ - logQuery(query: string, parameters?: any[], queryRunner?: QueryRunner) { - if ( - this.options === "all" || - this.options === true || - (Array.isArray(this.options) && - this.options.indexOf("query") !== -1) - ) { - const sql = - query + - (parameters && parameters.length - ? " -- PARAMETERS: " + this.stringifyParams(parameters) - : "") - this.write("[QUERY]: " + sql) - } - } - - /** - * Logs query that is failed. - */ - logQueryError( - error: string, - query: string, - parameters?: any[], + protected writeLog( + level: LogLevel, + logMessage: LogMessage | LogMessage[], queryRunner?: QueryRunner, ) { - if ( - this.options === "all" || - this.options === true || - (Array.isArray(this.options) && - this.options.indexOf("error") !== -1) - ) { - const sql = - query + - (parameters && parameters.length - ? " -- PARAMETERS: " + this.stringifyParams(parameters) - : "") - this.write([`[FAILED QUERY]: ${sql}`, `[QUERY ERROR]: ${error}`]) - } - } + const messages = this.prepareLogMessages(logMessage, { + highlightSql: false, + addColonToPrefix: false, + }) - /** - * Logs query that is slow. - */ - logQuerySlow( - time: number, - query: string, - parameters?: any[], - queryRunner?: QueryRunner, - ) { - const sql = - query + - (parameters && parameters.length - ? " -- PARAMETERS: " + this.stringifyParams(parameters) - : "") - this.write(`[SLOW QUERY: ${time} ms]: ` + sql) - } + const strings: string[] = [] - /** - * Logs events from the schema build process. - */ - logSchemaBuild(message: string, queryRunner?: QueryRunner) { - if ( - this.options === "all" || - (Array.isArray(this.options) && - this.options.indexOf("schema") !== -1) - ) { - this.write(message) - } - } + for (let message of messages) { + switch (message.type ?? level) { + case "log": + strings.push(`[LOG]: ${message.message}`) + break - /** - * Logs events from the migrations run process. - */ - logMigration(message: string, queryRunner?: QueryRunner) { - this.write(message) - } + case "schema-build": + case "migration": + strings.push(String(message.message)) + break - /** - * Perform logging using given logger, or by default to the console. - * Log has its own level and message. - */ - log( - level: "log" | "info" | "warn", - message: any, - queryRunner?: QueryRunner, - ) { - switch (level) { - case "log": - if ( - this.options === "all" || - (Array.isArray(this.options) && - this.options.indexOf("log") !== -1) - ) - this.write("[LOG]: " + message) - break - case "info": - if ( - this.options === "all" || - (Array.isArray(this.options) && - this.options.indexOf("info") !== -1) - ) - this.write("[INFO]: " + message) - break - case "warn": - if ( - this.options === "all" || - (Array.isArray(this.options) && - this.options.indexOf("warn") !== -1) - ) - this.write("[WARN]: " + message) - break + case "info": + strings.push(`[INFO]: ${message.message}`) + break + + case "query": + strings.push(`[QUERY]: ${message.message}`) + break + + case "warn": + strings.push(`[WARN]: ${message.message}`) + break + + case "query-slow": + if (message.prefix === "execution time") { + continue + } + + this.write( + `[SLOW QUERY: ${message.additionalInfo?.time} ms]: ${message.message}`, + ) + break + + case "error": + case "query-error": + if (message.prefix === "query failed") { + strings.push(`[FAILED QUERY]: ${message.message}`) + } else if (message.type === "query-error") { + strings.push(`[QUERY ERROR]: ${message.message}`) + } else { + strings.push(`[ERROR]: ${message.message}`) + } + break + } } - } - // ------------------------------------------------------------------------- - // Protected Methods - // ------------------------------------------------------------------------- + this.write(strings) + } /** * Writes given strings into the log file. @@ -163,17 +109,4 @@ export class FileLogger implements Logger { strings.join("\r\n") + "\r\n", ) // todo: use async or implement promises? } - - /** - * Converts parameters to a string. - * Sometimes parameters can have circular objects and therefor we are handle this case too. - */ - protected stringifyParams(parameters: any[]) { - try { - return JSON.stringify(parameters) - } catch (error) { - // most probably circular objects in parameters - return parameters - } - } } diff --git a/src/logger/Logger.ts b/src/logger/Logger.ts index 534066a69c..0f7ba9c78a 100644 --- a/src/logger/Logger.ts +++ b/src/logger/Logger.ts @@ -49,3 +49,55 @@ export interface Logger { queryRunner?: QueryRunner, ): any } + +/** + * Log level. + */ +export type LogLevel = + | "query" + | "schema" + | "error" + | "warn" + | "info" + | "log" + | "migration" + +/** + * Log message. + */ +export type LogMessage = { + type?: LogMessageType + prefix?: string + message: string | number + format?: LogMessageFormat + parameters?: any[] + additionalInfo?: Record +} + +/** + * Log message format. + */ +export type LogMessageFormat = "sql" + +/** + * Log message type. + */ +export type LogMessageType = + | "log" + | "info" + | "warn" + | "error" + | "query" + | "query-error" + | "query-slow" + | "schema-build" + | "migration" + +/** + * Options for prepare log messages + */ +export type PrepareLogMessagesOptions = { + highlightSql: boolean + appendParameterAsComment: boolean + addColonToPrefix: boolean +} diff --git a/src/logger/LoggerOptions.ts b/src/logger/LoggerOptions.ts index fc95914880..69e0034428 100644 --- a/src/logger/LoggerOptions.ts +++ b/src/logger/LoggerOptions.ts @@ -1,10 +1,9 @@ +import { LogLevel } from "./Logger" + /** * Logging options. */ -export type LoggerOptions = - | boolean - | "all" - | ("query" | "schema" | "error" | "warn" | "info" | "log" | "migration")[] +export type LoggerOptions = boolean | "all" | LogLevel[] /** * File logging option. diff --git a/src/logger/SimpleConsoleLogger.ts b/src/logger/SimpleConsoleLogger.ts index 2622422612..2bcbdcc509 100644 --- a/src/logger/SimpleConsoleLogger.ts +++ b/src/logger/SimpleConsoleLogger.ts @@ -1,155 +1,59 @@ -import { LoggerOptions } from "./LoggerOptions" +import { AbstractLogger } from "./AbstractLogger" +import { LogLevel, LogMessage } from "./Logger" import { QueryRunner } from "../query-runner/QueryRunner" -import { Logger } from "./Logger" /** * Performs logging of the events in TypeORM. * This version of logger uses console to log events and does not use syntax highlighting. */ -export class SimpleConsoleLogger implements Logger { - // ------------------------------------------------------------------------- - // Constructor - // ------------------------------------------------------------------------- - - constructor(private options?: LoggerOptions) {} - - // ------------------------------------------------------------------------- - // Public Methods - // ------------------------------------------------------------------------- - - /** - * Logs query and parameters used in it. - */ - logQuery(query: string, parameters?: any[], queryRunner?: QueryRunner) { - if ( - this.options === "all" || - this.options === true || - (Array.isArray(this.options) && - this.options.indexOf("query") !== -1) - ) { - const sql = - query + - (parameters && parameters.length - ? " -- PARAMETERS: " + this.stringifyParams(parameters) - : "") - console.log("query" + ": " + sql) - } - } - - /** - * Logs query that is failed. - */ - logQueryError( - error: string, - query: string, - parameters?: any[], - queryRunner?: QueryRunner, - ) { - if ( - this.options === "all" || - this.options === true || - (Array.isArray(this.options) && - this.options.indexOf("error") !== -1) - ) { - const sql = - query + - (parameters && parameters.length - ? " -- PARAMETERS: " + this.stringifyParams(parameters) - : "") - console.log(`query failed: ` + sql) - console.log(`error:`, error) - } - } - - /** - * Logs query that is slow. - */ - logQuerySlow( - time: number, - query: string, - parameters?: any[], - queryRunner?: QueryRunner, - ) { - const sql = - query + - (parameters && parameters.length - ? " -- PARAMETERS: " + this.stringifyParams(parameters) - : "") - console.log(`query is slow: ` + sql) - console.log(`execution time: ` + time) - } - - /** - * Logs events from the schema build process. - */ - logSchemaBuild(message: string, queryRunner?: QueryRunner) { - if ( - this.options === "all" || - (Array.isArray(this.options) && - this.options.indexOf("schema") !== -1) - ) { - console.log(message) - } - } - - /** - * Logs events from the migrations run process. - */ - logMigration(message: string, queryRunner?: QueryRunner) { - console.log(message) - } - +export class SimpleConsoleLogger extends AbstractLogger { /** - * Perform logging using given logger, or by default to the console. - * Log has its own level and message. + * Write log to specific output. */ - log( - level: "log" | "info" | "warn", - message: any, + protected writeLog( + level: LogLevel, + logMessage: LogMessage | LogMessage[], queryRunner?: QueryRunner, ) { - switch (level) { - case "log": - if ( - this.options === "all" || - (Array.isArray(this.options) && - this.options.indexOf("log") !== -1) - ) - console.log(message) - break - case "info": - if ( - this.options === "all" || - (Array.isArray(this.options) && - this.options.indexOf("info") !== -1) - ) - console.info(message) - break - case "warn": - if ( - this.options === "all" || - (Array.isArray(this.options) && - this.options.indexOf("warn") !== -1) - ) - console.warn(message) - break - } - } - - // ------------------------------------------------------------------------- - // Protected Methods - // ------------------------------------------------------------------------- - - /** - * Converts parameters to a string. - * Sometimes parameters can have circular objects and therefor we are handle this case too. - */ - protected stringifyParams(parameters: any[]) { - try { - return JSON.stringify(parameters) - } catch (error) { - // most probably circular objects in parameters - return parameters + const messages = this.prepareLogMessages(logMessage, { + highlightSql: false, + }) + + for (let message of messages) { + switch (message.type ?? level) { + case "log": + case "schema-build": + case "migration": + console.log(message.message) + break + + case "info": + case "query": + if (message.prefix) { + console.info(message.prefix, message.message) + } else { + console.info(message.message) + } + break + + case "warn": + case "query-slow": + if (message.prefix) { + console.warn(message.prefix, message.message) + } else { + console.warn(message.message) + } + break + + case "error": + case "query-error": + if (message.prefix) { + console.error(message.prefix, message.message) + } else { + console.error(message.message) + } + break + } } } } diff --git a/src/metadata-args/JoinTableMetadataArgs.ts b/src/metadata-args/JoinTableMetadataArgs.ts index aef86ca35c..10d62cd74a 100644 --- a/src/metadata-args/JoinTableMetadataArgs.ts +++ b/src/metadata-args/JoinTableMetadataArgs.ts @@ -41,4 +41,11 @@ export interface JoinTableMetadataArgs { * Works only in some databases (like postgres and mssql). */ readonly schema?: string + + /** + * Indicates if schema synchronization is enabled or disabled junction table. + * If it will be set to false then schema sync will and migrations ignores junction table. + * By default schema synchronization is enabled. + */ + readonly synchronize?: boolean } diff --git a/src/metadata-builder/EntityMetadataBuilder.ts b/src/metadata-builder/EntityMetadataBuilder.ts index 24fd9a75a1..d67dd20581 100644 --- a/src/metadata-builder/EntityMetadataBuilder.ts +++ b/src/metadata-builder/EntityMetadataBuilder.ts @@ -607,6 +607,23 @@ export class EntityMetadataBuilder { ) { entityMetadata.ownColumns.push(discriminatorColumn) } + // also copy the inheritance pattern & tree metadata + // this comes in handy when inheritance and trees are used together + entityMetadata.inheritancePattern = + entityMetadata.parentEntityMetadata.inheritancePattern + if ( + !entityMetadata.treeType && + !!entityMetadata.parentEntityMetadata.treeType + ) { + entityMetadata.treeType = + entityMetadata.parentEntityMetadata.treeType + entityMetadata.treeOptions = + entityMetadata.parentEntityMetadata.treeOptions + entityMetadata.treeParentRelation = + entityMetadata.parentEntityMetadata.treeParentRelation + entityMetadata.treeLevelColumn = + entityMetadata.parentEntityMetadata.treeLevelColumn + } } const { namingStrategy } = this.connection diff --git a/src/metadata-builder/EntityMetadataValidator.ts b/src/metadata-builder/EntityMetadataValidator.ts index 8862e275a6..6d78c49b06 100644 --- a/src/metadata-builder/EntityMetadataValidator.ts +++ b/src/metadata-builder/EntityMetadataValidator.ts @@ -226,6 +226,28 @@ export class EntityMetadataValidator { // validate relations entityMetadata.relations.forEach((relation) => { + // check OnDeleteTypes + if ( + driver.supportedOnDeleteTypes && + relation.onDelete && + !driver.supportedOnDeleteTypes.includes(relation.onDelete) + ) { + throw new TypeORMError( + `OnDeleteType "${relation.onDelete}" is not supported for ${driver.options.type}!`, + ) + } + + // check OnUpdateTypes + if ( + driver.supportedOnUpdateTypes && + relation.onUpdate && + !driver.supportedOnUpdateTypes.includes(relation.onUpdate) + ) { + throw new TypeORMError( + `OnUpdateType "${relation.onUpdate}" is not valid for ${driver.options.type}!`, + ) + } + // check join tables: // using JoinTable is possible only on one side of the many-to-many relation // todo(dima): fix diff --git a/src/metadata-builder/JunctionEntityMetadataBuilder.ts b/src/metadata-builder/JunctionEntityMetadataBuilder.ts index 889fa7e628..6e1424ae6f 100644 --- a/src/metadata-builder/JunctionEntityMetadataBuilder.ts +++ b/src/metadata-builder/JunctionEntityMetadataBuilder.ts @@ -59,6 +59,7 @@ export class JunctionEntityMetadataBuilder { database: joinTable.database || relation.entityMetadata.database, schema: joinTable.schema || relation.entityMetadata.schema, + synchronize: joinTable.synchronize, }, }) entityMetadata.build() @@ -101,6 +102,10 @@ export class JunctionEntityMetadataBuilder { ) || this.connection.driver.options.type === "aurora-mysql") && + // some versions of mariadb support the column type and should not try to provide the length property + this.connection.driver.normalizeType( + referencedColumn, + ) !== "uuid" && (referencedColumn.generationStrategy === "uuid" || referencedColumn.type === "uuid") ? "36" @@ -165,6 +170,10 @@ export class JunctionEntityMetadataBuilder { ) || this.connection.driver.options.type === "aurora-mysql") && + // some versions of mariadb support the column type and should not try to provide the length property + this.connection.driver.normalizeType( + inverseReferencedColumn, + ) !== "uuid" && (inverseReferencedColumn.generationStrategy === "uuid" || inverseReferencedColumn.type === "uuid") diff --git a/src/metadata-builder/RelationJoinColumnBuilder.ts b/src/metadata-builder/RelationJoinColumnBuilder.ts index 5d32530ff3..1fe64ef1e8 100644 --- a/src/metadata-builder/RelationJoinColumnBuilder.ts +++ b/src/metadata-builder/RelationJoinColumnBuilder.ts @@ -34,7 +34,7 @@ import { DriverUtils } from "../driver/DriverUtils" * ]) * * Since for many-to-one relations having JoinColumn decorator is not required, - * we need to go thought each many-to-one relation without join column decorator set + * we need to go through each many-to-one relation without join column decorator set * and create join column metadata args for them. */ export class RelationJoinColumnBuilder { @@ -80,39 +80,39 @@ export class RelationJoinColumnBuilder { entityMetadata: relation.entityMetadata, referencedEntityMetadata: relation.inverseEntityMetadata, namingStrategy: this.connection.namingStrategy, - columns: columns, - referencedColumns: referencedColumns, + columns, + referencedColumns, onDelete: relation.onDelete, onUpdate: relation.onUpdate, deferrable: relation.deferrable, }) - // Oracle does not allow both primary and unique constraints on the same column + // SQL requires UNIQUE/PK constraints on columns referenced by a FK + // Skip creating the unique constraint for the referenced columns if + // they are already contained in the PK of the referenced entity if ( - this.connection.driver.options.type === "oracle" && - columns.every((column) => column.isPrimary) - ) + columns.every((column) => column.isPrimary) || + !relation.isOneToOne + ) { return { foreignKey, columns, uniqueConstraint: undefined } - - // CockroachDB requires UNIQUE constraints on referenced columns - if (referencedColumns.length > 0 && relation.isOneToOne) { - const uniqueConstraint = new UniqueMetadata({ - entityMetadata: relation.entityMetadata, - columns: foreignKey.columns, - args: { - name: this.connection.namingStrategy.relationConstraintName( - relation.entityMetadata.tableName, - foreignKey.columns.map((c) => c.databaseName), - ), - target: relation.entityMetadata.target, - }, - }) - uniqueConstraint.build(this.connection.namingStrategy) - return { foreignKey, columns, uniqueConstraint } } - return { foreignKey, columns, uniqueConstraint: undefined } + const uniqueConstraint = new UniqueMetadata({ + entityMetadata: relation.entityMetadata, + columns: foreignKey.columns, + args: { + name: this.connection.namingStrategy.relationConstraintName( + relation.entityMetadata.tableName, + foreignKey.columns.map((column) => column.databaseName), + ), + target: relation.entityMetadata.target, + }, + }) + uniqueConstraint.build(this.connection.namingStrategy) + + return { foreignKey, columns, uniqueConstraint } } + // ------------------------------------------------------------------------- // Protected Methods // ------------------------------------------------------------------------- @@ -208,6 +208,10 @@ export class RelationJoinColumnBuilder { ) || this.connection.driver.options.type === "aurora-mysql") && + // some versions of mariadb support the column type and should not try to provide the length property + this.connection.driver.normalizeType( + referencedColumn, + ) !== "uuid" && (referencedColumn.generationStrategy === "uuid" || referencedColumn.type === "uuid") diff --git a/src/metadata/EmbeddedMetadata.ts b/src/metadata/EmbeddedMetadata.ts index 2ce0a6063b..1ef081a0ee 100644 --- a/src/metadata/EmbeddedMetadata.ts +++ b/src/metadata/EmbeddedMetadata.ts @@ -199,10 +199,10 @@ export class EmbeddedMetadata { return {} } - if (!options?.fromDeserializer || this.isAlwaysUsingConstructor) { - return new (this.type as any)() - } else { + if (options?.fromDeserializer || !this.isAlwaysUsingConstructor) { return Object.create(this.type.prototype) + } else { + return new (this.type as any)() } } diff --git a/src/metadata/EntityMetadata.ts b/src/metadata/EntityMetadata.ts index eba5c5822e..311d87ac57 100644 --- a/src/metadata/EntityMetadata.ts +++ b/src/metadata/EntityMetadata.ts @@ -829,31 +829,67 @@ export class EntityMetadata { relationsAndValues.push([ relation, subValue, - this.getInverseEntityMetadata(subValue, relation), + EntityMetadata.getInverseEntityMetadata( + subValue, + relation, + ), ]), ) } else if (value) { relationsAndValues.push([ relation, value, - this.getInverseEntityMetadata(value, relation), + EntityMetadata.getInverseEntityMetadata(value, relation), ]) } }) return relationsAndValues } - private getInverseEntityMetadata( + /** + * In the case of SingleTableInheritance, find the correct metadata + * for a given value. + * + * @param value The value to find the metadata for. + * @returns The found metadata for the entity or the base metadata if no matching metadata + * was found in the whole inheritance tree. + */ + findInheritanceMetadata(value: any): EntityMetadata { + // Check for single table inheritance and find the correct metadata in that case. + // Goal is to use the correct discriminator as we could have a repository + // for an (abstract) base class and thus the target would not match. + + if ( + this.inheritancePattern === "STI" && + this.childEntityMetadatas.length > 0 + ) { + // There could be a column on the base class that can manually be set to override the type. + let manuallySetDiscriminatorValue: unknown + if (this.discriminatorColumn) { + manuallySetDiscriminatorValue = + value[this.discriminatorColumn.propertyName] + } + return ( + this.childEntityMetadatas.find( + (meta) => + manuallySetDiscriminatorValue === + meta.discriminatorValue || + value.constructor === meta.target, + ) || this + ) + } + return this + } + + // ------------------------------------------------------------------------- + // Private Static Methods + // ------------------------------------------------------------------------- + + private static getInverseEntityMetadata( value: any, relation: RelationMetadata, ): EntityMetadata { - const childEntityMetadata = - relation.inverseEntityMetadata.childEntityMetadatas.find( - (metadata) => metadata.target === value.constructor, - ) - return childEntityMetadata - ? childEntityMetadata - : relation.inverseEntityMetadata + return relation.inverseEntityMetadata.findInheritanceMetadata(value) } // ------------------------------------------------------------------------- diff --git a/src/migration/Migration.ts b/src/migration/Migration.ts index 6067db0d18..26d0b76ef7 100644 --- a/src/migration/Migration.ts +++ b/src/migration/Migration.ts @@ -29,6 +29,11 @@ export class Migration { */ instance?: MigrationInterface + /** + * Whether to run this migration within a transaction + */ + transaction?: boolean + // ------------------------------------------------------------------------- // Constructor // ------------------------------------------------------------------------- @@ -38,10 +43,12 @@ export class Migration { timestamp: number, name: string, instance?: MigrationInterface, + transaction?: boolean, ) { this.id = id this.timestamp = timestamp this.name = name this.instance = instance + this.transaction = transaction } } diff --git a/src/migration/MigrationExecutor.ts b/src/migration/MigrationExecutor.ts index 3e17691000..1c0eee35c4 100644 --- a/src/migration/MigrationExecutor.ts +++ b/src/migration/MigrationExecutor.ts @@ -7,7 +7,7 @@ import { ObjectLiteral } from "../common/ObjectLiteral" import { QueryRunner } from "../query-runner/QueryRunner" import { MssqlParameter } from "../driver/sqlserver/MssqlParameter" import { MongoQueryRunner } from "../driver/mongodb/MongoQueryRunner" -import { TypeORMError } from "../error" +import { ForbiddenTransactionModeOverrideError, TypeORMError } from "../error" import { InstanceChecker } from "../util/InstanceChecker" /** @@ -169,7 +169,9 @@ export class MigrationExecutor { ) if (executedMigration) { - this.connection.logger.logSchemaBuild(`[X] ${migration.name}`) + this.connection.logger.logSchemaBuild( + `[X] ${executedMigration.id} ${migration.name}`, + ) } else { hasUnappliedMigrations = true this.connection.logger.logSchemaBuild(`[ ] ${migration.name}`) @@ -259,9 +261,59 @@ export class MigrationExecutor { `${pendingMigrations.length} migrations are new migrations must be executed.`, ) + if (this.transaction === "all") { + // If we desire to run all migrations in a single transaction + // but there is a migration that explicitly overrides the transaction mode + // then we have to fail since we cannot properly resolve that intent + // In theory we could support overrides that are set to `true`, + // however to keep the interface more rigid, we fail those too + const migrationsOverridingTransactionMode = + pendingMigrations.filter( + (migration) => + !(migration.instance?.transaction === undefined), + ) + + if (migrationsOverridingTransactionMode.length > 0) { + const error = new ForbiddenTransactionModeOverrideError( + migrationsOverridingTransactionMode, + ) + this.connection.logger.logMigration( + `Migrations failed, error: ${error.message}`, + ) + throw error + } + } + + // Set the per-migration defaults for the transaction mode + // so that we have one centralized place that controls this behavior + + // When transaction mode is `each` the default is to run in a transaction + // When transaction mode is `none` the default is to not run in a transaction + // When transaction mode is `all` the default is to not run in a transaction + // since all the migrations are already running in one single transaction + + const txModeDefault = { + each: true, + none: false, + all: false, + }[this.transaction] + + for (const migration of pendingMigrations) { + if (migration.instance) { + const instanceTx = migration.instance.transaction + + if (instanceTx === undefined) { + migration.transaction = txModeDefault + } else { + migration.transaction = instanceTx + } + } + } + // start transaction if its not started yet let transactionStartedByUs = false if (this.transaction === "all" && !queryRunner.isTransactionActive) { + await queryRunner.beforeMigration() await queryRunner.startTransaction() transactionStartedByUs = true } @@ -277,10 +329,8 @@ export class MigrationExecutor { continue } - if ( - this.transaction === "each" && - !queryRunner.isTransactionActive - ) { + if (migration.transaction && !queryRunner.isTransactionActive) { + await queryRunner.beforeMigration() await queryRunner.startTransaction() transactionStartedByUs = true } @@ -301,11 +351,10 @@ export class MigrationExecutor { migration, ) // commit transaction if we started it - if ( - this.transaction === "each" && - transactionStartedByUs - ) + if (migration.transaction && transactionStartedByUs) { await queryRunner.commitTransaction() + await queryRunner.afterMigration() + } }) .then(() => { // informative log about migration success @@ -319,8 +368,10 @@ export class MigrationExecutor { } // commit transaction if we started it - if (this.transaction === "all" && transactionStartedByUs) + if (this.transaction === "all" && transactionStartedByUs) { await queryRunner.commitTransaction() + await queryRunner.afterMigration() + } } catch (err) { // rollback transaction if we started it if (transactionStartedByUs) { @@ -366,7 +417,7 @@ export class MigrationExecutor { // if no migrations found in the database then nothing to revert if (!lastTimeExecutedMigration) { this.connection.logger.logSchemaBuild( - `No migrations was found in the database. Nothing to revert!`, + `No migrations were found in the database. Nothing to revert!`, ) return } @@ -503,10 +554,8 @@ export class MigrationExecutor { ): Promise { if (this.connection.driver.options.type === "mongodb") { const mongoRunner = queryRunner as MongoQueryRunner - return await mongoRunner.databaseConnection - .db(this.connection.driver.database!) - .collection(this.migrationsTableName) - .find() + return mongoRunner + .cursor(this.migrationsTableName, {}) .sort({ _id: -1 }) .toArray() } else { @@ -694,7 +743,7 @@ export class MigrationExecutor { this.queryRunner || this.connection.createQueryRunner() try { - return callback(queryRunner) + return await callback(queryRunner) } finally { if (!this.queryRunner) { await queryRunner.release() diff --git a/src/migration/MigrationInterface.ts b/src/migration/MigrationInterface.ts index fae1d97552..bc575db847 100644 --- a/src/migration/MigrationInterface.ts +++ b/src/migration/MigrationInterface.ts @@ -9,6 +9,14 @@ export interface MigrationInterface { */ name?: string + /** + * Optional flag to determine whether to run the migration in a transaction or not. + * Can only be used when `migrationsTransactionMode` is either "each" or "none" + * Defaults to `true` when `migrationsTransactionMode` is "each" + * Defaults to `false` when `migrationsTransactionMode` is "none" + */ + transaction?: boolean + /** * Run the migrations. */ diff --git a/src/naming-strategy/LegacyOracleNamingStrategy.ts b/src/naming-strategy/LegacyOracleNamingStrategy.ts new file mode 100644 index 0000000000..2aef7d8151 --- /dev/null +++ b/src/naming-strategy/LegacyOracleNamingStrategy.ts @@ -0,0 +1,71 @@ +import { NamingStrategyInterface } from "./NamingStrategyInterface" +import { RandomGenerator } from "../util/RandomGenerator" +import { DefaultNamingStrategy } from "./DefaultNamingStrategy" +import { TypeORMError } from "../error" + +/** + * Shorten strategy + */ +export type ShortenStrategy = "truncate" | "hash" + +/** + * Naming strategy for legacy Oracle database with 30 bytes identifier limit. + * + * Currently, only column name must be shorten in order to avoid ORA-00972. + * Issues with other identifiers were fixed. + */ +export class LegacyOracleNamingStrategy + extends DefaultNamingStrategy + implements NamingStrategyInterface +{ + public readonly IDENTIFIER_MAX_SIZE = 30 + public readonly DEFAULT_COLUMN_PREFIX = "COL_" + protected shortenStrategy: ShortenStrategy + + constructor(shortenStrategy: ShortenStrategy = "hash") { + super() + this.shortenStrategy = shortenStrategy + } + + columnName( + propertyName: string, + customName: string, + embeddedPrefixes: string[], + ): string { + const longName: string = super.columnName( + propertyName, + customName, + embeddedPrefixes, + ) + if (this.shortenStrategy === "truncate") { + return this.truncateIdentifier(longName) + } else if (this.shortenStrategy === "hash") { + return this.hashIdentifier(longName, this.DEFAULT_COLUMN_PREFIX) + } else { + throw new TypeORMError(`Invalid shortenStrategy`) + } + } + + protected hashIdentifier(input: string, prefix: string): string { + if (prefix.length >= this.IDENTIFIER_MAX_SIZE) { + throw new TypeORMError( + `Prefix must be shorter than IDENTIFIER_MAX_SIZE`, + ) + } + return ( + prefix + + RandomGenerator.sha1(input).substring( + 0, + this.IDENTIFIER_MAX_SIZE - prefix.length, + ) + ) + } + + protected truncateIdentifier(input: string): string { + if (input.length > this.IDENTIFIER_MAX_SIZE) { + return input.substring(0, this.IDENTIFIER_MAX_SIZE) + } else { + return input + } + } +} diff --git a/src/naming-strategy/NamingStrategyInterface.ts b/src/naming-strategy/NamingStrategyInterface.ts index ebee23132e..fb4f1e0585 100644 --- a/src/naming-strategy/NamingStrategyInterface.ts +++ b/src/naming-strategy/NamingStrategyInterface.ts @@ -1,4 +1,5 @@ import { Table } from "../schema-builder/table/Table" +import { View } from "../schema-builder/view/View" /** * Naming strategy defines how auto-generated names for such things like table name, or table column gonna be @@ -84,7 +85,7 @@ export interface NamingStrategyInterface { * Gets the name of the index - simple and compose index. */ indexName( - tableOrName: Table | string, + tableOrName: Table | View | string, columns: string[], where?: string, ): string diff --git a/src/persistence/EntityPersistExecutor.ts b/src/persistence/EntityPersistExecutor.ts index 67a5616093..afe53347eb 100644 --- a/src/persistence/EntityPersistExecutor.ts +++ b/src/persistence/EntityPersistExecutor.ts @@ -81,24 +81,9 @@ export class EntityPersistExecutor { if (entityTarget === Object) throw new CannotDetermineEntityError(this.mode) - let metadata = this.connection.getMetadata(entityTarget) - - // Check for single table inheritance and find the correct metadata in that case. - // Goal is to use the correct discriminator as we could have a repository - // for an (abstract) base class and thus the target would not match. - if ( - metadata.inheritancePattern === "STI" && - metadata.childEntityMetadatas.length > 0 - ) { - const matchingChildMetadata = - metadata.childEntityMetadatas.find( - (meta) => - entity.constructor === meta.target, - ) - if (matchingChildMetadata) { - metadata = matchingChildMetadata - } - } + let metadata = this.connection + .getMetadata(entityTarget) + .findInheritanceMetadata(entity) subjects.push( new Subject({ @@ -181,7 +166,10 @@ export class EntityPersistExecutor { try { // open transaction if its not opened yet if (!queryRunner.isTransactionActive) { - if (!this.options || this.options.transaction !== false) { + if ( + this.connection.driver.transactionSupport !== "none" && + (!this.options || this.options.transaction !== false) + ) { // start transaction until it was not explicitly disabled isTransactionStartedByUs = true await queryRunner.startTransaction() diff --git a/src/persistence/SubjectChangedColumnsComputer.ts b/src/persistence/SubjectChangedColumnsComputer.ts index bdf5581419..c7dd51a816 100644 --- a/src/persistence/SubjectChangedColumnsComputer.ts +++ b/src/persistence/SubjectChangedColumnsComputer.ts @@ -166,7 +166,10 @@ export class SubjectChangedColumnsComputer { if (normalizedValue === databaseValue) return } } - subject.diffColumns.push(column) + + if (!subject.diffColumns.includes(column)) + subject.diffColumns.push(column) + subject.changeMaps.push({ column: column, value: entityValue, diff --git a/src/persistence/SubjectExecutor.ts b/src/persistence/SubjectExecutor.ts index c77517ce25..e80333a9fe 100644 --- a/src/persistence/SubjectExecutor.ts +++ b/src/persistence/SubjectExecutor.ts @@ -261,6 +261,7 @@ export class SubjectExecutor { subject.metadata, subject.entity!, subject.databaseEntity, + subject.identifier, ), ) if (this.softRemoveSubjects.length) @@ -270,6 +271,7 @@ export class SubjectExecutor { subject.metadata, subject.entity!, subject.databaseEntity, + subject.identifier, ), ) if (this.recoverSubjects.length) @@ -279,6 +281,7 @@ export class SubjectExecutor { subject.metadata, subject.entity!, subject.databaseEntity, + subject.identifier, ), ) return result @@ -317,6 +320,7 @@ export class SubjectExecutor { subject.metadata, subject.entity!, subject.databaseEntity, + subject.identifier, ), ) if (this.softRemoveSubjects.length) @@ -326,6 +330,7 @@ export class SubjectExecutor { subject.metadata, subject.entity!, subject.databaseEntity, + subject.identifier, ), ) if (this.recoverSubjects.length) @@ -335,6 +340,7 @@ export class SubjectExecutor { subject.metadata, subject.entity!, subject.databaseEntity, + subject.identifier, ), ) return result diff --git a/src/persistence/SubjectTopoligicalSorter.ts b/src/persistence/SubjectTopoligicalSorter.ts index 56f3ac1065..b4be74ead9 100644 --- a/src/persistence/SubjectTopoligicalSorter.ts +++ b/src/persistence/SubjectTopoligicalSorter.ts @@ -69,8 +69,9 @@ export class SubjectTopoligicalSorter { const entityTargetSubjects = this.subjects.filter( (subject) => subject.metadata.targetName === sortedEntityTarget || - subject.metadata.parentEntityMetadata?.targetName === - sortedEntityTarget, + subject.metadata.inheritanceTree.some( + (s) => s.name === sortedEntityTarget, + ), ) sortedSubjects.push(...entityTargetSubjects) this.removeAlreadySorted(entityTargetSubjects) diff --git a/src/persistence/tree/MaterializedPathSubjectExecutor.ts b/src/persistence/tree/MaterializedPathSubjectExecutor.ts index 1753b9c3a0..fd14dd1865 100644 --- a/src/persistence/tree/MaterializedPathSubjectExecutor.ts +++ b/src/persistence/tree/MaterializedPathSubjectExecutor.ts @@ -2,6 +2,9 @@ import { Subject } from "../Subject" import { QueryRunner } from "../../query-runner/QueryRunner" import { OrmUtils } from "../../util/OrmUtils" import { ObjectLiteral } from "../../common/ObjectLiteral" +import { ColumnMetadata } from "../../metadata/ColumnMetadata" +import { EntityMetadata } from "../../metadata/EntityMetadata" +import { Brackets } from "../../query-builder/Brackets" /** * Executes subject operations for materialized-path tree entities. @@ -81,8 +84,14 @@ export class MaterializedPathSubjectExecutor { const oldParent = subject.metadata.treeParentRelation!.getEntityValue( entity!, ) - const oldParentId = subject.metadata.getEntityIdMap(oldParent) - const newParentId = subject.metadata.getEntityIdMap(newParent) + const oldParentId = this.getEntityParentReferencedColumnMap( + subject, + oldParent, + ) + const newParentId = this.getEntityParentReferencedColumnMap( + subject, + newParent, + ) // Exit if the new and old parents are the same if (OrmUtils.compareIds(oldParentId, newParentId)) { @@ -113,7 +122,9 @@ export class MaterializedPathSubjectExecutor { .update(subject.metadata.target) .set({ [propertyPath]: () => - `REPLACE(${propertyPath}, '${oldParentPath}${entityPath}.', '${newParentPath}${entityPath}.')`, + `REPLACE(${this.queryRunner.connection.driver.escape( + propertyPath, + )}, '${oldParentPath}${entityPath}.', '${newParentPath}${entityPath}.')`, } as any) .where(`${propertyPath} LIKE :path`, { path: `${oldParentPath}${entityPath}.%`, @@ -121,10 +132,30 @@ export class MaterializedPathSubjectExecutor { .execute() } + private getEntityParentReferencedColumnMap( + subject: Subject, + entity: ObjectLiteral | undefined, + ): ObjectLiteral | undefined { + if (!entity) return undefined + return EntityMetadata.getValueMap( + entity, + subject.metadata + .treeParentRelation!.joinColumns.map( + (column) => column.referencedColumn, + ) + .filter((v) => v != null) as ColumnMetadata[], + { skipNulls: true }, + ) + } + private getEntityPath( subject: Subject, id: ObjectLiteral, ): Promise { + const metadata = subject.metadata + const normalized = (Array.isArray(id) ? id : [id]).map((id) => + metadata.ensureEntityIdMap(id), + ) return this.queryRunner.manager .createQueryBuilder() .select( @@ -134,7 +165,13 @@ export class MaterializedPathSubjectExecutor { "path", ) .from(subject.metadata.target, subject.metadata.targetName) - .whereInIds(id) + .where( + new Brackets((qb) => { + for (const data of normalized) { + qb.orWhere(new Brackets((qb) => qb.where(data))) + } + }), + ) .getRawOne() .then((result) => (result ? result["path"] : "")) } diff --git a/src/platform/BrowserPlatformTools.template b/src/platform/BrowserPlatformTools.template index 72295f27d3..0e424a22f4 100644 --- a/src/platform/BrowserPlatformTools.template +++ b/src/platform/BrowserPlatformTools.template @@ -164,10 +164,10 @@ interface Window { } declare var window: Window; -if (typeof window !== "undefined") { +if (typeof window !== "undefined" && typeof require !== "undefined") { window.Buffer = require("buffer/").Buffer; } // NativeScript uses global, not window -if (typeof global !== "undefined") { +if (typeof global !== "undefined" && typeof require !== "undefined") { global.Buffer = require("buffer/").Buffer; } diff --git a/src/platform/PlatformTools.ts b/src/platform/PlatformTools.ts index d2a5d8aab1..dc7d5c16c9 100644 --- a/src/platform/PlatformTools.ts +++ b/src/platform/PlatformTools.ts @@ -140,10 +140,13 @@ export class PlatformTools { } /** - * Normalizes given path. Does "path.normalize". + * Normalizes given path. Does "path.normalize" and replaces backslashes with forward slashes on Windows. */ static pathNormalize(pathStr: string): string { - return path.normalize(pathStr) + let normalizedPath = path.normalize(pathStr) + if (process.platform === "win32") + normalizedPath = normalizedPath.replace(/\\/g, "/") + return normalizedPath } /** @@ -241,6 +244,14 @@ export class PlatformTools { console.log(chalk.underline(message)) } + static info(info: any) { + return chalk.gray(info) + } + + static error(error: any) { + return chalk.red(error) + } + static warn(message: string) { return chalk.yellow(message) } diff --git a/src/query-builder/DeleteQueryBuilder.ts b/src/query-builder/DeleteQueryBuilder.ts index 8c3f77c73b..7d335cc78b 100644 --- a/src/query-builder/DeleteQueryBuilder.ts +++ b/src/query-builder/DeleteQueryBuilder.ts @@ -41,7 +41,7 @@ export class DeleteQueryBuilder let sql = this.createComment() sql += this.createCteExpression() sql += this.createDeleteExpression() - return sql.trim() + return this.replacePropertyNamesForTheWholeQuery(sql.trim()) } /** diff --git a/src/query-builder/InsertOrUpdateOptions.ts b/src/query-builder/InsertOrUpdateOptions.ts index 90a1ef0970..e5b2a3bcac 100644 --- a/src/query-builder/InsertOrUpdateOptions.ts +++ b/src/query-builder/InsertOrUpdateOptions.ts @@ -1,3 +1,13 @@ +import { UpsertType } from "../driver/types/UpsertType" + export type InsertOrUpdateOptions = { + /** + * If true, postgres will skip the update if no values would be changed (reduces writes) + */ skipUpdateIfNoValuesChanged?: boolean + /** + * If included, postgres will apply the index predicate to a conflict target (partial index) + */ + indexPredicate?: string + upsertType?: UpsertType } diff --git a/src/query-builder/InsertQueryBuilder.ts b/src/query-builder/InsertQueryBuilder.ts index 5a9f28e233..da25a7b5bb 100644 --- a/src/query-builder/InsertQueryBuilder.ts +++ b/src/query-builder/InsertQueryBuilder.ts @@ -1,22 +1,22 @@ -import { QueryBuilder } from "./QueryBuilder" -import { ObjectLiteral } from "../common/ObjectLiteral" +import { v4 as uuidv4 } from "uuid" import { EntityTarget } from "../common/EntityTarget" -import { QueryDeepPartialEntity } from "./QueryPartialEntity" +import { ObjectLiteral } from "../common/ObjectLiteral" +import { AuroraMysqlDriver } from "../driver/aurora-mysql/AuroraMysqlDriver" +import { DriverUtils } from "../driver/DriverUtils" import { MysqlDriver } from "../driver/mysql/MysqlDriver" -import { InsertResult } from "./result/InsertResult" -import { ReturningStatementNotSupportedError } from "../error/ReturningStatementNotSupportedError" +import { SqlServerDriver } from "../driver/sqlserver/SqlServerDriver" +import { TypeORMError } from "../error" import { InsertValuesMissingError } from "../error/InsertValuesMissingError" +import { ReturningStatementNotSupportedError } from "../error/ReturningStatementNotSupportedError" import { ColumnMetadata } from "../metadata/ColumnMetadata" -import { ReturningResultsEntityUpdator } from "./ReturningResultsEntityUpdator" import { BroadcasterResult } from "../subscriber/BroadcasterResult" -import { TypeORMError } from "../error" -import { v4 as uuidv4 } from "uuid" -import { InsertOrUpdateOptions } from "./InsertOrUpdateOptions" -import { SqlServerDriver } from "../driver/sqlserver/SqlServerDriver" -import { AuroraMysqlDriver } from "../driver/aurora-mysql/AuroraMysqlDriver" -import { DriverUtils } from "../driver/DriverUtils" -import { ObjectUtils } from "../util/ObjectUtils" import { InstanceChecker } from "../util/InstanceChecker" +import { ObjectUtils } from "../util/ObjectUtils" +import { InsertOrUpdateOptions } from "./InsertOrUpdateOptions" +import { QueryBuilder } from "./QueryBuilder" +import { QueryDeepPartialEntity } from "./QueryPartialEntity" +import { InsertResult } from "./result/InsertResult" +import { ReturningResultsEntityUpdator } from "./ReturningResultsEntityUpdator" /** * Allows to build complex sql queries in a fashion way and execute those queries. @@ -37,7 +37,7 @@ export class InsertQueryBuilder< let sql = this.createComment() sql += this.createCteExpression() sql += this.createInsertExpression() - return sql.trim() + return this.replacePropertyNamesForTheWholeQuery(sql.trim()) } /** @@ -381,6 +381,7 @@ export class InsertQueryBuilder< overwrite: statementOrOverwrite?.overwrite, skipUpdateIfNoValuesChanged: orUpdateOptions?.skipUpdateIfNoValuesChanged, + upsertType: orUpdateOptions?.upsertType, } return this } @@ -390,6 +391,8 @@ export class InsertQueryBuilder< conflict: conflictTarget, skipUpdateIfNoValuesChanged: orUpdateOptions?.skipUpdateIfNoValuesChanged, + indexPredicate: orUpdateOptions?.indexPredicate, + upsertType: orUpdateOptions?.upsertType, } return this } @@ -412,6 +415,10 @@ export class InsertQueryBuilder< const columnsExpression = this.createColumnNamesExpression() let query = "INSERT " + if (this.expressionMap.onUpdate?.upsertType === "primary-key") { + query = "UPSERT " + } + if ( DriverUtils.isMySQLFamily(this.connection.driver) || this.connection.driver.options.type === "aurora-mysql" @@ -470,101 +477,132 @@ export class InsertQueryBuilder< query += ` DEFAULT VALUES` } } - if ( - this.connection.driver.supportedUpsertType === - "on-conflict-do-update" - ) { - if (this.expressionMap.onIgnore) { - query += " ON CONFLICT DO NOTHING " - } else if (this.expressionMap.onConflict) { - query += ` ON CONFLICT ${this.expressionMap.onConflict} ` - } else if (this.expressionMap.onUpdate) { - const { - overwrite, - columns, - conflict, - skipUpdateIfNoValuesChanged, - } = this.expressionMap.onUpdate - - let conflictTarget = "ON CONFLICT" - - if (Array.isArray(conflict)) { - conflictTarget += ` ( ${conflict - .map((column) => this.escape(column)) - .join(", ")} )` - } else if (conflict) { - conflictTarget += ` ON CONSTRAINT ${this.escape(conflict)}` - } + if (this.expressionMap.onUpdate?.upsertType !== "primary-key") { + if ( + this.connection.driver.supportedUpsertTypes.includes( + "on-conflict-do-update", + ) + ) { + if (this.expressionMap.onIgnore) { + query += " ON CONFLICT DO NOTHING " + } else if (this.expressionMap.onConflict) { + query += ` ON CONFLICT ${this.expressionMap.onConflict} ` + } else if (this.expressionMap.onUpdate) { + const { + overwrite, + columns, + conflict, + skipUpdateIfNoValuesChanged, + indexPredicate, + } = this.expressionMap.onUpdate + + let conflictTarget = "ON CONFLICT" + + if (Array.isArray(conflict)) { + conflictTarget += ` ( ${conflict + .map((column) => this.escape(column)) + .join(", ")} )` + if ( + indexPredicate && + !DriverUtils.isPostgresFamily( + this.connection.driver, + ) + ) { + throw new TypeORMError( + `indexPredicate option is not supported by the current database driver`, + ) + } + if ( + indexPredicate && + DriverUtils.isPostgresFamily(this.connection.driver) + ) { + conflictTarget += ` WHERE ( ${this.escape( + indexPredicate, + )} )` + } + } else if (conflict) { + conflictTarget += ` ON CONSTRAINT ${this.escape( + conflict, + )}` + } - if (Array.isArray(overwrite)) { - query += ` ${conflictTarget} DO UPDATE SET ` - query += overwrite - ?.map( - (column) => - `${this.escape( - column, - )} = EXCLUDED.${this.escape(column)}`, - ) - .join(", ") - query += " " - } else if (columns) { - query += ` ${conflictTarget} DO UPDATE SET ` - query += columns - .map((column) => `${this.escape(column)} = :${column}`) - .join(", ") - query += " " - } + if (Array.isArray(overwrite)) { + query += ` ${conflictTarget} DO UPDATE SET ` + query += overwrite + ?.map( + (column) => + `${this.escape( + column, + )} = EXCLUDED.${this.escape(column)}`, + ) + .join(", ") + query += " " + } else if (columns) { + query += ` ${conflictTarget} DO UPDATE SET ` + query += columns + .map( + (column) => + `${this.escape(column)} = :${column}`, + ) + .join(", ") + query += " " + } - if ( - Array.isArray(overwrite) && - skipUpdateIfNoValuesChanged && - DriverUtils.isPostgresFamily(this.connection.driver) - ) { - query += ` WHERE (` - query += overwrite - .map( - (column) => - `${tableName}.${this.escape( - column, - )} IS DISTINCT FROM EXCLUDED.${this.escape( - column, - )}`, - ) - .join(" OR ") - query += ") " - } - } - } else if ( - this.connection.driver.supportedUpsertType === - "on-duplicate-key-update" - ) { - if (this.expressionMap.onUpdate) { - const { overwrite, columns } = this.expressionMap.onUpdate - - if (Array.isArray(overwrite)) { - query += " ON DUPLICATE KEY UPDATE " - query += overwrite - .map( - (column) => - `${this.escape(column)} = VALUES(${this.escape( - column, - )})`, - ) - .join(", ") - query += " " - } else if (Array.isArray(columns)) { - query += " ON DUPLICATE KEY UPDATE " - query += columns - .map((column) => `${this.escape(column)} = :${column}`) - .join(", ") - query += " " + if ( + Array.isArray(overwrite) && + skipUpdateIfNoValuesChanged && + DriverUtils.isPostgresFamily(this.connection.driver) + ) { + query += ` WHERE (` + query += overwrite + .map( + (column) => + `${tableName}.${this.escape( + column, + )} IS DISTINCT FROM EXCLUDED.${this.escape( + column, + )}`, + ) + .join(" OR ") + query += ") " + } } - } - } else { - if (this.expressionMap.onUpdate) { - throw new TypeORMError( - `onUpdate is not supported by the current database driver`, + } else if ( + this.connection.driver.supportedUpsertTypes.includes( + "on-duplicate-key-update", ) + ) { + if (this.expressionMap.onUpdate) { + const { overwrite, columns } = this.expressionMap.onUpdate + + if (Array.isArray(overwrite)) { + query += " ON DUPLICATE KEY UPDATE " + query += overwrite + .map( + (column) => + `${this.escape( + column, + )} = VALUES(${this.escape(column)})`, + ) + .join(", ") + query += " " + } else if (Array.isArray(columns)) { + query += " ON DUPLICATE KEY UPDATE " + query += columns + .map( + (column) => + `${this.escape(column)} = :${column}`, + ) + .join(", ") + query += " " + } + } + } else { + if (this.expressionMap.onUpdate) { + throw new TypeORMError( + `onUpdate is not supported by the current database driver`, + ) + } } } diff --git a/src/query-builder/JoinAttribute.ts b/src/query-builder/JoinAttribute.ts index 3a8bbec847..363342defd 100644 --- a/src/query-builder/JoinAttribute.ts +++ b/src/query-builder/JoinAttribute.ts @@ -46,6 +46,11 @@ export class JoinAttribute { */ isMappingMany?: boolean + /** + * Useful when the joined expression is a custom query to support mapping. + */ + mapAsEntity?: Function | string + // ------------------------------------------------------------------------- // Constructor // ------------------------------------------------------------------------- @@ -55,7 +60,9 @@ export class JoinAttribute { private queryExpressionMap: QueryExpressionMap, joinAttribute?: JoinAttribute, ) { - ObjectUtils.assign(this, joinAttribute || {}) + if (joinAttribute) { + ObjectUtils.assign(this, joinAttribute) + } } // ------------------------------------------------------------------------- @@ -199,6 +206,11 @@ export class JoinAttribute { if (this.connection.hasMetadata(this.entityOrProperty)) return this.connection.getMetadata(this.entityOrProperty) + // Overriden mapping entity provided for leftJoinAndMapOne with custom query builder + if (this.mapAsEntity && this.connection.hasMetadata(this.mapAsEntity)) { + return this.connection.getMetadata(this.mapAsEntity) + } + return undefined /*if (typeof this.entityOrProperty === "string") { // entityOrProperty is a custom table @@ -218,22 +230,33 @@ export class JoinAttribute { * Generates alias of junction table, whose ids we get. */ get junctionAlias(): string { - if (!this.relation) + if (!this.relation) { throw new TypeORMError( `Cannot get junction table for join without relation.`, ) + } + if (typeof this.entityOrProperty !== "string") { + throw new TypeORMError(`Junction property is not defined.`) + } + + const aliasProperty = this.entityOrProperty.substr( + 0, + this.entityOrProperty.indexOf("."), + ) if (this.relation.isOwning) { return DriverUtils.buildAlias( this.connection.driver, - this.parentAlias!, + undefined, + aliasProperty, this.alias.name, ) } else { return DriverUtils.buildAlias( this.connection.driver, + undefined, this.alias.name, - this.parentAlias!, + aliasProperty, ) } } diff --git a/src/query-builder/QueryBuilder.ts b/src/query-builder/QueryBuilder.ts index 56f13bf13d..786993ea4f 100644 --- a/src/query-builder/QueryBuilder.ts +++ b/src/query-builder/QueryBuilder.ts @@ -101,14 +101,14 @@ export abstract class QueryBuilder { connectionOrQueryBuilder: DataSource | QueryBuilder, queryRunner?: QueryRunner, ) { - if (InstanceChecker.isQueryBuilder(connectionOrQueryBuilder)) { - this.connection = connectionOrQueryBuilder.connection - this.queryRunner = connectionOrQueryBuilder.queryRunner - this.expressionMap = connectionOrQueryBuilder.expressionMap.clone() - } else { + if (InstanceChecker.isDataSource(connectionOrQueryBuilder)) { this.connection = connectionOrQueryBuilder this.queryRunner = queryRunner this.expressionMap = new QueryExpressionMap(this.connection) + } else { + this.connection = connectionOrQueryBuilder.connection + this.queryRunner = connectionOrQueryBuilder.queryRunner + this.expressionMap = connectionOrQueryBuilder.expressionMap.clone() } } @@ -700,22 +700,29 @@ export abstract class QueryBuilder { } /** - * Replaces all entity's propertyName to name in the given statement. + * @deprecated this way of replace property names is too slow. + * Instead, we'll replace property names at the end - once query is build. */ - protected replacePropertyNames(statement: string) { + return statement + } + + /** + * Replaces all entity's propertyName to name in the given SQL string. + */ + protected replacePropertyNamesForTheWholeQuery(statement: string) { + const replacements: { [key: string]: { [key: string]: string } } = {} + for (const alias of this.expressionMap.aliases) { if (!alias.hasMetadata) continue - const replaceAliasNamePrefix = this.expressionMap - .aliasNamePrefixingEnabled - ? `${alias.name}.` - : "" - const replacementAliasNamePrefix = this.expressionMap - .aliasNamePrefixingEnabled - ? `${this.escape(alias.name)}.` - : "" + const replaceAliasNamePrefix = + this.expressionMap.aliasNamePrefixingEnabled && alias.name + ? `${alias.name}.` + : "" - const replacements: { [key: string]: string } = {} + if (!replacements[replaceAliasNamePrefix]) { + replacements[replaceAliasNamePrefix] = {} + } // Insert & overwrite the replacements from least to most relevant in our replacements object. // To do this we iterate and overwrite in the order of relevance. @@ -728,51 +735,81 @@ export abstract class QueryBuilder { for (const relation of alias.metadata.relations) { if (relation.joinColumns.length > 0) - replacements[relation.propertyPath] = - relation.joinColumns[0].databaseName + replacements[replaceAliasNamePrefix][ + relation.propertyPath + ] = relation.joinColumns[0].databaseName } for (const relation of alias.metadata.relations) { - for (const joinColumn of [ + const allColumns = [ ...relation.joinColumns, ...relation.inverseJoinColumns, - ]) { + ] + for (const joinColumn of allColumns) { const propertyKey = `${relation.propertyPath}.${ joinColumn.referencedColumn!.propertyPath }` - replacements[propertyKey] = joinColumn.databaseName + replacements[replaceAliasNamePrefix][propertyKey] = + joinColumn.databaseName } } for (const column of alias.metadata.columns) { - replacements[column.databaseName] = column.databaseName + replacements[replaceAliasNamePrefix][column.databaseName] = + column.databaseName } for (const column of alias.metadata.columns) { - replacements[column.propertyName] = column.databaseName + replacements[replaceAliasNamePrefix][column.propertyName] = + column.databaseName } for (const column of alias.metadata.columns) { - replacements[column.propertyPath] = column.databaseName + replacements[replaceAliasNamePrefix][column.propertyPath] = + column.databaseName } + } + const replacementKeys = Object.keys(replacements) + const replaceAliasNamePrefixes = replacementKeys + .map((key) => escapeRegExp(key)) + .join("|") + + if (replacementKeys.length > 0) { statement = statement.replace( new RegExp( // Avoid a lookbehind here since it's not well supported `([ =\(]|^.{0})` + // any of ' =(' or start of line // followed by our prefix, e.g. 'tablename.' or '' - `${escapeRegExp( - replaceAliasNamePrefix, - )}([^ =\(\)\,]+)` + // a possible property name: sequence of anything but ' =(),' + `${ + replaceAliasNamePrefixes + ? "(" + replaceAliasNamePrefixes + ")" + : "" + }([^ =\(\)\,]+)` + // a possible property name: sequence of anything but ' =(),' // terminated by ' =),' or end of line `(?=[ =\)\,]|.{0}$)`, "gm", ), - (match, pre, p) => { - if (replacements[p]) { - return `${pre}${replacementAliasNamePrefix}${this.escape( - replacements[p], - )}` + (...matches) => { + let match: string, pre: string, p: string + if (replaceAliasNamePrefixes) { + match = matches[0] + pre = matches[1] + p = matches[3] + + if (replacements[matches[2]][p]) { + return `${pre}${this.escape( + matches[2].substring(0, matches[2].length - 1), + )}.${this.escape(replacements[matches[2]][p])}` + } + } else { + match = matches[0] + pre = matches[1] + p = matches[2] + + if (replacements[""][p]) { + return `${pre}${this.escape(replacements[""][p])}` + } } return match }, @@ -795,6 +832,20 @@ export abstract class QueryBuilder { return `/* ${this.expressionMap.comment.replace("*/", "")} */ ` } + /** + * Time travel queries for CockroachDB + */ + protected createTimeTravelQuery(): string { + if ( + this.expressionMap.queryType === "select" && + this.expressionMap.timeTravel + ) { + return ` AS OF SYSTEM TIME ${this.expressionMap.timeTravel}` + } + + return "" + } + /** * Creates "WHERE" expression. */ @@ -848,13 +899,20 @@ export abstract class QueryBuilder { conditionsArray.push(condition) } + let condition = "" + + // time travel + condition += this.createTimeTravelQuery() + if (!conditionsArray.length) { - return "" + condition += "" } else if (conditionsArray.length === 1) { - return ` WHERE ${conditionsArray[0]}` + condition += ` WHERE ${conditionsArray[0]}` } else { - return ` WHERE ( ${conditionsArray.join(" ) AND ( ")} )` + condition += ` WHERE ( ${conditionsArray.join(" ) AND ( ")} )` } + + return condition } /** @@ -1009,6 +1067,8 @@ export abstract class QueryBuilder { return `${condition.parameters[0]} <= ${condition.parameters[1]}` case "arrayContains": return `${condition.parameters[0]} @> ${condition.parameters[1]}` + case "jsonContains": + return `${condition.parameters[0]} ::jsonb @> ${condition.parameters[1]}` case "arrayContainedBy": return `${condition.parameters[0]} <@ ${condition.parameters[1]}` case "arrayOverlap": @@ -1042,6 +1102,10 @@ export abstract class QueryBuilder { .slice(1) .join(", ")})` case "any": + if (driver.options.type === "cockroachdb") { + return `${condition.parameters[0]}::STRING = ANY(${condition.parameters[1]}::STRING[])` + } + return `${condition.parameters[0]} = ANY(${condition.parameters[1]})` case "isNull": return `${condition.parameters[0]} IS NULL` @@ -1055,6 +1119,8 @@ export abstract class QueryBuilder { condition.condition, true, )}` + case "and": + return condition.parameters.join(" AND ") } throw new TypeError( @@ -1115,17 +1181,21 @@ export abstract class QueryBuilder { cte.options.recursive && databaseRequireRecusiveHint ? "RECURSIVE" : "" - const materializeClause = - cte.options.materialized && - this.connection.driver.cteCapabilities.materializedHint + let materializeClause = "" + if ( + this.connection.driver.cteCapabilities.materializedHint && + cte.options.materialized !== undefined + ) { + materializeClause = cte.options.materialized ? "MATERIALIZED" - : "" + : "NOT MATERIALIZED" + } return [ recursiveClause, cteHeader, - materializeClause, "AS", + materializeClause, `(${cteBodyExpression})`, ] .filter(Boolean) @@ -1176,6 +1246,21 @@ export abstract class QueryBuilder { }) } + protected getExistsCondition(subQuery: any): [string, any[]] { + const query = subQuery + .clone() + .orderBy() + .groupBy() + .offset(undefined) + .limit(undefined) + .skip(undefined) + .take(undefined) + .select("1") + .setOption("disable-global-order") + + return [`EXISTS (${query.getQuery()})`, query.getParameters()] + } + private findColumnsForPropertyPath( propertyPath: string, ): [Alias, string[], ColumnMetadata[]] { @@ -1448,6 +1533,20 @@ export abstract class QueryBuilder { parameters: [aliasPath, ...parameters], } } + } else if (parameterValue.type === "and") { + const values: FindOperator[] = parameterValue.value + + return { + operator: parameterValue.type, + parameters: values.map((operator) => + this.createWhereConditionExpression( + this.getWherePredicateCondition( + aliasPath, + operator, + ), + ), + ), + } } else { return { operator: parameterValue.type, diff --git a/src/query-builder/QueryExpressionMap.ts b/src/query-builder/QueryExpressionMap.ts index 5596cbd1e8..c0156e040a 100644 --- a/src/query-builder/QueryExpressionMap.ts +++ b/src/query-builder/QueryExpressionMap.ts @@ -14,6 +14,8 @@ import { RelationMetadata } from "../metadata/RelationMetadata" import { SelectQueryBuilderOption } from "./SelectQueryBuilderOption" import { TypeORMError } from "../error" import { WhereClause } from "./WhereClause" +import { UpsertType } from "../driver/types/UpsertType" +import { CockroachConnectionOptions } from "../driver/cockroachdb/CockroachConnectionOptions" /** * Contains all properties of the QueryBuilder that needs to be build a final query. @@ -114,6 +116,8 @@ export class QueryExpressionMap { columns?: string[] overwrite?: string[] skipUpdateIfNoValuesChanged?: boolean + indexPredicate?: string + upsertType?: UpsertType } /** @@ -315,6 +319,12 @@ export class QueryExpressionMap { */ useTransaction: boolean = false + /** + * Indicates if query should be time travel query + * https://www.cockroachlabs.com/docs/stable/as-of-system-time.html + */ + timeTravel?: boolean | string + /** * Extra parameters. * @@ -348,6 +358,10 @@ export class QueryExpressionMap { if (connection.options.relationLoadStrategy) { this.relationLoadStrategy = connection.options.relationLoadStrategy } + + this.timeTravel = + (connection.options as CockroachConnectionOptions) + ?.timeTravelQueries || false } // ------------------------------------------------------------------------- @@ -523,6 +537,7 @@ export class QueryExpressionMap { map.updateEntity = this.updateEntity map.callListeners = this.callListeners map.useTransaction = this.useTransaction + map.timeTravel = this.timeTravel map.nativeParameters = Object.assign({}, this.nativeParameters) map.comment = this.comment map.commonTableExpressions = this.commonTableExpressions.map( diff --git a/src/query-builder/RelationIdLoader.ts b/src/query-builder/RelationIdLoader.ts index 75a209fd78..c2843e7a63 100644 --- a/src/query-builder/RelationIdLoader.ts +++ b/src/query-builder/RelationIdLoader.ts @@ -4,6 +4,7 @@ import { DataSource } from "../data-source/DataSource" import { ObjectLiteral } from "../common/ObjectLiteral" import { SelectQueryBuilder } from "./SelectQueryBuilder" import { DriverUtils } from "../driver/DriverUtils" +import { QueryRunner } from "../query-runner/QueryRunner" /** * Loads relation ids for the given entities. @@ -13,7 +14,10 @@ export class RelationIdLoader { // Constructor // ------------------------------------------------------------------------- - constructor(private connection: DataSource) {} + constructor( + private connection: DataSource, + protected queryRunner?: QueryRunner | undefined, + ) {} // ------------------------------------------------------------------------- // Public Methods @@ -80,7 +84,7 @@ export class RelationIdLoader { relatedEntityOrEntities = await this.connection.relationLoader.load( relation, entitiesOrEntities, - undefined, + this.queryRunner, queryBuilder, ) if (!relatedEntityOrEntities.length) @@ -161,6 +165,7 @@ export class RelationIdLoader { relationId[ DriverUtils.buildAlias( this.connection.driver, + undefined, column.entityMetadata.name + "_" + relation.propertyPath.replace( @@ -241,12 +246,13 @@ export class RelationIdLoader { const inverseColumns = relation.isOwning ? junctionMetadata.inverseColumns : junctionMetadata.ownerColumns - const qb = this.connection.createQueryBuilder() + const qb = this.connection.createQueryBuilder(this.queryRunner) // select all columns from junction table columns.forEach((column) => { const columnName = DriverUtils.buildAlias( this.connection.driver, + undefined, column.referencedColumn!.entityMetadata.name + "_" + column.referencedColumn!.propertyPath.replace(".", "_"), @@ -256,6 +262,7 @@ export class RelationIdLoader { inverseColumns.forEach((column) => { const columnName = DriverUtils.buildAlias( this.connection.driver, + undefined, column.referencedColumn!.entityMetadata.name + "_" + relation.propertyPath.replace(".", "_") + @@ -483,10 +490,11 @@ export class RelationIdLoader { } // select all columns we need - const qb = this.connection.createQueryBuilder() + const qb = this.connection.createQueryBuilder(this.queryRunner) relation.entityMetadata.primaryColumns.forEach((primaryColumn) => { const columnName = DriverUtils.buildAlias( this.connection.driver, + undefined, primaryColumn.entityMetadata.name + "_" + primaryColumn.propertyPath.replace(".", "_"), @@ -499,6 +507,7 @@ export class RelationIdLoader { relation.joinColumns.forEach((column) => { const columnName = DriverUtils.buildAlias( this.connection.driver, + undefined, column.referencedColumn!.entityMetadata.name + "_" + relation.propertyPath.replace(".", "_") + @@ -620,10 +629,11 @@ export class RelationIdLoader { const mainAlias = relation.entityMetadata.targetName // select all columns we need - const qb = this.connection.createQueryBuilder() + const qb = this.connection.createQueryBuilder(this.queryRunner) relation.entityMetadata.primaryColumns.forEach((primaryColumn) => { const columnName = DriverUtils.buildAlias( this.connection.driver, + undefined, primaryColumn.entityMetadata.name + "_" + relation.inverseRelation!.propertyPath.replace(".", "_") + @@ -638,6 +648,7 @@ export class RelationIdLoader { relation.joinColumns.forEach((column) => { const columnName = DriverUtils.buildAlias( this.connection.driver, + undefined, column.referencedColumn!.entityMetadata.name + "_" + column.referencedColumn!.propertyPath.replace(".", "_"), diff --git a/src/query-builder/SelectQueryBuilder.ts b/src/query-builder/SelectQueryBuilder.ts index a95813d2f7..1866c5f6eb 100644 --- a/src/query-builder/SelectQueryBuilder.ts +++ b/src/query-builder/SelectQueryBuilder.ts @@ -8,6 +8,7 @@ import { JoinAttribute } from "./JoinAttribute" import { RelationIdAttribute } from "./relation-id/RelationIdAttribute" import { RelationCountAttribute } from "./relation-count/RelationCountAttribute" import { RelationIdLoader } from "./relation-id/RelationIdLoader" +import { RelationIdLoader as QueryStrategyRelationIdLoader } from "./RelationIdLoader" import { RelationIdMetadataToAttributeTransformer } from "./relation-id/RelationIdMetadataToAttributeTransformer" import { RelationCountLoader } from "./relation-count/RelationCountLoader" import { RelationCountMetadataToAttributeTransformer } from "./relation-count/RelationCountMetadataToAttributeTransformer" @@ -38,11 +39,12 @@ import { FindOptionsOrder } from "../find-options/FindOptionsOrder" import { FindOptionsWhere } from "../find-options/FindOptionsWhere" import { FindOptionsUtils } from "../find-options/FindOptionsUtils" import { FindOptionsRelations } from "../find-options/FindOptionsRelations" -import { ApplyValueTransformers } from "../util/ApplyValueTransformers" import { OrmUtils } from "../util/OrmUtils" import { EntityPropertyNotFoundError } from "../error/EntityPropertyNotFoundError" import { AuroraMysqlDriver } from "../driver/aurora-mysql/AuroraMysqlDriver" import { InstanceChecker } from "../util/InstanceChecker" +import { FindOperator } from "../find-options/FindOperator" +import { ApplyValueTransformers } from "../util/ApplyValueTransformers" /** * Allows to build complex sql queries in a fashion way and execute those queries. @@ -91,7 +93,7 @@ export class SelectQueryBuilder sql += this.createLockExpression() sql = sql.trim() if (this.expressionMap.subQuery) sql = "(" + sql + ")" - return sql + return this.replacePropertyNamesForTheWholeQuery(sql) } // ------------------------------------------------------------------------- @@ -249,6 +251,14 @@ export class SelectQueryBuilder return this } + fromDummy(): SelectQueryBuilder { + return this.from( + this.connection.driver.dummyTableName ?? + "(SELECT 1 AS dummy_column)", + "dummy_table", + ) + } + /** * Specifies FROM which entity's table select/update/delete will be executed. * Also sets a main string alias of the selection data. @@ -708,6 +718,7 @@ export class SelectQueryBuilder alias: string, condition?: string, parameters?: ObjectLiteral, + mapAsEntity?: Function | string, ): this /** @@ -772,6 +783,7 @@ export class SelectQueryBuilder alias: string, condition?: string, parameters?: ObjectLiteral, + mapAsEntity?: Function | string, ): this { this.addSelect(alias) this.join( @@ -782,6 +794,7 @@ export class SelectQueryBuilder parameters, mapToProperty, false, + mapAsEntity, ) return this } @@ -896,6 +909,7 @@ export class SelectQueryBuilder alias: string, condition?: string, parameters?: ObjectLiteral, + mapAsEntity?: Function | string, ): this /** @@ -960,6 +974,7 @@ export class SelectQueryBuilder alias: string, condition?: string, parameters?: ObjectLiteral, + mapAsEntity?: Function | string, ): this { this.addSelect(alias) this.join( @@ -970,6 +985,7 @@ export class SelectQueryBuilder parameters, mapToProperty, false, + mapAsEntity, ) return this } @@ -1140,10 +1156,11 @@ export class SelectQueryBuilder ): this { this.expressionMap.wheres = [] // don't move this block below since computeWhereParameter can add where expressions const condition = this.getWhereCondition(where) - if (condition) + if (condition) { this.expressionMap.wheres = [ { type: "simple", condition: condition }, ] + } if (parameters) this.setParameters(parameters) return this } @@ -1190,6 +1207,27 @@ export class SelectQueryBuilder return this } + /** + * Sets a new where EXISTS clause + */ + whereExists(subQuery: SelectQueryBuilder): this { + return this.where(...this.getExistsCondition(subQuery)) + } + + /** + * Adds a new AND where EXISTS clause + */ + andWhereExists(subQuery: SelectQueryBuilder): this { + return this.andWhere(...this.getExistsCondition(subQuery)) + } + + /** + * Adds a new OR where EXISTS clause + */ + orWhereExists(subQuery: SelectQueryBuilder): this { + return this.orWhere(...this.getExistsCondition(subQuery)) + } + /** * Adds new AND WHERE with conditions for the given ids. * @@ -1294,6 +1332,21 @@ export class SelectQueryBuilder return this } + /** + * Enables time travelling for the current query (only supported by cockroach currently) + */ + timeTravelQuery(timeTravelFn?: string | boolean): this { + if (this.connection.driver.options.type === "cockroachdb") { + if (timeTravelFn === undefined) { + this.expressionMap.timeTravel = "follower_read_timestamp()" + } else { + this.expressionMap.timeTravel = timeTravelFn + } + } + + return this + } + /** * Sets ORDER BY condition in the query builder. * If you had previously ORDER BY expression defined, @@ -1690,7 +1743,7 @@ export class SelectQueryBuilder if (!entity) { throw new EntityNotFoundError( this.expressionMap.mainAlias!.target, - this, + this.expressionMap.parameters, ) } @@ -1710,7 +1763,7 @@ export class SelectQueryBuilder /** * Gets count - number of entities selected by sql generated by this query builder. - * Count excludes all limitations set by setFirstResult and setMaxResults methods call. + * Count excludes all limitations set by offset, limit, skip, and take. */ async getCount(): Promise { if (this.expressionMap.lockMode === "optimistic") @@ -1752,6 +1805,50 @@ export class SelectQueryBuilder } } + /** + * Gets exists + * Returns whether any rows exists matching current query. + */ + async getExists(): Promise { + if (this.expressionMap.lockMode === "optimistic") + throw new OptimisticLockCanNotBeUsedError() + + const queryRunner = this.obtainQueryRunner() + let transactionStartedByUs: boolean = false + try { + // start transaction if it was enabled + if ( + this.expressionMap.useTransaction === true && + queryRunner.isTransactionActive === false + ) { + await queryRunner.startTransaction() + transactionStartedByUs = true + } + + this.expressionMap.queryEntity = false + const results = await this.executeExistsQuery(queryRunner) + + // close transaction if we started it + if (transactionStartedByUs) { + await queryRunner.commitTransaction() + } + + return results + } catch (error) { + // rollback transaction if we started it + if (transactionStartedByUs) { + try { + await queryRunner.rollbackTransaction() + } catch (rollbackError) {} + } + throw error + } finally { + if (queryRunner !== this.queryRunner) + // means we created our own query runner + await queryRunner.release() + } + } + /** * Executes built SQL query and returns entities and overall entities count (without limitation). * This method is useful to build pagination. @@ -1919,27 +2016,32 @@ export class SelectQueryBuilder parameters?: ObjectLiteral, mapToProperty?: string, isMappingMany?: boolean, + mapAsEntity?: Function | string, ): void { - this.setParameters(parameters || {}) + if (parameters) { + this.setParameters(parameters) + } const joinAttribute = new JoinAttribute( this.connection, this.expressionMap, ) joinAttribute.direction = direction + joinAttribute.mapAsEntity = mapAsEntity joinAttribute.mapToProperty = mapToProperty joinAttribute.isMappingMany = isMappingMany joinAttribute.entityOrProperty = entityOrProperty // relationName - joinAttribute.condition = condition ? condition : undefined // joinInverseSideCondition + joinAttribute.condition = condition // joinInverseSideCondition // joinAttribute.junctionAlias = joinAttribute.relation.isOwning ? parentAlias + "_" + destinationTableAlias : destinationTableAlias + "_" + parentAlias; this.expressionMap.joinAttributes.push(joinAttribute) - if (joinAttribute.metadata) { + const joinAttributeMetadata = joinAttribute.metadata + if (joinAttributeMetadata) { if ( - joinAttribute.metadata.deleteDateColumn && + joinAttributeMetadata.deleteDateColumn && !this.expressionMap.withDeleted ) { - const conditionDeleteColumn = `${aliasName}.${joinAttribute.metadata.deleteDateColumn.propertyName} IS NULL` + const conditionDeleteColumn = `${aliasName}.${joinAttributeMetadata.deleteDateColumn.propertyName} IS NULL` joinAttribute.condition = joinAttribute.condition ? ` ${joinAttribute.condition} AND ${conditionDeleteColumn}` : `${conditionDeleteColumn}` @@ -1948,7 +2050,7 @@ export class SelectQueryBuilder joinAttribute.alias = this.expressionMap.createAlias({ type: "join", name: aliasName, - metadata: joinAttribute.metadata, + metadata: joinAttributeMetadata, }) if ( joinAttribute.relation && @@ -2375,31 +2477,57 @@ export class SelectQueryBuilder */ protected createOrderByExpression() { const orderBys = this.expressionMap.allOrderBys - if (Object.keys(orderBys).length > 0) - return ( - " ORDER BY " + - Object.keys(orderBys) - .map((columnName) => { - if (typeof orderBys[columnName] === "string") { - return ( - this.replacePropertyNames(columnName) + - " " + - orderBys[columnName] - ) - } else { - return ( - this.replacePropertyNames(columnName) + - " " + - (orderBys[columnName] as any).order + - " " + - (orderBys[columnName] as any).nulls - ) + if (Object.keys(orderBys).length === 0) return "" + + return ( + " ORDER BY " + + Object.keys(orderBys) + .map((columnName) => { + const orderValue = + typeof orderBys[columnName] === "string" + ? orderBys[columnName] + : (orderBys[columnName] as any).order + + " " + + (orderBys[columnName] as any).nulls + const selection = this.expressionMap.selects.find( + (s) => s.selection === columnName, + ) + if ( + selection && + !selection.aliasName && + columnName.indexOf(".") !== -1 + ) { + const criteriaParts = columnName.split(".") + const aliasName = criteriaParts[0] + const propertyPath = criteriaParts.slice(1).join(".") + const alias = this.expressionMap.aliases.find( + (alias) => alias.name === aliasName, + ) + if (alias) { + const column = + alias.metadata.findColumnWithPropertyPath( + propertyPath, + ) + if (column) { + const orderAlias = DriverUtils.buildAlias( + this.connection.driver, + undefined, + aliasName, + column.databaseName, + ) + return ( + this.escape(orderAlias) + " " + orderValue + ) + } } - }) - .join(", ") - ) + } - return "" + return ( + this.replacePropertyNames(columnName) + " " + orderValue + ) + }) + .join(", ") + ) } /** @@ -2740,6 +2868,7 @@ export class SelectQueryBuilder ? selection.aliasName : DriverUtils.buildAlias( this.connection.driver, + undefined, aliasName, column.databaseName, ), @@ -2752,6 +2881,7 @@ export class SelectQueryBuilder selection: selectionPath, aliasName: DriverUtils.buildAlias( this.connection.driver, + undefined, aliasName, column.databaseName, ), @@ -2912,6 +3042,20 @@ export class SelectQueryBuilder return parseInt(results[0]["cnt"]) } + protected async executeExistsQuery( + queryRunner: QueryRunner, + ): Promise { + const results = await this.connection + .createQueryBuilder() + .fromDummy() + .select("1", "row_exists") + .whereExists(this) + .limit(1) + .loadRawResults(queryRunner) + + return results.length > 0 + } + protected applyFindOptions() { // todo: convert relations: string[] to object map to simplify code // todo: same with selects @@ -3209,6 +3353,10 @@ export class SelectQueryBuilder } } + public concatRelationMetadata(relationMetadata: RelationMetadata) { + this.relationMetadatas.push(relationMetadata) + } + /** * Executes sql generated by query builder and returns object with raw results and entities created from them. */ @@ -3278,6 +3426,7 @@ export class SelectQueryBuilder const columnAlias = this.escape( DriverUtils.buildAlias( this.connection.driver, + undefined, mainAliasName, primaryColumn.databaseName, ), @@ -3288,6 +3437,7 @@ export class SelectQueryBuilder const alias = DriverUtils.buildAlias( this.connection.driver, + undefined, "ids_" + mainAliasName, primaryColumn.databaseName, ) @@ -3298,20 +3448,33 @@ export class SelectQueryBuilder }, ) + const originalQuery = this.clone() + + // preserve original timeTravel value since we set it to "false" in subquery + const originalQueryTimeTravel = + originalQuery.expressionMap.timeTravel + rawResults = await new SelectQueryBuilder( this.connection, queryRunner, ) .select(`DISTINCT ${querySelects.join(", ")}`) .addSelect(selects) - .from(`(${this.clone().orderBy().getQuery()})`, "distinctAlias") + .from( + `(${originalQuery + .orderBy() + .timeTravelQuery(false) // set it to "false" since time travel clause must appear at the very end and applies to the entire SELECT clause. + .getQuery()})`, + "distinctAlias", + ) + .timeTravelQuery(originalQueryTimeTravel) .offset(this.expressionMap.skip) .limit(this.expressionMap.take) .orderBy(orderBys) .cache( - this.expressionMap.cache - ? this.expressionMap.cache - : this.expressionMap.cacheId, + this.expressionMap.cache && this.expressionMap.cacheId + ? `${this.expressionMap.cacheId}-pagination` + : this.expressionMap.cache, this.expressionMap.cacheDuration, ) .setParameters(this.getParameters()) @@ -3327,10 +3490,15 @@ export class SelectQueryBuilder return metadata.primaryColumns .map((primaryColumn) => { const paramKey = `orm_distinct_ids_${index}_${primaryColumn.databaseName}` + const paramKeyResult = + DriverUtils.buildAlias( + this.connection.driver, + undefined, + "ids_" + mainAliasName, + primaryColumn.databaseName, + ) parameters[paramKey] = - result[ - `ids_${mainAliasName}_${primaryColumn.databaseName}` - ] + result[paramKeyResult] return `${mainAliasName}.${primaryColumn.propertyPath}=:${paramKey}` }) .join(" AND ") @@ -3339,6 +3507,7 @@ export class SelectQueryBuilder } else { const alias = DriverUtils.buildAlias( this.connection.driver, + undefined, "ids_" + mainAliasName, metadata.primaryColumns[0].databaseName, ) @@ -3404,6 +3573,9 @@ export class SelectQueryBuilder } if (this.expressionMap.relationLoadStrategy === "query") { + const queryStrategyRelationIdLoader = + new QueryStrategyRelationIdLoader(this.connection, queryRunner) + await Promise.all( this.relationMetadatas.map(async (relation) => { const relationTarget = relation.inverseEntityMetadata.target @@ -3449,7 +3621,7 @@ export class SelectQueryBuilder }) if (entities.length > 0) { const relatedEntityGroups: any[] = - await this.connection.relationIdLoader.loadManyToManyRelationIdsAndGroup( + await queryStrategyRelationIdLoader.loadManyToManyRelationIdsAndGroup( relation, entities, undefined, @@ -3498,6 +3670,7 @@ export class SelectQueryBuilder this.escape( DriverUtils.buildAlias( this.connection.driver, + undefined, aliasName, column!.databaseName, ), @@ -3511,7 +3684,11 @@ export class SelectQueryBuilder select.aliasName === orderCriteria, ) ) - return this.escape(parentAlias) + "." + orderCriteria + return ( + this.escape(parentAlias) + + "." + + this.escape(orderCriteria) + ) return "" } @@ -3533,6 +3710,7 @@ export class SelectQueryBuilder this.escape( DriverUtils.buildAlias( this.connection.driver, + undefined, aliasName, column!.databaseName, ), @@ -3547,7 +3725,9 @@ export class SelectQueryBuilder ) ) { orderByObject[ - this.escape(parentAlias) + "." + orderCriteria + this.escape(parentAlias) + + "." + + this.escape(orderCriteria) ] = orderBys[orderCriteria] } else { orderByObject[orderCriteria] = orderBys[orderCriteria] @@ -3570,11 +3750,13 @@ export class SelectQueryBuilder : {} let savedQueryResultCacheOptions: QueryResultCacheOptions | undefined = undefined + const isCachingEnabled = + // Caching is enabled globally and isn't disabled locally. + (cacheOptions.alwaysEnabled && this.expressionMap.cache) || + // ...or it's enabled locally explicitly. + this.expressionMap.cache let cacheError = false - if ( - this.connection.queryResultCache && - (this.expressionMap.cache || cacheOptions.alwaysEnabled) - ) { + if (this.connection.queryResultCache && isCachingEnabled) { try { savedQueryResultCacheOptions = await this.connection.queryResultCache.getFromCache( @@ -3609,7 +3791,7 @@ export class SelectQueryBuilder if ( !cacheError && this.connection.queryResultCache && - (this.expressionMap.cache || cacheOptions.alwaysEnabled) + isCachingEnabled ) { try { await this.connection.queryResultCache.storeInCache( @@ -3751,7 +3933,7 @@ export class SelectQueryBuilder typeof relationValue === "object" ) { if (this.expressionMap.relationLoadStrategy === "query") { - this.relationMetadatas.push(relation) + this.concatRelationMetadata(relation) } else { // join this.joins.push({ @@ -3949,23 +4131,27 @@ export class SelectQueryBuilder : undefined let aliasPath = `${alias}.${propertyPath}` - if (column.isVirtualProperty && column.query) { - const selection = this.expressionMap.selects.find( - (s) => s.selection === aliasPath, - ) - if (selection) { - // this is not building correctly now??? - aliasPath = DriverUtils.buildAlias( - this.connection.driver, - alias, - column.databaseName, - ) - selection.aliasName = aliasPath - } else { - aliasPath = `(${column.query(alias)})` - } - } + // const selection = this.expressionMap.selects.find( + // (s) => s.selection === aliasPath, + // ) + // if (selection) { + // // this is not building correctly now??? + // aliasPath = this.escape( + // DriverUtils.buildAlias( + // this.connection.driver, + // undefined, + // alias, + // column.databaseName, + // ), + // ) + // // selection.aliasName = aliasPath + // } else { + // if (column.isVirtualProperty && column.query) { + // aliasPath = `(${column.query(alias)})` + // } + // } + // console.log("add sort", selection, aliasPath, direction, nulls) this.addOrderBy(aliasPath, direction, nulls) // this.orderBys.push({ alias: alias + "." + propertyPath, direction, nulls }); } else if (embed) { @@ -4010,14 +4196,14 @@ export class SelectQueryBuilder } protected buildWhere( - where: FindOptionsWhere, + where: FindOptionsWhere[] | FindOptionsWhere, metadata: EntityMetadata, alias: string, embedPrefix?: string, ) { let condition: string = "" // let parameterIndex = Object.keys(this.expressionMap.nativeParameters).length; - if (Array.isArray(where)) { + if (Array.isArray(where) && where.length) { condition = "(" + where @@ -4065,10 +4251,13 @@ export class SelectQueryBuilder parameterValue = where[key].value } if (column.transformer) { - parameterValue = ApplyValueTransformers.transformTo( - column.transformer, - parameterValue, - ) + parameterValue instanceof FindOperator + ? parameterValue.transformValue(column.transformer) + : (parameterValue = + ApplyValueTransformers.transformTo( + column.transformer, + parameterValue, + )) } // if (parameterValue === null) { @@ -4138,10 +4327,20 @@ export class SelectQueryBuilder if (InstanceChecker.isFindOperator(where[key])) { if ( where[key].type === "moreThan" || - where[key].type === "lessThan" + where[key].type === "lessThan" || + where[key].type === "moreThanOrEqual" || + where[key].type === "lessThanOrEqual" ) { - const sqlOperator = - where[key].type === "moreThan" ? ">" : "<" + let sqlOperator = "" + if (where[key].type === "moreThan") { + sqlOperator = ">" + } else if (where[key].type === "lessThan") { + sqlOperator = "<" + } else if (where[key].type === "moreThanOrEqual") { + sqlOperator = ">=" + } else if (where[key].type === "lessThanOrEqual") { + sqlOperator = "<=" + } // basically relation count functionality const qb: QueryBuilder = this.subQuery() if (relation.isManyToManyOwner) { @@ -4267,16 +4466,13 @@ export class SelectQueryBuilder ) if (!existJoin) { this.joins.push({ - type: "inner", + type: "left", select: false, selection: undefined, alias: joinAlias, parentAlias: alias, relationMetadata: relation, }) - } else { - if (existJoin.type === "left") - existJoin.type = "inner" } const condition = this.buildWhere( diff --git a/src/query-builder/SoftDeleteQueryBuilder.ts b/src/query-builder/SoftDeleteQueryBuilder.ts index f32d78e5ee..bf9c0a6d84 100644 --- a/src/query-builder/SoftDeleteQueryBuilder.ts +++ b/src/query-builder/SoftDeleteQueryBuilder.ts @@ -49,7 +49,7 @@ export class SoftDeleteQueryBuilder sql += this.createCteExpression() sql += this.createOrderByExpression() sql += this.createLimitExpression() - return sql.trim() + return this.replacePropertyNamesForTheWholeQuery(sql.trim()) } /** diff --git a/src/query-builder/UpdateQueryBuilder.ts b/src/query-builder/UpdateQueryBuilder.ts index 6067b9e39d..5400ffebcd 100644 --- a/src/query-builder/UpdateQueryBuilder.ts +++ b/src/query-builder/UpdateQueryBuilder.ts @@ -53,7 +53,7 @@ export class UpdateQueryBuilder sql += this.createUpdateExpression() sql += this.createOrderByExpression() sql += this.createLimitExpression() - return sql.trim() + return this.replacePropertyNamesForTheWholeQuery(sql.trim()) } /** @@ -585,8 +585,9 @@ export class UpdateQueryBuilder expression = `${geomFromText}(${paramName})` } } else if ( - this.connection.driver.options.type === - "postgres" && + DriverUtils.isPostgresFamily( + this.connection.driver, + ) && this.connection.driver.spatialTypes.indexOf( column.type, ) !== -1 diff --git a/src/query-builder/WhereClause.ts b/src/query-builder/WhereClause.ts index e3abd102d8..0ab126e330 100644 --- a/src/query-builder/WhereClause.ts +++ b/src/query-builder/WhereClause.ts @@ -16,6 +16,8 @@ type PredicateOperator = | "arrayContains" | "arrayContainedBy" | "arrayOverlap" + | "and" + | "jsonContains" export interface WherePredicateOperator { operator: PredicateOperator diff --git a/src/query-builder/relation-id/RelationIdLoader.ts b/src/query-builder/relation-id/RelationIdLoader.ts index 6f91fc4714..8515e8a0e5 100644 --- a/src/query-builder/relation-id/RelationIdLoader.ts +++ b/src/query-builder/relation-id/RelationIdLoader.ts @@ -50,6 +50,7 @@ export class RelationIdLoader { rawEntity[ DriverUtils.buildAlias( this.connection.driver, + undefined, relationIdAttr.parentAlias, joinColumn.databaseName, ) @@ -76,6 +77,7 @@ export class RelationIdLoader { rawEntity[ DriverUtils.buildAlias( this.connection.driver, + undefined, relationIdAttr.parentAlias, primaryColumn.databaseName, ) @@ -139,6 +141,7 @@ export class RelationIdLoader { rawEntity[ DriverUtils.buildAlias( this.connection.driver, + undefined, relationIdAttr.parentAlias, joinColumn.referencedColumn! .databaseName, @@ -270,6 +273,7 @@ export class RelationIdLoader { rawEntity[ DriverUtils.buildAlias( this.connection.driver, + undefined, relationIdAttr.parentAlias, joinColumn.referencedColumn! .databaseName, diff --git a/src/query-builder/transformer/DocumentToEntityTransformer.ts b/src/query-builder/transformer/DocumentToEntityTransformer.ts index 07a8c35d0b..0cbf5bb7e8 100644 --- a/src/query-builder/transformer/DocumentToEntityTransformer.ts +++ b/src/query-builder/transformer/DocumentToEntityTransformer.ts @@ -33,16 +33,24 @@ export class DocumentToEntityTransformer { let hasData = false // handle _id property the special way - if ( - metadata.objectIdColumn && - document[metadata.objectIdColumn.databaseNameWithoutPrefixes] - ) { + if (metadata.objectIdColumn) { // todo: we can't use driver in this class // do we really need prepare hydrated value here? If no then no problem. If yes then think maybe prepareHydratedValue process should be extracted out of driver class? - // entity[metadata.objectIdColumn.propertyName] = this.driver.prepareHydratedValue(document[metadata.objectIdColumn.name"], metadata.objectIdColumn); - entity[metadata.objectIdColumn.propertyName] = - document[metadata.objectIdColumn.databaseNameWithoutPrefixes] - hasData = true + // entity[metadata.ObjectIdColumn.propertyName] = this.driver.prepareHydratedValue(document[metadata.ObjectIdColumn.name"], metadata.ObjectIdColumn); + const { databaseNameWithoutPrefixes, propertyName } = + metadata.objectIdColumn + + const documentIdWithoutPrefixes = + document[databaseNameWithoutPrefixes] + const documentIdWithPropertyName = document[propertyName] + + if (documentIdWithoutPrefixes) { + entity[propertyName] = documentIdWithoutPrefixes + hasData = true + } else if (documentIdWithPropertyName) { + entity[propertyName] = documentIdWithPropertyName + hasData = true + } } // add special columns that contains relation ids diff --git a/src/query-builder/transformer/PlainObjectToNewEntityTransformer.ts b/src/query-builder/transformer/PlainObjectToNewEntityTransformer.ts index 395dcf7210..010c4cf6dc 100644 --- a/src/query-builder/transformer/PlainObjectToNewEntityTransformer.ts +++ b/src/query-builder/transformer/PlainObjectToNewEntityTransformer.ts @@ -82,20 +82,24 @@ export class PlainObjectToNewEntityTransformer { ) }) + const inverseEntityMetadata = + relation.inverseEntityMetadata.findInheritanceMetadata( + objectRelatedValueItem, + ) + // if such item already exist then merge new data into it, if its not we create a new entity and merge it into the array if (!objectRelatedValueEntity) { objectRelatedValueEntity = - relation.inverseEntityMetadata.create( - undefined, - { fromDeserializer: true }, - ) + inverseEntityMetadata.create(undefined, { + fromDeserializer: true, + }) entityRelatedValue.push(objectRelatedValueEntity) } this.groupAndTransform( objectRelatedValueEntity, objectRelatedValueItem, - relation.inverseEntityMetadata, + inverseEntityMetadata, getLazyRelationsPromiseValue, ) }) @@ -110,18 +114,25 @@ export class PlainObjectToNewEntityTransformer { return } + const inverseEntityMetadata = + relation.inverseEntityMetadata.findInheritanceMetadata( + objectRelatedValue, + ) + if (!entityRelatedValue) { - entityRelatedValue = - relation.inverseEntityMetadata.create(undefined, { + entityRelatedValue = inverseEntityMetadata.create( + undefined, + { fromDeserializer: true, - }) + }, + ) relation.setEntityValue(entity, entityRelatedValue) } this.groupAndTransform( entityRelatedValue, objectRelatedValue, - relation.inverseEntityMetadata, + inverseEntityMetadata, getLazyRelationsPromiseValue, ) } diff --git a/src/query-builder/transformer/RawSqlResultsToEntityTransformer.ts b/src/query-builder/transformer/RawSqlResultsToEntityTransformer.ts index ee97daa2ae..0ba601beef 100644 --- a/src/query-builder/transformer/RawSqlResultsToEntityTransformer.ts +++ b/src/query-builder/transformer/RawSqlResultsToEntityTransformer.ts @@ -72,6 +72,7 @@ export class RawSqlResultsToEntityTransformer { ...alias.metadata.columns.map((column) => DriverUtils.buildAlias( this.driver, + undefined, alias.name, column.databaseName, ), @@ -82,6 +83,7 @@ export class RawSqlResultsToEntityTransformer { ...alias.metadata.primaryColumns.map((column) => DriverUtils.buildAlias( this.driver, + undefined, alias.name, column.databaseName, ), @@ -131,6 +133,7 @@ export class RawSqlResultsToEntityTransformer { result[ DriverUtils.buildAlias( this.driver, + undefined, alias.name, alias.metadata.discriminatorColumn!.databaseName, ) @@ -221,6 +224,7 @@ export class RawSqlResultsToEntityTransformer { rawResults[0][ DriverUtils.buildAlias( this.driver, + undefined, alias.name, column.databaseName, ) @@ -415,6 +419,7 @@ export class RawSqlResultsToEntityTransformer { rawSqlResults[0][ DriverUtils.buildAlias( this.driver, + undefined, alias.name, referenceColumnName, ) @@ -474,6 +479,7 @@ export class RawSqlResultsToEntityTransformer { rawSqlResult[ DriverUtils.buildAlias( this.driver, + undefined, parentAlias, column.databaseName, ) @@ -486,11 +492,12 @@ export class RawSqlResultsToEntityTransformer { rawSqlResult[ DriverUtils.buildAlias( this.driver, + undefined, parentAlias, column.referencedColumn!.databaseName, ) ], - column, + column.referencedColumn!, ) } }) diff --git a/src/query-runner/BaseQueryRunner.ts b/src/query-runner/BaseQueryRunner.ts index 292572d724..466e6160fa 100644 --- a/src/query-runner/BaseQueryRunner.ts +++ b/src/query-runner/BaseQueryRunner.ts @@ -472,6 +472,7 @@ export abstract class BaseQueryRunner { newColumn: TableColumn, checkDefault?: boolean, checkComment?: boolean, + checkEnum = true, ): boolean { // this logs need to debug issues in column change detection. Do not delete it! @@ -513,7 +514,14 @@ export abstract class BaseQueryRunner { oldColumn.onUpdate !== newColumn.onUpdate || // MySQL only oldColumn.isNullable !== newColumn.isNullable || (checkComment && oldColumn.comment !== newColumn.comment) || - !OrmUtils.isArraysEqual(oldColumn.enum || [], newColumn.enum || []) + (checkEnum && this.isEnumChanged(oldColumn, newColumn)) + ) + } + + protected isEnumChanged(oldColumn: TableColumn, newColumn: TableColumn) { + return !OrmUtils.isArraysEqual( + oldColumn.enum || [], + newColumn.enum || [], ) } @@ -655,7 +663,10 @@ export abstract class BaseQueryRunner { /** * Generated an index name for a table and index */ - protected generateIndexName(table: Table, index: TableIndex): string { + protected generateIndexName( + table: Table | View, + index: TableIndex, + ): string { // new index may be passed without name. In this case we generate index name manually. return this.connection.namingStrategy.indexName( table, diff --git a/src/repository/BaseEntity.ts b/src/repository/BaseEntity.ts index 89e13c1a80..77d716b819 100644 --- a/src/repository/BaseEntity.ts +++ b/src/repository/BaseEntity.ts @@ -10,11 +10,12 @@ import { SelectQueryBuilder } from "../query-builder/SelectQueryBuilder" import { InsertResult } from "../query-builder/result/InsertResult" import { UpdateResult } from "../query-builder/result/UpdateResult" import { DeleteResult } from "../query-builder/result/DeleteResult" -import { ObjectID } from "../driver/mongodb/typings" +import { ObjectId } from "../driver/mongodb/typings" import { ObjectUtils } from "../util/ObjectUtils" import { QueryDeepPartialEntity } from "../query-builder/QueryPartialEntity" import { UpsertOptions } from "./UpsertOptions" import { EntityTarget } from "../common/EntityTarget" +import { PickKeysByType } from "../common/PickKeysByType" /** * Base abstract entity for all entities, used in ActiveRecord patterns. @@ -340,8 +341,8 @@ export class BaseEntity { | number[] | Date | Date[] - | ObjectID - | ObjectID[] + | ObjectId + | ObjectId[] | FindOptionsWhere, partialEntity: QueryDeepPartialEntity, ): Promise { @@ -381,8 +382,8 @@ export class BaseEntity { | number[] | Date | Date[] - | ObjectID - | ObjectID[] + | ObjectId + | ObjectId[] | FindOptionsWhere, ): Promise { return this.getRepository().delete(criteria) @@ -408,6 +409,50 @@ export class BaseEntity { return this.getRepository().countBy(where) } + /** + * Return the SUM of a column + */ + static sum( + this: { new (): T } & typeof BaseEntity, + columnName: PickKeysByType, + where: FindOptionsWhere, + ): Promise { + return this.getRepository().sum(columnName, where) + } + + /** + * Return the AVG of a column + */ + static average( + this: { new (): T } & typeof BaseEntity, + columnName: PickKeysByType, + where: FindOptionsWhere, + ): Promise { + return this.getRepository().average(columnName, where) + } + + /** + * Return the MIN of a column + */ + static minimum( + this: { new (): T } & typeof BaseEntity, + columnName: PickKeysByType, + where: FindOptionsWhere, + ): Promise { + return this.getRepository().minimum(columnName, where) + } + + /** + * Return the MAX of a column + */ + static maximum( + this: { new (): T } & typeof BaseEntity, + columnName: PickKeysByType, + where: FindOptionsWhere, + ): Promise { + return this.getRepository().maximum(columnName, where) + } + /** * Finds entities that match given options. */ @@ -500,7 +545,7 @@ export class BaseEntity { */ static findOneById( this: { new (): T } & typeof BaseEntity, - id: string | number | Date | ObjectID, + id: string | number | Date | ObjectId, ): Promise { return this.getRepository().findOneById(id) } diff --git a/src/repository/EntityId.ts b/src/repository/EntityId.ts index a0ef60b5a0..b63ab64bd0 100644 --- a/src/repository/EntityId.ts +++ b/src/repository/EntityId.ts @@ -1,3 +1,3 @@ -import { ObjectID } from "../driver/mongodb/typings" +import { ObjectId } from "../driver/mongodb/typings" -export type EntityId = string | number | Date | ObjectID +export type EntityId = string | number | Date | ObjectId diff --git a/src/repository/MongoRepository.ts b/src/repository/MongoRepository.ts index 53fbf2cc21..78860e4756 100644 --- a/src/repository/MongoRepository.ts +++ b/src/repository/MongoRepository.ts @@ -1,43 +1,50 @@ import { ObjectLiteral } from "../common/ObjectLiteral" import { Repository } from "./Repository" import { MongoFindManyOptions } from "../find-options/mongodb/MongoFindManyOptions" +import { MongoEntityManager } from "../entity-manager/MongoEntityManager" +import { QueryRunner } from "../query-runner/QueryRunner" +import { SelectQueryBuilder } from "../query-builder/SelectQueryBuilder" +import { TypeORMError } from "../error/TypeORMError" +import { MongoFindOneOptions } from "../find-options/mongodb/MongoFindOneOptions" +import { FindOneOptions } from "../find-options/FindOneOptions" + import { + CreateIndexesOptions, + ObjectId, + ReplaceOptions, + // + AggregateOptions, AggregationCursor, - BulkWriteOpResultObject, - Code, + AnyBulkWriteOperation, + BulkWriteOptions, + BulkWriteResult, Collection, - CollectionAggregationOptions, - CollectionBulkWriteOptions, - CollectionInsertManyOptions, - CollectionInsertOneOptions, - CollectionOptions, CollStats, - CommandCursor, - Cursor, - DeleteWriteOpResultObject, - FindAndModifyWriteOpResultObject, - FindOneAndReplaceOption, - GeoHaystackSearchOptions, - GeoNearOptions, - InsertOneWriteOpResult, - InsertWriteOpResult, - MapReduceOptions, - MongoCountPreferences, - MongodbIndexOptions, - ObjectID, + CollStatsOptions, + CommandOperationOptions, + CountOptions, + DeleteOptions, + DeleteResult, + Document, + Filter, + FilterOperators, + FindCursor, + FindOneAndDeleteOptions, + FindOneAndReplaceOptions, + FindOneAndUpdateOptions, + IndexDescription, + InsertManyResult, + InsertOneOptions, + InsertOneResult, + ListIndexesCursor, + ListIndexesOptions, OrderedBulkOperation, - ParallelCollectionScanOptions, - ReadPreference, - ReplaceOneOptions, UnorderedBulkOperation, - UpdateWriteOpResult, + UpdateFilter, + UpdateOptions, + UpdateResult, } from "../driver/mongodb/typings" -import { MongoEntityManager } from "../entity-manager/MongoEntityManager" -import { QueryRunner } from "../query-runner/QueryRunner" -import { SelectQueryBuilder } from "../query-builder/SelectQueryBuilder" -import { TypeORMError } from "../error/TypeORMError" -import { MongoFindOneOptions } from "../find-options/mongodb/MongoFindOneOptions" -import { FindOneOptions } from "../find-options/FindOneOptions" +import { FindManyOptions } from "../find-options/FindManyOptions" /** * Repository used to manage mongodb documents of a single entity type. @@ -80,7 +87,12 @@ export class MongoRepository< /** * Finds entities that match given find options or conditions. */ - find(options?: MongoFindManyOptions): Promise { + find( + options?: + | FindManyOptions + | Partial + | FilterOperators, + ): Promise { return this.manager.find(this.metadata.target, options) } @@ -151,15 +163,7 @@ export class MongoRepository< * }) */ async findOneById( - id: - | string - | string[] - | number - | number[] - | Date - | Date[] - | ObjectID - | ObjectID[], + id: string | number | Date | ObjectId, ): Promise { return this.manager.findOneById(this.metadata.target, id) } @@ -183,7 +187,7 @@ export class MongoRepository< /** * Creates a cursor for a query that can be used to iterate over results from MongoDB. */ - createCursor(query?: ObjectLiteral): Cursor { + createCursor(query?: Filter): FindCursor { return this.manager.createCursor(this.metadata.target, query) } @@ -191,7 +195,7 @@ export class MongoRepository< * Creates a cursor for a query that can be used to iterate over results from MongoDB. * This returns modified version of cursor that transforms each result into Entity model. */ - createEntityCursor(query?: ObjectLiteral): Cursor { + createEntityCursor(query?: Filter): FindCursor { return this.manager.createEntityCursor(this.metadata.target, query) } @@ -200,8 +204,8 @@ export class MongoRepository< */ aggregate( pipeline: ObjectLiteral[], - options?: CollectionAggregationOptions, - ): AggregationCursor { + options?: AggregateOptions, + ): AggregationCursor { return this.manager.aggregate( this.metadata.target, pipeline, @@ -215,7 +219,7 @@ export class MongoRepository< */ aggregateEntity( pipeline: ObjectLiteral[], - options?: CollectionAggregationOptions, + options?: AggregateOptions, ): AggregationCursor { return this.manager.aggregateEntity( this.metadata.target, @@ -227,30 +231,24 @@ export class MongoRepository< * Perform a bulkWrite operation without a fluent API. */ bulkWrite( - operations: ObjectLiteral[], - options?: CollectionBulkWriteOptions, - ): Promise { + operations: AnyBulkWriteOperation[], + options?: BulkWriteOptions, + ): Promise { return this.manager.bulkWrite(this.metadata.target, operations, options) } /** * Count number of matching documents in the db to a query. */ - count( - query?: ObjectLiteral, - options?: MongoCountPreferences, - ): Promise { + count(query?: ObjectLiteral, options?: CountOptions): Promise { return this.manager.count(this.metadata.target, query || {}, options) } /** * Count number of matching documents in the db to a query. */ - countBy( - query?: ObjectLiteral, - options?: MongoCountPreferences, - ): Promise { - return this.manager.countBy(this.metadata.target, query || {}, options) + countBy(query?: ObjectLiteral, options?: CountOptions): Promise { + return this.manager.countBy(this.metadata.target, query, options) } /** @@ -258,7 +256,7 @@ export class MongoRepository< */ createCollectionIndex( fieldOrSpec: string | any, - options?: MongodbIndexOptions, + options?: CreateIndexesOptions, ): Promise { return this.manager.createCollectionIndex( this.metadata.target, @@ -272,7 +270,7 @@ export class MongoRepository< * Earlier version of MongoDB will throw a command not supported error. * Index specifications are defined at http://docs.mongodb.org/manual/reference/command/createIndexes/. */ - createCollectionIndexes(indexSpecs: ObjectLiteral[]): Promise { + createCollectionIndexes(indexSpecs: IndexDescription[]): Promise { return this.manager.createCollectionIndexes( this.metadata.target, indexSpecs, @@ -284,8 +282,8 @@ export class MongoRepository< */ deleteMany( query: ObjectLiteral, - options?: CollectionOptions, - ): Promise { + options?: DeleteOptions, + ): Promise { return this.manager.deleteMany(this.metadata.tableName, query, options) } @@ -294,8 +292,8 @@ export class MongoRepository< */ deleteOne( query: ObjectLiteral, - options?: CollectionOptions, - ): Promise { + options?: DeleteOptions, + ): Promise { return this.manager.deleteOne(this.metadata.tableName, query, options) } @@ -305,7 +303,7 @@ export class MongoRepository< distinct( key: string, query: ObjectLiteral, - options?: { readPreference?: ReadPreference | string }, + options?: CommandOperationOptions, ): Promise { return this.manager.distinct( this.metadata.tableName, @@ -320,7 +318,7 @@ export class MongoRepository< */ dropCollectionIndex( indexName: string, - options?: CollectionOptions, + options?: CommandOperationOptions, ): Promise { return this.manager.dropCollectionIndex( this.metadata.tableName, @@ -341,8 +339,8 @@ export class MongoRepository< */ findOneAndDelete( query: ObjectLiteral, - options?: { projection?: Object; sort?: Object; maxTimeMS?: number }, - ): Promise { + options?: FindOneAndDeleteOptions, + ): Promise { return this.manager.findOneAndDelete( this.metadata.tableName, query, @@ -356,8 +354,8 @@ export class MongoRepository< findOneAndReplace( query: ObjectLiteral, replacement: Object, - options?: FindOneAndReplaceOption, - ): Promise { + options?: FindOneAndReplaceOptions, + ): Promise { return this.manager.findOneAndReplace( this.metadata.tableName, query, @@ -372,8 +370,8 @@ export class MongoRepository< findOneAndUpdate( query: ObjectLiteral, update: Object, - options?: FindOneAndReplaceOption, - ): Promise { + options?: FindOneAndUpdateOptions, + ): Promise { return this.manager.findOneAndUpdate( this.metadata.tableName, query, @@ -382,53 +380,6 @@ export class MongoRepository< ) } - /** - * Execute a geo search using a geo haystack index on a collection. - */ - geoHaystackSearch( - x: number, - y: number, - options?: GeoHaystackSearchOptions, - ): Promise { - return this.manager.geoHaystackSearch( - this.metadata.tableName, - x, - y, - options, - ) - } - - /** - * Execute the geoNear command to search for items in the collection. - */ - geoNear(x: number, y: number, options?: GeoNearOptions): Promise { - return this.manager.geoNear(this.metadata.tableName, x, y, options) - } - - /** - * Run a group command across a collection. - */ - group( - keys: Object | Array | Function | Code, - condition: Object, - initial: Object, - reduce: Function | Code, - finalize: Function | Code, - command: boolean, - options?: { readPreference?: ReadPreference | string }, - ): Promise { - return this.manager.group( - this.metadata.tableName, - keys, - condition, - initial, - reduce, - finalize, - command, - options, - ) - } - /** * Retrieve all the indexes on the collection. */ @@ -459,7 +410,7 @@ export class MongoRepository< /** * Initiate an In order bulk write operation, operations will be serially executed in the order they are added, creating a new operation for each switch in types. */ - initializeOrderedBulkOp(options?: CollectionOptions): OrderedBulkOperation { + initializeOrderedBulkOp(options?: BulkWriteOptions): OrderedBulkOperation { return this.manager.initializeOrderedBulkOp( this.metadata.tableName, options, @@ -470,7 +421,7 @@ export class MongoRepository< * Initiate a Out of order batch write operation. All operations will be buffered into insert/update/remove commands executed out of order. */ initializeUnorderedBulkOp( - options?: CollectionOptions, + options?: BulkWriteOptions, ): UnorderedBulkOperation { return this.manager.initializeUnorderedBulkOp( this.metadata.tableName, @@ -483,8 +434,8 @@ export class MongoRepository< */ insertMany( docs: ObjectLiteral[], - options?: CollectionInsertManyOptions, - ): Promise { + options?: BulkWriteOptions, + ): Promise> { return this.manager.insertMany(this.metadata.tableName, docs, options) } @@ -493,8 +444,8 @@ export class MongoRepository< */ insertOne( doc: ObjectLiteral, - options?: CollectionInsertOneOptions, - ): Promise { + options?: InsertOneOptions, + ): Promise { return this.manager.insertOne(this.metadata.tableName, doc, options) } @@ -508,59 +459,20 @@ export class MongoRepository< /** * Get the list of all indexes information for the collection. */ - listCollectionIndexes(options?: { - batchSize?: number - readPreference?: ReadPreference | string - }): CommandCursor { + listCollectionIndexes(options?: ListIndexesOptions): ListIndexesCursor { return this.manager.listCollectionIndexes( this.metadata.tableName, options, ) } - /** - * Run Map Reduce across a collection. Be aware that the inline option for out will return an array of results not a collection. - */ - mapReduce( - map: Function | string, - reduce: Function | string, - options?: MapReduceOptions, - ): Promise { - return this.manager.mapReduce( - this.metadata.tableName, - map, - reduce, - options, - ) - } - - /** - * Return N number of parallel cursors for a collection allowing parallel reading of entire collection. - * There are no ordering guarantees for returned results. - */ - parallelCollectionScan( - options?: ParallelCollectionScanOptions, - ): Promise[]> { - return this.manager.parallelCollectionScan( - this.metadata.tableName, - options, - ) - } - - /** - * Reindex all indexes on the collection Warning: reIndex is a blocking operation (indexes are rebuilt in the foreground) and will be slow for large collections. - */ - reIndex(): Promise { - return this.manager.reIndex(this.metadata.tableName) - } - /** * Reindex all indexes on the collection Warning: reIndex is a blocking operation (indexes are rebuilt in the foreground) and will be slow for large collections. */ rename( newName: string, options?: { dropTarget?: boolean }, - ): Promise> { + ): Promise> { return this.manager.rename(this.metadata.tableName, newName, options) } @@ -570,8 +482,8 @@ export class MongoRepository< replaceOne( query: ObjectLiteral, doc: ObjectLiteral, - options?: ReplaceOneOptions, - ): Promise { + options?: ReplaceOptions, + ): Promise { return this.manager.replaceOne( this.metadata.tableName, query, @@ -583,7 +495,7 @@ export class MongoRepository< /** * Get all the collection statistics. */ - stats(options?: { scale: number }): Promise { + stats(options?: CollStatsOptions): Promise { return this.manager.stats(this.metadata.tableName, options) } @@ -592,9 +504,9 @@ export class MongoRepository< */ updateMany( query: ObjectLiteral, - update: ObjectLiteral, - options?: { upsert?: boolean; w?: any; wtimeout?: number; j?: boolean }, - ): Promise { + update: UpdateFilter, + options?: UpdateOptions, + ): Promise { return this.manager.updateMany( this.metadata.tableName, query, @@ -608,9 +520,9 @@ export class MongoRepository< */ updateOne( query: ObjectLiteral, - update: ObjectLiteral, - options?: ReplaceOneOptions, - ): Promise { + update: UpdateFilter, + options?: UpdateOptions, + ): Promise { return this.manager.updateOne( this.metadata.tableName, query, diff --git a/src/repository/Repository.ts b/src/repository/Repository.ts index 587cb419dd..68f269d927 100644 --- a/src/repository/Repository.ts +++ b/src/repository/Repository.ts @@ -11,10 +11,11 @@ import { DeleteResult } from "../query-builder/result/DeleteResult" import { UpdateResult } from "../query-builder/result/UpdateResult" import { InsertResult } from "../query-builder/result/InsertResult" import { QueryDeepPartialEntity } from "../query-builder/QueryPartialEntity" -import { ObjectID } from "../driver/mongodb/typings" +import { ObjectId } from "../driver/mongodb/typings" import { FindOptionsWhere } from "../find-options/FindOptionsWhere" import { UpsertOptions } from "./UpsertOptions" import { EntityTarget } from "../common/EntityTarget" +import { PickKeysByType } from "../common/PickKeysByType" /** * Repository is supposed to work with your entity objects. Find entities, insert, update, delete, etc. @@ -352,8 +353,8 @@ export class Repository { | number[] | Date | Date[] - | ObjectID - | ObjectID[] + | ObjectId + | ObjectId[] | FindOptionsWhere, partialEntity: QueryDeepPartialEntity, ): Promise { @@ -396,8 +397,8 @@ export class Repository { | number[] | Date | Date[] - | ObjectID - | ObjectID[] + | ObjectId + | ObjectId[] | FindOptionsWhere, ): Promise { return this.manager.delete(this.metadata.target as any, criteria as any) @@ -417,8 +418,8 @@ export class Repository { | number[] | Date | Date[] - | ObjectID - | ObjectID[] + | ObjectId + | ObjectId[] | FindOptionsWhere, ): Promise { return this.manager.softDelete( @@ -441,8 +442,8 @@ export class Repository { | number[] | Date | Date[] - | ObjectID - | ObjectID[] + | ObjectId + | ObjectId[] | FindOptionsWhere, ): Promise { return this.manager.restore( @@ -451,6 +452,13 @@ export class Repository { ) } + /** + * Checks whether any entity exists that match given options. + */ + exist(options?: FindManyOptions): Promise { + return this.manager.exists(this.metadata.target, options) + } + /** * Counts entities that match given options. * Useful for pagination. @@ -469,6 +477,46 @@ export class Repository { return this.manager.countBy(this.metadata.target, where) } + /** + * Return the SUM of a column + */ + sum( + columnName: PickKeysByType, + where?: FindOptionsWhere | FindOptionsWhere[], + ): Promise { + return this.manager.sum(this.metadata.target, columnName, where) + } + + /** + * Return the AVG of a column + */ + average( + columnName: PickKeysByType, + where?: FindOptionsWhere | FindOptionsWhere[], + ): Promise { + return this.manager.average(this.metadata.target, columnName, where) + } + + /** + * Return the MIN of a column + */ + minimum( + columnName: PickKeysByType, + where?: FindOptionsWhere | FindOptionsWhere[], + ): Promise { + return this.manager.minimum(this.metadata.target, columnName, where) + } + + /** + * Return the MAX of a column + */ + maximum( + columnName: PickKeysByType, + where?: FindOptionsWhere | FindOptionsWhere[], + ): Promise { + return this.manager.maximum(this.metadata.target, columnName, where) + } + /** * Finds entities that match given find options. */ @@ -550,7 +598,7 @@ export class Repository { * }) */ async findOneById( - id: number | string | Date | ObjectID, + id: number | string | Date | ObjectId, ): Promise { return this.manager.findOneById(this.metadata.target, id) } @@ -627,9 +675,8 @@ export class Repository { * Extends repository with provided functions. */ extend( - custom: CustomRepository & - ThisType & CustomRepository>, - ): Repository & CustomRepository { + custom: CustomRepository & ThisType, + ): this & CustomRepository { // return { // ...this, // ...custom diff --git a/src/repository/TreeRepository.ts b/src/repository/TreeRepository.ts index c03144f87f..ffbe821771 100644 --- a/src/repository/TreeRepository.ts +++ b/src/repository/TreeRepository.ts @@ -408,24 +408,6 @@ export class TreeRepository< throw new TypeORMError(`Supported only in tree entities`) } - /** - * Extends tree repository with provided functions. - */ - extend( - custom: CustomRepository & - ThisType & CustomRepository>, - ): TreeRepository & CustomRepository { - const thisRepo = this.constructor as new (...args: any[]) => typeof this - const { target, manager, queryRunner } = this - const cls = new (class extends thisRepo {})( - target, - manager, - queryRunner, - ) - Object.assign(cls, custom) - return cls as any - } - /** * Moves entity to the children of then given entity. * diff --git a/src/repository/UpsertOptions.ts b/src/repository/UpsertOptions.ts index 6f138eb18a..084b9c8ad8 100644 --- a/src/repository/UpsertOptions.ts +++ b/src/repository/UpsertOptions.ts @@ -1,11 +1,21 @@ +import { InsertOrUpdateOptions } from "../query-builder/InsertOrUpdateOptions" +import { UpsertType } from "../driver/types/UpsertType" + /** * Special options passed to Repository#upsert */ -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export interface UpsertOptions { - conflictPaths: string[] +export interface UpsertOptions extends InsertOrUpdateOptions { + conflictPaths: string[] | { [P in keyof Entity]?: true } + /** * If true, postgres will skip the update if no values would be changed (reduces writes) */ skipUpdateIfNoValuesChanged?: boolean + + /** + * Define the type of upsert to use (currently, CockroachDB only). + * + * If none provided, it will use the default for the database (first one in the list) + */ + upsertType?: UpsertType } diff --git a/src/schema-builder/MongoSchemaBuilder.ts b/src/schema-builder/MongoSchemaBuilder.ts index b57bdedc86..2e7763c86e 100644 --- a/src/schema-builder/MongoSchemaBuilder.ts +++ b/src/schema-builder/MongoSchemaBuilder.ts @@ -2,7 +2,7 @@ import { DataSource } from "../data-source/DataSource" import { SchemaBuilder } from "./SchemaBuilder" import { MongoQueryRunner } from "../driver/mongodb/MongoQueryRunner" import { SqlInMemory } from "../driver/SqlInMemory" -import { MongodbIndexOptions } from "../driver/mongodb/typings" +import { CreateIndexesOptions } from "../driver/mongodb/typings" /** * Creates complete tables schemas in the database based on the entity metadatas. @@ -38,7 +38,7 @@ export class MongoSchemaBuilder implements SchemaBuilder { const promises: Promise[] = [] this.connection.entityMetadatas.forEach((metadata) => { metadata.indices.forEach((index) => { - const options: MongodbIndexOptions = Object.assign( + const options: CreateIndexesOptions = Object.assign( {}, { name: index.name, @@ -59,7 +59,7 @@ export class MongoSchemaBuilder implements SchemaBuilder { ) }) metadata.uniques.forEach((unique) => { - const options = { + const options = { name: unique.name, unique: true, } diff --git a/src/schema-builder/RdbmsSchemaBuilder.ts b/src/schema-builder/RdbmsSchemaBuilder.ts index 1cd4f06c87..9453ed633a 100644 --- a/src/schema-builder/RdbmsSchemaBuilder.ts +++ b/src/schema-builder/RdbmsSchemaBuilder.ts @@ -16,6 +16,7 @@ import { TableExclusion } from "./table/TableExclusion" import { View } from "./view/View" import { ViewUtils } from "./util/ViewUtils" import { DriverUtils } from "../driver/DriverUtils" +import { PostgresQueryRunner } from "../driver/postgres/PostgresQueryRunner" /** * Creates complete tables schemas in the database based on the entity metadatas. @@ -84,9 +85,12 @@ export class RdbmsSchemaBuilder implements SchemaBuilder { const tablePaths = this.entityToSyncMetadatas.map((metadata) => this.getTablePath(metadata), ) + const viewPaths = this.viewEntityToSyncMetadatas.map((metadata) => + this.getTablePath(metadata), + ) await this.queryRunner.getTables(tablePaths) - await this.queryRunner.getViews([]) + await this.queryRunner.getViews(viewPaths) await this.executeSchemaSyncOperationsInProperOrder() @@ -138,8 +142,11 @@ export class RdbmsSchemaBuilder implements SchemaBuilder { const tablePaths = this.entityToSyncMetadatas.map((metadata) => this.getTablePath(metadata), ) + const viewPaths = this.viewEntityToSyncMetadatas.map((metadata) => + this.getTablePath(metadata), + ) await this.queryRunner.getTables(tablePaths) - await this.queryRunner.getViews([]) + await this.queryRunner.getViews(viewPaths) this.queryRunner.enableSqlMemory() await this.executeSchemaSyncOperationsInProperOrder() @@ -225,6 +232,7 @@ export class RdbmsSchemaBuilder implements SchemaBuilder { await this.createCompositeUniqueConstraints() await this.createForeignKeys() await this.createViews() + await this.createNewViewIndices() } private getTablePath( @@ -357,7 +365,7 @@ export class RdbmsSchemaBuilder implements SchemaBuilder { renamedColumn.name = renamedMetadataColumns[0].databaseName this.connection.logger.logSchemaBuild( - `renaming column "${renamedTableColumns[0].name}" in to "${renamedColumn.name}"`, + `renaming column "${renamedTableColumns[0].name}" in "${table.name}" to "${renamedColumn.name}"`, ) await this.queryRunner.renameColumn( table, @@ -420,6 +428,70 @@ export class RdbmsSchemaBuilder implements SchemaBuilder { await Promise.all(dropQueries) } + if (this.connection.options.type === "postgres") { + const postgresQueryRunner: PostgresQueryRunner = < + PostgresQueryRunner + >this.queryRunner + for (const metadata of this.viewEntityToSyncMetadatas) { + const view = this.queryRunner.loadedViews.find( + (view) => + this.getTablePath(view) === this.getTablePath(metadata), + ) + if (!view) continue + + const dropQueries = view.indices + .filter((tableIndex) => { + const indexMetadata = metadata.indices.find( + (index) => index.name === tableIndex.name, + ) + if (indexMetadata) { + if (indexMetadata.synchronize === false) + return false + + if (indexMetadata.isUnique !== tableIndex.isUnique) + return true + + if ( + indexMetadata.isSpatial !== tableIndex.isSpatial + ) + return true + + if ( + this.connection.driver.isFullTextColumnTypeSupported() && + indexMetadata.isFulltext !== + tableIndex.isFulltext + ) + return true + + if ( + indexMetadata.columns.length !== + tableIndex.columnNames.length + ) + return true + + return !indexMetadata.columns.every( + (column) => + tableIndex.columnNames.indexOf( + column.databaseName, + ) !== -1, + ) + } + + return true + }) + .map(async (tableIndex) => { + this.connection.logger.logSchemaBuild( + `dropping an index: "${tableIndex.name}" from view ${view.name}`, + ) + await postgresQueryRunner.dropViewIndex( + view, + tableIndex, + ) + }) + + await Promise.all(dropQueries) + } + } } protected async dropOldChecks(): Promise { @@ -908,6 +980,59 @@ export class RdbmsSchemaBuilder implements SchemaBuilder { } } + /** + * Creates indices for materialized views. + */ + protected async createNewViewIndices(): Promise { + // Only PostgreSQL supports indices for materialized views. + if ( + this.connection.options.type !== "postgres" || + !DriverUtils.isPostgresFamily(this.connection.driver) + ) { + return + } + const postgresQueryRunner: PostgresQueryRunner = ( + this.queryRunner + ) + for (const metadata of this.viewEntityToSyncMetadatas) { + // check if view does not exist yet + const view = this.queryRunner.loadedViews.find((view) => { + const viewExpression = + typeof view.expression === "string" + ? view.expression.trim() + : view.expression(this.connection).getQuery() + const metadataExpression = + typeof metadata.expression === "string" + ? metadata.expression.trim() + : metadata.expression!(this.connection).getQuery() + return ( + this.getTablePath(view) === this.getTablePath(metadata) && + viewExpression === metadataExpression + ) + }) + if (!view || !view.materialized) continue + + const newIndices = metadata.indices + .filter( + (indexMetadata) => + !view.indices.find( + (tableIndex) => + tableIndex.name === indexMetadata.name, + ) && indexMetadata.synchronize === true, + ) + .map((indexMetadata) => TableIndex.create(indexMetadata)) + + if (newIndices.length === 0) continue + + this.connection.logger.logSchemaBuild( + `adding new indices ${newIndices + .map((index) => `"${index.name}"`) + .join(", ")} in view "${view.name}"`, + ) + await postgresQueryRunner.createViewIndices(view, newIndices) + } + } + protected async createNewChecks(): Promise { // Mysql does not support check constraints if ( diff --git a/src/schema-builder/view/View.ts b/src/schema-builder/view/View.ts index 0fe69d2881..c4ed8390cc 100644 --- a/src/schema-builder/view/View.ts +++ b/src/schema-builder/view/View.ts @@ -1,4 +1,10 @@ -import { DataSource, Driver, EntityMetadata, SelectQueryBuilder } from "../.." +import { + DataSource, + Driver, + EntityMetadata, + SelectQueryBuilder, + TableIndex, +} from "../.." import { ViewOptions } from "../options/ViewOptions" /** @@ -31,6 +37,11 @@ export class View { */ materialized: boolean + /** + * View Indices + */ + indices: TableIndex[] + /** * View definition. */ @@ -41,6 +52,7 @@ export class View { // ------------------------------------------------------------------------- constructor(options?: ViewOptions) { + this.indices = [] if (options) { this.database = options.database this.schema = options.schema @@ -67,6 +79,25 @@ export class View { }) } + /** + * Add index + */ + addIndex(index: TableIndex): void { + this.indices.push(index) + } + + /** + * Remove index + */ + removeIndex(viewIndex: TableIndex): void { + const index = this.indices.find( + (index) => index.name === viewIndex.name, + ) + if (index) { + this.indices.splice(this.indices.indexOf(index), 1) + } + } + // ------------------------------------------------------------------------- // Static Methods // ------------------------------------------------------------------------- diff --git a/src/subscriber/Broadcaster.ts b/src/subscriber/Broadcaster.ts index a78eb7c2b6..02a74e3444 100644 --- a/src/subscriber/Broadcaster.ts +++ b/src/subscriber/Broadcaster.ts @@ -214,6 +214,7 @@ export class Broadcaster { metadata: EntityMetadata, entity?: ObjectLiteral, databaseEntity?: ObjectLiteral, + identifier?: ObjectLiteral, ): void { if (entity && metadata.beforeRemoveListeners.length) { metadata.beforeRemoveListeners.forEach((listener) => { @@ -239,7 +240,9 @@ export class Broadcaster { entity: entity, metadata: metadata, databaseEntity: databaseEntity, - entityId: metadata.getEntityIdMixedMap(databaseEntity), + entityId: metadata.getEntityIdMixedMap( + databaseEntity ?? identifier, + ), }) if (executionResult instanceof Promise) result.promises.push(executionResult) @@ -262,6 +265,7 @@ export class Broadcaster { metadata: EntityMetadata, entity?: ObjectLiteral, databaseEntity?: ObjectLiteral, + identifier?: ObjectLiteral, ): void { if (entity && metadata.beforeSoftRemoveListeners.length) { metadata.beforeSoftRemoveListeners.forEach((listener) => { @@ -287,7 +291,9 @@ export class Broadcaster { entity: entity, metadata: metadata, databaseEntity: databaseEntity, - entityId: metadata.getEntityIdMixedMap(databaseEntity), + entityId: metadata.getEntityIdMixedMap( + databaseEntity ?? identifier, + ), }) if (executionResult instanceof Promise) result.promises.push(executionResult) @@ -310,6 +316,7 @@ export class Broadcaster { metadata: EntityMetadata, entity?: ObjectLiteral, databaseEntity?: ObjectLiteral, + identifier?: ObjectLiteral, ): void { if (entity && metadata.beforeRecoverListeners.length) { metadata.beforeRecoverListeners.forEach((listener) => { @@ -335,7 +342,9 @@ export class Broadcaster { entity: entity, metadata: metadata, databaseEntity: databaseEntity, - entityId: metadata.getEntityIdMixedMap(databaseEntity), + entityId: metadata.getEntityIdMixedMap( + databaseEntity ?? identifier, + ), }) if (executionResult instanceof Promise) result.promises.push(executionResult) @@ -577,6 +586,7 @@ export class Broadcaster { metadata: EntityMetadata, entity?: ObjectLiteral, databaseEntity?: ObjectLiteral, + identifier?: ObjectLiteral, ): void { if (entity && metadata.afterRemoveListeners.length) { metadata.afterRemoveListeners.forEach((listener) => { @@ -602,7 +612,9 @@ export class Broadcaster { entity: entity, metadata: metadata, databaseEntity: databaseEntity, - entityId: metadata.getEntityIdMixedMap(databaseEntity), + entityId: metadata.getEntityIdMixedMap( + databaseEntity ?? identifier, + ), }) if (executionResult instanceof Promise) result.promises.push(executionResult) @@ -625,6 +637,7 @@ export class Broadcaster { metadata: EntityMetadata, entity?: ObjectLiteral, databaseEntity?: ObjectLiteral, + identifier?: ObjectLiteral, ): void { if (entity && metadata.afterSoftRemoveListeners.length) { metadata.afterSoftRemoveListeners.forEach((listener) => { @@ -650,7 +663,9 @@ export class Broadcaster { entity: entity, metadata: metadata, databaseEntity: databaseEntity, - entityId: metadata.getEntityIdMixedMap(databaseEntity), + entityId: metadata.getEntityIdMixedMap( + databaseEntity ?? identifier, + ), }) if (executionResult instanceof Promise) result.promises.push(executionResult) @@ -673,6 +688,7 @@ export class Broadcaster { metadata: EntityMetadata, entity?: ObjectLiteral, databaseEntity?: ObjectLiteral, + identifier?: ObjectLiteral, ): void { if (entity && metadata.afterRecoverListeners.length) { metadata.afterRecoverListeners.forEach((listener) => { @@ -698,7 +714,9 @@ export class Broadcaster { entity: entity, metadata: metadata, databaseEntity: databaseEntity, - entityId: metadata.getEntityIdMixedMap(databaseEntity), + entityId: metadata.getEntityIdMixedMap( + databaseEntity ?? identifier, + ), }) if (executionResult instanceof Promise) result.promises.push(executionResult) diff --git a/src/util/InstanceChecker.ts b/src/util/InstanceChecker.ts index 8a25f3c155..5978753531 100644 --- a/src/util/InstanceChecker.ts +++ b/src/util/InstanceChecker.ts @@ -6,7 +6,6 @@ import type { EqualOperator } from "../find-options/EqualOperator" import type { Query } from "../driver/Query" import type { RdbmsSchemaBuilder } from "../schema-builder/RdbmsSchemaBuilder" import type { Subject } from "../persistence/Subject" -import type { QueryBuilder } from "../query-builder/QueryBuilder" import type { SelectQueryBuilder } from "../query-builder/SelectQueryBuilder" import type { UpdateQueryBuilder } from "../query-builder/UpdateQueryBuilder" import type { DeleteQueryBuilder } from "../query-builder/DeleteQueryBuilder" @@ -39,17 +38,6 @@ export class InstanceChecker { static isColumnMetadata(obj: unknown): obj is ColumnMetadata { return this.check(obj, "ColumnMetadata") } - static isQueryBuilder(obj: unknown): obj is QueryBuilder { - return ( - this.check(obj, "QueryBuilder") || - this.check(obj, "SelectQueryBuilder") || - this.check(obj, "InsertQueryBuilder") || - this.check(obj, "DeleteQueryBuilder") || - this.check(obj, "UpdateQueryBuilder") || - this.check(obj, "SoftDeleteQueryBuilder") || - this.check(obj, "RelationQueryBuilder") - ) - } static isSelectQueryBuilder(obj: unknown): obj is SelectQueryBuilder { return this.check(obj, "SelectQueryBuilder") } diff --git a/src/util/ObjectUtils.ts b/src/util/ObjectUtils.ts index c9b908377d..f1648ba47e 100644 --- a/src/util/ObjectUtils.ts +++ b/src/util/ObjectUtils.ts @@ -10,6 +10,17 @@ export class ObjectUtils { return val !== null && typeof val === "object" } + /** + * Checks if given value is an object. + * We cannot use instanceof because it has problems when running on different contexts. + * And we don't simply use typeof because typeof null === "object". + */ + static isObjectWithName(val: any): val is Object & { name: string } { + return ( + val !== null && typeof val === "object" && val["name"] !== undefined + ) + } + /** * Copy the values of all of the enumerable own properties from one or more source objects to a * target object. diff --git a/src/util/StringUtils.ts b/src/util/StringUtils.ts index ddd7a963e3..6b89fc53a0 100644 --- a/src/util/StringUtils.ts +++ b/src/util/StringUtils.ts @@ -6,14 +6,11 @@ import shajs from "sha.js" * @see http://stackoverflow.com/questions/2970525/converting-any-string-into-camel-case */ export function camelCase(str: string, firstCapital: boolean = false): string { - return str.replace( - /^([A-Z])|[\s-_](\w)/g, - function (match, p1, p2, offset) { - if (firstCapital === true && offset === 0) return p1 - if (p2) return p2.toUpperCase() - return p1.toLowerCase() - }, - ) + if (firstCapital) str = " " + str + return str.replace(/^([A-Z])|[\s-_](\w)/g, function (match, p1, p2) { + if (p2) return p2.toUpperCase() + return p1.toLowerCase() + }) } /** @@ -120,15 +117,11 @@ interface IHashOptions { * @param options.length Optionally, shorten the output to desired length. */ export function hash(input: string, options: IHashOptions = {}): string { - const hashFunction = shajs("sha256") - + const hashFunction = shajs("sha1") hashFunction.update(input, "utf8") - const hashedInput = hashFunction.digest("hex") - if (options.length) { return hashedInput.slice(0, options.length) } - return hashedInput } diff --git a/src/util/TreeRepositoryUtils.ts b/src/util/TreeRepositoryUtils.ts index fa87444125..6200339ba1 100644 --- a/src/util/TreeRepositoryUtils.ts +++ b/src/util/TreeRepositoryUtils.ts @@ -19,16 +19,20 @@ export class TreeRepositoryUtils { ): { id: any; parentId: any }[] { return rawResults.map((rawResult) => { const joinColumn = metadata.treeParentRelation!.joinColumns[0] + const referencedColumn = + joinColumn.referencedColumn ?? metadata.primaryColumns[0] // fixes issue #2518, default to databaseName property when givenDatabaseName is not set const joinColumnName = joinColumn.givenDatabaseName || joinColumn.databaseName - const id = - rawResult[alias + "_" + metadata.primaryColumns[0].databaseName] + const referencedColumnName = + referencedColumn.givenDatabaseName || + referencedColumn.databaseName + const id = rawResult[alias + "_" + referencedColumnName] const parentId = rawResult[alias + "_" + joinColumnName] return { id: manager.connection.driver.prepareHydratedValue( id, - metadata.primaryColumns[0], + referencedColumn, ), parentId: manager.connection.driver.prepareHydratedValue( parentId, @@ -50,7 +54,10 @@ export class TreeRepositoryUtils { entity[childProperty] = [] return } - const parentEntityId = metadata.primaryColumns[0].getEntityValue(entity) + const joinColumn = metadata.treeParentRelation!.joinColumns[0] + const referencedColumn = + joinColumn.referencedColumn ?? metadata.primaryColumns[0] + const parentEntityId = referencedColumn.getEntityValue(entity) const childRelationMaps = relationMaps.filter( (relationMap) => relationMap.parentId === parentEntityId, ) @@ -58,7 +65,7 @@ export class TreeRepositoryUtils { childRelationMaps.map((relationMap) => relationMap.id), ) entity[childProperty] = entities.filter((entity) => - childIds.has(metadata.primaryColumns[0].getEntityValue(entity)), + childIds.has(referencedColumn.getEntityValue(entity)), ) entity[childProperty].forEach((childEntity: any) => { TreeRepositoryUtils.buildChildrenEntityTree( @@ -81,7 +88,10 @@ export class TreeRepositoryUtils { relationMaps: { id: any; parentId: any }[], ): void { const parentProperty = metadata.treeParentRelation!.propertyName - const entityId = metadata.primaryColumns[0].getEntityValue(entity) + const joinColumn = metadata.treeParentRelation!.joinColumns[0] + const referencedColumn = + joinColumn.referencedColumn ?? metadata.primaryColumns[0] + const entityId = referencedColumn.getEntityValue(entity) const parentRelationMap = relationMaps.find( (relationMap) => relationMap.id === entityId, ) @@ -89,7 +99,7 @@ export class TreeRepositoryUtils { if (!parentRelationMap) return false return ( - metadata.primaryColumns[0].getEntityValue(entity) === + referencedColumn.getEntityValue(entity) === parentRelationMap.parentId ) }) diff --git a/test/benchmark/bulk-sql-build/bulk-sql-build.ts b/test/benchmark/bulk-sql-build/bulk-sql-build.ts new file mode 100644 index 0000000000..77672481d9 --- /dev/null +++ b/test/benchmark/bulk-sql-build/bulk-sql-build.ts @@ -0,0 +1,44 @@ +import "reflect-metadata" +import { DataSource } from "../../../src/data-source/DataSource" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { Post } from "./entity/Post" + +describe("benchmark > bulk-sql-build", () => { + let dataSources: DataSource[] + before(async () => { + dataSources = await createTestingConnections({ + __dirname, + }) + }) + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + /** + * Before optimization (<0.3.12) execution time for 10.000 sqls was ~1.8s + * After optimization execution time for 10.000 sqls become ~0.380s + */ + + it("testing bulk create of 10.000 sql with joins", () => + Promise.all( + dataSources.map(async (dataSource) => { + for (let i = 0; i < 10_000; i++) { + dataSource + .getRepository(Post) + .createQueryBuilder("post") + .leftJoinAndSelect("post.categories", "categories1") + .leftJoinAndSelect("post.categories", "categories2") + .leftJoinAndSelect("post.categories", "categories3") + .leftJoinAndSelect("post.categories", "categories4") + .leftJoinAndSelect("post.categories", "categories5") + .leftJoinAndSelect("post.categories", "categories6") + .leftJoinAndSelect("post.categories", "categories7") + .where("post.id = 1") + .getQuery() + } + }), + )) +}) diff --git a/test/benchmark/bulk-sql-build/entity/Category.ts b/test/benchmark/bulk-sql-build/entity/Category.ts new file mode 100644 index 0000000000..6bfee562bc --- /dev/null +++ b/test/benchmark/bulk-sql-build/entity/Category.ts @@ -0,0 +1,12 @@ +import { Entity } from "../../../../src/decorator/entity/Entity" +import { PrimaryGeneratedColumn } from "../../../../src/decorator/columns/PrimaryGeneratedColumn" +import { Column } from "../../../../src/decorator/columns/Column" + +@Entity() +export class Category { + @PrimaryGeneratedColumn() + id: number + + @Column() + name: string +} diff --git a/test/benchmark/bulk-sql-build/entity/Post.ts b/test/benchmark/bulk-sql-build/entity/Post.ts new file mode 100644 index 0000000000..fed46016b4 --- /dev/null +++ b/test/benchmark/bulk-sql-build/entity/Post.ts @@ -0,0 +1,18 @@ +import { Entity } from "../../../../src/decorator/entity/Entity" +import { PrimaryGeneratedColumn } from "../../../../src/decorator/columns/PrimaryGeneratedColumn" +import { Column } from "../../../../src/decorator/columns/Column" +import { Category } from "./Category" +import { JoinTable, ManyToMany } from "../../../../src/index" + +@Entity() +export class Post { + @PrimaryGeneratedColumn() + id: number + + @Column() + title: string + + @ManyToMany(() => Category) + @JoinTable() + categories: Category[] +} diff --git a/test/benchmark/multiple-joins-querybuilder/multiple-joins-querybuilder.ts b/test/benchmark/multiple-joins-querybuilder/multiple-joins-querybuilder.ts index 0841f23610..a434ae7af2 100644 --- a/test/benchmark/multiple-joins-querybuilder/multiple-joins-querybuilder.ts +++ b/test/benchmark/multiple-joins-querybuilder/multiple-joins-querybuilder.ts @@ -24,22 +24,22 @@ describe("benchmark > QueryBuilder > wide join", () => { it("testing query builder with join to 10 relations with 10 columns each", () => { for (let i = 1; i <= 10_000; i++) { - connections.map((connection) => + connections.forEach((connection) => connection.manager .createQueryBuilder(One, "ones") .setFindOptions({ where: { id: 1 }, - relations: [ - "two", - "three", - "four", - "five", - "six", - "seven", - "eight", - "nine", - "ten", - ], + relations: { + two: true, + three: true, + four: true, + five: true, + six: true, + seven: true, + eight: true, + nine: true, + ten: true, + }, }) .getQuery(), ) diff --git a/test/core/column-kinds/update-date-column/update-date-column.ts b/test/core/column-kinds/update-date-column/update-date-column.ts index 2e81a0d4b5..531426df9d 100644 --- a/test/core/column-kinds/update-date-column/update-date-column.ts +++ b/test/core/column-kinds/update-date-column/update-date-column.ts @@ -103,24 +103,26 @@ describe("column kinds > update date column", () => { await postRepository.save(post) // load to get updated date we had after first save - const loadedPostBeforeUpdate = await postRepository.findOneBy({ - id: post.id, - }) + const loadedPostBeforeUpdate = + await postRepository.findOneByOrFail({ + id: post.id, + }) // wait a second - await sleep(1000) + await sleep(2000) // update post once again post.title = "Updated Title" await postRepository.save(post) // check if date was updated - const loadedPostAfterUpdate = await postRepository.findOneBy({ - id: post.id, - }) - expect( - loadedPostAfterUpdate!.updatedAt.toString(), - ).to.be.not.eql(loadedPostBeforeUpdate!.updatedAt.toString()) + const loadedPostAfterUpdate = + await postRepository.findOneByOrFail({ + id: post.id, + }) + expect(loadedPostAfterUpdate.updatedAt.getTime()).to.be.not.eql( + loadedPostBeforeUpdate.updatedAt.getTime(), + ) }), )) diff --git a/test/functional/cache/custom-cache-provider.ts b/test/functional/cache/custom-cache-provider.ts index c73e3db2ad..8db22317ef 100644 --- a/test/functional/cache/custom-cache-provider.ts +++ b/test/functional/cache/custom-cache-provider.ts @@ -9,6 +9,7 @@ import { import { DataSource } from "../../../src/data-source/DataSource" import { User } from "./entity/User" import { MockQueryResultCache } from "./provider/MockQueryResultCache" +import { Address } from "./entity/Address" describe("custom cache provider", () => { let connections: DataSource[] @@ -277,6 +278,60 @@ describe("custom cache provider", () => { }), )) + it("should cache results with pagination enabled properly and custom id and loaded relations", () => + Promise.all( + connections.map(async (connection) => { + if (connection.driver.options.type === "spanner") { + return + } + + const noUser = await connection.manager + .getRepository(User) + .findOne({ + where: { isAdmin: false }, + relations: { addresses: true }, + cache: { id: "user-address", milliseconds: 2000 }, + }) + + expect(noUser).to.be.null + + // first prepare data - insert users + const user1 = new User() + user1.firstName = "Timber" + user1.lastName = "Saw" + user1.isAdmin = false + await connection.manager.save(user1) + + const user1Address = new Address() + user1Address.address = "1 random street" + user1Address.user = user1 + await connection.manager.save(user1Address) + + const user1Cached = await connection.manager + .getRepository(User) + .findOne({ + relations: { addresses: true }, + where: { isAdmin: false }, + cache: { id: "user-address", milliseconds: 2000 }, + }) + expect(user1Cached).to.be.null + + const user1WithAddressWithOtherCacheId = + await connection.manager.getRepository(User).findOne({ + relations: { addresses: true }, + where: { isAdmin: false }, + cache: { + id: "user-1-different-cache-id", + milliseconds: 2000, + }, + }) + + expect( + user1WithAddressWithOtherCacheId?.addresses, + ).to.have.length(1) + }), + )) + it("should cache results with custom id and duration supplied", () => Promise.all( connections.map(async (connection) => { diff --git a/test/functional/cache/entity/Address.ts b/test/functional/cache/entity/Address.ts new file mode 100644 index 0000000000..1dc1afcb03 --- /dev/null +++ b/test/functional/cache/entity/Address.ts @@ -0,0 +1,19 @@ +import { + Column, + Entity, + ManyToOne, + PrimaryGeneratedColumn, +} from "../../../../src" +import { User } from "./User" + +@Entity() +export class Address { + @PrimaryGeneratedColumn() + id: number + + @Column() + address: string + + @ManyToOne(() => User) + user: User +} diff --git a/test/functional/cache/entity/User.ts b/test/functional/cache/entity/User.ts index f08a8e0537..8301d91c9c 100644 --- a/test/functional/cache/entity/User.ts +++ b/test/functional/cache/entity/User.ts @@ -1,6 +1,8 @@ import { Entity } from "../../../../src/decorator/entity/Entity" import { PrimaryGeneratedColumn } from "../../../../src/decorator/columns/PrimaryGeneratedColumn" import { Column } from "../../../../src/decorator/columns/Column" +import { OneToMany } from "../../../../src" +import { Address } from "./Address" @Entity() export class User { @@ -15,4 +17,7 @@ export class User { @Column() isAdmin: boolean + + @OneToMany(() => Address, (a) => a.user) + addresses: Address[] } diff --git a/test/functional/connection-options-reader/connection-options-reader.ts b/test/functional/connection-options-reader/connection-options-reader.ts index 950b74c6e9..0642ebe793 100644 --- a/test/functional/connection-options-reader/connection-options-reader.ts +++ b/test/functional/connection-options-reader/connection-options-reader.ts @@ -1,4 +1,4 @@ -import { promises as fs, existsSync } from "fs" +import { promises as fs } from "fs" import { expect } from "chai" import { DataSourceOptions } from "../../../src/data-source/DataSourceOptions" import { ConnectionOptionsReader } from "../../../src/connection/ConnectionOptionsReader" @@ -16,16 +16,6 @@ async function createDotenvFiles() { ) } -async function createYamlFiles() { - if (!existsSync(path.join(__dirname, "configs/yaml"))) { - await fs.mkdir(path.join(__dirname, "configs/yaml")) - } - await fs.writeFile( - path.join(__dirname, "configs/yaml/test-yaml.yaml"), - '- type: "sqlite"\n name: "file"\n database: "test-yaml"', - ) -} - describe("ConnectionOptionsReader", () => { beforeEach(() => { delete process.env["TYPEORM_CONNECTION"] @@ -131,16 +121,4 @@ describe("ConnectionOptionsReader", () => { expect(fileOptions.database).to.have.string("test-ormconfig-env") expect(process.env.TYPEORM_DATABASE).to.equal("test-ormconfig-env") }) - - it("properly loads config from yaml", async () => { - await createYamlFiles() - - const connectionOptionsReader = new ConnectionOptionsReader({ - root: path.join(__dirname, "configs/yaml"), - configName: "test-yaml", - }) - const fileOptions: DataSourceOptions = - await connectionOptionsReader.get("file") - expect(fileOptions.database).to.have.string("/test-yaml") - }) }) diff --git a/test/functional/database-schema/column-types/cockroachdb-enum/cockroachdb-enum.ts b/test/functional/database-schema/column-types/cockroachdb-enum/cockroachdb-enum.ts new file mode 100644 index 0000000000..f13b10e423 --- /dev/null +++ b/test/functional/database-schema/column-types/cockroachdb-enum/cockroachdb-enum.ts @@ -0,0 +1,448 @@ +import "reflect-metadata" +import { DataSource } from "../../../../../src/data-source/DataSource" +import { expect } from "chai" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../../../utils/test-utils" +import { Post } from "./entity/Post" +import { Table, TableColumn } from "../../../../../src" + +describe("database schema > column types > cockroachdb-enum", () => { + let connections: DataSource[] + before(async () => { + connections = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + enabledDrivers: ["cockroachdb"], + }) + }) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("should create table with ENUM column and save data to it", () => + Promise.all( + connections.map(async (connection) => { + const postRepository = connection.getRepository(Post) + const queryRunner = connection.createQueryRunner() + const table = await queryRunner.getTable("post") + await queryRunner.release() + + const post = new Post() + post.enum = "A" + post.enumArray = ["A", "B"] + post.enumArray2 = ["A", "C"] + post.simpleEnum = "A" + post.name = "Post #1" + await postRepository.save(post) + + const loadedPost = (await postRepository.findOneBy({ + id: 1, + }))! + loadedPost.enum.should.be.equal(post.enum) + loadedPost.enumArray.should.be.deep.equal(post.enumArray) + loadedPost.enumArray2.should.be.deep.equal(post.enumArray2) + loadedPost.simpleEnum.should.be.equal(post.simpleEnum) + + table!.findColumnByName("enum")!.type.should.be.equal("enum") + table! + .findColumnByName("enumArray")! + .type.should.be.equal("enum") + table! + .findColumnByName("enumArray2")! + .type.should.be.equal("enum") + table!.findColumnByName("enumArray")!.isArray.should.be.true + table! + .findColumnByName("simpleEnum")! + .type.should.be.equal("enum") + }), + )) + + it("should create ENUM column and revert creation", () => + Promise.all( + connections.map(async (connection) => { + const queryRunner = connection.createQueryRunner() + await queryRunner.addColumn( + "post", + new TableColumn({ + name: "newEnum", + type: "enum", + enum: ["Apple", "Pineapple"], + }), + ) + + let table = await queryRunner.getTable("post") + table!.findColumnByName("newEnum")!.type.should.be.equal("enum") + + await queryRunner.executeMemoryDownSql() + + table = await queryRunner.getTable("post") + expect(table!.findColumnByName("newEnum")).to.be.undefined + + await queryRunner.release() + }), + )) + + it("should drop ENUM column and revert drop", () => + Promise.all( + connections.map(async (connection) => { + const queryRunner = connection.createQueryRunner() + let table = await queryRunner.getTable("post") + const enumColumn = table!.findColumnByName("enum")! + + await queryRunner.dropColumn(table!, enumColumn) + expect(table!.findColumnByName("enum")).to.be.undefined + + await queryRunner.executeMemoryDownSql() + + table = await queryRunner.getTable("post") + table!.findColumnByName("enum")!.type.should.be.equal("enum") + + await queryRunner.release() + }), + )) + + it("should create table with ENUM column and revert creation", () => + Promise.all( + connections.map(async (connection) => { + const queryRunner = connection.createQueryRunner() + await queryRunner.createTable( + new Table({ + name: "question", + columns: [ + { + name: "enum", + type: "enum", + enum: ["Apple", "Banana", "Cherry"], + }, + ], + }), + ) + + let table = await queryRunner.getTable("question") + const enumColumn = table!.findColumnByName("enum")! + enumColumn.type.should.be.equal("enum") + enumColumn.enum!.should.be.eql(["Apple", "Banana", "Cherry"]) + + await queryRunner.executeMemoryDownSql() + + table = await queryRunner.getTable("question") + expect(table).to.be.undefined + + await queryRunner.release() + }), + )) + + it("should drop table with ENUM column and revert drop", () => + Promise.all( + connections.map(async (connection) => { + const queryRunner = connection.createQueryRunner() + await queryRunner.dropTable("post") + + let table = await queryRunner.getTable("post") + expect(table).to.be.undefined + + await queryRunner.executeMemoryDownSql() + + table = await queryRunner.getTable("post") + expect(table).to.be.not.undefined + + await queryRunner.release() + }), + )) + + it("should change non-enum column in to ENUM and revert change", () => + Promise.all( + connections.map(async (connection) => { + const queryRunner = connection.createQueryRunner() + let table = await queryRunner.getTable("post") + let nameColumn = table!.findColumnByName("name")! + let changedColumn = nameColumn.clone() + changedColumn.type = "enum" + changedColumn.enum = ["Apple", "Banana", "Cherry"] + + await queryRunner.changeColumn( + table!, + nameColumn, + changedColumn, + ) + + table = await queryRunner.getTable("post") + changedColumn = table!.findColumnByName("name")! + changedColumn.type.should.be.equal("enum") + changedColumn.enum!.should.be.eql(["Apple", "Banana", "Cherry"]) + + await queryRunner.executeMemoryDownSql() + + table = await queryRunner.getTable("post") + nameColumn = table!.findColumnByName("name")! + nameColumn.type.should.be.equal("varchar") + expect(nameColumn.enum).to.be.undefined + + await queryRunner.release() + }), + )) + + it("should change ENUM column in to non-enum and revert change", () => + Promise.all( + connections.map(async (connection) => { + const queryRunner = connection.createQueryRunner() + let table = await queryRunner.getTable("post") + let enumColumn = table!.findColumnByName("enum")! + let changedColumn = enumColumn.clone() + changedColumn.type = "varchar" + changedColumn.enum = undefined + + await queryRunner.changeColumn( + table!, + enumColumn, + changedColumn, + ) + + table = await queryRunner.getTable("post") + changedColumn = table!.findColumnByName("enum")! + changedColumn.type.should.be.equal("varchar") + expect(changedColumn.enum).to.be.undefined + + await queryRunner.executeMemoryDownSql() + + table = await queryRunner.getTable("post") + enumColumn = table!.findColumnByName("enum")! + enumColumn.type.should.be.equal("enum") + enumColumn.enum!.should.be.eql(["A", "B", "C"]) + + await queryRunner.release() + }), + )) + + it("should change ENUM array column in to non-array and revert change", () => + Promise.all( + connections.map(async (connection) => { + const queryRunner = connection.createQueryRunner() + let table = await queryRunner.getTable("post") + let enumColumn = table!.findColumnByName("enumArray")! + let changedColumn = enumColumn.clone() + changedColumn.isArray = false + + await queryRunner.changeColumn( + table!, + enumColumn, + changedColumn, + ) + + table = await queryRunner.getTable("post") + changedColumn = table!.findColumnByName("enumArray")! + changedColumn.isArray.should.be.false + + await queryRunner.executeMemoryDownSql() + + table = await queryRunner.getTable("post") + enumColumn = table!.findColumnByName("enumArray")! + enumColumn.isArray.should.be.true + + await queryRunner.release() + }), + )) + + it("should change ENUM value and revert change", () => + Promise.all( + connections.map(async (connection) => { + const queryRunner = connection.createQueryRunner() + let table = await queryRunner.getTable("post") + const enumColumn = table!.findColumnByName("enum")! + const changedColumn = enumColumn.clone() + changedColumn.enum = ["C", "D", "E"] + + await queryRunner.changeColumn( + table!, + enumColumn, + changedColumn, + ) + + table = await queryRunner.getTable("post") + table! + .findColumnByName("enum")! + .enum!.should.be.eql(["C", "D", "E"]) + + await queryRunner.executeMemoryDownSql() + + table = await queryRunner.getTable("post") + table! + .findColumnByName("enum")! + .enum!.should.be.eql(["A", "B", "C"]) + + await queryRunner.release() + }), + )) + + it("should change `enumName` and revert change", () => + Promise.all( + connections.map(async (connection) => { + const queryRunner = connection.createQueryRunner() + + // add `enumName` + let table = await queryRunner.getTable("post") + const column = table!.findColumnByName("enum")! + const newColumn = column.clone() + newColumn.enumName = "PostTypeEnum" + + // change column + await queryRunner.changeColumn(table!, column, newColumn) + + // check if `enumName` changed + table = await queryRunner.getTable("post") + let changedColumn = table!.findColumnByName("enum")! + expect(changedColumn.enumName).to.equal("PostTypeEnum") + + // revert changes + await queryRunner.executeMemoryDownSql() + + // check if `enumName` reverted + table = await queryRunner.getTable("post") + changedColumn = table!.findColumnByName("enum")! + expect(changedColumn.enumName).to.undefined + + await queryRunner.release() + }), + )) + + it("should not create new type if same `enumName` is used more than once", () => + Promise.all( + connections.map(async (connection) => { + const queryRunner = connection.createQueryRunner() + + const table = new Table({ + name: "my_table", + columns: [ + { + name: "enum1", + type: "enum", + enum: ["Apple", "Banana", "Cherry"], + enumName: "Fruits", + }, + { + name: "enum2", + type: "enum", + enum: ["Apple", "Banana", "Cherry"], + enumName: "Fruits", + }, + { + name: "enum3", + type: "enum", + enumName: "Fruits", + }, + ], + }) + + await queryRunner.createTable(table) + + // revert changes + await queryRunner.executeMemoryDownSql() + + await queryRunner.release() + }), + )) + + it("should change both ENUM value and ENUM name and revert change", () => + Promise.all( + connections.map(async (connection) => { + const queryRunner = connection.createQueryRunner() + let table = await queryRunner.getTable("post") + const enumColumn = table!.findColumnByName("enum")! + const changedColumn = enumColumn.clone() + changedColumn.enum = ["C", "D", "E"] + changedColumn.enumName = "my_enum_type" + + await queryRunner.changeColumn( + table!, + enumColumn, + changedColumn, + ) + + table = await queryRunner.getTable("post") + const columnAfterChange = table!.findColumnByName("enum")! + columnAfterChange.enum!.should.be.eql(["C", "D", "E"]) + columnAfterChange.enumName!.should.be.eql("my_enum_type") + + await queryRunner.executeMemoryDownSql() + + table = await queryRunner.getTable("post") + const columnAfterRevert = table!.findColumnByName("enum")! + columnAfterRevert.enum!.should.be.eql(["A", "B", "C"]) + expect(columnAfterRevert.enumName).to.undefined + + await queryRunner.release() + }), + )) + + it("should rename ENUM when column renamed and revert rename", () => + Promise.all( + connections.map(async (connection) => { + const queryRunner = connection.createQueryRunner() + const currentSchemaQuery = await queryRunner.query( + `SELECT * FROM current_schema()`, + ) + const currentSchema = currentSchemaQuery[0]["current_schema"] + const table = await queryRunner.getTable("post") + const enumColumn = table!.findColumnByName("enum")! + const changedColumn = enumColumn.clone() + changedColumn.name = "enumerable" + + await queryRunner.changeColumn( + table!, + enumColumn, + changedColumn, + ) + + let result = await queryRunner.query( + `SELECT "n"."nspname", "t"."typname" FROM "pg_type" "t" ` + + `INNER JOIN "pg_namespace" "n" ON "n"."oid" = "t"."typnamespace" ` + + `WHERE "n"."nspname" = '${currentSchema}' AND "t"."typname" = 'post_enumerable_enum'`, + ) + result.length.should.be.equal(1) + + await queryRunner.executeMemoryDownSql() + + result = await queryRunner.query( + `SELECT "n"."nspname", "t"."typname" FROM "pg_type" "t" ` + + `INNER JOIN "pg_namespace" "n" ON "n"."oid" = "t"."typnamespace" ` + + `WHERE "n"."nspname" = '${currentSchema}' AND "t"."typname" = 'post_enum_enum'`, + ) + result.length.should.be.equal(1) + + await queryRunner.release() + }), + )) + + it("should rename ENUM when table renamed and revert rename", () => + Promise.all( + connections.map(async (connection) => { + const queryRunner = connection.createQueryRunner() + const currentSchemaQuery = await queryRunner.query( + `SELECT * FROM current_schema()`, + ) + const currentSchema = currentSchemaQuery[0]["current_schema"] + const table = await queryRunner.getTable("post") + + await queryRunner.renameTable(table!, "question") + + let result = await queryRunner.query( + `SELECT "n"."nspname", "t"."typname" FROM "pg_type" "t" ` + + `INNER JOIN "pg_namespace" "n" ON "n"."oid" = "t"."typnamespace" ` + + `WHERE "n"."nspname" = '${currentSchema}' AND "t"."typname" = 'question_enum_enum'`, + ) + result.length.should.be.equal(1) + + await queryRunner.executeMemoryDownSql() + + result = await queryRunner.query( + `SELECT "n"."nspname", "t"."typname" FROM "pg_type" "t" ` + + `INNER JOIN "pg_namespace" "n" ON "n"."oid" = "t"."typnamespace" ` + + `WHERE "n"."nspname" = '${currentSchema}' AND "t"."typname" = 'post_enum_enum'`, + ) + result.length.should.be.equal(1) + + await queryRunner.release() + }), + )) +}) diff --git a/test/functional/database-schema/column-types/cockroachdb-enum/entity/Post.ts b/test/functional/database-schema/column-types/cockroachdb-enum/entity/Post.ts new file mode 100644 index 0000000000..36edf8a218 --- /dev/null +++ b/test/functional/database-schema/column-types/cockroachdb-enum/entity/Post.ts @@ -0,0 +1,28 @@ +import { Column } from "../../../../../../src/index" +import { Entity } from "../../../../../../src/index" +import { PrimaryGeneratedColumn } from "../../../../../../src" + +@Entity() +export class Post { + @PrimaryGeneratedColumn() + id: number + + @Column("enum", { enum: ["A", "B", "C"] }) + enum: string + + @Column("enum", { enum: ["A", "B", "C"], array: true }) + enumArray: string[] + + @Column("enum", { + enum: ["A", "B", "C"], + enumName: "enum_array", + array: true, + }) + enumArray2: string[] + + @Column("simple-enum", { enum: ["A", "B", "C"] }) + simpleEnum: string + + @Column() + name: string +} diff --git a/test/functional/database-schema/column-types/cockroachdb/column-types-cockroach.ts b/test/functional/database-schema/column-types/cockroachdb/column-types-cockroach.ts index 492c6bcd56..51aaaab268 100644 --- a/test/functional/database-schema/column-types/cockroachdb/column-types-cockroach.ts +++ b/test/functional/database-schema/column-types/cockroachdb/column-types-cockroach.ts @@ -1,5 +1,14 @@ import "reflect-metadata" -import { DataSource } from "../../../../../src" +import { + DataSource, + GeometryCollection, + LineString, + MultiLineString, + MultiPoint, + MultiPolygon, + Point, + Polygon, +} from "../../../../../src" import { closeTestingConnections, createTestingConnections, @@ -28,6 +37,84 @@ describe("database schema > column types > cockroachdb", () => { const table = await queryRunner.getTable("post") await queryRunner.release() + const point: Point = { + type: "Point", + coordinates: [116.443987, 39.920843], + } + const linestring: LineString = { + type: "LineString", + coordinates: [ + [-87.623177, 41.881832], + [-90.199402, 38.627003], + [-82.446732, 38.413651], + [-87.623177, 41.881832], + ], + } + const polygon: Polygon = { + type: "Polygon", + coordinates: [ + [ + [-87.906471, 43.038902], + [-95.992775, 36.15398], + [-75.704722, 36.076944], + [-87.906471, 43.038902], + ], + [ + [-87.623177, 41.881832], + [-90.199402, 38.627003], + [-82.446732, 38.413651], + [-87.623177, 41.881832], + ], + ], + } + const multipoint: MultiPoint = { + type: "MultiPoint", + coordinates: [ + [100.0, 0.0], + [101.0, 1.0], + ], + } + const multilinestring: MultiLineString = { + type: "MultiLineString", + coordinates: [ + [ + [170.0, 45.0], + [180.0, 45.0], + ], + [ + [-180.0, 45.0], + [-170.0, 45.0], + ], + ], + } + const multipolygon: MultiPolygon = { + type: "MultiPolygon", + coordinates: [ + [ + [ + [180.0, 40.0], + [180.0, 50.0], + [170.0, 50.0], + [170.0, 40.0], + [180.0, 40.0], + ], + ], + [ + [ + [-170.0, 40.0], + [-170.0, 50.0], + [-180.0, 50.0], + [-180.0, 40.0], + [-170.0, 40.0], + ], + ], + ], + } + const geometrycollection: GeometryCollection = { + type: "GeometryCollection", + geometries: [point, linestring, polygon], + } + const post = new Post() post.id = 1 post.name = "Post" @@ -72,6 +159,20 @@ describe("database schema > column types > cockroachdb", () => { post.boolean = true post.bool = false post.inet = "192.168.100.128" + post.point = point + post.linestring = linestring + post.polygon = polygon + post.multipoint = multipoint + post.multilinestring = multilinestring + post.multipolygon = multipolygon + post.geometrycollection = geometrycollection + post.point_geography = point + post.linestring_geography = linestring + post.polygon_geography = polygon + post.multipoint_geography = multipoint + post.multilinestring_geography = multilinestring + post.multipolygon_geography = multipolygon + post.geometrycollection_geography = geometrycollection post.uuid = "0e37df36-f698-11e6-8dd4-cb9ced3df976" post.jsonb = { id: 1, name: "Post" } post.json = { id: 1, name: "Post" } @@ -113,12 +214,12 @@ describe("database schema > column types > cockroachdb", () => { .should.be.equal(post.bytea.toString()) loadedPost.blob.toString().should.be.equal(post.blob.toString()) loadedPost.date.should.be.equal(post.date) - // loadedPost.interval.years.should.be.equal(1); - // loadedPost.interval.months.should.be.equal(2); - // loadedPost.interval.days.should.be.equal(3); - // loadedPost.interval.hours.should.be.equal(4); - // loadedPost.interval.minutes.should.be.equal(5); - // loadedPost.interval.seconds.should.be.equal(6); + loadedPost.interval.years.should.be.equal(1) + loadedPost.interval.months.should.be.equal(2) + loadedPost.interval.days.should.be.equal(3) + loadedPost.interval.hours.should.be.equal(4) + loadedPost.interval.minutes.should.be.equal(5) + loadedPost.interval.seconds.should.be.equal(6) loadedPost.time.should.be.equal(post.time) loadedPost.timeWithoutTimeZone.should.be.equal( post.timeWithoutTimeZone, @@ -138,6 +239,38 @@ describe("database schema > column types > cockroachdb", () => { loadedPost.boolean.should.be.equal(post.boolean) loadedPost.bool.should.be.equal(post.bool) loadedPost.inet.should.be.equal(post.inet) + loadedPost.point.should.deep.include(post.point) + loadedPost.linestring.should.deep.include(post.linestring) + loadedPost.polygon.should.deep.include(post.polygon) + loadedPost.multipoint.should.deep.include(post.multipoint) + loadedPost.multilinestring.should.deep.include( + post.multilinestring, + ) + loadedPost.multipolygon.should.deep.include(post.multipolygon) + loadedPost.geometrycollection.should.deep.include( + post.geometrycollection, + ) + loadedPost.point_geography.should.deep.include( + post.point_geography, + ) + loadedPost.linestring_geography.should.deep.include( + post.linestring_geography, + ) + loadedPost.polygon_geography.should.deep.include( + post.polygon_geography, + ) + loadedPost.multipoint_geography.should.deep.include( + post.multipoint_geography, + ) + loadedPost.multilinestring_geography.should.deep.include( + post.multilinestring_geography, + ) + loadedPost.multipolygon_geography.should.deep.include( + post.multipolygon_geography, + ) + loadedPost.geometrycollection_geography.should.deep.include( + post.geometrycollection_geography, + ) loadedPost.uuid.should.be.eql(post.uuid) loadedPost.jsonb.should.be.eql(post.jsonb) loadedPost.json.should.be.eql(post.json) @@ -223,6 +356,48 @@ describe("database schema > column types > cockroachdb", () => { table!.findColumnByName("boolean")!.type.should.be.equal("bool") table!.findColumnByName("bool")!.type.should.be.equal("bool") table!.findColumnByName("inet")!.type.should.be.equal("inet") + table! + .findColumnByName("point")! + .type.should.be.equal("geometry") + table! + .findColumnByName("linestring")! + .type.should.be.equal("geometry") + table! + .findColumnByName("polygon")! + .type.should.be.equal("geometry") + table! + .findColumnByName("multipoint")! + .type.should.be.equal("geometry") + table! + .findColumnByName("multilinestring")! + .type.should.be.equal("geometry") + table! + .findColumnByName("multipolygon")! + .type.should.be.equal("geometry") + table! + .findColumnByName("geometrycollection")! + .type.should.be.equal("geometry") + table! + .findColumnByName("point_geography")! + .type.should.be.equal("geography") + table! + .findColumnByName("linestring_geography")! + .type.should.be.equal("geography") + table! + .findColumnByName("polygon_geography")! + .type.should.be.equal("geography") + table! + .findColumnByName("multipoint_geography")! + .type.should.be.equal("geography") + table! + .findColumnByName("multilinestring_geography")! + .type.should.be.equal("geography") + table! + .findColumnByName("multipolygon_geography")! + .type.should.be.equal("geography") + table! + .findColumnByName("geometrycollection_geography")! + .type.should.be.equal("geography") table!.findColumnByName("uuid")!.type.should.be.equal("uuid") table!.findColumnByName("jsonb")!.type.should.be.equal("jsonb") table!.findColumnByName("json")!.type.should.be.equal("jsonb") diff --git a/test/functional/database-schema/column-types/cockroachdb/entity/Post.ts b/test/functional/database-schema/column-types/cockroachdb/entity/Post.ts index 5b47679f4c..6abd6f9893 100644 --- a/test/functional/database-schema/column-types/cockroachdb/entity/Post.ts +++ b/test/functional/database-schema/column-types/cockroachdb/entity/Post.ts @@ -1,6 +1,15 @@ -import { Entity } from "../../../../../../src" -import { PrimaryColumn } from "../../../../../../src" -import { Column } from "../../../../../../src" +import { + Column, + Entity, + GeometryCollection, + LineString, + MultiLineString, + MultiPoint, + MultiPolygon, + Point, + Polygon, + PrimaryColumn, +} from "../../../../../../src" @Entity() export class Post { @@ -142,6 +151,56 @@ export class Post { @Column("inet") inet: string + // ------------------------------------------------------------------------- + // Geometry Type + // ------------------------------------------------------------------------- + + @Column("geometry") + point: Point + + @Column("geometry") + polygon: Polygon + + @Column("geometry") + multipoint: MultiPoint + + @Column("geometry") + linestring: LineString + + @Column("geometry") + multilinestring: MultiLineString + + @Column("geometry") + multipolygon: MultiPolygon + + @Column("geometry") + geometrycollection: GeometryCollection + + // ------------------------------------------------------------------------- + // Geography Type + // ------------------------------------------------------------------------- + + @Column("geography") + point_geography: Point + + @Column("geography") + polygon_geography: Polygon + + @Column("geography") + multipoint_geography: MultiPoint + + @Column("geography") + linestring_geography: LineString + + @Column("geography") + multilinestring_geography: MultiLineString + + @Column("geography") + multipolygon_geography: MultiPolygon + + @Column("geography") + geometrycollection_geography: GeometryCollection + // ------------------------------------------------------------------------- // UUID Type // ------------------------------------------------------------------------- diff --git a/test/functional/database-schema/column-types/sqlite/column-types-sqlite.ts b/test/functional/database-schema/column-types/sqlite/column-types-sqlite.ts index 81113534b5..ccb5600764 100644 --- a/test/functional/database-schema/column-types/sqlite/column-types-sqlite.ts +++ b/test/functional/database-schema/column-types/sqlite/column-types-sqlite.ts @@ -59,6 +59,7 @@ describe("database schema > column types > sqlite", () => { post.date = "2017-06-21" post.datetime = new Date() post.datetime.setMilliseconds(0) + post.json = { id: 1, name: "Post" } post.simpleArray = ["A", "B", "C"] post.simpleJson = { param: "VALUE" } post.simpleEnum = "A" @@ -99,6 +100,7 @@ describe("database schema > column types > sqlite", () => { loadedPost.datetime .valueOf() .should.be.equal(post.datetime.valueOf()) + loadedPost.json.should.be.deep.equal(post.json) loadedPost.simpleArray[0].should.be.equal(post.simpleArray[0]) loadedPost.simpleArray[1].should.be.equal(post.simpleArray[1]) loadedPost.simpleArray[2].should.be.equal(post.simpleArray[2]) @@ -170,6 +172,7 @@ describe("database schema > column types > sqlite", () => { table! .findColumnByName("datetime")! .type.should.be.equal("datetime") + table!.findColumnByName("json")!.type.should.be.equal("json") table! .findColumnByName("simpleArray")! .type.should.be.equal("text") diff --git a/test/functional/database-schema/column-types/sqlite/entity/Post.ts b/test/functional/database-schema/column-types/sqlite/entity/Post.ts index dae690928d..b8660ab252 100644 --- a/test/functional/database-schema/column-types/sqlite/entity/Post.ts +++ b/test/functional/database-schema/column-types/sqlite/entity/Post.ts @@ -106,6 +106,13 @@ export class Post { @Column("datetime") datetime: Date + // ------------------------------------------------------------------------- + // Other Types + // ------------------------------------------------------------------------- + + @Column("json") + json: Object + // ------------------------------------------------------------------------- // TypeOrm Specific Types // ------------------------------------------------------------------------- diff --git a/test/functional/database-schema/enums-array/entity/EnumArrayEntity.ts b/test/functional/database-schema/enums-array/entity/EnumArrayEntity.ts index f9a458a8f6..97cb387940 100644 --- a/test/functional/database-schema/enums-array/entity/EnumArrayEntity.ts +++ b/test/functional/database-schema/enums-array/entity/EnumArrayEntity.ts @@ -91,6 +91,14 @@ export class EnumArrayEntity { }) enumWithoutDefault: StringEnum[] + @Column({ + type: "enum", + enum: StringEnum, + array: true, + default: "{a,e}", + }) + defaultArrayAsString: StringEnum[] + @Column({ type: "enum", enum: StringEnum, diff --git a/test/functional/database-schema/enums-array/enums-array.ts b/test/functional/database-schema/enums-array/enums-array.ts index d4731e1b28..3d1828a5e4 100644 --- a/test/functional/database-schema/enums-array/enums-array.ts +++ b/test/functional/database-schema/enums-array/enums-array.ts @@ -18,7 +18,7 @@ describe("database schema > enum arrays", () => { before(async () => { connections = await createTestingConnections({ entities: [__dirname + "/entity/*{.js,.ts}"], - enabledDrivers: ["postgres"], + enabledDrivers: ["postgres", "cockroachdb"], }) }) beforeEach(() => reloadTestingDatabases(connections)) diff --git a/test/functional/database-schema/enums/enums.ts b/test/functional/database-schema/enums/enums.ts index f89c6aa867..1c58d4ee5c 100644 --- a/test/functional/database-schema/enums/enums.ts +++ b/test/functional/database-schema/enums/enums.ts @@ -18,7 +18,7 @@ describe("database schema > enums", () => { before(async () => { connections = await createTestingConnections({ entities: [__dirname + "/entity/*{.js,.ts}"], - enabledDrivers: ["postgres", "mysql", "mariadb"], + enabledDrivers: ["postgres", "mysql", "mariadb", "cockroachdb"], }) }) beforeEach(() => reloadTestingDatabases(connections)) diff --git a/test/functional/deferrable/deferrable.ts b/test/functional/deferrable/deferrable.ts index daa21a91fc..89c29606ee 100644 --- a/test/functional/deferrable/deferrable.ts +++ b/test/functional/deferrable/deferrable.ts @@ -44,7 +44,7 @@ describe("deferrable fk constraints should be check at the end of transaction (# // now check const user = await connection.manager.findOne(User, { - relations: ["company"], + relations: { company: true }, where: { id: 1 }, }) @@ -86,7 +86,7 @@ describe("deferrable fk constraints should be check at the end of transaction (# // now check const office = await connection.manager.findOne(Office, { - relations: ["company"], + relations: { company: true }, where: { id: 2 }, }) diff --git a/test/functional/driver/MongoDriver.ts b/test/functional/driver/MongoDriver.ts index 65813d7ebb..7e860b8933 100644 --- a/test/functional/driver/MongoDriver.ts +++ b/test/functional/driver/MongoDriver.ts @@ -25,13 +25,14 @@ describe("MongoDriver", () => { const connectPromise = driver.connect() + // There is not callback on connect method // Take the promise parameter that we receive in the callback, call it, so the underlying promise gets resolved. - const firstMethodCall = connect.args[0] - const callback = firstMethodCall[2] - callback(undefined, {}) + // const firstMethodCall = connect.args[0] + // const callback = firstMethodCall[2] + // callback(undefined, {}) await connectPromise - return firstMethodCall[0] + return url } describe("connection string", () => { diff --git a/test/functional/entity-model/entity-model.ts b/test/functional/entity-model/entity-model.ts index 521dfe9eb8..5008e8a976 100644 --- a/test/functional/entity-model/entity-model.ts +++ b/test/functional/entity-model/entity-model.ts @@ -47,7 +47,7 @@ describe("entity-model", () => { it("should upsert successfully", async () => { // These must run sequentially as we have the global context of the `Post` ActiveRecord class for (const connection of connections.filter( - (c) => c.driver.supportedUpsertType != null, + (c) => c.driver.supportedUpsertTypes.length > 0, )) { Post.useDataSource(connection) // change connection each time because of AR specifics diff --git a/test/functional/find-options/array-contained-by-operator/array-contained-by-operator.test.ts b/test/functional/find-options/array-contained-by-operator/array-contained-by-operator.test.ts index 5ac197fd83..3ce1b9814c 100644 --- a/test/functional/find-options/array-contained-by-operator/array-contained-by-operator.test.ts +++ b/test/functional/find-options/array-contained-by-operator/array-contained-by-operator.test.ts @@ -14,7 +14,7 @@ describe("find options > find operators > ArrayContainedBy", () => { async () => (connections = await createTestingConnections({ __dirname, - enabledDrivers: ["postgres"], + enabledDrivers: ["postgres", "cockroachdb"], // logging: true, })), ) diff --git a/test/functional/find-options/array-contains-operator/array-contains-operator.test.ts b/test/functional/find-options/array-contains-operator/array-contains-operator.test.ts index 203ff11f9f..2351d05142 100644 --- a/test/functional/find-options/array-contains-operator/array-contains-operator.test.ts +++ b/test/functional/find-options/array-contains-operator/array-contains-operator.test.ts @@ -14,7 +14,7 @@ describe("find options > find operators > ArrayContains", () => { async () => (connections = await createTestingConnections({ __dirname, - enabledDrivers: ["postgres"], + enabledDrivers: ["postgres", "cockroachdb"], // logging: true, })), ) diff --git a/test/functional/find-options/basic-usage/find-options-order.ts b/test/functional/find-options/basic-usage/find-options-order.ts index ca072ac620..f6e763d0e5 100644 --- a/test/functional/find-options/basic-usage/find-options-order.ts +++ b/test/functional/find-options/basic-usage/find-options-order.ts @@ -53,6 +53,12 @@ describe("find options > order", () => { text: "About post #3", counters: { likes: 1 }, }, + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, ]) const posts2 = await connection @@ -82,6 +88,12 @@ describe("find options > order", () => { text: "About post #3", counters: { likes: 1 }, }, + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, ]) const posts3 = await connection @@ -111,6 +123,12 @@ describe("find options > order", () => { text: "About post #3", counters: { likes: 1 }, }, + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, ]) const posts4 = await connection @@ -142,6 +160,12 @@ describe("find options > order", () => { text: "About post #3", counters: { likes: 1 }, }, + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, ]) const posts5 = await connection @@ -153,6 +177,12 @@ describe("find options > order", () => { }) .getMany() posts5.should.be.eql([ + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, { id: 3, title: "Post #3", @@ -182,6 +212,12 @@ describe("find options > order", () => { }) .getMany() posts6.should.be.eql([ + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, { id: 3, title: "Post #3", @@ -211,6 +247,12 @@ describe("find options > order", () => { }) .getMany() posts7.should.be.eql([ + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, { id: 3, title: "Post #3", @@ -242,6 +284,12 @@ describe("find options > order", () => { }) .getMany() posts8.should.be.eql([ + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, { id: 3, title: "Post #3", @@ -278,6 +326,12 @@ describe("find options > order", () => { }) .getMany() posts.should.be.eql([ + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, { id: 3, title: "Post #3", @@ -315,6 +369,12 @@ describe("find options > order", () => { }) .getMany() posts.should.be.eql([ + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, { id: 3, title: "Post #3", @@ -359,6 +419,12 @@ describe("find options > order", () => { text: "About post #3", counters: { likes: 1 }, }, + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, { id: 1, title: "Post #1", @@ -373,8 +439,8 @@ describe("find options > order", () => { }, ]) expect(posts[0].id).to.be.eql(3) - expect(posts[1].id).to.be.oneOf([1, 2]) - expect(posts[2].id).to.be.oneOf([1, 2]) + expect(posts[1].id).to.be.oneOf([1, 2, 4]) + expect(posts[2].id).to.be.oneOf([1, 2, 4]) expect(posts[1].id).to.not.be.eql(posts[2].id) }), )) @@ -413,6 +479,12 @@ describe("find options > order", () => { text: "About post #2", counters: { likes: 2 }, }, + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, ]) }), )) @@ -451,6 +523,12 @@ describe("find options > order", () => { text: "About post #2", counters: { likes: 2 }, }, + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, ]) }), )) @@ -477,6 +555,12 @@ describe("find options > order", () => { .getMany() // exact row order depends of settings like NULLS FIRST and NULLS LAST posts.should.have.deep.members([ + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, { id: 1, title: "Post #1", @@ -496,9 +580,10 @@ describe("find options > order", () => { counters: { likes: 1 }, }, ]) - expect(posts[0].id).to.be.oneOf([1, 3]) + expect(posts[0].id).to.be.oneOf([4, 3]) expect(posts[1].id).to.be.oneOf([2, 1]) - expect(posts[2].id).to.be.oneOf([3, 2]) + expect(posts[2].id).to.be.oneOf([2, 1]) + expect(posts[3].id).to.be.oneOf([3, 4]) }), )) @@ -537,6 +622,12 @@ describe("find options > order", () => { text: "About post #3", counters: { likes: 1 }, }, + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, ]) }), )) @@ -561,7 +652,7 @@ describe("find options > order", () => { }, }) .getMany() - posts.should.be.eql([ + posts.should.have.deep.members([ { id: 3, title: "Post #3", @@ -574,7 +665,17 @@ describe("find options > order", () => { text: "About post #1", counters: { likes: 1 }, }, + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, ]) + expect(posts[0].id).to.be.eql(3) + expect(posts[1].id).to.be.oneOf([1, 4]) + expect(posts[2].id).to.be.oneOf([1, 4]) + expect(posts[1].id).to.not.be.eql(posts[2].id) }), )) }) diff --git a/test/functional/find-options/basic-usage/find-options-relations.ts b/test/functional/find-options/basic-usage/find-options-relations.ts index 8cddf7c1b7..71f7a1cb0e 100644 --- a/test/functional/find-options/basic-usage/find-options-relations.ts +++ b/test/functional/find-options/basic-usage/find-options-relations.ts @@ -74,12 +74,24 @@ describe("find options > relations", () => { lastName: "Copter", }, }, + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + author: { + id: 1, + age: 25, + firstName: "Timber", + lastName: "Saw", + }, + }, ]) const posts2 = await connection .createQueryBuilder(Post, "post") .setFindOptions({ - relations: ["author"], + relations: { author: true }, order: { id: "asc", }, @@ -122,6 +134,18 @@ describe("find options > relations", () => { lastName: "Copter", }, }, + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + author: { + id: 1, + age: 25, + firstName: "Timber", + lastName: "Saw", + }, + }, ]) }), )) @@ -218,10 +242,33 @@ describe("find options > relations", () => { ], }, }, + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + author: { + id: 1, + age: 25, + photos: [ + { + id: 2, + filename: "chain.jpg", + description: "Me and chain", + }, + { + id: 1, + filename: "saw.jpg", + description: "Me and saw", + }, + ], + }, + }, ]) expect(posts[0].id).to.be.eql(3) - expect(posts[1].id).to.be.oneOf([1, 2]) - expect(posts[2].id).to.be.oneOf([1, 2]) + expect(posts[1].id).to.be.oneOf([1, 2, 4]) + expect(posts[2].id).to.be.oneOf([1, 2, 4]) + expect(posts[3].id).to.be.oneOf([1, 2, 4]) expect(posts[1].id).to.not.be.eql(posts[2].id) }), )) @@ -329,6 +376,31 @@ describe("find options > relations", () => { }, tags: [{ id: 1 }], }, + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + author: { + id: 1, + firstName: "Timber", + lastName: "Saw", + age: 25, + photos: [ + { + id: 1, + filename: "saw.jpg", + description: "Me and saw", + }, + { + id: 2, + filename: "chain.jpg", + description: "Me and chain", + }, + ], + }, + tags: [], + }, ]) }), )) @@ -442,6 +514,34 @@ describe("find options > relations", () => { ], }, }, + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { + likes: 1, + likedUsers: [ + { + id: 1, + age: 25, + firstName: "Timber", + lastName: "Saw", + photos: [ + { + id: 1, + filename: "saw.jpg", + description: "Me and saw", + }, + { + id: 2, + filename: "chain.jpg", + description: "Me and chain", + }, + ], + }, + ], + }, + }, ]) }), )) diff --git a/test/functional/find-options/basic-usage/find-options-select.ts b/test/functional/find-options/basic-usage/find-options-select.ts index 02783bb437..e2a8d03b60 100644 --- a/test/functional/find-options/basic-usage/find-options-select.ts +++ b/test/functional/find-options/basic-usage/find-options-select.ts @@ -26,13 +26,18 @@ describe("find options > select", () => { const posts1 = await connection .createQueryBuilder(Post, "post") .setFindOptions({ - select: ["id"], + select: { id: true }, order: { id: "asc", }, }) .getMany() - posts1.should.be.eql([{ id: 1 }, { id: 2 }, { id: 3 }]) + posts1.should.be.eql([ + { id: 1 }, + { id: 2 }, + { id: 3 }, + { id: 4 }, + ]) const posts2 = await connection .createQueryBuilder(Post, "post") @@ -45,7 +50,12 @@ describe("find options > select", () => { }, }) .getMany() - posts2.should.be.eql([{ id: 1 }, { id: 2 }, { id: 3 }]) + posts2.should.be.eql([ + { id: 1 }, + { id: 2 }, + { id: 3 }, + { id: 4 }, + ]) }), )) @@ -57,7 +67,7 @@ describe("find options > select", () => { const posts1 = await connection .createQueryBuilder(Post, "post") .setFindOptions({ - select: ["title"], + select: { title: true }, order: { title: "asc", }, @@ -67,6 +77,7 @@ describe("find options > select", () => { { title: "Post #1" }, { title: "Post #2" }, { title: "Post #3" }, + { title: "Post #4" }, ]) const posts2 = await connection @@ -84,6 +95,7 @@ describe("find options > select", () => { { title: "Post #1" }, { title: "Post #2" }, { title: "Post #3" }, + { title: "Post #4" }, ]) }), )) @@ -96,7 +108,7 @@ describe("find options > select", () => { const posts1 = await connection .createQueryBuilder(Post, "post") .setFindOptions({ - select: ["title", "text"], + select: { title: true, text: true }, order: { title: "asc", }, @@ -106,6 +118,7 @@ describe("find options > select", () => { { title: "Post #1", text: "About post #1" }, { title: "Post #2", text: "About post #2" }, { title: "Post #3", text: "About post #3" }, + { title: "Post #4", text: "About post #4" }, ]) const posts2 = await connection @@ -124,6 +137,7 @@ describe("find options > select", () => { { title: "Post #1", text: "About post #1" }, { title: "Post #2", text: "About post #2" }, { title: "Post #3", text: "About post #3" }, + { title: "Post #4", text: "About post #4" }, ]) }), )) @@ -150,6 +164,7 @@ describe("find options > select", () => { { counters: { likes: 1 } }, { counters: { likes: 2 } }, { counters: { likes: 1 } }, + { counters: { likes: 1 } }, ]) }), )) diff --git a/test/functional/find-options/basic-usage/find-options-test-utils.ts b/test/functional/find-options/basic-usage/find-options-test-utils.ts index 9748883d4d..c0acd78bf7 100644 --- a/test/functional/find-options/basic-usage/find-options-test-utils.ts +++ b/test/functional/find-options/basic-usage/find-options-test-utils.ts @@ -82,4 +82,15 @@ export async function prepareData(manager: EntityManager) { post3.counters.likes = 1 post3.counters.likedUsers = [user2] await manager.save(post3) + + const post4 = new Post() + post4.id = 4 + post4.title = "Post #4" + post4.text = "About post #4" + post4.author = user1 + post4.tags = [] + post4.counters = new Counters() + post4.counters.likes = 1 + post4.counters.likedUsers = [user1] + await manager.save(post4) } diff --git a/test/functional/find-options/basic-usage/find-options-where.ts b/test/functional/find-options/basic-usage/find-options-where.ts index 5bbad4c731..1151ed5652 100644 --- a/test/functional/find-options/basic-usage/find-options-where.ts +++ b/test/functional/find-options/basic-usage/find-options-where.ts @@ -143,6 +143,12 @@ describe("find options > where", () => { text: "About post #2", counters: { likes: 2 }, }, + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, ]) const posts2 = await connection @@ -227,6 +233,12 @@ describe("find options > where", () => { text: "About post #2", counters: { likes: 2 }, }, + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, ]) }), )) @@ -263,6 +275,60 @@ describe("find options > where", () => { }), )) + it("where or + optional relations", () => + Promise.all( + connections.map(async (connection) => { + await prepareData(connection.manager) + + const posts = await connection + .createQueryBuilder(Post, "post") + .setFindOptions({ + where: [ + { + author: { + id: 1, + }, + }, + { + tags: { + name: "category #1", + }, + }, + ], + order: { + id: "asc", + }, + }) + .getMany() + posts.should.be.eql([ + { + id: 1, + title: "Post #1", + text: "About post #1", + counters: { likes: 1 }, + }, + { + id: 2, + title: "Post #2", + text: "About post #2", + counters: { likes: 2 }, + }, + { + id: 3, + title: "Post #3", + text: "About post #3", + counters: { likes: 1 }, + }, + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, + ]) + }), + )) + it("where column in embed", () => Promise.all( connections.map(async (connection) => { @@ -294,6 +360,12 @@ describe("find options > where", () => { text: "About post #3", counters: { likes: 1 }, }, + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, ]) }), )) @@ -386,6 +458,12 @@ describe("find options > where", () => { text: "About post #3", counters: { likes: 1 }, }, + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, ]) }), )) @@ -458,6 +536,12 @@ describe("find options > where", () => { text: "About post #2", counters: { likes: 2 }, }, + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, ]) const authors = await connection @@ -599,6 +683,12 @@ describe("find options > where", () => { text: "About post #3", counters: { likes: 1 }, }, + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, ]) }), )) diff --git a/test/functional/find-options/opaque-types-over-primitives/entity/Post.ts b/test/functional/find-options/opaque-types-over-primitives/entity/Post.ts new file mode 100644 index 0000000000..fedd619f01 --- /dev/null +++ b/test/functional/find-options/opaque-types-over-primitives/entity/Post.ts @@ -0,0 +1,15 @@ +import { Column, Entity, PrimaryColumn } from "../../../../../src" + +export type WithType = T & { type: "Post" } + +@Entity() +export class Post { + @PrimaryColumn({ type: Number }) + id: number & { type: "Post" } + + @Column({ type: String }) + title: string & { type: "Post" } + + @Column({ type: Boolean }) + isEdited: boolean & { type: "Post" } +} diff --git a/test/functional/find-options/opaque-types-over-primitives/find-options-opaque-types-over-primitives.ts b/test/functional/find-options/opaque-types-over-primitives/find-options-opaque-types-over-primitives.ts new file mode 100644 index 0000000000..611491c743 --- /dev/null +++ b/test/functional/find-options/opaque-types-over-primitives/find-options-opaque-types-over-primitives.ts @@ -0,0 +1,100 @@ +import "reflect-metadata" +import "../../../utils/test-setup" +import { DataSource } from "../../../../src" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../../utils/test-utils" +import { Post, WithType } from "./entity/Post" + +describe("find options > opaque-types-over-primitives", () => { + let dataSources: DataSource[] + before( + async () => + (dataSources = await createTestingConnections({ + __dirname, + })), + ) + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + async function prepareData(dataSource: DataSource) { + const post1 = new Post() + post1.id = 1 as WithType + post1.title = "Hello" as WithType + post1.isEdited = true as WithType + await dataSource.manager.save(post1) + } + + it("should work in select", () => + Promise.all( + dataSources.map(async (dataSource) => { + await prepareData(dataSource) + + const posts1 = await dataSource + .createQueryBuilder(Post, "post") + .setFindOptions({ + select: { + id: true, + title: true, + isEdited: true, + }, + }) + .getMany() + + posts1.should.be.eql([ + { id: 1, title: "Hello", isEdited: true }, + ]) + }), + )) + + it("should work in where", () => + Promise.all( + dataSources.map(async (dataSource) => { + await prepareData(dataSource) + + const posts = await dataSource + .createQueryBuilder(Post, "post") + .setFindOptions({ + where: { + id: 1 as WithType, + }, + }) + .getMany() + + posts.should.be.eql([ + { + id: 1, + title: "Hello", + isEdited: true, + }, + ]) + }), + )) + + it("should work in order by", () => + Promise.all( + dataSources.map(async (dataSource) => { + await prepareData(dataSource) + + const posts1 = await dataSource + .createQueryBuilder(Post, "post") + .setFindOptions({ + order: { + id: "asc", + title: "asc", + isEdited: "asc", + }, + }) + .getMany() + posts1.should.be.eql([ + { + id: 1, + title: "Hello", + isEdited: true, + }, + ]) + }), + )) +}) diff --git a/test/functional/migrations/show-command/command.ts b/test/functional/migrations/show-command/command.ts index c31901f76c..35657342ee 100644 --- a/test/functional/migrations/show-command/command.ts +++ b/test/functional/migrations/show-command/command.ts @@ -12,7 +12,7 @@ describe("migrations > show command", () => { async () => (connections = await createTestingConnections({ migrations: [__dirname + "/migration/*.js"], - enabledDrivers: ["postgres"], + enabledDrivers: ["postgres", "sqlite"], schemaCreate: true, dropSchema: true, })), diff --git a/test/functional/mongodb/basic/array-columns/entity/Post.ts b/test/functional/mongodb/basic/array-columns/entity/Post.ts index 917e1a69a2..b3869b13b0 100644 --- a/test/functional/mongodb/basic/array-columns/entity/Post.ts +++ b/test/functional/mongodb/basic/array-columns/entity/Post.ts @@ -2,12 +2,12 @@ import { Entity } from "../../../../../../src/decorator/entity/Entity" import { Column } from "../../../../../../src/decorator/columns/Column" import { ObjectIdColumn } from "../../../../../../src/decorator/columns/ObjectIdColumn" import { Counters } from "./Counters" -import { ObjectID } from "../../../../../../src/driver/mongodb/typings" +import { ObjectId } from "../../../../../../src/driver/mongodb/typings" @Entity() export class Post { @ObjectIdColumn() - id: ObjectID + id: ObjectId @Column() title: string diff --git a/test/functional/mongodb/basic/embedded-columns-listeners/entity/Post.ts b/test/functional/mongodb/basic/embedded-columns-listeners/entity/Post.ts index ede0796ebb..152f14591f 100644 --- a/test/functional/mongodb/basic/embedded-columns-listeners/entity/Post.ts +++ b/test/functional/mongodb/basic/embedded-columns-listeners/entity/Post.ts @@ -2,13 +2,13 @@ import { Entity } from "../../../../../../src/decorator/entity/Entity" import { Column } from "../../../../../../src/decorator/columns/Column" import { ObjectIdColumn } from "../../../../../../src/decorator/columns/ObjectIdColumn" import { Counters } from "./Counters" -import { ObjectID } from "../../../../../../src/driver/mongodb/typings" +import { ObjectId } from "../../../../../../src/driver/mongodb/typings" import { Tags } from "./Tags" @Entity() export class Post { @ObjectIdColumn() - id: ObjectID + id: ObjectId @Column() title: string diff --git a/test/functional/mongodb/basic/embedded-columns/entity/Post.ts b/test/functional/mongodb/basic/embedded-columns/entity/Post.ts index e16a8c8518..c882e7e771 100644 --- a/test/functional/mongodb/basic/embedded-columns/entity/Post.ts +++ b/test/functional/mongodb/basic/embedded-columns/entity/Post.ts @@ -2,12 +2,12 @@ import { Entity } from "../../../../../../src/decorator/entity/Entity" import { Column } from "../../../../../../src/decorator/columns/Column" import { ObjectIdColumn } from "../../../../../../src/decorator/columns/ObjectIdColumn" import { Counters } from "./Counters" -import { ObjectID } from "../../../../../../src/driver/mongodb/typings" +import { ObjectId } from "../../../../../../src/driver/mongodb/typings" @Entity() export class Post { @ObjectIdColumn() - id: ObjectID + id: ObjectId @Column() title: string diff --git a/test/functional/mongodb/basic/mongo-embeddeds-index/entity/Post.ts b/test/functional/mongodb/basic/mongo-embeddeds-index/entity/Post.ts index 06f9122f73..5cef1d0c48 100644 --- a/test/functional/mongodb/basic/mongo-embeddeds-index/entity/Post.ts +++ b/test/functional/mongodb/basic/mongo-embeddeds-index/entity/Post.ts @@ -2,14 +2,14 @@ import { Entity } from "../../../../../../src/decorator/entity/Entity" import { Column } from "../../../../../../src/decorator/columns/Column" import { ObjectIdColumn } from "../../../../../../src/decorator/columns/ObjectIdColumn" import { Index } from "../../../../../../src/decorator/Index" -import { ObjectID } from "../../../../../../src/driver/mongodb/typings" +import { ObjectId } from "../../../../../../src/driver/mongodb/typings" import { Information } from "./Information" @Entity() @Index("info_description", ["info.description"]) export class Post { @ObjectIdColumn() - id: ObjectID + id: ObjectId @Column() title: string diff --git a/test/functional/mongodb/basic/mongo-index/entity/Post.ts b/test/functional/mongodb/basic/mongo-index/entity/Post.ts index 48b33e0694..e5386be026 100644 --- a/test/functional/mongodb/basic/mongo-index/entity/Post.ts +++ b/test/functional/mongodb/basic/mongo-index/entity/Post.ts @@ -2,7 +2,7 @@ import { Entity } from "../../../../../../src/decorator/entity/Entity" import { Column } from "../../../../../../src/decorator/columns/Column" import { ObjectIdColumn } from "../../../../../../src/decorator/columns/ObjectIdColumn" import { Index } from "../../../../../../src/decorator/Index" -import { ObjectID } from "../../../../../../src/driver/mongodb/typings" +import { ObjectId } from "../../../../../../src/driver/mongodb/typings" @Entity() @Index(["title", "name"]) @@ -13,7 +13,7 @@ import { ObjectID } from "../../../../../../src/driver/mongodb/typings" @Index("count_expire", () => ({ title: -1 }), { expireAfterSeconds: 3600 }) export class Post { @ObjectIdColumn() - id: ObjectID + id: ObjectId @Column() @Index() diff --git a/test/functional/mongodb/basic/mongo-repository/entity/Post.ts b/test/functional/mongodb/basic/mongo-repository/entity/Post.ts index 1ebcbdb44b..6bfd210821 100644 --- a/test/functional/mongodb/basic/mongo-repository/entity/Post.ts +++ b/test/functional/mongodb/basic/mongo-repository/entity/Post.ts @@ -1,13 +1,13 @@ import { Entity } from "../../../../../../src/decorator/entity/Entity" import { Column } from "../../../../../../src/decorator/columns/Column" import { ObjectIdColumn } from "../../../../../../src/decorator/columns/ObjectIdColumn" -import { ObjectID } from "../../../../../../src/driver/mongodb/typings" +import { ObjectId } from "../../../../../../src/driver/mongodb/typings" import { DeleteDateColumn } from "../../../../../../src" @Entity() export class Post { @ObjectIdColumn() - id: ObjectID + id: ObjectId @Column() title: string @@ -22,7 +22,7 @@ export class Post { @Entity() export class PostWithDeleted { @ObjectIdColumn() - id: ObjectID + id: ObjectId @Column() title: string diff --git a/test/functional/mongodb/basic/mongo-repository/mongo-repository.ts b/test/functional/mongodb/basic/mongo-repository/mongo-repository.ts index 96586c0d95..4f5a6e7216 100644 --- a/test/functional/mongodb/basic/mongo-repository/mongo-repository.ts +++ b/test/functional/mongodb/basic/mongo-repository/mongo-repository.ts @@ -104,7 +104,7 @@ describe("mongodb > MongoRepository", () => { }), )) - it("should be able to use findByIds with both objectId and strings", () => + it("should be able to use findByIds with both ObjectId and strings", () => Promise.all( connections.map(async (connection) => { const postRepository = connection.getMongoRepository(Post) diff --git a/test/functional/mongodb/basic/object-id/entity/Post.ts b/test/functional/mongodb/basic/object-id/entity/Post.ts index 56e89cc5c4..08b5e3b3c2 100644 --- a/test/functional/mongodb/basic/object-id/entity/Post.ts +++ b/test/functional/mongodb/basic/object-id/entity/Post.ts @@ -1,12 +1,11 @@ import { Entity } from "../../../../../../src/decorator/entity/Entity" import { Column } from "../../../../../../src/decorator/columns/Column" import { ObjectIdColumn } from "../../../../../../src/decorator/columns/ObjectIdColumn" -import { ObjectID } from "../../../../../../src/driver/mongodb/typings" - +import { ObjectId } from "../../../../../../src/driver/mongodb/typings" @Entity() export class Post { @ObjectIdColumn() - nonIdNameOfObjectId: ObjectID + nonIdNameOfObjectId: ObjectId @Column() title: string diff --git a/test/functional/mongodb/basic/object-id/entity/PostWithUnderscoreId.ts b/test/functional/mongodb/basic/object-id/entity/PostWithUnderscoreId.ts index bc6dae0962..f16414f17a 100644 --- a/test/functional/mongodb/basic/object-id/entity/PostWithUnderscoreId.ts +++ b/test/functional/mongodb/basic/object-id/entity/PostWithUnderscoreId.ts @@ -1,12 +1,12 @@ import { Entity } from "../../../../../../src/decorator/entity/Entity" import { Column } from "../../../../../../src/decorator/columns/Column" import { ObjectIdColumn } from "../../../../../../src/decorator/columns/ObjectIdColumn" -import { ObjectID } from "../../../../../../src/driver/mongodb/typings" +import { ObjectId } from "../../../../../../src/driver/mongodb/typings" @Entity() export class PostWithUnderscoreId { @ObjectIdColumn() - _id: ObjectID + _id: ObjectId @Column() title: string diff --git a/test/functional/mongodb/basic/object-id/mongodb-object-id.ts b/test/functional/mongodb/basic/object-id/mongodb-object-id.ts index ceb0082bda..dd6ddab013 100644 --- a/test/functional/mongodb/basic/object-id/mongodb-object-id.ts +++ b/test/functional/mongodb/basic/object-id/mongodb-object-id.ts @@ -34,7 +34,7 @@ describe("mongodb > object id columns", () => { // little hack to get raw data from mongodb const aggArr = await postMongoRepository.aggregate([]).toArray() - expect(aggArr[0]._id).to.be.not.undefined + expect((aggArr[0] as any)._id).to.be.not.undefined expect(aggArr[0].nonIdNameOfObjectId).to.be.undefined }), )) @@ -94,7 +94,7 @@ describe("mongodb > object id columns", () => { // little hack to get raw data from mongodb const aggArr = await postMongoRepository.aggregate([]).toArray() - expect(aggArr[0]._id).to.be.not.undefined + expect((aggArr[0] as any)._id).to.be.not.undefined expect(aggArr[0].nonIdNameOfObjectId).to.be.undefined }), )) diff --git a/test/functional/mongodb/basic/repository-actions/entity/Post.ts b/test/functional/mongodb/basic/repository-actions/entity/Post.ts index 00f1032e4f..e0e3016f74 100644 --- a/test/functional/mongodb/basic/repository-actions/entity/Post.ts +++ b/test/functional/mongodb/basic/repository-actions/entity/Post.ts @@ -2,12 +2,12 @@ import { Entity } from "../../../../../../src/decorator/entity/Entity" import { Counters } from "./Counters" import { Column } from "../../../../../../src/decorator/columns/Column" import { ObjectIdColumn } from "../../../../../../src/decorator/columns/ObjectIdColumn" -import { ObjectID } from "../../../../../../src/driver/mongodb/typings" +import { ObjectId } from "../../../../../../src/driver/mongodb/typings" @Entity() export class Post { @ObjectIdColumn() - id: ObjectID + id: ObjectId @Column() title: string diff --git a/test/functional/mongodb/basic/timestampable-columns/entity/Post.ts b/test/functional/mongodb/basic/timestampable-columns/entity/Post.ts index ba3f600775..85e86a6300 100644 --- a/test/functional/mongodb/basic/timestampable-columns/entity/Post.ts +++ b/test/functional/mongodb/basic/timestampable-columns/entity/Post.ts @@ -1,14 +1,14 @@ import { Entity } from "../../../../../../src/decorator/entity/Entity" import { Column } from "../../../../../../src/decorator/columns/Column" import { ObjectIdColumn } from "../../../../../../src/decorator/columns/ObjectIdColumn" -import { ObjectID } from "../../../../../../src/driver/mongodb/typings" +import { ObjectId } from "../../../../../../src/driver/mongodb/typings" import { CreateDateColumn } from "../../../../../../src/decorator/columns/CreateDateColumn" import { UpdateDateColumn } from "../../../../../../src/decorator/columns/UpdateDateColumn" @Entity() export class Post { @ObjectIdColumn() - id: ObjectID + id: ObjectId @Column() message: string diff --git a/test/functional/multi-database/multi-database-basic-functionality/multi-database-basic-functionality.ts b/test/functional/multi-database/multi-database-basic-functionality/multi-database-basic-functionality.ts index 1bebe16bff..8e491b2953 100644 --- a/test/functional/multi-database/multi-database-basic-functionality/multi-database-basic-functionality.ts +++ b/test/functional/multi-database/multi-database-basic-functionality/multi-database-basic-functionality.ts @@ -91,9 +91,7 @@ describe("multi-database > basic-functionality", () => { beforeEach(() => reloadTestingDatabases(connections)) after(async () => { await closeTestingConnections(connections) - return new Promise((resolve) => - rimraf(`${tempPath}/**/*.attach.db`, {}, () => resolve()), - ) + await rimraf(`${tempPath}/**/*.attach.db`) }) it("should correctly attach and create database files", () => diff --git a/test/functional/naming-strategy/legacy-oracle-naming-strategy/column-shortening/column-shortening.ts b/test/functional/naming-strategy/legacy-oracle-naming-strategy/column-shortening/column-shortening.ts new file mode 100644 index 0000000000..6720177555 --- /dev/null +++ b/test/functional/naming-strategy/legacy-oracle-naming-strategy/column-shortening/column-shortening.ts @@ -0,0 +1,52 @@ +import "reflect-metadata" +import { expect } from "chai" +import { LegacyOracleNamingStrategy } from "../../../../../src/naming-strategy/LegacyOracleNamingStrategy" +import { RandomGenerator } from "../../../../../src/util/RandomGenerator" + +describe("LegacyOracleNamingStrategy > column shortening", () => { + it("should truncate column names to the limit", () => { + const legacyOracleNamingStrategy = new LegacyOracleNamingStrategy( + "truncate", + ) + expect( + legacyOracleNamingStrategy.columnName("shortName", "", []), + ).to.equal("shortName") + expect( + legacyOracleNamingStrategy.columnName( + "veryVeryVeryLongLongLongLongName", + "", + [], + ), + ).to.equal("veryVeryVeryLongLongLongLongNa") + expect( + legacyOracleNamingStrategy.columnName( + RandomGenerator.sha1("seed1"), + "", + [], + ).length, + ).to.lessThanOrEqual(legacyOracleNamingStrategy.IDENTIFIER_MAX_SIZE) + }) + + it("should change column names to hashes within the limit", () => { + const legacyOracleNamingStrategy = new LegacyOracleNamingStrategy( + "hash", + ) + const columnName: string = + "veryVeryVeryLongLongLongLongName" + RandomGenerator.sha1("seed2") + const hashedColumnName: string = legacyOracleNamingStrategy.columnName( + columnName, + "", + [], + ) + expect(hashedColumnName.length).to.lessThanOrEqual( + legacyOracleNamingStrategy.IDENTIFIER_MAX_SIZE, + ) + expect(hashedColumnName) + .to.be.a("string") + .and.satisfy((name: string) => + name.startsWith( + legacyOracleNamingStrategy.DEFAULT_COLUMN_PREFIX, + ), + ) + }) +}) diff --git a/test/functional/naming-strategy/legacy-oracle-naming-strategy/create-table/create-table-with-naming-strategy.ts b/test/functional/naming-strategy/legacy-oracle-naming-strategy/create-table/create-table-with-naming-strategy.ts new file mode 100644 index 0000000000..4ff1d4ab0b --- /dev/null +++ b/test/functional/naming-strategy/legacy-oracle-naming-strategy/create-table/create-table-with-naming-strategy.ts @@ -0,0 +1,31 @@ +import "reflect-metadata" +import { expect } from "chai" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../../../utils/test-utils" +import { DataSource } from "../../../../../src/data-source" +import { LegacyOracleNamingStrategy } from "../../../../../src/naming-strategy/LegacyOracleNamingStrategy" + +describe("LegacyOracleNamingStrategy > create table using this naming strategy", () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + enabledDrivers: ["oracle"], + namingStrategy: new LegacyOracleNamingStrategy("hash"), + })), + ) + // without reloadTestingDatabases(connections) -> tables should be created later + after(() => closeTestingConnections(connections)) + + it("should create the table", () => + Promise.all( + connections.map(async (connection) => { + await expect(reloadTestingDatabases([connection])).to.be + .fulfilled + }), + )) +}) diff --git a/test/functional/naming-strategy/legacy-oracle-naming-strategy/create-table/create-table.ts b/test/functional/naming-strategy/legacy-oracle-naming-strategy/create-table/create-table.ts new file mode 100644 index 0000000000..e939c75693 --- /dev/null +++ b/test/functional/naming-strategy/legacy-oracle-naming-strategy/create-table/create-table.ts @@ -0,0 +1,30 @@ +import "reflect-metadata" +import { expect } from "chai" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../../../utils/test-utils" +import { DataSource } from "../../../../../src/data-source" + +describe("LegacyOracleNamingStrategy > create table using default naming strategy", () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + enabledDrivers: ["oracle"], + })), + ) + // without reloadTestingDatabases(connections) -> tables should be created later + after(() => closeTestingConnections(connections)) + + it("should not create the table and fail due to ORA-00972", () => + Promise.all( + connections.map(async (connection) => { + await expect( + reloadTestingDatabases([connection]), + ).to.be.rejectedWith(/ORA-00972/gi) + }), + )) +}) diff --git a/test/functional/naming-strategy/legacy-oracle-naming-strategy/create-table/entity/Post.ts b/test/functional/naming-strategy/legacy-oracle-naming-strategy/create-table/entity/Post.ts new file mode 100644 index 0000000000..30addf1cd2 --- /dev/null +++ b/test/functional/naming-strategy/legacy-oracle-naming-strategy/create-table/entity/Post.ts @@ -0,0 +1,12 @@ +import { Entity } from "../../../../../../src/decorator/entity/Entity" +import { PrimaryGeneratedColumn } from "../../../../../../src/decorator/columns/PrimaryGeneratedColumn" +import { Column } from "../../../../../../src/decorator/columns/Column" + +@Entity() +export class Post { + @PrimaryGeneratedColumn() + id: number + + @Column() + veryLongveryLongveryLongveryLongveryLongveryLongveryLongName: string +} diff --git a/test/functional/persistence/one-to-one/persistence-one-to-one.ts b/test/functional/persistence/one-to-one/persistence-one-to-one.ts index 7d90c79a7b..9082f0f859 100644 --- a/test/functional/persistence/one-to-one/persistence-one-to-one.ts +++ b/test/functional/persistence/one-to-one/persistence-one-to-one.ts @@ -45,7 +45,7 @@ describe("persistence > one-to-one", function () { const loadedUser = await userRepository.findOne({ where: { email: "mwelnick@test.com" }, - relations: ["access_token"], + relations: { access_token: true }, }) expect(loadedUser).not.to.be.null diff --git a/test/functional/persistence/orphanage/delete/delete-orphans.ts b/test/functional/persistence/orphanage/delete/delete-orphans.ts index 067919b12a..170c12a56b 100644 --- a/test/functional/persistence/orphanage/delete/delete-orphans.ts +++ b/test/functional/persistence/orphanage/delete/delete-orphans.ts @@ -35,7 +35,11 @@ describe("persistence > orphanage > delete", () => { let postRepository: Repository let categoryId: number - beforeEach(async () => { + beforeEach(async function () { + if (connections.length === 0) { + this.skip() + } + await Promise.all( connections.map(async (connection) => { categoryRepository = connection.getRepository(Category) diff --git a/test/functional/persistence/orphanage/disable/disable-orphanage.ts b/test/functional/persistence/orphanage/disable/disable-orphanage.ts index 7f3f132a23..bcb2551b57 100644 --- a/test/functional/persistence/orphanage/disable/disable-orphanage.ts +++ b/test/functional/persistence/orphanage/disable/disable-orphanage.ts @@ -35,7 +35,11 @@ describe("persistence > orphanage > disable", () => { let settingRepo: Repository let userId: number - beforeEach(async () => { + beforeEach(async function () { + if (connections.length === 0) { + this.skip() + } + await Promise.all( connections.map(async (connection) => { userRepo = connection.getRepository(User) diff --git a/test/functional/persistence/persistence-options/transaction/persistence-options-transaction.ts b/test/functional/persistence/persistence-options/transaction/persistence-options-transaction.ts index 62a5ec8fb5..983c5ff714 100644 --- a/test/functional/persistence/persistence-options/transaction/persistence-options-transaction.ts +++ b/test/functional/persistence/persistence-options/transaction/persistence-options-transaction.ts @@ -6,7 +6,8 @@ import { } from "../../../../utils/test-utils" import { Post } from "./entity/Post" import { DataSource } from "../../../../../src/data-source/DataSource" -// import {expect} from "chai"; +import sinon from "sinon" +import { expect } from "chai" describe("persistence > persistence options > transaction", () => { // ------------------------------------------------------------------------- @@ -31,8 +32,68 @@ describe("persistence > persistence options > transaction", () => { const post = new Post() post.title = "Bakhrom" post.description = "Hello" - await connection.manager.save(post, { transaction: false }) - // todo: check if actual transaction query is not executed + + const queryRunner = connection.createQueryRunner() + + const startTransactionFn = sinon.spy( + queryRunner, + "startTransaction", + ) + const commitTransactionFn = sinon.spy( + queryRunner, + "commitTransaction", + ) + + await connection + .createEntityManager(queryRunner) + .getRepository(Post) + .save(post, { transaction: false }) + + expect(startTransactionFn.called).to.be.false + expect(commitTransactionFn.called).to.be.false + + // Cleanup + await queryRunner.release() + sinon.restore() + }), + )) + + it("should disable transaction when the drivers transactionSupport setting equals `none`", () => + Promise.all( + connections.map(async (connection) => { + const post = new Post() + post.title = "Bakhrom" + post.description = "Hello" + + // Storing initial driver setting of the `transactionSupport` property + // in order to be able to restore it later + const transactionSupportInitial = + connection.driver.transactionSupport + connection.driver.transactionSupport = "none" + + const queryRunner = connection.createQueryRunner() + + const startTransactionFn = sinon.spy( + queryRunner, + "startTransaction", + ) + const commitTransactionFn = sinon.spy( + queryRunner, + "commitTransaction", + ) + + await connection + .createEntityManager(queryRunner) + .getRepository(Post) + .save(post) + + expect(startTransactionFn.called).to.be.false + expect(commitTransactionFn.called).to.be.false + + // Cleanup + await queryRunner.release() + sinon.restore() + connection.driver.transactionSupport = transactionSupportInitial }), )) }) diff --git a/test/functional/query-builder/cte/materialized-cte.ts b/test/functional/query-builder/cte/materialized-cte.ts new file mode 100644 index 0000000000..7facc6a0a7 --- /dev/null +++ b/test/functional/query-builder/cte/materialized-cte.ts @@ -0,0 +1,140 @@ +import "reflect-metadata" +import { expect } from "chai" +import { + createTestingConnections, + closeTestingConnections, + reloadTestingDatabases, +} from "../../../utils/test-utils" +import { Connection } from "../../../../src/connection/Connection" +import { Foo } from "./entity/foo" +import { filterByCteCapabilities } from "./helpers" +import { QueryBuilderCteOptions } from "../../../../src/query-builder/QueryBuilderCte" + +describe("query builder > cte > materialized", () => { + let connections: Connection[] + before( + async () => + (connections = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + schemaCreate: true, + dropSchema: true, + // enabledDrivers: ['] + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("should allow MATERIALIZED hint", () => + Promise.all( + connections + .filter(filterByCteCapabilities("enabled")) + .filter(filterByCteCapabilities("materializedHint")) + .map(async (connection) => { + await connection + .getRepository(Foo) + .insert( + [1, 2, 3].map((i) => ({ id: i, bar: String(i) })), + ) + const cteQuery = connection + .createQueryBuilder() + .select() + .addSelect(`foo.bar`, "bar") + .from(Foo, "foo") + .where(`foo.bar = :value`, { value: "2" }) + + const cteOptions: QueryBuilderCteOptions = { + columnNames: ["raz"], + materialized: true, + } + + const cteSelection = "qaz.raz" + + const qb = await connection + .createQueryBuilder() + .addCommonTableExpression(cteQuery, "qaz", cteOptions) + .from("qaz", "qaz") + .select([]) + .addSelect(cteSelection, "raz") + + expect(qb.getQuery()).to.contain( + `WITH "qaz"("raz") AS MATERIALIZED (`, + ) + expect(await qb.getRawMany()).to.deep.equal([{ raz: "2" }]) + }), + )) + + it("should allow NOT MATERIALIZED hint", () => + Promise.all( + connections + .filter(filterByCteCapabilities("enabled")) + .filter(filterByCteCapabilities("materializedHint")) + .map(async (connection) => { + await connection + .getRepository(Foo) + .insert( + [1, 2, 3].map((i) => ({ id: i, bar: String(i) })), + ) + const cteQuery = connection + .createQueryBuilder() + .select() + .addSelect(`foo.bar`, "bar") + .from(Foo, "foo") + .where(`foo.bar = :value`, { value: "2" }) + + const cteOptions: QueryBuilderCteOptions = { + columnNames: ["raz"], + materialized: false, + } + + const cteSelection = "qaz.raz" + + const qb = await connection + .createQueryBuilder() + .addCommonTableExpression(cteQuery, "qaz", cteOptions) + .from("qaz", "qaz") + .select([]) + .addSelect(cteSelection, "raz") + + expect(qb.getQuery()).to.contain( + `WITH "qaz"("raz") AS NOT MATERIALIZED (`, + ) + expect(await qb.getRawMany()).to.deep.equal([{ raz: "2" }]) + }), + )) + + it("should omit hint if materialized option is not set", () => + Promise.all( + connections + .filter(filterByCteCapabilities("enabled")) + .filter(filterByCteCapabilities("materializedHint")) + .map(async (connection) => { + await connection + .getRepository(Foo) + .insert( + [1, 2, 3].map((i) => ({ id: i, bar: String(i) })), + ) + const cteQuery = connection + .createQueryBuilder() + .select() + .addSelect(`foo.bar`, "bar") + .from(Foo, "foo") + .where(`foo.bar = :value`, { value: "2" }) + + const cteOptions: QueryBuilderCteOptions = { + columnNames: ["raz"], + } + + const cteSelection = "qaz.raz" + + const qb = await connection + .createQueryBuilder() + .addCommonTableExpression(cteQuery, "qaz", cteOptions) + .from("qaz", "qaz") + .select([]) + .addSelect(cteSelection, "raz") + + expect(qb.getQuery()).to.contain(`WITH "qaz"("raz") AS (`) + expect(await qb.getRawMany()).to.deep.equal([{ raz: "2" }]) + }), + )) +}) diff --git a/test/functional/query-builder/exists/entity/Test.ts b/test/functional/query-builder/exists/entity/Test.ts new file mode 100644 index 0000000000..f49ef9a24b --- /dev/null +++ b/test/functional/query-builder/exists/entity/Test.ts @@ -0,0 +1,7 @@ +import { Entity, PrimaryColumn } from "../../../../../src" + +@Entity("tests") +export class Test { + @PrimaryColumn() + id: string +} diff --git a/test/functional/query-builder/exists/query-builder-exists.ts b/test/functional/query-builder/exists/query-builder-exists.ts new file mode 100644 index 0000000000..d782e0094a --- /dev/null +++ b/test/functional/query-builder/exists/query-builder-exists.ts @@ -0,0 +1,45 @@ +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../../utils/test-utils" +import { DataSource } from "../../../../src/data-source/DataSource" +import { expect } from "chai" +import { Test } from "./entity/Test" + +describe("query builder > exist", () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + entities: [Test], + schemaCreate: true, + dropSchema: true, + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("Exists query of empty table should be false", () => + Promise.all( + connections.map(async (connection) => { + const repo = connection.getRepository(Test) + + const exist = await repo.exist() + expect(exist).to.be.equal(false) + }), + )) + + it("Exists query of non empty table should be true", () => + Promise.all( + connections.map(async (connection) => { + const repo = connection.getRepository(Test) + + await repo.save({ id: "ok" }) + await repo.save({ id: "nok" }) + + const exist = await repo.exist() + expect(exist).to.be.equal(true) + }), + )) +}) diff --git a/test/functional/query-builder/insert-on-conflict/query-builder-insert-on-conflict.ts b/test/functional/query-builder/insert-on-conflict/query-builder-insert-on-conflict.ts index e06017fc53..fa58bc4e42 100644 --- a/test/functional/query-builder/insert-on-conflict/query-builder-insert-on-conflict.ts +++ b/test/functional/query-builder/insert-on-conflict/query-builder-insert-on-conflict.ts @@ -6,6 +6,7 @@ import { } from "../../../utils/test-utils" import { DataSource } from "../../../../src/data-source/DataSource" import { Post } from "./entity/Post" +import { expect } from "chai" describe("query builder > insertion > on conflict", () => { let connections: DataSource[] @@ -244,4 +245,91 @@ describe("query builder > insertion > on conflict", () => { }) }), )) + it("should perform insertion on partial index using orUpdate", () => + Promise.all( + connections.map(async (connection) => { + if (connection.driver.options.type !== "postgres") return + const post1 = new Post() + post1.id = "post#1" + post1.title = "About post" + post1.date = new Date("06 Aug 2020 00:12:00 GMT") + + const sql = connection.manager + .createQueryBuilder() + .insert() + .into(Post) + .values(post1) + .orUpdate(["title"], ["date"], { + indexPredicate: "date > 2020-01-01", + }) + .setParameter("title", post1.title) + .disableEscaping() + .getSql() + + expect(sql).to.equal( + `INSERT INTO post(id, title, date) ` + + `VALUES ($1, $2, $3) ON CONFLICT ( date ) ` + + `WHERE ( date > 2020-01-01 ) DO UPDATE SET title = EXCLUDED.title`, + ) + }), + )) + it("should perform insertion using partial index and skipping update on no change", () => + Promise.all( + connections.map(async (connection) => { + if (connection.driver.options.type !== "postgres") return + const post1 = new Post() + post1.id = "post#1" + post1.title = "About post" + post1.date = new Date("06 Aug 2020 00:12:00 GMT") + + const sql = connection.manager + .createQueryBuilder() + .insert() + .into(Post) + .values(post1) + .orUpdate(["title"], ["date"], { + skipUpdateIfNoValuesChanged: true, + indexPredicate: "date > 2020-01-01", + }) + .setParameter("title", post1.title) + .disableEscaping() + .getSql() + + expect(sql).to.equal( + `INSERT INTO post(id, title, date) ` + + `VALUES ($1, $2, $3) ON CONFLICT ( date ) ` + + `WHERE ( date > 2020-01-01 ) DO UPDATE SET title = EXCLUDED.title ` + + `WHERE (post.title IS DISTINCT FROM EXCLUDED.title)`, + ) + }), + )) + it("should throw error if using indexPredicate amd an unsupported driver", () => + Promise.all( + connections.map(async (connection) => { + if ( + !connection.driver.supportedUpsertTypes.includes( + "on-duplicate-key-update", + ) + ) + return + const post1 = new Post() + post1.id = "post#1" + post1.title = "About post" + post1.date = new Date("06 Aug 2020 00:12:00 GMT") + + const sql = connection.manager + .createQueryBuilder() + .insert() + .into(Post) + .values(post1) + .orUpdate(["title"], ["date"], { + indexPredicate: "date > 2020-01-01", + }) + .setParameter("title", post1.title) + .disableEscaping() + .getSql() + + expect(sql).to.throw(Error) + }), + )) }) diff --git a/test/functional/query-builder/join/query-builder-joins.ts b/test/functional/query-builder/join/query-builder-joins.ts index c491f0f07c..1141071dd6 100644 --- a/test/functional/query-builder/join/query-builder-joins.ts +++ b/test/functional/query-builder/join/query-builder-joins.ts @@ -540,6 +540,36 @@ describe("query builder > joins", () => { }), )) + it("should load and map selected data when query builder used as join argument", () => + Promise.all( + connections.map(async (connection) => { + const tag = new Tag() + tag.name = "audi" + await connection.manager.save(tag) + + const post = new Post() + post.title = "about China" + post.tag = tag + await connection.manager.save(post) + + const loadedPost = await connection.manager + .createQueryBuilder(Post, "post") + .leftJoinAndMapOne( + "post.tag", + (qb) => qb.from(Tag, "tag"), + "tag", + "tag.id = post.tagId", + undefined, + Tag, + ) + .where("post.id = :id", { id: post.id }) + .getOne() + + expect(loadedPost!.tag).to.not.be.undefined + expect(loadedPost!.tag.id).to.be.equal(1) + }), + )) + it("should load and map selected data when data will given from same entity but with different conditions", () => Promise.all( connections.map(async (connection) => { @@ -961,6 +991,36 @@ describe("query builder > joins", () => { }), )) + it("should load and map selected data when query builder used as join argument", () => + Promise.all( + connections.map(async (connection) => { + const tag = new Tag() + tag.name = "audi" + await connection.manager.save(tag) + + const post = new Post() + post.title = "about China" + post.tag = tag + await connection.manager.save(post) + + const loadedPost = await connection.manager + .createQueryBuilder(Post, "post") + .innerJoinAndMapOne( + "post.tag", + (qb) => qb.from(Tag, "tag"), + "tag", + "tag.id = post.tagId", + undefined, + Tag, + ) + .where("post.id = :id", { id: post.id }) + .getOne() + + expect(loadedPost!.tag).to.not.be.undefined + expect(loadedPost!.tag.id).to.be.equal(1) + }), + )) + it("should load and map selected data when data will given from same entity but with different conditions", () => Promise.all( connections.map(async (connection) => { diff --git a/test/functional/query-builder/locking/query-builder-locking.ts b/test/functional/query-builder/locking/query-builder-locking.ts index 9cdeeea356..b141ff2064 100644 --- a/test/functional/query-builder/locking/query-builder-locking.ts +++ b/test/functional/query-builder/locking/query-builder-locking.ts @@ -820,20 +820,6 @@ describe("query builder > locking", () => { ]) }) - if (connection.driver.options.type === "cockroachdb") - return connection.manager.transaction((entityManager) => { - return Promise.all([ - entityManager - .createQueryBuilder(PostWithVersion, "post") - .setLock("pessimistic_read") - .where("post.id = :id", { id: 1 }) - .getOne() - .should.be.rejectedWith( - LockNotSupportedOnGivenDriverError, - ), - ]) - }) - return }), )) @@ -868,7 +854,7 @@ describe("query builder > locking", () => { it("should throw error if for key share locking not supported by given driver", () => Promise.all( connections.map(async (connection) => { - if (!(connection.driver.options.type === "postgres")) { + if (!DriverUtils.isPostgresFamily(connection.driver)) { return connection.manager.transaction((entityManager) => { return Promise.all([ entityManager diff --git a/test/functional/query-builder/select/query-builder-select.ts b/test/functional/query-builder/select/query-builder-select.ts index ce08575fa4..74e4e55381 100644 --- a/test/functional/query-builder/select/query-builder-select.ts +++ b/test/functional/query-builder/select/query-builder-select.ts @@ -5,13 +5,7 @@ import { reloadTestingDatabases, } from "../../../utils/test-utils" import { expect } from "chai" -import { - DataSource, - EntityNotFoundError, - In, - IsNull, - Raw, -} from "../../../../src" +import { DataSource, In, IsNull, Raw } from "../../../../src" import { Category } from "./entity/Category" import { Post } from "./entity/Post" import { Tag } from "./entity/Tag" @@ -522,7 +516,7 @@ describe("query builder > select", () => { .createQueryBuilder(Post, "post") .where("post.id = :id", { id: "2" }) .getOneOrFail(), - ).to.be.rejectedWith(EntityNotFoundError) + ).to.be.rejectedWith("") }), )) }) diff --git a/test/functional/query-builder/soft-delete/query-builder-soft-delete.ts b/test/functional/query-builder/soft-delete/query-builder-soft-delete.ts index f1382bea3d..e12d744ae6 100644 --- a/test/functional/query-builder/soft-delete/query-builder-soft-delete.ts +++ b/test/functional/query-builder/soft-delete/query-builder-soft-delete.ts @@ -300,7 +300,7 @@ describe("query builder > soft-delete", () => { await userRepository.save(user2) const users = await userRepository.find({ - relations: ["picture"], + relations: { picture: true }, }) expect(users[0].picture.deletedAt).to.equal(null) @@ -312,7 +312,7 @@ describe("query builder > soft-delete", () => { const usersWithSoftDelete = await userRepository.find({ withDeleted: true, - relations: ["picture"], + relations: { picture: true }, }) expect(usersWithSoftDelete[0].picture.deletedAt).to.not.equal( diff --git a/test/functional/query-builder/time-travel-query/entity/Account.ts b/test/functional/query-builder/time-travel-query/entity/Account.ts new file mode 100644 index 0000000000..ca925661e3 --- /dev/null +++ b/test/functional/query-builder/time-travel-query/entity/Account.ts @@ -0,0 +1,17 @@ +import { + Column, + Entity, + PrimaryGeneratedColumn, +} from "../../../../../src/index" + +@Entity() +export class Account { + @PrimaryGeneratedColumn() + id: number + + @Column() + name: string + + @Column() + balance: number +} diff --git a/test/functional/query-builder/time-travel-query/entity/Person.ts b/test/functional/query-builder/time-travel-query/entity/Person.ts new file mode 100644 index 0000000000..f2e3a50123 --- /dev/null +++ b/test/functional/query-builder/time-travel-query/entity/Person.ts @@ -0,0 +1,17 @@ +import { + Entity, + JoinColumn, + OneToOne, + PrimaryGeneratedColumn, +} from "../../../../../src/index" +import { Account } from "./Account" + +@Entity() +export class Person { + @PrimaryGeneratedColumn() + id: number + + @OneToOne(() => Account) + @JoinColumn() + account: Account +} diff --git a/test/functional/query-builder/time-travel-query/time-travel-query.ts b/test/functional/query-builder/time-travel-query/time-travel-query.ts new file mode 100644 index 0000000000..140ea4978c --- /dev/null +++ b/test/functional/query-builder/time-travel-query/time-travel-query.ts @@ -0,0 +1,271 @@ +import "reflect-metadata" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, + sleep, +} from "../../../utils/test-utils" +import { DataSource } from "../../../../src/index" +import { Account } from "./entity/Account" +import { Person } from "./entity/Person" + +describe("query builder > time-travel-query", () => { + // ------------------------------------------------------------------------- + // Prepare + // ------------------------------------------------------------------------- + + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + enabledDrivers: ["cockroachdb"], + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + // ------------------------------------------------------------------------- + // Reusable functions + // ------------------------------------------------------------------------- + + it("should execute time travel query without options", () => + Promise.all( + connections.map(async (connection) => { + const repository = await connection.getRepository(Account) + // create account + let account = new Account() + account.name = "Edna Barath" + account.balance = 100 + await repository.save(account) + + // wait for 5 seconds + await sleep(5000) + + // update account balance + account.balance = 200 + await repository.save(account) + + // check if balance updated + account = await repository + .createQueryBuilder("account") + .getOneOrFail() + account.balance.should.be.equal(200) + + // load account state on 5 seconds back + account = await repository + .createQueryBuilder("account") + .timeTravelQuery() + .getOneOrFail() + account.balance.should.be.equal(100) + }), + )) + + it("should execute time travel query with options", () => + Promise.all( + connections.map(async (connection) => { + const repository = await connection.getRepository(Account) + // create account + let account = new Account() + account.name = "Edna Barath" + account.balance = 100 + await repository.save(account) + + // wait for 2 seconds + await sleep(2000) + + // update account balance + account.balance = 200 + await repository.save(account) + + // load current account state + account = await repository + .createQueryBuilder("account") + .getOneOrFail() + account.balance.should.be.equal(200) + + // load account state on 2 seconds back + account = await repository + .createQueryBuilder("account") + .timeTravelQuery("'-2s'") + .getOneOrFail() + account.balance.should.be.equal(100) + }), + )) + + it("should execute time travel query with 'skip' and 'take' options", () => + Promise.all( + connections.map(async (connection) => { + const repository = await connection.getRepository(Account) + // create accounts + for (let i = 1; i < 6; i++) { + const account = new Account() + account.name = `Person_${i}` + account.balance = 100 * i + await repository.save(account) + } + + // wait for 2 seconds + await sleep(2000) + + let accounts = await repository + .createQueryBuilder("account") + .getMany() + + // update accounts + for (let account of accounts) { + account.balance = account.balance + 100 + await repository.save(account) + } + + // load current accounts state + accounts = await repository + .createQueryBuilder("account") + .skip(2) + .take(3) + .getMany() + + accounts.length.should.be.equal(3) + accounts[0].balance.should.be.equal(400) + accounts[1].balance.should.be.equal(500) + accounts[2].balance.should.be.equal(600) + + // load accounts state on 2 seconds back + accounts = await repository + .createQueryBuilder("account") + .timeTravelQuery(`'-2s'`) + .skip(2) + .take(3) + .getMany() + + accounts.length.should.be.equal(3) + accounts[0].balance.should.be.equal(300) + accounts[1].balance.should.be.equal(400) + accounts[2].balance.should.be.equal(500) + }), + )) + + it("should execute time travel query with JOIN and skip/take options", () => + Promise.all( + connections.map(async (connection) => { + const accountRepository = await connection.getRepository( + Account, + ) + const personRepository = await connection.getRepository(Person) + + // create persons and accounts + for (let i = 1; i < 6; i++) { + const account = new Account() + account.name = `Person_${i}` + account.balance = 100 * i + await accountRepository.save(account) + + const person = new Person() + person.account = account + await personRepository.save(person) + } + + // wait for 2 seconds + await sleep(2000) + + const accounts = await accountRepository + .createQueryBuilder("account") + .getMany() + + // update accounts + for (let account of accounts) { + account.balance = account.balance + 100 + await accountRepository.save(account) + } + + // load current accounts state + let persons = await personRepository + .createQueryBuilder("person") + .innerJoinAndSelect("person.account", "account") + .skip(2) + .take(3) + .getMany() + + persons.length.should.be.equal(3) + persons[0].account.balance.should.be.equal(400) + persons[1].account.balance.should.be.equal(500) + persons[2].account.balance.should.be.equal(600) + + // load accounts state on 2 seconds back + persons = await personRepository + .createQueryBuilder("person") + .innerJoinAndSelect("person.account", "account") + .timeTravelQuery(`'-2s'`) + .skip(2) + .take(3) + .getMany() + + persons.length.should.be.equal(3) + persons[0].account.balance.should.be.equal(300) + persons[1].account.balance.should.be.equal(400) + persons[2].account.balance.should.be.equal(500) + }), + )) + + it("should execute time travel query with JOIN and limit/offset options", () => + Promise.all( + connections.map(async (connection) => { + const accountRepository = await connection.getRepository( + Account, + ) + const personRepository = await connection.getRepository(Person) + + // create persons and accounts + for (let i = 1; i < 6; i++) { + const account = new Account() + account.name = `Person_${i}` + account.balance = 100 * i + await accountRepository.save(account) + + const person = new Person() + person.account = account + await personRepository.save(person) + } + + // wait for 2 seconds + await sleep(2000) + + const accounts = await accountRepository + .createQueryBuilder("account") + .getMany() + + // update accounts + for (let account of accounts) { + account.balance = account.balance + 100 + await accountRepository.save(account) + } + + // load current accounts state + let persons = await personRepository + .createQueryBuilder("person") + .innerJoinAndSelect("person.account", "account") + .offset(2) + .limit(3) + .getMany() + + persons.length.should.be.equal(3) + persons[0].account.balance.should.be.equal(400) + persons[1].account.balance.should.be.equal(500) + persons[2].account.balance.should.be.equal(600) + + // load accounts state on 2 seconds back + persons = await personRepository + .createQueryBuilder("person") + .innerJoinAndSelect("person.account", "account") + .timeTravelQuery(`'-2s'`) + .offset(2) + .limit(3) + .getMany() + + persons.length.should.be.equal(3) + persons[0].account.balance.should.be.equal(300) + persons[1].account.balance.should.be.equal(400) + persons[2].account.balance.should.be.equal(500) + }), + )) +}) diff --git a/test/functional/relations/multiple-primary-keys/multiple-primary-keys-one-to-many/multiple-primary-keys-one-to-many.ts b/test/functional/relations/multiple-primary-keys/multiple-primary-keys-one-to-many/multiple-primary-keys-one-to-many.ts index fe5792d4de..3d9702cb88 100644 --- a/test/functional/relations/multiple-primary-keys/multiple-primary-keys-one-to-many/multiple-primary-keys-one-to-many.ts +++ b/test/functional/relations/multiple-primary-keys/multiple-primary-keys-one-to-many/multiple-primary-keys-one-to-many.ts @@ -58,7 +58,7 @@ describe("relations > multiple-primary-keys > one-to-many", () => { await insertSimpleTestData(connection) const [user] = await connection.getRepository(User).find({ - relations: ["settings"], + relations: { settings: true }, // relationLoadStrategy: "join" }) @@ -86,7 +86,7 @@ describe("relations > multiple-primary-keys > one-to-many", () => { const [user] = await connection .getRepository(User) - .find({ relations: ["settings"] }) + .find({ relations: { settings: true } }) // check the saved items have correctly updated value expect(user!).not.to.be.undefined @@ -117,7 +117,7 @@ describe("relations > multiple-primary-keys > one-to-many", () => { }) const [user] = await connection.getRepository(User).find({ - relations: ["settings"], + relations: { settings: true }, }) // check that no relational items are found diff --git a/test/functional/repository/aggregate-methods/entity/Post.ts b/test/functional/repository/aggregate-methods/entity/Post.ts new file mode 100644 index 0000000000..d922cacccb --- /dev/null +++ b/test/functional/repository/aggregate-methods/entity/Post.ts @@ -0,0 +1,12 @@ +import { Entity } from "../../../../../src/decorator/entity/Entity" +import { Column } from "../../../../../src/decorator/columns/Column" +import { PrimaryColumn } from "../../../../../src/decorator/columns/PrimaryColumn" + +@Entity() +export class Post { + @PrimaryColumn() + id: number + + @Column() + counter: number +} diff --git a/test/functional/repository/aggregate-methods/repository-aggregate-methods.ts b/test/functional/repository/aggregate-methods/repository-aggregate-methods.ts new file mode 100644 index 0000000000..c65fee589d --- /dev/null +++ b/test/functional/repository/aggregate-methods/repository-aggregate-methods.ts @@ -0,0 +1,89 @@ +import "reflect-metadata" +import { + closeTestingConnections, + createTestingConnections, +} from "../../../utils/test-utils" +import { Repository } from "../../../../src/repository/Repository" +import { DataSource } from "../../../../src/data-source/DataSource" +import { Post } from "./entity/Post" +import { LessThan } from "../../../../src" +import { expect } from "chai" + +describe("repository > aggregate methods", () => { + debugger + let connections: DataSource[] + let repository: Repository + + before(async () => { + connections = await createTestingConnections({ + entities: [Post], + schemaCreate: true, + dropSchema: true, + }) + repository = connections[0].getRepository(Post) + for (let i = 0; i < 100; i++) { + const post = new Post() + post.id = i + post.counter = i + 1 + await repository.save(post) + } + }) + + after(() => closeTestingConnections(connections)) + + describe("sum", () => { + it("should return the aggregate sum", async () => { + const sum = await repository.sum("counter") + expect(sum).to.equal(5050) + }) + + it("should return null when 0 rows match the query", async () => { + const sum = await repository.sum("counter", { id: LessThan(0) }) + expect(sum).to.be.null + }) + }) + + describe("average", () => { + it("should return the aggregate average", async () => { + const average = await repository.average("counter") + // Some RDBMSs (e.g. SQL Server) will return an int when averaging an int column, so either + // answer is acceptable. + expect([50, 50.5]).to.include(average) + }) + + it("should return null when 0 rows match the query", async () => { + const average = await repository.average("counter", { + id: LessThan(0), + }) + expect(average).to.be.null + }) + }) + + describe("minimum", () => { + it("should return the aggregate minimum", async () => { + const minimum = await repository.minimum("counter") + expect(minimum).to.equal(1) + }) + + it("should return null when 0 rows match the query", async () => { + const minimum = await repository.minimum("counter", { + id: LessThan(0), + }) + expect(minimum).to.be.null + }) + }) + + describe("maximum", () => { + it("should return the aggregate maximum", async () => { + const maximum = await repository.maximum("counter") + expect(maximum).to.equal(100) + }) + + it("should return null when 0 rows match the query", async () => { + const maximum = await repository.maximum("counter", { + id: LessThan(0), + }) + expect(maximum).to.be.null + }) + }) +}) diff --git a/test/functional/repository/basic-methods/repository-basic-methods.ts b/test/functional/repository/basic-methods/repository-basic-methods.ts index a9fa27d5f1..7dc7ea80a4 100644 --- a/test/functional/repository/basic-methods/repository-basic-methods.ts +++ b/test/functional/repository/basic-methods/repository-basic-methods.ts @@ -440,7 +440,7 @@ describe("repository > basic methods", () => { it("should first create then update an entity", () => Promise.all( connections.map(async (connection) => { - if (connection.driver.supportedUpsertType == null) return + if (!connection.driver.supportedUpsertTypes.length) return const externalIdObjects = connection.getRepository( ExternalIdPrimaryKeyEntity, ) @@ -541,7 +541,7 @@ describe("repository > basic methods", () => { it("should bulk upsert", () => Promise.all( connections.map(async (connection) => { - if (connection.driver.supportedUpsertType == null) return + if (!connection.driver.supportedUpsertTypes.length) return const externalIdObjects = connection.getRepository( ExternalIdPrimaryKeyEntity, @@ -589,7 +589,7 @@ describe("repository > basic methods", () => { it("should not overwrite unspecified properties", () => Promise.all( connections.map(async (connection) => { - if (connection.driver.supportedUpsertType == null) return + if (!connection.driver.supportedUpsertTypes.length) return const postObjects = connection.getRepository(Post) const externalId = "external-no-overwrite-unrelated" @@ -688,7 +688,7 @@ describe("repository > basic methods", () => { it("should upsert with embedded columns", () => Promise.all( connections.map(async (connection) => { - if (connection.driver.supportedUpsertType == null) return + if (!connection.driver.supportedUpsertTypes.length) return const externalIdObjects = connection.getRepository( ExternalIdPrimaryKeyEntity, @@ -746,7 +746,7 @@ describe("repository > basic methods", () => { it("should upsert on one-to-one relation", () => Promise.all( connections.map(async (connection) => { - if (connection.driver.supportedUpsertType == null) return + if (!connection.driver.supportedUpsertTypes.length) return const oneToOneRepository = connection.getRepository( OneToOneRelationEntity, @@ -784,7 +784,7 @@ describe("repository > basic methods", () => { it("should bulk upsert with embedded columns", () => Promise.all( connections.map(async (connection) => { - if (connection.driver.supportedUpsertType == null) return + if (!connection.driver.supportedUpsertTypes.length) return const embeddedConstraintObjects = connection.getRepository(EmbeddedUQEntity) @@ -837,7 +837,7 @@ describe("repository > basic methods", () => { it("should throw if using an unsupported driver", () => Promise.all( connections.map(async (connection) => { - if (connection.driver.supportedUpsertType != null) return + if (connection.driver.supportedUpsertTypes.length) return const postRepository = connection.getRepository(Post) const externalId = "external-2" @@ -848,6 +848,31 @@ describe("repository > basic methods", () => { .should.be.rejectedWith(TypeORMError) }), )) + it("should throw if using indexPredicate with an unsupported driver", () => + Promise.all( + connections.map(async (connection) => { + // does not throw for cockroachdb, just returns a result + if (connection.driver.options.type === "cockroachdb") return + if ( + !connection.driver.supportedUpsertTypes.includes( + "on-conflict-do-update", + ) + ) + return + + const postRepository = connection.getRepository(Post) + const externalId = "external-2" + await postRepository + .upsert( + { externalId, title: "Post title initial" }, + { + conflictPaths: ["externalId"], + indexPredicate: "dateAdded > 2020-01-01", + }, + ) + .should.be.rejectedWith(TypeORMError) + }), + )) }) describe("preload also should also implement merge functionality", function () { diff --git a/test/functional/repository/find-methods/repostiory-find-methods.ts b/test/functional/repository/find-methods/repostiory-find-methods.ts index f5963ad3ef..e0d59b2c09 100644 --- a/test/functional/repository/find-methods/repostiory-find-methods.ts +++ b/test/functional/repository/find-methods/repostiory-find-methods.ts @@ -135,6 +135,119 @@ describe("repository > find methods", () => { )) }) + describe("exists", function () { + it("should return a True when no criteria given", () => + Promise.all( + connections.map(async (connection) => { + const postRepository = connection.getRepository(Post) + + for (let i = 0; i < 100; i++) { + const post = new Post() + post.id = i + post.title = "post #" + i + post.categoryName = "other" + await postRepository.save(post) + } + + // check exist method + const exists = await postRepository.exist({ + order: { id: "ASC" }, + }) + exists.should.be.equal(true) + }), + )) + + it("should return True when matches the given criteria", () => + Promise.all( + connections.map(async (connection) => { + const postRepository = connection.getRepository(Post) + for (let i = 1; i <= 100; i++) { + const post = new Post() + post.id = i + post.title = "post #" + i + post.categoryName = i % 2 === 0 ? "even" : "odd" + await postRepository.save(post) + } + + // check exist method + const exists = await postRepository.exist({ + where: { categoryName: "odd" }, + order: { id: "ASC" }, + }) + exists.should.be.equal(true) + }), + )) + + it("should return True when matches the given multiple criteria", () => + Promise.all( + connections.map(async (connection) => { + const postRepository = connection.getRepository(Post) + for (let i = 1; i <= 100; i++) { + const post = new Post() + post.id = i + post.title = "post #" + i + post.categoryName = i % 2 === 0 ? "even" : "odd" + post.isNew = i > 90 + await postRepository.save(post) + } + + // check exist method + const exists = await postRepository.exist({ + where: { categoryName: "odd", isNew: true }, + order: { id: "ASC" }, + }) + exists.should.be.equal(true) + }), + )) + + it("should return True when matches the given find options", () => + Promise.all( + connections.map(async (connection) => { + const postRepository = connection.getRepository(Post) + for (let i = 1; i <= 100; i++) { + const post = new Post() + post.id = i + post.isNew = i > 90 + post.title = post.isNew + ? "new post #" + i + : "post #" + i + post.categoryName = i % 2 === 0 ? "even" : "odd" + await postRepository.save(post) + } + + // check exist method + const exists = await postRepository.exist() + exists.should.be.equal(true) + }), + )) + + it("should return True when matches both criteria and find options", () => + Promise.all( + connections.map(async (connection) => { + const postRepository = connection.getRepository(Post) + for (let i = 1; i <= 100; i++) { + const post = new Post() + post.id = i + post.isNew = i > 90 + post.title = post.isNew + ? "new post #" + i + : "post #" + i + post.categoryName = i % 2 === 0 ? "even" : "odd" + await postRepository.save(post) + } + + // check exist method + const exists = await postRepository.exist({ + where: { categoryName: "even", isNew: true }, + skip: 1, + take: 2, + order: { id: "ASC" }, + }) + exists.should.be.equal(true) + }), + )) + }) + describe("find and findAndCount", function () { it("should return everything when no criteria given", () => Promise.all( diff --git a/test/functional/repository/find-options-locking/find-options-locking.ts b/test/functional/repository/find-options-locking/find-options-locking.ts index 212ea4ed94..233eb369a3 100644 --- a/test/functional/repository/find-options-locking/find-options-locking.ts +++ b/test/functional/repository/find-options-locking/find-options-locking.ts @@ -547,21 +547,6 @@ describe("repository > find options > locking", () => { ]) }) - if (connection.driver.options.type === "cockroachdb") - return connection.manager.transaction((entityManager) => { - return Promise.all([ - entityManager - .getRepository(PostWithVersion) - .findOne({ - where: { id: 1 }, - lock: { mode: "pessimistic_read" }, - }) - .should.be.rejectedWith( - LockNotSupportedOnGivenDriverError, - ), - ]) - }) - return }), )) @@ -610,7 +595,7 @@ describe("repository > find options > locking", () => { .getRepository(Post) .findOne({ where: { id: 1 }, - relations: ["author"], + relations: { author: true }, lock: { mode: "pessimistic_write", tables: ["img"], @@ -632,7 +617,7 @@ describe("repository > find options > locking", () => { return Promise.all([ entityManager.getRepository(Post).findOne({ where: { id: 1 }, - relations: ["author"], + relations: { author: true }, lock: { mode: "pessimistic_write", tables: ["post"], @@ -640,7 +625,7 @@ describe("repository > find options > locking", () => { }), entityManager.getRepository(Post).findOne({ where: { id: 1 }, - relations: ["author"], + relations: { author: true }, lock: { mode: "pessimistic_write" }, }), ]) @@ -652,7 +637,7 @@ describe("repository > find options > locking", () => { return Promise.all([ entityManager.getRepository(Post).findOne({ where: { id: 1 }, - relations: ["author"], + relations: { author: true }, lock: { mode: "pessimistic_write", tables: ["post"], @@ -662,7 +647,7 @@ describe("repository > find options > locking", () => { .getRepository(Post) .findOne({ where: { id: 1 }, - relations: ["author"], + relations: { author: true }, lock: { mode: "pessimistic_write" }, }) .should.be.rejectedWith( @@ -685,7 +670,7 @@ describe("repository > find options > locking", () => { return Promise.all([ entityManager.getRepository(Post).findOne({ where: { id: 1 }, - relations: ["author"], + relations: { author: true }, lock: { mode: "pessimistic_read", tables: ["post"], @@ -693,7 +678,7 @@ describe("repository > find options > locking", () => { }), entityManager.getRepository(Post).findOne({ where: { id: 1 }, - relations: ["author"], + relations: { author: true }, lock: { mode: "pessimistic_write", tables: ["post"], @@ -701,7 +686,7 @@ describe("repository > find options > locking", () => { }), entityManager.getRepository(Post).findOne({ where: { id: 1 }, - relations: ["author"], + relations: { author: true }, lock: { mode: "pessimistic_partial_write", tables: ["post"], @@ -709,7 +694,7 @@ describe("repository > find options > locking", () => { }), entityManager.getRepository(Post).findOne({ where: { id: 1 }, - relations: ["author"], + relations: { author: true }, lock: { mode: "pessimistic_write_or_fail", tables: ["post"], @@ -717,7 +702,7 @@ describe("repository > find options > locking", () => { }), entityManager.getRepository(Post).findOne({ where: { id: 1 }, - relations: ["author"], + relations: { author: true }, lock: { mode: "for_no_key_update", tables: ["post"], @@ -725,7 +710,7 @@ describe("repository > find options > locking", () => { }), entityManager.getRepository(Post).findOne({ where: { id: 1 }, - relations: ["author"], + relations: { author: true }, lock: { mode: "for_key_share", tables: ["post"], diff --git a/test/functional/repository/find-options/repository-find-options.ts b/test/functional/repository/find-options/repository-find-options.ts index 0e55b6a45b..7a01d58c92 100644 --- a/test/functional/repository/find-options/repository-find-options.ts +++ b/test/functional/repository/find-options/repository-find-options.ts @@ -45,7 +45,7 @@ describe("repository > find options", () => { await connection.manager.save(post) const [loadedPost] = await connection.getRepository(Post).find({ - relations: ["author", "categories"], + relations: { author: true, categories: true }, }) expect(loadedPost).to.be.eql({ id: 1, @@ -126,7 +126,7 @@ describe("repository > find options", () => { const loadedPhoto = await connection .getRepository(Photo) .findOne({ - select: ["name"], + select: { name: true }, where: { id: 5, }, @@ -135,14 +135,14 @@ describe("repository > find options", () => { const loadedPhotos1 = await connection .getRepository(Photo) .find({ - select: ["filename", "views"], + select: { filename: true, views: true }, }) const loadedPhotos2 = await connection .getRepository(Photo) .find({ - select: ["id", "name", "description"], - relations: ["categories"], + select: { id: true, name: true, description: true }, + relations: { categories: true }, }) // const loadedPhotos3 = await connection.getRepository(Photo).createQueryBuilder("photo") diff --git a/test/functional/spatial/cockroachdb/entity/Post.ts b/test/functional/spatial/cockroachdb/entity/Post.ts new file mode 100644 index 0000000000..f293809754 --- /dev/null +++ b/test/functional/spatial/cockroachdb/entity/Post.ts @@ -0,0 +1,41 @@ +import { + Column, + Entity, + Geography, + Geometry, + Index, + Point, + PrimaryGeneratedColumn, +} from "../../../../../src" + +@Entity() +export class Post { + @PrimaryGeneratedColumn() + id: number + + @Column("geometry", { + nullable: true, + }) + @Index({ + spatial: true, + }) + geom: Geometry + + @Column("geometry", { + nullable: true, + spatialFeatureType: "Point", + }) + pointWithoutSRID: Point + + @Column("geometry", { + nullable: true, + spatialFeatureType: "Point", + srid: 4326, + }) + point: Point + + @Column("geography", { + nullable: true, + }) + geog: Geography +} diff --git a/test/functional/spatial/cockroachdb/spatial-cockroachdb.ts b/test/functional/spatial/cockroachdb/spatial-cockroachdb.ts new file mode 100644 index 0000000000..8ccae14fc7 --- /dev/null +++ b/test/functional/spatial/cockroachdb/spatial-cockroachdb.ts @@ -0,0 +1,249 @@ +import "reflect-metadata" +import { expect } from "chai" +import { DataSource, Point } from "../../../../src/index" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../../utils/test-utils" +import { Post } from "./entity/Post" + +describe("spatial-cockroachdb", () => { + let connections: DataSource[] + before(async () => { + connections = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + enabledDrivers: ["cockroachdb"], + }) + }) + beforeEach(async () => { + try { + await reloadTestingDatabases(connections) + } catch (err) { + console.warn(err.stack) + throw err + } + }) + after(async () => { + try { + await closeTestingConnections(connections) + } catch (err) { + console.warn(err.stack) + throw err + } + }) + + it("should create correct schema with geometry type", () => + Promise.all( + connections.map(async (connection) => { + const queryRunner = connection.createQueryRunner() + const schema = await queryRunner.getTable("post") + await queryRunner.release() + expect(schema).not.to.be.undefined + const pointColumn = schema!.columns.find( + (tableColumn) => + tableColumn.name === "point" && + tableColumn.type === "geometry", + ) + expect(pointColumn).to.not.be.undefined + expect(pointColumn!.spatialFeatureType!.toLowerCase()).to.equal( + "point", + ) + expect(pointColumn!.srid).to.equal(4326) + }), + )) + + it("should create correct schema with geography type", () => + Promise.all( + connections.map(async (connection) => { + const queryRunner = connection.createQueryRunner() + const schema = await queryRunner.getTable("post") + await queryRunner.release() + expect(schema).not.to.be.undefined + expect( + schema!.columns.find( + (tableColumn) => + tableColumn.name === "geog" && + tableColumn.type === "geography", + ), + ).to.not.be.undefined + }), + )) + + it("should create correct schema with geometry indices", () => + Promise.all( + connections.map(async (connection) => { + const queryRunner = connection.createQueryRunner() + const schema = await queryRunner.getTable("post") + await queryRunner.release() + expect(schema).not.to.be.undefined + expect( + schema!.indices.find( + (tableIndex) => + tableIndex.isSpatial === true && + tableIndex.columnNames.length === 1 && + tableIndex.columnNames[0] === "geom", + ), + ).to.not.be.undefined + }), + )) + + it("should persist geometry correctly", () => + Promise.all( + connections.map(async (connection) => { + const geom: Point = { + type: "Point", + coordinates: [0, 0], + } + const recordRepo = connection.getRepository(Post) + const post = new Post() + post.geom = geom + const persistedPost = await recordRepo.save(post) + const foundPost = await recordRepo.findOne({ + where: { + id: persistedPost.id, + }, + }) + expect(foundPost).to.exist + expect(foundPost!.geom).to.deep.equal(geom) + }), + )) + + it("should persist geography correctly", () => + Promise.all( + connections.map(async (connection) => { + const geom: Point = { + type: "Point", + coordinates: [0, 0], + } + const recordRepo = connection.getRepository(Post) + const post = new Post() + post.geog = geom + const persistedPost = await recordRepo.save(post) + const foundPost = await recordRepo.findOne({ + where: { + id: persistedPost.id, + }, + }) + expect(foundPost).to.exist + expect(foundPost!.geog).to.deep.equal(geom) + }), + )) + + it("should update geometry correctly", () => + Promise.all( + connections.map(async (connection) => { + const geom: Point = { + type: "Point", + coordinates: [0, 0], + } + const geom2: Point = { + type: "Point", + coordinates: [45, 45], + } + const recordRepo = connection.getRepository(Post) + const post = new Post() + post.geom = geom + const persistedPost = await recordRepo.save(post) + + await recordRepo.update( + { + id: persistedPost.id, + }, + { + geom: geom2, + }, + ) + + const foundPost = await recordRepo.findOne({ + where: { + id: persistedPost.id, + }, + }) + expect(foundPost).to.exist + expect(foundPost!.geom).to.deep.equal(geom2) + }), + )) + + it("should re-save geometry correctly", () => + Promise.all( + connections.map(async (connection) => { + const geom: Point = { + type: "Point", + coordinates: [0, 0], + } + const geom2: Point = { + type: "Point", + coordinates: [45, 45], + } + const recordRepo = connection.getRepository(Post) + const post = new Post() + post.geom = geom + const persistedPost = await recordRepo.save(post) + + persistedPost.geom = geom2 + await recordRepo.save(persistedPost) + + const foundPost = await recordRepo.findOne({ + where: { + id: persistedPost.id, + }, + }) + expect(foundPost).to.exist + expect(foundPost!.geom).to.deep.equal(geom2) + }), + )) + + it("should be able to order geometries by distance", () => + Promise.all( + connections.map(async (connection) => { + const geoJson1: Point = { + type: "Point", + coordinates: [139.9341032213472, 36.80798008559315], + } + + const geoJson2: Point = { + type: "Point", + coordinates: [139.933053, 36.805711], + } + + const origin: Point = { + type: "Point", + coordinates: [139.933227, 36.808005], + } + + const post1 = new Post() + post1.geom = geoJson1 + + const post2 = new Post() + post2.geom = geoJson2 + await connection.manager.save([post1, post2]) + + const posts1 = await connection.manager + .createQueryBuilder(Post, "post") + .where( + "ST_Distance(post.geom, ST_GeomFromGeoJSON(:origin)) > 0", + ) + .orderBy({ + "ST_Distance(post.geom, ST_GeomFromGeoJSON(:origin))": { + order: "ASC", + nulls: "NULLS FIRST", + }, + }) + .setParameters({ origin: JSON.stringify(origin) }) + .getMany() + + const posts2 = await connection.manager + .createQueryBuilder(Post, "post") + .orderBy( + "ST_Distance(post.geom, ST_GeomFromGeoJSON(:origin))", + "DESC", + ) + .setParameters({ origin: JSON.stringify(origin) }) + .getMany() + + expect(posts1[0].id).to.be.equal(post1.id) + expect(posts2[0].id).to.be.equal(post2.id) + }), + )) +}) diff --git a/test/functional/spatial/postgres/entity/Post.ts b/test/functional/spatial/postgres/entity/Post.ts index 4ebf14166d..f293809754 100644 --- a/test/functional/spatial/postgres/entity/Post.ts +++ b/test/functional/spatial/postgres/entity/Post.ts @@ -1,7 +1,12 @@ -import { PrimaryGeneratedColumn } from "../../../../../src/decorator/columns/PrimaryGeneratedColumn" -import { Entity } from "../../../../../src/decorator/entity/Entity" -import { Column } from "../../../../../src/decorator/columns/Column" -import { Index } from "../../../../../src/decorator/Index" +import { + Column, + Entity, + Geography, + Geometry, + Index, + Point, + PrimaryGeneratedColumn, +} from "../../../../../src" @Entity() export class Post { @@ -14,23 +19,23 @@ export class Post { @Index({ spatial: true, }) - geom: object + geom: Geometry @Column("geometry", { nullable: true, spatialFeatureType: "Point", }) - pointWithoutSRID: object + pointWithoutSRID: Point @Column("geometry", { nullable: true, spatialFeatureType: "Point", srid: 4326, }) - point: object + point: Point @Column("geography", { nullable: true, }) - geog: object + geog: Geography } diff --git a/test/functional/spatial/postgres/spatial-postgres.ts b/test/functional/spatial/postgres/spatial-postgres.ts index bdba20864f..b9d4b4e28a 100644 --- a/test/functional/spatial/postgres/spatial-postgres.ts +++ b/test/functional/spatial/postgres/spatial-postgres.ts @@ -1,6 +1,6 @@ import "reflect-metadata" import { expect } from "chai" -import { DataSource } from "../../../../src/data-source/DataSource" +import { DataSource, Point } from "../../../../src" import { closeTestingConnections, createTestingConnections, @@ -91,7 +91,7 @@ describe("spatial-postgres", () => { it("should persist geometry correctly", () => Promise.all( connections.map(async (connection) => { - const geom = { + const geom: Point = { type: "Point", coordinates: [0, 0], } @@ -112,7 +112,7 @@ describe("spatial-postgres", () => { it("should persist geography correctly", () => Promise.all( connections.map(async (connection) => { - const geom = { + const geom: Point = { type: "Point", coordinates: [0, 0], } @@ -133,11 +133,11 @@ describe("spatial-postgres", () => { it("should update geometry correctly", () => Promise.all( connections.map(async (connection) => { - const geom = { + const geom: Point = { type: "Point", coordinates: [0, 0], } - const geom2 = { + const geom2: Point = { type: "Point", coordinates: [45, 45], } @@ -168,11 +168,11 @@ describe("spatial-postgres", () => { it("should re-save geometry correctly", () => Promise.all( connections.map(async (connection) => { - const geom = { + const geom: Point = { type: "Point", coordinates: [0, 0], } - const geom2 = { + const geom2: Point = { type: "Point", coordinates: [45, 45], } @@ -197,17 +197,17 @@ describe("spatial-postgres", () => { it("should be able to order geometries by distance", () => Promise.all( connections.map(async (connection) => { - const geoJson1 = { + const geoJson1: Point = { type: "Point", coordinates: [139.9341032213472, 36.80798008559315], } - const geoJson2 = { + const geoJson2: Point = { type: "Point", coordinates: [139.933053, 36.805711], } - const origin = { + const origin: Point = { type: "Point", coordinates: [139.933227, 36.808005], } diff --git a/test/functional/sqlite/busy-timeout.ts b/test/functional/sqlite/busy-timeout.ts new file mode 100644 index 0000000000..a5a4ba6628 --- /dev/null +++ b/test/functional/sqlite/busy-timeout.ts @@ -0,0 +1,32 @@ +import "reflect-metadata" +import { expect } from "chai" +import { DataSource } from "../../../src/data-source/DataSource" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" + +describe("sqlite driver > busy-timeout", () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + entities: [], + enabledDrivers: ["sqlite"], + driverSpecific: { + busyTimeout: 2000, + }, + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("should set the busy_timeout as expected", () => + Promise.all( + connections.map(async (connection) => { + const result = await connection.query("PRAGMA busy_timeout") + expect(result).to.eql([{ timeout: 2000 }]) + }), + )) +}) diff --git a/test/functional/sqlite/file-open-flags.ts b/test/functional/sqlite/file-open-flags.ts new file mode 100644 index 0000000000..52c7432e4e --- /dev/null +++ b/test/functional/sqlite/file-open-flags.ts @@ -0,0 +1,40 @@ +import "reflect-metadata" +import { expect } from "chai" +import { DataSource } from "../../../src/data-source/DataSource" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +const sqlite3 = require("sqlite3") + +describe("sqlite driver > file open flags", () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + name: "file:./temp/sqlitedb-memory.db?mode=memory", + entities: [], + enabledDrivers: ["sqlite"], + driverSpecific: { + flags: + sqlite3.OPEN_URI | + sqlite3.OPEN_SHAREDCACHE | + sqlite3.OPEN_READWRITE | + sqlite3.OPEN_CREATE, + }, + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("should open a DB with flags as expected", () => + Promise.all( + connections.map(async (connection) => { + // if we come this far, test was successful as a connection was established + const result = await connection.query("PRAGMA journal_mode") + + expect(result).to.eql([{ journal_mode: "wal" }]) + }), + )) +}) diff --git a/test/functional/table-inheritance/single-table/no-type-column/no-type-column.ts b/test/functional/table-inheritance/single-table/no-type-column/no-type-column.ts index 49154f1524..d4e9ad0f12 100644 --- a/test/functional/table-inheritance/single-table/no-type-column/no-type-column.ts +++ b/test/functional/table-inheritance/single-table/no-type-column/no-type-column.ts @@ -55,7 +55,7 @@ describe("table-inheritance > single-table > no-type-column", () => { // ------------------------------------------------------------------------- const [postIt] = await postItRepo.find({ - relations: ["owner"], + relations: { owner: true }, }) postIt.owner.should.be.an.instanceOf(Employee) @@ -63,7 +63,7 @@ describe("table-inheritance > single-table > no-type-column", () => { postIt.owner.employeeName.should.be.equal("Alice Foo") const [sticky] = await stickyRepo.find({ - relations: ["owner"], + relations: { owner: true }, }) sticky.owner.should.be.an.instanceOf(Author) diff --git a/test/functional/util/StringUtils.ts b/test/functional/util/StringUtils.ts index 186ca4a1da..5c145372c9 100644 --- a/test/functional/util/StringUtils.ts +++ b/test/functional/util/StringUtils.ts @@ -1,5 +1,5 @@ import { expect } from "chai" -import { snakeCase } from "../../../src/util/StringUtils" +import { camelCase, snakeCase } from "../../../src/util/StringUtils" describe("StringUtils", () => { describe("snakeCase", () => { @@ -77,4 +77,46 @@ describe("StringUtils", () => { } }) }) + + describe("camelCase", () => { + it("should convert snakecase to camelcase", () => { + const input = "camel_case_string_here" + const expected = "camelCaseStringHere" + const actual = camelCase(input) + + expect(actual).to.be.equal(expected, `Failed for Input: ${input}`) + }) + + it("should convert with first capital letter", () => { + const input = "camel_case_string_here" + const expected = "CamelCaseStringHere" + const actual = camelCase(input, true) + + expect(actual).to.be.equal(expected, `Failed for Input: ${input}`) + }) + + it("should correctly convert repeating snakecase groups", () => { + const input = "option_a_or_b_or_c" + const expected = "optionAOrBOrC" + const actual = camelCase(input) + + expect(actual).to.be.equal(expected, `Failed for Input: ${input}`) + }) + + it("should do nothing with strings that are already camelcase", () => { + const expected1 = "camelCaseStringHere" + expect(camelCase(expected1)).to.be.equal(expected1, expected1) + + const expected2 = "CamelCaseStringHere" + expect(camelCase(expected2, true)).to.be.equal(expected2, expected2) + }) + + it("should correctly convert strings with numbers", () => { + const input = "device1_status" + const expected = "device1Status" + const actual = camelCase(input) + + expect(actual).to.be.equal(expected, `Failed for Input: ${input}`) + }) + }) }) diff --git a/test/github-issues/10040/entity/person.ts b/test/github-issues/10040/entity/person.ts new file mode 100644 index 0000000000..df5c0c0d68 --- /dev/null +++ b/test/github-issues/10040/entity/person.ts @@ -0,0 +1,19 @@ +import { + Column, + Entity, + OneToMany, + PrimaryGeneratedColumn, +} from "../../../../src" +import { Todo } from "./todo" + +@Entity({ name: "person" }) +export class Person { + @PrimaryGeneratedColumn("uuid") + id: string + + @Column("varchar") + name: string + + @OneToMany(() => Todo, (o) => o.owner) + todos: Todo[] +} diff --git a/test/github-issues/10040/entity/todo.ts b/test/github-issues/10040/entity/todo.ts new file mode 100644 index 0000000000..be3dde36cf --- /dev/null +++ b/test/github-issues/10040/entity/todo.ts @@ -0,0 +1,19 @@ +import { + Column, + Entity, + ManyToOne, + PrimaryGeneratedColumn, +} from "../../../../src" +import { Person } from "./person" + +@Entity({ name: "todo" }) +export class Todo { + @PrimaryGeneratedColumn("uuid") + id: string + + @Column("varchar") + description: string + + @ManyToOne(() => Person, (o) => o.todos) + owner: Person +} diff --git a/test/github-issues/10040/issue-10040.ts b/test/github-issues/10040/issue-10040.ts new file mode 100644 index 0000000000..9561983d5d --- /dev/null +++ b/test/github-issues/10040/issue-10040.ts @@ -0,0 +1,33 @@ +import { expect } from "chai" +import { DataSource } from "../../../src" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { Person } from "./entity/person" +import { Todo } from "./entity/todo" + +describe("github issues > #10040 TypeORM synchronize database even if it is up to date", () => { + let dataSources: DataSource[] + + before(async () => { + dataSources = await createTestingConnections({ + entities: [Person, Todo], + enabledDrivers: ["mysql"], + }) + }) + + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("should return an empty array for the upQueries after sync", async () => { + await Promise.all( + dataSources.map(async (dataSource) => { + await dataSource.synchronize() + const logs = await dataSource.driver.createSchemaBuilder().log() + expect(logs.upQueries.length).to.be.eql(0) + }), + ) + }) +}) diff --git a/test/github-issues/1178/issue-1178.ts b/test/github-issues/1178/issue-1178.ts index 181bccfb5d..3f74ec6d91 100644 --- a/test/github-issues/1178/issue-1178.ts +++ b/test/github-issues/1178/issue-1178.ts @@ -45,7 +45,7 @@ describe("github issues > #1178 subqueries must work in insert statements", () = where: { id: 1, }, - relations: ["user"], + relations: { user: true }, }) .should.eventually.eql({ id: 1, diff --git a/test/github-issues/1200/entity/Category.ts b/test/github-issues/1200/entity/Category.ts new file mode 100644 index 0000000000..01ac84a3f7 --- /dev/null +++ b/test/github-issues/1200/entity/Category.ts @@ -0,0 +1,6 @@ +import { Column } from "../../../../src/decorator/columns/Column" + +export class Category { + @Column() + name: number +} diff --git a/test/github-issues/1200/entity/Group.ts b/test/github-issues/1200/entity/Group.ts new file mode 100644 index 0000000000..e2dd03c532 --- /dev/null +++ b/test/github-issues/1200/entity/Group.ts @@ -0,0 +1,14 @@ +import { Column } from "../../../../src/decorator/columns/Column" +import { Post } from "./Post" + +export class Group { + constructor() { + this.post = new Post() + } + + @Column((type) => Post) + post: Post + + @Column() + groupNumber: number +} diff --git a/test/github-issues/1200/entity/Post.ts b/test/github-issues/1200/entity/Post.ts new file mode 100644 index 0000000000..5d9980bace --- /dev/null +++ b/test/github-issues/1200/entity/Post.ts @@ -0,0 +1,14 @@ +import { Column } from "../../../../src/decorator/columns/Column" +import { Category } from "./Category" + +export class Post { + constructor() { + this.category = new Category() + } + + @Column((type) => Category) + category: Category + + @Column() + postNumber: number +} diff --git a/test/github-issues/1200/entity/User.ts b/test/github-issues/1200/entity/User.ts new file mode 100644 index 0000000000..d50c722b9c --- /dev/null +++ b/test/github-issues/1200/entity/User.ts @@ -0,0 +1,25 @@ +import { Entity } from "../../../../src/decorator/entity/Entity" +import { Column } from "../../../../src/decorator/columns/Column" +import { PrimaryGeneratedColumn } from "../../../../src/decorator/columns/PrimaryGeneratedColumn" +import { Group } from "./Group" +import { Post } from "./Post" + +@Entity() +export class User { + constructor() { + this.group = new Group() + this.post = new Post() + } + + @PrimaryGeneratedColumn() + id: number + + @Column((type) => Group) + group: Group + + @Column((type) => Post) + post: Post + + @Column() + userProperty: number +} diff --git a/test/github-issues/1200/issue-1200.ts b/test/github-issues/1200/issue-1200.ts new file mode 100644 index 0000000000..1ae77144c6 --- /dev/null +++ b/test/github-issues/1200/issue-1200.ts @@ -0,0 +1,115 @@ +import "reflect-metadata" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { User } from "./entity/User" +import { expect } from "chai" +import { DataSource } from "../../../src/data-source" + +describe("github issues > #1200 Update multiple nested embeddeds", () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("should update all embedded entities including the nested ones", () => + Promise.all( + connections.map(async (connection) => { + // create and save a new user + const user: User = new User() + user.userProperty = 1 + user.group.groupNumber = 2 + user.group.post.postNumber = 3 + user.group.post.category.name = 4 + user.post.postNumber = 5 + user.post.category.name = 6 + await connection.manager.save(user) + + // load and check if saved object is correct + const user1: User | null = await connection.manager.findOneBy( + User, + { id: 1 }, + ) + expect(user1).not.to.be.empty + user1!.should.be.eql({ + id: 1, + userProperty: 1, + group: { + groupNumber: 2, + post: { + postNumber: 3, + category: { + name: 4, + }, + }, + }, + post: { + postNumber: 5, + category: { + name: 6, + }, + }, + } as User) + + // update object's properties + await connection + .createQueryBuilder() + .update(User) + .set({ + userProperty: 11, + group: { + groupNumber: 12, + post: { + postNumber: 13, + category: { + name: 14, + }, + }, + }, + post: { + postNumber: 15, + category: { + name: 16, + }, + }, + }) + .where({ + id: 1, + }) + .execute() + + // load and check again + const user2: User | null = await connection.manager.findOneBy( + User, + { id: 1 }, + ) + expect(user2).not.to.be.empty + user2!.should.be.eql({ + id: 1, + userProperty: 11, + group: { + groupNumber: 12, + post: { + postNumber: 13, + category: { + name: 14, + }, + }, + }, + post: { + postNumber: 15, + category: { + name: 16, + }, + }, + }) + }), + )) +}) diff --git a/test/github-issues/1210/entity/Event.ts b/test/github-issues/1210/entity/Event.ts index 881005551a..77fb9e07b6 100644 --- a/test/github-issues/1210/entity/Event.ts +++ b/test/github-issues/1210/entity/Event.ts @@ -1,4 +1,4 @@ -import { ObjectID } from "../../../../src/driver/mongodb/typings" +import { ObjectId } from "../../../../src/driver/mongodb/typings" import { Entity } from "../../../../src/decorator/entity/Entity" import { ObjectIdColumn } from "../../../../src/decorator/columns/ObjectIdColumn" import { Column } from "../../../../src/decorator/columns/Column" @@ -6,7 +6,7 @@ import { Column } from "../../../../src/decorator/columns/Column" @Entity() export class Event { @ObjectIdColumn() - id: ObjectID + id: ObjectId @Column() name: string diff --git a/test/github-issues/1210/entity/User.ts b/test/github-issues/1210/entity/User.ts index 723fa5cb54..16b763f0fd 100644 --- a/test/github-issues/1210/entity/User.ts +++ b/test/github-issues/1210/entity/User.ts @@ -1,13 +1,13 @@ import { Entity } from "../../../../src/decorator/entity/Entity" import { ObjectIdColumn } from "../../../../src/decorator/columns/ObjectIdColumn" import { Column } from "../../../../src/decorator/columns/Column" -import { ObjectID } from "../../../../src/driver/mongodb/typings" +import { ObjectId } from "../../../../src/driver/mongodb/typings" import { Event } from "./Event" @Entity() export class User { @ObjectIdColumn() - id: ObjectID + id: ObjectId @Column() firstName: string diff --git a/test/github-issues/1416/issue-1416.ts b/test/github-issues/1416/issue-1416.ts index ef9500e7e8..cb6bba1170 100644 --- a/test/github-issues/1416/issue-1416.ts +++ b/test/github-issues/1416/issue-1416.ts @@ -50,7 +50,7 @@ describe("github issue > #1416 Wrong behavior when fetching an entity that has a where: { name: photoAuthor.name, }, - relations: ["photos"], + relations: { photos: true }, })) as Author expect(author).not.to.be.null expect(author.photos[0]).not.to.be.undefined diff --git a/test/github-issues/1504/issue-1504.ts b/test/github-issues/1504/issue-1504.ts index b549529e8d..e27d94ef20 100644 --- a/test/github-issues/1504/issue-1504.ts +++ b/test/github-issues/1504/issue-1504.ts @@ -26,11 +26,13 @@ describe("github issues > #1504 Cannot eagerly query Entity with relation more t where: { id: 1, }, - relations: [ - "Entity2", - "Entity2.Entity3", - "Entity2.Entity3.Entity4", - ], + relations: { + Entity2: { + Entity3: { + Entity4: true, + }, + }, + }, }) }), )) diff --git a/test/github-issues/1510/issue-1510.ts b/test/github-issues/1510/issue-1510.ts index 71b73cb9aa..203d2f8f77 100644 --- a/test/github-issues/1510/issue-1510.ts +++ b/test/github-issues/1510/issue-1510.ts @@ -28,11 +28,11 @@ describe("github issues > #1510 entity schema does not support mode=objectId", ( }, }) - const UserWithoutObjectIDEntity = new EntitySchema<{ + const UserWithoutObjectIdEntity = new EntitySchema<{ _id: number name: string }>({ - name: "UserWithoutObjectID", + name: "UserWithoutObjectId", tableName: "test_1510_users2", columns: { _id: { @@ -52,7 +52,7 @@ describe("github issues > #1510 entity schema does not support mode=objectId", ( entities: [ __dirname + "/entity/*{.js,.ts}", UserEntity, - UserWithoutObjectIDEntity, + UserWithoutObjectIdEntity, ], enabledDrivers: ["mongodb"], })) @@ -63,7 +63,7 @@ describe("github issues > #1510 entity schema does not support mode=objectId", ( it("throws an error because there is no object id defined", () => Promise.all( connections.map(async (connection) => { - const repo = connection.getRepository(UserWithoutObjectIDEntity) + const repo = connection.getRepository(UserWithoutObjectIdEntity) try { await repo.insert({ diff --git a/test/github-issues/1584/entity/User.ts b/test/github-issues/1584/entity/User.ts index d957d29699..f0bafe381f 100644 --- a/test/github-issues/1584/entity/User.ts +++ b/test/github-issues/1584/entity/User.ts @@ -1,12 +1,12 @@ import { Entity } from "../../../../src/decorator/entity/Entity" import { ObjectIdColumn } from "../../../../src/decorator/columns/ObjectIdColumn" import { Column } from "../../../../src/decorator/columns/Column" -import { ObjectID } from "../../../../src/driver/mongodb/typings" +import { ObjectId } from "../../../../src/driver/mongodb/typings" @Entity() export class User { @ObjectIdColumn() - id: ObjectID + id: ObjectId @Column() name: string diff --git a/test/github-issues/1720/issue-1720.ts b/test/github-issues/1720/issue-1720.ts index f876bb89e7..3a5f84a346 100755 --- a/test/github-issues/1720/issue-1720.ts +++ b/test/github-issues/1720/issue-1720.ts @@ -37,7 +37,7 @@ describe("github issues > #1720 Listener not invoked when relation loaded throug await connection.manager.save(post1) const [loadedPost] = await connection.manager.find(Post, { - relations: ["categories"], + relations: { categories: true }, }) loadedPost!.categories[0].loaded.should.be.equal(true) loadedPost!.categories[1].loaded.should.be.equal(true) diff --git a/test/github-issues/1788/issue-1788.ts b/test/github-issues/1788/issue-1788.ts index 2e53ee0c84..3e430ffeaa 100644 --- a/test/github-issues/1788/issue-1788.ts +++ b/test/github-issues/1788/issue-1788.ts @@ -41,7 +41,7 @@ describe("github issues > #1788 One to One does not load relationships.", () => await providerRepository.save(provider) const dbProvider = await providerRepository.find({ - relations: ["personalization"], + relations: { personalization: true }, }) expect(dbProvider[0].personalization).to.not.eql(undefined) diff --git a/test/github-issues/1929/entity/Product.ts b/test/github-issues/1929/entity/Product.ts index 14ddae590d..6df4f70d7c 100644 --- a/test/github-issues/1929/entity/Product.ts +++ b/test/github-issues/1929/entity/Product.ts @@ -1,4 +1,4 @@ -import { Column, Entity, ObjectID, ObjectIdColumn } from "../../../../src" +import { Column, Entity, ObjectId, ObjectIdColumn } from "../../../../src" @Entity() export class Product { @@ -9,7 +9,7 @@ export class Product { } @ObjectIdColumn() - id: ObjectID + id: ObjectId @Column() name: string diff --git a/test/github-issues/1929/issue-1929.ts b/test/github-issues/1929/issue-1929.ts index 7123a839e8..4748096bee 100644 --- a/test/github-issues/1929/issue-1929.ts +++ b/test/github-issues/1929/issue-1929.ts @@ -30,7 +30,7 @@ describe("github issues > #1929 Select attributes in Find method - mongodb", () product = new Product("test3", "label3", 30) await productRepository.save(product) await productRepository.find({ - select: ["name", "label"], + select: { name: true, label: true }, order: { name: 1 }, }) }), @@ -47,7 +47,7 @@ describe("github issues > #1929 Select attributes in Find method - mongodb", () product = new Product("test3", "label3", 30) await productRepository.save(product) await productRepository.findAndCount({ - select: ["name", "label"], + select: { name: true, label: true }, order: { name: 1 }, }) }), @@ -65,7 +65,7 @@ describe("github issues > #1929 Select attributes in Find method - mongodb", () const product3 = await productRepository.save(product) await productRepository.find({ where: { _id: product3.id }, - select: ["name", "label"], + select: { name: true, label: true }, order: { name: 1 }, }) }), @@ -82,7 +82,7 @@ describe("github issues > #1929 Select attributes in Find method - mongodb", () product = new Product("test3", "label3", 30) await productRepository.findOne({ where: { name: "test2" }, - select: ["name", "label"], + select: { name: true, label: true }, order: { name: 1 }, }) }), diff --git a/test/github-issues/2044/issue-2044.ts b/test/github-issues/2044/issue-2044.ts index 11f5fca491..b72ac4666b 100644 --- a/test/github-issues/2044/issue-2044.ts +++ b/test/github-issues/2044/issue-2044.ts @@ -37,7 +37,7 @@ describe("github issues > #2044 Should not double get embedded column value", () await connection.manager.save(photo) const photos = await connection.manager.find(Photo, { - relations: ["user"], + relations: { user: true }, }) const resultPhoto = photos[0] diff --git a/test/github-issues/2331/entity/Post.ts b/test/github-issues/2331/entity/Post.ts new file mode 100644 index 0000000000..88c3585990 --- /dev/null +++ b/test/github-issues/2331/entity/Post.ts @@ -0,0 +1,13 @@ +import { BaseEntity, Entity, Column, PrimaryColumn } from "../../../../src" + +@Entity() +export class Post extends BaseEntity { + @PrimaryColumn() + id: number + + @Column({ type: "varchar" }) + title: string + + @Column({ type: "varchar", nullable: true }) + author: string | null +} diff --git a/test/github-issues/2331/issue-2331.ts b/test/github-issues/2331/issue-2331.ts new file mode 100644 index 0000000000..98a6804563 --- /dev/null +++ b/test/github-issues/2331/issue-2331.ts @@ -0,0 +1,59 @@ +import "reflect-metadata" +import { expect } from "chai" +import { DataSource, Repository } from "../../../src" +import { Post } from "./entity/Post" +import { + reloadTestingDatabases, + closeTestingConnections, + setupSingleTestingConnection, +} from "../../utils/test-utils" + +describe("github issues > #2331 undefined value is nulling column on update", () => { + let dataSource: DataSource + let repository: Repository + + before(async () => { + const options = setupSingleTestingConnection("postgres", { + entities: [__dirname + "/entity/*{.js,.ts}"], + schemaCreate: true, + dropSchema: true, + }) + + if (!options) return + + dataSource = new DataSource(options) + await dataSource.initialize() + }) + beforeEach(async () => { + if (!dataSource) return + await reloadTestingDatabases([dataSource]) + repository = dataSource.getRepository(Post) + }) + after(() => closeTestingConnections([dataSource])) + + it("should not overwrite column with null when passing undefined", async () => { + if (!dataSource) return + + const post = new Post() + post.id = 1 + post.title = "Some post" + post.author = "Some author" + + await repository.save(post) + await repository.update( + { + id: post.id, + }, + { + title: "Updated post", + author: undefined, + }, + ) + const postReloaded = await repository.findOne({ + where: { id: post.id }, + }) + + expect(postReloaded).to.exist + expect(postReloaded!.author).to.be.equal("Some author") + }) +}) diff --git a/test/github-issues/2632/issue-2632.ts b/test/github-issues/2632/issue-2632.ts index d097b20174..686bf14288 100644 --- a/test/github-issues/2632/issue-2632.ts +++ b/test/github-issues/2632/issue-2632.ts @@ -49,7 +49,7 @@ describe("github issues > #2632 createQueryBuilder relation remove works only if let loadedPost1 = await connection.manager.findOne(Post, { where: { id: 1 }, - relations: ["categories"], + relations: { categories: true }, }) expect(loadedPost1!.categories).to.deep.include({ id: 1, @@ -64,7 +64,7 @@ describe("github issues > #2632 createQueryBuilder relation remove works only if loadedPost1 = await connection.manager.findOne(Post, { where: { id: 1 }, - relations: ["categories"], + relations: { categories: true }, }) expect(loadedPost1!.categories).to.be.eql([]) @@ -76,7 +76,7 @@ describe("github issues > #2632 createQueryBuilder relation remove works only if let loadedPost2 = await connection.manager.findOne(Post, { where: { id: 2 }, - relations: ["categories"], + relations: { categories: true }, }) expect(loadedPost2!.categories).to.deep.include({ id: 2, @@ -91,7 +91,7 @@ describe("github issues > #2632 createQueryBuilder relation remove works only if loadedPost1 = await connection.manager.findOne(Post, { where: { id: 2 }, - relations: ["categories"], + relations: { categories: true }, }) expect(loadedPost1!.categories).to.be.eql([]) }), diff --git a/test/github-issues/2927/issue-2927.ts b/test/github-issues/2927/issue-2927.ts index 2a08b7340f..86036f24f8 100644 --- a/test/github-issues/2927/issue-2927.ts +++ b/test/github-issues/2927/issue-2927.ts @@ -41,7 +41,7 @@ describe("github issues > #2927 When using base class' custom repository, the di // Retrieve it back from the DB. const contents = await repository.find() expect(contents.length).to.equal(1) - expect(contents[0] instanceof Photo).to.equal(true) + expect(contents[0]).to.be.an.instanceOf(Photo) const fetchedPhoto = contents[0] as Photo expect(fetchedPhoto).to.eql(photo) }), @@ -64,7 +64,7 @@ describe("github issues > #2927 When using base class' custom repository, the di // Retrieve it back from the DB. const contents = await repository.find() expect(contents.length).to.equal(1) - expect(contents[0] instanceof SpecialPhoto).to.equal(true) + expect(contents[0]).to.be.an.instanceOf(SpecialPhoto) const fetchedSpecialPhoto = contents[0] as SpecialPhoto expect(fetchedSpecialPhoto).to.eql(specialPhoto) }), diff --git a/test/github-issues/2965/index.ts b/test/github-issues/2965/index.ts index e2e7aea3ab..8fd94ef444 100644 --- a/test/github-issues/2965/index.ts +++ b/test/github-issues/2965/index.ts @@ -36,7 +36,9 @@ describe("github issues > #2965 Reuse preloaded lazy relations", () => { await repoNote.insert({ label: "note1", owner: personA }) await repoNote.insert({ label: "note2", owner: personB }) - const res1 = await repoPerson.find({ relations: ["notes"] }) + const res1 = await repoPerson.find({ + relations: { notes: true }, + }) const originalLoad: (...args: any[]) => Promise = connection.relationLoader.load diff --git a/test/github-issues/3113/entities/User.ts b/test/github-issues/3113/entities/User.ts new file mode 100644 index 0000000000..0a36572ea8 --- /dev/null +++ b/test/github-issues/3113/entities/User.ts @@ -0,0 +1,13 @@ +import { Column, Entity, PrimaryGeneratedColumn } from "../../../../src" + +@Entity() +export class User { + @PrimaryGeneratedColumn() + id: number + + @Column() + name: string + + @Column({ type: "int", nullable: true }) + money: number | null +} diff --git a/test/github-issues/3113/issue-3113.ts b/test/github-issues/3113/issue-3113.ts new file mode 100644 index 0000000000..00f52845bd --- /dev/null +++ b/test/github-issues/3113/issue-3113.ts @@ -0,0 +1,63 @@ +import { And, DataSource, IsNull, LessThan, MoreThan, Not } from "../../../src" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { User } from "./entities/User" +import { expect } from "chai" + +describe("github issues > #9316 specify how should interpret null and undefined values in conditions ", () => { + let dataSources: DataSource[] + + before(async () => { + dataSources = await createTestingConnections({ + entities: [User], + enabledDrivers: ["postgres", "mysql"], + schemaCreate: true, + dropSchema: true, + }) + }) + + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("should find users what money is not null and money is more than 10 and money is less than 100", async () => { + await Promise.all( + dataSources.map(async (dataSource) => { + const foo = new User() + foo.name = "Foo" + foo.money = null + + const john = new User() + john.name = "John" + john.money = 11 + + const jane = new User() + jane.name = "Jane" + jane.money = 90 + + const bar = new User() + bar.name = "Bar" + bar.money = 101 + + await dataSource.manager.save([foo, john, jane, bar]) + + const users = await dataSource.manager.find(User, { + where: { + money: And(Not(IsNull()), MoreThan(10), LessThan(100)), + }, + }) + + // assert users + expect(users).to.have.length(2) + + expect(users.find((user) => user.name === "John")).to.be.not + .undefined + + expect(users.find((user) => user.name === "Jane")).to.be.not + .undefined + }), + ) + }) +}) diff --git a/test/github-issues/3118/issue-3118.ts b/test/github-issues/3118/issue-3118.ts index 1c7ff8fef7..9c9143245d 100644 --- a/test/github-issues/3118/issue-3118.ts +++ b/test/github-issues/3118/issue-3118.ts @@ -79,11 +79,15 @@ describe("github issues > #3118 shorten alias names (for RDBMS with a limit) whe const [loadedCategory] = await connection.manager.find( CategoryWithVeryLongName, { - relations: [ - "postsWithVeryLongName", + relations: { + postsWithVeryLongName: { + authorWithVeryLongName: { + groupWithVeryLongName: true, + }, + }, // before: used to generate a SELECT "AS" alias like `CategoryWithVeryLongName__postsWithVeryLongName__authorWithVeryLongName_firstName` // now: `CaWiVeLoNa__poWiVeLoNa__auWiVeLoNa_firstName`, which is acceptable by Postgres (limit to 63 characters) - "postsWithVeryLongName.authorWithVeryLongName", + // "postsWithVeryLongName.authorWithVeryLongName", // before: // used to generate a JOIN "AS" alias like : // `CategoryWithVeryLongName__postsWithVeryLongName__authorWithVeryLongName_firstName` @@ -95,8 +99,8 @@ describe("github issues > #3118 shorten alias names (for RDBMS with a limit) whe // now: // `CaWiVeLoNa__poWiVeLoNa__auWiVeLoNa_firstName` // `CaWiVeLoNa__poWiVeLoNa__auWiVeLoNa__grWiVeLoNa_name` - "postsWithVeryLongName.authorWithVeryLongName.groupWithVeryLongName", - ], + // "postsWithVeryLongName.authorWithVeryLongName.groupWithVeryLongName", + }, }, ) expect(loadedCategory).not.to.be.null @@ -119,11 +123,13 @@ describe("github issues > #3118 shorten alias names (for RDBMS with a limit) whe const loadedCategories = await connection.manager.find( CategoryWithVeryLongName, { - relations: [ - "postsWithVeryLongName", - "postsWithVeryLongName.authorWithVeryLongName", - "postsWithVeryLongName.authorWithVeryLongName.groupWithVeryLongName", - ], + relations: { + postsWithVeryLongName: { + authorWithVeryLongName: { + groupWithVeryLongName: true, + }, + }, + }, }, ) expect(loadedCategories).to.be.an("array").that.is.not.empty diff --git a/test/github-issues/3120/issue-3120.ts b/test/github-issues/3120/issue-3120.ts index 2e8ad0ee80..4d0532f6e0 100644 --- a/test/github-issues/3120/issue-3120.ts +++ b/test/github-issues/3120/issue-3120.ts @@ -123,7 +123,11 @@ describe('github issues > #3120 Add relation option "createForeignKeyConstraints ActionLog, { where: { action: "Test Log #1" }, - relations: ["person", "actionDetails", "addresses"], + relations: { + person: true, + actionDetails: true, + addresses: true, + }, }, ) diff --git a/test/github-issues/3443/entity/category.ts b/test/github-issues/3443/entity/category.ts new file mode 100644 index 0000000000..dcd85aabc9 --- /dev/null +++ b/test/github-issues/3443/entity/category.ts @@ -0,0 +1,11 @@ +import { Entity, ManyToMany, PrimaryGeneratedColumn } from "../../../../src" +import { Product } from "./product" + +@Entity({ name: "category" }) +export class Category { + @PrimaryGeneratedColumn() + id: string + + @ManyToMany(() => Product, (product) => product.categories) + products: Product[] +} diff --git a/test/github-issues/3443/entity/product.ts b/test/github-issues/3443/entity/product.ts new file mode 100644 index 0000000000..712cfc8448 --- /dev/null +++ b/test/github-issues/3443/entity/product.ts @@ -0,0 +1,17 @@ +import { + Entity, + JoinTable, + ManyToMany, + PrimaryGeneratedColumn, +} from "../../../../src" +import { Category } from "./category" + +@Entity({ name: "product" }) +export class Product { + @PrimaryGeneratedColumn() + id: string + + @ManyToMany(() => Category, (category) => category.products) + @JoinTable({ name: "product_category", synchronize: false }) + categories: Category[] +} diff --git a/test/github-issues/3443/issue-3443.ts b/test/github-issues/3443/issue-3443.ts new file mode 100644 index 0000000000..e2380ed78d --- /dev/null +++ b/test/github-issues/3443/issue-3443.ts @@ -0,0 +1,47 @@ +import "reflect-metadata" +import { + createTestingConnections, + closeTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/DataSource" +import { expect } from "chai" + +describe("github issues > #3443 @JoinTable on entities without synchronization", () => { + let dataSources: DataSource[] + before( + async () => + (dataSources = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + schemaCreate: true, + dropSchema: true, + })), + ) + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("Should set synchronize: false for @JoinTable when passed to options", () => + Promise.all( + dataSources.map(async (dataSource) => { + const PRODUCT_TABLE_NAME = "product" + const CATEGORY_TABLE_NAME = "category" + const PRODUCT_CATEGORY_TABLE_NAME = "product_category" + + expect(() => + dataSource.getMetadata(PRODUCT_TABLE_NAME), + ).not.to.throw() + expect(() => + dataSource.getMetadata(CATEGORY_TABLE_NAME), + ).not.to.throw() + expect(() => + dataSource.getMetadata(PRODUCT_CATEGORY_TABLE_NAME), + ).not.to.throw() + expect( + dataSource.getMetadata(PRODUCT_CATEGORY_TABLE_NAME) + .synchronize, + ).to.equal(false) + }), + )) + + // you can add additional tests if needed +}) diff --git a/test/github-issues/3551/entity/Book.ts b/test/github-issues/3551/entity/Book.ts index c720e07975..0336059bfd 100644 --- a/test/github-issues/3551/entity/Book.ts +++ b/test/github-issues/3551/entity/Book.ts @@ -1,4 +1,4 @@ -import { Entity, ObjectIdColumn, Column, ObjectID } from "../../../../src" +import { Entity, ObjectIdColumn, Column, ObjectId } from "../../../../src" export class Page { @Column() @@ -16,7 +16,7 @@ export class Chapter { @Entity() export class Book { @ObjectIdColumn() - id: ObjectID + id: ObjectId @Column() title: string diff --git a/test/github-issues/4190/issue-4190.ts b/test/github-issues/4190/issue-4190.ts index fe6355db5b..a9e3b72988 100644 --- a/test/github-issues/4190/issue-4190.ts +++ b/test/github-issues/4190/issue-4190.ts @@ -39,7 +39,7 @@ describe("github issues > #4190 Relation decorators: allow to pass string instea await connection.manager.save(user) const users = await connection.manager.find(User, { - relations: ["profile"], + relations: { profile: true }, }) users.should.eql([ @@ -73,10 +73,10 @@ describe("github issues > #4190 Relation decorators: allow to pass string instea await connection.manager.save(user) const users = await connection.manager.find(User, { - relations: ["photos"], + relations: { photos: true }, }) const photos = await connection.manager.find(Photo, { - relations: ["user"], + relations: { user: true }, }) // Check one-to-many @@ -130,7 +130,7 @@ describe("github issues > #4190 Relation decorators: allow to pass string instea await connection.manager.save(question) const questions = await connection.manager.find(Question, { - relations: ["categories"], + relations: { categories: true }, }) questions[0].categories.should.have.deep.members([ diff --git a/test/github-issues/4697/entity/config.entity.ts b/test/github-issues/4697/entity/config.entity.ts index 80d573f985..298d098142 100644 --- a/test/github-issues/4697/entity/config.entity.ts +++ b/test/github-issues/4697/entity/config.entity.ts @@ -1,4 +1,4 @@ -import { Entity, ObjectIdColumn, ObjectID, Column } from "../../../../src" +import { Entity, ObjectIdColumn, ObjectId, Column } from "../../../../src" /** * @deprecated use item config instead @@ -6,7 +6,7 @@ import { Entity, ObjectIdColumn, ObjectID, Column } from "../../../../src" @Entity() export class Config { @ObjectIdColumn() - _id: ObjectID + _id: ObjectId @Column() itemId: string diff --git a/test/github-issues/4697/entity/item.entity.ts b/test/github-issues/4697/entity/item.entity.ts index 2aefb768e3..b7329430ce 100644 --- a/test/github-issues/4697/entity/item.entity.ts +++ b/test/github-issues/4697/entity/item.entity.ts @@ -1,9 +1,9 @@ -import { Entity, ObjectIdColumn, ObjectID, Column } from "../../../../src" +import { Entity, ObjectIdColumn, ObjectId, Column } from "../../../../src" @Entity() export class Item { @ObjectIdColumn() - public _id: ObjectID + public _id: ObjectId /** * @deprecated use contacts instead diff --git a/test/github-issues/4764/issue-4764.ts b/test/github-issues/4764/issue-4764.ts index e2fde27ef6..a46d935fa3 100644 --- a/test/github-issues/4764/issue-4764.ts +++ b/test/github-issues/4764/issue-4764.ts @@ -33,7 +33,7 @@ describe("mssql > add lock clause for MSSQL select with join clause", () => { // ------------------------------------------------------------------------- // Specifications // ------------------------------------------------------------------------- - it("should not have Lock clause", async () => { + it("should not have Lock clause", () => Promise.all( connections.map(async (connection) => { const lock = " WITH (NOLOCK)" @@ -49,10 +49,9 @@ describe("mssql > add lock clause for MSSQL select with join clause", () => { await connection.query(selectQuery) }), - ) - }) + )) - it("should have WITH (NOLOCK) clause", async () => { + it("should have WITH (NOLOCK) clause", () => Promise.all( connections.map(async (connection) => { const lock = " WITH (NOLOCK)" @@ -69,10 +68,9 @@ describe("mssql > add lock clause for MSSQL select with join clause", () => { await connection.query(selectQuery) }), - ) - }) + )) - it("should have two WITH (NOLOCK) clause", async () => { + it("should have two WITH (NOLOCK) clause", () => Promise.all( connections.map(async (connection) => { const lock = " WITH (NOLOCK)" @@ -90,10 +88,9 @@ describe("mssql > add lock clause for MSSQL select with join clause", () => { await connection.query(selectQuery) }), - ) - }) + )) - it("should have three WITH (NOLOCK) clause", async () => { + it("should have three WITH (NOLOCK) clause", () => Promise.all( connections.map(async (connection) => { const lock = " WITH (NOLOCK)" @@ -112,10 +109,9 @@ describe("mssql > add lock clause for MSSQL select with join clause", () => { await connection.query(selectQuery) }), - ) - }) + )) - it("should have three WITH (NOLOCK) clause (without relation)", async () => { + it("should have three WITH (NOLOCK) clause (without relation)", () => Promise.all( connections.map(async (connection) => { const lock = " WITH (NOLOCK)" @@ -138,10 +134,9 @@ describe("mssql > add lock clause for MSSQL select with join clause", () => { await connection.query(selectQuery) }), - ) - }) + )) - it("should have WITH (HOLDLOCK, ROWLOCK) clause", async () => { + it("should have WITH (HOLDLOCK, ROWLOCK) clause", () => Promise.all( connections.map(async (connection) => { const lock = " WITH (HOLDLOCK, ROWLOCK)" @@ -158,10 +153,9 @@ describe("mssql > add lock clause for MSSQL select with join clause", () => { await connection.query(selectQuery) }), - ) - }) + )) - it("should have WITH (UPLOCK, ROWLOCK) clause", async () => { + it("should have WITH (UPLOCK, ROWLOCK) clause", () => Promise.all( connections.map(async (connection) => { const lock = " WITH (UPDLOCK, ROWLOCK)" @@ -178,10 +172,9 @@ describe("mssql > add lock clause for MSSQL select with join clause", () => { await connection.query(selectQuery) }), - ) - }) + )) - it("should have two WITH (UPDLOCK, ROWLOCK) clause", async () => { + it("should have two WITH (UPDLOCK, ROWLOCK) clause", () => Promise.all( connections.map(async (connection) => { const lock = " WITH (UPDLOCK, ROWLOCK)" @@ -199,8 +192,7 @@ describe("mssql > add lock clause for MSSQL select with join clause", () => { await connection.query(selectQuery) }), - ) - }) + )) function countInstances(str: string, word: string) { return str.split(word).length - 1 diff --git a/test/github-issues/5684/issue-5684.ts b/test/github-issues/5684/issue-5684.ts index aa6935eee5..0315a91721 100644 --- a/test/github-issues/5684/issue-5684.ts +++ b/test/github-issues/5684/issue-5684.ts @@ -75,31 +75,38 @@ describe("github issues > #5684 eager relation skips children relations", () => } } - const relations = [ - "company", - "company.admin", // <-- can't be loaded without the fix. - "company.staff", // <-- can't be loaded without the fix. - "company.staff.company", // <-- can't be loaded without the fix. - "company.staff.company.admin", // <-- can't be loaded without the fix. - ] + const relations = { + company: { + admin: true, + staff: { + company: { + admin: true, + }, + }, + }, + // "company.admin", // <-- can't be loaded without the fix. + // "company.staff", // <-- can't be loaded without the fix. + // "company.staff.company", // <-- can't be loaded without the fix. + // "company.staff.company.admin", // <-- can't be loaded without the fix. + } const user1 = await connection.getRepository(User).findOne({ where: { id: userAdmin.id }, - relations: [...relations], + relations: relations, }) assert(user1) const user2 = await connection .getRepository(User) .findOneOrFail({ where: { id: userAdmin.id }, - relations: [...relations], + relations: relations, }) assert(user2) const users3 = await connection.getRepository(User).find({ where: { id: userAdmin.id, }, - relations: [...relations], + relations: relations, }) assert(users3.pop()) const [users4] = await connection @@ -108,14 +115,14 @@ describe("github issues > #5684 eager relation skips children relations", () => where: { id: userAdmin.id, }, - relations: [...relations], + relations: relations, }) assert(users4.pop()) const users5 = await connection.getRepository(User).find({ where: { id: In([userAdmin.id]), }, - relations: [...relations], + relations: relations, }) assert(users5.pop()) }), diff --git a/test/github-issues/5691/issue-5691.ts b/test/github-issues/5691/issue-5691.ts index e820c5f864..3d398a8d04 100644 --- a/test/github-issues/5691/issue-5691.ts +++ b/test/github-issues/5691/issue-5691.ts @@ -103,27 +103,29 @@ describe("github issues > #5691 RelationId is too slow", () => { // const test1Start = new Date().getTime(); // 54 rows for 1 root await connection.getRepository(Root).find({ - relations: [ - "allChild1", - "allChild1.allShared", - "allChild2", - ], + relations: { + allChild1: { + allShared: true, + }, + allChild2: true, + }, }) // 21 rows 1 root await connection.getRepository(Root).find({ - relations: ["allShared"], + relations: { allShared: true }, }) // const test1End = new Date().getTime(); // const test2Start = new Date().getTime(); // 1134 rows 1 root await connection.getRepository(Root).find({ - relations: [ - "allChild1", - "allChild1.allShared", - "allChild2", - "allShared", - ], + relations: { + allChild1: { + allShared: true, + }, + allChild2: true, + allShared: true, + }, }) // const test2End = new Date().getTime(); diff --git a/test/github-issues/6540/entity/order.entity.ts.ts b/test/github-issues/6540/entity/order.entity.ts.ts index a10ba9b587..1592ef9a9b 100644 --- a/test/github-issues/6540/entity/order.entity.ts.ts +++ b/test/github-issues/6540/entity/order.entity.ts.ts @@ -16,7 +16,11 @@ export enum OrderStatus { @Entity() export class Order extends BaseEntity { - @PrimaryGeneratedColumn("uuid") + /** + * modified to remove the uuid since some versions of mariadb have uuid as a type + * which would create an additional upsert between the tests -> https://github.com/typeorm/typeorm/issues/8832 + */ + @PrimaryGeneratedColumn() id: string @Column({ type: "enum", enum: OrderStatus }) diff --git a/test/github-issues/6552/entity/Post.ts b/test/github-issues/6552/entity/Post.ts index 38589ab72e..31ce0a06de 100644 --- a/test/github-issues/6552/entity/Post.ts +++ b/test/github-issues/6552/entity/Post.ts @@ -1,11 +1,11 @@ -import { ObjectID, ObjectIdColumn } from "../../../../src" +import { ObjectId, ObjectIdColumn } from "../../../../src" import { Column } from "../../../../src/decorator/columns/Column" import { Entity } from "../../../../src/decorator/entity/Entity" @Entity() export class Post { @ObjectIdColumn() - _id: ObjectID + _id: ObjectId @Column() title: string diff --git a/test/github-issues/6552/entity/PostV2.ts b/test/github-issues/6552/entity/PostV2.ts index 02a06b95ad..3d79b2ab71 100644 --- a/test/github-issues/6552/entity/PostV2.ts +++ b/test/github-issues/6552/entity/PostV2.ts @@ -1,11 +1,11 @@ -import { ObjectID, ObjectIdColumn } from "../../../../src" +import { ObjectId, ObjectIdColumn } from "../../../../src" import { Column } from "../../../../src/decorator/columns/Column" import { Entity } from "../../../../src/decorator/entity/Entity" @Entity() export class PostV2 { @ObjectIdColumn() - postId: ObjectID + postId: ObjectId @Column() title: string diff --git a/test/github-issues/6552/issue-6552.ts b/test/github-issues/6552/issue-6552.ts index ba08e48a89..504cf2a9da 100644 --- a/test/github-issues/6552/issue-6552.ts +++ b/test/github-issues/6552/issue-6552.ts @@ -35,9 +35,9 @@ describe("github issues > #6552 MongoRepository delete by ObjectId deletes the w post2.title = "Post 2" await connection.manager.save(post2) - const objectIdInstance = PlatformTools.load("mongodb").ObjectID + const objectIdInstance = PlatformTools.load("mongodb").ObjectId - // double check that post2._id is actually an ObjectID + // double check that post2._id is actually an ObjectId expect(post2._id).to.be.not.null expect(post2._id).to.be.not.undefined expect(post2._id).to.be.instanceof(objectIdInstance) @@ -75,9 +75,9 @@ describe("github issues > #6552 MongoRepository delete by ObjectId deletes the w post2.title = "Post 2" await postV2Repository.save(post2) - const objectIdInstance = PlatformTools.load("mongodb").ObjectID + const objectIdInstance = PlatformTools.load("mongodb").ObjectId - // double check that post2.postId is actually an ObjectID + // double check that post2.postId is actually an ObjectId expect(post2.postId).to.be.not.null expect(post2.postId).to.be.not.undefined expect(post2.postId).to.be.instanceof(objectIdInstance) @@ -113,9 +113,9 @@ describe("github issues > #6552 MongoRepository delete by ObjectId deletes the w post2.title = "Post 2" await connection.manager.save(post2) - const objectIdInstance = PlatformTools.load("mongodb").ObjectID + const objectIdInstance = PlatformTools.load("mongodb").ObjectId - // double check that post2._id is actually an ObjectID + // double check that post2._id is actually an ObjectId expect(post2._id).to.be.not.null expect(post2._id).to.be.not.undefined expect(post2._id).to.be.instanceof(objectIdInstance) diff --git a/test/github-issues/6900/entity/Warn.ts b/test/github-issues/6900/entity/Warn.ts index df5371f40e..97aecc7c11 100644 --- a/test/github-issues/6900/entity/Warn.ts +++ b/test/github-issues/6900/entity/Warn.ts @@ -1,9 +1,9 @@ -import { Entity, ObjectID, ObjectIdColumn, Column } from "../../../../src" +import { Entity, ObjectId, ObjectIdColumn, Column } from "../../../../src" @Entity("warnings") export class Warn { @ObjectIdColumn() - id!: ObjectID + id!: ObjectId @Column() guild!: string diff --git a/test/github-issues/703/issue-703.ts b/test/github-issues/703/issue-703.ts index 051f86f789..d5caac9657 100644 --- a/test/github-issues/703/issue-703.ts +++ b/test/github-issues/703/issue-703.ts @@ -39,7 +39,7 @@ describe("github issues > #703.findOne does not return an empty array on OneToMa where: { id: 1, }, - relations: ["categories"], + relations: { categories: true }, }) loadedPost!.id.should.be.equal(1) diff --git a/test/github-issues/7041/issue-7041.ts b/test/github-issues/7041/issue-7041.ts index 9a53d47bfe..7df8525d99 100644 --- a/test/github-issues/7041/issue-7041.ts +++ b/test/github-issues/7041/issue-7041.ts @@ -32,7 +32,7 @@ describe("github issues > #7041 When requesting nested relations on foreign key where: { id: testUser.id, }, - relations: ["admin", "admin.organization"], + relations: { admin: { organization: true } }, }) expect(foundUser?.randomField).eq("foo") expect(foundUser?.admin).eq(null) @@ -50,7 +50,7 @@ describe("github issues > #7041 When requesting nested relations on foreign key where: { id: testUser.id, }, - relations: ["membership", "membership.organization"], + relations: { membership: { organization: true } }, }) expect(foundUser?.randomField).eq("foo") expect(foundUser?.membership).eql([]) diff --git a/test/github-issues/7065/issue-7065.ts b/test/github-issues/7065/issue-7065.ts index bebc6aaebe..f44933fef3 100644 --- a/test/github-issues/7065/issue-7065.ts +++ b/test/github-issues/7065/issue-7065.ts @@ -50,7 +50,7 @@ describe("github issues > #7065 ChildEntity type relationship produces unexpecte where: { id: 1, }, - relations: ["emails", "phones"], + relations: { emails: true, phones: true }, }) expect(result!.emails.length).eq(1) diff --git a/test/github-issues/7087/entity/user.ts b/test/github-issues/7087/entity/user.ts new file mode 100644 index 0000000000..a884258b5a --- /dev/null +++ b/test/github-issues/7087/entity/user.ts @@ -0,0 +1,8 @@ +import { PrimaryGeneratedColumn } from "../../../../src/decorator/columns/PrimaryGeneratedColumn" +import { Entity } from "../../../../src/decorator/entity/Entity" + +@Entity({ name: "users", synchronize: false }) +export class User { + @PrimaryGeneratedColumn("uuid") + id: number +} diff --git a/test/github-issues/7087/issue-7087.ts b/test/github-issues/7087/issue-7087.ts new file mode 100644 index 0000000000..03f1341afd --- /dev/null +++ b/test/github-issues/7087/issue-7087.ts @@ -0,0 +1,70 @@ +import "reflect-metadata" +import { + createTestingConnections, + closeTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/DataSource" +import { Migration } from "../../../src/migration/Migration" +import { ForbiddenTransactionModeOverrideError } from "../../../src/error/ForbiddenTransactionModeOverrideError" + +describe("github issues > #7087 Allow to specify transaction property for individual migrations", () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + __dirname, + schemaCreate: false, + dropSchema: true, + enabledDrivers: ["postgres"], + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("should fail to run all necessary migrations when transaction is all and there are transaction overrides", () => + Promise.all( + connections.map(async (connection) => { + return connection + .runMigrations({ transaction: "all" }) + .should.be.rejectedWith( + ForbiddenTransactionModeOverrideError, + 'Migrations "InsertUser0000000000002", "CreateIndex0000000000003" override the transaction mode, but the global transaction mode is "all"', + ) + }), + )) + + it("should set correct transaction mode when transaction is each", () => + Promise.all( + connections.map(async (connection) => { + const migrations: Migration[] = await connection.runMigrations({ + transaction: "each", + }) + + migrations.length.should.be.equal(3) + migrations[0].name.should.be.equal("CreateUsers0000000000001") + migrations[0].transaction!.should.be.true + migrations[1].name.should.be.equal("InsertUser0000000000002") + migrations[1].transaction!.should.be.true + migrations[2].name.should.be.equal("CreateIndex0000000000003") + migrations[2].transaction!.should.be.false + }), + )) + + it("should set correct transaction mode when transaction is none", () => + Promise.all( + connections.map(async (connection) => { + const migrations: Migration[] = await connection.runMigrations({ + transaction: "none", + }) + + migrations.length.should.be.equal(3) + migrations[0].name.should.be.equal("CreateUsers0000000000001") + migrations[0].transaction!.should.be.false + migrations[1].name.should.be.equal("InsertUser0000000000002") + migrations[1].transaction!.should.be.true + migrations[2].name.should.be.equal("CreateIndex0000000000003") + migrations[2].transaction!.should.be.false + }), + )) +}) diff --git a/test/github-issues/7087/migration/0000000000001-CreateUsers.ts b/test/github-issues/7087/migration/0000000000001-CreateUsers.ts new file mode 100644 index 0000000000..8a919bd16d --- /dev/null +++ b/test/github-issues/7087/migration/0000000000001-CreateUsers.ts @@ -0,0 +1,25 @@ +import { MigrationInterface } from "../../../../src/migration/MigrationInterface" +import { QueryRunner } from "../../../../src/query-runner/QueryRunner" +import { Table } from "../../../../src/schema-builder/table/Table" + +export class CreateUsers0000000000001 implements MigrationInterface { + public up(queryRunner: QueryRunner): Promise { + return queryRunner.createTable( + new Table({ + name: "users", + columns: [ + { + name: "id", + type: "uuid", + isPrimary: true, + default: "uuid_generate_v4()", + }, + ], + }), + ) + } + + public down(queryRunner: QueryRunner): Promise { + return queryRunner.dropTable("users") + } +} diff --git a/test/github-issues/7087/migration/0000000000002-InsertUser.ts b/test/github-issues/7087/migration/0000000000002-InsertUser.ts new file mode 100644 index 0000000000..7260f45392 --- /dev/null +++ b/test/github-issues/7087/migration/0000000000002-InsertUser.ts @@ -0,0 +1,16 @@ +import { MigrationInterface } from "../../../../src/migration/MigrationInterface" +import { QueryRunner } from "../../../../src/query-runner/QueryRunner" +import { User } from "../entity/user" + +export class InsertUser0000000000002 implements MigrationInterface { + public transaction = true + + public up(queryRunner: QueryRunner): Promise { + const userRepo = queryRunner.connection.getRepository(User) + return userRepo.save(new User()) + } + + public down(queryRunner: QueryRunner): Promise { + return Promise.resolve() + } +} diff --git a/test/github-issues/7087/migration/0000000000003-CreateIndex.ts b/test/github-issues/7087/migration/0000000000003-CreateIndex.ts new file mode 100644 index 0000000000..0d8dd36389 --- /dev/null +++ b/test/github-issues/7087/migration/0000000000003-CreateIndex.ts @@ -0,0 +1,16 @@ +import { MigrationInterface } from "../../../../src/migration/MigrationInterface" +import { QueryRunner } from "../../../../src/query-runner/QueryRunner" + +export class CreateIndex0000000000003 implements MigrationInterface { + public transaction = false + + public up(queryRunner: QueryRunner): Promise { + return queryRunner.query( + "CREATE INDEX CONCURRENTLY user_ids_idx ON users(id)", + ) + } + + public down(queryRunner: QueryRunner): Promise { + return Promise.resolve() + } +} diff --git a/test/github-issues/7113/entity/Configuration.ts b/test/github-issues/7113/entity/Configuration.ts index 1b5205034b..12abb61afe 100644 --- a/test/github-issues/7113/entity/Configuration.ts +++ b/test/github-issues/7113/entity/Configuration.ts @@ -1,14 +1,14 @@ import { DeleteDateColumn, Entity, - ObjectID, + ObjectId, ObjectIdColumn, } from "../../../../src" @Entity() export class Configuration { @ObjectIdColumn() - _id: ObjectID + _id: ObjectId @DeleteDateColumn() deletedAt?: Date diff --git a/test/github-issues/7558/entity/Animal.ts b/test/github-issues/7558/entity/Animal.ts new file mode 100644 index 0000000000..5b636023d4 --- /dev/null +++ b/test/github-issues/7558/entity/Animal.ts @@ -0,0 +1,25 @@ +import { + Column, + Entity, + ManyToOne, + PrimaryGeneratedColumn, + TableInheritance, +} from "../../../../src" + +import { PersonEntity } from "./Person" + +@Entity("animal") +@TableInheritance({ column: { type: "varchar", name: "type" } }) +export class AnimalEntity { + @PrimaryGeneratedColumn() + id: number + + @Column({ type: "varchar" }) + name: string + + @ManyToOne(() => PersonEntity, ({ pets }) => pets, { + onDelete: "CASCADE", + onUpdate: "NO ACTION", // cascade would not work here as ORACLE does not have that action + }) + person: PersonEntity +} diff --git a/test/github-issues/7558/entity/Cat.ts b/test/github-issues/7558/entity/Cat.ts new file mode 100644 index 0000000000..940b53f7a8 --- /dev/null +++ b/test/github-issues/7558/entity/Cat.ts @@ -0,0 +1,10 @@ +import { ChildEntity, Column } from "../../../../src" + +import { AnimalEntity } from "./Animal" + +@ChildEntity("cat") +export class CatEntity extends AnimalEntity { + // Cat stuff + @Column() + livesLeft: number +} diff --git a/test/github-issues/7558/entity/Content.ts b/test/github-issues/7558/entity/Content.ts new file mode 100644 index 0000000000..1ad34a36ae --- /dev/null +++ b/test/github-issues/7558/entity/Content.ts @@ -0,0 +1,16 @@ +import { + Column, + Entity, + PrimaryGeneratedColumn, + TableInheritance, +} from "../../../../src" + +@Entity("content") +@TableInheritance({ column: { type: "varchar", name: "type" } }) +export class Content { + @PrimaryGeneratedColumn() + id: number + + @Column() + title: string +} diff --git a/test/github-issues/7558/entity/Dog.ts b/test/github-issues/7558/entity/Dog.ts new file mode 100644 index 0000000000..bf6313c976 --- /dev/null +++ b/test/github-issues/7558/entity/Dog.ts @@ -0,0 +1,10 @@ +import { ChildEntity, Column } from "../../../../src" + +import { AnimalEntity } from "./Animal" + +@ChildEntity("dog") +export class DogEntity extends AnimalEntity { + // Dog stuff + @Column() + steaksEaten: number +} diff --git a/test/github-issues/7558/entity/NnaryOperator.ts b/test/github-issues/7558/entity/NnaryOperator.ts new file mode 100644 index 0000000000..535393df76 --- /dev/null +++ b/test/github-issues/7558/entity/NnaryOperator.ts @@ -0,0 +1,12 @@ +import { ChildEntity, Column, TreeChildren } from "../../../../src" + +import { OperatorTreeEntry } from "./OperatorTreeEntry" + +@ChildEntity("nnary") +export class NnaryOperator extends OperatorTreeEntry { + @TreeChildren({ cascade: true }) + children: OperatorTreeEntry[] + + @Column() + operator: string +} diff --git a/test/github-issues/7558/entity/NumberEntry.ts b/test/github-issues/7558/entity/NumberEntry.ts new file mode 100644 index 0000000000..e7f288896a --- /dev/null +++ b/test/github-issues/7558/entity/NumberEntry.ts @@ -0,0 +1,11 @@ +import { ChildEntity, Column } from "../../../../src" + +import { OperatorTreeEntry } from "./OperatorTreeEntry" + +@ChildEntity("number") +export class NumberEntry extends OperatorTreeEntry { + @Column({ + type: "float", + }) + value: number +} diff --git a/test/github-issues/7558/entity/OperatorTreeEntry.ts b/test/github-issues/7558/entity/OperatorTreeEntry.ts new file mode 100644 index 0000000000..88de21680b --- /dev/null +++ b/test/github-issues/7558/entity/OperatorTreeEntry.ts @@ -0,0 +1,19 @@ +import { + Entity, + PrimaryGeneratedColumn, + TableInheritance, + Tree, + TreeParent, +} from "../../../../src" +import type { NnaryOperator } from "./NnaryOperator" + +@Entity() +@TableInheritance({ pattern: "STI", column: { type: "varchar" } }) +@Tree("closure-table") +export class OperatorTreeEntry { + @PrimaryGeneratedColumn("uuid") + id: string + + @TreeParent() + parent?: NnaryOperator +} diff --git a/test/github-issues/7558/entity/Person.ts b/test/github-issues/7558/entity/Person.ts new file mode 100644 index 0000000000..866aa85f1b --- /dev/null +++ b/test/github-issues/7558/entity/Person.ts @@ -0,0 +1,30 @@ +import { + Entity, + JoinColumn, + OneToMany, + OneToOne, + PrimaryGeneratedColumn, +} from "../../../../src" + +import { AnimalEntity } from "./Animal" +import { Content } from "./Content" + +@Entity({ name: "person" }) +export class PersonEntity { + @PrimaryGeneratedColumn() + id!: number + + @OneToMany(() => AnimalEntity, ({ person }) => person, { + cascade: true, + eager: true, + }) + pets!: AnimalEntity[] + + @OneToOne(() => Content, { + cascade: true, + eager: true, + nullable: true, + }) + @JoinColumn() + content?: Content +} diff --git a/test/github-issues/7558/entity/Photo.ts b/test/github-issues/7558/entity/Photo.ts new file mode 100644 index 0000000000..78ce935a1b --- /dev/null +++ b/test/github-issues/7558/entity/Photo.ts @@ -0,0 +1,8 @@ +import { ChildEntity, Column } from "../../../../src" +import { Content } from "./Content" + +@ChildEntity("photo") +export class Photo extends Content { + @Column() + size: number +} diff --git a/test/github-issues/7558/issue-7758.ts b/test/github-issues/7558/issue-7758.ts new file mode 100644 index 0000000000..4d6bd3c6bf --- /dev/null +++ b/test/github-issues/7558/issue-7758.ts @@ -0,0 +1,198 @@ +import "reflect-metadata" +import { + createTestingConnections, + closeTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/index" +import { expect } from "chai" + +import { AnimalEntity } from "./entity/Animal" +import { CatEntity } from "./entity/Cat" +import { DogEntity } from "./entity/Dog" +import { NnaryOperator } from "./entity/NnaryOperator" +import { NumberEntry } from "./entity/NumberEntry" +import { OperatorTreeEntry } from "./entity/OperatorTreeEntry" +import { PersonEntity } from "./entity/Person" +import { Photo } from "./entity/Photo" + +describe("github issues > #7558 Child entities' wrong discriminator value when embedded in parent entity", () => { + let dataSources: DataSource[] + before( + async () => + (dataSources = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + schemaCreate: true, + dropSchema: true, + })), + ) + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("should use the correct subclass for inheritance when saving & retrieving a single STI entity (one-to-one)", () => + Promise.all( + dataSources.map(async (dataSource) => { + const entityManager = dataSource.createEntityManager() + const personRepo = entityManager.getRepository(PersonEntity) + const photoRepo = entityManager.getRepository(Photo) + + const photo = photoRepo.create({ + title: "Cat Photo", + size: 42, + }) + expect(photo).to.be.instanceOf(Photo) + + // Create a new person, cascade saving the content. + const person = personRepo.create({ + pets: [], + content: photo, + }) + expect(person.content).not.to.be.undefined + expect(person.content).to.be.instanceOf(Photo) + await entityManager.save(person) + + // Retrieve it back from the DB. + const persons = await personRepo.find() + expect(persons.length).to.equal(1) + + // And check whether the content / photo is still the same. + expect(persons[0].pets.length).to.equal(0) + expect(persons[0].content).not.to.be.undefined + expect(persons[0].content).not.to.be.null + expect(persons[0].content).to.be.instanceOf(Photo) + expect(persons[0].content).to.include(photo) + }), + )) + + it("should use the correct subclass for inheritance when saving & retrieving multiple STI entities (one-to-many)", () => + Promise.all( + dataSources.map(async (dataSource) => { + const entityManager = dataSource.createEntityManager() + const personRepo = entityManager.getRepository(PersonEntity) + const animalRepo = entityManager.getRepository(AnimalEntity) + const dogRepo = entityManager.getRepository(DogEntity) + const catRepo = entityManager.getRepository(CatEntity) + + const mysteryUnicorn = animalRepo.create({ + name: "i-am-a-mystery", + }) + expect(mysteryUnicorn).to.be.instanceOf(AnimalEntity) + const felix = catRepo.create({ + name: "felix", + livesLeft: 9, + // Cat stuff + }) + expect(felix).to.be.instanceOf(CatEntity) + const spike = dogRepo.create({ + name: "spike", + steaksEaten: 42, + // Dog stuff + }) + expect(spike).to.be.instanceOf(DogEntity) + const pets = [mysteryUnicorn, felix, spike] + + // Create a new person, cascade saving the pets. + const person = personRepo.create({ + pets, + }) + expect(person.pets[0]).to.be.instanceOf(AnimalEntity) + expect(person.pets[1]).to.be.instanceOf(CatEntity) + expect(person.pets[2]).to.be.instanceOf(DogEntity) + await entityManager.save(person) + + // Retrieve it back from the DB. + const persons = await personRepo.find({ relations: ["pets"] }) + expect(persons.length).to.equal(1) + + // And check whether the pets are still the same. + expect(persons[0].pets.length).to.equal(3) + const animalPets = persons[0].pets.filter( + (entity) => + entity instanceof AnimalEntity && + !(entity instanceof CatEntity) && + !(entity instanceof DogEntity), + ) + const catPets = persons[0].pets.filter( + (entity) => entity instanceof CatEntity, + ) + const dogPets = persons[0].pets.filter( + (entity) => entity instanceof DogEntity, + ) + expect(animalPets.length).to.equal(1) + expect(animalPets[0]).to.include(mysteryUnicorn) + expect(catPets.length).to.equal(1) + expect(catPets[0]).to.include(felix) + expect(dogPets.length).to.equal(1) + expect(dogPets[0]).to.include(spike) + }), + )) + + it("should set the correct discriminators for trees in STI settings", () => + Promise.all( + dataSources.map(async (dataSource) => { + const entityManager = dataSource.createEntityManager() + const operatorTreeRepo = + entityManager.getTreeRepository(OperatorTreeEntry) + const nnaryOperatorRepo = + entityManager.getTreeRepository(NnaryOperator) + const numberEntryRepo = entityManager.getRepository(NumberEntry) + + // Create an operator tree (10.5 * (21 + 42)). + const num1 = numberEntryRepo.create({ value: 42 }) + const num2 = numberEntryRepo.create({ value: 21 }) + const num3 = numberEntryRepo.create({ value: 10.5 }) + + const mulOperator = nnaryOperatorRepo.create({ + operator: "*", + }) + + // Save the tree... + // We need to first save the parents step by step. + const savedMulOperator = await operatorTreeRepo.save( + mulOperator, + ) + const plusOperator = nnaryOperatorRepo.create({ + parent: savedMulOperator, + operator: "+", + }) + num3.parent = savedMulOperator + + await operatorTreeRepo.save(num3) + const savedPlusOperator = await operatorTreeRepo.save( + plusOperator, + ) + + num1.parent = savedPlusOperator + num2.parent = savedPlusOperator + await operatorTreeRepo.save([num1, num2]) + + // ... and fetch it from the database. + const fetchedTrees = await operatorTreeRepo.findTrees() + expect(fetchedTrees.length).to.eql(1) + expect(fetchedTrees[0]).to.be.instanceOf(NnaryOperator) + const fetchedOperator = fetchedTrees[0] as NnaryOperator + expect(fetchedOperator.operator).to.eql("*") + + expect(fetchedOperator.children.length).to.be.eql(2) + // Order is *not* deterministic by default... + expect( + fetchedOperator.children.find( + (operator) => operator.id === num3.id, + ), + ).to.be.instanceOf(NumberEntry) + expect( + fetchedOperator.children.find( + (operator) => operator.id === savedPlusOperator.id, + ), + ).to.be.instanceOf(NnaryOperator) + + const subOperator = fetchedOperator.children.find( + (operator) => operator.id === savedPlusOperator.id, + ) as NnaryOperator + expect(subOperator.operator).to.eql("+") + expect(subOperator.children.length).to.be.eql(2) + expect(subOperator.children[0]).to.be.instanceOf(NumberEntry) + expect(subOperator.children[1]).to.be.instanceOf(NumberEntry) + }), + )) +}) diff --git a/test/github-issues/7852/issue-7852.ts b/test/github-issues/7852/issue-7852.ts index 91025bf4ec..38f3babac3 100644 --- a/test/github-issues/7852/issue-7852.ts +++ b/test/github-issues/7852/issue-7852.ts @@ -39,9 +39,9 @@ describe("github issues > #7852 saving a ManyToMany relation tries to insert (DE await userRepository.save(userEntity) // Save on object - const objectId = 1 + const ObjectId = 1 const objectEntity = new UsersObject() - objectEntity.id = objectId + objectEntity.id = ObjectId await usersObjectRepository.save(objectEntity) // Updating using save method @@ -59,7 +59,7 @@ describe("github issues > #7852 saving a ManyToMany relation tries to insert (DE expect(savedUser.objects.length).to.be.eql(1) expect(savedUser.objects[0]).to.be.instanceOf(UsersObject) - expect(savedUser.objects[0].id).to.be.eql(objectId) + expect(savedUser.objects[0].id).to.be.eql(ObjectId) }), )) }) diff --git a/test/github-issues/7882/issue-7882.ts b/test/github-issues/7882/issue-7882.ts index d7f97bc6ed..a8bd71fbcf 100644 --- a/test/github-issues/7882/issue-7882.ts +++ b/test/github-issues/7882/issue-7882.ts @@ -25,13 +25,13 @@ describe("github issues > #7882 .findOne reduces relations to an empty array", it("should delete all documents related to search pattern", () => Promise.all( connections.map(async (connection) => { - const relations = ["exampleText"] + const relations = { exampleText: true } const repo = connection.getRepository(Example) await repo.find({ relations }) - expect(relations).to.be.eql(["exampleText"]) + expect(relations).to.be.eql({ exampleText: true }) }), )) }) diff --git a/test/github-issues/7907/entity/Post.ts b/test/github-issues/7907/entity/Post.ts new file mode 100644 index 0000000000..2e59b21606 --- /dev/null +++ b/test/github-issues/7907/entity/Post.ts @@ -0,0 +1,16 @@ +import { Entity } from "../../../../src/decorator/entity/Entity" +import { Column } from "../../../../src/decorator/columns/Column" +import { ObjectIdColumn } from "../../../../src/decorator/columns/ObjectIdColumn" +import { ObjectId } from "../../../../src" + +@Entity() +export class Post { + @ObjectIdColumn() + id: ObjectId + + @Column() + title: string + + @Column() + text: string +} diff --git a/test/github-issues/7907/issue-7907.ts b/test/github-issues/7907/issue-7907.ts new file mode 100644 index 0000000000..d18117b140 --- /dev/null +++ b/test/github-issues/7907/issue-7907.ts @@ -0,0 +1,44 @@ +import "reflect-metadata" +import { expect } from "chai" +import { DataSource } from "../../../src" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { Post } from "./entity/Post" + +describe("github issues > #7907 add support for mongodb driver v5", () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + entities: [Post], + enabledDrivers: ["mongodb"], + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("should find the Post without throw error: Cannot read property 'prototype' of undefined", () => + Promise.all( + connections.map(async (connection) => { + const postMongoRepository = connection.getMongoRepository(Post) + + // save a post + const post = new Post() + post.title = "Post" + post.text = "This is a simple post" + await postMongoRepository.save(post) + + const findPosts = async () => { + return postMongoRepository.find() + } + const posts = await findPosts() + + expect(findPosts).to.not.throw() + expect(posts).to.have.lengthOf(1) + expect(posts[0]).to.be.instanceOf(Post) + }), + )) +}) diff --git a/test/github-issues/799/issue-799.ts b/test/github-issues/799/issue-799.ts index 350571764e..a8abf44912 100644 --- a/test/github-issues/799/issue-799.ts +++ b/test/github-issues/799/issue-799.ts @@ -9,14 +9,9 @@ describe("github issues > #799 sqlite: 'database' path should be created", () => let dataSource: DataSource const path = `${__dirname}/tmp/sqlitedb.db` - const cleanup = (done: () => void) => { - rimraf(dirname(path), () => { - return done() - }) - } - before(cleanup) - after(cleanup) + before(() => rimraf(dirname(path))) + after(() => rimraf(dirname(path))) afterEach(() => { if (dataSource && dataSource.isInitialized) { diff --git a/test/github-issues/8018/issue-8018.ts b/test/github-issues/8018/issue-8018.ts index 82e44384a0..8ec0db1917 100644 --- a/test/github-issues/8018/issue-8018.ts +++ b/test/github-issues/8018/issue-8018.ts @@ -40,7 +40,7 @@ describe("github issues > #8018 Non-unique relation property names causes entity await connection.manager.save([parent, child1, child2]) const result = await connection.manager.find(Parent, { - relations: ["children"], + relations: { children: true }, }) expect(result).to.have.lengthOf(1) diff --git a/test/github-issues/8408/delete-orphans.ts b/test/github-issues/8408/delete-orphans.ts index 63f66ee545..20daac015a 100644 --- a/test/github-issues/8408/delete-orphans.ts +++ b/test/github-issues/8408/delete-orphans.ts @@ -35,7 +35,11 @@ describe("persistence > delete orphans", () => { let postRepository: Repository let categoryId: number - beforeEach(async () => { + beforeEach(async function () { + if (connections.length === 0) { + this.skip() + } + await Promise.all( connections.map(async (connection) => { categoryRepository = connection.getRepository(Category) diff --git a/test/github-issues/8459/entity/Category.ts b/test/github-issues/8459/entity/Category.ts new file mode 100644 index 0000000000..05e7e72d26 --- /dev/null +++ b/test/github-issues/8459/entity/Category.ts @@ -0,0 +1,10 @@ +import { Entity, PrimaryGeneratedColumn, Column } from "../../../../src" + +@Entity() +export class Category { + @PrimaryGeneratedColumn() + id: number + + @Column() + name: string +} diff --git a/test/github-issues/8459/entity/Post.ts b/test/github-issues/8459/entity/Post.ts new file mode 100644 index 0000000000..9555f9d020 --- /dev/null +++ b/test/github-issues/8459/entity/Post.ts @@ -0,0 +1,24 @@ +import { + Entity, + PrimaryGeneratedColumn, + Column, + ManyToOne, + JoinColumn, +} from "../../../../src" +import { Category } from "./Category" + +@Entity() +export class Post { + @PrimaryGeneratedColumn() + id: number + + @Column() + name: string + + @Column() + categoryId: number + + @ManyToOne(() => Category) + @JoinColumn({ name: "categoryId" }) + category: Category +} diff --git a/test/github-issues/8459/entity/PostCategory.ts b/test/github-issues/8459/entity/PostCategory.ts new file mode 100644 index 0000000000..b68db1bddf --- /dev/null +++ b/test/github-issues/8459/entity/PostCategory.ts @@ -0,0 +1,26 @@ +import { ViewEntity, ViewColumn, DataSource, Index } from "../../../../src" +import { Category } from "./Category" +import { Post } from "./Post" + +@ViewEntity({ + materialized: true, + expression: (dataSource: DataSource) => + dataSource + .createQueryBuilder() + .select("post.id", "id") + .addSelect("post.name", "name") + .addSelect("category.name", "categoryName") + .from(Post, "post") + .leftJoin(Category, "category", "category.id = post.categoryId"), +}) +export class PostCategory { + @ViewColumn() + id: number + + @Index("name-idx") + @ViewColumn() + name: string + + @ViewColumn() + categoryName: string +} diff --git a/test/github-issues/8459/issue-8459.ts b/test/github-issues/8459/issue-8459.ts new file mode 100644 index 0000000000..613ed8a2c7 --- /dev/null +++ b/test/github-issues/8459/issue-8459.ts @@ -0,0 +1,151 @@ +import "reflect-metadata" +import { + createTestingConnections, + closeTestingConnections, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/DataSource" +import { assert, expect } from "chai" +import { PostgresQueryRunner } from "../../../src/driver/postgres/PostgresQueryRunner" +import { TableIndex } from "../../../src" +import { PostCategory } from "./entity/PostCategory" +import { IndexMetadata } from "../../../src/metadata/IndexMetadata" + +describe("github issues > #8459 Can not create indexes of materialized views", () => { + const tableIndex: TableIndex = new TableIndex({ + columnNames: ["name"], + name: "name-idx", + }) + + let dataSources: DataSource[] + before( + async () => + (dataSources = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + schemaCreate: true, + dropSchema: true, + enabledDrivers: ["postgres"], + })), + ) + after(() => closeTestingConnections(dataSources)) + + it("should create a materialized view index at runtime", () => + Promise.all( + dataSources.map(async (dataSource) => { + const postgresQueryRunner: PostgresQueryRunner = < + PostgresQueryRunner + >dataSource.createQueryRunner() + const view = await postgresQueryRunner.getView("post_category") + assert.deepEqual(view!.indices[0], tableIndex) + }), + )) + + it("should rename a materialized view unique index", () => + Promise.all( + dataSources.map(async (dataSource) => { + const postCatMetadata = dataSource.getMetadata(PostCategory) + postCatMetadata.indices[0].name = "renamed-ix" + + await dataSource.synchronize() + + const postgresQueryRunner: PostgresQueryRunner = < + PostgresQueryRunner + >dataSource.createQueryRunner() + const view = await postgresQueryRunner.getView("post_category") + await postgresQueryRunner.release() + + const index = view!.indices.find((i) => i.name === "renamed-ix") + + expect(index).not.be.undefined + }), + )) + + it("should delete a materialized view index", () => + Promise.all( + dataSources.map(async (dataSource) => { + const postCatMetadata = dataSource.getMetadata(PostCategory) + postCatMetadata.indices.splice(0, 1) + + await dataSource.synchronize() + + const postgresQueryRunner: PostgresQueryRunner = < + PostgresQueryRunner + >dataSource.createQueryRunner() + const view = await postgresQueryRunner.getView("post_category") + await postgresQueryRunner.release() + view!.indices.length.should.be.equal(0) + }), + )) + + it("should create a materialized view index", () => + Promise.all( + dataSources.map(async (dataSource) => { + const postCatMetadata = dataSource.getMetadata(PostCategory) + const nameColumn = + postCatMetadata.findColumnWithPropertyName("name")! + const indexMetadata = new IndexMetadata({ + entityMetadata: postCatMetadata, + columns: [nameColumn], + args: { + target: PostCategory, + synchronize: true, + name: "name-ix", + }, + }) + indexMetadata.build(dataSource.namingStrategy) + postCatMetadata.indices.push(indexMetadata) + + await dataSource.synchronize() + + const postgresQueryRunner: PostgresQueryRunner = < + PostgresQueryRunner + >dataSource.createQueryRunner() + const view = await postgresQueryRunner.getView("post_category") + await postgresQueryRunner.release() + + view!.indices.length.should.be.equal(1) + + postCatMetadata.indices.splice( + postCatMetadata.indices.indexOf(indexMetadata), + 1, + ) + }), + )) + + it("should create a materialized view unique index", () => + Promise.all( + dataSources.map(async (dataSource) => { + const postCatMetadata = dataSource.getMetadata(PostCategory) + const nameColumn = + postCatMetadata.findColumnWithPropertyName("name")! + const indexMetadata = new IndexMetadata({ + entityMetadata: postCatMetadata, + columns: [nameColumn], + args: { + target: PostCategory, + synchronize: true, + name: "name-ix", + unique: true, + }, + }) + indexMetadata.build(dataSource.namingStrategy) + postCatMetadata.indices.push(indexMetadata) + + await dataSource.synchronize() + + const postgresQueryRunner: PostgresQueryRunner = < + PostgresQueryRunner + >dataSource.createQueryRunner() + const view = await postgresQueryRunner.getView("post_category") + await postgresQueryRunner.release() + + const index = view!.indices.find((i) => i.name === "name-ix") + + expect(index?.isUnique).not.be.false + + postCatMetadata.indices.splice( + postCatMetadata.indices.indexOf(indexMetadata), + 1, + ) + }), + )) +}) diff --git a/test/github-issues/8485/entity/User.ts b/test/github-issues/8485/entity/User.ts new file mode 100644 index 0000000000..f9543f18ce --- /dev/null +++ b/test/github-issues/8485/entity/User.ts @@ -0,0 +1,11 @@ +import { Entity, OneToOne, PrimaryGeneratedColumn } from "../../../../src" +import { UserProfile } from "./UserProfile" + +@Entity() +export class User { + @PrimaryGeneratedColumn() + public id: number + + @OneToOne(() => UserProfile, (userProfile) => userProfile.user) + public profile: UserProfile +} diff --git a/test/github-issues/8485/entity/UserProfile.ts b/test/github-issues/8485/entity/UserProfile.ts new file mode 100644 index 0000000000..4ed874c56a --- /dev/null +++ b/test/github-issues/8485/entity/UserProfile.ts @@ -0,0 +1,12 @@ +import { Entity, JoinColumn, OneToOne, PrimaryColumn } from "../../../../src" +import { User } from "./User" + +@Entity() +export class UserProfile { + @PrimaryColumn() + public userId: number + + @OneToOne(() => User, (user) => user.profile) + @JoinColumn() + public user: User +} diff --git a/test/github-issues/8485/issue-8485.ts b/test/github-issues/8485/issue-8485.ts new file mode 100644 index 0000000000..f3738975e6 --- /dev/null +++ b/test/github-issues/8485/issue-8485.ts @@ -0,0 +1,36 @@ +import { DataSource } from "../../../src" +import { + createTestingConnections, + closeTestingConnections, +} from "../../utils/test-utils" +import { UserProfile } from "./entity/UserProfile" +import { User } from "./entity/User" +import { expect } from "chai" + +describe("github issues > #8485 second migration is generated for a combination of PrimaryColumn and JoinColumn", () => { + let dataSources: DataSource[] + before( + async () => + (dataSources = await createTestingConnections({ + entities: [User, UserProfile], + enabledDrivers: ["mariadb", "mysql", "oracle", "postgres"], + dropSchema: true, + schemaCreate: false, + })), + ) + after(() => closeTestingConnections(dataSources)) + + it("should not create second migration", () => + Promise.all( + dataSources.map(async (dataSource) => { + await dataSource.driver.createSchemaBuilder().build() + + const sqlInMemory = await dataSource.driver + .createSchemaBuilder() + .log() + + expect(sqlInMemory.upQueries).to.be.empty + expect(sqlInMemory.downQueries).to.be.empty + }), + )) +}) diff --git a/test/github-issues/8832/badEntity/BadInet4.ts b/test/github-issues/8832/badEntity/BadInet4.ts new file mode 100644 index 0000000000..35bace3c73 --- /dev/null +++ b/test/github-issues/8832/badEntity/BadInet4.ts @@ -0,0 +1,10 @@ +import { Column, Entity, PrimaryGeneratedColumn } from "../../../../src" + +@Entity() +export class BadInet4 { + @PrimaryGeneratedColumn("uuid") + id?: string + + @Column({ type: "inet4", length: "36" }) + inet4: string +} diff --git a/test/github-issues/8832/badEntity/BadInet6.ts b/test/github-issues/8832/badEntity/BadInet6.ts new file mode 100644 index 0000000000..bf5ecc7a8e --- /dev/null +++ b/test/github-issues/8832/badEntity/BadInet6.ts @@ -0,0 +1,10 @@ +import { Column, Entity, PrimaryGeneratedColumn } from "../../../../src" + +@Entity() +export class BadInet6 { + @PrimaryGeneratedColumn("uuid") + id?: string + + @Column({ type: "inet6", length: "36" }) + inet6: string +} diff --git a/test/github-issues/8832/badEntity/BadUuid.ts b/test/github-issues/8832/badEntity/BadUuid.ts new file mode 100644 index 0000000000..961a50baa8 --- /dev/null +++ b/test/github-issues/8832/badEntity/BadUuid.ts @@ -0,0 +1,10 @@ +import { Column, Entity, PrimaryGeneratedColumn } from "../../../../src" + +@Entity() +export class BadUuid { + @PrimaryGeneratedColumn("uuid") + id?: string + + @Column({ type: "uuid", length: "36" }) + uuid: string +} diff --git a/test/github-issues/8832/entity/Address.ts b/test/github-issues/8832/entity/Address.ts new file mode 100644 index 0000000000..b8256ebd69 --- /dev/null +++ b/test/github-issues/8832/entity/Address.ts @@ -0,0 +1,22 @@ +import { + Entity, + PrimaryGeneratedColumn, + Column, + ManyToOne, +} from "../../../../src" +import { User } from "./User" + +@Entity() +export class Address { + @PrimaryGeneratedColumn("increment") + id?: number + + @Column() + city: string + + @Column() + state: string + + @ManyToOne(() => User, (user) => user.addresses) + user: User +} diff --git a/test/github-issues/8832/entity/User.ts b/test/github-issues/8832/entity/User.ts new file mode 100644 index 0000000000..06d3fb9a2c --- /dev/null +++ b/test/github-issues/8832/entity/User.ts @@ -0,0 +1,30 @@ +import { + Column, + Entity, + OneToMany, + PrimaryGeneratedColumn, +} from "../../../../src" +import { Address } from "./Address" + +@Entity() +export class User { + @PrimaryGeneratedColumn("uuid") + id?: string + + /** can use a default but testing against mysql since they're shared drivers */ + @Column({ type: "uuid" }) + uuid: string + + @Column({ type: "inet4" }) + inet4: string + + @Column({ type: "inet6" }) + inet6: string + + /** testing generation */ + @Column({ type: "uuid", generated: "uuid" }) + another_uuid_field?: string + + @OneToMany(() => Address, (address) => address.user) + addresses?: Address[] +} diff --git a/test/github-issues/8832/entity/UuidEntity.ts b/test/github-issues/8832/entity/UuidEntity.ts new file mode 100644 index 0000000000..d887673025 --- /dev/null +++ b/test/github-issues/8832/entity/UuidEntity.ts @@ -0,0 +1,7 @@ +import { Entity, PrimaryGeneratedColumn } from "../../../../src" + +@Entity() +export class UuidEntity { + @PrimaryGeneratedColumn("uuid") + id?: string +} diff --git a/test/github-issues/8832/issue-8832.ts b/test/github-issues/8832/issue-8832.ts new file mode 100644 index 0000000000..214e4f35c1 --- /dev/null +++ b/test/github-issues/8832/issue-8832.ts @@ -0,0 +1,248 @@ +import "../../utils/test-setup" +import { + createTestingConnections, + closeTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/index" +import { expect } from "chai" +import { User } from "../8832/entity/User" +import { Address } from "./entity/Address" +import { ConnectionMetadataBuilder } from "../../../src/connection/ConnectionMetadataBuilder" +import { EntityMetadataValidator } from "../../../src/metadata-builder/EntityMetadataValidator" +import { UuidEntity } from "./entity/UuidEntity" + +describe("github issues > #8832 Add uuid, inet4, and inet6 types for mariadb", () => { + let connections: DataSource[] + + afterEach(() => closeTestingConnections(connections)) + + describe("basic use of new maria db types", () => { + const newUser: User = { + uuid: "ceb2897c-a1cf-11ed-8dbd-040300000000", + inet4: "192.0.2.146", + inet6: "2001:0db8:0000:0000:0000:ff00:0042:8329", + } + + const expectedInet6 = "2001:db8::ff00:42:8329" + + before( + async () => + (connections = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + schemaCreate: true, + dropSchema: true, + enabledDrivers: ["mariadb"], + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + + it("should create table with uuid, inet4, and inet6 type set to column for relevant mariadb versions", () => + Promise.all( + connections.map(async (connection) => { + const userRepository = connection.getRepository(User) + + // seems there is an issue with the persisting id that crosses over from mysql to mariadb + await userRepository.save(newUser) + + const savedUser = await userRepository.findOneOrFail({ + where: { uuid: newUser.uuid }, + }) + + const foundUser = await userRepository.findOne({ + where: { id: savedUser.id }, + }) + + expect(foundUser).to.not.be.null + expect(foundUser!.uuid).to.deep.equal(newUser.uuid) + expect(foundUser!.inet4).to.deep.equal(newUser.inet4) + expect(foundUser!.inet6).to.deep.equal(expectedInet6) + expect(foundUser!.another_uuid_field).to.not.be.undefined + + const columnTypes: { + COLUMN_NAME: string + DATA_TYPE: string + }[] = await connection.query( + ` + SELECT + COLUMN_NAME, + DATA_TYPE + FROM INFORMATION_SCHEMA.COLUMNS + WHERE + TABLE_SCHEMA = ? + AND TABLE_NAME = ? + AND COLUMN_NAME IN (?, ?, ?, ?) + `, + [ + connection.driver.database, + "user", + "id", + "uuid", + "inet4", + "inet6", + "anotherUuid", + ], + ) + const expectedColumnTypes: Record = { + id: "uuid", + uuid: "uuid", + inet4: "inet4", + inet6: "inet6", + another_uuid_field: "uuid", + } + + columnTypes.forEach(({ COLUMN_NAME, DATA_TYPE }) => { + expect(DATA_TYPE).to.equal( + expectedColumnTypes[COLUMN_NAME], + ) + }) + + // save a relation + const addressRepository = connection.getRepository(Address) + + const newAddress: Address = { + city: "Codersville", + state: "Coderado", + user: foundUser!, + } + + await addressRepository.save(newAddress) + + const foundAddress = await addressRepository.findOne({ + where: { user: { id: foundUser!.id } }, + }) + + expect(foundAddress).to.not.be.null + }), + )) + }) + + describe("regression test mysql uuid generation", () => { + const uuidEntity: UuidEntity = { + id: "ceb2897c-a1cf-11ed-8dbd-040300000000", + } + + before( + async () => + (connections = await createTestingConnections({ + entities: [UuidEntity], + schemaCreate: true, + dropSchema: true, + enabledDrivers: ["mysql", "mariadb"], + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + + it("should create table with with varchar with length 36 when version is mysql", () => + Promise.all( + connections.map(async (connection) => { + const uuidRepository = connection.getRepository(UuidEntity) + + // seems there is an issue with the persisting id that crosses over from mysql to mariadb + await uuidRepository.save(uuidEntity) + + const columnTypes: { + DATA_TYPE: string + CHARACTER_MAXIMUM_LENGTH: string + }[] = await connection.query( + ` + SELECT + DATA_TYPE, + CHARACTER_MAXIMUM_LENGTH + FROM INFORMATION_SCHEMA.COLUMNS + WHERE + TABLE_SCHEMA = ? + AND TABLE_NAME = ? + AND COLUMN_NAME = ? + `, + [connection.driver.database, "UuidEntity", "id"], + ) + + const isMysql = connection.driver.options.type === "mysql" + const expectedType = isMysql ? "varchar" : "uuid" + const expectedLength = isMysql ? "36" : null + + columnTypes.forEach( + ({ DATA_TYPE, CHARACTER_MAXIMUM_LENGTH }) => { + expect(DATA_TYPE).to.equal(expectedType) + expect(CHARACTER_MAXIMUM_LENGTH).to.equal( + expectedLength, + ) + }, + ) + }), + )) + }) + + describe("entity-metadata-validator", () => { + it("should throw error if mariadb uuid is supported and length is provided to property", async () => { + Promise.all( + ["BadInet4", "BadInet6", "BadUuid"].map(async (entity) => { + const entityLocation = `${__dirname}/badEntity/${entity}{.js,.ts}"` + const connection = new DataSource({ + // dummy connection options, connection won't be established anyway + type: "mariadb", + host: "localhost", + username: "test", + password: "test", + database: "test", + entities: [entityLocation], + }) + + // version supports all the new types + connection.driver.version = "10.10.0" + + const connectionMetadataBuilder = + new ConnectionMetadataBuilder(connection) + const entityMetadatas = + await connectionMetadataBuilder.buildEntityMetadatas([ + entityLocation, + ]) + const entityMetadataValidator = + new EntityMetadataValidator() + expect(() => + entityMetadataValidator.validateMany( + entityMetadatas, + connection.driver, + ), + ).to.throw(Error) + }), + ) + }) + + it("should not throw error for mysql when uuid is provided and a length property is provided", async () => { + Promise.all( + ["BadInet4", "BadInet6", "BadUuid"].map(async (entity) => { + const entityLocation = `${__dirname}/badEntity/${entity}{.js,.ts}"` + const connection = new DataSource({ + // dummy connection options, connection won't be established anyway + type: "mysql", + host: "localhost", + username: "test", + password: "test", + database: "test", + entities: [entityLocation], + }) + + // version supports all the new types + connection.driver.version = "10.10.0" + + const connectionMetadataBuilder = + new ConnectionMetadataBuilder(connection) + const entityMetadatas = + await connectionMetadataBuilder.buildEntityMetadatas([ + entityLocation, + ]) + const entityMetadataValidator = + new EntityMetadataValidator() + expect(() => + entityMetadataValidator.validateMany( + entityMetadatas, + connection.driver, + ), + ).not.to.throw() + }), + ) + }) + }) +}) diff --git a/test/github-issues/8975/issue-8975.ts b/test/github-issues/8975/issue-8975.ts index 397bc1cde0..07ddc41264 100644 --- a/test/github-issues/8975/issue-8975.ts +++ b/test/github-issues/8975/issue-8975.ts @@ -1,5 +1,6 @@ import { expect } from "chai" import { exec } from "child_process" +import { readFileSync, writeFileSync } from "fs" import { dirname } from "path" import rimraf from "rimraf" @@ -29,35 +30,30 @@ describe("cli init command", () => { }) }) - const copyPromise = new Promise((resolve) => { - exec( - `cp package.json ${builtSrcDirectory}`, - (error, stdout, stderr) => { - expect(error).to.not.exist - expect(stderr).to.be.empty - - resolve() - }, + const copyPromise = new Promise(async (resolve) => { + // load package.json from the root of the project + const packageJson = JSON.parse( + readFileSync("./package.json", "utf8"), ) + packageJson.version = `0.0.0` // install no version but + packageJson.installFrom = `file:../${builtSrcDirectory}` // use the built src directory + // write the modified package.json to the build directory + writeFileSync( + `./${builtSrcDirectory}/package.json`, + JSON.stringify(packageJson, null, 4), + ) + resolve() }) await Promise.all([chmodPromise, copyPromise]) }) - after((done) => { - rimraf(`./${builtSrcDirectory}/package.json`, (error) => { - expect(error).to.not.exist - - done() - }) + after(async () => { + await rimraf(`./${builtSrcDirectory}/package.json`) }) - afterEach((done) => { - rimraf(`./${testProjectName}`, (error) => { - expect(error).to.not.exist - - done() - }) + afterEach(async () => { + await rimraf(`./${testProjectName}`) }) for (const databaseOption of databaseOptions) { @@ -65,12 +61,13 @@ describe("cli init command", () => { exec( `${cliPath} init --name ${testProjectName} --database ${databaseOption}`, (error, stdout, stderr) => { + if (error) console.log(error) expect(error).to.not.exist expect(stderr).to.be.empty done() }, ) - }).timeout(90000) + }).timeout(120000) } }) diff --git a/test/github-issues/9033/entity/Animal.ts b/test/github-issues/9033/entity/Animal.ts new file mode 100644 index 0000000000..bbb282e5c9 --- /dev/null +++ b/test/github-issues/9033/entity/Animal.ts @@ -0,0 +1,22 @@ +import { + Column, + Entity, + PrimaryGeneratedColumn, + TableInheritance, +} from "../../../../src" + +@Entity("animal") +@TableInheritance({ column: { type: "varchar", name: "type" } }) +export class AnimalEntity { + @PrimaryGeneratedColumn() + id: number + + @Column({ type: "varchar" }) + name: string + + @Column({ + name: "type", + type: "varchar", + }) + type: string +} diff --git a/test/github-issues/9033/entity/Cat.ts b/test/github-issues/9033/entity/Cat.ts new file mode 100644 index 0000000000..940b53f7a8 --- /dev/null +++ b/test/github-issues/9033/entity/Cat.ts @@ -0,0 +1,10 @@ +import { ChildEntity, Column } from "../../../../src" + +import { AnimalEntity } from "./Animal" + +@ChildEntity("cat") +export class CatEntity extends AnimalEntity { + // Cat stuff + @Column() + livesLeft: number +} diff --git a/test/github-issues/9033/issue-9033.ts b/test/github-issues/9033/issue-9033.ts new file mode 100644 index 0000000000..0d74ac0683 --- /dev/null +++ b/test/github-issues/9033/issue-9033.ts @@ -0,0 +1,48 @@ +import "reflect-metadata" +import { + createTestingConnections, + closeTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/index" +import { expect } from "chai" + +import { CatEntity } from "./entity/Cat" +import { AnimalEntity } from "./entity/Animal" + +describe("github issues > #9033 Cannot manually insert type in discriminator column of parent entity class when\ +using single table inheritance when creating instance of parent entity", () => { + let dataSources: DataSource[] + before( + async () => + (dataSources = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + schemaCreate: true, + dropSchema: true, + })), + ) + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("is possible to set the discriminator column manually on the base entity", () => + Promise.all( + dataSources.map(async (dataSource) => { + const entityManager = dataSource.createEntityManager() + const animalRepo = entityManager.getRepository(AnimalEntity) + + // Create a base class entity while manually setting discriminator. + const maybeACat = animalRepo.create({ + name: "i-am-maybe-a-cat", + type: "cat", // This is the discriminator for `CatEntity`. + }) + await entityManager.save(maybeACat) + + // Load the animal / cat from the database. + const animals = await animalRepo.find() + expect(animals.length).to.equal(1) + + expect(animals[0]).to.be.instanceOf(CatEntity) + expect(animals[0].type).to.equal("cat") + }), + )) +}) diff --git a/test/github-issues/9049/entity/post.entity.ts b/test/github-issues/9049/entity/post.entity.ts index 03bdb8eae6..d48a3d7b9d 100644 --- a/test/github-issues/9049/entity/post.entity.ts +++ b/test/github-issues/9049/entity/post.entity.ts @@ -1,11 +1,11 @@ -import { ObjectID } from "../../../../src/driver/mongodb/typings" +import { ObjectId } from "../../../../src/driver/mongodb/typings" import { Comment } from "./comment" import { Column, Entity, ObjectIdColumn } from "../../../../src" @Entity() export class Post { @ObjectIdColumn() - _id?: ObjectID + _id?: ObjectId @Column(() => Comment) comments: Comment[] diff --git a/test/github-issues/9049/entity/value.ts b/test/github-issues/9049/entity/value.ts index 0d8ef81777..97e50eeea7 100644 --- a/test/github-issues/9049/entity/value.ts +++ b/test/github-issues/9049/entity/value.ts @@ -1,8 +1,8 @@ -import { Column, ObjectID, ObjectIdColumn } from "../../../../src" +import { Column, ObjectId, ObjectIdColumn } from "../../../../src" export class Value { @ObjectIdColumn() - _id?: ObjectID + _id?: ObjectId @Column({ type: "string" }) description: string diff --git a/test/github-issues/9152/entity/Test.ts b/test/github-issues/9152/entity/Test.ts new file mode 100644 index 0000000000..31aae90b3c --- /dev/null +++ b/test/github-issues/9152/entity/Test.ts @@ -0,0 +1,12 @@ +import { Column, Entity, PrimaryGeneratedColumn } from "../../../../src" + +export type ValueUnion = 1 | 2 | 3 + +@Entity() +export class Test { + @PrimaryGeneratedColumn({ unsigned: true }) + id: number + + @Column() + value: ValueUnion +} diff --git a/test/github-issues/9152/issue-9152.ts b/test/github-issues/9152/issue-9152.ts new file mode 100644 index 0000000000..ffa47737b2 --- /dev/null +++ b/test/github-issues/9152/issue-9152.ts @@ -0,0 +1,39 @@ +import "reflect-metadata" +import { expect } from "chai" +import { Test, ValueUnion } from "./entity/Test" +import { DataSource } from "../../../src/data-source/DataSource" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { LessThan } from "../../../src" + +describe("github issues > #9152 Can't use LessThan for Union field", () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + entities: [Test], + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("should not raise TypeScript error when LessThan with Union is passed to FindOptionsWhere", () => + Promise.all( + connections.map(async (connection) => { + await connection.getRepository(Test).save({ + value: 1, + }) + + const value = 2 as ValueUnion + + const count = await connection.getRepository(Test).countBy({ + value: LessThan(value), + }) + + expect(count).to.eq(1) + }), + )) +}) diff --git a/test/github-issues/9189/entity/GroupEntity.ts b/test/github-issues/9189/entity/GroupEntity.ts new file mode 100644 index 0000000000..5395734e50 --- /dev/null +++ b/test/github-issues/9189/entity/GroupEntity.ts @@ -0,0 +1,12 @@ +import { Entity, ManyToOne } from "../../../../src" +import { PrimaryGeneratedColumn } from "../../../../src" +import type { UserEntity } from "./UserEntity" + +@Entity() +export class GroupEntity { + @PrimaryGeneratedColumn() + id: number + + @ManyToOne("UserEntity", "group", { onDelete: "RESTRICT" }) + user: UserEntity +} diff --git a/test/github-issues/9189/entity/UserEntity.ts b/test/github-issues/9189/entity/UserEntity.ts new file mode 100644 index 0000000000..0d54a4cb57 --- /dev/null +++ b/test/github-issues/9189/entity/UserEntity.ts @@ -0,0 +1,12 @@ +import { Entity, OneToMany } from "../../../../src" +import { PrimaryGeneratedColumn } from "../../../../src" +import { GroupEntity } from "./GroupEntity" + +@Entity() +export class UserEntity { + @PrimaryGeneratedColumn() + id: number + + @OneToMany("GroupEntity", "user") + group: GroupEntity +} diff --git a/test/github-issues/9189/issue-9189.ts b/test/github-issues/9189/issue-9189.ts new file mode 100644 index 0000000000..6f3664315d --- /dev/null +++ b/test/github-issues/9189/issue-9189.ts @@ -0,0 +1,38 @@ +import "reflect-metadata" +import { + closeTestingConnections, + createTestingConnections, +} from "../../utils/test-utils" +import { DataSource, TypeORMError } from "../../../src" +import { expect } from "chai" + +describe("github issues > #9189 check invalid constraint options", () => { + let dataSources: DataSource[] = [] + + after(() => closeTestingConnections(dataSources)) + + it("should throw an exception, when invalid option is configured", async () => { + let err + try { + await Promise.all( + (dataSources = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + schemaCreate: false, + dropSchema: true, + enabledDrivers: ["oracle"], + })), + ) + } catch (e) { + err = e + } + if (err) + // skip for other databases + expect(err).to.eql( + new TypeORMError( + 'OnDeleteType "RESTRICT" is not supported for oracle!', + ), + ) + }) + + // you can add additional tests if needed +}) diff --git a/test/github-issues/9266/issue-9266.ts b/test/github-issues/9266/issue-9266.ts new file mode 100644 index 0000000000..0fd17106d5 --- /dev/null +++ b/test/github-issues/9266/issue-9266.ts @@ -0,0 +1,33 @@ +import { expect } from "chai" +import "reflect-metadata" +import { DataSource } from "../../../src/data-source/DataSource" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" + +describe("github issues > #9266 queryRunner.getTable() fails if Foreign Key is set in target table", () => { + let connections: DataSource[] + before(async () => { + connections = await createTestingConnections({ + migrations: [__dirname + "/migrations/*{.js,.ts}"], + enabledDrivers: ["sqlite", "better-sqlite3"], + }) + }) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("should be able to load tables", () => + Promise.all( + connections.map(async (connection) => { + await connection.runMigrations() + const queryRunner = connection.createQueryRunner() + const tables = await queryRunner.getTables() + const tableNames = tables.map((table) => table.name) + expect(tableNames).to.include("author") + expect(tableNames).to.include("post") + await queryRunner.release() + }), + )) +}) diff --git a/test/github-issues/9266/migrations/init.ts b/test/github-issues/9266/migrations/init.ts new file mode 100644 index 0000000000..b42fdf6631 --- /dev/null +++ b/test/github-issues/9266/migrations/init.ts @@ -0,0 +1,15 @@ +import { MigrationInterface, QueryRunner } from "../../../../src" + +export class CreateDatabase implements MigrationInterface { + name = "CreateDatabase1623518107000" + async up(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `CREATE TABLE "author" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL)`, + ) + await queryRunner.query( + `CREATE TABLE "post" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "text" varchar NOT NULL, "authorId" integer NOT NULL REFERENCES author(id) ON DELETE CASCADE ON UPDATE NO ACTION)`, + ) + } + + async down(queryRunner: QueryRunner): Promise {} +} diff --git a/test/github-issues/9323/issue-9323.ts b/test/github-issues/9323/issue-9323.ts index da3419f5ed..e704366d59 100644 --- a/test/github-issues/9323/issue-9323.ts +++ b/test/github-issues/9323/issue-9323.ts @@ -121,7 +121,7 @@ describe("github issues > #9323 Add new VirtualColumn decorator feature", () => }), )) - it("should be able to save and find sub-select data in the databse", () => + it("should be able to save and find sub-select data in the database", () => Promise.all( connections.map(async (connection) => { const companyName = "My Company 1" diff --git a/test/github-issues/9341/entity/TestEntity.ts b/test/github-issues/9341/entity/TestEntity.ts new file mode 100644 index 0000000000..24df1b81b6 --- /dev/null +++ b/test/github-issues/9341/entity/TestEntity.ts @@ -0,0 +1,13 @@ +import { Column, Entity, PrimaryGeneratedColumn } from "../../../../src" + +@Entity() +export class TestEntity { + @PrimaryGeneratedColumn() + id: number + + @Column({ type: "bigint", nullable: true }) + big_int: number + + @Column({ type: "numeric", nullable: true }) + big_decimal: number +} diff --git a/test/github-issues/9341/issue-9341.ts b/test/github-issues/9341/issue-9341.ts new file mode 100644 index 0000000000..59e6f19054 --- /dev/null +++ b/test/github-issues/9341/issue-9341.ts @@ -0,0 +1,53 @@ +import "reflect-metadata" +import { expect } from "chai" +import { DataSource } from "../../../src/data-source/DataSource" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { TestEntity } from "./entity/TestEntity" + +describe('github issues > #9341 "bigNumberStrings:false" is not working for postgres', () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + enabledDrivers: ["postgres"], + driverSpecific: { + parseInt8: true, + }, + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("should fetch big int as number not string when using parseInt8=true", async () => { + for (const connection of connections) { + const origin = await connection.getRepository(TestEntity).save({ + big_int: Number.MAX_SAFE_INTEGER, + big_decimal: 1.23456789, + }) + + const result = await connection.getRepository(TestEntity).findOne({ + where: { id: origin.id }, + }) + + // count also returns bigint (as string by default) + const [{ count }] = await connection.query( + `select count(*) from (VALUES (1), (2), (3)) as tmp`, + ) + + // big int should be number + expect(typeof result?.big_int).to.eq("number") + expect(result?.big_int).to.eq(Number.MAX_SAFE_INTEGER) + // big decimal should remain string, only int8 is parsed + expect(typeof result?.big_decimal).to.eq("string") + expect(result?.big_decimal).to.eq("1.23456789") + // count should be number (it is int8) + expect(typeof count).to.eq("number") + expect(count).to.eq(3) + } + }) +}) diff --git a/test/github-issues/9381/entity/ExampleEntity.ts b/test/github-issues/9381/entity/ExampleEntity.ts new file mode 100644 index 0000000000..ecd0f6b1f0 --- /dev/null +++ b/test/github-issues/9381/entity/ExampleEntity.ts @@ -0,0 +1,17 @@ +import { Entity, Generated, PrimaryColumn } from "../../../../src" + +const ID_TRANSFORMER = { + from: (dbValue: number) => dbValue?.toString(), + to: (entityValue: string) => + entityValue ? Number(entityValue) : entityValue, +} + +@Entity() +export class ExampleEntity { + @Generated("increment") + @PrimaryColumn({ + type: "integer", + transformer: ID_TRANSFORMER, + }) + id: string +} diff --git a/test/github-issues/9381/entity/JsonExampleEntity.ts b/test/github-issues/9381/entity/JsonExampleEntity.ts new file mode 100644 index 0000000000..eee436682a --- /dev/null +++ b/test/github-issues/9381/entity/JsonExampleEntity.ts @@ -0,0 +1,29 @@ +import { Column, Entity, Generated, PrimaryColumn } from "../../../../src" + +const ID_TRANSFORMER = { + from: (dbValue: number) => dbValue?.toString(), + to: (entityValue: string) => + entityValue ? Number(entityValue) : entityValue, +} + +const JSON_TRANSFORMER = { + to: (value: any) => ({ wrap: value }), + from: (value: { wrap: any }) => value.wrap, +} + +@Entity() +export class JsonExampleEntity { + constructor(value: any) { + this.jsonvalue = value + } + + @Generated("increment") + @PrimaryColumn({ + type: "integer", + transformer: ID_TRANSFORMER, + }) + id: string + + @Column({ type: "jsonb", transformer: JSON_TRANSFORMER }) + jsonvalue: any +} diff --git a/test/github-issues/9381/issue-9381.ts b/test/github-issues/9381/issue-9381.ts new file mode 100644 index 0000000000..2421f7592e --- /dev/null +++ b/test/github-issues/9381/issue-9381.ts @@ -0,0 +1,124 @@ +import "reflect-metadata" +import { + closeTestingConnections, + createTestingConnections, +} from "../../utils/test-utils" +import { In, JsonContains, Not } from "../../../src" +import { ExampleEntity } from "./entity/ExampleEntity" +import { expect } from "chai" +import { JsonExampleEntity } from "./entity/JsonExampleEntity" + +describe("github issues > #9381 The column option ใ€Štransformerใ€‹ affects the result of the query condition generation", () => { + it("transform and find values", async () => { + const dataSources = await createTestingConnections({ + entities: [__dirname + "/entity/ExampleEntity{.js,.ts}"], + schemaCreate: true, + dropSchema: true, + }) + + await Promise.all( + dataSources.map(async (dataSource) => { + let repository = dataSource.getRepository(ExampleEntity) + await repository.save(new ExampleEntity()) + await repository.save(new ExampleEntity()) + await repository.save(new ExampleEntity()) + await repository.save(new ExampleEntity()) + await repository.save(new ExampleEntity()) + const resultFindAll = await repository.find() + expect(resultFindAll.length).to.be.eql(5) + + const resultTransformer = await repository.findBy({ + id: Not(In(["1", "3", "5"])), + }) + expect(resultTransformer).to.be.eql([ + { + id: "2", + }, + { + id: "4", + }, + ]) + const findEqualsTransformer = await repository.findOne({ + where: { + id: "1", + }, + }) + expect(findEqualsTransformer).to.be.eql({ id: "1" }) + }), + ) + + await closeTestingConnections(dataSources) + }) + + it("transform json values and find values", async () => { + const dataSources = await createTestingConnections({ + entities: [__dirname + "/entity/JsonExampleEntity{.js,.ts}"], + schemaCreate: true, + dropSchema: true, + enabledDrivers: ["postgres"], + }) + + await Promise.all( + dataSources.map(async (dataSource) => { + let repository = dataSource.getRepository(JsonExampleEntity) + await repository.save(new JsonExampleEntity({ foo: "bar1" })) + await repository.save(new JsonExampleEntity({ foo: "bar2" })) + await repository.save(new JsonExampleEntity({ foo: "bar3" })) + await repository.save(new JsonExampleEntity({ foo: "bar4" })) + await repository.save(new JsonExampleEntity({ foo: "bar5" })) + await repository.save( + new JsonExampleEntity({ foo: { bar: [5, 6, 7, 8] } }), + ) + await repository.save(new JsonExampleEntity([5, 6, 7, 8])) + + const resultTransformer = await repository.findBy({ + id: Not(In(["1", "3", "5", "6", "7"])), + }) + expect(resultTransformer).to.be.eql([ + { + id: "2", + jsonvalue: { + foo: "bar2", + }, + }, + { + id: "4", + jsonvalue: { + foo: "bar4", + }, + }, + ]) + + let result = await repository.findOneBy({ + jsonvalue: JsonContains({ foo: "bar1" }), + }) + expect(result).to.be.eql({ + id: "1", + jsonvalue: { + foo: "bar1", + }, + }) + + result = await repository.findOneBy({ + jsonvalue: JsonContains({ foo: {} }), + }) + expect(result).to.be.eql({ + id: "6", + jsonvalue: { + foo: { bar: [5, 6, 7, 8] }, + }, + }) + + result = await repository.findOneBy({ + jsonvalue: JsonContains([5, 6, 7, 8] as any), + }) + expect(result).to.be.eql({ + id: "7", + jsonvalue: [5, 6, 7, 8], + }) + }), + ) + await closeTestingConnections(dataSources) + }) + // you can add additional tests if needed +}) diff --git a/test/github-issues/9399/entity/ExampleEntity.ts b/test/github-issues/9399/entity/ExampleEntity.ts new file mode 100644 index 0000000000..64b26807e3 --- /dev/null +++ b/test/github-issues/9399/entity/ExampleEntity.ts @@ -0,0 +1,13 @@ +import { Entity, Generated } from "../../../../src" +import { PrimaryGeneratedColumn } from "../../../../src" +import { Column } from "../../../../src" + +@Entity() +export class ExampleEntity { + @Generated("increment") + @PrimaryGeneratedColumn() + id: number + + @Column({ type: "nvarchar", length: "max" }) + value: string +} diff --git a/test/github-issues/9399/issue-9399.ts b/test/github-issues/9399/issue-9399.ts new file mode 100644 index 0000000000..5b6481e16d --- /dev/null +++ b/test/github-issues/9399/issue-9399.ts @@ -0,0 +1,34 @@ +import "reflect-metadata" +import { + createTestingConnections, + closeTestingConnections, +} from "../../utils/test-utils" +import { DataSource } from "../../../src" +import { expect } from "chai" + +describe("github issues > #9399 mssql: Column is dropped and recreated in every migration", () => { + let dataSources: DataSource[] + before( + async () => + (dataSources = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + schemaCreate: true, + dropSchema: true, + enabledDrivers: ["mssql"], + })), + ) + after(() => closeTestingConnections(dataSources)) + + it("No migration should be created", () => + Promise.all( + dataSources.map(async (dataSource) => { + await dataSource.runMigrations() + const sqlInMemory = await dataSource.driver + .createSchemaBuilder() + .log() + + expect(sqlInMemory.upQueries.length).to.eql(0) + expect(sqlInMemory.downQueries.length).to.eql(0) + }), + )) +}) diff --git a/test/github-issues/9405/entity/Change.ts b/test/github-issues/9405/entity/Change.ts new file mode 100644 index 0000000000..0dc261174f --- /dev/null +++ b/test/github-issues/9405/entity/Change.ts @@ -0,0 +1,29 @@ +import { + Column, + Entity, + ManyToOne, + PrimaryGeneratedColumn, +} from "../../../../src/index" +import { ChangeLog } from "./ChangeLog" + +@Entity() +export class Change { + @PrimaryGeneratedColumn("increment") + id: number + + @Column("varchar", { nullable: false, length: 255 }) + propertyName: string + + @Column("json", { nullable: true }) + oldValue?: any + + @Column("json", { nullable: true }) + newValue?: any + + @ManyToOne(() => ChangeLog, { + cascade: false, + nullable: false, + onDelete: "CASCADE", + }) + public log: ChangeLog +} diff --git a/test/github-issues/9405/entity/ChangeLog.ts b/test/github-issues/9405/entity/ChangeLog.ts new file mode 100644 index 0000000000..3ce27f14a2 --- /dev/null +++ b/test/github-issues/9405/entity/ChangeLog.ts @@ -0,0 +1,9 @@ +import { OneToMany, ChildEntity } from "../../../../src/index" +import { Change } from "./Change" +import { Log } from "./Log" + +@ChildEntity() +export abstract class ChangeLog extends Log { + @OneToMany(() => Change, (change) => change.log, { cascade: true }) + changes: Change[] +} diff --git a/test/github-issues/9405/entity/EmailChanged.ts b/test/github-issues/9405/entity/EmailChanged.ts new file mode 100644 index 0000000000..0fe6128488 --- /dev/null +++ b/test/github-issues/9405/entity/EmailChanged.ts @@ -0,0 +1,7 @@ +import { ChildEntity } from "../../../../src/index" +import { ChangeLog } from "./ChangeLog" + +export class Email {} + +@ChildEntity() +export class EmailChanged extends ChangeLog {} diff --git a/test/github-issues/9405/entity/Log.ts b/test/github-issues/9405/entity/Log.ts new file mode 100644 index 0000000000..a417697ed1 --- /dev/null +++ b/test/github-issues/9405/entity/Log.ts @@ -0,0 +1,12 @@ +import { + Entity, + PrimaryGeneratedColumn, + TableInheritance, +} from "../../../../src/index" + +@Entity() +@TableInheritance({ column: { type: "varchar", name: "type" } }) +export abstract class Log { + @PrimaryGeneratedColumn("increment") + id: number +} diff --git a/test/github-issues/9405/issue-9405.ts b/test/github-issues/9405/issue-9405.ts new file mode 100644 index 0000000000..288b3a9060 --- /dev/null +++ b/test/github-issues/9405/issue-9405.ts @@ -0,0 +1,35 @@ +import "reflect-metadata" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/index" +import { Email, EmailChanged } from "./entity/EmailChanged" +import { Change } from "./entity/Change" +import { Log } from "./entity/Log" + +describe("github issues > #9405 Incorrect subject sorting with multi-inheritance entities", () => { + let dataSources: DataSource[] + before( + async () => + (dataSources = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + enabledDrivers: ["postgres"], + })), + ) + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("should correctly sort entities with multi-inheritances", () => + Promise.all( + dataSources.map(async (dataSource) => { + const emailChanged = new EmailChanged() + const change = new Change() + change.propertyName = "Example" + emailChanged.changes = [change] + + await dataSource.getRepository(Log).save(emailChanged) + }), + )) +}) diff --git a/test/github-issues/9410/issue-9410.ts b/test/github-issues/9410/issue-9410.ts new file mode 100644 index 0000000000..69c0b3ff41 --- /dev/null +++ b/test/github-issues/9410/issue-9410.ts @@ -0,0 +1,33 @@ +import "reflect-metadata" +import { expect } from "chai" +import { DataSource } from "../../../src/data-source/DataSource" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" + +describe("better-sqlite3 driver > enable wal", () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + entities: [], + enabledDrivers: ["better-sqlite3"], + driverSpecific: { + enableWAL: true, + }, + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("github issues > #9410 The better-sqlite3 driver should support the enableWal flag", () => + Promise.all( + connections.map(async (connection) => { + const result = await connection.query("PRAGMA journal_mode") + + expect(result).to.eql([{ journal_mode: "wal" }]) + }), + )) +}) diff --git a/test/github-issues/9412/entity/Post.ts b/test/github-issues/9412/entity/Post.ts new file mode 100644 index 0000000000..263907dbf1 --- /dev/null +++ b/test/github-issues/9412/entity/Post.ts @@ -0,0 +1,15 @@ +import { Entity } from "../../../../src/decorator/entity/Entity" +import { PrimaryGeneratedColumn } from "../../../../src/decorator/columns/PrimaryGeneratedColumn" +import { Column } from "../../../../src/decorator/columns/Column" + +@Entity() +export class Post { + @PrimaryGeneratedColumn() + id: number + + @Column({ unique: true }) + title: string + + @Column({ unique: true }) + author: string +} diff --git a/test/github-issues/9412/issue-9412.ts b/test/github-issues/9412/issue-9412.ts new file mode 100644 index 0000000000..e8122737e5 --- /dev/null +++ b/test/github-issues/9412/issue-9412.ts @@ -0,0 +1,52 @@ +import "reflect-metadata" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/DataSource" +import { Post } from "./entity/Post" +import { expect } from "chai" + +describe("github issues > #9365 ", () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + enabledDrivers: ["postgres"], + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("should work with conflict path", () => + Promise.all( + connections.map(async (connection) => { + const postRepository = connection.getRepository(Post) + + const post1 = new Post() + post1.title = "Test1" + post1.author = "Test1" + await postRepository.save(post1) + + const post2 = new Post() + post2.title = "Test" + post2.author = "Test2" + + await postRepository.upsert(post2, { + conflictPaths: { author: true }, + skipUpdateIfNoValuesChanged: true, + }) + const allPostsAfterUpsert1 = await postRepository.find() + expect(allPostsAfterUpsert1.length).equal(2) + + await postRepository.upsert(post2, { + conflictPaths: { title: true }, + skipUpdateIfNoValuesChanged: true, + }) + const allPostsAfterUpsert2 = await postRepository.find() + expect(allPostsAfterUpsert2.length).equal(2) + }), + )) +}) diff --git a/test/github-issues/9457/entity/ExampleEntity.ts b/test/github-issues/9457/entity/ExampleEntity.ts new file mode 100644 index 0000000000..d4893722a9 --- /dev/null +++ b/test/github-issues/9457/entity/ExampleEntity.ts @@ -0,0 +1,25 @@ +import { Entity } from "../../../../src/decorator/entity/Entity" +import { Column } from "../../../../src/decorator/columns/Column" +import { PrimaryGeneratedColumn } from "../../../../src/decorator/columns/PrimaryGeneratedColumn" +import { Generated } from "../../../../src" + +export enum ExampleEnum { + EnumValue1 = "enumvalue1", + EnumValue2 = "enumvalue2", + EnumValue3 = "enumvalue3", + EnumValue4 = "enumvalue4", +} + +@Entity() +export class ExampleEntity { + @Generated("increment") + @PrimaryGeneratedColumn() + id: number + + @Column({ + length: 255, + type: "simple-enum", + enum: ExampleEnum, + }) + enumcolumn: ExampleEnum +} diff --git a/test/github-issues/9457/issue-9457.ts b/test/github-issues/9457/issue-9457.ts new file mode 100644 index 0000000000..41dff9fdc3 --- /dev/null +++ b/test/github-issues/9457/issue-9457.ts @@ -0,0 +1,48 @@ +import "reflect-metadata" +import { + createTestingConnections, + closeTestingConnections, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/DataSource" +import { expect } from "chai" + +describe("github issues > #9457 No changes in database schema were found, when simple-enum is changed.", () => { + let dataSources: DataSource[] + before(async () => { + dataSources = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + migrations: [__dirname + "/migration/*{.js,.ts}"], + schemaCreate: false, + dropSchema: true, + enabledDrivers: ["mssql"], + }) + }) + after(() => closeTestingConnections(dataSources)) + + it("should drop and recreate 'CHECK' constraint to match enum values", () => + Promise.all( + dataSources.map(async (dataSource) => { + await dataSource.runMigrations() + + const sqlInMemory = await dataSource.driver + .createSchemaBuilder() + .log() + + expect(sqlInMemory.upQueries.length).to.eql(2) + expect(sqlInMemory.upQueries[0].query).to.eql( + 'ALTER TABLE "example_entity" DROP CONSTRAINT "CHK_a80c9d6a2a8749d7aadb857dc6_ENUM"', + ) + expect(sqlInMemory.upQueries[1].query).to.eql( + `ALTER TABLE "example_entity" ADD CONSTRAINT "CHK_be8ed063b3976da24df4213baf_ENUM" CHECK (enumcolumn IN ('enumvalue1','enumvalue2','enumvalue3','enumvalue4'))`, + ) + + expect(sqlInMemory.downQueries.length).to.eql(2) + expect(sqlInMemory.downQueries[0].query).to.eql( + 'ALTER TABLE "example_entity" DROP CONSTRAINT "CHK_be8ed063b3976da24df4213baf_ENUM"', + ) + expect(sqlInMemory.downQueries[1].query).to.eql( + `ALTER TABLE "example_entity" ADD CONSTRAINT "CHK_a80c9d6a2a8749d7aadb857dc6_ENUM" CHECK (enumcolumn IN ('enumvalue1','enumvalue2','enumvalue3'))`, + ) + }), + )) +}) diff --git a/test/github-issues/9457/migration/1676011161422-init.ts b/test/github-issues/9457/migration/1676011161422-init.ts new file mode 100644 index 0000000000..22c5dec989 --- /dev/null +++ b/test/github-issues/9457/migration/1676011161422-init.ts @@ -0,0 +1,20 @@ +import { MigrationInterface, QueryRunner } from "../../../../src" + +export class init1676011161422 implements MigrationInterface { + name = "init1676011161422" + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `CREATE TABLE "example_entity" + ( + "id" int NOT NULL IDENTITY(1,1), + "enumcolumn" nvarchar(255) CONSTRAINT CHK_a80c9d6a2a8749d7aadb857dc6_ENUM CHECK (enumcolumn IN ('enumvalue1','enumvalue2','enumvalue3')) NOT NULL, + CONSTRAINT "PK_fccd73330168066a434dbac114f" PRIMARY KEY ("id") + )`, + ) + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`DROP TABLE "example_entity"`) + } +} diff --git a/test/github-issues/9518/entity/Post.ts b/test/github-issues/9518/entity/Post.ts new file mode 100644 index 0000000000..064054a569 --- /dev/null +++ b/test/github-issues/9518/entity/Post.ts @@ -0,0 +1,10 @@ +import { Column, Entity, ObjectId, ObjectIdColumn } from "../../../../src" + +@Entity() +export class Post { + @ObjectIdColumn() + id: ObjectId + + @Column() + title: string +} diff --git a/test/github-issues/9518/issue-9518.ts b/test/github-issues/9518/issue-9518.ts new file mode 100644 index 0000000000..9ac9992cec --- /dev/null +++ b/test/github-issues/9518/issue-9518.ts @@ -0,0 +1,46 @@ +import "reflect-metadata" +import { + createTestingConnections, + closeTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/DataSource" +import { expect } from "chai" +import { Post } from "./entity/Post" + +describe("github issues > #9518 Can't pass ObjectLiteral in MongoRepository.find where condition due to typings", () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + entities: [Post], + enabledDrivers: ["mongodb"], + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("should be able to use ObjectLiteral in find where condition", () => + Promise.all( + connections.map(async (connection) => { + const postRepository = connection.getMongoRepository(Post) + + const firstPost = new Post() + firstPost.title = "Post #1" + await postRepository.save(firstPost) + + const secondPost = new Post() + secondPost.title = "Post #2" + await postRepository.save(secondPost) + + const loadedPosts = await postRepository.find({ + where: { + title: { $in: ["Post #1"] }, + }, + }) + + expect(loadedPosts).to.have.length(1) + expect(loadedPosts[0].title).to.eql("Post #1") + }), + )) +}) diff --git a/test/github-issues/9534/entity/Category.ts b/test/github-issues/9534/entity/Category.ts new file mode 100644 index 0000000000..bbe2482630 --- /dev/null +++ b/test/github-issues/9534/entity/Category.ts @@ -0,0 +1,41 @@ +import { PrimaryGeneratedColumn } from "../../../../src/decorator/columns/PrimaryGeneratedColumn" +import { Column } from "../../../../src/decorator/columns/Column" +import { TreeParent } from "../../../../src/decorator/tree/TreeParent" +import { TreeChildren } from "../../../../src/decorator/tree/TreeChildren" +import { Entity } from "../../../../src/decorator/entity/Entity" +import { Tree } from "../../../../src/decorator/tree/Tree" +import { JoinColumn } from "../../../../src/decorator/relations/JoinColumn" + +@Entity({ name: "categories" }) +@Tree("materialized-path") +export class Category { + @PrimaryGeneratedColumn() + id: number + + @Column({ + type: "varchar", + name: "uid", + unique: true, + }) + uid: string + + @Column() + name: string + + @Column({ + type: "varchar", + name: "parentUid", + nullable: true, + }) + parentUid?: string | null + + @TreeParent() + @JoinColumn({ + name: "parentUid", + referencedColumnName: "uid", + }) + parentCategory?: Category | null + + @TreeChildren({ cascade: true }) + childCategories: Category[] +} diff --git a/test/github-issues/9534/issue-9534.ts b/test/github-issues/9534/issue-9534.ts new file mode 100644 index 0000000000..e12775e0ff --- /dev/null +++ b/test/github-issues/9534/issue-9534.ts @@ -0,0 +1,243 @@ +import "reflect-metadata" +import { Category } from "./entity/Category" +import { DataSource } from "../../../src" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" + +describe("github issues > #9534 materialized-path", () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + entities: [Category], + // logging: true, + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("attach should work properly", () => + Promise.all( + connections.map(async (connection) => { + const categoryRepository = + connection.getTreeRepository(Category) + + const a1 = new Category() + a1.name = "a1" + a1.uid = "a1" + await categoryRepository.save(a1) + + const a11 = new Category() + a11.name = "a11" + a11.uid = "a11" + a11.parentCategory = a1 + await categoryRepository.save(a11) + + const a111 = new Category() + a111.name = "a111" + a111.uid = "a111" + a111.parentCategory = a11 + await categoryRepository.save(a111) + + const a12 = new Category() + a12.name = "a12" + a12.uid = "a12" + a12.parentCategory = a1 + await categoryRepository.save(a12) + // normal part + { + const rootCategories = await categoryRepository.findRoots() + rootCategories.should.be.eql([ + { + id: 1, + name: "a1", + uid: "a1", + parentUid: null, + }, + ]) + + const a11Parent = await categoryRepository.findAncestors( + a11, + ) + a11Parent.length.should.be.equal(2) + a11Parent.should.deep.include({ + id: 1, + name: "a1", + uid: "a1", + parentUid: null, + }) + a11Parent.should.deep.include({ + id: 2, + name: "a11", + uid: "a11", + parentUid: "a1", + }) + + const a1Children = await categoryRepository.findDescendants( + a1, + ) + a1Children.length.should.be.equal(4) + a1Children.should.deep.include({ + id: 1, + name: "a1", + uid: "a1", + parentUid: null, + }) + a1Children.should.deep.include({ + id: 2, + name: "a11", + uid: "a11", + parentUid: "a1", + }) + a1Children.should.deep.include({ + id: 3, + name: "a111", + uid: "a111", + parentUid: "a11", + }) + a1Children.should.deep.include({ + id: 4, + name: "a12", + uid: "a12", + parentUid: "a1", + }) + } + + a111.parentCategory = null + await categoryRepository.save(a111) + + const rootCategories = await categoryRepository.findRoots() + rootCategories.should.be.eql([ + { + id: 1, + name: "a1", + uid: "a1", + parentUid: null, + }, + { + id: 3, + name: "a111", + uid: "a111", + parentUid: null, + }, + ]) + + const a11Parent = await categoryRepository.findAncestors(a11) + a11Parent.length.should.be.equal(2) + a11Parent.should.deep.include({ + id: 1, + name: "a1", + uid: "a1", + parentUid: null, + }) + a11Parent.should.deep.include({ + id: 2, + name: "a11", + uid: "a11", + parentUid: "a1", + }) + + const a1Children = await categoryRepository.findDescendants(a1) + a1Children.length.should.be.equal(3) + a1Children.should.deep.include({ + id: 1, + name: "a1", + uid: "a1", + parentUid: null, + }) + a1Children.should.deep.include({ + id: 2, + name: "a11", + uid: "a11", + parentUid: "a1", + }) + a1Children.should.deep.include({ + id: 4, + name: "a12", + uid: "a12", + parentUid: "a1", + }) + }), + )) + it("findTrees() tests > findTrees should load all category roots", () => + Promise.all( + connections.map(async (connection) => { + const categoryRepository = + connection.getTreeRepository(Category) + + const a1 = new Category() + a1.name = "a1" + a1.uid = "a1" + + const a11 = new Category() + a11.name = "a11" + a11.uid = "a11" + + const a12 = new Category() + a12.name = "a12" + a12.uid = "a12" + + const a111 = new Category() + a111.name = "a111" + a111.uid = "a111" + + const a112 = new Category() + a112.name = "a112" + a112.uid = "a112" + + a1.childCategories = [a11, a12] + a11.childCategories = [a111, a112] + await categoryRepository.save(a1) + + const categoriesTree = await categoryRepository.findTrees() + // using sort because some drivers returns arrays in wrong order + categoriesTree[0].childCategories.sort((a, b) => a.id - b.id) + categoriesTree[0].childCategories[0].childCategories.sort( + (a, b) => a.id - b.id, + ) + + categoriesTree.should.be.eql([ + { + id: a1.id, + name: "a1", + uid: "a1", + parentUid: null, + childCategories: [ + { + id: a11.id, + name: "a11", + uid: "a11", + parentUid: "a1", + childCategories: [ + { + id: a111.id, + name: "a111", + uid: "a111", + parentUid: "a11", + childCategories: [], + }, + { + id: a112.id, + name: "a112", + uid: "a112", + parentUid: "a11", + childCategories: [], + }, + ], + }, + { + id: a12.id, + name: "a12", + uid: "a12", + parentUid: "a1", + childCategories: [], + }, + ], + }, + ]) + }), + )) +}) diff --git a/test/github-issues/9601/entity/Foo.ts b/test/github-issues/9601/entity/Foo.ts new file mode 100644 index 0000000000..cf9d225ad2 --- /dev/null +++ b/test/github-issues/9601/entity/Foo.ts @@ -0,0 +1,14 @@ +import { + Entity, + PrimaryGeneratedColumn, + UpdateDateColumn, +} from "../../../../src" + +@Entity({ name: "foo", schema: "SYSTEM" }) +export class Foo { + @PrimaryGeneratedColumn({ name: "id" }) + id: number + + @UpdateDateColumn({ name: "updated_at" }) + updatedAt: Date +} diff --git a/test/github-issues/9601/entity/FooView.ts b/test/github-issues/9601/entity/FooView.ts new file mode 100644 index 0000000000..f016b4bf8b --- /dev/null +++ b/test/github-issues/9601/entity/FooView.ts @@ -0,0 +1,13 @@ +import { DataSource, ViewColumn, ViewEntity } from "../../../../src" +import { Foo } from "./Foo" + +@ViewEntity({ + name: "foo_view", + schema: "SYSTEM", + expression: (connection: DataSource) => + connection.createQueryBuilder(Foo, "foo").select(`foo.updatedAt`), +}) +export class FooView { + @ViewColumn() + updatedAt: Date +} diff --git a/test/github-issues/9601/issue-9601.ts b/test/github-issues/9601/issue-9601.ts new file mode 100644 index 0000000000..1d4c88e792 --- /dev/null +++ b/test/github-issues/9601/issue-9601.ts @@ -0,0 +1,43 @@ +import "reflect-metadata" +import { DataSource } from "../../../src/index" +import { + closeTestingConnections, + createTestingConnections, +} from "../../utils/test-utils" + +describe("github issues > #9601 view+schema+synchronize broken for oracle", () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + schemaCreate: false, + dropSchema: true, + enabledDrivers: ["oracle"], + })), + ) + after(() => closeTestingConnections(connections)) + + it("should recognize model changes", () => + Promise.all( + connections.map(async (connection) => { + const sqlInMemory = await connection.driver + .createSchemaBuilder() + .log() + sqlInMemory.upQueries.length.should.be.greaterThan(0) + sqlInMemory.downQueries.length.should.be.greaterThan(0) + }), + )) + + it("should not generate queries when no model changes", () => + Promise.all( + connections.map(async (connection) => { + await connection.driver.createSchemaBuilder().build() + const sqlInMemory = await connection.driver + .createSchemaBuilder() + .log() + sqlInMemory.upQueries.length.should.be.equal(0) + sqlInMemory.downQueries.length.should.be.equal(0) + }), + )) +}) diff --git a/test/github-issues/9664/entities/Address.ts b/test/github-issues/9664/entities/Address.ts new file mode 100644 index 0000000000..d3a5d0e450 --- /dev/null +++ b/test/github-issues/9664/entities/Address.ts @@ -0,0 +1,13 @@ +import { Column, Entity, PrimaryGeneratedColumn } from "../../../../src" + +@Entity() +export class Address { + @PrimaryGeneratedColumn() + id: number + + @Column({ type: "jsonb" }) + country: Record + + @Column({ type: "jsonb" }) + city: Record +} diff --git a/test/github-issues/9664/issue-9664.ts b/test/github-issues/9664/issue-9664.ts new file mode 100644 index 0000000000..09ac3899aa --- /dev/null +++ b/test/github-issues/9664/issue-9664.ts @@ -0,0 +1,81 @@ +import { JsonContains, DataSource } from "../../../src" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { Address } from "./entities/Address" +import { expect } from "chai" + +describe("github issues > #9664 add JsonContains operator ", () => { + let dataSources: DataSource[] + + before(async () => { + dataSources = await createTestingConnections({ + entities: [Address], + enabledDrivers: ["postgres"], + schemaCreate: true, + dropSchema: true, + }) + }) + + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("should find addresses in json field by name", async () => { + await Promise.all( + dataSources.map(async (dataSource) => { + const address1 = new Address() + address1.country = { + code: 1, + name: "United States", + } + address1.city = { + id: 1, + name: "New York", + } + + const address2 = new Address() + address2.country = { + code: 2, + name: "Germany", + } + address2.city = { + id: 2, + name: "Berlin", + } + + await dataSource.manager.save([address1, address2]) + + const addressesByName = await dataSource.manager.find(Address, { + where: { + city: JsonContains({ name: "Berlin" }), + }, + }) + + const emptyAddressesResult = await dataSource.manager.find( + Address, + { + where: { + city: JsonContains({ + name: "Berl", + }), + }, + }, + ) + + // check than operator find correctl + expect(addressesByName).to.have.length(1) + + expect( + addressesByName.find( + (address) => address.city.name === "Berlin", + ), + ).to.be.not.undefined + + // check than operator find correctly empty result + expect(emptyAddressesResult).to.have.length(0) + }), + ) + }) +}) diff --git a/test/github-issues/9673/entity/Fact.ts b/test/github-issues/9673/entity/Fact.ts new file mode 100644 index 0000000000..c441392168 --- /dev/null +++ b/test/github-issues/9673/entity/Fact.ts @@ -0,0 +1,23 @@ +import { + Column, + OneToMany, + Entity, + PrimaryGeneratedColumn, + DeleteDateColumn, +} from "../../../../src" +import { Rule } from "./Rule" + +@Entity("fact") +export class Fact { + @PrimaryGeneratedColumn({ type: "int" }) + id?: number + + @DeleteDateColumn() + deletedAt?: Date + + @OneToMany(() => Rule, (rule) => rule.fact) + rules?: Rule[] + + @Column("varchar") + name!: string +} diff --git a/test/github-issues/9673/entity/Node.ts b/test/github-issues/9673/entity/Node.ts new file mode 100644 index 0000000000..34369ff869 --- /dev/null +++ b/test/github-issues/9673/entity/Node.ts @@ -0,0 +1,44 @@ +import { + TreeChildren, + TreeParent, + OneToMany, + Entity, + PrimaryGeneratedColumn, + DeleteDateColumn, + Column, + Tree, + JoinColumn, +} from "../../../../src" +import { Rule } from "./Rule" + +@Entity("node") +@Tree("materialized-path") +export class Node { + @PrimaryGeneratedColumn({ type: "int" }) + id?: number + + @DeleteDateColumn() + deletedAt?: Date + + @OneToMany(() => Rule, (rule) => rule.node, { + cascade: true, + onDelete: "CASCADE", + }) + rules?: Rule[] + + @Column("varchar") + name!: string + + @TreeChildren({ cascade: true }) + children?: Node[] + + @Column({ type: "int", nullable: true, name: "parentId" }) + parentId?: number + + @TreeParent() + @JoinColumn({ + name: "parentId", + referencedColumnName: "id", + }) + parent?: Node +} diff --git a/test/github-issues/9673/entity/Rule.ts b/test/github-issues/9673/entity/Rule.ts new file mode 100644 index 0000000000..9706e85090 --- /dev/null +++ b/test/github-issues/9673/entity/Rule.ts @@ -0,0 +1,32 @@ +import { + JoinColumn, + Column, + ManyToOne, + Entity, + PrimaryGeneratedColumn, + DeleteDateColumn, +} from "../../../../src" +import { Node } from "./Node" +import { Fact } from "./Fact" + +@Entity("rule") +export class Rule { + @PrimaryGeneratedColumn({ type: "int" }) + id?: number + + @DeleteDateColumn() + deletedAt?: Date + + @Column("varchar") + name!: string + + @ManyToOne(() => Fact, (fact) => fact.rules, { eager: true }) + @JoinColumn([{ name: "factId", referencedColumnName: "id" }]) + fact?: Fact + + @Column() + factId?: number + + @ManyToOne(() => Node, (node) => node.rules) + node?: Node +} diff --git a/test/github-issues/9673/issue-9673.ts b/test/github-issues/9673/issue-9673.ts new file mode 100644 index 0000000000..cb9c50296f --- /dev/null +++ b/test/github-issues/9673/issue-9673.ts @@ -0,0 +1,70 @@ +import "reflect-metadata" +import { + createTestingConnections, + closeTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource, SelectQueryBuilder } from "../../../src" +import { expect } from "chai" +import sinon from "sinon" +import { Node } from "./entity/Node" +import { Fact } from "./entity/Fact" +import { Rule } from "./entity/Rule" + +describe("github issues > #9673 TreeRepository not loading relations on findDescendants() method using QUERY method (relationLoadStrategy)", () => { + let dataSources: DataSource[] + before( + async () => + (dataSources = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + schemaCreate: true, + dropSchema: true, + relationLoadStrategy: "query", + enabledDrivers: ["mysql"], + })), + ) + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("should generate multiple queries per relation", () => + Promise.all( + dataSources.map(async (dataSource) => { + const nodeRepository = dataSource.getTreeRepository(Node) + const ruleRepository = dataSource.getRepository(Rule) + const factRepository = dataSource.getRepository(Fact) + + // Entity instances setup + let parent = await nodeRepository.save( + nodeRepository.create({ name: "root node" }), + ) + let child = await nodeRepository.save( + nodeRepository.create({ name: "child node", parent }), + ) + const [factA, factB] = await factRepository.save([ + { name: "Fact A" }, + { name: "Fact B" }, + ]) + const rules = await ruleRepository.save([ + { name: "Rule 1", node: child, fact: factA }, + { name: "Rule 2", node: child, fact: factA }, + { name: "Rule 3", node: child, fact: factB }, + ]) + + const leftJoinBuilder = sinon.spy( + SelectQueryBuilder.prototype, + "leftJoinAndSelect", + ) + + // Validate data loaded correctly + ;[, child] = await nodeRepository.findDescendants(parent, { + relations: ["rules", "rules.fact"], + }) + + expect(child.rules).length(rules.length) + child.rules?.forEach((rule) => { + expect(rule.fact).exist + }) + expect(leftJoinBuilder.called).not.to.be.true + }), + )) +}) diff --git a/test/github-issues/9684/entity/Foo.ts b/test/github-issues/9684/entity/Foo.ts new file mode 100644 index 0000000000..cd6e5af478 --- /dev/null +++ b/test/github-issues/9684/entity/Foo.ts @@ -0,0 +1,15 @@ +import { Column, Entity, PrimaryGeneratedColumn } from "../../../../src" + +export enum EnumStatus { + DRAFT = "draft", + PUBLISHED = "published", +} + +@Entity("module-foo_table_x") +export class Foo { + @PrimaryGeneratedColumn({ name: "id" }) + id: number + + @Column({ type: "enum", enum: EnumStatus, default: EnumStatus.DRAFT }) + enumStatus: Date +} diff --git a/test/github-issues/9684/issue-9684.ts b/test/github-issues/9684/issue-9684.ts new file mode 100644 index 0000000000..6e5a8d7d5b --- /dev/null +++ b/test/github-issues/9684/issue-9684.ts @@ -0,0 +1,31 @@ +import "reflect-metadata" +import { DataSource } from "../../../src/index" +import { + closeTestingConnections, + createTestingConnections, +} from "../../utils/test-utils" +import { Foo } from "./entity/Foo" + +describe("github issues > #9684 Incorrect enum default value when table name contains dash character", () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + entities: [Foo], + schemaCreate: true, + dropSchema: true, + enabledDrivers: ["postgres"], + })), + ) + after(() => closeTestingConnections(connections)) + it("should get default enum value", () => + Promise.all( + connections.map(async (connection) => { + const queryRunner = connection.createQueryRunner() + let table = await queryRunner.getTable("module-foo_table_x") + + const nameColumn = table!.findColumnByName("enumStatus")! + nameColumn!.default!.should.be.equal("'draft'") + }), + )) +}) diff --git a/test/github-issues/9690/entity/Foo.ts b/test/github-issues/9690/entity/Foo.ts new file mode 100644 index 0000000000..00ab8c7a7e --- /dev/null +++ b/test/github-issues/9690/entity/Foo.ts @@ -0,0 +1,7 @@ +import { Entity, PrimaryGeneratedColumn } from "../../../../src" + +@Entity() +export class Foo { + @PrimaryGeneratedColumn({ name: "id" }) + id: number +} diff --git a/test/github-issues/9690/issue-9690.ts b/test/github-issues/9690/issue-9690.ts new file mode 100644 index 0000000000..780da3fd41 --- /dev/null +++ b/test/github-issues/9690/issue-9690.ts @@ -0,0 +1,30 @@ +import "reflect-metadata" +import { DataSource } from "../../../src" +import { + closeTestingConnections, + createTestingConnections, +} from "../../utils/test-utils" +import { Foo } from "./entity/Foo" + +describe("github issues > #9690 Incorrect SQL expression if `where` parameter is empty array", () => { + let dataSources: DataSource[] + before(async () => { + dataSources = await createTestingConnections({ + enabledDrivers: ["postgres"], + entities: [Foo], + schemaCreate: true, + dropSchema: true, + }) + }) + after(() => closeTestingConnections(dataSources)) + + it("should run without throw error", () => + Promise.all( + dataSources.map(async (dataSource) => { + const repository = dataSource.getRepository(Foo) + await repository.find({ + where: [], + }) + }), + )) +}) diff --git a/test/github-issues/970/entity/Post.ts b/test/github-issues/970/entity/Post.ts index 9a558375bf..5640cf30f2 100644 --- a/test/github-issues/970/entity/Post.ts +++ b/test/github-issues/970/entity/Post.ts @@ -1,12 +1,12 @@ import { Entity } from "../../../../src/decorator/entity/Entity" import { ObjectIdColumn } from "../../../../src/decorator/columns/ObjectIdColumn" -import { ObjectID } from "../../../../src/driver/mongodb/typings" +import { ObjectId } from "../../../../src/driver/mongodb/typings" import { Column } from "../../../../src/decorator/columns/Column" @Entity() export class Post { @ObjectIdColumn() - id: ObjectID + id: ObjectId @Column() title: string diff --git a/test/github-issues/9715/entity/ExampleEntity.ts b/test/github-issues/9715/entity/ExampleEntity.ts new file mode 100644 index 0000000000..5581e92eef --- /dev/null +++ b/test/github-issues/9715/entity/ExampleEntity.ts @@ -0,0 +1,22 @@ +import { Entity } from "../../../../src/decorator/entity/Entity" +import { Column } from "../../../../src/decorator/columns/Column" +import { PrimaryGeneratedColumn } from "../../../../src/decorator/columns/PrimaryGeneratedColumn" + +export enum ExampleEnum { + EnumValue1 = "enumvalue1", + EnumValue2 = "enumvalue2", + EnumValue3 = "enumvalue3", + EnumValue4 = "enumvalue4", +} + +@Entity() +export class ExampleEntity { + @PrimaryGeneratedColumn() + id: number + + @Column({ + type: "simple-enum", + enum: ExampleEnum, + }) + enumcolumn: ExampleEnum +} diff --git a/test/github-issues/9715/issue-9715.ts b/test/github-issues/9715/issue-9715.ts new file mode 100644 index 0000000000..2f3960e08e --- /dev/null +++ b/test/github-issues/9715/issue-9715.ts @@ -0,0 +1,42 @@ +import "reflect-metadata" +import { + createTestingConnections, + closeTestingConnections, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/DataSource" + +describe("github issues > #9715 Database schema is not updated by sync/migration when 'simple-enum' is changed.", () => { + let dataSources: DataSource[] + before( + async () => + (dataSources = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + migrations: [__dirname + "/migration/*{.js,.ts}"], + schemaCreate: false, + dropSchema: true, + enabledDrivers: ["sqlite"], + })), + ) + after(() => closeTestingConnections(dataSources)) + + it("should update 'CHECK' constraint to match enum values", () => + Promise.all( + dataSources.map(async (dataSource) => { + await dataSource.runMigrations() + + const sqlInMemory = await dataSource.driver + .createSchemaBuilder() + .log() + + sqlInMemory.upQueries + .filter((i) => + i.query.includes( + `CHECK( "enumcolumn" IN ('enumvalue1','enumvalue2','enumvalue3','enumvalue4') )`, + ), + ) + .length.should.be.greaterThan(0) + }), + )) + + // you can add additional tests if needed +}) diff --git a/test/github-issues/9715/migration/1674040078325-init.ts b/test/github-issues/9715/migration/1674040078325-init.ts new file mode 100644 index 0000000000..7506bd196a --- /dev/null +++ b/test/github-issues/9715/migration/1674040078325-init.ts @@ -0,0 +1,15 @@ +import { MigrationInterface, QueryRunner } from "../../../../src" + +export class init1674040078325 implements MigrationInterface { + name = "init1674040078325" + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `CREATE TABLE "example_entity" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "enumcolumn" varchar CHECK( "enumcolumn" IN ('enumvalue1','enumvalue2','enumvalue3') ) NOT NULL)`, + ) + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`DROP TABLE "example_entity"`) + } +} diff --git a/test/github-issues/9770/entity/Bar.ts b/test/github-issues/9770/entity/Bar.ts new file mode 100644 index 0000000000..7d2bbcda68 --- /dev/null +++ b/test/github-issues/9770/entity/Bar.ts @@ -0,0 +1,26 @@ +import { + Entity, + Column, + ManyToOne, + JoinColumn, + PrimaryGeneratedColumn, +} from "../../../../src" + +import { Foo } from "./Foo" + +@Entity() +export class Bar { + @PrimaryGeneratedColumn() + id: number + + @ManyToOne(() => Foo, { + cascade: true, + onDelete: "CASCADE", + nullable: false, + }) + @JoinColumn() + foo!: Foo + + @Column() + data: string +} diff --git a/test/github-issues/9770/entity/Foo.ts b/test/github-issues/9770/entity/Foo.ts new file mode 100644 index 0000000000..5512d89575 --- /dev/null +++ b/test/github-issues/9770/entity/Foo.ts @@ -0,0 +1,9 @@ +import { Entity, Column, PrimaryGeneratedColumn } from "../../../../src" + +@Entity() +export class Foo { + @PrimaryGeneratedColumn() id: number + + @Column() + data: string +} diff --git a/test/github-issues/9770/issue-9770.ts b/test/github-issues/9770/issue-9770.ts new file mode 100644 index 0000000000..0e671fbeb3 --- /dev/null +++ b/test/github-issues/9770/issue-9770.ts @@ -0,0 +1,87 @@ +import "reflect-metadata" +import { expect } from "chai" + +import { DataSource } from "../../../src" +//import { DataSource, TableColumn } from "../../../src" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" + +import { Foo } from "./entity/Foo" +import { Bar } from "./entity/Bar" + +describe("github issues > #9770 check for referencing foreign keys when altering a table using sqlite", () => { + let dataSources: DataSource[] + before(async () => { + dataSources = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + migrations: [__dirname + "/migration/*{.js,.ts}"], + enabledDrivers: ["sqlite", "better-sqlite3"], + schemaCreate: true, + dropSchema: true, + logging: true, + }) + }) + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("shouldn't loose dependant table data", () => + Promise.all( + dataSources.map(async (dataSource) => { + const manager = dataSource.manager + + // Insert records in the tables + const foo = new Foo() + foo.data = "foo" + await manager.save(foo) + const foundFoo = await manager.findOne(Foo, { + where: { + id: 1, + }, + }) + expect(foundFoo).not.to.be.null + + if (!foundFoo) return + + const bar = new Bar() + bar.foo = foundFoo + bar.data = "bar" + await manager.save(bar) + + const foundBar = await manager.findOne(Bar, { + where: { + foo: { + id: foundFoo.id, + }, + }, + }) + expect(foundBar).not.to.be.null + + // check current state (migrations pending and entries in db) + const migrations = await dataSource.showMigrations() + migrations.should.be.equal(true) + + const queryRunner = dataSource.createQueryRunner() + let barRecords = await queryRunner.query(`SELECT * FROM "bar"`) + expect(barRecords).to.have.lengthOf.above(0) + + // run migrations which contains a table drop + await dataSource.runMigrations() + + // check post migration (no more pending migration and data still in db) + const migrations2 = await dataSource.showMigrations() + migrations2.should.be.equal(false) + + // check if data still exists in dependant table + barRecords = await queryRunner.query(`SELECT * FROM "bar"`) + expect(barRecords).to.have.lengthOf.above(0) + + // revert changes + await queryRunner.executeMemoryDownSql() + + await queryRunner.release() + }), + )) +}) diff --git a/test/github-issues/9770/migration/1675779246631-amendFoo.ts b/test/github-issues/9770/migration/1675779246631-amendFoo.ts new file mode 100644 index 0000000000..f0c006b30e --- /dev/null +++ b/test/github-issues/9770/migration/1675779246631-amendFoo.ts @@ -0,0 +1,19 @@ +import { MigrationInterface, QueryRunner, TableColumn } from "../../../../src" + +export class amendFoo1675779246631 implements MigrationInterface { + public async up(q: QueryRunner): Promise { + await q.addColumn( + "foo", + new TableColumn({ + name: "comment", + type: "varchar", + isNullable: true, + default: null, + }), + ) + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.dropColumn("foo", "comment") + } +} diff --git a/test/github-issues/9829/entity/ExampleEntity.ts b/test/github-issues/9829/entity/ExampleEntity.ts new file mode 100644 index 0000000000..6151e2e4be --- /dev/null +++ b/test/github-issues/9829/entity/ExampleEntity.ts @@ -0,0 +1,17 @@ +import { Entity } from "../../../../src/decorator/entity/Entity" +import { Column } from "../../../../src/decorator/columns/Column" +import { PrimaryGeneratedColumn } from "../../../../src/decorator/columns/PrimaryGeneratedColumn" + +@Entity() +export class ExampleEntity { + @PrimaryGeneratedColumn() + id: number + + @Column({ + type: "varchar", + length: 3, + unique: true, + default: () => "('AA'|| COALESCE(NULL, '1'))", + }) + someValue: string +} diff --git a/test/github-issues/9829/issue-9829.ts b/test/github-issues/9829/issue-9829.ts new file mode 100644 index 0000000000..5415e7ff89 --- /dev/null +++ b/test/github-issues/9829/issue-9829.ts @@ -0,0 +1,33 @@ +import "reflect-metadata" +import { DataSource } from "../../../src/index" +import { + closeTestingConnections, + createTestingConnections, +} from "../../utils/test-utils" +import { ExampleEntity } from "./entity/ExampleEntity" + +describe("github issues > #9829 Incorrect default value with concat value of function", () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + entities: [ExampleEntity], + schemaCreate: true, + dropSchema: true, + enabledDrivers: ["postgres"], + })), + ) + after(() => closeTestingConnections(connections)) + it("should get default concat value", () => + Promise.all( + connections.map(async (connection) => { + const queryRunner = connection.createQueryRunner() + let table = await queryRunner.getTable("example_entity") + + const nameColumn = table!.findColumnByName("someValue")! + nameColumn!.default!.should.be.equal( + "('AA'|| COALESCE(NULL, '1'))", + ) + }), + )) +}) diff --git a/test/github-issues/9833/entity/A.ts b/test/github-issues/9833/entity/A.ts new file mode 100644 index 0000000000..dad40f34c1 --- /dev/null +++ b/test/github-issues/9833/entity/A.ts @@ -0,0 +1,7 @@ +import { Base } from "./Base" + +export class A extends Base { + constructor(public a: boolean) { + super() + } +} diff --git a/test/github-issues/9833/entity/B.ts b/test/github-issues/9833/entity/B.ts new file mode 100644 index 0000000000..1e6804bea8 --- /dev/null +++ b/test/github-issues/9833/entity/B.ts @@ -0,0 +1,7 @@ +import { Base } from "./Base" + +export class B extends Base { + constructor(public b: number) { + super() + } +} diff --git a/test/github-issues/9833/entity/Base.ts b/test/github-issues/9833/entity/Base.ts new file mode 100644 index 0000000000..0ba0fc8445 --- /dev/null +++ b/test/github-issues/9833/entity/Base.ts @@ -0,0 +1,6 @@ +export abstract class Base { + id!: number + type!: string + createdAt!: Date + updatedAt!: Date +} diff --git a/test/github-issues/9833/entity/C.ts b/test/github-issues/9833/entity/C.ts new file mode 100644 index 0000000000..70409a6d71 --- /dev/null +++ b/test/github-issues/9833/entity/C.ts @@ -0,0 +1,7 @@ +import { Base } from "./Base" + +export class C extends Base { + constructor(public c: string) { + super() + } +} diff --git a/test/github-issues/9833/entity/index.ts b/test/github-issues/9833/entity/index.ts new file mode 100644 index 0000000000..834d40cb37 --- /dev/null +++ b/test/github-issues/9833/entity/index.ts @@ -0,0 +1,5 @@ +export * from "./Base" + +export * from "./A" +export * from "./B" +export * from "./C" diff --git a/test/github-issues/9833/issue-9833.ts b/test/github-issues/9833/issue-9833.ts new file mode 100644 index 0000000000..a84e13bb99 --- /dev/null +++ b/test/github-issues/9833/issue-9833.ts @@ -0,0 +1,65 @@ +import "reflect-metadata" + +import { expect } from "chai" + +import { + createTestingConnections, + closeTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/DataSource" +import { Repository } from "../../../src" + +import { Base, A, B, C } from "./entity" +import { BaseSchema, ASchema, BSchema, CSchema } from "./schema" + +describe("github issues > #9833 Add support for Single Table Inheritance when using Entity Schemas", () => { + let dataSources: DataSource[] + + before( + async () => + (dataSources = await createTestingConnections({ + entities: [BaseSchema, ASchema, BSchema, CSchema], + schemaCreate: true, + dropSchema: true, + enabledDrivers: [ + "better-sqlite3", + "cockroachdb", + "mariadb", + "mssql", + "mysql", + "oracle", + "postgres", + "spanner", + "sqlite", + ], + })), + ) + + beforeEach(() => reloadTestingDatabases(dataSources)) + + after(() => closeTestingConnections(dataSources)) + + it("should instantiate concrete entities when using EntitySchema", () => + Promise.all( + dataSources.map(async (dataSource) => { + // Arrange + const repository: Repository = + dataSource.getRepository(Base) + + const entities: Base[] = [new A(true), new B(42), new C("foo")] + + await repository.save(entities) + + // Act + const loadedEntities = await repository.find({ + order: { type: "ASC" }, + }) + + // Assert + expect(loadedEntities[0]).to.be.instanceOf(A) + expect(loadedEntities[1]).to.be.instanceOf(B) + expect(loadedEntities[2]).to.be.instanceOf(C) + }), + )) +}) diff --git a/test/github-issues/9833/schema/A.ts b/test/github-issues/9833/schema/A.ts new file mode 100644 index 0000000000..1e7a9b9588 --- /dev/null +++ b/test/github-issues/9833/schema/A.ts @@ -0,0 +1,17 @@ +import { EntitySchema } from "../../../../src" + +import { A } from "../entity" + +import { BaseSchema } from "./Base" + +export const ASchema = new EntitySchema({ + target: A, + name: "A", + type: "entity-child", + columns: { + ...BaseSchema.options.columns, + a: { + type: Boolean, + }, + }, +}) diff --git a/test/github-issues/9833/schema/B.ts b/test/github-issues/9833/schema/B.ts new file mode 100644 index 0000000000..8f7fcbf3d5 --- /dev/null +++ b/test/github-issues/9833/schema/B.ts @@ -0,0 +1,17 @@ +import { EntitySchema } from "../../../../src" + +import { B } from "../entity" + +import { BaseSchema } from "./Base" + +export const BSchema = new EntitySchema({ + target: B, + name: "B", + type: "entity-child", + columns: { + ...BaseSchema.options.columns, + b: { + type: Number, + }, + }, +}) diff --git a/test/github-issues/9833/schema/Base.ts b/test/github-issues/9833/schema/Base.ts new file mode 100644 index 0000000000..ec455a8ebf --- /dev/null +++ b/test/github-issues/9833/schema/Base.ts @@ -0,0 +1,30 @@ +import { EntitySchema } from "../../../../src" + +import { Base } from "../entity" + +export const BaseSchema = new EntitySchema({ + target: Base, + name: "Base", + columns: { + id: { + type: Number, + primary: true, + generated: "increment", + }, + type: { + type: String, + }, + createdAt: { + type: Date, + createDate: true, + }, + updatedAt: { + type: Date, + updateDate: true, + }, + }, + inheritance: { + pattern: "STI", + column: "type", + }, +}) diff --git a/test/github-issues/9833/schema/C.ts b/test/github-issues/9833/schema/C.ts new file mode 100644 index 0000000000..d5c00f96c2 --- /dev/null +++ b/test/github-issues/9833/schema/C.ts @@ -0,0 +1,17 @@ +import { EntitySchema } from "../../../../src" + +import { C } from "../entity" + +import { BaseSchema } from "./Base" + +export const CSchema = new EntitySchema({ + target: C, + name: "C", + type: "entity-child", + columns: { + ...BaseSchema.options.columns, + c: { + type: String, + }, + }, +}) diff --git a/test/github-issues/9833/schema/index.ts b/test/github-issues/9833/schema/index.ts new file mode 100644 index 0000000000..834d40cb37 --- /dev/null +++ b/test/github-issues/9833/schema/index.ts @@ -0,0 +1,5 @@ +export * from "./Base" + +export * from "./A" +export * from "./B" +export * from "./C" diff --git a/test/github-issues/9885/issue-9885.ts b/test/github-issues/9885/issue-9885.ts new file mode 100644 index 0000000000..05b4f203a0 --- /dev/null +++ b/test/github-issues/9885/issue-9885.ts @@ -0,0 +1,24 @@ +import { expect } from "chai" +import { DataSource } from "../../../src" +import { + closeTestingConnections, + createTestingConnections, +} from "../../utils/test-utils" + +describe("github issues > #9885", () => { + let dataSources: DataSource[] + + before(async () => { + dataSources = await createTestingConnections({ + entities: [], + enabledDrivers: ["mongodb"], + }) + }) + after(() => closeTestingConnections(dataSources)) + + it("should be connected", () => { + dataSources.forEach((dataSource) => { + expect(dataSource.isInitialized).true + }) + }) +}) diff --git a/test/github-issues/9895/entity/ExampleEntity.ts b/test/github-issues/9895/entity/ExampleEntity.ts new file mode 100644 index 0000000000..84710e23eb --- /dev/null +++ b/test/github-issues/9895/entity/ExampleEntity.ts @@ -0,0 +1,31 @@ +import { Entity } from "../../../../src/decorator/entity/Entity" +import { Column } from "../../../../src/decorator/columns/Column" +import { PrimaryGeneratedColumn } from "../../../../src/decorator/columns/PrimaryGeneratedColumn" + +class ExampleBigNumber { + constructor(private value: string) {} + + toFixed() { + return this.value + } +} + +@Entity() +export class ExampleEntity { + @PrimaryGeneratedColumn() + id: number + + @Column({ + type: "numeric", + nullable: false, + transformer: { + from: (value: any): ExampleBigNumber => { + return new ExampleBigNumber(value) + }, + to: (value: any): string => { + return value.toFixed() + }, + }, + }) + total: ExampleBigNumber +} diff --git a/test/github-issues/9895/issue-9895.ts b/test/github-issues/9895/issue-9895.ts new file mode 100644 index 0000000000..5c656c8280 --- /dev/null +++ b/test/github-issues/9895/issue-9895.ts @@ -0,0 +1,33 @@ +import { DataSource } from "../../../src" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { ExampleEntity } from "./entity/ExampleEntity" + +describe("github issues > #9895", () => { + let dataSources: DataSource[] + + before(async () => { + dataSources = await createTestingConnections({ + entities: [ExampleEntity], + enabledDrivers: ["postgres"], + }) + }) + + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("should allow find order on object property", async () => { + await Promise.all( + dataSources.map(async (dataSource) => { + await dataSource.manager.find(ExampleEntity, { + order: { + total: "DESC", + }, + }) + }), + ) + }) +}) diff --git a/test/github-issues/9903/entity/User.ts b/test/github-issues/9903/entity/User.ts new file mode 100644 index 0000000000..b51c04f946 --- /dev/null +++ b/test/github-issues/9903/entity/User.ts @@ -0,0 +1,10 @@ +import { Column, Entity, PrimaryGeneratedColumn } from "../../../../src" + +@Entity() +export class User { + @PrimaryGeneratedColumn("increment") + id?: number + + @Column({ type: "json" }) + jsonData: string +} diff --git a/test/github-issues/9903/issue-9903.ts b/test/github-issues/9903/issue-9903.ts new file mode 100644 index 0000000000..061f92bc22 --- /dev/null +++ b/test/github-issues/9903/issue-9903.ts @@ -0,0 +1,83 @@ +import "../../utils/test-setup" +import { + createTestingConnections, + closeTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/index" +import { expect } from "chai" +import { User } from "./entity/User" + +describe("github issues > #9903 json data type", () => { + let connections: DataSource[] + + afterEach(() => closeTestingConnections(connections)) + + describe("json supported type for mariadb", () => { + const expectedJsonString = JSON.stringify({ + firstName: "Quality", + lastName: "Tester", + }) + const newUser: User = { + jsonData: expectedJsonString, + } + + const badJsonUser: User = { + jsonData: `'''faux---'''`, + } + + before( + async () => + (connections = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + schemaCreate: true, + dropSchema: true, + enabledDrivers: ["mariadb"], + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + + it("should create table with json constraint", () => + Promise.all( + connections.map(async (connection) => { + const userRepository = connection.getRepository(User) + + await userRepository.save(newUser) + + const savedUser = await userRepository.findOneOrFail({ + where: { id: newUser.id }, + }) + + expect(savedUser).to.not.be.null + expect(savedUser.jsonData).to.equal(expectedJsonString) + + // trying to save bad json + // here when executing the save the value is passed to JSON.stringify(), + // this will ensure its json valid in mariadb so this won't break the constraint + try { + await userRepository.save(badJsonUser) + } catch (err) { + expect.fail( + null, + null, + "Should have not thrown an error", + ) + } + + try { + await userRepository.query( + "INSERT INTO user values (?, ?)", + [3, badJsonUser.jsonData], + ) + expect.fail(null, null, "Should have thrown an error") + } catch (err) { + expect(err).not.to.be.undefined + expect(err.sqlMessage).not.to.be.undefined + expect(err.sqlMessage).to.equal( + "CONSTRAINT `user.jsonData` failed for `test`.`user`", + ) + } + }), + )) + }) +}) diff --git a/test/github-issues/9948/entity/Post.ts b/test/github-issues/9948/entity/Post.ts new file mode 100644 index 0000000000..c83f4ff6bc --- /dev/null +++ b/test/github-issues/9948/entity/Post.ts @@ -0,0 +1,13 @@ +import { Column, Entity, PrimaryGeneratedColumn } from "../../../../src" + +@Entity() +export class Post { + @PrimaryGeneratedColumn() + id: number + + @Column() + name: string + + @Column({ default: 0 }) + updatedNameColumnsCount: number +} diff --git a/test/github-issues/9948/issue-9948.ts b/test/github-issues/9948/issue-9948.ts new file mode 100644 index 0000000000..7b7ca7a38f --- /dev/null +++ b/test/github-issues/9948/issue-9948.ts @@ -0,0 +1,40 @@ +import "reflect-metadata" +import { + createTestingConnections, + closeTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/DataSource" +import { expect } from "chai" +import { Post } from "./entity/Post" + +describe("github issues > #9948 Subscribers with both 'beforeUpdate' and 'afterUpdate' methods defined cause duplicate 'updatedColumn' entries", () => { + let dataSources: DataSource[] + before( + async () => + (dataSources = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + subscribers: [__dirname + "/subscriber/*{.js,.ts}"], + schemaCreate: true, + dropSchema: true, + })), + ) + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("should not duplicate update column", () => + Promise.all( + dataSources.map(async (dataSource) => { + const manager = dataSource.manager + + const initialPost = new Post() + initialPost.name = "post-init" + await manager.save(initialPost) + + initialPost.name = "post-update" + const updatedPost = await manager.save(initialPost) + + expect(updatedPost.updatedNameColumnsCount).to.be.eq(1) + }), + )) +}) diff --git a/test/github-issues/9948/subscriber/PostSubscriber.ts b/test/github-issues/9948/subscriber/PostSubscriber.ts new file mode 100644 index 0000000000..096afe296c --- /dev/null +++ b/test/github-issues/9948/subscriber/PostSubscriber.ts @@ -0,0 +1,31 @@ +import { + EntitySubscriberInterface, + EventSubscriber, + UpdateEvent, +} from "../../../../src" +import { Post } from "../entity/Post" + +@EventSubscriber() +export class PostSubscriber implements EntitySubscriberInterface { + listenTo(): string | Function { + return Post + } + + beforeUpdate(event: UpdateEvent): void | Promise { + event.entity!.updatedNameColumnsCount = event.updatedColumns.reduce( + (p, c) => { + return p + (c.propertyName === "name" ? 1 : 0) + }, + 0, + ) + } + + afterUpdate(event: UpdateEvent): void | Promise { + event.entity!.updatedNameColumnsCount = event.updatedColumns.reduce( + (p, c) => { + return p + (c.propertyName === "name" ? 1 : 0) + }, + 0, + ) + } +} diff --git a/test/github-issues/9960/entity/ExampleEntity.ts b/test/github-issues/9960/entity/ExampleEntity.ts new file mode 100644 index 0000000000..0a5bef90e7 --- /dev/null +++ b/test/github-issues/9960/entity/ExampleEntity.ts @@ -0,0 +1,12 @@ +import { Entity } from "../../../../src/decorator/entity/Entity" +import { Column } from "../../../../src/decorator/columns/Column" +import { PrimaryGeneratedColumn } from "../../../../src/decorator/columns/PrimaryGeneratedColumn" + +@Entity() +export class ExampleEntity { + @PrimaryGeneratedColumn() + id: number + + @Column() + name: string +} diff --git a/test/github-issues/9960/issue-9960.ts b/test/github-issues/9960/issue-9960.ts new file mode 100644 index 0000000000..6891766392 --- /dev/null +++ b/test/github-issues/9960/issue-9960.ts @@ -0,0 +1,42 @@ +import { DataSource } from "../../../src" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { ExampleEntity } from "./entity/ExampleEntity" +import { expect } from "chai" + +describe("github issues > #9960", () => { + let dataSources: DataSource[] + + before(async () => { + dataSources = await createTestingConnections({ + entities: [ExampleEntity], + enabledDrivers: ["postgres"], + }) + }) + + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("select + order by must work without issues", async () => { + await Promise.all( + dataSources.map(async (dataSource) => { + const example1 = new ExampleEntity() + example1.name = "example #1" + await dataSource.manager.save(example1) + + const examples = await dataSource.manager + .createQueryBuilder(ExampleEntity, "example") + .select(["example.id", "example.name"]) + .addOrderBy("example.name", "DESC", "NULLS LAST") + .take(1) + .skip(0) + .getMany() + + expect(examples).to.be.eql([{ id: 1, name: "example #1" }]) + }), + ) + }) +}) diff --git a/test/github-issues/9977/entity/Author.ts b/test/github-issues/9977/entity/Author.ts new file mode 100644 index 0000000000..e7aeef16c5 --- /dev/null +++ b/test/github-issues/9977/entity/Author.ts @@ -0,0 +1,20 @@ +import { Column, Entity, OneToMany, PrimaryColumn } from "../../../../src" +import { Photo } from "./Photo" + +@Entity() +export class Author { + @PrimaryColumn() + id: number + + @Column() + firstName: string + + @Column() + lastName: string + + @Column() + age: number + + @OneToMany(() => Photo, (photo) => photo.author) + photos: Photo[] +} diff --git a/test/github-issues/9977/entity/Counters.ts b/test/github-issues/9977/entity/Counters.ts new file mode 100644 index 0000000000..3d8d215376 --- /dev/null +++ b/test/github-issues/9977/entity/Counters.ts @@ -0,0 +1,11 @@ +import { Column, JoinTable, ManyToMany } from "../../../../src" +import { Author } from "./Author" + +export class Counters { + @Column() + likes: number + + @ManyToMany(() => Author) + @JoinTable() + likedUsers: Author[] +} diff --git a/test/github-issues/9977/entity/Photo.ts b/test/github-issues/9977/entity/Photo.ts new file mode 100644 index 0000000000..940b90bb87 --- /dev/null +++ b/test/github-issues/9977/entity/Photo.ts @@ -0,0 +1,17 @@ +import { Column, Entity, ManyToOne, PrimaryColumn } from "../../../../src" +import { Author } from "./Author" + +@Entity() +export class Photo { + @PrimaryColumn() + id: number + + @Column() + filename: string + + @Column() + description: string + + @ManyToOne(() => Author, (author) => author.photos) + author: Author +} diff --git a/test/github-issues/9977/entity/Post.ts b/test/github-issues/9977/entity/Post.ts new file mode 100644 index 0000000000..3466241bef --- /dev/null +++ b/test/github-issues/9977/entity/Post.ts @@ -0,0 +1,41 @@ +import { + Column, + Entity, + JoinTable, + ManyToMany, + ManyToOne, + PrimaryColumn, +} from "../../../../src" +import { Tag } from "./Tag" +import { Author } from "./Author" +import { Counters } from "./Counters" + +@Entity() +export class Post { + @PrimaryColumn() + id: number + + @Column() + title: string + + @Column() + text: string + + @ManyToMany(() => Tag, (tag) => tag.posts) + @JoinTable() + tags: Tag[] + + @ManyToOne(() => Author) + author: Author + + @Column(() => Counters) + counters: Counters + + toString() { + return this.title + } + + doSomething() { + return 123 + } +} diff --git a/test/github-issues/9977/entity/Tag.ts b/test/github-issues/9977/entity/Tag.ts new file mode 100644 index 0000000000..8f5277087f --- /dev/null +++ b/test/github-issues/9977/entity/Tag.ts @@ -0,0 +1,14 @@ +import { Column, Entity, ManyToMany, PrimaryColumn } from "../../../../src" +import { Post } from "./Post" + +@Entity() +export class Tag { + @PrimaryColumn() + id: number + + @Column() + name: string + + @ManyToMany(() => Post, (post) => post.tags) + posts: Post[] +} diff --git a/test/github-issues/9977/find-options-test-utils.ts b/test/github-issues/9977/find-options-test-utils.ts new file mode 100644 index 0000000000..ff0768b3e9 --- /dev/null +++ b/test/github-issues/9977/find-options-test-utils.ts @@ -0,0 +1,96 @@ +import "reflect-metadata" +import { EntityManager } from "../../../src" +import { Post } from "./entity/Post" +import { Author } from "./entity/Author" +import { Photo } from "./entity/Photo" +import { Tag } from "./entity/Tag" +import { Counters } from "./entity/Counters" + +export async function prepareData(manager: EntityManager) { + const photo1 = new Photo() + photo1.id = 1 + photo1.filename = "saw.jpg" + photo1.description = "Me and saw" + await manager.save(photo1) + + const photo2 = new Photo() + photo2.id = 2 + photo2.filename = "chain.jpg" + photo2.description = "Me and chain" + await manager.save(photo2) + + const user1 = new Author() + user1.id = 1 + user1.firstName = "Timber" + user1.lastName = "Saw" + user1.age = 25 + user1.photos = [photo1, photo2] + await manager.save(user1) + + const user2 = new Author() + user2.id = 2 + user2.firstName = "Gyro" + user2.lastName = "Copter" + user2.age = 52 + user2.photos = [] + await manager.save(user2) + + const tag1 = new Tag() + tag1.id = 1 + tag1.name = "category #1" + await manager.save(tag1) + + const tag2 = new Tag() + tag2.id = 2 + tag2.name = "category #2" + await manager.save(tag2) + + const tag3 = new Tag() + tag3.id = 3 + tag3.name = "category #3" + await manager.save(tag3) + + const post1 = new Post() + post1.id = 1 + post1.title = "Post #1" + post1.text = "About post #1" + post1.author = user1 + post1.tags = [tag1, tag2] + post1.counters = new Counters() + post1.counters.likes = 1 + post1.counters.likedUsers = [user1] + await manager.save(post1) + + const post2 = new Post() + post2.id = 2 + post2.title = "Post #2" + post2.text = "About post #2" + post2.author = user1 + post2.tags = [tag2] + post2.counters = new Counters() + post2.counters.likes = 2 + post2.counters.likedUsers = [user1, user2] + await manager.save(post2) + + const post3 = new Post() + post3.id = 3 + post3.title = "Post #3" + post3.text = "About post #3" + post3.author = user2 + post3.tags = [tag1] + post3.counters = new Counters() + post3.counters.likes = 1 + post3.counters.likedUsers = [user2] + await manager.save(post3) + + const post4 = new Post() + post4.id = 4 + post4.title = "Post #4" + post4.text = "About post #4" + post4.author = user1 + post4.tags = [] + post4.counters = new Counters() + post4.counters.likes = 1 + post4.counters.likedUsers = [user1] + await manager.save(post4) +} diff --git a/test/github-issues/9977/issue-9977.ts b/test/github-issues/9977/issue-9977.ts new file mode 100644 index 0000000000..8283425e5e --- /dev/null +++ b/test/github-issues/9977/issue-9977.ts @@ -0,0 +1,140 @@ +import "reflect-metadata" +import "../../utils/test-setup" +import { DataSource, LessThanOrEqual, MoreThanOrEqual } from "../../../src" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { Author } from "./entity/Author" +import { Post } from "./entity/Post" +import { Tag } from "./entity/Tag" +import { prepareData } from "./find-options-test-utils" + +describe("github issues > #9977", () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + __dirname, + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("where relations with (More|Less)ThanOrEqual operators", () => + Promise.all( + connections.map(async (connection) => { + await prepareData(connection.manager) + + const posts1 = await connection + .createQueryBuilder(Post, "post") + .setFindOptions({ + where: { + tags: MoreThanOrEqual(2), + }, + }) + .getMany() + posts1.should.be.eql([ + { + id: 1, + title: "Post #1", + text: "About post #1", + counters: { likes: 1 }, + }, + ]) + + const posts2 = await connection + .createQueryBuilder(Post, "post") + .setFindOptions({ + where: { + tags: MoreThanOrEqual(1), + counters: { + likedUsers: MoreThanOrEqual(2), + }, + }, + }) + .getMany() + posts2.should.be.eql([ + { + id: 2, + title: "Post #2", + text: "About post #2", + counters: { likes: 2 }, + }, + ]) + + const posts3 = await connection + .createQueryBuilder(Post, "post") + .setFindOptions({ + where: { + author: { + photos: MoreThanOrEqual(2), + }, + }, + order: { + id: "asc", + }, + }) + .getMany() + posts3.should.be.eql([ + { + id: 1, + title: "Post #1", + text: "About post #1", + counters: { likes: 1 }, + }, + { + id: 2, + title: "Post #2", + text: "About post #2", + counters: { likes: 2 }, + }, + { + id: 4, + title: "Post #4", + text: "About post #4", + counters: { likes: 1 }, + }, + ]) + + const authors = await connection + .createQueryBuilder(Author, "author") + .setFindOptions({ + where: { + photos: MoreThanOrEqual(1), + }, + }) + .getMany() + authors.should.be.eql([ + { id: 1, firstName: "Timber", lastName: "Saw", age: 25 }, + ]) + + const tags1 = await connection + .createQueryBuilder(Tag, "tag") + .setFindOptions({ + where: { + posts: MoreThanOrEqual(2), + }, + order: { + id: "asc", + }, + }) + .getMany() + tags1.should.be.eql([ + { id: 1, name: "category #1" }, + { id: 2, name: "category #2" }, + ]) + + const tags2 = await connection + .createQueryBuilder(Tag, "tag") + .setFindOptions({ + where: { + posts: LessThanOrEqual(0), + }, + }) + .getMany() + tags2.should.be.eql([{ id: 3, name: "category #3" }]) + }), + )) +}) diff --git a/test/github-issues/9984/entity/Post.ts b/test/github-issues/9984/entity/Post.ts new file mode 100644 index 0000000000..be7004ff94 --- /dev/null +++ b/test/github-issues/9984/entity/Post.ts @@ -0,0 +1,12 @@ +import { Entity } from "../../../../src/decorator/entity/Entity" +import { Column } from "../../../../src/decorator/columns/Column" +import { PrimaryGeneratedColumn } from "../../../../src/decorator/columns/PrimaryGeneratedColumn" + +@Entity() +export class Post { + @PrimaryGeneratedColumn() + id: number + + @Column() + name: string +} diff --git a/test/github-issues/9984/issue-9984.ts b/test/github-issues/9984/issue-9984.ts new file mode 100644 index 0000000000..4d8f93ef50 --- /dev/null +++ b/test/github-issues/9984/issue-9984.ts @@ -0,0 +1,76 @@ +import { DataSource } from "../../../src" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { Post } from "./entity/Post.js" +import { expect } from "chai" + +describe("github issues > #9984 TransactionRetryWithProtoRefreshError should be handled by TypeORM", () => { + let dataSources: DataSource[] + + before(async () => { + dataSources = await createTestingConnections({ + entities: [Post], + enabledDrivers: ["cockroachdb"], + }) + }) + + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("should retry transaction on 40001 error with 'inject_retry_errors_enabled=true'", () => + Promise.all( + dataSources.map(async (dataSource) => { + const queryRunner = dataSource.createQueryRunner() + await dataSource.query("SET inject_retry_errors_enabled = true") + await queryRunner.startTransaction() + + const post = new Post() + post.name = `post` + await queryRunner.manager.save(post) + await queryRunner.commitTransaction() + await queryRunner.release() + await dataSource.query( + "SET inject_retry_errors_enabled = false", + ) + const loadedPost = await dataSource.manager.findOneBy(Post, { + id: post.id, + }) + expect(loadedPost).to.be.not.undefined + }), + )) + + it("should retry transaction on 40001 error", () => + Promise.all( + dataSources.map(async (dataSource) => { + const queryRunner = dataSource.createQueryRunner() + const post = new Post() + post.name = "post" + await queryRunner.manager.save(post) + await queryRunner.release() + + const query = async (name: string) => { + const queryRunner = dataSource.createQueryRunner() + await queryRunner.startTransaction() + const updatedPost = new Post() + updatedPost.id = post.id + updatedPost.name = name + await queryRunner.manager.save(updatedPost) + await queryRunner.commitTransaction() + await queryRunner.release() + } + + await Promise.all([1, 2, 3].map((i) => query(`changed_${i}`))) + + const loadedPost = await dataSource.manager.findOneByOrFail( + Post, + { + id: post.id, + }, + ) + expect(loadedPost.name).to.not.equal("post") + }), + )) +}) diff --git a/test/github-issues/9988/entity/category.ts b/test/github-issues/9988/entity/category.ts new file mode 100644 index 0000000000..c4a90485bf --- /dev/null +++ b/test/github-issues/9988/entity/category.ts @@ -0,0 +1,11 @@ +import { Entity, ManyToMany, PrimaryGeneratedColumn } from "../../../../src" +import { Product } from "./product" + +@Entity({ name: "category" }) +export class Category { + @PrimaryGeneratedColumn() + id: number + + @ManyToMany(() => Product, (product) => product.categories) + products: Product[] +} diff --git a/test/github-issues/9988/entity/product.ts b/test/github-issues/9988/entity/product.ts new file mode 100644 index 0000000000..9a4651eff5 --- /dev/null +++ b/test/github-issues/9988/entity/product.ts @@ -0,0 +1,17 @@ +import { + Entity, + JoinTable, + ManyToMany, + PrimaryGeneratedColumn, +} from "../../../../src" +import { Category } from "./category" + +@Entity({ name: "product" }) +export class Product { + @PrimaryGeneratedColumn() + id: number + + @ManyToMany(() => Category, (category) => category.products) + @JoinTable({ name: "product_category" }) + categories: Category[] +} diff --git a/test/github-issues/9988/issue-9988.ts b/test/github-issues/9988/issue-9988.ts new file mode 100644 index 0000000000..31979803c5 --- /dev/null +++ b/test/github-issues/9988/issue-9988.ts @@ -0,0 +1,98 @@ +import "reflect-metadata" +import { + createTestingConnections as createTestingDatasources, + closeTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/DataSource" +import { expect } from "chai" +import { Product } from "./entity/product" +import { Category } from "./entity/category" + +describe("github issues > #9988 RelationIdLoader reuses the same queryplanner within a transaction", () => { + let dataSources: DataSource[] + + before( + async () => + (dataSources = await createTestingDatasources({ + entities: [Product, Category], + enabledDrivers: ["postgres"], + schemaCreate: true, + dropSchema: true, + })), + ) + + beforeEach(() => reloadTestingDatabases(dataSources)) + after(() => closeTestingConnections(dataSources)) + + it("custom repository querybuilders within transactions returns relations for getOne() and getMany", async () => { + await Promise.all( + dataSources.map(async (dataSource) => { + const manager = dataSource.manager + + // Setup seed + const categoryRepo = manager.getRepository(Category) + const categoryOne = categoryRepo.create({ id: 1 }) + const categoryTwo = categoryRepo.create({ id: 2 }) + const productOneId = 1 + const productTwoId = 2 + await categoryRepo.save(categoryOne) + await categoryRepo.save(categoryTwo) + const options = (id: number) => ({ + relationLoadStrategy: "query", + where: { id: productOneId }, + relations: { categories: true }, + }) + + // Create a custom repository that uses a query builder without query planner + // For both methods, relationLoadStrategy is set to "query", where the bug lies. + const productRepo = dataSource.getRepository(Product).extend({ + async getOne(): Promise { + return this.createQueryBuilder("product") + .setFindOptions(options(productOneId)) + .getOne() + }, + + async getMany(): Promise { + return this.createQueryBuilder("product") + .setFindOptions(options(productTwoId)) + .getMany() + }, + }) + + // Creates a transaction that is shared across all the queries + const getOneProduct = await manager.transaction( + async (txnManager) => { + const customProductRepo = + txnManager.withRepository(productRepo) + const product = customProductRepo.create({ + id: productOneId, + categories: [{ id: categoryOne.id }], + }) + + await customProductRepo.save(product) + return await customProductRepo.getOne() + }, + ) + + expect(getOneProduct.categories.length).to.be.eql(1) + + const getManyProduct = await manager.transaction( + async (txnManager) => { + const customProductRepo = + txnManager.withRepository(productRepo) + const product = customProductRepo.create({ + id: productTwoId, + categories: [{ id: categoryOne.id }], + }) + + await customProductRepo.save(product) + return await customProductRepo.getMany() + }, + ) + + expect(getManyProduct[0].categories.length).to.be.eql(1) + }), + ) + }) +}) diff --git a/test/other-issues/auto-increment-id-as-string/auto-increment-id-as-string.ts b/test/other-issues/auto-increment-id-as-string/auto-increment-id-as-string.ts new file mode 100644 index 0000000000..70327f26c7 --- /dev/null +++ b/test/other-issues/auto-increment-id-as-string/auto-increment-id-as-string.ts @@ -0,0 +1,48 @@ +import "reflect-metadata" +import { + closeTestingConnections, + createTestingConnections, + reloadTestingDatabases, +} from "../../utils/test-utils" +import { DataSource } from "../../../src/data-source/DataSource" +import { User } from "./entity/User" +import { Role } from "./entity/Role" + +describe("other issues > auto-increment id as string", () => { + let connections: DataSource[] + before( + async () => + (connections = await createTestingConnections({ + entities: [__dirname + "/entity/*{.js,.ts}"], + })), + ) + beforeEach(() => reloadTestingDatabases(connections)) + after(() => closeTestingConnections(connections)) + + it("should relationIds exist", () => + Promise.all( + connections.map(async function (connection) { + const role1 = new Role() + role1.roleName = "#role 1" + const role2 = new Role() + role2.roleName = "#role 2" + + const user = new User() + user.userName = "#user 1" + user.roles = [ + await connection.manager.save(role1), + await connection.manager.save(role2), + ] + + const user2 = await connection.manager.save(user) + + const user3 = await connection.manager.findOne(User, { + where: { + userId: user2.userId, + }, + loadRelationIds: true, + }) + user3!.roles.length.should.be.equal(2) + }), + )) +}) diff --git a/test/other-issues/auto-increment-id-as-string/entity/Role.ts b/test/other-issues/auto-increment-id-as-string/entity/Role.ts new file mode 100644 index 0000000000..507b4fa224 --- /dev/null +++ b/test/other-issues/auto-increment-id-as-string/entity/Role.ts @@ -0,0 +1,24 @@ +import { Column } from "../../../../src/decorator/columns/Column" +import { Entity } from "../../../../src/decorator/entity/Entity" + +@Entity() +export class Role { + @Column({ + name: "role_id", + primary: true, + type: "int", + generated: "increment", + transformer: { + to(value: object) { + return value?.toString() + }, + from(value: object) { + return value?.toString() + }, + }, + }) + roleId: string + + @Column({ name: "role_name" }) + roleName: string +} diff --git a/test/other-issues/auto-increment-id-as-string/entity/User.ts b/test/other-issues/auto-increment-id-as-string/entity/User.ts new file mode 100644 index 0000000000..889268e29b --- /dev/null +++ b/test/other-issues/auto-increment-id-as-string/entity/User.ts @@ -0,0 +1,40 @@ +import { JoinTable, ManyToMany } from "../../../../src" +import { Column } from "../../../../src/decorator/columns/Column" +import { Entity } from "../../../../src/decorator/entity/Entity" +import { Role } from "./Role" + +@Entity() +export class User { + @Column({ + name: "user_id", + primary: true, + type: "int", + generated: "increment", + transformer: { + to(value: object) { + return value?.toString() + }, + from(value: object) { + return value?.toString() + }, + }, + }) + userId: string + + @Column({ name: "user_name" }) + userName: string + + @ManyToMany((type) => Role) + @JoinTable({ + name: "user_role", + joinColumn: { + name: "user_id", + referencedColumnName: "userId", + }, + inverseJoinColumn: { + name: "role_id", + referencedColumnName: "roleId", + }, + }) + roles: Role[] +} diff --git a/test/other-issues/mongodb-entity-change-in-subscribers/entity/Post.ts b/test/other-issues/mongodb-entity-change-in-subscribers/entity/Post.ts index c65e5682af..8ce2c19432 100644 --- a/test/other-issues/mongodb-entity-change-in-subscribers/entity/Post.ts +++ b/test/other-issues/mongodb-entity-change-in-subscribers/entity/Post.ts @@ -1,12 +1,12 @@ import { Entity } from "../../../../src/decorator/entity/Entity" import { Column } from "../../../../src/decorator/columns/Column" import { UpdateDateColumn } from "../../../../src/decorator/columns/UpdateDateColumn" -import { ObjectID, ObjectIdColumn } from "../../../../src" +import { ObjectId, ObjectIdColumn } from "../../../../src" @Entity() export class Post { @ObjectIdColumn() - id: ObjectID + id: ObjectId @Column() title: string diff --git a/test/other-issues/preventing-injection/preventing-injection.ts b/test/other-issues/preventing-injection/preventing-injection.ts index b074440ada..c5c2e649f5 100644 --- a/test/other-issues/preventing-injection/preventing-injection.ts +++ b/test/other-issues/preventing-injection/preventing-injection.ts @@ -30,13 +30,13 @@ describe("other issues > preventing-injection", () => { const postWithOnlyIdSelected = await connection.manager.find( Post, { - select: ["id"], + select: { id: true }, }, ) postWithOnlyIdSelected.should.be.eql([{ id: 1 }]) await connection.manager.find(Post, { - select: ["(WHERE LIMIT 1)" as any], + select: "(WHERE LIMIT 1)" as any, }).should.be.rejected }), )) diff --git a/test/other-issues/table-name-relation/table-name-relation.ts b/test/other-issues/table-name-relation/table-name-relation.ts index 519b7c214b..40b69fb97c 100644 --- a/test/other-issues/table-name-relation/table-name-relation.ts +++ b/test/other-issues/table-name-relation/table-name-relation.ts @@ -39,7 +39,7 @@ describe("other issues > Relation decorators: allow to pass given table name str await connection.manager.save(user) const users = await connection.manager.find(User, { - relations: ["profile"], + relations: { profile: true }, }) users.should.eql([ @@ -73,10 +73,14 @@ describe("other issues > Relation decorators: allow to pass given table name str await connection.manager.save(user) const users = await connection.manager.find(User, { - relations: ["photos"], + relations: { + photos: true, + }, }) const photos = await connection.manager.find(Photo, { - relations: ["user"], + relations: { + user: true, + }, }) // Check one-to-many @@ -130,7 +134,7 @@ describe("other issues > Relation decorators: allow to pass given table name str await connection.manager.save(question) const questions = await connection.manager.find(Question, { - relations: ["categories"], + relations: { categories: true }, }) questions[0].categories.should.have.deep.members([ diff --git a/test/utils/test-utils.ts b/test/utils/test-utils.ts index 25239cead0..ff00a240e0 100644 --- a/test/utils/test-utils.ts +++ b/test/utils/test-utils.ts @@ -482,7 +482,7 @@ export function closeTestingConnections(connections: DataSource[]) { return Promise.all( connections.map((connection) => connection && connection.isInitialized - ? connection.close() + ? connection.destroy() : undefined, ), )